var _yt_player={};(function(g){var window=this;/*

 Copyright The Closure Library Authors.
 SPDX-License-Identifier: Apache-2.0
*/
/*

 Copyright Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
/*

 Copyright Google LLC All Rights Reserved.

 Use of this source code is governed by an MIT-style license that can be
 found in the LICENSE file at https://angular.dev/license
*/
/*

 (The MIT License)

 Copyright (C) 2014 by Vitaly Puzrin

 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in
 all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.

 -----------------------------------------------------------------------------
 Ported from zlib, which is under the following license
 https://github.com/madler/zlib/blob/master/zlib.h

 zlib.h -- interface of the 'zlib' general purpose compression library
   version 1.2.8, April 28th, 2013
   Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
   arising from the use of this software.
   Permission is granted to anyone to use this software for any purpose,
   including commercial applications, and to alter it and redistribute it
   freely, subject to the following restrictions:
   1. The origin of this software must not be misrepresented; you must not
      claim that you wrote the original software. If you use this software
      in a product, an acknowledgment in the product documentation would be
      appreciated but is not required.
   2. Altered source versions must be plainly marked as such, and must not be
      misrepresented as being the original software.
   3. This notice may not be removed or altered from any source distribution.
   Jean-loup Gailly        Mark Adler
   jloup@gzip.org          madler@alumni.caltech.edu
   The data format used by the zlib library is described by RFCs (Request for
   Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
   (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
*/
/*

 Copyright 2015-present Dan Abramov
 SPDX-License-Identifier: MIT
*/
'use strict';var G="/api/manifest{mn{length{{assign{Z{startsWith{/{match{url{local{youtube.player.web_20260308_08_RC00{C{scheme{sp{path{unshift{1970-01-01T06:30:31.000+06:30{V{call{get{1{splice{indexOf{file{N{push{slice{split{www.youtube.com{&{fallback_count{/videoplayback{\u2250,\\;{toString{={r{set{join{,49];c[48]=c;{replace{redirector.googlevideo.com{clone{1969-12-31T13:00:09.000-11:00{rr?[1-9].*\\.c\\.youtube\\.com${1969-12-31T13:45:59.000-10:15{NaN{reverse{Untrusted URL{yq{,{https://local{k2{1970-01-01T11:30:53.000+11:30{n{J{\\.googlevideo\\.com${1970-01-01T11:31:02.000+11:30{/file/index.m3u8{pop{cmo=td{1970-01-01T10:30:31.000+10:30{FC{a1.googlevideo.com{://{Vd{,53];c[56]=c;{fvip{undefined{fromCharCode{playerfallback{index.m3u8{WS{%3D{wZ{\\.a1\\.googlevideo\\.com${rr{vQ{http://local{j-pq{s{/initplayback{forEach{1970-01-01T10:03:34.000+10:00{signatureCipher{cmo=pf{//{if-uyDKo1NEqKAB19_-_w8_{cmo".split("{"),
yz,A5,$4,rq,z_C,OT,G5,Xy,ce,ZCT,Vz,Pe,pC,KC,ET,A5Q,$t_,ve,Be,RC,ZB,QCt,ae,ts_,CR,Uy,OC_,MR,dtg,pR,wes,h_Q,G5y,Sf,Fw,NR,sy,HO,Re,$o,Ut_,Qm,tm,d4,MsC,w4,hm,ir,Ul,ur,xo,mi,qg,WC,T0,Vm,Jm,PC,Yo,Xez,c5e,p3,CQC,El,jR,SR,Ng,bCt,vC,BC,Rg,li,yN,ze,Zl,eD,AY,qTP,tY,WPC,Om,wf,hY,Ge,ii,Um,Xn,cZ,CK,ui,KPT,g4z,xv,WZ,Im,Te,VN,PZ,JY,Yv,fge,fK,nK,Ny,mtQ,sm,STq,jCy,NqC,FPe,Dl,l4,eU,AV,Qq,$g,Oq,hV,wt,dt,Mj,HZ,u4,b4,mM,xg,BZ,Wf,Ip,Tf,LPe,Pf,JV,Yg,p9,K9,gt,Eq,jU,SU,FI,L9,vf,Rp,Bqq,yW,lN,kU,Bf,HC4,$U,QW,t2,OU,d7,h2,w7,
aU,iN,UU,kxy,Mb,cG,XK,z1C,rpC,e1C,Cx,$R5,bN,uN,Qet,m2,xU,IU,Tn,dRz,VW,EU,fx,g7,J2,h1Q,nx,sU,vG,BG,Lx,HG,Do,lj,zA,rP,Zr,ew,$H,to,wP,ho,au,ij,UC,GA,Md,ci,Co,bj,uj,mY,qd,Wi,TA,VY,iRe,fo,EC,po,Jo,Ko,ou,gP,sC,Lo,cpC,vi,Bi,bRT,Hi,Ru,Dr,kd,z7,ZD,e6,uw_,mRq,Q3,tO,d0,OS,IBt,as,G7,To5,P2C,XU,US,ch,CZ,b0,u0,Mh,mH,xd,Wh,qh,Yd,JO,Is,V3,g0,ES,fZ,j6,S6,nZ,sS,LZ,vh,FU,Nh,os,Hh,Rs,DD,lW,kh,zM,rZ,ZO,eq,Ph,AF,QR,tF,OO,wZ,hF,GM,ak,iW,Mo,c$,Cp,mx,qo,W$,Ik,TM,Xc,VR,P$,pp,Yh,Kp,gZ,EO,Sq,np,Fc,sO,B$,H$,Rk,DO,lU,yx,kq,zg,
rp,Zv,ek,AE,$q,O4,wp,aY,iU,dp,MJ,c2,C$,fBs,E2s,xq,qJ,W2,Vx,jeQ,P2,K$,gp,E4,jk,Sk,n$,F3,oY,NJ,s4,L$,v2,B2,H2,Dv,lI,yK,rD,Z3,Aw,QK,OI,dD,wD,hw,Go,aK,NoC,MA,XL,CY,bI,Lv_,uI,mI,WL,v2C,Y7,pY,KY,gD,EI,fY,HRq,R1e,je,Se,nY,oK,sI,LY,vL,BL,NA,HL,leP,RK,ymt,D3,lL,Z35,e6t,eA,Aq,Qb,tq,Os,dh,wh,hq,GP,iL,a1,AmC,Qgt,tR5,dgT,MS,XW,cp,wC5,h6Q,G0z,aey,uL,xj,mu,i3e,Ug4,qS,Wp,TP,Vb,Pp,Jq,MRC,Yj,pr,Kr,XCP,gh,cm5,Es,b3_,jA,nr,uv_,o1,VRz,mgy,qly,Wie,IeT,T44,NS,Lr,Pr5,Bp,Hp,JmQ,YlT,pC5,R1,Kiz,Eot,lp,Dc,fe5,y7,jgy,r5,eb,z9,
Sl_,kA,Q7,Fiz,ooQ,w5,sgT,Lis,voz,ip,XD,U$,aR,c0,CU,B4s,up,R6Q,xA,qG,W0,DgC,IR,llq,zJ5,$yP,J_,Qm_,P0,KU,r2,T9,ZX,tD_,E$,OKC,$w,OQ,Qj,hJC,Ge4,alQ,iKs,Uy5,GW,aV,iA,MDz,XZQ,Mi,X9,cYt,bKe,bA,uns,uA,xw,xyC,Yw,pB,W4s,KB,Ilz,g2,EQ,fB,jO,SO,nB,TfC,VD_,LB,RV,BQ,Pig,YmC,kc,pZT,rs,ZL,eK,gvT,EvC,K45,flz,Sm_,nv4,F45,qmz,WQ,my_,AM,Qv,Oi,Nf5,ds,ws,Gq,VL,M0,smQ,a4,uD,xc,C6,L4e,XS,Ui,I4,Pd,vv5,Bf4,Ei,jK,n6,HK5,L6,Bd,si,yc,K6,FS,Dy5,DL,Hd,R4,kJ,RJC,ln,e9,t9,G8,ljy,a7,Mm,yVC,XZ,CS,bn,zA4,xJ,m5,rVT,Vc,I7,pS,T8,YJ,S9,
$je,Qps,O9z,j9,Nm,djq,LS,wf4,R7,vU,hAt,Gfs,aj_,i9Q,UjT,y0,r3,cVq,uIy,xjz,mjC,qqe,b94,C4T,eo,tn,An,WMe,d3,w3,hn,aj,iJ,Tt5,VUP,P4_,pfC,JVT,Mu,cc,bJ,Cf,ggg,qu,fjy,xC,Eg5,Tw,Ij,ngy,FMT,og4,Nt_,V0,Jn,vgT,Btt,YC,g3,EX,pf,Kf,loz,jo,ff,nf,F7,Nu,oj,y25,knq,zBC,Rj,DW,y8,eBC,ld,zB,Zf,rn,r2Q,tg,Oj,dn,wn,hg,GB,at,id,Uj,M3,$be,Xk,c_,CF,bd,QUe,tJP,Ox5,dbP,zw,ud,xe,mS,q3,W_,XGs,bxP,xbz,mb_,pF,W2T,gn,Ej,T75,S5,VJt,nF,ot,N3,LF,v_,Rt,Df,lu,AB,PNs,Qp,tB,YUz,Ou,dx,hB,fo5,pGg,c9,CW,bu,uu,xa,mw,qp,N7P,Ti,Vp,P9,JB,sUP,KW,
gx,Eu,fW,jM,SM,FA,oS,Np,LW,B9,H9,RS,DM,l8,yO,kG,zR,rL,ZJ,eW,AR,$G,QO,av,i8,Up,M4,L2_,XN,Cu,b8,u8,WR,Iv,TR,VO,YG,pu,Ku,vUg,B75,gL,Hxq,RB5,fu,sp,Lu,lr4,yoC,HR,DJ,lO,ku,ye,rJ,ZC,AK,$u,zz5,dJ,Gp,a3,iO,UJ,cq,Cl,X$,bO,F8,xu,mK,uO,hK,qK,I3,Quz,Ve,fl,ju,gJ,Su,nl,OoC,NK,ddP,sJ,Ll,hzz,Bq,GAP,arQ,io_,tw_,R3,Xi5,coe,yu,k9,$9,Qu,tD,Ow,d8,w8,hD,af,Uw,MP,Xp,CL,bs,boy,qP,If,T6,Vu,JD,Y9,pL,KL,g8,Ew,xdy,fL,qCq,Vw_,Ir5,TPs,Pjs,YCT,KYQ,gHC,pie,frC,of,NP,HD,juP,SCs,vD,nHQ,FYC,vH5,LY4,yE,kF,zT,rz,BPP,ty,HoP,RzT,GT,aa,
iw,lDQ,yOe,z9y,ZZq,Ml,e9C,Xl,xF,ql,VE,Ps,Jy,YF,EV,$hy,QsP,t6C,OZz,SY,dhe,whs,Fl,oa,G7s,Nl,Lm,vs,M6s,cOT,Bs,C0Q,bZT,xh5,mhT,Uhz,qST,Hs,T0s,V6q,y4,P0C,JOT,rc,YS5,phC,KHP,gdC,Q4,Ed5,fDT,jse,SSy,nd_,FHT,ode,N0P,LHq,Ob,dc,B0z,HZy,R9C,DhQ,lO_,yFe,hZ,G4,aL,iX,rFC,Ub,AFe,eGQ,kM_,$oC,ZpC,zGe,Qk5,tqC,Opt,do5,w$5,hGT,GMC,aOg,ipq,CW5,Uot,xO,m9,WS,xoP,Wxy,qOt,q8,V4,PS,YOQ,IOT,JZ,p$s,YO,Eh_,Kxs,ghe,fO4,Kv,SO4,nhs,Fxg,oh5,NZ5,skT,Lxt,jky,BZy,Hp5,RGs,kg5,yE4,Do4,rEP,nv,Z$5,elz,AEt,$J5,N8,tkg,O$t,sb,w24,Gg_,hl5,ave,
Mk_,i$P,z_,em,ZN,X2q,rC,AW,cEq,QD,u3Q,b$C,dC,OY,hW,aW,iP,M9,xJ5,ck,WBz,bP,uP,Ivy,Tp5,PU5,KB_,JE5,Y4C,p2z,x6,Wk,mR,fv5,jYg,S4C,pa,Y6,JW,gC,oqg,H$y,DJT,BpC,vqC,Rl5,jm,N9,rwC,l34,ywP,koq,FBs,wLs,lq,$E,dAy,XLP,OYz,fa,Zx,La,RW,hmP,oW,sYs,Npz,LBs,na,tee,Or,I3q,WI_,aN,VeT,PIC,iq,Jwt,YIg,pLz,g7Q,E7C,Xu,jKg,cH,SIe,n7P,o7y,NDP,bq,LIC,BDz,uq,HYQ,xE,mt,qM,Rmz,rqe,PH,pz,tAC,wpg,acC,irs,USy,Lz,MA_,Xpy,NM,moC,Fu,sr,oN,gv,yk,kb,rM,Zs,er,CLt,A4,br_,uWq,t4,mSt,qss,Wue,Ic5,h4,Th5,VAP,PLq,G1,Jqe,Ys_,ppP,aw,Kuz,gjg,iM,
Eje,j15,UP,Sse,njg,Fu_,Mf,Xh,cW,ojT,Nhg,s1q,Lug,vjT,Bhy,Hrz,xb,m7,Rh_,l2z,WW,k95,y_q,T1,z$P,Vk,r_z,$Gg,ZUq,e$Q,A_q,tbe,dGC,h$P,UGC,a24,iUC,J4,Yb,pe,Ke,c_e,Cp_,bUs,gM,EP,fe,mGe,xGz,q$4,WLq,Fh,I2e,T5z,Ppg,Le,vW,p05,KLe,gAt,f2z,jRe,nAQ,FLs,yw,LL4,vAz,Zz,HU5,At,DGP,$V,Qw,tt,lXq,yT4,Oo,dl,R$C,ztQ,ZBz,wl,ATe,et4,ht,dis,wQq,aI,Uo,ht5,XJ,co,GW5,xV,uH,aXC,C4,MOt,XQQ,cT4,CA5,bBQ,u9s,xi_,mm,bH,UiT,IXg,TX,VOq,PA_,p4,JTQ,Po,Jt,YQz,K4,KgQ,Ew5,gl,Eo,fX4,jVg,SQ_,nwq,Fg5,B2z,ji,LgT,N2P,owz,sVe,Rty,lLy,yMP,n4,zUy,
rMg,rR,i6y,ZH,eB,MKz,CDq,$W,Qo,b6e,dR,t0,uSC,x0C,m0_,qiQ,WO_,ILt,On,TsC,VKq,pdT,KOe,GJ,aG,il,Un,gcC,Ec_,MB,Xf,c5,fL_,j4e,bl,qB,W5,Vo,P5,J0,YW,pG,KG,gR,En,fG,jB,SB,Siy,Ff,oG,NB,sn,LG,FOC,ocs,v5,B5,DH,l7,LOs,vcP,yX,BsC,H6C,zK,RU5,O0,D0q,lZ5,y9C,k8t,r9P,ZS5,A9P,Q74,t9y,OST,dmy,wU_,hv,aZQ,aA,XUP,c9_,iS5,M95,Cnt,uZ5,xm4,IZ5,V95,Png,W5g,YWC,pUz,EJ_,j7z,gJg,SWy,F55,IA,NmC,oJs,TK,L5P,VX,HSC,R4t,Pa,DmC,pq,ynq,Ym,Kq,g9,zQP,fq,ZfT,E0,eQz,S4,Anz,j4,Fb,oA,DQ,yd,toe,en,OfC,duQ,wcC,hQQ,Qje,aWq,lR,Mo_,Xc_,cn4,CJ5,
Gws,Lq,NQ,Ba,bfQ,kR,RA,s0,wU,rU,Ha,$R,Qd,xut,muC,hL,v,T3y,Gs,a0,VoP,YX_,pcq,M6,XV,gC5,qR,SXT,F0_,N3C,sjP,Cc,L05,vCP,B3Q,q6,RQs,Duy,HfQ,lf4,Vd,JL,rgs,FV,o0,N6,sH,ZFC,Lc,PJ,BJ,HJ,R0,D_,lk,AgC,$3Q,Qt5,t5t,OFC,d3z,y_,w__,hDg,GB5,k0,afC,iFs,U3C,M5t,X_P,cgy,Cdz,zr,bFz,$0,Q_,t7,Tnt,dd,wd,h7,ah,V5y,ik,U1,XP,Pde,ct,Ck,p_q,gey,Ee5,KSg,x0,qx,mq,Wt,ffs,Sjs,jtt,bk,neP,FS4,oeC,Nn5,uk,Bn4,HFe,RDz,vet,LSg,stQ,D3g,Ih,JgT,lMs,Yje,yBz,kiT,zf5,ef5,rBq,Tr,ZWP,AB5,$pQ,tMy,OWC,QSQ,hfC,dpz,w9z,aMs,Gi_,iWP,Upe,Pt,MMq,CuT,
X9s,bWe,cBt,uAC,xpT,mpz,quz,Wwg,IM4,TxC,VMQ,PuC,JBC,Yuy,p9Q,J7,KwT,ga4,EaC,fMg,jSe,SuQ,naz,Fws,NxQ,Kk,gd,E1,fk,jT,oh,Nx,sST,Lwe,va4,Bxs,HWC,Ht,RfC,YR,Rh,D4,Dp5,lt,yS,kX,zH,rV,Ouq,eL,d4y,AN,$X,hYe,GRC,iu5,MWT,tN,dV,XRP,cR5,C85,buz,wV,uN5,hN,GH,ai,MH,Xs,cK,CM,bt,xX,mV,qH,qpC,WJP,IJs,TLT,P8T,JRg,YpT,pRC,KJQ,gGq,VS,JN,fJs,Spz,nGP,FJT,KM,YX,pM,E5,oGT,NLC,gV,sv4,vGs,Hu5,nM,D45,yKC,lCs,kpt,zLe,rKq,oi,NH,s5,Zl5,eLy,AKq,$K4,Q3g,tug,Ol_,dK5,wqQ,vK,hLe,Gp5,BK,Ri,aCz,l$,il5,UKQ,MuC,Xq4,cK_,yh,COz,$t,Qh,u$q,tC,
a5,di,Me,ICy,pqC,TJ5,KKC,EuC,fCT,guC,j3q,SJe,ou4,NJ5,LKs,BJC,lYy,rY,ZG,rDe,egg,t_y,AS,OLC,ADC,$s,QF,tS,ON,hgP,UPe,G64,bLP,T8y,IY5,up4,V_4,GV,mP4,xP4,Ywt,g95,KbT,Swy,E95,Pv,JS,sf4,Kw,LbT,zjg,kT5,yyQ,DPg,lAC,B8t,Zmy,ryC,HLT,dle,Om4,hjC,oD,Cws,GTP,imq,v94,fw,nw,Aye,ejT,tY5,mlt,j7,bmy,IAy,PwQ,YVP,Kl5,fAC,jag,nFP,oFe,sa5,Nzq,Rjs,vF_,Ll4,Dls,zXy,rZy,Zvy,eXe,Vh,AZe,QL5,Mv,XX,U8e,MGP,ivg,XSy,WJ,FKC,cm,CE,b_,u_,CXy,bvz,uH_,jL,mA,x8z,m8C,qv,W9e,IuC,qbC,Tc5,VGy,Ii,PXT,JZq,vu_,Yb4,I0,zS,UH,K9q,gOC,Ps_,n9T,Ys,
N8e,gFg,SVg,lug,nO_,hs,GS,As,e3,dY,ts,EOy,qwC,k6T,$Pq,Qfg,dPQ,aYQ,XDt,Wb_,pDz,fYy,jfT,Fb5,o9z,qVe,Tzq,Jyt,psq,EF5,k44,G4P,P3,lNQ,Nc_,Js,sL5,TS,Bz5,Ox,HmP,yW_,va,Z_,zs,ifC,z7s,KE,rWP,fE,YYq,E65,wQ,fN4,SYT,FRt,o6T,aE,iY,NCC,sW5,Ua,LR4,MN,v6P,BCg,HaQ,c6,R7s,D9T,bY,uY,yiC,kds,zv4,evC,W6,Tk,Aiq,Oz5,bzC,uu5,pb,M0g,wHC,Cqy,Gde,Ea,P6,dMC,t0P,QNC,$M5,gQ,J$,Kb,qrT,jv,Sv,nb,Fm,oE,NN,Wtq,sa,Lb,TvQ,V0s,B6,D5,Yrq,H6,RE,zI,lx,gET,EEe,fxy,ed,Fty,oE5,dF,Nvg,sNe,$$,QC,tQ,OL,wF,hQ,GI,a9,ix,LtT,UL,vEy,MO,Xg,Hz5,BvC,
Rve,DMq,Tx,cy,CV,bx,Oet,x$,qO,Wy,df4,I9,TI,Py,JQ,Y$,wWz,hVC,G1P,pV,ase,iet,KV,gF,Ufe,Mrt,EL,fV,XWz,c4s,CMQ,beq,uhy,Sd,nV,Fg,xfP,mfP,qPt,NO,sL,W7s,Isq,TMC,VrP,X7,PMz,J4q,YP_,pW_,vy,K7t,gbs,Eb4,yA,F7t,obQ,NMs,rb,$p,L75,vb5,BMe,Hes,QA,DfP,lz5,t6,zTz,rts,Z4Q,db,woq,hTP,GXs,C2,azC,i4s,Mit,Va,XHT,wb,U5e,WmP,Iz5,Tl5,Vi5,PHz,Jtz,pot,Xo5,mE,Kmg,PV,J6,Yp,gVy,EV5,K2,gb,lh,y6,vV4,Zw,D5s,lHy,Blg,H4C,RTy,r04,y0y,kJt,zyg,$f,ZGe,eyz,axz,UMT,mM5,fb,$B5,Q6,QGe,OGQ,A0z,dBy,hy5,aHs,w5P,iGz,UB5,MBT,Clg,c05,uf_,xBy,mB5,
GC,qn5,OH,W15,MV,XC,bh,uh,AA,xf,qV,Wn,Iq,TC,VBz,V6,Pl5,Nly,Yn_,gk,Sz,K1s,ZT,nA,jGe,FC,nW4,F1T,oW4,oq,NRg,sG5,Ry5,HGC,L15,BRt,vWg,kKQ,zCT,ZqP,eCs,$QQ,waP,Bn,Hn,aQP,Rq,Dw,UQt,M4P,cvy,C7_,bqs,mQP,q05,WpQ,IQg,P7T,Jve,pa_,Kp5,gm4,EmQ,jAP,Fpy,N9C,rH,Zp,sAg,B95,hP,rLT,l_e,ePt,ALC,Q0P,tnq,$6y,aH,GE,Oc5,d6q,wJQ,UK,XaP,Kc,fQy,CN,CR5,TE,W_C,Vnt,TUs,JLT,YHt,pJ5,K_4,gR5,ERP,f_Q,Y5,icq,Gss,NUs,KN,jn,gH,EK,fN,L_t,vRT,RP5,fc,nN,BUq,S2,Fj,PF,JP,NC,l4z,sK,Sn,y75,zWg,r7y,A7Q,LN,kre,vF,eWT,HF,QhT,tTT,RH,XJ5,yi,eS,$k,
CHy,wt5,ygT,pc,Grg,Qi,tI,a4z,Xj,OB,MTQ,wu,Xts,qo4,xxz,mxz,B,ao,ia,q1s,cl,Tdz,I4P,VTC,PkC,ua,Y1s,pt4,xk,jh_,S1_,q1,n0Q,NdP,EB,fi,jS,LqC,SS,oo,sB,Li,vl,DxP,v0g,lTz,yNs,kHq,DK,lo,z3C,rNQ,ZMz,e3q,ANC,$HC,rW,k_,y1,Qi4,zu,ZV,tLQ,OMz,dHz,h3z,GHC,aT4,UH_,ML5,XK4,cN5,bMq,eV,usP,$_,xH_,mHg,tJ,O2,dW,ITC,q5g,TVy,VL_,PtP,WVq,pKq,KVz,EXy,cw,fTC,Xe,jis,bo,nXC,FVs,oXy,x_,NVg,siq,mo,PO,BVs,HMC,DQ_,zPs,R35,qk,Ww,IM,zks,rCP,Tu,V1,Pw,x2,Z0T,ekC,ACs,$es,taC,JJ,MaT,mes,gW,q75,IhP,Ti4,VaQ,P$C,JCy,Y7t,p3_,K6y,gtz,fX,Etz,
fhe,jV,SV,j5t,nX,S7z,Jp,F6y,otC,NiP,s5s,Fe,L6_,vtC,Biq,Nk,Rke,ySy,vw,s2,H05,lGT,Bw,kVy,Hw,z54,rSy,Zw5,e5C,RM,DV,ASQ,lG,ki,Owq,d$P,GVt,aGg,rE,iwP,U$s,M7C,Z9,Xv_,yr,cS4,QDP,wvy,$$4,h5z,AU,C5q,bwC,u2e,x$e,m$P,$i,qNe,Qr,dE,wE,hU,tU,WZ_,TY5,V7P,IGT,P5Q,JSq,pvt,KZT,Ga,gsP,Ese,jD4,ab,SNQ,ns5,iG,Ug,Mq,Hw5,BYt,D$q,LZ5,JNQ,lqC,vsz,sD5,FZg,os5,NY4,kSz,zZz,ysQ,Cy,eZC,xi,gXs,Gu,aM,U2,Mk,$vg,Ta,bG,QdP,Vr,t3C,P4,OEq,dvt,JU,W4,Ib,Yi,uG,hZq,py,mW,Ky,gE,Eg,qq,Ass,wmq,fy,aq4,j$,GST,iEC,Uv4,M3Q,XmC,csq,bEg,S$,t7P,ny,
F0,LVy,vXz,uX5,xvs,Nq,lB,Iqz,mvz,qxy,sg,v4,P_5,Jsz,Yxq,pmy,KAt,gLe,ELy,kY,fqT,zZ,jdQ,rG,nL5,Sxt,oLC,NXy,FAT,el,LAe,vLP,BXC,RZy,Dv5,y$z,$Y,A1,l5s,zqT,t1,Zby,OF,r$Q,Q5,dG,wG,$Nz,A$t,iB,h1,C8,Obg,a5q,w6C,Gkt,hqy,uB,UNy,MvP,X6_,c$C,CY5,bbe,umC,xNC,ms,mNq,qas,W8q,TQ_,qw,I54,VvC,xY,J$s,V5,EM_,nMT,F8s,oMy,gMQ,p8,gG,YY,J1,NQ5,EF,f5Q,PY,K8,jEC,Yas,IF,L84,p6_,vMP,BQT,sEe,HbP,Rq4,f8,DNg,yQg,kIC,lPC,zOT,rQs,eOq,AQ5,tdz,$Oe,Q95,jl,OVQ,dOz,wyy,GIC,Sl,n8,aP5,iV4,UO5,Mdz,FQ,Xys,cQy,Cx_,bVt,ug_,xO5,mOC,qLT,WaT,IP4,
TFq,VdC,PxP,JQg,YLz,Ka4,g$P,E$_,sF,oF,L8,BY,SLz,RF,n$_,Fa_,o$s,HY,NFs,j9C,yB,LaQ,v$y,kI,s9C,io,CX,LX,TX_,y5,D9,Ly,B4,Rb,zj,HVQ,Sa_,WY,eg,A3,ROg,DOt,y6e,ofP,Fi,NkP,sqs,oZ,LcC,fP_,gr,jqe,vfC,NI,lp4,yPz,kE5,zK5,rPy,ZNs,s_,eK_,AP4,$C5,QHy,L5,v7,B7,t2y,H7,m4e,dCC,D1,RZ,hKq,GE4,le,yJ,apQ,wFe,zy,iNQ,rw,UCC,eQ,CgC,bNs,Aj,mCt,QJ,Oc,M2P,dw,qKT,ww,Z8,W3e,IpC,cP5,THg,hj,V2Q,XFC,tj,JP_,YKz,PgQ,pF5,Gy,an,n5z,fp5,Uc,F35,jH5,g5y,o5T,K3s,L3Q,NHC,ie,v5t,E5s,HNe,DCy,Mn,yIq,k3q,lKq,rIg,ZiQ,PYs,rr,GQ5,AI_,$Z,xZ,ue,qn,
In,Ty,$1C,VJ,d14,wl_,pt,Pr,tS4,Jj,huT,Wr,gw,YZ,Kt,Ct,mk,u5C,Qo_,Zk5,mv,be,m1s,SQ,SB4,iiQ,Nn,nkq,Fne,ok4,sc,NuC,so5,Lt,Lnt,vkT,Buz,HiT,D1C,vr,RuC,Br,lVT,yJP,kuQ,rJ5,ZXy,zS4,eSz,AJ5,$k5,Hr,Rn,D8,lc,QMs,tV_,OX4,dkC,kK,wwP,Gue,aV_,hSg,iXP,eX,Co5,$K,ueC,Ukq,MVy,Xws,cJe,Aa,bXC,xkC,q2C,Woy,IVT,ta,OZ,QM,dK,VVy,Poy,ha,Y2P,wK,pwC,kBy,GN,g_y,fV_,jMy,S25,al,n_z,FoQ,o_y,ic,UZ,NWy,sM4,BWz,RSC,Dke,l9t,yU5,ka5,z0t,rUQ,ZyP,$qs,AU4,cB,CJ,t$5,bc,XY,QbT,uc,h0e,a9q,WB,TN,CG5,qL,iyt,cU5,mh,Il,Uq5,bye,VM,u0C,PB,qt,xq5,
Ja,mq4,ux,qgT,WWq,KJ,V$z,I94,PGQ,J7t,nJ,Vi,NL,sZ,LJ,p45,KWs,giC,vB,HB,Rl,Sg4,FWe,f95,BB,Eie,NEq,viq,DE,BE5,Hys,lC,yQ,DqC,LW4,zU,ld5,k1,y1y,kZz,Z0,r1q,A8,esz,A1g,Z8g,$wz,QFT,tlg,O8_,t8,OD,d6,QQ,dwC,wYe,w6,h8,hsT,GZQ,adg,aX,i8s,c1C,iC,CBP,Uw5,XYy,uQy,M7,xw4,XG,mwq,qFt,cA,WsP,Id4,TGy,Vls,PBP,J1e,YFs,pYe,CP,uC,bC,Ks5,gYe,EYg,fd5,mG,jF_,SFg,nYC,x1,Fsy,oY_,NGT,q7,Lsy,sF_,WA,IX,vYz,BG_,H8q,RsQ,Dws,TU,VQ,y3q,J8,l14,Y1,kj_,pP,KP,z2_,Z5C,e2Q,A3z,$I_,r3e,QZy,tgy,O5C,g6,Gjg,dIQ,h2P,ED,fP,jp,a1s,Sp,i5y,Mg_,nP,
X7P,c3y,Cmt,b5C,uiz,xIe,mI5,q_4,FG,oX,WDC,I15,TrT,Vgt,Pms,N7,J35,Y_q,KDg,gI4,jZz,FD5,oIQ,BA,HA,sZQ,LDe,Nry,vI5,RX,D0,l6,H5Q,Bry,l8C,yjz,kys,znC,yU,kl,Zte,zD,Aj_,rO,Qny,Ott,dnP,$l,eP,Ax,Ces,GyC,dO,wO,Uny,QU,tx,OG,MQT,XrC,hx,XE,C7,b6,xnz,UG,u6,MW,qcs,uRq,WkC,btP,aQ,i6,I8z,mny,Twt,xl,VQe,Pe_,Ycg,m$,prs,Kk5,qW,Wu,gZq,f8C,EZz,jnq,IQ,TD,ScC,VU,nZy,Fkz,oZy,Pu,Jx,Nwz,snC,Yl,LkC,vZ_,gO,p7,K7,BwC,EG,Hts,f7,jP,n7,Rn5,Dn_,FE,lE5,oQ,yaz,kNz,NW,zIt,ZJt,ras,eIC,Aa4,$LC,QlT,tXs,OJ4,dL5,sG,L7,hIQ,aET,RQ,iJC,MXP,Dn,
XBT,caC,bJz,Ccy,y9,xLC,zG,kP,mL4,Whe,VX4,Pcq,wn4,Z7,ex,o05,rN,Ja5,AH,$P,Kh4,DL5,AJ,Q1,hH,l0y,S54,GG,uo,a$,iS,ob,wN,y8T,zbq,r8C,ZPz,ebq,A8s,$7t,QXP,tp5,De5,H4,wAt,xP,hbz,mU,M_,a0T,U7P,q_,MpC,WM,TG,c8P,V9,I$,uG5,uS,JH,m7C,x7C,PM,bS,OP4,YP,Xx,d7Q,C_,WG5,I0s,T6g,VpC,CC_,XA_,bPP,PC4,J8z,pAC,jx,Sx,KGC,YDe,f0_,jXC,SDP,EM,gN,n1e,K_,p_,f_,g1g,FGQ,n_,o1z,sXT,G3C,LGg,v1P,B6y,D7t,Fx,RbQ,sM,HP5,o$,lnC,yxy,kDt,zR4,rx4,Z7s,ba,BM,HM,lf,zF,ry,Axs,$Wg,QQ5,tPs,ZU,Al,tl,dW_,hRz,GD5,ant,UWy,Xuz,cx_,Qs,i7C,Xa,b7t,O6,ec,
uET,Cg,mWz,xWt,bf,uf,R$,mf,qX,InC,cN,k8,hl,dy,wy,GF,MPT,a6,ys,$8,TOT,eRe,VPs,P6P,D7,Vs,MX,Jx5,I6,YG4,WN,puz,PN,gly,El5,fnz,jQ5,SGg,nlg,F$Q,eYt,Jl,olT,ZuC,AR_,rH5,Y8,fM,$__,Q$4,AHP,txz,pg,Jv,iR,O_q,d__,wMP,sN,Lw,hHP,Kg,gy,ad,Zq,s3C,pw,$8Q,Wm,Ux,GGQ,a7C,i_5,fg,XM5,cHz,Sc,ng,CSz,x_C,m_5,Fa,qM_,b_C,WUe,uxC,I74,Fs,nc,eD5,NX,s6,SL,Vx5,vJ,o6,PS4,JHq,YMQ,O1,Lg,KUC,vN,BN,jc,HN,gPQ,R6,DU,EPC,f7Q,SMP,l3,nPs,RYT,FUz,NNT,oPz,s$4,lUq,yP,yl5,kFT,zxP,rl4,Zg_,r$,exQ,ey,Ale,$Xg,Q6P,tc5,Af,Og4,dX_,tf,wN4,hxT,aU_,McC,
clz,Cfg,w$,xXC,bgt,uas,WfP,IUT,TyT,Vcg,Pf4,JlC,o8Q,Nyg,U3,nug,LfQ,v8e,MZ,By5,s64,Rxz,DX4,yfC,lQ,y5C,lg5,Qz,z5;yz=function(l){return function(){return lQ[l].apply(this,arguments)}};
g.k4=function(l,y){return lQ[l]=y};
A5=function(l,y){if(y)for(var k=0;k<z5.length;k++)rq(z5[k]+"Array.prototype."+l,y)};
$4=function(l,y){y&&rq(l,y)};
rq=function(l,y){var k=Qz;l=l.split(".");for(var z=0;z<l.length-1;z++){var r=l[z];if(!(r in k))return;k=k[r]}l=l[l.length-1];z=k[l];y=y(z);y!=z&&y!=null&&lg5(k,l,{configurable:!0,writable:!0,value:y})};
z_C=function(l,y){l.prototype=y5C(y.prototype);l.prototype.constructor=l;k5e(l,y);l.Ws=y.prototype};
OT=function(l){l=Math.trunc(l)||0;l<0&&(l+=this.length);if(!(l<0||l>=this.length))return this[l]};
G5=function(l,y,k){l instanceof String&&(l=String(l));for(var z=l.length-1;z>=0;z--){var r=l[z];if(y.call(k,r,z,l))return{qR:z,b8:r}}return{qR:-1,b8:void 0}};
g.iQ=function(l,y,k){l=l.split(".");k=k||g.aC;for(var z;l.length&&(z=l.shift());)l.length||y===void 0?k[z]&&k[z]!==Object.prototype[z]?k=k[z]:k=k[z]={}:k[z]=y};
Xy=function(l,y){var k=g.UT("CLOSURE_FLAGS");l=k&&k[l];return l!=null?l:y};
g.UT=function(l,y){l=l.split(".");y=y||g.aC;for(var k=0;k<l.length;k++)if(y=y[l[k]],y==null)return null;return y};
ce=function(l){var y=typeof l;return y!="object"?y:l?Array.isArray(l)?"array":y:"null"};
g.CC=function(l){var y=ce(l);return y=="array"||y=="object"&&typeof l.length=="number"};
g.uQ=function(l){var y=typeof l;return y=="object"&&l!=null||y=="function"};
g.mP=function(l){return Object.prototype.hasOwnProperty.call(l,x4)&&l[x4]||(l[x4]=++r5Q)};
ZCT=function(l,y,k){return l.call.apply(l.bind,arguments)};
var e_T=function(l){return qt[G[19]](this,2,494,l)};
g.We=function(l,y,k){g.We=ZCT;return g.We.apply(null,arguments)};
g.IC=function(l,y){var k=Array.prototype.slice.call(arguments,1);return function(){var z=k.slice();z.push.apply(z,arguments);return l.apply(this,z)}};
g.T5=function(){return Date.now()};
Vz=function(l){g.iQ("yt.abuse.playerAttLoaderRun",l)};
Pe=function(l){return l};
g.J5=function(l,y){function k(){}
k.prototype=y.prototype;l.Ws=y.prototype;l.prototype=new k;l.prototype.constructor=l;l.Ww=function(z,r,Z){for(var e=Array(arguments.length-2),A=2;A<arguments.length;A++)e[A-2]=arguments[A];return y.prototype[r].apply(z,e)}};
pC=function(l,y){if(y!==null&&y!==void 0){if(typeof y!=="object"&&typeof y!=="function")throw new TypeError("Object expected.");if(k===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");var k=y[Symbol.dispose]}if(typeof k!=="function")throw new TypeError("Object not disposable.");l.stack.push({value:y,dispose:k,async:!1})}return y};
KC=function(l){function y(Z){l.error=l.hasError?new SuppressedError(Z,l.error,"An error was suppressed during disposal."):Z;l.hasError=!0}
function k(){for(;z=l.stack.pop();)try{if(!z.async&&r===1)return r=0,l.stack.push(z),Promise.resolve().then(k);if(z.dispose){var Z=z.dispose.call(z.value);if(z.async)return r|=2,Promise.resolve(Z).then(k,function(e){y(e);return k()})}else r|=1}catch(e){y(e)}if(r===1)return l.hasError?Promise.reject(l.error):Promise.resolve();
if(l.hasError)throw l.error;}
var z,r=0;k()};
ET=function(l,y){if(Error.captureStackTrace)Error.captureStackTrace(this,ET);else{const k=Error().stack;k&&(this.stack=k)}l&&(this.message=String(l));y!==void 0&&(this.cause=y)};
A5Q=function(){};
g.nC=function(l){return l[l.length-1]};
g.Fy=function(l,y,k){Array.prototype.forEach.call(l,y,k)};
$t_=function(l,y){var k=l.length;const z=typeof l==="string"?l.split(""):l;for(--k;k>=0;--k)k in z&&y.call(void 0,z[k],k,l)};
g.oC=function(l,y,k){return Array.prototype.filter.call(l,y,k)};
g.sT=function(l,y,k){return Array.prototype.map.call(l,y,k)};
ve=function(l,y,k){return Array.prototype.reduce.call(l,y,k)};
Be=function(l,y){return Array.prototype.some.call(l,y,void 0)};
g.He=function(l,y,k){return Array.prototype.every.call(l,y,k)};
g.Dg=function(l,y,k){y=RC(l,y,k);return y<0?null:typeof l==="string"?l.charAt(y):l[y]};
RC=function(l,y,k){const z=l.length,r=typeof l==="string"?l.split(""):l;for(let Z=0;Z<z;Z++)if(Z in r&&y.call(k,r[Z],Z,l))return Z;return-1};
g.yL=function(l,y,k){var z=l.length;const r=typeof l==="string"?l.split(""):l;for(--z;z>=0;z--)if(z in r&&y.call(k,r[z],z,l))return z;return-1};
g.ro=function(l,y){return Array.prototype.indexOf.call(l,y,void 0)>=0};
ZB=function(l){if(!Array.isArray(l))for(let y=l.length-1;y>=0;y--)delete l[y];l.length=0};
g.Ap=function(l,y){y=Array.prototype.indexOf.call(l,y,void 0);let k;(k=y>=0)&&g.ef(l,y);return k};
g.ef=function(l,y){return Array.prototype.splice.call(l,y,1).length==1};
g.$2=function(l,y){y=RC(l,y);y>=0&&g.ef(l,y)};
QCt=function(l,y){let k=0;$t_(l,function(z,r){y.call(void 0,z,r,l)&&g.ef(l,r)&&k++})};
g.QL=function(l){return Array.prototype.concat.apply([],arguments)};
g.tp=function(l){const y=l.length;if(y>0){const k=Array(y);for(let z=0;z<y;z++)k[z]=l[z];return k}return[]};
g.Gx=function(l,y){for(let k=1;k<arguments.length;k++){const z=arguments[k];if(g.CC(z)){const r=l.length||0,Z=z.length||0;l.length=r+Z;for(let e=0;e<Z;e++)l[r+e]=z[e]}else l.push(z)}};
g.i2=function(l,y,k,z){Array.prototype.splice.apply(l,ae(arguments,1))};
ae=function(l,y,k){return arguments.length<=2?Array.prototype.slice.call(l,y):Array.prototype.slice.call(l,y,k)};
ts_=function(l){let y=0,k=0;const z=new Set;for(;k<l.length;){const r=l[k++],Z=r;z.has(Z)||(z.add(Z),l[y++]=r)}l.length=y};
g.cO=function(l,y,k){return Uy(l,k||MR,!1,y)};
CR=function(l,y){return Uy(l,y,!0)};
Uy=function(l,y,k,z){let r=0,Z=l.length,e;for(;r<Z;){const A=r+(Z-r>>>1);let Q;k?Q=y.call(void 0,l[A],A,l):Q=y(z,l[A]);Q>0?r=A+1:(Z=A,e=!Q)}return e?r:-r-1};
g.b2=function(l,y){l.sort(y||MR)};
OC_=function(l,y){const k=MR;g.b2(l,function(z,r){return k(y(z),y(r))})};
g.u2=function(l,y,k){if(!g.CC(l)||!g.CC(y)||l.length!=y.length)return!1;const z=l.length;k=k||dtg;for(let r=0;r<z;r++)if(!k(l[r],y[r]))return!1;return!0};
MR=function(l,y){return l>y?1:l<y?-1:0};
dtg=function(l,y){return l===y};
pR=function(l,y,k,z,r,Z,e,A,Q){var t=y^l;var O;l-2>>4||(O=k(e,A,Q));if(l>>2<24&&(l-4&12)>=10){x2(t^4151,t^2583,k);var d=mv(t^4102,t^3431,k[G[t^4122]](G[1])||G[3])[G[t^4114]](G[t^4156]);O=k[G[t^4097]]===G[t^4142]&&d[G[2]]>1&&!!d[1]}if((l>>1&20)<1&&((l^52)&7)>=1){if(!(qR(k[G[t^517]])||k[G[t^517]][G[6]](G[t^515])||k[G[t^517]][G[6]](G[t^570])||k[G[t^517]][G[6]](G[t^583])))throw new g.WO(G[t^569],k[G[t^517]]);d=g.Ie(k[G[t^517]]);k[G[t^516]]=d[G[t^574]];k[G[t^528]]=d[G[5]]+(d[G[t^528]]!=null?`:${d[G[t^
528]]}`:G[3]);var w=d[G[t^517]];w[G[6]](G[t^553])?(k[G[t^518]]=G[t^553],w=w[G[t^530]](t^519)):w[G[6]](G[t^600])?(k[G[t^518]]=G[t^600],w=w[G[t^530]](t^516)):w[G[6]](G[0])?(w=Tx(1,t^6334,w,k),w=w[0]):(k[G[t^518]]=w,w=G[3]);var h=k[G[5]];k[G[5]]=VL(t^513,t^1296,w);Object[G[4]](k[G[5]],PO(t^543,t^6273,d[G[t^539]][G[t^555]]()));Object[G[4]](k[G[5]],h);k[G[5]][G[t^529]]===G[t^590]&&(delete k[G[5]][G[t^529]],k[G[t^518]]+=G[t^563]);k[G[t^517]]=G[3];k[G[t^512]]=G[3];k[G[t^539]]&&(d=Jp(t^555,t^8960,k));O=[]}(l+
4^18)<l&&(l-4^30)>=l&&(d=k[G[t^3259]](G[3]),Y2[G[t^3225]](d,t^3247),Y2[G[t^3225]](d,t^3213),Y2[G[t^3219]](d,3),Y2[G[t^3225]](d,t^3200),Y2[G[t^3225]](d,t^3206),Y2[G[t^3306]](d,t^3242),Y2[G[t^3219]](d,3),O=d[G[t^3201]](G[3]));l-3>=15&&l+3<35&&(O=k!==null);return O};
g.KR=function(l,y,k){k=g.cO(l,y,k);k<0&&g.i2(l,-(k+1),0,y)};
g.Ey=function(l,y,k){const z={};g.Fy(l,function(r,Z){z[y.call(k,r,Z,l)]=r});
return z};
wes=function(l){const y=[];for(let k=0;k<l;k++)y[k]="";return y};
h_Q=function(l,y){y=Array.prototype.splice.call(l,y,1);Array.prototype.splice.call(l,0,0,y[0])};
G5y=function(l){const y={};g.Fy(l,k=>{const z=k.event,r=y[z];y.hasOwnProperty(z)?r!==null&&(k.equals(r)||(y[z]=null)):y[z]=k});
QCt(l,k=>y[k.event]===null)};
g.fR=function(l,y,k){for(const z in l)y.call(k,l[z],z,l)};
g.jf=function(l,y,k){const z={};for(const r in l)y.call(k,l[r],r,l)&&(z[r]=l[r]);return z};
Sf=function(l,y){const k={};for(const z in l)k[z]=y.call(void 0,l[z],z,l);return k};
g.nR=function(l,y,k){for(const z in l)if(y.call(k,l[z],z,l))return!0;return!1};
Fw=function(l,y){for(const k in l)if(!y.call(void 0,l[k],k,l))return!1;return!0};
g.oe=function(l){for(const y in l)return y};
NR=function(l){for(const y in l)return l[y]};
sy=function(l){const y=[];let k=0;for(const z in l)y[k++]=l[z];return y};
g.LR=function(l){const y=[];let k=0;for(const z in l)y[k++]=z;return y};
g.vO=function(l,y){return l!==null&&y in l};
g.BO=function(l,y){for(const k in l)if(l[k]==y)return!0;return!1};
HO=function(l,y){for(const k in l)if(y.call(void 0,l[k],k,l))return k};
Re=function(l,y){return(y=HO(l,y))&&l[y]};
g.DB=function(l){for(const y in l)return!1;return!0};
g.lr=function(l){for(const y in l)delete l[y]};
g.ko=function(l,y,k){return l!==null&&y in l?l[y]:k};
g.z0=function(l,y){for(const k in l)if(!(k in y)||l[k]!==y[k])return!1;for(const k in y)if(!(k in l))return!1;return!0};
g.r4=function(l){const y={};for(const k in l)y[k]=l[k];return y};
g.Ze=function(l){if(!l||typeof l!=="object")return l;if(typeof l.clone==="function")return l.clone();if(typeof Map!=="undefined"&&l instanceof Map)return new Map(l);if(typeof Set!=="undefined"&&l instanceof Set)return new Set(l);if(l instanceof Date)return new Date(l.getTime());const y=Array.isArray(l)?[]:typeof ArrayBuffer!=="function"||typeof ArrayBuffer.isView!=="function"||!ArrayBuffer.isView(l)||l instanceof DataView?{}:new l.constructor(l.length);for(const k in l)y[k]=g.Ze(l[k]);return y};
g.Am=function(l,y){let k,z;for(let r=1;r<arguments.length;r++){z=arguments[r];for(k in z)l[k]=z[k];for(let Z=0;Z<eR.length;Z++)k=eR[Z],Object.prototype.hasOwnProperty.call(z,k)&&(l[k]=z[k])}};
$o=function(l,y,k){l.Z[y]||(l.Z[y]=new ag4(k));return l.Z[y]};
Ut_=function(l){l.Z.queryid||(l.Z.queryid=new iCq)};
Qm=function(l,y,k){(l=l.Z[y])&&l.N(k)};
tm=function(l,y){if(g.vO(l.N,y))return l.N[y];if(l=l.Z[y])return l.getValue()};
d4=function(l){const y={},k=g.jf(l.Z,z=>z.Z);
g.fR(k,(z,r)=>{z=l.N[r]!==void 0?String(l.N[r]):z.Z&&z.C!==null?String(z.C):"";z.length>0&&(y[r]=z)},l);
return y};
MsC=function(l){l=d4(l);const y=[];g.fR(l,(k,z)=>{z in Object.prototype||typeof k!="undefined"&&y.push([z,":",k].join(""))});
return y};
w4=function(l,y){return l.lastIndexOf(y,0)==0};
hm=function(l,y){const k=l.length-y.length;return k>=0&&l.indexOf(y,k)==k};
g.G0=function(l){return/^[\s\xa0]*$/.test(l)};
g.ag=function(l,y){return l.indexOf(y)!=-1};
ir=function(l,y){return g.ag(l.toLowerCase(),y.toLowerCase())};
g.Mg=function(l,y){let k=0;l=String(l).trim().split(".");y=String(y).trim().split(".");const z=Math.max(l.length,y.length);for(let e=0;k==0&&e<z;e++){var r=l[e]||"",Z=y[e]||"";do{r=/(\d*)(\D*)(.*)/.exec(r)||["","","",""];Z=/(\d*)(\D*)(.*)/.exec(Z)||["","","",""];if(r[0].length==0&&Z[0].length==0)break;k=Ul(r[1].length==0?0:parseInt(r[1],10),Z[1].length==0?0:parseInt(Z[1],10))||Ul(r[2].length==0,Z[2].length==0)||Ul(r[2],Z[2]);r=r[3];Z=Z[3]}while(k==0)}return k};
Ul=function(l,y){return l<y?-1:l>y?1:0};
g.Xv=function(){var l=g.aC.navigator;return l&&(l=l.userAgent)?l:""};
ur=function(l){if(!cC&&!C3||!br)return!1;for(let y=0;y<br.brands.length;y++){const {brand:k}=br.brands[y];if(k&&g.ag(k,l))return!0}return!1};
xo=function(l){return g.ag(g.Xv(),l)};
mi=function(){return cC||C3?!!br&&br.brands.length>0:!1};
qg=function(){return mi()?!1:xo("Opera")};
WC=function(){return mi()?!1:xo("Trident")||xo("MSIE")};
T0=function(){return mi()?ur("Microsoft Edge"):xo("Edg/")};
Vm=function(){return xo("Firefox")||xo("FxiOS")};
Jm=function(){return xo("Safari")&&!(PC()||(mi()?0:xo("Coast"))||qg()||(mi()?0:xo("Edge"))||T0()||(mi()?ur("Opera"):xo("OPR"))||Vm()||xo("Silk")||xo("Android"))};
PC=function(){return mi()?ur("Chromium"):(xo("Chrome")||xo("CriOS"))&&!(mi()?0:xo("Edge"))||xo("Silk")};
Yo=function(){return xo("Android")&&!(PC()||Vm()||qg()||xo("Silk"))};
Xez=function(l){const y={};l.forEach(k=>{y[k[0]]=k[1]});
return k=>y[k.find(z=>z in y)]||""};
c5e=function(l){var y=g.Xv();if(l==="Internet Explorer"){if(WC())if((l=/rv: *([\d\.]*)/.exec(y))&&l[1])y=l[1];else{l="";var k=/MSIE +([\d\.]+)/.exec(y);if(k&&k[1])if(y=/Trident\/(\d.\d)/.exec(y),k[1]=="7.0")if(y&&y[1])switch(y[1]){case "4.0":l="8.0";break;case "5.0":l="9.0";break;case "6.0":l="10.0";break;case "7.0":l="11.0"}else l="7.0";else l=k[1];y=l}else y="";return y}const z=RegExp("([A-Z][\\w ]+)/([^\\s]+)\\s*(?:\\((.*?)\\))?","g");k=[];let r;for(;r=z.exec(y);)k.push([r[1],r[2],r[3]||void 0]);
y=Xez(k);switch(l){case "Opera":if(qg())return y(["Version","Opera"]);if(mi()?ur("Opera"):xo("OPR"))return y(["OPR"]);break;case "Microsoft Edge":if(mi()?0:xo("Edge"))return y(["Edge"]);if(T0())return y(["Edg"]);break;case "Chromium":if(PC())return y(["Chrome","CriOS","HeadlessChrome"])}return l==="Firefox"&&Vm()||l==="Safari"&&Jm()||l==="Android Browser"&&Yo()||l==="Silk"&&xo("Silk")?(y=k[2])&&y[1]||"":""};
p3=function(l){if(mi()&&l!=="Silk"){var y=br.brands.find(({brand:k})=>k===l);
if(!y||!y.version)return NaN;y=y.version.split(".")}else{y=c5e(l);if(y==="")return NaN;y=y.split(".")}return y.length===0?NaN:Number(y[0])};
CQC=function(){let l=null;if(!K3)return l;try{const y=k=>k;
l=K3.createPolicy("goog#html",{createHTML:y,createScript:y,createScriptURL:y})}catch(y){}return l};
El=function(){g4===void 0&&(g4=CQC());return g4};
jR=function(l){const y=El();l=y?y.createScriptURL(l):l;return new f3(l)};
SR=function(l){if(l instanceof f3)return l.Z;throw Error("");};
g.Fv=function(l){if(l instanceof n3)return l.Z;throw Error("");};
Ng=function(l){return new og(y=>y.substr(0,l.length+1).toLowerCase()===l+":")};
bCt=function(l,y=sl){if(l instanceof n3)return l;for(let k=0;k<y.length;++k){const z=y[k];if(z instanceof og&&z.Ij(l))return new n3(l)}};
g.L3=function(l,y=sl){return bCt(l,y)||uyt};
vC=function(l){if(xt_.test(l))return l};
BC=function(l){return l instanceof n3?g.Fv(l):vC(l)};
g.HC=function(l,y){y=BC(y);y!==void 0&&(l.href=y)};
Rg=function(l,y=`unexpected value ${l}!`){throw Error(y);};
li=function(l){const y=El();l=y?y.createHTML(l):l;return new De(l)};
yN=function(l){if(l instanceof De)return l.Z;throw Error("");};
g.kv=function(l,y,k,z){y=BC(y);return y!==void 0?l.open(y,k,z):null};
ze=function(l=document){l=l.querySelector?.("script[nonce]");return l==null?"":l.nonce||l.getAttribute("nonce")||""};
Zl=function(l){const y=El();l=y?y.createScript(l):l;return new rf(l)};
eD=function(l){if(l instanceof rf)return l.Z;throw Error("");};
AY=function(l){const y=ze(l.ownerDocument);y&&l.setAttribute("nonce",y)};
g.$v=function(l,y){l.src=SR(y);AY(l)};
qTP=function(l){var y="true".toString(),k=[mtQ`data-`];if(k.length===0)throw Error("");if(k.map(z=>{if(z instanceof QN)z=z.Z;else throw Error("");return z}).every(z=>"data-loaded".indexOf(z)!==0))throw Error('Attribute "data-loaded" does not match any of the allowed prefixes.');
l.setAttribute("data-loaded",y)};
tY=function(l,y){l.__closure__error__context__984382||(l.__closure__error__context__984382={});l.__closure__error__context__984382.severity=y};
WPC=function(l){var y=g.UT("window.location.href");l==null&&(l='Unknown Error of type "null/undefined"');if(typeof l==="string")return{message:l,name:"Unknown error",lineNumber:"Not available",fileName:y,stack:"Not available"};let k,z;var r=!1;try{k=l.lineNumber||l.line||"Not available"}catch(Z){k="Not available",r=!0}try{z=l.fileName||l.filename||l.sourceURL||g.aC.$googDebugFname||y}catch(Z){z="Not available",r=!0}y=Om(l);if(!(!r&&l.lineNumber&&l.fileName&&l.stack&&l.message&&l.name)){r=l.message;
if(r==null){if(l.constructor&&l.constructor instanceof Function){if(l.constructor.name)r=l.constructor.name;else if(r=l.constructor,df[r])r=df[r];else{r=String(r);if(!df[r]){const Z=/function\s+([^\(]+)/m.exec(r);df[r]=Z?Z[1]:"[Anonymous]"}r=df[r]}r='Unknown Error of type "'+r+'"'}else r="Unknown Error of unknown type";typeof l.toString==="function"&&Object.prototype.toString!==l.toString&&(r+=": "+l.toString())}return{message:r,name:l.name||"UnknownError",lineNumber:k,fileName:z,stack:y||"Not available"}}return{message:l.message,
name:l.name,lineNumber:l.lineNumber,fileName:l.fileName,stack:y}};
Om=function(l,y){y||(y={});y[wf(l)]=!0;let k=l.stack||"";var z=l.cause;z&&!y[wf(z)]&&(k+="\nCaused by: ",z.stack&&z.stack.indexOf(z.toString())==0||(k+=typeof z==="string"?z:z.message+"\n"),k+=Om(z,y));l=l.errors;if(Array.isArray(l)){z=1;let r;for(r=0;r<l.length&&!(z>4);r++)y[wf(l[r])]||(k+="\nInner error "+z++ +": ",l[r].stack&&l[r].stack.indexOf(l[r].toString())==0||(k+=typeof l[r]==="string"?l[r]:l[r].message+"\n"),k+=Om(l[r],y));r<l.length&&(k+="\n... "+(l.length-r)+" more inner errors")}return k};
wf=function(l){let y="";typeof l.toString==="function"&&(y=""+l);return y+l.stack};
hY=function(l,y,k){return l.parseFromString(yN(y),k)};
Ge=function(l,y){return new Worker(SR(l),y)};
g.am=function(l){return encodeURIComponent(String(l))};
ii=function(l){return decodeURIComponent(l.replace(/\+/g," "))};
Um=function(l){Igg.test(l)&&(l.indexOf("&")!=-1&&(l=l.replace(Tqe,"&amp;")),l.indexOf("<")!=-1&&(l=l.replace(VsC,"&lt;")),l.indexOf(">")!=-1&&(l=l.replace(PQq,"&gt;")),l.indexOf('"')!=-1&&(l=l.replace(J55,"&quot;")),l.indexOf("'")!=-1&&(l=l.replace(YTs,"&#39;")),l.indexOf("\x00")!=-1&&(l=l.replace(pes,"&#0;")));return l};
g.My=function(l){return l==null?"":String(l)};
Xn=function(l){let y=0;for(let k=0;k<l.length;++k)y=31*y+l.charCodeAt(k)>>>0;return y};
cZ=function(l){const y=Number(l);return y==0&&g.G0(l)?NaN:y};
CK=function(l){return String(l).replace(/\-([a-z])/g,function(y,k){return k.toUpperCase()})};
ui=function(){return"googleAvInapp".replace(/([A-Z])/g,"-$1").toLowerCase()};
KPT=function(l){return l.replace(RegExp("(^|[\\s]+)([a-z])","g"),function(y,k,z){return k+z.toUpperCase()})};
g4z=function(l){var y=1;l=l.split(":");const k=[];for(;y>0&&l.length;)k.push(l.shift()),y--;l.length&&k.push(l.join(":"));return k};
xv=function(){return cC||C3?!!br&&!!br.platform:!1};
WZ=function(){return xv()?br.platform==="Android":xo("Android")};
Im=function(){return xo("iPhone")&&!xo("iPod")&&!xo("iPad")};
Te=function(){return Im()||xo("iPad")||xo("iPod")};
VN=function(){return xv()?br.platform==="macOS":xo("Macintosh")};
PZ=function(){return xv()?br.platform==="Windows":xo("Windows")};
JY=function(l){JY[" "](l);return l};
Yv=function(l,y){try{return JY(l[y]),!0}catch(k){}return!1};
fge=function(l,y){var k=E45;return Object.prototype.hasOwnProperty.call(k,l)?k[l]:k[l]=y(l)};
g.KK=function(l){return fge(l,function(){return g.Mg(pK,l)>=0})};
g.gf=function(l,y,k){return Math.min(Math.max(l,y),k)};
g.Em=function(l,y){l%=y;return l*y<0?l+y:l};
fK=function(l,y,k){return l+k*(y-l)};
g.jD=function(l,y){this.x=l!==void 0?l:0;this.y=y!==void 0?y:0};
nK=function(l,y){return l==y?!0:l&&y?l.x==y.x&&l.y==y.y:!1};
g.Fn=function(l,y){this.width=l;this.height=y};
g.om=function(l,y){return l==y?!0:l&&y?l.width==y.width&&l.height==y.height:!1};
Ny=function(l){return l.width*l.height};
mtQ=function(l){return new QN(l[0].toLowerCase())};
sm=function(l){if(l instanceof De)return l;l=String(l).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;");return li(l)};
STq=function(l){return jCy(l)};
jCy=function(l){const y=sm("");return li(l.map(k=>yN(sm(k))).join(yN(y).toString()))};
NqC=function(l){var y;if(!LK.test("div"))throw Error("");if(n4C.indexOf("DIV")!==-1)throw Error("");let k="<div";l&&(k+=FPe(l));Array.isArray(y)||(y=y===void 0?[]:[y]);o4P.indexOf("DIV")!==-1?k+=">":(l=STq(y.map(z=>z instanceof De?z:sm(String(z)))),k+=">"+l.toString()+"</div>");
return li(k)};
FPe=function(l){var y="";const k=Object.keys(l);for(let Z=0;Z<k.length;Z++){var z=k[Z],r=l[z];if(!LK.test(z))throw Error("");if(r!==void 0&&r!==null){if(/^on./i.test(z))throw Error("");sCy.indexOf(z.toLowerCase())!==-1&&(r=r instanceof n3?r.toString():vC(String(r))||"about:invalid#zClosurez");r=`${z}="${sm(String(r))}"`;y+=" "+r}}return y};
g.vZ=function(l,...y){if(y.length===0)return jR(l[0]);let k=l[0];for(let z=0;z<y.length;z++)k+=encodeURIComponent(y[z])+l[z+1];return jR(k)};
Dl=function(l){return l?new BZ(HZ(l)):Rm||(Rm=new BZ)};
l4=function(l,y){return typeof y==="string"?l.getElementById(y):y};
g.yq=function(l,y){return(y||document).getElementsByTagName(String(l))};
g.kg=function(l,y){return(y||document).querySelectorAll("."+l)};
g.rt=function(l,y){var k=y||document;k.getElementsByClassName?l=k.getElementsByClassName(l)[0]:(k=document,l=l?(y||k).querySelector(l?"."+l:""):g.zf(k,"*",l,y)[0]||null);return l||null};
g.zf=function(l,y,k,z){l=z||l;return(y=y&&y!="*"?String(y).toUpperCase():"")||k?l.querySelectorAll(y+(k?"."+k:"")):l.getElementsByTagName("*")};
eU=function(l,y){g.fR(y,function(k,z){z=="style"?l.style.cssText=k:z=="class"?l.className=k:z=="for"?l.htmlFor=k:Zj.hasOwnProperty(z)?l.setAttribute(Zj[z],k):w4(z,"aria-")||w4(z,"data-")?l.setAttribute(z,k):l[z]=k})};
AV=function(l){l=l.document;l=l.compatMode=="CSS1Compat"?l.documentElement:l.body;return new g.Fn(l.clientWidth,l.clientHeight)};
Qq=function(l){const y=$g(l);l=l.defaultView;return new g.jD(l?.pageXOffset||y.scrollLeft,l?.pageYOffset||y.scrollTop)};
$g=function(l){return l.scrollingElement?l.scrollingElement:g.tV||l.compatMode!="CSS1Compat"?l.body||l.documentElement:l.documentElement};
Oq=function(l){return l?l.defaultView:window};
hV=function(l,y,k){var z=arguments,r=document;const Z=z[1],e=dt(r,String(z[0]));Z&&(typeof Z==="string"?e.className=Z:Array.isArray(Z)?e.className=Z.join(" "):eU(e,Z));z.length>2&&wt(r,e,z,2);return e};
wt=function(l,y,k,z){function r(Z){Z&&y.appendChild(typeof Z==="string"?l.createTextNode(Z):Z)}
for(;z<k.length;z++){const Z=k[z];!g.CC(Z)||g.uQ(Z)&&Z.nodeType>0?r(Z):g.Fy(Z&&typeof Z.length=="number"&&typeof Z.item=="function"?g.tp(Z):Z,r)}};
g.Gf=function(l){return dt(document,l)};
dt=function(l,y){y=String(y);l.contentType==="application/xhtml+xml"&&(y=y.toLowerCase());return l.createElement(y)};
g.ap=function(l){return document.createTextNode(String(l))};
g.i4=function(l,y){l.appendChild(y)};
g.Uq=function(l){let y;for(;y=l.firstChild;)l.removeChild(y)};
Mj=function(l,y,k){l.insertBefore(y,l.childNodes[k]||null)};
g.XI=function(l){return l&&l.parentNode?l.parentNode.removeChild(l):null};
g.cf=function(l,y){return l&&y?l==y||l.contains(y):!1};
HZ=function(l){return l.nodeType==9?l:l.ownerDocument||l.document};
g.C9=function(l,y){if("textContent"in l)l.textContent=y;else if(l.nodeType==3)l.data=String(y);else if(l.firstChild&&l.firstChild.nodeType==3){for(;l.lastChild!=l.firstChild;)l.removeChild(l.lastChild);l.firstChild.data=String(y)}else g.Uq(l),l.appendChild(HZ(l).createTextNode(String(y)))};
u4=function(l){return l.tagName=="A"&&l.hasAttribute("href")||l.tagName=="INPUT"||l.tagName=="TEXTAREA"||l.tagName=="SELECT"||l.tagName=="BUTTON"?!l.disabled&&(!l.hasAttribute("tabindex")||b4(l)):l.hasAttribute("tabindex")&&b4(l)};
b4=function(l){l=l.tabIndex;return typeof l==="number"&&l>=0&&l<32768};
mM=function(l,y,k){if(!y&&!k)return null;const z=y?String(y).toUpperCase():null;return xg(l,function(r){return(!z||r.nodeName==z)&&(!k||typeof r.className==="string"&&g.ro(r.className.split(/\s+/),k))},!0)};
xg=function(l,y,k){l&&!k&&(l=l.parentNode);for(k=0;l;){if(y(l))return l;l=l.parentNode;k++}return null};
BZ=function(l){this.Z=l||g.aC.document||document};
Wf=function(){return!(!qj||!qj.performance)};
Ip=function(l){return g.tV?"webkit"+l:l.toLowerCase()};
Tf=function(l){return function(){return l}};
g.Vq=function(){};
LPe=function(l){var y=y||0;return function(){return l.apply(this,Array.prototype.slice.call(arguments,0,y))}};
Pf=function(l){let y=!1,k;return function(){y||(k=l(),y=!0);return k}};
JV=function(l){let y=l;return function(){if(y){const k=y;y=null;k()}}};
Yg=function(l,y,k){let z=0;return function(r){g.aC.clearTimeout(z);const Z=arguments;z=g.aC.setTimeout(function(){l.apply(k,Z)},y)}};
p9=function(l,y,k,z){this.top=l;this.right=y;this.bottom=k;this.left=z};
K9=function(l){return l.right-l.left};
gt=function(l,y){return l==y?!0:l&&y?l.top==y.top&&l.right==y.right&&l.bottom==y.bottom&&l.left==y.left:!1};
Eq=function(l,y,k){y instanceof g.jD?(l.left+=y.x,l.right+=y.x,l.top+=y.y,l.bottom+=y.y):(l.left+=y,l.right+=y,typeof k==="number"&&(l.top+=k,l.bottom+=k));return l};
g.f9=function(l,y,k,z){this.left=l;this.top=y;this.width=k;this.height=z};
jU=function(l,y){return l==y?!0:l&&y?l.left==y.left&&l.width==y.width&&l.top==y.top&&l.height==y.height:!1};
g.n9=function(l,y,k){if(typeof y==="string")SU(l,k,y);else for(const z in y)SU(l,y[z],z)};
SU=function(l,y,k){(k=FI(l,k))&&(v4Q.test(k)?l.style.setProperty(k,y):l.style[k]=y)};
FI=function(l,y){let k=op[y];if(!k){var z=CK(y);k=z;l.style[z]===void 0&&(z=(g.tV?"Webkit":Nj?"Moz":null)+KPT(z),l.style[z]!==void 0&&(k=z));op[y]=k}return k};
g.sq=function(l,y){const k=l.style[CK(y)];return typeof k!=="undefined"?k:l.style[FI(l,y)]||""};
L9=function(l,y){const k=HZ(l);return k.defaultView&&k.defaultView.getComputedStyle&&(l=k.defaultView.getComputedStyle(l,null))?l[y]||l.getPropertyValue(y)||"":""};
vf=function(l,y){return L9(l,y)||(l.currentStyle?l.currentStyle[y]:null)||l.style&&l.style[y]};
g.Hf=function(l,y,k){let z;y instanceof g.jD?(z=y.x,y=y.y):(z=y,y=k);l.style.left=Bf(z,!1);l.style.top=Bf(y,!1)};
Rp=function(l){try{return l.getBoundingClientRect()}catch(y){return{left:0,top:0,right:0,bottom:0}}};
Bqq=function(l){const y=HZ(l);let k=vf(l,"position"),z=k=="fixed"||k=="absolute";for(l=l.parentNode;l&&l!=y;l=l.parentNode)if(l.nodeType==11&&l.host&&(l=l.host),k=vf(l,"position"),z=z&&k=="static"&&l!=y.documentElement&&l!=y.body,!z&&(l.scrollWidth>l.clientWidth||l.scrollHeight>l.clientHeight||k=="fixed"||k=="absolute"||k=="relative"))return l;return null};
g.Dj=function(l){var y=HZ(l);const k=new g.jD(0,0);if(l==(y?HZ(y):document).documentElement)return k;l=Rp(l);y=Dl(y);y=Qq(y.Z);k.x=l.left+y.x;k.y=l.top+y.y;return k};
yW=function(l,y){const k=new g.jD(0,0);let z=Oq(HZ(l));if(!Yv(z,"parent"))return k;do{const r=z==y?g.Dj(l):lN(l);k.x+=r.x;k.y+=r.y}while(z&&z!=y&&z!=z.parent&&(l=z.frameElement)&&(z=z.parent));return k};
g.zn=function(l,y){l=kU(l);y=kU(y);return new g.jD(l.x-y.x,l.y-y.y)};
lN=function(l){l=Rp(l);return new g.jD(l.left,l.top)};
kU=function(l){if(l.nodeType==1)return lN(l);l=l.changedTouches?l.changedTouches[0]:l;return new g.jD(l.clientX,l.clientY)};
g.r7=function(l,y,k){if(y instanceof g.Fn)k=y.height,y=y.width;else if(k==void 0)throw Error("missing height argument");l.style.width=Bf(y,!0);l.style.height=Bf(k,!0)};
Bf=function(l,y){typeof l=="number"&&(l=(y?Math.round(l):l)+"px");return l};
g.Zo=function(l){var y=HC4;if(vf(l,"display")!="none")return y(l);const k=l.style,z=k.display,r=k.visibility,Z=k.position;k.visibility="hidden";k.position="absolute";k.display="inline";l=y(l);k.display=z;k.position=Z;k.visibility=r;return l};
HC4=function(l){const y=l.offsetWidth,k=l.offsetHeight,z=g.tV&&!y&&!k;return(y===void 0||z)&&l.getBoundingClientRect?(l=Rp(l),new g.Fn(l.right-l.left,l.bottom-l.top)):new g.Fn(y,k)};
g.A2=function(l,y){l.style.display=y?"":"none"};
$U=function(l){return l?l.passive&&R__()?l:l.capture||!1:!1};
QW=function(l,y,k,z){return typeof l.addEventListener==="function"?(l.addEventListener(y,k,$U(z)),!0):!1};
t2=function(l){return l.prerendering?3:{visible:1,hidden:2,prerender:3,preview:4,unloaded:5,"":0}[l.visibilityState||l.webkitVisibilityState||l.mozVisibilityState||""]??0};
OU=function(l){try{return!!l&&l.location.href!=null&&Yv(l,"foo")}catch{return!1}};
d7=function(l){let y=l;for(;l&&l!=l.parent;)l=l.parent,OU(l)&&(y=l);return y};
h2=function(){return(cC||C3)&&br?br.mobile:!w7()&&(xo("iPod")||xo("iPhone")||xo("Android")||xo("IEMobile"))};
w7=function(){return(cC||C3)&&br?!br.mobile&&(xo("iPad")||xo("Android")||xo("Silk")):xo("iPad")||xo("Android")&&!xo("Mobile")||xo("Silk")};
aU=function(){var l=g.aC;const y=[];let k=null,z;do{z=l;if(OU(z)){var r=z.location.href;k=z.document&&z.document.referrer||null}else r=k,k=null;y.push(new Gn(r||""));try{l=z.parent}catch(Z){l=null}}while(l&&z!==l);for(let Z=0,e=y.length-1;Z<=e;++Z)y[Z].depth=e-Z;z=g.aC;if(z.location&&z.location.ancestorOrigins&&z.location.ancestorOrigins.length===y.length-1)for(l=1;l<y.length;++l)r=y[l],r.url||(r.url=z.location.ancestorOrigins[l-1]||"",r.Z=!0);return y};
iN=function(l){l=l||aU();let y=new Gn(g.aC.location.href,!1),k=null;const z=l.length-1;for(var r=z;r>=0;--r){var Z=l[r];!k&&DtC.test(Z.url)&&(k=Z);if(Z.url&&!Z.Z){y=Z;break}}r=null;Z=l.length&&l[z].url;y.depth!==0&&Z&&(r=l[z]);return new lBq(y,r,k)};
UU=function(l,y){if(l)for(const k in l)Object.prototype.hasOwnProperty.call(l,k)&&y(l[k],k,l)};
kxy=function(){const l=[];UU(yp5,y=>{l.push(y)});
return l};
Mb=function(l,y){const k={};k[l]=y;return[k]};
cG=function(l,y,k,z,r){const Z=[];UU(l,(e,A)=>{(e=XK(e,y,k,z,r))&&Z.push(`${A}=${e}`)});
return Z.join(y)};
XK=function(l,y,k,z,r){if(l==null)return"";y=y||"&";k=k||",$";typeof k==="string"&&(k=k.split(""));if(l instanceof Array){if(z||(z=0),z<k.length){const Z=[];for(let e=0;e<l.length;e++)Z.push(XK(l[e],y,k,z+1,r));return Z.join(k[z])}}else if(typeof l==="object")return r||(r=0),r<2?encodeURIComponent(cG(l,y,k,z,r+1)):"...";return encodeURIComponent(String(l))};
z1C=function(l){let y=1;for(const k in l.C)k.length>y&&(y=k.length);return 3997-y-l.N.length-1};
rpC=function(l,y){g.He(y,r=>r.depth>=0);
const k=ve(y,(r,Z)=>Math.max(r,Z.depth),-1),z=wes(k+2);
z[0]=l;g.Fy(y,r=>z[r.depth+1]=r.Z);
return z};
e1C=function(){return ZRQ().map(l=>XK(l))};
Cx=function(l){l.NqR=!0;return l};
$R5=function(){const l=bN("IFRAME"),y={};g.Fy(Apz(),k=>{l.sandbox&&l.sandbox.supports&&l.sandbox.supports(k)&&(y[k]=!0)});
return y};
bN=function(l,y=document){return y.createElement(String(l).toLowerCase())};
uN=function(l){qj.google_image_requests||(qj.google_image_requests=[]);const y=bN("IMG",qj.document);y.src=l;qj.google_image_requests.push(y)};
Qet=function(){xU();const l=qj.document;return!!(l&&l.body&&l.body.getBoundingClientRect&&typeof qj.setInterval==="function"&&typeof qj.clearInterval==="function"&&typeof qj.setTimeout==="function"&&typeof qj.clearTimeout==="function")};
m2=function(){xU();return e1C()};
xU=function(){var l=qb(tft);if(!l.Z){if(!qj)throw Error("Context has not been set and window is undefined.");l.Z=qb(ORs)}return l.Z};
IU=function(l){return(WG||(WG=new TextEncoder)).encode(l)};
Tn=function(l){g.aC.setTimeout(()=>{throw l;},0)};
dRz=function(l){return Array.prototype.map.call(l,function(y){y=y.toString(16);return y.length>1?y:"0"+y}).join("")};
VW=function(l){const y=[];for(let k=0;k<l.length;k+=2)y.push(parseInt(l.substring(k,k+2),16));return y};
g.PG=function(l){const y=[];let k=0;for(let z=0;z<l.length;z++){let r=l.charCodeAt(z);r<128?y[k++]=r:(r<2048?y[k++]=r>>6|192:((r&64512)==55296&&z+1<l.length&&(l.charCodeAt(z+1)&64512)==56320?(r=65536+((r&1023)<<10)+(l.charCodeAt(++z)&1023),y[k++]=r>>18|240,y[k++]=r>>12&63|128):y[k++]=r>>12|224,y[k++]=r>>6&63|128),y[k++]=r&63|128)}return y};
g.px=function(l,y){y===void 0&&(y=0);J2();y=YU[y];const k=Array(Math.floor(l.length/3)),z=y[64]||"";let r=0,Z=0;for(;r<l.length-2;r+=3){var e=l[r],A=l[r+1],Q=l[r+2],t=y[e>>2];e=y[(e&3)<<4|A>>4];A=y[(A&15)<<2|Q>>6];Q=y[Q&63];k[Z++]=""+t+e+A+Q}t=0;Q=z;switch(l.length-r){case 2:t=l[r+1],Q=y[(t&15)<<2]||z;case 1:l=l[r],k[Z]=""+y[l>>2]+y[(l&3)<<4|t>>4]+Q+z}return k.join("")};
g.Kx=function(l,y,k){if(y){const z=[];let r=0;for(let Z=0;Z<l.length;Z++){let e=l.charCodeAt(Z);if(e>255){const A=Error("go/unicode-to-byte-error");if(k)throw A;z[r++]=e&255;e>>=8}z[r++]=e}l=g.px(z,y)}else l=g.aC.btoa(l);return l};
EU=function(l){const y=[];g7(l,function(k){y.push(k)});
return y};
fx=function(l){const y=l.length;let k=y*3/4;k%3?k=Math.floor(k):g.ag("=.",l[y-1])&&(k=g.ag("=.",l[y-2])?k-2:k-1);const z=new Uint8Array(k);let r=0;g7(l,function(Z){z[r++]=Z});
return r!==k?z.subarray(0,r):z};
g7=function(l,y){function k(r){for(;z<l.length;){const Z=l.charAt(z++),e=jJ[Z];if(e!=null)return e;if(!g.G0(Z))throw Error("Unknown base64 encoding at char: "+Z);}return r}
J2();let z=0;for(;;){const r=k(-1),Z=k(0),e=k(64),A=k(64);if(A===64&&r===-1)break;y(r<<2|Z>>4);e!=64&&(y(Z<<4&240|e>>2),A!=64&&y(e<<6&192|A))}};
J2=function(){if(!jJ){jJ={};var l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),y=["+/=","+/","-_=","-_.","-_"];for(let k=0;k<5;k++){const z=l.concat(y[k].split(""));YU[k]=z;for(let r=0;r<z.length;r++){const Z=z[r];jJ[Z]===void 0&&(jJ[Z]=r)}}}};
h1Q=function(l){return wOe[l]||""};
nx=function(l){l=SJ.test(l)?l.replace(SJ,h1Q):l;l=atob(l);const y=new Uint8Array(l.length);for(let k=0;k<l.length;k++)y[k]=l.charCodeAt(k);return y};
sU=function(){return FK||(FK=new oU(null,Nb))};
vG=function(l){Lx(Nb);var y=l.Z;y=y==null||y!=null&&y instanceof Uint8Array?y:typeof y==="string"?nx(y):null;return y==null?y:l.Z=y};
BG=function(l){return new Uint8Array(vG(l)||0)};
Lx=function(l){if(l!==Nb)throw Error("illegal external caller");};
HG=function(l){l=Error(l);tY(l,"warning");return l};
Do=function(l,y){if(l!=null){var k=RU??(RU={});var z=k[l]||0;z>=y||(k[l]=z+1,l=Error(),tY(l,"incident"),Tn(l))}};
lj=function(l,y=!1){return y&&Symbol.for&&l?Symbol.for(l):l!=null?Symbol(l):Symbol()};
zA=function(l,y){return y===void 0?l.Z!==yY&&!!(2&(l.Mx[kH]|0)):!!(2&y)&&l.Z!==yY};
rP=function(l,y){if(l!=null)if(typeof l==="string")l=l?new oU(l,Nb):sU();else if(l.constructor!==oU)if(l!=null&&l instanceof Uint8Array)l=l.length?new oU(new Uint8Array(l),Nb):sU();else{if(!y)throw Error();l=void 0}return l};
Zr=function(l,y){if(typeof y!=="number"||y<0||y>=l.length)throw Error();};
ew=function(l,y,k){const z=y&128?0:-1,r=l.length;var Z;if(Z=!!r)Z=l[r-1],Z=Z!=null&&typeof Z==="object"&&Z.constructor===Object;const e=r+(Z?-1:0);for(y=y&128?1:0;y<e;y++)k(y-z,l[y]);if(Z){l=l[r-1];for(const A in l)!isNaN(A)&&k(+A,l[A])}};
$H=function(l){return l&128?Ao:void 0};
to=function(l){if(QY(l)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(l))throw Error(String(l));}else if(GxC(l)&&!Number.isSafeInteger(l))throw Error(String(l));return BigInt(l)};
wP=function(l){const y=l>>>0;OC=y;dP=(l-y)/4294967296>>>0};
ho=function(l){if(l<0){wP(0-l);l=OC;var y=dP;y=~y;l?l=~l+1:y+=1;const [k,z]=[l,y];OC=k>>>0;dP=z>>>0}else wP(l)};
au=function(l,y){const k=y*4294967296+(l>>>0);return Number.isSafeInteger(k)?k:GA(l,y)};
ij=function(l,y){const k=y&2147483648;k&&(l=~l+1>>>0,y=~y>>>0,l==0&&(y=y+1>>>0));l=au(l,y);return typeof l==="number"?k?-l:l:k?"-"+l:l};
UC=function(l,y){return to(BigInt.asIntN(64,(BigInt.asUintN(32,BigInt(y))<<BigInt(32))+BigInt.asUintN(32,BigInt(l))))};
GA=function(l,y){y>>>=0;l>>>=0;var k;y<=2097151?k=""+(4294967296*y+l):k=""+(BigInt(y)<<BigInt(32)|BigInt(l));return k};
Md=function(){var l=OC,y=dP,k;y&2147483648?k=""+(BigInt(y|0)<<BigInt(32)|BigInt(l>>>0)):k=GA(l,y);return k};
ci=function(l){l.length<16?ho(Number(l)):(l=BigInt(l),OC=Number(l&BigInt(4294967295))>>>0,dP=Number(l>>BigInt(32)&BigInt(4294967295)))};
Co=function(l){if(l!=null&&typeof l!=="number")throw Error(`Value of float/double field must be a number, found ${typeof l}: ${l}`);return l};
bj=function(l){return l.displayName||l.name||"unknown type name"};
uj=function(l){if(l!=null&&typeof l!=="boolean")throw Error(`Expected boolean but got ${ce(l)}: ${l}`);return l};
mY=function(l){switch(typeof l){case "bigint":return!0;case "number":return xH(l);case "string":return aBP.test(l);default:return!1}};
qd=function(l){if(typeof l!=="number")throw HG("int32");if(!xH(l))throw HG("int32");return l|0};
Wi=function(l){return l==null?l:qd(l)};
TA=function(l){if(l==null)return l;if(typeof l==="string"&&l)l=+l;else if(typeof l!=="number")return;return xH(l)?l|0:void 0};
VY=function(l){if(l==null)return l;if(typeof l==="string"&&l)l=+l;else if(typeof l!=="number")return;return xH(l)?l>>>0:void 0};
iRe=function(l){var y=Pi?1024:0;if(!mY(l))throw HG("int64");const k=typeof l;switch(y){case 512:switch(k){case "string":return Jo(l);case "bigint":return String(YH(64,l));default:return po(l)}case 1024:switch(k){case "string":return Ko(l);case "bigint":return to(YH(64,l));default:return gP(l)}case 0:switch(k){case "string":return Jo(l);case "bigint":return to(YH(64,l));default:return EC(l)}default:return Rg(y,"Unknown format requested type for int64")}};
fo=function(l){return l==null?l:iRe(l)};
EC=function(l){mY(l);l=jw(l);Sw(l)||(ho(l),l=ij(OC,dP));return l};
po=function(l){mY(l);l=jw(l);Sw(l)?l=String(l):(ho(l),l=Md());return l};
Jo=function(l){mY(l);var y=jw(Number(l));if(Sw(y))return String(y);y=l.indexOf(".");y!==-1&&(l=l.substring(0,y));y=l.length;(l[0]==="-"?y<20||y===20&&l<="-9223372036854775808":y<19||y===19&&l<="9223372036854775807")||(ci(l),l=Md());return l};
Ko=function(l){var y=jw(Number(l));if(Sw(y))return to(y);y=l.indexOf(".");y!==-1&&(l=l.substring(0,y));return to(YH(64,BigInt(l)))};
ou=function(l){const y={ns:l.R7,el:l.eventLabel,cpn:l.clientPlaybackNonce,ver:2,cmt:l.C(l.Z),fmt:l.q_,fs:l.MW?"1":"0",rt:l.C(l.BF),adformat:l.adFormat,content_v:l.contentVideoId,euri:l.Cf,lact:l.hj,live:l.zA,cl:(880591072).toString(),mos:l.Cp,state:l.playerState,volume:l.I4};l.subscribed&&(y.subscribed="1");Object.assign(y,l.vn);l.A==="all"?Object.assign(y,l.T7):l.A==="once"&&l.N&&Object.assign(y,l.T7);l.autoplay&&(y.autoplay="1");l.OA&&(y.sautoplay="1");l.WG&&(y.dni="1");!l.J&&l.rb&&(y.epm=URe[l.rb]);
l.isFinal&&(y["final"]="1");l.Xr&&(y.splay="1");l.CB&&(y.delay=l.CB);l.PG&&(y.hl=l.PG);l.region&&(y.cr=l.region);l.userGenderAge&&(y.uga=l.userGenderAge);l.userAge!==void 0&&l.xz&&(y.uga=l.xz+l.userAge);l.RR!==void 0&&(y.len=l.C(l.RR));(!l.J||l.hv)&&l.experimentIds.length>0&&(y.fexp=l.experimentIds.toString());l.K!==null&&(y.rtn=l.C(l.K));l.KZ&&(y.feature=l.KZ);l.N7&&(y.ctrl=l.N7);l.j5&&(y.ytr=l.j5);l.Oj&&(y.afmt=l.Oj);l.offlineDownloadUserChoice&&(y.ODUC=l.offlineDownloadUserChoice);l.C_&&(y.lio=
l.C(l.C_));l.J?(y.idpj=l.TJ,y.ldpj=l.S2,l.delayThresholdMet&&(y.dtm="1"),l.D!=null&&(y.rti=l.C(l.D)),l.wS&&(y.ald=l.wS),l.compositeLiveIngestionOffsetToken&&(y.clio=l.compositeLiveIngestionOffsetToken)):l.adType!==void 0&&(y.at=l.adType);l.PF&&(l.N||l.J)&&(y.size=l.PF);l.N&&l.S.length&&(y.pbstyle=l.S.join(","));l.SN!=null&&(l.N||l.J)&&(y.inview=l.C(l.SN));l.heartbeatLoggingToken&&(y.hb_data=l.heartbeatLoggingToken);l.J&&(y.volume=no(l,g.sT(l.segments,k=>k.volume)),y.st=no(l,g.sT(l.segments,k=>k.startTime)),
y.et=no(l,g.sT(l.segments,k=>k.endTime)),Be(l.segments,k=>k.playbackRate!==1)&&(y.rate=no(l,g.sT(l.segments,k=>k.playbackRate))),Be(l.segments,k=>k.Z!=="-")&&(y.als=g.sT(l.segments,k=>k.Z).join(",")),Be(l.segments,k=>k.previouslyEnded)&&(y.pe=g.sT(l.segments,k=>`${+k.previouslyEnded}`).join(",")));
y.muted=no(l,g.sT(l.segments,k=>k.muted?1:0));
Be(l.segments,k=>k.visibilityState!==0)&&(y.vis=no(l,g.sT(l.segments,k=>k.visibilityState)));
Be(l.segments,k=>k.connectionType!==0)&&(y.conn=no(l,g.sT(l.segments,k=>k.connectionType)));
Be(l.segments,k=>k.C!==0)&&(y.blo=no(l,g.sT(l.segments,k=>k.C)));
Be(l.segments,k=>!!k.V)&&(y.blo=g.sT(l.segments,k=>k.V).join(","));
Be(l.segments,k=>!!k.compositeLiveStatusToken)&&(y.cbs=g.sT(l.segments,k=>k.compositeLiveStatusToken).join(","));
Be(l.segments,k=>k.N!=="-")&&(y.cc=g.sT(l.segments,k=>k.N).join(","));
Be(l.segments,k=>k.clipId!=="-")&&(y.clipid=g.sT(l.segments,k=>k.clipId).join(","));
if(Be(l.segments,k=>!!k.audioId)){let k="au";
l.N&&(k="au_d");y[k]=g.sT(l.segments,z=>z.audioId).join(",")}F8()&&l.Y&&(y.ctt=l.Y,y.cttype=l.kz,y.mdx_environment=l.mdxEnvironment);
l.O1&&(y.etype=l.b0!==void 0?l.b0:0);l.gb&&(y.uoo=l.gb);l.livingRoomAppMode&&l.livingRoomAppMode!=="LIVING_ROOM_APP_MODE_UNSPECIFIED"&&(y.clram=Mft[l.livingRoomAppMode]||l.livingRoomAppMode);l.V?XO5(l,y):(y.docid=l.videoId,y.referrer=l.referrer,y.ei=l.eventId,y.of=l.qo,y.osid=l.osid,y.vm=l.videoMetadata,l.adQueryId&&(y.aqi=l.adQueryId),l.autonav&&(y.autonav="1"),l.playlistId&&(y.list=l.playlistId),l.Zq&&(y.ssrt="1"),l.k$&&(y.upt=l.k$));l.N&&(l.embedsRct&&(y.rct=l.embedsRct),l.embedsRctn&&(y.rctn=
l.embedsRctn),l.compositeLiveIngestionOffsetToken&&(y.clio=l.compositeLiveIngestionOffsetToken));l.u0&&(y.host_cpn=l.u0);return y};
gP=function(l){return Sw(l)?to(EC(l)):to(po(l))};
sC=function(l){if(l==null)return l;if(typeof l==="bigint")return Nd(l)?l=Number(l):(l=YH(64,l),l=Nd(l)?Number(l):String(l)),l;if(mY(l))return typeof l==="number"?EC(l):Jo(l)};
Lo=function(l){const y=typeof l;if(l==null)return l;if(y==="bigint")return to(YH(64,l));if(mY(l))return y==="string"?Ko(l):gP(l)};
cpC=function(l){if(l==null)return l;const y=typeof l;if(y==="bigint")return String(YH(64,l));if(mY(l)){if(y==="string")return Jo(l);if(y==="number")return EC(l)}};
vi=function(l){if(l==null)return l;var y=typeof l;if(y==="bigint")return String(C2g(64,l));if(mY(l)){if(y==="string")return mY(l),y=jw(Number(l)),Sw(y)&&y>=0?l=String(y):(y=l.indexOf("."),y!==-1&&(l=l.substring(0,y)),l[0]==="-"?y=!1:(y=l.length,y=y<20?!0:y===20&&l<="18446744073709551615"),y||(ci(l),l=GA(OC,dP))),l;if(y==="number")return mY(l),l=jw(l),l>=0&&Sw(l)||(ho(l),l=au(OC,dP)),l}};
Bi=function(l){if(l==null||typeof l=="string"||l instanceof oU)return l};
bRT=function(l){if(typeof l!=="string")throw Error();return l};
Hi=function(l){if(l!=null&&typeof l!=="string")throw Error();return l};
Ru=function(l){return l==null||typeof l==="string"?l:void 0};
Dr=function(l,y){if(!(l instanceof y))throw Error(`Expected instanceof ${bj(y)} but got ${l&&bj(l.constructor)}`);return l};
kd=function(l,y,k){if(l!=null&&l[l0]===y3)return l;if(Array.isArray(l)){var z=l[kH]|0;k=z|k&32|k&2;k!==z&&(l[kH]=k);return new y(l)}};
z7=function(l){return l};
ZD=function(l){const y=Pe(r0);return y?l[y]:void 0};
e6=function(l,y){for(const k in l)!isNaN(k)&&y(l,+k,l[k])};
uw_=function(l){const y=new AO;e6(l,(k,z,r)=>{y[z]=[...r]});
y.zY=l.zY;return y};
mRq=function(l,y){y<100||Do(xRP,1)};
Q3=function(l,y,k,z){const r=z!==void 0;z=!!z;var Z=Pe(r0),e;!r&&Z&&(e=l[Z])&&e6(e,mRq);Z=[];var A=l.length;let Q;e=4294967295;let t=!1;const O=!!(y&64),d=O?y&128?0:-1:void 0;y&1||(Q=A&&l[A-1],Q!=null&&typeof Q==="object"&&Q.constructor===Object?(A--,e=A):Q=void 0,!O||y&128||r||(t=!0,e=($d??z7)(e-d,d,l,Q,void 0)+d));y=void 0;for(var w=0;w<A;w++){let h=l[w];if(h!=null&&(h=k(h,z))!=null)if(O&&w>=e){const U=w-d;(y??(y={}))[U]=h}else Z[w]=h}if(Q)for(let h in Q){A=Q[h];if(A==null||(A=k(A,z))==null)continue;
w=+h;let U;O&&!Number.isNaN(w)&&(U=w+d)<e?Z[U]=A:(y??(y={}))[h]=A}y&&(t?Z.push(y):Z[e]=y);r&&Pe(r0)&&(l=ZD(l))&&l instanceof AO&&(Z[r0]=uw_(l));return Z};
tO=function(l){switch(typeof l){case "number":return Number.isFinite(l)?l:""+l;case "bigint":return Nd(l)?Number(l):""+l;case "boolean":return l?1:0;case "object":if(Array.isArray(l)){var y=l[kH]|0;return l.length===0&&y&1?void 0:Q3(l,y,tO)}if(l!=null&&l[l0]===y3)return OS(l);if(l instanceof oU){y=l.Z;if(y==null)l="";else if(typeof y==="string")l=y;else{let k="",z=0;const r=y.length-10240;for(;z<r;)k+=String.fromCharCode.apply(null,y.subarray(z,z+=10240));k+=String.fromCharCode.apply(null,z?y.subarray(z):
y);l=l.Z=btoa(k)}return l}return}return l};
d0=function(l,y){if(y){$d=y==null||y===z7||y[qyz]!==Wvq?z7:y;try{return OS(l)}finally{$d=void 0}}return OS(l)};
OS=function(l){l=l.Mx;return Q3(l,l[kH]|0,tO)};
IBt=function(l){switch(typeof l){case "boolean":return w0||(w0=[0,void 0,!0]);case "number":return l>0?void 0:l===0?hO||(hO=[0,void 0]):[-l,void 0];case "string":return[0,l];case "object":return l}};
as=function(l,y){return G7(l,y[0],y[1])};
G7=function(l,y,k,z=0){if(l==null){var r=32;k?(l=[k],r|=128):l=[];y&&(r=r&-16760833|(y&1023)<<14)}else{if(!Array.isArray(l))throw Error("narr");r=l[kH]|0;if(i0&&1&r)throw Error("rfarr");2048&r&&!(2&r)&&To5();if(r&256)throw Error("farr");if(r&64)return(r|z)!==r&&(l[kH]=r|z),l;if(k&&(r|=128,k!==l[0]))throw Error("mid");a:{k=l;r|=64;var Z=k.length;if(Z){var e=Z-1;const Q=k[e];if(Q!=null&&typeof Q==="object"&&Q.constructor===Object){y=r&128?0:-1;e-=y;if(e>=1024)throw Error("pvtlmt");for(var A in Q)if(Z=
+A,Z<e)k[Z+y]=Q[A],delete Q[A];else break;r=r&-16760833|(e&1023)<<14;break a}}if(y){A=Math.max(y,Z-(r&128?0:-1));if(A>1024)throw Error("spvt");r=r&-16760833|(A&1023)<<14}}}l[kH]=r|64|z;return l};
To5=function(){if(i0)throw Error("carr");Do(Vf5,5)};
P2C=function(l,y){if(typeof l!=="object")return l;if(Array.isArray(l)){var k=l[kH]|0;l.length===0&&k&1?l=void 0:k&2||(!y||4096&k||16&k?l=US(l,k,!1,y&&!(k&16)):(l[kH]|=34,k&4&&Object.freeze(l)));return l}if(l!=null&&l[l0]===y3)return y=l.Mx,k=y[kH]|0,zA(l,k)?l:Mh(l,y,k)?XU(l,y):US(y,k);if(l instanceof oU)return l};
XU=function(l,y,k){l=new l.constructor(y);k&&(l.Z=yY);l.V=yY;return l};
US=function(l,y,k,z){z??(z=!!(34&y));l=Q3(l,y,P2C,z);z=32;k&&(z|=2);y=y&16769217|z;l[kH]=y;return l};
ch=function(l){const y=l.Mx,k=y[kH]|0;return zA(l,k)?Mh(l,y,k)?XU(l,y,!0):new l.constructor(US(y,k,!1)):l};
CZ=function(l){if(l.Z!==yY)return!1;var y=l.Mx;y=US(y,y[kH]|0);y[kH]|=2048;l.Mx=y;l.Z=void 0;l.V=void 0;return!0};
b0=function(l){if(!CZ(l)&&zA(l,l.Mx[kH]|0))throw Error();};
u0=function(l,y){y===void 0&&(y=l[kH]|0);y&32&&!(y&4096)&&(l[kH]=y|4096)};
Mh=function(l,y,k){return k&2?!0:k&32&&!(k&4096)?(y[kH]=k|2,l.Z=yY,!0):!1};
mH=function(l,y,k,z,r){Object.isExtensible(l);y=xd(l.Mx,y,k,r);if(y!==null||z&&l.V!==yY)return y};
xd=function(l,y,k,z){if(y===-1)return null;const r=y+(k?0:-1),Z=l.length-1;let e,A;if(!(Z<1+(k?0:-1))){if(r>=Z)if(e=l[Z],e!=null&&typeof e==="object"&&e.constructor===Object)k=e[y],A=!0;else if(r===Z)k=e;else return;else k=l[r];if(z&&k!=null){z=z(k);if(z==null)return z;if(!Object.is(z,k))return A?e[y]=z:l[r]=z,z}return k}};
Wh=function(l,y,k,z){b0(l);const r=l.Mx;qh(r,r[kH]|0,y,k,z);return l};
qh=function(l,y,k,z,r){const Z=k+(r?0:-1);var e=l.length-1;if(e>=1+(r?0:-1)&&Z>=e){const A=l[e];if(A!=null&&typeof A==="object"&&A.constructor===Object)return A[k]=z,y}if(Z<=e)return l[Z]=z,y;z!==void 0&&(e=(y??(y=l[kH]|0))>>14&1023||536870912,k>=e?z!=null&&(l[e+(r?0:-1)]={[k]:z}):l[Z]=z);return y};
Yd=function(l,y,k,z,r){let Z=l.Mx,e=Z[kH]|0;z=zA(l,e)?1:z;r=!!r||z===3;z===2&&CZ(l)&&(Z=l.Mx,e=Z[kH]|0);l=Is(Z,y);let A=l===T7?7:l[kH]|0,Q=V3(A,e);var t=4&Q?!1:!0;if(t){4&Q&&(l=[...l],A=0,Q=Ph(Q,e),e=qh(Z,e,y,l));let O=0,d=0;for(;O<l.length;O++){const w=k(l[O]);w!=null&&(l[d++]=w)}d<O&&(l.length=d);k=(Q|4)&-513;Q=k&=-1025;Q&=-4097}Q!==A&&(l[kH]=Q,2&Q&&Object.freeze(l));return l=JO(l,Q,Z,e,y,void 0,z,t,r)};
JO=function(l,y,k,z,r,Z,e,A,Q){let t=y;e===1||(e!==4?0:2&y||!(16&y)&&32&z)?g0(y)||(y|=!l.length||A&&!(4096&y)||32&z&&!(4096&y||16&y)?2:256,y!==t&&(l[kH]=y),Object.freeze(l)):(e===2&&g0(y)&&(l=[...l],t=0,y=Ph(y,z),z=qh(k,z,r,l,Z)),g0(y)||(Q||(y|=16),y!==t&&(l[kH]=y)));2&y||!(4096&y||16&y)||u0(k,z);return l};
Is=function(l,y,k){l=xd(l,y,k);return Array.isArray(l)?l:T7};
V3=function(l,y){2&y&&(l|=2);return l|1};
g0=function(l){return!!(2&l)&&!!(4&l)||!!(256&l)};
ES=function(l){return rP(l,!0)};
var Jps=function(l,y){return qt[G[19]](this,17,2660,l,y)};
fZ=function(l,y){l=mH(l,y,void 0,void 0,ES);return l==null?sU():l};
j6=function(l,y,k){b0(l);const z=l.Mx;let r=z[kH]|0;if(y==null)return qh(z,r,3),l;if(!Array.isArray(y))throw HG();let Z=y===T7?7:y[kH]|0,e=Z;var A=g0(Z);let Q=A||Object.isFrozen(y);A||(Z=0);Q||(y=[...y],e=0,Z=Ph(Z,r),Q=!1);Z|=5;A=(4&Z?512&Z?512:1024&Z?1024:0:void 0)??(Pi?1024:0);Z|=A;for(let t=0;t<y.length;t++){const O=y[t],d=k(O,A);Object.is(O,d)||(Q&&(y=[...y],e=0,Z=Ph(Z,r),Q=!1),y[t]=d)}Z!==e&&(Q&&(y=[...y],Z=Ph(Z,r)),y[kH]=Z);qh(z,r,3,y);return l};
S6=function(l,y,k,z,r){b0(l);const Z=l.Mx;qh(Z,Z[kH]|0,y,(z==="0"?Number(k)===0:k===z)?void 0:k,r);return l};
nZ=function(l,y,k){if(y&2)throw Error();const z=$H(y);let r=Is(l,k,z),Z=r===T7?7:r[kH]|0,e=V3(Z,y);if(2&e||g0(e)||16&e)e===Z||g0(e)||(r[kH]=e),r=[...r],Z=0,e=Ph(e,y),qh(l,y,k,r,z);e&=-13;e!==Z&&(r[kH]=e);return r};
sS=function(l,y,k,z){b0(l);const r=l.Mx;let Z=r[kH]|0;if(z==null){const e=FU(r);if(os(e,r,Z,k)===y)e.set(k,0);else return l}else Z=Nh(r,Z,k,y);qh(r,Z,y,z);return l};
LZ=function(l,y,k,z){let r=l[kH]|0;const Z=$H(r);r=Nh(l,r,k,y,Z);qh(l,r,y,z,Z)};
vh=function(l,y,k){l=l.Mx;return os(FU(l),l,void 0,y)===k?k:-1};
FU=function(l){return l[Bh]??(l[Bh]=new Map)};
Nh=function(l,y,k,z,r){z===0||k.includes(z);const Z=FU(l),e=os(Z,l,y,k,r);e!==z&&(e&&(y=qh(l,y,e,void 0,r)),Z.set(k,z));return y};
os=function(l,y,k,z,r){let Z=l.get(z);if(Z!=null)return Z;Z=0;for(let e=0;e<z.length;e++){const A=z[e];xd(y,A,r)!=null&&(Z!==0&&(k=qh(y,k,Z,void 0,r)),Z=A)}l.set(z,Z);return Z};
Hh=function(l,y,k){let z=l[kH]|0;const r=$H(z),Z=xd(l,k,r);let e;if(Z!=null&&Z[l0]===y3){if(!zA(Z))return CZ(Z),Z.Mx;e=Z.Mx}else Array.isArray(Z)&&(e=Z);if(e){const A=e[kH]|0;A&2&&(e=US(e,A))}e=as(e,y);e!==Z&&qh(l,z,k,e,r);return e};
Rs=function(l,y,k,z,r){let Z=!1;z=xd(l,z,r,e=>{const A=kd(e,k,y);Z=A!==e&&A!=null;return A});
if(z!=null)return Z&&!zA(z)&&u0(l,y),z};
DD=function(l,y,k,z){let r=l.Mx,Z=r[kH]|0;y=Rs(r,Z,y,k,z);if(y==null)return y;Z=r[kH]|0;if(!zA(l,Z)){const e=ch(y);e!==y&&(CZ(l)&&(r=l.Mx,Z=r[kH]|0),y=e,Z=qh(r,Z,k,y,z),u0(r,Z))}return y};
lW=function(l,y,k,z,r,Z,e,A,Q){var t=zA(l,k);Z=t?1:Z;A=!!A||Z===3;t=Q&&!t;(Z===2||t)&&CZ(l)&&(y=l.Mx,k=y[kH]|0);l=Is(y,r,e);var O=l===T7?7:l[kH]|0,d=V3(O,k);if(Q=!(4&d)){var w=l,h=k;const U=!!(2&d);U&&(h|=2);let u=!U,W=!0,V=0,T=0;for(;V<w.length;V++){const J=kd(w[V],z,h);if(J instanceof z){if(!U){const K=zA(J);u&&(u=!K);W&&(W=K)}w[T++]=J}}T<V&&(w.length=T);d|=4;d=W?d&-4097:d|4096;d=u?d|8:d&-9}d!==O&&(l[kH]=d,2&d&&Object.freeze(l));if(t&&!(8&d||!l.length&&(Z===1||(Z!==4?0:2&d||!(16&d)&&32&k)))){g0(d)&&
(l=[...l],d=Ph(d,k),k=qh(y,k,r,l,e));z=l;t=d;for(O=0;O<z.length;O++)w=z[O],d=ch(w),w!==d&&(z[O]=d);t|=8;d=t=z.length?t|4096:t&-4097;l[kH]=d}return l=JO(l,d,y,k,r,e,Z,Q,A)};
kh=function(l,y,k){const z=l.Mx;return lW(l,z,z[kH]|0,y,k,void 0===yR?2:4,void 0,!1,!0)};
zM=function(l,y){l!=null?Dr(l,y):l=void 0;return l};
rZ=function(l,y,k,z,r){z=zM(z,y);Wh(l,k,z,r);z&&!zA(z)&&u0(l.Mx);return l};
ZO=function(l,y,k,z,r){r=zM(r,y);sS(l,k,z,r);r&&!zA(r)&&u0(l.Mx);return l};
eq=function(l,y,k,z){b0(l);const r=l.Mx;let Z=r[kH]|0;if(z==null)return qh(r,Z,k),l;if(!Array.isArray(z))throw HG();let e=z===T7?7:z[kH]|0,A=e;const Q=g0(e),t=Q||Object.isFrozen(z);let O=!0,d=!0;for(let h=0;h<z.length;h++){var w=z[h];Dr(w,y);Q||(w=zA(w),O&&(O=!w),d&&(d=w))}Q||(e=O?13:5,e=d?e&-4097:e|4096);t&&e===A||(z=[...z],A=0,e=Ph(e,Z));e!==A&&(z[kH]=e);Z=qh(r,Z,k,z);2&e||!(4096&e||16&e)||u0(r,Z);return l};
Ph=function(l,y){return l=(2&y?l|2:l&-3)&-273};
AF=function(l,y,k,z){var r=z;b0(l);z=l.Mx;l=lW(l,z,z[kH]|0,k,y,2,void 0,!0);r=r!=null?Dr(r,k):new k;l.push(r);y=k=l===T7?7:l[kH]|0;(r=zA(r))?(k&=-9,l.length===1&&(k&=-4097)):k|=4096;k!==y&&(l[kH]=k);r||u0(z)};
g.$h=function(l,y,k=0){return TA(mH(l,y))??k};
QR=function(l,y,k=Yyt){return(Pi?mH(l,y,void 0,void 0,Lo):Lo(mH(l,y)))??k};
tF=function(l,y,k="",z){return Ru(mH(l,y,z))??k};
OO=function(l,y){l=mH(l,y);return(l==null?l:xH(l)?l|0:void 0)??0};
wZ=function(l,y){return Ru(mH(l,y,void 0,dZ))};
hF=function(l,y,k){return Wh(l,y,fo(k))};
GM=function(l,y,k){return Wh(l,y,Hi(k))};
ak=function(l,y,k,z){return S6(l,y,Hi(k),"",z)};
iW=function(l,y,k){if(k!=null){if(!xH(k))throw HG("enum");k|=0}return Wh(l,y,k)};
Mo=function(l,y){if(typeof l==="string")return new UO(nx(l),y);if(Array.isArray(l))return new UO(new Uint8Array(l),y);if(l.constructor===Uint8Array)return new UO(l,!1);if(l.constructor===ArrayBuffer)return l=new Uint8Array(l),new UO(l,!1);if(l.constructor===oU)return y=vG(l)||new Uint8Array(0),new UO(y,!0,l);if(l instanceof Uint8Array)return l=l.constructor===Uint8Array?l:new Uint8Array(l.buffer,l.byteOffset,l.byteLength),new UO(l,!1);throw Error();};
c$=function(l,y){let k,z=0,r=0,Z=0;const e=l.C;let A=l.Z;do k=e[A++],z|=(k&127)<<Z,Z+=7;while(Z<32&&k&128);if(Z>32)for(r|=(k&127)>>4,Z=3;Z<32&&k&128;Z+=7)k=e[A++],r|=(k&127)<<Z;Xc(l,A);if(!(k&128))return y(z>>>0,r>>>0);throw Error();};
Cp=function(l){let y=0,k=l.Z;const z=k+10,r=l.C;for(;k<z;){const Z=r[k++];y|=Z;if((Z&128)===0)return Xc(l,k),!!(y&127)}throw Error();};
mx=function(l){const y=l.C;let k=l.Z,z=y[k++],r=z&127;if(z&128&&(z=y[k++],r|=(z&127)<<7,z&128&&(z=y[k++],r|=(z&127)<<14,z&128&&(z=y[k++],r|=(z&127)<<21,z&128&&(z=y[k++],r|=z<<28,z&128&&y[k++]&128&&y[k++]&128&&y[k++]&128&&y[k++]&128&&y[k++]&128)))))throw Error();Xc(l,k);return r};
qo=function(l){var y=l.C;const k=l.Z,z=y[k+0],r=y[k+1],Z=y[k+2];y=y[k+3];Xc(l,l.Z+4);return(z<<0|r<<8|Z<<16|y<<24)>>>0};
W$=function(l){const y=qo(l);l=qo(l);return au(y,l)};
Ik=function(l){const y=qo(l);l=qo(l);return to(BigInt.asUintN(64,(BigInt(l>>>0)<<BigInt(32))+BigInt(y>>>0)))};
TM=function(l){var y=l.J;y||(y=l.C,y=l.J=new DataView(y.buffer,y.byteOffset,y.byteLength));y=y.getFloat64(l.Z,!0);Xc(l,l.Z+8);return y};
Xc=function(l,y){l.Z=y;if(y>l.N)throw Error();};
VR=function(l,y){if(y<0)throw Error();const k=l.Z;y=k+y;if(y>l.N)throw Error();l.Z=y;return k};
P$=function(l,y){if(y==0)return sU();var k=VR(l,y);l.CO&&l.S?k=l.C.subarray(k,k+y):(l=l.C,y=k+y,k=k===y?new Uint8Array(0):l.slice(k,y));return k.length==0?sU():new oU(k,Nb)};
pp=function(l,y,k,z){if(JF.length){const r=JF.pop();Yh(r,z);r.Z.init(l,y,k,z);return r}return new pOt(l,y,k,z)};
Yh=function(l,{WH:y=!1}={}){l.WH=y};
Kp=function(l){var y=l.Z;if(y.Z==y.N)return!1;l.V=l.Z.Z;var k=mx(l.Z)>>>0;y=k>>>3;k&=7;if(!(k>=0&&k<=5))throw Error();if(y<1)throw Error();l.N=y;l.C=k;return!0};
gZ=function(l){switch(l.C){case 0:l.C!=0?gZ(l):Cp(l.Z);break;case 1:l=l.Z;Xc(l,l.Z+8);break;case 2:if(l.C!=2)gZ(l);else{var y=mx(l.Z)>>>0;l=l.Z;Xc(l,l.Z+y)}break;case 5:l=l.Z;Xc(l,l.Z+4);break;case 3:y=l.N;do{if(!Kp(l))throw Error();if(l.C==4){if(l.N!=y)throw Error();break}gZ(l)}while(1);break;default:throw Error();}};
EO=function(l,y,k){const z=l.Z.N;var r=mx(l.Z)>>>0;r=l.Z.Z+r;let Z=r-z;Z<=0&&(l.Z.N=r,k(y,l,void 0,void 0,void 0),Z=r-l.Z.Z);if(Z)throw Error();l.Z.Z=r;l.Z.N=z};
Sq=function(l){var y=mx(l.Z)>>>0,k=l.Z;l=VR(k,y);var z=k.C;(k=fp)||(k=fp=new TextDecoder("utf-8",{fatal:!0}));y=l+y;z=l===0&&y===z.length?z:z.subarray(l,y);try{var r=k.decode(z)}catch(Z){if(jq===void 0){try{k.decode(new Uint8Array([128]))}catch(e){}try{k.decode(new Uint8Array([97])),jq=!0}catch(e){jq=!1}}!jq&&(fp=void 0);throw Z;}return r};
np=function(l){const y=mx(l.Z)>>>0;return P$(l.Z,y)};
Fc=function(l,y,k){var z=mx(l.Z)>>>0;for(z=l.Z.Z+z;l.Z.Z<z;)k.push(y(l.Z))};
sO=function(l){if(!l)return ok||(ok=new No(0,0));if(!/^\d+$/.test(l))return null;ci(l);return new No(OC,dP)};
B$=function(l){if(!l)return Lp||(Lp=new v$(0,0));if(!/^-?\d+$/.test(l))return null;ci(l);return new v$(OC,dP)};
H$=function(l,y,k){for(;k>0||y>127;)l.Z.push(y&127|128),y=(y>>>7|k<<25)>>>0,k>>>=7;l.Z.push(y)};
Rk=function(l,y){l.Z.push(y>>>0&255);l.Z.push(y>>>8&255);l.Z.push(y>>>16&255);l.Z.push(y>>>24&255)};
DO=function(l,y){for(;y>127;)l.Z.push(y&127|128),y>>>=7;l.Z.push(y)};
lU=function(l,y){if(y>=0)DO(l,y);else{for(let k=0;k<9;k++)l.Z.push(y&127|128),y>>=7;l.Z.push(1)}};
yx=function(l,y){y.length!==0&&(l.N.push(y),l.C+=y.length)};
kq=function(l,y,k){DO(l.Z,y*8+k)};
zg=function(l,y){kq(l,y,2);y=l.Z.end();yx(l,y);y.push(l.C);return y};
rp=function(l,y){var k=y.pop();for(k=l.C+l.Z.length()-k;k>127;)y.push(k&127|128),k>>>=7,l.C++;y.push(k);l.C++};
Zv=function(l,y,k){if(k!=null){switch(typeof k){case "string":sO(k)}kq(l,y,1);switch(typeof k){case "number":l=l.Z;wP(k);Rk(l,OC);Rk(l,dP);break;case "bigint":k=BigInt.asUintN(64,k);k=new No(Number(k&BigInt(4294967295)),Number(k>>BigInt(32)));l=l.Z;y=k.Z;Rk(l,k.C);Rk(l,y);break;default:k=sO(k),l=l.Z,y=k.Z,Rk(l,k.C),Rk(l,y)}}};
ek=function(l,y,k){kq(l,y,2);DO(l.Z,k.length);yx(l,l.Z.end());yx(l,k)};
AE=function(){const l=class{constructor(){throw Error();}};Object.setPrototypeOf(l,l.prototype);return l};
$q=function(l,y){if(y==null||y=="")return new l;y=JSON.parse(y);if(!Array.isArray(y))throw Error("dnarr");y[kH]|=32;return new l(y)};
O4=function(l,y){return new Qx(l,y,tE)};
wp=function(l,y,k,z,r){y=dp(y,z);y!=null&&(k=zg(l,k),r(y,l),rp(l,k))};
aY=function(l,y,k,z){var r=z[l];if(r)return r;r={};r.oS=z;r.yk=IBt(z[0]);var Z=z[1];let e=1;Z&&Z.constructor===Object&&(r.extensions=Z,Z=z[++e],typeof Z==="function"&&(r.Xx=!0,hE??(hE=Z),Gg??(Gg=z[e+1]),Z=z[e+=2]));const A={};for(;Z&&Array.isArray(Z)&&Z.length&&typeof Z[0]==="number"&&Z[0]>0;){for(var Q=0;Q<Z.length;Q++)A[Z[Q]]=Z;Z=z[++e]}for(Q=1;Z!==void 0;){typeof Z==="number"&&(Q+=Z,Z=z[++e]);let d;var t=void 0;Z instanceof Qx?d=Z:(d=KvQ,e--);if(d?.Z){Z=z[++e];t=z;var O=e;typeof Z==="function"&&
(Z=Z(),t[O]=Z);t=Z}Z=z[++e];O=Q+1;typeof Z==="number"&&Z<0&&(O-=Z,Z=z[++e]);for(;Q<O;Q++){const w=A[Q];t?k(r,Q,d,t,w):y(r,Q,d,w)}}return z[l]=r};
iU=function(l){return Array.isArray(l)?l[0]instanceof Qx?l:[g2z,l]:[l,void 0]};
dp=function(l,y){if(l instanceof U4)return l.Mx;if(Array.isArray(l))return as(l,y)};
MJ=function(l,y,k,z){const r=k.HM;l[y]=z?(Z,e,A)=>r(Z,e,A,z):r};
c2=function(l,y,k,z,r){const Z=k.HM;let e,A;l[y]=(Q,t,O)=>Z(Q,t,O,A||(A=aY(X3,MJ,c2,z).yk),e||(e=C$(z)),r)};
C$=function(l){let y=l[bU];if(y!=null)return y;const k=aY(X3,MJ,c2,l);y=k.Xx?(z,r)=>hE(z,r,k):(z,r)=>{for(;Kp(r)&&r.C!=4;){var Z=r.N,e=k[Z];
if(e==null){var A=k.extensions;A&&(A=A[Z])&&(A=E2s(A),A!=null&&(e=k[Z]=A))}if(e==null||!e(r,z,Z)){A=r;e=A.V;gZ(A);if(A.WH)var Q=void 0;else Q=A.Z.Z-e,A.Z.Z=e,Q=P$(A.Z,Q);e=void 0;A=z;Q&&((e=A[r0]??(A[r0]=new AO))[Z]??(e[Z]=[])).push(Q)}}if(z=ZD(z))z.zY=k.oS[uU];return!0};
l[bU]=y;l[uU]=fBs.bind(l);return y};
fBs=function(l,y,k,z){var r=this[X3];const Z=this[bU],e=as(void 0,r.yk),A=ZD(l);if(A){var Q=!1,t=r.extensions;if(t){r=(O,d,w)=>{if(w.length!==0)if(t[d])for(const h of w){O=pp(h);try{Q=!0,Z(e,O)}finally{O.free()}}else z?.(l,d,w)};
if(y==null)e6(A,r);else if(A!=null){const O=A[y];O&&r(A,y,O)}if(Q){let O=l[kH]|0;if(O&2&&O&2048&&!k?.tW)throw Error();const d=$H(O),w=(h,U)=>{if(xd(l,h,d)!=null)switch(k?.ZyK){case 1:return;default:throw Error();}U!=null&&(O=qh(l,O,h,U,d));delete A[h]};
y==null?ew(e,e[kH]|0,(h,U)=>{w(h,U)}):w(y,xd(e,y,d))}}}};
E2s=function(l){l=iU(l);const y=l[0].HM;if(l=l[1]){const k=C$(l),z=aY(X3,MJ,c2,l).yk;return(r,Z,e)=>y(r,Z,e,z,k)}return y};
xq=function(l,y,k){l[y]=k.Rh};
qJ=function(l,y,k,z){let r,Z;const e=k.Rh;l[y]=(A,Q,t)=>e(A,Q,t,Z||(Z=aY(mB,xq,qJ,z).yk),r||(r=W2(z)))};
W2=function(l){let y=l[Tg];if(!y){const k=aY(mB,xq,qJ,l);y=(z,r)=>Vx(z,r,k);
l[Tg]=y}return y};
Vx=function(l,y,k){ew(l,l[kH]|0,(z,r)=>{if(r!=null){var Z=jeQ(k,z);Z?Z(y,r,z):z<500||Do(Syq,3)}});
(l=ZD(l))&&e6(l,(z,r,Z)=>{yx(y,y.Z.end());for(z=0;z<Z.length;z++)yx(y,vG(Z[z])||new Uint8Array(0))})};
jeQ=function(l,y){var k=l[y];if(k)return k;if(k=l.extensions)if(k=k[y]){k=iU(k);var z=k[0].Rh;if(k=k[1]){const r=W2(k),Z=aY(mB,xq,qJ,k).yk;k=l.Xx?Gg(Z,r):(e,A,Q)=>z(e,A,Q,Z,r)}else k=z;
return l[y]=k}};
P2=function(l,y,k){if(Array.isArray(y)){var z=y[kH]|0;if(z&4)return y;for(var r=0,Z=0;r<y.length;r++){const e=l(y[r]);e!=null&&(y[Z++]=e)}Z<r&&(y.length=Z);l=z|1;k&&(l=(l|4)&-1537);l!==z&&(y[kH]=l);k&&l&2&&Object.freeze(y);return y}};
K$=function(l,y,k){return new Qx(l,y,k)};
gp=function(l,y,k){return new Qx(l,y,k)};
E4=function(l,y,k){qh(l,l[kH]|0,y,k,$H(l[kH]|0))};
jk=function(l,y,k){y=y==null||typeof y==="number"?y:y==="NaN"||y==="Infinity"||y==="-Infinity"?Number(y):void 0;y!=null&&(kq(l,k,1),l=l.Z,k=f$||(f$=new DataView(new ArrayBuffer(8))),k.setFloat64(0,+y,!0),OC=k.getUint32(0,!0),dP=k.getUint32(4,!0),Rk(l,OC),Rk(l,dP))};
Sk=function(l,y,k){y=cpC(y);if(y!=null){switch(typeof y){case "string":B$(y)}if(y!=null)switch(kq(l,k,0),typeof y){case "number":l=l.Z;ho(y);H$(l,OC,dP);break;case "bigint":k=BigInt.asUintN(64,y);k=new v$(Number(k&BigInt(4294967295)),Number(k>>BigInt(32)));H$(l.Z,k.C,k.Z);break;default:k=B$(y),H$(l.Z,k.C,k.Z)}}};
n$=function(l,y,k){y=TA(y);y!=null&&y!=null&&(kq(l,k,0),lU(l.Z,y))};
F3=function(l,y,k){y=y==null||typeof y==="boolean"?y:typeof y==="number"?!!y:void 0;y!=null&&(kq(l,k,0),l.Z.Z.push(y?1:0))};
oY=function(l,y,k){y=Ru(y);y!=null&&ek(l,k,IU(y))};
NJ=function(l,y,k,z,r){y=dp(y,z);y!=null&&(k=zg(l,k),r(y,l),rp(l,k))};
s4=function(l,y){return(k,z)=>{{const Z={zH:!0};z&&Object.assign(Z,z);k=pp(k,void 0,void 0,Z);try{const e=new l,A=e.Mx;C$(y)(A,k);var r=e}finally{k.free()}}return r}};
L$=function(l){return function(){const y=new n2T;Vx(this.Mx,y,aY(mB,xq,qJ,l));yx(y,y.Z.end());const k=new Uint8Array(y.C),z=y.N,r=z.length;let Z=0;for(let e=0;e<r;e++){const A=z[e];k.set(A,Z);Z+=A.length}y.N=[k];return k}};
v2=function(l){return y=>$q(l,y)};
B2=function(l,y){return(...k)=>{if(l.Z>-1)return y(...k);try{return l.Z=l.N.Z.now(),y(...k)}finally{l.V+=l.N.Z.now()-l.Z,l.Z=-1,l.C+=1}}};
H2=function(){return qb(FvQ)};
Dv=function(l,y,k,z){if(Math.random()<(z||l.Z))try{let r;k instanceof RY?r=k:(r=new RY,UU(k,function(e,A){var Q=r;const t=Q.V++;e=Mb(A,e);Q.Z.push(t);Q.C[t]=e}));
const Z=r.wZ(l.C,"pagead2.googlesyndication.com","/pagead/gen_204?id="+y+"&");Z&&(xU(),uN(Z))}catch(r){}};
lI=function(){const l=g.aC.performance;return l&&l.now&&l.timing?Math.floor(l.now()+l.timing.navigationStart):g.T5()};
yK=function(){const l=g.aC.performance;return l&&l.now?l.now():null};
rD=function(l){l&&k7&&zo()&&(k7.clearMarks(`goog_${l.label}_${l.uniqueId}_start`),k7.clearMarks(`goog_${l.label}_${l.uniqueId}_end`))};
Z3=function(l,y,k,z,r,Z,e){let A="";l&&(A+=l+":");k&&(A+="//",y&&(A+=y+"@"),A+=k,z&&(A+=":"+z));r&&(A+=r);Z&&(A+="?"+Z);e&&(A+="#"+e);return A};
g.ee=function(l){return l.match(o2z)};
Aw=function(l){return l?decodeURI(l):l};
g.$7=function(l){return Aw(g.ee(l)[3]||null)};
QK=function(l){return Aw(g.ee(l)[5]||null)};
g.tw=function(l){l=g.ee(l);return Z3(l[1],l[2],l[3],l[4])};
OI=function(l){l=g.ee(l);return Z3(null,null,null,null,l[5],l[6],l[7])};
dD=function(l){const y=l.indexOf("#");return y<0?l:l.slice(0,y)};
wD=function(l,y){if(l){l=l.split("&");for(let k=0;k<l.length;k++){const z=l[k].indexOf("=");let r,Z=null;z>=0?(r=l[k].substring(0,z),Z=l[k].substring(z+1)):r=l[k];y(r,Z?ii(Z):"")}}};
hw=function(l,y){if(!y)return l;var k=l.indexOf("#");k<0&&(k=l.length);let z=l.indexOf("?"),r;z<0||z>k?(z=k,r=""):r=l.substring(z+1,k);l=[l.slice(0,z),r,l.slice(k)];k=l[1];l[1]=y?k?k+"&"+y:y:k;return l[0]+(l[1]?"?"+l[1]:"")+l[2]};
Go=function(l,y,k){if(Array.isArray(y))for(let z=0;z<y.length;z++)Go(l,String(y[z]),k);else y!=null&&k.push(l+(y===""?"":"="+g.am(y)))};
aK=function(l,y){const k=[];for(y=y||0;y<l.length;y+=2)Go(l[y],l[y+1],k);return k.join("&")};
g.iI=function(l){const y=[];for(const k in l)Go(k,l[k],y);return y.join("&")};
NoC=function(l,y){const k=arguments.length==2?aK(arguments[1],0):aK(arguments,1);return hw(l,k)};
g.UI=function(l,y){y=g.iI(y);return hw(l,y)};
MA=function(l,y,k){k=k!=null?"="+g.am(k):"";return hw(l,y+k)};
XL=function(l,y,k,z){const r=k.length;for(;(y=l.indexOf(k,y))>=0&&y<z;){var Z=l.charCodeAt(y-1);if(Z==38||Z==63)if(Z=l.charCodeAt(y+r),!Z||Z==61||Z==38||Z==35)return y;y+=r+1}return-1};
CY=function(l,y){const k=l.search(cL);let z=XL(l,0,y,k);if(z<0)return null;let r=l.indexOf("&",z);if(r<0||r>k)r=k;z+=y.length+1;return ii(l.slice(z,r!==-1?r:0))};
bI=function(l,y){const k=l.search(cL);let z=0,r;const Z=[];for(;(r=XL(l,z,y,k))>=0;)Z.push(l.substring(z,r)),z=Math.min(l.indexOf("&",r)+1||k,k);Z.push(l.slice(z));return Z.join("").replace(seg,"$1")};
Lv_=function(l,y,k){return MA(bI(l,y),y,k)};
uI=function(l){let y=l.toString();l.name&&y.indexOf(l.name)==-1&&(y+=": "+l.name);l.message&&y.indexOf(l.message)==-1&&(y+=": "+l.message);if(l.stack)a:{l=l.stack;var k=y;try{l.indexOf(k)==-1&&(l=k+"\n"+l);let z;for(;l!=z;)z=l,l=l.replace(/((https?:\/..*\/)[^\/:]*:\d+(?:.|\n)*)\2/,"$1");y=l.replace(/\n */g,"\n");break a}catch(z){y=k;break a}y=void 0}return y};
mI=function(l,y,k,z){return B2(H2().Z.Z,()=>{let r,Z;try{l.Aj&&l.Aj.Z?(Z=l.Aj.start(y.toString(),3),r=k(),l.Aj.end(Z)):r=k()}catch(e){let A=l.Ls;try{rD(Z),A=l.C(y,new x7(uI(e)),void 0,z)}catch(Q){l.k_(217,Q)}if(!A)throw e;}return r})()};
WL=function(l,y,k,z){var r=qA;return B2(H2().Z.Z,(...Z)=>mI(r,l,()=>y.apply(k,Z),z))};
v2C=function(){var l=H2().N,y=IK>=0?Date.now()-To-IK:-1;const k=VK?Date.now()-To-PL:-1,z=Jw>=0?Date.now()-To-Jw:-1;let r;if(l==947190542)return 100;if(l==79463069)return 200;l=[2E3,4E3];r=[250,500,1E3];qA.k_(637,Error(),.001,void 0);let Z=y;k!=-1&&k<y&&(Z=k);let e;for(y=0;y<l.length;++y)if(Z<l[y]){e=r[y];break}e===void 0&&(e=r[l.length]);return z!=-1&&z>1500&&z<4E3?500:e};
Y7=function(l){const y=l!==l.top,k=l.top===d7(l);let z=-1,r=0,Z;y&&k&&l.top.mraid?(z=3,Z=l.top.mraid):z=(Z=l.mraid)?y?k?2:1:0:-1;Z&&(Z.IS_GMA_SDK||(r=2),Fw(BoC,e=>typeof Z[e]==="function")||(r=1));
return{H7:Z,compatibility:r,qC:z}};
pY=function(l,y,k=!1){if(l&&y!==null&&y!=y.top){if(!y.top)return new g.Fn(-12245933,-12245933);y=y.top}try{return k?(new g.Fn(y.innerWidth,y.innerHeight)).round():AV(y||window).round()}catch(z){return new g.Fn(-12245933,-12245933)}};
KY=function(l,y,k){try{if(l){if(!y.top)return new p9(-12245933,-12245933,-12245933,-12245933);y=y.top}const {height:r,width:Z}=pY(l,y,k);if(Z===-12245933)return new p9(Z,Z,Z,Z);var z=Dl(y.document);const {x:e,y:A}=Qq(z.Z);return new p9(A,e+Z,A+r,e)}catch{return new p9(-12245933,-12245933,-12245933,-12245933)}};
gD=function(l){return new p9(l.top,l.right,l.bottom,l.left)};
EI=function(l){const y=l.top||0,k=l.left||0;return new p9(y,k+(l.width||0),y+(l.height||0),k)};
fY=function(l){return l!=null&&l>=0&&l<=1};
HRq=function(l,y=qj){y!==null&&y!=y.top&&(y=y.top);let k=0,z=0;try{const r=y.document,Z=r.body,e=r.documentElement;if(r.compatMode=="CSS1Compat"&&e.scrollHeight)k=e.scrollHeight!=l.height?e.scrollHeight:e.offsetHeight,z=e.scrollWidth!=l.width?e.scrollWidth:e.offsetWidth;else{let A=e.scrollHeight,Q=e.scrollWidth,t=e.offsetHeight,O=e.offsetWidth;e.clientHeight!=t&&(A=Z.scrollHeight,Q=Z.scrollWidth,t=Z.offsetHeight,O=Z.offsetWidth);A>l.height?A>t?(k=A,z=Q):(k=t,z=O):A<t?(k=A,z=Q):(k=t,z=O)}return new g.Fn(z,
k)}catch(r){return new g.Fn(-12245933,-12245933)}};
R1e=function(){const l=g.Xv();return l?Be("AmazonWebAppPlatform;Android TV;Apple TV;AppleTV;BRAVIA;BeyondTV;Freebox;GoogleTV;HbbTV;LongTV;MiBOX;MiTV;NetCast.TV;Netcast;Opera TV;PANASONIC;POV_TV;SMART-TV;SMART_TV;SWTV;Smart TV;SmartTV;TV Store;UnionTV;Version/8.0 Safari/601.1 WPE;WebOS".split(";"),y=>ir(l,y))||ir(l,"OMI/")&&!ir(l,"XiaoMi/")?!0:ir(l,"Presto")&&ir(l,"Linux")&&!ir(l,"X11")&&!ir(l,"Android")&&!ir(l,"Mobi"):!1};
je=function(){return qb(DRe)};
Se=function(l,y){y&&y.screen&&(l.V=new g.Fn(y.screen.width,y.screen.height))};
nY=function(l,y){const k=l.Z?new g.Fn(K9(l.Z),l.Z.getHeight()):new g.Fn(0,0);l.J=HRq(k,y)};
oK=function(){var l=je();if(l.S>0||l.A)return!0;l=xU().C.isVisible();const y=t2(FL)===0;return l||y};
sI=function(l){const y=g.tp(l.J);g.Fy(y,k=>{k.C_(l.Z)});
l.Z!=l||NA(l)};
LY=function(l,y){g.ro(l.J,y)||(l.J.push(y),y.C_(l.Z),y.S(l.V),y.xN()&&(l.b0=!0))};
vL=function(l){l.b0=l.J.length?Be(l.J,y=>y.xN()):!1};
BL=function(l){l=l.Z;l.Xr();l.PG();var y=je();y.K=KY(!1,l.N,y.isMobileDevice);nY(je(),l.N);l.V.Z=l.xz()};
NA=function(l){const y=g.tp(l.J);g.Fy(y,k=>{k.S(l.V)})};
HL=function(l,y){return l.A?new p9(Math.max(y.top+l.A.top,y.top),Math.min(y.left+l.A.right,y.right),Math.min(y.top+l.A.bottom,y.bottom),Math.max(y.left+l.A.left,y.left)):y.clone()};
leP=function(l){switch(Math.trunc(l.N)){case -16:return-16;case -8:return-8;case 0:return 0;case 8:return 8;case 16:return 16;default:return 16}};
RK=function(l,y){return l.N<y.N?!0:l.N>y.N?!1:l.C<y.C?!0:l.C>y.C?!1:typeof l.Z<typeof y.Z?!0:typeof l.Z>typeof y.Z?!1:l.Z<y.Z};
ymt=function(l,y){g.Fy(y.Z,k=>{l.add(k.C,k.Z,leP(k))})};
D3=function(l,y){UU(y,(k,z)=>{k===void 0||l.add(z,k,0)});
return l};
lL=function(l){var y=k0z;l.C&&(g.b2(l.Z,(k,z)=>RK(z,k)?1:RK(k,z)?-1:0),l.C=!1);
return ve(l.Z,(k,z)=>{z=y(z);return`${k}${k!=""&&z!=""?"&":""}${z}`},"")};
g.yb=function(l){l&&typeof l.dispose=="function"&&l.dispose()};
g.kj=function(l){for(let y=0,k=arguments.length;y<k;++y){const z=arguments[y];g.CC(z)?g.kj.apply(null,z):g.yb(z)}};
g.zP=function(){this.Cf=this.Cf;this.TJ=this.TJ};
g.x=function(l,y){l.addOnDisposeCallback(g.IC(g.yb,y))};
Z35=function(l,y,k){g.Fy(l.N,z=>{var r=l.Z;if(!z.Z&&(z.N(y,k),z.V())){z.Z=!0;var Z=z.C();const e=new rh;e.add("id","av-js");e.add("type","verif");e.add("vtype",z.J);z=qb(z6T);e.add("i",z.Z++);e.add("adk",r);D3(e,Z);r=new rm_(e);Zc(r)}})};
e6t=function(l){return g.sT(l,(y,k,z)=>k>0?z[k]-z[k-1]:z[k])};
eA=function(l,y,k){l=g.sT(l.Z,z=>y(z));
return k?l:e6t(l)};
Aq=function(l,y=!0){return eA(l,k=>k.Z,y)};
Qb=function(l,y,k){const z=g.yL(l.C,r=>y<=r);
return z==-1?0:k(l.Z[z])};
tq=function(l,y){return Qb(l,y,k=>k.Z)};
Os=function(l,y=!0){return eA(l,k=>k.N,y)};
dh=function(l,y){return Qb(l,y,k=>k.N)};
wh=function(l,y){return Qb(l,y,k=>k.C)};
hq=function(l){g.Fy(l.Z,y=>{y.C=0})};
GP=function(l,y=!0){return Os(l.C,y)};
iL=function(l,y){y=a1(y);return y===0?0:a1(l)/y};
a1=function(l){return Math.max(l.bottom-l.top,0)*Math.max(l.right-l.left,0)};
AmC=function(l,y){if(!l||!y)return!1;let k=0;for(;l!==null&&k++<100;){if(l===y)return!0;try{if(l=l.parentElement||l){const z=HZ(l),r=z&&Oq(z),Z=r&&r.frameElement;Z&&(l=Z)}}catch(z){break}}return!1};
Qgt=function(l,y,k){if(!l||!y)return!1;y=Eq(l.clone(),-y.left,-y.top);l=(y.left+y.right)/2;y=(y.top+y.bottom)/2;OU(window.top)&&window.top&&window.top.document&&(window=window.top);if(!$gC())return!1;l=window.document.elementFromPoint(l,y);if(!l)return!1;y=(y=(y=HZ(k))&&y.defaultView&&y.defaultView.frameElement)&&AmC(y,l);const z=l===k;l=!z&&l&&xg(l,r=>r===k);
return!(y||z||l)};
tR5=function(l,y,k,z){return je().N?!1:K9(l)<=0||l.getHeight()<=0?!0:k&&z?Us(208,()=>Qgt(l,y,k)):!1};
dgT=function(l){l=l.rK.e0;var y;if(y=l&&l.getAttribute)y=/-[a-z]/.test("googleAvInapp")?!1:O3_&&l.dataset?"googleAvInapp"in l.dataset:l.hasAttribute?l.hasAttribute("data-"+ui()):!!l.getAttribute("data-"+ui());y&&(je().C=!0)};
MS=function(l,y){y!=l.Tf&&(l.Tf=y,l=je(),y?l.S++:l.S>0&&l.S--)};
XW=function(l,y){if(l.SI){if(y.getName()===l.SI.getName())return;l.SI.dispose();l.SI=null}y=y.create(l.rK.Z,l.QE,l.xN());if(y=y!=null&&y.observe()?y:null)l.SI=y};
cp=function(l,y,k){if(!l.C6||l.LB==-1||y.C===-1||l.C6.C===-1)return 0;l=y.C-l.C6.C;return l>k?0:l};
wC5=function(l,y,k){if(l.SI){l.SI.J();var z=l.SI.RR,r=z.V,Z=r.Z;if(z.S!=null){var e=z.N;l.iF=new g.jD(e.left-Z.left,e.top-Z.top)}Z=l.SA()?Math.max(z.Z,z.J):z.Z;e={};r.volume!==null&&(e.volume=r.volume);r=l.yX(z);l.C6=z;l.Aa(Z,y,k,!1,e,r,z.A)}};
h6Q=function(l){if(l.hB&&l.Hy){var y=tm(l.QE,"od")==1,k=je().Z,z=l.Hy,r=l.SI?l.SI.getName():"ns",Z=l.iF,e=new g.Fn(K9(k),k.getHeight());k=l.SA();l={Lz:r,iF:Z,Nb:e,SA:k,Pa:l.Jl.Pa,ZK:y};if(y=z.C){y.J();r=y.RR;Z=r.V.Z;var A=e=null;r.S!=null&&Z&&(e=r.N,e=new g.jD(e.left-Z.left,e.top-Z.top),A=new g.Fn(Z.right-Z.left,Z.bottom-Z.top));r=k?Math.max(r.Z,r.J):r.Z;k={Lz:y.getName(),iF:e,Nb:A,SA:k,ZK:!1,Pa:r}}else k=null;k&&Z35(z,l,k)}};
G0z=function(l,y,k){y&&(l.VY=y);k&&(l.tZ=k)};
g.Cr=function(){};
g.bL=function(l){return{value:l,done:!1}};
aey=function(l){const y={ptlt:g.T5()-l.J};var k=l.C;k&&(y.pnk=k);(k=l.N)&&(y.pnc=k);(k=l.V)&&(y.pnmm=k);(l=l.Z)&&(y.pns=l);return y};
uL=function(l){return fY(l.volume)&&l.volume>0};
xj=function(l,y){const k={};if(l!==void 0)if(y!=null)for(const z in y){const r=y[z];z in Object.prototype||r!=null&&(k[z]=typeof r==="function"?r(l):l[r])}else g.Am(k,l);return lL(D3(new rh,k))};
mu=function(l,y){const k=l.C[y],z=k[1];l.N+=k[0];z>0&&l.Z[y]==0&&(l.Z[y]=1)};
i3e=function(l){const y=g.LR(l.C);let k=0;for(const z in l.Z)g.ro(y,z)&&l.Z[z]==1&&(k+=l.C[z][1],l.Z[z]=2);return k};
Ug4=function(l){let y=0;for(const k in l.Z){const z=l.Z[k];if(z==1||z==2)y+=l.C[k][1]}return y};
qS=function(l,y,k){let z=l.u0;VK||k||l.A==-1||(z+=y-l.A);return z};
Wp=function(l){return[l.top,l.left,l.bottom,l.right]};
TP=function(l){return l===void 0?l:Number(l)?I1(l,3):0};
Vb=function(l,y,k){let z=l.length;for(;z<y+1;)l.push(k()),z++};
Pp=function(l,y,k){const z=[y];if(l!=y||k!=y)z.unshift(l),z.push(k);return z};
Jq=function(l){l.hasCompleted=!0;l.I2!=0&&(l.I2=3)};
MRC=function(l,y){l.V4()?y=0:l.LB==-1?y=0:(y-=l.LB,y=y>Math.max(1E4,l.N/3)?0:y);var k=l.A(l)||{};k=k.currentTime!==void 0?k.currentTime:l.Y;const z=k-l.Y;let r=0;z>=0?(l.b0+=y,l.RR+=Math.max(y-z,0),r=Math.min(z,l.b0)):l.PG+=Math.abs(z);z!=0&&(l.b0=0);l.Xr==-1&&z>0&&(l.Xr=Jw>=0?Date.now()-To-Jw:-1);l.Y=k;return r};
Yj=function(l){const y=!!tm(H2().QE,"umt");return l.C_||!y&&!l.u0?0:1};
pr=function(l,y){return l.sj[y!=null&&y<l.sj.length?y:l.sj.length-1]};
Kr=function(l,y,k=!1){return y>=15E3?!0:l.gb?k?!0:l.N>0?y>=l.N/2:l.HG>0?y>=l.HG:!1:!1};
XCP=function(l,y){Be(l.S,k=>k.N==y.N)||l.S.push(y)};
gh=function(l){const y=tq(l.BV().Z,1);return Kr(l,y)};
cm5=function(l){const y=I1(l.Jl.Pa,2),k=l.KE.N;var z=l.Jl,r=pr(l);const Z=TP(r.V),e=TP(r.S),A=TP(z.volume),Q=I1(r.K,2),t=I1(r.Y,2),O=I1(z.Pa,2),d=I1(r.b0,2),w=I1(r.Ja,2);z=I1(z.Fk,2);const h=l.Kx().clone().round();l=l.SI&&l.SI.N?(l.SI?l.SI.N:null).clone().round():null;r=GP(r,!1);return{s$:y,eS:k,uF:Z,HC:e,Ir:A,PC:Q,p6:t,Pa:O,Sd:d,Rf:w,Fk:z,position:h,ll:l,gf:r}};
Es=function(l,y){Vb(l.Z,y,()=>({s$:0,eS:void 0,uF:-1,HC:-1,Ir:-1,PC:-1,p6:-1,Pa:-1,Sd:-1,Rf:-1,Fk:-1,position:void 0,ll:void 0,gf:[]}));
l.Z[y]=cm5(l)};
b3_=function(l,y){if(g.ro(Cr5,y))return!0;const k=l.Lf[y];return k!==void 0?(l.Lf[y]=!0,!k):!1};
jA=function(l,y,k,z,r){if(l.kM)return{"if":0,vs:0};var Z=l.Kx().clone().round();const e=l.SI?l.SI.N:null,A=je();var Q=H2();const t=l.BV();var O=l.SI?l.SI.getName():"ns";const d={};d["if"]=A.N?1:void 0;d.sdk=l.V?l.V:void 0;d.t=l.timeCreated;d.p=[Z.top,Z.left,Z.bottom,Z.right];Z&&e&&!gt(e,Z)&&(Z=e.round(),d.cp=[Z.top,Z.left,Z.bottom,Z.right]);d.tos=Aq(t.C,!1);d.mtos=GP(t);d.mcvt=t.PG.N;d.ps=void 0;Z=qS(t,Date.now()-To,l.V4());d.vht=Z;d.mut=t.Oj.N;d.a=TP(l.Jl.volume);d.mv=TP(t.S);d.fs=l.Tf?1:0;d.ft=
t.C_.Z;d.at=t.J.Z;d.as=t.V>0?1:0;d.atos=Aq(t.Z);d.ssb=Aq(t.xz,!1);d.amtos=Os(t.Z,!1);d.uac=l.WG;d.vpt=t.N.Z;O=="nio"&&(d.nio=1,d.avms="nio");d.gmm="4";d.gdr=Kr(l,t.N.Z,!0)?1:0;d.efpf=l.MW;if(O=="gsv"||O=="nis")O=l.SI,O.b0>0&&(d.nnut=O.b0);d.tcm=Yj(l);d.nmt=l.PG;d.bt=l.RR;d.pst=l.Xr;d.vpaid=l.C_;d.dur=l.N;d.vmtime=l.Y;d.is=l.KE.N;l.Z.length>=1&&(d.i0=l.Z[0].eS,d.a0=[l.Z[0].Ir],d.c0=[l.Z[0].Pa],d.ss0=[l.Z[0].Fk],O=l.Z[0].position,Z=l.Z[0].ll,d.p0=O?Wp(O):void 0,O&&Z&&!gt(Z,O)&&(d.cp0=Wp(Z)));l.Z.length>=
2&&(d.i1=l.Z[1].eS,d.a1=Pp(l.Z[1].uF,l.Z[1].Ir,l.Z[1].HC),d.c1=Pp(l.Z[1].PC,l.Z[1].Pa,l.Z[1].p6),d.ss1=Pp(l.Z[1].Sd,l.Z[1].Fk,l.Z[1].Rf),O=l.Z[1].position,Z=l.Z[1].ll,d.p1=O?Wp(O):void 0,O&&Z&&!gt(Z,O)&&(d.cp1=Wp(Z)),d.mtos1=l.Z[1].gf);l.Z.length>=3&&(d.i2=l.Z[2].eS,d.a2=Pp(l.Z[2].uF,l.Z[2].Ir,l.Z[2].HC),d.c2=Pp(l.Z[2].PC,l.Z[2].Pa,l.Z[2].p6),d.ss2=Pp(l.Z[2].Sd,l.Z[2].Fk,l.Z[2].Rf),O=l.Z[2].position,Z=l.Z[2].ll,d.p2=O?Wp(O):void 0,O&&Z&&!gt(Z,O)&&(d.cp2=Wp(Z)),d.mtos2=l.Z[2].gf);l.Z.length>=4&&(d.i3=
l.Z[3].eS,d.a3=Pp(l.Z[3].uF,l.Z[3].Ir,l.Z[3].HC),d.c3=Pp(l.Z[3].PC,l.Z[3].Pa,l.Z[3].p6),d.ss3=Pp(l.Z[3].Sd,l.Z[3].Fk,l.Z[3].Rf),O=l.Z[3].position,Z=l.Z[3].ll,d.p3=O?Wp(O):void 0,O&&Z&&!gt(Z,O)&&(d.cp3=Wp(Z)),d.mtos3=l.Z[3].gf);d.cs=Ug4(l.KE);y&&(d.ic=i3e(l.KE),d.dvpt=t.N.C,d.dvs=wh(t.C,.5),d.dfvs=wh(t.C,1),d.davs=wh(t.Z,.5),d.dafvs=wh(t.Z,1),k&&(t.N.C=0,hq(t.C),hq(t.Z)),l.dg()&&(d.dtos=t.sj,d.dav=t.D,d.dtoss=l.Gq+1,k&&(t.sj=0,t.D=0,l.Gq++)),d.dat=t.J.C,d.dft=t.C_.C,k&&(t.J.C=0,t.C_.C=0));d.ps=[A.J.width,
A.J.height];d.bs=[K9(A.Z),A.Z.getHeight()];d.scs=[A.V.width,A.V.height];d.dom=A.domain;l.AA&&(d.vds=l.AA);if(l.S.length>0||l.zO)y=g.tp(l.S),l.zO&&y.push(l.zO),d.pings=g.sT(y,w=>w.toString());
y=g.sT(g.oC(l.S,w=>w.S()),w=>w.getId());
ts_(y);d.ces=y;l.C&&(d.vmer=l.C);l.D&&(d.vmmk=l.D);l.Ja&&(d.vmiec=l.Ja);d.avms=l.SI?l.SI.getName():"ns";l.SI&&g.Am(d,l.SI.XE());z?(d.c=I1(l.Jl.Pa,2),d.ss=I1(l.Jl.Fk,2)):d.tth=Date.now()-To-fr;d.mc=I1(t.Y,2);d.nc=I1(t.K,2);d.mv=TP(t.S);d.nv=TP(t.V);d.lte=I1(l.Cv,2);z=pr(l,r);GP(t);d.qmtos=GP(z);d.qnc=I1(z.K,2);d.qmv=TP(z.S);d.qnv=TP(z.V);d.qas=z.V>0?1:0;d.qi=l.s7;d.avms||(d.avms="geo");d.psm=t.HG.Z;d.psv=t.HG.getValue();d.psfv=t.mK.getValue();d.psa=t.Xr.getValue();Q=MsC(Q.QE);Q.length&&(d.veid=Q);
l.J&&g.Am(d,aey(l.J));d.avas=l.M8();d.vs=l.FG();d.co=uv_(l);d.tm=t.RR;d.tu=t.rb;return d};
nr=function(l,y,k){var z=l.Nv[y];if(z!=null)return z;z=b3_(l,y);const r=HO(SA,Z=>Z==y);
l=jA(l,z,z,k,xge[SA[r]]);y=="fully_viewable_audible_half_duration_impression"&&(l.std="csm");return l};
uv_=function(l){var y=l.rb.toString(10).padStart(2,"0");y=`${l.hv}${y}`;l.rb<99&&l.rb++;return y};
o1=function(l,y,k){FW(k,"mousedown",()=>mgy(l),301);
FW(y,"scroll",()=>qly(l),302);
FW(k,"touchmove",()=>Wie(l),303);
FW(k,"mousemove",()=>IeT(l),304);
FW(k,"keydown",()=>T44(l),305)};
VRz=function(){var l=document.documentElement;try{if(!OU(Oq().top))return"2";var y;let k=[];const z=Oq(l.ownerDocument);for(l=z;l!=z.top;l=l.parent)if(l.frameElement)k.push(l.frameElement);else break;return(y=k)&&y.length!=0?"1":"0"}catch(k){return"2"}};
mgy=function(l){g.fR(l.Z,y=>{y.N>1E5||++y.N})};
qly=function(l){g.fR(l.Z,y=>{y.Z>1E5||++y.Z})};
Wie=function(l){g.fR(l.Z,y=>{y.Z>1E5||++y.Z})};
IeT=function(l){g.fR(l.Z,y=>{y.V>1E5||++y.V})};
T44=function(l){g.fR(l.Z,y=>{y.C>1E5||++y.C})};
NS=function(l,y){return g.Dg(l.Z,k=>k.s7==y)};
Lr=function(l,y){return y?g.Dg(l.Z,k=>k.rK.e0==y):null};
Pr5=function(l,y){return g.Dg(l.C,k=>k.Hj()==2&&k.s7==y)};
Bp=function(){var l=vp;return l.Z.length==0?l.C:l.C.length==0?l.Z:g.QL(l.C,l.Z)};
Hp=function(l,y){l=y.Hj()==1?l.Z:l.C;const k=RC(l,z=>z==y);
return k!=-1?(l.splice(k,1),y.SI&&y.SI.unobserve(),y.dispose(),!0):!1};
JmQ=function(l){var y=vp;let k;if(Hp(y,l)){switch(l.Hj()){case 0:k=()=>null;
case 2:k=()=>Pr5(y,l.s7);
break;case 1:k=()=>NS(y,l.s7)}for(let z=k();z;z=k())Hp(y,z)}};
YlT=function(l){var y=vp;l=g.oC(l,k=>!Lr(y,k.rK.e0));
y.Z.push(...l)};
pC5=function(l){var y=vp;const k=[];g.Fy(l,z=>{Be(y.Z,r=>r.rK.e0===z.rK.e0&&r.s7===z.s7)||(y.Z.push(z),k.push(z))})};
R1=function(l,y){if(l.C==null)return!1;const k=(z,r)=>{y(z,r)};
l.Z=g.Dg(l.C,z=>z!=null&&z.Y());
l.Z&&(l.Z.init(k)?BL(l.Z.Z):y(l.Z.Z.D(),l.Z));return l.Z!=null};
Kiz=function(l){if(!l.length)return[];l=g.oC(l,y=>y!=null&&y.sj());
for(let y=1;y<l.length;y++)LY(l[y-1],l[y]);return l};
Eot=function(l){if(!l.element)return!1;const y=l.element,k=l.C.Z.N;var z=H2().Z.Z;l.V=new k.IntersectionObserver(B2(z,r=>Dc(l,r)),goy);
z=B2(z,()=>{l.V.unobserve(y);l.V.observe(y);Dc(l,lp(l))});
k.ResizeObserver?(l.sj=new k.ResizeObserver(z),l.sj.observe(y)):k.MutationObserver&&(l.b0=new g.aC.MutationObserver(z),l.b0.observe(y,{attributes:!0,childList:!0,characterData:!0,subtree:!0}));l.V.observe(y);Dc(l,lp(l));return!0};
lp=function(l){return l.V&&l.V.takeRecords?l.V.takeRecords():[]};
Dc=function(l,y){try{if(y.length){l.rb||(l.rb=Date.now()-To);var k=fe5(y),z=yW(l.element,l.C.Z.N),r=z.x,Z=z.y;l.N=new p9(Math.round(Z),Math.round(r)+k.boundingClientRect.width,Math.round(Z)+k.boundingClientRect.height,Math.round(r));l.Z=HL(l,l.N);var e=gD(k.intersectionRect);l.Y=Eq(e,l.N.left-e.left,l.N.top-e.top)}}catch(A){l.unobserve(),qA.k_(299,A,void 0,void 0)}};
fe5=function(l){return ve(l,(y,k)=>y.time>k.time?y:k,l[0])};
y7=function(){H2();const l=je();return l.N||l.C?0:2};
jgy=function(l,y){if(!l.V){y=WL(142,y);xU();var k;FL.visibilityState?k="visibilitychange":FL.mozVisibilityState?k="mozvisibilitychange":FL.webkitVisibilityState&&(k="webkitvisibilitychange");k&&QW(FL,k,y,{capture:!1})&&(l.V=y)}};
r5=function(l){const y=oK(),k=Date.now()-To;y?(VK||(PL=k,g.Fy(vp.Z,z=>{var r=z.BV();r.u0=qS(r,k,z.I2!=1)})),VK=!0):(l.S=kA(l,k),VK=!1,fr=k,g.Fy(vp.Z,z=>{z.hB&&(z.BV().A=k)}));
z9(l,Bp(),!y)};
eb=function(){var l=Z2;l.J||(l.J=!0,jgy(l,(...y)=>r5(l,...y)),r5(l))};
z9=function(l,y,k){if(!l.done&&(l.C.cancel(),y.length!=0)){l.N=null;try{Sl_();var z=Date.now()-To;H2().J=z;if(qb(A_).Z!=null)for(let r=0;r<y.length;r++)wC5(y[r],z,k);for(z=0;z<y.length;z++)h6Q(y[z]);++l.Z.YD}finally{k?g.Fy(y,r=>{r.Jl.Pa=0}):l.C.schedule()}}};
Sl_=function(){qb($A);const l=qb(A_);l.Z!=null&&l.Z.Z?BL(l.Z.Z):je().update(qj)};
kA=function(l,y){l=l.S;VK&&(l+=y-PL);return l};
Q7=function(){const l=qb(A_);if(l.Z!=null){var y=l.Z;g.Fy(Bp(),k=>XW(k,y))}};
Fiz=function(l=()=>({})){var y=Z2;
qA.qF="av-js";t_.Z=.01;noq([k=>{var z=H2(),r={bin:z.C,type:"error"};z=d4(z.QE);if(!y.N){var Z=qj.document,e=IK>=0?Date.now()-To-IK:-1;const O=Date.now()-To;y.Z.RW==-1&&(e=O);const d=je(),w=H2(),h=d4(w.QE),U=Bp();try{if(U.length>0){var A=d.Z;A&&(h.bs=[K9(A),A.getHeight()]);var Q=d.J;Q&&(h.ps=[Q.width,Q.height]);qj.screen&&(h.scs=[qj.screen.width,qj.screen.height])}else h.url=encodeURIComponent(qj.location.href.substring(0,512)),Z.referrer&&(h.referrer=encodeURIComponent(Z.referrer.substring(0,512)));
h.tt=e;h.pt=IK;h.bin=w.C;qj.google_osd_load_pub_page_exp!==void 0&&(h.olpp=qj.google_osd_load_pub_page_exp);h.deb=[1,y.Z.D1,y.Z.WR,y.Z.YD,y.Z.RW,0,y.C.C,y.Z.mT,y.Z.KG,y.Z.Bg,y.Z.UY,-1].join(";");h.tvt=kA(y,O);d.C&&(h.inapp=1);if(qj!==null&&qj!=qj.top){U.length>0&&(h.iframe_loc=encodeURIComponent(qj.location.href.substring(0,512)));var t=d.K;h.is=[K9(t),t.getHeight()]}}catch(u){h.error=1}y.N=h}A=g.r4(y.N);Q=H2().Z;tm(Q.N,"prf")==1?(t=new O$,Z=Q.Z,e=0,Z.Z>-1&&(e=Z.N.Z.now()-Z.Z),t=S6(t,1,Co(Z.V+e),
0),Z=Q.Z,t=S6(t,5,Wi(Z.Z>-1?Z.C+1:Z.C),0),t=S6(t,2,fo(Q.C.Z.N()),"0"),t=S6(t,3,fo(Q.C.Z.C()),"0"),Q=S6(t,4,fo(Q.C.Z.Z()),"0"),Q={pf:g.px(Q.C())}):Q={};g.Am(A,Q);g.Am(k,r,z,A,l())}])};
ooQ=function(){var l=d5||qj;if(!l)return"";const y=[];if(!l.location||!l.location.href)return"";y.push(`${"url"}=${encodeURIComponent(l.location.href.substring(0,512))}`);l.document&&l.document.referrer&&y.push(`${"referrer"}=${encodeURIComponent(l.document.referrer.substring(0,512))}`);return y.join("&")};
w5=function(){let l="youtube.player.web_20260308_08_RC00".match(/_(\d{8})_RC\d+$/)||"youtube.player.web_20260308_08_RC00".match(/_(\d{8})_\d+_\d+$/)||"youtube.player.web_20260308_08_RC00".match(/_(\d{8})_\d+\.\d+$/)||"youtube.player.web_20260308_08_RC00".match(/_(\d{8})_\d+_RC\d+$/);if(l?.length==2)return l[1];l="youtube.player.web_20260308_08_RC00".match(/.*_(\d{2})\.(\d{4})\.\d+_RC\d+$/);return l?.length==3?"20"+l[1]+l[2]:null};
sgT=function(l){try{const y=l.split(",");return y.length>g.LR(N4y).length?null:ve(y,(k,z)=>{z=z.toLowerCase().split("=");if(z.length!=2||h_[z[0]]===void 0||!h_[z[0]](z[1]))throw Error(`Entry (${z[0]}, ${z[1]}) is invalid.`);k[z[0]]=z[1];return k},{})}catch(y){return null}};
Lis=function(l,y){if(l.Z==void 0)return 0;switch(l.J){case "mtos":return l.C?dh(y.Z,l.Z):dh(y.C,l.Z);case "tos":return l.C?tq(y.Z,l.Z):tq(y.C,l.Z)}return 0};
voz=function(l){const y=H2(),k=qb(G9);l&&!y.V&&(y.V=!0,k.kz=!0,k.A&&k.fail("w",!0))};
ip=function(){try{const l=qb(G9);aR(l,"removeEventListener","ready",ip);U$(l)}catch(l){qA.k_(541,l,void 0,void 0)}};
XD=function(l,y){try{var k=qb(G9);k.RR=!0;let r;r=l?new p9(l.y,l.x+l.width,l.y+l.height,l.x):new p9(0,0,0,0);const Z=Date.now()-To,e=oK();var z=new MG(Z,e,k);z.Z=r;z.volume=y;k.S(z)}catch(r){qA.k_(542,r,void 0,void 0)}};
U$=function(l){typeof l.C.H7.AFMA_LIDAR==="string"?(l.rb=!0,B4s(l)):(l.C.compatibility=3,l.A="nc",l.fail("w"))};
aR=function(l,y,...k){try{return l.C.H7[y].apply(l.C.H7,k)}catch(z){H3C(z,r=>{r.method=y})}};
c0=function(l,y,k){aR(l,"addEventListener",y,k)};
CU=function(l){H2().V=!!aR(l,"isViewable");c0(l,"viewableChange",voz);aR(l,"getState")==="loading"?c0(l,"ready",ip):U$(l)};
B4s=function(l){l.RR=!1;const y=tm(H2().QE,"rmmt")==1,k=!!aR(l,"isViewable");(y?!k:1)&&xU().setTimeout(bp(524,()=>{l.RR||(up(l),qA.k_(540,Error(),void 0,void 0),l.A="mt",l.fail("w"))}),500);
R6Q(l);c0(l,l.C.H7.AFMA_LIDAR,XD)};
up=function(l){aR(l,"removeEventListener",l.C.H7.AFMA_LIDAR,XD);l.rb=!1};
R6Q=function(l){var y=tm(H2().QE,"sneio")==1;const k=l.C.H7.AFMA_LIDAR_EXP_1!==void 0,z=l.C.H7.AFMA_LIDAR_EXP_2!==void 0;(y=y&&z)&&(l.C.H7.AFMA_LIDAR_EXP_2=!0);k&&(l.C.H7.AFMA_LIDAR_EXP_1=!y)};
xA=function(l,y){if(aR(l,"getState")==="loading")return new g.Fn(-1,-1);y=aR(l,y);if(!y)return new g.Fn(-1,-1);l=parseInt(y.width,10);y=parseInt(y.height,10);return isNaN(l)||isNaN(y)?new g.Fn(-1,-1):new g.Fn(l,y)};
qG=function(){const l=je();return{sv:"968",...(mL!==null&&{v:mL}),["if"]:l.N?"1":"0",nas:String(vp.Z.length)}};
W0=function(l,y){const k=l[y];k!==void 0&&k>0&&(l[y]=Math.floor(k*1E3))};
DgC=function(l){Fiz(()=>{const y=qG();l.C!=null&&(y.sdk=l.C);const k=qb(A_);k.Z!=null&&(y.avms=k.Z.getName());return y})};
IR=function(l,y,k,z){l=l.Y(null,z,!0,y);l.V=k;YlT([l]);return l};
llq=function(l,y,k){y.kM=!0;switch(y.Hj()){case 1:T9(y,k);break;case 2:l.PG(y)}};
zJ5=function(l,y,k){G5y(y);const z=l.Z;g.Fy(y,r=>{const Z=g.sT(r.criteria,e=>{var A=sgT(e);if(A==null)e=null;else if(e=new yYg,A.visible!=null&&(e.Z=A.visible/100),A.audible!=null&&(e.C=A.audible==1),A.time!=null){const Q=A.timetype=="mtos"?"mtos":"tos",t=hm(A.time,"%")?"%":"ms";A=parseInt(A.time,10);t=="%"&&(A/=100);e.setTime(A,t,Q)}return e});
Be(Z,e=>e==null)||XCP(k,new keQ(r.id,r.event,Z,z))})};
$yP=function(){const l=[];var y=H2();l.push(qb(rYq));tm(y.QE,"mvp_lv")&&l.push(qb(G9));y=[new ZKe,new eJy];y.push(new AYQ(l));y.push(new V7(qj));return y};
J_=function(){const l=[new V7(qj)],y=qb(A_);y.C=l;R1(y,()=>{P0("i")})?Z2.done||(Q7(),eb()):P0("i")};
Qm_=function(l){if(!l.isInitialized){l.isInitialized=!0;try{const z=Date.now()-To,r=H2(),Z=je();IK=z;r.N=79463069;l.C!=="o"&&(d5=d7(qj));if(Qet()){Z2.Z.WR=0;Z2.Z.RW=Date.now()-To-z;var y=$yP(),k=qb(A_);k.C=y;R1(k,()=>{J_()})?Z2.done||(Q7(),LY(k.Z.Z,l),eb()):Z.N?J_():eb()}else YA=!0}catch(z){throw vp.reset(),z;
}}};
P0=function(l){Z2.C.cancel();pU=l;Z2.done=!0};
KU=function(l){if(l.C)return l.C;const y=qb(A_).Z;if(y)switch(y.getName()){case "nis":l.C="n";break;case "gsv":l.C="m"}l.C||(l.C="h");return l.C};
r2=function(l,y,k){if(l.Z==null)return y.AA|=4,!1;l=E$(l.Z,k,y);y.AA|=l;return l==0};
T9=function(l,y){if(!l.T7){var k=nr(l,"start",oK());k=l.p$.Z(k).Z;var z={id:"lidarv"};z.r=y;z.sv="968";mL!==null&&(z.v=mL);wD(k,(r,Z)=>z[r]=r=="mtos"||r=="tos"?Z:encodeURIComponent(Z));
y=ooQ();wD(y,(r,Z)=>z[r]=encodeURIComponent(Z));
y="//pagead2.googlesyndication.com/pagead/gen_204?"+lL(D3(new rh,z));Zc(y);l.T7=!0}};
ZX=function(l,y,k){z9(Z2,[l],!oK());Es(l,k);k!=4&&Vb(l.sj,k,l.HI);return nr(l,y,oK())};
tD_=function(l,y,k,z){let r;r=Lr(vp,k);r!==null&&r.s7!==y&&(l.A(r),r=null);r||(y=l.Y(k,Date.now()-To,!1,y),vp.C.length==0&&(H2().N=79463069),pC5([y]),r=y,r.V=KU(l),z&&(r.mK=z));return r};
E$=function(l,y,k){l=l.C();if(typeof l==="function"){var z={...(mL!==null&&{v:mL}),sv:"968",cb:eO,e:OKC(y)};const r=nr(k,y,oK());g.Am(z,r);k.Nv[y]=r;z=k.Hj()==2?dyt(z).join("&"):k.p$.Z(z).Z;try{return l(k.s7,z,y),0}catch(Z){return 2}}else return 1};
OKC=function(l){const y=w4(l,"custom_metric_viewable")?"custom_metric_viewable":l;l=HO(SA,k=>k==y);
return AT[l]};
$w=function(l){return{viewability:l.Z,googleViewability:l.C}};
OQ=function(l,y,k={}){l=Qj(qb(tT),y,k,l);return $w(l)};
Qj=function(l,y,k={},z){var r={};g.Am(r,{opt_adElement:void 0,opt_fullscreen:void 0},k);var Z=l.D(y,k);k=Z?Z.p$:l.sj();if(r.opt_bounds)return k.Z(d2("ol",z));if(z!==void 0)if(w2(z)!==void 0)if(YA)l=d2("ue",z);else if(Qm_(l),pU=="i")l=d2("i",z),l["if"]=0;else if(y=l.D(y,r)){b:{pU=="i"&&(y.kM=!0);Z=r.opt_fullscreen;Z!==void 0&&MS(y,!!Z);if(Z=!je().C)(Z=ir(g.Xv(),"CrKey")&&!(ir(g.Xv(),"CrKey")&&ir(g.Xv(),"SmartSpeaker"))||ir(g.Xv(),"PlayStation")||ir(g.Xv(),"Roku")||R1e()||ir(g.Xv(),"Xbox"))||(Z=g.Xv(),
Z=ir(Z,"AppleTV")||ir(Z,"Apple TV")||ir(Z,"CFNetwork")||ir(Z,"tvOS")),Z||(Z=g.Xv(),Z=ir(Z,"sdk_google_atv_x86")||ir(Z,"Android TV")),Z=!Z;Z&&(xU(),Z=t2(FL)===0);var e=Z;if(e){switch(y.Hj()){case 1:T9(y,"pv");break;case 2:l.PG(y)}P0("pv")}Z=z.toLowerCase();if(!e&&(tm(H2().QE,"ssmol")&&Z==="loaded"?0:g.ro(wZC,Z))&&y.I2==0){pU!="i"&&(Z2.done=!1);e=r!==void 0?r.opt_nativeTime:void 0;Jw=e=typeof e==="number"?e:Date.now()-To;y.hB=!0;var A=oK();y.I2=1;y.Lf={};y.Lf.start=!1;y.Lf.firstquartile=!1;y.Lf.midpoint=
!1;y.Lf.thirdquartile=!1;y.Lf.complete=!1;y.Lf.resume=!1;y.Lf.pause=!1;y.Lf.skip=!1;y.Lf.mute=!1;y.Lf.unmute=!1;y.Lf.viewable_impression=!1;y.Lf.measurable_impression=!1;y.Lf.fully_viewable_audible_half_duration_impression=!1;y.Lf.fullscreen=!1;y.Lf.exitfullscreen=!1;y.Gq=0;A||(y.BV().A=e);z9(Z2,[y],!A)}(e=y.IK[Z])&&mu(y.KE,e);tm(H2().QE,"fmd")||g.ro(hT,Z)&&y.zO&&y.zO.C(y,null);let Q;switch(y.Hj()){case 1:Q=w4(Z,"custom_metric_viewable")?l.xz.custom_metric_viewable:l.xz[Z];break;case 2:Q=l.jN[Z]}if(Q&&
(z=Q.call(l,y,r,z),tm(H2().QE,"fmd")&&g.ro(hT,Z)&&y.zO&&y.zO.C(y,null),z!==void 0)){r=d2(void 0,Z);g.Am(r,z);z=r;break b}z=void 0}y.I2==3&&l.A(y);l=z}else l=d2("nf",z);else l=void 0;else YA?l=d2("ue"):Z?(l=d2(),g.Am(l,jA(Z,!0,!1,!1))):l=d2("nf");return typeof l==="string"?k.Z():k.Z(l)};
hJC=function(l,y,k){let z=NS(vp,y);z||(z=IR(l,y,"n",k.opt_nativeTime||-1));return z};
Ge4=function(l,y,k){var z=NS(vp,y);z||(z=k.opt_nativeTime||-1,z=IR(l,y,KU(l),z),k.opt_osdId&&(z.mK=k.opt_osdId));return z};
alQ=function(l,y){let k=NS(vp,y);k||(k=IR(l,y,"h",-1));return k};
iKs=function(l,y,k){k=k.opt_configurable_tracking_events;l.Z!=null&&Array.isArray(k)&&zJ5(l,k,y)};
Uy5=function(l){H2();switch(KU(l)){case "b":return"ytads.bulleit.triggerExternalActivityEvent";case "n":return"ima.bridge.triggerExternalActivityEvent";case "h":case "m":case "ml":return"ima.common.triggerExternalActivityEvent"}return null};
GW=function(l,y){y&&(l.b0=y)};
aV=function(l,...y){y=y.filter(Boolean).join("&");if(!y)return l;const k=l.match(/[?&]adurl=/);return k?l.slice(0,k.index+1)+y+"&"+l.slice(k.index+1):l+(l.indexOf("?")<0?"?":"&")+y};
iA=function(l,y){return y?"&"+l+"="+encodeURIComponent(y):""};
MDz=function(l){l=l.V;if(!l)return"";let y=iA("uap",l.platform)+iA("uapv",l.platformVersion)+iA("uafv",l.uaFullVersion)+iA("uaa",l.architecture)+iA("uam",l.model)+iA("uab",l.bitness);l.fullVersionList&&(y+="&uafvl="+encodeURIComponent(l.fullVersionList.map(k=>encodeURIComponent(k.brand)+";"+encodeURIComponent(k.version)).join("|")));
l.wow64!=null&&(y+="&uaw="+Number(l.wow64));return y.slice(1)};
XZQ=function(l,y,k,z,r){var Z=window,e;k?e="//pagead2.googlesyndication.com/bg/"+Um(k)+".js":e="";k=Z.document;const A={};y&&(A._scs_=y);A._bgu_=e;A._bgp_=z;A._li_="v_h.3.0.0.0";r&&(A._upb_=r);(y=Z.GoogleTyFxhY)&&typeof y.push=="function"||(y=Z.GoogleTyFxhY=[]);y.push(A);y=Dl(k).createElement("SCRIPT");y.type="text/javascript";y.async=!0;l=(0,g.vZ)`//tpc.googlesyndication.com/sodar/${Um(l)+".js"}`;g.$v(y,l);(Z=(Z.GoogleTyFxhYEET||{})[y.src])?Z():k.getElementsByTagName("head")[0].appendChild(y)};
Mi=function(l="bevasrsg"){return new Promise(y=>{if(window===window.top)var k=window;else{try{k=!!window?.top?.location.href&&!1}catch(r){k=!0}k=k?window:window.top}let z=k[l];z?.bevasrs?y(new UQ(z.bevasrs)):(z||(z={nqfbel:[]},k[l]=z),z.nqfbel.push(r=>{y(new UQ(r))}))})};
X9=function(l){const y={c:l.cj,e:l.zq,mc:l.Lr,me:l.ue};l.bQ&&(y.co={c:l.bQ.oQ,a:l.bQ.bL,s:l.bQ.Qa});return y};
cYt=function(l){l.C!==void 0&&(l.N.forEach(y=>{l.C?.removeEventListener(y,l.V)}),l.C=void 0)};
bKe=async function(l){if(!l.qK.wpc)throw new cQ(30,"NWA");if(l.Z)return l.Z;const y=await l.qK.wpc();l.Z=new Ci5(y);return l.Z};
bA=function(l){const y=[];kh(l,CB,6).forEach(k=>{g.$h(k,2)<=53&&y.push(g.$h(k,1))});
return y};
uns=function(l){const y=[];kh(l,CB,6).forEach(k=>{g.$h(k,2)>53&&y.push(g.$h(k,1))});
return y};
uA=function(l){l.then(()=>{},()=>{})};
xw=function(l){return{fieldType:2,fieldName:l}};
g.mg=function(l){return{fieldType:3,fieldName:l}};
xyC=function(l,y){return j6(l,y,qd)};
Yw=function(l){var y=new qi;y=GM(y,1,l.C);var k=my_(l);y=j6(y,k,bRT);k=[];const z=[];for(var r of l.Z.keys())z.push(r.split(","));for(r=0;r<z.length;r++){const w=z[r];var Z=l.N,e=WQ(l,w)||[],A=[];for(var Q=0;Q<e.length;Q++){var t=e[Q],O=t&&t.Z;t=new IV;switch(Z){case 3:O=Number(O);Number.isFinite(O)&&sS(t,1,TW,fo(O));break;case 2:sS(t,2,TW,Co(Number(O)))}A.push(t)}Z=A;for(e=0;e<Z.length;e++){Q=Z[e];A=new Vj;A=rZ(A,IV,2,Q);Q=[];t=qmz(l);for(O=0;O<t.length;O++){var d=t[O];const h=w[O],U=new PQ;switch(d){case 3:sS(U,
1,JT,Hi(String(h)));break;case 2:d=Number(h);Number.isFinite(d)&&sS(U,2,JT,Wi(d));break;case 1:sS(U,3,JT,uj(h==="true"))}Q.push(U)}eq(A,PQ,1,Q);k.push(A)}}eq(y,Vj,4,k);return y};
pB=function(l){if(!l)return"";if(/^about:(?:blank|srcdoc)$/.test(l))return window.origin||"";l.indexOf("blob:")===0&&(l=l.substring(5));l=l.split("#")[0].split("?")[0];l=l.toLowerCase();l.indexOf("//")==0&&(l=window.location.protocol+l);/^[\w\-]*:\/\//.test(l)||(l=window.location.href);var y=l.substring(l.indexOf("://")+3),k=y.indexOf("/");k!=-1&&(y=y.substring(0,k));k=l.substring(0,l.indexOf("://"));if(!k)throw Error("URI is missing protocol: "+l);if(k!=="http"&&k!=="https"&&k!=="chrome-extension"&&
k!=="moz-extension"&&k!=="file"&&k!=="android-app"&&k!=="chrome-search"&&k!=="chrome-untrusted"&&k!=="chrome"&&k!=="app"&&k!=="devtools")throw Error("Invalid URI scheme in origin: "+k);l="";var z=y.indexOf(":");if(z!=-1){var r=y.substring(z+1);y=y.substring(0,z);if(k==="http"&&r!=="80"||k==="https"&&r!=="443")l=":"+r}return k+"://"+y+l};
W4s=function(){function l(){r[0]=1732584193;r[1]=4023233417;r[2]=2562383102;r[3]=271733878;r[4]=3285377520;O=t=0}
function y(d){for(var w=e,h=0;h<64;h+=4)w[h/4]=d[h]<<24|d[h+1]<<16|d[h+2]<<8|d[h+3];for(h=16;h<80;h++)d=w[h-3]^w[h-8]^w[h-14]^w[h-16],w[h]=(d<<1|d>>>31)&4294967295;d=r[0];var U=r[1],u=r[2],W=r[3],V=r[4];for(h=0;h<80;h++){if(h<40)if(h<20){var T=W^U&(u^W);var J=1518500249}else T=U^u^W,J=1859775393;else h<60?(T=U&u|W&(U|u),J=2400959708):(T=U^u^W,J=3395469782);T=((d<<5|d>>>27)&4294967295)+T+V+J+w[h]&4294967295;V=W;W=u;u=(U<<30|U>>>2)&4294967295;U=d;d=T}r[0]=r[0]+d&4294967295;r[1]=r[1]+U&4294967295;r[2]=
r[2]+u&4294967295;r[3]=r[3]+W&4294967295;r[4]=r[4]+V&4294967295}
function k(d,w){if(typeof d==="string"){d=unescape(encodeURIComponent(d));for(var h=[],U=0,u=d.length;U<u;++U)h.push(d.charCodeAt(U));d=h}w||(w=d.length);h=0;if(t==0)for(;h+64<w;)y(d.slice(h,h+64)),h+=64,O+=64;for(;h<w;)if(Z[t++]=d[h++],O++,t==64)for(t=0,y(Z);h+64<w;)y(d.slice(h,h+64)),h+=64,O+=64}
function z(){var d=[],w=O*8;t<56?k(A,56-t):k(A,64-(t-56));for(var h=63;h>=56;h--)Z[h]=w&255,w>>>=8;y(Z);for(h=w=0;h<5;h++)for(var U=24;U>=0;U-=8)d[w++]=r[h]>>U&255;return d}
for(var r=[],Z=[],e=[],A=[128],Q=1;Q<64;++Q)A[Q]=0;var t,O;l();return{reset:l,update:k,digest:z,dB:function(){for(var d=z(),w="",h=0;h<d.length;h++)w+="0123456789ABCDEF".charAt(Math.floor(d[h]/16))+"0123456789ABCDEF".charAt(d[h]%16);return w}}};
KB=function(l,y,k){var z=String(g.aC.location.href);return z&&l&&y?[y,Ilz(pB(z),l,k||null)].join(" "):null};
Ilz=function(l,y,k){var z=[];let r=[];if((Array.isArray(k)?2:1)==1)return r=[y,l],g.Fy(z,function(A){r.push(A)}),g2(r.join(" "));
const Z=[],e=[];g.Fy(k,function(A){e.push(A.key);Z.push(A.value)});
k=Math.floor((new Date).getTime()/1E3);r=Z.length==0?[k,y,l]:[Z.join(":"),k,y,l];g.Fy(z,function(A){r.push(A)});
l=g2(r.join(" "));l=[k,l];e.length==0||l.push(e.join(""));return l.join("_")};
g2=function(l){const y=W4s();y.update(l);return y.dB().toLowerCase()};
EQ=function(l){this.Z=l||{cookie:""}};
fB=function(l){l=(l.Z.cookie||"").split(";");const y=[],k=[];let z,r;for(let Z=0;Z<l.length;Z++)r=l[Z].trim(),z=r.indexOf("="),z==-1?(y.push(""),k.push(r)):(y.push(r.substring(0,z)),k.push(r.substring(z+1)));return{keys:y,values:k}};
jO=function(){var l=g.aC.__SAPISID||g.aC.__APISID||g.aC.__3PSAPISID||g.aC.__1PSAPISID||g.aC.__OVERRIDE_SID;if(l)return!0;typeof document!=="undefined"&&(l=new EQ(document),l=l.get("SAPISID")||l.get("APISID")||l.get("__Secure-3PAPISID")||l.get("__Secure-1PAPISID"));return!!l};
SO=function(l,y,k,z){(l=g.aC[l])||typeof document==="undefined"||(l=(new EQ(document)).get(y));return l?KB(l,k,z):null};
nB=function(l){var y=pB(g.aC?.location.href);const k=[];if(jO()){y=y.indexOf("https:")==0||y.indexOf("chrome-extension:")==0||y.indexOf("chrome-untrusted://new-tab-page")==0||y.indexOf("moz-extension:")==0;var z,r=(z=y)?g.aC.__SAPISID:g.aC.__APISID;r||typeof document==="undefined"||(r=new EQ(document),r=r.get(z?"SAPISID":"APISID")||r.get("__Secure-3PAPISID"));(z=r?KB(r,z?"SAPISIDHASH":"APISIDHASH",l):null)&&k.push(z);y&&((y=SO("__1PSAPISID","__Secure-1PAPISID","SAPISID1PHASH",l))&&k.push(y),(l=SO("__3PSAPISID",
"__Secure-3PAPISID","SAPISID3PHASH",l))&&k.push(l))}return k.length==0?null:k.join(" ")};
TfC=function(l){eq(F9,oV,1,l)};
VD_=function(l,y=Ni){if(!sQ){l=l.navigator?.userAgentData;if(!l||typeof l.getHighEntropyValues!=="function"||l.brands&&typeof l.brands.map!=="function")return Promise.reject(Error("UACH unavailable"));TfC((l.brands||[]).map(z=>{var r=new oV;r=GM(r,1,z.brand);return GM(r,2,z.version)}));
typeof l.mobile==="boolean"&&Wh(F9,2,uj(l.mobile));sQ=l.getHighEntropyValues(y)}const k=new Set(y);return sQ.then(z=>{const r=F9.clone();k.has("platform")&&GM(r,3,z.platform);k.has("platformVersion")&&GM(r,4,z.platformVersion);k.has("architecture")&&GM(r,5,z.architecture);k.has("model")&&GM(r,6,z.model);k.has("uaFullVersion")&&GM(r,7,z.uaFullVersion);return r.jb()}).catch(()=>F9.jb())};
LB=function(l){return iW(l,1,1)};
RV=function(l,y){rZ(l.Z,vQ,1,y);OO(y,1)||LB(y);l.OR||(y=BQ(l),tF(y,5)||GM(y,5,l.locale));l.uach&&(y=BQ(l),DD(y,HQ,9)||rZ(y,HQ,9,l.uach))};
BQ=function(l){var y=DD(l.Z,vQ,1);y||(y=new vQ,RV(l,y));l=y;y=DD(l,DX,11);y||(y=new DX,rZ(l,DX,11,y));return y};
Pig=function(l,y){l.C=y};
YmC=function(l){const y=l.OR?void 0:Oq();y?VD_(y,Ni).then(k=>{l.uach=JY5(k??"[]");k=BQ(l);rZ(k,HQ,9,l.uach);return!0}).catch(()=>!1):Promise.resolve(!1)};
g.lD=function(l,y,k,z){this.V=l;this.J=y;this.Z=this.N=l;this.S=k||0;this.K=z||2};
g.yv=function(l){l.Z=Math.min(l.J,l.Z*l.K);l.N=Math.min(l.J,l.Z+(l.S?Math.round(l.S*(Math.random()-.5)*2*l.Z):0));l.C++};
kc=function(){return"https://play.google.com/log?format=json&hasfast=true"};
pZT=function(l,y){if(!l.HG)return()=>{};
const k=()=>{l.flush()};
return y?()=>{y().then(k)}:k};
rs=function(l,y){const k=new g.zq(y);(y=k.get("req_id"))&&l.set("req_id",y);g.fR(l.Z,(z,r)=>{k["set"](r,null)});
return k};
ZL=function(l){l.N.isFinal=!0;l.flush();l.N.isFinal=!1};
eK=function(l){l.A||(l.A=kc());try{return(new URL(l.A)).toString()}catch(y){return(new URL(l.A,Oq().location.origin)).toString()}};
gvT=function(l){K45(l,(y,k)=>{y=new URL(y);y.searchParams.set("format","json");let z=!1;try{z=Oq().navigator.sendBeacon(y.toString(),k.jb())}catch{}z||(l.D=!1);return z})};
EvC=function(l,y,k=null,z=l.withCredentials){const r={},Z=new URL(eK(l));k&&(r.Authorization=k);l.sessionIndex&&(r["X-Goog-AuthUser"]=l.sessionIndex,Z.searchParams.set("authuser",l.sessionIndex));l.pageId&&(Object.defineProperty(r,"X-Goog-PageId",{value:l.pageId}),Z.searchParams.set("pageId",l.pageId));return{url:Z.toString(),body:y,QU:1,requestHeaders:r,requestType:"POST",withCredentials:z,timeoutMillis:l.timeoutMillis}};
K45=function(l,y){if(l.Z.length!==0){var k=new URL(eK(l));k.searchParams.delete("format");var z=l.X8();z&&k.searchParams.set("auth",z);k.searchParams.set("authuser",l.sessionIndex||"0");for(z=0;z<10&&l.Z.length;++z){const r=l.Z.slice(0,32),Z=l.N.build(r,l.V,l.S,l.GS,l.Y,l.C_);if(!y(k.toString(),Z)){++l.S;break}l.V=0;l.S=0;l.Y=0;l.C_=0;l.Z=l.Z.slice(r.length)}l.C.enabled&&l.C.stop()}};
flz=function(l,y){l.buildLabel=y;return l};
Sm_=function(l){l.network=new jmy;return l};
nv4=function(l,y){l.Z=y};
F45=function(l){l.C=!0;return l};
qmz=function(l){return l.fields.map(y=>y.fieldType)};
WQ=function(l,...y){y=AM(y);return l.Z.has(y)?l.Z.get(y):void 0};
my_=function(l){return l.fields.map(y=>y.fieldName)};
AM=function(...l){return l?l.join(","):"key"};
g.$c=function(l,y){this.type=l;this.currentTarget=this.target=y;this.defaultPrevented=this.C=!1};
Qv=function(l,y){g.$c.call(this,l?l.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=0;this.key="";this.charCode=this.keyCode=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.state=null;this.pointerId=0;this.pointerType="";this.Z=null;l&&this.init(l,y)};
Oi=function(l){return!(!l||!l[tM])};
Nf5=function(l,y,k,z,r){this.listener=l;this.proxy=null;this.src=y;this.type=k;this.capture=!!z;this.handler=r;this.key=++ovC;this.removed=this.Mn=!1};
ds=function(l){l.removed=!0;l.listener=null;l.proxy=null;l.src=null;l.handler=null};
ws=function(l){this.src=l;this.listeners={};this.Z=0};
g.hM=function(l,y){const k=y.type;k in l.listeners&&g.Ap(l.listeners[k],y)&&(ds(y),l.listeners[k].length==0&&(delete l.listeners[k],l.Z--))};
Gq=function(l,y,k,z){for(let r=0;r<l.length;++r){const Z=l[r];if(!Z.removed&&Z.listener==y&&Z.capture==!!k&&Z.handler==z)return r}return-1};
g.iD=function(l,y,k,z,r){if(z&&z.once)return a4(l,y,k,z,r);if(Array.isArray(y)){for(let Z=0;Z<y.length;Z++)g.iD(l,y[Z],k,z,r);return null}k=Ui(k);return Oi(l)?l.listen(y,k,g.uQ(z)?!!z.capture:!!z,r):M0(l,y,k,!1,z,r)};
VL=function(l,y,k,z,r){var Z=y^l;if((l&42)==l){var e=k[G[Z^1805]](G[Z^1814]),A=0;e[0]||A++;const t={};for(;A<e[G[2]];A+=2)e[A]&&qt(Z^1798,Z^1481,t,e[A],e[A+1]);var Q=t}if(!((l^58)>>4))for(k=(k%z[G[2]]+z[G[2]])%z[G[2]];k--;)z[G[Z^8333]](z[G[Z^8358]]());l-7>>3==1&&(e=k[z],A=e[G[Z^2372]](G[Z^2416]),A>0?qt(Z^2373,Z^2954,r,e[G[Z^2376]](0,A),e[G[Z^2376]](A+1)):e&&(r[e]=G[3]),Q=[]);return Q};
M0=function(l,y,k,z,r,Z){if(!y)throw Error("Invalid event type");const e=g.uQ(r)?!!r.capture:!!r;let A=XS(l);A||(l[cd]=A=new ws(l));k=A.add(y,k,z,e,Z);if(k.proxy)return k;z=smQ();k.proxy=z;z.src=l;z.listener=k;if(l.addEventListener)r===void 0&&(r=!1),l.addEventListener(y.toString(),z,r);else if(l.attachEvent)l.attachEvent(C6(y.toString()),z);else if(l.addListener&&l.removeListener)l.addListener(z);else throw Error("addEventListener and attachEvent are unavailable.");bD++;return k};
smQ=function(){function l(k){return y.call(l.src,l.listener,k)}
const y=L4e;return l};
a4=function(l,y,k,z,r){if(Array.isArray(y)){for(let Z=0;Z<y.length;Z++)a4(l,y[Z],k,z,r);return null}k=Ui(k);return Oi(l)?l.Pt(y,k,g.uQ(z)?!!z.capture:!!z,r):M0(l,y,k,!0,z,r)};
uD=function(l,y,k,z,r){if(Array.isArray(y))for(let Z=0;Z<y.length;Z++)uD(l,y[Z],k,z,r);else z=g.uQ(z)?!!z.capture:!!z,k=Ui(k),Oi(l)?l.uq(y,k,z,r):l&&(l=XS(l))&&(y=l.nU(y,k,z,r))&&xc(y)};
xc=function(l){if(typeof l!=="number"&&l&&!l.removed){var y=l.src;if(Oi(y))g.hM(y.cz,l);else{var k=l.type,z=l.proxy;y.removeEventListener?y.removeEventListener(k,z,l.capture):y.detachEvent?y.detachEvent(C6(k),z):y.addListener&&y.removeListener&&y.removeListener(z);bD--;(k=XS(y))?(g.hM(k,l),k.Z==0&&(k.src=null,y[cd]=null)):ds(l)}}};
C6=function(l){return l in mO?mO[l]:mO[l]="on"+l};
L4e=function(l,y){if(l.removed)l=!0;else{y=new Qv(y,this);const k=l.listener,z=l.handler||l.src;l.Mn&&xc(l);l=k.call(z,y)}return l};
XS=function(l){l=l[cd];return l instanceof ws?l:null};
Ui=function(l){if(typeof l==="function")return l;l[q0]||(l[q0]=function(y){return l.handleEvent(y)});
return l[q0]};
g.Wd=function(){g.zP.call(this);this.cz=new ws(this);this.WN=this;this.QZ=null};
I4=function(l,y,k,z){y=l.cz.listeners[String(y)];if(!y)return!0;y=y.concat();let r=!0;for(let Z=0;Z<y.length;++Z){const e=y[Z];if(e&&!e.removed&&e.capture==k){const A=e.listener,Q=e.handler||e.src;e.Mn&&g.hM(l.cz,e);r=A.call(Q,z)!==!1&&r}}return r&&!z.defaultPrevented};
Pd=function(l){l=Tq(l);Vv||(Vv=vv5());Vv(l)};
vv5=function(){if(typeof MessageChannel!=="undefined"){const l=new MessageChannel;let y={},k=y;l.port1.onmessage=function(){if(y.next!==void 0){y=y.next;const z=y.nC;y.nC=null;z()}};
return function(z){k.next={nC:z};k=k.next;l.port2.postMessage(0)}}return function(l){g.aC.setTimeout(l,0)}};
Bf4=function(){let l;for(;l=JM.remove();){try{l.Z.call(l.scope)}catch(y){Tn(y)}Yc.put(l)}p6=!1};
g.gs=function(l){this.Z=0;this.K=void 0;this.V=this.C=this.N=null;this.J=this.S=!1;if(l!=g.Vq)try{const y=this;l.call(void 0,function(k){K6(y,2,k)},function(k){K6(y,3,k)})}catch(y){K6(this,3,y)}};
Ei=function(){this.next=this.context=this.C=this.N=this.Z=null;this.V=!1};
jK=function(l,y,k){const z=f6.get();z.N=l;z.C=y;z.context=k;return z};
g.SK=function(l){if(l instanceof g.gs)return l;const y=new g.gs(g.Vq);K6(y,2,l);return y};
n6=function(l){return new g.gs(function(y,k){k(l)})};
g.N0=function(l,y,k){FS(l,y,k,null)||g.o4(g.IC(y,l))};
HK5=function(l){return new g.gs(function(y,k){l.length||y(void 0);let z;for(let r=0;r<l.length;r++)z=l[r],g.N0(z,y,k)})};
L6=function(l,y,k,z){si(l,jK(y||g.Vq,k||null,z))};
g.vd=function(l,y){y=Tq(y);y=jK(y,y);y.V=!0;si(l,y);return l};
Bd=function(l,y){if(l.Z==0)if(l.N){var k=l.N;if(k.C){var z=0,r=null,Z=null;for(let e=k.C;e&&(e.V||(z++,e.Z==l&&(r=e),!(r&&z>1)));e=e.next)r||(Z=e);r&&(k.Z==0&&z==1?Bd(k,y):(Z?(z=Z,z.next==k.V&&(k.V=z),z.next=z.next.next):Hd(k),R4(k,r,3,y)))}l.N=null}else K6(l,3,y)};
si=function(l,y){l.C||l.Z!=2&&l.Z!=3||DL(l);l.V?l.V.next=y:l.C=y;l.V=y};
yc=function(l,y,k,z){const r=jK(null,null,null);r.Z=new g.gs(function(Z,e){r.N=y?function(A){try{const Q=y.call(z,A);Z(Q)}catch(Q){e(Q)}}:Z;
r.C=k?function(A){try{const Q=k.call(z,A);Q===void 0&&A instanceof ln?e(A):Z(Q)}catch(Q){e(Q)}}:e});
r.Z.N=l;si(l,r);return r.Z};
K6=function(l,y,k){l.Z==0&&(l===k&&(y=3,k=new TypeError("Promise cannot resolve to itself")),l.Z=1,FS(k,l.FY,l.OY,l)||(l.K=k,l.Z=y,l.N=null,DL(l),y!=3||k instanceof ln||RJC(l,k)))};
FS=function(l,y,k,z){if(l instanceof g.gs)return L6(l,y,k,z),!0;if(l)try{var r=!!l.$goog_Thenable}catch(Z){r=!1}else r=!1;if(r)return l.then(y,k,z),!0;if(g.uQ(l))try{const Z=l.then;if(typeof Z==="function")return Dy5(l,Z,y,k,z),!0}catch(Z){return k.call(z,Z),!0}return!1};
Dy5=function(l,y,k,z,r){function Z(Q){A||(A=!0,z.call(r,Q))}
function e(Q){A||(A=!0,k.call(r,Q))}
let A=!1;try{y.call(l,e,Z)}catch(Q){Z(Q)}};
DL=function(l){l.S||(l.S=!0,g.o4(l.UC,l))};
Hd=function(l){let y=null;l.C&&(y=l.C,l.C=y.next,y.next=null);l.C||(l.V=null);return y};
R4=function(l,y,k,z){if(k==3&&y.C&&!y.V)for(;l&&l.J;l=l.N)l.J=!1;if(y.Z)y.Z.N=null,kJ(y,k,z);else try{y.V?y.N.call(y.context):kJ(y,k,z)}catch(r){z8.call(null,r)}f6.put(y)};
kJ=function(l,y,k){y==2?l.N.call(l.context,k):l.C&&l.C.call(l.context,k)};
RJC=function(l,y){l.J=!0;g.o4(function(){l.J&&z8.call(null,y)})};
ln=function(l){ET.call(this,l)};
g.rm=function(l,y){g.Wd.call(this);this.h6=l||1;this.Iq=y||g.aC;this.uL=(0,g.We)(this.gm,this);this.x6=g.T5()};
g.ZZ=function(l,y,k){if(typeof l==="function")k&&(l=(0,g.We)(l,k));else if(l&&typeof l.handleEvent=="function")l=(0,g.We)(l.handleEvent,l);else throw Error("Invalid listener argument");return Number(y)>2147483647?-1:g.aC.setTimeout(l,y||0)};
e9=function(l,y){let k=null;return(new g.gs(function(z,r){k=g.ZZ(function(){z(y)},l);
k==-1&&r(Error("Failed to schedule timer."))})).Ya(function(z){g.aC.clearTimeout(k);
throw z;})};
t9=function(l,y,...k){l.C.has(y)||l.C.set(y,new Qc(y,k))};
g.dm=function(l,y,...k){l.C.has(y)||l.C.set(y,new OW(y,k))};
g.h9=function(l,y,...k){g.wm(l,y,1,k)};
G8=function(l){l.Z.enabled||l.Z.start();l.J++;l.J>=l.N&&l.V()};
ljy=function(l){for(let y=0;y<l.length;y++)l[y].clear()};
a7=function(l,y){return l.K.has(y)?void 0:l.C.get(y)};
g.wm=function(l,y,k,...z){if((y=a7(l,y))&&y instanceof OW){z=[z];let Z=0;var r;(r=(r=WQ(y,[z]))&&r.length?r[0]:void 0)&&(Z=r.Z);y.Z.set(AM([z]),[new UW(Z+k)]);G8(l)}};
Mm=function(l){switch(l){case 200:return 0;case 400:return 3;case 401:return 16;case 403:return 7;case 404:return 5;case 409:return 10;case 412:return 9;case 429:return 8;case 499:return 1;case 500:return 2;case 501:return 12;case 503:return 14;case 504:return 4;default:return 2}};
yVC=function(l){switch(l){case 0:return"OK";case 1:return"CANCELLED";case 2:return"UNKNOWN";case 3:return"INVALID_ARGUMENT";case 4:return"DEADLINE_EXCEEDED";case 5:return"NOT_FOUND";case 6:return"ALREADY_EXISTS";case 7:return"PERMISSION_DENIED";case 16:return"UNAUTHENTICATED";case 8:return"RESOURCE_EXHAUSTED";case 9:return"FAILED_PRECONDITION";case 10:return"ABORTED";case 11:return"OUT_OF_RANGE";case 12:return"UNIMPLEMENTED";case 13:return"INTERNAL";case 14:return"UNAVAILABLE";case 15:return"DATA_LOSS";
default:return""}};
g.cU=function(l){return(new XZ).jb(l)};
XZ=function(){};
CS=function(l,y,k){if(y==null)k.push("null");else{if(typeof y=="object"){if(Array.isArray(y)){var z=y;y=z.length;k.push("[");var r="";for(var Z=0;Z<y;Z++)k.push(r),CS(l,z[Z],k),r=",";k.push("]");return}if(y instanceof String||y instanceof Number||y instanceof Boolean)y=y.valueOf();else{k.push("{");r="";for(z in y)Object.prototype.hasOwnProperty.call(y,z)&&(Z=y[z],typeof Z!="function"&&(k.push(r),bn(z,k),k.push(":"),CS(l,Z,k),r=","));k.push("}");return}}switch(typeof y){case "string":bn(y,k);break;
case "number":k.push(isFinite(y)&&!isNaN(y)?String(y):"null");break;case "boolean":k.push(String(y));break;case "function":k.push("null");break;default:throw Error("Unknown type: "+typeof y);}}};
bn=function(l,y){y.push('"',l.replace(kfT,function(k){let z=un[k];z||(z="\\u"+(k.charCodeAt(0)|65536).toString(16).slice(1),un[k]=z);return z}),'"')};
zA4=function(l){switch(l){case 0:return"No Error";case 1:return"Access denied to content document";case 2:return"File not found";case 3:return"Firefox silently errored";case 4:return"Application custom error";case 5:return"An exception occurred";case 6:return"Http response at 400 or 500 level";case 7:return"Request was aborted";case 8:return"Request timed out";case 9:return"The resource is not available offline";default:return"Unrecognized error code"}};
xJ=function(){};
m5=function(){};
g.qm=function(l){g.Wd.call(this);this.headers=new Map;this.Ja=l||null;this.N=!1;this.Z=null;this.A="";this.C=0;this.V="";this.J=this.b0=this.D=this.Y=!1;this.C_=0;this.S=null;this.sj="";this.K=!1};
rVT=function(l,y,k,z,r,Z,e){const A=new g.qm;WU.push(A);y&&A.listen("complete",y);A.Pt("ready",A.Pg);Z&&(A.C_=Math.max(0,Z));e&&(A.K=e);A.send(l,k,z,r)};
Vc=function(l,y){l.N=!1;l.Z&&(l.J=!0,l.Z.abort(),l.J=!1);l.V=y;l.C=5;I7(l);T8(l)};
I7=function(l){l.Y||(l.Y=!0,l.dispatchEvent("complete"),l.dispatchEvent("error"))};
pS=function(l){if(l.N&&typeof PU!="undefined")if(l.D&&g.J9(l)==4)setTimeout(l.Gb.bind(l),0);else if(l.dispatchEvent("readystatechange"),l.isComplete()){l.getStatus();l.N=!1;try{if(YJ(l))l.dispatchEvent("complete"),l.dispatchEvent("success");else{l.C=6;try{var y=g.J9(l)>2?l.Z.statusText:""}catch(k){y=""}l.V=y+" ["+l.getStatus()+"]";I7(l)}}finally{T8(l)}}};
T8=function(l,y){if(l.Z){l.S&&(clearTimeout(l.S),l.S=null);const k=l.Z;l.Z=null;y||l.dispatchEvent("ready");try{k.onreadystatechange=null}catch(z){}}};
YJ=function(l){var y=l.getStatus();a:switch(y){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var k=!0;break a;default:k=!1}if(!k){if(y=y===0)l=g.ee(String(l.A))[1]||null,!l&&g.aC.self&&g.aC.self.location&&(l=g.aC.self.location.protocol.slice(0,-1)),y=!Z9P.test(l?l.toLowerCase():"");k=y}return k};
g.J9=function(l){return l.Z?l.Z.readyState:0};
g.KS=function(l){try{return l.Z?l.Z.responseText:""}catch(y){return""}};
g.gm=function(l){try{if(!l.Z)return null;if("response"in l.Z)return l.Z.response;switch(l.sj){case "":case "text":return l.Z.responseText;case "arraybuffer":if("mozResponseArrayBuffer"in l.Z)return l.Z.mozResponseArrayBuffer}return null}catch(y){return null}};
g.EW=function(l){const y={};l=(l.Z&&g.J9(l)>=2?l.Z.getAllResponseHeaders()||"":"").split("\r\n");for(let z=0;z<l.length;z++){if(g.G0(l[z]))continue;var k=g4z(l[z]);const r=k[0];k=k[1];if(typeof k!=="string")continue;k=k.trim();const Z=y[r]||[];y[r]=Z;Z.push(k)}return Sf(y,function(z){return z.join(", ")})};
g.fS=function(l,y){return l.Z?l.Z.getResponseHeader(y):null};
S9=function(l,y,k){const z=j9();y=y();l.N(k,j9()-z);return y};
$je=function(l,y,k,z){l=F45(Sm_(flz(new nS,l))).kZ();y.length&&nv4(l,xyC(new eAe,y));z!==void 0&&(l.BO=z);const r=new AV5(l.build());g.x(r,l);const Z=new FZ({flush(e){try{r.flush(e)}catch(A){k(A)}}});Z.addOnDisposeCallback(()=>{setTimeout(()=>{try{Z.V()}finally{r.dispose()}})});
Z.N=1E5;Z.flushInterval=3E4;Z.Z.setInterval(3E4);return Z};
Qps=function(l){if(l.timer===void 0){const y=Math.max(0,l.Z+l.C-j9());l.timer=setTimeout(()=>{try{l.callback()}finally{l.Z=j9(),l.timer=void 0}},y)}};
O9z=function(l,y=[]){return new tUy(l,y)};
j9=function(){return globalThis.performance?.now?.()??Date.now()};
Nm=function(l,y){if(l.disable)return new o7;y=y?bA(y):[];return O9z({qL:l.qL,Wv:l.L0,eM:l.Jm,BO:l.BO,FV:l.FV,XD:l.XD},y)};
djq=function(l){if(!l)return null;l=wZ(l,4);return l===null||l===void 0?null:jR(l)};
LS=function(){sW.instance||(sW.instance=new sW);return sW.instance};
wf4=function(l,y,k,z){if(!y&&!k)return Promise.resolve();if(!z)return vU(y,k);let r;(r=l.C)[z]||(r[z]=new Promise((Z,e)=>{vU(y,k).then(()=>{l.Z=z;Z()},A=>{delete l.C[z];
e(A)})}));
return l.C[z]};
R7=function(l,y){return wf4(l,DD(y,BU,1,Ao),DD(y,HU,2,Ao),tF(y,3,void 0,Ao))};
vU=function(l,y){return y?hAt(y):l?Gfs(l):Promise.resolve()};
hAt=function(l){return new Promise((y,k)=>{const z=g.Gf("SCRIPT"),r=djq(l);g.$v(z,r);z.onload=()=>{g.XI(z);y()};
z.onerror=()=>{g.XI(z);k(Error("EWLS"))};
(g.yq("HEAD")[0]||document.documentElement).appendChild(z)})};
Gfs=function(l){return new Promise(y=>{const k=g.Gf("SCRIPT");if(l){var z=wZ(l,6);z=z===null||z===void 0?null:Zl(z)}else z=null;k.textContent=eD(z);AY(k);(g.yq("HEAD")[0]||document.documentElement).appendChild(k);g.XI(k);y()})};
aj_=function(l,y){return ak(l,1,y)};
i9Q=function(l,y){return ak(l,2,y)};
UjT=function(l,y){return ak(l,3,y)};
y0=async function(l,y,k,z,r){y=UjT(i9Q(aj_(new DZ,l.requestKey),y),k);k=l.Z();l=await z.J("c",l.requestKey,r,l.client.create(y,k));const Z=BG(fZ(l,2));if(Z.length)return S9(z,()=>{var e=new Uint8Array(Z.length);for(var A=0;A<Z.length;A++)e[A]=Z[A]+97;if(g.aC.TextDecoder)e=(new TextDecoder).decode(e);else if(e.length<=8192)e=String.fromCharCode.apply(null,e);else{A="";for(let Q=0;Q<e.length;Q+=8192)A+=String.fromCharCode.apply(null,Array.prototype.slice.call(e,Q,Q+8192));e=A}return MUt(e)},"U");
z=DD(l,lJ,1);if(!z)throw Error("Missing field");return z};
r3=async function(l,y,k,z){var r=l.Z();var Z=new kC;Z=ak(Z,1,l.requestKey);var e=ak(Z,2,y);y=k.J;Z=l.requestKey;l=l.client;r=zw(l.Z,l.C+"/$rpc/google.internal.waa.v1.Waa/GenerateIT",e,r||{},XfP);return y.call(k,"g",Z,z,r)};
cVq=function(l,y,k,z,r){return l instanceof ZW?y0(l,z,r,y,k):y0(l,z,r,new o7,0)};
uIy=async function(l,y,k,z=LS(),r=Promise.resolve(void 0),Z){await 0;let e;for(;;){let A=null;if(e){eo(l,7);try{A=await An(e.snapshot({}),Z.gB,()=>Promise.resolve("E:CTO"))}catch(O){A="E:UCE"}}let Q;
const t=new g.lD(e?Z.oB:Z.Qe,Z.rO,Z.H2,Z.qw);for(let O=1;O<=Z.maxAttempts;O++){if(O!==1){eo(l,0);l.Z=new $C(t.getValue(),Z.AQ,Z.g3);const d=await l.Z.promise;l.Z=void 0;d===1?(O=1,t.reset()):g.yv(t)}try{let d;k?d=k:(eo(l,5),d=await An(cVq(y,l.logger,O,z.Z,A),Z.SF,()=>Promise.reject(Error("RGF:Fetch timed out"))));
eo(l,3);await An(R7(z,d),Z.Gh,()=>Promise.reject(Error("DTZ:Script timed out")));
eo(l,8);await r;const w=new Q0({challenge:d,PE:l.options.PE,CF:l.options.CF});await An(w.Y4,Z.sY,()=>Promise.reject(Error("QEG:Setup timed out")));
Q=w;break}catch(d){l.handleError(d),tn(l)}}if(l.IR())break;Q&&(k=void 0,C4T(l,e),e=Q,b94(l,Q),tn(l));eo(l,2);l.Z=new $C(Z.fN,Z.AQ,Z.g3);l.isPaused&&l.Z.pause();await l.Z.promise;l.Z=void 0;if(l.IR())break}e?.dispose()};
xjz=function(l){l.K=Error("Cancelled by dispose");l.J.resolve();uA(l.S.promise);l.S.reject(Error("Cancelled by dispose"));l.logger.dispose();Promise.all(l.V).then(async()=>{l.N?.dispose();l.N=void 0});
l.V=[];l.Z?.C();uA(l.C.promise);l.C.reject(Error("Cancelled by dispose"))};
mjC=async function(l){if(l.IR())throw Error("Already disposed");l.Z?.C();await l.C.promise};
qqe=function(l,y){const k=l.Dv;l.Dv=()=>{k();y()}};
b94=function(l,y){l.IR()||(l.N=y,l.logger.update(y.Pk()),l.J.resolve(),l.S.resolve(void 0),l.Dv())};
C4T=function(l,y){y&&(Promise.all(l.V).then(()=>void y.dispose()),l.V=[])};
eo=function(l,y){l.A=y;l.options.yCr?.(y)};
tn=function(l){l.IR()||(l.C.resolve(),l.C=new g.OX)};
An=function(l,y,k){let z;const r=new Promise(Z=>{z=setTimeout(Z,y)});
return Promise.race([l.finally(()=>void clearTimeout(z)),
r.then(k)])};
WMe=function(l,y){l.endTimeMs=Date.now()+y;l.tick()};
d3=function(l){l.Z&&(clearTimeout(l.Z),l.Z=null)};
w3=function(l,y){try{return globalThis.sessionStorage.setItem(l,y),!0}catch(k){return!1}};
hn=function(l,y=0,k=l.length,z){let r=0;for(z&&(r=hn(z));y<k;y++)r=Ij5(31,r)+(typeof l==="string"?l.charCodeAt(y):l[y])|0;return r};
aj=function(l){const [y,k]=[hn(l,0,l.length>>1,Gw),hn(l,l.length>>1)];return y.toString(16)+k.toString(16)};
iJ=function(l,y){var k=[hn(y,0,y.length>>1,void 0),hn(y,y.length>>1)];l=new Uint32Array(l.buffer);y=l[0];const [z,r]=k;for(k=1;k<l.length;k+=2){var Z=y,e=k,A=z,Q=r;for(let t=0;t<22;t++)e=e>>>8|e<<24,e+=Z|0,e^=A+38293,Z=Z<<3|Z>>>29,Z^=e,Q=Q>>>8|Q<<24,Q+=A|0,Q^=t+38293,A=A<<3|A>>>29,A^=Q;Z=[Z,e];l[k]^=Z[0];k+1<l.length&&(l[k+1]^=Z[1])}};
Tt5=function(l,y,k,z,r){const Z=(4-(Gw.length+k.length)%4)%4,e=new Uint8Array(4+Z+Gw.length+4+k.length),A=new DataView(e.buffer);let Q=0;A.setUint32(Q,Math.random()*4294967295);Q=Q+4+Z;e.set(Gw,Q);Q+=Gw.length;A.setUint32(Q,r);e.set(k,Q+4);iJ(e,z);return l.mV(y,t=>void globalThis.sessionStorage.removeItem(t))?w3(y,g.px(e))?"s":"t":"i"};
VUP=function(l,y){var k=globalThis.sessionStorage.getItem(l);if(!k)return["m"];let z;try{z=fx(k),iJ(z,y)}catch(r){return globalThis.sessionStorage.removeItem(l),["c"]}for(y=4;y<7&&z[y]===0;)y++;for(k=0;k<Gw.length;k++)if(z[y++]!==Gw[k])return globalThis.sessionStorage.removeItem(l),["d"];k=(new DataView(z.buffer)).getUint32(y);return Math.floor(Date.now()/1E3)>=k?(globalThis.sessionStorage.removeItem(l),["e"]):["a",new Uint8Array(z.buffer,y+4)]};
P4_=function(l){var y=globalThis.sessionStorage.getItem("iU5q-!O9@$");if(!y)return new UX(l);var k=y.split(",");if(k.length<2)return globalThis.sessionStorage.removeItem("iU5q-!O9@$"),new UX(l);y=k.slice(1);y.length===1&&y[0]===""&&(y=[]);k=Number(k[0]);return isNaN(k)||k<0||k>y.length?(globalThis.sessionStorage.removeItem("iU5q-!O9@$"),new UX(l)):new UX(l,k,y)};
pfC=function(l){function y(){k-=z;k-=r;k^=r>>>13;z-=r;z-=k;z^=k<<8;r-=k;r-=z;r^=z>>>13;k-=z;k-=r;k^=r>>>12;z-=r;z-=k;z^=k<<16;r-=k;r-=z;r^=z>>>5;k-=z;k-=r;k^=r>>>3;z-=r;z-=k;z^=k<<10;r-=k;r-=z;r^=z>>>15}
l=JVT(l);let k=2654435769,z=2654435769,r=314159265;const Z=l.length;let e=Z,A=0;for(;e>=12;e-=12,A+=12)k+=Mu(l,A),z+=Mu(l,A+4),r+=Mu(l,A+8),y();r+=Z;switch(e){case 11:r+=l[A+10]<<24;case 10:r+=l[A+9]<<16;case 9:r+=l[A+8]<<8;case 8:z+=l[A+7]<<24;case 7:z+=l[A+6]<<16;case 6:z+=l[A+5]<<8;case 5:z+=l[A+4];case 4:k+=l[A+3]<<24;case 3:k+=l[A+2]<<16;case 2:k+=l[A+1]<<8;case 1:k+=l[A+0]}y();return Yqz.toString(r)};
JVT=function(l){const y=[];for(let k=0;k<l.length;k++)y.push(l.charCodeAt(k));return y};
Mu=function(l,y){return l[y+0]+(l[y+1]<<8)+(l[y+2]<<16)+(l[y+3]<<24)};
var KMT=function(){return X7[G[19]](this,1,3678)};
cc=function(l,y){const k=setTimeout(()=>{l.V.resolve()},y);
l.addOnDisposeCallback(()=>void clearTimeout(k))};
bJ=function(l,y){var k=`${y(l.error.message)}:${y(l.error.stack)}`.substring(0,2048);y=k.length+1;k=Cf(k);const z=new Uint8Array(4+k.length);z.set([42,y&127|128,y>>7,l.error.code]);z.set(k,4);return z};
Cf=function(l){return globalThis.TextEncoder?(new TextEncoder).encode(l):g.PG(l)};
ggg=function(l,y,k){return l instanceof ZW?r3(l,k,y,1):l.hG(k)};
qu=async function(l){let y=void 0;l.J++;const k=new g.OX;l.qK instanceof uJ&&l.qK.V.push(k.promise);if(l.pF){const Z=new g.OX;setTimeout(()=>void Z.resolve());
await Z.promise}const z=l.logger.share();try{l.state=5;const Z=[],e=await An(l.qK.snapshot({cj:{},qv:Z}),l.Sl.pz,()=>Promise.reject(new cQ(15,"MDA:Timeout")));
xC(l,"MDA:Disposed");const A=Z[0];l.state=6;const Q=await An(ggg(l.xj,z,e),l.Sl.n0,()=>Promise.reject(new cQ(10,"BWB:Timeout")));
xC(l,"BWB:Disposed");l.state=7;y=S9(z,()=>{const t=Eg5(l,Q,k,A);t.V.promise.then(()=>void l.S());
return t},"i")}catch(Z){y?.dispose();
if(!l.C){const e=fjy(l,Z);k.resolve();var r;if(r=l.qK instanceof uJ&&l.J<2)a:if(Z instanceof cQ)r=Z.code!==32&&Z.code!==20&&Z.code!==10;else{if(Z instanceof m0)switch(Z.code){case 2:case 13:case 14:case 4:break;default:r=!1;break a}r=!0}if(r){const A=setTimeout(()=>void l.S(),(1+Math.random()*.25)*(l.Z?6E4:1E3));
l.addOnDisposeCallback(()=>void clearTimeout(A));
return}l.C=e}z.Al(l.Z?13:14);l.V.reject(l.C);return}finally{z.dispose()}l.state=8;l.J=0;l.Z?.dispose();l.Z=y;l.V.resolve()};
fjy=function(l,y){if(!(y instanceof cQ))if(y instanceof m0){const k=Error(y.toString());k.stack=y.stack;y=new cQ(11,"EBH:Error",k)}else y=new cQ(12,"BSO:Unknown",y);return l.reportError(y)};
xC=function(l,y){if(l.IR())throw new cQ(l.Z?20:32,y);};
Eg5=function(l,y,k,z){const r=(VY(mH(y,2))??0)*1E3;if(r<=0)throw new cQ(31,"TTM:Invalid");if(tF(y,4))return new jp5(l.logger,tF(y,4),r);if(!(VY(mH(y,3))??0))return new Sq_(l.logger,BG(fZ(y,1)),r);if(!z)throw new cQ(4,"PMD:Undefined");z=z(BG(fZ(y,1)));if(typeof z!=="function")throw new cQ(16,"APF:Failed");l.K=Math.floor((Date.now()+r)/1E3);l=new Wc(l.logger,z,VY(mH(y,3))??0,r);l.addOnDisposeCallback(()=>void k.resolve());
return l};
Tw=function(l,y,k){try{if(l.IR())throw new cQ(21,"BNT:disposed");if(!l.Z&&l.C)throw l.C;return ngy(l,y,k)??FMT(l,y,k)??og4(l,y,k)}catch(z){if(!y.ue)throw Ij(l,z);return Nt_(l,k,z)}};
Ij=function(l,y){y=y instanceof cQ?y:new cQ(5,"TVD:error",y);return l.reportError(y)};
ngy=function(l,y,k){return l.Z?.n6(()=>V0(l,y),k,z=>{if(l.Z instanceof Wc&&y.bQ?.Qa)try{l.cache?.Z(V0(l,y),z,y.bQ.oQ,l.K-120)}catch(r){l.reportError(new cQ(24,"ELX:write",r))}})};
FMT=function(l,y,k){if(y.bQ?.bL)try{const z=l.cache?.C(V0(l,y),y.bQ.oQ);return z?k?S9(l.logger,()=>g.px(z,2),"a"):z:void 0}catch(z){l.reportError(new cQ(23,"RXO:read",z))}};
og4=function(l,y,k){const z={stack:[],error:void 0,hasError:!1};try{if(!y.Lr)throw new cQ(29,"SDF:notready");return pC(z,new Pc(l.logger,0,l.state)).n6(()=>V0(l,y),k)}catch(r){z.error=r,z.hasError=!0}finally{KC(z)}};
Nt_=function(l,y,k){const z={stack:[],error:void 0,hasError:!1};try{const r=Ij(l,k);return pC(z,new sps(l.logger,r)).n6(()=>[],y)}catch(r){z.error=r,z.hasError=!0}finally{KC(z)}};
V0=function(l,y){return y.zq?y.zq:y.cj?S9(l.logger,()=>y.zq=Cf(y.cj),"c"):[]};
Jn=function(){let l=0,y;return k=>{y||(y=new o7);const z=new Pc(y,l,1),r=z.n6(()=>Cf(k),!0);
z.dispose();l++;return r}};
vgT=function(l,y={}){return new LMT(l,y)};
Btt=function(l){l.S.Qr("data",y=>{if("1"in y){var k=y["1"];let z;try{z=l.K(k)}catch(r){YC(l,new m0(13,`Error when deserializing response data; error: ${r}, response: ${k}`))}z&&pf(l,z)}if("2"in y)for(y=Kf(l,y["2"]),k=0;k<l.J.length;k++)l.J[k](y)});
l.S.Qr("end",()=>{g3(l,EX(l));for(let y=0;y<l.N.length;y++)l.N[y]()});
l.S.Qr("error",()=>{if(l.Z.length!==0){var y=l.xhr.C;y!==0||YJ(l.xhr)||(y=6);var k=-1;switch(y){case 0:var z=2;break;case 7:z=10;break;case 8:z=4;break;case 6:k=l.xhr.getStatus();z=Mm(k);break;default:z=14}g3(l,EX(l));y=zA4(y)+", error: "+l.xhr.getLastError();k!==-1&&(y+=`, http status code: ${k}`);YC(l,new m0(z,y))}})};
YC=function(l,y){for(let k=0;k<l.Z.length;k++)l.Z[k](y)};
g3=function(l,y){for(let k=0;k<l.V.length;k++)l.V[k](y)};
EX=function(l){const y={},k=g.EW(l.xhr);Object.keys(k).forEach(z=>{y[z]=k[z]});
return y};
pf=function(l,y){for(let k=0;k<l.C.length;k++)l.C[k](y)};
Kf=function(l,y){let k=2,z;const r={};try{let Z;Z=H9C(y);k=g.$h(Z,1);z=Z.getMessage();kh(Z,RAP,3).length&&(r["grpc-web-status-details-bin"]=y)}catch(Z){l.xhr&&l.xhr.getStatus()===404?(k=5,z="Not Found: "+String(l.xhr.A)):(k=14,z=`Unable to parse RpcStatus: ${Z}`)}return{code:k,details:z,metadata:r}};
loz=function(l,y){const k=new Dj4;g.iD(l.xhr,"complete",()=>{if(YJ(l.xhr)){var z=g.KS(l.xhr);if(y&&l.xhr.getResponseHeader("Content-Type")==="text/plain"){if(!atob)throw Error("Cannot decode Base64 response");z=atob(z)}try{var r=l.K(z)}catch(e){YC(l,ff(new m0(13,`Error when deserializing response data; error: ${e}, response: ${z}`),k));return}z=Mm(l.xhr.getStatus());g3(l,EX(l));z===0?pf(l,r):YC(l,ff(new m0(z,"Xhr succeeded but the status code is not 200"),k))}else{z=g.KS(l.xhr);let e;r=EX(l);if(z){var Z=
Kf(l,z);z=Z.code;e=Z.details;Z=Z.metadata}else z=2,e=`Rpc failed due to xhr error. uri: ${String(l.xhr.A)}, error code: ${l.xhr.C}, error: ${l.xhr.getLastError()}`,Z=r;g3(l,r);YC(l,ff(new m0(z,e,Z),k))}})};
jo=function(l,y){y=l.indexOf(y);y>-1&&l.splice(y,1)};
ff=function(l,y){y.stack&&(l.stack+="\n"+y.stack);return l};
g.So=function(l){this.V=l.gq||null;this.N=l.r3||!1;this.C=void 0};
nf=function(l,y){g.Wd.call(this);this.b0=l;this.S=y;this.J=void 0;this.status=this.readyState=0;this.responseType=this.responseText=this.response=this.statusText="";this.onreadystatechange=this.responseXML=null;this.D=new Headers;this.C=null;this.Y="GET";this.C_="";this.Z=!1;this.K=this.N=this.V=null;this.A=new AbortController};
F7=function(l){l.N.read().then(l.cq.bind(l)).catch(l.EW.bind(l))};
Nu=function(l){l.readyState=4;l.V=null;l.N=null;l.K=null;oj(l)};
oj=function(l){l.onreadystatechange&&l.onreadystatechange.call(l)};
y25=function(l){if(l.s2&&typeof l.s2=="function")return l.s2();if(typeof Map!=="undefined"&&l instanceof Map||typeof Set!=="undefined"&&l instanceof Set)return Array.from(l.values());if(typeof l==="string")return l.split("");if(g.CC(l)){const y=[],k=l.length;for(let z=0;z<k;z++)y.push(l[z]);return y}return sy(l)};
knq=function(l){if(l.e8&&typeof l.e8=="function")return l.e8();if(!l.s2||typeof l.s2!="function"){if(typeof Map!=="undefined"&&l instanceof Map)return Array.from(l.keys());if(!(typeof Set!=="undefined"&&l instanceof Set)){if(g.CC(l)||typeof l==="string"){const y=[];l=l.length;for(let k=0;k<l;k++)y.push(k);return y}return g.LR(l)}}};
zBC=function(l,y,k){if(l.forEach&&typeof l.forEach=="function")l.forEach(y,k);else if(g.CC(l)||typeof l==="string")Array.prototype.forEach.call(l,y,k);else{const z=knq(l),r=y25(l),Z=r.length;for(let e=0;e<Z;e++)y.call(k,r[e],z&&z[e],l)}};
g.sX=function(l){this.Z=this.A=this.J="";this.N=null;this.S=this.C="";this.K=!1;let y;l instanceof g.sX?(this.K=l.K,g.Lf(this,l.J),this.A=l.A,g.vc(this,l.Z),g.Hc(this,l.N),this.C=l.C,Rj(this,l.V.clone()),this.S=l.S):l&&(y=g.ee(String(l)))?(this.K=!1,g.Lf(this,y[1]||"",!0),this.A=DW(y[2]||""),g.vc(this,y[3]||"",!0),g.Hc(this,y[4]),this.C=DW(y[5]||"",!0),Rj(this,y[6]||"",!0),this.S=DW(y[7]||"")):(this.K=!1,this.V=new ld(null,this.K))};
g.Lf=function(l,y,k){l.J=k?DW(y,!0):y;l.J&&(l.J=l.J.replace(/:$/,""))};
g.vc=function(l,y,k){l.Z=k?DW(y,!0):y};
g.Hc=function(l,y){if(y){y=Number(y);if(isNaN(y)||y<0)throw Error("Bad port number "+y);l.N=y}else l.N=null};
Rj=function(l,y,k){y instanceof ld?(l.V=y,r2Q(l.V,l.K)):(k||(y=y8(y,Zxz)),l.V=new ld(y,l.K))};
g.ke=function(l,y,k){l.V.set(y,k)};
g.Ie=function(l){return l instanceof g.sX?l.clone():new g.sX(l)};
DW=function(l,y){return l?y?decodeURI(l.replace(/%25/g,"%2525")):decodeURIComponent(l):""};
y8=function(l,y,k){return typeof l==="string"?(l=encodeURI(l).replace(y,eBC),k&&(l=l.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),l):null};
eBC=function(l){l=l.charCodeAt(0);return"%"+(l>>4&15).toString(16)+(l&15).toString(16)};
ld=function(l,y){this.C=this.Z=null;this.N=l||null;this.V=!!y};
zB=function(l){l.Z||(l.Z=new Map,l.C=0,l.N&&wD(l.N,function(y,k){l.add(ii(y),k)}))};
Zf=function(l,y){zB(l);y=rn(l,y);return l.Z.has(y)};
g.e5=function(l,y,k){l.remove(y);k.length>0&&(l.N=null,l.Z.set(rn(l,y),g.tp(k)),l.C=l.C+k.length)};
rn=function(l,y){y=String(y);l.V&&(y=y.toLowerCase());return y};
r2Q=function(l,y){y&&!l.V&&(zB(l),l.N=null,l.Z.forEach(function(k,z){const r=z.toLowerCase();z!=r&&(this.remove(z),g.e5(this,r,k))},l));
l.V=y};
g.Ag=function(l){let y="";g.fR(l,function(k,z){y+=z;y+=":";y+=k;y+="\r\n"});
return y};
g.$e=function(l,y,k){if(g.DB(k))return l;k=g.Ag(k);if(typeof l==="string")return MA(l,g.am(y),k);g.ke(l,y,k);return l};
g.Q8=function(l){g.zP.call(this);this.C=l;this.Z={}};
tg=function(l,y,k,z,r,Z){if(Array.isArray(k))for(let e=0;e<k.length;e++)tg(l,y,k[e],z,r,Z);else{y=a4(y,k,z||l.handleEvent,r,Z||l.C||l);if(!y)return l;l.Z[y.key]=y}return l};
Oj=function(l,y,k){l.N=!1;throw Error("The stream is broken @"+l.C+". Error: "+k+". With input:\n"+y);};
dn=function(){this.S=null;this.K=[];this.V=this.C=this.N=this.Z=this.D=0;this.J=null;this.A=0};
wn=function(l,y,k,z){l.Z=3;l.S="The stream is broken @"+l.D+"/"+k+". Error: "+z+". With input:\n"+y;throw Error(l.S);};
hg=function(){this.Z=null;this.C=0;this.N=new A2q;this.V=new dn};
GB=function(l,y,k){l.Z="The stream is broken @"+l.C+". Error: "+k+". With input:\n"+y;throw Error(l.Z);};
at=function(l){return l=="\r"||l=="\n"||l==" "||l=="\t"};
id=function(l){this.D=null;this.S=[];this.V="";this.Y=[];this.N=this.C=0;this.K=!1;this.A=0;this.b0=/[\\"]/g;this.Z=this.J=0;this.C_=!(!l||!l.OZ)};
Uj=function(l,y,k){l.J=3;l.D="The stream is broken @"+l.N+"/"+k+". With input:\n"+y;throw Error(l.D);};
M3=function(){this.J=this.N=null;this.C=this.Z=0;this.V=[];this.S=!1};
$be=function(l){let y=g.fS(l,"Content-Type");if(!y)return null;y=y.toLowerCase();return y.startsWith("application/json")?y.startsWith("application/json+protobuf")?new M3:new id:y.startsWith("application/x-protobuf")?(l=g.fS(l,"Content-Transfer-Encoding"))?l.toLowerCase()=="base64"?new hg:null:new dn:null};
Xk=function(l,y){l.J!=y&&(l.J=y,l.K&&l.K())};
c_=function(l){l.A.removeAll();if(l.Z){const y=l.Z;l.Z=null;y.abort();y.dispose()}};
CF=function(l,y){for(let k=0;k<l.length;k++){const z=l[k];y.forEach(function(r){try{r(z)}catch(Z){}})}};
bd=function(l,y){var k=l.C[y];k&&k.forEach(function(z){try{z()}catch(r){}});
(k=l.Z[y])&&k.forEach(function(z){z()});
l.Z[y]=[]};
QUe=function(l,y){return y.reduce((k,z)=>r=>z.intercept(r,k),l)};
tJP=function(l,y){return y.reduce((k,z)=>r=>z.intercept(r,k),l)};
Ox5=function(l,y,k){const z=y.HQ,r=y.getMetadata(),Z=ud(l,!0);l=xe(l,r,Z,k+z.getName());k=mS(Z,z.C,!1);loz(k,r["X-Goog-Encode-Response-If-Executable"]==="base64");y=z.Z(y.n7);Z.send(l,"POST",y);return k};
dbP=function(l,y,k,z,r,Z={}){const e=y.substring(0,y.length-r.name.length),A=Z?.signal;return tJP(Q=>new Promise((t,O)=>{if(A?.aborted){const h=new m0(1,"Aborted");h.cause=A.reason;O(h)}else{var d={},w=Ox5(l,Q,e);w.Qr("error",h=>void O(h));
w.Qr("metadata",h=>{d=h});
w.Qr("data",h=>{t(vgT(h,d))});
A&&A.addEventListener("abort",()=>{w.cancel();const h=new m0(1,"Aborted");h.cause=A.reason;O(h)})}}),l.kp).call(l,r.S(k,z)).then(Q=>Q.zP)};
zw=function(l,y,k,z,r,Z={}){return dbP(l,y,k,z,r,Z)};
ud=function(l,y){y=l.Z&&!y;return l.sM||y?new g.qm(new g.So({gq:l.sM,r3:y})):new g.qm};
xe=function(l,y,k,z){y["Content-Type"]="application/json+protobuf";y["X-User-Agent"]="grpc-web-javascript/0.1";const r=y.Authorization;if(r&&wGg.has(r.split(" ")[0])||l.withCredentials)k.K=!0;if(l.v9)z=g.$e(z,"$httpHeaders",y);else for(const Z of Object.keys(y))k.headers.set(Z,y[Z]);return z};
mS=function(l,y,k){let z;k&&(l.isActive(),k=new hBP(l),z=new GnT(k));return new aos({xhr:l,H3:z},y)};
q3=function(){this.Z=new ixq;this.C="https://jnn-pa.googleapis.com".replace(/\/+$/,"")};
W_=function(l){return l.Z.G7(UbP)};
XGs=function(l){if(g.G0(g.My(l)))return!1;if(l.indexOf("://pagead2.googlesyndication.com/pagead/gen_204?id=yt3p&sr=1&")>=0)return!0;let y;try{y=new g.sX(l)}catch(k){return g.Dg(It,z=>l.search(z)>0)!=null}return y.S.match(MJt)?!0:g.Dg(It,k=>l.match(k)!=null)!=null};
g.TB=function(l,y){return l.replace(c2s,function(k,z){try{let r=g.ko(y,z);if(r==null||r.toString()==null)return k;r=r.toString();if(r==""||!g.G0(g.My(r)))return encodeURIComponent(r).replace(/%2C/g,",")}catch(r){}return k})};
bxP=function(l){const y=l.Mx;return lW(l,y,y[kH]|0,CNQ,2,1)};
xbz=function(l){var y;if((y=l[V8])!=null)l=y;else{if(P_!==P_)throw Error();l=l[V8]=uK5(l.Z)}return l};
mb_=function(l){return l[Jg]??(l[Jg]=new Map(bxP(xbz(l)).map(y=>[y.getName(),g.$h(y,2)])))};
pF=function(l){if(l.xD!==void 0){var y=Ye;Ye=!0;try{for(let k=l.xD;k!==void 0;k=k.gwe){const z=k.e8j;z.LY||(z.LY=!0,pF(z),z.Xb?.(z))}}finally{Ye=y}}};
W2T=function(l,y){const k=Object.create(qUQ);k.value=l;y!==void 0&&(k.JF=y);l=()=>{if(Ye)throw Error("");return k.value};
l[KF]=k;return[l,z=>gn(k,z),
z=>{gn(k,z(k.value))}]};
gn=function(l,y){l.JF(l.value,y)||(l.value=y,l.version++,Io5++,pF(l))};
Ej=function(l,y=""){var k={};l=W2T(l,k.equals);k=k.debugName;l[0][KF].debugName=k&&y?`${k}__${y}`:k??y??"[signal]"};
T75=function(){var l=g.fF;j5.instance||(j5.instance=new j5(l));return j5.instance};
S5=function(l,y){return l.V?l.V:l.V=new Promise(async k=>{const z=window.AbortController?new window.AbortController:void 0,r=z?.signal;let Z=!1;try{z&&(l.C=l.Jy.zk(()=>{z.abort()},y||2E4)),await fetch("/generate_204",{method:"HEAD",
signal:r}),Z=!0}catch{Z=!1}finally{l.V=void 0,l.C&&(l.Jy.qJ(l.C),l.C=0),Z!==l.Z&&(l.Z=Z,l.Z?l.dispatchEvent("networkstatus-online"):l.dispatchEvent("networkstatus-offline")),k(Z)}})};
VJt=function(l){l.Z===-1&&(l.Z=l.data.reduce((y,k,z)=>y+(k?2**z:0),0));
return l.Z};
nF=function(l){l.setAttribute("role","link")};
ot=function(l,y){Array.isArray(y)&&(y=y.join(" "));y===""||y==void 0?(Fk||(Fk={atomic:!1,autocomplete:"none",dropeffect:"none",haspopup:!1,live:"off",multiline:!1,multiselectable:!1,orientation:"vertical",readonly:!1,relevant:"additions text",required:!1,sort:"none",busy:!1,disabled:!1,hidden:!1,invalid:"false"}),y=Fk,"label"in y?l.setAttribute("aria-label",y.label):l.removeAttribute("aria-label")):l.setAttribute("aria-label",y)};
N3=function(l){l=l.getAttribute("aria-label");return l==null||l==void 0?"":String(l)};
g.sj=function(l,y,k){g.zP.call(this);this.Z=null;this.V=!1;this.S=l;this.J=k;this.C=y||window;this.N=(0,g.We)(this.ek,this)};
LF=function(l){l=l.C;return l.requestAnimationFrame||l.webkitRequestAnimationFrame||l.mozRequestAnimationFrame||l.oRequestAnimationFrame||l.msRequestAnimationFrame||null};
v_=function(l){l=l.C;return l.cancelAnimationFrame||l.cancelRequestAnimationFrame||l.webkitCancelRequestAnimationFrame||l.mozCancelRequestAnimationFrame||l.oCancelRequestAnimationFrame||l.msCancelRequestAnimationFrame||null};
g.B_=function(l,y,k){g.zP.call(this);this.Z=l;this.h6=y||0;this.C=k;this.N=(0,g.We)(this.jh,this)};
g.H_=function(l){l.stop();l.jh()};
Rt=function(l){l.Aj=g.ZZ(()=>{l.Aj=null;l.Z&&!l.C&&(l.Z=!1,Rt(l))},l.h6);
const y=l.N;l.N=null;l.J.apply(null,y)};
Df=function(l){return typeof l.className=="string"?l.className:l.getAttribute&&l.getAttribute("class")||""};
lu=function(l){return l.classList?l.classList:Df(l).match(/\S+/g)||[]};
g.yp=function(l,y){typeof l.className=="string"?l.className=y:l.setAttribute&&l.setAttribute("class",y)};
g.ka=function(l,y){return l.classList?l.classList.contains(y):g.ro(lu(l),y)};
g.zi=function(l,y){if(l.classList)l.classList.add(y);else if(!g.ka(l,y)){const k=Df(l);g.yp(l,k+(k.length>0?" "+y:y))}};
g.rx=function(l,y){if(l.classList)Array.prototype.forEach.call(y,function(z){g.zi(l,z)});
else{var k={};Array.prototype.forEach.call(lu(l),function(z){k[z]=!0});
Array.prototype.forEach.call(y,function(z){k[z]=!0});
y="";for(const z in k)y+=y.length>0?" "+z:z;g.yp(l,y)}};
g.ZM=function(l,y){l.classList?l.classList.remove(y):g.ka(l,y)&&g.yp(l,Array.prototype.filter.call(lu(l),function(k){return k!=y}).join(" "))};
g.eM=function(l,y){l.classList?Array.prototype.forEach.call(y,function(k){g.ZM(l,k)}):g.yp(l,Array.prototype.filter.call(lu(l),function(k){return!g.ro(y,k)}).join(" "))};
g.I=function(l,y,k){k?g.zi(l,y):g.ZM(l,y)};
AB=function(l,y){const k=!g.ka(l,y);g.I(l,y,k)};
g.$a=function(){g.Wd.call(this);this.Z=0;this.endTime=this.startTime=null};
PNs=function(l,y){Array.isArray(y)||(y=[y]);y=y.map(function(k){return typeof k==="string"?k:k.property+" "+k.duration+"s "+k.timing+" "+k.delay+"s"});
g.n9(l,"transition",y.join(","))};
Qp=function(l,y,k,z,r){g.$a.call(this);this.C=l;this.J=y;this.S=k;this.V=z;this.K=Array.isArray(r)?r:[r]};
tB=function(l,y,k,z){return new Qp(l,y,{opacity:k},{opacity:z},{property:"opacity",duration:y,timing:"ease-in",delay:0})};
YUz=function(l){l=l.trim();if(l=="")return null;var y=String(l.slice(0,4)).toLowerCase();if(("url("<y?-1:"url("==y?0:1)==0)return!l.endsWith(")")||(l?l.split("(").length-1:0)>1||l&&l.split(")"),null;if(l.indexOf("(")>0){if(/"|'/.test(l))return null;y=/([\-\w]+)\(/g;let k;for(;k=y.exec(l);)if(!(k[1].toLowerCase()in J2T))return null}return l};
Ou=function(l,y){l=g.aC[l];return l&&l.prototype?(y=Object.getOwnPropertyDescriptor(l.prototype,y))&&y.get||null:null};
dx=function(l){const y=g.aC.CSSStyleDeclaration;return y&&y.prototype&&y.prototype[l]||null};
hB=function(l,y,k,z){if(l)return l.apply(y,z);if(g.wx&&document.documentMode<10){if(!y[k].call)throw Error("IE Clobbering detected");}else if(typeof y[k]!="function")throw Error("Clobbering detected");return y[k].apply(y,z)};
fo5=function(l){if(!l)return"";const y=document.createElement("div").style;pGg(l).forEach(function(k){const z=g.tV&&k in K2s?k:k.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/i,"");w4(z,"--")||w4(z,"var")||(k=hB(gUq,l,l.getPropertyValue?"getPropertyValue":"getAttribute",[k])||"",k=YUz(k),k!=null&&hB(EUP,y,y.setProperty?"setProperty":"setAttribute",[z,k]))});
return y.cssText||""};
pGg=function(l){g.CC(l)?l=g.tp(l):(l=g.LR(l),g.Ap(l,"cssText"));return l};
g.aS=function(l){var y;let k=y=0,z=!1;l=l.split(jUs);for(let r=0;r<l.length;r++){const Z=l[r];g.Gi.test(Z)?(y++,k++):SUC.test(Z)?z=!0:nUT.test(Z)?k++:F2e.test(Z)&&(z=!0)}y=k==0?z?1:0:y/k>.4?-1:1;return(y==0?null:y)==-1?"rtl":"ltr"};
g.XA=function(l){if(l instanceof iu||l instanceof Uu||l instanceof Mp)return l;if(typeof l.next=="function")return new iu(()=>l);
if(typeof l[Symbol.iterator]=="function")return new iu(()=>l[Symbol.iterator]());
if(typeof l.kq=="function")return new iu(()=>l.kq());
throw Error("Not an iterator or iterable.");};
c9=function(l,y,k,z,r,Z,e,A){this.Z=l;this.K=y;this.N=k;this.J=z;this.V=r;this.S=Z;this.C=e;this.A=A};
CW=function(l,y){if(y==0)return l.Z;if(y==1)return l.C;let k=fK(l.Z,l.N,y),z=fK(l.N,l.V,y);l=fK(l.V,l.C,y);k=fK(k,z,y);z=fK(z,l,y);return fK(k,z,y)};
bu=function(l,y){if(y==0)return l.K;if(y==1)return l.A;let k=fK(l.K,l.J,y),z=fK(l.J,l.S,y);l=fK(l.S,l.A,y);k=fK(k,z,y);z=fK(z,l,y);return fK(k,z,y)};
uu=function(l,y){let k=(y-l.Z)/(l.C-l.Z);if(k<=0)return 0;if(k>=1)return 1;let z=0,r=1,Z=0;for(var e=0;e<8;e++){Z=CW(l,k);const A=(CW(l,k+1E-6)-Z)/1E-6;if(Math.abs(Z-y)<1E-6)return k;if(Math.abs(A)<1E-6)break;else Z<y?z=k:r=k,k-=(Z-y)/A}for(e=0;Math.abs(Z-y)>1E-6&&e<8;e++)Z<y?(z=k,k=(k+r)/2):(r=k,k=(k+z)/2),Z=CW(l,k);return k};
xa=function(l,y){this.start=l<y?l:y;this.end=l<y?y:l};
mw=function(l){return(l=l.exec(g.Xv()))?l[1]:""};
qp=function(l){return g.Mg(oUz,l)>=0};
g.W9=function(l){g.zP.call(this);this.S=1;this.N=[];this.V=0;this.Z=[];this.C={};this.K=!!l};
N7P=function(l,y,k){g.o4(function(){l.apply(y,k)})};
g.IS=function(l){this.My=l};
Ti=function(l){this.My=l};
Vp=function(l){this.data=l};
P9=function(l){return l===void 0||l instanceof Vp?l:new Vp(l)};
JB=function(l){this.My=l};
g.Ya=function(l){const y=l.creation;l=l.expiration;return!!l&&l<g.T5()||!!y&&y>g.T5()};
g.pW=function(l){this.My=l};
sUP=function(){};
KW=function(){};
gx=function(l){this.Z=l;this.C=null};
Eu=function(l){if(l.Z==null)throw Error("Storage mechanism: Storage unavailable");l.isAvailable()||Tn(Error("Storage mechanism: Storage unavailable"))};
fW=function(){let l=null;try{l=g.aC.localStorage||null}catch(y){}gx.call(this,l)};
jM=function(){let l=null;try{l=g.aC.sessionStorage||null}catch(y){}gx.call(this,l)};
SM=function(l,y){this.C=l;this.Z=y+"::"};
g.nW=function(l){const y=new fW;return y.isAvailable()?l?new SM(y,l):y:null};
FA=function(l,y){this.Z=l;this.C=y};
oS=function(){};
Np=function(){let l=Error();l.name="SecurityError";throw l;};
LW=function(){return{get opener(){return null},get closed(){return!0},get location(){Np()},get document(){Np()},postMessage:function(){},
close:function(){},
focus:function(){}}};
B9=function(l){var y,k,z=l.length,r=0;for(y=0;y<z;y++){var Z=l.charCodeAt(y);if((Z&64512)===55296&&y+1<z){var e=l.charCodeAt(y+1);(e&64512)===56320&&(Z=65536+(Z-55296<<10)+(e-56320),y++)}r+=Z<128?1:Z<2048?2:Z<65536?3:4}var A=new v9.nR(r);for(y=k=0;k<r;y++)Z=l.charCodeAt(y),(Z&64512)===55296&&y+1<z&&(e=l.charCodeAt(y+1),(e&64512)===56320&&(Z=65536+(Z-55296<<10)+(e-56320),y++)),Z<128?A[k++]=Z:(Z<2048?A[k++]=192|Z>>>6:(Z<65536?A[k++]=224|Z>>>12:(A[k++]=240|Z>>>18,A[k++]=128|Z>>>12&63),A[k++]=128|Z>>>
6&63),A[k++]=128|Z&63);return A};
H9=function(l){for(var y=l.length;--y>=0;)l[y]=0};
RS=function(l,y,k,z,r){this.qN=l;this.P2=y;this.u3=k;this.eF=z;this.YQ=r;this.sP=l&&l.length};
DM=function(l,y){this.cS=l;this.U3=0;this.fX=y};
l8=function(l,y){l.o9[l.pending++]=y&255;l.o9[l.pending++]=y>>>8&255};
yO=function(l,y,k){l.nf>16-k?(l.Xt|=y<<l.nf&65535,l8(l,l.Xt),l.Xt=y>>16-l.nf,l.nf+=k-16):(l.Xt|=y<<l.nf&65535,l.nf+=k)};
kG=function(l,y,k){yO(l,k[y*2],k[y*2+1])};
zR=function(l,y){var k=0;do k|=l&1,l>>>=1,k<<=1;while(--y>0);return k>>>1};
rL=function(l,y,k){var z=Array(16),r=0,Z;for(Z=1;Z<=15;Z++)z[Z]=r=r+k[Z-1]<<1;for(k=0;k<=y;k++)r=l[k*2+1],r!==0&&(l[k*2]=zR(z[r]++,r))};
ZJ=function(l){var y;for(y=0;y<286;y++)l.Hi[y*2]=0;for(y=0;y<30;y++)l.wJ[y*2]=0;for(y=0;y<19;y++)l.Dd[y*2]=0;l.Hi[512]=1;l.Vc=l.S3=0;l.Qs=l.matches=0};
eW=function(l){l.nf>8?l8(l,l.Xt):l.nf>0&&(l.o9[l.pending++]=l.Xt);l.Xt=0;l.nf=0};
AR=function(l,y,k){eW(l);l8(l,k);l8(l,~k);v9.Z8(l.o9,l.window,y,k,l.pending);l.pending+=k};
$G=function(l,y,k,z){var r=y*2,Z=k*2;return l[r]<l[Z]||l[r]===l[Z]&&z[y]<=z[k]};
QO=function(l,y,k){for(var z=l.P1[k],r=k<<1;r<=l.BB;){r<l.BB&&$G(y,l.P1[r+1],l.P1[r],l.depth)&&r++;if($G(y,z,l.P1[r],l.depth))break;l.P1[k]=l.P1[r];k=r;r<<=1}l.P1[k]=z};
av=function(l,y,k){var z=0;if(l.Qs!==0){do{var r=l.o9[l.kJ+z*2]<<8|l.o9[l.kJ+z*2+1];var Z=l.o9[l.Gm+z];z++;if(r===0)kG(l,Z,y);else{var e=tR[Z];kG(l,e+256+1,y);var A=Op[e];A!==0&&(Z-=dL[e],yO(l,Z,A));r--;e=r<256?wL[r]:wL[256+(r>>>7)];kG(l,e,k);A=hR[e];A!==0&&(r-=GR[e],yO(l,r,A))}}while(z<l.Qs)}kG(l,256,y)};
i8=function(l,y){var k=y.cS,z=y.fX.qN,r=y.fX.sP,Z=y.fX.eF,e,A=-1;l.BB=0;l.Gf=573;for(e=0;e<Z;e++)k[e*2]!==0?(l.P1[++l.BB]=A=e,l.depth[e]=0):k[e*2+1]=0;for(;l.BB<2;){var Q=l.P1[++l.BB]=A<2?++A:0;k[Q*2]=1;l.depth[Q]=0;l.Vc--;r&&(l.S3-=z[Q*2+1])}y.U3=A;for(e=l.BB>>1;e>=1;e--)QO(l,k,e);Q=Z;do e=l.P1[1],l.P1[1]=l.P1[l.BB--],QO(l,k,1),z=l.P1[1],l.P1[--l.Gf]=e,l.P1[--l.Gf]=z,k[Q*2]=k[e*2]+k[z*2],l.depth[Q]=(l.depth[e]>=l.depth[z]?l.depth[e]:l.depth[z])+1,k[e*2+1]=k[z*2+1]=Q,l.P1[1]=Q++,QO(l,k,1);while(l.BB>=
2);l.P1[--l.Gf]=l.P1[1];e=y.cS;Q=y.U3;z=y.fX.qN;r=y.fX.sP;Z=y.fX.P2;var t=y.fX.u3,O=y.fX.YQ,d,w=0;for(d=0;d<=15;d++)l.pw[d]=0;e[l.P1[l.Gf]*2+1]=0;for(y=l.Gf+1;y<573;y++){var h=l.P1[y];d=e[e[h*2+1]*2+1]+1;d>O&&(d=O,w++);e[h*2+1]=d;if(!(h>Q)){l.pw[d]++;var U=0;h>=t&&(U=Z[h-t]);var u=e[h*2];l.Vc+=u*(d+U);r&&(l.S3+=u*(z[h*2+1]+U))}}if(w!==0){do{for(d=O-1;l.pw[d]===0;)d--;l.pw[d]--;l.pw[d+1]+=2;l.pw[O]--;w-=2}while(w>0);for(d=O;d!==0;d--)for(h=l.pw[d];h!==0;)z=l.P1[--y],z>Q||(e[z*2+1]!==d&&(l.Vc+=(d-e[z*
2+1])*e[z*2],e[z*2+1]=d),h--)}rL(k,A,l.pw)};
Up=function(l,y,k){var z,r=-1,Z=y[1],e=0,A=7,Q=4;Z===0&&(A=138,Q=3);y[(k+1)*2+1]=65535;for(z=0;z<=k;z++){var t=Z;Z=y[(z+1)*2+1];++e<A&&t===Z||(e<Q?l.Dd[t*2]+=e:t!==0?(t!==r&&l.Dd[t*2]++,l.Dd[32]++):e<=10?l.Dd[34]++:l.Dd[36]++,e=0,r=t,Z===0?(A=138,Q=3):t===Z?(A=6,Q=3):(A=7,Q=4))}};
M4=function(l,y,k){var z,r=-1,Z=y[1],e=0,A=7,Q=4;Z===0&&(A=138,Q=3);for(z=0;z<=k;z++){var t=Z;Z=y[(z+1)*2+1];if(!(++e<A&&t===Z)){if(e<Q){do kG(l,t,l.Dd);while(--e!==0)}else t!==0?(t!==r&&(kG(l,t,l.Dd),e--),kG(l,16,l.Dd),yO(l,e-3,2)):e<=10?(kG(l,17,l.Dd),yO(l,e-3,3)):(kG(l,18,l.Dd),yO(l,e-11,7));e=0;r=t;Z===0?(A=138,Q=3):t===Z?(A=6,Q=3):(A=7,Q=4)}}};
L2_=function(l){var y=4093624447,k;for(k=0;k<=31;k++,y>>>=1)if(y&1&&l.Hi[k*2]!==0)return 0;if(l.Hi[18]!==0||l.Hi[20]!==0||l.Hi[26]!==0)return 1;for(k=32;k<256;k++)if(l.Hi[k*2]!==0)return 1;return 0};
XN=function(l,y,k){l.o9[l.kJ+l.Qs*2]=y>>>8&255;l.o9[l.kJ+l.Qs*2+1]=y&255;l.o9[l.Gm+l.Qs]=k&255;l.Qs++;y===0?l.Hi[k*2]++:(l.matches++,y--,l.Hi[(tR[k]+256+1)*2]++,l.wJ[(y<256?wL[y]:wL[256+(y>>>7)])*2]++);return l.Qs===l.Iy-1};
Cu=function(l,y){l.msg=cR[y];return y};
b8=function(l){for(var y=l.length;--y>=0;)l[y]=0};
u8=function(l){var y=l.state,k=y.pending;k>l.Or&&(k=l.Or);k!==0&&(v9.Z8(l.output,y.o9,y.V6,k,l.X5),l.X5+=k,y.V6+=k,l.F0+=k,l.Or-=k,y.pending-=k,y.pending===0&&(y.V6=0))};
WR=function(l,y){var k=l.VG>=0?l.VG:-1,z=l.qW-l.VG,r=0;if(l.level>0){l.Er.FN===2&&(l.Er.FN=L2_(l));i8(l,l.cC);i8(l,l.Xo);Up(l,l.Hi,l.cC.U3);Up(l,l.wJ,l.Xo.U3);i8(l,l.LC);for(r=18;r>=3&&l.Dd[xG[r]*2+1]===0;r--);l.Vc+=3*(r+1)+5+5+4;var Z=l.Vc+3+7>>>3;var e=l.S3+3+7>>>3;e<=Z&&(Z=e)}else Z=e=z+5;if(z+4<=Z&&k!==-1)yO(l,y?1:0,3),AR(l,k,z);else if(l.strategy===4||e===Z)yO(l,2+(y?1:0),3),av(l,mJ,q4);else{yO(l,4+(y?1:0),3);k=l.cC.U3+1;z=l.Xo.U3+1;r+=1;yO(l,k-257,5);yO(l,z-1,5);yO(l,r-4,4);for(Z=0;Z<r;Z++)yO(l,
l.Dd[xG[Z]*2+1],3);M4(l,l.Hi,k-1);M4(l,l.wJ,z-1);av(l,l.Hi,l.wJ)}ZJ(l);y&&eW(l);l.VG=l.qW;u8(l.Er)};
Iv=function(l,y){l.o9[l.pending++]=y};
TR=function(l,y){l.o9[l.pending++]=y>>>8&255;l.o9[l.pending++]=y&255};
VO=function(l,y){var k=l.N5,z=l.qW,r=l.KJ,Z=l.BQ,e=l.qW>l.RF-262?l.qW-(l.RF-262):0,A=l.window,Q=l.YE,t=l.m6,O=l.qW+258,d=A[z+r-1],w=A[z+r];l.KJ>=l.OV&&(k>>=2);Z>l.zE&&(Z=l.zE);do{var h=y;if(A[h+r]===w&&A[h+r-1]===d&&A[h]===A[z]&&A[++h]===A[z+1]){z+=2;for(h++;A[++z]===A[++h]&&A[++z]===A[++h]&&A[++z]===A[++h]&&A[++z]===A[++h]&&A[++z]===A[++h]&&A[++z]===A[++h]&&A[++z]===A[++h]&&A[++z]===A[++h]&&z<O;);h=258-(O-z);z=O-258;if(h>r){l.vE=y;r=h;if(h>=Z)break;d=A[z+r-1];w=A[z+r]}}}while((y=t[y&Q])>e&&--k!==
0);return r<=l.zE?r:l.zE};
YG=function(l){var y=l.RF,k;do{var z=l.rl-l.zE-l.qW;if(l.qW>=y+(y-262)){v9.Z8(l.window,l.window,y,y,0);l.vE-=y;l.qW-=y;l.VG-=y;var r=k=l.mq;do{var Z=l.head[--r];l.head[r]=Z>=y?Z-y:0}while(--k);r=k=y;do Z=l.m6[--r],l.m6[r]=Z>=y?Z-y:0;while(--k);z+=y}if(l.Er.Sa===0)break;r=l.Er;k=l.window;Z=l.qW+l.zE;var e=r.Sa;e>z&&(e=z);e===0?k=0:(r.Sa-=e,v9.Z8(k,r.input,r.SY,e,Z),r.state.wrap===1?r.Js=PR(r.Js,k,e,Z):r.state.wrap===2&&(r.Js=JR(r.Js,k,e,Z)),r.SY+=e,r.Ui+=e,k=e);l.zE+=k;if(l.zE+l.mV>=3)for(z=l.qW-l.mV,
l.xd=l.window[z],l.xd=(l.xd<<l.m1^l.window[z+1])&l.Kw;l.mV&&!(l.xd=(l.xd<<l.m1^l.window[z+3-1])&l.Kw,l.m6[z&l.YE]=l.head[l.xd],l.head[l.xd]=z,z++,l.mV--,l.zE+l.mV<3););}while(l.zE<262&&l.Er.Sa!==0)};
pu=function(l,y){for(var k;;){if(l.zE<262){YG(l);if(l.zE<262&&y===0)return 1;if(l.zE===0)break}k=0;l.zE>=3&&(l.xd=(l.xd<<l.m1^l.window[l.qW+3-1])&l.Kw,k=l.m6[l.qW&l.YE]=l.head[l.xd],l.head[l.xd]=l.qW);k!==0&&l.qW-k<=l.RF-262&&(l.NK=VO(l,k));if(l.NK>=3)if(k=XN(l,l.qW-l.vE,l.NK-3),l.zE-=l.NK,l.NK<=l.Nz&&l.zE>=3){l.NK--;do l.qW++,l.xd=(l.xd<<l.m1^l.window[l.qW+3-1])&l.Kw,l.m6[l.qW&l.YE]=l.head[l.xd],l.head[l.xd]=l.qW;while(--l.NK!==0);l.qW++}else l.qW+=l.NK,l.NK=0,l.xd=l.window[l.qW],l.xd=(l.xd<<l.m1^
l.window[l.qW+1])&l.Kw;else k=XN(l,0,l.window[l.qW]),l.zE--,l.qW++;if(k&&(WR(l,!1),l.Er.Or===0))return 1}l.mV=l.qW<2?l.qW:2;return y===4?(WR(l,!0),l.Er.Or===0?3:4):l.Qs&&(WR(l,!1),l.Er.Or===0)?1:2};
Ku=function(l,y){for(var k,z;;){if(l.zE<262){YG(l);if(l.zE<262&&y===0)return 1;if(l.zE===0)break}k=0;l.zE>=3&&(l.xd=(l.xd<<l.m1^l.window[l.qW+3-1])&l.Kw,k=l.m6[l.qW&l.YE]=l.head[l.xd],l.head[l.xd]=l.qW);l.KJ=l.NK;l.p7=l.vE;l.NK=2;k!==0&&l.KJ<l.Nz&&l.qW-k<=l.RF-262&&(l.NK=VO(l,k),l.NK<=5&&(l.strategy===1||l.NK===3&&l.qW-l.vE>4096)&&(l.NK=2));if(l.KJ>=3&&l.NK<=l.KJ){z=l.qW+l.zE-3;k=XN(l,l.qW-1-l.p7,l.KJ-3);l.zE-=l.KJ-1;l.KJ-=2;do++l.qW<=z&&(l.xd=(l.xd<<l.m1^l.window[l.qW+3-1])&l.Kw,l.m6[l.qW&l.YE]=
l.head[l.xd],l.head[l.xd]=l.qW);while(--l.KJ!==0);l.vU=0;l.NK=2;l.qW++;if(k&&(WR(l,!1),l.Er.Or===0))return 1}else if(l.vU){if((k=XN(l,0,l.window[l.qW-1]))&&WR(l,!1),l.qW++,l.zE--,l.Er.Or===0)return 1}else l.vU=1,l.qW++,l.zE--}l.vU&&(XN(l,0,l.window[l.qW-1]),l.vU=0);l.mV=l.qW<2?l.qW:2;return y===4?(WR(l,!0),l.Er.Or===0?3:4):l.Qs&&(WR(l,!1),l.Er.Or===0)?1:2};
vUg=function(l,y){for(var k,z,r,Z=l.window;;){if(l.zE<=258){YG(l);if(l.zE<=258&&y===0)return 1;if(l.zE===0)break}l.NK=0;if(l.zE>=3&&l.qW>0&&(z=l.qW-1,k=Z[z],k===Z[++z]&&k===Z[++z]&&k===Z[++z])){for(r=l.qW+258;k===Z[++z]&&k===Z[++z]&&k===Z[++z]&&k===Z[++z]&&k===Z[++z]&&k===Z[++z]&&k===Z[++z]&&k===Z[++z]&&z<r;);l.NK=258-(r-z);l.NK>l.zE&&(l.NK=l.zE)}l.NK>=3?(k=XN(l,1,l.NK-3),l.zE-=l.NK,l.qW+=l.NK,l.NK=0):(k=XN(l,0,l.window[l.qW]),l.zE--,l.qW++);if(k&&(WR(l,!1),l.Er.Or===0))return 1}l.mV=0;return y===
4?(WR(l,!0),l.Er.Or===0?3:4):l.Qs&&(WR(l,!1),l.Er.Or===0)?1:2};
B75=function(l,y){for(var k;;){if(l.zE===0&&(YG(l),l.zE===0)){if(y===0)return 1;break}l.NK=0;k=XN(l,0,l.window[l.qW]);l.zE--;l.qW++;if(k&&(WR(l,!1),l.Er.Or===0))return 1}l.mV=0;return y===4?(WR(l,!0),l.Er.Or===0?3:4):l.Qs&&(WR(l,!1),l.Er.Or===0)?1:2};
gL=function(l,y,k,z,r){this.W2=l;this.DC=y;this.rk=k;this.Wq=z;this.func=r};
Hxq=function(){this.Er=null;this.status=0;this.o9=null;this.wrap=this.pending=this.V6=this.U2=0;this.b$=null;this.ZM=0;this.method=8;this.oC=-1;this.YE=this.bu=this.RF=0;this.window=null;this.rl=0;this.head=this.m6=null;this.BQ=this.OV=this.strategy=this.level=this.Nz=this.N5=this.KJ=this.zE=this.vE=this.qW=this.vU=this.p7=this.NK=this.VG=this.m1=this.Kw=this.MR=this.mq=this.xd=0;this.Hi=new v9.Cw(1146);this.wJ=new v9.Cw(122);this.Dd=new v9.Cw(78);b8(this.Hi);b8(this.wJ);b8(this.Dd);this.LC=this.Xo=
this.cC=null;this.pw=new v9.Cw(16);this.P1=new v9.Cw(573);b8(this.P1);this.Gf=this.BB=0;this.depth=new v9.Cw(573);b8(this.depth);this.nf=this.Xt=this.mV=this.matches=this.S3=this.Vc=this.kJ=this.Qs=this.Iy=this.Gm=0};
RB5=function(l,y){if(!l||!l.state||y>5||y<0)return l?Cu(l,-2):-2;var k=l.state;if(!l.output||!l.input&&l.Sa!==0||k.status===666&&y!==4)return Cu(l,l.Or===0?-5:-2);k.Er=l;var z=k.oC;k.oC=y;if(k.status===42)if(k.wrap===2)l.Js=0,Iv(k,31),Iv(k,139),Iv(k,8),k.b$?(Iv(k,(k.b$.text?1:0)+(k.b$.FE?2:0)+(k.b$.extra?4:0)+(k.b$.name?8:0)+(k.b$.comment?16:0)),Iv(k,k.b$.time&255),Iv(k,k.b$.time>>8&255),Iv(k,k.b$.time>>16&255),Iv(k,k.b$.time>>24&255),Iv(k,k.level===9?2:k.strategy>=2||k.level<2?4:0),Iv(k,k.b$.os&
255),k.b$.extra&&k.b$.extra.length&&(Iv(k,k.b$.extra.length&255),Iv(k,k.b$.extra.length>>8&255)),k.b$.FE&&(l.Js=JR(l.Js,k.o9,k.pending,0)),k.ZM=0,k.status=69):(Iv(k,0),Iv(k,0),Iv(k,0),Iv(k,0),Iv(k,0),Iv(k,k.level===9?2:k.strategy>=2||k.level<2?4:0),Iv(k,3),k.status=113);else{var r=8+(k.bu-8<<4)<<8;r|=(k.strategy>=2||k.level<2?0:k.level<6?1:k.level===6?2:3)<<6;k.qW!==0&&(r|=32);k.status=113;TR(k,r+(31-r%31));k.qW!==0&&(TR(k,l.Js>>>16),TR(k,l.Js&65535));l.Js=1}if(k.status===69)if(k.b$.extra){for(r=
k.pending;k.ZM<(k.b$.extra.length&65535)&&(k.pending!==k.U2||(k.b$.FE&&k.pending>r&&(l.Js=JR(l.Js,k.o9,k.pending-r,r)),u8(l),r=k.pending,k.pending!==k.U2));)Iv(k,k.b$.extra[k.ZM]&255),k.ZM++;k.b$.FE&&k.pending>r&&(l.Js=JR(l.Js,k.o9,k.pending-r,r));k.ZM===k.b$.extra.length&&(k.ZM=0,k.status=73)}else k.status=73;if(k.status===73)if(k.b$.name){r=k.pending;do{if(k.pending===k.U2&&(k.b$.FE&&k.pending>r&&(l.Js=JR(l.Js,k.o9,k.pending-r,r)),u8(l),r=k.pending,k.pending===k.U2)){var Z=1;break}Z=k.ZM<k.b$.name.length?
k.b$.name.charCodeAt(k.ZM++)&255:0;Iv(k,Z)}while(Z!==0);k.b$.FE&&k.pending>r&&(l.Js=JR(l.Js,k.o9,k.pending-r,r));Z===0&&(k.ZM=0,k.status=91)}else k.status=91;if(k.status===91)if(k.b$.comment){r=k.pending;do{if(k.pending===k.U2&&(k.b$.FE&&k.pending>r&&(l.Js=JR(l.Js,k.o9,k.pending-r,r)),u8(l),r=k.pending,k.pending===k.U2)){Z=1;break}Z=k.ZM<k.b$.comment.length?k.b$.comment.charCodeAt(k.ZM++)&255:0;Iv(k,Z)}while(Z!==0);k.b$.FE&&k.pending>r&&(l.Js=JR(l.Js,k.o9,k.pending-r,r));Z===0&&(k.status=103)}else k.status=
103;k.status===103&&(k.b$.FE?(k.pending+2>k.U2&&u8(l),k.pending+2<=k.U2&&(Iv(k,l.Js&255),Iv(k,l.Js>>8&255),l.Js=0,k.status=113)):k.status=113);if(k.pending!==0){if(u8(l),l.Or===0)return k.oC=-1,0}else if(l.Sa===0&&(y<<1)-(y>4?9:0)<=(z<<1)-(z>4?9:0)&&y!==4)return Cu(l,-5);if(k.status===666&&l.Sa!==0)return Cu(l,-5);if(l.Sa!==0||k.zE!==0||y!==0&&k.status!==666){z=k.strategy===2?B75(k,y):k.strategy===3?vUg(k,y):Ep[k.level].func(k,y);if(z===3||z===4)k.status=666;if(z===1||z===3)return l.Or===0&&(k.oC=
-1),0;if(z===2&&(y===1?(yO(k,2,3),kG(k,256,mJ),k.nf===16?(l8(k,k.Xt),k.Xt=0,k.nf=0):k.nf>=8&&(k.o9[k.pending++]=k.Xt&255,k.Xt>>=8,k.nf-=8)):y!==5&&(yO(k,0,3),AR(k,0,0),y===3&&(b8(k.head),k.zE===0&&(k.qW=0,k.VG=0,k.mV=0))),u8(l),l.Or===0))return k.oC=-1,0}if(y!==4)return 0;if(k.wrap<=0)return 1;k.wrap===2?(Iv(k,l.Js&255),Iv(k,l.Js>>8&255),Iv(k,l.Js>>16&255),Iv(k,l.Js>>24&255),Iv(k,l.Ui&255),Iv(k,l.Ui>>8&255),Iv(k,l.Ui>>16&255),Iv(k,l.Ui>>24&255)):(TR(k,l.Js>>>16),TR(k,l.Js&65535));u8(l);k.wrap>0&&
(k.wrap=-k.wrap);return k.pending!==0?0:1};
fu=function(l){if(!(this instanceof fu))return new fu(l);l=this.options=v9.assign({level:-1,method:8,chunkSize:16384,Z7:15,Mr:8,strategy:0,to:""},l||{});l.raw&&l.Z7>0?l.Z7=-l.Z7:l.DZ&&l.Z7>0&&l.Z7<16&&(l.Z7+=16);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.Er=new jW;this.Er.Or=0;var y=this.Er;var k=l.level,z=l.method,r=l.Z7,Z=l.Mr,e=l.strategy;if(y){var A=1;k===-1&&(k=6);r<0?(A=0,r=-r):r>15&&(A=2,r-=16);if(Z<1||Z>9||z!==8||r<8||r>15||k<0||k>9||e<0||e>4)y=Cu(y,-2);else{r===8&&(r=9);var Q=
new Hxq;y.state=Q;Q.Er=y;Q.wrap=A;Q.b$=null;Q.bu=r;Q.RF=1<<Q.bu;Q.YE=Q.RF-1;Q.MR=Z+7;Q.mq=1<<Q.MR;Q.Kw=Q.mq-1;Q.m1=~~((Q.MR+3-1)/3);Q.window=new v9.nR(Q.RF*2);Q.head=new v9.Cw(Q.mq);Q.m6=new v9.Cw(Q.RF);Q.Iy=1<<Z+6;Q.U2=Q.Iy*4;Q.o9=new v9.nR(Q.U2);Q.kJ=1*Q.Iy;Q.Gm=3*Q.Iy;Q.level=k;Q.strategy=e;Q.method=z;if(y&&y.state){y.Ui=y.F0=0;y.FN=2;k=y.state;k.pending=0;k.V6=0;k.wrap<0&&(k.wrap=-k.wrap);k.status=k.wrap?42:113;y.Js=k.wrap===2?0:1;k.oC=0;if(!SW){z=Array(16);for(Z=e=0;Z<28;Z++)for(dL[Z]=e,r=0;r<
1<<Op[Z];r++)tR[e++]=Z;tR[e-1]=Z;for(Z=e=0;Z<16;Z++)for(GR[Z]=e,r=0;r<1<<hR[Z];r++)wL[e++]=Z;for(e>>=7;Z<30;Z++)for(GR[Z]=e<<7,r=0;r<1<<hR[Z]-7;r++)wL[256+e++]=Z;for(r=0;r<=15;r++)z[r]=0;for(r=0;r<=143;)mJ[r*2+1]=8,r++,z[8]++;for(;r<=255;)mJ[r*2+1]=9,r++,z[9]++;for(;r<=279;)mJ[r*2+1]=7,r++,z[7]++;for(;r<=287;)mJ[r*2+1]=8,r++,z[8]++;rL(mJ,287,z);for(r=0;r<30;r++)q4[r*2+1]=5,q4[r*2]=zR(r,5);nu=new RS(mJ,Op,257,286,15);FN=new RS(q4,hR,0,30,15);ov=new RS([],Dbz,0,19,7);SW=!0}k.cC=new DM(k.Hi,nu);k.Xo=
new DM(k.wJ,FN);k.LC=new DM(k.Dd,ov);k.Xt=0;k.nf=0;ZJ(k);k=0}else k=Cu(y,-2);k===0&&(y=y.state,y.rl=2*y.RF,b8(y.head),y.Nz=Ep[y.level].DC,y.OV=Ep[y.level].W2,y.BQ=Ep[y.level].rk,y.N5=Ep[y.level].Wq,y.qW=0,y.VG=0,y.zE=0,y.mV=0,y.NK=y.KJ=2,y.vU=0,y.xd=0);y=k}}else y=-2;if(y!==0)throw Error(cR[y]);l.header&&(y=this.Er)&&y.state&&y.state.wrap===2&&(y.state.b$=l.header);if(l.zK){var t;typeof l.zK==="string"?t=B9(l.zK):N4.call(l.zK)==="[object ArrayBuffer]"?t=new Uint8Array(l.zK):t=l.zK;l=this.Er;Z=t;e=
Z.length;if(l&&l.state)if(t=l.state,y=t.wrap,y===2||y===1&&t.status!==42||t.zE)y=-2;else{y===1&&(l.Js=PR(l.Js,Z,e,0));t.wrap=0;e>=t.RF&&(y===0&&(b8(t.head),t.qW=0,t.VG=0,t.mV=0),k=new v9.nR(t.RF),v9.Z8(k,Z,e-t.RF,t.RF,0),Z=k,e=t.RF);k=l.Sa;z=l.SY;r=l.input;l.Sa=e;l.SY=0;l.input=Z;for(YG(t);t.zE>=3;){Z=t.qW;e=t.zE-2;do t.xd=(t.xd<<t.m1^t.window[Z+3-1])&t.Kw,t.m6[Z&t.YE]=t.head[t.xd],t.head[t.xd]=Z,Z++;while(--e);t.qW=Z;t.zE=2;YG(t)}t.qW+=t.zE;t.VG=t.qW;t.mV=t.zE;t.zE=0;t.NK=t.KJ=2;t.vU=0;l.SY=z;l.input=
r;l.Sa=k;t.wrap=y;y=0}else y=-2;if(y!==0)throw Error(cR[y]);this.l3z=!0}};
sp=function(l){var y=y||{};y.DZ=!0;y=new fu(y);y.push(l,!0);if(y.err)throw y.msg||cR[y.err];return y.result};
Lu=function(...l){return l.length===0?y=>y:l.length===1?l[0]:l.reduce((y,k)=>(...z)=>y(k(...z)))};
lr4=function(){var l=[];return y=>(k,z)=>{k=y(k,z);let r=()=>{throw Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.");};
const Z={getState:k.getState,dispatch:(e,...A)=>r(e,...A)};
z=l.map(e=>e(Z));
r=Lu(...z)(k.dispatch);return{...k,dispatch:r}}};
yoC=function(l){Object.keys(l).forEach(y=>{const k=l[y];if(typeof k(void 0,{type:vR})==="undefined")throw Error(`The slice reducer for key "${y}" returned undefined during initialization. `+"If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(typeof k(void 0,{type:`@@redux/PROBE_UNKNOWN_ACTION${BR()}`})==="undefined")throw Error(`The slice reducer for key "${y}" returned undefined when probed with a random type. Don't try to handle '${vR}' or other actions in "redux/*" `+
"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.");})};
HR=function(l,y,k){function z(){if(O)throw Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return A}
function r(w){if(typeof w!=="function")throw Error(`Expected the listener to be a function. Instead, received: '${typeof w}'`);if(O)throw Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let h=!0;t===Q&&(t=Q.slice());t.push(w);return function(){if(h){if(O)throw Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");
h=!1;t===Q&&(t=Q.slice());t.splice(t.indexOf(w),1);Q=null}}}
function Z(w){if(typeof w!=="object"||w===null)var h=!1;else{for(h=w;Object.getPrototypeOf(h)!==null;)h=Object.getPrototypeOf(h);h=Object.getPrototypeOf(w)===h}if(!h)throw Error(`Actions must be plain objects. Instead, the actual type was: '${typeof w}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);
if(typeof w.type==="undefined")throw Error('Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(O)throw Error("Reducers may not dispatch actions.");try{O=!0,A=e(A,w)}finally{O=!1}h=Q=t;for(let U=0;U<h.length;U++)(0,h[U])();return w}
if(typeof y==="function"&&typeof k==="function"||typeof k==="function"&&typeof arguments[3]==="function")throw Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");typeof y==="function"&&typeof k==="undefined"&&(k=y,y=void 0);if(typeof k!=="undefined"){if(typeof k!=="function")throw Error(`Expected the enhancer to be a function. Instead, received: '${typeof k}'`);
return k(HR)(l,y)}if(typeof l!=="function")throw Error(`Expected the root reducer to be a function. Instead, received: '${typeof l}'`);let e=l,A=y,Q=[],t=Q,O=!1;Z({type:vR});const d={dispatch:Z,subscribe:r,getState:z,replaceReducer:function(w){if(typeof w!=="function")throw Error(`Expected the nextReducer to be a function. Instead, received: '${typeof w}`);e=w;Z({type:kAq});return d},
[Rv]:function(){return{subscribe(w){function h(){w.next&&w.next(z())}
if(typeof w!=="object"||w===null)throw new TypeError(`Expected the observer to be an object. Instead, received: '${typeof w}'`);h();return{unsubscribe:r(h)}},[Rv](){return this}}}};
return d};
DJ=function(l){return l?(l=l.privateDoNotAccessOrElseSafeScriptWrappedValue)?Zl(l):null:null};
lO=function(l){return l?(l=l.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue)?jR(l):null:null};
ku=function(l){l=ye(l);return li(l)};
g.zp=function(l){l=ye(l);return jR(l)};
ye=function(l){return l===null?"null":l===void 0?"undefined":l};
rJ=function(){return g.UT("yt.ads.biscotti.lastId_")||""};
ZC=function(l){g.iQ("yt.ads.biscotti.lastId_",l)};
AK=function(...l){l=arguments;var y=eu;l.length>1?y[l[0]]=l[1]:l.length===1&&Object.assign(y,l[0])};
g.Y=function(l,y){return l in eu?eu[l]:y};
$u=function(l){const y=eu.EXPERIMENT_FLAGS;return y?y[l]:void 0};
zz5=function(l){Qe.forEach(y=>y(l))};
g.OJ=function(l){return l&&window.yterr?function(){try{return l.apply(this,arguments)}catch(y){g.tK(y)}}:l};
g.tK=function(l){var y=g.UT("yt.logging.errors.log");y?y(l,"ERROR",void 0,void 0,void 0,void 0,void 0):(y=g.Y("ERRORS",[]),y.push([l,"ERROR",void 0,void 0,void 0,void 0,void 0]),AK("ERRORS",y));zz5(l)};
dJ=function(l,y,k,z,r){var Z=g.UT("yt.logging.errors.log");Z?Z(l,"WARNING",y,k,z,void 0,r):(Z=g.Y("ERRORS",[]),Z.push([l,"WARNING",y,k,z,void 0,r]),AK("ERRORS",Z))};
Gp=function(l,y){y=l.split(y);const k={};for(let Z=0,e=y.length;Z<e;Z++){const A=y[Z].split("=");if(A.length===1&&A[0]||A.length===2)try{const Q=hK(A[0]||""),t=hK(A[1]||"");if(Q in k){const O=k[Q];Array.isArray(O)?g.Gx(O,t):k[Q]=[O,t]}else k[Q]=t}catch(Q){var z=Q,r=A[0];const t=String(Gp);z.args=[{key:r,value:A[1],query:l,method:roq===t?"unchanged":t}];Zoy.hasOwnProperty(r)||dJ(z)}}return k};
a3=function(l){const y=[];g.fR(l,(k,z)=>{const r=g.am(z);g.Fy(Array.isArray(k)?k:[k],Z=>{Z==""?y.push(r):y.push(`${r}=${g.am(Z)}`)})});
return y.join("&")};
iO=function(l){l.charAt(0)==="?"&&(l=l.substring(1));return Gp(l,"&")};
UJ=function(l){return l.split(",").map(y=>iO(y))};
g.MK=function(l){return l.indexOf("?")!==-1?(l=(l||"").split("#")[0],l=l.split("?",2),iO(l.length>1?l[1]:l[0])):{}};
cq=function(l,y){return X$(l,y||{},!0)};
Cl=function(l,y){return X$(l,y||{},!1)};
X$=function(l,y,k){var z=l.split("#",2);l=z[0];z=z.length>1?"#"+z[1]:"";var r=l.split("?",2);l=r[0];r=iO(r[1]||"");for(const Z in y)if(k||!g.vO(r,Z))r[Z]=y[Z];return g.UI(l,r)+z};
bO=function(l){if(!y)var y=window.location.href;const k=g.ee(l)[1]||null,z=g.$7(l);k&&z?(l=g.ee(l),y=g.ee(y),l=l[3]==y[3]&&l[1]==y[1]&&l[4]==y[4]):l=z?g.$7(y)===z&&(Number(g.ee(y)[4]||null)||null)===(Number(g.ee(l)[4]||null)||null):!0;return l};
F8=function(l){l||(l=document.location.href);l=g.ee(l)[1]||null;return l!==null&&l==="https"};
xu=function(l){l=uO(l);return l===null?!1:l[0]==="com"&&l[1].match(/^youtube(?:kids|-nocookie)?$/)?!0:!1};
mK=function(l){l=uO(l);return l===null?!1:l[1]==="google"?!0:l[2]==="google"?l[0]==="au"&&l[1]==="com"?!0:l[0]==="uk"&&l[1]==="co"?!0:!1:!1};
uO=function(l){l=g.$7(l);return l!==null?l.split(".").reverse():null};
hK=function(l){return l&&l.match(ezT)?l:ii(l)};
qK=function(l){a:{let k;try{k=l.Z.top.location.href}catch(z){l=2;break a}l=k?k===l.C.location.href?0:1:2}l={dt:AoC,flash:"0",frm:l};try{l.u_tz=-(new Date).getTimezoneOffset();try{var y=qj.history.length}catch(k){y=0}l.u_his=y;l.u_h=qj.screen?.height;l.u_w=qj.screen?.width;l.u_ah=qj.screen?.availHeight;l.u_aw=qj.screen?.availWidth;l.u_cd=qj.screen?.colorDepth}catch(k){}return l};
I3=function(l=rJ()){var y=Wq,k=Object,z=k.assign,r=qK(y);var Z=y.Z;let e,A,Q,t,O,d,w;try{var h=Z.screenX;var U=Z.screenY}catch(W){}try{var u=Z.outerWidth;e=Z.outerHeight}catch(W){}try{A=Z.innerWidth,Q=Z.innerHeight}catch(W){}try{t=Z.screenLeft,O=Z.screenTop}catch(W){}try{A=Z.innerWidth,Q=Z.innerHeight}catch(W){}try{d=Z.screen.availWidth,w=Z.screen.availTop}catch(W){}Z=[t,O,h,U,d,w,u,e,A,Q];h=pY(!1,y.Z.top);U=new $d4;"SVGElement"in g.aC&&"createElementNS"in g.aC.document&&U.set(0);u=$R5();u["allow-top-navigation-by-user-activation"]&&
U.set(1);u["allow-popups-to-escape-sandbox"]&&U.set(2);g.aC.crypto&&g.aC.crypto.subtle&&U.set(3);"TextDecoder"in g.aC&&"TextEncoder"in g.aC&&U.set(4);U=VJt(U);y=z.call(k,r,{bc:U,bih:h.height,biw:h.width,brdim:Z.join(),vis:t2(y.C),wgl:!!qj.WebGLRenderingContext});y.ca_type="image";l&&(y.bid=l);return y};
Quz=function(){if(!Tp)return null;const l=Tp();return"open"in l?l:null};
g.Pq=function(l){switch(Ve(l)){case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 304:return!0;default:return!1}};
Ve=function(l){return l&&"status"in l?l.status:-1};
g.JK=function(l,y){typeof l==="function"&&(l=g.OJ(l));return window.setTimeout(l,y)};
g.Yu=function(l,y){typeof l==="function"&&(l=g.OJ(l));return window.setInterval(l,y)};
g.pl=function(l){window.clearTimeout(l)};
g.Kl=function(l){window.clearInterval(l)};
g.EJ=function(l){l=gJ(l);return typeof l==="string"&&l==="false"?!1:!!l};
fl=function(l,y){l=gJ(l);return l===void 0&&y!==void 0?y:Number(l||0)};
ju=function(){return g.Y("EXPERIMENTS_TOKEN","")};
gJ=function(l){return g.Y("EXPERIMENT_FLAGS",{})[l]};
Su=function(){const l=[],y=g.Y("EXPERIMENTS_FORCED_FLAGS",{});for(var k of Object.keys(y))l.push({key:k,value:String(y[k])});k=g.Y("EXPERIMENT_FLAGS",{});for(const z of Object.keys(k))z.startsWith("force_")&&y[z]===void 0&&l.push({key:z,value:String(k[z])});return l};
nl=function(l,y,k="GET",z="",r,Z,e,A=!1,Q){const t=Quz();if(!t)return null;const O=()=>{(t&&"readyState"in t?t.readyState:0)===4&&y&&g.OJ(y)(t)};
"onloadend"in t?t.addEventListener("loadend",O,!1):t.onreadystatechange=O;g.EJ("debug_forward_web_query_parameters")&&(l=tw_(l));t.open(k,l,!0);Z&&(t.responseType=Z);e&&(t.withCredentials=!0);k=k==="POST"&&(window.FormData===void 0||!(z instanceof FormData));if(r=OoC(l,r))for(const d in r)t.setRequestHeader(d,r[d]),"content-type"===d.toLowerCase()&&(k=!1);k&&t.setRequestHeader("Content-Type","application/x-www-form-urlencoded");Q&&"onprogress"in t&&(t.onprogress=()=>{Q(t.responseText)});
if(A&&"setAttributionReporting"in XMLHttpRequest.prototype){l={eventSourceEligible:!0,triggerEligible:!1};try{t.setAttributionReporting(l)}catch(d){dJ(d)}}t.send(z);return t};
OoC=function(l,y={}){const k=bO(l),z=g.Y("INNERTUBE_CLIENT_NAME"),r=g.EJ("web_ajax_ignore_global_headers_if_set");for(const A in F$){let Q=g.Y(F$[A]);const t=A==="X-Goog-AuthUser"||A==="X-Goog-PageId";A!=="X-Goog-Visitor-Id"||Q||(Q=g.Y("VISITOR_DATA"));var Z;if(!(Z=!Q)){if(!(Z=k||(g.$7(l)?!1:!0))){Z=l;var e;if(e=g.EJ("add_auth_headers_to_remarketing_google_dot_com_ping")&&A==="Authorization"&&(z==="TVHTML5"||z==="TVHTML5_UNPLUGGED"||z==="TVHTML5_SIMPLY")&&mK(Z))Z=QK(Z)||"",Z=Z.split("/"),Z="/"+(Z.length>
1?Z[1]:""),e=Z==="/pagead";Z=e?!0:!1}Z=!Z}Z||r&&y[A]!==void 0||z==="TVHTML5_UNPLUGGED"&&t||(y[A]=Q)}"X-Goog-EOM-Visitor-Id"in y&&"X-Goog-Visitor-Id"in y&&delete y["X-Goog-Visitor-Id"];if(k||!g.$7(l))y["X-YouTube-Utc-Offset"]=String(-(new Date).getTimezoneOffset());if(k||!g.$7(l)){let A;try{A=(new Intl.DateTimeFormat).resolvedOptions().timeZone}catch{}A&&(y["X-YouTube-Time-Zone"]=A)}document.location.hostname.endsWith("youtubeeducation.com")||!k&&g.$7(l)||(y["X-YouTube-Ad-Signals"]=a3(I3()));return y};
NK=function(l,y){y.method="POST";y.postParams||(y.postParams={});return g.o3(l,y)};
ddP=function(l,y){if(window.fetch&&y.format!=="XML"){var k={method:y.method||"GET",credentials:"same-origin"};y.headers&&(k.headers=y.headers);y.priority&&(k.priority=y.priority);l=sJ(l,y);var z=Ll(l,y);z&&(k.body=z);y.withCredentials&&(k.credentials="include");var r=y.context||g.aC,Z=!1,e;fetch(l,k).then(A=>{if(!Z){Z=!0;e&&g.pl(e);var Q=A.ok,t=O=>{O=O||{};Q?y.onSuccess&&y.onSuccess.call(r,O,A):y.onError&&y.onError.call(r,O,A);y.onFinish&&y.onFinish.call(r,O,A)};
(y.format||"JSON")==="JSON"&&(Q||A.status>=400&&A.status<500)?A.json().then(t,()=>{t(null)}):t(null)}}).catch(()=>{y.onError&&y.onError.call(r,{},{})});
l=y.timeout||0;y.onFetchTimeout&&l>0&&(e=g.JK(()=>{Z||(Z=!0,g.pl(e),y.onFetchTimeout.call(y.context||g.aC))},l))}else g.o3(l,y)};
g.o3=function(l,y){const k=y.format||"JSON";l=sJ(l,y);var z=Ll(l,y);let r=!1,Z;const e=wi4(l,A=>{if(!r){r=!0;Z&&g.pl(Z);var Q=g.Pq(A),t=null,O=400<=A.status&&A.status<500,d=500<=A.status&&A.status<600;if(Q||O||d)t=hzz(l,k,A,y.convertToSafeHtml);Q&&(Q=GAP(k,A,t));t=t||{};O=y.context||g.aC;Q?y.onSuccess&&y.onSuccess.call(O,A,t):y.onError&&y.onError.call(O,A,t);y.onFinish&&y.onFinish.call(O,A,t)}},y.method,z,y.headers,y.responseType,y.withCredentials,!1,y.onProgress);
z=y.timeout||0;if(y.onTimeout&&z>0){const A=y.onTimeout;Z=g.JK(()=>{r||(r=!0,e.abort(),g.pl(Z),A.call(y.context||g.aC,e))},z)}return e};
sJ=function(l,y){y.includeDomain&&(l=document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:"")+l);const k=g.Y("XSRF_FIELD_NAME");if(y=y.urlParams)y[k]&&delete y[k],l=cq(l,y);return l};
Ll=function(l,y){const k=g.Y("XSRF_FIELD_NAME"),z=g.Y("XSRF_TOKEN");var r=y.postBody||"",Z=y.postParams;const e=g.Y("XSRF_FIELD_NAME");let A;y.headers&&(A=y.headers["Content-Type"]);y.excludeXsrf||g.$7(l)&&!y.withCredentials&&g.$7(l)!==document.location.hostname||y.method!=="POST"||A&&A!=="application/x-www-form-urlencoded"||y.postParams&&y.postParams[e]||(Z||(Z={}),Z[k]=z);(g.EJ("ajax_parse_query_data_only_when_filled")&&Z&&Object.keys(Z).length>0||Z)&&typeof r==="string"&&(r=iO(r),g.Am(r,Z),r=y.postBodyFormat&&
y.postBodyFormat==="JSON"?JSON.stringify(r):g.iI(r));Z=r||Z&&!g.DB(Z);!vq&&Z&&y.method!=="POST"&&(vq=!0,g.tK(Error("AJAX request with postData should use POST")));return r};
hzz=function(l,y,k,z){let r=null;switch(y){case "JSON":let Z;try{Z=k.responseText}catch(e){throw z=Error("Error reading responseText"),z.params=l,dJ(z),e;}l=k.getResponseHeader("Content-Type")||"";if(Z&&l.indexOf("json")>=0){Z.substring(0,5)===")]}'\n"&&(Z=Z.substring(5));try{r=JSON.parse(Z)}catch(e){}}break;case "XML":if(l=(l=k.responseXML)?arQ(l):null)r={},g.Fy(l.getElementsByTagName("*"),e=>{r[e.tagName]=io_(e)})}z&&Bq(r);
return r};
Bq=function(l){if(g.uQ(l))for(const y in l)y==="html_content"||hm(y,"_html")?l[y]=li(l[y]):Bq(l[y])};
GAP=function(l,y,k){if(y&&y.status===204)return!0;switch(l){case "JSON":return!!k;case "XML":return Number(k&&k.return_code)===0;case "RAW":return!0;default:return!!k}};
arQ=function(l){return l?(l=("responseXML"in l?l.responseXML:l).getElementsByTagName("root"))&&l.length>0?l[0]:null:null};
io_=function(l){let y="";g.Fy(l.childNodes,k=>{y+=k.nodeValue});
return y};
tw_=function(l){var y=window.location.search,k=g.$7(l);g.EJ("debug_handle_relative_url_for_query_forward_killswitch")||!k&&bO(l)&&(k=document.location.hostname);var z=QK(l);z=(k=k&&(k.endsWith("youtube.com")||k.endsWith("youtube-nocookie.com")))&&z&&z.startsWith("/api/");if(!k||z)return l;const r=iO(y),Z={};g.Fy(UdC,e=>{r[e]&&(Z[e]=r[e])});
return Cl(l,Z)};
R3=function(l,y){const k=g.r4(y);let z;return(new g.gs((r,Z)=>{k.onSuccess=e=>{g.Pq(e)?r(new Mwy(e)):Z(new Hq(`Request failed, status=${Ve(e)}`,"net.badstatus",e))};
k.onError=e=>{Z(new Hq("Unknown request error","net.unknown",e))};
k.onTimeout=e=>{Z(new Hq("Request timed out","net.timeout",e))};
z=g.o3(l,k)})).Ya(r=>{r instanceof ln&&z?.abort();
return n6(r)})};
g.DC=function(l,y,k,z,r=-1,Z){const e=Q=>new g.gs(t=>{setTimeout(t,Q)}),A=(Q,t,O)=>Q.Ya(d=>{if(t<=0||Ve(d.xhr)===403)return n6(new Hq("Request retried too many times","net.retryexhausted",d.xhr));
const w=Math.pow(2,k-t+1)*O,h=r>0?Math.min(r,w):w;return e(O).then(()=>{Z&&Z(d,t-1);return A(R3(l,y),t-1,h)})});
return A(R3(l,y),k-1,z)};
Xi5=function(l,y=null){l.N=2;l.C=y};
coe=function(l,y=null){l.N=1;l.C=y};
yu=function(l=null){const y=new ls;Xi5(y,l);return y};
k9=function(l=null){const y=new ls;coe(y,l);return y};
g.ZY=function(l,y,k,z="youtube.com",r=!1){z6||r8.set(""+l,y,{rf:k,path:"/",domain:z,secure:r})};
g.e_=function(l,y){if(!z6)return r8.get(""+l,y)};
g.AD=function(l,y="/",k="youtube.com"){z6||r8.remove(""+l,y,k)};
$9=function(){if(!r8.isEnabled())return!1;if(!r8.isEmpty())return!0;r8.set("TESTCOOKIESENABLED","1",{rf:60});if(r8.get("TESTCOOKIESENABLED")!=="1")return!1;r8.remove("TESTCOOKIESENABLED");return!0};
g.E=function(l,y){if(l)return l[y.name]};
Qu=function(l){const y=g.Y("INNERTUBE_HOST_OVERRIDE");y&&(l=String(y)+String(OI(l)));return l};
tD=function(l){const y={};g.EJ("json_condensed_response")&&(y.prettyPrint="false");return l=Cl(l,y)};
Ow=function(l,y="POST"){l={method:y,mode:bO(l)?"same-origin":"cors",credentials:bO(l)?"same-origin":"include"};y={};const k={};for(const z of Object.keys(y))y[z]&&(k[z]=y[z]);Object.keys(k).length>0&&(l.headers=k);return l};
d8=function(l,y={}){return`${"service"}:${l}/${Object.keys(y).sort().map(k=>k+":"+y[k]).join("/")}`};
w8=function(){const l=/Chrome\/(\d+)/.exec(g.Xv());return l?parseFloat(l[1]):NaN};
hD=function(){var l=/\sCobalt\/(\S+)\s/.exec(g.Xv());if(!l)return NaN;const y=[];for(const k of l[1].split("."))l=parseInt(k,10),l>=0&&y.push(l);return parseFloat(y.join("."))};
af=function(){return g.G6("android")&&g.G6("chrome")&&!(g.G6("trident/")||g.G6("edge/"))&&!g.G6("cobalt")};
g.is=function(){return g.G6("cobalt")};
Uw=function(){return g.G6("cobalt")&&g.G6("appletv")};
var Cj4=function(l){return X7[G[19]](this,3,1477,l)};
MP=function(){return g.G6("(ps3; leanback shell)")||g.G6("ps3")&&g.is()};
Xp=function(){return g.G6("(ps4; leanback shell)")||g.G6("ps4")&&g.is()};
g.cD=function(){return g.is()&&(g.G6("ps4 vr")||g.G6("ps4 pro vr"))};
CL=function(){const l=/WebKit\/([0-9]+)/.exec(g.Xv());return!!(l&&parseInt(l[1],10)>=600)};
bs=function(){const l=/WebKit\/([0-9]+)/.exec(g.Xv());return!!(l&&parseInt(l[1],10)>=602)};
boy=function(){return g.G6("iemobile")||g.G6("windows phone")&&g.G6("edge")};
qP=function(){return(us||x9)&&g.G6("applewebkit")&&!g.G6("version")&&(!g.G6("safari")||g.G6("gsa/"))};
If=function(){return g.WD&&g.G6("version/")};
T6=function(){return g.G6("smart-tv")&&g.G6("samsung")};
g.G6=function(l){const y=g.Xv();return y?y.toLowerCase().indexOf(l)>=0:!1};
Vu=function(){return jO()||qP()||If()?!0:g.Y("EOM_VISITOR_DATA")?!1:!0};
JD=function(l,y){return y===void 0||y===null?l:y==="1"||y===!0||y===1||y==="True"?!0:!1};
Y9=function(l,y,k){for(const z in k)if(k[z]==y)return k[z];return l};
pL=function(l,y){return y===void 0||y===null?l:Number(y)};
KL=function(l,y){return y===void 0||y===null?l:y.toString()};
g8=function(l,y){if(y){if(l==="fullwidth")return Infinity;if(l==="fullheight")return 0}return l&&(y=l.match(u85))&&(l=Number(y[2]),y=Number(y[1]),!isNaN(l)&&!isNaN(y)&&l>0)?y/l:NaN};
Ew=function(l){var y=l.docid||l.video_id||l.videoId||l.id;if(y)return y;y=l.raw_player_response;y||(l=l.player_response)&&(y=JSON.parse(l));return y&&y.videoDetails&&y.videoDetails.videoId||null};
xdy=function(l){return fL(l,!1)==="EMBEDDED_PLAYER_MODE_PFL"};
g.j_=function(l){return l==="EMBEDDED_PLAYER_LITE_MODE_FIXED_PLAYBACK_LIMIT"||l==="EMBEDDED_PLAYER_LITE_MODE_DYNAMIC_PLAYBACK_LIMIT"?!0:!1};
fL=function(l,y=!1){y=y?"EMBEDDED_PLAYER_MODE_DEFAULT":"EMBEDDED_PLAYER_MODE_UNKNOWN";window.location.hostname.includes("youtubeeducation.com")&&(y="EMBEDDED_PLAYER_MODE_PFL");let k=l.raw_embedded_player_response;if(!k&&(l=l.embedded_player_response))try{k=JSON.parse(l)}catch(z){return y}return k?Y9(y,k.embeddedPlayerMode,mdT):y};
qCq=function(){if(g.EJ("disable_biscotti_fetch_entirely_for_all_web_clients"))return Error("Biscotti id fetching has been disabled entirely.");if(!Vu())return Error("User has not consented - not fetching biscotti id.");const l=g.Y("PLAYER_VARS",{});if(g.ko(l,"privembed",!1)=="1")return Error("Biscotti ID is not available in private embed mode");if(xdy(l))return Error("Biscotti id fetching has been disabled for pfl.")};
Vw_=function(){const l=qCq();if(l!==void 0)return n6(l);S_||(S_=R3("//googleads.g.doubleclick.net/pagead/id",WYy).then(Ir5).Ya(y=>TPs(2,y)));
return S_};
Ir5=function(l){l=l.xhr.responseText;if(!w4(l,")]}'"))throw new nL;l=JSON.parse(l.substr(4));if((l.type||1)>1)throw new nL;l=l.id;ZC(l);S_=k9(l);Pjs(18E5,2);return l};
TPs=function(l,y){y=new Jog(y);ZC("");S_=yu(y);l>0&&Pjs(12E4,l-1);throw y;};
Pjs=function(l,y){g.JK(function(){R3("//googleads.g.doubleclick.net/pagead/id",WYy).then(Ir5,k=>TPs(y,k)).Ya(g.Vq)},l)};
YCT=function(){try{const l=g.UT("yt.ads.biscotti.getId_");return l?l():Vw_()}catch(l){return n6(l)}};
KYQ=function(l){l&&(l.dataset?l.dataset[pie()]="true":qTP(l))};
gHC=function(l){return l?l.dataset?l.dataset[pie()]:l.getAttribute("data-loaded"):null};
pie=function(){return EHy.loaded||(EHy.loaded="loaded".replace(/\-([a-z])/g,(l,y)=>y.toUpperCase()))};
frC=function(){var l=document;if("visibilityState"in l)return l.visibilityState;const y=Fp+"VisibilityState";if(y in l)return l[y]};
of=function(l,y){let k;Be(l,z=>{k=y[z];return!!k});
return k};
NP=function(l){if(l.requestFullscreen)l=l.requestFullscreen(void 0);else if(l.webkitRequestFullscreen)l=l.webkitRequestFullscreen();else if(l.mozRequestFullScreen)l=l.mozRequestFullScreen();else if(l.msRequestFullscreen)l=l.msRequestFullscreen();else if(l.webkitEnterFullscreen)l=l.webkitEnterFullscreen();else return Promise.reject(Error("Fullscreen API unavailable"));return l instanceof Promise?l:Promise.resolve()};
HD=function(l){var y;g.LL()?vD()==l&&(y=document):y=l;return y&&(l=of(["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],y))?(y=l.call(y),y instanceof Promise?y:Promise.resolve()):Promise.resolve()};
juP=function(l){return g.Dg(["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],y=>`on${y.toLowerCase()}`in l)};
SCs=function(){var l=document;return g.Dg(["fullscreenerror","webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"],y=>`on${y.toLowerCase()}`in l)};
g.LL=function(){return!!of(["fullscreenEnabled","webkitFullscreenEnabled","mozFullScreenEnabled","msFullscreenEnabled"],document)};
vD=function(l=!1){let y=of(["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"],document);if(l)for(;y&&y.shadowRoot;)y=y.shadowRoot.fullscreenElement;return y?y:null};
nHQ=function(l){if(document.body&&document.documentElement){const y=document.body.scrollTop+document.documentElement.scrollTop;l.Z=l.clientX+(document.body.scrollLeft+document.documentElement.scrollLeft);l.C=l.clientY+y}};
FYC=function(l,y,k,z={}){l.addEventListener&&(y!="mouseenter"||"onmouseenter"in document?y!="mouseleave"||"onmouseenter"in document?y=="mousewheel"&&"MozBoxSizing"in document.documentElement.style&&(y="MozMousePixelScroll"):y="mouseout":y="mouseover");return HO(Rf,r=>{const Z=typeof r[4]==="boolean"&&r[4]==!!z,e=g.uQ(r[4])&&g.uQ(z)&&g.z0(r[4],z);return!!r.length&&r[0]==l&&r[1]==y&&r[2]==k&&(Z||e)})};
g.DY=function(l,y,k,z={}){if(!l||!l.addEventListener&&!l.attachEvent)return"";let r=FYC(l,y,k,z);if(r)return r;r=++oHe.count+"";const Z=!(y!="mouseenter"&&y!="mouseleave"||!l.addEventListener||"onmouseenter"in document);let e;e=Z?A=>{A=new NP4(A);if(!xg(A.relatedTarget,Q=>Q==l,!0))return A.currentTarget=l,A.type=y,k.call(l,A)}:A=>{A=new NP4(A);
A.currentTarget=l;return k.call(l,A)};
e=g.OJ(e);l.addEventListener?(y=="mouseenter"&&Z?y="mouseover":y=="mouseleave"&&Z?y="mouseout":y=="mousewheel"&&"MozBoxSizing"in document.documentElement.style&&(y="MozMousePixelScroll"),suC()||typeof z==="boolean"?l.addEventListener(y,e,z):l.addEventListener(y,e,!!z.capture)):l.attachEvent(`on${y}`,e);Rf[r]=[l,y,k,e,z];return r};
vH5=function(l){return LY4(l,y=>g.ka(y,"ytp-ad-has-logging-urls"))};
LY4=function(l,y){const k=document.body||document;return g.DY(k,"click",z=>{const r=xg(z.target,Z=>Z===k||y(Z),!0);
r&&r!==k&&!r.disabled&&(z.currentTarget=r,l.call(r,z))})};
g.lw=function(l){l&&(typeof l=="string"&&(l=[l]),g.Fy(l,y=>{if(y in Rf){var k=Rf[y];const z=k[0],r=k[1],Z=k[3];k=k[4];z.removeEventListener?suC()||typeof k==="boolean"?z.removeEventListener(r,Z,k):z.removeEventListener(r,Z,!!k.capture):z.detachEvent&&z.detachEvent(`on${r}`,Z);delete Rf[y]}}))};
yE=function(l){for(let y in Rf)Rf[y][0]==l&&g.lw(y)};
kF=function(l){l=l||window.event;let y;l.composedPath&&typeof l.composedPath==="function"?y=l.composedPath():y=l.path;y&&y.length?l=y[0]:(l=l||window.event,l=l.target||l.srcElement,l.nodeType==3&&(l=l.parentNode));return l};
zT=function(l){this.K=l;this.Z=null;this.V=0;this.S=null;this.J=0;this.C=[];for(l=0;l<4;l++)this.C.push(0);this.N=0;this.Y=g.DY(window,"mousemove",(0,g.We)(this.D,this));this.A=g.Yu((0,g.We)(this.C_,this),25)};
rz=function(l,y,k,z){for(let r=0;r<k.length;r++)l.j(y,k[r],z)};
g.eY=function(l,y,k){var z=k&&k>0?k:0;k=z?Date.now()+z*1E3:0;if((z=z?g.ZA.X1():g.ZA.xg())&&window.JSON){typeof y!=="string"&&(y=JSON.stringify(y,void 0));try{z.set(l,y,k)}catch(r){z.remove(l)}}};
g.Ay=function(l){const y=g.ZA.xg(),k=g.ZA.X1();if(!y&&!k||!window.JSON)return null;let z;try{z=y.get(l)}catch(r){}if(typeof z!=="string")try{z=k.get(l)}catch(r){}if(typeof z!=="string")return null;try{z=JSON.parse(z,void 0)}catch(r){}return z};
BPP=function(){var l=g.ZA.X1();if(l&&(l=l.jX("yt-player-quality")))return l.creation};
g.$F=function(l){try{const y=g.ZA.xg(),k=g.ZA.X1();y&&y.remove(l);k&&k.remove(l)}catch(y){}};
g.QE=function(){return g.Ay("yt-remote-session-screen-id")};
ty=function(){if(!g.aC.matchMedia)return"WEB_DISPLAY_MODE_UNKNOWN";try{return g.aC.matchMedia("(display-mode: standalone)").matches?"WEB_DISPLAY_MODE_STANDALONE":g.aC.matchMedia("(display-mode: minimal-ui)").matches?"WEB_DISPLAY_MODE_MINIMAL_UI":g.aC.matchMedia("(display-mode: fullscreen)").matches?"WEB_DISPLAY_MODE_FULLSCREEN":g.aC.matchMedia("(display-mode: browser)").matches?"WEB_DISPLAY_MODE_BROWSER":"WEB_DISPLAY_MODE_UNKNOWN"}catch(l){return"WEB_DISPLAY_MODE_UNKNOWN"}};
HoP=function(){OV.instance||(OV.instance=new OV);return OV.instance};
RzT=function(l){switch(l){case "DESKTOP":return 1;case "UNKNOWN_PLATFORM":return 0;case "TV":return 2;case "GAME_CONSOLE":return 3;case "MOBILE":return 4;case "TABLET":return 5}};
g.wz=function(){dz||(dz=new DdP);return dz};
GT=function(l,y){var k=`f${Math.floor(l/31)+1}`;l=1<<l%31;let z=lDQ(k)||0;z=y?z|l:z&~l;z===0?delete hy[k]:(y=z.toString(16),hy[k]=y.toString())};
aa=function(l){if(/^f([1-9][0-9]*)$/.test(l))throw Error(`ExpectedRegexMatch: ${l}`);};
iw=function(l){if(!/^\w+$/.test(l))throw Error(`ExpectedRegexMismatch: ${l}`);};
lDQ=function(l){l=hy[l]!==void 0?hy[l].toString():null;return l!=null&&/^[A-Fa-f0-9]+$/.test(l)?parseInt(l,16):null};
yOe=function(){const l=g.aC.navigator;return l?l.connection:void 0};
z9y=function(){var l=yOe();if(l){var y=k7q[l.type||"unknown"]||"CONN_UNKNOWN";l=k7q[l.effectiveType||"unknown"]||"CONN_UNKNOWN";y==="CONN_CELLULAR_UNKNOWN"&&l!=="CONN_UNKNOWN"&&(y=l);if(y!=="CONN_UNKNOWN")return y;if(l!=="CONN_UNKNOWN")return l}};
ZZq=function(){var l=yOe();if(l?.effectiveType)return rOy.hasOwnProperty(l.effectiveType)?rOy[l.effectiveType]:"EFFECTIVE_CONNECTION_TYPE_UNKNOWN"};
Ml=function(){try{return g.UV(),!0}catch(l){return!1}};
g.UV=function(l="unknown"){if(g.Y("DATASYNC_ID")!==void 0)return g.Y("DATASYNC_ID");throw new g.WO("Datasync ID not set",l);};
g.cs=function(l,y,k){return Xl(y,0,k)};
e9C=function(l){const y=g.UT("yt.scheduler.instance.addImmediateJob");y?y(l):l()};
g.bw=function(){Cm.instance||(Cm.instance=new Cm);return Cm.instance};
Xl=function(l,y,k){k!==void 0&&Number.isNaN(Number(k))&&(k=void 0);const z=g.UT("yt.scheduler.instance.addJob");return z?z(l,y,k):k===void 0?(l(),NaN):g.JK(l,k||0)};
g.uw=function(){return!!g.UT("yt.scheduler.instance")};
xF=function(l){const y=g.UT("yt.scheduler.instance.setPriorityThreshold");y&&y(l)};
ql=function(){return ml()?.get("LAST_RESULT_ENTRY_KEY",!0)};
VE=function(l){Ws||(Ia?Ia.Al(l):(TT.push({type:"ERROR",payload:l}),TT.length>10&&TT.shift()))};
Ps=function(l,y){Ws||(Ia?Ia.logEvent(l,y):(TT.push({type:"EVENT",eventType:l,payload:y}),TT.length>10&&TT.shift()))};
Jy=function(l){if(l.indexOf(":")>=0)throw Error("Database name cannot contain ':'");};
YF=function(l){return l.substr(0,l.indexOf(":"))||l};
EV=function(l,y,k,z){y=YF(y);let r;r=l instanceof Error?l:Error(`Unexpected error: ${l}`);if(r instanceof g.pm)return r;l={objectStoreNames:k,dbName:y,dbVersion:z};if(r.name==="QuotaExceededError")return new g.pm("QUOTA_EXCEEDED",l);if(g.Km&&r.name==="UnknownError")return new g.pm("QUOTA_MAYBE_EXCEEDED",l);if(r instanceof gz)return new g.pm("MISSING_INDEX",{...l,objectStore:r.objectStore,index:r.index});if(r.name==="InvalidStateError"&&AO_.some(Z=>r.message.includes(Z)))return new g.pm("EXECUTE_TRANSACTION_ON_CLOSED_DB",
l);
if(r.name==="AbortError")return new g.pm("UNKNOWN_ABORT",l,r.message);r.args=[{...l,name:"IdbError",ME:r.name}];r.level="WARNING";return r};
g.fm=function(l,y,k){const z=ql();return new g.pm("IDB_NOT_SUPPORTED",{context:{caller:l,publicName:y,version:k,hasSucceededOnce:z?.hasSucceededOnce}})};
$hy=function(l){if(!l)throw Error();throw l;};
QsP=function(l){return l};
t6C=function(l,y,k,z,r){try{if(l.state.status!=="FULFILLED")throw Error("calling handleResolve before the promise is fulfilled.");const Z=k(l.state.value);Z instanceof g.jY?SY(l,y,Z,z,r):z(Z)}catch(Z){r(Z)}};
OZz=function(l,y,k,z,r){try{if(l.state.status!=="REJECTED")throw Error("calling handleReject before the promise is rejected.");const Z=k(l.state.reason);Z instanceof g.jY?SY(l,y,Z,z,r):z(Z)}catch(Z){r(Z)}};
SY=function(l,y,k,z,r){y===k?r(new TypeError("Circular promise chain detected.")):k.then(Z=>{Z instanceof g.jY?SY(l,y,Z,z,r):z(Z)},Z=>{r(Z)})};
dhe=function(l,y,k){const z=()=>{try{l.removeEventListener("success",r),l.removeEventListener("error",Z)}catch{}},r=()=>{y(l.result);
z()},Z=()=>{k(l.error);
z()};
l.addEventListener("success",r);l.addEventListener("error",Z)};
whs=function(l){return new Promise((y,k)=>{dhe(l,y,k)})};
Fl=function(l){return new g.jY(new nm((y,k)=>{dhe(l,y,k)}))};
oa=function(l,y){return new g.jY(new nm((k,z)=>{const r=()=>{const Z=l?y(l):null;Z?Z.then(e=>{l=e;r()},z):k()};
r()}))};
G7s=function(l){return Fl(l).then(y=>y?new h94(l,y):null)};
g.aDs=function(l){l.cursor.continue(void 0);return G7s(l.request)};
Nl=function(){return g.EJ("idb_immediate_commit")};
g.sV=async function(l,y,k,z){const r={mode:"readonly",nP:!1,tag:"IDB_TRANSACTION_TAG_UNKNOWN"};typeof k==="string"?r.mode=k:Object.assign(r,k);l.transactionCount++;k=r.nP?3:1;let Z=0,e;for(;!e;){Z++;const O=Math.round((0,g.f)());try{var A=l.Z.transaction(y,r.mode),Q=z,t=!!r.commit;const d=new iZQ(A),w=await Uhz(d,Q,t),h=Math.round((0,g.f)());M6s(l,O,h,Z,void 0,y.join(),r);return w}catch(d){Q=Math.round((0,g.f)());const w=EV(d,l.Z.name,y.join(),l.Z.version);if(w instanceof g.pm&&!w.Z||Z>=k)M6s(l,O,
Q,Z,w,y.join(),r),e=w}}return Promise.reject(e)};
Lm=function(l,y,k){l=l.Z.createObjectStore(y,k);return new XhP(l)};
vs=function(l,y){l.Z.objectStoreNames.contains(y)&&l.Z.deleteObjectStore(y)};
M6s=function(l,y,k,z,r,Z,e){y=k-y;r?(r instanceof g.pm&&(r.type==="QUOTA_EXCEEDED"||r.type==="QUOTA_MAYBE_EXCEEDED")&&Ps("QUOTA_EXCEEDED",{dbName:YF(l.Z.name),objectStoreNames:Z,transactionCount:l.transactionCount,transactionMode:e.mode}),r instanceof g.pm&&r.type==="UNKNOWN_ABORT"&&(k-=l.N,k<0&&k>=2147483648&&(k=0),Ps("TRANSACTION_UNEXPECTEDLY_ABORTED",{objectStoreNames:Z,transactionDuration:y,transactionCount:l.transactionCount,dbDuration:k}),l.C=!0),cOT(l,!1,z,Z,y,e.tag),VE(r)):cOT(l,!0,z,Z,y,
e.tag)};
cOT=function(l,y,k,z,r,Z="IDB_TRANSACTION_TAG_UNKNOWN"){Ps("TRANSACTION_ENDED",{objectStoreNames:z,connectionHasUnknownAbortedTransaction:l.C,duration:r,isSuccessful:y,tryCount:k,tag:Z})};
Bs=function(l,y,k){l.Z.createIndex(y,k,{unique:!1})};
g.Ra=function(l,y,k){l=l.Z.openCursor(y.query,y.direction);return Hs(l).then(z=>oa(z,k))};
C0Q=function(l,y){return g.Ra(l,{query:y},k=>k.delete().then(()=>g.DA(k))).then(()=>{})};
bZT=function(l,y,k){const z=[];return g.Ra(l,{query:y},r=>{if(!(k!==void 0&&z.length>=k))return z.push(r.getValue()),g.DA(r)}).then(()=>z)};
xh5=function(l){const y=[];return g.uUt(l,{query:void 0},k=>{y.push(k.cursor.primaryKey);return g.aDs(k)}).then(()=>y)};
mhT=function(l){return"getAllKeys"in IDBObjectStore.prototype?Fl(l.Z.getAllKeys(void 0,void 0)):xh5(l)};
g.uUt=function(l,y,k){const z=y.query;y=y.direction;l="openKeyCursor"in IDBObjectStore.prototype?l.Z.openKeyCursor(z,y):l.Z.openCursor(z,y);return G7s(l).then(r=>oa(r,k))};
Uhz=function(l,y,k){const z=new Promise((r,Z)=>{try{const e=y(l);k&&l.commit();e.then(A=>{r(A)}).catch(Z)}catch(e){Z(e),l.abort()}});
return Promise.all([z,l.done]).then(([r])=>r)};
g.lX=function(l,y,k){const {query:z=null,direction:r="next"}=y;l=l.Z.openCursor(z,r);return Hs(l).then(Z=>oa(Z,k))};
qST=function(l,y,k){const z=[];return g.lX(l,{query:y},r=>{if(!(k!==void 0&&z.length>=k))return z.push(r.getValue()),g.DA(r)}).then(()=>z)};
Hs=function(l){return Fl(l).then(y=>y?new WHP(l,y):null)};
g.DA=function(l){l.cursor.continue(void 0);return Hs(l.request)};
T0s=function(l,y,k){return new Promise((z,r)=>{let Z;Z=y!==void 0?self.indexedDB.open(l,y):self.indexedDB.open(l);const e=k.blocked,A=k.blocking,Q=k.nz,t=k.upgrade,O=k.closed;let d;const w=()=>{d||(d=new IDy(Z.result,{closed:O}));return d};
Z.addEventListener("upgradeneeded",h=>{try{if(h.newVersion===null)throw Error("Invariant: newVersion on IDbVersionChangeEvent is null");if(Z.transaction===null)throw Error("Invariant: transaction on IDbOpenDbRequest is null");h.dataLoss&&h.dataLoss!=="none"&&Ps("IDB_DATA_CORRUPTED",{reason:h.dataLossMessage||"unknown reason",dbName:YF(l)});const U=w(),u=new iZQ(Z.transaction);t&&t(U,W=>h.oldVersion<W&&h.newVersion>=W,u);
u.done.catch(W=>{r(W)})}catch(U){r(U)}});
Z.addEventListener("success",()=>{const h=Z.result;A&&h.addEventListener("versionchange",()=>{A(w())});
h.addEventListener("close",()=>{Ps("IDB_UNEXPECTEDLY_CLOSED",{dbName:YF(l),dbVersion:h.version});Q&&Q()});
z(w())});
Z.addEventListener("error",()=>{r(Z.error)});
e&&Z.addEventListener("blocked",()=>{e()})})};
V6q=function(l,y,k={}){return T0s(l,y,k)};
y4=async function(l,y={}){try{const k=self.indexedDB.deleteDatabase(l),z=y.blocked;z&&k.addEventListener("blocked",()=>{z()});
await whs(k)}catch(k){throw EV(k,l,"",-1);}};
P0C=function(l,y){return new g.pm("INCOMPATIBLE_DB_VERSION",{dbName:l.name,oldVersion:l.options.version,newVersion:y})};
g.kO=function(l,y){if(!y)throw g.fm("openWithToken",YF(l.name));return l.open()};
JOT=async function(l,y){return g.sV(await g.kO(z4,y),["databases"],{nP:!0,mode:"readwrite"},k=>{const z=k.objectStore("databases");return z.get(l.actualName).then(r=>{if(r?l.actualName!==r.actualName||l.publicName!==r.publicName||l.userIdentifier!==r.userIdentifier:1)return z.put(l).then(()=>{})})})};
rc=async function(l,y){return l?(await g.kO(z4,y)).delete("databases",l):void 0};
YS5=async function(l,y){const k=[];y=await g.kO(z4,y);await g.sV(y,["databases"],{nP:!0,mode:"readonly"},z=>{k.length=0;return g.Ra(z.objectStore("databases"),{},r=>{l(r.getValue())&&k.push(r.getValue());return g.DA(r)})});
return k};
phC=function(l,y){return YS5(k=>k.publicName===l&&k.userIdentifier!==void 0,y)};
KHP=async function(){if(ql()?.hasSucceededOnce)return!0;var l;if(!(l=Zu&&CL()&&!bs()||g.eG)){try{l=self;var y=!!(l.indexedDB&&l.IDBIndex&&l.IDBKeyRange&&l.IDBObjectStore)}catch(k){y=!1}l=!y}if(l||!("IDBTransaction"in self&&"objectStoreNames"in IDBTransaction.prototype))return!1;try{return await JOT({actualName:"yt-idb-test-do-not-use",publicName:"yt-idb-test-do-not-use",userIdentifier:void 0},AZ),await rc("yt-idb-test-do-not-use",AZ),!0}catch(k){return!1}};
gdC=function(){if($O!==void 0)return $O;Ws=!0;return $O=KHP().then(l=>{Ws=!1;if(ml()?.C()){var y={hasSucceededOnce:ql()?.hasSucceededOnce||l};ml()?.set("LAST_RESULT_ENTRY_KEY",y,2592E3,!0)}return l})};
Q4=function(){return g.UT("ytglobal.idbToken_")||void 0};
g.tZ=function(){const l=Q4();return l?Promise.resolve(l):gdC().then(y=>{y?(g.iQ("ytglobal.idbToken_",AZ),y=AZ):y=void 0;return y})};
Ed5=function(l){if(!Ml())throw l=new g.pm("AUTH_INVALID",{dbName:l}),VE(l),l;const y=g.UV();return{actualName:`${l}:${y}`,publicName:l,userIdentifier:y}};
fDT=async function(l,y,k,z){var r=Error().stack??"";const Z=await g.tZ();if(!Z)throw y=g.fm("openDbImpl",l,y),g.EJ("ytidb_async_stack_killswitch")||(y.stack=`${y.stack}\n${r.substring(r.indexOf("\n")+1)}`),VE(y),y;Jy(l);r=k?{actualName:l,publicName:l,userIdentifier:void 0}:Ed5(l);try{return await JOT(r,Z),await V6q(r.actualName,y,z)}catch(e){try{await rc(r.actualName,Z)}catch{}throw e;}};
jse=function(l,y,k={}){return fDT(l,y,!1,k)};
SSy=function(l,y,k={}){return fDT(l,y,!0,k)};
nd_=async function(l,y={}){const k=await g.tZ();k&&(Jy(l),l=Ed5(l),await y4(l.actualName,y),await rc(l.actualName,k))};
FHT=function(l,y,k){l=l.map(async z=>{await y4(z.actualName,y);await rc(z.actualName,k)});
return Promise.all(l).then(()=>{})};
ode=async function(l){var y={};const k=await g.tZ();k&&(Jy(l),l=await phC(l,k),await FHT(l,y,k))};
N0P=async function(l,y={}){const k=await g.tZ();k&&(Jy(l),await y4(l,y),await rc(l,k))};
LHq=function(l,y){let k;return()=>{k||(k=new ssC(l,y));return k}};
Ob=function(l,y){return LHq(l,y)};
dc=function(l){return g.kO(vd5(),l)};
B0z=async function(l,y,k,z){l={config:l,hashData:y,timestamp:z!==void 0?z:(0,g.f)()};k=await dc(k);await k.clear("hotConfigStore");return await k.put("hotConfigStore",l)};
HZy=async function(l,y,k,z,r){l={config:l,hashData:y,configData:k,timestamp:r!==void 0?r:(0,g.f)()};z=await dc(z);await z.clear("coldConfigStore");return await z.put("coldConfigStore",l)};
R9C=async function(l){l=await dc(l);let y=void 0;await g.sV(l,["coldConfigStore"],{mode:"readwrite",nP:!0},k=>g.lX(k.objectStore("coldConfigStore").index("coldTimestampIndex"),{direction:"prev"},z=>{y=z.getValue()}));
return y};
DhQ=async function(l){l=await dc(l);let y=void 0;await g.sV(l,["hotConfigStore"],{mode:"readwrite",nP:!0},k=>g.lX(k.objectStore("hotConfigStore").index("hotTimestampIndex"),{direction:"prev"},z=>{y=z.getValue()}));
return y};
lO_=async function(){await ode("ytGcfConfig")};
yFe=function(){if(!wc.instance){const l=new wc;wc.instance=l}return wc.instance};
hZ=function(l,y){l.C=y;g.iQ("yt.gcf.config.hotConfigGroup",l.C||null)};
G4=function(l,y){l.Z=y;g.iQ("yt.gcf.config.coldConfigGroup",l.Z||null)};
aL=function(){return g.UT("yt.gcf.config.coldConfigGroup")};
iX=function(){return g.UT("yt.gcf.config.hotConfigGroup")};
rFC=function(l){if(!l.C||!l.Z){if(!Q4()){const y=g.fm("scheduleGetConfigs");dJ(y)}l.V||(l.V=g.fF.zk(async()=>{try{await kM_(l)}catch{}try{await zGe(l)}catch{}l.V&&(l.V=0)},100))}};
Ub=function(l,y){l.coldHashData=y;g.iQ("yt.gcf.config.coldHashData",l.coldHashData||null)};
AFe=async function(l){if(g.EJ("start_client_gcf")||g.EJ("delete_gcf_config_db"))g.EJ("start_client_gcf")&&(await g.tZ()&&Ml()&&!g.EJ("delete_gcf_config_db")?(l.J=!0,rFC(l)):(ZpC(l),eGQ(l))),g.EJ("delete_gcf_config_db")&&await lO_()};
eGQ=function(l){hZ(l,g.Y("RAW_HOT_CONFIG_GROUP"));l.aV(g.Y("SERIALIZED_HOT_HASH_DATA"))};
kM_=async function(l){if(l.C)return iX();if(!l.J)return l=g.fm("getHotConfig IDB not initialized"),dJ(l),Promise.reject(l);const y=Q4(),k=g.Y("TIME_CREATED_MS");if(y){var z=await DhQ(y);if(z&&z.timestamp>k)return hZ(l,z.config),l.aV(z.hashData),iX()}else z=g.fm("getHotConfig token error"),dJ(z);eGQ(l);y&&l.C&&l.hotHashData&&await B0z(l.C,l.hotHashData,y,k);return l.C?iX():(l=new g.WO("Config not available in ytConfig"),dJ(l),Promise.reject(l))};
$oC=function(l,y){l.configData=y;g.iQ("yt.gcf.config.coldConfigData",l.configData||null)};
ZpC=function(l){G4(l,g.Y("RAW_COLD_CONFIG_GROUP"));Ub(l,g.Y("SERIALIZED_COLD_HASH_DATA"));$oC(l,l.Z?.configData)};
zGe=async function(l){if(l.Z)return aL();if(!l.J)return l=g.fm("getColdConfig IDB not initialized"),dJ(l),Promise.reject(l);const y=Q4(),k=g.Y("TIME_CREATED_MS");if(y){var z=await R9C(y);if(z&&z.timestamp>k)return G4(l,z.config),$oC(l,z.configData),Ub(l,z.hashData),aL()}else z=g.fm("getColdConfig"),dJ(z);ZpC(l);y&&l.Z&&l.coldHashData&&l.configData&&await HZy(l.Z,l.coldHashData,l.configData,y,k);return l.Z?aL():(l=new g.WO("Config not available in ytConfig"),dJ(l),Promise.reject(l))};
Qk5=async function(l,y,k){if(g.EJ("start_client_gcf")){k&&hZ(l,k);l.aV(y);const z=Q4();z&&(k||(k=(await DhQ(z))?.config),await B0z(k,y,z));if(k){l=l.S;for(const r of l.Z)r(k)}}};
tqC=async function(l,y,k){g.EJ("start_client_gcf")&&(Ub(l,y),l=Q4())&&(k||(k=(await R9C(l))?.config),k&&await HZy(k,y,k.configData,l))};
Opt=function(){var l=yFe(),y=(0,g.f)()-l.N;if(!(l.N!==0&&y<fl("send_config_hash_timer"))){y=g.UT("yt.gcf.config.coldConfigData");var k=g.UT("yt.gcf.config.hotHashData"),z=g.UT("yt.gcf.config.coldHashData");y&&k&&z&&(l.N=(0,g.f)());return{coldConfigData:y,hotHashData:k,coldHashData:z}}};
do5=function(){return"INNERTUBE_API_KEY"in eu&&"INNERTUBE_API_VERSION"in eu};
g.M8=function(){return{innertubeApiKey:g.Y("INNERTUBE_API_KEY"),innertubeApiVersion:g.Y("INNERTUBE_API_VERSION"),j1:g.Y("INNERTUBE_CONTEXT_CLIENT_CONFIG_INFO"),vP:g.Y("INNERTUBE_CONTEXT_CLIENT_NAME","WEB"),UP:g.Y("INNERTUBE_CONTEXT_CLIENT_NAME",1),innertubeContextClientVersion:g.Y("INNERTUBE_CONTEXT_CLIENT_VERSION"),Lt:g.Y("INNERTUBE_CONTEXT_HL"),U8:g.Y("INNERTUBE_CONTEXT_GL"),uy:g.Y("INNERTUBE_HOST_OVERRIDE")||"",PK:!!g.Y("INNERTUBE_USE_THIRD_PARTY_AUTH",!1),p8:!!g.Y("INNERTUBE_OMIT_API_KEY_WHEN_AUTH_HEADER_IS_PRESENT",
!1),appInstallData:g.Y("SERIALIZED_CLIENT_CONFIG_DATA")}};
g.XH=function(l){const y={client:{hl:l.Lt,gl:l.U8,clientName:l.vP,clientVersion:l.innertubeContextClientVersion,configInfo:l.j1}};navigator.userAgent&&(y.client.userAgent=String(navigator.userAgent));var k=g.aC.devicePixelRatio;k&&k!=1&&(y.client.screenDensityFloat=String(k));k=ju();k!==""&&(y.client.experimentsToken=k);k=Su();k.length>0&&(y.request={internalExperimentFlags:k});w$5(l,void 0,y);hGT(void 0,y);GMC(void 0,y);aOg(l,void 0,y);ipq(void 0,y);g.EJ("start_client_gcf")&&Uot(void 0,y);g.Y("DELEGATED_SESSION_ID")&&
!g.EJ("pageid_as_header_web")&&(y.user={onBehalfOfUser:g.Y("DELEGATED_SESSION_ID")});!g.EJ("fill_delegate_context_in_gel_killswitch")&&(l=g.Y("INNERTUBE_CONTEXT_SERIALIZED_DELEGATION_CONTEXT"))&&(y.user={...y.user,serializedDelegationContext:l});l=g.Y("INNERTUBE_CONTEXT");g.EJ("enable_persistent_device_token")&&l?.client?.rolloutToken&&(y.client.rolloutToken=l?.client?.rolloutToken);l=Object;k=l.assign;var z=y.client,r=g.Y("DEVICE","");const Z={};for(const [e,A]of Object.entries(iO(r))){r=e;const Q=
A;r==="cbrand"?Z.deviceMake=Q:r==="cmodel"?Z.deviceModel=Q:r==="cbr"?Z.browserName=Q:r==="cbrver"?Z.browserVersion=Q:r==="cos"?Z.osName=Q:r==="cosver"?Z.osVersion=Q:r==="cplatform"&&(Z.platform=Q)}y.client=k.call(l,z,Z);return y};
w$5=function(l,y,k){l=l.vP;if(l==="WEB"||l==="MWEB"||l===1||l===2)y?(k=DD(y,cS,96)||new cS,l=ty(),l=Object.keys(Mq_).indexOf(l),l=l===-1?null:l,l!==null&&iW(k,3,l),rZ(y,cS,96,k)):k&&(k.client.mainAppWebInfo=k.client.mainAppWebInfo??{},k.client.mainAppWebInfo.webDisplayMode=ty())};
hGT=function(l,y){const k=g.UT("yt.embedded_player.embed_url");k&&(l?(y=DD(l,Cv,7)||new Cv,GM(y,4,k),rZ(l,Cv,7,y)):y&&(y.thirdParty={embedUrl:k}))};
GMC=function(l,y){if(g.EJ("web_log_memory_total_kbytes")&&g.aC.navigator?.deviceMemory){const k=g.aC.navigator?.deviceMemory;l?Wh(l,95,fo(k*1E6)):y&&(y.client.memoryTotalKbytes=`${k*1E6}`)}};
aOg=function(l,y,k){l.appInstallData&&(y?(k=DD(y,bX,62)??new bX,GM(k,6,l.appInstallData),rZ(y,bX,62,k)):k&&(k.client.configInfo=k.client.configInfo||{},k.client.configInfo.appInstallData=l.appInstallData))};
ipq=function(l,y){var k=z9y();k&&(l?iW(l,61,X$4[k]):y&&(y.client.connectionType=k));g.EJ("web_log_effective_connection_type")&&(k=ZZq())&&(l?iW(l,94,cFe[k]):y&&(y.client.effectiveConnectionType=k))};
CW5=function(l,y,k={}){let z={};g.Y("EOM_VISITOR_DATA")?z={"X-Goog-EOM-Visitor-Id":g.Y("EOM_VISITOR_DATA")}:z={"X-Goog-Visitor-Id":k.visitorData||g.Y("VISITOR_DATA","")};if(y&&y.includes("www.youtube-nocookie.com"))return z;y=k.JJ||g.Y("AUTHORIZATION");y||(l?y=`Bearer ${g.UT("gapi.auth.getToken")().access_token}`:(l=HoP().Hm(uX),g.EJ("pageid_as_header_web")||delete l["X-Goog-PageId"],z={...z,...l}));y&&(z.Authorization=y);return z};
Uot=function(l,y){var k=Opt();if(k){var z=k.coldConfigData,r=k.coldHashData;k=k.hotHashData;l?(y=DD(l,bX,62)??new bX,z=GM(y,1,z),GM(z,3,r).aV(k),rZ(l,bX,62,y)):y&&(y.client.configInfo=y.client.configInfo||{},z&&(y.client.configInfo.coldConfigData=z),r&&(y.client.configInfo.coldHashData=r),k&&(y.client.configInfo.hotHashData=k))}};
xO=function(l){this.version=1;this.args=l};
m9=function(l,y){this.topic=l;this.Z=y};
WS=function(l,y){const k=q8();k&&k.publish.call(k,l.toString(),l,y)};
xoP=function(l){var y=bp_;const k=q8();if(!k)return 0;const z=k.subscribe(y.toString(),(r,Z)=>{var e=g.UT("ytPubsub2Pubsub2SkipSubKey");e&&e==z||(e=()=>{if(IL[z])try{if(Z&&y instanceof m9&&y!=r)try{{var A=y.Z,Q=Z;if(!Q.args||!Q.version)throw Error("yt.pubsub2.Data.deserialize(): serializedData is incomplete.");let t;try{if(!A.Ds){const O=new A;A.Ds=O.version}t=A.Ds}catch(O){}if(!t||Q.version!=t)throw Error("yt.pubsub2.Data.deserialize(): serializedData version is incompatible.");try{Z=Reflect.construct(A,
g.tp(Q.args))}catch(O){throw O.message="yt.pubsub2.Data.deserialize(): "+O.message,O;}}}catch(t){throw t.message="yt.pubsub2.pubsub2 cross-binary conversion error for "+y.toString()+": "+t.message,t;}l.call(window,Z)}catch(t){g.tK(t)}},ucC[y.toString()]?g.uw()?g.fF.zk(e):g.JK(e,0):e())});
IL[z]=!0;T4[y.toString()]||(T4[y.toString()]=[]);T4[y.toString()].push(z);return z};
Wxy=function(){var l=moC;const y=xoP(function(k){l.apply(void 0,arguments);qOt(y)});
return y};
qOt=function(l){const y=q8();y&&(typeof l==="number"&&(l=[l]),g.Fy(l,k=>{y.unsubscribeByKey(k);delete IL[k]}))};
q8=function(){return g.UT("ytPubsub2Pubsub2Instance")};
V4=function(l,y,k={sampleRate:.1}){Math.random()<Math.min(.02,k.sampleRate/100)&&WS("meta_logging_csi_event",{timerName:l,ykb:y})};
PS=function(l,y,k,z){const r={startTime:(0,g.f)(),ticks:{},infos:{}};try{const e=IOT(y);if(e==null||!(e>TZz||e<Vq_)){var Z=sp(PWg(y));const A=(0,g.f)();r.ticks.gelc=A;JFe++;g.EJ("gel_compression_csi_killswitch")||!g.EJ("log_gel_compression_latency")&&!g.EJ("log_gel_compression_latency_lr")||V4("gel_compression",r,{sampleRate:.1});k.headers||(k.headers={});k.headers["Content-Encoding"]="gzip";k.postBody=Z;k.postParams=void 0}z(l,k)}catch(e){dJ(e),z(l,k)}};
YOQ=function(l){(0,g.f)();if(!l.body)return l;try{const y=typeof l.body==="string"?l.body:JSON.stringify(l.body);let k=y;if(typeof y==="string"){const z=IOT(y);if(z!=null&&(z>TZz||z<Vq_))return l;k=sp(PWg(y));(0,g.f)()}l.headers={"Content-Encoding":"gzip",...(l.headers||{})};l.body=k;return l}catch(y){return dJ(y),l}};
IOT=function(l){try{return(new Blob(l.split(""))).size}catch(y){return dJ(y),null}};
JZ=function(l){return!!l.Gv||l.Zx};
p$s=function(l){JZ(l)&&!l.tI&&(l.Z=!0,l.yy&&Math.random()<=l.Qy&&l.wT.uD(l.Gv),l.CM(),l.rT.Qf()&&l.N(),l.rT.listen(l.sF,l.N.bind(l)),l.rT.listen(l.Pr,l.V.bind(l)))};
YO=function(l,y){l.Hp&&!l.rT.Qf()?l.Hp(y):l.handleError(y)};
Eh_=function(l,y){if(!JZ(l))throw Error("IndexedDB is not supported: updateRequestHandlers");const k=y.options.onError?y.options.onError:()=>{};
y.options.onError=async(r,Z)=>{const e=Kxs(Z),A=ghe(Z);A&&l.z7&&l.z7("web_enable_error_204")&&l.handleError(Error("Request failed due to compression"),y.url,Z);if(l.z7&&l.z7("nwl_consider_error_code")&&e||l.z7&&!l.z7("nwl_consider_error_code")&&l.potentialEsfErrorCounter<=l.P0)if(l.rT.ob&&await l.rT.ob(),!l.rT.Qf()){k(r,Z);l.z7&&l.z7("nwl_consider_error_code")&&y?.id!==void 0&&await l.wT.Fy(y.id,l.Gv,!1);return}l.z7&&l.z7("nwl_consider_error_code")&&!e&&l.potentialEsfErrorCounter>l.P0||(l.potentialEsfErrorCounter++,
y?.id!==void 0&&(y.sendCount<l.A0?(await l.wT.Fy(y.id,l.Gv,!0,A?!1:void 0),l.Jy.zk(()=>{l.rT.Qf()&&l.N()},l.yQ)):await l.wT.vL(y.id,l.Gv)),k(r,Z))};
const z=y.options.onSuccess?y.options.onSuccess:()=>{};
y.options.onSuccess=async(r,Z)=>{y?.id!==void 0&&await l.wT.vL(y.id,l.Gv);l.rT.PU&&l.z7&&l.z7("vss_network_hint")&&l.rT.PU(!0);z(r,Z)};
return y};
Kxs=function(l){return(l=l?.error?.code)&&l>=400&&l<=599?!1:!0};
ghe=function(l){l=l?.error?.code;return!(l!==400&&l!==415)};
fO4=function(){if(pv)return pv();pv=Ob("LogsDatabaseV2",{Zg:{LogsRequestsStore:{Bz:2}},shared:!1,upgrade(l,y,k){y(2)&&Lm(l,"LogsRequestsStore",{keyPath:"id",autoIncrement:!0});y(3);y(5)&&(k=k.objectStore("LogsRequestsStore"),k.Z.indexNames.contains("newRequest")&&k.Z.deleteIndex("newRequest"),Bs(k,"newRequestV2",["status","interface","timestamp"]));y(7)&&vs(l,"sapisid");y(9)&&vs(l,"SWHealthLog")},version:9});return pv()};
Kv=function(l){return g.kO(fO4(),l)};
SO4=async function(l,y){const k={startTime:(0,g.f)(),infos:{transactionType:"YT_IDB_TRANSACTION_TYPE_WRITE"},ticks:{}};y=await Kv(y);l={...l,options:JSON.parse(JSON.stringify(l.options)),interface:g.Y("INNERTUBE_CONTEXT_CLIENT_NAME",0)};l=await y.put("LogsRequestsStore",l);k.ticks.tc=(0,g.f)();jky(k);return l};
nhs=async function(l,y){const k={startTime:(0,g.f)(),infos:{transactionType:"YT_IDB_TRANSACTION_TYPE_READ"},ticks:{}};y=await Kv(y);var z=g.Y("INNERTUBE_CONTEXT_CLIENT_NAME",0),r=[l,z,0];z=[l,z,(0,g.f)()];const Z=IDBKeyRange.bound(r,z);let e="prev";g.EJ("use_fifo_for_networkless")&&(e="next");let A=void 0;r=l==="NEW"?"readwrite":"readonly";g.EJ("use_readonly_for_get_most_recent_by_status_killswitch")&&(r="readwrite");await g.sV(y,["LogsRequestsStore"],{mode:r,nP:!0},Q=>g.lX(Q.objectStore("LogsRequestsStore").index("newRequestV2"),
{query:Z,direction:e},t=>{t.getValue()&&(A=t.getValue(),l==="NEW"&&(A.status="QUEUED",t.update(A)))}));
k.ticks.tc=(0,g.f)();jky(k);return A};
Fxg=async function(l,y){return g.sV(await Kv(y),["LogsRequestsStore"],{mode:"readwrite",nP:!0},k=>{const z=k.objectStore("LogsRequestsStore");return z.get(l).then(r=>{if(r)return r.status="QUEUED",z.put(r).then(()=>r)})})};
oh5=async function(l,y,k=!0,z){return g.sV(await Kv(y),["LogsRequestsStore"],{mode:"readwrite",nP:!0},r=>{const Z=r.objectStore("LogsRequestsStore");return Z.get(l).then(e=>e?(e.status="NEW",k&&(e.sendCount+=1),z!==void 0&&(e.options.compress=z),Z.put(e).then(()=>e)):g.jY.resolve(void 0))})};
NZ5=async function(l,y){return(await Kv(y)).delete("LogsRequestsStore",l)};
skT=async function(l){l=await Kv(l);const y=(0,g.f)()-2592E6;await g.sV(l,["LogsRequestsStore"],{mode:"readwrite",nP:!0},k=>g.Ra(k.objectStore("LogsRequestsStore"),{},z=>{if(z.getValue().timestamp<=y)return z.delete().then(()=>g.DA(z))}))};
Lxt=async function(){await ode("LogsDatabaseV2")};
jky=function(l){g.EJ("nwl_csi_killswitch")||V4("networkless_performance",l,{sampleRate:1})};
BZy=function(l){return g.kO(vh5(),l)};
Hp5=async function(l){l=await BZy(l);const y=(0,g.f)()-2592E6;await g.sV(l,["SWHealthLog"],{mode:"readwrite",nP:!0},k=>g.Ra(k.objectStore("SWHealthLog"),{},z=>{if(z.getValue().timestamp<=y)return z.delete().then(()=>g.DA(z))}))};
RGs=async function(l){await (await BZy(l)).clear("SWHealthLog")};
g.Eb=function(l,y,k,z,r="",Z=!1,e=!1){if(l)if(k&&!g.is())dJ(new g.WO("Legacy referrer-scrubbed ping detected")),l&&Do4(l,void 0,{scrubReferrer:!0});else if(r)nl(l,y,"POST",r,z);else if(g.Y("USE_NET_AJAX_FOR_PING_TRANSPORT",!1)||z||e)nl(l,y,"GET","",z,void 0,Z,e);else{b:{try{c:{var A=new lvT({url:l});if(A.Z.dsh==="1")var Q=null;else{var t=A.Z.ae;if(t==="1"){const d=A.Z.adurl;if(d)try{Q={version:3,z1:decodeURIComponent(d),Me:aV(A.C,"act=1","ri=1",MDz(A))};break c}catch(w){}}Q=t==="2"?{version:4,z1:aV(A.C,
"dct=1","suid="+A.N,"ri=1"),Me:aV(A.C,"act=1","ri=1","suid="+A.N)}:null}}if(Q){const d=QK(l);var O=!(!d||!d.endsWith("/aclk")||CY(l,"ri")!=="1");break b}}catch(d){}O=!1}O?yE4(l)?(y&&y(),k=!0):k=!1:k=!1;k||Do4(l,y)}};
kg5=function(l,y=""){yE4(l,y)||g.Eb(l,void 0,void 0,void 0,y)};
yE4=function(l,y=""){try{if(window.navigator&&window.navigator.sendBeacon&&window.navigator.sendBeacon(l,y))return!0}catch(k){}return!1};
Do4=function(l,y,k={}){const z=new Image,r=""+zlq++;fv[r]=z;z.onload=z.onerror=()=>{y&&fv[r]&&y();delete fv[r]};
k.scrubReferrer&&(z.referrerPolicy="no-referrer");z.src=l};
rEP=function(l){return document.featurePolicy?.allowedFeatures().includes("attribution-reporting")?l+"&nis=6":l+"&nis=5"};
nv=function(){jG||(jG=new SG("yt.offline"));return jG};
Z$5=function(l){if(g.EJ("offline_error_handling")){var y=nv().get("errors",!0)||{};y[l.message]={name:l.name,stack:l.stack};l.level&&(y[l.message].level=l.level);nv().set("errors",y,2592E3,!0)}};
elz=function(){if(!FH.instance){const l=g.UT("yt.networkRequestMonitor.instance")||new FH;g.iQ("yt.networkRequestMonitor.instance",l);FH.instance=l}return FH.instance};
AEt=function(){if(!oL.instance){const l=g.UT("yt.networkStatusManager.instance")||new oL;g.iQ("yt.networkStatusManager.instance",l);oL.instance=l}return oL.instance};
$J5=function(l,y){l.rateLimit?l.Z?(g.fF.qJ(l.V),l.V=g.fF.zk(()=>{l.N!==y&&(l.dispatchEvent(y),l.N=y,l.Z=(0,g.f)())},l.rateLimit-((0,g.f)()-l.Z))):(l.dispatchEvent(y),l.N=y,l.Z=(0,g.f)()):l.dispatchEvent(y)};
N8=function(){let l=g.UT("yt.networklessRequestController.instance");l||(l=new QY_,g.iQ("yt.networklessRequestController.instance",l),g.EJ("networkless_logging")&&g.tZ().then(y=>{l.Gv=y;p$s(l);l.J.resolve();l.yy&&Math.random()<=l.Qy&&l.Gv&&Hp5(l.Gv);g.EJ("networkless_immediately_drop_sw_health_store")&&tkg(l)}));
return l};
tkg=async function(l){if(!l.Gv)throw g.fm("clearSWHealthLogsDb");RGs(l.Gv).catch(y=>{l.handleError(y)})};
O$t=function(l,y,k){y=g.EJ("web_fp_via_jspb")?Object.assign({},y):y;g.EJ("use_request_time_ms_header")?y.headers&&bO(l)&&(y.headers["X-Goog-Request-Time"]=JSON.stringify(Math.round((0,g.f)()))):y.postParams?.requestTimeMs&&(y.postParams.requestTimeMs=Math.round((0,g.f)()));k&&Object.keys(y).length===0?g.Eb(l):y.compress?y.postBody?(typeof y.postBody!=="string"&&(y.postBody=JSON.stringify(y.postBody)),PS(l,y.postBody,y,g.o3)):PS(l,JSON.stringify(y.postParams),y,NK):g.o3(l,y)};
sb=function(l,y){g.EJ("use_event_time_ms_header")&&bO(l)&&(y.headers||(y.headers={}),y.headers["X-Goog-Event-Time"]=JSON.stringify(Math.round((0,g.f)())));return y};
g.Lv=function(l,y,k,z){!g.Y("VISITOR_DATA")&&y!=="visitor_id"&&Math.random()<.01&&dJ(new g.WO("Missing VISITOR_DATA when sending innertube request.",y,k,z));if(!l.isReady())throw l=new g.WO("innertube xhrclient not ready",y,k,z),g.tK(l),l;const r={headers:z.headers||{},method:"POST",postParams:k,postBody:z.postBody,postBodyFormat:z.postBodyFormat||"JSON",onTimeout:()=>{z.onTimeout()},
onFetchTimeout:z.onTimeout,onSuccess:(t,O)=>{if(z.onSuccess)z.onSuccess(O)},
onFetchSuccess:t=>{if(z.onSuccess)z.onSuccess(t)},
onProgress:t=>{if(z.onProgress)z.onProgress(t)},
onError:(t,O)=>{if(z.onError)z.onError(O)},
onFetchError:t=>{if(z.onError)z.onError(t)},
timeout:z.timeout,withCredentials:!0,compress:z.compress};r.headers["Content-Type"]||(r.headers["Content-Type"]="application/json");k="";var Z=l.config_.uy;Z&&(k=Z);Z=l.config_.PK||!1;const e=CW5(Z,k,z);Object.assign(r.headers,e);r.headers.Authorization&&!k&&Z&&(r.headers["x-origin"]=window.location.origin);const A=cq(`${k}${`/${"youtubei"}/${l.config_.innertubeApiVersion}/${y}`}`,{alt:"json"}),Q=(t=!1)=>{try{if(t&&z.retry&&!z.networklessOptions.bypassNetworkless)r.method="POST",z.networklessOptions.writeThenSend?
N8().writeThenSend(A,r):N8().sendAndWrite(A,r);else if(z.compress)if(r.postBody){let O=r.postBody;typeof O!=="string"&&(O=JSON.stringify(r.postBody));PS(A,O,r,g.o3)}else PS(A,JSON.stringify(r.postParams),r,NK);else NK(A,r)}catch(O){if(O.name==="InvalidAccessError")dJ(Error("An extension is blocking network request."));else throw O;}};
g.UT("ytNetworklessLoggingInitializationOptions")&&dJs.isNwlInitialized?gdC().then(t=>{Q(t)}):Q(!1)};
g.Du=function(l,y,k){const z=g.vS();if(z&&y){const r=z.subscribe(l,function(){const Z=arguments,e=()=>{BS[r]&&y.apply&&typeof y.apply=="function"&&y.apply(k||window,Z)};
try{g.HS[l]?e():g.JK(e,0)}catch(A){g.tK(A)}},k);
BS[r]=!0;RL[l]||(RL[l]=[]);RL[l].push(r);return r}return 0};
w24=function(l){const y=g.Du("LOGGED_IN",function(k){l.apply(void 0,arguments);g.lP(y)})};
g.lP=function(l){const y=g.vS();y&&(typeof l==="number"?l=[l]:typeof l==="string"&&(l=[parseInt(l,10)]),g.Fy(l,k=>{y.unsubscribeByKey(k);delete BS[k]}))};
g.yD=function(l,y){const k=g.vS();return k?k.publish.apply(k,arguments):!1};
Gg_=function(l){const y=g.vS();if(y)if(y.clear(l),l)hl5(l);else for(let k in RL)hl5(k)};
g.vS=function(){return g.aC.ytPubsubPubsubInstance};
hl5=function(l){RL[l]&&(l=RL[l],g.Fy(l,y=>{BS[y]&&delete BS[y]}),l.length=0)};
g.k6=function(l,y,k=null){ave(l,y,k)};
ave=function(l,y,k=null){const z=i$P(typeof l==="string"?l:l.toString());let r=document.getElementById(z);var Z=r&&gHC(r);const e=r&&!Z;Z?y&&y():(y&&(Z=g.Du(z,y),y=`${g.mP(y)}`,UJt[y]=Z),e||(r=Mk_(l,z,()=>{gHC(r)||(KYQ(r),g.yD(z),g.JK(()=>{Gg_(z)},0))},k)))};
Mk_=function(l,y,k,z=null){const r=g.Gf("SCRIPT");r.id=y;r.onload=()=>{k&&setTimeout(k,0)};
r.onreadystatechange=()=>{switch(r.readyState){case "loaded":case "complete":r.onload()}};
z&&r.setAttribute("nonce",z);g.$v(r,typeof l==="string"?g.zp(l):l);l=document.getElementsByTagName("head")[0]||document.body;l.insertBefore(r,l.firstChild);return r};
i$P=function(l){const y=document.createElement("a");g.HC(y,l);l=y.href.replace(/^[a-zA-Z]+:\/\//,"//");return`js-${Xn(l)}`};
z_=function(l,y){if(l===y)l=!0;else if(Array.isArray(l)&&Array.isArray(y))l=g.u2(l,y,z_);else if(g.uQ(l)&&g.uQ(y))a:if(g.LR(l).length!=g.LR(y).length)l=!1;else{for(let k in l)if(!z_(l[k],y[k])){l=!1;break a}l=!0}else l=!1;return l};
em=function(l,...y){if(!rC(l)||y.some(k=>!rC(k)))throw Error("Only objects may be merged.");
for(const k of y)ZN(l,k)};
ZN=function(l,y){for(const k in y)if(rC(y[k])){if(k in l&&!rC(l[k]))throw Error("Cannot merge an object into a non-object.");k in l||(l[k]={});ZN(l[k],y[k])}else if(AW(y[k])){if(k in l&&!AW(l[k]))throw Error("Cannot merge an array into a non-array.");k in l||(l[k]=[]);X2q(l[k],y[k])}else l[k]=y[k];return l};
X2q=function(l,y){for(const k of y)rC(k)?l.push(ZN({},k)):AW(k)?l.push(X2q([],k)):l.push(k);return l};
rC=function(l){return typeof l==="object"&&!Array.isArray(l)};
AW=function(l){return typeof l==="object"&&Array.isArray(l)};
cEq=function(l,y){if(!y)return!1;for(let k=0;k<y.length;k++){const z=y.item(k);if(z&&l.N.includes(z.identifier))return!0}return!1};
QD=function(l){if(window.crypto&&window.crypto.getRandomValues)try{var y=Array(l),k=new Uint8Array(l);window.crypto.getRandomValues(k);for(var z=0;z<y.length;z++)y[z]=k[z];return y}catch(r){}y=Array(l);for(k=0;k<l;k++){z=Date.now();for(let r=0;r<z%23;r++)y[k]=Math.random();y[k]=Math.floor(Math.random()*256)}if($6)for(k=1,z=0;z<$6.length;z++)y[k%l]^=y[(k-1)%l]/4^$6.charCodeAt(z),k++;return y};
g.tW=function(l){l=QD(l);const y=[];for(let k=0;k<l.length;k++)y.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(l[k]&63));return y.join("")};
g.CU4=function(){return g.sT(QD(16),l=>(l&15).toString(16)).join("")};
u3Q=function(){({OEb:y=!1,pa$:l=!0}={});var l,y;if(g.UT("_lact",window)==null){var k=parseInt(g.Y("LACT"),10);k=isFinite(k)?Date.now()-Math.max(k,0):-1;g.iQ("_lact",k,window);g.iQ("_fact",k,window);k==-1&&OY();b$C(y,l);new zT(()=>{dC("mouse",100)})}};
b$C=function(l=!1,y=!0){var k=window;g.DY(k.document,"keydown",OY);g.DY(k.document,"keyup",OY);g.DY(k.document,"mousedown",OY);g.DY(k.document,"mouseup",OY);l?g.DY(k,"touchmove",()=>{dC("touchmove",200)},{passive:!0}):(g.DY(k,"resize",()=>{dC("resize",200)}),y&&g.DY(k,"scroll",()=>{dC("scroll",200)}));
g.DY(k.document,"touchstart",OY,{passive:!0});g.DY(k.document,"touchend",OY,{passive:!0})};
dC=function(l,y){wC[l]||(wC[l]=!0,g.fF.zk(()=>{OY();wC[l]=!1},y))};
OY=function(){g.UT("_lact",window)==null&&(u3Q(),g.UT("_lact",window));var l=Date.now();g.iQ("_lact",l,window);g.UT("_fact",window)==-1&&g.iQ("_fact",l,window);(l=g.UT("ytglobal.ytUtilActivityCallback_"))&&l()};
hW=function(){const l=g.UT("_lact",window);return l==null?-1:Math.max(Date.now()-l,0)};
aW=function(l){return new G_(l)};
iP=function(l,y){l.C.set(y.jf,y);const k=l.N.get(y.jf);if(k)try{k.MD(l.resolve(y.jf))}catch(z){k.wI(z)}};
M9=function(l,y,k,z=!1){if(k.indexOf(y)>-1)throw Error(`Deps cycle for: ${y}`);if(l.Z.has(y))return l.Z.get(y);if(!l.C.has(y)){if(z)return;throw Error(`No provider for: ${y}`);}z=l.C.get(y);k.push(y);if(z.Ag!==void 0)var r=z.Ag;else if(z.Yk)r=z[UY]?xJ5(l,z[UY],k):[],r=z.Yk(...r);else if(z.y_){r=z.y_;const Z=r[UY]?xJ5(l,r[UY],k):[];r=new r(...Z)}else throw Error(`Could not resolve providers for: ${y}`);k.pop();z.XhK||l.Z.set(y,r);return r};
xJ5=function(l,y,k){return y?y.map(z=>z instanceof G_?M9(l,z.key,k,!0):M9(l,z,k)):[]};
ck=function(){X1||(X1=new mJ5);return X1};
WBz=function(){var l=q4q;return()=>{const y=ck();y.resolve(aW(l))||iP(y,{jf:l,y_:l,[UY]:void 0});return y.resolve(l)}};
bP=function(){return"h5vcc"in Ca&&Ca.h5vcc.traceEvent?.traceBegin&&Ca.h5vcc.traceEvent?.traceEnd?1:"performance"in Ca&&Ca.performance.mark&&Ca.performance.measure?2:0};
uP=function(l){const y=bP();switch(y){case 1:Ca.h5vcc.traceEvent.traceBegin("YTLR",l);break;case 2:Ca.performance.mark(`${l}-start`);break;case 0:break;default:Rg(y,"unknown trace type")}};
Ivy=function(l){var y=bP();switch(y){case 1:Ca.h5vcc.traceEvent.traceEnd("YTLR",l);break;case 2:y=`${l}-start`;const k=`${l}-end`;Ca.performance.mark(k);Ca.performance.measure(l,y,k);break;case 0:break;default:Rg(y,"unknown trace type")}};
Tp5=function(l){var y=Array.from(l.Z.keys()).sort((k,z)=>(l.Z[z].priority??0)-(l.Z[k].priority??0));
for(const k of y)y=l.Z[k],y.jobId===void 0||y.EX||(l.scheduler.qJ(y.jobId),Xl(y.Fj,10))};
PU5=function(l,y,k){VkT&&console.groupCollapsed&&console.groupEnd&&(console.groupCollapsed(`[${l.constructor.name}] '${l.state}' to '${y}'`),console.log("with message: ",k),console.groupEnd())};
KB_=function(l,y){const k=y.filter(r=>(l.C??r.priority??0)===10),z=y.filter(r=>(l.C??r.priority??0)!==10);
return l.V.PHj?async(...r)=>{await JE5(k,...r);Y4C(l,z,...r)}:(...r)=>{p2z(k,...r);
Y4C(l,z,...r)}};
JE5=async function(l,...y){g.bw();for(const k of l){let z;e9C(()=>{x6(k.name);const r=mR(()=>k.callback(...y));
q9(r)?z=g.EJ("web_lifecycle_error_handling_killswitch")?r.then(()=>{Wk(k.name)}):r.then(()=>{Wk(k.name)},Z=>{window.onerror?.(Z.message,"",0,0,Z);
Wk(k.name)}):Wk(k.name)});
z&&await z}};
Y4C=function(l,y,...k){y=y.map(z=>({Fj:()=>{x6(z.name);mR(()=>z.callback(...k));
Wk(z.name)},
priority:l.C??z.priority??0}));
y.length&&(l.N=new gqe(y))};
p2z=function(l,...y){g.bw();for(const k of l)e9C(()=>{x6(k.name);mR(()=>k.callback(...y));
Wk(k.name)})};
x6=function(l){IW&&l&&uP(l)};
Wk=function(l){IW&&l&&Ivy(l)};
mR=function(l){if(g.EJ("web_lifecycle_error_handling_killswitch"))return l();try{return l()}catch(y){window.onerror?.(y.message,"",0,0,y)}};
fv5=function(){T_||(T_=new Eqy);return T_};
jYg=function(){VD||(VD=lO(g.Y("WORKER_SERIALIZATION_URL")));return VD||void 0};
S4C=function(){const l=jYg();Pk||l===void 0||(Pk=Ge(l));return Pk};
pa=function(l,y){const k=JW(y);if(l.C[k])return l.C[k];const z=Object.keys(l.store)||[];if(z.length<=1&&JW(y)===z[0])return z;const r=[];for(let e=0;e<z.length;e++){const A=z[e].split("/");if(Y6(y.auth,A[0])){var Z=y.isJspb;Y6(Z===void 0?"undefined":Z?"true":"false",A[1])&&Y6(y.cttAuthInfo,A[2])&&(Z=y.tier,Z=Z===void 0?"undefined":JSON.stringify(Z),Y6(Z,A[3])&&r.push(z[e]))}}return l.C[k]=r};
Y6=function(l,y){return l===void 0||l==="undefined"?!0:l===y};
JW=function(l){return[l.auth===void 0?"undefined":l.auth,l.isJspb===void 0?"undefined":l.isJspb,l.cttAuthInfo===void 0?"undefined":l.cttAuthInfo,l.tier===void 0?"undefined":l.tier].join("/")};
gC=function(){let l=g.UT("yt.logging.ims");l||(l=new Ka,g.iQ("yt.logging.ims",l));return l};
oqg=function(){if(typeof Worker==="function"&&jYg()&&!nq_){var l=k=>{k=k.data;if(k.op==="serializedGelBatch"){var z=EY.get(k.key);z&&(FBs(k.serializedBatch,z.client,z.resolve,z.networklessOptions,z.isIsolated,z.useVSSEndpoint,z.dangerousLogToVisitorSession,z.requestsOutstanding),EY.delete(k.key))}},y=S4C();
y&&(y.addEventListener("message",l),y.onerror=()=>{EY.clear()});
nq_=!0}};
H$y=function(l,y){if(l.endpoint==="log_event"){fa(l);var k=jm(l),z=Npz(l.payload)||"",r=sYs(z),Z=200;if(r){if(r.enabled===!1&&!g.EJ("web_payload_policy_disabled_killswitch"))return;Z=LBs(r.tier);if(Z===400){vqC(l,y);return}}Sm[k]=!0;k={cttAuthInfo:k,isJspb:!1,tier:Z};gC().storePayload(k,l.payload);BpC(y,!1,k,na(z))}};
DJT=function(l,y,k){if(y.endpoint==="log_event"){fa(void 0,y);var z=jm(y,!0),r=sYs(l),Z=200;if(r){if(r.enabled===!1&&!g.EJ("web_payload_policy_disabled_killswitch"))return;Z=LBs(r.tier);if(Z===400){Rl5(l,y,k);return}}Sm[z]=!0;z={cttAuthInfo:z,isJspb:!0,tier:Z};gC().storePayload(z,d0(y.payload));BpC(k,!0,z,na(l))}};
BpC=function(l,y=!1,k,z=!1){l&&(F1=new l);l=fl("tvhtml5_logging_max_batch_ads_fork")||fl("tvhtml5_logging_max_batch")||fl("web_logging_max_batch")||100;const r=(0,g.f)(),Z=oW(y,k.tier),e=Z.V;z&&(Z.N=!0);z=0;k&&(z=gC().getSequenceCount(k));z>=1E3?N9({writeThenSend:!0},y,k.tier):z>=l?sY||(sY=La(()=>{N9({writeThenSend:!0},y,k.tier);sY=void 0},0)):r-e>=10&&(l34(y,k.tier),Z.V=r)};
vqC=function(l,y){if(l.endpoint==="log_event"){g.EJ("more_accurate_gel_parser")&&gC().storePayload({isJspb:!1},l.payload);fa(l);var k=jm(l),z=new Map;z.set(k,[l.payload]);var r=Npz(l.payload)||"";y&&(F1=new y);return new g.gs((Z,e)=>{F1&&F1.isReady()?ywP(z,F1,Z,e,{bypassNetworkless:!0},!0,na(r)):Z()})}};
Rl5=function(l,y,k){if(y.endpoint==="log_event"){fa(void 0,y);var z=jm(y,!0),r=new Map;r.set(z,[d0(y.payload)]);k&&(F1=new k);return new g.gs(Z=>{F1&&F1.isReady()?koq(r,F1,Z,{bypassNetworkless:!0},!0,na(l)):Z()})}};
jm=function(l,y=!1){var k="";if(l.dangerousLogToVisitorSession)k="visitorOnlyApprovedKey";else if(l.cttAuthInfo){if(y){y=l.cttAuthInfo.token;k=l.cttAuthInfo;const z=new zmq;k.videoId?z.setVideoId(k.videoId):k.playlistId&&sS(z,2,vk,Hi(k.playlistId));Bk[y]=z}else y=l.cttAuthInfo,k={},y.videoId?k.videoId=y.videoId:y.playlistId&&(k.playlistId=y.playlistId),Hk[l.cttAuthInfo.token]=k;k=l.cttAuthInfo.token}return k};
N9=function(l={},y=!1,k){new g.gs((z,r)=>{const Z=oW(y,k),e=Z.N;Z.N=!1;RW(Z.C);RW(Z.Z);Z.Z=0;F1&&F1.isReady()?k===void 0&&g.EJ("enable_web_tiered_gel")?rwC(z,r,l,y,300,e):rwC(z,r,l,y,k,e):(l34(y,k),z())})};
rwC=function(l,y,k={},z=!1,r=200,Z=!1){var e=F1,A=new Map;const Q=new Map,t={isJspb:z,cttAuthInfo:void 0,tier:r},O={isJspb:z,cttAuthInfo:void 0};if(z){for(const d of Object.keys(Sm))y=g.EJ("enable_web_tiered_gel")?gC().smartExtractMatchingEntries({keys:[t,O],sizeLimit:1E3}):gC().extractMatchingEntries({isJspb:!0,cttAuthInfo:d}),y.length>0&&A.set(d,y),(g.EJ("web_fp_via_jspb_and_json")&&k.writeThenSend||!g.EJ("web_fp_via_jspb_and_json"))&&delete Sm[d];koq(A,e,l,k,!1,Z)}else{for(const d of Object.keys(Sm))A=
g.EJ("enable_web_tiered_gel")?gC().smartExtractMatchingEntries({keys:[{isJspb:!1,cttAuthInfo:d,tier:r},{isJspb:!1,cttAuthInfo:d}],sizeLimit:1E3}):gC().extractMatchingEntries({isJspb:!1,cttAuthInfo:d}),A.length>0&&Q.set(d,A),(g.EJ("web_fp_via_jspb_and_json")&&k.writeThenSend||!g.EJ("web_fp_via_jspb_and_json"))&&delete Sm[d];ywP(Q,e,l,y,k,!1,Z)}};
l34=function(l=!1,y=200){const k=()=>{N9({writeThenSend:!0},l,y)},z=oW(l,y);
var r=z===ZYC||z===emP?5E3:Aws;g.EJ("web_gel_timeout_cap")&&!z.Z&&(r=La(()=>{k()},r),z.Z=r);
RW(z.C);r=g.Y("LOGGING_BATCH_TIMEOUT",fl("web_gel_debounce_ms",1E4));g.EJ("shorten_initial_gel_batch_timeout")&&DN&&(r=$AC);r=La(()=>{fl("gel_min_batch_size")>0?gC().getSequenceCount({cttAuthInfo:void 0,isJspb:l,tier:y})>=QKQ&&k():k()},r);
z.C=r};
ywP=function(l,y,k,z,r={},Z,e){const A=Math.round((0,g.f)());let Q=l.size;const t=tee(e);for(const [O,d]of l){l=O;e=d;const w=g.Ze({context:g.XH(y.config_||g.M8())});if(!g.CC(e)&&!g.EJ("throw_err_when_logevent_malformed_killswitch")){z();break}w.events=e;(e=Hk[l])&&OYz(w,l,e);delete Hk[l];const h=l==="visitorOnlyApprovedKey";dAy(w,A,h);wLs(r);const U=V=>{g.EJ("start_client_gcf")&&g.fF.zk(async()=>{await hmP(V)});
Q--;Q||k()};
let u=0;const W=()=>{u++;if(r.bypassNetworkless&&u===1)try{g.Lv(y,t,w,lq({writeThenSend:!0},h,U,W,Z)),DN=!1}catch(V){g.tK(V),z()}Q--;Q||k()};
try{g.Lv(y,t,w,lq(r,h,U,W,Z)),DN=!1}catch(V){g.tK(V),z()}}};
koq=function(l,y,k,z={},r,Z){const e=Math.round((0,g.f)()),A={value:l.size};var Q=new Map([...l]);for(const [W]of Q){var t=W,O=l.get(t);Q=new g.kE;var d=y.config_||g.M8(),w=new zd,h=new Go_;GM(h,1,d.Lt);GM(h,2,d.U8);iW(h,16,d.UP);GM(h,17,d.innertubeContextClientVersion);if(d.j1){var U=d.j1,u=new bX;U.coldConfigData&&GM(u,1,U.coldConfigData);U.appInstallData&&GM(u,6,U.appInstallData);U.coldHashData&&GM(u,3,U.coldHashData);U.hotHashData&&u.aV(U.hotHashData);rZ(h,bX,62,u)}(U=g.aC.devicePixelRatio)&&
U!=1&&Wh(h,65,Co(U));U=ju();U!==""&&GM(h,54,U);U=Su();if(U.length>0){u=new a3T;for(let V=0;V<U.length;V++){const T=new iYe;GM(T,1,U[V].key);sS(T,2,UAy,Hi(U[V].value));AF(u,15,iYe,T)}rZ(w,a3T,5,u)}w$5(d,h);hGT(w);GMC(h);aOg(d,h);ipq(h);g.EJ("start_client_gcf")&&Uot(h);g.Y("DELEGATED_SESSION_ID")&&!g.EJ("pageid_as_header_web")&&(d=new rv,GM(d,3,g.Y("DELEGATED_SESSION_ID")));!g.EJ("fill_delegate_context_in_gel_killswitch")&&(U=g.Y("INNERTUBE_CONTEXT_SERIALIZED_DELEGATION_CONTEXT"))&&(u=DD(w,rv,3)||new rv,
d=w,U=GM(u,18,U),rZ(d,rv,3,U));d=h;U=g.Y("DEVICE","");for(const [V,T]of Object.entries(iO(U)))U=V,u=T,U==="cbrand"?GM(d,12,u):U==="cmodel"?GM(d,13,u):U==="cbr"?GM(d,87,u):U==="cbrver"?GM(d,88,u):U==="cos"?GM(d,18,u):U==="cosver"?GM(d,19,u):U==="cplatform"&&iW(d,42,RzT(u));w.N(h);rZ(Q,zd,1,w);if(h=Bk[t])a:{if(h.Qi())w=1;else if(h.getPlaylistId())w=2;else break a;rZ(Q,zmq,4,h);h=DD(Q,zd,1)||new zd;d=DD(h,rv,3)||new rv;U=new Mes;U.setToken(t);iW(U,1,w);AF(d,12,Mes,U);rZ(h,rv,3,d)}delete Bk[t];t=t===
"visitorOnlyApprovedKey";Zx()||hF(Q,2,e);!t&&(w=g.Y("EVENT_ID"))&&(h=XLP(),d=new cwe,GM(d,1,w),hF(d,2,h),rZ(Q,cwe,5,d));wLs(z);if(g.EJ("jspb_serialize_with_worker")&&(w=S4C())&&z.writeThenSend){EY.set(e0,{client:y,resolve:k,networklessOptions:z,isIsolated:r,useVSSEndpoint:Z,dangerousLogToVisitorSession:t,requestsOutstanding:A});w.postMessage({op:"gelBatchToSerialize",batchRequest:d0(Q),clientEvents:O,key:e0});e0++;break}if(O){w=[];for(h=0;h<O.length;h++)try{w.push(new Ai(O[h]))}catch{g.tK(new g.WO("Transport failed to deserialize "+
String(O[h])))}O=w}else O=[];for(const V of O)AF(Q,3,Ai,V);O={startTime:(0,g.f)(),ticks:{},infos:{}};Q=Q.jb();O.ticks.geljspc=(0,g.f)();g.EJ("log_jspb_serialize_latency")&&V4("gel_jspb_serialize",O,{sampleRate:.1});FBs(Q,y,k,z,r,Z,t,A)}};
FBs=function(l,y,k,z={},r,Z,e,A={value:0}){Z=tee(Z);z=lq(z,e,Q=>{g.EJ("start_client_gcf")&&g.fF.zk(async()=>{await hmP(Q)});
A.value--;A.value||k()},()=>{A.value--;
A.value||k()},r);
z.headers["Content-Type"]="application/json+protobuf";z.postBodyFormat="JSPB";z.postBody=l;g.Lv(y,Z,"",z);DN=!1};
wLs=function(l){g.EJ("always_send_and_write")&&(l.writeThenSend=!1)};
lq=function(l,y,k,z,r){l={retry:!0,onSuccess:k,onError:z,networklessOptions:l,dangerousLogToVisitorSession:y,zxK:!!r,headers:{},postBodyFormat:"",postBody:"",compress:g.EJ("compress_gel")||g.EJ("compress_gel_lr")};Zx()&&(l.headers["X-Goog-Request-Time"]=JSON.stringify(Math.round((0,g.f)())));return l};
$E=function(l,y="",k=""){l=new g.zq(l,!0);l.set("alr","yes");k&&(k=pR(44,3211,mv(9,7528,k)),l[G[37]](y,Jp(14,7903,k)));return l};
dAy=function(l,y,k){Zx()||(l.requestTimeMs=String(y));g.EJ("unsplit_gel_payloads_in_logs")&&(l.unsplitGelPayloadsInLogs=!0);!k&&(y=g.Y("EVENT_ID"))&&(k=XLP(),l.serializedClientEventId={serializedEventId:y,clientCounter:String(k)})};
XLP=function(){let l=g.Y("BATCH_CLIENT_COUNTER")||0;l||(l=Math.floor(Math.random()*65535/2));l++;l>65535&&(l=1);AK("BATCH_CLIENT_COUNTER",l);return l};
OYz=function(l,y,k){let z;if(k.videoId)z="VIDEO";else if(k.playlistId)z="PLAYLIST";else return;l.credentialTransferTokenTargetId=k;l.context=l.context||{};l.context.user=l.context.user||{};l.context.user.credentialTransferTokens=[{token:y,scope:z}]};
fa=function(l,y){var k=g.UT("yt.logging.transport.enableScrapingForTest"),z=gJ("il_payload_scraping");z=(z!==void 0?String(z):"")==="enable_il_payload_scraping";if(!k)if(z)Qt=[],g.iQ("yt.logging.transport.enableScrapingForTest",!0),g.iQ("yt.logging.transport.scrapedPayloadsForTesting",Qt),g.iQ("yt.logging.transport.payloadToScrape","visualElementShown visualElementHidden visualElementAttached screenCreated visualElementGestured visualElementStateChanged".split(" ")),g.iQ("yt.logging.transport.getScrapedPayloadFromClientEventsFunction"),
g.iQ("yt.logging.transport.scrapeClientEvent",!0);else return;k=g.UT("yt.logging.transport.scrapedPayloadsForTesting");z=g.UT("yt.logging.transport.payloadToScrape");y&&(y=y.payload,(y=g.UT("yt.logging.transport.getScrapedPayloadFromClientEventsFunction").bind(y)())&&k.push(y));y=g.UT("yt.logging.transport.scrapeClientEvent");if(z&&z.length>=1)for(let r=0;r<z.length;r++)l&&l.payload[z[r]]&&(y?k.push(l.payload):k.push((l?.payload)[z[r]]));g.iQ("yt.logging.transport.scrapedPayloadsForTesting",k)};
Zx=function(){return g.EJ("use_request_time_ms_header")||g.EJ("lr_use_request_time_ms_header")};
La=function(l,y){return g.EJ("transport_use_scheduler")===!1?g.JK(l,y):g.EJ("logging_avoid_blocking_during_navigation")||g.EJ("lr_logging_avoid_blocking_during_navigation")?g.cs(0,()=>{fv5().currentState==="none"?l():fv5().install({none:{callback:l}})},y):Xl(l,0,y)};
RW=function(l){g.EJ("transport_use_scheduler")?g.fF.qJ(l):g.pl(l)};
hmP=async function(l){l=l?.responseContext?.globalConfigGroup;var y=g.E(l,CIe),k=l?.hotHashData;const z=g.E(l,bYq),r=l?.coldHashData,Z=ck().resolve(aW(wc));Z&&(k&&(y?await Qk5(Z,k,y):await Qk5(Z,k)),r&&(z?await tqC(Z,r,z):await tqC(Z,r)));y=l?.rawFinchStaticConfigGroup;(l=l?.finchStaticHashData)?(k=ck().resolve(aW(uL4)))?await k.kJd({config:y||{},C$j:l||""}):(y||l)&&dJ(new g.WO("FinchConfigManagerService is not present, but Finch config data is present.")):y&&dJ(new g.WO("Finch config data is present, but hash is missing."))};
oW=function(l,y=200){return l?y===300?ZYC:xA5:y===300?emP:mAP};
sYs=function(l){if(g.EJ("enable_web_tiered_gel")){l=qIT[l||""];var y=ck().resolve(aW(wc))?.Km()?.loggingHotConfig?.eventLoggingConfig?.payloadPolicies;if(y)for(let k=0;k<y.length;k++)if(y[k].payloadNumber===l)return y[k]}};
Npz=function(l){l=Object.keys(l);for(const y of l)if(qIT[y])return y};
LBs=function(l){switch(l){case "DELAYED_EVENT_TIER_UNSPECIFIED":return 0;case "DELAYED_EVENT_TIER_DEFAULT":return 100;case "DELAYED_EVENT_TIER_DISPATCH_TO_EMPTY":return 200;case "DELAYED_EVENT_TIER_FAST":return 300;case "DELAYED_EVENT_TIER_IMMEDIATE":return 400;default:return 200}};
na=function(l){return l==="gelDebuggingEvent"};
tee=function(l=!1){return l&&g.EJ("vss_through_gel_video_stats")?"video_stats":"log_event"};
Or=function(l,y,k,z={}){const r={},Z=Math.round(z.timestamp||(0,g.f)());r.eventTimeMs=Z<Number.MAX_SAFE_INTEGER?Z:0;r[l]=y;l=hW();r.context={lastActivityMs:String(z.timestamp||!isFinite(l)?-1:l)};z.sequenceGroup&&!g.EJ("web_gel_sequence_info_killswitch")&&(l=r.context,y=z.sequenceGroup,y={index:WI_(y),groupKey:y},l.sequence=y,z.endOfSequence&&delete ti[z.sequenceGroup]);g.EJ("web_tag_automated_log_events")&&(r.context.automatedLogEventSource=z.automatedLogEventSource);(z.sendIsolatedPayload?vqC:H$y)({endpoint:"log_event",
payload:r,cttAuthInfo:z.cttAuthInfo,dangerousLogToVisitorSession:z.dangerousLogToVisitorSession},k)};
I3q=function(l=!1){N9(void 0,l)};
WI_=function(l){ti[l]=l in ti?ti[l]+1:0;return ti[l]};
g.wv=function(l,y,k={}){let z=g.dv;g.Y("ytLoggingEventsDefaultDisabled",!1)&&g.dv===g.dv&&(z=null);Or(l,y,z,k)};
g.Gd=function(l){return new hi({trackingParams:l})};
aN=function(l,y,k,z,r,Z){const e=TDg++;return new hi({veType:l,veCounter:e,elementIndex:k,dataElement:y,youtubeData:z,jspbYoutubeData:r,loggingDirectives:Z})};
VeT=function(l=0){return g.Y("client-screen-nonce-store",{})[l]};
PIC=function(l,y=0){let k=g.Y("client-screen-nonce-store");k||(k={},AK("client-screen-nonce-store",k));k[y]=l};
iq=function(l=0){return l===0?"ROOT_VE_TYPE":`${"ROOT_VE_TYPE"}.${l}`};
Jwt=function(l=0){return g.Y(iq(l))};
g.Ur=function(l=0){return(l=Jwt(l))?new hi({veType:l,youtubeData:void 0,jspbYoutubeData:void 0}):null};
YIg=function(){let l=g.Y("csn-to-ctt-auth-info");l||(l={},AK("csn-to-ctt-auth-info",l));return l};
pLz=function(){return Object.values(g.Y("client-screen-nonce-store",{})).filter(l=>l!==void 0)};
g.MM=function(l=0){l=VeT(l);if(!l&&!g.Y("USE_CSN_FALLBACK",!0))return null;l||(l="UNDEFINED_CSN");return l?l:null};
g7Q=function(l){for(const y of Object.values(KIg))if(g.MM(y)===l)return!0;return!1};
E7C=function(l,y,k){const z=YIg();(k=g.MM(k))&&delete z[k];y&&(z[l]=y)};
Xu=function(l){return YIg()[l]};
jKg=function(l,y,k=0,z){if(l!==VeT(k)||y!==g.Y(iq(k)))if(E7C(l,z,k),PIC(l,k),AK(iq(k),y),y=()=>{setTimeout(()=>{l&&g.wv("foregroundHeartbeatScreenAssociated",{clientDocumentNonce:f3T,clientScreenNonce:l})},0)},"requestAnimationFrame"in window)try{window.requestAnimationFrame(y)}catch(r){y()}else y()};
cH=function(l,y){var k=g.Y("VALID_SESSION_TEMPDATA_DOMAINS",[]),z=g.$7(window.location.href);z&&k.push(z);z=g.$7(l);if(g.ro(k,z)||!z&&w4(l,"/"))if(k=document.createElement("a"),g.HC(k,l),l=k.href)if(l=OI(l),l=dD(l))if(!y.csn&&(y.itct||y.ved)&&(y=Object.assign({csn:g.MM()},y)),r){var r=parseInt(r,10);isFinite(r)&&r>0&&SIe(l,y,r)}else SIe(l,y)};
SIe=function(l,y,k){l=n7P(l);y=y?g.iI(y):"";k=k||5;Vu()&&g.ZY(l,y,k)};
n7P=function(l){for(let y of FIg)l=bI(l,y);return"ST-"+Xn(l).toString(36)};
o7y=function(l){if(l.name==="JavaException")return!0;l=l.stack;return l.includes("chrome://")||l.includes("-extension://")||l.includes("webkit-masked-url://")};
NDP=function(l){if(!l.stack)return!0;const y=!l.stack.includes("\n");return y&&l.stack.includes("ErrorType: ")||y&&l.stack.includes("Anonymous function (Unknown script")||l.stack.toLowerCase()==="not available"||l.fileName==="user-script"||l.fileName.startsWith("user-script:")?!0:!1};
bq=function(){if(!Cz){var l=Cz=new sK5;l.TO.length=0;l.Rd.length=0;LIC(l,v7s)}return Cz};
LIC=function(l,y){y.TO&&l.TO.unshift.apply(l.TO,y.TO);y.Rd&&l.Rd.unshift.apply(l.Rd,y.Rd)};
BDz=function(l){const y=l.length;let k=0;const z=()=>l.charCodeAt(k++);
do{var r=uq(z);if(r===Infinity)break;const Z=r>>3;switch(r&7){case 0:r=uq(z);if(Z===2)return r;break;case 1:if(Z===2)return;k+=8;break;case 2:r=uq(z);if(Z===2)return l.substr(k,r);k+=r;break;case 5:if(Z===2)return;k+=4;break;default:return}}while(k<y)};
uq=function(l){let y=l(),k=y&127;if(y<128)return k;y=l();k|=(y&127)<<7;if(y<128)return k;y=l();k|=(y&127)<<14;if(y<128)return k;y=l();return y<128?k|(y&127)<<21:Infinity};
HYQ=function(l,y,k,z){if(l)if(Array.isArray(l)){var r=z;for(z=0;z<l.length&&!(l[z]&&(r+=xE(z,l[z],y,k),r>500));z++);z=r}else if(typeof l==="object")for(r in l){if(l[r]){a:{var Z=r;var e=l[r],A=y,Q=k;if(typeof e!=="string"||Z!=="clickTrackingParams"&&Z!=="trackingParams"){Z=0;break a}Z=(e=BDz(atob(e.replace(/-/g,"+").replace(/_/g,"/"))))?xE(`${Z}.ve`,e,A,Q):0}z+=Z;z+=xE(r,l[r],y,k);if(z>500)break}}else k[y]=mt(l),z+=k[y].length;else k[y]=mt(l),z+=k[y].length;return z};
xE=function(l,y,k,z){k+=`.${l}`;l=mt(y);z[k]=l;return k.length+l.length};
mt=function(l){try{return(typeof l==="string"?l:String(JSON.stringify(l))).substr(0,500)}catch(y){return`unable to serialize ${typeof l} (${y.message})`}};
qM=function(l){g.n(l)};
g.WH=function(l){g.n(l,"WARNING")};
g.n=function(l,y="ERROR"){var k={};k.name=g.Y("INNERTUBE_CONTEXT_CLIENT_NAME",1);k.version=g.Y("INNERTUBE_CONTEXT_CLIENT_VERSION");Rmz(l,k,y)};
Rmz=function(l,y,k="ERROR"){if(l){l.hasOwnProperty("level")&&l.level&&(k=l.level);if(g.EJ("console_log_js_exceptions")||["test","dev","autopush","staging"].includes(g.Y("SERVER_VERSION"))){var z=[];z.push(`Name: ${l.name}`);z.push(`Message: ${l.message}`);l.hasOwnProperty("params")&&z.push(`Error Params: ${JSON.stringify(l.params)}`);l.hasOwnProperty("args")&&z.push(`Error args: ${JSON.stringify(l.args)}`);z.push(`File name: ${l.fileName}`);z.push(`Stacktrace: ${l.stack}`);window.console.log(z.join("\n"),
l)}if(!(DAg>=5)){z=[];for(r of lcq)try{r()&&z.push(r())}catch(U){}var r=z;r=[...yqg,...r];var Z=WPC(l);z=Z.message||"Unknown Error";const w=Z.name||"UnknownError";var e=Z.stack||l.C||"Not available";if(e.startsWith(`${w}: ${z}`)){var A=e.split("\n");A.shift();e=A.join("\n")}A=Z.lineNumber||"Not available";Z=Z.fileName||"Not available";let h=0;if(l.hasOwnProperty("args")&&l.args&&l.args.length)for(var Q=0;Q<l.args.length&&!(h=HYQ(l.args[Q],`params.${Q}`,y,h),h>=500);Q++);else if(l.hasOwnProperty("params")&&
l.params){const U=l.params;if(typeof l.params==="object")for(Q in U){if(!U[Q])continue;const u=`params.${Q}`,W=mt(U[Q]);y[u]=W;h+=u.length+W.length;if(h>500)break}else y.params=mt(U)}if(r.length)for(Q=0;Q<r.length&&!(h=HYQ(r[Q],`params.context.${Q}`,y,h),h>=500);Q++);navigator.vendor&&!y.hasOwnProperty("vendor")&&(y["device.vendor"]=navigator.vendor);y={message:z,name:w,lineNumber:A,fileName:Z,stack:e,params:y,sampleWeight:1};Q=Number(l.columnNumber);isNaN(Q)||(y.lineNumber=`${y.lineNumber}:${Q}`);
if(l.level==="IGNORED")var t=0;else a:{l=bq();for(t of l.TO)if(y.message&&y.message.match(t.Pj)){t=t.weight;break a}for(var O of l.Rd)if(O.callback(y)){t=O.weight;break a}t=1}y.sampleWeight=t;t=y;for(var d of kPq){if(!d.QS[t.name])continue;O=d.QS[t.name];for(const U of O){O=t.message.match(U.Tc);if(!O)continue;t.params["params.error.original"]=O[0];l=U.groups;y={};for(Q=0;Q<l.length;Q++)y[l[Q]]=O[Q+1],t.params[`params.error.${l[Q]}`]=O[Q+1];t.message=d.QY(y);break}}t.params||(t.params={});d=bq();
t.params["params.errorServiceSignature"]=`msg=${d.TO.length}&cb=${d.Rd.length}`;t.params["params.serviceWorker"]="false";g.aC.document&&g.aC.document.querySelectorAll&&(t.params["params.fscripts"]=String(document.querySelectorAll("script:not([nonce])").length));(new IN(Td,"sample")).constructor!==IN&&(t.params["params.fconst"]="true");window.yterr&&typeof window.yterr==="function"&&window.yterr(t);t.sampleWeight===0||zh5.has(t.message)||rqe(t,k)}}};
rqe=function(l,y="ERROR"){if(y==="ERROR"){Vt.publish("handleError",l);if(g.EJ("record_app_crashed_web")&&ZrP===0&&l.sampleWeight===1){ZrP++;var k={appCrashType:"APP_CRASH_TYPE_BREAKPAD"};g.EJ("report_client_error_with_app_crash_ks")||(k.systemHealth={crashData:{clientError:{logMessage:{message:l.message}}}});g.wv("appCrashed",k)}eht++}else y==="WARNING"&&Vt.publish("handleWarning",l);if(g.EJ("kevlar_gel_error_routing")){k={};b:{for(z of Aqg)if(g.G6(z.toLowerCase())){var z=!0;break b}z=!1}if(z)k=void 0;
else{var r={stackTrace:l.stack};l.fileName&&(r.filename=l.fileName);z=l.lineNumber&&l.lineNumber.split?l.lineNumber.split(":"):[];z.length!==0&&(z.length!==1||isNaN(Number(z[0]))?z.length!==2||isNaN(Number(z[0]))||isNaN(Number(z[1]))||(r.lineNumber=Number(z[0]),r.columnNumber=Number(z[1])):r.lineNumber=Number(z[0]));z={level:"ERROR_LEVEL_UNKNOWN",message:l.message,errorClassName:l.name,sampleWeight:l.sampleWeight};y==="ERROR"?z.level="ERROR_LEVEL_ERROR":y==="WARNING"&&(z.level="ERROR_LEVEL_WARNNING");
r={isObfuscated:!0,browserStackInfo:r};k.pageUrl=window.location.href;k.kvPairs=[];g.Y("FEXP_EXPERIMENTS")&&(k.experimentIds=g.Y("FEXP_EXPERIMENTS"));var Z=g.Y("LATEST_ECATCHER_SERVICE_TRACKING_PARAMS");if(!$u("web_disable_gel_stp_ecatcher_killswitch")&&Z)for(var e of Object.keys(Z))k.kvPairs.push({key:e,value:String(Z[e])});if(e=l.params)for(var A of Object.keys(e))k.kvPairs.push({key:`client.${A}`,value:String(e[A])});A=g.Y("SERVER_NAME");e=g.Y("SERVER_VERSION");A&&e&&(k.kvPairs.push({key:"server.name",
value:A}),k.kvPairs.push({key:"server.version",value:e}));(A=g.Y("PLAYER_CLIENT_VERSION"))&&k.kvPairs.push({key:"client.player.version",value:A});k={errorMetadata:k,stackTrace:r,logMessage:z}}if(k&&(g.wv("clientError",k),y==="ERROR"||g.EJ("errors_flush_gel_always_killswitch")))a:{if(g.EJ("web_fp_via_jspb")){k=$SC;$SC=[];if(k)for(var Q of k)Or(Q.payloadName,Q.payload,g.dv,Q.options);I3q(!0);if(!g.EJ("web_fp_via_jspb_and_json"))break a}I3q()}}if(!g.EJ("suppress_error_204_logging")){Q=l.params||{};y=
{urlParams:{a:"logerror",t:"jserror",type:l.name,msg:l.message.substr(0,250),line:l.lineNumber,level:y,"client.name":Q.name},postParams:{url:g.Y("PAGE_NAME",window.location.href),file:l.fileName},method:"POST"};Q.version&&(y["client.version"]=Q.version);if(y.postParams){l.stack&&(y.postParams.stack=l.stack);for(var t of Object.keys(Q))y.postParams[`client.${t}`]=Q[t];if(t=g.Y("LATEST_ECATCHER_SERVICE_TRACKING_PARAMS"))for(var O of Object.keys(t))y.postParams[O]=t[O];(O=g.Y("LAVA_VERSION"))&&(y.postParams["lava.version"]=
O);O=g.Y("SERVER_NAME");t=g.Y("SERVER_VERSION");O&&t&&(y.postParams["server.name"]=O,y.postParams["server.version"]=t);(O=g.Y("PLAYER_CLIENT_VERSION"))&&(y.postParams["client.player.version"]=O)}g.o3(`${g.Y("ECATCHER_REPORT_HOST","")}/error_204`,y)}try{zh5.add(l.message)}catch(d){}DAg++};
PH=function(l,...y){l.args||(l.args=[]);Array.isArray(l.args)&&l.args.push(...y)};
pz=function(l){var y=g.E(l,Ji);if(y)return y;if((y=g.E(l,Q1T))&&y.commands)return tAC(y.commands);if((y=g.E(l,OrQ))&&y.commands)return tAC(y.commands);if((l=g.E(l,dSC))&&l.identifier&&l.command&&(YE||(YE=[]),!YE.includes(l.identifier)))return YE.push(l.identifier),g.E(l.command,Ji)};
tAC=function(l){if(l.length!==0){var y=[];for(const k of l)(l=pz(k))&&y.push(l);return{commandExecutorCommand:{commands:y}}}};
g.Kz=function(l,y,k){k===void 0?delete l[y.name]:l[y.name]=k};
wpg=function(l){let y=0;for(let k=0;k<l.length;k++)y=y*31+l.charCodeAt(k),k<l.length-1&&(y%=0x800000000000);return y%1E5};
acC=function(l,y,k,z,r,Z,e,A,Q){const t=hh5();Z=new hi({veType:y,youtubeData:Z,jspbYoutubeData:void 0});Q=gv({automatedLogEventSource:Q},t);r&&(Q.cttAuthInfo=r);r={csn:t,pageVe:Z.getAsJson()};g.EJ("expectation_logging")&&A&&A.screenCreatedLoggingExpectations&&(r.screenCreatedLoggingExpectations=A.screenCreatedLoggingExpectations);k&&k.visualElement?(r.implicitGesture={parentCsn:k.clientScreenNonce,gesturedVe:k.visualElement.getAsJson()},e&&(r.implicitGesture.gestureType=e)):k&&g.WH(new g.WO("newScreen() parent element does not have a VE - rootVe",
y));z&&(r.cloneCsn=z);l?Or("screenCreated",r,l,Q):g.wv("screenCreated",r,Q);WS(bp_,new GP_(t));Er.clear();fz.clear();j0.clear();return t};
g.nz=function(l,y,k,z,r=!1,Z={}){g.S0(l,y,k,[z],r,Z)};
g.S0=function(l,y,k,z,r=!1,Z={}){Object.assign(Z,gv({cttAuthInfo:Xu(y)||void 0},y));for(const A of z){var e=A.getAsJson();(g.DB(e)||!e.trackingParams&&!e.veType)&&g.WH(Error("Child VE logged with no data"));if(g.EJ("no_client_ve_attach_unless_shown")){const Q=Fu(A,y);if(e.veType&&!fz.has(Q)&&!j0.has(Q)&&!r){if(!g.EJ("il_attach_cache_limit")||Er.size<1E3){Er.set(Q,[l,y,k,A]);return}g.EJ("il_attach_cache_limit")&&Er.size>1E3&&g.WH(new g.WO("IL Attach cache exceeded limit"))}e=Fu(k,y);Er.has(e)?oN(k,
y):j0.set(e,!0)}}z=z.filter(A=>{A.csn!==y?(A.csn=y,A=!0):A=!1;return A});
k={csn:y,parentVe:k.getAsJson(),childVes:g.sT(z,A=>A.getAsJson())};
y==="UNDEFINED_CSN"?NM("visualElementAttached",Z,k):l?Or("visualElementAttached",k,l,Z):g.wv("visualElementAttached",k,Z)};
irs=function(l,y,k,z,r,Z,e){sr(k,y);z=gv({cttAuthInfo:Xu(y)||void 0,automatedLogEventSource:e},y);k={csn:y,ve:k.getAsJson(),eventType:1};r&&(k.clientData=r);y==="UNDEFINED_CSN"?NM("visualElementShown",z,k):l?Or("visualElementShown",k,l,z):g.wv("visualElementShown",k,z)};
USy=function(l,y,k,z=!1){const r=z?16:8;z=gv({cttAuthInfo:Xu(y)||void 0,endOfSequence:z,automatedLogEventSource:void 0},y);k={csn:y,ve:k.getAsJson(),eventType:r};y==="UNDEFINED_CSN"?NM("visualElementHidden",z,k):l?Or("visualElementHidden",k,l,z):g.wv("visualElementHidden",k,z)};
Lz=function(l,y,k,z,r,Z){MA_(l,y,k,void 0,z,r,Z)};
MA_=function(l,y,k,z,r,Z,e){sr(k,y);z=z||"INTERACTION_LOGGING_GESTURE_TYPE_GENERIC_CLICK";Z=gv({cttAuthInfo:Xu(y)||void 0,automatedLogEventSource:e},y);k={csn:y,ve:k.getAsJson(),gestureType:z};r&&(k.clientData=r);y==="UNDEFINED_CSN"?NM("visualElementGestured",Z,k):l?Or("visualElementGestured",k,l,Z):g.wv("visualElementGestured",k,Z)};
Xpy=function(){let l;l=QD(16);const y=[];for(let k=0;k<l.length;k++)y.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(l[k]&63));return y.join("")};
NM=function(l,y,k){vH.push({payloadName:l,payload:k,owj:void 0,options:y});BH||(BH=Wxy())};
moC=function(l){if(vH){for(const y of vH)y.payload&&(y.payload.csn=l.csn,g.wv(y.payloadName,y.payload,y.options));vH.length=0}BH=0};
Fu=function(l,y){return`${l.getAsJson().veType}${l.getAsJson().veCounter}${y}`};
sr=function(l,y){if(g.EJ("no_client_ve_attach_unless_shown")){var k=Fu(l,y);fz.set(k,!0);oN(l,y)}};
oN=function(l,y){l=Fu(l,y);Er.has(l)&&(y=Er.get(l)||[],g.nz(y[0],y[1],y[2],y[3],!0),Er.delete(l))};
gv=function(l,y){g.EJ("log_sequence_info_on_gel_web")&&(l.sequenceGroup=y);return l};
g.HH=function(l,y,k,z){g.OJ(irs)(void 0,l,y,k,z,void 0)};
g.RN=function(l,y){g.OJ(()=>{g.Fy(y,k=>{sr(k,l);const z=gv({cttAuthInfo:Xu(l)||void 0,automatedLogEventSource:void 0},l);k={csn:l,ve:k.getAsJson(),eventType:4};l==="UNDEFINED_CSN"?NM("visualElementShown",z,k):g.wv("visualElementShown",k,z)})})()};
g.Dx=function(l,y){g.OJ(()=>{g.Fy(y,k=>{USy(void 0,l,k)})})()};
g.lM=function(l,y,k){g.OJ(Lz)(void 0,l,y,k,void 0)};
yk=function(l,y,k,z){g.OJ(MA_)(void 0,l,y,k,z,void 0)};
kb=function(l){var y=":"+(oS.getInstance().Z++).toString(36);return l+y};
g.z1=function(l=!1){g.zP.call(this);this.Xz=new g.W9(l);g.x(this,this.Xz)};
rM=function(){const l="ytp-id-"+cqQ.toString();cqQ++;return l};
Zs=function(l,y,k,z){if(z.substring(0,2)==="{{")l.hk[z]=[y,k];else return z};
er=function(l,y,k,z){if(k==="child"){g.Uq(y);let Z;z===void 0?Z=void 0:Z=!Array.isArray(z)||z&&typeof z.U==="string"?[z]:z;k=CLt(l,Z);for(var r of k)y.appendChild(r)}else k==="style"?g.n9(y,"cssText",z?z:""):z===null||z===void 0?y.removeAttribute(k):(r=z.toString(),k==="href"&&(r=g.Fv(g.L3(r))),y.setAttribute(k,r))};
CLt=function(l,y){const k=[];if(!y)return k;for(const z of y){if(z==null)continue;y=z.nodeType;y===1||y===3?k.push(z):z&&typeof z.U==="string"?k.push(l.createElement(z)):z.element?k.push(z.element):typeof z==="string"&&z.indexOf("\n")!==-1?z.split("\n").forEach((r,Z)=>{Z>0&&k.push(g.Gf("BR"));k.push(g.ap(r))}):k.push(g.ap(z))}return k};
A4=function(l=null,y=null){if(l==null)return g.WH(Error("Got null or undefined adText object")),"";let k=g.My(l.text);if(!l.isTemplated)return k;if(y==null)return g.WH(Error("Missing required parameters for a templated message")),k;for(const [z,r]of Object.entries(y))k=k.replace("{"+z+"}",r);return k};
br_=function(l=null){return l!=null&&(l=l.thumbnail,l!=null&&l.thumbnails!=null&&l.thumbnails.length!=0&&l.thumbnails[0].url!=null)?g.My(l.thumbnails[0].url):""};
uWq=function(l=null){return l!=null&&(l=l.thumbnail,l!=null&&l.thumbnails!=null&&l.thumbnails.length!=0&&l.thumbnails[0].width!=null&&l.thumbnails[0].height!=null)?new g.Fn(l.thumbnails[0].width||0,l.thumbnails[0].height||0):new g.Fn(0,0)};
g.$b=function(l){if(l.simpleText)return l.simpleText;if(l.runs){const y=[];for(const k of l.runs)k.text&&y.push(k.text);return y.join("")}return""};
g.Qk=function(l){if(l.simpleText)return l=document.createTextNode(l.simpleText),l;const y=[];if(l.runs)for(let A=0;A<l.runs.length;A++){var k=l.runs[A];if(k.text){var z=y,r=z.push,Z=null;var e=k.text;k.bold&&(Z=hV("B",null,Z||e));k.italics&&(Z=hV("I",null,Z||e));k.strikethrough&&(Z=hV("STRIKE",null,Z||e));k.navigationEndpoint&&k.navigationEndpoint.urlEndpoint&&(k=k.navigationEndpoint.urlEndpoint,Z=hV("A",null,Z||e),g.HC(Z,k.url),k.target=="TARGET_NEW_WINDOW"&&(Z.target="_blank"));e=Z||hV("SPAN",null,
e);r.call(z,e)}}return y.length==1?y[0]:hV("SPAN",null,y)};
g.xSs=function(){return{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,G:{d:"M7,24 L7,27 L10,27 C10,25.34 8.66,24 7,24 L7,24 Z M7,20 L7,22 C9.76,22 12,24.24 12,27 L14,27 C14,23.13 10.87,20 7,20 L7,20 Z M25,13 L11,13 L11,14.63 C14.96,15.91 18.09,19.04 19.37,23 L25,23 L25,13 L25,13 Z M7,16 L7,18 C11.97,18 16,22.03 16,27 L18,27 C18,20.92 13.07,16 7,16 L7,16 Z M27,9 L9,9 C7.9,9 7,9.9 7,11 L7,14 L9,14 L9,11 L27,11 L27,25 L20,25 L20,27 L27,27 C28.1,27 29,26.1 29,25 L29,11 C29,9.9 28.1,9 27,9 L27,9 Z",
fill:"#fff"}}]}};
t4=function(){return{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",G:{d:"m 14.8,21.9 -4.2,-4.2 -1.4,1.4 5.6,5.6 12,-12 -1.4,-1.4 -10.6,10.6 z",fill:"#fff"}}]}};
g.OP=function(){return{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 32 32",width:"100%"},W:[{U:"path",G:{d:"M 19.41,20.09 14.83,15.5 19.41,10.91 18,9.5 l -6,6 6,6 z",fill:"#fff"}}]}};
mSt=function(){return{U:"svg",G:{height:"100%",viewBox:"0 0 24 24",width:"100%"},W:[{U:"path",G:{d:"M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z",fill:"#fff"}}]}};
g.dM=function(){return{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 32 32",width:"100%"},W:[{U:"path",G:{d:"m 12.59,20.34 4.58,-4.59 -4.58,-4.59 1.41,-1.41 6,6 -6,6 z",fill:"#fff"}}]}};
qss=function(){return{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 14 14",width:"100%"},W:[{U:"path",G:{d:"M14,14 L14,0 L0,0 L0,14 L14,14 Z"}},{U:"path",G:{d:"M7.15,8.35 L9.25,10.45 L10.65,9.05 L8.55,6.95 L10.7,4.8 L9.3,3.4 L7.15,5.55 L5,3.4 L3.6,4.8 L5.75,6.95 L3.65,9.05 L5.05,10.45 L7.15,8.35 Z",fill:"#fff"}}]}};
Wue=function(){return{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 14 14",width:"100%"},W:[{U:"path",N_:!0,G:{d:"M2,14 L5,11 L5,3 L2,0 L9,0 L9,14 L2,14 L2,14 Z",fill:"#eaeaea"}}]}};
Ic5=function(){return{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 14 14",width:"100%"},W:[{U:"path",N_:!0,G:{d:"M12,14 L9,11 L9,3 L12,0 L5,0 L5,14 L12,14 Z",fill:"#eaeaea"}}]}};
g.wM=function(){return{U:"svg",G:{height:"100%",viewBox:"0 0 24 24",width:"100%"},W:[{U:"path",G:{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z",fill:"#fff"}}]}};
h4=function(){return{U:"svg",G:{height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M21.20 3.01L21 3H3L2.79 3.01C2.30 3.06 1.84 3.29 1.51 3.65C1.18 4.02 .99 4.50 1 5V19L1.01 19.20C1.05 19.66 1.26 20.08 1.58 20.41C1.91 20.73 2.33 20.94 2.79 20.99L3 21H21L21.20 20.98C21.66 20.94 22.08 20.73 22.41 20.41C22.73 20.08 22.94 19.66 22.99 19.20L23 19V5C23.00 4.50 22.81 4.02 22.48 3.65C22.15 3.29 21.69 3.06 21.20 3.01ZM3 19V5H21V19H3ZM6.97 8.34C6.42 8.64 5.96 9.09 5.64 9.63L5.50 9.87C5.16 10.53 4.99 11.26 5 12L5.00 12.27C5.04 12.92 5.21 13.55 5.50 14.12L5.64 14.36C5.96 14.90 6.42 15.35 6.97 15.65L7.21 15.77C7.79 16.01 8.43 16.06 9.03 15.91L9.29 15.83C9.88 15.61 10.39 15.23 10.77 14.73C10.93 14.53 11.00 14.27 10.97 14.02C10.94 13.77 10.82 13.53 10.63 13.37C10.44 13.20 10.19 13.11 9.93 13.12C9.68 13.13 9.44 13.24 9.26 13.43L9.19 13.50C9.05 13.70 8.85 13.85 8.62 13.94L8.54 13.97C8.35 14.02 8.16 14.00 7.99 13.92L7.91 13.88C7.67 13.75 7.48 13.56 7.35 13.32L7.28 13.20C7.11 12.88 7.02 12.52 7.00 12.16L7 12C6.99 11.58 7.09 11.16 7.28 10.79L7.35 10.67C7.48 10.43 7.67 10.24 7.91 10.11C8.10 10.00 8.32 9.97 8.54 10.02L8.62 10.05C8.81 10.12 8.98 10.24 9.11 10.39L9.19 10.49L9.26 10.57C9.43 10.74 9.66 10.85 9.91 10.87C10.15 10.89 10.40 10.81 10.59 10.66C10.79 10.51 10.92 10.29 10.96 10.05C11.01 9.80 10.96 9.55 10.83 9.34L10.77 9.26L10.60 9.05C10.24 8.65 9.79 8.35 9.29 8.16L9.03 8.08C8.34 7.91 7.60 8.00 6.97 8.34ZM14.97 8.34C14.42 8.64 13.96 9.09 13.64 9.63L13.50 9.87C13.16 10.53 12.99 11.26 13 12L13.00 12.27C13.04 12.92 13.21 13.55 13.50 14.12L13.64 14.36C13.96 14.90 14.42 15.35 14.97 15.65L15.21 15.77C15.79 16.01 16.43 16.06 17.03 15.91L17.29 15.83C17.88 15.61 18.39 15.23 18.77 14.73C18.93 14.53 19.00 14.27 18.97 14.02C18.94 13.77 18.82 13.53 18.63 13.37C18.44 13.20 18.19 13.11 17.93 13.12C17.68 13.13 17.44 13.24 17.26 13.43L17.19 13.50C17.05 13.70 16.85 13.85 16.62 13.94L16.54 13.97C16.35 14.02 16.16 14.00 15.99 13.92L15.91 13.88C15.67 13.75 15.48 13.56 15.35 13.32L15.28 13.20C15.11 12.88 15.02 12.52 15.00 12.16L15 12C14.99 11.58 15.09 11.16 15.28 10.79L15.35 10.67C15.48 10.43 15.67 10.24 15.91 10.11C16.10 10.00 16.32 9.97 16.54 10.02L16.62 10.05C16.81 10.12 16.98 10.24 17.11 10.39L17.19 10.49L17.26 10.57C17.43 10.74 17.66 10.85 17.91 10.87C18.15 10.89 18.40 10.81 18.59 10.66C18.79 10.51 18.92 10.29 18.96 10.05C19.01 9.80 18.96 9.55 18.83 9.34L18.77 9.26L18.60 9.05C18.24 8.65 17.79 8.35 17.29 8.16L17.03 8.08C16.34 7.91 15.60 8.00 14.97 8.34Z",
fill:"white"}}]}};
Th5=function(){return{U:"svg",G:{height:"100%",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",G:{d:"M14.1 24.9L7.2 18.0l6.9-6.9L12.0 9.0l-9.0 9.0 9.0 9.0 2.1-2.1zm7.8 .0l6.9-6.9-6.9-6.9L24.0 9.0l9.0 9.0-9.0 9.0-2.1-2.1z",fill:"#fff"}}]}};
VAP=function(){return{U:"svg",G:{viewBox:"0 0 24 24"},W:[{U:"path",G:{d:"M0 0h24v24H0z",fill:"none"}},{U:"path",G:{d:"M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v1.91l.01.01L1 14c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm4 0v12h4V3h-4z",fill:"#fff"}}]}};
PLq=function(){return{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"M 10,24 18.5,18 10,12 V 24 z M 19,12 V 24 L 27.5,18 19,12 z"}}]}};
G1=function(){return{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{"clip-rule":"evenodd",d:"M2 12C2 6.48 6.48 2 12 2C17.52 2 22 6.48 22 12C22 17.52 17.52 22 12 22C6.48 22 2 17.52 2 12ZM13 16V18H11V16H13ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20ZM8 10C8 7.79 9.79 6 12 6C14.21 6 16 7.79 16 10C16 11.28 15.21 11.97 14.44 12.64C13.71 13.28 13 13.90 13 15H11C11 13.17 11.94 12.45 12.77 11.82C13.42 11.32 14 10.87 14 10C14 8.9 13.1 8 12 8C10.9 8 10 8.9 10 10H8Z",
fill:"white","fill-rule":"evenodd"}}]}};
Jqe=function(){return{U:"svg",G:{fill:"#fff",height:"100%",version:"1.1",viewBox:"0 0 48 48",width:"100%"},W:[{U:"path",G:{d:"M0 0h48v48H0z",fill:"none"}},{U:"path",G:{d:"M22 34h4V22h-4v12zm2-30C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm-2-22h4v-4h-4v4z"}}]}};
Ys_=function(){return{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"m 17,23 h 2 V 17 H 17 Z M 18,8 C 12.47,8 8,12.47 8,18 8,23.52 12.47,28 18,28 23.52,28 28,23.52 28,18 28,12.47 23.52,8 18,8 Z m 0,18 c -4.41,0 -8,-3.59 -8,-8 0,-4.41 3.59,-8 8,-8 4.41,0 8,3.59 8,8 0,4.41 -3.59,8 -8,8 z M 17,15 h 2 v -2 h -2 z"}}]}};
ppP=function(){return{U:"svg",G:{viewBox:"0 0 24 24"},W:[{U:"path",G:{d:"M0 0h24v24H0z",fill:"none"}},{U:"path",G:{d:"M1 21h4V9H1v12zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-1.91l-.01-.01L23 10z",fill:"#fff"}}]}};
aw=function(){return{U:"svg",G:{height:"100%",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",G:{d:"M5.85 18.0c0.0-2.56 2.08-4.65 4.65-4.65h6.0V10.5H10.5c-4.14 .0-7.5 3.36-7.5 7.5s3.36 7.5 7.5 7.5h6.0v-2.85H10.5c-2.56 .0-4.65-2.08-4.65-4.65zM12.0 19.5h12.0v-3.0H12.0v3.0zm13.5-9.0h-6.0v2.85h6.0c2.56 .0 4.65 2.08 4.65 4.65s-2.08 4.65-4.65 4.65h-6.0V25.5h6.0c4.14 .0 7.5-3.36 7.5-7.5s-3.36-7.5-7.5-7.5z",fill:"#fff"}}]}};
Kuz=function(){return{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 14 14",width:"100%"},W:[{U:"path",N_:!0,G:{d:"M5,0 L9,0 L9,14 L5,14 L5,0 Z",fill:"#eaeaea"}}]}};
gjg=function(){return{U:"svg",G:{height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M21.20 3.01C21.66 3.05 22.08 3.26 22.41 3.58C22.73 3.91 22.94 4.33 22.98 4.79L23 5V19C23.00 19.49 22.81 19.97 22.48 20.34C22.15 20.70 21.69 20.93 21.20 20.99L21 21H3L2.79 20.99C2.30 20.93 1.84 20.70 1.51 20.34C1.18 19.97 .99 19.49 1 19V13H3V19H21V5H11V3H21L21.20 3.01ZM1.29 3.29C1.10 3.48 1.00 3.73 1.00 4C1.00 4.26 1.10 4.51 1.29 4.70L5.58 9H3C2.73 9 2.48 9.10 2.29 9.29C2.10 9.48 2 9.73 2 10C2 10.26 2.10 10.51 2.29 10.70C2.48 10.89 2.73 11 3 11H9V5C9 4.73 8.89 4.48 8.70 4.29C8.51 4.10 8.26 4 8 4C7.73 4 7.48 4.10 7.29 4.29C7.10 4.48 7 4.73 7 5V7.58L2.70 3.29C2.51 3.10 2.26 3.00 2 3.00C1.73 3.00 1.48 3.10 1.29 3.29ZM19.10 11.00L19 11H12L11.89 11.00C11.66 11.02 11.45 11.13 11.29 11.29C11.13 11.45 11.02 11.66 11.00 11.89L11 12V17C10.99 17.24 11.09 17.48 11.25 17.67C11.42 17.85 11.65 17.96 11.89 17.99L12 18H19L19.10 17.99C19.34 17.96 19.57 17.85 19.74 17.67C19.90 17.48 20.00 17.24 20 17V12L19.99 11.89C19.97 11.66 19.87 11.45 19.70 11.29C19.54 11.13 19.33 11.02 19.10 11.00ZM13 16V13H18V16H13Z",
fill:"white"}}]}};
iM=function(){return{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"M 12,24 20.5,18 12,12 V 24 z M 22,12 v 12 h 2 V 12 h -2 z"}}]}};
Eje=function(){return{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M20 20C20.26 20 20.51 19.89 20.70 19.70C20.89 19.51 21 19.26 21 19V5C21 4.73 20.89 4.48 20.70 4.29C20.51 4.10 20.26 4 20 4C19.73 4 19.48 4.10 19.29 4.29C19.10 4.48 19 4.73 19 5V19C19 19.26 19.10 19.51 19.29 19.70C19.48 19.89 19.73 20 20 20ZM5.04 19.77L18 12L5.04 4.22C4.84 4.10 4.60 4.03 4.36 4.03C4.12 4.03 3.89 4.09 3.68 4.21C3.47 4.32 3.30 4.49 3.18 4.70C3.06 4.91 2.99 5.14 3 5.38V18.61C2.99 18.85 3.06 19.08 3.18 19.29C3.30 19.50 3.47 19.67 3.68 19.79C3.89 19.90 4.12 19.96 4.36 19.96C4.60 19.96 4.84 19.89 5.04 19.77Z",
fill:"white"}}]}};
g.fcC=function(){return{U:"svg",G:{fill:"#fff",height:"24px",viewBox:"0 0 24 24",width:"24px"},W:[{U:"path",G:{d:"M7.58 4.08L6.15 2.65C3.75 4.48 2.17 7.3 2.03 10.5h2c.15-2.65 1.51-4.97 3.55-6.42zm12.39 6.42h2c-.15-3.2-1.73-6.02-4.12-7.85l-1.42 1.43c2.02 1.45 3.39 3.77 3.54 6.42zM18 11c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2v-5zm-6 11c.14 0 .27-.01.4-.04.65-.14 1.18-.58 1.44-1.18.1-.24.15-.5.15-.78h-4c.01 1.1.9 2 2.01 2z"}}]}};
j15=function(){return{U:"svg",G:{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M12 1c1.44 0 2.87.28 4.21.83a11 11 0 0 1 3.45 2.27l-1.81 1.05A9 9 0 0 0 3 12a9 9 0 0 0 18-.00l-.01-.44a8.99 8.99 0 0 0-.14-1.20l1.81-1.05A11.00 11.00 0 0 1 10.51 22.9 11 11 0 0 1 12 1Zm7.08 6.25-7.96 3.25a1.74 1.74 0 1 0 1.73 2.99l6.8-5.26a.57.57 0 0 0-.56-.98Z"}}]}};
UP=function(){return{U:"svg",G:{fill:"#fff",height:"100%",version:"1.1",viewBox:"0 0 48 48",width:"100%"},W:[{U:"path",G:{d:"M0 0h48v48H0z",fill:"none"}},{U:"path",G:{d:"M38 38H10V10h14V6H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V24h-4v14zM28 6v4h7.17L15.51 29.66l2.83 2.83L38 12.83V20h4V6H28z"}}]}};
Sse=function(){return{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"M 12,26 16,26 16,10 12,10 z M 21,26 25,26 25,10 21,10 z"}}]}};
njg=function(){return{U:"svg",G:{fill:"none",height:"36",viewBox:"0 0 36 36",width:"36"},W:[{U:"path",G:{d:"M 12.75 4.5 L 9.75 4.5 C 9.15 4.5 8.58 4.73 8.15 5.15 C 7.73 5.58 7.5 6.15 7.5 6.75 L 7.5 29.25 C 7.5 29.84 7.73 30.41 8.15 30.84 C 8.58 31.26 9.15 31.5 9.75 31.5 L 12.75 31.5 C 13.34 31.5 13.91 31.26 14.34 30.84 C 14.76 30.41 15 29.84 15 29.25 L 15 6.75 C 15 6.15 14.76 5.58 14.34 5.15 C 13.91 4.73 13.34 4.5 12.75 4.5 Z M 26.25 4.5 L 23.25 4.5 C 22.65 4.5 22.08 4.73 21.65 5.15 C 21.23 5.58 21 6.15 21 6.75 V 29.25 C 21 29.84 21.23 30.41 21.65 30.84 C 22.08 31.26 22.65 31.5 23.25 31.5 L 26.25 31.5 C 26.84 31.5 27.41 31.26 27.84 30.84 C 28.26 30.41 28.5 29.84 28.5 29.25 V 6.75 L 28.5 6.75 C 28.5 6.15 28.26 5.58 27.84 5.15 C 27.41 4.73 26.84 4.5 26.25 4.5 Z",
fill:"white"}}]}};
Fu_=function(){return{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",B:"ytp-svg-fill",G:{"clip-rule":"evenodd",d:"M12 4C9.79 4 8 5.79 8 8C8 10.21 9.79 12 12 12C14.21 12 16 10.21 16 8C16 5.79 14.21 4 12 4ZM14 8C14 6.9 13.1 6 12 6C10.9 6 10 6.9 10 8C10 9.1 10.9 10 12 10C13.1 10 14 9.1 14 8ZM18 17C17.8 16.29 14.7 15 12 15C9.3 15 6.2 16.29 6 17.01V18H18V17ZM4 17C4 14.34 9.33 13 12 13C14.67 13 20 14.34 20 17V20H4V17Z","fill-rule":"evenodd"}}]}};
Mf=function(){return{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,G:{d:"M25,17 L17,17 L17,23 L25,23 L25,17 L25,17 Z M29,25 L29,10.98 C29,9.88 28.1,9 27,9 L9,9 C7.9,9 7,9.88 7,10.98 L7,25 C7,26.1 7.9,27 9,27 L27,27 C28.1,27 29,26.1 29,25 L29,25 Z M27,25.02 L9,25.02 L9,10.97 L27,10.97 L27,25.02 L27,25.02 Z",fill:"#fff"}}]}};
Xh=function(){return{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"M 12,26 18.5,22 18.5,14 12,10 z M 18.5,22 25,18 25,18 18.5,14 z"}}]}};
cW=function(){return{U:"svg",G:{fill:"none",height:"36",viewBox:"0 0 36 36",width:"36"},W:[{U:"path",G:{d:"M 17 8.6 L 10.89 4.99 C 9.39 4.11 7.5 5.19 7.5 6.93 C 7.5 6.93 7.5 6.93 7.5 6.93 L 7.5 29.06 C 7.5 30.8 9.39 31.88 10.89 31 C 10.89 31 10.89 31 10.89 31 L 17 27.4 C 17 27.4 17 27.4 17 27.4 C 17 27.4 17 27.4 17 27.4 L 17 8.6 C 17 8.6 17 8.6 17 8.6 C 17 8.6 17 8.6 17 8.6 Z M 17 8.6 L 17 8.6 C 17 8.6 17 8.6 17 8.6 C 17 8.6 17 8.6 17 8.6 V 27.4 C 17 27.4 17 27.4 17 27.4 C 17 27.4 17 27.4 17 27.4 L 33 18 C 33 18 33 18 33 18 C 33 18 33 18 33 18 V 18 L 17 8.6 C 17 8.6 17 8.6 17 8.6 C 17 8.6 17 8.6 17 8.6 Z",
fill:"white"}}]}};
ojT=function(){return{U:"svg",G:{height:"24px",version:"1.1",viewBox:"-2 -2 24 24",width:"24px"},W:[{U:"path",G:{d:"M 0 1.43 C 0 .64 .64 0 1.43 0 L 18.56 0 C 19.35 0 20 .64 20 1.43 L 20 18.56 C 20 19.35 19.35 20 18.56 20 L 1.43 20 C .64 20 0 19.35 0 18.56 Z M 0 1.43 ",fill:"#c00"}},{U:"path",G:{d:"M 7.88 11.42 L 7.88 15.71 L 5.37 15.71 L 5.37 3.52 L 10.12 3.52 C 11.04 3.52 11.84 3.69 12.54 4.02 C 13.23 4.36 13.76 4.83 14.14 5.45 C 14.51 6.07 14.70 6.77 14.70 7.56 C 14.70 8.75 14.29 9.69 13.48 10.38 C 12.66 11.07 11.53 11.42 10.08 11.42 Z M 7.88 9.38 L 10.12 9.38 C 10.79 9.38 11.30 9.23 11.64 8.91 C 11.99 8.60 12.17 8.16 12.17 7.57 C 12.17 6.98 11.99 6.5 11.64 6.12 C 11.29 5.76 10.80 5.57 10.18 5.56 L 7.88 5.56 Z M 7.88 9.38 ",
fill:"#fff","fill-rule":"nonzero"}}]}};
Nhg=function(){return{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"rect",G:{fill:"white",height:"20",rx:"5",width:"20",x:"2",y:"2"}},{U:"rect",G:{fill:"url(#ytp-premium-standalone-gradient)",height:"20",rx:"5",width:"20",x:"2",y:"2"}},{U:"path",G:{d:"M12.75 13.02H9.98V11.56H12.75C13.24 11.56 13.63 11.48 13.93 11.33C14.22 11.17 14.44 10.96 14.58 10.68C14.72 10.40 14.79 10.09 14.79 9.73C14.79 9.39 14.72 9.08 14.58 8.78C14.44 8.49 14.22 8.25 13.93 8.07C13.63 7.89 13.24 7.80 12.75 7.80H10.54V17H8.70V6.33H12.75C13.58 6.33 14.28 6.48 14.86 6.77C15.44 7.06 15.88 7.46 16.18 7.97C16.48 8.48 16.64 9.06 16.64 9.71C16.64 10.40 16.48 10.99 16.18 11.49C15.88 11.98 15.44 12.36 14.86 12.62C14.28 12.89 13.58 13.02 12.75 13.02Z",
fill:"white"}},{U:"defs",W:[{U:"linearGradient",G:{gradientUnits:"userSpaceOnUse",id:"ytp-premium-standalone-gradient",x1:"2",x2:"22",y1:"22",y2:"2"},W:[{U:"stop",G:{offset:"0.3","stop-color":"#E1002D"}},{U:"stop",G:{offset:"0.9","stop-color":"#E01378"}}]}]}]}};
s1q=function(){return{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"m 12,12 h 2 v 12 h -2 z m 3.5,6 8.5,6 V 12 z"}}]}};
Lug=function(){return{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M7 7H17V10L21 6L17 2V5H5V11H7V7ZM17 17H7V14L3 18L7 22V19H19V13H17V17Z",fill:"white"}}]}};
g.Ce=function(){return{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"M 18,11 V 7 l -5,5 5,5 v -4 c 3.3,0 6,2.7 6,6 0,3.3 -2.7,6 -6,6 -3.3,0 -6,-2.7 -6,-6 h -2 c 0,4.4 3.6,8 8,8 4.4,0 8,-3.6 8,-8 0,-4.4 -3.6,-8 -8,-8 z"}}]}};
g.bM=function(){return{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,G:{d:"m 23.94,18.78 c .03,-0.25 .05,-0.51 .05,-0.78 0,-0.27 -0.02,-0.52 -0.05,-0.78 l 1.68,-1.32 c .15,-0.12 .19,-0.33 .09,-0.51 l -1.6,-2.76 c -0.09,-0.17 -0.31,-0.24 -0.48,-0.17 l -1.99,.8 c -0.41,-0.32 -0.86,-0.58 -1.35,-0.78 l -0.30,-2.12 c -0.02,-0.19 -0.19,-0.33 -0.39,-0.33 l -3.2,0 c -0.2,0 -0.36,.14 -0.39,.33 l -0.30,2.12 c -0.48,.2 -0.93,.47 -1.35,.78 l -1.99,-0.8 c -0.18,-0.07 -0.39,0 -0.48,.17 l -1.6,2.76 c -0.10,.17 -0.05,.39 .09,.51 l 1.68,1.32 c -0.03,.25 -0.05,.52 -0.05,.78 0,.26 .02,.52 .05,.78 l -1.68,1.32 c -0.15,.12 -0.19,.33 -0.09,.51 l 1.6,2.76 c .09,.17 .31,.24 .48,.17 l 1.99,-0.8 c .41,.32 .86,.58 1.35,.78 l .30,2.12 c .02,.19 .19,.33 .39,.33 l 3.2,0 c .2,0 .36,-0.14 .39,-0.33 l .30,-2.12 c .48,-0.2 .93,-0.47 1.35,-0.78 l 1.99,.8 c .18,.07 .39,0 .48,-0.17 l 1.6,-2.76 c .09,-0.17 .05,-0.39 -0.09,-0.51 l -1.68,-1.32 0,0 z m -5.94,2.01 c -1.54,0 -2.8,-1.25 -2.8,-2.8 0,-1.54 1.25,-2.8 2.8,-2.8 1.54,0 2.8,1.25 2.8,2.8 0,1.54 -1.25,2.8 -2.8,2.8 l 0,0 z",
fill:"#fff"}}]}};
g.uM=function(){return{U:"svg",G:{height:"100%",viewBox:"0 0 16 16",width:"100%"},W:[{U:"path",G:{d:"M13 4L12 3 8 7 4 3 3 4 7 8 3 12 4 13 8 9 12 13 13 12 9 8z",fill:"#fff"}}]}};
vjT=function(){return{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"M 12,25 19,25 19,11 12,11 z M 19,25 26,25 26,11 19,11 z"}}]}};
Bhy=function(){return{U:"svg",G:{fill:"none",height:"36",viewBox:"0 0 36 36",width:"36"},W:[{U:"path",G:{d:"M 18 6 L 9 6 C 8.20 6 7.44 6.31 6.87 6.87 C 6.31 7.44 6 8.20 6 9 L 6 27 C 6 27.79 6.31 28.55 6.87 29.12 C 7.44 29.68 8.20 30 9 30 L 18 30 C 18 30 18 30 18 30 C 18 30 18 30 18 30 L 18 6 C 18 30 18 30 18 30 C 18 30 18 30 18 30 Z M 27 6 L 18 6 C 18 6 18 6 18 6 C 18 6 18 6 18 6 V 30 C 18 30 18 30 18 30 C 18 30 18 30 18 30 L 27 30 C 27.79 30 28.55 29.68 29.12 29.12 C 29.68 28.55 30 27.79 30 27 V 9 L 30 9 C 30 8.20 29.68 7.44 29.12 6.87 C 28.55 6.31 27.79 6 27 6 Z",
fill:"white"}}]}};
Hrz=function(){return{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M21.20 3.01L21 3H3L2.79 3.01C2.30 3.06 1.84 3.29 1.51 3.65C1.18 4.02 .99 4.50 1 5V19L1.01 19.20C1.05 19.66 1.26 20.08 1.58 20.41C1.91 20.73 2.33 20.94 2.79 20.99L3 21H21L21.20 20.98C21.66 20.94 22.08 20.73 22.41 20.41C22.73 20.08 22.94 19.66 22.99 19.20L23 19V5C23.00 4.50 22.81 4.02 22.48 3.65C22.15 3.29 21.69 3.06 21.20 3.01ZM3 19V5H21V19H3ZM8 11H6C5.73 11 5.48 11.10 5.29 11.29C5.10 11.48 5 11.73 5 12C5 12.26 5.10 12.51 5.29 12.70C5.48 12.89 5.73 13 6 13H8C8.26 13 8.51 12.89 8.70 12.70C8.89 12.51 9 12.26 9 12C9 11.73 8.89 11.48 8.70 11.29C8.51 11.10 8.26 11 8 11ZM18 11H12C11.73 11 11.48 11.10 11.29 11.29C11.10 11.48 11 11.73 11 12C11 12.26 11.10 12.51 11.29 12.70C11.48 12.89 11.73 13 12 13H18C18.26 13 18.51 12.89 18.70 12.70C18.89 12.51 19 12.26 19 12C19 11.73 18.89 11.48 18.70 11.29C18.51 11.10 18.26 11 18 11ZM18 15H16C15.73 15 15.48 15.10 15.29 15.29C15.10 15.48 15 15.73 15 16C15 16.26 15.10 16.51 15.29 16.70C15.48 16.89 15.73 17 16 17H18C18.26 17 18.51 16.89 18.70 16.70C18.89 16.51 19 16.26 19 16C19 15.73 18.89 15.48 18.70 15.29C18.51 15.10 18.26 15 18 15ZM12 15H6C5.73 15 5.48 15.10 5.29 15.29C5.10 15.48 5 15.73 5 16C5 16.26 5.10 16.51 5.29 16.70C5.48 16.89 5.73 17 6 17H12C12.26 17 12.51 16.89 12.70 16.70C12.89 16.51 13 16.26 13 16C13 15.73 12.89 15.48 12.70 15.29C12.51 15.10 12.26 15 12 15Z",
fill:"white"}}]}};
xb=function(){return{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"m 21.48,17.98 c 0,-1.77 -1.02,-3.29 -2.5,-4.03 v 2.21 l 2.45,2.45 c .03,-0.2 .05,-0.41 .05,-0.63 z m 2.5,0 c 0,.94 -0.2,1.82 -0.54,2.64 l 1.51,1.51 c .66,-1.24 1.03,-2.65 1.03,-4.15 0,-4.28 -2.99,-7.86 -7,-8.76 v 2.05 c 2.89,.86 5,3.54 5,6.71 z M 9.25,8.98 l -1.27,1.26 4.72,4.73 H 7.98 v 6 H 11.98 l 5,5 v -6.73 l 4.25,4.25 c -0.67,.52 -1.42,.93 -2.25,1.18 v 2.06 c 1.38,-0.31 2.63,-0.95 3.69,-1.81 l 2.04,2.05 1.27,-1.27 -9,-9 -7.72,-7.72 z m 7.72,.99 -2.09,2.08 2.09,2.09 V 9.98 z"}}]}};
m7=function(l,y=!1,k=!1,z=!1){if(!l)return null;switch(l.iconType){case "OPEN_IN_NEW":case "EXTERNAL_LINK":return k?{U:"svg",G:{fill:"#fff",height:"100%",version:"1.1",viewBox:"0 0 24 24",width:"100%"},W:[{U:"path",G:{d:"M21 21H3V3h9v1H4v16h16v-8h1v9zM15 3v1h4.32l-8.03 8.03.71.71 8-8V9h1V3h-6z"}}]}:UP();case "CHECK_BOX":return{U:"svg",G:{height:"100%",viewBox:"0 0 24 24",width:"100%"},W:[{U:"path",G:{d:"M0 0h24v24H0z",fill:"none"}},{U:"path",G:{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z",
fill:"#d4d4d4"}}]};case "CHECK_BOX_OUTLINE_BLANK":return{U:"svg",G:{height:"100%",viewBox:"0 0 24 24",width:"100%"},W:[{U:"path",G:{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z",fill:"#d4d4d4"}},{U:"path",G:{d:"M0 0h24v24H0z",fill:"none"}}]};case "CLOSE":return g.wM();case "INFO_OUTLINE":return y?{U:"svg",G:{fill:"#fff",height:"12px",style:"padding-top: 8px",viewBox:"0 -960 960 960",width:"12px"},W:[{U:"path",G:{d:"M430.09-270.8h101.34V-528H430.09v257.2Zm49.52-338.03q20.94 0 35.34-14.01 14.4-14.01 14.4-34.95 0-20.94-14.01-35.34-14.01-14.39-34.95-14.39-20.94 0-35.34 14.01-14.4 14.01-14.4 34.95 0 20.94 14.01 35.34 14.01 14.39 34.95 14.39Zm.67 548.18q-86.64 0-163.19-32.66-76.56-32.66-133.84-89.94t-89.94-133.8q-32.66-76.51-32.66-163.41 0-87.15 32.72-163.31t90.14-133.61q57.42-57.44 133.79-89.7 76.38-32.27 163.16-32.27 87.14 0 163.31 32.26 76.16 32.26 133.61 89.71 57.45 57.45 89.71 133.86 32.26 76.42 32.26 163.33 0 86.91-32.27 163.08-32.26 76.18-89.7 133.6-57.45 57.42-133.83 90.14-76.39 32.72-163.27 32.72Zm-.33-105.18q131.13 0 222.68-91.49 91.54-91.49 91.54-222.63 0-131.13-91.49-222.68-91.49-91.54-222.63-91.54-131.13 0-222.68 91.49-91.54 91.49-91.54 222.63 0 131.13 91.49 222.68 91.49 91.54 222.63 91.54ZM480-480Z"}}]}:
Jqe();case "REMOVE_CIRCLE":return{U:"svg",G:{fill:"#fff",height:"100%",version:"1.1",viewBox:"0 0 24 24",width:"100%"},W:[{U:"path",G:{d:"M0 0h24v24H0z",fill:"none"}},{U:"path",G:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11H7v-2h10v2z",fill:"#757575"}}]};case "SKIP_NEXT":return iM();case "SKIP_NEXT_NEW":return z?Eje():{U:"svg",G:{height:"100%",viewBox:"-6 -6 36 36",width:"100%"},W:[{U:"path",G:{d:"M5,18l10-6L5,6V18L5,18z M19,6h-2v12h2V6z",fill:"#fff"}}]};case "LIKE":return ppP();
case "DISLIKE":return VAP();default:return g.WH(new g.WO("Unexpected icon:",l)),null}};
Rh_=function(l){let y=null;l.Z!=null&&(y=[l.Z.serviceEndpoint,l.Z.navigationEndpoint].filter(k=>k!=null),l.Z.command&&(y=y.concat(l.Z.command)));
return y||[]};
l2z=function(){qf==null&&(qf=new DSt);return qf};
WW=function(l,y){if(l.simpleText){a:{l=l.simpleText;if(y&&(y=y_q(l))){y=hV("SPAN",null,y);break a}y=g.ap(l)}return y}const k=[];if(l.runs)for(let z=0;z<l.runs.length;z++){const r=l.runs[z];r.text&&k.push(k95(r,y))}return k.length==1?k[0]:hV("SPAN",null,k)};
k95=function(l,y){var k=null;let z=l.text;y&&(z=y_q(z)||z);l.bold&&(k=hV("B",null,k||z));l.italics&&(k=hV("I",null,k||z));l.strikethrough&&(k=hV("STRIKE",null,k||z));l.navigationEndpoint&&g.E(l.navigationEndpoint,g.Iw)&&(y=g.E(l.navigationEndpoint,g.Iw),k=hV("A",null,k||z),g.HC(k,y.url),y.target=="TARGET_NEW_WINDOW"&&(k.target="_blank"),l=l.navigationEndpoint.loggingUrls)&&(l=l.map(r=>r.baseUrl),l2z().register(k,l),g.zi(k,"ytp-ad-has-logging-urls"));
return k||hV("SPAN",null,z)};
y_q=function(l){l=l.split(/(?:\r\n|\r|\n)/g);if(l.length>1){const y=[l[0]];for(let k=1;k<l.length;k++)y.push(hV("BR")),y.push(l[k]);return y}return null};
T1=function(l){return l&&l.thumbnails&&(l.thumbnails||null).length!=0&&l.thumbnails[0].url?g.My(l.thumbnails[0].url):""};
z$P=function(l,y){if(y.title){var k=g.$b(y.title);l.updateValue("title",k)}if(y.dialogMessages)for(var z of y.dialogMessages)k=WW(z),l.rb.appendChild(k);y.cancelLabel&&(z=g.$b(y.cancelLabel),l.updateValue("cancelLabel",z),l.Z.j(l.K,"click",r=>l.V(r)));
y.confirmLabel&&(y=g.$b(y.confirmLabel),l.updateValue("confirmLabel",y),l.Z.j(l.Y,"click",r=>l.S(r)));
l.Z.j(l.sj,"click",r=>l.J(r))};
Vk=function(l){l.Y&&(l.isToggled()?(g.A2(l.S,!1),g.A2(l.J,!0),l.C.setAttribute("aria-checked",!0)):(g.A2(l.S,!0),g.A2(l.J,!1),l.C.setAttribute("aria-checked",!1)))};
r_z=function(l,y){let k=null;l.N&&(k=(y?[l.N.defaultServiceEndpoint,l.N.defaultNavigationEndpoint]:[l.N.toggledServiceEndpoint]).filter(z=>z!=null));
return k||[]};
$Gg=function(l,y){var k=y.cancelRenderer&&y.cancelRenderer.buttonRenderer||null;k&&(l.Z=new PW(l.api,l.layoutId,l.interactionLoggingClientData,l.l0,["ytp-ad-feedback-dialog-close-button"],"button"),g.x(l,l.Z),l.Z.init(kb("button"),k,l.macros),l.Z.listen("click",l.K,l),l.Z.Uj(l.element));y.title&&(k=g.$b(y.title),l.updateValue("title",k));y.reasonsTitle&&(k=g.$b(y.reasonsTitle),l.updateValue("reasonsTitle",k));y.reasons&&ZUq(l,y.reasons);y.cancelLabel&&(k=g.$b(y.cancelLabel),l.updateValue("cancelLabel",
k),g.DY(l.J,"click",()=>l.K()));
y.confirmLabel&&(k=g.$b(y.confirmLabel),l.updateValue("confirmLabel",k),g.DY(l.S,"click",()=>e$Q(l)));
y.undoRenderer&&A_q(l,y.undoRenderer)};
ZUq=function(l,y){for(const z of y){y=z.reason;if(y==null){g.WH(Error("AdFeedbackReason.reason was not set."));continue}var k=z.endpoint;if(k==null){g.WH(Error("AdFeedbackReason.endpoint was not set."));continue}const r=new QR_(y,k);g.x(l,r);y=l.Y;k=r.Jv();y.appendChild(k);l.V.push(r)}};
e$Q=function(l){var y=l.V.filter(k=>k.isChecked());
y.length!==0&&(y=y[0].getCommand(),l.layoutId?l.l0.executeCommand(y,l.layoutId):g.n(Error("Missing layoutId for ad feedback dialog.")),l.api.onAdUxClicked("ad-feedback-dialog-confirm-button",l.layoutId),l.publish("a"),l.hide())};
A_q=function(l,y){if(y=y&&y.buttonRenderer||null)y.serviceEndpoint?(l.C=new PW(l.api,l.layoutId,l.interactionLoggingClientData,l.l0,["ytp-ad-feedback-dialog-undo-mute-button"],"ad-feedback-undo-mute-button"),g.x(l,l.C),l.C.init(kb("ad-feedback-undo-mute-button"),y,l.macros),l.C.listen("click",l.rb,l),l.C.Uj(l.sj)):g.WH(Error("AdFeedbackRenderer.undoRenderer.undoButtonRenderer was specified but did not contain a service endpoint."))};
tbe=function(l){l.Z&&l.Z.listen("click",l.sj,l);g.DY(l.S,"click",()=>l.sj())};
dGC=function(l,y){if(y=y.content&&y.content.adFeedbackRenderer||null)l.C=new OUy(l.api,l.layoutId,l.interactionLoggingClientData,l.l0),g.x(l,l.C),l.C.init(kb("ad-feedback-dialog"),y,l.macros),l.C.Uj(l.Y),l.C.subscribe("a",()=>l.publish("c"))};
h$P=function(l,y){if(y=y.content&&y.content.confirmDialogRenderer||null)l.V=new w05(l.api,l.layoutId,l.interactionLoggingClientData,l.l0),g.x(l,l.V),l.V.init(kb("ad-mute-confirm-dialog"),y,l.macros),l.V.Uj(l.Y),l.V.subscribe("b",()=>l.publish("c"))};
UGC=function(l,y,k){l.button==null?g.n(Error("AdInfoHoverTextButton.button was expected but it was not created.")):(l.C&&g.zi(l.C.element,"ytp-ad-info-hover-text-short"),(y=y&&y.serviceEndpoint&&g.E(y.serviceEndpoint,G9T)||null)?(a24(l,y,k),l.button.listen("click",()=>{l.Z&&!l.Z.VM&&(l.Z.show(),iUC(l))})):l.button.listen("click",()=>iUC(l)))};
a24=function(l,y,k){y=y.dialog&&g.E(y.dialog,Mbs)||null;y==null?g.n(Error("AdInfoDialogEndpoint did not contain an AdInfoDialogRenderer.")):(l.Z=new X0C(l.api,l.layoutId,l.interactionLoggingClientData,l.l0,l.V),g.x(l,l.Z),l.Z.init(kb("ad-info-dialog"),y,k),l.Z.Uj(l.V),l.Z.subscribe("d",()=>l.publish("f")),l.Z.subscribe("c",()=>l.publish("e")))};
iUC=function(l){l.api.onAdUxClicked("ad-info-icon-button",l.layoutId)};
J4=function(l,y){y&&g.C9(l.element,A4(l.Z,y))};
Yb=function(l){l.Z&&l.Y===-1&&(l.Y=l.Z.subscribe("h",l.N,l),l.Xr=l.Z.subscribe("g",l.J,l),l.N())};
pe=function(l){l.Z!=null&&l.Y!==-1&&(l.Z.Dl(l.Y),l.Z.Dl(l.Xr),l.Xr=-1,l.Y=-1)};
Ke=function(l,y){l=l.element.element;y?l.setAttribute("aria-hidden","true"):l.removeAttribute("aria-hidden")};
c_e=function(l){switch(l){case 2:return 0;case 1:return 2;case 0:return 3;case 4:case 3:return 1;default:Rg(l,"unknown result type")}};
Cp_=function(l,y){let k=1;l.isTrusted===!1&&(k=0);AK("ISDSTAT",k);gM(k,"i.s_",{triggerContext:"sk",metadata:y});return k};
bUs=function(l,y){const k=[];y?y.isTrusted===!0?k.push("BISCOTTI_BASED_DETECTION_STATE_AS_SEEK_EVENT_TRUSTED"):y.isTrusted===!1?k.push("BISCOTTI_BASED_DETECTION_STATE_AS_SEEK_EVENT_NOT_TRUSTED"):k.push("BISCOTTI_BASED_DETECTION_STATE_AS_SEEK_EVENT_TRUSTED_PROPERTY_UNDEFINED"):k.push("BISCOTTI_BASED_DETECTION_STATE_AS_SEEK_EVENT_UNDEFINED");gM(0,"a.s_",{metadata:l,states:k});AK("ASDSTAT",0)};
gM=function(l,y,k){y=uDQ[y];const z={detected:l===0,source:`${y.C}${k.triggerContext??""}${k.hn??""}`,detectionStates:k.states,durationMs:k.cg};k.metadata&&(z.contentCpn=k.metadata.contentCpn,z.adCpn=k.metadata.adCpn);g.wv("biscottiBasedDetection",z);y.Z!==void 0&&(k=Number(g.Y("CATSTAT",0)),y.Z!==void 0?(y=y.Z,l=c_e(l),l=k&~(3<<y)|l<<y):l=k,AK("CATSTAT",l))};
EP=function(l,y,k,z={},r){if(!r||Math.random()<5E-4){y=y||null;k=k||null;l=l instanceof Error?l:new g.WO(l);if(l.args)for(const Z of l.args)Z instanceof Object&&(z={...Z,...z});z.category="H5 Ads Control Flow";y&&(z.slot=y?`slot: ${""} ${y.slotType}`:"");k&&(z.layout=k?`layout: ${""} ${k.layoutType}`:"",z.layoutId=k.layoutId);r&&(z.known_error_aggressively_sampled=!0);l.args=[z];g.WH(l)}};
fe=function(l,y){return l.state.Z(y)&&!l.oldState.Z(y)?1:!l.state.Z(y)&&l.oldState.Z(y)?-1:0};
mGe=function(l){l=l.sj&&l.sj.adRendererCommands;return(l&&l.clickCommand&&g.E(l.clickCommand,g.jr)&&g.E(l.clickCommand,g.jr).commands||[]).some(y=>y.adLifecycleCommand?xGz(y.adLifecycleCommand):!1)};
xGz=function(l){return l.action==="END_LINEAR_AD"||l.action==="END_LINEAR_AD_PLACEMENT"};
q$4=function(l,y){l.S||(l.S=!0,l.C&&(y?l.C.sj.hide():l.C.hide()),y?(l=l.V,l.T7.show(),l.show()):l.V.show())};
g.Sr=function(l,y){var k=Math.abs(Math.floor(l)),z=Math.floor(k/86400);const r=Math.floor(k%86400/3600),Z=Math.floor(k%3600/60);k=Math.floor(k%60);if(y){y="";z>0&&(y+=` ${z} `+"Ng\u00e0y");if(z>0||r>0)y+=` ${r} `+"Gi\u1edd";y+=` ${Z} `+"Ph\u00fat";y+=` ${k} `+"Gi\u00e2y";z=y.trim()}else{y="";z>0&&(y+=`${z}:`,r<10&&(y+="0"));if(z>0||r>0)y+=`${r}:`,Z<10&&(y+="0");y+=`${Z}:`;k<10&&(y+="0");z=y+k}return l>=0?z:`-${z}`};
g.ne=function(l){return(!("button"in l)||typeof l.button!=="number"||l.button===0)&&!("shiftKey"in l&&l.shiftKey)&&!("altKey"in l&&l.altKey)&&!("metaKey"in l&&l.metaKey)&&!("ctrlKey"in l&&l.ctrlKey)};
WLq=function(l,y){return l.C+y*(l.Z-l.C)};
Fh=function(l,y,k){return l.Z-l.C?g.gf((y-l.C)/(l.Z-l.C),0,1):k!=null?k:Infinity};
I2e=function(l){l=l.api.O();return g.ow(l)&&l.C||l.X("embeds_desktoff_enable_ads_top_bar")&&!1};
T5z=function(l){l&=16777215;var y=[(l&16711680)>>16,(l&65280)>>8,l&255];l=y[0];var k=y[1];y=y[2];l=Number(l);k=Number(k);y=Number(y);if(l!=(l&255)||k!=(k&255)||y!=(y&255))throw Error('"('+l+","+k+","+y+'") is not a valid RGB color');k=l<<16|k<<8|y;return l<16?"#"+(16777216|k).toString(16).slice(1):"#"+k.toString(16)};
g.sP=function(){if(!Nf){Nf=new FZ(new Vby);const l=fl("client_streamz_web_flush_count",-1);l!==-1&&(Nf.N=l)}return Nf};
Ppg=function(){let l=!1;try{l=!!window.sessionStorage.getItem("session_logininfo")}catch{l=!0}return(g.Y("INNERTUBE_CLIENT_NAME")==="WEB"||g.Y("INNERTUBE_CLIENT_NAME")==="WEB_CREATOR")&&l};
Le=function(){try{window.sessionStorage.removeItem("stickiness_reload");window.sessionStorage.removeItem("session_logininfo");AK("LOGIN_INFO","");window.sessionStorage.setItem("from_switch_account","1");var l;let k=J_4;k||(k=document.querySelector("#persist_identity"));if(l=k){var y=l.src?(new URL(l.src)).origin:"*";l.contentWindow?.postMessage({action:"clear"},y)}}catch{}};
vW=function(l){l&&(l.startsWith("https://accounts.google.com/AddSession")?Le():l.startsWith("https://accounts.google.com/ServiceLogin")?Le():l.startsWith("https://myaccount.google.com")&&g.Ie(l).C.endsWith("/youtubeoptions")&&Le());if(g.Y("LOGGED_IN",!0)&&Ppg()){var y=g.Y("VALID_SESSION_TEMPDATA_DOMAINS",[]);var k=g.$7(window.location.href);k&&y.push(k);k=g.$7(l);g.ro(y,k)||!k&&w4(l,"/")?(y=OI(l),(y=dD(y))?(y=n7P(y),y=(y=g.e_(y)||null)?iO(y):{}):y=null):y=null;y==null&&(y={});k=y;var z=void 0;Ppg()?
(z||(z=g.Y("LOGIN_INFO")),z?(k.session_logininfo=z,k=!0):k=!1):k=!1;k&&cH(l,y)}};
g.Y$C=function(l){var y=window;l=g.UI(l,{});vW(l);l=g.L3(l+"");y=y.location;l=BC(l);l!==void 0&&(y.href=l)};
g.BW=function(l,y={},k=!1){const z=g.Y("EVENT_ID");z&&(y.ei||(y.ei=z));y&&cH(l,y);k||(vW(l),g.Y$C(l))};
g.HW=function(l,y,k,z,r=!1){k&&cH(l,k);k=g.L3(l);const Z=g.Fv(k);l!=Z&&dJ(Error(`Unsafe window.open URL: ${l}`));l=Z;y=y||Xn(l).toString(36);try{if(r)return r=l,r=rEP(r),vW(r),g.kv(window,r,y,"attributionsrc")}catch(e){g.tK(e)}vW(l);return g.kv(window,k,y,z)};
p05=function(l){Rw=l};
KLe=function(l){Ds=l};
gAt=function(l){lH=l};
f2z=function(){EAC=lH=Ds=Rw=null};
jRe=function(l){l.addEventListener("updateKevlarOrC3Companion",p05);l.addEventListener("updateEngagementPanelAction",KLe);l.addEventListener("changeEngagementPanelVisibility",gAt);window.addEventListener("yt-navigate-start",f2z)};
nAQ=function(){var l=window.location.href;if(g.EJ("kevlar_disable_theme_param"))return null;QK(l);try{const y=g.MK(l).theme;return S$y.get(y)||null}catch(y){}return null};
FLs=function(l,y){if(y.encryptedTokenJarContents&&(l.Z[y.encryptedTokenJarContents]=y,typeof y.expirationSeconds==="string")){const k=Number(y.expirationSeconds);setTimeout(()=>{delete l.Z[y.encryptedTokenJarContents]},k*1E3);
l.C&&g.ZY("CONSISTENCY",y.encryptedTokenJarContents,k,void 0,!0)}};
yw=function(l){return l.localStorage===void 0?new SG("yt-client-location"):l.localStorage};
g.rl=function(l,y=!1,k=!1){var z=g.Y("INNERTUBE_CONTEXT");if(!z)return g.n(Error("Error: No InnerTubeContext shell provided in ytconfig.")),{};z=g.Ze(z);g.EJ("web_no_tracking_params_in_shell_killswitch")||delete z.clickTracking;z.client||(z.client={});var r=z.client;r.clientName==="MWEB"&&r.clientFormFactor!=="AUTOMOTIVE_FORM_FACTOR"&&(r.clientFormFactor=g.Y("IS_TABLET")?"LARGE_FORM_FACTOR":"SMALL_FORM_FACTOR");r.screenWidthPoints=window.innerWidth;r.screenHeightPoints=window.innerHeight;r.screenPixelDensity=
Math.round(window.devicePixelRatio||1);r.screenDensityFloat=window.devicePixelRatio||1;r.utcOffsetMinutes=-Math.floor((new Date).getTimezoneOffset());var Z=g.wz();var e="USER_INTERFACE_THEME_LIGHT";Z.G7(165)?e="USER_INTERFACE_THEME_DARK":Z.G7(174)?e="USER_INTERFACE_THEME_LIGHT":!g.EJ("kevlar_legacy_browsers")&&window.matchMedia&&window.matchMedia("(prefers-color-scheme)").matches&&window.matchMedia("(prefers-color-scheme: dark)").matches&&(e="USER_INTERFACE_THEME_DARK");Z=nAQ()||e;r.userInterfaceTheme=
Z;if(!y){if(Z=z9y())r.connectionType=Z;g.EJ("web_log_effective_connection_type")&&(Z=ZZq())&&(z.client.effectiveConnectionType=Z)}g.EJ("web_log_memory_total_kbytes")&&g.aC.navigator?.deviceMemory&&(z.client.memoryTotalKbytes=`${g.aC.navigator?.deviceMemory*1E6}`);if(g.EJ("web_gcf_hashes_innertube")){var A=Opt();A&&(Z=A.coldConfigData,e=A.coldHashData,A=A.hotHashData,z.client.configInfo=z.client.configInfo||{},Z&&(z.client.configInfo.coldConfigData=Z),e&&(z.client.configInfo.coldHashData=e),A&&(z.client.configInfo.hotHashData=
A))}Z=g.MK(g.aC.location.href);!g.EJ("web_populate_internal_geo_killswitch")&&Z.internalcountrycode&&(r.internalGeo=Z.internalcountrycode);r.clientName==="MWEB"||r.clientName==="WEB"?(r.mainAppWebInfo||(r.mainAppWebInfo={}),r.mainAppWebInfo.graftUrl=g.aC.location.href,g.EJ("kevlar_woffle")&&oAC.instance&&(Z=oAC.instance,r.mainAppWebInfo.pwaInstallabilityStatus=!Z.Z&&Z.C?"PWA_INSTALLABILITY_STATUS_CAN_BE_INSTALLED":"PWA_INSTALLABILITY_STATUS_UNKNOWN"),r.mainAppWebInfo.webDisplayMode=ty(),r.mainAppWebInfo.isWebNativeShareAvailable=
navigator&&navigator.share!==void 0):r.clientName==="TVHTML5"&&(!g.EJ("web_lr_app_quality_killswitch")&&(Z=g.Y("LIVING_ROOM_APP_QUALITY"))&&(r.tvAppInfo=Object.assign(r.tvAppInfo||{},{appQuality:Z})),Z=g.Y("LIVING_ROOM_CERTIFICATION_SCOPE"))&&(r.tvAppInfo=Object.assign(r.tvAppInfo||{},{certificationScope:Z}));if(!g.EJ("web_populate_time_zone_itc_killswitch")){a:{if(typeof Intl!=="undefined")try{var Q=(new Intl.DateTimeFormat).resolvedOptions().timeZone;break a}catch{}Q=void 0}Q&&(r.timeZone=Q)}(Q=
ju())?r.experimentsToken=Q:delete r.experimentsToken;r=Su();kV.instance||(kV.instance=new kV);Q=sy(kV.instance.Z);z.request={...z.request,internalExperimentFlags:r,consistencyTokenJars:Q};!g.EJ("web_prequest_context_killswitch")&&(r=g.Y("INNERTUBE_CONTEXT_PREQUEST_CONTEXT"))&&(z.request.externalPrequestContext=r);Q=g.wz();r=Q.G7(58);Q=Q.get("gsml","");z.user={...z.user};r&&(z.user.enableSafetyMode=r);Q&&(z.user.lockedSafetyMode=!0);g.EJ("warm_op_csn_cleanup")?k&&(y=g.MM())&&(z.clientScreenNonce=y):
!y&&(y=g.MM())&&(z.clientScreenNonce=y);l&&(z.clickTracking={clickTrackingParams:l});if(l=g.UT("yt.mdx.remote.remoteClient_"))z.remoteClient=l;zX.getInstance().setLocationOnInnerTubeContext(z);try{var t=I3(),O=t.bid;delete t.bid;z.adSignalsInfo={params:[],bid:O};for(const [d,w]of Object.entries(t))t=d,O=w,z.adSignalsInfo.params?.push({key:t,value:`${O}`});if(z.client?.clientName==="TVHTML5"||z.client?.clientName==="TVHTML5_UNPLUGGED"){const d=g.Y("INNERTUBE_CONTEXT");d.adSignalsInfo&&(z.adSignalsInfo.advertisingId=
d.adSignalsInfo.advertisingId,z.adSignalsInfo.advertisingIdSignalType="DEVICE_ID_TYPE_CONNECTED_TV_IFA",z.adSignalsInfo.limitAdTracking=d.adSignalsInfo.limitAdTracking)}}catch(d){g.n(d)}return z};
LL4=function(l,y){if(!l)return!1;var k=g.E(l,N5C)?.signal;if(k&&y.QF)return!!y.QF[k];if((k=g.E(l,sRs)?.request)&&y.KO)return!!y.KO[k];for(const z in l)if(y.Sq[z])return!0;return!1};
vAz=function(l){const y={"Content-Type":"application/json"};g.Y("EOM_VISITOR_DATA")?y["X-Goog-EOM-Visitor-Id"]=g.Y("EOM_VISITOR_DATA"):g.Y("VISITOR_DATA")&&(y["X-Goog-Visitor-Id"]=g.Y("VISITOR_DATA"));y["X-Youtube-Bootstrap-Logged-In"]=g.Y("LOGGED_IN",!1);g.Y("DEBUG_SETTINGS_METADATA")&&(y["X-Debug-Settings-Metadata"]=g.Y("DEBUG_SETTINGS_METADATA"));l!=="cors"&&((l=g.Y("INNERTUBE_CONTEXT_CLIENT_NAME"))&&(y["X-Youtube-Client-Name"]=l),(l=g.Y("INNERTUBE_CONTEXT_CLIENT_VERSION"))&&(y["X-Youtube-Client-Version"]=
l),(l=g.Y("CHROME_CONNECTED_HEADER"))&&(y["X-Youtube-Chrome-Connected"]=l),(l=g.Y("DOMAIN_ADMIN_STATE"))&&(y["X-Youtube-Domain-Admin-State"]=l));(l=g.Y("SERIALIZED_LAVA_DEVICE_CONTEXT"))&&(y["X-YouTube-Lava-Device-Context"]=l);return y};
Zz=function(l){return()=>new l};
HU5=function(l){if(l.length===1)return l[0];var y=B5P.UNKNOWN_INTERFACE;if(y){y=new RegExp(y);for(var k of l)if(y.exec(k))return k}const z=[];Object.entries(B5P).forEach(([r,Z])=>{"UNKNOWN_INTERFACE"!==r&&z.push(Z)});
k=new RegExp(z.join("|"));l.sort((r,Z)=>r.length-Z.length);
for(const r of l)if(!k.exec(r))return r;return l[0]};
g.ei=function(l){return`/youtubei/v1/${HU5(l)}`};
At=function(l){return g.UT("ytcsi."+(l||"")+"data_")||R$C(l)};
DGP=function(){const l=At();l.info||(l.info={});return l.info};
$V=function(l){l=At(l);l.metadata||(l.metadata={});return l.metadata};
Qw=function(l){l=At(l);l.tick||(l.tick={});return l.tick};
tt=function(l){l=At(l);if(l.gel){const y=l.gel;y.gelInfos||(y.gelInfos={});y.gelTicks||(y.gelTicks={})}else l.gel={gelTicks:{},gelInfos:{}};return l.gel};
lXq=function(l){l=tt(l);l.gelInfos||(l.gelInfos={});return l.gelInfos};
yT4=function(){const l=tt();l.preLoggedGelInfos||(l.preLoggedGelInfos=[]);return l.preLoggedGelInfos};
Oo=function(l){let y=At(l).nonce;y||(y=g.tW(16),At(l).nonce=y);return y};
dl=function(l,y,k){var z=y^l;if((l>>1&14)>=2&&(l|9)<19)a:{var r=g.E(k,kWg)||k[G[z^677]],Z={WS:!1,yq:G[3],Vd:G[3],s:G[3]};if(!r){var e=Z;break a}r=iO(r);Z[G[z^697]]=!0;Z[G[z^704]]=r[G[z^760]];Z[G[z^688]]=r[G[z^767]];Z[G[z^673]]=r[G[z^673]];e=Z}if((l&28)==l){x2(z^4367,z^2863,k);Z=k[G[z^4410]]+(k[G[z^4410]]?G[z^4471]:G[z^4449])+k[G[z^4398]]+k[G[z^4408]];if(Jp(3,z^5734,k)){const A=[];g.fR(k[G[5]],(Q,t)=>{Q!==null&&A[G[z^4397]](`${t}=${Q}`)});
Z+=`?${A[G[z^4369]](G[z^4393])}`}e=Z}if((l-7&7)==2){Z=z^6709;for(r=[];++Z-r[G[2]]-(z^6741);){switch(Z){case z^6735:Z-=z^6779;case z^6702:case z^6697:case z^6696:continue;case z^6670:Z=z^6746;case z^6699:case z^6698:case z^6677:continue;case z^6747:Z=z^6698}r[G[z^6767]](String[G[z^6704]](Z))}e=r}return e};
R$C=function(l){const y={tick:{},info:{}};g.iQ("ytcsi."+(l||"")+"data_",y);return y};
ztQ=function(){let l=g.UT("ytcsi.debug");l||(l=[],g.iQ("ytcsi.debug",l),g.iQ("ytcsi.reference",{}));return l};
ZBz=function(l){const y=ztQ();y.push(l);g.EJ("limit_ytcsi_debug_array_size")&&y.length>rTz&&y.splice(0,y.length-rTz)};
wl=function(l){l=l||"";const y=et4();if(y[l])return y[l];const k={timerName:l,info:{},tick:{},span:{},jspbInfo:[]};ZBz(k);return y[l]=k};
ATe=function(l){l=l||"";const y=et4();y[l]&&delete y[l];const k={timerName:l,info:{},tick:{},span:{},jspbInfo:[]};ZBz(k);y[l]=k};
et4=function(){const l=g.UT("ytcsi.reference");if(l)return l;ztQ();return g.UT("ytcsi.reference")};
ht=function(l){return $iQ[l]||"LATENCY_ACTION_UNKNOWN"};
dis=function(l,y,k={}){var z=Math.round(k.timestamp||(0,g.f)());hF(l,1,z<Number.MAX_SAFE_INTEGER?z:0);z=new QVy;if(k.lact)hF(z,1,isFinite(k.lact)?k.lact:-1);else if(k.timestamp)hF(z,1,-1);else{var r=hW();hF(z,1,isFinite(r)?r:-1)}if(k.sequenceGroup&&!g.EJ("web_gel_sequence_info_killswitch")){r=k.sequenceGroup;const Z=WI_(r),e=new tOe;hF(e,2,Z);GM(e,1,r);rZ(z,tOe,3,e);k.endOfSequence&&delete OB_[k.sequenceGroup]}rZ(l,QVy,33,z);(k.sendIsolatedPayload?Rl5:DJT)("latencyActionInfo",{endpoint:"log_event",
payload:l,cttAuthInfo:k.cttAuthInfo,dangerousLogToVisitorSession:k.dangerousLogToVisitorSession},y)};
wQq=function(l,y={}){let k=!1;g.Y("ytLoggingEventsDefaultDisabled",!1)&&(k=!0);dis(l,k?null:g.dv,y)};
aI=function(){GX.instance||(GX.instance=new GX);return GX.instance};
Uo=function(l,y){iH[y]=iH[y]||{count:0};var k=iH[y];k.count++;k.time=(0,g.f)();l.Z||(l.Z=g.cs(0,()=>{const z=(0,g.f)();for(const r in iH)iH[r]&&z-iH[r].time>6E4&&delete iH[r];l&&(l.Z=0)},5E3));
return k.count>5?(k.count===6&&Math.random()*1E5<1&&(k=new g.WO("CSI data exceeded logging limit with key",y.split("_")),y.indexOf("plev")>=0||g.WH(k)),!0):!1};
ht5=function(){var l;g.EJ("csi_use_performance_navigation_timing")?(l=M5?.getEntriesByType?.("navigation")?.[0]?.toJSON?.())?(l.requestStart=XJ(l.requestStart),l.responseEnd=XJ(l.responseEnd),l.redirectStart=XJ(l.redirectStart),l.redirectEnd=XJ(l.redirectEnd),l.domainLookupEnd=XJ(l.domainLookupEnd),l.connectStart=XJ(l.connectStart),l.connectEnd=XJ(l.connectEnd),l.responseStart=XJ(l.responseStart),l.secureConnectionStart=XJ(l.secureConnectionStart),l.domainLookupStart=XJ(l.domainLookupStart),l.isPerformanceNavigationTiming=
!0):l=M5.timing:l=g.EJ("csi_performance_timing_to_object")?JSON.parse(JSON.stringify(M5.timing)):M5.timing;return l};
XJ=function(l){return Math.round(co()+l)};
co=function(){return(g.EJ("csi_use_time_origin")||g.EJ("csi_use_time_origin_tvhtml5"))&&M5.timeOrigin?Math.floor(M5.timeOrigin):M5.timing.navigationStart};
GW5=function(){const l=yT4(),y=lXq();var k=void 0;for(var z=0;z<l.length;z++){const A=l[z];if(A.loadType){k=A.loadType;break}}if($V().loadType==="cold"&&(y.loadType==="cold"||k==="cold")){k=Qw();z=tt();z=z.gelTicks?z.gelTicks:z.gelTicks={};for(var r in k)r in z||typeof k[r]==="number"&&C4(r,bH(r));var Z={},e=!1;r=A=>{em(y,A);em(Z,A);e=!0};
for(const A of l)r(A);e&&uH(Z)}};
xV=function(l,y){C4("_start",l,y)};
uH=function(l,y){if(!g.EJ("web_csi_action_sampling_enabled")||!At(y).actionDisabled){var k=wl(y||"");em(k.info,l);l.loadType&&(k=l.loadType,$V(y).loadType=k);em(lXq(y),l);k=Oo(y);y=At(y).cttAuthInfo;aI().info(l,k,y)}};
aXC=function(){return(ck().resolve(aW(wc))?.Km()?.loggingHotConfig?.csiConfig?.debugTicks??[]).map(l=>Object.values(l)[0])};
C4=function(l,y,k){if(!g.EJ("web_csi_action_sampling_enabled")||!At(k).actionDisabled){var z=Oo(k),r;if(r=g.EJ("web_csi_debug_sample_enabled")&&z){ck().resolve(aW(wc))?.Km()&&!iBP&&(iBP=!0,C4("gcfl",(0,g.f)(),k));r=ck().resolve(aW(wc))?.Km()?.loggingHotConfig?.csiConfig?.debugSampleWeight||0;var Z;if(Z=r!==0)b:{Z=aXC();if(Z.length>0)for(let A=0;A<Z.length;A++)if(l===Z[A]){Z=!0;break b}Z=!1}Z?(r=wpg(z)%r!==0,At(k).debugTicksExcludedLogged||(Z={},Z.debugTicksExcluded=r,uH(Z,k)),At(k).debugTicksExcludedLogged=
!0):r=!1}if(!r){if(l[0]!=="_"&&(r=l,Z=y,M5.mark))if(r.startsWith("mark_")||(r="mark_"+r),k&&(r+=` (${k})`),Z===void 0||g.EJ("web_csi_disable_alt_time_performance_mark"))M5.mark(r);else{Z=g.EJ("csi_use_performance_navigation_timing")?Z-M5.timeOrigin:Z-(M5.timeOrigin||M5.timing.navigationStart);try{M5.mark(r,{startTime:Z})}catch(A){}}r=wl(k||"");r.tick[l]=y||(0,g.f)();if(r.callback&&r.callback[l])for(var e of r.callback[l])e();e=tt(k);e.gelTicks&&(e.gelTicks[l]=!0);r=Qw(k);e=y||(0,g.f)();r[l]=e;r=At(k).cttAuthInfo;
l==="_start"?(l=aI(),Uo(l,`baseline_${z}`)||g.wv("latencyActionBaselined",{clientActionNonce:z},{timestamp:y,cttAuthInfo:r})):aI().tick(l,z,y,r);UiT(k);return e}}};
MOt=function(){const l=M5.getEntriesByType?.("mark");l&&l.forEach(y=>{y.name.startsWith("mark_")&&M5.clearMarks?.(y.name)})};
XQQ=function(){switch(frC()){case "hidden":return 0;case "visible":return 1;case "prerender":return 2;case "unloaded":return 3;default:return-1}};
cT4=function(l){const y={},k=(z,r,Z)=>{r=r.match("_rid")?r.split("_rid")[0]:r;typeof Z==="number"&&(Z=JSON.stringify(Z));z.requestIds?z.requestIds.push({endpoint:r,id:Z}):z.requestIds=[{endpoint:r,id:Z}]};
for(const [z,r]of Object.entries(l)){l=z;const Z=r;switch(l){case "GetBrowse_rid":k(y,l,Z);break;case "GetGuide_rid":k(y,l,Z);break;case "GetHome_rid":k(y,l,Z);break;case "GetPlayer_rid":k(y,l,Z);break;case "GetSearch_rid":k(y,l,Z);break;case "GetSettings_rid":k(y,l,Z);break;case "GetTrending_rid":k(y,l,Z);break;case "GetWatchNext_rid":k(y,l,Z);break;case "yt_red":y.isRedSubscriber=!!Z;break;case "yt_ad":y.isMonetized=!!Z}}return y};
CA5=function(l,y){l=document.querySelector(l);if(!l)return!1;var k="";const z=l.nodeName;z==="SCRIPT"?(k=l.src,k||(k=l.getAttribute("data-timing-href"))&&(k=window.location.protocol+k)):z==="LINK"&&(k=l.href);ze(document)&&l.setAttribute("nonce",ze(document));return k?(l=M5.getEntriesByName(k))&&l[0]&&(l=l[0],k=co(),C4("rsf_"+y,k+Math.round(l.fetchStart)),C4("rse_"+y,k+Math.round(l.responseEnd)),l.transferSize!==void 0&&l.transferSize===0)?!0:!1:!1};
bBQ=function(){const l=window.location.protocol;var y=M5.getEntriesByType("resource");y=g.oC(y,k=>k.name.indexOf(`${l}//fonts.gstatic.com/s/`)===0);
(y=ve(y,(k,z)=>z.duration>k.duration?z:k,{duration:0}))&&y.startTime>0&&y.responseEnd>0&&(C4("wffs",XJ(y.startTime)),C4("wffe",XJ(y.responseEnd)))};
u9s=function(l,y,k){M5&&M5.measure&&(l.startsWith("measure_")||(l="measure_"+l),k?M5.measure(l,y,k):y?M5.measure(l,y):M5.measure(l))};
xi_=function(l){var y=bH("aft",l);if(y)return y;y=g.Y((l||"")+"TIMING_AFT_KEYS",["ol"]);const k=y.length;for(let z=0;z<k;z++){const r=bH(y[z],l);if(r)return r}return NaN};
mm=function(l,y){g.iQ("ytglobal.timing"+(y||"")+"ready_",l)};
bH=function(l,y){if(l=Qw(y)[l])return typeof l==="number"?l:l[l.length-1]};
UiT=function(l){const y=bH("_start",l),k=xi_(l),z=!mig;y&&k&&z&&(WS(qQz,new Wg4(Math.round(k-y),l)),mig=!0)};
IXg=function(){if(M5.getEntriesByType){var l=M5.getEntriesByType("paint");if(l=g.Dg(l,k=>k.name==="first-paint"))return XJ(l.startTime)}let y;
g.EJ("csi_use_performance_navigation_timing")?y=M5.getEntriesByType("first-paint")[0].startTime:y=M5.timing.Sm$;return y?Math.max(0,y):0};
TX=function(l){R$C(l);T2q();MOt();l||(g.Y("TIMING_ACTION")&&AK("PREVIOUS_ACTION",g.Y("TIMING_ACTION")),AK("TIMING_ACTION",""))};
VOq=function(){var l=["pbs","pbu"];g.OJ(()=>{wl("").info.actionType="watch";l&&AK("TIMING_AFT_KEYS",l);AK("TIMING_ACTION","watch");var y=cT4(g.Y("TIMING_INFO",{}));Object.keys(y).length>0&&uH(y);y={isNavigation:!0,actionType:ht(g.Y("TIMING_ACTION"))};var k=g.Y("PREVIOUS_ACTION");k&&(y.previousAction=ht(k));if(k=g.Y("CLIENT_PROTOCOL"))y.httpProtocol=k;if(k=g.Y("CLIENT_TRANSPORT"))y.transportProtocol=k;(k=g.MM())&&k!=="UNDEFINED_CSN"&&(y.clientScreenNonce=k);k=XQQ();if(k===1||k===-1)y.isVisible=!0;
k=$V().loadType==="cold";var z=DGP();k||(k=z.yt_lt==="cold");if(k){y.loadType="cold";k=DGP();z=ht5();let e=co();const A=g.Y("CSI_START_TIMESTAMP_MILLIS",0);A>0&&!g.EJ("embeds_web_enable_csi_start_override_killswitch")&&(e=A);e&&(C4("srt",z.responseStart),k.prerender!==1&&xV(e));k=IXg();k>0&&C4("fpt",k);k=ht5();k.isPerformanceNavigationTiming&&uH({performanceNavigationTiming:!0},void 0);C4("nreqs",k.requestStart,void 0);C4("nress",k.responseStart,void 0);C4("nrese",k.responseEnd,void 0);k.redirectEnd-
k.redirectStart>0&&(C4("nrs",k.redirectStart,void 0),C4("nre",k.redirectEnd,void 0));k.domainLookupEnd-k.domainLookupStart>0&&(C4("ndnss",k.domainLookupStart,void 0),C4("ndnse",k.domainLookupEnd,void 0));k.connectEnd-k.connectStart>0&&(C4("ntcps",k.connectStart,void 0),C4("ntcpe",k.connectEnd,void 0));k.secureConnectionStart>=co()&&k.connectEnd-k.secureConnectionStart>0&&(C4("nstcps",k.secureConnectionStart,void 0),C4("ntcpe",k.connectEnd,void 0));M5&&"getEntriesByType"in M5&&bBQ();k=[];if(document.querySelector&&
M5&&M5.getEntriesByName)for(r in Vw)Vw.hasOwnProperty(r)&&(z=Vw[r],CA5(r,z)&&k.push(z));var r=k;if(r.length>0){y.resourceInfo=[];for(var Z of r)y.resourceInfo.push({resourceCache:Z})}}uH(y);GW5();mm(!0);Z=g.Y("TIMING_ACTION");g.UT("ytglobal.timingready_")&&Z&&Po()&&xi_()&&UiT()})()};
PA_=function(){var l={};g.OJ(()=>{Po()&&Jt("aa",void 0,void 0);ATe();TX();mm(!1);l.cttAuthInfo&&(At().cttAuthInfo=l.cttAuthInfo);AK("TIMING_AFT_KEYS",[]);l.Vbr?g.YV({loadType:"hot"}):g.YV({loadType:"warm"});AK("TIMING_ACTION","");delete g.Y("TIMING_INFO",{}).yt_lt;g.OJ(xV)(l.startTime,void 0)})()};
p4=function(l,y={}){g.OJ(()=>{JTQ(l);var k=y.sampleRate;if(!g.EJ("web_csi_action_sampling_enabled")||k===void 0||k<=1)k=!1;else{var z=Oo(l);k=wpg(z)%k!==0}k&&(At(l).actionDisabled=!0);wl(l||"").info.actionType=l;y.cttAuthInfo&&(At(l).cttAuthInfo=y.cttAuthInfo);AK(l+"TIMING_ACTION",l);g.OJ(xV)(y.startTime,l);k={actionType:ht(l)};y.p1d&&(k.previousAction=ht(g.Y("TIMING_ACTION")));(z=g.MM())&&z!=="UNDEFINED_CSN"&&(k.clientScreenNonce=z);g.YV(k,l);mm(!0,l)})()};
JTQ=function(l){g.OJ(()=>{Po(l)&&Jt("aa",void 0,l);ATe(l);TX(l)})()};
Po=function(l){return g.OJ(()=>K4("_start",l))()};
g.YV=function(l,y,k=!1){g.OJ(uH)(l,y,k)};
Jt=function(l,y,k){return g.OJ(C4)(l,y,k)};
YQz=function(l){g.OJ(u9s)("action_finished",l,void 0)};
K4=function(l,y){return g.OJ(()=>{const k=Qw(y);return l in k})()};
KgQ=function(l){if(!g.EJ("universal_csi_network_ticks"))return"";l=QK(l)||"";const y=Object.keys(pQz);for(let k=0;k<y.length;k++){const z=y[k];if(l.includes(z))return z}return""};
Ew5=function(l){if(!g.EJ("universal_csi_network_ticks"))return()=>{};
const y=pQz[l];return y?(gl(y),()=>{var k=g.EJ("universal_csi_network_ticks")?(k=gws[l])?gl(k):!1:!1;return k}):()=>{}};
gl=function(l,y,k){return g.OJ(()=>{if(K4(l,k))return!1;Jt(l,y,k);return!0})()};
Eo=function(l,y,k){g.OJ(()=>{if(!Po(k)||K4(l,k))return!1;Jt(l,y,k);return!0})()};
fX4=function(){g.OJ(()=>{const l=Oo();requestAnimationFrame(()=>{setTimeout(()=>{l===Oo()&&Jt("ftl",void 0,void 0)},0)})})()};
jVg=function(l,y,k,z,r){if(f4.instance!==void 0){if(z=f4.instance,l=[l!==z.V,y!==z.rT,k!==z.Z,r!==z.N,!1,!1,!1],l.some(Z=>Z))throw new g.WO("InnerTubeTransportService is already initialized",l);
}else f4.instance=new f4(l,y,k,z,r)};
SQ_=function(l,y){a:{l=l.V;var k=g.E(y,N5C)?.signal;if(k&&l.QF&&(k=l.QF[k])){var z=k();break a}if((k=g.E(y,sRs)?.request)&&l.KO&&(k=l.KO[k])){z=k();break a}for(z in y)if(l.Sq[z]&&(y=l.Sq[z])){z=y();break a}z=void 0}if(z!==void 0)return Promise.resolve(z)};
nwq=function(l,y,k){l=l.Z.Hm(y?.rJ?.identity||uX,{sessionIndex:y?.rJ?.sessionIndex});return{...vAz(k),...l}};
Fg5=async function(l,y,k){l=await g.SK(l.Z.Hm(y?.rJ?.identity||uX,{sessionIndex:y?.rJ?.sessionIndex}));return Promise.resolve({...vAz(k),...l})};
B2z=async function(l,y,k,z=()=>{}){var r=y.config?.rX?.gt;
if(r&&l.N&&l.N.has(r)&&!y.config?.rX?.disableCache){var Z=await l.N.get(r);if(Z&&!Z.isExpired())return z=owz(Z),g.EJ("web_process_response_store_responses")&&!Z.isProcessed()&&(N2P(l,z,y),await sVe(l.N,r)),Promise.resolve(z)}await LgT(y);(r=y.config?.requestKey)&&l.C.has(r)?k=l.C.get(r):(Z=JSON.stringify(y.YO),y.Ue={...y.Ue,headers:{...(y.Ue?.headers??{}),...k}},k={...y.Ue},y.Ue.method==="POST"&&(k={...k,body:Z}),y.config?.GP&&Jt(y.config.GP),k=l.rT.fetch(y.input,k,y.config),r&&l.C.set(r,k));(k=await k)&&
g.EJ("web_streaming_player")&&Array.isArray(k)&&(k=k[0].playerResponse);if(k&&"error"in k&&k?.error?.details){Z=k.error.details;for(const e of Z)(Z=e["@type"])&&vw_.indexOf(Z)>-1&&(delete e["@type"],k=e)}r&&l.C.has(r)&&l.C.delete(r);y.config?.TP&&Jt(y.config.TP);N2P(l,k,y);y.config?.Ek&&Jt(y.config.Ek);z();return k||void 0};
ji=function(l,y,k){const z=SQ_(l,y);return z?new g.gs(async(r,Z)=>{const e=(await z).J(y,k,uX);e?(vW(e.input),Z=e.Ue?.mode==="cors"?"cors":void 0,Z=l.Z.Ug?nwq(l,e.config,Z):await Fg5(l,e.config,Z),r(B2z(l,e,Z))):Z(new g.WO("Error: Failed to build request for command.",y))}):n6(new g.WO("Error: No request builder found for command.",y))};
g.Si=function(l,y,k,z,r={rJ:{identity:uX}}){let Z=()=>{};
Z=Ew5(KgQ(k));y.context||(y.context=g.rl(z,!0));return new g.gs(async e=>{var A=Qu(k);A=bO(A)?"same-origin":"cors";A=l.Z.Ug?nwq(l,r,A):await Fg5(l,r,A);var Q=tD(Qu(k));Q={input:Q,Ue:Ow(Q),YO:y,config:r};e(B2z(l,Q,A,Z))})};
LgT=async function(l){if(l?.YO?.context){l=l.YO.context;for(const y of[])await y.zZj(l)}};
N2P=function(l,y,k){if(y&&!y?.sequenceMetaData?.skipProcessing&&l.J)for(const z of HBT)l.J[z]&&l.J[z].handleResponse(y,k)};
owz=function(l){return{...l.data.innertubeResponse,cacheMetadata:{isCacheHit:!0}}};
sVe=async function(l,y){const k=l.Z.get(y);k&&(k.entryData.isProcessed=!0,await Rty(l,y,k.entryData))};
Rty=async function(l,y,k){var z=l.C;if(k.expireTimestampMs){z=Number(k.expireTimestampMs)-Math.round((0,g.f)());const r=fl("mweb_override_response_store_expiration_ms");r>0&&r<z&&(z=r)}z=setTimeout(()=>{l.remove(y)},z);
l.Z.set(y,{entryData:k,timer:z})};
lLy=function(l,y){if(l=l.Z.get(y))return new DiQ(l.entryData)};
yMP=function(l,y){const k=l.Z.get(y);k&&(clearTimeout(k.timer),l.Z.delete(y))};
n4=function(l,y,k){if(!g.EJ("state_tags_killswitch")){var z=new kq_(y);if((z.Z?.stateTagsModified||[]).length>0){var r=l.Z.e8();for(var Z of r){var e=lLy(l.Z,Z);if(e){a:{r=z.Z?.stateTagsModified||[];e=(new kq_(owz(e))).Z?.relevantStateTags||[];for(var A of e)if(A.stateTag!=null&&r.includes(A.stateTag)&&A.onStateTagModified==="STATE_TAG_CACHE_INSTRUCTION_EVICT_RESPONSE"){r=!0;break a}r=!1}r&&yMP(l.Z,Z)}}}}z=y.responseContext?.maxAgeSeconds;if(k&&z&&Number(z)>0){z=Number(z)*1E3;Z=Math.round((0,g.f)());
A=Z.toString();y={innertubeResponse:y,serverDateTimestampMs:A,lastModifiedTimestampMs:A,expireTimestampMs:(Z+z).toString(),isProcessed:!0};if(z=g.Y("INNERTUBE_CONTEXT_CLIENT_NAME"))y.clientName=z;l.Z.put(k,new DiQ(y))}};
zUy=function(l,y,k){if(l.Z){const z=QK(bI(y,"key"))||"/UNKNOWN_PATH";l.Z.start(z)}l=k;g.EJ("wug_networking_gzip_request")&&(l=YOQ(k));return new window.Request(y,l)};
rMg=async function(l,y,k,z,r){const {value:Z,done:e}=await y.read();if(e)return l.Z?.success(),z;let A;try{A=k.parse(Z)}catch(Q){throw new g.FJ("Failed to parse streaming response",Z);}if(A!=null)for(const Q of A)z.push(Q),r?.(Q);return rMg(l,y,k,z,r)};
g.zJ=function(l,y,k){if(!oI){const e=ck();iP(e,{jf:Z6z,y_:eUs});if(k?.MG){iP(e,{jf:Dz,Ag:g.Y("INNERTUBE_CONTEXT_CLIENT_NAME",k.clientInterface)});iP(e,{jf:ll,Ag:5184E6});iP(e,{jf:yo,y_:AMQ,[UY]:[Dz,ll]});iP(e,{jf:kW,y_:$05});var z=e.resolve(kW),r=window;if(r.ytInitialVideoId){var Z=r.ytInitialVideoId;r.ytInitialPlayerResponse&&n4(z,r.ytInitialPlayerResponse,d8("player",{videoId:Z}));r.ytInitialWatchNextResponse&&n4(z,r.ytInitialWatchNextResponse,d8("next",{videoId:Z}));r.ytInitialReelItemWatchResponse&&
n4(z,r.ytInitialReelItemWatchResponse,d8("reel_item_watch",{videoId:Z}))}}z={Sq:{feedbackEndpoint:Zz(Q4q),modifyChannelNotificationPreferenceEndpoint:Zz(tK_),playlistEditEndpoint:Zz(O6Q),shareEntityEndpoint:Zz(d05),subscribeEndpoint:Zz(wdg),unsubscribeEndpoint:Zz(hUt),webPlayerShareEntityServiceEndpoint:Zz(Gq_)}};r=zX.getInstance();Z={};r&&(Z.client_location=r);k?.MG&&(r=e.resolve(kW),Z.store=r);l===void 0&&(l=HoP());y===void 0&&(y=e.resolve(Z6z));jVg(z,y,l,Z,k?.MG?e.resolve(yo):void 0);iP(e,{jf:aLP,
Ag:f4.instance});oI=e.resolve(aLP)}return oI};
rR=function(l){const y={};l=l.split("&");for(const k of l)l=k.split("="),l.length===2&&(y[l[0]]=l[1]);return y};
i6y=async function(){var l=window;await Mi(ZH());const y=l.bgevmc;if(!y)throw Error("BGE Controls not exposed");return{pause:()=>{y.p()},
resume:()=>{y.r()},
checkForRefresh:()=>y.cr()}};
ZH=function(){return g.EJ("bg_st_hr")?"havuokmhhs-0":`${"havuokmhhs"}-${Math.floor(globalThis.performance?.timeOrigin||0)}`};
eB=function(l){window.bgens=l};
MKz=function(){return new Promise(l=>{const y=window;y.ntpevasrs!==void 0?l(new U0e(y.ntpevasrs)):(y.ntpqfbel===void 0&&(y.ntpqfbel=[]),y.ntpqfbel.push(k=>{l(new U0e(k))}))})};
CDq=function(){if(Vu()){var l=g.Y("PLAYER_VARS",{});if(g.ko(l,"privembed",!1)!="1"&&!xdy(l)){var y=()=>{A0=!0;"google_ad_status"in window?AK("DCLKSTAT",1):AK("DCLKSTAT",2)};
try{const k=ze(document);g.k6(Xd4,y,k)}catch(k){}cMg.push(g.fF.zk(()=>{if(!(A0||"google_ad_status"in window)){try{if(Xd4.toString()&&y){var k=`${g.mP(y)}`,z=UJt[k];z&&g.lP(z)}}catch(r){}A0=!0;AK("DCLKSTAT",3)}},5E3))}}};
$W=function(){const l=Number(g.Y("DCLKSTAT",0));return isNaN(l)?0:l};
Qo=function(l,y){l.Z=y};
b6e=async function(l){let y;if(g.aC.ytAtP&&!g.EJ("ytatp_ks")){var k=await g.aC.ytAtP;delete g.aC.ytAtP;let r=k?.R;y=k?.T;r?l.C.Z(1,l.N++):(l.C.Z(2,l.N++),k=await t0(l,On(y,null)),r=JSON.stringify(k));g.aC.ytAtRC?g.aC.ytAtRC(r):g.WH(Error("ytAtRC not defined for ytAtP."))}else g.aC.ytAtRC?Xl(async()=>{y=g.aC.ytAtT;delete g.aC.ytAtT;if(g.aC.ytAtRC){l.C.Z(2,l.N++);var r=await t0(l,On(y,null));g.aC.ytAtRC&&g.aC.ytAtRC(JSON.stringify(r))}else l.C.Z(6,l.N++)},2,fl("att_init_delay",0)):(y=g.aC.ytAtT,delete g.aC.ytAtT,
l.C.Z(1,l.N++));
k=await MKz();k.bindInnertubeChallengeFetcher(r=>{l.C.Z(3,l.N++);return t0(l,On(y,r))});
k.registerChallengeFetchedCallback(r=>{r=r.challenge;if(!r)throw Error("BGE_MACR");r={challenge:r,ys:rR(r),qK:z,bgChallenge:new lJ};r=Promise.resolve(r);l.Z=r});
const z=await Mi(ZH());k=k.getLatestChallengeResponse().challenge;if(!k)throw Error("BGE_MACIL");return{challenge:k,ys:rR(k),qK:z,bgChallenge:new lJ}};
dR=async function(l){var y=On(void 0,LS().Z);try{var k=await uSC(l,y)}catch(A){return g.WH(Error("Failed to fetch attestation challenge after 5 attempts; not retrying for 24h.")),x0C(l,864E5),{challenge:"",ys:{},qK:void 0,bgChallenge:void 0}}y=k.Vo;const z=k.JW;x0C(l,(Number(z.t)||7200)*1E3);l=void 0;if("c1a"in z&&k.bgChallenge){k=k.bgChallenge;var r=new lJ;if(k.interpreterJavascript){var Z=DJ(k.interpreterJavascript);Z=eD(Z).toString();var e=new BU;GM(e,6,Z);rZ(r,BU,1,e,Ao)}else k.interpreterUrl&&
(Z=lO(k.interpreterUrl),Z=SR(Z).toString(),e=new HU,GM(e,4,Z),rZ(r,HU,2,e,Ao));k.interpreterHash&&ak(r,3,k.interpreterHash,Ao);k.program&&ak(r,4,k.program,Ao);k.globalName&&ak(r,5,k.globalName,Ao);k.clientExperimentsStateBlob&&ak(r,7,k.clientExperimentsStateBlob,Ao);try{await R7(LS(),r)}catch(A){return g.WH(A),{challenge:y,ys:z,qK:l,bgChallenge:r}}try{l=new Q0({challenge:r,PE:{qL:"aGIf"}}),await l.Y4}catch(A){g.WH(A),l=void 0}}return{challenge:y,ys:z,qK:l,bgChallenge:r}};
t0=async function(l,y){const k=l.V;if(!k||k.Qf())return m0_(l,y);Eo("att_pna",void 0,"attestation_challenge_fetch");return new Promise(z=>{k.Pt("publicytnetworkstatus-online",()=>{m0_(l,y).then(z)})})};
uSC=async function(l,y){let k=void 0,z=0;for(;z<5;){if(z>0){const r=1E3*Math.pow(2,z-1)+Math.random()*1E3;await new Promise(Z=>{g.cs(0,()=>{Z(void 0)},r)})}try{l.C.Z(4,l.N++);
const r=await t0(l,y);return qiQ(r)}catch(r){k=r,r instanceof Error&&g.WH(r)}z++}throw k;};
x0C=function(l,y){const k=Date.now()+y,z=async()=>{const r=k-Date.now();r<1E3?await WO_(l):Xl(z,0,Math.min(r,6E4))};
z()};
m0_=async function(l,y){eB(2);try{const k=await t0(l.network,y);k?k.challenge&&!k.bgChallenge?eB(1):eB(4):eB(3);return k}catch(k){eB(3)}};
qiQ=function(l){if(!l)throw Error("Fetching Attestation challenge returned falsy");if(!l.challenge)throw Error("Missing Attestation challenge");const y=l.challenge,k=rR(y);if("c1a"in k&&(!l.bgChallenge||!l.bgChallenge.program))throw Error("Expected bg challenge but missing.");return{...l,Vo:y,JW:k}};
WO_=async function(l){const y=await Promise.race([l.Z,null]);var k=dR(l);l.Z=k;y?.qK?.dispose()};
ILt=function(l,y){return new Promise(k=>{g.cs(0,()=>{k(y())},l)})};
On=function(l,y){const k={engagementType:"ENGAGEMENT_TYPE_UNBOUND"};l&&(k.eacrToken=l);y&&(k.interpreterHash=y);return k};
TsC=function(){return new Promise(l=>{const y=window;y.attmp!==void 0?l(y.attmp):(y.attmq===void 0&&(y.attmq=[]),y.attmq.push(k=>{l(k)}))})};
g.PDt=async function(l,y){if(VKq()){var k=window;return k.attmp!==void 0?k.attmp.s("ENGAGEMENT_TYPE_PLAYBACK",l,y):(await TsC()).s("ENGAGEMENT_TYPE_PLAYBACK",l,y)}return(k=(k=g.UT("yt.aba.att"))?k:wR.instance!==void 0?wR.instance.J.bind(wR.instance):null)?k("ENGAGEMENT_TYPE_PLAYBACK",l,y):Promise.resolve({error:"ATTESTATION_ERROR_API_NOT_READY"})};
g.JM4=async function(){if(VKq())return window.attmp===void 0?!1:(await TsC()).ir();var l;return(l=(l=g.UT("yt.aba.att2"))?l:wR.instance!==void 0?wR.instance.S.bind(wR.instance):null)?l():Promise.resolve(!1)};
VKq=function(){return(g.EJ("attmusi")||g.EJ("attmusiw"))&&g.EJ("attmusi_ue")};
pdT=function(l,y){var k=g.UT("ytDebugData.callbacks");k||(k={},g.iQ("ytDebugData.callbacks",k));if(g.EJ("web_dd_iu")||Yiz.includes(l))k[l]=y};
g.h0=function(l,y,k){const z={...l};for(const r of Object.keys(y)){const Z=l[r],e=y[r];if(e===void 0)delete z[r];else if(Z===void 0)z[r]=e;else if(Array.isArray(e)&&Array.isArray(Z))z[r]=k?[...Z,...e]:e;else if(!Array.isArray(e)&&g.uQ(e)&&!Array.isArray(Z)&&g.uQ(Z))z[r]=g.h0(Z,e,k);else if(typeof e===typeof Z)z[r]=e;else return y=new g.WO("Attempted to merge fields of differing types.",{name:"DeepMergeError",key:r,ACe:Z,updateValue:e}),g.n(y),l}return z};
KOe=function(l,y){return l.Z.length===0?!1:(l=l.Z[l.Z.length-1])&&l.buffer===y.buffer&&l.byteOffset+l.length===y.byteOffset};
GJ=function(l){l.V=void 0;l.C=0;l.N=0};
aG=function(l,y){for(const k of y.Z)l.append(k)};
il=function(l,y,k){let {Wm:z,iG:r}=l.split(y);({Wm:z}=r.split(k));return z};
Un=function(l,y,k){l.isFocused(y);return y-l.N+k<=l.Z[l.C].length};
gcC=function(l){if(!l.V){const y=l.Z[l.C];l.V=new DataView(y.buffer,y.byteOffset,y.length)}return l.V};
Ec_=function(l,y=0,k=-1){if(!l.totalLength||!k)return new DataView(new ArrayBuffer(0));k<0&&(k=l.totalLength-y);l.focus(y);if(!Un(l,y,k)){var z=l.C,r=l.N;l.focus(y+k-1);r=new Uint8Array(l.N+l.Z[l.C].length-r);let Z=0;for(let e=z;e<=l.C;e++)r.set(l.Z[e],Z),Z+=l.Z[e].length;l.Z.splice(z,l.C-z+1,r);GJ(l);l.focus(y)}z=l.Z[l.C];return new DataView(z.buffer,z.byteOffset+y-l.N,k)};
MB=function(l,y=0,k=-1){l=Ec_(l,y,k);return new Uint8Array(l.buffer,l.byteOffset,l.byteLength)};
Xf=function(l,y=0,k=-1){l=MB(l,y,k);y=new Uint8Array(l.length);try{y.set(l)}catch(z){for(k=0;k<l.length;k++)y[k]=l[k]}return y};
c5=function(l,y){l.focus(y);return l.Z[l.C][y-l.N]};
fL_=function(l,y){l.focus(y);return Un(l,y,4)?gcC(l).getUint32(y-l.N):256*(256*(256*c5(l,y)+c5(l,y+1))+c5(l,y+2))+c5(l,y+3)};
j4e=function(l){const y=new Uint8Array(l.length);for(let k=0;k<l.length;k++)y[k]=l.charCodeAt(k);return y};
bl=function(l){return l.length?CG?CG.decode(l):String.fromCharCode.apply(null,l):""};
g.xW=function(l){if(!l.length)return"";try{if(CG)return CG.decode(l);if("FetchInternal"in window)return FetchInternal.decodeFromUTF8(l)}catch{}let y=0;const k=[],z=l.length;for(;y<z;){let Z=0;for(;Z<1024&&y<z;){var r=l[y++];if(r<128){ul[Z++]=r;continue}if(r<224)r=(r&31)<<6|l[y++]&63;else if(r<240)r=(r&15)<<12|(l[y++]&63)<<6|l[y++]&63;else{if(Z+1===1024){--y;break}r=(r&7)<<18|(l[y++]&63)<<12|(l[y++]&63)<<6|l[y++]&63;r-=65536;ul[Z++]=55296|r>>10;r=56320|r&1023}ul[Z++]=r}r=String.fromCharCode.apply(String,
ul);Z<1024&&(r=r.substring(0,Z));k.push(r)}return k.join("")};
qB=function(l,y){if(m1?.encodeInto){const {read:z,written:r}=m1.encodeInto(l,y);return z<l.length?l.length*4:r}let k=0;for(let z=0;z<l.length;z++){let r=l.charCodeAt(z);r<128?y[k++]=r:(r<2048?y[k++]=r>>6|192:((r&64512)===55296&&z+1<l.length&&(l.charCodeAt(z+1)&64512)===56320?(r=65536+((r&1023)<<10)+(l.charCodeAt(++z)&1023),y[k++]=r>>18|240,y[k++]=r>>12&63|128):y[k++]=r>>12|224,y[k++]=r>>6&63|128),y[k++]=r&63|128)}return k};
W5=function(l){if(m1)return m1.encode(l);let y=new Uint8Array(Math.ceil(l.length*1.2)),k=qB(l,y);y.length<k&&(y=new Uint8Array(k),k=qB(l,y));y.length>k&&(y=y.subarray(0,k));return y};
Vo=function(l,y){l=l instanceof Uint8Array?new IG([l]):l;return y(new TJ(l))};
P5=function(l){let y=c5(l.Z,l.pos);++l.pos;if(y<128)return y;let k=y&127,z=1;for(;y>=128;)y=c5(l.Z,l.pos),++l.pos,z*=128,k+=(y&127)*z;return k};
J0=function(l,y){let k=l.C;for(l.C=-1;l.pos+1<=l.Z.totalLength;){k<0&&(k=P5(l));var z=k>>3;const r=k&7;if(z===y)return!0;if(z>y){l.C=k;break}k=-1;switch(r){case 0:P5(l);break;case 1:l.pos+=8;break;case 2:z=P5(l);l.pos+=z;break;case 5:l.pos+=4}}return!1};
YW=function(l,y){if(J0(l,y))return P5(l)};
pG=function(l,y){if(J0(l,y))return y=MB(l.Z,l.pos,8),l.pos+=8,(new DataView(y.buffer,y.byteOffset,y.byteLength)).getFloat64(0,!0)};
KG=function(l,y){if(J0(l,y))return!!P5(l)};
gR=function(l,y){if(J0(l,y)){y=P5(l);var k=MB(l.Z,l.pos,y);l.pos+=y;return k}};
En=function(l,y){if(l=gR(l,y))return g.xW(l)};
fG=function(l,y,k){if(l=gR(l,y))return k(new TJ(new IG([l])))};
jB=function(l,y){const k=[];for(;J0(l,y);)k.push(P5(l));return k.length?k:void 0};
SB=function(l,y,k){const z=[];let r;for(;r=gR(l,y);)z.push(k(new TJ(new IG([r]))));return z.length?z:void 0};
Siy=function(l,y){l=new Uint8Array(l);y&&l.set(y);return l};
g.nG=function(l,y){const k=new ncz(4096);y(k,l);return new Uint8Array(k.Z.buffer,k.Z.byteOffset,k.pos)};
Ff=function(l,y){y=l.pos+y;if(!(l.Z.length>=y)){for(var k=l.Z.length*2;k<y;)k*=2;l.Z=Siy(k,l.Z.subarray(0,l.pos));l.view=new DataView(l.Z.buffer,l.Z.byteOffset,l.Z.byteLength)}};
oG=function(l,y){if(y>268435455){Ff(l,4);let k=y&1073741823;for(let z=0;z<4;z++)l.view.setUint8(l.pos,k&127|128),k>>=7,l.pos+=1;y=Math.floor(y/268435456)}for(Ff(l,4);y>127;)l.view.setUint8(l.pos,y&127|128),y>>=7,l.pos+=1;l.view.setUint8(l.pos,y);l.pos+=1};
NB=function(l,y,k){k!==void 0&&(oG(l,y*8),oG(l,k))};
sn=function(l,y,k){k!==void 0&&NB(l,y,k?1:0)};
LG=function(l,y,k){k!==void 0&&(oG(l,y*8+2),y=k.length,oG(l,y),Ff(l,y),l.Z.set(k,l.pos),l.pos+=y)};
FOC=function(l,y,k=2){oG(l,y*8+2);l.C.push(l.pos);l.C.push(k);l.pos+=k};
ocs=function(l){let y=l.C.pop(),k=l.C.pop(),z=l.pos-k-y;for(;y--;){const r=y?128:0;l.view.setUint8(k++,z&127|r);z>>=7}};
v5=function(l,y,k){k!==void 0&&(FOC(l,y,Math.ceil(Math.log2(k.length*4+2)/7)),Ff(l,k.length*1.2),y=qB(k,l.Z.subarray(l.pos)),l.pos+y>l.Z.length&&(Ff(l,y),y=qB(k,l.Z.subarray(l.pos))),l.pos+=y,ocs(l))};
B5=function(l,y,k,z,r=3){k&&(FOC(l,y,r),z(l,k),ocs(l))};
g.H5=function(l){var y=new TJ(new IG([fx(decodeURIComponent(l))]));l=En(y,2);y=YW(y,4);const k=Ns5[y];if(typeof k==="undefined")throw l=new g.WO("Failed to recognize field number",{name:"EntityKeyHelperError",fieldNumber:y}),g.n(l),l;return{JP:y,entityType:k,entityId:l}};
g.RG=function(l,y){const k=new ncz;LG(k,2,W5(l));l=s4C[y];if(typeof l==="undefined")throw y=new g.WO("Failed to recognize entity type",{name:"EntityKeyHelperError",entityType:y}),g.n(y),y;NB(k,4,l);NB(k,5,1);y=new Uint8Array(k.Z.buffer,k.Z.byteOffset,k.pos);return encodeURIComponent(g.px(y,0))};
DH=function(l){l=l.key||l.id;if(!l)throw Error("Entity key is missing");return l};
l7=function(l,y,k,z){if(z===void 0){const {[k]:r,...Z}=l[y]||{};return{...l,[y]:Z}}return{...l,[y]:{...l[y],[k]:z}}};
LOs=function(l,y,k,z,r){const Z=l[y]||{},e=Z[k];if(!e&&!g.EJ("web_enable_entity_upsert_on_update"))return l;z=g.h0(e||{},z,r==="REPEATED_FIELDS_MERGE_OPTION_APPEND");return{...l,[y]:{...Z,[k]:z}}};
vcP=function(l={},y){switch(y.type){case "ENTITY_LOADED":return y.payload.reduce((k,z)=>{const r=z.options?.persistenceOption;if(r&&r!=="ENTITY_PERSISTENCE_OPTION_UNKNOWN"&&r!=="ENTITY_PERSISTENCE_OPTION_INMEMORY_AND_PERSIST")return k;if(!z.entityKey)return g.n(Error("Missing entity key")),k;if(z.type==="ENTITY_MUTATION_TYPE_REPLACE"){if(!z.payload)return z=new g.WO("REPLACE entity mutation is missing a payload",{entityKey:z.entityKey}),g.n(z),k;var Z=g.oe(z.payload);return l7(k,Z,z.entityKey,z.payload[Z])}if(z.type===
"ENTITY_MUTATION_TYPE_DELETE"){a:{z=z.entityKey;try{const e=g.H5(z).entityType;Z=l7(k,e,z);break a}catch(e){if(e instanceof Error){z=new g.WO("Failed to deserialize entity key",{entityKey:z,originalMessage:e.message});g.n(z);Z=k;break a}throw e;}Z=void 0}return Z}if(z.type==="ENTITY_MUTATION_TYPE_UPDATE"){if(!z.payload)return z=new g.WO("UPDATE entity mutation is missing a payload",{entityKey:z.entityKey}),g.n(z),k;Z=g.oe(z.payload);return LOs(k,Z,z.entityKey,z.payload[Z],z.fieldMask?.mergeOptions?.repeatedFieldsMergeOption)}return k},
l);
case "REPLACE_ENTITY":return l7(l,y.payload.entityType,y.payload.key,y.payload.Ve);case "REPLACE_ENTITIES":return Object.keys(y.payload).reduce((k,z)=>{const r=y.payload[z];return Object.keys(r).reduce((Z,e)=>l7(Z,z,e,r[e]),k)},l);
case "UPDATE_ENTITY":return LOs(l,y.payload.entityType,y.payload.key,y.payload.Ve,y.payload.uS_);default:return l}};
yX=function(l,y,k){return l[y]?l[y][k]||null:null};
BsC=function(){if(km)return km();km=Ob("PersistentEntityStoreDb",{Zg:{EntityStore:{Bz:1},EntityAssociationStore:{Bz:2}},shared:!1,upgrade(l,y){y(1)&&Bs(Lm(l,"EntityStore",{keyPath:"key"}),"entityType","entityType");y(2)&&(l=Lm(l,"EntityAssociationStore",{keyPath:["parentEntityKey","childEntityKey"]}),Bs(l,"byParentEntityKey","parentEntityKey"),Bs(l,"byChildEntityKey","childEntityKey"))},version:3});return km()};
H6C=function(l){return g.kO(BsC(),l)};
zK=function(l){return window.Int32Array?new Int32Array(l):Array(l)};
RU5=function(l){const y=l.key;let k=l.counter[0]^y[0],z=l.counter[1]^y[1],r=l.counter[2]^y[2],Z=l.counter[3]^y[3];for(var e=3;e>=0&&!(l.counter[e]=-~l.counter[e]);e--);let A,Q,t=4;for(;t<40;)e=r9[k>>>24]^ZQ[z>>16&255]^e4[r>>8&255]^Av[Z&255]^y[t++],A=r9[z>>>24]^ZQ[r>>16&255]^e4[Z>>8&255]^Av[k&255]^y[t++],Q=r9[r>>>24]^ZQ[Z>>16&255]^e4[k>>8&255]^Av[z&255]^y[t++],Z=r9[Z>>>24]^ZQ[k>>16&255]^e4[z>>8&255]^Av[r&255]^y[t++],k=e,z=A,r=Q;l=l.C;e=y[40];l[0]=$m[k>>>24]^e>>>24;l[1]=$m[z>>16&255]^e>>16&255;l[2]=
$m[r>>8&255]^e>>8&255;l[3]=$m[Z&255]^e&255;e=y[41];l[4]=$m[z>>>24]^e>>>24;l[5]=$m[r>>16&255]^e>>16&255;l[6]=$m[Z>>8&255]^e>>8&255;l[7]=$m[k&255]^e&255;e=y[42];l[8]=$m[r>>>24]^e>>>24;l[9]=$m[Z>>16&255]^e>>16&255;l[10]=$m[k>>8&255]^e>>8&255;l[11]=$m[z&255]^e&255;e=y[43];l[12]=$m[Z>>>24]^e>>>24;l[13]=$m[k>>16&255]^e>>16&255;l[14]=$m[z>>8&255]^e>>8&255;l[15]=$m[r&255]^e&255};
O0=function(){if(!QX&&!g.eG){if(tv)return tv;tv=window.crypto?.subtle;if(tv?.importKey&&tv?.sign&&tv?.encrypt)return tv;tv=void 0}};
D0q=async function(l,y,k){l.Z||(l.Z=await l.subtleCrypto.importKey("raw",l.C,{name:"AES-CTR"},!1,["encrypt"]));l=await l.subtleCrypto.encrypt({name:"AES-CTR",counter:k,length:128},l.Z,y);return new Uint8Array(l)};
lZ5=function(l){l.Z=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];l.K=[];l.K.length=64;l.V=0;l.C=0};
y9C=function(l,y,k){const z=l.K;let r=l.Z[0],Z=l.Z[1],e=l.Z[2],A=l.Z[3],Q=l.Z[4],t=l.Z[5],O=l.Z[6],d=l.Z[7],w,h,U;for(let u=0;u<64;)u<16?(z[u]=U=y[k]<<24|y[k+1]<<16|y[k+2]<<8|y[k+3],k+=4):(w=z[u-2],h=z[u-15],U=z[u-7]+z[u-16]+((w>>>17|w<<15)^(w>>>19|w<<13)^w>>>10)+((h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3),z[u]=U),w=d+d9[u]+U+((Q>>>6|Q<<26)^(Q>>>11|Q<<21)^(Q>>>25|Q<<7))+(Q&t^~Q&O),h=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&Z^r&e^Z&e),d=w+h,A+=w,u++,u<16?(z[u]=U=y[k]<<24|y[k+1]<<16|y[k+2]<<8|y[k+
3],k+=4):(w=z[u-2],h=z[u-15],U=z[u-7]+z[u-16]+((w>>>17|w<<15)^(w>>>19|w<<13)^w>>>10)+((h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3),z[u]=U),w=O+d9[u]+U+((A>>>6|A<<26)^(A>>>11|A<<21)^(A>>>25|A<<7))+(A&Q^~A&t),h=((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+(d&r^d&Z^r&Z),O=w+h,e+=w,u++,u<16?(z[u]=U=y[k]<<24|y[k+1]<<16|y[k+2]<<8|y[k+3],k+=4):(w=z[u-2],h=z[u-15],U=z[u-7]+z[u-16]+((w>>>17|w<<15)^(w>>>19|w<<13)^w>>>10)+((h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3),z[u]=U),w=t+d9[u]+U+((e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|
e<<7))+(e&A^~e&Q),h=((O>>>2|O<<30)^(O>>>13|O<<19)^(O>>>22|O<<10))+(O&d^O&r^d&r),t=w+h,Z+=w,u++,u<16?(z[u]=U=y[k]<<24|y[k+1]<<16|y[k+2]<<8|y[k+3],k+=4):(w=z[u-2],h=z[u-15],U=z[u-7]+z[u-16]+((w>>>17|w<<15)^(w>>>19|w<<13)^w>>>10)+((h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3),z[u]=U),w=Q+d9[u]+U+((Z>>>6|Z<<26)^(Z>>>11|Z<<21)^(Z>>>25|Z<<7))+(Z&e^~Z&A),h=((t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10))+(t&O^t&d^O&d),U=d,d=A,A=U,U=O,O=e,e=U,U=t,t=Z,Z=U,Q=r+w,r=w+h,u++;l.Z[0]=r+l.Z[0]|0;l.Z[1]=Z+l.Z[1]|0;l.Z[2]=e+l.Z[2]|
0;l.Z[3]=A+l.Z[3]|0;l.Z[4]=Q+l.Z[4]|0;l.Z[5]=t+l.Z[5]|0;l.Z[6]=O+l.Z[6]|0;l.Z[7]=d+l.Z[7]|0};
k8t=function(l){const y=new Uint8Array(32);var k=64-l.C;l.C>55&&(k+=64);const z=new Uint8Array(k);z[0]=128;let r=l.V*8;for(let Z=1;Z<9;Z++){const e=r%256;z[k-Z]=e;r=(r-e)/256}l.update(z);for(k=0;k<8;k++)y[k*4]=l.Z[k]>>>24,y[k*4+1]=l.Z[k]>>>16&255,y[k*4+2]=l.Z[k]>>>8&255,y[k*4+3]=l.Z[k]&255;lZ5(l);return y};
r9P=function(l,y,k){l=new z4T(l.Z);l.update(y);l.update(k);y=k8t(l);l.update(l.J);l.update(y);y=k8t(l);l.reset();return y};
ZS5=async function(l,y,k){l.Z||(l.Z=await l.subtleCrypto.importKey("raw",l.C,{name:"HMAC",hash:"SHA-256"},!1,["sign"]));const z=new Uint8Array(y.length+k.length);z.set(y);z.set(k,y.length);l=await l.subtleCrypto.sign({name:"HMAC",hash:"SHA-256"},l.Z,z);return new Uint8Array(l)};
A9P=async function(l,y,k,z){l.C||(l.C=new e4T(l.Z,z));return ZS5(l.C,y,k)};
Q74=function(l,y,k){l.N||(l.N=new $mg(l.Z));return r9P(l.N,y,k)};
t9y=async function(l,y,k){const z=O0();if(z)try{return await A9P(l,y,k,z)}catch(r){return g.WH(r),QX=!0,Q74(l,y,k)}else return Q74(l,y,k)};
OST=function(l){return l instanceof Error?new w9("UNKNOWN_ENCODE_ERROR",{originalMessage:l.message}):new w9("UNKNOWN_ENCODE_ERROR")};
dmy=function(l){return l instanceof Error?new w9("UNKNOWN_DECODE_ERROR",{originalMessage:l.message}):new w9("UNKNOWN_DECODE_ERROR")};
wU_=function(l,y){l=l instanceof w9?l:y(l);g.n(l);throw l;};
g.h4z=function(l,y,k){try{return l.N(y,k)}catch(z){wU_(z,OST)}};
hv=function(l){l=(new TextEncoder).encode(l).subarray(0,16);const y=new Uint8Array(16);y.set(l);return y};
aZQ=function(l){const y=G8y[l];if(y)return y;g.WH(new g.WO("Entity model not found.",{entityType:l}))};
aA=function(l,y){a:{l=g.GK(l.C,y.version);try{var k=l.C(y.data,y.key);break a}catch(z){wU_(z,dmy)}k=void 0}return k};
g.i7=function(l,y,k){return l.Z.objectStore("EntityStore").get(y).then(z=>{if(z){if(k&&z.entityType!==k)throw Error("Incorrect entity type");return aA(l,z)}})};
g.U0=function(l,y,k){return k?(k=k.map(z=>g.i7(l,z,y)),g.jY.all(k)):l.Z.objectStore("EntityStore").index("entityType").getAll(IDBKeyRange.only(y)).then(z=>z.map(r=>aA(l,r)))};
g.UmQ=function(l,y,k){const z=DH(y);return g.MQ(l,z).then(()=>iS5(l,y,k))};
g.Xb=function(l,y,k){let z=l.N[k];z||(z=new Set,l.N[k]=z);z.add(y)};
g.ca=function(l,y,k){const z=DH(y),r=g.GK(l.C,1),Z={...y};return l.Z.objectStore("EntityStore").get(z).then(e=>{if(e){if(e.entityType!==k)throw Error("Incorrect entity type");Z.entityMetadata||(e=aA(l,e),Z.entityMetadata=e.entityMetadata)}}).then(()=>{const e={key:z,
entityType:k,data:g.h4z(r,Z,z),version:1};return g.jY.all([l.Z.objectStore("EntityStore").put(e),g.UmQ(l,Z,k)])}).then(()=>{g.Xb(l,z,k);
return z})};
XUP=function(l,y,k){if(k.has(y))return g.jY.resolve(void 0);k.add(y);return M95(l,y).then(z=>l.Z.objectStore("EntityAssociationStore").index("byParentEntityKey").delete(IDBKeyRange.only(y)).then(()=>z)).then(z=>{let r=g.jY.resolve(void 0);
for(const Z of z)r=r.then(()=>XUP(l,Z,k));
return r}).then(()=>{})};
g.Cq=function(l,y,k){if(k?.uO){const r=new Set;return XUP(l,y,r).then(()=>{const Z=[];for(const e of r)Z.push(g.Cq(l,e));return g.jY.all(Z).then(()=>{})})}const z=g.H5(y).entityType;
return g.jY.all([l.Z.objectStore("EntityStore").delete(y),g.MQ(l,y)]).then(()=>{g.Xb(l,y,z)})};
g.MQ=function(l,y){return l.Z.objectStore("EntityAssociationStore").index("byParentEntityKey").delete(IDBKeyRange.only(y))};
c9_=function(l,y){y=y.map(k=>g.Cq(l,k));
return g.jY.all(y).then(()=>{})};
iS5=function(l,y,k){const z=DH(y);k=aZQ(k);if(!k)return g.jY.resolve([]);y=new k(y);l=l.Z.objectStore("EntityAssociationStore");k=[];for(const r of y.C())k.push(l.put({parentEntityKey:z,childEntityKey:r}));return g.jY.all(k).then(r=>r.map(Z=>Z[1]))};
M95=function(l,y){const k=l.Z.objectStore("EntityAssociationStore");return k.index("byParentEntityKey").getAll(IDBKeyRange.only(y)).then(z=>{const r=[];for(const Z of z)r.push(k.index("byChildEntityKey").getAll(Z.childEntityKey));return g.jY.all(r)}).then(z=>{const r=[];
for(const Z of z)Z.length===1&&r.push(Z[0].childEntityKey);return r})};
g.GK=function(l,y=0){l=l.Z[y];if(!l)throw y=new w9("INVALID_ENCODER_VERSION",{MF:y}),g.n(y),y;return l};
Cnt=function(l,y){for(const k of l.observers)k(y)};
g.b7=async function(l,y,k){var z=await H6C(l.token);let r;y=await g.sV(z,["EntityStore","EntityAssociationStore"],y,Z=>{r=new bSP(Z,l.Z);return k(r)});
r&&(z=r.N,Object.keys(z).length>0&&(l.channel.postMessage(z),Cnt(l,z)));return y};
g.u7=function(l,y,k){return g.b7(l,{mode:"readwrite",nP:!0},z=>g.ca(z,y,k))};
g.xm=function(l,y){return g.b7(l,{mode:"readwrite",nP:!0},k=>g.Cq(k,y))};
uZ5=function(l,y){return g.b7(l,{mode:"readwrite",nP:!0},k=>c9_(k,y))};
g.mp=function(l,y,k){return g.b7(l,{mode:"readonly",nP:!0},z=>g.U0(z,y,k))};
g.Wa=function(){qQ||(qQ=xm4());return qQ};
xm4=async function(){try{const y=await g.tZ();if(y&&Ml()&&typeof g.aC.BroadcastChannel!=="undefined"){var l=new mms;return new qWs(y,l)}}catch(y){y instanceof Error&&g.n(y)}};
IZ5=function(l){let y="";for(let z=0;z<l.length;z++){var k=l[z];if(z===0)k=`M ${k.x.toFixed(1)},${k.y.toFixed(1)}`;else{const r=W5g(l[z-1],l[z-2],k),Z=W5g(k,l[z-1],l[z+1],!0);k=` ${`C ${r.x.toFixed(1)},${r.y.toFixed(1)} ${Z.x.toFixed(1)},${Z.y.toFixed(1)} ${k.x.toFixed(1)},${k.y.toFixed(1)}`}`}y+=k}return y};
V95=function(l,y,k,z,r=!1){const Z=1E3/l.length,e=[];e.push({x:0,y:100});for(let A=0;A<l.length;A++){const Q=(A+.5)*Z,t=100-g.gf((g.E(l[A],Tmq)?.heatMarkerIntensityScoreNormalized||0)*100,y/k*100,z/k*100);A!==0||r||e.push({x:0,y:t});e.push({x:Q,y:t});A===l.length-1&&e.push({x:1E3,y:t})}e.push({x:1E3,y:100});return e};
Png=function(l,y,k,z,r=!1){const Z=1E3/l.length,e=[];e.push({x:0,y:100});for(let A=0;A<l.length;A++){const Q=(A+.5)*Z,t=100-g.gf((l[A].intensityScoreNormalized||0)*100,y/k*100,z/k*100);A!==0||r||e.push({x:0,y:t});e.push({x:Q,y:t});A===l.length-1&&e.push({x:1E3,y:t})}e.push({x:1E3,y:100});return e};
W5g=function(l,y,k,z=!1){y=new J95(y||l,k||l);return{x:l.x+YWC(y,z)*.2,y:l.y+pUz(y,z)*.2}};
YWC=function(l,y=!1){return y?l.Z*-1:l.Z};
pUz=function(l,y=!1){return y?l.C*-1:l.C};
EJ_=async function(l,y){y={context:g.rl(),settingItemIds:y};const k=g.ei(K5s);l=await g.Si(l,y,k);if(!l||l.errorMetadata)gJg("GetSettingValuesRequest",l);else return l.settingValues};
j7z=async function(l,y,k){y={context:g.rl(),settingItemId:y,newValue:k};k=g.ei(fZ5);(l=await g.Si(l,y,k))&&!l.errorMetadata||gJg("SetSettingRequest",l)};
gJg=function(l,y){y?y.errorMetadata&&g.WH(new g.WO(`${l} failed with status ${y.errorMetadata.status}`)):g.WH(new g.WO(`${l} failed with empty response`))};
SWy=function(l){return XL(l,0,"gclid",l.search(cL))>=0||XL(l,0,"gad_source",l.search(cL))>=0};
F55=function(l,y){var k=ck().resolve(nJ5);if(SWy(y)){var z=CY(y,"gclid");y={handleEvent:r=>{l&&!l.closed&&typeof l.postMessage==="function"&&r&&r.origin&&r.source===l&&r.data&&r.data.action==="gcl_setup"&&l.postMessage({action:"gcl_transfer",...(z&&{gclid:z}),gadSource:2},r.origin)}};
for(const [r,Z]of k.Z){const e=r,A=Z;if(e.closed)try{window.removeEventListener("message",A),k.Z.delete(e)}catch(Q){g.n(Q)}}l&&k.Z.size<15&&(k.Z.set(l,y),window.addEventListener("message",y))}};
IA=function(l,y,k){if(!y)return l.length>=1?l[l.length-1]:null;for(const z of l)if(z.width&&z.height&&(k&&z.width>=y||!k&&z.height>=y))return z;for(y=l.length-1;y>=0;y--)if(k&&l[y].width||!k&&l[y].height)return l[y];return l[0]};
NmC=function(l,y,k,z,r,Z){k?(l.IU(2),g.k6(g.zp(k),()=>{if(window.trayride)oJs(l,z,r);else{l.IU(3);const e=i$P(k),A=document.getElementById(e);A&&(Gg_(e),A.parentNode.removeChild(A));g.WH(new g.WO("BL:ULB",`${k}`))}},Z)):y?(Z=g.Gf("SCRIPT"),y instanceof rf?(Z.textContent=eD(y),AY(Z)):Z.textContent=y,Z.nonce=ze(document),document.head.appendChild(Z),document.head.removeChild(Z),window.trayride?oJs(l,z,r):(l.IU(4),g.WH(new g.WO("BL:ULBJ")))):g.WH(new g.WO("BL:ULV"))};
oJs=function(l,y,k){l.IU(5);const z=!!l.nS&&s7q.includes(g.$7(l.nS)||"");try{const r=new Q0({program:y,globalName:"trayride",PE:{disable:!g.EJ("att_web_record_metrics")||!g.EJ("att_skip_metrics_for_cookieless_domains_ks")&&z,qL:"aGIf"}});r.Y4.then(()=>{l.IU(6);k&&k(y)});
l.Z(r)}catch(r){l.IU(7),r instanceof Error&&g.WH(r)}};
TK=function(){const l=g.UT("yt.abuse.playerAttLoader");return l&&["bgvma","bgvmb","bgvmc"].every(y=>y in l)?l:null};
L5P=function(l,y,k){let z=!1;for(const [r]of l.q7.entries()){const Z=r;Z.slotType==="SLOT_TYPE_PLAYER_BYTES"&&Z.f_==="core"&&(z=!0)}if(z){a:if(!k){for(const [r,Z]of l.q7.entries())if(l=r,k=Z,l.slotType==="SLOT_TYPE_IN_PLAYER"&&l.f_==="core"){k=k.layoutId;break a}k=void 0}k?y.Dc(k):EP("No triggering layout ID available when attempting to mute.")}};
VX=function(l,y,k){l.IR();l.Z.get(y)&&g.n(Error(`Extension name ${y} already registered`));l.Z.set(y,k)};
HSC=function(l,y=[],k,z){l.IR();const r=[],Z=[];for(const e of y)g.E(e,vJC)||g.E(e,Bmz)?r.push(e):Z.push(e);for(const e of r)Pa(l,e,k,z);for(const e of Z)Pa(l,e,k,z)};
R4t=function(l,y){VX(l,y.Sr(),(k,z,r)=>{y.xM(k,z,r)})};
Pa=function(l,y,k,z){l.IR();y.loggingUrls&&DmC(l,"loggingUrls",y.loggingUrls,k,z);for(const [r,Z]of Object.entries(y)){y=r;const e=Z;y==="openPopupAction"?Jv(l.GM.get(),"innertubeCommand",{openPopupAction:e}):y==="confirmDialogEndpoint"?Jv(l.GM.get(),"innertubeCommand",{confirmDialogEndpoint:e}):lWC.hasOwnProperty(y)||DmC(l,y,e,k,z)}};
DmC=function(l,y,k,z,r){if((l=l.Z.get(y))&&typeof l==="function")try{l(k,z,r)}catch(Z){g.n(Z)}else y=new g.WO("Unhandled field",y),g.WH(y)};
pq=function(l,y,k){if(k&&!k.includes(l.layoutType))return!1;for(const z of y)if(!Ym(l.clientMetadata,z))return!1;return!0};
ynq=function(l,y){switch(l){case "TRIGGER_CATEGORY_LAYOUT_EXIT_NORMAL":return 0;case "TRIGGER_CATEGORY_LAYOUT_EXIT_USER_SKIPPED":return 1;case "TRIGGER_CATEGORY_LAYOUT_EXIT_USER_MUTED":return 2;case "TRIGGER_CATEGORY_SLOT_EXPIRATION":return 3;case "TRIGGER_CATEGORY_SLOT_FULFILLMENT":return 4;case "TRIGGER_CATEGORY_SLOT_ENTRY":return 5;case "TRIGGER_CATEGORY_LAYOUT_EXIT_USER_INPUT_SUBMITTED":return 6;case "TRIGGER_CATEGORY_LAYOUT_EXIT_USER_CANCELLED":return 7;default:return y(l),8}};
Ym=function(l,y){return l.Z.has(y)};
Kq=function(l){return Array.from(l.Z.keys())};
g9=function(l,y,k){if(k&&k!==l.slotType)return!1;for(const z of y)if(!Ym(l.clientMetadata,z))return!1;return!0};
zQP=function(l){return kwT.get(l)?.pR||"ADS_CLIENT_EVENT_TYPE_UNSPECIFIED"};
fq=function(l,y){const k={type:y.slotType,controlFlowManagerLayer:rnT.get(y.f_)||"CONTROL_FLOW_MANAGER_LAYER_UNSPECIFIED"};y.slotEntryTrigger&&(k.entryTriggerType=y.slotEntryTrigger.triggerType);y.slotPhysicalPosition!==1&&(k.slotPhysicalPosition=y.slotPhysicalPosition);if(l){k.debugData={slotId:y.slotId};if(l=y.slotEntryTrigger)k.debugData.slotEntryTriggerData=E0(l);l=y.slotFulfillmentTriggers;k.debugData.fulfillmentTriggerData=[];for(const z of l)k.debugData.fulfillmentTriggerData.push(E0(z));y=
y.slotExpirationTriggers;k.debugData.expirationTriggerData=[];for(const z of y)k.debugData.expirationTriggerData.push(E0(z))}return k};
ZfT=function(l,y){const k={type:y.layoutType,controlFlowManagerLayer:rnT.get(y.f_)||"CONTROL_FLOW_MANAGER_LAYER_UNSPECIFIED"};l&&(k.debugData={layoutId:y.layoutId});return k};
E0=function(l,y){const k={type:l.triggerType};y!=null&&(k.category=y);l.triggeringSlotId!=null&&(k.triggerSourceData||(k.triggerSourceData={}),k.triggerSourceData.associatedSlotId=l.triggeringSlotId);l.triggeringLayoutId!=null&&(k.triggerSourceData||(k.triggerSourceData={}),k.triggerSourceData.associatedLayoutId=l.triggeringLayoutId);return k};
eQz=function(l,y,k,z){y={opportunityType:y};l&&(z||k)&&(z=g.sT(z||[],r=>fq(l,r)),y.debugData={...(k&&k.length>0?{associatedSlotId:k}:{}),
...(z.length>0?{slots:z}:{})});return y};
S4=function(l,y){return k=>Anz(j4(l),y.slotId,y.slotType,y.slotPhysicalPosition,y.f_,y.slotEntryTrigger,y.slotFulfillmentTriggers,y.slotExpirationTriggers,k.layoutId,k.layoutType,k.f_)};
var $uy=function(l,y,k,z,r){return mv[G[19]](this,48,4510,l,y,k,z,r)};
Anz=function(l,y,k,z,r,Z,e,A,Q,t,O){return{adClientDataEntry:{slotData:fq(l,{slotId:y,slotType:k,slotPhysicalPosition:z,f_:r,slotEntryTrigger:Z,slotFulfillmentTriggers:e,slotExpirationTriggers:A,clientMetadata:new nq([])}),layoutData:ZfT(l,{layoutId:Q,layoutType:t,f_:O,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],NW:new Map,clientMetadata:new nq([]),KP:{}})}}};
j4=function(l){return l.Z||l.p_.get().L.O().X("html5_force_debug_data_for_client_tmp_logs")};
Fb=function(l,y){l.C.add(y)};
oA=function(l,y){l.C.delete(y)};
DQ=function(l,y,k){if(NQ(l.Z,y)){a:switch(s0(l.Z,y).Z){case "exit_requested":var z=!0;break a;default:z=!1}if(!z)a:switch(s0(l.Z,y).Z){case "rendering_stop_requested":z=!0;break a;default:z=!1}if(z&&(s0(l.Z,y).J=!0,!k))return;if(Lq(s0(l.Z,y)))s0(l.Z,y).J=!0,Qje(l,y,k);else{a:switch(s0(l.Z,y).V){case "fill_requested":k=!0;break a;default:k=!1}if(k)s0(l.Z,y).J=!0,NQ(l.Z,y)&&(va(l.Av,"ADS_CLIENT_EVENT_TYPE_CANCEL_SLOT_FULFILLMENT_REQUESTED",y),l=s0(l.Z,y),l.V="fill_cancel_requested",l.K.H_());else{k=
Ba(l.Z,y);(z=l.p_.get().L.O().experiments.z7("h5_enable_layout_unscheduling_events"))&&(k?l.M4(y,k):EP(Error("Layout is null for LayoutUnscheduled event."),y,k,void 0,!1));va(l.Av,"ADS_CLIENT_EVENT_TYPE_UNSCHEDULE_SLOT_REQUESTED",y);const A=s0(l.Z,y);var r=y.slotEntryTrigger;const Q=A.b0.get(r.triggerId);Q&&(Q.dK(r),A.b0.delete(r.triggerId));for(var Z of y.slotFulfillmentTriggers)if(r=A.C_.get(Z.triggerId))r.dK(Z),A.C_.delete(Z.triggerId);for(var e of y.slotExpirationTriggers)if(Z=A.D.get(e.triggerId))Z.dK(e),
A.D.delete(e.triggerId);A.layout!=null&&(e=A.layout,Ha(A,e.layoutExitNormalTriggers),Ha(A,e.layoutExitSkipTriggers),Ha(A,e.layoutExitMuteTriggers),Ha(A,e.layoutExitUserInputSubmittedTriggers),Ha(A,e.layoutExitUserCancelledTriggers));A.K=void 0;A.C!=null&&(A.C.release(),A.C=void 0);A.N!=null&&(A.N.release(),A.N=void 0);e=l.Z;s0(e,y)&&(e=RA(e,`${y.slotType}_${y.slotPhysicalPosition}`))&&e.delete(y.slotId);va(l.Av,"ADS_CLIENT_EVENT_TYPE_SLOT_UNSCHEDULED",y);for(const t of l.C)t.Od(y),k&&!z&&t.M4(y,k)}}}};
yd=function(l,y){if(NQ(l.Z,y)){s0(l.Z,y).S=!1;var k=lR;y=s0(l.Z,y);const z=[...y.A];ZB(y.A);k(l,z)}};
toe=function(l,y){NQ(l.Z,y)&&Lq(s0(l.Z,y))&&Ba(l.Z,y)&&!kR(l.Z,y)&&(zs(l.Av,"ADS_CLIENT_EVENT_TYPE_ENTER_LAYOUT_REQUESTED",y,Ba(l.Z,y)??void 0),l=s0(l.Z,y),l.Z!=="entered"&&rU(l.slot,l.Z,"enterLayoutForSlot"),l.Z="rendering",l.N.startRendering(l.layout))};
en=function(l,y,k,z){EP(k,y,void 0,void 0,k.Q2);k.NS?Z_(l.Av,z,k.NS,y):EP("adsClientErrorMessage is missing.",y);DQ(l,y,!0)};
OfC=function(l,y,k){if(NQ(l.Z,y))if(s0(l.Z,y).V=k?"filled":"not_filled",k===null){zs(l.Av,"ADS_CLIENT_EVENT_TYPE_SLOT_FULFILLED_EMPTY",y);for(var z of l.C)z.jV(y);DQ(l,y,!1)}else{zs(l.Av,"ADS_CLIENT_EVENT_TYPE_SLOT_FULFILLED_NON_EMPTY",y,k);zs(l.Av,"ADS_CLIENT_EVENT_TYPE_LAYOUT_RECEIVED",y,k);if(z=k.mE??k.clientMetadata.aR("metadata_type_sub_layouts"))for(const e of z)zs(l.Av,"ADS_CLIENT_EVENT_TYPE_LAYOUT_RECEIVED",y,e);for(const e of l.C)e.FJ(y);if(NQ(l.Z,y))if(s0(l.Z,y).J)DQ(l,y,!1);else{zs(l.Av,
"ADS_CLIENT_EVENT_TYPE_SCHEDULE_LAYOUT_REQUESTED",y,k);try{var r=l.Z;if(!s0(r,y))throw new AL("Unknown slotState for onLayout",void 0,"ADS_CLIENT_ERROR_MESSAGE_SLOT_STATE_IS_NULL");if(!r.Ud.h$.get(y.slotType))throw new AL("No LayoutRenderingAdapterFactory registered for slot of type: "+y.slotType,void 0,"ADS_CLIENT_ERROR_MESSAGE_CANNOT_FIND_MATCHING_LAYOUT_RENDERING_ADAPTER_FACTORY");if(k.layoutExitNormalTriggers.length==0&&k.layoutExitSkipTriggers.length==0&&k.layoutExitMuteTriggers.length==0&&k.layoutExitUserInputSubmittedTriggers.length==
0&&k.layoutExitUserCancelledTriggers.length==0)throw new AL("Layout has no exit triggers.",void 0,"ADS_CLIENT_ERROR_MESSAGE_EMPTY_LAYOUT_EXIT_TRIGGER");$R(r,"TRIGGER_CATEGORY_LAYOUT_EXIT_NORMAL",k.layoutExitNormalTriggers);$R(r,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_SKIPPED",k.layoutExitSkipTriggers);$R(r,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_MUTED",k.layoutExitMuteTriggers);$R(r,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_INPUT_SUBMITTED",k.layoutExitUserInputSubmittedTriggers);$R(r,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_CANCELLED",
k.layoutExitUserCancelledTriggers)}catch(e){e instanceof AL?l.iH(y,k,e,"ADS_CLIENT_ERROR_TYPE_SCHEDULE_LAYOUT_FAILED"):l.iH(y,k,new AL(`Unexpected error: ${e}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_UNEXPECTED_ERROR"),"ADS_CLIENT_ERROR_TYPE_SCHEDULE_LAYOUT_FAILED");DQ(l,y,!0);return}s0(l.Z,y).S=!0;try{var Z=l.Z;const e=s0(Z,y),A=Z.Ud.h$.get(y.slotType).get().build(Z.V,Z.C,y,k);A.init();e.layout=k;if(e.N)throw new AL("Already had LayoutRenderingAdapter registered for slot",void 0,"ADS_CLIENT_ERROR_MESSAGE_BUILD_DUPLICATE_LAYOUT_RENDERING_ADAPTER");
e.N=A;Qd(Z,e,"TRIGGER_CATEGORY_LAYOUT_EXIT_NORMAL",k.layoutExitNormalTriggers);Qd(Z,e,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_SKIPPED",k.layoutExitSkipTriggers);Qd(Z,e,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_MUTED",k.layoutExitMuteTriggers);Qd(Z,e,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_INPUT_SUBMITTED",k.layoutExitUserInputSubmittedTriggers);Qd(Z,e,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_CANCELLED",k.layoutExitUserCancelledTriggers)}catch(e){yd(l,y);e instanceof AL?l.iH(y,k,e,"ADS_CLIENT_ERROR_TYPE_SCHEDULE_LAYOUT_FAILED"):
l.iH(y,k,new AL(`Unexpected error: ${e}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_UNEXPECTED_ERROR"),"ADS_CLIENT_ERROR_TYPE_SCHEDULE_LAYOUT_FAILED");DQ(l,y,!0);return}zs(l.Av,"ADS_CLIENT_EVENT_TYPE_LAYOUT_SCHEDULED",y,k);for(const e of l.C)e.Hh(y,k);yd(l,y);toe(l,y)}else l=l.p_.get(),g.tL(l.L.O())||OH(l.L.O())||g.dU(l.L.O())?l=!0:(EP("Composite VOD on legacy path."),l=!1),l&&EP("slot is unscheduled after been fulfilled.",y,k)}};
duQ=function(l,y,k){y.f_!=="core"&&zs(l.Av,"ADS_CLIENT_EVENT_TYPE_LAYOUT_RECEIVED",y,k)};
wcC=function(l,y,k){zs(l.Av,"ADS_CLIENT_EVENT_TYPE_LAYOUT_SCHEDULED",y,k);for(const z of l.C)z.Hh(y,k)};
hQQ=function(l,y,k){zs(l.Av,"ADS_CLIENT_EVENT_TYPE_LAYOUT_ENTERED",y,k);for(const z of l.C)z.s1(y,k)};
Qje=function(l,y,k){if(NQ(l.Z,y)&&Lq(s0(l.Z,y))){var z=Ba(l.Z,y);if(z&&kR(l.Z,y))Gws(l,y,z,k?"error":"abandoned");else{va(l.Av,"ADS_CLIENT_EVENT_TYPE_EXIT_SLOT_REQUESTED",y);try{const r=s0(l.Z,y);if(!r)throw new F("Cannot exit slot it is unregistered",void 0,"ADS_CLIENT_ERROR_MESSAGE_SLOT_WAS_UNREGISTERED");r.Z!=="enter_requested"&&r.Z!=="entered"&&r.Z!=="rendering"&&rU(r.slot,r.Z,"exitSlot");r.Z="exit_requested";if(r.C===void 0)throw r.Z="scheduled",new F("Cannot exit slot because adapter is not defined",
void 0,"ADS_CLIENT_ERROR_MESSAGE_NO_SLOT_ADAPTER_REGISTERED");r.C.Ta()}catch(r){r instanceof F&&r.NS?(Z_(l.Av,"ADS_CLIENT_ERROR_TYPE_EXIT_SLOT_FAILED",r.NS,y),EP(r,y,void 0,void 0,r.Q2)):(Z_(l.Av,"ADS_CLIENT_ERROR_TYPE_EXIT_SLOT_FAILED","ADS_CLIENT_ERROR_MESSAGE_UNEXPECTED_ERROR",y),EP(r,y))}}}};
aWq=function(l,y,k,z){zs(l.Av,zQP(z),y,k);for(const r of l.C)r.iq(y,k,z)};
lR=function(l,y){y.sort((r,Z)=>{if(r.category===Z.category)return r.trigger.triggerId.localeCompare(Z.trigger.triggerId);const e=A=>{EP("TriggerCategoryOrder enum does not contain trigger category: "+A)};
return ynq(r.category,e)-ynq(Z.category,e)});
var k=new Map;for(var z of y){if(!NQ(l.Z,z.slot))continue;if(s0(l.Z,z.slot).S){s0(l.Z,z.slot).A.push(z);continue}ifC(l.Av,z.slot,z,z.layout);(y=k.get(z.category))||(y=[]);y.push(z);k.set(z.category,y)}for(const [r,Z]of Uuy)z=Z,(y=k.get(r))&&Mo_(l,y,z);(z=k.get("TRIGGER_CATEGORY_SLOT_EXPIRATION"))&&Xc_(l,z);(z=k.get("TRIGGER_CATEGORY_SLOT_FULFILLMENT"))&&cn4(l,z);(k=k.get("TRIGGER_CATEGORY_SLOT_ENTRY"))&&CJ5(l,k)};
Mo_=function(l,y,k){for(const z of y)z.layout&&kR(l.Z,z.slot)&&Gws(l,z.slot,z.layout,k)};
Xc_=function(l,y){for(const k of y)DQ(l,k.slot,!1)};
cn4=function(l,y){for(const k of y){a:switch(s0(l.Z,k.slot).V){case "not_filled":y=!0;break a;default:y=!1}y&&(va(l.Av,"ADS_CLIENT_EVENT_TYPE_FULFILL_SLOT_REQUESTED",k.slot),l.Z.Nh(k.slot))}};
CJ5=function(l,y){for(const r of y){va(l.Av,"ADS_CLIENT_EVENT_TYPE_ENTER_SLOT_REQUESTED",r.slot);for(const Z of l.C)Z.lH(r.slot);try{var k=l.Z,z=r.slot;const Z=s0(k,z);if(!Z)throw new F("Got enter request for unknown slot",void 0,"ADS_CLIENT_ERROR_MESSAGE_SLOT_STATE_IS_NULL");if(!Z.C)throw new F("Tried to enter slot with no assigned slotAdapter",void 0,"ADS_CLIENT_ERROR_MESSAGE_NO_SLOT_ADAPTER_REGISTERED");if(Z.Z!=="scheduled")throw new F("Tried to enter a slot from stage: "+Z.Z,void 0,"ADS_CLIENT_ERROR_MESSAGE_ILLEGAL_SLOT_STATE");
if(Lq(Z))throw new F("Got enter request for already active slot",void 0,"ADS_CLIENT_ERROR_MESSAGE_SLOT_COLLISION");for(const e of RA(k,`${z.slotType}_${z.slotPhysicalPosition}`).values())if(Z!==e&&Lq(e)&&(Z.slot.fulfilledLayout?.layoutType!=="LAYOUT_TYPE_VIDEO_INTERSTITIAL_CENTERED"||e.layout?.layoutType!=="LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY"))throw new F("Trying to enter a slot when a slot of same type is already active.",{activeSlotStatus:e.Z},"ADS_CLIENT_ERROR_MESSAGE_DUPLICATE_SLOT");}catch(Z){Z instanceof
F&&Z.NS?(Z_(l.Av,"ADS_CLIENT_ERROR_TYPE_ENTER_SLOT_FAILED",Z.NS,r.slot),EP(Z,r.slot,Ba(l.Z,r.slot),void 0,Z.Q2)):(Z_(l.Av,"ADS_CLIENT_ERROR_TYPE_ENTER_SLOT_FAILED","ADS_CLIENT_ERROR_MESSAGE_UNEXPECTED_ERROR",r.slot),EP(Z,r.slot));DQ(l,r.slot,!0);continue}y=s0(l.Z,r.slot);y.Z!=="scheduled"&&rU(y.slot,y.Z,"enterSlot");y.Z="enter_requested";y.C.Oh()}};
Gws=function(l,y,k,z){NQ(l.Z,y)&&(zs(l.Av,kwT.get(z)?.eW||"ADS_CLIENT_EVENT_TYPE_UNSPECIFIED",y,k),l=s0(l.Z,y),l.Z!=="rendering"&&rU(l.slot,l.Z,"exitLayout"),l.Z="rendering_stop_requested",l.N.Xm(k,z))};
Lq=function(l){return l.Z==="enter_requested"||l.isActive()};
NQ=function(l,y){return s0(l,y)!=null};
Ba=function(l,y){(l=s0(l,y))?l.layout!=null&&!l.layout&&EP("Unexpected empty layout",y):EP("Unexpected undefined slotState",y);return l?.layout||null};
bfQ=function(l){const y=[];l.Z.forEach(k=>{for(const z of k.values())y.push(z.slot)});
return y};
kR=function(l,y){l=s0(l,y);if(y=l.layout!=null)a:switch(l.Z){case "rendering":case "rendering_stop_requested":y=!0;break a;default:y=!1}return y};
RA=function(l,y){return(l=l.Z.get(y))?l:new Map};
s0=function(l,y){return RA(l,`${y.slotType}_${y.slotPhysicalPosition}`).get(y.slotId)};
wU=function(l,y,k){if(k.length==0)throw new F(`No ${u7C.get(y)} triggers found for slot.`,void 0,xut(y));for(const z of k)if(!l.Ud.nA.get(z.triggerType))throw new F("No trigger adapter registered for "+y+" trigger of type: "+z.triggerType,void 0,"ADS_CLIENT_ERROR_MESSAGE_NO_TRIGGER_ADAPTER_REGISTERED_FOR_TYPE");};
rU=function(l,y,k){EP(`Slot stage was ${y} when calling method ${k}`,l)};
Ha=function(l,y){for(const k of y)if(y=l.Y.get(k.triggerId))y.dK(k),l.Y.delete(k.triggerId)};
$R=function(l,y,k){for(const z of k)if(!l.Ud.nA.get(z.triggerType))throw new AL(`No trigger adapter registered for ${u7C.get(y)} trigger of type: ${z.triggerType}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_NO_TRIGGER_ADAPTER_REGISTERED_FOR_TYPE");};
Qd=function(l,y,k,z){for(const r of z)z=l.Ud.nA.get(r.triggerType),z.iI(k,r,y.slot,y.layout?y.layout:null),y.Y.set(r.triggerId,z)};
xut=function(l){switch(l){case "TRIGGER_CATEGORY_SLOT_ENTRY":return"ADS_CLIENT_ERROR_MESSAGE_EMPTY_SLOT_ENTRY_TRIGGER";case "TRIGGER_CATEGORY_SLOT_EXPIRATION":return"ADS_CLIENT_ERROR_MESSAGE_EMPTY_SLOT_EXPIRATION_TRIGGER";case "TRIGGER_CATEGORY_SLOT_FULFILLMENT":return"ADS_CLIENT_ERROR_MESSAGE_EMPTY_SLOT_FULFILLMENT_TRIGGER";default:return"ADS_CLIENT_ERROR_MESSAGE_INVALID_TRIGGER"}};
muC=function(l){return hL(l.l_).concat(hL(l.nA)).concat(hL(l.Ik)).concat(hL(l.wN)).concat(hL(l.h$))};
hL=function(l){const y=[];for(const k of l.values())k.Vf&&y.push(k);return y};
v=function(l){return new qXP(l)};
T3y=function(l){const y=new W0g((k,z,r,Z)=>new IWg(l.Z.Ud,k,z,r,Z,l.Z.p_),new Set(muC(l.Z.Ud).concat(l.Z.listeners)),l.Z.Av,l.Z.p_);
g.x(l,y);return y};
Gs=function(l,y,k){HSC(l.Z(),y,k)};
a0=function(l,y,k,z){(l=l.Z())||EP("Could not initiate a command router instance.");Pa(l,y,k,z)};
VoP=function(l,y){const k=y.bgp&&y.bgub,z=!!y.upb;y.siub&&y.scs&&(k||z)&&(z&&iR(l.p_.get(),"html5_export_sodar_snapshot")&&Vz(async r=>(await Mi(ZH())).snapshot(r)),XZQ(y.siub,y.scs,y.bgub,y.bgp,y.upb))};
YX_=function(l,y,k,z){l.Z&&EP("Currently active request ongoing for slot. This should never happen",l.slot);l.Z=y();l.Z.then(r=>{l.Z=null;z&&z(r);const Z=r.En?"LAYOUT_TYPE_THROTTLED_AD_BREAK_RESPONSE":"LAYOUT_TYPE_AD_BREAK_RESPONSE";var e=l.C.get(),A=l.slot.slotId,Q=S4(l.TA.get(),{slotId:l.slot.slotId,slotType:l.slot.slotType,slotPhysicalPosition:l.slot.slotPhysicalPosition,f_:l.slot.f_,slotEntryTrigger:l.slot.slotEntryTrigger,slotFulfillmentTriggers:l.slot.slotFulfillmentTriggers,slotExpirationTriggers:l.slot.slotExpirationTriggers});
const t=UH(e.C.get(),Z,A),O={layoutId:t,layoutType:Z,f_:"core"};r={layoutId:t,layoutType:Z,NW:new Map,layoutExitNormalTriggers:[new PJ_(e.Z,A)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],f_:"core",clientMetadata:new nq([new JnP(r)]),KP:Q(O)};OfC(l.callback,l.slot,r)},r=>{l.Z=null;
k&&k();r instanceof ln||en(l.callback,l.slot,new F(r,void 0,"ADS_CLIENT_ERROR_MESSAGE_AD_BREAK_REQUEST_ERROR",!0),"ADS_CLIENT_ERROR_TYPE_FULFILL_SLOT_FAILED")})};
pcq=function(l){if(l.Z==null)l.callback.Yu(l.slot);else try{l.Z.cancel(),l.Z=null,l.callback.Yu(l.slot)}catch(y){l.Z=null,en(l.callback,l.slot,new F(y,void 0,"ADS_CLIENT_ERROR_MESSAGE_CANCEL_SLOT_FULFILLMENT_FAILURE"),"ADS_CLIENT_ERROR_TYPE_CANCEL_FULFILL_SLOT_FAILED")}};
M6=function(l,y,k=!1,z=""){!l&&k&&g.WH(Error(`Player URL validator detects invalid url. ${z}: ${y}`));return l};
XV=function(l,y){return y&&y.test(l)?!0:!1};
gC5=function(l){return(l=K0q&&K0q.exec(l))?l[0]:""};
qR=function(l){return M6(XV(l,ECQ),l,!1,"Trusted Stream URL")};
g.cJ=function(l){return M6(XV(l,fW_),l,!1,"Trusted Image URL")};
SXT=function(l){return M6(XV(l,jjQ),l,!1,"Trusted Promoted Video Domain URL")};
F0_=function(l){return M6(XV(l,nCT),l,!1,"Drm Licensor URL")};
N3C=function(l,y=!1){return M6(XV(l,oC4),l,y,"Captions URL")};
sjP=function(l){l=new g.sX(l);g.Lf(l,document.location.protocol);g.vc(l,document.location.hostname);document.location.port&&g.Hc(l,document.location.port);return l.toString()};
Cc=function(l){l=new g.sX(l);g.Lf(l,document.location.protocol);return l.toString()};
L05=function(l){return l===-0x8000000000000?"BEFORE_MEDIA_START":l===0?"MEDIA_START":l===0x7ffffffffffff?"MEDIA_END":l===0x8000000000000?"AFTER_MEDIA_END":l.toString()};
g.bR=function(l,y){return l.start-y.start||l.priority-y.priority||l.C-y.C};
g.uR=function(l){return`crn_${l}`};
g.xR=function(l){return`crx_${l}`};
vCP=function(l,y){switch(l.style){case m_.CHAPTER_MARKER:return y?8:5;case m_.AD_MARKER:return 6;case m_.TIME_MARKER:return Number.POSITIVE_INFINITY;default:return 0}};
B3Q=function(l){l.yE?.get().pX(l.slot.clientMetadata.aR("metadata_type_cue_point").identifier)};
q6=function(l,y){return g9(l,y.qx,y.slotType)?!0:!1};
RQs=function(l){if(l.slot.clientMetadata.aR("metadata_type_allow_pause_ad_break_request_slot_reschedule")){const y=HfQ(l,l.slot);WJ(l.Z.get(),"OPPORTUNITY_TYPE_PAUSE_AD_BREAK_REQUEST_SLOT_RESCHEDULE",()=>[y])}};
Duy=function(l){if(l.slot.clientMetadata.aR("metadata_type_prefetch_metadata")){const y=HfQ(l,l.slot);WJ(l.Z.get(),"OPPORTUNITY_TYPE_PLAYER_RESPONSE_RECEIVED",()=>[y])}};
HfQ=function(l,y){const k=I0(l.C.get(),l.slot.slotType);l={...l.slot};if(y.slotEntryTrigger){var z=y.slotId;var r=y.slotEntryTrigger;z=r.triggeringSlotId!=null&&r.triggeringSlotId===z?r.clone(k):r}else z=void 0;return{...l,slotId:k,slotEntryTrigger:z,slotFulfillmentTriggers:lf4(y.slotId,k,y.slotFulfillmentTriggers),slotExpirationTriggers:lf4(y.slotId,k,y.slotExpirationTriggers)}};
lf4=function(l,y,k){const z=[];for(const r of k)z.push(r.triggeringSlotId!=null&&r.triggeringSlotId===l?r.clone(y):r);return z};
g.Ts=function(l,y){for(const k of Object.keys(y)){const z=y[k];l=l.replace(new RegExp("\\$"+k,"gi"),()=>z)}return l};
Vd=function(l,y,k){y.layoutId!==l.layout.layoutId?l.Z.iH(l.slot,y,new AL("Unknown layout received. "+`Required LayoutId: ${l.layout.layoutId}`+`and LayoutType: ${l.layout.layoutType}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_UNKNOWN_LAYOUT"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED"):k()};
JL=function(l,y,k,z,r,Z,e,A){z=z||k.clientMetadata.aR(Z);l=PJ(l);const Q=JV(()=>{r.s1(y,k)});
A.push(e(z,l,k.layoutId,{adsClientData:k.KP},()=>{Q()}))};
rgs=function(l){const y=l.getVideoData();var k=l.fl(),z=k.Jv(),r=l.O();const Z=l.lP();var e=Z.iy*8/1024,A=Z.OP/1024,Q=Z.ly;const t=Z.YJ;var O=Z.N0,d=k.getCurrentTime().toFixed(2),w=YR(k.Cy(),",",3);var h="";if(y.isDaiEnabled()){y.enableServerStitchedDai&&(h+=y.OW?"DS":"SS");h=y.j2()?h+"LIFA, ":h+"DAI, ";var U=Z.Xq;U&&(h+=U)}pc(y)&&!y.j2()&&(h+="LIFAE, ");Kc(y)&&(h+="SABR, ");if(y.fetchType){switch(y.fetchType){case "onesie":U="o";break;case "gp":U="gp";break;default:U="gvi"}h+=`vd:${U}, `}(U=r.xz)&&
(h=U.Z?h+"wa, ":h+"w, ");h+=`s:${O} t:${d} b:${w} `;k.isSeeking()&&(h+="S");k.isPaused()&&(h+="P");k.isEnded()&&(h+="E");l.isOrchestrationLeader()&&(h+=" L");(k=Z.q$)&&(h+=` l:${k.toFixed()}`);k=Z.currentTime;O=y.Gz;k&&k>O.start&&k<O.end&&(h+=" as");k=g.OJ(bH)("_start",void 0);O=[];for(u of["pl_i","vir","or_p","orfb","pbs"])(d=g.OJ(bH)(u,void 0))&&k&&(d-=k,O.push(`${u}:${Math.round(d)}`));var u=O.join(" ");k=g.gU();O=g.EH(l).Hq;d=y.N&&!y.N.Z()?"display:none":"";if((w=y.clientPlaybackNonce)&&w.length==
16){w+="AAAA";U=0;var W="";for(let T=0;T<20;T++)if(U=(U<<6)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".indexOf(w.charAt(T)),T%5==4){let J="";for(let K=0;K<6;K++)J="0123456789ABCDEFGHJKMNPQRSTVWXYZ".charAt(U&31)+J,U>>=5;W+=J}w=`${W.substr(0,4)} ${W.substr(4,4)} ${W.substr(8,4)} ${W.substr(12,4)} ${W.substr(16,4)}`}else w="";e={video_id_and_cpn:String(y.videoId)+" / "+w,codecs:"",dims_and_frames:"",bandwidth_kbps:`${e.toFixed(0)} Kbps`,buffer_health_seconds:`${Q.toFixed(2)} s`,
date:`${(new Date).toString()}`,drm_style:t?"":"display:none",drm:t,debug_info:h,extra_debug_info:"",bandwidth_style:d,network_activity_style:d,network_activity_bytes:`${A.toFixed(0)} KB`,shader_info:O,shader_info_style:O?"":"display:none",playback_categories:""};A=`${z.clientWidth}x${z.clientHeight}`+(k>1?`*${k.toFixed(2)}`:"");Q="-";Z.totalVideoFrames&&(Q=`${Z.droppedVideoFrames||0} dropped of ${Z.totalVideoFrames}`);e.dims_and_frames=`${A} / ${Q}`;l=l.getVolume();A=ygT(y);l=`${Math.round(l)}% / ${y.V?.audio.C?
"VB":y.V?.audio.Z?"DRC":`${Math.round(l*A)}%`}`;A=y.YR.toFixed(1);isFinite(Number(A))&&(l+=` (content loudness ${A}dB)`);e.volume=l;e.resolution=`${z.videoWidth}x${z.videoHeight}`;if(z=y.C){if(l=z.video)A=l.fps,A>1&&(e.resolution+=`@${A}`),(A=Z.DT)&&A.video&&(e.resolution+=` / ${A.video.width}x${A.video.height}`,A.video.fps>1&&(e.resolution+=`@${A.video.fps}`)),e.codecs=kBy(z),!y.V||z.audio&&z.video?z.Ss&&(e.codecs+=` / ${z.Ss}A`):e.codecs+=` / ${kBy(y.V)}`,l.Z||l.primaries?(A=l.Z||"unknown",A===
"smpte2084"?A=`${A} (PQ)`:A==="arib-std-b67"&&(A=`${A} (HLG)`),e.color=`${A} / ${l.primaries||"unknown"}`,e.color_style=""):e.color_style="display:none";if(z.debugInfo){e.fmt_debug_info="";for(var V of z.debugInfo)e.fmt_debug_info+=`${V.label}:${V.text} `}e.fmt_debug_info_style=e.fmt_debug_info&&e.fmt_debug_info.length>0?"":"display:none"}V=y.isLivePlayback;z=y.aj;e.live_mode_style=V||z?"":"display:none";e.live_latency_style=V?"":"display:none";if(z)e.live_mode="Post-Live"+(fc(y)?" Manifestless":
"");else if(V){z=Z.Fx;e.live_latency_secs=`${z.toFixed(2)}s`;V=fc(y)?"Manifestless, ":"";y.xa&&(V+="Windowed, ");l="Uncertain";if(z>=0&&z<120)if(y.latencyClass&&y.latencyClass!=="UNKNOWN")switch(y.latencyClass){case "NORMAL":l="Optimized for Normal Latency";break;case "LOW":l="Optimized for Low Latency";break;case "ULTRALOW":l="Optimized for Ultra Low Latency";break;default:l="Unknown Latency Setting"}else l=y.isLowLatencyLiveStream?"Optimized for Low Latency":"Optimized for Smooth Streaming";V+=
l;(z=Z.J0)&&(V+=`, seq ${z.sequence}`);e.live_mode=V}r.experiments.sA().Z.G7(zDe)?Z.isGapless&&!Z.Bh&&(e.playback_categories=Z.wP?e.playback_categories+"Gapless ":e.playback_categories+"Queued "):!Z.isGapless||jn(y)&&Z.Bh||(e.playback_categories+="Gapless ");e.playback_categories_style=e.playback_categories?"":"display:none";e.bandwidth_samples=Z.vH;e.network_activity_samples=Z.Ew;e.live_latency_samples=Z.zR;e.buffer_health_samples=Z.sx;r=y.PF();if(y.cotn||r)e.cotn_and_local_media=`${y.cotn?y.cotn:
"null"} / ${r}`;e.cotn_and_local_media_style=e.cotn_and_local_media?"":"display:none";Sn(y,"web_player_release_debug")?(e.release_name=G[11],e.release_style=""):e.release_style="display:none";e.debug_info&&u.length>0&&e.debug_info.length+u.length<=60?e.debug_info+=" "+u:e.extra_debug_info=u;e.extra_debug_info_style=e.extra_debug_info&&e.extra_debug_info.length>0?"":"display:none";return e};
FV=function(l,y,k,z,r,Z,e,A,Q){if(y===l)if(Q){if(Q===A.layoutId){a:{for(const t of k.keys())if(t.slotType==="SLOT_TYPE_PLAYER_BYTES"&&Z===k.get(t).layoutId){l=!0;break a}l=!1}l?nc(z,1):r?r():EP("Tried to call engagePingCallback but it is null",e,A)}}else EP("Companion AdUxClick received without a layoutId",e,A)};
o0=function(l){return!!l.get("active_view_viewable")?.length||!!l.get("active_view_measurable")?.length||!!l.get("active_view_fully_viewable_audible_half_duration")?.length||!!l.get("audio_audible")?.length||!!l.get("audio_measurable")?.length};
N6=function(l){return l?.activeViewTracking?.trafficType??"ACTIVE_VIEW_TRAFFIC_TYPE_UNSPECIFIED"};
sH=function(l){return new Map([["impression",l.impressionPings||[]],["error",l.errorPings||[]],["mute",l.mutePings||[]],["unmute",l.unmutePings||[]],["pause",l.pausePings||[]],["rewind",l.rewindPings||[]],["resume",l.resumePings||[]],["skip",l.skipPings||[]],["swipe",l.swipePings||[]],["close",l.closePings||[]],["progress",l.progressPings||[]],["clickthrough",l.clickthroughPings||[]],["fullscreen",l.fullscreenPings||[]],["active_view_viewable",l.activeViewViewablePings||[]],["active_view_measurable",
l.activeViewMeasurablePings||[]],["active_view_fully_viewable_audible_half_duration",l.activeViewFullyViewableAudibleHalfDurationPings||[]],["audio_audible",l.activeViewTracking?.activeViewAudioAudiblePings||[]],["audio_measurable",l.activeViewTracking?.activeViewAudioMeasurablePings||[]],["end_fullscreen",l.endFullscreenPings||[]],["channel_clickthrough",l.channelClickthroughPings||[]],["abandon",l.abandonPings||[]],["start",l.startPings||[]],["first_quartile",l.firstQuartilePings||[]],["midpoint",
l.secondQuartilePings||[]],["third_quartile",l.thirdQuartilePings||[]],["complete",l.completePings||[]],["unmuted_impression",l.unmutedImpressionPings||[]],["unmuted_error",l.unmutedErrorPings||[]],["unmuted_mute",l.unmutedMutePings||[]],["unmuted_unmute",l.unmutedUnmutePings||[]],["unmuted_pause",l.unmutedPausePings||[]],["unmuted_resume",l.unmutedResumePings||[]],["unmuted_close",l.unmutedClosePings||[]],["unmuted_progress",l.unmutedProgressPings||[]],["unmuted_clickthrough",l.unmutedClickthroughPings||
[]],["unmuted_fullscreen",l.unmutedFullscreenPings||[]],["unmuted_end_fullscreen",l.unmutedEndFullscreenPings||[]],["unmuted_abandon",l.unmutedAbandonPings||[]],["unmuted_start",l.unmutedStartPings||[]],["unmuted_first_quartile",l.unmutedFirstQuartilePings||[]],["unmuted_midpoint",l.unmutedSecondQuartilePings||[]],["unmuted_third_quartile",l.unmutedThirdQuartilePings||[]],["unmuted_complete",l.unmutedCompletePings||[]],["unmuted_skip",l.unmutedSkipPings||[]]])};
ZFC=function(l){switch(l){case "abandon":return"unmuted_abandon";case "active_view_fully_viewable_audible_half_duration":return null;case "active_view_measurable":return null;case "active_view_viewable":return null;case "audio_audible":return null;case "audio_measurable":return null;case "channel_clickthrough":return null;case "clickthrough":return"unmuted_clickthrough";case "close":return"unmuted_close";case "companion_engagement":return null;case "complete":return"unmuted_complete";case "end_fullscreen":return"unmuted_end_fullscreen";
case "error":return"unmuted_error";case "first_quartile":return"unmuted_first_quartile";case "fullscreen":return"unmuted_fullscreen";case "impression":return"unmuted_impression";case "midpoint":return"unmuted_midpoint";case "mute":return"unmuted_mute";case "pause":return"unmuted_pause";case "progress":return"unmuted_progress";case "resume":return"unmuted_resume";case "rewind":return null;case "skip":return"unmuted_skip";case "swipe":return null;case "start":return"unmuted_start";case "third_quartile":return"unmuted_third_quartile";
case "unmute":return"unmuted_unmute";case "seek":return null;case "unmuted_abandon":case "unmuted_clickthrough":case "unmuted_complete":case "unmuted_end_fullscreen":case "unmuted_error":case "unmuted_first_quartile":case "unmuted_fullscreen":case "unmuted_impression":case "unmuted_midpoint":case "unmuted_mute":case "unmuted_pause":case "unmuted_close":case "unmuted_progress":case "unmuted_resume":case "unmuted_start":case "unmuted_third_quartile":case "unmuted_unmute":case "unmuted_skip":return null;
default:return null}};
Lc=function(){return["metadata_type_ad_placement_config"]};
PJ=function(l){var y=l.Se.get();return vJ(y,l.K)};
BJ=function(l,y,k){eD5(l.Se.get(),l.layoutId,y,k,l.S??void 0,l.J)};
HJ=function(l,y,k=!1){l.Z.has(y)?BJ(l,y,[]):l.Fv(y,k)};
R0=function(l,y,k=!1){for(;l.V<l.C.length;){const z=l.C[l.V];if(z.offsetMilliseconds<=y||k)BJ(l,"progress",[z]),l.V++;else break}};
D_=function(l,y){return l.Z.has(y)};
lk=function(l){return l.C.every(y=>y.hasOwnProperty("offsetMilliseconds"))};
AgC=function(l,y,k){l.S=y;l.J=k};
$3Q=function(){const l=["metadata_type_ads_engagement_panel_layout_view_model","metadata_type_linked_player_bytes_layout_id"];Lc().forEach(y=>{l.push(y)});
return{qx:l,MK:["LAYOUT_TYPE_PANEL"]}};
Qt5=function(){const l=["metadata_type_banner_image_layout_view_model","metadata_type_linked_player_bytes_layout_id"];Lc().forEach(y=>{l.push(y)});
return{qx:l,MK:["LAYOUT_TYPE_COMPANION_WITH_IMAGE"]}};
t5t=function(){const l=["metadata_type_action_companion_ad_renderer","metadata_type_linked_player_bytes_layout_id"];Lc().forEach(y=>{l.push(y)});
return{qx:l,MK:["LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON"]}};
OFC=function(){const l=["metadata_type_image_companion_ad_renderer","metadata_type_linked_player_bytes_layout_id"];Lc().forEach(y=>{l.push(y)});
return{qx:l,MK:["LAYOUT_TYPE_COMPANION_WITH_IMAGE"]}};
d3z=function(){const l=["metadata_type_shopping_companion_carousel_renderer","metadata_type_linked_player_bytes_layout_id"];Lc().forEach(y=>{l.push(y)});
return{qx:l,MK:["LAYOUT_TYPE_COMPANION_WITH_SHOPPING"]}};
y_=function(l,y,k=!1){var z=l.J();if(z){for(;l.V<l.C.length;){const r=l.C[l.V];if(r.adVideoOffset.percent*z<=y||k)l.LP.get().executeCommand(r.command,l.layoutId),l.V++;else break}for(;l.N<l.Z.length;)if(z=l.Z[l.N],Number(z.adVideoOffset.milliseconds)<=y||k)l.LP.get().executeCommand(z.command,l.layoutId),l.N++;else break}};
w__=function(){const l=["metadata_type_action_companion_ad_renderer"];Lc().forEach(y=>{l.push(y)});
return{qx:l,MK:["LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON"]}};
hDg=function(){const l=["metadata_type_top_banner_image_text_icon_buttoned_layout_view_model"];Lc().forEach(y=>{l.push(y)});
return{qx:l,MK:["LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON"]}};
GB5=function(){const l=["metadata_type_ad_action_interstitial_renderer"];Lc().forEach(y=>{l.push(y)});
return{qx:l,MK:["LAYOUT_TYPE_ENDCAP"]}};
k0=function(l,y){return pq(l,y.qx,y.MK)?!0:!1};
afC=function(){const l=["metadata_type_ads_engagement_panel_renderer","metadata_type_linked_player_bytes_layout_id"];Lc().forEach(y=>{l.push(y)});
return{qx:l,MK:["LAYOUT_TYPE_PANEL_TEXT_ICON_IMAGE_TILES_BUTTON"]}};
iFs=function(){const l=["metadata_type_top_banner_image_text_icon_buttoned_layout_view_model","metadata_type_linked_player_bytes_layout_id"];Lc().forEach(y=>{l.push(y)});
return{qx:l,MK:["LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON"]}};
U3C=function(){const l=["metadata_type_client_forecasting_ad_renderer"];Lc().forEach(y=>{l.push(y)});
return{qx:l,MK:["LAYOUT_TYPE_FORECASTING"]}};
M5t=function(l,y){return Ym(l.clientMetadata,"metadata_type_ad_info_ad_metadata")?l.clientMetadata.aR("metadata_type_ad_info_ad_metadata"):y?{channelId:y.Fu,channelThumbnailUrl:y.profilePicture,channelTitle:y.author,videoTitle:y.title}:(EP("No layout metadata nor AdPlayback specified for AdMetaData"),{channelId:"",channelThumbnailUrl:"",channelTitle:"",videoTitle:""})};
X_P=function(l,y){return Ym(l.clientMetadata,"metadata_ad_video_is_listed")?l.clientMetadata.aR("metadata_ad_video_is_listed"):y?y.isListed:(EP("No layout metadata nor AdPlayback specified for ad video isListed"),!1)};
cgy=function(l){return l.layout.renderingContent?l.layout.clientMetadata.aR("metadata_type_player_bytes_callback_ref")?.current:l.layout.clientMetadata.aR("metadata_type_player_bytes_callback")};
Cdz=function(){return{qx:["metadata_type_instream_ad_player_overlay_renderer","metadata_type_player_bytes_callback","metadata_type_linked_player_bytes_layout_id","METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds"],MK:["LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY"]}};
zr=function(l){return l.layout.renderingContent?l.layout.clientMetadata.aR("metadata_type_player_bytes_callback_ref")?.current:l.layout.clientMetadata.aR("metadata_type_player_bytes_callback")};
bFz=function(){return{qx:["metadata_type_valid_ad_message_renderer"],MK:["LAYOUT_TYPE_TEXT_BANNER_OVERLAY"]}};
$0=function(l,y,k,z,r,Z,e,A,Q){return k0(k,Cdz())||k.layoutType==="LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY"&&g.E(k.renderingContent,rd)!==void 0?new uky(l,y,k,z,r,Z,e,A,Q):k0(k,{qx:["metadata_type_player_overlay_layout_renderer","metadata_type_player_bytes_callback","metadata_type_linked_player_bytes_layout_id","METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds"],MK:["LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY"]})||k.layoutType==="LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY"&&g.E(k.renderingContent,Z4)!==void 0?
new x35(l,y,k,z,r,Z,e,A,Q):k0(k,GB5())||k.layoutType==="LAYOUT_TYPE_ENDCAP"&&g.E(k.renderingContent,eT)!==void 0?new m3T(l,y,k,z,Z):k0(k,bFz())?new qjy(y,k,l,z,r,Q):k0(k,{qx:["metadata_type_instream_ad_player_overlay_renderer"],MK:["LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY"]})?new WSC(l,y,k,z,r,A):k.layoutType==="LAYOUT_TYPE_ENDCAP"&&g.E(k.renderingContent,A7)!==void 0?new Ifs(l,y,k,z,Z):null};
Q_=function(l){return!l.oldState.isPlaying()&&l.state.isPlaying()};
t7=function(l,y,k){return l<y?!1:k!=null?k<=y:l<=y+1};
Tnt=function(l){l.layout.renderingContent?(l=l.wb.get(),l=O1(l,1).eR/1E3):l=l.layout.clientMetadata.aR("metadata_type_video_length_seconds");return l};
dd=function(l,y){l.Z||(l.Fr.Fv(y),l.Z=!0)};
wd=function(l){const y=[];if(l)for(const [z,r]of Object.entries(l)){l=z;var k=r;if(k===void 0)continue;k=typeof k==="boolean"?`${+k}`:`${k}`.replace(/[:,=]/g,"_");y.push(`${l}.${k}`)}return y.join(";")};
h7=function(l){return l===1||l===2};
ah=function(l,y=0){if(l instanceof g.Gr)return l;l=l&&l instanceof Error?l:Error(`${l}`);h7(y)?g.n(l):g.WH(l);return new g.Gr(y===1?"player.fatalexception":"player.exception",{name:`${l.name}`,message:`${l.message}`},y)};
V5y=function(l,y){const k=(...z)=>{l.removeEventListener("playing",k);y(...z)};
l.addEventListener("playing",k)};
ik=function(){let l=g.UT("yt.player.utils.videoElement_");l||(l=g.Gf("VIDEO"),g.iQ("yt.player.utils.videoElement_",l));return l};
U1=function(l){const y=ik();return!!(y&&y.canPlayType&&y.canPlayType(l))};
XP=function(l){if(/opus/.test(l)&&g.Mx&&!qp("38")&&!g.is())return!1;if(window.MediaSource&&window.MediaSource.isTypeSupported)return window.MediaSource.isTypeSupported(l);if(window.ManagedMediaSource&&window.ManagedMediaSource.isTypeSupported)return window.ManagedMediaSource.isTypeSupported(l);if(/webm/.test(l)&&!Xp())return!1;l==='audio/mp4; codecs="mp4a.40.2"'&&(l='video/mp4; codecs="avc1.4d401f"');return!!U1(l)};
Pde=function(l){try{const y=XP('video/mp4; codecs="avc1.42001E"')||XP('video/webm; codecs="vp9"');return(XP('audio/mp4; codecs="mp4a.40.2"')||XP('audio/webm; codecs="opus"'))&&(y||!l)||U1('video/mp4; codecs="avc1.42001E, mp4a.40.2"')?null:"fmt.noneavailable"}catch{return"html5.missingapi"}};
ct=function(){const l=ik();return!(!l.webkitSupportsPresentationMode||typeof l.webkitSetPresentationMode!=="function")};
Ck=function(){const l=ik();try{const y=l.muted;l.muted=!y;return l.muted!==y}catch{}return!1};
p_q=function(l,y){B5(l,2,y.oH,bk,3);B5(l,3,y.innertubeRequest,JgT,3);LG(l,4,y.onesieUstreamerConfig);LG(l,9,y.lS);B5(l,10,y.ph,uk,3);B5(l,15,y.reloadPlaybackParams,Yje,3);v5(l,18,y.ou)};
gey=function(l,y){B5(l,1,y.formatId,x0,3);NB(l,2,y.startTimeMs);NB(l,3,y.durationMs);NB(l,4,y.oF);NB(l,5,y.Da);B5(l,9,y.GM_,KSg,3);B5(l,11,y.l5e,mq,1);B5(l,12,y.rI,mq,1)};
Ee5=function(l,y){v5(l,1,y.videoId);NB(l,2,y.lmt)};
KSg=function(l,y){if(y.cH)for(let k=0;k<y.cH.length;k++)B5(l,1,y.cH[k],Ee5,3)};
x0=function(l,y){NB(l,1,y.itag);NB(l,2,y.lmt);v5(l,3,y.xtags)};
qx=function(l){return{itag:YW(l,1),lmt:YW(l,2),xtags:En(l,3)}};
mq=function(l,y){NB(l,1,y.startTicks);NB(l,2,y.rQ);NB(l,3,y.timescale)};
Wt=function(l){return{startTicks:YW(l,1),rQ:YW(l,2),timescale:YW(l,3)}};
ffs=function(l,y){NB(l,1,y.defaultPolicy);NB(l,2,y.smooth);NB(l,3,y.visibility);NB(l,4,y.Nw);NB(l,5,y.performance);NB(l,6,y.speed)};
Sjs=function(l,y){if(y.authorizedFormats)for(let k=0;k<y.authorizedFormats.length;k++)B5(l,1,y.authorizedFormats[k],jtt,1);LG(l,2,y.sabrLicenseConstraint)};
jtt=function(l,y){NB(l,1,y.trackType);sn(l,2,y.isHdr)};
bk=function(l,y){NB(l,13,y.timeSinceLastManualFormatSelectionMs);var k=y.lastManualDirection;k!==void 0&&(oG(l,112),oG(l,k<<1^k>>31));NB(l,16,y.f8);NB(l,17,y.detailedNetworkType);NB(l,18,y.AJ);NB(l,19,y.ym);NB(l,21,y.Qd);NB(l,23,y.Jn);NB(l,28,y.r5);NB(l,29,y.BX);NB(l,34,y.visibility);k=y.playbackRate;if(k!==void 0){var z=new ArrayBuffer(4);(new Float32Array(z))[0]=k;k=(new Uint32Array(z))[0];if(k!==void 0)for(oG(l,285),Ff(l,4),z=0;z<4;)l.view.setUint8(l.pos,k&255),k>>=8,l.pos+=1,z+=1}NB(l,36,y.C0);
B5(l,38,y.mediaCapabilities,neP,3);NB(l,39,y.Kz);NB(l,40,y.e6);NB(l,44,y.playerState);sn(l,46,y.Wg);NB(l,48,y.uX);NB(l,50,y.Rw);NB(l,51,y.RK);NB(l,54,y.wD);if(y.qY)for(k=0;k<y.qY.length;k++)NB(l,55,y.qY[k]);sn(l,56,y.qr);NB(l,57,y.nG);sn(l,58,y.uS);NB(l,59,y.IF);NB(l,60,y.Is);sn(l,61,y.isPrefetch);NB(l,62,y.mJ);LG(l,63,y.sabrLicenseConstraint);NB(l,64,y.FI);NB(l,66,y.ju);NB(l,67,y.PE_);NB(l,68,y.Th);v5(l,69,y.audioTrackId);sn(l,71,y.Ld);B5(l,72,y.BY,ffs,1);NB(l,73,y.HB);NB(l,74,y.XA);NB(l,75,y.ge);
NB(l,76,y.Jz);B5(l,79,y.k6,Sjs,3);NB(l,80,y.xr)};
neP=function(l,y){if(y.videoFormatCapabilities)for(var k=0;k<y.videoFormatCapabilities.length;k++)B5(l,1,y.videoFormatCapabilities[k],FS4,1);if(y.audioFormatCapabilities)for(k=0;k<y.audioFormatCapabilities.length;k++)B5(l,2,y.audioFormatCapabilities[k],oeC,1);B5(l,4,y.perPlaybackAttributes,Nn5,3);NB(l,5,y.hdrModeBitmask)};
FS4=function(l,y){NB(l,1,y.videoCodec);sn(l,2,y.efficient);NB(l,3,y.maxHeight);NB(l,4,y.maxWidth);NB(l,11,y.maxFramerate);NB(l,12,y.maxBitrateBps);sn(l,15,y.is10BitSupported)};
oeC=function(l,y){NB(l,1,y.audioCodec);NB(l,2,y.numChannels);NB(l,3,y.maxBitrateBps);NB(l,6,y.spatialCapabilityBitmask)};
Nn5=function(l,y){if(y.itagDenylist)for(let k=0;k<y.itagDenylist.length;k++)NB(l,1,y.itagDenylist[k])};
uk=function(l,y){B5(l,1,y.clientInfo,stQ,3);LG(l,2,y.RL);LG(l,3,y.playbackCookie);LG(l,4,y.lS);if(y.VF)for(var k=0;k<y.VF.length;k++)B5(l,5,y.VF[k],LSg,3);if(y.mx)for(k=0;k<y.mx.length;k++)NB(l,6,y.mx[k]);v5(l,7,y.neK);B5(l,8,y.q3,vet,3)};
Bn4=function(l,y){NB(l,1,y.rCK);NB(l,2,y.a5b)};
HFe=function(l,y){var k=y.code;k!==void 0&&(oG(l,8),oG(l,k<<1^k>>31));v5(l,2,y.message)};
RDz=function(l,y){NB(l,1,y.clientState);B5(l,2,y.I5z,Bn4,1)};
vet=function(l,y){LG(l,1,y.HY);B5(l,2,y.Qo,HFe,3);B5(l,3,y.coldStartInfo,RDz,3)};
LSg=function(l,y){NB(l,1,y.type);LG(l,2,y.value)};
stQ=function(l,y){v5(l,1,y.hl);v5(l,12,y.deviceMake);v5(l,13,y.deviceModel);NB(l,16,y.clientName);v5(l,17,y.clientVersion);v5(l,18,y.osName);v5(l,19,y.osVersion)};
D3g=function(l,y){v5(l,1,y.name);v5(l,2,y.value)};
Ih=function(l,y){v5(l,1,y.url);if(y.JL)for(let k=0;k<y.JL.length;k++)B5(l,2,y.JL[k],D3g,3);LG(l,3,y.postBody);sn(l,4,y.g2);sn(l,6,y.r8)};
JgT=function(l,y){LG(l,2,y.sC);LG(l,5,y.encryptedClientKey);LG(l,6,y.iv);LG(l,7,y.D4);sn(l,10,y.Z2);sn(l,13,y.b3);sn(l,14,y.Zi);LG(l,16,y.G9);sn(l,17,y.c5)};
lMs=function(l){return{tS:YW(l,1),httpStatus:YW(l,2),body:gR(l,4)}};
Yje=function(l,y){v5(l,1,y.token)};
yBz=function(l){return{token:En(l,1)}};
kiT=function(l){const y=[];let k;for(;k=En(l,1);)y.push(k);return{url:y.length?y:void 0}};
zf5=function(l){return{G6:YW(l,1),lC:YW(l,2)}};
ef5=function(l,y){B5(l,1,y.oH,bk,3);if(y.D8)for(var k=0;k<y.D8.length;k++)B5(l,2,y.D8[k],x0,3);if(y.U1)for(k=0;k<y.U1.length;k++)B5(l,3,y.U1[k],gey,3);LG(l,5,y.videoPlaybackUstreamerConfig);if(y.E6)for(k=0;k<y.E6.length;k++)B5(l,6,y.E6[k],rBq,3);if(y.Oq)for(k=0;k<y.Oq.length;k++)B5(l,16,y.Oq[k],x0,3);if(y.d5)for(k=0;k<y.d5.length;k++)B5(l,17,y.d5[k],x0,3);if(y.G2)for(k=0;k<y.G2.length;k++)B5(l,18,y.G2[k],x0,3);B5(l,19,y.ph,uk,3);B5(l,21,y.Ov,Tr,3);NB(l,22,y.MX);NB(l,23,y.Zv);if(y.KX)for(k=0;k<y.KX.length;k++)B5(l,
24,y.KX[k],Tr,3);LG(l,25,y.tM);if(y.Va)for(k=0;k<y.Va.length;k++)B5(l,1E3,y.Va[k],ZWP,3)};
rBq=function(l,y){B5(l,1,y.formatId,x0,3);NB(l,2,y.WV);NB(l,3,y.sequenceNumber);B5(l,4,y.ZJ,mq,1);NB(l,5,y.GR);NB(l,6,y.QX)};
Tr=function(l,y){if(y.GB)for(let k=0;k<y.GB.length;k++)v5(l,1,y.GB[k]);LG(l,2,y.adsConfig);v5(l,3,y.m5);NB(l,4,y.Ln);NB(l,5,y.Mv);v5(l,6,y.s5);v5(l,7,y.cuepointId);NB(l,8,y.kF)};
ZWP=function(l,y){if(y.D8)for(var k=0;k<y.D8.length;k++)B5(l,1,y.D8[k],x0,3);if(y.U1)for(k=0;k<y.U1.length;k++)B5(l,2,y.U1[k],gey,3);v5(l,3,y.clipId)};
g.V_=function(l,y){B5(l,1,y.oH,bk,3);LG(l,3,y.videoPlaybackUstreamerConfig);B5(l,5,y.ph,uk,3);B5(l,6,y.Ov,Tr,3)};
AB5=function(l){return{type:YW(l,1)}};
$pQ=function(l,y){v5(l,1,y.clientPlaybackNonce);LG(l,2,y.serializedPlaybackPingContextData)};
tMy=function(l,y){if(y.s9)for(let k=0;k<y.s9.length;k++)B5(l,1,y.s9[k],QSQ,3)};
OWC=function(l,y){B5(l,1047,y.Mb,tMy,3)};
QSQ=function(l,y){if(y.J6)for(var k=0;k<y.J6.length;k++)LG(l,1,y.J6[k]);if(y.mW)for(k=0;k<y.mW.length;k++)LG(l,2,y.mW[k])};
hfC=function(l,y){v5(l,1,y.cpn);NB(l,2,y.sequenceNumber);v5(l,3,y.serializedWatchEndpointLoggingContext);if(y.decoderInfo)for(var k=0;k<y.decoderInfo.length;k++)B5(l,6,y.decoderInfo[k],dpz,3);v5(l,9,y.playerResponseCpn);NB(l,10,y.transitionStitchType);v5(l,11,y.qoePingUrl);NB(l,12,y.timestampOffsetMsecs);NB(l,15,y.remoteControlMode);if(y.remoteConnectedDevices)for(k=0;k<y.remoteConnectedDevices.length;k++)B5(l,16,y.remoteConnectedDevices[k],w9z,3);LG(l,17,y.serializedHouseBrandPlayerServiceLoggingContext);
if(y.serializedQoeContextData)for(k=0;k<y.serializedQoeContextData.length;k++)LG(l,19,y.serializedQoeContextData[k]);if(y.serializedOneTimeQoeContextData)for(k=0;k<y.serializedOneTimeQoeContextData.length;k++)LG(l,21,y.serializedOneTimeQoeContextData[k])};
dpz=function(l,y){NB(l,1,y.elapsedTimeMs);v5(l,3,y.videoDecoderName)};
w9z=function(l,y){NB(l,1,y.deviceInterface);v5(l,2,y.deviceVersion);sn(l,3,y.isSleeping)};
aMs=function(l){return{eI:fG(l,1,Gi_),trackType:YW(l,2),ke:YW(l,3),timeRange:fG(l,4,Wt),tileContext:En(l,5),Q7:YW(l,6)}};
Gi_=function(l){return{type:YW(l,1),event:YW(l,2),wm:pG(l,3),VQ:pG(l,4),iD:En(l,5),identifier:En(l,6),oF:YW(l,9)}};
iWP=function(l){return{first:YW(l,1),Ka:YW(l,2)}};
Upe=function(l){return{bitrate:YW(l,6),width:YW(l,7),height:YW(l,8),fps:YW(l,25),averageBitrate:YW(l,31),audioSampleRate:YW(l,45),audioChannels:YW(l,46),qualityOrdinal:YW(l,56)}};
Pt=function(l){return{itagDenylist:jB(l,1)}};
MMq=function(l){return{KVj:KG(l,1),hZb:YW(l,2),mVK:KG(l,3),Kmr:pG(l,4),cryptoPeriodIndex:YW(l,5),VIj:YW(l,6),BT_:YW(l,7)}};
CuT=function(l){return{q9:YW(l,1),itag:En(l,3),sI:fG(l,4,X9s),lmt:YW(l,5),XaK:YW(l,7),xtags:En(l,15),ej:fG(l,23,cBt),QB:fG(l,34,Pt)}};
X9s=function(l){return{iv:gR(l,5),Su:KG(l,7)}};
bWe=function(l){return{VU:jB(l,2),videoId:En(l,3),eh:YW(l,4)}};
cBt=function(l){return{videoId:En(l,2)}};
uAC=function(l){return{tB:YW(l,3),Ox:YW(l,4),MU:YW(l,5),PY:KG(l,8),Ylj:YW(l,10),Re:YW(l,12),Uw:YW(l,13),Cr:YW(l,14),M5:YW(l,15),J3:YW(l,16)}};
xpT=function(l){return{targetAudioReadaheadMs:YW(l,1),targetVideoReadaheadMs:YW(l,2),backoffTimeMs:YW(l,4),playbackCookie:gR(l,7),videoId:En(l,8)}};
mpz=function(l){return{minBandwidthBytesPerSec:YW(l,1),minReadaheadMs:YW(l,2)}};
quz=function(l){return{startMinReadaheadPolicy:SB(l,1,mpz),resumeMinReadaheadPolicy:SB(l,2,mpz)}};
Wwg=function(l){return{label:En(l,1),text:En(l,2)}};
IM4=function(l){return{videoId:En(l,1),formatId:fG(l,2,qx),debugInfo:SB(l,3,Wwg)}};
TxC=function(l){return{ag:SB(l,1,IM4)}};
VMQ=function(l){return{R3:YW(l,1),If:YW(l,2),minReadaheadMs:YW(l,3)}};
PuC=function(l){return{oz:YW(l,1),items:SB(l,2,VMQ),Dk:YW(l,3)}};
JBC=function(l){return{token:En(l,1),videoId:En(l,2)}};
Yuy=function(l){return{Rk:YW(l,1)}};
p9Q=function(l){return{Ao:En(l,1),action:YW(l,2),xm:fG(l,3,Yuy)}};
J7=function(l){return{sK:YW(l,1),YL:YW(l,2),seekSource:YW(l,3)}};
KwT=function(l){return{EZ:fG(l,2,Wt),cpn:En(l,5),loggingMetadata:gR(l,6),aS:fG(l,7,Wt),RB:YW(l,8),Xw:KG(l,9)}};
ga4=function(l){return{uC:SB(l,1,KwT)}};
EaC=function(l){return{metadata:SB(l,1,ga4),trackType:YW(l,2)}};
fMg=function(l,y){NB(l,1,y.id);v5(l,2,y.url)};
jSe=function(l,y){NB(l,1,y.id);v5(l,2,y.name);NB(l,3,y.resourceId);NB(l,4,y.line);NB(l,5,y.column)};
SuQ=function(l,y){NB(l,1,y.id);NB(l,2,y.timestampMs);NB(l,3,y.stackId)};
naz=function(l,y){NB(l,1,y.id);NB(l,2,y.frameId);NB(l,3,y.parentId)};
Fws=function(l,y){if(y.resources)for(var k=0;k<y.resources.length;k++)B5(l,1,y.resources[k],fMg,3);if(y.frames)for(k=0;k<y.frames.length;k++)B5(l,2,y.frames[k],jSe,3);if(y.samples)for(k=0;k<y.samples.length;k++)B5(l,3,y.samples[k],SuQ,1);if(y.stacks)for(k=0;k<y.stacks.length;k++)B5(l,4,y.stacks[k],naz,1)};
NxQ=function(l){return Object.values(oaC).includes(l)};
Kk=function(l,y){const k=Math.max(l,y);l=Math.min(l,y);y=Y0[0];for(let z=0;z<Y0.length;z++){const r=Y0[z],Z=g.pk[r];if(k>=Math.floor(Z*16/9)*1.3||l>=Z*1.3)return y;y=r}return"tiny"};
gd=function(l){return l.indexOf("/mp4")>=0?1:l.indexOf("/webm")>=0?2:l.indexOf("/x-flv")>=0?3:l.indexOf("/vtt")>=0?4:0};
E1=function(l){return l.includes("vtt")||l.includes("text/mp4")};
fk=function(l){return/(opus|mp4a|dtse|ac-3|ec-3|iamf)/.test(l)};
jT=function(l){return/(vp9|vp09|vp8|avc1|av01|av02)/.test(l)};
oh=function(l,y,k,z,r,Z,e){const A=new ST;y in g.pk||(y="small");y==="light"&&(y="tiny");z&&r?(r=Number(r),z=Number(z)):(r=g.pk[y],z=Math.round(r*16/9));Z=new nk(z,r,0,null,void 0,y,Z,e);l=unescape(l.replace(/&quot;/g,'"'));return new FP(k,l,{audio:A,video:Z})};
Nx=function(l){return l.Dr==="9h"||l.Dr==="(h"};
sST=function(l){return!!l.contentProtection&&!!l.contentProtection.fairplay&&(l.Dr==="("||l.Dr==="(h"||l.Dr==="A"||l.Dr==="MEAC3")||s1&&!!l.contentProtection&&l.Dr==="1e"};
Lwe=function(l){return l.Dr==="MAC3"||l.Dr==="MEAC3"||l.Dr==="M"||l.Dr==="I"};
g.Lk=function(l){return l.containerType===1};
va4=function(l){return l.Dr==="("||l.Dr==="(h"||l.Dr==="H"||s1&&l.Dr==="1e"};
Bxs=function(l,y=1){const k={};l.video&&(l.video.width&&(k[vt.WIDTH.name]=l.video.width),l.video.height&&(k[vt.HEIGHT.name]=l.video.height),l.video.fps&&(k[vt.FRAMERATE.name]=l.video.fps*y),l.video.Z&&(k[vt.EOTF.name]=l.video.Z),l.CP&&(k[vt.BITRATE.name]=l.CP*8*y),l.Dr==="("&&(k[vt.CRYPTOBLOCKFORMAT.name]="subsample"),l.video.projectionType==="EQUIRECTANGULAR"||l.video.projectionType==="EQUIRECTANGULAR_THREED_TOP_BOTTOM"||l.video.projectionType==="MESH")&&(k[vt.DECODETOTEXTURE.name]="true");l.audio?.numChannels&&
l.Dr!=="i"&&l.Dr!=="I"&&(k[vt.CHANNELS.name]=l.audio.numChannels);return k};
g.Bt=function(l,y){return{itag:+l.itag,lmt:y?0:l.lastModified,xtags:l.C||""}};
HWC=function(l){const y=navigator.mediaCapabilities;if(!y?.decodingInfo||l.Dr==="f")return Promise.resolve();const k={type:l.audio&&l.video?"file":"media-source"};l.video&&(k.video={contentType:l.mimeType,width:l.video.width||640,height:l.video.height||360,bitrate:l.CP*8||1E6,framerate:l.video.fps||30});l.audio&&(k.audio={contentType:l.mimeType,channels:`${l.audio.numChannels||2}`,bitrate:l.CP*8||128E3,samplerate:l.audio.sampleRate||44100});return y.decodingInfo(k).then(z=>{l.J=z})};
Ht=function(l,y){return{start(k){return l[k]},end(k){return y[k]},length:l.length}};
RfC=function(l,y,k){const z=[],r=[];for(let Z=0;Z<l.length;Z++)z.push(l.start(Z)),r.push(l.end(Z));z.push(y);r.push(k);z.sort((Z,e)=>Z-e);
r.sort((Z,e)=>Z-e);
return Ht(z,r)};
YR=function(l,y=",",k=l?l.length:0){const z=[];if(l)for(k=Math.max(l.length-k,0);k<l.length;k++)z.push(`${l.start(k).toFixed(3)}-${l.end(k).toFixed(3)}`);return z.join(y)};
Rh=function(l,y){if(!l)return-1;try{for(let k=0;k<l.length;k++)if(l.start(k)<=y&&l.end(k)>=y)return k}catch(k){}return-1};
D4=function(l,y){return Rh(l,y)>=0};
Dp5=function(l,y){if(!l)return NaN;y=Rh(l,y);return y>=0?l.start(y):NaN};
lt=function(l,y){if(!l)return NaN;y=Rh(l,y);return y>=0?l.end(y):NaN};
yS=function(l){return l&&l.length?l.end(l.length-1):NaN};
kX=function(l){return yS(l)>0};
zH=function(l,y){l=lt(l,y);return l>=0?l-y:0};
rV=function(l,y,k){const z=[],r=[];for(let Z=0;Z<l.length;Z++)l.end(Z)<y||l.start(Z)>k||(z.push(Math.max(y,l.start(Z))-y),r.push(Math.min(k,l.end(Z))-y));return Ht(z,r)};
Ouq=function(l,y,k,z,r,Z){const e=k.DRIFT_FROM_HEAD_MS&&!Number.isNaN(k.DRIFT_FROM_HEAD_MS)?Math.trunc(k.DRIFT_FROM_HEAD_MS):0;var A=lJ4.exec(y);A=A!=null&&A.length>=2?A[1]:"";const Q=yRg.test(y);var t=kRP.exec(y);t=t!=null&&t.length>=2?t[1]:"";var O=zY5.exec(y);O=O!=null&&O.length>=2&&!Number.isNaN(Number(O[1]))?Number(O[1]):1;var d=rR5.exec(y);d=d!=null&&d.length>=2?d[1]:"0";const w=ZT(l.player.O().nS);var h=l.player.getVideoData({playerType:1});const U=g.rl(h.Y,!0),u="BISCOTTI_ID"in k?k.BISCOTTI_ID:
"";ZuC(l,U,y,u.toString(),l.player.O(),h);h={splay:!1,lactMilliseconds:k.LACT.toString(),playerHeightPixels:Math.trunc(k.P_H),playerWidthPixels:Math.trunc(k.P_W),vis:Math.trunc(k.VIS),signatureTimestamp:20520,autonavState:eYt(l.player.O())};l.player.X("embeds_enable_encrypted_host_flags_enforcement")&&(h.encryptedHostFlags=l.player.O().getWebPlayerContextConfig()?.encryptedHostFlags);z&&(z={},AR_(z,k.YT_REMOTE)&&(h.mdxContext=z));if(z=$4t.includes(w)?void 0:g.e_("PREF")){var W=z.split(RegExp("[:&]"));
for(let T=0,J=W.length;T<J;T++){var V=W[T].split("=");if((V[0].toUpperCase()==="SML"||V[0].toUpperCase()==="GSML")&&V.length>1&&V[1].toUpperCase()==="TRUE"){U.user.lockedSafetyMode=!0;break}}a:{if("FLAG_AUTO_CAPTIONS_DEFAULT_ON"in Qv5){z=z.split(RegExp("[:&]"));V=Qv5.FLAG_AUTO_CAPTIONS_DEFAULT_ON;W="f"+(1+Math.floor(V/31)).toString();V=1<<Math.floor(V%31);for(let T=0,J=z.length;T<J;T++){const K=z[T].split("=");if(K[0]===W&&parseInt("0x"+K[1],16)&V){z=!0;break a}}}z=!1}h.autoCaptionsDefaultOn=z}y=
tWT.exec(y);(y=y!=null&&y.length>=2?y[1]:"")&&t&&(U.user.credentialTransferTokens=[{token:y,scope:"VIDEO"}]);y={contentPlaybackContext:h};A={adBlock:Math.trunc(k.AD_BLOCK),params:A,breakIndex:O,breakPositionMs:d,clientPlaybackNonce:k.CPN,topLevelDomain:w,isProxyAdTagRequest:Q,context:U,adSignalsInfoString:a3(I3(u.toString())),overridePlaybackContext:y};r!==void 0&&(A.cueProcessedMs=Math.round(r).toString());Z&&(A.cuepointId=Z);t&&(A.videoId=t);k.LIVE_TARGETING_CONTEXT&&(A.liveTargetingParams=k.LIVE_TARGETING_CONTEXT);
k.AD_BREAK_LENGTH&&(A.breakLengthMs=Math.trunc(k.AD_BREAK_LENGTH*1E3).toString());e&&(A.driftFromHeadMs=e.toString());A.currentMediaTimeMs=Math.round(l.player.getCurrentTime({playerType:1})*1E3);(l=l.player.getGetAdBreakContext())&&(A.getAdBreakContext=l);return A};
eL=function(){return window.SourceBuffer?!!SourceBuffer.prototype.changeType:!1};
d4y=function(){return!!(window.MediaSource||window.ManagedMediaSource||window.WebKitMediaSource||window.HTMLMediaElement&&HTMLMediaElement.prototype.webkitSourceAddId)};
AN=function(){return!(!window.MediaSource||!window.MediaSource.isTypeSupported)||window.ManagedMediaSource};
var wR_=function(l,y){return x2[G[19]](this,6,4165,l,y)};
$X=function(l){try{return l.N()==="open"}catch(y){return!1}};
hYe=function(l,y){$X(l)?g.o4(()=>{y(l)}):l.callback=y};
GRC=function(l,y,k){QS&&(tN(l.mediaElement,{l:"mswssb",sr:l.mediaElement.BG?.Ly()},!1),y.IZ(l.D,l),k.IZ(l.D,l));l.Z=y;l.C=k;g.x(l,y);g.x(l,k)};
iu5=function(l,y,k,z=""){z=y.mimeType+z;const r=k.mimeType;y=y.Dr;k=k.Dr;l.u0=l.yj?.addSourceBuffer(r);l.PG=z.split(";")[0]==="fakesb"?void 0:l.yj?.addSourceBuffer(z);l.py&&(l.py.webkitSourceAddId("0",r),l.py.webkitSourceAddId("1",z));k=new aJT(l.u0,l.py,"0",gd(r),k,!1);z=new aJT(l.PG,l.py,"1",gd(z),y,!0);GRC(l,k,z)};
MWT=function(l,y,k,z){if(!l.Z||!l.C)return null;const r=l.Z.isView()?l.Z.Y3:l.Z,Z=l.C.isView()?l.C.Y3:l.C,e=new O5(l.mediaElement,l.yj,!0);e.V=l.V;GRC(e,new U4Q(r,y,k,z),new U4Q(Z,y,k,z));$X(l)||l.Z.EG(l.Z.w4());return e};
tN=function(l,y,k=!1){l.BG?.yM()&&l.BG.Md("rms",y,k)};
dV=function(l){l=l.A();return l.length<1?NaN:l.end(l.length-1)};
XRP=function(l,y){l.pP&&l.pP.equals(y)||(l.pP&&l.pP.dispose(),l.pP=y)};
cR5=function(l){!l.C&&d4y()&&(l.V?l.V.then(()=>cR5(l)):l.VR()||(l.C=l.bX()))};
C85=function(l){l.C&&(l.C.dispose(),l.C=void 0)};
buz=function(l,y,k){l.isPaused()||l.getCurrentTime()>y||k>10||(l.play(),g.JK(()=>{buz(l,l.getCurrentTime(),k+1)},500))};
wV=function(l){return zH(l.Cy(),l.getCurrentTime())};
uN5=function(l,y){if(l.N()===0||l.hasError())return!1;const k=l.getCurrentTime()>0;return y>=0&&(l=l.A(),l.length||!k)?D4(l,y):k};
hN=function(l){l.VR()&&(l.BG&&l.BG.j0("rs_s"),Zu&&l.getCurrentTime()>0&&l.seekTo(0),l.mK(),l.load(),XRP(l,null));delete l.V};
GH=function(l){switch(l.eV()){case 2:return"progressive.net.retryexhausted";case 3:return l=l.hC(),l?.includes("MEDIA_ERR_CAPABILITY_CHANGED")||x4z&&l?.includes("audio_output_change")?"capability.changed":"fmt.decode";case 4:return"fmt.unplayable";case 5:return"drm.unavailable";case 1E3:return"capability.changed";default:return null}};
ai=function(l){return l.isPlaying()&&!l.Z(16)&&!l.Z(32)};
MH=function(l,y,k,z){if(!(y===l.state&&k===l.Ip&&z===l.seekSource||y!==void 0&&(y&128&&!k||y&2&&y&16))){var r;if(r=y)r=y||l.state,r=!!(r&16||r&32);l=new g.U5(y,k,r?z?z:l.seekSource:null)}return l};
Xs=function(l,y,k=!1){return m4e(l,y.getCurrentTime(),(0,g.f)(),wV(y),k)};
cK=function(l,y,k=null){return MH(l,l.state|y,null,k)};
CM=function(l,y){return MH(l,l.state&~y,null,null)};
bt=function(l,y,k,z=null){return MH(l,(l.state|y)&~k,null,z)};
g.ut=function(l,y){return y.state===l.state&&y.Ip===l.Ip};
xX=function(l){return l.Z(128)?-1:l.Z(2)?0:l.Z(2048)?3:l.Z(64)?-1:l.Z(1)&&!l.Z(32)?3:l.Z(8)?1:l.Z(4)?2:-1};
mV=function(l){return l.layout.clientMetadata.aR("METADATA_TYPE_INTERACTIONS_AND_PROGRESS_LAYOUT_COMMANDS")};
qH=function(l,y){HJ(l.Fr,y,!l.Z)};
qpC=function(l){EP("Received layout exit signal when not in layout exit flow.",l.slot,l.layout)};
WJP=function(l){if(l.Z3==="rendering"){qH(l,"pause");var y=mV(l)?.pauseCommands||[];Gs(l.LP.get(),y,l.layout.layoutId);l.Bj(2)}};
IJs=function(l){if(l.Z3==="rendering"){qH(l,"resume");var y=mV(l)?.resumeCommands||[];Gs(l.LP.get(),y,l.layout.layoutId)}};
TLT=function(l,y,k=!1){l.Z||R0(l.Fr,y,k)};
P8T=function(l){return(mV(l)?.progressCommands||[]).findIndex(y=>!!g.E(y?.command,VWQ))!==-1};
JRg=function(l,y){switch(y){case "normal":l.Fv("complete");break;case "skipped":l.Fv("skip");break;case "abandoned":D_(l.Fr,"impression")&&l.Fv("abandon")}};
YpT=function(l,y){l.N||(y=new g.WK(y.state,new g.U5),l.N=!0);return y};
pRC=function(l,y){Q_(y)?l.Bj(1):y.tj(4)&&!y.tj(2)&&WJP(l);fe(y,4)<0&&!(fe(y,2)<0)&&IJs(l)};
KJQ=function(l){l.position===0&&(l.Ll.get(),l=l.layout.clientMetadata.aR("metadata_type_ad_placement_config").kind,l={adBreakType:Ii(l)},Jt("ad_bl"),g.YV(l))};
g.TH=function(l,y,k){K4(l,k)||Eo(l,y,k);K4(l,"video_to_ad")||Eo(l,y,"video_to_ad");K4(l,"ad_to_video")||Eo(l,y,"ad_to_video");K4(l,"ad_to_ad")||Eo(l,y,"ad_to_ad")};
gGq=function(l){l.Y7=Date.now();VS(l,l.rP);l.timer.start()};
VS=function(l,y){y={current:y/1E3,duration:l.yJ()/1E3};Jv(l.GM.get(),"onAdPlaybackProgress",y)};
JN=function(l){return g.E(l.layout.renderingContent,PK)?.isSeekableWithNoAdElements};
fJs=function(l){return new EGC({...l,z6:l.callback,Bj:()=>{}})};
Spz=function(l){return new jv_({...l,Bj:y=>{Jv(l.GM.get(),"onAdIntroStateChange",y)}})};
nGP=function(l){return new jv_({...l,Bj:y=>{l.GM.get().Uq(y)}})};
FJT=function(l){var y=l.Om,k=["METADATA_TYPE_MEDIA_BREAK_LAYOUT_DURATION_MILLISECONDS"];for(const z of Lc())k.push(z);if(k0(y,{qx:k,MK:["LAYOUT_TYPE_MEDIA_BREAK"]}))return fJs(l);y=l.Om;k=["metadata_type_player_vars","metadata_type_player_bytes_callback_ref"];for(const z of Lc())k.push(z);if(k0(y,{qx:k,MK:["LAYOUT_TYPE_MEDIA"]}))return Ym(l.Om.clientMetadata,"metadata_type_ad_intro")?Spz(l):nGP(l)};
KM=function(l,y,k){const z=YX(l);l.dW===l.fJ.length-1&&EP("Unexpected skip with target requested during the last sublayout");if(k.renderingContent===void 0&&k.layoutId!==pM(z,y,k)){EP("onSkipWithAdPodSkipTargetRequested for a PlayerBytes layout that is not currently active",z.Y2(),z.Zp(),{requestingSlot:y,requestingLayout:k});var r=!1}else r=!0;if(r){a:{if((r=z.Zp().clientMetadata.aR("metadata_type_ad_pod_skip_target"))&&r>0&&r<l.fJ.length){b:{let Z=r;for(;Z<l.fJ.length;){if(r===l.fJ[Z].Zp().clientMetadata.aR("metadata_type_ad_pod_skip_index")){r=
Z;break b}Z++}r=void 0}if(r===void 0)EP("Skip-to-index was requested but target index was not found",z.Y2(),z.Zp(),{requestingSlot:y,requestingLayout:k});else{y=r;break a}}else EP("Invalid ad pod skip target index",z.Y2(),z.Zp(),{requestingSlot:y,requestingLayout:k});y=void 0}y!==void 0&&oGT(l,z.Y2(),z.Zp(),y)}};
YX=function(l){return l.fJ[l.dW]};
pM=function(l,y,k){const z=l.Zp().clientMetadata.aR("metadata_type_linked_in_player_layout_id");return z?z:(EP("Tried to retrieve Linked InPlayer LayoutId but missing ClientMetadata",l.Y2(),l.Zp(),{requestingSlot:y,requestingLayout:k}),null)};
E5=function(l,y,k,z){NLC(l,y,k,z,()=>{gV(l,l.dW+1)})};
oGT=function(l,y,k,z){NLC(l,y,k,"skipped",()=>{gV(l,z)})};
NLC=function(l,y,k,z,r){if(!l.PP){var Z=YX(l);Z?(Z.Zp().layoutId!==k.layoutId&&EP("SubLayout mismatch in exitSubLayout",y,k,{exitingSubLayout:k.layoutId,activeSubLayout:Z.Zp().layoutId}),l.PP=!0,Z.Xm(Z.Zp(),z),aWq(l.H6,y,k,z),l.PP=!1,l.oN?(l.oN(),fM(l.Ll.get())):r()):EP("No active adapter when exitSubLayout in PlayerBytesVodCompositeLayoutRenderingAdapter. This should never happen.",y,k)}};
gV=function(l,y){if(l.dW===l.fJ.length-1)l.dW++,jL(l.v7,l.layout),fM(l.Ll.get());else a:{if(l.dW===-1&&(l.callback.s1(l.slot,l.layout),y>0)){EP("Invalid index for playLayoutAtIndexOrExit when no ad has played yet.",l.slot,l.layout,{indexToPlay:y,layoutId:l.layout.layoutId});break a}l.dW=y;y=YX(l);if(l.dW>0){var k=l.Ll.get();k.C=!1;const z={};k.Z&&k.videoId&&(z.cttAuthInfo={token:k.Z,videoId:k.videoId});p4("ad_to_ad",z)}k=g.E(y.Zp().renderingContent,eT);!k?.isEligibleToBeSkippedWhenNoEngagementOnLayoutId||
(l.Qu.get().R_.get(k.isEligibleToBeSkippedWhenNoEngagementOnLayoutId)??!1)?y.startRendering(y.Zp()):gV(l,l.dW+1)}};
sv4=function(l){(l=YX(l))&&l.GC()};
vGs=function(l){return new LJ_(l.y7,l.wb,l.yE,l.mw,l.vG,l.Qu,l.Ll,l.H6,l.slot,l.layout,l.Ps,l.v7,l.oU,l.p_)};
Hu5=function(l,y,k,z,r,Z,e,A,Q,t,O,d,w,h,U,u,W,V,T,J,K,Zg){const es={Se:A,EA:Q,wy:t,mw:O,wb:d,vG:w,Qu:h,VE:U,Ll:u,GM:W,LP:V,Sb:T,p_:J,context:Zg};A=k0(z,{qx:["metadata_type_sub_layouts"],MK:["LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES"]})||z.mE!==void 0&&z.layoutType==="LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES";Q=k0(z,{qx:[],MK:["LAYOUT_TYPE_MEDIA","LAYOUT_TYPE_MEDIA_BREAK"]});t=()=>{const fC=z.mE??z.clientMetadata.aR("metadata_type_sub_layouts"),bQ=vGs({y7:l,wb:d,yE:K,mw:O,vG:w,Qu:h,Ll:u,H6:y,slot:k,layout:z,
Ps:Z,v7:e,oU:r,p_:J}),js=[];for(let Nt=0;Nt<fC.length;Nt++){const Ig=FJT({...es,callback:{s1:bQ.hW.bind(bQ),iq:bQ.CN.bind(bQ),iH:bQ.Z_.bind(bQ)},slot:k,Om:fC[Nt],D7:Ss=>{Ss.Xm(fC[Nt],"normal")},
dD:Nt,jo:fC.length,WI:!1});if(!Ig)return;js.push(Ig)}bQ.fJ=js;return bQ};
U=()=>{const fC=FJT({...es,callback:{s1:l.s1.bind(l),iq:l.iq.bind(l),iH:l.iH.bind(l)},slot:k,Om:z,D7:()=>{jL(e,z)},
dD:0,jo:1,WI:!0});return fC?new BLe(l,O,w,u,fC,r,J):fC};
if(A)return t();if(Q)return U()};
nM=function(l,y){SL(l.Se.get(),{driftRecoveryInfo:{contentCpn:l.wb.get().gJ?.clientPlaybackNonce,adClientData:l.layout.KP.adClientDataEntry,...y}})};
D45=function(l){var y=l.layout.clientMetadata.aR("metadata_type_layout_enter_ms");const k=l.layout.clientMetadata.aR("metadata_type_layout_exit_ms");l=l.Ba.get();y=RYT(l.N,y,k);return Math.min(k,y!==null?y:Infinity)};
yKC=function(l,y){const k=lCs(l,y);k||EP("Expected subLRA found by layout ID",l.slot,l.layout,{layoutId:y});l.Z={KA:k};k?k.startRendering(k.Zp()):y===l.C&&EP("Failed to find rendering adapter for survey media layout",l.slot,l.layout,{surveyMediaLayoutId:y})};
lCs=function(l,y){return y==null?null:l.N.find(k=>k.Zp().layoutId===y)||null};
kpt=function(l,y,k,z,r,Z,e,A,Q,t){var O=r-z;const d=(l.fulfilledLayout||l.clientMetadata.aR("metadata_type_fulfilled_layout"))?.clientMetadata.aR("metadata_type_ssdai_ads_config")||"",w=l.clientMetadata.aR("metadata_type_triggering_cue_point")?.current?.identifier;w||Fs(t,"ads_cpu",`slid.${y.layoutId}`);if(!O)return e.Cm(k,d,2,Z,z,r,l.slotId,w),Fs(t,"ads_iraot",`slid.${y.layoutId};enterMs.${z};exitMs.${r};vid.${k.video_id}`),null;O=e.Lj(k,d,2,Z,z,r,l.slotId,w);Fs(t,"ads_atct",`slid.${y.layoutId};enterMs.${z};exitMs.${r};vid.${k.video_id};pid.${O};cid.${w}`);
if(!O)return EP("Unexpected failure to add to playback timeline",l,y,Q()),null;l=l.slotId;y=y.layoutId;O?(A.Z.has(O)&&EP("Unexpected remap of timeline playback"),A.Z.set(O,{slotId:l,layoutId:y})):EP("Invalid timeline playback ID");z+Z>r&&e.By(O,r-z);return O};
zLe=function(l,y,k){const z=y.clientMetadata.aR("metadata_type_sodar_extension_data");if(z)try{VoP(k,z)}catch(r){EP("Unexpected error when loading Sodar",l,y,{error:r})}};
rKq=function(l,y,k,z,r,Z,e){oi(l,y,new g.WK(k,new g.U5),z,r,e,!1,Z)};
oi=function(l,y,k,z,r,Z,e=!0,A){Q_(k)&&t7(r,0,null)&&(!D_(l,"impression")&&A&&A(),l.Fv("impression"));D_(l,"impression")&&(k.tj(4)&&!k.tj(2)&&l.Wh("pause"),fe(k,4)<0&&!(fe(k,2)<0)&&l.Wh("resume"),k.tj(16)&&r>=.5&&l.Wh("seek"),e&&k.tj(2)&&NH(l,k.state,y,z,r,Z))};
NH=function(l,y,k,z,r,Z,e,A,Q){D_(l,"impression")&&(Z?(Z=r-z,Z=Z>=-1&&Z<=2):Z=Math.abs(z-r)<=1,s5(l,y,Z?z:r,k,z,e,A&&Z),Z&&!Q&&l.Fv("complete"))};
s5=function(l,y,k,z,r,Z,e){R0(l,k*1E3,e);r<=0||k<=0||y?.Z(16)||y?.Z(32)||(t7(k,r*.25,z)&&(Z&&!D_(l,"first_quartile")&&Z("first"),l.Fv("first_quartile")),t7(k,r*.5,z)&&(Z&&!D_(l,"midpoint")&&Z("second"),l.Fv("midpoint")),t7(k,r*.75,z)&&(Z&&!D_(l,"third_quartile")&&Z("third"),l.Fv("third_quartile")))};
Zl5=function(l,y){D_(l,"impression")&&l.Wh(y?"fullscreen":"end_fullscreen")};
eLy=function(l){D_(l,"impression")&&l.Wh("clickthrough")};
AKq=function(l){l.Wh("active_view_measurable")};
$K4=function(l){D_(l,"impression")&&!D_(l,"seek")&&l.Wh("active_view_fully_viewable_audible_half_duration")};
Q3g=function(l){D_(l,"impression")&&!D_(l,"seek")&&l.Wh("active_view_viewable")};
tug=function(l){D_(l,"impression")&&!D_(l,"seek")&&l.Wh("audio_audible")};
Ol_=function(l){D_(l,"impression")&&!D_(l,"seek")&&l.Wh("audio_measurable")};
dK5=function(l,y){Fs(l.Se.get(),"ads_imp",`cpn.${l.layout.clientMetadata.aR("metadata_type_content_cpn")};acpn.${O1(l.wb.get(),2)?.clientPlaybackNonce};clr.${y};skp.${!!g.E(l.layout.clientMetadata.aR("metadata_type_instream_ad_player_overlay_renderer")?.skipOrPreviewRenderer,LM)}`)};
wqQ=function(l,y,k){Fs(l.Se.get(),"ads_qua",`cpn.${l.layout.clientMetadata.aR("metadata_type_content_cpn")};acpn.${O1(l.wb.get(),2)?.clientPlaybackNonce};qt.${y};clr.${k}`)};
vK=function(l){return{enterMs:l.clientMetadata.aR("metadata_type_layout_enter_ms"),exitMs:l.clientMetadata.aR("metadata_type_layout_exit_ms")}};
hLe=function(l,y){Fs(l.Se.get(),"ads_imp",`acpn.${O1(l.wb.get(),2)?.clientPlaybackNonce};clr.${y}`)};
Gp5=function(l,y,k){Fs(l.Se.get(),"ads_qua",`cpn.${l.layout.clientMetadata.aR("metadata_type_content_cpn")};acpn.${O1(l.wb.get(),2)?.clientPlaybackNonce};qt.${y};clr.${k}`)};
BK=function(l){return`${Math.round(l.width)}x${Math.round(l.height)}`};
Ri=function(l,y,k=HK){k.width<HK.width&&(k=HK);if(l.width<k.width||l.height<k.height)return{QL:3,jl:501,errorMessage:`ad(${BK(k)}) larger than container(${BK(l)}).`};if(k.width*k.height>l.width*l.height*.2)return{QL:3,jl:501,errorMessage:`ad(${BK(k)}) to container(${BK(l)}) ratio exceeds limit.`};if(k.height>l.height/3-y)return{QL:3,jl:501,errorMessage:`ad(${BK(k)}) covers container(${BK(l)}) center.`}};
aCz=function(l,y){const k=l.clientMetadata.aR("metadata_type_ad_placement_config");return new DT(l.NW,y,k,l.layoutId)};
l$=function(l){return l.clientMetadata.aR("metadata_type_invideo_overlay_ad_renderer")};
il5=function(){const l=["metadata_type_invideo_overlay_ad_renderer"];Lc().forEach(y=>{l.push(y)});
return{qx:l,MK:["LAYOUT_TYPE_IN_VIDEO_TEXT_OVERLAY","LAYOUT_TYPE_IN_VIDEO_ENHANCED_TEXT_OVERLAY"]}};
UKQ=function(){const l=["metadata_type_invideo_overlay_ad_renderer"];for(const y of Lc())l.push(y);return{qx:l,MK:["LAYOUT_TYPE_IN_VIDEO_IMAGE_OVERLAY"]}};
MuC=function(l=null){return l!=null&&(l=l.thumbnail,l!=null&&l.thumbnails!=null&&l.thumbnails.length!=0&&l.thumbnails[0].width!=null&&l.thumbnails[0].height!=null)?new g.Fn(l.thumbnails[0].width||0,l.thumbnails[0].height||0):new g.Fn(0,0)};
Xq4=function(){const l=Cdz();l.qx.push("metadata_type_ad_info_ad_metadata");return l};
cK_=function(l){switch(l){case "LAYOUT_EXIT_REASON_UNSPECIFIED":return"unknown";case "LAYOUT_EXIT_REASON_NORMAL":return"normal";case "LAYOUT_EXIT_REASON_ERROR":return"error";case "LAYOUT_EXIT_REASON_USER_SKIPPED":return"skipped";case "LAYOUT_EXIT_REASON_USER_MUTED":return"muted";case "LAYOUT_EXIT_REASON_ABANDONED":return"abandoned";case "LAYOUT_EXIT_REASON_USER_INPUT_SUBMITTED":return"user_input_submitted";case "LAYOUT_EXIT_REASON_USER_CANCELLED":return"user_cancelled";default:return new F(`Invalid layout exit reason: ${l}`)}};
yh=function(l){return l?.layoutId!=null&&l?.layoutType!=null};
COz=function(l){if(!yh(l.adLayoutMetadata))return!1;l=l.renderingContent;return g.E(l,kt)||g.E(l,zh)||g.E(l,ri)||g.E(l,Zh)||g.E(l,ea)||g.E(l,AC)?!0:!1};
$t=function(l){return!!(l.uK&&l.slot&&l.layout)};
Qh=function(l){const y=l.config?.adPlacementConfig;l=l.renderer;return!(!y||y.kind==null||!l)};
u$q=function(l){if(!yh(l.adLayoutMetadata))return!1;l=l.renderingContent;return g.E(l,eT)||g.E(l,A7)||g.E(l,ble)||g.E(l,rd)||g.E(l,Z4)?!0:!1};
tC=function(l){return l.playerVars!==void 0&&l.pings!==void 0&&l.externalVideoId!==void 0};
a5=function(l){if(!yh(l.adLayoutMetadata))return!1;l=l.renderingContent;var y=g.E(l,O7);return y?di(y):(y=g.E(l,PK))?tC(y):(y=g.E(l,wi))?y.playerVars!==void 0:(y=g.E(l,eT))?y.durationMilliseconds!==void 0:g.E(l,hC)||g.E(l,Gh)?!0:!1};
di=function(l){l=(l.sequentialLayouts||[]).map(y=>g.E(y,i$));
return l.length>0&&l.every(a5)};
Me=function(l){return yh(l.adLayoutMetadata)?(l=g.E(l.renderingContent,U7))&&l.pings?!0:!1:!1};
ICy=function(l){if(!yh(l.adLayoutMetadata))return!1;if(g.E(l.renderingContent,xKg)||g.E(l.renderingContent,Xd))return!0;const y=g.E(l.renderingContent,c3);return g.E(l.renderingContent,C0)||g.E(y?.sidePanel,mK_)||g.E(y?.sidePanel,qJ4)||g.E(y?.sidePanel,WKT)?!0:!1};
pqC=function(l){var y;(y=!l)||(y=l.adSlotMetadata,y=!(y?.slotId!==void 0&&y?.slotType!==void 0));if(y||!(TJ5(l)||l.slotEntryTrigger&&l.slotFulfillmentTriggers&&l.slotExpirationTriggers))return!1;l=l.fulfillmentContent?.fulfilledLayout;return(y=g.E(l,i$))?a5(y):(y=g.E(l,b$))?ICy(y):(y=g.E(l,Vu5))?u$q(y):(y=g.E(l,POC))?COz(y):(y=g.E(l,JKz))?yh(y.adLayoutMetadata)?g.E(y.renderingContent,kt)?!0:!1:!1:(y=g.E(l,u$))?Me(y):(l=g.E(l,YJ5))?yh(l.adLayoutMetadata)?g.E(l.renderingContent,Xd)?!0:!1:!1:!1};
TJ5=function(l){return(l=g.E(l.fulfillmentContent?.fulfilledLayout,b$))&&l.adLayoutMetadata?.layoutType==="LAYOUT_TYPE_PANEL_QR_CODE"&&l.layoutExitNormalTriggers===void 0};
KKC=function(l){for(const y of l||[]){l=g.E(y,xt);if(l===void 0||!pqC(l))break;if((l=g.E(l.fulfillmentContent?.fulfilledLayout,u$))&&Me(l))return!0}return!1};
EuC=function(l,y=!1){if(!l.questions?.length||!l.playbackCommands||!y&&l.questions.length!==1)return!1;for(const k of l.questions)if(!guC(g.E(k,m6)?.surveyAdQuestionCommon||g.E(k,qe)?.surveyAdQuestionCommon))return!1;return!0};
fCT=function(l){({instreamSurveyAdRenderer:l}=l?.playerOverlay||{});return l?l.playbackCommands&&l.questions&&l.questions.length===1?guC(g.E(l.questions[0],m6)?.surveyAdQuestionCommon||g.E(l.questions[0],qe)?.surveyAdQuestionCommon):!1:!1};
guC=function(l){if(!l)return!1;l=g.E(l.instreamAdPlayerOverlay,W3);const y=g.E(l?.skipOrPreviewRenderer,LM),k=g.E(l?.adInfoRenderer,I5);return(g.E(l?.skipOrPreviewRenderer,Th)||y)&&k?!0:!1};
j3q=function(l){return l.linearAds!=null&&yh(l.adLayoutMetadata)};
SJe=function(l){return l.linearAd!=null&&l.adVideoStart!=null};
ou4=function(l,y,k){const z=(k.adSlots??[]).map(e=>g.E(e,xt));
if(k.En)if(y.clientMetadata.aR("metadata_type_allow_pause_ad_break_request_slot_reschedule"))WJ(l.Z.get(),"OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",()=>[],y.slotId);
else{if(l.p_.get().L.O().X("h5_check_forecasting_renderer_for_throttled_midroll")){var r=k.ow.filter(e=>e.renderer?.clientForecastingAdRenderer!=null);
r.length!==0?nug(l.N,r,z,y.slotId,k.ssdaiAdsConfig):WJ(l.Z.get(),"OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",()=>[],y.slotId)}else WJ(l.Z.get(),"OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",()=>[],y.slotId);
FKC(l.V,y)}else{r={Hb:Math.round(y.clientMetadata.aR("metadata_type_ad_break_request_data")?.Hb||0),rF:y.clientMetadata.aR("metadata_type_ad_break_request_data")?.rF};var Z=y.clientMetadata.aR("metadata_type_cue_point");nug(l.N,k.ow,z,y.slotId,k.ssdaiAdsConfig,r,Z)}};
NJ5=function(l,y){for(const k of y){if(k.slotType==="SLOT_TYPE_PLAYER_BYTES"&&k.fulfilledLayout)if(y=void 0,k.fulfilledLayout.renderingContent)y=k.fulfilledLayout.clientMetadata.aR("metadata_type_player_vars");else{if(k.fulfilledLayout.mE)for(const z of k.fulfilledLayout.mE)if(z.renderingContent&&(y=z.clientMetadata.aR("metadata_type_player_vars")))break}else y=void 0;if(y){l.mw.get().L.preloadVideoByPlayerVars(y,2,300);break}}};
LKs=function(l,y,k,z,r,Z,e,A){const Q=O1(l.wb.get(),1);if(s3C(l.p_.get())){const t=Vh(l.C.get(),k,z,r,Q.clientPlaybackNonce,Q.XK,Q.daiEnabled,Q,Z,e);NJ5(l,t);WJ(l.Z.get(),"OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",()=>t,y)}else WJ(l.Z.get(),"OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",()=>Vh(l.C.get(),k,z,r,Q.clientPlaybackNonce,Q.XK,Q.daiEnabled,Q,Z,e,A),y)};
BJC=function(l,y,k,z,r,Z,e){y=vu_(y,Z,Number(z.prefetchMilliseconds)||0,e);l=y instanceof F?y:P3(l,z,r,y,k);return l instanceof F?l:[l]};
lYy=function(l,y,k,z,r){const Z=I0(l.C.get(),"SLOT_TYPE_AD_BREAK_REQUEST");z=[new HlC({getAdBreakUrl:z.getAdBreakUrl,Hb:0,rF:0}),new RLC];l=y.pauseDurationMs?y.lactThresholdMs?{slotId:Z,slotType:"SLOT_TYPE_AD_BREAK_REQUEST",slotPhysicalPosition:2,slotEntryTrigger:new JC(l.Z,Z),slotFulfillmentTriggers:[new DKz(l.Z)],slotExpirationTriggers:[new Yt(l.Z,r),new p0(l.Z,Z)],f_:"core",clientMetadata:new nq(z),adSlotLoggingData:k}:new F("AdPlacementConfig for Pause Ads is missing lact_threshold_ms"):new F("AdPlacementConfig for Pause Ads is missing pause_duration_ms");
return l instanceof F?l:[l]};
rY=function(l,y,k){if(l.beforeContentVideoIdStartedTrigger)l=l.beforeContentVideoIdStartedTrigger?new K0(gi,y,l.id):new F("Not able to create BeforeContentVideoIdStartedTrigger");else if(l.layoutIdExitedTrigger)l=l.layoutIdExitedTrigger?.triggeringLayoutId?new E7(gi,l.layoutIdExitedTrigger.triggeringLayoutId,l.id):new F("Not able to create LayoutIdExitedTrigger");else if(l.layoutExitedForReasonTrigger)l.layoutExitedForReasonTrigger?.triggeringLayoutId&&l.layoutExitedForReasonTrigger?.layoutExitReason?
(y=cK_(l.layoutExitedForReasonTrigger.layoutExitReason),l=y instanceof F?y:new f0(gi,l.layoutExitedForReasonTrigger.triggeringLayoutId,[y],l.id)):l=new F("Not able to create LayoutIdExitedForReasonTrigger");else if(l.onLayoutSelfExitRequestedTrigger)l=l.onLayoutSelfExitRequestedTrigger?.triggeringLayoutId?new Sa(gi,l.onLayoutSelfExitRequestedTrigger.triggeringLayoutId,l.id):new F("Not able to create OnLayoutSelfExitRequestedTrigger");else if(l.onNewPlaybackAfterContentVideoIdTrigger)l=l.onNewPlaybackAfterContentVideoIdTrigger?
new Yt(gi,y,l.id):new F("Not able to create OnNewPlaybackAfterContentVideoIdTrigger");else if(l.skipRequestedTrigger)l=l.skipRequestedTrigger?.triggeringLayoutId?new n0(gi,l.skipRequestedTrigger.triggeringLayoutId,l.id):new F("Not able to create SkipRequestedTrigger");else if(l.slotIdEnteredTrigger)l=l.slotIdEnteredTrigger?.triggeringSlotId?new Fd(gi,l.slotIdEnteredTrigger.triggeringSlotId,l.id):new F("Not able to create SlotIdEnteredTrigger");else if(l.slotIdExitedTrigger)l=l.slotIdExitedTrigger?.triggeringSlotId?
new p0(gi,l.slotIdExitedTrigger.triggeringSlotId,l.id):new F("Not able to create SkipRequestedTrigger");else if(l.surveySubmittedTrigger)l=l.surveySubmittedTrigger?.triggeringLayoutId?new o5(gi,l.surveySubmittedTrigger.triggeringLayoutId,l.id):new F("Not able to create SurveySubmittedTrigger");else if(l.mediaResumedTrigger)l=l.mediaResumedTrigger&&l.id?new yDC(l.id):new F("Not able to create MediaResumedTrigger");else if(l.closeRequestedTrigger)l=l.closeRequestedTrigger?.triggeringLayoutId?new Ne(gi,
l.closeRequestedTrigger.triggeringLayoutId,l.id):new F("Not able to create CloseRequestedTrigger");else if(l.slotIdScheduledTrigger)l=l.slotIdScheduledTrigger?.triggeringSlotId?new JC(gi,l.slotIdScheduledTrigger.triggeringSlotId,l.id):new F("Not able to create SlotIdScheduledTrigger");else if(l.mediaTimeRangeTrigger){var z=Number(l.mediaTimeRangeTrigger?.offsetStartMilliseconds),r=Number(l.mediaTimeRangeTrigger?.offsetEndMilliseconds);isFinite(z)&&isFinite(r)?(r===-1&&(r=k),k=z>r?new F("AD_PLACEMENT_KIND_MILLISECONDS endMs needs to be >= startMs.",
{offsetStartMs:z,offsetEndMs:r},"ADS_CLIENT_ERROR_MESSAGE_AD_PLACEMENT_END_SHOULD_GREATER_THAN_START",r===k&&z-500<=r):new xa(z,r),l=k instanceof F?k:new s7(gi,y,k,!1,l.id)):l=new F("Not able to create MediaTimeRangeTrigger")}else l=l.contentVideoIdEndedTrigger?l.contentVideoIdEndedTrigger?new L0(gi,y,!1,l.id):new F("Not able to create ContentVideoIdEndedTrigger"):l.layoutIdEnteredTrigger?l.layoutIdEnteredTrigger?.triggeringLayoutId?new v3(gi,l.layoutIdEnteredTrigger.triggeringLayoutId,l.id):new F("Not able to create LayoutIdEnteredTrigger"):
l.timeRelativeToLayoutEnterTrigger?l.timeRelativeToLayoutEnterTrigger?.triggeringLayoutId?new B3(gi,Number(l.timeRelativeToLayoutEnterTrigger.durationMs),l.timeRelativeToLayoutEnterTrigger.triggeringLayoutId,l.id):new F("Not able to create TimeRelativeToLayoutEnterTrigger"):l.onDifferentLayoutIdEnteredTrigger?l.onDifferentLayoutIdEnteredTrigger?.triggeringLayoutId&&l.onDifferentLayoutIdEnteredTrigger.slotType&&l.onDifferentLayoutIdEnteredTrigger.layoutType?new H3(gi,l.onDifferentLayoutIdEnteredTrigger.triggeringLayoutId,
l.onDifferentLayoutIdEnteredTrigger.slotType,l.onDifferentLayoutIdEnteredTrigger.layoutType,l.id):new F("Not able to create CloseRequestedTrigger"):l.liveStreamBreakStartedTrigger?l.liveStreamBreakStartedTrigger&&l.id?new R5(gi,l.id):new F("Not able to create LiveStreamBreakStartedTrigger"):l.liveStreamBreakEndedTrigger?l.liveStreamBreakEndedTrigger&&l.id?new Dh(gi,l.id):new F("Not able to create LiveStreamBreakEndedTrigger"):l.liveStreamBreakScheduledDurationMatchedTrigger?l.liveStreamBreakScheduledDurationMatchedTrigger?.breakDurationMs?
new l5(Number(l.liveStreamBreakScheduledDurationMatchedTrigger.breakDurationMs||"0")||0,l.id):new F("Not able to create LiveStreamBreakScheduledDurationMatchedTrigger"):l.liveStreamBreakScheduledDurationNotMatchedTrigger?l.liveStreamBreakScheduledDurationNotMatchedTrigger?.breakDurationMs?new yF(Number(l.liveStreamBreakScheduledDurationNotMatchedTrigger.breakDurationMs||"0")||0,l.id):new F("Not able to create LiveStreamBreakScheduledDurationNotMatchedTrigger"):l.newSlotScheduledWithBreakDurationTrigger?
l.newSlotScheduledWithBreakDurationTrigger?.breakDurationMs?new ks(Number(l.newSlotScheduledWithBreakDurationTrigger.breakDurationMs||"0")||0,l.id):new F("Not able to create NewSlotScheduledWithBreakDurationTrigger"):l.prefetchCacheExpiredTrigger?new zV(gi,l.id):new F("Not able to convert an AdsControlflowTrigger.");return l};
ZG=function(l,y){y.Z>=2&&(l.slot_pos=y.adPodIndex);l.autoplay="1"};
rDe=function(l,y,k,z,r,Z,e,A){return y===null?new F("Invalid slot type when get discovery companion fromActionCompanionAdRenderer",{slotType:y,ActionCompanionAdRenderer:z}):[k6T(l,y,e,Z,Q=>{var t=Q.slotId;Q=A(Q);var O=z.adLayoutLoggingData;const d=new nq([new zg4(z),new e7(r)]);t=UH(k.C.get(),"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON",t);const w={layoutId:t,layoutType:"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON",f_:"core"};return{layoutId:t,layoutType:"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON",NW:new Map,
layoutExitNormalTriggers:[new Yt(k.Z,e)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],f_:"core",clientMetadata:d,KP:Q(w),adLayoutLoggingData:O}})]};
egg=function(l,y,k,z,r,Z,e,A){return y===null?new F("Invalid slot type when get discovery companion fromTopBannerImageTextIconButtonedLayoutViewModel",{slotType:y,TopBannerImageTextIconButtonedLayoutViewModel:z}):[k6T(l,y,e,Z,Q=>{var t=Q.slotId;Q=A(Q);var O=z.adLayoutLoggingData;const d=new nq([new ZLq(z),new e7(r)]);t=UH(k.C.get(),"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON",t);const w={layoutId:t,layoutType:"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON",f_:"core"};return{layoutId:t,layoutType:"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON",
NW:new Map,layoutExitNormalTriggers:[new Yt(k.Z,e)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],f_:"core",clientMetadata:d,KP:Q(w),adLayoutLoggingData:O}})]};
t_y=function(l,y,k,z,r,Z){if(!Z)for(const e of y)AS(l,e.renderer,e.config.adPlacementConfig.kind);l=Array.from(l.values()).filter(e=>ADC(e));
y=[];for(const e of l)for(const A of e.Y5)Z=Q=>A.Ah(Q,e.instreamVideoAdRenderer.elementId,A.DL),A.isContentVideoCompanion?y.push($Pq(k,z,r,e.instreamVideoAdRenderer.elementId,A.associatedCompositePlayerBytesLayoutId,A.adSlotLoggingData,Z)):l.length>1?y.push(Qfg(k,z,r,e.instreamVideoAdRenderer.elementId,A.adSlotLoggingData,Q=>A.Ah(Q,e.instreamVideoAdRenderer.elementId,A.DL,A.associatedCompositePlayerBytesLayoutId))):y.push(Qfg(k,z,r,e.instreamVideoAdRenderer.elementId,A.adSlotLoggingData,Z));
return y};
AS=function(l,y,k){if(y=OLC(y))for(const z of y)z&&z.externalVideoId?(y=$s(l,z.externalVideoId),y.instreamVideoAdRenderer||(y.instreamVideoAdRenderer=z,y.bb=k)):EP("InstreamVideoAdRenderer without externalVideoId")};
OLC=function(l){const y=[],k=l.sandwichedLinearAdRenderer&&l.sandwichedLinearAdRenderer.linearAd&&g.E(l.sandwichedLinearAdRenderer.linearAd,PK);if(k)return y.push(k),y;if(l.instreamVideoAdRenderer)return y.push(l.instreamVideoAdRenderer),y;if(l.linearAdSequenceRenderer&&l.linearAdSequenceRenderer.linearAds){for(const z of l.linearAdSequenceRenderer.linearAds)g.E(z,PK)&&y.push(g.E(z,PK));return y}return null};
ADC=function(l){if(l.instreamVideoAdRenderer===void 0)return EP("AdPlacementSupportedRenderers without matching InstreamVideoAdRenderer"),!1;for(const y of l.Y5){if(y.Ah===void 0)return!1;if(y.DL===void 0)return EP("AdPlacementConfig for AdPlacementSupportedRenderers that matches an InstreamVideoAdRenderer is undefined"),!1;if(l.bb===void 0||y.j$===void 0||l.bb!==y.j$&&y.j$!=="AD_PLACEMENT_KIND_SELF_START")return!1;if(l.instreamVideoAdRenderer.elementId===void 0)return EP("InstreamVideoAdRenderer has no elementId",
void 0,void 0,{kind:l.bb,"matching APSR kind":y.j$}),!1}return!0};
$s=function(l,y){l.has(y)||l.set(y,{instreamVideoAdRenderer:void 0,bb:void 0,adVideoId:y,Y5:[]});return l.get(y)};
QF=function(l,y,k,z,r,Z,e,A,Q){r?$s(l,r).Y5.push({jUe:y,j$:k,isContentVideoCompanion:z,DL:e,associatedCompositePlayerBytesLayoutId:Z,adSlotLoggingData:A,Ah:Q}):EP("Companion AdPlacementSupportedRenderer without adVideoId")};
tS=function(l){let y=0;for(const k of l.questions)(l=g.E(k,m6)||g.E(k,qe))&&(y+=l.surveyAdQuestionCommon?.durationMilliseconds||0);return y};
ON=function(l){var y=g.E(l.questions?.[0],m6)?.surveyAdQuestionCommon||g.E(l.questions?.[0],qe)?.surveyAdQuestionCommon;y=[...(l.playbackCommands?.instreamAdCompleteCommands||[]),...(y?.timeoutCommands||[])];return{impressionCommands:l.playbackCommands?.impressionCommands,errorCommands:l.playbackCommands?.errorCommands,muteCommands:l.playbackCommands?.muteCommands,unmuteCommands:l.playbackCommands?.unmuteCommands,pauseCommands:l.playbackCommands?.pauseCommands,rewindCommands:l.playbackCommands?.rewindCommands,
resumeCommands:l.playbackCommands?.resumeCommands,skipCommands:l.playbackCommands?.skipCommands,progressCommands:l.playbackCommands?.progressCommands,Y1e:l.playbackCommands?.clickthroughCommands,fullscreenCommands:l.playbackCommands?.fullscreenCommands,activeViewViewableCommands:l.playbackCommands?.activeViewViewableCommands,activeViewMeasurableCommands:l.playbackCommands?.activeViewMeasurableCommands,activeViewFullyViewableAudibleHalfDurationCommands:l.playbackCommands?.activeViewFullyViewableAudibleHalfDurationCommands,
activeViewAudioAudibleCommands:l.playbackCommands?.activeViewTracking?.activeViewAudioAudibleCommands,activeViewAudioMeasurableCommands:l.playbackCommands?.activeViewTracking?.activeViewAudioMeasurableCommands,endFullscreenCommands:l.playbackCommands?.endFullscreenCommands,abandonCommands:l.playbackCommands?.abandonCommands,completeCommands:y}};
hgP=function(l,y,k,z,r,Z,e){return(A,Q)=>dPQ(l,Q.slotId,A,Z,(t,O)=>{var d=Q.layoutId;t=e(t);return dY(y,d,O,r,t,"LAYOUT_TYPE_SURVEY",[new wDt(k),z],k.adLayoutLoggingData)})};
UPe=function(l,y,k,z,r,Z,e){if(!G64(l))return new F("Invalid InstreamVideoAdRenderer for SlidingText.",{instreamVideoAdRenderer:l});const A=l.additionalPlayerOverlay.slidingTextPlayerOverlayRenderer;return[aYQ(Z,y,k,z,Q=>{var t=Q.slotId;Q=e(Q);t=UH(r.C.get(),"LAYOUT_TYPE_SLIDING_TEXT_PLAYER_OVERLAY",t);const O={layoutId:t,layoutType:"LAYOUT_TYPE_SLIDING_TEXT_PLAYER_OVERLAY",f_:"core"},d=new E7(r.Z,z);return{layoutId:t,layoutType:"LAYOUT_TYPE_SLIDING_TEXT_PLAYER_OVERLAY",NW:new Map,layoutExitNormalTriggers:[d],
layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],f_:"core",clientMetadata:new nq([new iLQ(A)]),KP:Q(O)}})]};
G64=function(l){l=g.E(l?.additionalPlayerOverlay,M_T);if(!l)return!1;const y=l.slidingMessages;return l.title&&y&&y.length!==0?!0:!1};
bLP=function(l,y,k,z,r){if(!l.playerOverlay?.instreamSurveyAdRenderer)return()=>[];
if(!fCT(l))return()=>new F("Received invalid InstreamVideoAdRenderer for DAI survey.",{instreamVideoAdRenderer:l});
const Z=l.playerOverlay.instreamSurveyAdRenderer,e=tS(Z);return e<=0?()=>new F("InstreamSurveyAdRenderer should have valid duration.",{instreamSurveyAdRenderer:Z}):(A,Q)=>{const t=XDt(A,k,z,O=>{var d=O.slotId;
O=Q(O);var w=ON(Z);d=UH(r.C.get(),"LAYOUT_TYPE_SURVEY",d);const h={layoutId:d,layoutType:"LAYOUT_TYPE_SURVEY",f_:"core"},U=new E7(r.Z,z),u=new n0(r.Z,d),W=new o5(r.Z,d),V=new cDT(r.Z);return{layoutId:d,layoutType:"LAYOUT_TYPE_SURVEY",NW:new Map,layoutExitNormalTriggers:[U,V],layoutExitSkipTriggers:[u],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[W],layoutExitUserCancelledTriggers:[],f_:"core",clientMetadata:new nq([new CsC(Z),new e7(y),new wY(e/1E3),new hS(w)]),KP:O(h),adLayoutLoggingData:Z.adLayoutLoggingData}});
A=UPe(l,k,t.slotId,z,r,A,Q);return A instanceof F?A:[t,...A]}};
T8y=function(l,y,k,z,r,Z,e){const A=[];try{let Q,t=[];if(k.renderer.linearAdSequenceRenderer)Q=d=>{d=up4(d.slotId,k,y,r(d),z,Z);t=d.IM;return d.lD};
else if(k.renderer.instreamVideoAdRenderer)Q=d=>{var w=d.slotId;d=r(d);const h=k.config.adPlacementConfig,{VX:U,HS:u}=xP4(h);var W=k.renderer.instreamVideoAdRenderer;if(W?.playerOverlay?.instreamSurveyAdRenderer)throw new TypeError("Survey overlay should not be set on single video.");var V=GV(W);const T=Math.min(U+V.videoLengthSeconds*1E3,u),J=new aD(0,[V.videoLengthSeconds]);var K=V.videoLengthSeconds,Zg=V.playerVars,es=V.instreamAdPlayerOverlayRenderer,fC=V.playerOverlayLayoutRenderer,bQ=V.adVideoId,
js=mP4(k),Nt=V.NW;V=V.Dg;var Ig=W?.adLayoutLoggingData;W=W?.sodarExtensionData;w=UH(y.C.get(),"LAYOUT_TYPE_MEDIA",w);const Ss={layoutId:w,layoutType:"LAYOUT_TYPE_MEDIA",f_:"core"};return{layoutId:w,layoutType:"LAYOUT_TYPE_MEDIA",NW:Nt,layoutExitNormalTriggers:[new Dh(y.Z)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],f_:"core",clientMetadata:new nq([new i5(z),new UN(K),new M$(Zg),new X2(U),new cv(T),es&&new Cw(es),fC&&
new b5(fC),new e7(h),new u5(bQ),new xs(J),new mZ(js),W&&new q$(W),new Wv({current:null}),new ID,new TV(V)].filter(qwC)),KP:d(Ss),adLayoutLoggingData:Ig}};
else throw new TypeError("Expected valid AdPlacementRenderer for DAI");const O=Wb_(l,z,k.adSlotLoggingData,Q,e);A.push(O);for(const d of t){const w=d(l,r);if(w instanceof F)return w;A.push(...w)}}catch(Q){return new F(Q,{errorMessage:Q.message,AdPlacementRenderer:k,numberOfSurveyRenderers:IY5(k)})}return A};
IY5=function(l){({linearAds:l}=l.renderer.linearAdSequenceRenderer||{});return l?.length?l.filter(y=>g.E(y,PK)?.playerOverlay?.instreamSurveyAdRenderer!=null).length:0};
up4=function(l,y,k,z,r,Z){const e=y.config.adPlacementConfig,{VX:A,HS:Q}=xP4(e);var {linearAds:t}=y.renderer.linearAdSequenceRenderer||{};if(!t?.length)throw new TypeError("Expected linear ads");const O=[],d={Rq:A,dD:0,uM:O};t=t.map(h=>V_4(l,h,d,k,z,e,r,Q)).map((h,U)=>{U=new aD(U,O);
return h(U)});
const w=t.map(h=>h.jg);
return{lD:Ps_(k,l,A,w,e,mP4(y),z,Q,Z),IM:t.map(h=>h.aM)}};
V_4=function(l,y,k,z,r,Z,e,A){const Q=GV(g.E(y,PK)),t=k.Rq,O=k.dD,d=Math.min(t+Q.videoLengthSeconds*1E3,A);k.Rq=d;k.dD++;k.uM.push(Q.videoLengthSeconds);const w=g.E(y,PK)?.playerOverlay?.instreamSurveyAdRenderer;if(Q.adVideoId==="nPpU29QrbiU"&&w==null)throw new TypeError("Survey slate media has no survey overlay");return h=>{ZG(Q.playerVars,h);var U=Q.videoLengthSeconds,u=Q.playerVars,W=Q.NW,V=Q.Dg,T=Q.instreamAdPlayerOverlayRenderer,J=Q.playerOverlayLayoutRenderer,K=Q.adVideoId,Zg=g.E(y,PK)?.adLayoutLoggingData,
es=g.E(y,PK)?.sodarExtensionData;const fC=UH(z.C.get(),"LAYOUT_TYPE_MEDIA",l),bQ={layoutId:fC,layoutType:"LAYOUT_TYPE_MEDIA",f_:"adapter"};h={layoutId:fC,layoutType:"LAYOUT_TYPE_MEDIA",NW:W,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],f_:"adapter",clientMetadata:new nq([new i5(e),new UN(U),new M$(u),new X2(t),new cv(d),new VF(O),new Wv({current:null}),T&&new Cw(T),J&&new b5(J),new e7(Z),new u5(K),
new xs(h),es&&new q$(es),w&&new JDs(w),new ID,new TV(V)].filter(qwC)),KP:r(bQ),adLayoutLoggingData:Zg};U=bLP(g.E(y,PK),Z,e,h.layoutId,z);return{jg:h,aM:U}}};
GV=function(l){if(!l)throw new TypeError("Expected instream video ad renderer");if(!l.playerVars)throw new TypeError("Expected player vars in url encoded string");const y=iO(l.playerVars);var k=Number(y.length_seconds);if(isNaN(k))throw new TypeError("Expected valid length seconds in player vars");var z=Number(l.trimmedMaxNonSkippableAdDurationMs);k=isNaN(z)?k:Math.min(k,z/1E3);({instreamAdPlayerOverlayRenderer:z=null}=l.playerOverlay||{});const {playerOverlayLayoutRenderer:r=null}=l.playerOverlay||
{};var Z=y.video_id;Z||(Z=(Z=l.externalVideoId)?Z:void 0);if(!Z)throw new TypeError("Expected valid video id in IVAR");return{playerVars:y,videoLengthSeconds:k,instreamAdPlayerOverlayRenderer:z,playerOverlayLayoutRenderer:r,adVideoId:Z,NW:l.pings?sH(l.pings):new Map,Dg:N6(l.pings)}};
mP4=function(l){l=Number(l.driftRecoveryMs);return isNaN(l)||l<=0?null:l};
xP4=function(l){const {offsetStartMilliseconds:y,offsetEndMilliseconds:k}=l.adTimeOffset||{};l=Number(y);if(isNaN(l))throw new TypeError("Expected valid start offset");const z=Number(k);if(isNaN(z))throw new TypeError("Expected valid end offset");return{VX:l,HS:z}};
Ywt=function(l){const y=l.clientMetadata.aR("metadata_type_player_bytes_callback_ref")?.current;if(!y)return null;const k=l.clientMetadata.aR("metadata_type_ad_pod_skip_target_callback_ref");var z=l.layoutId,r=l.clientMetadata.aR("metadata_type_content_cpn"),Z=l.clientMetadata.aR("metadata_type_instream_ad_player_overlay_renderer"),e=l.clientMetadata.aR("metadata_type_player_underlay_renderer"),A=l.clientMetadata.aR("metadata_type_ad_placement_config"),Q=l.clientMetadata.aR("metadata_type_video_length_seconds");
var t=Ym(l.clientMetadata,"metadata_type_layout_enter_ms")&&Ym(l.clientMetadata,"metadata_type_layout_exit_ms")?(l.clientMetadata.aR("metadata_type_layout_exit_ms")-l.clientMetadata.aR("metadata_type_layout_enter_ms"))/1E3:void 0;return{Wj:z,contentCpn:r,UF:y,c_:k,instreamAdPlayerOverlayRenderer:Z,instreamAdPlayerUnderlayRenderer:e,adPlacementConfig:A,videoLengthSeconds:Q,UJ:t,inPlayerLayoutId:l.clientMetadata.aR("metadata_type_linked_in_player_layout_id"),inPlayerSlotId:l.clientMetadata.aR("metadata_type_linked_in_player_slot_id")}};
g95=function(l,y,k,z,r,Z,e,A,Q,t,O,d,w,h,U){z=I0(z,"SLOT_TYPE_PLAYER_BYTES");l=pDz(r,l,e,k,z,Q,t);if(l instanceof F)return l;t=l.clientMetadata.aR("metadata_type_fulfilled_layout")?.layoutId;if(!t)return new F("Invalid adNotify layout");y=KbT(t,r,Z,k,A,y,Q,O,d,w,h,U,e);return y instanceof F?y:[l,...y]};
KbT=function(l,y,k,z,r,Z,e,A,Q,t,O,d,w){k=E95(y,k,z,Z,e,A,Q,t,O,d,w);if(k instanceof F)return k;l=fYy(y,l,e,r,k);return l instanceof F?l:[...l.Si,l.jY]};
Swy=function(l,y,k,z,r,Z,e,A,Q,t,O,d,w,h){y=E95(l,y,k,r,Z,A,Q,t,O,d,w,h);if(y instanceof F)return y;l=jfT(l,k,Z,e,z,A.UA,y);return l instanceof F?l:l.Si.concat(l.jY)};
E95=function(l,y,k,z,r,Z,e,A,Q,t,O,d){const w=Pv(z);return w instanceof AL?new F(w):t.L.O().experiments.z7("html5_refactor_in_player_slot_generation")?h=>{var U=new aD(0,[w.k8]);h=n9T(y,w.layoutId,w.fK,k,JS(w.playerVars,w.WE,Z,Q,U),w.k8,r,U,e(h),A.get(w.fK.externalVideoId),d);U=[];if(w.fK.playerOverlay.instreamAdPlayerOverlayRenderer){const u=Ywt(h);if(!u)return EP("Expected MediaLayout to carry valid data to create InPlayerSlot and PlayerOverlayForMediaLayout",void 0,h),{layout:h,Si:[]};U=[Fb5(l,
u.contentCpn,u.Wj,W=>Ys(y,W.slotId,"core",u,S4(O,W)),u.inPlayerSlotId),
...U];if(u.instreamAdPlayerUnderlayRenderer&&pw(t)){const W=u.instreamAdPlayerUnderlayRenderer;U=[o9z(l,u.contentCpn,u.Wj,V=>N8e(y,V.slotId,W,u.adPlacementConfig,u.Wj,S4(O,V))),
...U]}}return{layout:h,Si:U}}:h=>{const U=new aD(0,[w.k8]);
return{layout:n9T(y,w.layoutId,w.fK,k,JS(w.playerVars,w.WE,Z,Q,U),w.k8,r,U,e(h),A.get(w.fK.externalVideoId),d),Si:[]}}};
Pv=function(l){if(!l.playerVars)return new AL("No playerVars available in InstreamVideoAdRenderer.");if(l.elementId==null||l.playerVars==null||l.playerOverlay==null||l.playerOverlay?.instreamAdPlayerOverlayRenderer==null&&l.playerOverlay?.playerOverlayLayoutRenderer==null||l.pings==null||l.externalVideoId==null)return new AL("Received invalid VOD InstreamVideoAdRenderer",{instreamVideoAdRenderer:l});const y=iO(l.playerVars);let k=Number(y.length_seconds);isNaN(k)&&(k=0,EP("Expected valid length seconds in player vars but got NaN"));
return{layoutId:l.elementId,fK:l,playerVars:y,WE:l.playerVars,k8:k}};
JS=function(l,y,k,z,r){l.iv_load_policy=z;y=iO(y);if(y.cta_conversion_urls)try{l.cta_conversion_urls=JSON.parse(y.cta_conversion_urls)}catch(Z){EP(Z)}k.N7&&(l.ctrl=k.N7);k.j5&&(l.ytr=k.j5);k.xJ&&(l.ytrcc=k.xJ);k.isMdxPlayback&&(l.mdx="1");l.vvt&&(l.vss_credentials_token=l.vvt,k.XT&&(l.vss_credentials_token_type=k.XT),k.mdxEnvironment&&(l.mdx_environment=k.mdxEnvironment));ZG(l,r);return l};
sf4=function(l){const y=new Map;for(const k of l)(l=k.renderer.remoteSlotsRenderer)&&l.hostElementId&&y.set(l.hostElementId,l);return y};
Kw=function(l){return l.adSlotMetadata.slotType==="SLOT_TYPE_PLAYER_BYTES"};
LbT=function(l){return l!=null};
zjg=function(l,y,k,z,r,Z,e,A,Q,t,O,d,w,h,U){const u=[];for(const K of l){if(TJ5(K))continue;if(K?.adSlotMetadata?.slotType==="SLOT_TYPE_IN_PLAYER")continue;var W=v94(K,z,k.XK);if(W instanceof F)return W;var V={slotId:K.adSlotMetadata.slotId,slotType:K.adSlotMetadata.slotType,slotPhysicalPosition:K.adSlotMetadata.slotPhysicalPosition??1,f_:"core",slotEntryTrigger:W.slotEntryTrigger,slotFulfillmentTriggers:W.slotFulfillmentTriggers,slotExpirationTriggers:W.slotExpirationTriggers},T=g.E(K.fulfillmentContent.fulfilledLayout,
i$);if(T){if(!a5(T))return new F("Invalid PlayerBytesAdLayoutRenderer");var J=d&&!(Kw(K)&&K.slotEntryTrigger.beforeContentVideoIdStartedTrigger);W=W.slotFulfillmentTriggers.some(Zg=>Zg instanceof l5);
T=J?B8t(V,K.adSlotMetadata.triggerEvent,T,k,z,Z,l,w,W,Q,h):HLT(V,K.adSlotMetadata.triggerEvent,T,y,k,z,r,Z,e,A,Q,t,l,O,K.adSlotMetadata.triggeringSourceLayoutId);if(T instanceof F)return T;W=[];U?W.push(new gY({current:U})):W.push(new gY({current:null}));Kw(K)&&W.push(new EN({tp:Kw(K)&&!!K.slotEntryTrigger.beforeContentVideoIdStartedTrigger}));J&&W.push(new ID);k.UA&&W.push(new Rgs({}));V={...V,clientMetadata:new nq(W),fulfilledLayout:T.layout,adSlotLoggingData:K.adSlotMetadata.adSlotLoggingData};
u.push(...T.Si);u.push(V);continue}if(J=g.E(K.fulfillmentContent.fulfilledLayout,b$)){if(!ICy(J))return new F("Invalid PlayerUnderlayAdLayoutRenderer");J=DPg(J,z,k.XK,Z,V,K.adSlotMetadata.triggerEvent,K.adSlotMetadata.triggeringSourceLayoutId);if(J instanceof F)return J;V={...V,clientMetadata:new nq([]),fulfilledLayout:J,adSlotLoggingData:K.adSlotMetadata.adSlotLoggingData};u.push(V);continue}if(J=g.E(K.fulfillmentContent.fulfilledLayout,YJ5)){if(!yh(J.adLayoutMetadata)||!g.E(J.renderingContent,Xd))return new F("Invalid InPlayerOrganicOverlayAdLayoutRenderer");
J=J.adLayoutMetadata.layoutType==="LAYOUT_TYPE_PLAYER_ORGANIC_BANNER_OVERLAY"?lAC(J,z,k.XK,Z,V):new F(`LayoutType [${J.adLayoutMetadata.layoutType}] is invalid for InPlayerOrganicOverlaySlot`);if(J instanceof F)return J;V={...V,clientMetadata:new nq([]),fulfilledLayout:J,adSlotLoggingData:K.adSlotMetadata.adSlotLoggingData};u.push(V);continue}if(J=g.E(K.fulfillmentContent.fulfilledLayout,POC)){if(!COz(J))return new F("Invalid AboveFeedAdLayoutRenderer");J=yyQ(J,z,k.XK,Z,V,K.adSlotMetadata.triggerEvent,
K.adSlotMetadata.triggeringSourceLayoutId);if(J instanceof F)return J;V={...V,clientMetadata:new nq([]),fulfilledLayout:J,adSlotLoggingData:K.adSlotMetadata.adSlotLoggingData};u.push(V);continue}if(J=g.E(K.fulfillmentContent.fulfilledLayout,JKz)){if(!yh(J.adLayoutMetadata)||!g.E(J.renderingContent,kt))return new F("Invalid BelowPlayerAdLayoutRenderer");J=yyQ(J,z,k.XK,Z,V,K.adSlotMetadata.triggerEvent,K.adSlotMetadata.triggeringSourceLayoutId);if(J instanceof F)return J;V={...V,clientMetadata:new nq([]),
fulfilledLayout:J,adSlotLoggingData:K.adSlotMetadata.adSlotLoggingData};u.push(V);continue}if(J=g.E(K.fulfillmentContent.fulfilledLayout,u$)){if(!Me(J))return new F("Invalid PlayerBytesSequenceItemAdLayoutRenderer");J=kT5(J,z,k.XK,Z,V,K.adSlotMetadata.triggerEvent);if(J instanceof F)return J;V={...V,clientMetadata:new nq([]),fulfilledLayout:J,adSlotLoggingData:K.adSlotMetadata.adSlotLoggingData};u.push(V)}else return new F(`Unable to retrieve a client slot [${V.slotType}] from a given AdSlotRenderer`)}return u};
kT5=function(l,y,k,z,r,Z){const e={layoutId:l.adLayoutMetadata.layoutId,layoutType:l.adLayoutMetadata.layoutType,f_:"core"};y=fw(l,y,k);return y instanceof F?y:(k=g.E(l.renderingContent,U7))&&k.pings?{...e,renderingContent:l.renderingContent,NW:sH(k.pings),...y,KP:S4(z,r)(e),clientMetadata:new nq([new e7(j7(Z)),new hS({progressCommands:k.progressCommands})]),adLayoutLoggingData:l.adLayoutMetadata.adLayoutLoggingData}:new F("VideoAdTracking is missing from PlayerBytesSequenceItemAdLayoutRenderer")};
yyQ=function(l,y,k,z,r,Z,e){const A={layoutId:l.adLayoutMetadata.layoutId,layoutType:l.adLayoutMetadata.layoutType,f_:"core"};y=fw(l,y,k);if(y instanceof F)return y;k=[];k.push(new e7(j7(Z)));Z==="SLOT_TRIGGER_EVENT_LAYOUT_ID_ENTERED"&&e!==void 0&&k.push(new S7(e));return{...A,renderingContent:l.renderingContent,NW:new Map([["impression",g.E(l.renderingContent,ri)?g.E(l.renderingContent,ri)?.impressionPings||[]:g.E(l.renderingContent,kt)?g.E(l.renderingContent,kt)?.impressionPings||[]:g.E(l.renderingContent,
zh)?g.E(l.renderingContent,zh)?.impressionPings||[]:[]]]),...y,KP:S4(z,r)(A),clientMetadata:new nq(k),adLayoutLoggingData:l.adLayoutMetadata.adLayoutLoggingData}};
DPg=function(l,y,k,z,r,Z,e){if(l.adLayoutMetadata.layoutType==="LAYOUT_TYPE_DISMISSABLE_PANEL_TEXT_PORTRAIT_IMAGE")a:{var A=g.E(l.renderingContent,c3);const Q=g.E(l.renderingContent,Xd);e=new Map;if(A){e=g.E(A.sidePanel,qJ4);if(!e){l=new F("DismissablePanelTextPortraitImageRenderer is missing");break a}e=new Map([["impression",e.impressionPings||[]],["resume",e.resumePings||[]]])}else if(!Q){l=new F("AdsEngagementPanelSectionListViewModel is missing");break a}A={layoutId:l.adLayoutMetadata.layoutId,
layoutType:l.adLayoutMetadata.layoutType,f_:"core"};y=fw(l,y,k);l=y instanceof F?y:{...A,renderingContent:l.renderingContent,NW:e,...y,KP:S4(z,r)(A),clientMetadata:new nq([new e7(j7(Z))]),adLayoutLoggingData:l.adLayoutMetadata.adLayoutLoggingData}}else l.adLayoutMetadata.layoutType==="LAYOUT_TYPE_DISPLAY_TRACKING"?g.E(l.renderingContent,xKg)?(e={layoutId:l.adLayoutMetadata.layoutId,layoutType:l.adLayoutMetadata.layoutType,f_:"core"},y=fw(l,y,k),l=y instanceof F?y:{...e,renderingContent:l.renderingContent,
NW:new Map,...y,KP:S4(z,r)(e),clientMetadata:new nq([new e7(j7(Z))]),adLayoutLoggingData:l.adLayoutMetadata.adLayoutLoggingData}):l=new F("CounterfactualRenderer is missing"):l.adLayoutMetadata.layoutType==="LAYOUT_TYPE_PANEL_QR_CODE"?l=new F("PlayerUnderlaySlot cannot be created because adUxReadyApiProvider is null"):l.adLayoutMetadata.layoutType==="LAYOUT_TYPE_PANEL_QR_CODE_CAROUSEL"?l=new F("PlayerUnderlaySlot cannot be created because adUxReadyApiProvider is null"):l.adLayoutMetadata.layoutType===
"LAYOUT_TYPE_DISPLAY_UNDERLAY_TEXT_GRID_CARDS"?g.E(l.renderingContent,C0)?(Z={layoutId:l.adLayoutMetadata.layoutId,layoutType:l.adLayoutMetadata.layoutType,f_:"core"},y=fw(l,y,k),l=y instanceof F?y:e?{...Z,renderingContent:l.renderingContent,NW:new Map,...y,KP:S4(z,r)(Z),clientMetadata:new nq([new S7(e)]),adLayoutLoggingData:l.adLayoutMetadata.adLayoutLoggingData}:new F("Not able to parse an SDF PlayerUnderlay layout because the triggeringMediaLayoutId in AdSlotMetadata is missing")):l=new F("DisplayUnderlayTextGridCardsLayoutViewModel is missing"):
l.adLayoutMetadata.layoutType==="LAYOUT_TYPE_VIDEO_AD_INFO"?g.E(l.renderingContent,Xd)?(Z={layoutId:l.adLayoutMetadata.layoutId,layoutType:l.adLayoutMetadata.layoutType,f_:"core"},y=fw(l,y,k),l=y instanceof F?y:{...Z,renderingContent:l.renderingContent,NW:new Map([]),...y,KP:S4(z,r)(Z),adLayoutLoggingData:l.adLayoutMetadata.adLayoutLoggingData,clientMetadata:new nq([])}):l=new F("AdsEngagementPanelSectionListViewModel is missing"):(l.adLayoutMetadata.layoutType==="LAYOUT_TYPE_PANEL_IMAGE_QR_CODE"?
A=new F("PlayerUnderlaySlot cannot be created because adUxReadyApiProvider is null"):A=new F(`LayoutType [${l.adLayoutMetadata.layoutType}] is invalid for PlayerUnderlaySlot`),l=A);return l};
lAC=function(l,y,k,z,r){if(!g.E(l.renderingContent,Xd))return new F("AdsEngagementPanelSectionListViewModel is missing");const Z={layoutId:l.adLayoutMetadata.layoutId,layoutType:l.adLayoutMetadata.layoutType,f_:"core"};y=fw(l,y,k);return y instanceof F?y:{...Z,renderingContent:l.renderingContent,NW:new Map([]),...y,KP:S4(z,r)(Z),adLayoutLoggingData:l.adLayoutMetadata.adLayoutLoggingData,clientMetadata:new nq([])}};
B8t=function(l,y,k,z,r,Z,e,A,Q,t,O){if(O?.Hb===void 0||O?.rF===void 0)return new F("Cached ad break range from cue point is missing");var d=fw(k,r,z.XK);if(d instanceof F)return d;d={layoutExitMuteTriggers:[],layoutExitNormalTriggers:d.layoutExitNormalTriggers,layoutExitSkipTriggers:[],layoutExitUserCancelledTriggers:[],layoutExitUserInputSubmittedTriggers:[]};if(g.E(k.renderingContent,PK))return l=ryC(l,y,k,d,r,Z,e,z.XK,O.Hb,O.rF,t),l instanceof F?l:l.Xg===void 0?new F("Expecting associatedInPlayerSlot for single DAI media layout"):
{layout:l.layout,Si:[l.Xg]};var w=g.E(k.renderingContent,O7);if(w){if(!yh(k.adLayoutMetadata))return new F("Invalid ad layout metadata");if(!di(w))return new F("Invalid sequential layout");w=w.sequentialLayouts.map(h=>h.playerBytesAdLayoutRenderer);
l=Zmy(l,y,k,d,w,r,z,Z,e,A,O.Hb,O.rF,Q,t);return l instanceof F?l:{layout:l.nO,Si:l.Si}}return new F("Not able to convert a sequential layout")};
Zmy=function(l,y,k,z,r,Z,e,A,Q,t,O,d,w,h){var U=ejT(r,O,d);if(U instanceof F)return U;const u=[],W=[];for(const bQ of U){a:{var V=l,T=r[bQ.dD],J=bQ,K=y;U=Z;var Zg=e,es=A,fC=Q;const js=nw(T);if(js instanceof F){U=js;break a}const Nt={layoutId:T.adLayoutMetadata.layoutId,layoutType:T.adLayoutMetadata.layoutType,f_:"adapter"};J=Aye(K,T,J,U,void 0,h);if(J instanceof F){U=J;break a}V={...Nt,...F2,NW:js,renderingContent:T.renderingContent,clientMetadata:new nq(J),KP:S4(es,V)(Nt),adLayoutLoggingData:T.adLayoutMetadata.adLayoutLoggingData};
U=(U=oD(fC,V,U,Zg.XK,es,void 0,!0))?U instanceof F?U:{layout:V,Xg:U}:new F("Expecting associatedInPlayerSlot")}if(U instanceof F)return U;u.push(U.layout);W.push(U.Xg)}r={layoutId:k.adLayoutMetadata.layoutId,layoutType:k.adLayoutMetadata.layoutType,f_:"core"};y=[new mZ(Number(k.driftRecoveryMs)),new X2(O),new cv(d),new e7(j7(y)),new $lz(t),new ID];w&&y.push(new QaQ);return{nO:{...r,...z,mE:u,NW:new Map,clientMetadata:new nq(y),KP:S4(A,l)(r)},Si:W}};
ryC=function(l,y,k,z,r,Z,e,A,Q,t,O){if(!a5(k))return new F("Invalid PlayerBytesAdLayoutRenderer");const d=nw(k);if(d instanceof F)return d;const w={layoutId:k.adLayoutMetadata.layoutId,layoutType:k.adLayoutMetadata.layoutType,f_:"core"};var h=g.E(k.renderingContent,PK);if(!h)return new F("Invalid rendering content for DAI media layout");h=GV(h);Q={Eh:h,dD:0,Rq:Q,Rx:Math.min(Q+h.videoLengthSeconds*1E3,t),dw:new aD(0,[h.videoLengthSeconds])};y=Aye(y,k,Q,r,Number(k.driftRecoveryMs)??void 0,O);if(y instanceof
F)return y;l={...w,...z,NW:d,renderingContent:k.renderingContent,clientMetadata:new nq(y),KP:S4(Z,l)(w),adLayoutLoggingData:k.adLayoutMetadata.adLayoutLoggingData};return(r=oD(e,l,r,A,Z,void 0,!0))?r instanceof F?r:{layout:l,Xg:r}:new F("Expecting associatedInPlayerSlot")};
HLT=function(l,y,k,z,r,Z,e,A,Q,t,O,d,w,h,U){const u=fw(k,Z,r.XK);if(u instanceof F)return u;if(g.E(k.renderingContent,PK)){Q=tY5([k],r,Q);if(Q instanceof F)return Q;if(Q.length!==1)return new F("Only expected one media layout.");l=Om4(l,y,k,u,Q[0],void 0,"core",z,Z,e,A,t,w,h,r.XK,void 0,U);return l instanceof F?l:{layout:l.layout,Si:l.Xg?[l.Xg]:[]}}var W=g.E(k.renderingContent,O7);if(W){if(!yh(k.adLayoutMetadata))return new F("Invalid ad layout metadata");if(!di(W))return new F("Invalid sequential layout");
W=W.sequentialLayouts.map(V=>V.playerBytesAdLayoutRenderer);
l=dle(l,y,k.adLayoutMetadata,u,W,z,Z,r,Q,e,A,t,O,d,w,h,U);return l instanceof F?l:{layout:l.nO,Si:l.Si}}return new F("Not able to convert a sequential layout")};
dle=function(l,y,k,z,r,Z,e,A,Q,t,O,d,w,h,U,u,W){const V=new N$({current:null}),T=tY5(r,A,Q);if(T instanceof F)return T;Q=[];const J=[];var K=void 0;for(let js=0;js<r.length;js++){var Zg=r[js];if(g.E(Zg.renderingContent,PK)){K=sN(w)&&Lw(w)?T[js+1]:void 0;K=Om4(l,y,Zg,F2,T[js],K,"adapter",Z,e,t,O,d,U,u,A.XK,V,W);if(K instanceof F)return K;Q.push(K.layout);K.Xg&&J.push(K.Xg);K=T[js]}else if(g.E(Zg.renderingContent,wi)){a:{var es=l;var fC=O;if(!a5(Zg)){es=new F("Invalid PlayerBytesAdLayoutRenderer");
break a}var bQ=g.E(Zg.renderingContent,wi);if(!bQ||bQ.playerVars===void 0){es=new F("Invalid ad intro renderer");break a}const Nt={layoutId:Zg.adLayoutMetadata.layoutId,layoutType:Zg.adLayoutMetadata.layoutType,f_:"adapter"};bQ=iO(bQ.playerVars);bQ.autoplay="1";es={...Nt,...F2,renderingContent:Zg.renderingContent,clientMetadata:new nq([new ws5,new e7({kind:"AD_PLACEMENT_KIND_START"}),new Wv({current:null}),new M$(bQ)]),NW:new Map,KP:S4(fC,es)(Nt),adLayoutLoggingData:Zg.adLayoutMetadata.adLayoutLoggingData}}if(es instanceof
F)return es;Q.push(es)}else if(g.E(Zg.renderingContent,eT))if(u){es=hjC(l,Zg,O,j7(y),K);if(es instanceof F)return es;Q.push(es);es=oD(U,es,e,A.XK,O,V,!1);if(es instanceof F)return es;if(es)J.push(es);else return new F("Not able to retrieve InPlayer slot for endcap")}else{a:{for(const Nt of Z){es=Nt.renderer?.linearAdSequenceRenderer?.linearAds||[];for(const Ig of es)if((es=g.E(Ig,eT))&&es.inPlayerSlotId!==void 0&&es.inPlayerLayoutId!==void 0&&es.associatedPlayerBytesLayoutId!==void 0&&es.associatedPlayerBytesLayoutId===
Zg.adLayoutMetadata.layoutId){es={j4:es,adPlacementConfig:Nt.config.adPlacementConfig};break a}}es=new F("Not able to find associated InPlayer slot for endcap")}if(es instanceof F)return es;Zg=hjC(l,Zg,O,es.adPlacementConfig,K);if(Zg instanceof F)return Zg;Q.push(Zg);es=GTP(Zg.layoutId,h,e,es,V,O);if(es instanceof F)return es;J.push(es)}}y={layoutId:k.layoutId,layoutType:k.layoutType,f_:"core"};return{nO:{...y,...z,mE:Q,NW:new Map,clientMetadata:new nq([V]),KP:S4(O,l)(y)},Si:J}};
Om4=function(l,y,k,z,r,Z,e,A,Q,t,O,d,w,h,U,u,W){if(!a5(k))return new F("Invalid PlayerBytesAdLayoutRenderer");const V=nw(k);if(V instanceof F)return V;e={layoutId:k.adLayoutMetadata.layoutId,layoutType:k.adLayoutMetadata.layoutType,f_:e};a:{const Zg=k.adLayoutMetadata.layoutId,es=g.E(k.renderingContent,PK);if(es&&tC(es)){var T=[];if(h||es.isSeekableWithNoAdElements)T.push(new e7(j7(y)));else{b:{y=Zg;for(K of A){A=OLC(K.renderer)||[];for(var J of A)if(J.associatedPlayerBytesLayoutId===y){c:{if(!J.associatedPlayerBytesLayoutId){A=
!1;break c}A=J.playerOverlay;y=A!==void 0&&A.playerOverlayLayoutRenderer!==void 0&&A.playerOverlayLayoutRenderer.inPlayerSlotId!==void 0&&A.playerOverlayLayoutRenderer.inPlayerLayoutId!==void 0;A=A!==void 0&&A.instreamAdPlayerOverlayRenderer!==void 0&&A.instreamAdPlayerOverlayRenderer.inPlayerSlotId!==void 0&&A.instreamAdPlayerOverlayRenderer.inPlayerLayoutId!==void 0||y}var K=A?{instreamVideoAdRenderer:J,adPlacementConfig:K.config.adPlacementConfig}:new F("Invalid InPlayer shim");break b}}K=new F("Not able to find associated InPlayer slot")}if(K instanceof
F){Z=K;break a}J=K.instreamVideoAdRenderer.playerOverlay.instreamAdPlayerOverlayRenderer;A=K.instreamVideoAdRenderer.playerOverlay.playerOverlayLayoutRenderer;y=J?.inPlayerSlotId??A?.inPlayerSlotId;const fC=J?.inPlayerLayoutId??A?.inPlayerLayoutId;if(y===void 0){Z=new F("InPlayer shim slot id is undefined");break a}if(fC===void 0){Z=new F("InPlayer shim layout id is undefined");break a}T.push(new vv(fC),new aAT(y),new VF(r.dw.adPodIndex),new e7(K.adPlacementConfig));J&&T.push(new Cw(J));A&&T.push(new b5(A))}T.push(new xs(r.dw),
new u5(es.externalVideoId),new i5(Q),new hS({impressionCommands:es.impressionCommands,abandonCommands:es.onAbandonCommands,completeCommands:es.completeCommands,progressCommands:es.adVideoProgressCommands}),new M$(r.Sc),new Wv({current:null}),new UN(r.Uk.k8),new TV(N6(es.pings)),new Bv(r.dw.adPodIndex));W&&T.push(new S7(W));(r=imq(Zg,w))&&T.push(new UlC(r));Z&&T.push(new MY_(Z.Sc));es.adNextParams&&T.push(new Hv(es.adNextParams));es.clickthroughEndpoint&&T.push(new RD(es.clickthroughEndpoint));es.legacyInfoCardVastExtension&&
T.push(new Xst(es.legacyInfoCardVastExtension));es.sodarExtensionData&&T.push(new q$(es.sodarExtensionData));u&&es.adPodSkipTarget&&es.adPodSkipTarget>0&&(T.push(u),T.push(new DG(es.adPodSkipTarget)));(Z=t.get(es.externalVideoId))&&T.push(new l_(Z));Z=T}else Z=new F("Invalid vod media renderer")}if(Z instanceof F)return Z;l={...e,...z,NW:V,renderingContent:k.renderingContent,clientMetadata:new nq(Z),KP:S4(O,l)(e),adLayoutLoggingData:k.adLayoutMetadata.adLayoutLoggingData};k=g.E(k.renderingContent,
PK);if(!k||!tC(k))return new F("Invalid meida renderer");d=$s(d,k.externalVideoId);d.instreamVideoAdRenderer=k;d.bb="AD_PLACEMENT_KIND_START";return h?(Q=oD(w,l,Q,U,O,u,!1),Q instanceof F?Q:imq(l.layoutId,w)&&Q?{layout:{...l,clientMetadata:new nq(Z.concat(new cye(Q)))}}:{layout:l,Xg:Q}):{layout:l}};
hjC=function(l,y,k,z,r){if(!a5(y))return new F("Invalid PlayerBytesAdLayoutRenderer");const Z=g.E(y.renderingContent,eT);if(!Z||Z.durationMilliseconds===void 0)return new F("Invalid endcap renderer");const e={layoutId:y.adLayoutMetadata.layoutId,layoutType:y.adLayoutMetadata.layoutType,f_:"adapter"};z=[new yV(Z.durationMilliseconds),new hS({impressionCommands:void 0,abandonCommands:Z.abandonCommands?[{commandExecutorCommand:Z.abandonCommands}]:void 0,completeCommands:Z.completionCommands}),new e7(z),
new kL("LAYOUT_TYPE_ENDCAP")];r&&(z.push(new Bv(r.dw.adPodIndex-1)),z.push(new VF(r.dw.adPodIndex)),z.push(new DG(r.adPodSkipTarget??-1)));return{...e,...F2,renderingContent:y.renderingContent,clientMetadata:new nq(z),NW:Z.skipPings?new Map([["skip",Z.skipPings]]):new Map,KP:S4(k,l)(e),adLayoutLoggingData:y.adLayoutMetadata.adLayoutLoggingData}};
oD=function(l,y,k,z,r,Z,e){l=l.filter(d=>d.adSlotMetadata.slotType==="SLOT_TYPE_IN_PLAYER"&&d.adSlotMetadata.triggeringSourceLayoutId===y.layoutId);
if(l.length!==0){if(l.length!==1)return new F("Invalid InPlayer slot association for the given PlayerBytes layout");var A=l[0];l=v94(A,k,z);if(l instanceof F)return l;l={slotId:A.adSlotMetadata.slotId,slotType:A.adSlotMetadata.slotType,slotPhysicalPosition:A.adSlotMetadata.slotPhysicalPosition??1,f_:"core",slotEntryTrigger:l.slotEntryTrigger,slotFulfillmentTriggers:l.slotFulfillmentTriggers,slotExpirationTriggers:l.slotExpirationTriggers};var Q=g.E(A.fulfillmentContent.fulfilledLayout,Vu5);if(!Q||
!u$q(Q))return new F("Invalid InPlayerAdLayoutRenderer");var t={layoutId:Q.adLayoutMetadata.layoutId,layoutType:Q.adLayoutMetadata.layoutType,f_:"core"};k=fw(Q,k,z);if(k instanceof F)return k;z=[];var O=Q.adLayoutMetadata.layoutType;e&&z.push(new ID);if(O==="LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY")z.push(...Cws(A.adSlotMetadata.triggerEvent,y)),(Z=bmy(k,y.layoutId))&&z.push(new ulC(Z));else if(O==="LAYOUT_TYPE_ENDCAP"||O==="LAYOUT_TYPE_VIDEO_INTERSTITIAL_CENTERED"){z.push(new e7(j7(A.adSlotMetadata.triggerEvent)));
if(O==="LAYOUT_TYPE_VIDEO_INTERSTITIAL_CENTERED")return new F("Cannot parse endcap layout since AdUxReadyApi is not provided");Z&&z.push(Z)}else return new F("Not able to parse an SDF InPlayer layout");r={...t,...k,renderingContent:Q.renderingContent,NW:new Map,KP:S4(r,l)(t),clientMetadata:new nq(z),adLayoutLoggingData:Q.adLayoutMetadata.adLayoutLoggingData};return{...l,fulfilledLayout:r,clientMetadata:new nq([])}}};
Cws=function(l,y){const k=[];k.push(new e7(j7(l)));k.push(new S7(y.layoutId));(l=y.clientMetadata.aR("metadata_type_player_bytes_callback_ref"))&&k.push(new Wv(l));(l=y.clientMetadata.aR("metadata_type_ad_pod_skip_target_callback_ref"))&&k.push(new N$(l));(l=y.clientMetadata.aR("metadata_type_remote_slots_data"))&&k.push(new l_(l));(l=y.clientMetadata.aR("metadata_type_ad_next_params"))&&k.push(new Hv(l));(l=y.clientMetadata.aR("metadata_type_ad_video_clickthrough_endpoint"))&&k.push(new RD(l));(l=
y.clientMetadata.aR("metadata_type_ad_pod_info"))&&k.push(new xs(l));(y=y.clientMetadata.aR("metadata_type_ad_video_id"))&&k.push(new u5(y));return k};
GTP=function(l,y,k,z,r,Z){const e=z.j4.inPlayerSlotId,A=t=>zS(y,t),Q={layoutId:z.j4.inPlayerLayoutId,
layoutType:"LAYOUT_TYPE_ENDCAP",f_:"core"};k={slotId:e,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,f_:"core",slotEntryTrigger:new v3(A,l),slotFulfillmentTriggers:[new Fd(A,e)],slotExpirationTriggers:[new p0(A,e),new Yt(A,k)]};l={...Q,layoutExitNormalTriggers:[new E7(A,l)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],NW:new Map,clientMetadata:new nq([new xl_(z.j4),new e7(z.adPlacementConfig),r]),KP:S4(Z,k)(Q),
adLayoutLoggingData:z.j4.adLayoutLoggingData};return{...k,clientMetadata:new nq([new rX(l)])}};
imq=function(l,y){for(const k of y)if(k.adSlotMetadata.slotType==="SLOT_TYPE_PLAYER_UNDERLAY"){y=g.E(k.fulfillmentContent.fulfilledLayout,b$);if(!y)continue;if((y=g.E(y.renderingContent,c3))&&y.associatedPlayerBytesLayoutId===l)return k}};
v94=function(l,y,k){const z=rY(l.slotEntryTrigger,y,k);if(z instanceof F)return z;const r=[];for(var Z of l.slotFulfillmentTriggers){const e=rY(Z,y,k);if(e instanceof F)return e;r.push(e)}Z=[];for(const e of l.slotExpirationTriggers){l=rY(e,y,k);if(l instanceof F)return l;Z.push(l)}return{slotEntryTrigger:z,slotFulfillmentTriggers:r,slotExpirationTriggers:Z}};
fw=function(l,y,k){const z=[];for(var r of l.layoutExitNormalTriggers||[]){var Z=rY(r,y,k);if(Z instanceof F)return Z;z.push(Z)}r=[];for(var e of l.layoutExitSkipTriggers||[]){Z=rY(e,y,k);if(Z instanceof F)return Z;r.push(Z)}e=[];for(var A of l.layoutExitMuteTriggers||[]){Z=rY(A,y,k);if(Z instanceof F)return Z;e.push(Z)}A=[];for(const Q of l.layoutExitUserInputSubmittedTriggers||[]){l=rY(Q,y,k);if(l instanceof F)return l;A.push(l)}return{layoutExitNormalTriggers:z,layoutExitSkipTriggers:r,layoutExitMuteTriggers:e,
layoutExitUserInputSubmittedTriggers:A,layoutExitUserCancelledTriggers:[]}};
nw=function(l){const y=g.E(l.renderingContent,PK);if(y?.pings)return sH(y.pings);l=g.E(l.renderingContent,eT);return l?.skipPings?new Map([["skip",l.skipPings]]):new Map};
Aye=function(l,y,k,z,r,Z){y=g.E(y.renderingContent,PK);if(!y)return new F("Invalid rendering content for DAI media layout");l=[new i5(z),new UN(k.Eh.videoLengthSeconds),...(Zq(Z)?[new hS({impressionCommands:y.impressionCommands,abandonCommands:y.onAbandonCommands,completeCommands:y.completeCommands,progressCommands:y.adVideoProgressCommands})]:[]),new M$(k.Eh.playerVars),new X2(k.Rq),new cv(k.Rx),new VF(k.dD),new e7(j7(l)),new u5(k.Eh.adVideoId),new xs(k.dw),y.sodarExtensionData&&new q$(y.sodarExtensionData),
new Wv({current:null}),new ID,new TV(N6(y.pings))].filter(LbT);r!==void 0&&l.push(new mZ(r));return l};
ejT=function(l,y,k){l=l.map(Q=>GV(g.E(Q.renderingContent,PK)));
const z=l.map(Q=>Q.videoLengthSeconds),r=z.map((Q,t)=>new aD(t,z));
let Z=y,e=k;const A=[];l.forEach((Q,t)=>{e=Math.min(Z+Q.videoLengthSeconds*1E3,k);ZG(Q.playerVars,r[t]);A.push({Eh:Q,Rq:Z,Rx:e,dD:t,dw:r[t]});Z=e});
return A};
tY5=function(l,y,k){const z=[];for(var r of l){var Z=g.E(r.renderingContent,PK);if(Z){if(!tC(Z))return new F("Invalid vod media renderer");z.push(mlt(Z))}}r=z.map(A=>A.k8);
Z=[];let e=0;for(let A=0;A<l.length;A++){const Q=g.E(l[A].renderingContent,PK);if(!Q)continue;const t=new aD(e,r),O=JS(z[e].playerVars,z[e].WE,y,k,t);Z[A]={dw:t,adPodSkipTarget:Q.adPodSkipTarget,Uk:z[e],Sc:O};e++}return Z};
mlt=function(l){const y=iO(l.playerVars);let k=Number(y.length_seconds);isNaN(k)&&(k=0,EP("Expected valid length seconds in player vars but got NaN"));return{playerVars:y,WE:l.playerVars,k8:k}};
j7=function(l){switch(l){case "SLOT_TRIGGER_EVENT_LAYOUT_ID_ENTERED":return{kind:"AD_PLACEMENT_KIND_LAYOUT_ID_ENTERED"};case "SLOT_TRIGGER_EVENT_BEFORE_CONTENT":return{kind:"AD_PLACEMENT_KIND_START"};case "SLOT_TRIGGER_EVENT_CONTENT_OFFSET":return{kind:"AD_PLACEMENT_KIND_MILLISECONDS"};case "SLOT_TRIGGER_EVENT_AFTER_CONTENT":return{kind:"AD_PLACEMENT_KIND_END"};case "SLOT_TRIGGER_EVENT_CONTENT_PAUSED":return{kind:"AD_PLACEMENT_KIND_PAUSE"};default:return{kind:"AD_PLACEMENT_KIND_UNKNOWN"}}};
bmy=function(l,y){return l.layoutExitNormalTriggers.find(k=>k instanceof E7&&k?.triggeringLayoutId!==y)?.triggeringLayoutId};
IAy=function(l,y,k,z,r,Z,e,A,Q){const t=k.pings;return t?[qVe(l,Z,A,r,O=>{var d=O.slotId;O=Q(O);var w=k.adLayoutLoggingData,h=k.progressCommands;d=UH(y.C.get(),"LAYOUT_TYPE_DISCOVERY_PLAYBACK_TRACKER",d);const U={layoutId:d,layoutType:"LAYOUT_TYPE_DISCOVERY_PLAYBACK_TRACKER",f_:"core"};return{layoutId:d,layoutType:"LAYOUT_TYPE_DISCOVERY_PLAYBACK_TRACKER",NW:sH(t),layoutExitNormalTriggers:[new Yt(y.Z,Z)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],
f_:"core",clientMetadata:new nq([new e7(z),new TV(N6(t)),new WlC(t?.activeViewTracking?.identifier),new UN(e/1E3),new hS({progressCommands:h}),new wY(e/1E3)]),KP:O(U),adLayoutLoggingData:w}})]:new F("VideoAdTrackingRenderer without VideoAdTracking pings filled.",{videoAdTrackingRenderer:k})};
PwQ=function(l,y,k,z,r,Z,e,A){l=Tzq(l,k,Z,e,z,Q=>{var t=Q.slotId;Q=A(Q);t=UH(y.C.get(),"LAYOUT_TYPE_FORECASTING",t);const O={layoutId:t,layoutType:"LAYOUT_TYPE_FORECASTING",f_:"core"},d=new Map,w=r.impressionUrls;w&&d.set("impression",w);return{layoutId:t,layoutType:"LAYOUT_TYPE_FORECASTING",NW:d,layoutExitNormalTriggers:[new Sa(y.Z,t)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],f_:"core",clientMetadata:new nq([new VYQ(r),
new e7(k)]),KP:Q(O)}});
return l instanceof F?l:[l]};
YVP=function(l,y,k,z,r,Z,e){return[Jyt(l,Z,z,A=>{var Q=A.slotId;A=e(A);Q=UH(y.C.get(),"LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY",Q);const t={layoutId:Q,layoutType:"LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY",f_:"core"};return{layoutId:Q,layoutType:"LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY",NW:new Map,layoutExitNormalTriggers:[new Yt(y.Z,Z)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],f_:"core",clientMetadata:new nq([new Cw(r),
new e7(k)]),KP:A(t),adLayoutLoggingData:r.adLayoutLoggingData}})]};
Kl5=function(l,y,k,z,r,Z,e,A){l=psq(l,k,Z,e,z,(Q,t)=>{var O=Q.slotId;Q=A(Q);var d=r.contentSupportedRenderer;d?d.textOverlayAdContentRenderer?(d=UH(y.C.get(),"LAYOUT_TYPE_IN_VIDEO_TEXT_OVERLAY",O),t=e3(y,d,"LAYOUT_TYPE_IN_VIDEO_TEXT_OVERLAY",r,k,Q,As(y,t,O))):d.enhancedTextOverlayAdContentRenderer?(d=UH(y.C.get(),"LAYOUT_TYPE_IN_VIDEO_ENHANCED_TEXT_OVERLAY",O),t=e3(y,d,"LAYOUT_TYPE_IN_VIDEO_ENHANCED_TEXT_OVERLAY",r,k,Q,As(y,t,O))):d.imageOverlayAdContentRenderer?(d=UH(y.C.get(),"LAYOUT_TYPE_IN_VIDEO_IMAGE_OVERLAY",
O),t=As(y,t,O),t.push(new B3(y.Z,45E3,d)),t=e3(y,d,"LAYOUT_TYPE_IN_VIDEO_IMAGE_OVERLAY",r,k,Q,t)):t=new AL("InvideoOverlayAdRenderer without appropriate sub renderer"):t=new AL("InvideoOverlayAdRenderer without contentSupportedRenderer");return t});
return l instanceof F?l:[l]};
fAC=function(l,y,k,z,r,Z,e,A,Q){const t=Number(z.durationMilliseconds);return isNaN(t)?new F("Expected valid duration for AdActionInterstitialRenderer."):O=>gFg(y,O.slotId,k,t,{impressionCommands:void 0,abandonCommands:z.abandonCommands?[{commandExecutorCommand:z.abandonCommands}]:void 0,completeCommands:z.completionCommands},z.skipPings?new Map([["skip",z.skipPings]]):new Map,e(O),d=>EF5(l,d,r,(w,h)=>{var U=w.slotId;w=e(w);U=UH(y.C.get(),"LAYOUT_TYPE_ENDCAP",U);return dY(y,U,h,k,w,"LAYOUT_TYPE_ENDCAP",
[new xl_(z),A],z.adLayoutLoggingData)}),Q,Z-1,z.adLayoutLoggingData,Z)};
jag=function(l,y,k,z){if(!k.playerVars)return new F("No playerVars available in AdIntroRenderer.");const r=iO(k.playerVars);r.autoplay="1";return Z=>{var e=Z.slotId;Z=z(Z);e=UH(l.C.get(),"LAYOUT_TYPE_MEDIA",e);const A={layoutId:e,layoutType:"LAYOUT_TYPE_MEDIA",f_:"adapter"};return{Om:{layoutId:e,layoutType:"LAYOUT_TYPE_MEDIA",NW:new Map,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],f_:"adapter",
clientMetadata:new nq([new ws5,new e7(y),new Wv({current:null}),new M$(r)]),KP:Z(A)},D$:[new f0(l.Z,e,["error"])],Q5:[],rj:[],QJ:[]}}};
nFP=function(l,y,k,z,r,Z,e,A,Q,t=!1){const O=tS(r);if(!EuC(r,t))return new F("Received invalid InstreamSurveyAdRenderer for VOD composite survey.",{InstreamSurveyAdRenderer:r});if(O<=0)return new F("InstreamSurveyAdRenderer should have valid duration.",{instreamSurveyAdRenderer:r});const d=hgP(l,y,r,Z,k,z,e);return d instanceof F?d:w=>SVg(y,w.slotId,k,O,ON(r),e(w),d,A,Q)};
oFe=function(l,y,k,z,r,Z,e,A){if(!(!isNaN(Number(r.timeoutSeconds))&&r.text&&r.ctaButton&&g.E(r.ctaButton,$L)&&r.brandImage&&r.backgroundImage&&g.E(r.backgroundImage,QV)&&g.E(r.backgroundImage,QV)?.landscape))return new F("Received invalid SurveyTextInterstitialRenderer.",{SurveyTextInterstitialRenderer:r});const Q=r.timeoutSeconds*1E3,t=(d,w)=>{var h=d.slotId;d=e(d);h=UH(y.C.get(),"LAYOUT_TYPE_VIDEO_INTERSTITIAL_BUTTONED_LEFT",h);return dY(y,h,w,k,d,"LAYOUT_TYPE_VIDEO_INTERSTITIAL_BUTTONED_LEFT",
[new FlQ(r),Z],r.adLayoutLoggingData)},O=d=>EF5(l,d,z,t);
return d=>{var w=d.slotId,h={impressionCommands:r.impressionCommands,completeCommands:r.timeoutCommands,skipCommands:r.dismissCommands};d=e(d);w=ts(y,w,k,Q,h,new Map,d,O);h=new vv(w.sX);d=new Bv(A);return{Om:{layoutId:w.layoutId,layoutType:w.layoutType,NW:w.NW,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],f_:w.f_,clientMetadata:new nq([...w.q1,h,d]),KP:w.KP,adLayoutLoggingData:w.adLayoutLoggingData},
D$:[],Q5:w.layoutExitMuteTriggers,rj:w.layoutExitUserInputSubmittedTriggers,QJ:w.layoutExitUserCancelledTriggers,Xg:w.Xg}}};
sa5=function(l,y,k,z,r,Z,e,A,Q,t,O,d,w,h,U,u){l=I0(l,"SLOT_TYPE_PLAYER_BYTES");z=pDz(y,e,z,r,l,t,O);if(z instanceof F)return z;e=z.clientMetadata.aR("metadata_type_fulfilled_layout")?.layoutId;if(!e)return new F("Invalid adNotify layout");y=Nzq(e,y,k,r,Z,Q,A,t,d,w,h,U,u);return y instanceof F?y:[z,...y]};
Nzq=function(l,y,k,z,r,Z,e,A,Q,t,O,d,w){k=Ll4(y,k,z,Z,e,A,Q,t,O,d,w);vF_(Z)?(z=Bz5(y,l),l=I0(y.C.get(),"SLOT_TYPE_IN_PLAYER"),Z=UH(y.C.get(),"LAYOUT_TYPE_SURVEY",l),A=Ox(y,z,A),y=[...A.slotExpirationTriggers,new Ne(y.Z,Z)],l=k({slotId:A.slotId,slotType:A.slotType,slotPhysicalPosition:A.slotPhysicalPosition,slotEntryTrigger:A.slotEntryTrigger,slotFulfillmentTriggers:A.slotFulfillmentTriggers,slotExpirationTriggers:y,f_:A.f_},{slotId:l,layoutId:Z}),r=l instanceof F?l:{jY:{...A,slotExpirationTriggers:y,
clientMetadata:new nq([new rX(l.layout)]),adSlotLoggingData:r},Si:l.Si}):r=fYy(y,l,A,r,k);return r instanceof F?r:[...r.Si,r.jY]};
Rjs=function(l,y,k,z,r,Z,e,A,Q,t,O,d,w,h){y=Ll4(l,y,k,r,Z,e,Q,t,O,d,w,h);vF_(r)?(e=HmP(l,k,e,A),e instanceof F?l=e:(A=I0(l.C.get(),"SLOT_TYPE_IN_PLAYER"),Q=UH(l.C.get(),"LAYOUT_TYPE_SURVEY",A),r=[...e.slotExpirationTriggers,new Ne(l.Z,Q)],A=y({slotId:e.slotId,slotType:e.slotType,slotPhysicalPosition:e.slotPhysicalPosition,f_:e.f_,slotEntryTrigger:e.slotEntryTrigger,slotFulfillmentTriggers:e.slotFulfillmentTriggers,slotExpirationTriggers:r},{slotId:A,layoutId:Q}),l=A instanceof F?A:{jY:{slotId:e.slotId,
slotType:e.slotType,slotPhysicalPosition:e.slotPhysicalPosition,slotEntryTrigger:e.slotEntryTrigger,slotFulfillmentTriggers:e.slotFulfillmentTriggers,slotExpirationTriggers:r,f_:e.f_,clientMetadata:new nq([new rX(A.layout),new EN({tp:l.tp(k)})]),adSlotLoggingData:z},Si:A.Si})):l=jfT(l,k,e,A,z,Q.UA,y);return l instanceof F?l:l.Si.concat(l.jY)};
vF_=function(l){for(const y of l)if(g.E(y,hC))return!0;return!1};
Ll4=function(l,y,k,z,r,Z,e,A,Q,t,O,d){return(w,h)=>{if(sN(O)&&Lw(O))a:{var U=Dls(z);if(U instanceof F)h=U;else{var u=0,W=[],V=[],T=[],J=[],K=[],Zg=[],es=new dX,fC=new N$({current:null}),bQ=!1,js=[],Nt=0,Ig=[];for(var Ss=0;Ss<z.length;Ss++){var bi=z[Ss],SD=g.E(bi,PK);if(!SD)continue;SD=Pv(SD);if(SD instanceof AL){h=new F(SD);break a}const Bc=new aD(Nt,U),wJ=JS(SD.playerVars,SD.WE,e,t,Bc);Nt++;Ig[Ss]={renderer:bi,data:SD,dw:Bc,Sc:wJ}}U=-1;for(Nt=0;Nt<z.length;Nt++){Ss=z[Nt];if(bi=g.E(Ss,wi)){Ss=jag(y,
k,bi,A);if(Ss instanceof F){h=Ss;break a}Ss=Ss(w);W.push(Ss.Om);V=[...Ss.D$,...V];T=[...Ss.Q5,...T];Ss.Xg&&(js=[Ss.Xg,...js]);continue}if(g.E(Ss,PK)){bi=Ig[Nt];U=bi.data;Ss=bi.dw;bi=bi.Sc;SD=Ig[Nt+1];var X8=void 0;SD&&(X8=SD.Sc);Ss=lug(y,U.layoutId,U.fK,k,bi,U.k8,Z,Ss,A(w),fC,Q.get(U.fK.externalVideoId),X8,d);u++;W.push(Ss.Om);V=[...Ss.D$,...V];T=[...Ss.Q5,...T];bQ||(Zg.push(fC),bQ=!0);U=(U=U.fK.adPodSkipTarget)&&U>0?U:-1;continue}if(bi=g.E(Ss,eT)){Ss=fAC(l,y,k,bi,Z,u,A,fC,U);if(Ss instanceof F){h=
Ss;break a}Ss=Ss(w);W.push(Ss.Om);V=[...Ss.D$,...V];T=[...Ss.Q5,...T];Ss.Xg&&(js=[Ss.Xg,...js]);continue}if(bi=g.E(Ss,hC)){if(h===void 0){h=new F("Composite Survey must already have a Survey Bundle with required metadata.",{instreamSurveyAdRenderer:bi});break a}Ss=nFP(l,y,k,Z,bi,es,A,h,u,iR(O,"supports_multi_step_on_desktop"));if(Ss instanceof F){h=Ss;break a}Ss=Ss(w);W.push(Ss.Om);Ss.Xg&&js.push(Ss.Xg);V=[...Ss.D$,...V];T=[...Ss.Q5,...T];J=[...Ss.rj,...J];K=[...Ss.QJ,...K];Zg=[es,...Zg];continue}if(Ss=
g.E(Ss,Gh)){Ss=oFe(l,y,k,Z,Ss,es,A,u);if(Ss instanceof F){h=Ss;break a}Ss=Ss(w);W.push(Ss.Om);Ss.Xg&&js.push(Ss.Xg);T=[...Ss.Q5,...T]}else{h=new F("Unsupported linearAd found in LinearAdSequenceRenderer.");break a}}h={mE:W,layoutExitSkipTriggers:V,layoutExitUserInputSubmittedTriggers:J,layoutExitUserCancelledTriggers:K,layoutExitMuteTriggers:T,q1:Zg,Si:js}}}else a:if(Ig=Dls(z),Ig instanceof F)h=Ig;else{X8=0;W=[];V=[];T=[];J=[];K=[];Zg=[];es=new dX;fC=new N$({current:null});bQ=!1;js=[];Nt=-1;for(u of z)if(g.E(u,
wi)){U=jag(y,k,g.E(u,wi),A);if(U instanceof F){h=U;break a}U=U(w);W.push(U.Om);V=[...U.D$,...V];T=[...U.Q5,...T];U.Xg&&(js=[U.Xg,...js])}else if(g.E(u,PK)){Nt=Pv(g.E(u,PK));if(Nt instanceof AL){h=new F(Nt);break a}U=new aD(X8,Ig);U=lug(y,Nt.layoutId,Nt.fK,k,JS(Nt.playerVars,Nt.WE,e,t,U),Nt.k8,Z,U,A(w),fC,Q.get(Nt.fK.externalVideoId),void 0,d);X8++;W.push(U.Om);V=[...U.D$,...V];T=[...U.Q5,...T];bQ||(Zg.push(fC),bQ=!0);Nt=(Nt=Nt.fK.adPodSkipTarget)&&Nt>0?Nt:-1}else if(g.E(u,eT)){U=fAC(l,y,k,g.E(u,eT),
Z,X8,A,fC,Nt);if(U instanceof F){h=U;break a}U=U(w);W.push(U.Om);V=[...U.D$,...V];T=[...U.Q5,...T];U.Xg&&(js=[U.Xg,...js])}else if(g.E(u,hC)){if(h===void 0){h=new F("Composite Survey must already have a Survey Bundle with required metadata.",{instreamSurveyAdRenderer:g.E(u,hC)});break a}U=nFP(l,y,k,Z,g.E(u,hC),es,A,h,X8,iR(O,"supports_multi_step_on_desktop"));if(U instanceof F){h=U;break a}U=U(w);W.push(U.Om);U.Xg&&js.push(U.Xg);V=[...U.D$,...V];T=[...U.Q5,...T];J=[...U.rj,...J];K=[...U.QJ,...K];
Zg=[es,...Zg]}else if(g.E(u,Gh)){U=oFe(l,y,k,Z,g.E(u,Gh),es,A,X8);if(U instanceof F){h=U;break a}U=U(w);W.push(U.Om);U.Xg&&js.push(U.Xg);T=[...U.Q5,...T]}else{h=new F("Unsupported linearAd found in LinearAdSequenceRenderer.");break a}h={mE:W,layoutExitSkipTriggers:V,layoutExitUserInputSubmittedTriggers:J,layoutExitUserCancelledTriggers:K,layoutExitMuteTriggers:T,q1:Zg,Si:js}}h instanceof F?w=h:(K=w.slotId,X8=h.mE,u=h.layoutExitSkipTriggers,W=h.layoutExitMuteTriggers,V=h.layoutExitUserInputSubmittedTriggers,
T=h.q1,w=A(w),J=r?r.layoutType:"LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES",K=r?r.layoutId:UH(y.C.get(),J,K),Zg={layoutId:K,layoutType:J,f_:"core"},w={layout:{layoutId:K,layoutType:J,NW:new Map,layoutExitNormalTriggers:[new Sa(y.Z,K)],layoutExitSkipTriggers:u,layoutExitMuteTriggers:W,layoutExitUserInputSubmittedTriggers:V,layoutExitUserCancelledTriggers:[],f_:"core",clientMetadata:new nq([new yZy(X8),...T]),KP:w(Zg)},Si:h.Si});return w}};
Dls=function(l){const y=[];for(const k of l){if(!g.E(k,PK))continue;l=Pv(g.E(k,PK));if(l instanceof AL)return new F(l);y.push(l.k8)}return y};
zXy=function(l,y,k,z,r,Z,e,A=!1){if(!EuC(k,A))return new F("Received invalid InstreamSurveyAdRenderer for VOD single survey.",{InstreamSurveyAdRenderer:k});const Q=tS(k);if(Q<=0)return new F("InstreamSurveyAdRenderer should have valid duration.",{instreamSurveyAdRenderer:k});const t=new dX,O=hgP(l,y,k,t,z,Z,e);return k44(l,z,Z,Q,r,(d,w)=>{var h=d.slotId,U=ON(k);d=e(d);h=UH(y.C.get(),"LAYOUT_TYPE_MEDIA_BREAK",h);const u={layoutId:h,layoutType:"LAYOUT_TYPE_MEDIA_BREAK",f_:"core"},W=O(h,w),V=W.clientMetadata.aR("metadata_type_fulfilled_layout");
V||EP("Could not retrieve overlay layout ID during VodMediaBreakLayout for survey creation. This should never happen.");U=[new e7(z),new yV(Q),new hS(U),t];V&&U.push(new kL(V.layoutType));return{CH:{layoutId:h,layoutType:"LAYOUT_TYPE_MEDIA_BREAK",NW:new Map,layoutExitNormalTriggers:[new Sa(y.Z,h)],layoutExitSkipTriggers:[new n0(y.Z,w.layoutId)],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[new o5(y.Z,w.layoutId)],layoutExitUserCancelledTriggers:[],f_:"core",clientMetadata:new nq(U),
KP:d(u)},QI:W}})};
rZy=function(l){if(!SJe(l))return!1;const y=g.E(l.adVideoStart,wX);return y?g.E(l.linearAd,PK)&&$t(y)?!0:(EP("Invalid Sandwich with notify"),!1):!1};
Zvy=function(l){if(l.linearAds==null)return!1;l=g.E(l.adStart,wX);return l?$t(l)?!0:(EP("Invalid LASR with notify"),!1):!1};
eXe=function(l){if(!j3q(l))return!1;l=g.E(l.adStart,wX);return l?$t(l)?!0:(EP("Invalid LASR with notify"),!1):!1};
Vh=function(l,y,k,z,r,Z,e,A,Q,t,O){const d=[];if(y.length===0&&z.length===0&&k.length===0)return d;y=y.filter(Qh);const w=k.filter(pqC),h=z.filter(Qh),U=new Map,u=sf4(y),W=k.some(Zg=>Zg?.adSlotMetadata?.slotType==="SLOT_TYPE_PLAYER_BYTES"),V=k.some(Zg=>Zg?.adSlotMetadata?.slotType==="SLOT_TYPE_PLAYER_UNDERLAY"),T=k.some(Zg=>Zg?.adSlotMetadata?.slotType==="SLOT_TYPE_IN_PLAYER"),J=k.some(Zg=>Zg?.adSlotMetadata?.slotType==="SLOT_TYPE_BELOW_PLAYER"||Zg?.adSlotMetadata?.slotType==="SLOT_TYPE_ABOVE_FEED"),
K=k.some(Zg=>Zg?.adSlotMetadata?.slotType==="SLOT_TYPE_PLAYER_BYTES_SEQUENCE_ITEM");
k=k.some(Zg=>Zg?.adSlotMetadata?.slotType==="SLOT_TYPE_IN_PLAYER_ORGANIC_OVERLAY");
if(W||V||T||J||K||k)t=zjg(w,y,A,r,u,l.TA.get(),l.loadPolicy,U,l.p_.get(),l.V.get(),T,e,Q,t,O),t instanceof F?EP(t,void 0,void 0,{contentCpn:r}):d.push(...t);for(const Zg of y)t=AZe(l,U,Zg,r,Z,e,W,A,u,Q,w,l.p_.get().L.O().experiments.z7("html5_enable_triggering_cuepoint_for_slot")?O:void 0),t instanceof F?EP(t,void 0,void 0,{renderer:Zg.renderer,config:Zg.config.adPlacementConfig,kind:Zg.config.adPlacementConfig.kind,contentCpn:r,daiEnabled:e}):d.push(...t);$8Q(l.p_.get())||(Z=QL5(l,h,r,A,u,U),d.push(...Z));
if(l.N===null||e&&!A.zt)return l=A.UA&&y.length===1&&y[0].config?.adPlacementConfig?.kind==="AD_PLACEMENT_KIND_CUE_POINT_TRIGGERED"&&y[0].renderer?.adBreakServiceRenderer,d.length||l||EP("Expected slots parsed from AdPlacementRenderers for DAI",void 0,void 0,{"AdPlacementRenderer count":y.length,contentCpn:r,"first APR kind":y[0]?.config?.adPlacementConfig?.kind,renderer:y[0]?.renderer}),d;z=z.filter(Qh);d.push(...t_y(U,z,l.C.get(),l.N,r,W));d.length||EP("Expected slots parsed from AdPlacementRenderers",
void 0,void 0,{"AdPlacementRenderer count":y.length,contentCpn:r,daiEnabled:e.toString(),"first APR kind":y[0]?.config?.adPlacementConfig?.kind,renderer:y[0]?.renderer});return d};
AZe=function(l,y,k,z,r,Z,e,A,Q,t,O,d){const w=k.renderer,h=k.config.adPlacementConfig,U=h.kind,u=k.adSlotLoggingData,W=T=>S4(l.TA.get(),T);
var V=A.zt&&U==="AD_PLACEMENT_KIND_START";V=Z&&!V;if(w.adsEngagementPanelRenderer!=null)return QF(y,k.elementId,U,w.adsEngagementPanelRenderer.isContentVideoEngagementPanel,w.adsEngagementPanelRenderer.adVideoId,w.adsEngagementPanelRenderer.associatedCompositePlayerBytesLayoutId,h,u,(T,J,K,Zg)=>{var es=l.Z.get(),fC=T.slotId,bQ=w.adsEngagementPanelRenderer;T=S4(l.TA.get(),T);return hs(es,fC,"LAYOUT_TYPE_PANEL_TEXT_ICON_IMAGE_TILES_BUTTON",new tGC(bQ),J,K,bQ.impressionPings,T,w.adsEngagementPanelRenderer.adLayoutLoggingData,
Zg)}),[];
if(w.adsEngagementPanelLayoutViewModel)return QF(y,k.elementId,U,w.adsEngagementPanelLayoutViewModel.isContentVideoEngagementPanel,w.adsEngagementPanelLayoutViewModel.adVideoId,w.adsEngagementPanelLayoutViewModel.associatedCompositePlayerBytesLayoutId,h,u,(T,J,K,Zg)=>{var es=l.Z.get(),fC=T.slotId,bQ=w.adsEngagementPanelLayoutViewModel;T=S4(l.TA.get(),T);return GS(es,fC,"LAYOUT_TYPE_PANEL",new Ovz(bQ),J,K,T,w.adsEngagementPanelLayoutViewModel.adLayoutLoggingData,Zg)}),[];
if(w.actionCompanionAdRenderer!=null){if(w.actionCompanionAdRenderer.showWithoutLinkedMediaLayout)return rDe(l.C.get(),l.N,l.Z.get(),w.actionCompanionAdRenderer,h,u,z,W);QF(y,k.elementId,U,w.actionCompanionAdRenderer.isContentVideoCompanion,w.actionCompanionAdRenderer.adVideoId,w.actionCompanionAdRenderer.associatedCompositePlayerBytesLayoutId,h,u,(T,J,K,Zg)=>{var es=l.Z.get(),fC=T.slotId,bQ=w.actionCompanionAdRenderer;T=S4(l.TA.get(),T);return hs(es,fC,"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON",
new zg4(bQ),J,K,bQ.impressionPings,T,w.actionCompanionAdRenderer.adLayoutLoggingData,Zg)})}else if(w.topBannerImageTextIconButtonedLayoutViewModel!==void 0){if(w.topBannerImageTextIconButtonedLayoutViewModel.showWithoutLinkedMediaLayout)return egg(l.C.get(),l.N,l.Z.get(),w.topBannerImageTextIconButtonedLayoutViewModel,h,u,z,W);
QF(y,k.elementId,U,w.topBannerImageTextIconButtonedLayoutViewModel.isContentVideoCompanion,w.topBannerImageTextIconButtonedLayoutViewModel.adVideoId,w.topBannerImageTextIconButtonedLayoutViewModel.associatedCompositePlayerBytesLayoutId,h,u,(T,J,K,Zg)=>{var es=l.Z.get(),fC=T.slotId,bQ=w.topBannerImageTextIconButtonedLayoutViewModel;T=S4(l.TA.get(),T);return GS(es,fC,"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON",new ZLq(bQ),J,K,T,w.topBannerImageTextIconButtonedLayoutViewModel.adLayoutLoggingData,Zg)})}else if(w.imageCompanionAdRenderer)QF(y,
k.elementId,U,w.imageCompanionAdRenderer.isContentVideoCompanion,w.imageCompanionAdRenderer.adVideoId,w.imageCompanionAdRenderer.associatedCompositePlayerBytesLayoutId,h,u,(T,J,K,Zg)=>{var es=l.Z.get(),fC=T.slotId,bQ=w.imageCompanionAdRenderer;
T=S4(l.TA.get(),T);return hs(es,fC,"LAYOUT_TYPE_COMPANION_WITH_IMAGE",new d85(bQ),J,K,bQ.impressionPings,T,w.imageCompanionAdRenderer.adLayoutLoggingData,Zg)});
else if(w.bannerImageLayoutViewModel)QF(y,k.elementId,U,w.bannerImageLayoutViewModel.isContentVideoCompanion,w.bannerImageLayoutViewModel.adVideoId,w.bannerImageLayoutViewModel.associatedCompositePlayerBytesLayoutId,h,u,(T,J,K,Zg)=>{var es=l.Z.get(),fC=T.slotId,bQ=w.bannerImageLayoutViewModel;T=S4(l.TA.get(),T);return GS(es,fC,"LAYOUT_TYPE_COMPANION_WITH_IMAGE",new wSs(bQ),J,K,T,w.bannerImageLayoutViewModel.adLayoutLoggingData,Zg)});
else if(w.shoppingCompanionCarouselRenderer)QF(y,k.elementId,U,w.shoppingCompanionCarouselRenderer.isContentVideoCompanion,w.shoppingCompanionCarouselRenderer.adVideoId,w.shoppingCompanionCarouselRenderer.associatedCompositePlayerBytesLayoutId,h,u,(T,J,K,Zg)=>{var es=l.Z.get(),fC=T.slotId,bQ=w.shoppingCompanionCarouselRenderer;T=S4(l.TA.get(),T);return hs(es,fC,"LAYOUT_TYPE_COMPANION_WITH_SHOPPING",new hXT(bQ),J,K,bQ.impressionPings,T,w.shoppingCompanionCarouselRenderer.adLayoutLoggingData,Zg)});
else if(w.adBreakServiceRenderer){if(k.renderer?.adBreakServiceRenderer?.getAdBreakUrl===void 0)return[];if(U==="AD_PLACEMENT_KIND_PAUSE")return lYy(l.C.get(),h,u,k.renderer.adBreakServiceRenderer,z);if(U!=="AD_PLACEMENT_KIND_CUE_POINT_TRIGGERED"&&U!=="AD_PLACEMENT_KIND_PREFETCH_TRIGGERED")return BJC(l.C.get(),h,u,k.renderer.adBreakServiceRenderer,z,r,Z);A.UA||EP("Received non-live cue point triggered AdBreakServiceRenderer",void 0,void 0,{kind:U,adPlacementConfig:h,daiEnabledForContentVideo:String(Z),
isServedFromLiveInfra:String(A.UA),clientPlaybackNonce:A.clientPlaybackNonce});if(U==="AD_PLACEMENT_KIND_PREFETCH_TRIGGERED"){if(!l.vG)return new F("Received AD_PLACEMENT_KIND_PREFETCH_TRIGGERED with no playerControlsApiProvider set for interface");if(!l.Bs)return new F("Received AD_PLACEMENT_KIND_PREFETCH_TRIGGERED with no PrefetchTriggerAdapter set for interface");l.Bs.Br({adPlacementRenderer:k,contentCpn:z,XK:r});r=l.vG.get().getCurrentTimeSec(1,!1);return G4P(l.C.get(),k.renderer.adBreakServiceRenderer,
h,r,z,u,Z)}if(!l.Ph)return new F("Received AD_PLACEMENT_KIND_CUE_POINT_TRIGGERED with no CuePointOpportunityAdapter set for interface");l.Ph.Br({adPlacementRenderer:k,contentCpn:z,XK:r})}else{if(w.clientForecastingAdRenderer)return PwQ(l.C.get(),l.Z.get(),h,u,w.clientForecastingAdRenderer,z,r,W);if(w.invideoOverlayAdRenderer)return Kl5(l.C.get(),l.Z.get(),h,u,w.invideoOverlayAdRenderer,z,r,W);if(w.instreamAdPlayerOverlayRenderer)return YVP(l.C.get(),l.Z.get(),h,u,w.instreamAdPlayerOverlayRenderer,
z,W);if((w.linearAdSequenceRenderer||w.instreamVideoAdRenderer)&&V)return T8y(l.C.get(),l.Z.get(),k,z,W,t,d);if(w.linearAdSequenceRenderer&&!V){if(e)return[];AS(y,w,U);if(w.linearAdSequenceRenderer.adLayoutMetadata){if(!j3q(w.linearAdSequenceRenderer))return new F("Received invalid LinearAdSequenceRenderer.")}else if(w.linearAdSequenceRenderer.linearAds==null)return new F("Received invalid LinearAdSequenceRenderer.");if(g.E(w.linearAdSequenceRenderer.adStart,wX)){EP("Found AdNotify in LinearAdSequenceRenderer");
k=g.E(w.linearAdSequenceRenderer.adStart,wX);if(!(k?.durationMs!=null&&k?.durationMs>0))return new F("Invalid AdMessageRenderer.");Z=w.linearAdSequenceRenderer.linearAds;return sa5(l.V.get(),l.C.get(),l.Z.get(),l.TA.get(),h,u,k,yh(w.linearAdSequenceRenderer.adLayoutMetadata)?w.linearAdSequenceRenderer.adLayoutMetadata:void 0,Z,z,r,A,W,Q,l.loadPolicy,l.p_.get())}return Rjs(l.C.get(),l.Z.get(),h,u,w.linearAdSequenceRenderer.linearAds,yh(w.linearAdSequenceRenderer.adLayoutMetadata)?w.linearAdSequenceRenderer.adLayoutMetadata:
void 0,z,r,A,W,Q,l.loadPolicy,l.p_.get(),O)}if(!w.remoteSlotsRenderer||Z){if(w.instreamVideoAdRenderer&&!V){if(e)return[];AS(y,w,U);return Swy(l.C.get(),l.Z.get(),h,u,w.instreamVideoAdRenderer,z,r,A,W,Q,l.loadPolicy,l.p_.get(),l.TA.get(),O)}if(w.instreamSurveyAdRenderer)return zXy(l.C.get(),l.Z.get(),w.instreamSurveyAdRenderer,h,u,z,W,iR(l.p_.get(),"supports_multi_step_on_desktop"));if(w.sandwichedLinearAdRenderer!=null)return SJe(w.sandwichedLinearAdRenderer)?g.E(w.sandwichedLinearAdRenderer.adVideoStart,
wX)?(EP("Found AdNotify in SandwichedLinearAdRenderer"),k=g.E(w.sandwichedLinearAdRenderer.adVideoStart,wX),k?.durationMs!=null&&k?.durationMs>0?(Z=g.E(w.sandwichedLinearAdRenderer.linearAd,PK))?g95(k,Z,h,l.V.get(),l.C.get(),l.Z.get(),l.TA.get(),u,z,r,A,W,Q,l.loadPolicy,l.p_.get()):new F("Missing IVAR from Sandwich"):new F("Invalid AdMessageRenderer.")):Rjs(l.C.get(),l.Z.get(),h,u,[w.sandwichedLinearAdRenderer.adVideoStart,w.sandwichedLinearAdRenderer.linearAd],void 0,z,r,A,W,Q,l.loadPolicy,l.p_.get()):
new F("Received invalid SandwichedLinearAdRenderer.");if(w.videoAdTrackingRenderer!=null)return IAy(l.C.get(),l.Z.get(),w.videoAdTrackingRenderer,h,u,z,r,A.yf,W)}}return[]};
QL5=function(l,y,k,z,r,Z){const e=O=>S4(l.TA.get(),O),A=[];
for(const O of y){y=O.renderer;var Q=y.sandwichedLinearAdRenderer,t=y.linearAdSequenceRenderer;Q&&rZy(Q)?(EP("Found AdNotify with SandwichedLinearAdRenderer"),t=g.E(Q.adVideoStart,wX),Q=g.E(Q.linearAd,PK),AS(Z,y,O.config.adPlacementConfig.kind),y=KbT(t?.layout.layoutId,l.C.get(),l.Z.get(),O.config.adPlacementConfig,O.adSlotLoggingData,Q,k,z,e,r,l.loadPolicy,l.p_.get(),l.TA.get()),y instanceof F?EP(y):A.push(...y)):t&&(!t.adLayoutMetadata&&Zvy(t)||t.adLayoutMetadata&&eXe(t))&&(EP("Found AdNotify with LinearAdSequenceRenderer"),
AS(Z,y,O.config.adPlacementConfig.kind),y=Nzq(g.E(t.adStart,wX)?.layout.layoutId,l.C.get(),l.Z.get(),O.config.adPlacementConfig,O.adSlotLoggingData,t.linearAds,yh(t.adLayoutMetadata)?t.adLayoutMetadata:void 0,k,z,e,r,l.loadPolicy,l.p_.get()),y instanceof F?EP(y):A.push(...y))}return A};
Mv=function(l,y,k){const z=l.vG.get().getCurrentTimeSec(1,!1);l.p_.get().L.O().yM()&&Fs(l.Se.get(),"sdai",`onopp.1;evt.${k.event};start.${k.startSecs.toFixed(3)};d.${k.yK.toFixed(3)}`);WJ(l.C.get(),"OPPORTUNITY_TYPE_LIVE_STREAM_BREAK_SIGNAL",()=>{var r=l.N.get(),Z=y.adPlacementRenderer.renderer.adBreakServiceRenderer,e=y.contentCpn,A=y.adPlacementRenderer.adSlotLoggingData;ad(l.p_.get());var Q=l.Se;var t=r.p_.get();t=g.i_(t.L.O().experiments,"max_prefetch_window_sec_for_livestream_optimization");
var O=r.p_.get();var d=g.i_(O.L.O().experiments,"min_prefetch_offset_sec_for_livestream_optimization");{O=k.startSecs*1E3;O={P7:new xa(O,O+k.yK*1E3),aL:!1,cueProcessedMs:z*1E3};const h=k.startSecs+k.yK;if(z===0)O.NG=new xa(0,h*1E3);else{d=k.startSecs-d;var w=d-z;O.NG=w<=0?new xa(d*1E3,h*1E3):new xa(Math.floor(z+Math.random()*Math.min(w,t))*1E3,h*1E3)}t=O}Z=P3(r,Z,e,t,A,[new aus(k)]);Ux(r.p_.get())&&Fs(Q.get(),"abrsm",`cpi.${k.identifier};cps.${k.startSecs};cpd.${k.yK};cts.${z};rbf.${t.NG.start}`);
Q.get().L.ID(k.startSecs-z,t.NG.start/1E3-z);return[Z]})};
XX=function(l){const y=l.clientMetadata.aR("metadata_type_player_bytes_callback_ref")?.current;if(!y)return null;const k=l.clientMetadata.aR("metadata_type_ad_pod_skip_target_callback_ref");var z=l.layoutId,r=l.clientMetadata.aR("metadata_type_content_cpn"),Z=l.clientMetadata.aR("metadata_type_instream_ad_player_overlay_renderer"),e=l.clientMetadata.aR("metadata_type_player_overlay_layout_renderer"),A=l.clientMetadata.aR("metadata_type_player_underlay_renderer"),Q=l.clientMetadata.aR("metadata_type_ad_placement_config"),
t=l.clientMetadata.aR("metadata_type_video_length_seconds");var O=Ym(l.clientMetadata,"METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds")?l.clientMetadata.aR("METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds"):Ym(l.clientMetadata,"metadata_type_layout_enter_ms")&&Ym(l.clientMetadata,"metadata_type_layout_exit_ms")?(l.clientMetadata.aR("metadata_type_layout_exit_ms")-l.clientMetadata.aR("metadata_type_layout_enter_ms"))/1E3:void 0;return{Wj:z,contentCpn:r,UF:y,c_:k,instreamAdPlayerOverlayRenderer:Z,playerOverlayLayoutRenderer:e,
instreamAdPlayerUnderlayRenderer:A,adPlacementConfig:Q,videoLengthSeconds:t,UJ:O,inPlayerLayoutId:l.clientMetadata.aR("metadata_type_linked_in_player_layout_id"),inPlayerSlotId:l.clientMetadata.aR("metadata_type_linked_in_player_slot_id")}};
U8e=function(l,y){return ivg(l,y)};
MGP=function(l,y){y=ivg(l,y);if(!y)return null;y.UJ=l.clientMetadata.aR("metadata_type_ad_pod_info")?.adBreakRemainingLengthSeconds;return y};
ivg=function(l,y){const k=l.clientMetadata.aR("metadata_type_player_bytes_callback_ref")?.current;if(!k)return null;const z=X_P(l,y);return{YP:M5t(l,y),adPlacementConfig:l.clientMetadata.aR("metadata_type_ad_placement_config"),ZG:z,contentCpn:l.clientMetadata.aR("metadata_type_content_cpn"),inPlayerLayoutId:l.clientMetadata.aR("metadata_type_linked_in_player_layout_id"),inPlayerSlotId:l.clientMetadata.aR("metadata_type_linked_in_player_slot_id"),instreamAdPlayerOverlayRenderer:l.clientMetadata.aR("metadata_type_instream_ad_player_overlay_renderer"),
playerOverlayLayoutRenderer:void 0,instreamAdPlayerUnderlayRenderer:void 0,UJ:void 0,UF:k,Wj:l.layoutId,videoLengthSeconds:l.clientMetadata.aR("metadata_type_video_length_seconds")}};
XSy=function(l,y,k){return o9z(l.Z.get(),y.contentCpn,y.Wj,z=>N8e(l.C.get(),z.slotId,k,y.adPlacementConfig,y.Wj,S4(l.TA.get(),z)))};
WJ=function(l,y,k,z){l.Z().fE(y,z);k=k();l=l.Z();l.Av.Z("ADS_CLIENT_EVENT_TYPE_OPPORTUNITY_PROCESSED",y,z,k);for(const A of k)a:{y=l;va(y.Av,"ADS_CLIENT_EVENT_TYPE_SLOT_RECEIVED",A);va(y.Av,"ADS_CLIENT_EVENT_TYPE_SCHEDULE_SLOT_REQUESTED",A);try{var r=y.Z;if(g.G0(A.slotId))throw new F("Slot ID was empty",void 0,"ADS_CLIENT_ERROR_MESSAGE_INVALID_SLOT");if(s0(r,A))throw new F("Duplicate registration for slot.",{slotId:A.slotId,slotEntryTriggerType:A.slotEntryTrigger.triggerType},"ADS_CLIENT_ERROR_MESSAGE_DUPLICATE_SLOT");
if(!r.Ud.Ik.has(A.slotType))throw new F("No fulfillment adapter factory registered for slot of type: "+A.slotType,void 0,"ADS_CLIENT_ERROR_MESSAGE_NO_FULFILLMENT_ADAPTER_REGISTERED");if(!r.Ud.wN.has(A.slotType))throw new F("No SlotAdapterFactory registered for slot of type: "+A.slotType,void 0,"ADS_CLIENT_ERROR_MESSAGE_NO_SLOT_ADAPTER_REGISTERED");wU(r,"TRIGGER_CATEGORY_SLOT_ENTRY",A.slotEntryTrigger?[A.slotEntryTrigger]:[]);wU(r,"TRIGGER_CATEGORY_SLOT_FULFILLMENT",A.slotFulfillmentTriggers);wU(r,
"TRIGGER_CATEGORY_SLOT_EXPIRATION",A.slotExpirationTriggers);var Z=y.Z;const Q=`${A.slotType}_${A.slotPhysicalPosition}`,t=RA(Z,Q);if(s0(Z,A))throw new F("Duplicate slots not supported",void 0,"ADS_CLIENT_ERROR_MESSAGE_DUPLICATE_SLOT");t.set(A.slotId,new cZP(A));Z.Z.set(Q,t)}catch(Q){Q instanceof F&&Q.NS?(Z_(y.Av,"ADS_CLIENT_ERROR_TYPE_REGISTER_SLOT_FAILED",Q.NS,A),EP(Q,A,void 0,void 0,Q.Q2)):(Z_(y.Av,"ADS_CLIENT_ERROR_TYPE_REGISTER_SLOT_FAILED","ADS_CLIENT_ERROR_MESSAGE_UNEXPECTED_ERROR",A),EP(Q,
A));break a}s0(y.Z,A).S=!0;try{var e=y.Z;const Q=s0(e,A),t=A.slotEntryTrigger,O=e.Ud.nA.get(t.triggerType);O&&(O.iI("TRIGGER_CATEGORY_SLOT_ENTRY",t,A,null),Q.b0.set(t.triggerId,O));for(const h of A.slotFulfillmentTriggers){const U=e.Ud.nA.get(h.triggerType);U&&(U.iI("TRIGGER_CATEGORY_SLOT_FULFILLMENT",h,A,null),Q.C_.set(h.triggerId,U))}for(const h of A.slotExpirationTriggers){const U=e.Ud.nA.get(h.triggerType);U&&(U.iI("TRIGGER_CATEGORY_SLOT_EXPIRATION",h,A,null),Q.D.set(h.triggerId,U))}const d=e.Ud.Ik.get(A.slotType).get().build(e.N,
A);Q.K=d;const w=e.Ud.wN.get(A.slotType).get().build(e.J,A);w.init();Q.C=w}catch(Q){Q instanceof F&&Q.NS?(Z_(y.Av,"ADS_CLIENT_ERROR_TYPE_SCHEDULE_SLOT_FAILED",Q.NS,A),EP(Q,A,void 0,void 0,Q.Q2)):(Z_(y.Av,"ADS_CLIENT_ERROR_TYPE_SCHEDULE_SLOT_FAILED","ADS_CLIENT_ERROR_MESSAGE_UNEXPECTED_ERROR",A),EP(Q,A));DQ(y,A,!0);break a}va(y.Av,"ADS_CLIENT_EVENT_TYPE_SLOT_SCHEDULED",A);y.Z.iE(A);for(const Q of y.C)Q.iE(A);yd(y,A)}};
FKC=function(l,y){var k=0x8000000000000;let z=0,r=0x8000000000000;for(const Q of y.slotFulfillmentTriggers){if(!(Q instanceof s7)){EP("Found unexpected fulfillment trigger for throttled slot.",y,null,{fulfillmentTrigger:Q});continue}const t=Q.Z.start;k=Math.min(k,t);z=Math.max(z,Q.Z.end);Q.visible&&(r=Math.min(r,t))}const {startMs:Z,endMs:e,Vv:A}={startMs:k,endMs:z,Vv:r<0x8000000000000&&k<r?r:void 0};k=`${"throttledadcuerange"}:${y.slotId}`;l.Z.set(k,y);y=iR(l.context.p_.get(),"use_cue_range_marker_position")?
A:void 0;l.VE.get().addCueRange(k,Z,e,!1,l,void 0,void 0,void 0,y)};
cm=function(l,y){for(const k of l.q7.values())if(k.layoutId===y)return!0;return!1};
CE=function(l,y){for(const k of l.Z.values())for(const z of k)if(z.layoutId===y)return z;EP("Trying to retrieve an unknown layout",void 0,void 0,{isEmpty:String(g.G0(y)),layoutId:y})};
b_=function(l,y){const k=[];for(const z of l.I7.values()){const r=z.trigger;r instanceof o5&&r.triggeringLayoutId===y&&k.push(z)}k.length?lR(l.G5(),k):EP("Survey is submitted but no registered triggers can be activated.")};
u_=function(l,y){const k=[];for(const z of l.I7.values())z.trigger.Z===y.layoutId&&k.push(z);k.length&&lR(l.Z(),k)};
CXy=function(l,y,k,z,r,Z,e,A,Q,t){if(O1(l.wb.get(),1).clientPlaybackNonce!==Q)throw new F("Cannot register CueRange-based trigger for different content CPN",{trigger:k});l.I7.set(k.triggerId,{PH:new xL(y,k,z,r),cueRangeId:Z});l.VE.get().addCueRange(Z,e,A,t,l)};
bvz=function(l,y){for(const [k,z]of l.I7.entries())if(l=k,y===z.cueRangeId)return l;return""};
uH_=function(l,y){const k=[];for(const z of l.values())z.slot.slotId===y&&k.push(z);return k};
jL=function(l,y){y=y.layoutId;const k=[];for(const r of l.I7.values())if(r.trigger instanceof Sa){var z;if(z=r.trigger.layoutId===y)z=(z=Uuy.get(r.category))?z==="normal":!1;z&&k.push(r)}k.length&&lR(l.Z(),k)};
mA=function(l,y,k,z,r){const Z=[];for(const e of l.I7.values()){const A=e.trigger,Q=e.slot;if(A.triggerType===y){if(A instanceof l5||A instanceof yF||A instanceof ks){if(r&&A.breakDurationMs!==k)continue;if(!r&&A.breakDurationMs===k)continue;if(z.has(Q.slotId))continue}Z.push(e)}}Z.length>0&&lR(l.S(),Z)};
x8z=function(l,y){y=(y.yK+1)*1E3;let k=void 0;for(const {trigger:z,slot:r}of l.I7.values())z instanceof l5&&z.breakDurationMs<=y&&(!k||z.breakDurationMs>k.trigger.breakDurationMs)&&(k={slot:r,trigger:z});return k};
m8C=function(l){const y=[];for(const {trigger:k}of l.I7.values())k instanceof l5&&y.push(k.breakDurationMs);return y};
qv=function(l){l.Z=null;l.I7.clear();l.C&&l.C.stop();l.J&&l.J.stop();l.N?.stop();delete l.N};
W9e=function(l){Fs(l.Se.get(),"ads_ce",`bdc.${m8C(l).length};fi.${!!l.Z};fet.${!!l.C}`);l.Z&&(l.V=!0,l.C&&(l.C.stop(),l.C.start()),qbC(l,"TRIGGER_TYPE_PREFETCH_CACHE_EXPIRED"))};
IuC=function(l){l=l.adPlacementRenderer.config.adPlacementConfig;if(l.prefetchModeConfig&&l.prefetchModeConfig.cacheFetchRefreshDurationMs&&(l=Number(l.prefetchModeConfig.cacheFetchRefreshDurationMs),!(isNaN(l)||l<=0)))return l};
qbC=function(l,y){const k=[];for(const z of l.I7.values())z.trigger.triggerType===y&&k.push(z);k.length>0&&lR(l.S(),k)};
Tc5=function(l){l=l.adPlacementRenderer.config.adPlacementConfig;if(!l.prefetchModeConfig||!l.prefetchModeConfig.cacheFetchSmearingDurationMs)return 0;l=Number(l.prefetchModeConfig.cacheFetchSmearingDurationMs);return isNaN(l)||l<=0?0:Math.floor(Math.random()*l)};
VGy=function(l,y){const k=[];if(y=l.Z.get(y.layoutId))for(const z of y)(y=l.C.get(z.triggerId))&&k.push(y);return k};
Ii=function(l){switch(l){case "AD_PLACEMENT_KIND_START":return"LATENCY_AD_BREAK_TYPE_PREROLL";case "AD_PLACEMENT_KIND_MILLISECONDS":case "AD_PLACEMENT_KIND_COMMAND_TRIGGERED":case "AD_PLACEMENT_KIND_CUE_POINT_TRIGGERED":return"LATENCY_AD_BREAK_TYPE_MIDROLL";case "AD_PLACEMENT_KIND_END":return"LATENCY_AD_BREAK_TYPE_POSTROLL";default:return"LATENCY_AD_BREAK_TYPE_UNKNOWN"}};
PXT=function(l){switch(l){case "LAYOUT_TYPE_ENDCAP":return"adVideoEnd";case "LAYOUT_TYPE_SURVEY":return"surveyAd";case "LAYOUT_TYPE_VIDEO_INTERSTITIAL_BUTTONED_LEFT":return"surveyInterstitialAd";default:return"unknown"}};
JZq=function(l,y){const k={slotId:I0(y,"SLOT_TYPE_IN_PLAYER"),slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,slotEntryTrigger:void 0,slotFulfillmentTriggers:[],slotExpirationTriggers:[],f_:"surface",clientMetadata:new nq([])};y=UH(y,"LAYOUT_TYPE_TEXT_BANNER_OVERLAY",k.slotId);y={layoutId:y,layoutType:"LAYOUT_TYPE_TEXT_BANNER_OVERLAY",NW:new Map,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],
f_:"surface",clientMetadata:new nq([]),KP:Anz(!1,k.slotId,k.slotType,k.slotPhysicalPosition,k.f_,k.slotEntryTrigger,k.slotFulfillmentTriggers,k.slotExpirationTriggers,y,"LAYOUT_TYPE_TEXT_BANNER_OVERLAY","surface")};return{...l,uK:!0,slot:k,layout:y}};
vu_=function(l,y,k,z){var r=l.kind;z=z?!1:!l.hideCueRangeMarker;switch(r){case "AD_PLACEMENT_KIND_START":return z={P7:new xa(-0x8000000000000,-0x8000000000000),aL:z},k!=null&&(z.NG=new xa(-0x8000000000000,-0x8000000000000)),z;case "AD_PLACEMENT_KIND_END":return z={P7:new xa(0x7ffffffffffff,0x8000000000000),aL:z},k!=null&&(z.NG=new xa(Math.max(0,y-k),0x8000000000000)),z;case "AD_PLACEMENT_KIND_MILLISECONDS":r=l.adTimeOffset;r.offsetStartMilliseconds||EP("AD_PLACEMENT_KIND_MILLISECONDS missing start milliseconds.");
r.offsetEndMilliseconds||EP("AD_PLACEMENT_KIND_MILLISECONDS missing end milliseconds.");l=Number(r.offsetStartMilliseconds);r=Number(r.offsetEndMilliseconds);r===-1&&(r=y);if(Number.isNaN(l)||Number.isNaN(r)||l>r)return new F("AD_PLACEMENT_KIND_MILLISECONDS endMs needs to be >= startMs.",{offsetStartMs:l,offsetEndMs:r},"ADS_CLIENT_ERROR_MESSAGE_AD_PLACEMENT_END_SHOULD_GREATER_THAN_START",r===y&&l-500<=r);z={P7:new xa(l,r),aL:z};if(k!=null){l=Math.max(0,l-k);if(l===r)return z;z.NG=new xa(l,r)}return z;
default:return new F("AdPlacementKind not supported in convertToRange.",{kind:r,adPlacementConfig:l})}};
Yb4=function(l){if(!l||!l.adPlacements&&!l.adSlots)return!1;for(const y of l.adPlacements||[]){if(!y)continue;const k=y.adPlacementRenderer;if(k!=null&&(k.config&&k.config.adPlacementConfig&&k.config.adPlacementConfig.kind)==="AD_PLACEMENT_KIND_START")return!0}for(const y of l.adSlots||[])if(g.E(y,xt)?.adSlotMetadata?.triggerEvent==="SLOT_TRIGGER_EVENT_BEFORE_CONTENT")return!0;return!1};
I0=function(l,y){if(Wm(l.p_.get())){let k=l.C.get(y)||0;k++;l.C.set(y,k);return`${y}_${k}`}return g.tW(16)};
zS=function(l,y){if(Wm(l.p_.get())){let k=l.N.get(y)||0;k++;l.N.set(y,k);return`${y}_${k}`}return g.tW(16)};
UH=function(l,y,k){if(Wm(l.p_.get())){let z=l.Z.get(y)||0;z++;l.Z.set(y,z);return`${k}_${y}_${z}`}return g.tW(16)};
K9q=function(l){const y=[new S7(l.Wj),new pSP(l.UF),new e7(l.adPlacementConfig),new UN(l.videoLengthSeconds),new wY(l.UJ)];l.instreamAdPlayerOverlayRenderer&&y.push(new Cw(l.instreamAdPlayerOverlayRenderer));l.playerOverlayLayoutRenderer&&y.push(new b5(l.playerOverlayLayoutRenderer));l.c_&&y.push(new N$(l.c_));return y};
gOC=function(l,y,k,z,r,Z){l=k.inPlayerLayoutId?k.inPlayerLayoutId:UH(Z,"LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY",l);const e=k.instreamAdPlayerOverlayRenderer?k.instreamAdPlayerOverlayRenderer?.adLayoutLoggingData:k.playerOverlayLayoutRenderer?.adLayoutLoggingData,A={layoutId:l,layoutType:"LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY",f_:y};return{layoutId:l,layoutType:"LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY",NW:new Map,layoutExitNormalTriggers:[new E7(Q=>zS(Z,Q),k.Wj)],
layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],f_:y,clientMetadata:z,KP:r(A),adLayoutLoggingData:e}};
Ps_=function(l,y,k,z,r,Z,e,A,Q){z.every(O=>pq(O,[],["LAYOUT_TYPE_MEDIA"]))||EP("Unexpect subLayout type for DAI composite layout");
y=UH(l.C.get(),"LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES",y);const t={layoutId:y,layoutType:"LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES",f_:"core"};return{layoutId:y,layoutType:"LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES",NW:new Map,layoutExitNormalTriggers:[new Dh(l.Z)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],f_:"core",clientMetadata:new nq([new X2(k),new cv(A),new yZy(z),new e7(r),new mZ(Z),new ID,new $lz(Q)]),KP:e(t)}};
n9T=function(l,y,k,z,r,Z,e,A,Q,t,O){l=EOy(l,y,"core",k,z,r,Z,e,A,Q,t,void 0,O);return{layoutId:l.layoutId,layoutType:l.layoutType,NW:l.NW,layoutExitNormalTriggers:l.layoutExitNormalTriggers,layoutExitSkipTriggers:l.layoutExitSkipTriggers,layoutExitMuteTriggers:l.layoutExitMuteTriggers,layoutExitUserInputSubmittedTriggers:l.layoutExitUserInputSubmittedTriggers,layoutExitUserCancelledTriggers:l.layoutExitUserCancelledTriggers,f_:l.f_,clientMetadata:new nq(l.KC),KP:l.KP,adLayoutLoggingData:l.adLayoutLoggingData}};
Ys=function(l,y,k,z,r){const Z=K9q(z);return gOC(y,k,z,new nq(Z),r,l.C.get())};
N8e=function(l,y,k,z,r,Z){k=new nq([new fu4(k),new e7(z)]);y=UH(l.C.get(),"LAYOUT_TYPE_UNDERLAY_TEXT_ICON_BUTTON",y);z={layoutId:y,layoutType:"LAYOUT_TYPE_UNDERLAY_TEXT_ICON_BUTTON",f_:"core"};return{layoutId:y,layoutType:"LAYOUT_TYPE_UNDERLAY_TEXT_ICON_BUTTON",NW:new Map,layoutExitNormalTriggers:[new E7(e=>zS(l.C.get(),e),r)],
layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],f_:"core",clientMetadata:k,KP:Z(z),adLayoutLoggingData:void 0}};
gFg=function(l,y,k,z,r,Z,e,A,Q,t,O,d){l=ts(l,y,k,z,r,Z,e,A,O,d);y=l.q1;k=new vv(l.sX);z=l.layoutExitSkipTriggers;Q>0&&(y.push(k),y.push(new DG(Q)),z=[]);y.push(new Bv(t));return{Om:{layoutId:l.layoutId,layoutType:l.layoutType,NW:l.NW,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],f_:l.f_,clientMetadata:new nq(y),KP:l.KP,adLayoutLoggingData:l.adLayoutLoggingData},D$:z,Q5:l.layoutExitMuteTriggers,
rj:l.layoutExitUserInputSubmittedTriggers,QJ:l.layoutExitUserCancelledTriggers,Xg:l.Xg}};
SVg=function(l,y,k,z,r,Z,e,A,Q){y=ts(l,y,k,z,r,new Map,Z,t=>e(t,A));
l=new o5(l.Z,y.sX);k=new vv(y.sX);Q=new Bv(Q);return{Om:{layoutId:y.layoutId,layoutType:y.layoutType,NW:y.NW,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],f_:y.f_,clientMetadata:new nq([...y.q1,k,Q]),KP:y.KP,adLayoutLoggingData:y.adLayoutLoggingData},D$:y.layoutExitSkipTriggers,Q5:y.layoutExitMuteTriggers,rj:[...y.layoutExitUserInputSubmittedTriggers,l],QJ:y.layoutExitUserCancelledTriggers,
Xg:y.Xg}};
lug=function(l,y,k,z,r,Z,e,A,Q,t,O,d,w){y=EOy(l,y,"adapter",k,z,r,Z,e,A,Q,O,d,w);z=y.layoutExitSkipTriggers;r=y.KC;k.adPodSkipTarget&&k.adPodSkipTarget>0&&(r.push(t),r.push(new DG(k.adPodSkipTarget)),z=[]);r.push(new Bv(A.adPodIndex));k.isCritical&&(z=[new f0(l.Z,y.layoutId,["error"]),...z]);return{Om:{layoutId:y.layoutId,layoutType:y.layoutType,NW:y.NW,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],
f_:y.f_,clientMetadata:new nq(r),KP:y.KP,adLayoutLoggingData:y.adLayoutLoggingData},D$:z,Q5:y.layoutExitMuteTriggers,rj:y.layoutExitUserInputSubmittedTriggers,QJ:y.layoutExitUserCancelledTriggers}};
nO_=function(l,y,k,z,r){const Z=K9q(z);Z.push(new jLz(z.YP));Z.push(new Sbg(z.ZG));return gOC(y,k,z,new nq(Z),r,l.C.get())};
hs=function(l,y,k,z,r,Z,e,A,Q,t){y=UH(l.C.get(),k,y);const O={layoutId:y,layoutType:k,f_:"core"},d=new Map;e&&d.set("impression",e);e=[new H3(l.Z,r,"SLOT_TYPE_PLAYER_BYTES","LAYOUT_TYPE_MEDIA")];t&&e.push(new f0(l.Z,t,["normal"]));return{layoutId:y,layoutType:k,NW:d,layoutExitNormalTriggers:e,layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],f_:"core",clientMetadata:new nq([z,new e7(Z),new S7(r)]),KP:A(O),adLayoutLoggingData:Q}};
GS=function(l,y,k,z,r,Z,e,A,Q){y=UH(l.C.get(),k,y);const t={layoutId:y,layoutType:k,f_:"core"},O=[new H3(l.Z,r,"SLOT_TYPE_PLAYER_BYTES","LAYOUT_TYPE_MEDIA")];Q&&O.push(new f0(l.Z,Q,["normal"]));return{layoutId:y,layoutType:k,NW:new Map,layoutExitNormalTriggers:O,layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],f_:"core",clientMetadata:new nq([z,new e7(Z),new S7(r)]),KP:e(t),adLayoutLoggingData:A}};
As=function(l,y,k){const z=[];z.push(new Id(l.Z,k));y&&z.push(y);return z};
e3=function(l,y,k,z,r,Z,e){const A={layoutId:y,layoutType:k,f_:"core"};return{layoutId:y,layoutType:k,NW:new Map,layoutExitNormalTriggers:e,layoutExitSkipTriggers:[new Ne(l.Z,y)],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],f_:"core",clientMetadata:new nq([new F9s(z),new e7(r)]),KP:Z(A),adLayoutLoggingData:z.adLayoutLoggingData}};
dY=function(l,y,k,z,r,Z,e,A){const Q={layoutId:y,layoutType:Z,f_:"core"};return{layoutId:y,layoutType:Z,NW:new Map,layoutExitNormalTriggers:[new E7(l.Z,k)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],f_:"core",clientMetadata:new nq([new e7(z),...e]),KP:r(Q),adLayoutLoggingData:A}};
ts=function(l,y,k,z,r,Z,e,A,Q,t){y=UH(l.C.get(),"LAYOUT_TYPE_MEDIA_BREAK",y);const O={layoutId:y,layoutType:"LAYOUT_TYPE_MEDIA_BREAK",f_:"adapter"};A=A(y);const d=A.clientMetadata.aR("metadata_type_fulfilled_layout");d||EP("Could not retrieve overlay layout ID during VodSkippableMediaBreakLayout creation. This should never happen.");const w=d?d.layoutId:"";k=[new e7(k),new yV(z),new hS(r)];d&&k.push(new kL(d.layoutType));t&&k.push(new VF(t));return{layoutId:y,layoutType:"LAYOUT_TYPE_MEDIA_BREAK",
NW:Z,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[new n0(l.Z,w)],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],f_:"adapter",q1:k,KP:e(O),adLayoutLoggingData:Q,Xg:A,sX:w}};
EOy=function(l,y,k,z,r,Z,e,A,Q,t,O,d,w){const h={layoutId:y,layoutType:"LAYOUT_TYPE_MEDIA",f_:k};r=[new e7(r),new xs(Q),new u5(z.externalVideoId),new i5(A),new hS({impressionCommands:z.impressionCommands,abandonCommands:z.onAbandonCommands,completeCommands:z.completeCommands,progressCommands:z.adVideoProgressCommands}),new M$(Z),new Wv({current:null}),new UN(e)];(Z=z.playerOverlay.instreamAdPlayerOverlayRenderer)&&r.push(new Cw(Z));(e=z.playerOverlay.playerOverlayLayoutRenderer)&&r.push(new b5(e));
d&&r.push(new MY_(d));(d=z.playerUnderlay)&&r.push(new fu4(d));A=I0(l.C.get(),"SLOT_TYPE_IN_PLAYER");d=(d=Z?Z.elementId:e?.layoutId)?d:UH(l.C.get(),"LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY",A);r.push(new vv(d));r.push(new aAT(A));r.push(new VF(Q.adPodIndex));z.adNextParams&&r.push(new Hv(z.adNextParams));z.shrunkenPlayerBytesConfig&&r.push(new oOQ(z.shrunkenPlayerBytesConfig));z.clickthroughEndpoint&&r.push(new RD(z.clickthroughEndpoint));z.legacyInfoCardVastExtension&&r.push(new Xst(z.legacyInfoCardVastExtension));
z.sodarExtensionData&&r.push(new q$(z.sodarExtensionData));O&&r.push(new l_(O));r.push(new TV(N6(z.pings)));Q=sH(z.pings);if(w){a:{for(U of w)if(U.adSlotMetadata.slotType==="SLOT_TYPE_PLAYER_UNDERLAY"){w=g.E(U.fulfillmentContent.fulfilledLayout,b$);if(!w)continue;if((w=g.E(w.renderingContent,c3))&&w.associatedPlayerBytesLayoutId===y)break a}var U=void 0}U&&r.push(new UlC(U))}return{layoutId:y,layoutType:"LAYOUT_TYPE_MEDIA",NW:Q,layoutExitNormalTriggers:[new Sa(l.Z,y)],layoutExitSkipTriggers:z.skipOffsetMilliseconds?
[new n0(l.Z,d)]:[],layoutExitMuteTriggers:[new n0(l.Z,d)],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],f_:k,KC:r,KP:t(h),adLayoutLoggingData:z.adLayoutLoggingData}};
qwC=function(l){return l!=null};
k6T=function(l,y,k,z,r){const Z=I0(l.C.get(),y);return TS(l,Z,y,new K0(l.Z,k),[new Yt(l.Z,k),new p0(l.Z,Z)],z,r)};
$Pq=function(l,y,k,z,r,Z,e){const A=I0(l.C.get(),y);return TS(l,A,y,new f0(l.Z,r,["normal"]),[new Yt(l.Z,k),new p0(l.Z,A),new f0(l.Z,z,["error"])],Z,e)};
Qfg=function(l,y,k,z,r,Z){const e=I0(l.C.get(),y);return TS(l,e,y,new v3(l.Z,z),[new Yt(l.Z,k),new p0(l.Z,e),new f0(l.Z,z,["error"])],r,Z)};
dPQ=function(l,y,k,z,r){return Nc_(l,y,k,z,r)};
aYQ=function(l,y,k,z,r){const Z=I0(l.C.get(),"SLOT_TYPE_IN_PLAYER");k=new VV(l.Z,z,k);z=[new Fd(l.Z,Z)];l=[new Yt(l.Z,y)];return{slotId:Z,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,slotEntryTrigger:k,slotFulfillmentTriggers:z,slotExpirationTriggers:l,f_:"core",clientMetadata:new nq([new rX(r({slotId:Z,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,f_:"core",slotEntryTrigger:k,slotFulfillmentTriggers:z,slotExpirationTriggers:l}))])}};
XDt=function(l,y,k,z){const r=I0(l.C.get(),"SLOT_TYPE_IN_PLAYER");k=new v3(l.Z,k);var Z=[new Fd(l.Z,r)];const e=[new p0(l.Z,r),new Yt(l.Z,y)];Z={slotId:r,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,f_:"core",slotEntryTrigger:k,slotFulfillmentTriggers:Z,slotExpirationTriggers:e};return{slotId:r,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,slotEntryTrigger:k,slotFulfillmentTriggers:[new Fd(l.Z,r)],slotExpirationTriggers:[new Yt(l.Z,y),new p0(l.Z,r)],f_:"core",clientMetadata:new nq([new rX(z(Z))])}};
Wb_=function(l,y,k,z,r){const Z=I0(l.C.get(),"SLOT_TYPE_PLAYER_BYTES"),e=new R5(l.Z),A=[new JC(l.Z,Z)];l=[new Yt(l.Z,y)];y=[];y.push(new rX(z({slotId:Z,slotType:"SLOT_TYPE_PLAYER_BYTES",slotPhysicalPosition:1,f_:"core",slotEntryTrigger:e,slotFulfillmentTriggers:A,slotExpirationTriggers:l})));y.push(new ID);r&&y.push(new gY({current:r}));return{slotId:Z,slotType:"SLOT_TYPE_PLAYER_BYTES",slotPhysicalPosition:1,slotEntryTrigger:e,slotFulfillmentTriggers:A,slotExpirationTriggers:l,f_:"core",clientMetadata:new nq(y),
adSlotLoggingData:k}};
pDz=function(l,y,k,z,r,Z,e){const A=I0(l.C.get(),"SLOT_TYPE_IN_PLAYER"),Q=UH(l.C.get(),"LAYOUT_TYPE_TEXT_BANNER_OVERLAY",A);z=sL5(l,z,Z,e,Q);if(z instanceof F)return z;e=[new Fd(l.Z,A)];r=[new Yt(l.Z,Z),new Fd(l.Z,r),new Pm(l.Z,r)];k=S4(k,{slotId:A,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,f_:"core",slotEntryTrigger:z,slotFulfillmentTriggers:e,slotExpirationTriggers:r});l=l.N.get();Z={layoutId:Q,layoutType:"LAYOUT_TYPE_TEXT_BANNER_OVERLAY",f_:"core"};y={layoutId:Q,layoutType:"LAYOUT_TYPE_TEXT_BANNER_OVERLAY",
NW:new Map,layoutExitNormalTriggers:[new L9Q(l.Z,Q,y.durationMs)],layoutExitSkipTriggers:[new vO4(l.Z,Q,y.durationMs)],layoutExitUserCancelledTriggers:[new Bcg(l.Z,Q)],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],f_:"core",clientMetadata:new nq([new Hvg(y)]),KP:k(Z)};return{slotId:A,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,f_:"core",slotEntryTrigger:z,slotFulfillmentTriggers:e,slotExpirationTriggers:r,clientMetadata:new nq([new rX(y)])}};
fYy=function(l,y,k,z,r){y=Bz5(l,y);l=Ox(l,y,k);r=r({slotId:l.slotId,slotType:l.slotType,slotPhysicalPosition:l.slotPhysicalPosition,slotEntryTrigger:l.slotEntryTrigger,slotFulfillmentTriggers:l.slotFulfillmentTriggers,slotExpirationTriggers:l.slotExpirationTriggers,f_:l.f_});return r instanceof F?r:{jY:{...l,clientMetadata:new nq([new rX(r.layout)]),adSlotLoggingData:z},Si:r.Si}};
jfT=function(l,y,k,z,r,Z,e){k=HmP(l,y,k,z);if(k instanceof F)return k;e=e({slotId:k.slotId,slotType:k.slotType,slotPhysicalPosition:k.slotPhysicalPosition,slotEntryTrigger:k.slotEntryTrigger,slotFulfillmentTriggers:k.slotFulfillmentTriggers,slotExpirationTriggers:k.slotExpirationTriggers,f_:k.f_});if(e instanceof F)return e;l=[new rX(e.layout),new EN({tp:l.tp(y)})];Z&&l.push(new Rgs({}));return{jY:{slotId:k.slotId,slotType:k.slotType,slotPhysicalPosition:k.slotPhysicalPosition,slotEntryTrigger:k.slotEntryTrigger,
slotFulfillmentTriggers:k.slotFulfillmentTriggers,slotExpirationTriggers:k.slotExpirationTriggers,f_:k.f_,clientMetadata:new nq(l),adSlotLoggingData:r},Si:e.Si}};
Fb5=function(l,y,k,z,r){r=r?r:I0(l.C.get(),"SLOT_TYPE_IN_PLAYER");k=new v3(l.Z,k);const Z=[new Fd(l.Z,r)];l=[new Yt(l.Z,y),new p0(l.Z,r)];return{slotId:r,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,slotEntryTrigger:k,slotFulfillmentTriggers:Z,slotExpirationTriggers:l,f_:"core",clientMetadata:new nq([new rX(z({slotId:r,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,f_:"core",slotEntryTrigger:k,slotFulfillmentTriggers:Z,slotExpirationTriggers:l}))])}};
o9z=function(l,y,k,z){const r=I0(l.C.get(),"SLOT_TYPE_PLAYER_UNDERLAY");k=new v3(l.Z,k);const Z=[new Fd(l.Z,r)];l=[new Yt(l.Z,y),new p0(l.Z,r)];return{slotId:r,slotType:"SLOT_TYPE_PLAYER_UNDERLAY",slotPhysicalPosition:1,slotEntryTrigger:k,slotFulfillmentTriggers:Z,slotExpirationTriggers:l,f_:"core",clientMetadata:new nq([new rX(z({slotId:r,slotType:"SLOT_TYPE_PLAYER_UNDERLAY",slotPhysicalPosition:1,f_:"core",slotEntryTrigger:k,slotFulfillmentTriggers:Z,slotExpirationTriggers:l}))])}};
qVe=function(l,y,k,z,r){k=k?"SLOT_TYPE_PLAYER_BYTES_SEQUENCE_ITEM":"SLOT_TYPE_PLAYBACK_TRACKING";const Z=I0(l.C.get(),k);y=new K0(l.Z,y);const e=[new Fd(l.Z,Z)];l=[new p0(l.Z,Z)];return{slotId:Z,slotType:k,slotPhysicalPosition:1,slotEntryTrigger:y,slotFulfillmentTriggers:e,slotExpirationTriggers:l,f_:"core",clientMetadata:new nq([new rX(r({slotId:Z,slotType:k,slotPhysicalPosition:1,f_:"core",slotEntryTrigger:y,slotFulfillmentTriggers:e,slotExpirationTriggers:l}))]),adSlotLoggingData:z}};
Tzq=function(l,y,k,z,r,Z){const e=I0(l.C.get(),"SLOT_TYPE_FORECASTING");y=Js(l,y,k,z);if(y instanceof F)return y;z=[new Fd(l.Z,e)];l=[new p0(l.Z,e),new Yt(l.Z,k)];return{slotId:e,slotType:"SLOT_TYPE_FORECASTING",slotPhysicalPosition:1,slotEntryTrigger:y,slotFulfillmentTriggers:z,slotExpirationTriggers:l,f_:"core",clientMetadata:new nq([new rX(Z({slotId:e,slotType:"SLOT_TYPE_FORECASTING",slotPhysicalPosition:1,f_:"core",slotEntryTrigger:y,slotFulfillmentTriggers:z,slotExpirationTriggers:l}))]),adSlotLoggingData:r}};
Jyt=function(l,y,k,z){const r=I0(l.C.get(),"SLOT_TYPE_IN_PLAYER"),Z=new K0(l.Z,y),e=[new JC(l.Z,r)];l=[new Yt(l.Z,y),new p0(l.Z,r)];return{slotId:r,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,slotEntryTrigger:Z,slotFulfillmentTriggers:e,slotExpirationTriggers:l,f_:"core",clientMetadata:new nq([new rX(z({slotId:r,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,f_:"core",slotEntryTrigger:Z,slotFulfillmentTriggers:e,slotExpirationTriggers:l}))]),adSlotLoggingData:k}};
psq=function(l,y,k,z,r,Z){y=Js(l,y,k,z);if(y instanceof F)return y;const e=y instanceof s7?new RXq(l.Z,k,y.Z):null;z=I0(l.C.get(),"SLOT_TYPE_IN_PLAYER");const A=[new Fd(l.Z,z)];l=[new Yt(l.Z,k),new p0(l.Z,z)];Z=Z({slotId:z,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,f_:"core",slotEntryTrigger:y,slotFulfillmentTriggers:A,slotExpirationTriggers:l},e);return Z instanceof AL?new F(Z):{slotId:z,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,slotEntryTrigger:y,slotFulfillmentTriggers:A,
slotExpirationTriggers:l,f_:"core",clientMetadata:new nq([new rX(Z)]),adSlotLoggingData:r}};
EF5=function(l,y,k,z){const r=I0(l.C.get(),"SLOT_TYPE_IN_PLAYER");return Nc_(l,r,y,k,z)};
k44=function(l,y,k,z,r,Z){const e=I0(l.C.get(),"SLOT_TYPE_PLAYER_BYTES"),A=I0(l.C.get(),"SLOT_TYPE_IN_PLAYER"),Q=UH(l.C.get(),"LAYOUT_TYPE_SURVEY",A);z=Js(l,y,k,z);const t=[new Fd(l.Z,e)];k=[new p0(l.Z,e),new Yt(l.Z,k),new Ne(l.Z,Q)];if(z instanceof F)return z;const {CH:O,QI:d}=Z({slotId:e,slotType:"SLOT_TYPE_PLAYER_BYTES",slotPhysicalPosition:1,f_:"core",slotEntryTrigger:z,slotFulfillmentTriggers:t,slotExpirationTriggers:k},{slotId:A,layoutId:Q});return[{slotId:e,slotType:"SLOT_TYPE_PLAYER_BYTES",
slotPhysicalPosition:1,slotEntryTrigger:z,slotFulfillmentTriggers:t,slotExpirationTriggers:k,f_:"core",clientMetadata:new nq([new rX(O),new EN({tp:l.tp(y)})]),adSlotLoggingData:r},d]};
G4P=function(l,y,k,z,r,Z,e){if(!k.prefetchModeConfig)return new F("AdPlacementConfig for Live Prefetch is missing prefetch_config");k=k.prefetchModeConfig;z*=1E3;const A=[];if(!k.breakLengthMs)return new F("AdPlacementConfig for Live Prefetch is missing break_length_ms");for(const O of k.breakLengthMs)if(Number(O)>0){var Q=z+Number(k.startTimeOffsetMs),t=Q+Number(k.cacheFetchSmearingDurationMs);Q={P7:new xa(t,t+Number(O)),aL:!1,NG:new xa(Math.floor(Q+Math.random()*Number(k.cacheFetchSmearingDurationMs)),
t),cueProcessedMs:z?z:Q};t=[];t.push(new QaQ);const d=[];d.push(new zV(l.Z));d.push(new D84(l.Z));e&&t.push(new ID);A.push(P3(l,y,r,Q,Z,t,d))}return A};
P3=function(l,y,k,z,r,Z=[],e){const A=I0(l.C.get(),"SLOT_TYPE_AD_BREAK_REQUEST");e||(e=[],z.NG&&z.NG.start!==z.P7.start&&e.push(new s7(l.Z,k,new xa(z.NG.start,z.P7.start),!1)),e.push(new s7(l.Z,k,new xa(z.P7.start,z.P7.end),z.aL)));z={getAdBreakUrl:y.getAdBreakUrl,Hb:z.P7.start,rF:z.P7.end,cueProcessedMs:z.cueProcessedMs};y=new YL(l.Z,A);Z=[new HlC(z),...Z];return{slotId:A,slotType:"SLOT_TYPE_AD_BREAK_REQUEST",slotPhysicalPosition:1,slotEntryTrigger:y,slotFulfillmentTriggers:e,slotExpirationTriggers:[new Yt(l.Z,
k),new p0(l.Z,A),new pE(l.Z,A)],f_:"core",clientMetadata:new nq(Z),adSlotLoggingData:r}};
lNQ=function(l,y,k){const z=[];for(const r of k)z.push(r.triggeringSlotId!=null&&r.triggeringSlotId===l?r.clone(y):r);return z};
Nc_=function(l,y,k,z,r){const Z=new v3(l.Z,k),e=[new Fd(l.Z,y)];l=[new p0(l.Z,y),new Yt(l.Z,z)];return{slotId:y,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,slotEntryTrigger:Z,slotFulfillmentTriggers:e,slotExpirationTriggers:l,f_:"core",clientMetadata:new nq([new rX(r({slotId:y,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,f_:"core",slotEntryTrigger:Z,slotFulfillmentTriggers:e,slotExpirationTriggers:l},k))]),adSlotLoggingData:void 0}};
Js=function(l,y,k,z){return yW_(l,y,k,z,(r,Z)=>new s7(l.Z,k,r,Z))};
sL5=function(l,y,k,z,r){return yW_(l,y,k,z,(Z,e)=>new k_5(l.Z,k,Z,e,r))};
TS=function(l,y,k,z,r,Z,e){l=[new JC(l.Z,y)];return{slotId:y,slotType:k,slotPhysicalPosition:1,slotEntryTrigger:z,slotFulfillmentTriggers:l,slotExpirationTriggers:r,f_:"core",clientMetadata:new nq([new rX(e({slotId:y,slotType:k,slotPhysicalPosition:1,f_:"core",slotEntryTrigger:z,slotFulfillmentTriggers:l,slotExpirationTriggers:r}))]),adSlotLoggingData:Z}};
Bz5=function(l,y){return $8Q(l.p_.get())?new f0(l.Z,y,["normal","error","skipped"]):new f0(l.Z,y,["normal"])};
Ox=function(l,y,k){const z=I0(l.C.get(),"SLOT_TYPE_PLAYER_BYTES"),r=[new Fd(l.Z,z)];l=[new p0(l.Z,z),new Yt(l.Z,k)];return{slotId:z,slotType:"SLOT_TYPE_PLAYER_BYTES",slotPhysicalPosition:1,slotEntryTrigger:y,slotFulfillmentTriggers:r,slotExpirationTriggers:l,f_:"core"}};
HmP=function(l,y,k,z){y=Js(l,y,k,z);return y instanceof F?y:Ox(l,y,k)};
yW_=function(l,y,k,z,r){const Z=!y.hideCueRangeMarker;switch(y.kind){case "AD_PLACEMENT_KIND_START":return new K0(l.Z,k);case "AD_PLACEMENT_KIND_MILLISECONDS":return l=vu_(y,z),l instanceof F?l:r(l.P7,Z);case "AD_PLACEMENT_KIND_END":return new L0(l.Z,k,Z);default:return new F("Cannot construct entry trigger",{kind:y.kind})}};
va=function(l,y,k){l.Z(y,void 0,void 0,void 0,k,void 0,void 0,void 0,k.adSlotLoggingData)};
Z_=function(l,y,k,z,r){l.Z("ADS_CLIENT_EVENT_TYPE_ERROR",void 0,void 0,void 0,z,r,void 0,void 0,z.adSlotLoggingData,r?r.adLayoutLoggingData:void 0,{errorType:y,errorMessage:k})};
zs=function(l,y,k,z){l.Z(y,void 0,void 0,void 0,k,z?z:void 0,void 0,void 0,k.adSlotLoggingData,z?z.adLayoutLoggingData:void 0);y=ck().resolve(aW(wc))?.Km();k=y?.adsHotConfig;y?.adsSeenHotConfig?.logOnAdsSeen&&k?.webEnablePremiumAdsSeenLogging&&z7s(l,z?z:void 0)};
ifC=function(l,y,k,z){iR(l.p_.get(),"h5_enable_pacf_debug_logs")&&console.log("[PACF]: ADS_CLIENT_EVENT_TYPE_TRIGGER_ACTIVATED","trigger:",k,"slot:",y,"layout:",z);j4(l.C.get())&&l.Z("ADS_CLIENT_EVENT_TYPE_TRIGGER_ACTIVATED",void 0,void 0,void 0,y,z?z:void 0,void 0,k,y.adSlotLoggingData,z?z.adLayoutLoggingData:void 0)};
z7s=function(l,y){if(y){var k=y.adLayoutLoggingData;g.cs(g.bw(),()=>{l.N?.Z(k)},0)}};
KE=function(l,y){return l.Z.get(y)||null};
rWP=function(){let l,y;return{C5:new gX((k,z)=>{l=k;y=z}),
resolve:l,reject:y}};
fE=function(l){return Ex(l)?l:q9(l)?new gX((y,k)=>{l.then(y,k)}):new gX(y=>{y(l)})};
var Zaq=function(l){return pR[G[19]](this,20,2293,l)};
var j3=function(l){return new gX((y,k)=>{k(l)})},S3=function(l,y=!1){x2(58,6682,l);
if(l[G[15]]!==G[32]){var k=l[G[42]]();k[G[37]](G[70],G[21]);return k}var z=l[G[74]]();k=new g.sX(z);var r=l[G[20]](G[67]);const Z=mv(1,7520,l[G[20]](G[1])||G[3])[G[28]](G[50]);if(r&&Z&&Z[G[2]]>1&&Z[1])return z=k.Z,l=z[G[40]](/^[^.]*/,G[3]),g.vc(k,`${z[G[23]](G[76])===0?G[76]:G[36]}${r}---${Z[1]}${l}`),k=new g.zq(k[G[34]]()),k[G[37]](G[31],G[21]),k;if(y)return k=l[G[42]](),k[G[37]](G[31],G[21]),k;r=k.Z[G[8]](G[75]);k.Z[G[8]](G[56])?(g.vc(k,G[41]),z=k[G[34]]()):k.Z[G[8]](G[44])?(g.vc(k,G[29]),z=k[G[34]]()):
(k=sjP(z),qR(k)&&(z=k));k=new g.zq(z);k[G[37]](G[85],G[21]);r&&k[G[37]](G[60],G[63]);return k};
var e75=function(l){return X7[G[19]](this,41,2213,l)};
var nE=function(l){try{return fE(l())}catch(y){return j3(y)}},AWy=function(l){return new Promise((y,k)=>{FX(l,y,k)})},$9z=async function(l){return AWy(l)},od=function(l){if(l.Z==="fulfilled"){var y=l.C;
l.C=[];l.N=[];for(var k of y)k(l.result)}else if(l.Z==="rejected"){k=l.N;l.C=[];l.N=[];for(y of k)y(l.error)}},FX=function(l,y,k){const {C5:z,
resolve:r,reject:Z}=rWP();l.C.push(e=>{if(y)try{const A=y(e);r(A)}catch(A){Z(A)}else r(e)});
l.N.push(e=>{if(k)try{const A=k(e);r(A)}catch(A){Z(A)}else Z(e)});
od(l);return z},Nv=function(l,y){return FX(l,void 0,y)},QW_=function(l,y){FX(l,k=>FX(fE(y()),()=>k),k=>FX(fE(y()),()=>j3(k)))},sx=function(l,y){return tm_(y.call(l))},LE=function(l){return function*(){return yield{C5:fE(l)}}()},tm_=function(l){return nE(()=>vm(l,l.next()))},vm=function(l,y){return y.done?fE(y.value):Nv(FX(y.value.C5,k=>vm(l,l.next(k))),k=>vm(l,l.throw(k)))},wkC=function(l){const y=OaC(l);
return FX(d9C(y),()=>y.map(k=>k.state()))},d9C=function(l){if(l.length===0)return fE(NaN);
const {C5:y,resolve:k}=rWP();let z=l.length;for(const [r,Z]of l.entries()){const e=r;QW_(Z,()=>{y.Z==="pending"&&(h74(void 0)&&(void 0)(e)&&y.Z==="pending"?k(e):(--z,z===0&&k(NaN)))})}return y},OaC=function(l){return l.map(y=>fE(y))},Hm=function(l){var y=l.hours||0;
var k=l.minutes||0,z=l.seconds||0;y=z+k*60+y*3600+(l.days||0)*86400+(l.weeks||0)*604800+(l.months||0)*2629800+(l.years||0)*31557600;y<=0?y={hours:0,minutes:0,seconds:0}:(l=y,y=Math.floor(l/3600),l%=3600,k=Math.floor(l/60),z=Math.floor(l%60),y={hours:y,minutes:k,seconds:z});const {hours:r=0,minutes:Z=0,seconds:e=0}=y;k=r>0;y=[];if(k){l=(new Intl.NumberFormat("en-u-nu-latn")).format(r);z=["fr"];const A="az bs ca da de el es eu gl hr id is it km lo mk nl pt-BR ro sl sr sr-Latn tr vi".split(" ");l="af be bg cs et fi fr-CA hu hy ka kk ky lt lv no pl pt-PT ru sk sq sv uk uz".split(" ").includes(Bm)?
l.replace(",","\u00a0"):z.includes(Bm)?l.replace(",","\u202f"):A.includes(Bm)?l.replace(",","."):l;y.push(l)}k=G_q(Z,k);y.push(k);k=aNe().format(e);y.push(k);k=":";"da fi id si sr sr-Latn".split(" ").includes(Bm)&&(k=".");return y.join(k)},aNe=function(){return new Intl.NumberFormat("en-u-nu-latn",{minimumIntegerDigits:2})},G_q=function(l,y=!1){return(["af",
"be","lt"].includes(Bm)||y)&&l<10?aNe().format(l):(new Intl.NumberFormat("en-u-nu-latn")).format(l)},iaq=function(l,y){l=l.watchEndpointSupportedAuthorizationTokenConfig?.videoAuthorizationToken?.credentialTransferTokens||[];
for(let k=0;k<l.length;++k)if(l[k].scope===y)return l[k].token||void 0},Rd=function(l){if(l&&l.simpleText)return l.simpleText;
let y="";if(l&&l.runs)for(let k=0;k<l.runs.length;k++)l.runs[k].text&&(y+=l.runs[k].text);return y},Dq=function(l){return l?function(){try{return l.apply(this,arguments)}catch(y){g.n(y)}}:l},ya=function(){lY.instance||(lY.instance=new lY);
return lY.instance},zk=function(){kM.instance||(kM.instance=new kM);
return kM.instance},rQ=function(l,y,k,z={}){g.OJ(()=>{U9P.includes(y)||(g.WH(new g.WO("createClientScreen() called with a non-page VE",y)),y=83769);
z.isHistoryNavigation||l.Z.push({rootVe:y,key:z.key||""});l.A=[];l.D=[];z.Tt?MmC(l,y,k,z):Xk5(l,y,k,z)})()},MmC=function(l,y,k,z={}){l.C.add(z.layer||0);
l.J=()=>{Xk5(l,y,k,z);const r=g.Ur(z.layer);if(r){for(const Z of l.A)Z5(l,Z[0],Z[1]||r,z.layer);for(const Z of l.D)cWz(l,Z[0],Z[1])}};
k||g.MM(z.layer)||l.J();if(z.Tt)for(const r of z.Tt)CPT(l,r,z.layer);else g.n(Error("Delayed screen needs a data promise."))},Xk5=function(l,y,k,z={}){var r=void 0;
z.layer||(z.layer=0);r=z.parentLayer!==void 0?z.parentLayer:z.layer;const Z=g.MM(r);r=g.Ur(r);const e=k||r;let A;e&&(z.parentCsn!==void 0?A={clientScreenNonce:z.parentCsn,visualElement:e}:Z&&Z!=="UNDEFINED_CSN"&&(A={clientScreenNonce:Z,visualElement:e}));let Q;const t=g.Y("EVENT_ID");Z==="UNDEFINED_CSN"&&t&&(Q={servletData:{serializedServletEventId:t}});g.EJ("combine_ve_grafts")&&Z&&ev(l,Z);g.EJ("no_client_ve_attach_unless_shown")&&e&&Z&&oN(e,Z);let O;try{O=acC(l.client,y,A,z.lL,z.cttAuthInfo,Q,z.implicitGestureType,
z.loggingExpectations,z.automatedLogEventSource)}catch(w){PH(w,{lV:y,rootVe:r,iER:k,qrj:Z,f50:A,lL:z.lL});g.n(w);return}jKg(O,y,z.layer,z.cttAuthInfo);Z&&Z!=="UNDEFINED_CSN"&&r&&!g7Q(Z)&&USy(l.client,Z,r,!0);l.Z[l.Z.length-1]&&!l.Z[l.Z.length-1].csn&&(l.Z[l.Z.length-1].csn=O||"");g.YV({clientScreenNonce:O});A$.instance||(A$.instance=new A$);g.OJ(ya().Z).bind(ya())();const d=g.Ur(z.layer);Z&&Z!=="UNDEFINED_CSN"&&d&&g.EJ("music_web_mark_root_visible")&&g.HH(O,d);l.C.delete(z.layer||0);l.J=void 0;l.sj.get(z.layer)?.forEach((w,
h)=>{w?Z5(l,h,w,z.layer):d&&Z5(l,h,d,z.layer)});
baP(l)},CPT=function(l,y,k=0){g.OJ(()=>{y.then(z=>{l.C.has(k)&&l.J&&l.J();
const r=g.MM(k),Z=g.Ur(k);if(r&&Z){var e={automatedLogEventSource:3};z?.response?.trackingParams&&g.nz(l.client,r,Z,g.Gd(z.response.trackingParams),!1,e);z?.playerResponse?.trackingParams&&g.nz(l.client,r,Z,g.Gd(z.playerResponse.trackingParams),!1,e)}})})()},Z5=function(l,y,k,z=0){return g.OJ(()=>{if(l.C.has(z))return l.A.push([y,
k]),!0;const r=g.MM(z),Z=k||g.Ur(z);if(r&&Z){if(g.EJ("combine_ve_grafts")){const e=l.V.get(Z.toString());e?e.push(y):(l.K.set(Z.toString(),Z),l.V.set(Z.toString(),[y]));l.Y||(l.Y=g.cs(0,()=>{ev(l,r)},1200))}else g.nz(l.client,r,Z,y);
return!0}return!1})()},$M=function(l){var y=zk();
g.OJ(()=>{const k=g.Gd(l);Z5(y,k);return k})()},u1q=function(l){var y={veType:253246};
return g.OJ(()=>{if(!y.veType)return qM(new g.WO("Error: Trying to graft a client VE without a veType.")),null;if(y.visibilityTypes){var k=y.visibilityTypes.reduce((z,r)=>z|r);
k={visibility:{types:String(k)}}}k=aN(y.veType,y.visualElement,y.elementIndex,y.clientYouTubeData,void 0,k);return Z5(l,k)?k:null})()},ev=function(l,y){if(y===void 0){const k=pLz();
for(let z=0;z<k.length;z++)k[z]!==void 0&&ev(l,k[z])}else l.V.forEach((k,z)=>{(z=l.K.get(z))&&g.S0(l.client,y,z,k)}),l.V.clear(),l.K.clear(),l.Y=void 0},x9z=function(l,y){const k=g.MM(0);
k&&Lz(l.client,k,y,void 0)},m9Q=function(l,y,k,z=0){if(!y)return!1;
z=g.MM(z);if(!z)return!1;Lz(l.client,z,g.Gd(y),k);return!0},cWz=function(l,y,k,z=0){const r=g.MM(z);
y=y||g.Ur(z);r&&y&&(l=l.client,z=gv({cttAuthInfo:Xu(r)||void 0},r),k={csn:r,ve:y.getAsJson(),clientData:k},r==="UNDEFINED_CSN"?NM("visualElementStateChanged",z,k):l?Or("visualElementStateChanged",k,l,z):g.wv("visualElementStateChanged",k,z))},baP=function(l){for(var y=0;y<l.S.length;y++){var k=l.S[y];
try{k()}catch(z){g.n(z)}}l.S.length=0;for(y=0;y<l.C_.length;y++){k=l.C_[y];try{k()}catch(z){g.n(z)}}},qYP=function(){Qa.instance||(Qa.instance=new Qa);
return Qa.instance},WRQ=function(l,y,k){const z=new XMLHttpRequest;
k?.A8&&(z.onreadystatechange=r=>{k.A8(z,r)});
z.open(y.method??"GET",l,!0);z.responseType="text";z.withCredentials=!0;if(y.headers)for(const [r,Z]of Object.entries(y.headers))z.setRequestHeader(r,Z);return z},INP=function(){const l=navigator;
return new Promise((y,k)=>{l.webkitTemporaryStorage?.queryUsageAndQuota?l.webkitTemporaryStorage.queryUsageAndQuota((z,r)=>{y({usage:z,quota:r})},z=>{k(z)}):k(Error("webkitTemporaryStorage is not supported."))})},VmC=function(l,y){t$.getInstance().estimate().then(k=>{l.Z("idbQuotaExceeded",{...y,
isSw:self.document===void 0,isIframe:self!==self.top,deviceStorageUsageMbytes:TCq(k?.usage),deviceStorageQuotaMbytes:TCq(k?.quota)})})},TCq=function(l){return typeof l==="undefined"?"-1":String(Math.ceil(l/1048576))},JWt=function(){const l=g.wz();
return l.G7(192)?l.G7(190):!(g.EJ("web_watch_cinematics_disabled_by_default")||g.EJ("web_watch_cinematics_preferred_reduced_motion_default_disabled")&&PPg())},pky=function(l,y){YYq(l.program,y.iC)&&(Eo("bg_i",void 0,"player_att"),g.Oa.initialize(l,()=>{Eo("bg_l",void 0,"player_att");
dQ=(0,g.f)()},y.cspNonce,y.nS))},KRC=function(l={}){return g.Oa.invoke(l)};
var g6s=function(){return dl[G[19]](this,1,6772)};
YYq=function(l,y){if(l){var k;g.Oa.isLoading()?k=!1:k=!dQ||(0,g.f)()-dQ>y;l=k}else l=!1;return l};
E65=function(l,y){if(y.partnerId===38&&l.playerStyle==="books")return l=y.videoId.indexOf(":"),g.UI(`//play.google.com/books/volumes/${y.videoId.slice(0,l)}/content/media`,{aid:y.videoId.slice(l+1),sig:y.U9});if(y.partnerId===30&&l.playerStyle==="docs")return g.UI("https://docs.google.com/get_video_info",{docid:y.videoId,authuser:y.K$,authkey:y.Vl,eurl:l.Cp});if(y.partnerId===33&&l.playerStyle==="google-live")return g.UI("//google-liveplayer.appspot.com/get_video_info",{key:y.videoId});throw Error("getVideoInfoUrl for invalid namespace: "+
l.C_);};
wQ=function(l,y,k,z,r){var Z=y^l;if((l+3&14)<l&&(l+6&20)>=l){var e=k[G[2]];z[G[Z^5825]](function(Q,t,O){this[G[Z^5769]](O[t]=k[(k[G[Z^5764]](Q)-k[G[Z^5764]](this[t])+t+e--)%k[G[2]]])},r[G[Z^5775]](G[3]))}if((l&43)==l){x2(Z^4120,Z^2616,k);
var A=k[G[Z^4154]]}return A};
g.h$=function(l,y){return l.nS+"timedtext_video?ref=player&v="+y.videoId};
fN4=function(l){const y={};l.xV&&(y.ytrext=l.xV);return g.DB(y)?void 0:y};
g.Gk=function(l,y){pky(l,{iC:g.i_(y.experiments,"bg_vm_reinit_threshold"),cspNonce:y.cspNonce,nS:y.nS||""})};
g.jWP=function(l){if(l.videoData&&l.videoData.rg){const y=[l.videoData.rg];for(const k of Object.keys(l.Z))if(l.ys[k]&&l.Z[k]){const z=l.Z[k](l.ys);z&&y.push(z)}return y.join("&")}return null};
SYT=function(){const l=XMLHttpRequest.prototype.fetch;return!!l&&l.length===3};
FRt=function(l){n6y=2592E3*(l||1)};
o6T=function(l){g.eY("yt-player-bandwidth",l,2592E3)};
aE=function(l=n6y){if(l>0&&!(BPP()>(0,g.f)()-l*1E3))return 0;l=g.Ay("yt-player-quality");if(typeof l==="string"){if(l=g.pk[l],l>0)return l}else if(l instanceof Object)return l.quality;return 0};
iY=function(){const l=g.Ay("yt-player-proxima-pref");return l==null?null:l};
NCC=function(){const l=g.Ay("yt-player-quality");if(l instanceof Object&&l.quality&&l.previousQuality){if(l.quality>l.previousQuality)return 1;if(l.quality<l.previousQuality)return-1}return 0};
sW5=function(){const l={values:{},OQ:{}};try{const y=JSON.parse(JSON.parse(window.localStorage["yt-player-memory"]).data);l.values=y.values;l.halfLives=y.halfLives}catch{}return l};
Ua=function(){return g.Ay("yt-player-performance-cap")||{}};
LR4=function(l=!1){if(l){l=Ua();for(const y of Object.keys(l))y.indexOf("1")!==0&&delete l[y];g.eY("yt-player-performance-cap",l,2592E3)}else g.$F("yt-player-performance-cap")};
MN=function(){return g.Ay("yt-player-performance-cap-active-set")??[]};
v6P=function(l=!1){l?(l=MN().filter(y=>y.startsWith("1")),g.eY("yt-player-performance-cap-active-set",l,2592E3)):g.eY("yt-player-performance-cap-active-set",[],2592E3)};
BCg=function(l){g.eY("yt-player-watch-later-pending",l)};
HaQ=function(){return!!g.Ay("yt-player-headers-readable")};
g.Xm=function(){const l=g.Ay("yt-player-caption-language-preferences");return l?l:[]};
c6=function(){const l=g.Ay("yt-player-user-settings"),y=new Map;if(l)for(const [k,z]of Object.entries(l))y.set(k,z);return y};
R7s=function(){return g.Ay("yt-player-voice-boost")??void 0};
D9T=function(){return g.Ay("yt-player-audio-quality-setting")??2};
bY=function(){try{const l=window.navigator;if(l.getAutoplayPolicy&&typeof l.getAutoplayPolicy==="function"){const y=document.getElementsByClassName(g.Cb.zo);let k;k=y.length>0&&y[0]?l.getAutoplayPolicy(y[0]):l.getAutoplayPolicy("mediaelement");if(lxz[k])return lxz[k]}}catch(l){}return"AUTOPLAY_BROWSER_POLICY_UNSPECIFIED"};
uY=function(l){return l.jN||l.lE||l.mutedAutoplay};
yiC=function(l,y){return uY(l)?y!==1&&y!==2&&y!==0?"AUTOPLAY_STATUS_UNAVAILABLE":l.nj?"AUTOPLAY_STATUS_BLOCKED":"AUTOPLAY_STATUS_OCCURRED":"AUTOPLAY_STATUS_NOT_ATTEMPTED"};
kds=function(l,y,k){const z=y.O();l.thirdParty||(l.thirdParty={});l.thirdParty={...l.thirdParty,embedUrl:z.loaderUrl};z.ancestorOrigins&&(l.thirdParty.embeddedPlayerContext={...l.thirdParty.embeddedPlayerContext,ancestorOrigins:z.ancestorOrigins});z.TZ!=null&&(l.thirdParty.embeddedPlayerContext={...l.thirdParty.embeddedPlayerContext,visibilityFraction:Number(z.TZ)});z.tb&&(l.thirdParty.embeddedPlayerContext={...l.thirdParty.embeddedPlayerContext,visibilityFractionSource:z.tb});l.thirdParty.embeddedPlayerContext=
{...l.thirdParty.embeddedPlayerContext,autoplayBrowserPolicy:bY(),autoplayIntended:uY(y),autoplayStatus:yiC(y,k)}};
zv4=function(l){const y=[];for(let k of l.split(",")){if(!k)continue;(l=k.startsWith("!"))&&(k=k.substring(1));const z=k.split("-");z.length<3||y.push({e7:z[0],platform:z[1],deviceVersion:z[2],QN:l})}return y};
evC=function(l){return zv4(l).map(({e7:y,deviceVersion:k,QN:z})=>({deviceInterface:ri5[Zzt[y]]||0,deviceVersion:k||"",isSleeping:z}))};
g.m8=function(l,y,k,z){return new xM(g.pk[l]||0,g.pk[y]||0,k,z)};
W6=function(l){if(qN&&l.CP)return!1;const y=g.pk.auto;return l.C===y&&l.Z===y};
Tk=function(l){return IE[l.Z||l.C]||"auto"};
Aiq=function(l,y){y=g.pk[y];return l.C<=y&&(!l.Z||l.Z>=y)};
Oz5=function(l,y,k,z,r,Z,e){if(l.C)return l.C;const A={},Q=new Set,t={};if(Va(z)){for(var O in z.Z){if(!z.Z.hasOwnProperty(O))continue;l=z.Z[O];t[l.info.Dr]=[l.info]}return t}O=$M5(y,z,A);Z&&r({aftsrt:P6(O)});const d={};for(const w of Object.keys(O)){const h=w;for(const U of O[h]){const u=U.itag,W=`${h}_${Number(U.video?.fps||0)}_${!!U.audio?.C}`;if(d.hasOwnProperty(W)){d[W]===!0?t[h].push(U):A[u]=d[W];continue}const V=J$(y,U,k,z.isLive,Q);V!==!0?(e.add(h),A[u]=V,V==="disablevp9hfr"&&(d[W]="disablevp9hfr")):
(t[h]=t[h]||[],t[h].push(U),d[W]=!0)}}Z&&r({bfflt:P6(t)});for(const w in t){if(!t.hasOwnProperty(w))continue;z=w;t[z]&&t[z][0].q4()&&(t[z]=t[z],t[z]=QNC(y,t[z],A),t[z]=t0P(t[z],A))}Z&&Object.keys(A).length>0&&r({rjr:wd(A)});for(const w of Q.values())(y=k.N.get(w))&&--y.B$;Z&&r({aftflt:P6(t)});l.C=g.jf(t,w=>!!w.length);
return l.C};
bzC=function(l,y,k,z,r,Z,e){var A=y.Z||!!r;const Q=A&&y.MW?Z:void 0;var t=new Set;let O=Oz5(l,y,k,z,Z,A,t);z.J()&&(O=dMC(k,O,r,A,Z,y),A&&Z({enflt:P6(O)}));y.xz=wHC(O,y);r=Zg=>!!O[Zg];
var d=hvq(y);k=[];for(var w of Object.values(O))w?.length&&w[0].a9()&&k.push(...w);if(Va(z))return Z=g.Dg(Object.values(O),Zg=>!!Zg.length&&!!Zg[0].audio),A=g.Dg(Object.values(O),Zg=>!!Zg.length&&!!Zg[0].video),Z&&A||yu(),k9(new YM(A,Z,Q,k));
w=O.a;var h=!1;y.f2&&d[0]!=="a"&&Gde(w)&&(d.unshift("a"),h=!0);A&&(Z({audioPrefOrder:d.join("_")}),Z({preferHighQualityAudio:y.f2}),Z({forcedAacForHqa:h}));w=[];if(y.R7){d=g.oC(d,r);h=new Set;for(var U of d){var u=O[U];const Zg=new Set;for(var W of u)if(u=W.a7?.id)h.has(u)?Zg.has(u)&&w.push(W):(Zg.add(u),h.add(u),w.push(W))}if(w.length===0){if(d.length===0)return A&&Z({noaudio:1}),yu();w=O[d[0]]}}else{w=g.Dg(d,r);if(!w)return A&&Z({noaudio:1}),yu();w=O[w]}O["9"]&&O.h&&z.UA&&!y.u0&&(A&&Z({dltvp9:1}),
delete O["9"]);if(e){A&&Z({bfsflt:P6(O),bfsflta:pb(l)});y.RR?l.Z=axz(t,l.Z):l.Z.clear();A&&Z({bfsfltb:pb(l)});for(var V in O){if(!O.hasOwnProperty(V))continue;e=V;if(!(e==="f"||y.wX===0&&izP.has(e)))for(var T of O[e])y.RR?UMT(e,T,l.Z):M0g(l,e,T)}A&&Z({aftsflt:pb(l)})}V=O["1h"]?"1h":"1";l=O["9h"]?"9h":"9";e=O[V];t=O["2"];U=O[l];e&&e.length&&(y.C.highestAv1Resolution=e[e.length-1].video.qualityOrdinal);U&&U.length&&(y.C.highestVp9Resolution=U[U.length-1].video.qualityOrdinal);T=[];W=[];if(y.vn&&t)T=
t,W=["2"];else if(y.q_&&e)T=e,W=[V],Z({forceAv1:V});else if(y.A&&!y.uS){W=XHT(z)?O["1h"]||O["9h"]?["1h","9h"]:["9","h"]:["1","9","h"];A&&Z({newhybpref:W.join(".")});for(var J of W)T=T.concat(O[J]).filter(Zg=>Zg)}else y.IF>0&&U&&e&&(W=[V,
l],T=e.concat(U).filter(Zg=>Zg));
if(T.length&&!y.uS){Kb(T,W);if(A){A=[];for(var K of T)A.push(K.itag);Z({hbdfmt:A.join(".")})}return k9(new YM(T,w,Q,k))}K=cis(y);K=g.Dg(K,r);if(!K){if(O[V])return Z=O[V],Kb(Z),k9(new YM(Z,w,Q,k));A&&Z({novideo:1});return yu()}K!=="1"&&K!=="1h"||!O[l]||(J=gQ(O[K]),r=gQ(O[l]),r>J?K=l:r===J&&Cqy(O[l])&&(K=l));K==="9"&&O.h&&gQ(O.h)>gQ(O["9"])&&(K="h");y.Oj&&z.isLive&&K==="("&&O.H&&gQ(O["("])<1440&&(K="H");A&&Z({vfmly:Ea(K)});y=O[K];if(!y.length)return A&&Z({novfmly:Ea(K)}),yu();Kb(y);return k9(new YM(y,
w,Q,k))};
uu5=function(l,y,k,z,r,Z,e,A=!1){if(y.OA&&e&&e.length>1&&!(y.IF>0||y.A)){const d=y.Z||!!r,w=d&&y.MW?Z:void 0,h=$M5(y,z),U=[],u=[],W={};for(let V=0;V<e.length;V++){var Q=e[V],t=z.V.get(Q);if(t&&t.info){var O=t.info;t=O.Dr;if(J$(y,O,k,z.isLive)){Q=O.q4()?U:u;O=h[t];for(const T of O)O=`${t}_${Number(T.video?.fps||0)}_${!!T.audio?.C}`,W.hasOwnProperty(O)?W[O]===!0&&Q.push(T):J$(y,T,k,z.isLive)&&(Q.push(T),W[O]=!0)}else d&&Z({opfu:Q})}}if(U.length&&u.length)return d&&Z({opfm:U[0].itag+","+u[0].itag}),
k9(new YM(U,u,w))}return bzC(l,y,k,z,r,Z,A)};
pb=function(l){const y=[];for(const k of l.Z.keys()){const z=l.Z.get(k);y.push(`${k}_${z.maxWidth}_${z.maxHeight}`)}return y.join(".")};
M0g=function(l,y,k){const z=k.video?.fps||0,r=`${y}_${z}`;var Z=!!k.audio;const e=l.Z.get(r);var A=l.Z.get(r);const Q=!!k.audio;A&&(Q||!Q&&k.video?.height&&A.maxHeight&&A.maxHeight>=k.video?.height)||(A=k.itag,y=e?e:{itag:A,Dr:y,a9:Z},Z?y.numChannels=k.audio.numChannels:(Z=k.video,y.maxWidth=Z?.width,y.maxHeight=Z?.height,y.maxFramerate=z,y.maxBitrateBps=k.CP*8,y.sH=Z?.isHdr()),l.Z.set(r,y))};
wHC=function(l,y){const k=!(!l.m&&!l.M),z=!(!l.mac3&&!l.MAC3),r=!(!l.meac3&&!l.MEAC3);l=!(!l.i&&!l.I);y.BF=l;return k||z||r||l};
Cqy=function(l){for(const y of l)if(y.itag&&xMs.has(y.itag))return!0;return!1};
Gde=function(l){for(const y of l)if(y.audio.audioQuality==="AUDIO_QUALITY_HIGH")return!0;return!1};
Ea=function(l){switch(l){case "*":return"v8e";case "(":return"v9e";case "(h":return"v9he";default:return l}};
P6=function(l){const y=[];for(const k in l){if(!l.hasOwnProperty(k))continue;const z=k;y.push(Ea(z));for(const r of l[z])y.push(r.itag)}return y.join(".")};
dMC=function(l,y,k,z,r,Z){const e={},A={};g.fR(y,(Q,t)=>{Q=Q.filter(O=>{const d=O.itag;if(!O.contentProtection)return A[d]="noenc",!1;if(Z.T7&&O.Dr==="(h"&&Z.b0)return A[d]="lichdr",!1;if(!l.V&&O.Dr==="1e")return A[d]="noav1enc",!1;if(O.Dr==="("||O.Dr==="(h"){if(l.C&&k&&k.flavor==="widevine"){var w=O.mimeType+"; experimental=allowed";(w=!!O.contentProtection[k.flavor]&&!!k.C[w])||(A[d]=O.contentProtection[k.flavor]?"unspt":"noflv");return w}if(!fb(l,vt.CRYPTOBLOCKFORMAT)&&!l.sj||l.Y)return A[d]=l.Y?
"disvp":"vpsub",!1}return k&&O.contentProtection[k.flavor]&&k.C[O.mimeType]?!0:(A[d]=k?O.contentProtection[k.flavor]?"unspt":"noflv":"nosys",!1)});
Q.length&&(e[t]=Q)});
z&&Object.entries(A).length&&r({rjr:wd(A)});return e};
t0P=function(l,y){const k=ve(l,(z,r)=>r.video.C()?Math.min(z,r.video.width):z,Infinity);
k<Infinity&&(l=l.filter(z=>{if(z.video.C()||z.video.width<k)return!0;y[z.itag]="hfrfirst";return!1}));
MP()&&(l=l.filter(z=>{if(z.itag!=="299")return!0;y[z.itag]="ps3hfr1080";return!1}));
return l};
QNC=function(l,y,k){return y=y.filter(z=>{if(z.video.qualityOrdinal<=l.g4)return!0;k[z.itag]="maxquality";return!1})};
$M5=function(l,y,k){const z={};for(const r in y.Z){if(!y.Z.hasOwnProperty(r))continue;const Z=y.Z[r].info;if(l.K&&Z.video&&Z.video.qualityOrdinal<l.K){k&&(k[Z.itag]=`min${l.K}`);continue}const e=Z.Dr;z[e]=z[e]||[];z[e].push(Z)}for(const r of Object.keys(z))Kb(z[r]);return z};
gQ=function(l){return ve(l,(y,k)=>Math.max(y,k.video.qualityOrdinal),0)};
J$=function(l,y,k,z=!1,r=new Set){if(y.Dr==="")return"unkn";if((y.itag==="304"||y.itag==="266")&&l.Y)return"blk2khfr";if(l.S&&y.video&&y.video.qualityOrdinal>l.S)return`max${l.S}`;if(l.gb&&y.Dr==="h"&&y.video&&y.video.qualityOrdinal>1080)return"blkhigh264";if(y.Dr==="(h"&&!k.S)return"enchdr";if(z&&Lwe(y)&&!l.rb)return"blk51live";if((y.Dr==="MAC3"||y.Dr==="mac3")&&!l.V)return"blkac3";if((y.Dr==="MEAC3"||y.Dr==="meac3")&&!l.J)return"blkeac3";if(y.Dr==="M"||y.Dr==="m")return"blkaac51";if((y.Dr==="so"||
y.Dr==="sa")&&!l.C_)return"blkamb";if(!l.T7&&sST(y)&&(!k.V||y.Dr!=="1e"))return"cbc";if(!k.V&&sST(y)&&y.Dr==="1e")return"cbcav1";if((y.Dr==="i"||y.Dr==="I")&&!l.hv)return"blkiamf";if(l.WG&&y.audio?.C===!0)return"blkvbcabr";if(l.Xr&&(y.Dr==="1"||y.Dr==="1h"||k.V&&y.Dr==="1e")&&y.video?.qualityOrdinal&&y.video?.qualityOrdinal>l.Xr)return"av1cap";z=k.N.get(y.Dr);if(!l.kz&&z&&z.B$>0)return r.add(y.Dr),"byerr";if(y.video?.C()){if(!k.b0&&!fb(k,vt.FRAMERATE))return"capHfr";if(l.mK&&y.video.qualityOrdinal>=
4320)return"blk8khfr";if(y.V()&&l.hj&&y.contentProtection&&y.video.qualityOrdinal>=1440)return"disablevp9hfr"}if(l.CP&&y.CP>l.CP)return"ratecap";if(l.sj>0&&y.q4()&&y.video.height>l.sj)return"mvhcap";l=mM5(k,y);return l!==!0?l:!0};
Kb=function(l,y=[]){g.b2(l,(k,z)=>{const r=z.CP-k.CP;if(!k.q4()||!z.q4())return r;let Z=z.video.height*z.video.width-k.video.height*k.video.width;!Z&&y&&y.length>0&&(k=y.indexOf(k.Dr)+1,z=y.indexOf(z.Dr)+1,Z=k===0||z===0?z||-1:k-z);Z||(Z=r);return Z})};
qrT=function(l,y){if(y>l.x3())l.segments=[];else{var k=RC(l.segments,z=>z.n_>=y,l);
k>0&&l.segments.splice(0,k)}};
jv=function(l){const y=l.data.getUint8(l.offset+l.Z);l.Z+=1;return y};
Sv=function(l){const y=l.data.getUint16(l.offset+l.Z);l.Z+=2;return y};
nb=function(l){const y=l.data.getInt32(l.offset+l.Z);l.Z+=4;return y};
Fm=function(l){const y=l.data.getUint32(l.offset+l.Z);l.Z+=4;return y};
oE=function(l){var y=l.data;var k=l.offset+l.Z;y=y.getUint32(k)*4294967296+y.getUint32(k+4);l.Z+=8;return y};
NN=function(l,y=NaN){let k;if(isNaN(y))k=l.size;else for(k=l.Z;k<l.size&&l.data.getUint8(l.offset+k)!==y;)++k;y=new Uint8Array(l.data.buffer,l.offset+l.Z+l.data.byteOffset,k-l.Z);l.Z=Math.min(k+1,l.size);return bl(y)};
Wtq=function(l){return new Uint8Array(l.data.buffer,l.offset+l.data.byteOffset,l.size)};
sa=function(l,y,k,z){(new Uint8Array(l.data.buffer,l.offset,z)).set(new Uint8Array(y.buffer,k+y.byteOffset,z));l.offset+=z};
Lb=function(l,y){return Number(l.data[y])||0};
TvQ=function(l){return l.data["Cuepoint-Type"]?new v6(-(Number(l.data["Cuepoint-Playhead-Time-Sec"])||0),Number(l.data["Cuepoint-Total-Duration-Sec"])||0,l.data["Cuepoint-Context"],l.data["Cuepoint-Identifier"]||"",Ix4[l.data["Cuepoint-Event"]||""]||"unknown",(Number(l.data["Cuepoint-Playhead-Time-Sec"])||0)*1E3):null};
V0s=function(l){return Number(l.data["Start-Media-Time-Us"])/1E6||0};
g.Pqy=function(l){return l.data["Serialized-State"]?l.data["Serialized-State"]:""};
g.Jie=function(l){switch(l.data["Is-Ad-Break-Finished"]){case "true":return 1;case "false":return 2;default:return 0}};
B6=function(l){const y={};l=l.split("\r\n");for(let k=0;k<l.length;k++){if(l[k].length===0)return y;const z=l[k].match(/([^:]+):\s+([\S\s]+)/);z!=null&&(y[z[1]]=z[2])}return null};
D5=function(l,y,k){for(;H6(l,y);){const z=RE(l,y);if(z.type===k)return z;y+=z.size}return null};
g.yC=function(l,y,k){for(;H6(l,y);){const z=RE(l,y);if(z.type===k)return z;y=lx(z.type)?y+8:y+z.size}return null};
Yrq=function(l,y){var k=g.yC(l,0,1952868452);l=g.yC(l,0,1953658222);if(k&&l){k.skip(1);var z=jv(k)<<16|Sv(k);k.skip(4);z&1&&k.skip(8);z&2&&k.skip(4);if(z&8){z=k.Z;var r=Fm(k);k.data.setUint32(k.offset+z,y>1?Math.ceil(r*y):Math.floor(r*y))}l.skip(1);k=jv(l)<<16|Sv(l);if(k&256){z=k&1;r=k&4;var Z=k&512,e=k&1024,A=k&2048;k=Fm(l);z&&l.skip(4);r&&l.skip(4);z=(Z?4:0)+(e?4:0)+(A?4:0);for(r=0;r<k;r++)Z=l.Z,e=Fm(l),l.data.setUint32(l.offset+Z,y>1?Math.ceil(e*y):Math.floor(e*y)),l.skip(z)}}};
H6=function(l,y){if(l.byteLength-y<8)return!1;var k=l.getUint32(y);if(k<8||l.byteLength-y<k)return!1;for(k=4;k<8;k++){const z=l.getInt8(y+k);if(z<48||z>122)return!1}return!0};
RE=function(l,y){const k=l.getUint32(y),z=l.getUint32(y+4);return new pHq(l,y,k,z)};
g.k$=function(l){const y=l.data.getUint8(l.dataOffset)?20:12;return l.data.getUint32(l.dataOffset+y)};
zI=function(l){l=new DataView(l.buffer,l.byteOffset,l.byteLength);return(l=g.yC(l,0,1836476516))?g.k$(l):NaN};
lx=function(l){return l===1701082227||l===1836019558||l===1836019574||l===1835297121||l===1835626086||l===1937007212||l===1953653094||l===1953653099||l===1836475768};
gET=function(l){var y=g.yC(l,0,1937011556);if(!y)return null;y=D5(l,y.dataOffset+8,1635148593)||D5(l,y.dataOffset+8,1635135537);if(!y)return null;var k=D5(l,y.dataOffset+78,1936995172),z=D5(l,y.dataOffset+78,1937126244);if(!z)return null;y=null;if(k)switch(k.skip(4),jv(k)){default:y=0;break;case 1:y=2;break;case 2:y=1;break;case 3:y=255}let r=k=null,Z=null;if(z=D5(l,z.dataOffset,1886547818)){const e=D5(l,z.dataOffset,1886546020);let A=D5(l,z.dataOffset,2037673328);if(!A&&(A=D5(l,z.dataOffset,1836279920),
!A))return null;e&&(e.skip(4),k=nb(e)/65536,Z=nb(e)/65536,r=nb(e)/65536);l=Wtq(A);l=new DataView(l.buffer,l.byteOffset+8,l.byteLength-8);return new KtQ(y,k,Z,r,l)}return null};
g.rF=function(l){if(l.data.getUint8(l.dataOffset)){var y=l.data;l=l.dataOffset+4;y=y.getUint32(l)*4294967296+y.getUint32(l+4)}else y=l.data.getUint32(l.dataOffset+4);return y};
EEe=function(l){l=new pHq(l.data,l.offset,l.size,l.type,l.C);var y=jv(l);l.skip(7);const k=Fm(l);let z;y===0?(y=Fm(l),z=Fm(l)):(y=oE(l),z=oE(l));l.skip(2);const r=Sv(l),Z=[],e=[];for(let A=0;A<r;A++){const Q=Fm(l);Z.push(Q);e.push(Fm(l));l.skip(4)}return{timescale:k,hP:y,EC:z,w2:Z,BJ:e}};
g.ZP=function(l,y){var k=0;const z=[];for(;H6(l,k);){const r=RE(l,k);r.type===y&&z.push(r);k=lx(r.type)?k+8:k+r.size}return z};
fxy=function(l){l.skip(4);return{D_:NN(l,0),value:NN(l,0),timescale:Fm(l),d4r:Fm(l),eventDuration:Fm(l),id:Fm(l),rR:NN(l),offset:l.offset}};
g.SrP=function(l){const y=D5(l,0,1701671783);if(!y)return null;var k=fxy(y);const z=k.D_;k=B6(k.rR);if(l=D5(l,y.offset+y.size,1701671783))if(l=fxy(l),l=B6(l.rR),k&&l)for(const r of Object.keys(l))k[r]=l[r];return k?new jNz(k,z):null};
ed=function(l,y){let k=D5(l,0,y);for(;k;){var z=k;z.type=1936419184;z.data.setUint32(z.offset+4,1936419184);k=D5(l,k.offset+k.size,y)}};
Fty=function(l,y){var k=g.yC(l,0,1937011556),z=g.yC(l,0,1953654136);if(!k||!z||l.getUint32(k.offset+12)>=2)return null;const r=new DataView(y.buffer,y.byteOffset,y.length),Z=g.yC(r,0,1937011556);if(!Z)return null;y=r.getUint32(Z.dataOffset+8);z=r.getUint32(Z.dataOffset+12);if(z!==1701733217&&z!==1701733238)return null;z=new nET(l.byteLength+y);sa(z,l,0,k.offset+12);z.data.setInt32(z.offset,2);z.offset+=4;sa(z,l,k.offset+16,k.size-16);sa(z,r,r.byteOffset+Z.dataOffset+8,y);sa(z,l,k.offset+k.size,l.byteLength-
(k.offset+k.size));k=[1836019574,1953653099,1835297121,1835626086,1937007212,1937011556];for(const e of k)k=g.yC(l,0,e),z.data.setUint32(k.offset,k.size+y);l=g.yC(z.data,0,1953654136);z.data.setUint32(l.offset+16,2);return z.data};
oE5=function(l){var y=g.yC(l,0,1937011556);if(!y)return null;var k=l.getUint32(y.dataOffset+12);if(k!==1701733217&&k!==1701733238)return null;y=D5(l,y.offset+24+(k===1701733217?28:78),1936289382);if(!y)return null;k=D5(l,y.offset+8,1935894637);if(!k||l.getUint32(k.offset+12)!==1667392371)return null;y=D5(l,y.offset+8,1935894633);if(!y)return null;y=D5(l,y.offset+8,1952804451);if(!y)return null;k=new Uint8Array(16);for(let z=0;z<16;z++)k[z]=l.getInt8(y.offset+16+z);return k};
dF=function(l,y,k){var z=new AQ(k);if(!$$(z,l))return!1;z=QC(z);if(!tQ(z,y))return!1;for(l=0;y;)y>>>=8,l++;y=z.start+z.pos;const r=OL(z,!0);z=l+(z.start+z.pos-y)+r;z=z>9?Nvg(z-9,8):Nvg(z-2,1);l=y-l;k.setUint8(l++,236);for(y=0;y<z.length;y++)k.setUint8(l++,z[y]);return!0};
Nvg=function(l,y){y||(y=Math.ceil(Math.log(l+2)/Math.log(2)/7));const k=1<<8-y,z=[];for(;z.length<y-1;)z.unshift(l%256),l=Math.floor(l/256);z.unshift(l|k);return z};
sNe=function(l){var y=new AQ(l);y.NH();if($$(y,[408125543,374648427,174,224]))y=QC(y);else return null;let k=l=null;for(;!wF(y);){var z=OL(y,!1);if(z===21432)switch(hQ(y)){default:l=0;break;case 1:l=1;break;case 3:l=2;break;case 15:l=255}else z===30320?k=QC(y):GI(y)}if(!k)return null;let r=z=y=null;for(;!wF(k);)switch(OL(k,!1)){case 30321:if(hQ(k)!==3)return null;break;case 30324:y=a9(k);break;case 30323:r=a9(k);break;case 30325:z=a9(k);break;case 30322:var Z=OL(k,!0);Z=ix(k,Z);Z=new DataView(Z.buffer,
Z.byteOffset,Z.byteLength);break;default:GI(k)}return Z?new KtQ(l,y,r,z,Z):null};
$$=function(l,y){for(let k=0;k<y.length;k++){if(!tQ(l,y[k]))return!1;k!==y.length-1&&OL(l,!0)}return!0};
QC=function(l){const y=OL(l,!0);var k=l.Z.byteOffset+l.pos;k=new DataView(l.Z.buffer,k,Math.min(y,l.Z.buffer.byteLength-k));k=new AQ(k,l.start+l.pos);l.pos+=y;return k};
tQ=function(l,y,k=!1){if(wF(l))return!1;let z=l.pos;for(;OL(l,!1)!==y;)if(GI(l),z=l.pos,wF(l))return!1;k&&(l.pos=z);return!0};
OL=function(l,y){let k=UL(l);if(k===1){k=0;for(y=0;y<7;y++)k=k*256+UL(l);return k}let z=128;for(let r=0;r<6&&z>k;r++)k=k*256+UL(l),z*=128;return y?k-z:k};
wF=function(l){return l.pos>=l.Z.byteLength};
hQ=function(l){const y=OL(l,!0);let k=UL(l);for(let z=1;z<y;z++)k=k*256+UL(l);return k};
GI=function(l){const y=OL(l,!0);l.pos+=y};
a9=function(l){const y=OL(l,!0);let k=0;y===4?k=l.Z.getFloat32(l.pos):y===8&&(k=l.Z.getFloat64(l.pos));l.pos+=y;return k};
ix=function(l,y){const k=new Uint8Array(l.Z.buffer,l.Z.byteOffset+l.pos,y);l.pos+=y;return k};
LtT=function(l){const y=OL(l,!0);return bl(ix(l,y))};
UL=function(l){return l.Z.getUint8(l.pos++)};
vEy=function(l){if(!tQ(l,440786851,!0))return null;const y=l.pos;OL(l,!1);const k=OL(l,!0)+l.pos-y;l.pos=y+k;if(!tQ(l,408125543,!1))return null;OL(l,!0);if(!tQ(l,357149030,!0))return null;const z=l.pos;OL(l,!1);const r=OL(l,!0)+l.pos-z;l.pos=z+r;if(!tQ(l,374648427,!0))return null;const Z=l.pos;OL(l,!1);const e=OL(l,!0)+l.pos-Z,A=new Uint8Array(k+12+r+e),Q=new DataView(A.buffer);A.set(new Uint8Array(l.Z.buffer,l.Z.byteOffset+y,k));Q.setUint32(k,408125543);Q.setUint32(k+4,33554431);Q.setUint32(k+8,
4294967295);A.set(new Uint8Array(l.Z.buffer,l.Z.byteOffset+z,r),k+12);A.set(new Uint8Array(l.Z.buffer,l.Z.byteOffset+Z,e),k+12+r);return A};
MO=function(l){const y=l.pos;l.pos=0;let k=1E6;$$(l,[408125543,357149030,2807729])&&(k=hQ(l));l.pos=y;return k};
Xg=function(l){if(!BvC(l)||!tQ(l,524531317))return!1;OL(l,!0);return!0};
Hz5=function(l,y){const k=l.pos;l.pos=0;if(l.Z.getUint8(l.pos)!==160&&!Xg(l)||!tQ(l,160))return l.pos=k,NaN;OL(l,!0);var z=l.pos;if(!tQ(l,161))return l.pos=k,NaN;OL(l,!0);UL(l);const r=UL(l)<<8|UL(l);l.pos=z;if(!tQ(l,155))return l.pos=k,NaN;z=hQ(l);l.pos=k;return(r+z)*y/1E9};
BvC=function(l){if(l.NH()){if(!tQ(l,408125543))return!1;OL(l,!0)}return!0};
Rve=function(l,y){const k=y.indexOf("?");if(k>0){const z=PO(21,6795,y.substring(k+1));g.fR(z,function(r,Z){this.set(Z,r)},l);
y=y.substring(0,k)}y=VL(2,1811,y);g.fR(y,function(z,r){this.set(r,z)},l)};
DMq=function(l){const y=l.Ww.wZ(),k=[];g.fR(l.Z,(r,Z)=>{k.push(`${Z}=${r}`)});
if(!k.length)return y;const z=k.join("&");l=Jp(6,1876,l.Ww)?"&":"?";return y+l+z};
Tx=function(l,y,k,z){var r=y^l;if((l-1^30)>=l&&l-7<<2<l){var Z=k[G[r^6817]](G[r^6833],r^6842),e=k[G[r^6817]](G[r^6833],Z+1);Z>0&&e>0?(z[G[r^6841]]=k[G[r^6829]](0,e),k=k[G[r^6829]](e+1)):(z[G[r^6841]]=k,k=G[3]);var A=[k]}if((l|9)>=26&&l+5<42)a:{Z=k[G[r^1550]](G[3]);e=[e_T,r^363659642,r^1184776451,-(r^1840778687),G[r^1616],r^1622739813,r^90117759,-(r^1244272815),wR_,-(r^1101203751),-(r^452775897),G[r^1587],lsC,y44,r^211048920,-(r^1399237516),KMT,-(r^43364075),-(r^898146887),k15,-(r^1616629664),r^1060176860,
r^889313317,r^1567729449,r^1476979816,e75,Z,Z,-(r^658978838),$uy,r^1961197516,-(r^2008682557),zVt,r^1322908093,-(r^477028048),-(r^1905115815),r^1422241224,-(r^2145425617),Z,null,r^1445925915,-(r^1457952767),-(r^413669234),-(r^490073227),-(r^1962518014),r^1795896980,Jps,-(r^805634843),-(r^441897374),G[r^1540],-(r^1709213888),r^1417636069,r^1290108124,-(r^1369402644),-(r^1824402588),G[r^1589],-(r^586409249),Cj4,-(r^773113320),G[r^1629],r44,r^380933667,-(r^1666069579),null,-(r^225674215),null,-(r^178818711),
-(r^1974885776),ZeT,-(r^1049730213),g6s,G[r^1629],-(r^443061176),eVs,r^1602426063,r^592189923,-(r^779002927),-(r^429176273),A4Q,$f5,-(r^2000368852)];e[r^1589]=e;e[r^1581]=e;e[r^1619]=e;if(typeof Qwt===G[r^1622]){A=k;break a}try{e=PO(r^1562,r^498,e)}catch(Q){A=G[r^1605]+k;break a}A=Z[G[r^1588]](G[3])}(l|48)==l&&(z=(z%k[G[2]]+k[G[2]])%k[G[2]],k[G[r^8105]](z,1));return A};
cy=function(l,y){l[y]||(l[y]=new trC);return l[y]};
CV=function(l){l.V=(0,g.f)();l.started=0;l.timedOut=0;l.Z=0};
bx=function(l,y){let k=l.started+l.Z*4;y&&(k+=l.C);k=Math.max(0,k-3);return 1.6**k};
Oet=function(l,y,k){if(ux(17,5740,l.Z))return!1;var z=cy(k,wQ(1,4130,l.Z));if(z.timedOut<1&&z.Z<1)return!1;z=z.timedOut+z.Z;l=x$(l,y);k=cy(k,wQ(33,4098,l));return k.timedOut+k.Z+0<z};
x$=function(l,y){y=y?y.zz:!1;l.N||(l.N=S3(l.V,y));return l.N};
qO=function(l,y,k){l=y?x$(l,k):l.Z;return new ma(l)};
Wy=function(l,y,k){return wQ(8,4139,y?x$(l,k):l.Z)};
df4=function(l,y,k,z,r){++l.C;y&&++l.J;wQ(35,4096,k.Ww).startsWith("redirector.")&&(l.Z=l.V.clone(),delete l.N,z.Aw&&delete r[wQ(3,4128,l.Z)])};
I9=function(l){return l?`${l.itag||""};${l.lmt||0};${l.xtags||""}`:""};
TI=function(l,y){return I9(g.Bt(l.info,y))};
Py=function(l){l=l.split("-");const y=Number(l[0]),k=Number(l[1]);if(!isNaN(y)&&!isNaN(k)&&l.length===2&&(l=new VC(y,k),!isNaN(l.start)&&!isNaN(l.end)&&!isNaN(l.length)&&l.length>0))return l};
JQ=function(l,y){return new VC(l,l+y-1)};
Y$=function(l){if(!l)return new VC(0,0);var y=Number(l.start);l=Number(l.end);if(!isNaN(y)&&!isNaN(l)&&(y=new VC(y,l),y.length>0))return y};
wWz=function(l){l.length===1||g.He(l,k=>!!k.range);
for(var y=1;y<l.length;y++);y=l[l.length-1];return new VC(l[0].range.start+l[0].Z,y.range.start+y.Z+y.C-1)};
hVC=function(l){for(let y=1;y<l.length;y++)if(!pV(l[y-1],l[y]))return!1;return!0};
G1P=function(l){let y=0;for(const k of l)y+=k.range.length;return y};
pV=function(l,y){return l.oR===y.oR?l.range&&y.range?l.range.start+l.Z+l.C===y.range.start+y.Z:l.n_===y.n_?l.Z+l.C===y.Z:l.n_+1===y.n_&&y.Z===0&&l.N:!1};
ase=function(l){l.V=l.startTime;l.A=l.duration;l.J=l.V+l.A};
iet=function(l,y,k){const z=!(!y||y.oR!==l.oR||y.type!==l.type||y.n_!==l.n_);return k?z&&!!y&&(l.range&&y.range?y.range.end===l.range.end:y.range===l.range)&&y.Z+y.C===l.Z+l.C:z};
KV=function(l){return l.type===1||l.type===2};
gF=function(l){return l.type===3||l.type===6};
Ufe=function(l,y){return pV(l,y)||Math.abs(l.J-y.V)<=1E-6||l.n_+1===y.n_&&y.Z===0&&l.N?!0:!1};
Mrt=function(l,y){return l.n_!==y.n_&&y.n_!==l.n_+1||l.type!==y.type?!1:pV(l,y)?!0:Math.abs(l.V-y.V)<=1E-6&&l.n_===y.n_?!1:Ufe(l,y)};
EL=function(l){return l.n_+(l.N?1:0)};
fV=function(l){const y={};y.itag=l.oR.info.itag;y.type=`${l.type}`;y.src=`${l.source}`;y.segsrc=l.K;y.seg=String(l.n_);l.range&&(y.range=`${l.range.start+l.Z}-${l.range.start+l.Z+l.C-1}`);y.time=`${l.V.toFixed(1)}-${(l.V+l.A).toFixed(1)}`;y.off=String(l.Z);y.len=String(l.C);l.N&&(y.end="1");l.S()&&(y.eos="1");l.clipId&&(y.cid=l.clipId);return y};
XWz=function(l){return new jd(l.type,l.oR,l.range,"getEmptyStubBefore"+l.K,l.n_,l.startTime,0,l.Z,0)};
c4s=function(l){return new jd(l.type,l.oR,l.range,"getEmptyStubAfter"+l.K,l.n_,l.startTime+l.duration,0,l.Z+l.C,0)};
CMQ=function(l,y,k,z){return new jd(l.type,l.oR,l.range,"reslice"+l.K,l.n_,l.startTime,l.duration,y,k,z,l.WV,l.clipId)};
beq=function(l,y){return l.oR!==y.oR?!1:l.range&&y.range?l.range.start+l.Z>=y.range.start+y.Z&&l.range.start+l.Z+l.C<=y.range.start+y.Z+y.C:l.n_===y.n_&&l.Z>=y.Z&&(l.Z+l.C<=y.Z+y.C||y.N)};
uhy=function(l,y){return l.oR!==y.oR?!1:l.D()&&y.type===3&&l.oR.Z()?(l=l.oR.HG(l),Be(l,k=>uhy(k,y))):l.n_===y.n_&&!!y.C&&y.Z+y.C>l.Z&&y.Z+y.C<=l.Z+l.C};
Sd=function(l,y){var k=y.n_;l.K="updateWithSegmentInfo";l.n_=k;if(l.startTime!==y.startTime||l.duration!==y.duration)l.startTime=y.startTime,l.duration=y.duration,ase(l)};
nV=function(l){return!KV(l.cF[l.cF.length-1])};
Fg=function(l){return l.cF[l.cF.length-1].D()};
g.o9=function(l,y,k){let z;k=l.ZW===null?l.pP.ZW(y,k,l.cF[0].type):l.ZW;l.Z?(y=k?S3(l.Z,y.zz):l.Z,z=new ma(y),z.get("alr")||z.set("alr","yes"),l.C&&Rve(z,l.C)):/http[s]?:\/\//.test(l.C)?z=new ma(new g.zq(l.C)):(z=qO(l.pP,k,y),l.C&&Rve(z,l.C));(y=l.range)?z.set("range",y.toString()):l.cF[0].oR.A()&&l.cF.length===1&&l.cF[0].Z&&z.set("range",`${l.cF[0].Z}-`);l.requestId&&z.set("req_id",l.requestId);isNaN(l.MV)||z.set("headm",l.MV.toString());isNaN(l.J)||z.set("mffa",`${l.J}ms`);l.urlParams&&g.fR(l.urlParams,
(r,Z)=>{z.set(Z,r)});
return z};
xfP=function(l){if(l.range)return l.N;l=l.cF[0];return Math.round(l.A*l.oR.info.CP)};
mfP=function(l,y){return Math.max(0,l.cF[0].V-y)};
qPt=function(l,y){for(const k of l.cF)if(k.type===3&&y>=k.V&&y<=k.J)return!0;return!1};
NO=function(l,y,k){for(;l;l=l.parentNode){if(!l.attributes||k&&l.nodeName!==k)continue;const z=l.getAttribute(y);if(z)return z}return""};
sL=function(l,y){for(;l;l=l.parentNode){const k=l.getElementsByTagName(y);if(k.length>0)return k[0]}return null};
W7s=function(l){if(!l)return 0;const y=l.match(/PT(([0-9]*)H)?(([0-9]*)M)?(([0-9.]*)S)?/);return y?(Number(y[2])|0)*3600+(Number(y[4])|0)*60+(Number(y[6])|0):Number(l)|0};
Isq=function(l){return l.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})\.(\d{3})$/)?`${l}Z`:l};
TMC=function(l){const y=l.N;l.N=[];return y};
VrP=function(l){l.Z||(l.Z=new LV);return l.Z};
X7=function(l,y,k){var z=y^l;if((l-3^24)<l&&(l+7&45)>=l){for(var r=z^3615,Z=[];++r-Z[G[2]]-(z^3711);)switch(r){case z^3685:r=z^3647;continue;case z^3588:r=z^3699;break;case z^3614:r=z^3696;continue;case z^3697:r=z^3782;case z^3620:r-=z^3685;default:Z[G[z^3653]](String[G[z^3610]](r))}var e=Z}if(!(l-9&10))for(r=k[G[2]];r;)k[G[z^2198]](k[G[z^2202]](--r,1)[0]);if(l>>1<9&&((l|1)&10)>=2)throw k;return e};
PMz=function(l,y){l.C[y]||(l.C[y]=new LV);return l.C[y]};
J4q=function(l,y){l.N[y]||(l.N[y]=new LV);return l.N[y]};
YP_=function(l,y){const k=[];y=Array.from(y.getElementsByTagName("SegmentTimeline"));for(const z of y){y=z.parentNode.parentNode;let r=null;y.nodeName==="Period"?r=VrP(l):y.nodeName==="AdaptationSet"?(y=y.getAttribute("id")||y.getAttribute("mimetype")||"",r=PMz(l,y)):y.nodeName==="Representation"&&(y=y.getAttribute("id")||"",r=J4q(l,y));if(r==null)return;r.update(z);g.Gx(k,TMC(r))}g.Gx(l.V,k);OC_(l.V,z=>z.startSecs*1E3+z.Z)};
pW_=function(l){l.Z&&(l.Z.Z=[]);g.fR(l.C,y=>{y.Z=[]});
g.fR(l.N,y=>{y.Z=[]})};
vy=function(l,y){return CR(l.segments,k=>y-k.n_)};
K7t=function(l,y,k){const z=l.index.A(y),r=l.index.getStartTime(y);let Z=l.index.getDuration(y);k?Z=k=0:k=l.info.CP*Z;return new By([new jd(3,l,void 0,"otfCreateRequestInfoForSegment",y,r,Z,0,k)],z)};
gbs=function(l,y){if(!l.index.isLoaded()){var k=[],z=y.J;y=y.K.split(",").filter(t=>t.length>0);
var r=0,Z=0,e=0,A=/^(\d+)/,Q=/r=(\d+)/;for(let t=0;t<z;t++){if(e<=0)if(e=y.shift(),Z=(Z=A.exec(e))?+Z[1]/1E3:0)e=(e=Q.exec(e))?+e[1]:0,e+=1;else return;k.push(new Hy(t,r,Z,NaN,"sq/"+(t+1)));r+=Z;e--}l.index.append(k)}};
g.DP=function(l,y,...k){Eb4(5,l instanceof g.R9?l.tag:l,y,...k)};
Eb4=function(l,y,k,...z){var r=l===6?"ERROR":"WARNING";k=`b${k}`;g.n(new g.WO(k,...z),r);z.unshift(k);z=z.join(", ");r=fsT.get(y);if(!r){r=`${"ytplog"}.${y}`;k=5;try{window.localStorage&&!isNaN(+window.localStorage[r])&&(k=+window.localStorage[r]),window.sessionStorage&&!isNaN(+window.sessionStorage[r])&&(k=+window.sessionStorage[r])}catch{}fsT.set(y,k);r=k}l<r||(l=jwz,r=l.Z.get(y),r||(r=new SP_,l.Z.set(y,r)),l=r,r=Date.now(),k=Math.floor((r-l.C)*.01),k>0&&(l.Z=Math.min(l.Z+k,10),l.C=r),l.Z>0?(l.Z--,
l=!0):l=!1,l?(typeof z==="function"&&(z=z()),console.log(`${"plyr"}.${y}`,z)):(z=(nbQ.get(y)??0)+1,nbQ.set(y,z),z%100===1&&console.warn("plyr",`${"plyr"}.${y} is chatty, dropping logs.`)))};
yA=function(l){if(!l.K){if(g.Lk(l.info.oR.info)){var y=g.l9(l);var k=D5(y,0,1836019574);if(k){k=k.offset+k.size;var z=new Uint8Array(k);z.set(new Uint8Array(y.buffer,y.byteOffset,k));y=z}else y=null}else y=vEy(new AQ(g.l9(l)));y&&(l.info.oR.C=y,l.K=!0)}};
g.l9=function(l){return Ec_(l.C)};
F7t=function(l,y){y=Math.min(y,l.info.C);const {Wm:k,iG:z}=l.C.split(y),r=new kp(new jd(l.info.type,l.info.oR,l.info.range,l.info.K,l.info.n_,l.info.startTime,l.info.duration,l.info.Z,y,!1,l.info.WV,l.info.clipId),k);r.V=l.V;r.N=l.N;y=new kp(new jd(l.info.type,l.info.oR,l.info.range,l.info.K,l.info.n_,l.info.startTime,l.info.duration,l.info.Z+y,l.info.C-y,l.info.N,l.info.WV,l.info.clipId),z);y.V=l.V;y.N=l.N;return[r,y]};
g.zQ=function(l){g.Lk(l.info.oR.info)||l.info.oR.info.Cg();if(l.N!==-1)return l.N;if(l.Z&&V0s(l.Z))return l.N=V0s(l.Z),l.N;if(g.Lk(l.info.oR.info)){var y=g.l9(l);var k=l.info.oR.C,z=NaN;let r=NaN,Z=0;for(;H6(y,Z);){const e=RE(y,Z);e.type===1936286840?r=e.data.getUint32(e.dataOffset+8):e.type===1836476516?r=g.k$(e):e.type===1952867444&&isNaN(z)&&(z=g.rF(e));Z=lx(e.type)?Z+8:Z+e.size}!r&&k&&(r=zI(k));y=z/r}else y=new AQ(g.l9(l)),k=l.J?y:new AQ(new DataView(l.info.oR.C.buffer)),z=MO(k),k=y.pos,y.pos=
0,Xg(y)?tQ(y,231)?(z=hQ(y)*z/1E9,y.pos=k,y=z):(y.pos=k,y=NaN):(y.pos=k,y=NaN);l.N=y||l.info.V;return l.N};
obQ=function(l,y){g.Lk(l.info.oR.info)||l.info.oR.info.Cg();l.N=y;if(g.Lk(l.info.oR.info)){var k=g.l9(l);l=l.info.oR.C;var z=NaN,r=NaN;let Q=0;for(;H6(k,Q);){const t=RE(k,Q);isNaN(z)&&(t.type===1936286840?z=t.data.getUint32(t.dataOffset+8):t.type===1836476516&&(z=g.k$(t)));if(t.type===1952867444){!z&&l&&(z=zI(l));var Z=g.rF(t);isNaN(r)&&(r=Math.round(y*z)-Z);var e=t;Z+=r;if(e.data.getUint8(e.dataOffset)){var A=e.data;e=e.dataOffset+4;A.setUint32(e,Math.floor(Z/4294967296));A.setUint32(e+4,Z&4294967295)}else e.data.setUint32(e.dataOffset+
4,Z)}Q=lx(t.type)?Q+8:Q+t.size}return!0}k=new AQ(g.l9(l));l=l.J?k:new AQ(new DataView(l.info.oR.C.buffer));z=MO(l);l=k.pos;k.pos=0;if(Xg(k)&&tQ(k,231))if(r=OL(k,!0),y=Math.floor(y*1E9/z),Math.ceil(Math.log(y)/Math.log(2)/8)>r)y=!1;else{for(z=r-1;z>=0;z--)k.Z.setUint8(k.pos+z,y&255),y>>>=8;k.pos=l;y=!0}else y=!1;return y};
NMs=function(l,y){l.timestampOffset>0&&(y-=l.timestampOffset);var k=g.zQ(l)+y;obQ(l,k);l.timestampOffset=y};
rb=function(l){g.Lk(l.info.oR.info)||l.info.oR.info.Cg();if(l.Z&&l.info.type===6)return l.Z.GZ;if(g.Lk(l.info.oR.info)){var y=g.l9(l);var k=0;y=g.ZP(y,1936286840);for(var z of y)y=EEe(z),k+=y.BJ[0]/y.timescale;k=k||NaN;if(!(k>=0))a:{k=g.l9(l);z=l.info.oR.C;let d=y=0;for(var r=0;H6(k,y);){const w=RE(k,y);if(w.type===1836476516)d=g.k$(w);else if(w.type===1836019558){!d&&z&&(d=zI(z));if(!d){k=NaN;break a}var Z=D5(w.data,w.dataOffset,1953653094),e=Z;Z=d;var A=D5(e.data,e.dataOffset,1952868452);e=D5(e.data,
e.dataOffset,1953658222);var Q=nb(A);nb(A);Q&2&&nb(A);A=Q&8?nb(A):0;var t=nb(e),O=t&1;Q=t&4;const h=t&256,U=t&512,u=t&1024;t&=2048;const W=Fm(e);O&&nb(e);Q&&nb(e);O=0;for(let V=0;V<W;V++){const T=h?nb(e):A;U&&nb(e);Q&&V===0||!u||nb(e);t&&nb(e);O+=T}r+=O/Z}y=lx(w.type)?y+8:y+w.size}k=r||NaN}k||g.WH(new g.WO("Missing duration while parsing bmff",l.info.rY()))}else k=new AQ(g.l9(l)),l=l.J?k:new AQ(new DataView(l.info.oR.C.buffer)),k=Hz5(k,MO(l));return k};
$p=function(l,y=!1){const k=rb(l);l=y?0:l.info.A;return k||l};
g.swt=function(l){if(l.info.oR.N())return l.info.duration;l.V===-1&&(l.V=rb(l));return l.V||l.info.duration};
L75=function(l){var y=g.l9(l),k=g.yC(y,0,1936286840);k=k?k.data.getUint32(k.dataOffset+8):NaN;isNaN(k)&&(l=l.info.oR.C,k=(y=g.yC(y,0,1836476516))?g.k$(y):l?zI(l):NaN);return k};
vb5=function(l){return l.info.oR.info.Cg()&&c5(l.C,0)===160};
BMe=function(l){if(!l.Z){g.Lk(l.info.oR.info)||l.info.oR.info.Cg();if(g.Lk(l.info.oR.info))var y=g.SrP(g.l9(l));else{y=new AQ(g.l9(l));const z=y.pos;y.pos=0;let r=null,Z=null;if($$(y,[408125543,307544935])){const e=y.pos+OL(y,!0);for(;y.pos<e;){if(OL(y,!1)!==29555){GI(y);continue}const A=y.pos+OL(y,!0);for(;y.pos<A;){if(OL(y,!1)!==26568){GI(y);continue}const Q=y.pos+OL(y,!0);for(;y.pos<Q;){var k=OL(y,!1);if(k===17543){if(k=LtT(y),k=B6(k))if(Z)for(const t of Object.keys(k))Z[t]=k[t];else Z=k}else k===
17827?(k=LtT(y),r||(r=k)):GI(y)}}}}y.pos=z;y=Z?new jNz(Z,r):null}l.Z=y}};
Hes=function(l,y){return y+1<l.count||l.N?l.offsets[y+1]-l.offsets[y]:-1};
QA=function(l){l.offsets.length<l.count+1&&l.resize(l.offsets.length*2)};
DfP=function(l){if(l=l.colorInfo)if(l=l.transferCharacteristics)return RVP[l];return null};
lz5=function(l){return t6((y,k)=>g.DC(y,k,4,1E3),l,{format:"RAW",
method:"GET",withCredentials:!0})};
g.yty=function(l){let y;l.responseType&&l.responseType!=="text"?l.responseType==="arraybuffer"&&(y=bl(new Uint8Array(l.response))):y=l.responseText;return!y||y.length>2048?"":y.indexOf("https://")===0?y:""};
t6=function(l,y,k){y.match(kXe);return l(y,k).then(z=>{const r=g.yty(z.xhr);return r?t6(l,r,k):z.xhr})};
zTz=function(l){return Be(l,y=>"FORMAT_STREAM_TYPE_OTF"===y.type)?"FORMAT_STREAM_TYPE_OTF":"FORMAT_STREAM_TYPE_UNKNOWN"};
rts=function(l,y,k=0,z){z=new g.OE("",z,!1);z.duration=k||0;for(const r of l){l=db(r,y,z.duration);const {yq:Z,s:e,Vd:A}=dl(6,759,r);(k=$E(Z||r.url||"",A,e))&&(l.streamType==="FORMAT_STREAM_TYPE_OTF"?wb(z,new h6(k,l)):wb(z,new GQ(k,l,Y$(r.initRange),Y$(r.indexRange))))}z.isOtf=!0;return z};
Z4Q=function(l,y,k=0,z){z=new g.OE("",z.experiments,!1);z.duration=k||0;for(const r of l){l=db(r,y,z.duration);k=Y$(r.initRange);const Z=Y$(r.indexRange),{yq:e,s:A,Vd:Q}=dl(7,758,r),t=$E(e||r.url||"",Q,A);t&&wb(z,new GQ(t,l,k,Z))}return z};
db=function(l,y,k=0){let z=l.mimeType||"";var r=l.itag;var Z=l.xtags;r=r?r.toString():"";Z&&(r+=`;${Z}`);Z=r;if(jT(z)){var e=l.width||640;r=l.height||360;var A=l.fps,Q=l.qualityLabel;const u=l.qualityOrdinal,W=l.colorInfo,V=l.projectionType;var t;l.stereoLayout&&(t=eTy[l.stereoLayout]);const T=DfP(l)||void 0;var O;W?.primaries&&(O=At_[W.primaries]||void 0);e=new nk(e,r,A,V,t,void 0,Q,u&&$5q[u],T,O);z=a_(z,e,i9[l.itag||""]);UE&&(z+="; enableflushduringseek=true");M2&&(z+="; enableresetaudiodecoder=true")}let d;
if(fk(z)){var w=l.audioSampleRate;t=l.audioTrack;w=new ST(w?+w:void 0,l.audioChannels,l.spatialAudioType,l.isDrc,l.loudnessDb,l.trackAbsoluteLoudnessLkfs,l.audioQuality||"AUDIO_QUALITY_UNKNOWN",l.isVb);t&&(O=t.displayName,r=t.id,A=t.audioIsDefault,t=t.isAutoDubbed,O&&(d=new g.XF(O,r||"",!!A,!!t)))}let h;l.captionTrack&&(t=l.captionTrack.displayName,O=l.captionTrack.vssId,r=l.captionTrack.languageCode,A=l.captionTrack.kind,Q=l.captionTrack.id,t&&O&&r&&(h=new d5T(t,O,r,A,l.xtags,Q)));t=Number(l.bitrate)/
8;O=Number(l.contentLength);r=Number(l.lastModified);Q=l.drmFamilies;A=l.type;l=Number(l.approxDurationMs);let U;if(y&&Q){U={};for(const u of Q)(Q=cV[u])&&(U[Q]=y[Q])}return new FP(Z,z,{audio:w,video:e,a7:d,contentProtection:U,CP:t,eX:k&&O?O/k:0,contentLength:O,lastModified:r,captionTrack:h,streamType:A,approxDurationMs:l})};
woq=function(l){return Be(l,y=>"FORMAT_STREAM_TYPE_OTF"===y.stream_type)?"FORMAT_STREAM_TYPE_OTF":"FORMAT_STREAM_TYPE_UNKNOWN"};
hTP=function(l,y,k=0,z){z=new g.OE("",z,!1);z.duration=k||0;for(const r of l)if(l=C2(r,y,z.duration),k=$E(r.url,r.sp,r.s))if(l.streamType==="FORMAT_STREAM_TYPE_OTF")wb(z,new h6(k,l));else{const Z=Py(r.init),e=Py(r.index);wb(z,new GQ(k,l,Z,e))}z.isOtf=!0;return z};
GXs=function(l,y,k=0,z){z=new g.OE("",z?.experiments,!1);z.duration=k||0;for(const r of l){l=C2(r,y,z.duration);k=Py(r.init);const Z=Py(r.index),e=$E(r.url,r.sp,r.s);e&&wb(z,new GQ(e,l,k,Z))}return z};
C2=function(l,y,k=0){let z=l.type;var r=l.itag;var Z=l.xtags;Z&&(r=l.itag+";"+Z);if(jT(z)){var e=(l.size||"640x360").split("x");e=new nk(+e[0],+e[1],+l.fps,l.projection_type,+l.stereo_layout,void 0,l.quality_label,+l.quality_ordinal,l.eotf,l.primaries);z=a_(z,e,i9[l.itag]);UE&&(z+="; enableflushduringseek=true");M2&&(z+="; enableresetaudiodecoder=true")}let A,Q;fk(z)&&(A=new ST(+l.audio_sample_rate||void 0,+l.audio_channels||0,l.spatial_audio_type,!!l.drc),l.name&&(Q=new g.XF(l.name,l.audio_track_id,
l.isDefault==="1",l.isAutoDubbed==="1")));let t;l.caption_display_name&&l.caption_vss_id&&l.caption_language_code&&(t=new d5T(l.caption_display_name,l.caption_vss_id,l.caption_language_code,l.caption_kind,l.xtags,l.caption_id));Z=Number(l.bitrate)/8;const O=Number(l.clen),d=Number(l.lmt);k=k&&O?O/k:0;let w;if(y&&l.drm_families){w={};for(const h of l.drm_families.split(","))w[h]=y[h]}return new FP(r,z,{audio:A,video:e,a7:Q,contentProtection:w,CP:Z,eX:k,contentLength:O,lastModified:d,captionTrack:t,
streamType:l.stream_type,approxDurationMs:Number(l.approx_duration_ms)})};
azC=function(l){switch(l){case "equirectangular":return"EQUIRECTANGULAR";case "equirectangular_threed_top_bottom":return"EQUIRECTANGULAR_THREED_TOP_BOTTOM";case "mesh":return"MESH";case "rectangular":return"RECTANGULAR";default:return"UNKNOWN"}};
i4s=function(l){switch(l){case "spatial_audio_type_ambisonics_5_1":return"SPATIAL_AUDIO_TYPE_AMBISONICS_5_1";case "spatial_audio_type_ambisonics_quad":return"SPATIAL_AUDIO_TYPE_AMBISONICS_QUAD";case "spatial_audio_type_foa_with_non_diegetic":return"SPATIAL_AUDIO_TYPE_FOA_WITH_NON_DIEGETIC";default:return"SPATIAL_AUDIO_TYPE_NONE"}};
Mit=function(l,y,k){return U5e(new g.OE(l,y,k),l)};
Va=function(l){return g.nR(l.Z,y=>ux(7,5754,y.pP.Z))};
XHT=function(l){return g.nR(l.Z,y=>!!y.info.video&&y.info.video.isHdr())};
wb=function(l,y){l.Z[y.info.id]=y;l.V.set(TI(y,l.UA),y)};
U5e=function(l,y=""){l.state=1;l.rb=(0,g.f)();return lz5(y||l.sourceUrl).then(k=>{if(!l.IR()){l.I9=k.status;k=k.responseText;const r=new DOMParser;k=hY(r,ku(k),"text/xml").getElementsByTagName("MPD")[0];l.b0=W7s(NO(k,"minimumUpdatePeriod"))*1E3||Infinity;b:{if(k.attributes)for(z of k.attributes)if(z.value==="http://youtube.com/yt/2012/10/10"){var z=z.name.split(":")[1];break b}z=""}l.K=z;l.isLive=l.b0<Infinity&&l.isLivePlayback;l.PG=Number(NO(k,l.K+":earliestMediaSequence"))||0;if(z=Date.parse(Isq(NO(k,
l.K+":mpdResponseTime"))))l.HG=((0,g.f)()-z)/1E3;l.isLive&&k.getElementsByTagName("SegmentTimeline").length<=0||g.He(k.getElementsByTagName("Period"),l.T7,l);l.state=2;l.publish("loaded");Xo5(l)}return l}).Ya(k=>{let z;
k instanceof Hq&&(z=k.xhr,l.I9=z.status);l.state=3;l.publish("loaderror");return n6(z)})};
g.cte=function(l){return g.nR(l.Z,y=>E1(y.info.mimeType))};
WmP=function(l,y,k){var z=l.videoId,r=g.b9(l),Z=l.O(),e={html5Preference:"HTML5_PREF_WANTS",lactMilliseconds:String(hW()),referer:document.location.toString(),signatureTimestamp:20520},A=g.wz();l.isAutonav&&(e.autonav=!0);A.G7(141)&&(e.autonavState=A.G7(140)?"STATE_OFF":"STATE_ON");e.autoCaptionsDefaultOn=A.G7(66);CHy(l)&&(e.autoplay=!0);Z.A&&l.cycToken&&(e.cycToken=l.cycToken);Z.enablePrivacyFilter&&(e.enablePrivacyFilter=!0);l.isFling&&(e.fling=!0);var Q=l.forceAdsUrl;if(Q){A={};var t=[];Q=Q.split(",");
for(var O of Q){var d=O.split("|");d.length!==3||O.includes("=")||(d[0]=`breaktype=${d[0]}`,d[1]=`offset=${d[1]}`,d[2]=`url=${d[2]}`);Q={adtype:"video_ad"};for(var w of d){const [J,...K]=w.split("=");Q[J]=K.join("=")}d=Q.url;const u=Q.presetad,W=Q.viralresponseurl,V=Number(Q.campaignid),T=Q.bibliotecaadid;if(Q.adtype==="in_display_ad")d&&(A.url=d),u&&(A.presetAd=u),W&&(A.viralAdResponseUrl=W),V&&(A.viralCampaignId=String(V)),T&&(A.bibliotecaAdId=T);else if(Q.adtype==="video_ad"){const J={offset:{kind:"OFFSET_MILLISECONDS",
value:String(Number(Q.offset)||0)}};if(Q=b4C[Q.breaktype])J.breakType=Q;d&&(J.url=d);u&&(J.presetAd=u);W&&(J.viralAdResponseUrl=W);V&&(J.viralCampaignId=String(V));T&&(J.bibliotecaAdId=T);t.push(J)}}e.forceAdParameters={videoAds:t,inDisplayAd:A}}l.isInlinePlaybackNoAd&&(e.isInlinePlaybackNoAd=!0);l.isLivingRoomDeeplink&&(e.isLivingRoomDeeplink=!0);O=l.vM;if(O!=null){O={startWalltime:String(O)};if(w=l.Wi)O.manifestDuration=String(w||14400);e.liveContext=O}l.mutedAutoplay&&(e.mutedAutoplay=!0,O=Z.getWebPlayerContextConfig(),
O?.embedsHostFlags?.allowMutedAutoplayDurationMode&&O?.embedsHostFlags?.allowMutedAutoplayDurationMode.includes(uJq[l.mutedAutoplayDurationMode])&&(e.mutedAutoplayDurationMode=uJq[l.mutedAutoplayDurationMode]));if(l.BF?0:l.jN)e.splay=!0;O=l.vnd;O===5&&(e.vnd=O);O={};if(w=l.isMdxPlayback)O.triggeredByMdx=w;if(w=l.xJ)O.skippableAdsSupported=w.split(",").includes("ska");if(t=l.j5){w=l.xV;A=[];for(var h of zv4(t)){t=h.platform;t={applicationState:h.QN?"INACTIVE":"ACTIVE",clientFormFactor:x5q[t]||"UNKNOWN_FORM_FACTOR",
clientName:Zzt[h.e7]||"UNKNOWN_INTERFACE",clientVersion:h.deviceVersion||"",platform:m5z[t]||"UNKNOWN_PLATFORM"};Q={};if(w){var U=void 0;try{U=JSON.parse(w)}catch(u){g.WH(u)}U&&(Q={params:[{key:"ms",value:U.ms}]},U.advertising_id&&(Q.advertisingId=U.advertising_id),U.limit_ad_tracking!==void 0&&U.limit_ad_tracking!==null&&(Q.limitAdTracking=U.limit_ad_tracking),t.osName=U.os_name,t.userAgent=U.user_agent,t.windowHeightPoints=U.window_height_points,t.windowWidthPoints=U.window_width_points)}A.push({adSignalsInfo:Q,
remoteClient:t})}O.remoteContexts=A}h=l.sourceContainerPlaylistId;U=l.serializedMdxMetadata;if(h||U)w={},h&&(w.mdxPlaybackContainerInfo={sourceContainerPlaylistId:h}),U&&(w.serializedMdxMetadata=U),O.mdxPlaybackSourceContext=w;e.mdxContext=O;h=y.width;h>0&&(e.playerWidthPixels=Math.round(h));if(y=y.height)e.playerHeightPixels=Math.round(y);k!==0&&(e.vis=k);if(k=Z.widgetReferrer)e.widgetReferrer=k.substring(0,128);g.u9(Z)&&e&&(e.ancestorOrigins=Z.ancestorOrigins);l.defaultActiveSourceVideoId&&(e.compositeVideoContext=
{defaultActiveSourceVideoId:l.defaultActiveSourceVideoId});if(Z=Z.getWebPlayerContextConfig())e.encryptedHostFlags=Z.encryptedHostFlags;z={videoId:z,context:r,playbackContext:{contentPlaybackContext:e}};l.vV&&(z.playbackContext.reloadPlaybackContext={reloadPlaybackParams:l.vV?.reloadPlaybackParams});l.contentCheckOk&&(z.contentCheckOk=!0);if(r=l.clientPlaybackNonce)z.cpn=r;if(r=l.playerParams)z.params=r;if(r=l.playlistId)z.playlistId=r;l.racyCheckOk&&(z.racyCheckOk=!0);r=l.O();e=r.embedConfig;l.va&&
r.X("embeds_enable_per_video_embed_config")?z.serializedThirdPartyEmbedConfig=l.va:e&&(z.serializedThirdPartyEmbedConfig=e);z.captionParams={};e=g.wz().G7(65);l.deviceCaptionsOn!=null?z.captionParams.deviceCaptionsOn=l.deviceCaptionsOn:g.xp(r)&&(z.captionParams.deviceCaptionsOn=e!=null?!e:!1);l.ma&&(z.captionParams.deviceCaptionsLangPref=l.ma);l.zr.length?z.captionParams.viewerSelectedCaptionLangs=l.zr:g.xp(r)&&(e=g.Xm(),e?.length&&(z.captionParams.viewerSelectedCaptionLangs=e));e=l.fetchType==="onesie"&&
l.X("html5_onesie_attach_po_token");Z=l.fetchType!=="onesie"&&l.X("html5_non_onesie_attach_po_token");if(e||Z)e=l.O(),e.zA&&(z.serviceIntegrityDimensions={},z.serviceIntegrityDimensions.poToken=e.zA);r.X("fetch_att_independently")&&(z.attestationRequest={omitBotguardData:!0});z.playbackContext||(z.playbackContext={});z.playbackContext.devicePlaybackCapabilities=qo4(l);z.playbackContext.devicePlaybackCapabilities.supportsVp9Encoding===!1&&l.Md("noVp9",{});return z};
Iz5=function(l){return g.nR(l.Z,y=>y.info.video?y.info.video.projectionType==="EQUIRECTANGULAR":!1)};
Tl5=function(l){return g.nR(l.Z,y=>y.info.video?y.info.video.projectionType==="EQUIRECTANGULAR_THREED_TOP_BOTTOM":!1)};
Vi5=function(l){return g.nR(l.Z,y=>y.info.video?y.info.video.projectionType==="MESH":!1)};
PHz=function(l){return g.nR(l.Z,y=>y.info.video?y.info.video.stereoLayout===1:!1)};
Jtz=function(l){return Fw(l.Z,y=>y.info.video?y.PG():!0)};
pot=function(l,y){let k=NO(y,"id");k=k.replace(":",";");let z=NO(y,"mimeType");var r=NO(y,"codecs");z=r?`${z}; codecs="${r}"`:z;r=Number(NO(y,"bandwidth"))/8;const Z=Number(sL(y,"BaseURL").getAttribute(l.K+":contentLength")),e=l.duration&&Z?Z/l.duration:0;if(jT(z)){var A=Number(NO(y,"width")),Q=Number(NO(y,"height")),t=Number(NO(y,"frameRate"));const U=azC(NO(y,l.K+":projectionType"));a:switch(NO(y,l.K+":stereoLayout")){case "layout_left_right":var O=1;break a;case "layout_top_bottom":O=2;break a;
default:O=0}O=new nk(A,Q,t,U,O)}if(fk(z)){var d=Number(NO(y,"audioSamplingRate"));var w=Number(NO(y.getElementsByTagName("AudioChannelConfiguration")[0],"value"));A=i4s(NO(y,l.K+":spatialAudioType"));d=new ST(d,w,A);a:{Q=NO(y,"lang")||"und";if(w=sL(y,"Role"))if(t=NO(w,"value")||"",g.vO(YoC,t)){w=`${Q}.${YoC[t]}`;A=t==="main";l=NO(y,l.K+":langName")||`${Q} - ${t}`;w=new g.XF(l,w,A);break a}w=void 0}}if(y=sL(y,"ContentProtection"))if(y.getAttribute("schemeIdUri")==="http://youtube.com/drm/2012/10/10"){var h=
{};for(y=y.firstChild;y!=null;y=y.nextSibling){if(!(y instanceof Element))continue;if(!/SystemURL/.test(y.nodeName))continue;l=y.getAttribute("type");A=y.textContent;l&&A&&(h[l]=A.trim())}}else h=void 0;return new FP(k,z,{audio:d,video:O,a7:w,contentProtection:h,CP:r,eX:e,contentLength:Z})};
Xo5=function(l){var y=l.b0;isFinite(y)&&(mE(l)?l.refresh():(y=Math.max(0,l.rb+y-(0,g.f)()),l.S||(l.S=new g.B_(l.refresh,y,l),g.x(l,l.S)),l.S.start(y)))};
mE=function(l){return l.isLive&&(0,g.f)()-l.rb>=l.b0};
Kmg=function(l){l=l.Z;for(const y in l){const k=l[y].index;if(k.isLoaded())return k.x3()+1}return 0};
PV=function(l){return l.Q4?l.Q4-(l.D||l.timestampOffset):0};
J6=function(l){return l.iW?l.iW-(l.D||l.timestampOffset):0};
Yp=function(l){if(!isNaN(l.RR))return l.RR;var y=l.Z;for(var k in y){var z=y[k].index;if(z.isLoaded()&&!E1(y[k].info.mimeType)){y=0;for(k=z.zi();k<=z.x3();k++)y+=z.getDuration(k);y/=z.wj();y=Math.round(y/.5)*.5;z.wj()>10&&(l.RR=y);return y}if(l.isLive&&(z=y[k],z.GZ))return z.GZ}return NaN};
gVy=function(l,y){l=Re(l.Z,z=>z.index.isLoaded());
if(!l)return NaN;l=l.index;const k=l.NL(y);return l.getStartTime(k)===y?y:k<l.x3()?l.getStartTime(k+1):NaN};
EV5=function(l,y){if(!l.Z["0"]){var k=new FP("0","fakesb",{video:new nk(0,0,0,void 0,void 0,"auto")});l.Z["0"]=y?new p2(new g.zq("http://www.youtube.com/videoplayback"),k,"fake"):new GQ(new g.zq("http://www.youtube.com/videoplayback"),k,new VC(0,0),new VC(0,0))}};
K2=function(l){if(l.isManifestless)for(const y in l.Z)l.Z[y].index.segments=[]};
gb=function(l,y,k){for(const z in l.Z){const r=E1(l.Z[z].info.mimeType)||l.Z[z].info.q4();k===r&&l.Z[z].index?.C_(y)}};
var r44=function(l,y){return VL[G[19]](this,48,8365,l,y)};
var fzC=function(l){for(const y in l.Z)E1(l.Z[y].info.mimeType)||qrT(l.Z[y].index,Infinity)},EE=function(l,y,k){for(const e in l.Z){var z=l.Z[e].index,r=y,Z=k;
z.zB&&(r&&(z.Rt=Math.max(z.Rt,r)),Z&&(z.Je=Math.max(z.Je||0,Z)))}k&&(l.sj=k/1E3)},jIz=function(l,y,k,z=!1){z&&k===l.kz||(l.Ja.push(y),l.kz=k,l.publish("cuepointsadded",k))},SoP=function(l){l.iW=0;
l.Q4=0;l.Ob=0},f2=function(l){return l.u0&&l.isManifestless?l.isLiveHeadPlayable:l.isLive},a_=function(l,y,k){j1===null&&(j1=window.MediaSource&&MediaSource.isTypeSupported&&MediaSource.isTypeSupported('video/webm; codecs="vp09.02.51.10.01.09.16.09.00"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.02.51.10.01.09.99.99.00"'));
if(nVq&&window.MediaSource&&MediaSource.isTypeSupported!==void 0)return j1||k!=="9"&&k!=="("?j1||k!=="9h"&&k!=="(h"||(l='video/webm; codecs="vp9.2"'):l='video/webm; codecs="vp9"',l;if(!j1&&!S1||l!=='video/webm; codecs="vp9"'&&l!=='video/webm; codecs="vp9.2"')return l;k="00";let z="08",r="01",Z="01",e="01";l==='video/webm; codecs="vp9.2"'&&(k="02",z="10",y.primaries==="bt2020"&&(e=r="09"),y.Z==="smpte2084"&&(Z="16"),y.Z==="arib-std-b67"&&(Z="18"));return`video/webm; codecs="${["vp09",k,"51",z,"01",
r,Z,e,"00"].join(".")}"`},FF=function(l,y,k){l=`${l}${y>49?"p60":y>32?"p48":""}`;
y=Ua()[l];if(y!=null&&y>0)return y;y=n2.get(l);if(y!=null&&y>0)return y;k=k?.get(l);return k!=null&&k>0?k:8192},FmP=function(l,y=!1){LR4(y);
v6P(y);if(y){for(const k of n2.keys())k.startsWith("1")||n2.delete(k);for(const k of o_.values())k.startsWith("1")||o_.delete(k);for(const k of l.keys())k.startsWith("1")||l.delete(k)}else n2.clear(),o_.clear(),l.clear()},sI_=function(l,{isOtf:y,
Zu:k,XI:z,vZ:r,sZ:Z,f2:e,a_:A,h2:Q,wX:t,disableAv1:O,IP:d}){const w=new oV4(l);if(l.yM()||l.X("html5_logging_format_selection"))w.Z=!0;w.PG=Z;w.f2=e&&l.A;w.wX=t;g.G6("windows nt 5.1")&&!g.N2&&(w.uS=!0);if(Z=k)Z=g.sE(l)?Nly(l):!1;Z&&(w.C_=!0);A&&(w.uS=!0,w.PF=!0);y&&!l.X("html5_otf_prefer_vp9")&&(w.uS=!0);l.playerStyle==="picasaweb"&&(y&&(w.uS=!1),w.Y=!1);r&&(w.uS=!0);fb(l.J,vt.CHANNELS)&&(l.X("html5_enable_ac3")&&(w.V=!0),l.X("html5_enable_eac3")&&(w.J=!0),l.X("html5_enable_ac3_gapless")&&(w.HG=!0));
l.X("html5_block_8k_hfr")&&(w.mK=!0);w.S=g.i_(l.experiments,"html5_max_selectable_quality_ordinal");w.K=g.i_(l.experiments,"html5_min_selectable_quality_ordinal");L2&&(w.g4=480);if(z||k)w.Y=!1;w.gb=!1;w.disableAv1=O;y=vV(l,w.C,void 0,w.disableAv1);y>0&&y<2160&&(eL()||l.X("html5_format_hybridization"))&&(w.C.supportsChangeType=+eL(),w.IF=y);y>=2160&&(w.Ja=!0);w.h2=Q;w.u0=g.eG||T6()&&!Q?!1:!0;w.A=l.X("html5_format_hybridization");w.Oj=l.X("html5_disable_encrypted_vp9_live_non_2k_4k");w.kz=d;return w},
vV=function(l,y={},k,z=!1){if(z)return y.disabled=1,0;
if(fb(l.J,vt.AV1_CODECS)&&fb(l.J,vt.HEIGHT)&&fb(l.J,vt.BITRATE))return y.isCapabilityUsable=1,8192;z=1080;var r=navigator.hardwareConcurrency;r<=2&&(z=480);y.coreCount=r;if(r=g.i_(l.experiments,"html5_default_av1_threshold"))z=y["default"]=r;if(l=l.J.C_)y.mcap=l,z=Math.max(z,l);if(k){if(l=k.videoInfos.find(Z=>Z.Z())?.J?.powerEfficient)z=8192,y.isEfficient=1;
k=k.videoInfos[0].video;r=Math.min(FF("1",k.fps),FF("1",30));y.perfCap=r;z=Math.min(z,r);k.isHdr()&&!l&&(y.hdr=1,z*=.75)}else k=FF("1",30),y.perfCap30=k,z=Math.min(z,k),k=FF("1",60),y.perfCap60=k,z=Math.min(z,k);return y.av1Threshold=z},hvq=function(l){let y=["o",
"a","A"];l.wX===1&&(l.V&&(y=["mac3","MAC3"].concat(y)),l.J&&(y=["meac3","MEAC3"].concat(y)),l.hv&&(y=["i","I"].concat(y)));l.C_&&(y=["so","sa"].concat(y));!l.PF||l.HG||l.N||l.jN||y.unshift("a");l.N&&(y=(Lm_[l.N]||[l.N]).concat(y));return y},cis=function(l){if(l.PG)return["f"];
if(g.G6("appletv5"))return"h 9h 9 8 H (h ( *".split(" ");let y=["9h","9","h","8"];l.SN&&y.push("1e");y=y.concat(["(h","(","H","*"]);l.Ja&&(y.unshift("1"),y.unshift("1h"));l.uS&&y.unshift("h");l.D&&(y=(Lm_[l.D]||[l.D]).concat(y));return y},BV=function(){const l=window;
let y=l.MSMediaKeys;CL()&&!y&&(y=l.WebKitMediaKeys);return y&&y.isTypeSupported?y:null},HV=function(l){return navigator.requestMediaKeySystemAccess?g.Mx&&!g.is()?qp("45"):g.eG||g.wx?l.z7("edge_nonprefixed_eme"):g.N2?qp("47"):g.Km&&l.z7("html5_enable_safari_fairplay")?!1:!0:!1},R_=function(l){return l.V?!1:!l.keySystemAccess&&!!BV()&&l.keySystem==="com.microsoft.playready"},Dy=function(l){return l.keySystem==="com.microsoft.playready"};
var k15=function(l,y,k,z,r,Z,e){return pR[G[19]](this,4,2370,l,y,k,z,r,Z,e)};
lh=function(l){return!l.keySystemAccess&&!!BV()&&l.keySystem==="com.apple.fps.1_0"};
y6=function(l){return l.keySystem==="com.youtube.fairplay"};
g.kf=function(l){return l.flavor==="fairplay"};
vV4=function(l,y,k,z){const r=Uw(),Z=(k=r||k&&CL())?["com.youtube.fairplay"]:["com.widevine.alpha"];y&&Z.unshift("com.youtube.widevine.l3");r&&z&&Z.unshift("com.youtube.fairplay.sbdl");return k?Z:l?[...Z,...zC.playready]:[...zC.playready,...Z]};
Zw=function(l){if(!l.IR())if(l.C.length===0)l.callback(l.V);else{var y=l.C[0],k=l.N[y],z=Blg(l,k);rk&&rk.keySystem===y&&rk.d2===JSON.stringify(z)?(l.Md("remksa",{re:!0}),H4C(l,k,rk.keySystemAccess)):(l.Md("remksa",{re:!1,ok:rk?.keySystem??""}),rk=void 0,navigator.requestMediaKeySystemAccess(y,z).then(Dq(r=>{H4C(l,k,r,z)}),Dq(()=>{l.J=!l.J&&l.N[l.C[0]].flavor==="widevine";
l.J||l.C.shift();Zw(l)})))}};
D5s=function(l){if(BV()&&(g.Km||us))l.V.push(new ez("fairplay","com.apple.fps.1_0","",l.Qj.experiments));else{var y=RTy(),k=g.Dg(l.C,z=>{const r=l.N[z];let Z=!1,e=!1;for(const A in l.Z[r.flavor])y(A,z)&&(r.C[A]=!0,Z=Z||A.indexOf("audio/")===0,e=e||A.indexOf("video/")===0);return Z&&e});
k&&l.V.push(l.N[k]);l.C=[]}l.callback(l.V)};
lHy=function(l,y){l.callback=y;l.V=[];HV(l.Qj.experiments)?Zw(l):D5s(l)};
Blg=function(l,y){const k={initDataTypes:["cenc","webm"],audioCapabilities:[],videoCapabilities:[]};if(l.X("html5_enable_vp9_fairplay")&&y6(y))return k.audioCapabilities.push({contentType:'audio/mp4; codecs="mp4a.40.5"'}),k.videoCapabilities.push({contentType:'video/mp4; codecs="avc1.4d400b"'}),[k];Dy(y)&&(k.initDataTypes=["keyids","cenc"]);for(const r of Object.keys(l.Z[y.flavor])){var z=r.indexOf("audio/")===0;const Z=z?k.audioCapabilities:k.videoCapabilities;y.flavor!=="widevine"||l.J?Z.push({contentType:r}):
z?Z.push({contentType:r,robustness:"SW_SECURE_CRYPTO"}):(g.Mx&&g.G6("windows nt")&&!l.X("html5_drm_enable_moho")||Z.push({contentType:r,robustness:"HW_SECURE_ALL"}),z=r,l.Qj.J.C&&r.includes("vp09")&&(z=r+"; experimental=allowed"),Z.push({contentType:z,robustness:"SW_SECURE_DECODE"}),AA(l.Qj)==="MWEB"&&(If()||af())&&(l.Md("swcrypto",{}),Z.push({contentType:r,robustness:"SW_SECURE_CRYPTO"})))}return[k]};
H4C=function(l,y,k,z){if(!l.IR()){z&&(rk={keySystem:y.keySystem,keySystemAccess:k,d2:JSON.stringify(z)});y.keySystemAccess=k;if(Dy(y)){var r=ik();for(var Z of Object.keys(l.Z[y.flavor]))y.C[Z]=!!r.canPlayType(Z)}else{Z=y.keySystemAccess.getConfiguration();if(Z.audioCapabilities)for(r of Z.audioCapabilities)y.C[r.contentType]=!0;if(Z.videoCapabilities)for(const e of Z.videoCapabilities)y.C[e.contentType]=!0}l.V.push(y);l.useCobaltWidevine||l.X("html5_enable_vp9_fairplay")&&y.Z()?(l.C.shift(),Zw(l)):
l.callback(l.V)}};
RTy=function(){const l=BV();if(l){const k=l.isTypeSupported;return(z,r)=>k(r,z)}const y=ik();
return y&&(y.addKey||y.webkitAddKey)?(k,z)=>!!y.canPlayType(k,z):()=>!1};
r04=function(l,y){switch(y.Cc){case "bool":return l.z7(y.Lx);case "int":return l=y0y(l,y.Lx),to(l);case "double":return y0y(l,y.Lx);case "string":return kJt(l,y.Lx);case "int32_list":return zyg(l,y.Lx);case "int64_list":return zyg(l,y.Lx).map(k=>to(k));
case "string_list":throw Error("String list flags are not supported in WPCC");default:throw Error("Unknown flag type");}};
y0y=function(l,y){l=l.flags.get(`${y}`);return Number(l)||0};
kJt=function(l,y){return(l=l.flags.get(`${y}`))?l.toString():""};
zyg=function(l,y){if(l=l.flags.get(`${y}`))if(l=l.replace(/\[ *(.*?) *\]/,"$1"))return l.split(",").map(Number);return[]};
$f=function(l,y){return(l=l.G7(y))?l.toString():""};
g.i_=function(l,y,k=0){l=l.G7(y);JSON.stringify(l);return l===void 0?k:Number(l)};
ZGe=function(l){if(l=l.G7("html5_web_po_experiment_ids"))if(l=l.replace(/\[ *(.*?) *\]/,"$1"))return l.split(",").map(Number);return[]};
eyz=function(l){if(l.Z)return l.Z;if(l.experimentIds.length<=1)return l.Z=l.experimentIds,l.Z;const y=[...l.experimentIds].map(k=>Number(k));
y.sort();for(let k=y.length-1;k>0;--k)y[k]-=y[k-1];l.Z=y.map(k=>k.toString());
l.Z.unshift("v1");return l.Z};
axz=function(l,y){const k=new Map;for(const z of y.keys()){const r=z.split("_")[0];l.has(r)||k.set(z,y.get(z))}return k};
UMT=function(l,y,k){const z=y.video?.fps||0,r=`${l}_${z}`,Z=!!y.audio,e={itag:y.itag,Dr:l,a9:Z};if(Z)e.numChannels=y.audio.numChannels;else{var A=y.video;e.maxWidth=A?.width;e.maxHeight=A?.height;e.maxFramerate=z;e.maxBitrateBps=y.CP*8;e.sH=A?.isHdr()}A=k.get(r);A?Z||(y=Math.max(A.maxWidth||0,A.maxHeight||0)>Math.max(e.maxWidth||0,e.maxHeight||0)?A:e,l={itag:y.itag,Dr:l,a9:Z,maxWidth:Math.max(A.maxWidth||0,e.maxWidth||0),maxHeight:Math.max(A.maxHeight||0,e.maxHeight||0),maxFramerate:z,sH:y.sH},l.maxBitrateBps=
y.maxBitrateBps,k.set(r,l)):k.set(r,e)};
mM5=function(l,y,k=1){const z=y.itag;if(z==="0")return!0;let r=y.mimeType;if(y.Dr==="1e"&&!l.V)return"dav1enc";if(y.Z()&&l.D)return"dav1";if(y.video&&(y.video.isHdr()||y.video.primaries==="bt2020")&&!(fb(l,vt.EOTF)||window.matchMedia&&(window.matchMedia("(dynamic-range: high), (video-dynamic-range: high)").matches||window.screen.pixelDepth>24&&window.matchMedia("(color-gamut: p3)").matches)))return"dhdr";if(z==="338"&&!(g.Mx?qp(53):g.N2&&qp(64)))return"dopus";k=Bxs(y,k);l.C&&y.V()&&(k[vt.EXPERIMENTAL.name]=
"allowed");for(const A of Object.keys(vt)){const Q=vt[A];var Z;if(Z=k[Q.name])if(Z=!(Q===vt.EOTF&&y.mimeType.indexOf("vp09.02")>0)){Z=Q;var e=y;Z=!(l.experiments.z7("html5_ignore_h264_framerate_cap")&&Z===vt.FRAMERATE&&(e.Dr==="H"||e.Dr==="h"))}if(Z)if(fb(l,Q))if(l.J){if(l.J[Q.name]<k[Q.name])return Q.name}else r=`${r}; ${Q.name}=${k[Q.name]}`;else if(Nx(y)&&Q===vt.EOTF)return"dvp92"}l.A&&y.video&&y.video.qualityOrdinal>1080&&y.contentProtection&&(r+="; hdcp=2.2");return z==="227"?"hqcenc":z!=="585"&&
z!=="588"&&z!=="583"&&z!=="586"&&z!=="584"&&z!=="587"&&z!=="591"&&z!=="592"||l.experiments.z7("html5_enable_new_hvc_enc")?Uw()&&hD()>=21&&g.G6("appletv5")&&(z==="410"||z==="845")?!0:l.isTypeSupported(r)?!0:"tpus":"newhvc"};
fb=function(l,y){y.name in l.K||(l.K[y.name]=A0z(l,y));return l.K[y.name]};
$B5=function(l){navigator.mediaCapabilities?.decodingInfo&&navigator.mediaCapabilities.decodingInfo({type:"media-source",video:{contentType:'video/mp4; codecs="av01.0.12M.08"',width:3840,height:2160,bitrate:32E6,framerate:60}}).then(y=>{y.smooth&&y.powerEfficient&&(l.C_=2160)})};
Q6=function(){const l=af()&&!qp(29),y=g.G6("google tv")&&g.G6("chrome")&&!qp(30);return l||y?!1:d4y()};
QGe=function(l,y,k){let z=480;for(const r of y)y=r.video.qualityOrdinal,y<=1080&&y>z&&mM5(l,r,k)===!0&&(z=y);return z};
g.tA=function(l,y=!1){return Q6()&&l.isTypeSupported('audio/mp4; codecs="mp4a.40.2"')||!y&&l.canPlayType(ik(),"application/x-mpegURL")?!0:!1};
OGQ=function(l){tBq(()=>{for(const y of Object.keys(vt))fb(l,vt[y])})};
A0z=function(l,y){if(l.J)return!!l.J[y.name];if(y===vt.BITRATE&&l.isTypeSupported('video/webm; codecs="vp9"; width=3840; height=2160; bitrate=2000000')&&!l.isTypeSupported('video/webm; codecs="vp9"; width=3840; height=2160; bitrate=20000000'))return!1;if(y===vt.AV1_CODECS)return l.isTypeSupported(`video/mp4; codecs=${y.valid}`)&&!l.isTypeSupported(`video/mp4; codecs=${y.qc}`);let k;y.video?(k='video/webm; codecs="vp9"',l.isTypeSupported(k)||(k='video/mp4; codecs="avc1.4d401e"')):(k='audio/webm; codecs="opus"',
l.isTypeSupported(k)||(k='audio/mp4; codecs="mp4a.40.2"'));return l.isTypeSupported(`${k}; ${y.name}=${y.valid}`)&&!l.isTypeSupported(`${k}; ${y.name}=${y.qc}`)};
dBy=function(l,y){let k=0;l.N.has(y)&&(k=l.N.get(y).aB);l.N.set(y,{aB:k+1,B$:2**(k+1)});l.Z=!0};
hy5=function(l,y,k,z,r){if(y&&typeof y==="object"){const Z=e=>w5P(l,e,k,z,r);
if(q9(y))return y.then(Z);if(Ex(y))return FX(y,Z)}return w5P(l,y,k,z,r)};
aHs=function(l,y,k,z=1){k>=0&&(y in l.Z||(l.Z[y]=new GJt),l.Z[y].GV(k,z))};
w5P=function(l,y,k,z,r){const Z=(0,g.f)();r=r?r(y):void 0;const e=r?.US??1;e!==0&&aHs(l,r?.profile??k,Z-z,e);return y};
iGz=function(l){const y=window;y.ywc||(y.ywc={});var k=y.ywc[l];if(k)return k;k={};return y.ywc[l]=k};
UB5=function(l){const y=window;y.ywc&&delete y.ywc[l]};
MBT=function(l){const y=iGz(l);if(y.binP)return y.binP;y.binP=Promise.resolve().then(()=>fetch(l)).then(k=>{if(!k.ok)throw Error(`HTTP${k.statusText}`);
return k.arrayBuffer()});
y.binP.then(k=>{y.bin=k},()=>{UB5(l)});
return y.binP};
Clg=function(l,y,k){return sx(void 0,function(){return function*(){const z=O9.Jg(),r=l&&dk;if(!r&&!y)return k?.("wasmns",{p:l?"1":"0",a:y?"1":"0",s:dk?"1":"0"}),j3(Error("wasm.wm.ns"));const Z=new X5y;if(r)try{const e=yield*LE(c05(Z,l)),A=new wk(e,Z,!1,!0);O9.IX("winit",z);k?.("wasmsw",{});return A}catch(e){if(k?.("wasmerrw",{e:`${e}`}),!y)throw Error(`wasm.wm.iw: ${e}`);}if(!y)throw Error("wasm.wm.xx");try{const e=yield*LE(y(Z)),A=new wk({exports:e},Z,!0,!0);O9.IX("winitjs",z);k?.("wasmsa",{});return A}catch(e){throw k?.("wasmerra",
{e:`${e}`}),Error(`wasm.wm.ia: ${e}`);}}()})};
c05=function(l,y){return sx(bGC,function(){const k=this;return function*(){if(!k.Z)throw"wasm.ps.ns";const z=yield*LE(uf_(k,y));if(!z)throw"wasm.ps.um";return yield*LE(WebAssembly.instantiate(z,l))}()})};
uf_=function(l,y){return sx(l,function(){const k=this;return function*(){const z=[],r=()=>"wasm.ps.c: ["+z.map(A=>`"${A}"`).join(", ")+"]",Z=iGz(y);
if(Z.mod)return Z.mod;if(Z.modP)try{return yield*LE(Z.modP)}catch(A){z.unshift("pcm")}let e=Z.bin;if(!e&&Z.binP)try{e=yield*LE(Z.binP)}catch(A){z.unshift("pfb")}if(!e)try{e=yield*LE(MBT(y))}catch(A){throw k.Z=!1,z.unshift(`fb: ${A}`),r();}try{return yield*LE(WebAssembly.compile(e))}catch(A){UB5(y),z.unshift(`ca: ${A}`)}throw r();}()})};
xBy=function(l,y,k,z){k=l.Z.pY(k);var r=l.C;r.Z.exports.AES128CTRCipher_setCounter(r.cipher,k.byteOffset);y=l.Z.pY(y);l.C.encrypt(y);r=void 0;if(z){z=l.Z;r=l.N;const Z=new Uint8Array(z.exports.memory.buffer,z.malloc(32),32);z.exports.Sha256Hmac(r.byteOffset,r.byteLength,k.byteOffset,k.byteLength,y.byteOffset,y.byteLength,Z.byteOffset);r=l.Z.EJ(Z)}l.Z.free(k.byteOffset);return{Bu:l.Z.EJ(y),signature:r}};
mB5=function(l){l.V||(l.V=new hA(l.C));return l.V};
GC=function(l){try{return fx(l)}catch(y){return null}};
qn5=function(l){var y=sW5();if(y.values){y=y.values;const e={};for(var k of Object.keys(l.values)){y[k]&&l.C[k]&&(l.values[k]+=y[k]-l.C[k]);var z=l,r=z;if(!r.values[k]){var Z=sW5();r.values=Z.values||{};r.OQ=Z.halfLives||{};r.C=Z.values?Object.assign({},Z.values):{}}e[k]=z.values[k]&&z.OQ[k]?z.values[k]/2**(z.Z/z.OQ[k]):0}l.C=e}k=l.OQ;y={};y.values=l.C;y.halfLives=k;g.eY("yt-player-memory",y,2592E3)};
OH=function(l){return/web/i.test(AA(l))};
g.aq=function(l){return AA(l)==="WEB_UNPLUGGED"};
g.ow=function(l){return AA(l)==="WEB_REMIX"};
g.ih=function(l){return l.X("html5_local_playsinline")?us&&!g.KK(602)&&!("playsInline"in ik()):us&&!l.s6||g.G6("nintendo wiiu")?!0:!1};
g.u9=function(l){return l.V&&g.U9(l)&&!MV(l)&&!l.S};
W15=function(l){return AA(l)==="TVHTML5_SIMPLY_EMBEDDED_PLAYER"};
MV=function(l){return l.b0==="adunit"||l.playerStyle==="gvn"};
XC=function(l){return l.b0==="detailpage"};
g.U9=function(l){return l.b0==="embedded"};
g.cn=function(l){return l.b0==="profilepage"};
g.CA=function(l){if(!l.webPlayerContextConfig?.embedsHostFlags?.enableLiteUx||l.R7||l.S||l.N||l.Ja==="EMBEDDED_PLAYER_MODE_PFP")return"EMBEDDED_PLAYER_LITE_MODE_NONE";l=g.i_(l.experiments,"embeds_web_lite_mode");return l===void 0?"EMBEDDED_PLAYER_LITE_MODE_UNKNOWN":l>=0&&l<IH5.length?IH5[l]:"EMBEDDED_PLAYER_LITE_MODE_UNKNOWN"};
bh=function(l,y,k=!1){l.kz=KL(l.kz,y.video_id);l.vn=KL(l.vn,y.eventid);l.vn&&($6=l.vn);const z=[];for(const r of Object.keys(TRC)){const Z=TRC[r],e=y[Z];e!=null&&(e!==l.Z[Z]&&z.push(Z),l.Z[Z]=e)}!k&&z.length>0&&l.kE&&(z.sort(),g.WH(new g.WO("Player client parameters changed after startup",z)));l.userAge=pL(l.userAge,y.user_age);l.Um=KL(l.Um,y.user_display_email);l.userDisplayImage=KL(l.userDisplayImage,y.user_display_image);g.cJ(l.userDisplayImage)||(l.userDisplayImage="");l.userDisplayName=KL(l.userDisplayName,
y.user_display_name);l.Ky=KL(l.Ky,y.user_gender);l.csiPageType=KL(l.csiPageType,y.csi_page_type);l.csiServiceName=KL(l.csiServiceName,y.csi_service_name);l.uW=JD(l.uW,y.enablecsi);l.pageId=KL(l.pageId,y.pageid);if(k=y.enabled_engage_types)l.enabledEngageTypes=new Set(k.split(","));y.living_room_session_po_token&&(l.zA=y.living_room_session_po_token.toString())};
uh=function(l){return AA(l)==="WEB_KIDS"};
AA=function(l){return l.Z.c};
xf=function(l,y){return!l.S&&af()&&qp(55)&&l.controlsType==="3"&&!y};
g.mc=function(l){l=ZT(l.nS);return l==="www.youtube-nocookie.com"?"www.youtube.com":l};
qV=function(l,y,k){return l.protocol+"://i1.ytimg.com/vi/"+y+"/"+(k||"hqdefault.jpg")};
Wn=function(l){return XC(l)&&!g.aq(l)};
Iq=function(l){return l.b0==="leanback"};
g.dU=function(l){return/^TVHTML5/.test(AA(l))};
TC=function(l){return AA(l)==="TVHTML5"};
VBz=function(l){return l.Z.cmodel==="CHROMECAST ULTRA/STEAK"||l.Z.cmodel==="CHROMECAST/STEAK"};
g.gU=function(){return window.devicePixelRatio>1?window.devicePixelRatio:1};
g.xp=function(l){return AA(l).toUpperCase()==="WEB"};
V6=function(l){return AA(l)==="TVHTML5_UNPLUGGED"};
g.tL=function(l){return g.aq(l)||AA(l)==="TV_UNPLUGGED_CAST"||V6(l)};
g.Pn=function(l){return AA(l)==="WEB_MUSIC_INTEGRATIONS"};
g.JA=function(l){return AA(l)==="WEB_EMBEDDED_PLAYER"};
Pl5=function(l,y=!1,k=!0){return!g.xp(l)||!y||!k};
g.sE=function(l){return(l.deviceIsAudioOnly||!g.Mx||Zu||l.controlsType==="3"?!1:g.WD?l.V&&g.KK(51):!0)||(l.deviceIsAudioOnly||!g.N2||Zu||l.controlsType==="3"?!1:g.WD?l.V&&g.KK(48):g.KK(38))||(l.deviceIsAudioOnly||!g.Yf||Zu||l.controlsType==="3"?!1:g.WD?l.V&&g.KK(37):g.KK(27))||!l.deviceIsAudioOnly&&g.pA&&!boy()&&g.KK(11)||!l.deviceIsAudioOnly&&g.Km&&g.KK("604.4")};
Nly=function(l){if(g.U9(l)&&KA)return!1;if(g.N2){if(!g.KK(47)||!g.KK(52)&&g.KK(51))return!1}else if(g.Km)return!1;return window.AudioContext||window.webkitAudioContext?!0:!1};
Yn_=function(l,y){return l.enabledEngageTypes.has(y.toString())||J0C.includes(y)};
gk=function(l){if(!l.userDisplayImage)return"";const y=l.userDisplayImage.split("/");if(y.length===5)return l=y[y.length-1].split("="),l[1]="s20-c",y[y.length-1]=l.join("="),y.join("/");if(y.length===8)return y.splice(7,0,"s20-c"),y.join("/");if(y.length===9)return y[7]+="-s20-c",y.join("/");g.WH(new g.WO("Profile image not a FIFE URL.",l.userDisplayImage));return l.userDisplayImage};
g.E9=function(l){let y=g.mc(l);p5T.includes(y)&&(y="www.youtube.com");return l.protocol+"://"+y};
g.jz=function(l,y=""){if(l.Yr){const k=new fA;let z;const r=l.Yr();r.signedOut?z="":r.token?z=r.token:r.pendingResult.then(Z=>{r.signedOut?k.resolve(""):k.resolve(Z.token)},Z=>{g.WH(new g.WO("b189348328_oauth_callback_failed",{error:Z}));
k.resolve(y)});
return z!==void 0?k9(z):new ls(k)}return k9(y)};
Sz=function(l,y=""){return l.U7?fE(!0):Nv(FX(fE(g.jz(l,y)),k=>fE(!!k)),()=>fE(!1))};
K1s=function(l,y){l.xz=y;l.PF?.Z?.S(y);y.Z?l.Qc.push("asmjs"):l.Qc.push("wasm")};
ZT=function(l){const y=g.$7(l);return(l=Number(g.ee(l)[4]||null)||null)?`${y}:${l}`:y};
nA=function(l,y=!1){const k=i9[l];let z=gWC[k];const r=EWe[l];if(!r||!z)return null;y=new nk(y?r.height:r.width,y?r.width:r.height,r.fps);z=a_(z,y,k);return new FP(l,z,{video:y,CP:r.bitrate/8})};
jGe=function(l){const y=gWC[i9[l]],k=fH5[l];return k&&y?new FP(l,y,{audio:new ST(k.audioSampleRate,k.numChannels)}):null};
FC=function(l,y,k,z){if(k)return yu();k={};const r=ik();for(const Z of y)if(l.canPlayType(r,Z.getInfo().mimeType)||z)if(y=Z.Z.video.quality,!k[y]||k[y].getInfo().Cg())k[y]=Z;l=[];k.auto&&l.push(k.auto);for(const Z of Y0)(z=k[Z])&&l.push(z);return l.length?k9(l):yu()};
nW4=function(l,y=!1,k=!0,z={}){const r={};for(const e of l){if(y&&MediaSource&&MediaSource.isTypeSupported&&(l=e.type,e.audio_channels&&(l=l+"; channels="+e.audio_channels),!MediaSource.isTypeSupported(l))){z[e.itag]="tpus";continue}if(!k&&e.drm_families&&(e.eotf==="smpte2084"||e.eotf==="arib-std-b67")){z[e.itag]="enchdr";continue}l=void 0;const A={bt709:"SDR",bt2020:"SDR",smpte2084:"PQ","arib-std-b67":"HLG"};var Z=e.type.match(/codecs="([^"]*)"/);Z=Z?Z[1]:"";e.audio_track_id&&(l=new g.XF(e.name,
e.audio_track_id,!!e.is_default));const Q=e.eotf;l=new Snz({itag:e.itag,url:e.url,codecs:Z,width:Number(e.width),height:Number(e.height),fps:Number(e.fps),bitrate:Number(e.bitrate),audioItag:e.audio_itag,wH:Q?A[Q]:void 0,contentProtection:e.drm_families,a7:l,audioChannels:Number(e.audio_channels)});r[l.itag]=r[l.itag]||[];r[l.itag].push(l)}return r};
F1T=function(l,y){l.N.some(k=>k.a7?.getId()===y);
l.Z=y};
oW4=function(l){const y=[],k=[];for(const z of l.C)z.bitrate<=l.V?y.push(z):k.push(z);y.sort((z,r)=>r.bitrate-z.bitrate);
k.sort((z,r)=>z.bitrate-r.bitrate);
l.C=y.concat(k)};
oq=function(l,y,k){l.cpn&&(y=g.UI(y,{cpn:l.cpn}));k&&(y=g.UI(y,{paired:k}));return y};
NRg=function(l,y){l=l.itag.toString();y!==null&&(l+=y.itag.toString());return l};
sG5=function(l,y){if(!(Zu||CL()||Uw()))return null;l=nW4(y,l.X("html5_filter_fmp4_in_hls"));if(!l)return null;y=[];const k={};for(const z of Object.keys(l))for(const r of l[z])if(r.a7){const Z=r.a7.getId();if(!k[Z]){const e=new g.NV(Z,r.a7);k[Z]=e;y.push(e)}}return y.length>0?y:null};
Ry5=function(l,y,k,z,r,Z,e){if(!(Zu||CL()||Uw()))return yu();const A={},Q=L15(k),t=nW4(k,l.X("html5_filter_fmp4_in_hls"),l.J.S,A);if(!t)return e({noplst:1}),yu();vWg(t);const O={fairplay:"https://youtube.com/api/drm/fps?ek=uninitialized"};let d;k=[];const w=[],h=[];var U=null;let u="";z=z&&z.match(/hls_timedtext_playlist/)?new Snz({itag:"0",url:z,codecs:"vtt",width:0,height:0,fps:0,bitrate:0,a7:new g.XF("English","en",!1)}):null;for(const J of Object.keys(t))if(!l.X("html5_disable_drm_hfr_1080")||
J!=="383"&&J!=="373")for(const K of t[J])if(K.width){for(const fC of K.C)if(t[fC]){K.Z=fC;break}K.Z||(K.Z=BRt(t,K));const Zg=t[K.Z];if(!Zg)continue;k.push(K);K.contentProtection==="fairplay"&&(d=O);let es="";K.wH==="PQ"?es="smpte2084":K.wH==="HLG"&&(es="arib-std-b67");es&&(u=es);h.push(HGC(Zg,[K],z,Z,K.itag,K.width,K.height,K.fps,Q,void 0,void 0,d,es));if(!U||K.width*K.height*K.fps>U.width*U.height*U.fps)U=K}else w.push(K);else A[J]="disdrmhfr";h.reduce((J,K)=>K.getInfo().isEncrypted()&&J,!0)&&(d=
O);
r=Math.max(r,0);const {fps:W=0,width:V=0,height:T=0}=U||{};U=l.X("html5_native_audio_track_switching");h.push(HGC(w,k,z,Z,"93",V,T,W,Q,"auto",r,d,u,U));Object.entries(A).length&&e(A);return FC(l.J,h,xf(l,y),!1)};
HGC=function(l,y,k,z,r,Z,e,A,Q,t,O,d,w,h){let U=0,u="";for(const W of l)u||(u=W.itag),W.audioChannels&&W.audioChannels>U&&(U=W.audioChannels,u=W.itag);r=new FP(r,"application/x-mpegURL",{audio:new ST(0,U),video:new nk(Z,e,A,null,void 0,t,void 0,void 0,w),contentProtection:d,Ss:u});l=new DBt(l,y,k?[k]:[],z,!!h);l.V=O?O:1369843;return new lQy(r,l,Q)};
L15=function(l){for(const y of l)if(y.url&&(l=y.url.split("expire/"),!(l.length<=1)))return+l[1].split("/")[0];return NaN};
BRt=function(l,y){for(const k of Object.keys(l)){const z=l[k][0];if(!z.width&&z.contentProtection===y.contentProtection&&!z.audioChannels)return k}return""};
vWg=function(l){const y=new Set;for(var k of Object.values(l))if(k.length){var z=k[0];z.height&&z.codecs.startsWith("vp09")&&y.add(z.height)}k=[];if(y.size)for(const r of Object.keys(l))l[r].length&&(z=l[r][0],z.height&&y.has(z.height)&&!z.codecs.startsWith("vp09")&&k.push(r));for(const r of k)delete l[r]};
kKQ=function(l,y,k){const z=[];for(const r of k){if(!r||!r.url)continue;k=oh(r.type,"medium","0");z.push(new yvP(k,r.url))}return FC(l.J,z,xf(l,y),!1)};
zCT=function(l,y){const k=[],z=oh(y.type,"auto",y.itag);k.push(new yvP(z,y.url));return FC(l.J,k,!1,!0)};
ZqP=function(l){return l&&rvy[l]?rvy[l]:null};
eCs=function(l){switch(l){case "multiview.ustreamer_disabled":case "sabr.invalid_input_stream":case "sabr.live_no_max_sq":case "sabr.live_unauthorized_request":case "sabr.malformed_config":case "sabr.media_serving_enforcement_id_error":case "sabr.metadata_fetcher_error":case "sabr.no_audio_selected":case "sabr.no_available_formats":case "sabr.no_redirect_url":case "sabr.no_video_selected":case "sabr.too_many_chunk_reader_error_retries":return l;default:return"sabr.config"}};
$QQ=function(l,y){if(y=y?.watchEndpointSupportedOnesieConfig?.html5PlaybackOnesieConfig)l.b2=new Avz(y)};
g.s9=function(l){const y=[];if(l.displayName)y.push(l.displayName);else{const k=l.languageName||"";y.push(k);l.kind==="asr"&&k.indexOf("(")===-1&&y.push(" (Ph\u1ee5 \u0111\u1ec1 t\u1ef1 \u0111\u1ed9ng)");l.name&&y.push(` - ${l.name}`)}l.translationLanguage&&y.push(` >> ${l.translationLanguage.languageName}`);return y.join("")};
g.LA=function(l){const y={languageCode:l.languageCode,languageName:l.languageName,displayName:g.s9(l),kind:l.kind,name:l.name,id:l.id,is_servable:l.Z,is_default:l.isDefault,is_translateable:l.isTranslateable,vss_id:l.vssId};l.xtags&&(y.xtags=l.xtags);l.captionId&&(y.captionId=l.captionId);l.translationLanguage&&(y.translationLanguage=l.translationLanguage);return y};
g.vn=function(l){return l.translationLanguage?l.translationLanguage.languageCode:l.languageCode};
g.QAs=function(l){let y=l.vssId;l.translationLanguage&&y&&(y=`t${y}.${g.vn(l)}`);return y};
waP=function(l,y,k,z){l||(l=y&&t4_.hasOwnProperty(y)&&OqQ.hasOwnProperty(y)?OqQ[y]+"_"+t4_[y]:void 0);y=l;if(!y)return null;l=y.match(dQe);if(!l||l.length!==5)return null;{const Z=y.match(dQe);if(Z){l=Number(Z[3]);var r=[7,8,10,5,6];l=!(Number(Z[1])===1&&l===8)&&r.indexOf(l)>=0}else l=!1}return k||z||l?y:null};
Bn=function(l,y){const k={};for(const r of Object.keys(hCQ)){var z=y?y+r:r;z=l[z+"_webp"]||l[z];g.cJ(z)&&(k[hCQ[r]]=z)}return k};
Hn=function(l){const y={};if(!l||!l.thumbnails)return y;l=l.thumbnails.filter(r=>!!r.url);
l.sort((r,Z)=>r.width-Z.width||r.height-Z.height);
for(var k of Object.keys(GKC)){var z=Number(k);const r=GKC[z];for(const Z of l)if(Z.width>=z){z=aQP(Z.url);g.cJ(z)&&(y[r]=z);break}}(k=l.pop())&&k.width>=1280&&(k=aQP(k.url),g.cJ(k)&&(y["maxresdefault.jpg"]=k));return y};
aQP=function(l){return l.startsWith("//")?"https:"+l:l};
Rq=function(l){return l&&l.baseUrl||""};
Dw=function(l){l=g.MK(l);for(const y of Object.keys(l)){const k=l[y];l[y]=Array.isArray(k)?k[0]:k}return l};
UQt=function(l,y){for(var k of y)if(y=k.playerAnnotationsUrlsRenderer){y.adsOnly&&(l.kW=!0);if(k=y.loadPolicy)l.annotationsLoadPolicy=iqC[k];if(k=y.invideoUrl)l.ZY=Cc(k);l.jC=!0;break}};
M4P=function(l,y){l.botguardData=y.playerAttestationRenderer.botguardData;y=y.playerAttestationRenderer.challenge;y!=null&&(l.rg=y)};
cvy=function(l,y){l.captionTracks=[];if(y.captionTracks)for(var k of y.captionTracks){var z=XaP(k.baseUrl);if(!z)return;z={is_translateable:!!k.isTranslatable,languageCode:k.languageCode,languageName:k.name&&g.$b(k.name),url:z,vss_id:k.vssId,kind:k.kind};z.name=k.trackName;z.displayName=k.name&&g.$b(k.name);l.captionTracks.push(new g.lg(z))}l.pO=y.audioTracks||[];l.SJ=y.defaultAudioTrackIndex||0;l.qn=[];if(y.translationLanguages)for(const r of y.translationLanguages){k={};k.languageCode=r.languageCode;
k.languageName=g.$b(r.languageName);if(r.translationSourceTrackIndices){k.translationSourceTrackIndices=[];for(const Z of r.translationSourceTrackIndices)k.translationSourceTrackIndices.push(Z)}if(r.excludeAudioTrackIndices){k.excludeAudioTrackIndices=[];for(const Z of r.excludeAudioTrackIndices)k.excludeAudioTrackIndices.push(Z)}l.qn.push(k)}l.RQ=[];if(y.defaultTranslationSourceTrackIndices)for(const r of y.defaultTranslationSourceTrackIndices)l.RQ.push(r);l.Jd=!!y.contribute&&!!y.contribute.captionsMetadataRenderer};
C7_=function(l,y,k){var z=y.errorScreen;if(!(z&&(z.playerLegacyDesktopYpcOfferRenderer||z.playerLegacyDesktopYpcTrailerRenderer||z.ypcTrailerRenderer)||k&&k.isUpcoming||["OK","LIVE_STREAM_OFFLINE","FULLSCREEN_ONLY"].includes(y.status))){l.errorCode=ZqP(y.errorCode)||"auth";if(k=z&&z.playerErrorMessageRenderer){l.playerErrorMessageRenderer=k;const r=k.reason;r&&(l.errorReason=g.$b(r));if(k=k.subreason)l.FT=g.$b(k),l.hK=k}else l.errorReason=y.reason||null;k=y.status;k==="LOGIN_REQUIRED"?l.errorDetail=
"1":k==="CONTENT_CHECK_REQUIRED"?l.errorDetail="2":k==="AGE_CHECK_REQUIRED"?(y=(y=y.errorScreen)&&y.playerKavRenderer,l.errorDetail=y&&y.kavUrl?"4":"3"):(z=z?.playerErrorMessageRenderer?.proceedButton?.buttonRenderer?.command,l.errorDetail=y.isBlockedInRestrictedMode?"5":g.E(z,g.yT)?.signal==="RELOAD_PAGE"?"7":"0")}};
bqs=function(l,y){l.h_=!0;const k=y.heartbeatToken;k&&(l.drmSessionId=y.drmSessionId||"",l.heartbeatToken=k,l.BI=Number(y.intervalMilliseconds),l.NP=Number(y.maxRetries),l.VN=!!y.softFailOnError,l.La=!!y.useInnertubeHeartbeatsForDrm);l.heartbeatServerData=y.heartbeatServerData;l.cT=!!y.heartbeatAttestationConfig?.requiresAttestation};
mQP=function(l,y){for(const k of y){y=k.interstitials.map(z=>{const r=g.E(z,ub5);if(r)return{is_yto_interstitial:!0,raw_player_response:r};if(z=g.E(z,xQT))return Object.assign({is_yto_interstitial:!0},iO(z))});
for(const z of y)switch(k.podConfig.playbackPlacement){case "INTERSTITIAL_PLAYBACK_PLACEMENT_PRE":l.interstitials=l.interstitials.concat({time:0,playerVars:z,iS:5});break;case "INTERSTITIAL_PLAYBACK_PLACEMENT_POST":l.interstitials=l.interstitials.concat({time:0x7ffffffffffff,playerVars:z,iS:6});break;case "INTERSTITIAL_PLAYBACK_PLACEMENT_INSERT_AT_VIDEO_TIME":y=Number(k.podConfig.timeToInsertAtMillis),l.interstitials=l.interstitials.concat({time:y,playerVars:z,iS:y===0?5:7})}}};
q05=function(l,y){if(y=y.find(k=>!(!k||!k.tooltipRenderer)))l.tooltipRenderer=y.tooltipRenderer};
WpQ=function(l,y){y.subscribeCommand&&(l.subscribeCommand=y.subscribeCommand);y.unsubscribeCommand&&(l.unsubscribeCommand=y.unsubscribeCommand);y.addToWatchLaterCommand&&(l.addToWatchLaterCommand=y.addToWatchLaterCommand);y.removeFromWatchLaterCommand&&(l.removeFromWatchLaterCommand=y.removeFromWatchLaterCommand);y.getSharePanelCommand&&(l.getSharePanelCommand=y.getSharePanelCommand)};
IQg=function(l,y){y!=null?(l.bN=y,l.Wn=!0):(l.bN="",l.Wn=!1)};
P7T=function(l,y){if(y=y.playerControlsOverlayRenderer)IQg(l,y.controlBgHtml),y.mutedAutoplay?(y=g.E(y.mutedAutoplay,T9T))&&y.endScreen&&(y=g.E(y.endScreen,V4t))&&y.text&&(l.Ie=g.$b(y.text)):l.mutedAutoplay=!1};
Jve=function(l,y){var k=y.backgroundability;k&&k.backgroundabilityRenderer.backgroundable&&(l.backgroundable=!0);y.offlineability?.offlineabilityRenderer?.offlineable&&(l.offlineable=!0);if(k=y.contextParams)l.contextParams=k;(k=y.pictureInPicture)&&k.pictureInPictureRenderer.playableInPip&&(l.pipable=!0);y.playableInEmbed&&(l.allowEmbed=!0);if(k=y.ypcClickwrap)y=k.playerLegacyDesktopYpcClickwrapRenderer,k=k.ypcRentalActivationRenderer,y?(l.Dq=y.durationMessage||"",l.MI=!0):k&&(y=k.durationMessage,
l.Dq=y?g.$b(y):"",l.MI=!0)};
pa_=function(l,y,k){var z=Rq(y.googleRemarketingUrl);z&&(l.googleRemarketingUrl=z);if(z=Rq(y.youtubeRemarketingUrl))l.youtubeRemarketingUrl=z;if(z=y.heartbeatLoggingToken)l.heartbeatLoggingToken=z;z={};var r=Rq(y.ptrackingUrl);if(r){r=Dw(r);var Z=r.oid;Z&&(l.h0=Z);if(Z=r.pltype)l.ZE=Z;if(Z=r.ptchn)l.c$=Z;if(Z=r.ptk)l.qE=encodeURIComponent(Z);if(r=r.m)l.fL=r}if(r=Rq(y.qoeUrl)){r=g.MK(r);for(e of Object.keys(r))Z=r[e],r[e]=Array.isArray(Z)?Z.join(","):Z;var e=r;l.Up=e;if(r=e.cat)l.X("html5_enable_qoe_cat_list")?
l.uV=l.uV.concat(r.split(",")):l.Qc=r;if(r=e.live)l.Zf=r;if(e=e.drm_product)l.drmProduct=e}if(e=Rq(y.videostatsPlaybackUrl)){e=Dw(e);if(r=e.adformat)if(k.adformat=r,Z=l.O(),Z=waP(r,l.bv,Z.V,Z.A))l.adFormat=Z;if(Z=e.aqi)k.ad_query_id=Z;if(k=e.autoplay)l.lE=k=="1",l.X6=k=="1";if(k=e.autonav)l.isAutonav=k=="1";if(k=e.delay)l.CB=cZ(k);if(k=e.ei)l.eventId=k;if(k=GC(e.adcontext))try{var A=Y0s(k);A&&(l.DH=A)}catch(Q){g.WH(Error("Malformed adContext"))}if(k||r)l.lE=!0;if(A=e.feature)l.KZ=A;if(A=e.list)l.playlistId=
A;if(A=e.of)l.qo=A;if(A=e.osid)l.osid=A;if(A=e.referrer)l.referrer=A;if(A=e.sdetail)l.d$=A;if(A=e.sourceid)l.YmR=A;if(A=e.ssrt)l.Zq=A=="1";if(A=e.subscribed)l.subscribed=A=="1";if(A=e.uga)l.userGenderAge=A;if(A=e.upt)l.k$=A;if(A=e.vm)l.videoMetadata=A;z.playback=e}if(A=Rq(y.videostatsWatchtimeUrl)){A=Dw(A);if(k=A.ald)l.wS=k;z.watchtime=A}if(A=Rq(y.atrUrl))A=Dw(A),z.atr=A;if(A=Rq(y.engageUrl))A=Dw(A),z.engage=A;l.JO=z;y.promotedPlaybackTracking&&(z=y.promotedPlaybackTracking,z.startUrls&&(l.B0=z.startUrls),
z.firstQuartileUrls&&(l.Xy=z.firstQuartileUrls),z.secondQuartileUrls&&(l.EF=z.secondQuartileUrls),z.thirdQuartileUrls&&(l.gI=z.thirdQuartileUrls),z.completeUrls&&(l.n$=z.completeUrls),z.engagedViewUrls&&(z.engagedViewUrls.length>1&&g.WH(new g.WO("There are more than one engaged_view_urls.")),l.yS=z.engagedViewUrls[0]));l.X("html5_send_serialized_one_time_qoe_context_data")&&y.serializedOneTimeQoeContextData&&(l.serializedOneTimeQoeContextData=y.serializedOneTimeQoeContextData)};
Kp5=function(l,y,k){for(const z of y)if(z&&(y=z.playerLegacyDesktopWatchAdsRenderer)&&(y=y.playerAdParams)){y.autoplay=="1"&&(l.lE=!0,l.X6=!0);l.F3=y.encodedAdSafetyReason||null;y.showContentThumbnail!==void 0&&(l.vT=!!y.showContentThumbnail);k.enabled_engage_types=y.enabledEngageTypes;break}};
gm4=function(l,y){var k=y.manifestlessWindowedLiveConfig;if(k){var z=Number(k.minDvrSequence),r=Number(k.maxDvrSequence),Z=Number(k.minDvrMediaTimeMs),e=Number(k.maxDvrMediaTimeMs);k=Number(k.startWalltimeMs);z&&(l.Vi=z);Z&&(l.iW=Z/1E3,l.X("html5_sabr_parse_live_metadata_playback_boundaries")&&Kc(l)&&(l.jK=Z/1E3));r&&(l.wW=r);e&&(l.Q4=e/1E3,l.X("html5_sabr_parse_live_metadata_playback_boundaries")&&Kc(l)&&(l.e3=e/1E3));k&&(l.Ob=k/1E3);(z||Z)&&(r||e)&&(l.xa=!0,l.isLivePlayback=!0,l.allowLiveDvr=!0,
l.aj=!1)}if(z=y.daiConfig){if(z.enableDai){l.CE=!0;if(r=z.enableServerStitchedDai)l.enableServerStitchedDai=r;if(r=z.enablePreroll)l.wu=r}if(z.daiType==="DAI_TYPE_SS_DISABLED"||z.debugInfo?.isDisabledUnpluggedChannel)l.OW=!0;z.daiType==="DAI_TYPE_CLIENT_STITCHED"&&(l.Sy=!0);z.allowUstreamerRequestAdconfig&&(l.uY=!0);z.sendSsdaiMissingAdBreakReasons&&(l.RM=!0)}if(z=y.audioConfig){r=z.loudnessDb;r!=null&&(l.YR=r);r=z.trackAbsoluteLoudnessLkfs;r!=null&&(l.pW=r);r=z.loudnessTargetLkfs;r!=null&&(l.loudnessTargetLkfs=
r);z.audioMuted&&(l.CY=!0);z.muteOnStart&&(l.Vm=!0);if(r=z.loudnessNormalizationConfig)r.applyStatefulNormalization&&(l.applyStatefulNormalization=!0),r.preserveStatefulLoudnessTarget&&(l.preserveStatefulLoudnessTarget=!0),Z=r.minimumLoudnessTargetLkfs,Z!=null&&(l.minimumLoudnessTargetLkfs=Z),r=r.maxStatefulTimeThresholdSec,r!=null&&(l.maxStatefulTimeThresholdSec=r);z.playAudioOnly&&(l.cO=!0)}if(r=y.playbackEndConfig)z=r.endSeconds,r=r.limitedPlaybackDurationInSeconds,l.mutedAutoplay&&(z&&(l.endSeconds=
z),r&&(l.limitedPlaybackDurationInSeconds=r));if(z=y.fairPlayConfig){if(r=z.certificate)l.Ze=GC(r);r=Number(z.keyRotationPeriodMs);r>0&&(l.cI=r);z=Number(z.keyPrefetchMarginMs);z>0&&(l.Yf=z)}if(z=y.playbackStartConfig){l.O3=Number(z.startSeconds);Z=z.liveUtcStartSeconds;r=!!l.liveUtcStartSeconds&&l.liveUtcStartSeconds>0;Z&&!r&&(l.liveUtcStartSeconds=Number(Z));if(Z=z.startPosition)if((e=Z.utcTimeMillis)&&!r&&(l.liveUtcStartSeconds=Number(e)*.001),r=Z.streamTimeMillis)l.mY=Number(r)*.001;l.progressBarStartPosition=
z.progressBarStartPosition;l.progressBarEndPosition=z.progressBarEndPosition}else if(z=y.skippableSegmentsConfig){if(r=z.introSkipDurationMs)l.cE=Number(r)/1E3;if(z=z.outroSkipDurationMs)l.No=Number(z)/1E3}if(r=y.skippableIntroConfig)z=Number(r.startMs),r=Number(r.endMs),isNaN(z)||isNaN(r)||(l.Yj=z,l.dQ=r);if(z=y.streamSelectionConfig)l.y0=Number(z.maxBitrate);if(z=y.vrConfig)l.b_=z.partialSpherical=="1";if(z=y.webDrmConfig){z.skipWidevine&&(l.DE=!0);if(r=z.widevineServiceCert)l.fn=GC(r);z.useCobaltWidevine&&
(l.useCobaltWidevine=!0);z.startWithNoQualityConstraint&&(l.Ac=!0)}if(z=y.mediaCommonConfig){if(r=z.dynamicReadaheadConfig){l.maxReadAheadMediaTimeMs=r.maxReadAheadMediaTimeMs||NaN;l.minReadAheadMediaTimeMs=r.minReadAheadMediaTimeMs||NaN;l.readAheadGrowthRateMs=r.readAheadGrowthRateMs||NaN;if(r=z?.mediaUstreamerRequestConfig?.videoPlaybackUstreamerConfig)l.Oo=GC(r);if((r=z?.sabrContextUpdates)&&r.length>0)for(var A of r)A.type&&A.value&&(r={type:A.type,scope:A.scope,value:GC(A.value)||void 0,sendByDefault:A.sendByDefault},
l.sabrContextUpdates.set(A.type,r))}if(A=z.serverPlaybackStartConfig)l.serverPlaybackStartConfig=A;z.useServerDrivenAbr&&(l.aK=!0);if(A=z.requestPipeliningConfig)l.requestPipeliningConfig=A}if(A=y.inlinePlaybackConfig)l.b1=!!A.showAudioControls;if(A=y.embeddedPlayerConfig){l.embeddedPlayerConfig=A;if(r=A.embeddedPlayerMode)z=l.O(),z.Ja=r,z.N=r==="EMBEDDED_PLAYER_MODE_PFL";if(A=A.permissions)l.allowImaMonetization=!!A.allowImaMonetization}if(A=y.webPlayerConfig)A.gatewayExperimentGroup&&(l.gatewayExperimentGroup=
A.gatewayExperimentGroup),A.isProximaEligible&&(l.isProximaLatencyEligible=!0);y=y.playerControlsConfig;y?.isSeekable!==void 0&&(l.isSeekable=!!y.isSeekable)};
EmQ=function(l,y,k){var z=y.formats;if(z){var r=[];for(var Z of z)r.push(`${Z.itag}/${Z.width}x${Z.height}`);l.eU=r.join(",");r=[];for(var e of z){z={itag:e.itag,type:e.mimeType,quality:e.quality};(Z=e.url)&&(z.url=Z);const {WS:w,yq:h,Vd:U,s:u}=dl(10,763,e);w&&(z.url=h,z.sp=U,z.s=u);r.push(g.iI(z))}l.t$=r.join(",")}if(e=y.hlsFormats){r={};if(k&&(k=k.audioPairingConfig)&&k.pairs)for(var A of k.pairs)k=A.videoItag,r[k]||(r[k]=[]),r[k].push(A.audioItag);A={};for(var Q of e)A[Q.itag]=Q.bitrate;Q=[];for(var t of e){k=
{itag:t.itag,type:t.mimeType,url:t.url,bitrate:t.bitrate,width:t.width,height:t.height,fps:t.fps};if(e=t.audioTrack)if(z=e.displayName)k.name=z,k.audio_track_id=e.id,e.audioIsDefault&&(k.is_default="1");if(t.drmFamilies){e=[];for(var O of t.drmFamilies)e.push(cV[O]);k.drm_families=e.join(",")}(e=r[t.itag])&&e.length&&(k.audio_itag=e.join(","),(e=A[e[0]])&&(k.bitrate+=e));(e=DfP(t))&&(k.eotf=e);t.audioChannels&&(k.audio_channels=t.audioChannels);Q.push(g.iI(k))}l.hlsFormats=Q.join(",")}if((O=y.licenseInfos)&&
O.length>0){t={};for(var d of O)O=d.drmFamily,r=d.url,O&&r&&(t[cV[O]]=r);l.contentProtection=t}if(d=y.drmParams)l.drmParams=d;if(d=y.dashManifestUrl)l.vB=g.UI(d,{cpn:l.clientPlaybackNonce});if(d=y.hlsManifestUrl)l.hlsvp=d;if(d=y.probeUrl)l.probeUrl=Cc(g.UI(d,{cpn:l.clientPlaybackNonce}));if(y=y.serverAbrStreamingUrl)l.JU=new g.zq(y,!0)};
jAP=function(l,y,k){var z=y.videoId;z&&(l.videoId=z,k.video_id||(k.video_id=z));if(z=y.title)l.title=z,k.title||(k.title=z);if(z=y.lengthSeconds)l.lengthSeconds=Number(z),k.length_seconds||(k.length_seconds=z);if(z=y.keywords)l.keywords=fQy(z);if(z=y.channelId)l.Fu=z,k.ucid||(k.ucid=z);if(z=y.viewCount)l.rawViewCount=Number(z);if(z=y.author)l.author=z,k.author||(k.author=z);if(k=y.shortDescription)l.shortDescription=k;if(k=y.isCrawlable)l.isListed=k;if(k=y.musicVideoType)l.musicVideoType=k;k=y.isLive;
k!=null&&(l.isLivePlayback=k);if(k||y.isUpcoming)l.isPremiere=!y.isLiveContent;if(k=y.thumbnail)l.TV=Hn(k);if(k=y.isExternallyHostedPodcast)l.isExternallyHostedPodcast=k;(k=y.stationType)&&k!=="STATION_TYPE_UNKNOWN"&&(l.Bq=!0);k=y.viewerLivestreamJoinPosition;k?.utcTimeMillis&&(l.Mq=cZ(k.utcTimeMillis));l.O().experiments.z7("enable_centered_caption_for_tvfilm_video")&&y.isTvfilmVideo!=null&&(l.isTvfilmVideo=y.isTvfilmVideo)};
Fpy=function(l,y){if(y.playerLegacyDesktopYpcTrailerRenderer){var k=y.playerLegacyDesktopYpcTrailerRenderer;l.e$=k.trailerVideoId||"";var z=(z=y.playerLegacyDesktopYpcTrailerRenderer.ypcTrailer)&&z.ypcTrailerRenderer}else y.playerLegacyDesktopYpcOfferRenderer?k=y.playerLegacyDesktopYpcOfferRenderer:y.ypcTrailerRenderer&&(z=y.ypcTrailerRenderer,y=z.fullVideoMessage,l.YY=y?g.$b(y):"",l.e$=g.E(z,S0T)?.videoDetails?.videoId||"");k&&(l.h1=k.itemTitle||"",k.itemUrl&&(l.JT=k.itemUrl),k.itemBuyUrl&&(l.Nq=
k.itemBuyUrl),l.VL=k.itemThumbnail||"",l.oh=k.offerHeadline||"",l.Zm=k.offerDescription||"",l.iY=k.offerId||"",l.qq=k.offerButtonText||"",l.Jt=k.offerButtonFormattedText||null,l.CQ=k.overlayDurationMsec||NaN,l.YY=k.fullVideoMessage||"",l.SW=!0);z&&((k=g.E(z,S0T))?l.lY={raw_player_response:k}:(k=g.E(z,nmy),l.lY=k?iO(k):null),l.SW=!0)};
N9C=function(l,y,k,z){y.isLiveDefaultBroadcast&&(l.isLiveDefaultBroadcast=!0);y.isUpcoming&&(l.isUpcoming=!0);if(y.isPostLiveDvr){l.aj=!0;if(z=y.latencyClass)l.latencyClass=om_[z]||"UNKNOWN";y.isLowLatencyLiveStream&&(l.isLowLatencyLiveStream=!0)}else{let r=!1;l.vZ?(l.allowLiveDvr=Q6()?!0:x9&&k5<5?!1:!0,l.isLivePlayback=!0):y.isLive?(z.livestream="1",l.allowLiveDvr=y.isLiveDvrEnabled?Q6()?!0:x9&&k5<5?!1:!0:!1,l.partnerId=27,r=!0):y.isUpcoming&&(r=!0);if(y.isLive||l.vZ){y.isLowLatencyLiveStream&&(l.isLowLatencyLiveStream=
!0);const Z=y.latencyClass;Z&&(l.latencyClass=om_[Z]||"UNKNOWN");if(y=y.liveChunkReadahead)l.liveChunkReadahead=y;if(y=k&&k.livePlayerConfig){y.hasSubfragmentedFmp4&&(l.hasSubfragmentedFmp4=!0);y.hasSubfragmentedWebm&&(l.K5=!0);y.defraggedFromSubfragments&&(l.defraggedFromSubfragments=!0);if(k=y.liveExperimentalContentId)l.liveExperimentalContentId=Number(k);y=y.isLiveHeadPlayable;l.X("html5_live_head_playable")&&y!=null&&(l.isLiveHeadPlayable=y)}}r&&(l.isLivePlayback=!0,z.adformat&&z.adformat.split("_")[1]!==
"8"||l.dP.push("heartbeat"))}};
rH=function(l){return new zE(l.substring(0,2),l.substring(2))};
Zp=function(l,y){return yX(l,"macroMarkersListEntity",y)};
sAg=function(l){const y=l.getWatchNextResponse()?.contents?.twoColumnWatchNextResults;(l=l.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.endScreen?.watchNextEndScreenRenderer?.results)||(l=y?.endScreen?.endScreen?.results);return l};
g.AP=function(l){l=g.E(l.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.decoratedPlayerBarRenderer,e2);return g.E(l?.playerBar,Lpz)};
B95=function(){if($5===void 0){try{window.localStorage.removeItem("yt-player-lv")}catch(y){}a:{try{var l=!!self.localStorage}catch{l=!1}if(l&&(l=g.nW(`${g.UV()}::${"yt-player"}`))){$5=new vm5(l);break a}$5=void 0}}return $5};
g.QT=function(){const l=B95();if(!l)return{};try{const y=l.get("yt-player-lv");return JSON.parse(y||"{}")}catch(y){return{}}};
g.Hqy=function(l){const y=B95();y&&(l=JSON.stringify(l),y.set("yt-player-lv",l))};
g.tP=function(l){return g.QT()[l]||0};
g.OK=function(l,y){const k=g.QT();y!==k[l]&&(y!==0?k[l]=y:delete k[l],g.Hqy(k))};
g.dH=async function(l){return g.kO(RCs(),l)};
hP=async function(l,y,k,z,r,Z,e,A){if(g.tP(l)===4)return 4;const Q=await g.tZ();if(!Q)throw g.fm("wiac");A&&e!==void 0&&(e=await DQ_(A,e));const t=k.lastModified||"0";A=await g.dH(Q);try{return wH++,await g.sV(A,["index","media"],{mode:"readwrite",tag:"IDB_TRANSACTION_TAG_WIAC",nP:!0},O=>{if(Z!==void 0&&e!==void 0){var d=`${l}${"|"}${y.id}${"|"}${t}${"|"}${String(Z).padStart(10,"0")}`;d=O.objectStore("media").put(e,d)}else d=g.jY.resolve(void 0);var w=l_e(l,y.q4());const h=l_e(l,!y.q4());var U={fmts:a3({dlt:z.downloadedEndTime.toString(),
mket:z.maxKnownEndTime.toString(),avbr:z.averageByteRate.toString()}),format:k||{}};w=O.objectStore("index").put(U,w);const u=z.downloadedEndTime===-1;U=u?O.objectStore("index").get(h):g.jY.resolve(void 0);const W={fmts:"music",format:{}};O=u&&r&&!y.q4()?O.objectStore("index").put(W,h):g.jY.resolve(void 0);return g.jY.all([O,U,d,w]).then(([,V])=>{wH--;let T=g.tP(l);if(T!==4&&u&&r||V!==void 0&&g.yLg(V.fmts))T=1,g.OK(l,T);return T})})}catch(O){wH--;
A=g.tP(l);if(A===4)return A;g.OK(l,4);throw O;}};
g.kst=async function(l){const y=await g.tZ();if(!y)throw g.fm("ri");return g.sV(await g.dH(y),["index"],{mode:"readonly",tag:"IDB_TRANSACTION_TAG_LMRI"},k=>{const z=IDBKeyRange.bound(l+"|",l+"~");return k.objectStore("index").getAll(z).then(r=>r.map(Z=>Z?Z.format:{}))})};
rLT=async function(l,y,k,z,r){var Z=await g.tZ();if(!Z)throw g.fm("rc");Z=g.sV(await g.dH(Z),["media"],{mode:"readonly",tag:"IDB_TRANSACTION_TAG_LMRM"},e=>{const A=`${l}${"|"}${y}${"|"}${k}${"|"}${String(z).padStart(10,"0")}`;return e.objectStore("media").get(A)});
return r?Z.then(e=>{if(e===void 0)throw Error("No data from indexDb");return zPs(r,e)}).catch(e=>{throw new g.WO(`Error while reading chunk: ${e.name}, ${e.message}`);
}):Z};
g.yLg=function(l){return l?l==="music"?!0:l.includes("dlt=-1")||!l.includes("dlt="):!1};
l_e=function(l,y){return`${l}${"|"}${y?"v":"a"}`};
ePt=function(l){const y={},k={};for(const Z of l){var z=Z.split("|");if(!Z.match(g.Zcq)){k[Z]="?";continue}l=Number(z.pop());if(isNaN(l)){k[Z]="?";continue}var r=z.join("|");(z=y[r])?(r=z[z.length-1],l===r.end+1?r.end=l:z.push({start:l,end:l})):y[r]=[{start:l,end:l}]}for(const Z of Object.keys(y))k[Z]=y[Z].map(e=>`${e.start}-${e.end}`).join(",");
return k};
ALC=function(l,y,k){for(k=GE(l,k);k>=0;){var z=l.levels[k];if(z.isLoaded(aH(z,y))&&(z=g.ig(z,y)))return z;k--}return g.ig(l.levels[0],y)};
Q0P=function(l){if(!l.Z&&!l.N.isEmpty()){var y=l.N.remove();l.Z=$6y(l,y)}};
tnq=function(l,y,k){k=GE(l,k);for(let e,A;k>=0;k--)if(e=l.levels[k],A=aH(e,y),!e.isLoaded(A)){var z=l,r=k,Z=A;const Q=`${r}-${Z}`;z.S.has(Q)||(z.S.add(Q),z.N.enqueue(r,{d6:r,PQ:Z}))}Q0P(l)};
$6y=function(l,y){const k=document.createElement("img");l.crossOrigin&&(k.crossOrigin=l.crossOrigin);k.src=l.levels[y.d6].wZ(y.PQ);k.onload=()=>{var z=y.d6,r=y.PQ;l.Z!==null&&(l.Z.onload=null,l.Z=null);z=l.levels[z];z.loaded.add(r);Q0P(l);const Z=z.columns*z.rows;r*=Z;z=Math.min(r+Z-1,z.J()-1);r=[r,z];l.publish("l",r[0],r[1])};
return k};
g.ig=function(l,y){y>=l.S()&&l.C();const k=aH(l,y);var z=l.columns*l.rows,r=y%z;y=r%l.columns;r=Math.floor(r/l.columns);let Z;const e=l.C()+1-z*k;e<l.columns?(Z=e,z=1):(Z=l.columns,z=e<z?Math.ceil(e/l.columns):l.rows);return{url:l.wZ(k),column:y,columns:Z,row:r,rows:z,xS:l.width*Z,L9:l.height*z}};
aH=function(l,y){return Math.floor(y/(l.columns*l.rows))};
GE=function(l,y){var k=l.V.get(y);if(k)return k;k=l.levels.length;for(let z=0;z<k;z++)if(l.levels[z].width>=y)return l.V.set(y,z),z;l.V.set(y,k-1);return k-1};
Oc5=function(l,y,k){return(l=l.levels[y])?l.V(k):-1};
d6q=function(l,y,k){y={cpn:y};l.indexOf("/ibw/")===-1&&(y.ibw=k?String(k):"1369843");return{url:g.UI(l,y),type:"application/x-mpegURL",quality:"auto",itag:"93"}};
wJQ=function(l){try{const y=(new g.zq(l,!0)).get("n");if(y){const k=l.match(/\/n\/([^/]+)/);if(k&&k[1]&&k[1]!==y)return l.replace(`/n/${k[1]}`,`/n/${y}`)}}catch(y){g.WH(y)}return l};
UK=function(l){if(l.isAd()&&(l.gb?l.videoId!==l.Qj.kz:l.videoId!=l.Qj.kz))return l.Qj.kz};
XaP=function(l){if(l){if(N3C(l))return l;l=sjP(l);if(N3C(l,!0))return l}return""};
Kc=function(l){var y=l.X("html5_enable_sabr_on_drive")&&l.Qj.C_==="gd";if(l.XR)return l.aK&&l.Md("fds",{fds:!0},!0),!1;if(l.Qj.C_!=="yt"&&!y)return l.aK&&l.Md("dsvn",{ns:l.Qj.C_},!0),!1;if(l.cotn||!l.Z||l.Z.isOtf&&!l.X("html5_enable_sabr_otf_in_client")||l.N&&!l.N.Z()||l.Sy&&!l.X("html5_enable_sabr_csdai"))return!1;if(l.X("html5_use_sabr_requests_for_debugging"))return!0;l.aK&&l.Md("esfw",{usbc:l.aK,hsu:!!l.JU},!0);if(l.aK&&l.JU)return!0;if(l.X("html5_remove_client_sabr_determination"))return!1;var k=
!l.Z.UA&&!l.eb();y=k&&MC&&l.X("html5_enable_sabr_vod_streaming_xhr");k=k&&!MC&&l.X("html5_enable_sabr_vod_non_streaming_xhr");const z=Xj(l),r=l.X("html5_enable_sabr_drm_vod_streaming_xhr")&&MC&&l.eb()&&!l.Z.UA&&(l.drmProduct==="1"?!1:!0);(y=y||k||z||r)&&!l.JU&&l.Md("sabr",{loc:"m"},!0);return y&&!!l.JU};
fQy=function(l){const y={};for(const k of l)l=k.split("="),l.length===2?y[l[0]]=l[1]:y[k]=!0;return y};
CN=function(l){if(l.X("html5_onesie")&&l.errorCode)return!1;let y=g.ro(l.dP,"ypc");l.ypcPreview&&(y=!1);return l.Ij()&&!l.loading&&(g.cF(l)||g.ro(l.dP,"heartbeat")||y)};
CR5=function(l,y){var k=y.raw_embedded_player_response;if(!k){var z=y.embedded_player_response;z&&(k=JSON.parse(z))}k&&(l.Eo=k);if(l.Eo){l.embeddedPlayerConfig=l.Eo.embeddedPlayerConfig||null;if(k=l.Eo.videoFlags)k.playableInEmbed&&(l.allowEmbed=!0),k.isPrivate&&(l.isPrivate=!0),k.userDisplayName&&(y.user_display_name=k.userDisplayName),k.userDisplayImage&&(y.user_display_image=k.userDisplayImage);if((k=l.Eo.embedPreview)&&k.thumbnailPreviewRenderer){k=k.thumbnailPreviewRenderer;IQg(l,k.controlBgHtml);
if(z=k.defaultThumbnail)l.TV=Hn(z);l.X("embeds_web_enable_search_button")&&k.searchButton&&(z=g.E(k.searchButton,$L))&&(l.Ih=g.E(z.navigationEndpoint,g.bg));(z=g.E(k?.videoDetails,hPz))&&Gss(l,y,z);z=g.E(k?.videoDetails,a_z);l.OA=!!k.addToWatchLaterButton;icq(l,k.shareButton);z?.musicVideoType&&(l.musicVideoType=z.musicVideoType);if(z=g.E(l.getEmbeddedPlayerResponse()?.embedPreview?.thumbnailPreviewRenderer?.playButton?.buttonRenderer?.navigationEndpoint,g.ug))$QQ(l,z),l.videoId=z.videoId||l.videoId;
k.videoDurationSeconds&&(l.lengthSeconds=cZ(k.videoDurationSeconds));k.webPlayerActionsPorting&&WpQ(l,k.webPlayerActionsPorting);if(k=g.E(k?.playlist,U6C)){l.hk=!0;z=[];var r=Number(k.currentIndex);if(k.contents)for(let Z=0,e=k.contents.length;Z<e;Z++){const A=k.contents[Z].playlistPanelVideoRenderer;if(!A)continue;const Q=A.shortBylineText?g.$b(A.shortBylineText):"",t=A.title?g.$b(A.title):"";z.push({author:Q,encrypted_id:A.videoId,title:t,channel_path:Z===r?y.channel_path:"",profile_picture:Z===
r?y.profile_picture:"",is_private:Z===r?l.isPrivate:!0,is_dni:Z===r?l.Wn:!1,dni_color:Z===r?l.bN:""})}y={index:k.currentIndex,list:k.playlistId,playlist_length:k.totalVideos,video:z};k.titleText&&(y.title=g.$b(k.titleText));k.shortBylineText&&(y.author=g.$b(k.shortBylineText));l.IL=y}if(y=g.E(l.getEmbeddedPlayerResponse()?.embedPreview?.thumbnailPreviewRenderer?.infoPanel,Mny))l.sS=Number(y?.durationMs)||NaN,y?.infoPanelOverviewViewModel&&(l.PG=y?.infoPanelOverviewViewModel),y?.infoPanelDetailsViewModel&&
(l.Fg=y?.infoPanelDetailsViewModel)}if(l.Eo.previewPlayabilityStatus){if(l.Z$=l.Eo.previewPlayabilityStatus,y=l.Z$,!["OK","LIVE_STREAM_OFFLINE"].includes(y.status)){l.errorCode=ZqP(y.errorCode);k=y.errorScreen;if(z=k?.playerErrorMessageRenderer){l.kE=z;if(r=z.reason)l.errorReason=g.$b(r);if(z=z.subreason)l.FT=g.$b(z)}else l.errorReason=y.reason||null;switch(y.status){case "LOGIN_REQUIRED":l.errorDetail="1";break;case "CONTENT_CHECK_REQUIRED":l.errorDetail="2";break;case "AGE_CHECK_REQUIRED":l.errorDetail=
k?.playerKavRenderer?.kavUrl?"4":"3";break;default:l.errorDetail=y.isBlockedInRestrictedMode?"5":"0"}}}else l.Eo.playabilityStatus&&(l.oY=l.Eo.playabilityStatus,XJ5(l)&&(l.errorDetail="0",l.oY&&((y=l.oY.embeddedPlayerErrorMessageRenderer)?l.kE=g.E(y,cLt):l.errorReason=l.oY.reason||null)));(y=l.Eo.attestation)&&M4P(l,y);(y=l.Eo.permissions)&&y.allowImaMonetization&&(l.allowImaMonetization=!0)}};
TE=function(l,y){var k=y.raw_watch_next_response;if(!k){var z=y.watch_next_response;z&&(k=JSON.parse(z))}if(k){l.sj=k;(k=l.sj.playerCueRangeSet)&&g.x5(l,k);k=l.sj.playerOverlays;if(k&&(k=k.playerOverlayRenderer)){if(z=k.autonavToggle)l.autoplaySwitchButtonRenderer=g.E(z,bcP),l.X("web_player_autonav_use_server_provided_state")&&l.hc()&&(l.autonavState=l.autoplaySwitchButtonRenderer.enabled?2:1);if(z=k.videoDetails){var r=z.embeddedPlayerOverlayVideoDetailsRenderer;if(z=z.playerOverlayVideoDetailsRenderer)z.title&&
(y.title=g.$b(z.title)),z.subtitle&&(y.subtitle=g.$b(z.subtitle))}g.U9(l.Qj)&&(l.OA=!!k.addToMenu);icq(l,k.shareButton);k.startPosition&&k.endPosition&&(l.progressBarStartPosition=k.startPosition,l.progressBarEndPosition=k.endPosition);if(z=k.gatedActionsOverlayRenderer)l.tE=g.E(z,uVq);if(z=g.E(l.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.infoPanel,Mny))l.sS=Number(z?.durationMs)||NaN,z?.infoPanelOverviewViewModel&&(l.PG=z?.infoPanelOverviewViewModel),z?.infoPanelDetailsViewModel&&
(l.Fg=z?.infoPanelDetailsViewModel);l.showSeekingControls=!!k.showSeekingControls}if(k=l.getWatchNextResponse()?.contents?.twoColumnWatchNextResults)if(k=k.desktopOverlay&&g.E(k.desktopOverlay,x6T))k.suppressShareButton&&(l.showShareButton=!1),k.suppressWatchLaterButton&&(l.OA=!1);r&&Gss(l,y,r);k=pL(0,y.autoplay_count);var Z=l.getWatchNextResponse();z=Z.contents?.twoColumnWatchNextResults;r=Z.playerOverlays?.playerOverlayRenderer?.autoplay?.playerOverlayAutoplayRenderer;var e=sAg(l);if((Z=Z.contents?.singleColumnWatchNextResults)&&
Z.autoplay?.autoplay&&!Z.playlist){const u=Z.autoplay.autoplay.sets;Z={};var A=new m3(l.O()),Q=null,t;if(u){for(var O of u)if((t=O.autoplayVideoRenderer)&&t.compactVideoRenderer){Q=t.compactVideoRenderer;break}if(t=u[0].autoplayVideo)(O=t.clickTrackingParams)&&(Z.itct=O),Z.autonav="1",Z.playnext=String(k)}else Z.feature="related-auto";t=g.E(t,g.ug);if(Q){A.videoId=Q.videoId;if(t=Q.shortBylineText)A.author=g.$b(t);if(t=Q.title)A.title=g.$b(t)}else t!=null&&t.videoId&&(A.videoId=t.videoId);A.Mh=Z;l.suggestions=
[];l.zZ=A}if(e){t=[];for(var d of e){e=void 0;O=null;if(d.endScreenVideoRenderer){Z=d.endScreenVideoRenderer;A=Z.title;O=new m3(l.O());O.videoId=Z.videoId;O.lengthSeconds=Z.lengthInSeconds||0;if(Q=Z.publishedTimeText)O.publishedTimeText=g.$b(Q);if(Q=Z.shortBylineText)O.author=g.$b(Q);if(Q=Z.shortViewCountText)O.shortViewCount=g.$b(Q);A&&(O.title=g.$b(A),(A=A.accessibility)&&(A=A.accessibilityData)&&A.label&&(O.ariaLabel=A.label));if(Q=Z.navigationEndpoint)e=Q.clickTrackingParams,A=g.E(Q,g.ug),Q=g.E(Q,
g.Iw),A?O.PL=A:Q!=null&&(O.watchUrl=Q.url);if(A=Z.thumbnailOverlays)for(var w of A)if(A=w.thumbnailOverlayTimeStatusRenderer)if(A.style==="LIVE"){O.isLivePlayback=!0;break}else if(A.style==="UPCOMING"){O.isUpcoming=!0;break}O.TV=Hn(Z.thumbnail)}else if(d.endScreenPlaylistRenderer){Z=d.endScreenPlaylistRenderer;e=Z.navigationEndpoint;if(!e)continue;O=g.E(e,g.ug);if(!O)continue;A=O.videoId;O=new qC(l.O());O.playlistId=Z.playlistId;O.playlistLength=Number(Z.videoCount)||0;O.Z=A||null;O.videoId=A;if(A=
Z.title)O.title=g.$b(A);if(A=Z.shortBylineText)O.author=g.$b(A);e=e.clickTrackingParams;O.TV=Hn(Z.thumbnail)}O&&(e&&(O.sessionData={itct:e}),t.push(O))}l.suggestions=t}if(r){l.rS=!!r.preferImmediateRedirect;l.hv=l.hv||!!r.webShowNewAutonavCountdown;l.zA=l.zA||!!r.webShowBigThumbnailEndscreen;if(l.hv||l.zA){w=r;z=z||null;d=new m3(l.O());d.videoId=w.videoId;if(t=w.videoTitle)d.title=g.$b(t),(t=t.accessibility)&&(t=t.accessibilityData)&&t.label&&(d.ariaLabel=t.label);if(t=w.byline)d.author=g.$b(t);if(t=
w.publishedTimeText)d.publishedTimeText=g.$b(t);if(t=w.shortViewCountText)d.shortViewCount=g.$b(t);if(t=w.thumbnailOverlays)for(var h of t)if(t=h.thumbnailOverlayTimeStatusRenderer)if(t.style==="LIVE"){d.isLivePlayback=!0;break}else if(t.style==="UPCOMING"){d.isUpcoming=!0;break}else if(t.style==="DEFAULT"&&t.text){d.lengthText=g.$b(t.text);(h=t.text.accessibility)&&(h=h.accessibilityData)&&h.label&&(d.HU=h.label||"");break}d.TV=Hn(w.background);if(h=w.nextButton)if(h=h.buttonRenderer)if(h=h.navigationEndpoint)if(h=
g.E(h,g.ug))d.PL=h;w.topBadges&&(h=w.topBadges[0])&&(h=g.E(h,m6T))&&h.style==="BADGE_STYLE_TYPE_PREMIUM"&&(d.V7=!0);if(h=w.alternativeTitle)d.Cx=g.$b(h);h=d;k={autonav:"1",playnext:String(k)};h.playlistId&&(k.autoplay="1");if(z){if(w=z.autoplay?.autoplay?.sets?.[0]?.autoplayVideo)if((z=w.clickTrackingParams)&&(k.itct=z),w=g.E(w,g.ug))h.Qm=w}else w&&(w=w.nextButton?.buttonRenderer?.navigationEndpoint?.clickTrackingParams)&&(k.itct=w);k.itct||(k.feature="related-auto");h.Mh=k;l.suggestions||(l.suggestions=
[]);l.zZ=d}r.countDownSecs!=null&&(l.sQ=r.countDownSecs*1E3);r.countDownSecsForFullscreen!=null&&(l.kC=r.countDownSecsForFullscreen>=0?r.countDownSecsForFullscreen*1E3:-1)}if(r=sAg(l))r=r?.[0]?.endScreenVideoRenderer?.navigationEndpoint?.clickTrackingParams,h=l.D(),r&&h&&(h.sessionData={itct:r});l.sj.currentVideoThumbnail&&(l.TV=Hn(l.sj.currentVideoThumbnail));(r=l.sj?.contents?.twoColumnWatchNextResults?.results?.results?.contents)&&r[0]&&(h=r[0].videoPrimaryInfoRenderer)&&h&&h.subtitle&&(l.jW=g.$b(h.subtitle));
r&&r[1]&&(r=r[1].videoSecondaryInfoRenderer?.owner?.videoOwnerRenderer?.thumbnail?.thumbnails)&&r.length&&(l.profilePicture=r[r.length-1].url);y=Ew(y);if(r=l.getWatchNextResponse()?.onResponseReceivedEndpoints)for(var U of r)g.E(U,WF)&&(l.zw=g.E(U,WF)),r=g.E(U,qHg),r?.entityKeys&&(l.Yr=r.entityKeys||[],r.visibleOnLoadKeys&&(l.visibleOnLoadKeys=r.visibleOnLoadKeys));l.X("web_key_moments_markers")&&(U=g.IH.getState().entities,r=g.RG("visibility_override","markersVisibilityOverrideEntity"),U=yX(U,"markersVisibilityOverrideEntity",
r),l.RR=U?.videoId===(l.videoId||y)&&U?.visibilityOverrideMarkersKey?U.visibilityOverrideMarkersKey:l.visibleOnLoadKeys,l.visibleOnLoadKeys=[...l.RR])}};
W_C=function(l,y){if(y=y.raw_reel_item_watch_response)l.reelItemWatchResponse=y};
Vnt=function(l,y){l.fflags=KL(l.fflags,y.fflags);var k=y.iv_invideo_url;k&&(l.ZY=Cc(k));l.kW=JD(l.kW,y.iv_ads_only);if(k=y.cta_conversion_urls)l.NU=k;l.isPharma=JD(l.isPharma,y.is_pharma);l.author=KL(l.author,y.author);l.R7=XaP(y.ttsurl)||l.R7;l.Um=JD(l.Um,y.cc_asr);l.u0=KL(l.u0,y.channel_path);if(k=y.profile_picture)l.profilePicture=KL(l.profilePicture,k);l.videoCountText=KL(l.videoCountText,y.video_count_text);l.autonavState=Y9(l.autonavState,y.autonav_state,I_T);l.clientPlaybackNonce=KL(l.clientPlaybackNonce,
y.cpn);l.subscribed=JD(l.subscribed,y.subscribed);l.rawViewCount=pL(l.rawViewCount,y.view_count);l.shortViewCount=KL(l.shortViewCount,y.short_view_count_text);l.publishedTimeText=KL(l.publishedTimeText||"",y.publishedTimeText);l.lengthText=KL(l.lengthText||"",y.lengthText);l.HU=KL(l.HU||"",y.HU);l.Cx=KL(l.Cx||"",y.Cx);l.title=KL(l.title,y.title);l.subtitle=KL(l.subtitle,y.subtitle);l.expandedTitle=KL(l.expandedTitle,y.expanded_title);l.expandedSubtitle=KL(l.expandedSubtitle,y.expanded_subtitle);l.ypcPreview=
KL(l.ypcPreview,y.ypc_preview);l.Tr=KL(l.Tr,y.ypc_origin);l.O1=JD(l.O1,y.ypc_is_premiere_trailer);l.Dq=KL(l.Dq,y.ypc_clickwrap_message);l.paygated=JD(l.paygated,y.paygated);l.KQ=JD(l.KQ,y.requires_purchase);l.showShareButton=!JD(!l.showShareButton,y.ss);l.OA=JD(l.OA,y.showwatchlater);l.ji=JD(l.ji,y.shownotifybutton);l.LS=JD(l.LS,y.copy_share);if(k=y.el)l.eventLabel=k;if(k=y.keywords)l.keywords=fQy(k.split(","));if(k=y.rvs)l.suggestions=UJ(k).map(z=>z.playlist||z.list||z.api?new qC(l.Qj,z):new m3(l.Qj,
z));
l.contentCheckOk=JD(l.contentCheckOk,y.cco);l.racyCheckOk=JD(l.racyCheckOk,y.rco);l.isLivingRoomDeeplink=JD(l.isLivingRoomDeeplink,y.is_living_room_deeplink);l.oauthToken=KL(l.oauthToken,y.oauth_token);l.Oj=KL(l.Oj,y.kpt);l.visitorData=KL(l.visitorData,y.visitor_data);if(k=y.session_data)l.sessionData=Gp(k,"&");l.Uf=KL(l.Uf,y.endscreen_ad_tracking_data);l.Y0=JD(l.Y0,y.wait_for_vast_info_cards_xml);l.F_=JD(l.F_,y.suppress_creator_endscreen);l.FD=JD(l.FD,y.is_trueview_action);l.DJ=KL(l.DJ,y.tracking_list);
TUs(l,y)};
g.VT=function(l,y,k){y&&y.cpn&&g.WH(new g.WO("CPN provided in VideoData update",{X1d:y.cpn,Ol:l.clientPlaybackNonce,DKj:k}));k?(Ew(y),l.setData(y),CN(l)&&l.BE()):(y=y||{},CR5(l,y),TE(l,y),W_C(l,y),Vnt(l,y),l.publish("dataupdated"))};
TUs=function(l,y){y.inlineMetricEnabled&&(l.inlineMetricEnabled=!0);y.playback_progress_0s_url&&(l.CJ=new PR5(y));if(y=y.video_masthead_ad_quartile_urls)l.KR=y.quartile_0_url,l.pQ=y.quartile_25_url,l.Rv=y.quartile_50_url,l.vc=y.quartile_75_url,l.Hc=y.quartile_100_url,l.B0=y.quartile_0_urls,l.Xy=y.quartile_25_urls,l.EF=y.quartile_50_urls,l.gI=y.quartile_75_urls,l.n$=y.quartile_100_urls};
g.x5=function(l,y){for(const k of y)k.cueRangeSetIdentifier&&l.eE.set(k.cueRangeSetIdentifier,k.playerCueRanges??[])};
JLT=function(l){if(!l)return null;for(const y of l)if(l=y.adPlacementRenderer?.renderer?.videoAdTrackingRenderer)return l;return null};
YHt=function(l){const y=l.playerResponse?.playerConfig?.compositeVideoConfig?.sourceConfigs;l=l.playerResponse?.playerConfig?.compositeVideoConfig?.defaultActiveSourceVideoId;if(!y||!y.length)return"";l||(l=y[0].videoId||"");for(const k of y)if(k.videoId===l&&k.audioTracks)for(const z of k.audioTracks)if(z.isDefaultForSource)return z.id||"";return""};
pJ5=function(l,y,k){switch(y){case "EMBEDDED_PLAYER_LITE_MODE_FIXED_PLAYBACK_LIMIT":k>30?l.limitedPlaybackDurationInSeconds=30:k<30&&k>10&&(l.limitedPlaybackDurationInSeconds=10);break;case "EMBEDDED_PLAYER_LITE_MODE_DYNAMIC_PLAYBACK_LIMIT":l.limitedPlaybackDurationInSeconds=k*.2}};
K_4=function(l,y){return y!=null?JD(l.K,y):l.K?l.K:l.Qj.preferGapless&&l.Qj.supportsGaplessShorts()};
gR5=function(l){return!!l&&isFinite(l)&&l>1E9};
ERP=function(l){return Uw()&&PF(l)?!1:JP(l)&&(g.tL(l.Qj)?!l.isLivePlayback:l.hlsvp)||!Q6()||l.DY?!0:!1};
f_Q=function(l){l=g.MK(l);return Number(l.expire)||0};
Y5=function(l){const y=l.O();return l.Qj.C_==="hm"||l.Qj.C_==="gd"||y.experiments.sA().Z.G7(j0Q)&&l.Qj.S?!0:!1};
icq=function(l,y){l.showShareButton=!!y;if(y=g.E(y,$L)?.navigationEndpoint||g.E(y,$L)?.command)l.LS=!!g.E(y,SHt)};
Gss=function(l,y,k){var z=k.channelThumbnail;z&&(z=z.thumbnails)&&(z=z[0])&&(y.profile_picture=z.url);if(z=g.E(g.E(k?.channelThumbnailEndpoint,nRC)?.urlEndpoint,g.Iw))y.channel_path=z.url;if(z=k.collapsedRenderer)if(z=g.E(z,F_s)){const r=z.title;r&&(y.title=g.$b(r));if(z=z.subtitle)y.subtitle=g.$b(z)}if(k=k.expandedRenderer)if(k=g.E(k,oRC)){if(z=k.title)y.expanded_title=g.$b(z);if(z=k.subtitle)y.expanded_subtitle=g.$b(z);if(k=k.subscribeButton)l.subscribeButtonRenderer=g.E(k,g.pN),l.subscribeButtonRenderer&&
(y.ucid=l.subscribeButtonRenderer.channelId,y.subscribed=l.subscribeButtonRenderer.subscribed,l.ji=!!l.subscribeButtonRenderer.notificationPreferenceToggleButton,l.subscribeButtonRenderer.notificationPreferenceToggleButton&&l.subscribeButtonRenderer.notificationPreferenceToggleButton.toggleButtonRenderer&&(y=l.subscribeButtonRenderer.notificationPreferenceToggleButton.toggleButtonRenderer,y.isToggled?(l.Gr=y.toggledServiceEndpoint||null,l.Oi=y.defaultServiceEndpoint||null):(l.Gr=y.defaultServiceEndpoint||
null,l.Oi=y.toggledServiceEndpoint||null)))}};
NUs=function(l){return!!l.yS||!!l.KR||!!l.B0||!!l.CJ||l.TD};
KN=function(l){return!!(l.N&&l.N.videoInfos&&l.N.videoInfos.length)};
jn=function(l){return l.yf()&&l.O().supportsGaplessShorts()};
gH=function(l){var y=["MUSIC_VIDEO_TYPE_ATV","MUSIC_VIDEO_TYPE_PRIVATELY_OWNED_TRACK"],k=AA(l.Qj)==="TVHTML5_SIMPLY"&&l.Qj.Z.ctheme==="MUSIC";!l.cO&&(g.ow(l.Qj)||g.Pn(l.Qj)||k)&&(y.includes(l.musicVideoType)||l.isExternallyHostedPodcast)&&(l.cO=!0);if(y=g.is())y=/Starboard\/([0-9]+)/.exec(g.Xv()),y=(y?parseInt(y[1],10):NaN)<10;k=l.Qj;k=(AA(k)==="TVHTML5_CAST"||AA(k)==="TVHTML5"&&(k.Z.cver.startsWith("6.20130725")||k.Z.cver.startsWith("6.20130726")))&&l.Qj.Z.ctheme==="MUSIC";var z;if(z=!l.cO)k||(k=
l.Qj,k=AA(k)==="TVHTML5"&&k.Z.cver.startsWith("7")),z=k;z&&!y&&(y=l.musicVideoType==="MUSIC_VIDEO_TYPE_PRIVATELY_OWNED_TRACK",k=(l.X("cast_prefer_audio_only_for_atv_and_uploads")||l.X("kabuki_pangea_prefer_audio_only_for_atv_and_uploads"))&&l.musicVideoType==="MUSIC_VIDEO_TYPE_ATV",y||k||l.isExternallyHostedPodcast)&&(l.cO=!0);return l.Qj.deviceIsAudioOnly||l.cO&&l.Qj.A};
EK=function(l){return l.Qj.X("html5_disable_av1")?!0:!1};
fN=function(l){return l.playerResponse?.playerConfig?.compositeVideoConfig?.compositeBroadcastType==="COMPOSITE_BROADCAST_TYPE_COMPRESSED_DOMAIN_COMPOSITE"};
g.j2=function(l){var y=l.K;l.X("html5_gapless_unlimit_format_selection")&&jn(l)&&(y=!1);const k=!!l.Z&&l.Z.UA;y=sI_(l.Qj,{Zu:l.Zu(),XI:k,sZ:gH(l),f2:l.f2,a_:y,isOtf:l.isOtf(),h2:l.h2(),vZ:l.vZ,wX:l.getUserAudio51Preference(),disableAv1:EK(l),IP:fN(l)});Kc(l)&&(y.R7=!0);Uw()&&l.playerResponse&&l.playerResponse.playerConfig&&l.playerResponse.playerConfig.webPlayerConfig&&l.playerResponse.playerConfig.webPlayerConfig.useCobaltTvosDogfoodFeatures&&(y.V=!0,y.J=!0);l.K&&l.isAd()&&(l.PV&&(y.D=l.PV),l.uW&&
(y.N=l.uW));l.yf()&&(y.sj=g.i_(l.Qj.experiments,"html5_hard_cap_max_vertical_resolution_for_shorts"));y.rb=l.isLivePlayback&&l.eb()&&l.Qj.X("html5_drm_live_audio_51");y.b0=l.YM;l.X("html5_disable_vp9_hdr_fairplay")&&Uw()&&(y.b0=!0);y.WG=!Kc(l);return l.xz=y};
L_t=function(l){Jt("drm_pb_s",void 0,l.C_);l.Ze||l.Z&&l.Z.J();var y={};l.Z&&(y=Oz5(l.Ky,g.j2(l),l.Qj.J,l.Z,k=>l.publish("ctmp","fmtflt",k),!0,new Set));
y=new s0q(y,l.Qj,l.DE,l.useCobaltWidevine?Uw()?PF(l):!1:!1,(k,z)=>{l.Md(k,z)});
g.x(l,y);l.V9=!1;l.loading=!0;lHy(y,k=>{Jt("drm_pb_f",void 0,l.C_);for(var z of k)switch(z.flavor){case "fairplay":z.Ze=l.Ze;z.cI=l.cI;z.Yf=l.Yf;break;case "widevine":z.fn=l.fn}l.pS=k;if(l.pS.length>0&&(l.J=l.pS[0],l.Qj.yM())){k={};for(const [r,Z]of Object.entries(l.J.C)){z=Z;let e="unk";const A=r.match(/(.*)codecs="(.*)"/);A&&(e=A[2]);k[e]=z}l.Md("drmProbe",k)}l.BE()})};
vRT=function(l){var y;if(y=!!l.cotn)y=l.videoId,y=!!y&&g.tP(y)===1;return y&&!l.tb};
RP5=function(l){var y=l.playerResponse?.streamingData?.adaptiveFormats||[],k=null;if(y.length>0)k=BUq(l,y);else if(!l.X("html5_deprecate_adaptive_formats_string")){l.Md("pafmtstr",{s:l.adaptiveFormats.substring(0,50)});if((y=l.adaptiveFormats)&&!JP(l)){l.Qj.J.C&&(S1=!0);y=S2(y);k=l.contentProtection;var z=l.lengthSeconds,r=l.isLivePlayback,Z=l.aj,e=l.Qj,A=woq(y);if(r||Z){z=e?.experiments;r=new g.OE("",z,!0);r.UA=!0;r.isManifestless=!0;r.N=!Z;r.isLive=!Z;r.aj=Z;for(t of y){e=C2(t,k);A=$E(t.url,t.sp,
t.s);var Q=A.get("id");Q&&Q.includes("%7E")&&(r.Y=!0);Q=z?.z7("html5_max_known_end_time_rebase");const O=Number(t.target_duration_sec)||5,d=Number(t.max_dvr_duration_sec)||14400,w=Number(A.get("mindsq")||A.get("min_sq")||"0"),h=Number(A.get("maxdsq")||A.get("max_sq")||"0")||Infinity;r.Vi=r.Vi||w;r.wW=r.wW||h;const U=!E1(e.mimeType);A&&wb(r,new HcC(A,e,{GZ:O,zB:U,Ho:d,Vi:w,wW:h,EH:300,aj:Z,DO:Q}))}var t=r}else t=A==="FORMAT_STREAM_TYPE_OTF"?hTP(y,k,z,e?.experiments):GXs(y,k,z,e);y.length>0&&(y=y[0],
Y5(l)&&y.url&&(l.wY=l.wY||f_Q(y.url)));y=l.isLivePlayback&&!l.aj&&!l.xa&&!l.isPremiere;l.X("html5_live_head_playable")&&(!nN(l)&&y&&l.Md("missingLiveHeadPlayable",{}),l.Qj.C_==="yt"&&(t.u0=!0));k=t}else k=null;l.Md("pafmts",{isManifestFilled:!!k})}if(!k)return!1;Fj(l,k);return!0};
fc=function(l){return!(!l.Z||!l.Z.isManifestless)};
nN=function(l){return l.X("html5_live_head_playable")&&fc(l)&&l.Qj.C_==="yt"?l.isLiveHeadPlayable:l.isLivePlayback};
BUq=function(l,y){if(y.length===0||JP(l))return null;l.Qj.J.C&&(S1=!0);var k=l.contentProtection;var z=l.lengthSeconds,r=l.isLivePlayback,Z=l.aj,e=l.Qj,A=zTz(y);if(r||Z){z=e.experiments;r=new g.OE("",z,!0);r.N=!Z;r.UA=!0;r.isManifestless=!0;r.isLive=!Z;r.aj=Z;for(const t of y){e=db(t,k);const {yq:O,s:d,Vd:w}=dl(5,756,t);A=$E(O||t.url||"",w,d);var Q=A.get("id");Q&&Q.includes("%7E")&&(r.Y=!0);Q=z?.z7("html5_max_known_end_time_rebase");const h=Number(t.targetDurationSec||5),U=Number(t.maxDvrDurationSec||
14400),u=Number(A.get("mindsq")||A.get("min_sq")||"0"),W=Number(A.get("maxdsq")||A.get("max_sq")||"0")||Infinity;r.Vi=r.Vi||u;r.wW=r.wW||W;const V=!E1(e.mimeType);A&&wb(r,new HcC(A,e,{GZ:h,zB:V,Ho:U,Vi:u,wW:W,EH:300,aj:Z,DO:Q}))}k=r}else k=A==="FORMAT_STREAM_TYPE_OTF"?rts(y,k,z,e.experiments):Z4Q(y,k,z,e);y.length>0&&(y=y[0],Y5(l)&&y.url&&(l.wY=l.wY||f_Q(y.url)));y=l.isLivePlayback&&!l.aj&&!l.xa&&!l.isPremiere;l.X("html5_live_head_playable")&&(!nN(l)&&y&&l.Md("missingLiveHeadPlayable",{}),l.Qj.C_===
"yt"&&(k.u0=!0));return k};
S2=function(l,y){l=UJ(l);const k={};if(y)for(var z of y.split(","))(y=z.match(/^([0-9]+)\/([0-9]+)x([0-9]+)(\/|$)/))&&(k[y[1]]={width:y[2],height:y[3]});for(const r of l)if(z=k[r.itag])r.width=z.width,r.height=z.height;return l};
Fj=function(l,y,k=!1){l.TZ=void 0;l.Z=y;g.x(l,y);y.Vi=l.Vi;y.wW=l.wW;y.iW=l.iW;y.Q4=l.Q4;y.Ob=l.Ob;l.JU&&(y.C_=new D6Q(l.JU));(l.Zu()||g.oH(l))&&l.dP.push("webgl");l.Z.isLive||(l.isLivePlayback=!1);const z=y.sourceUrl.split("/");if(l.gb?z.indexOf("manifest_duration")!==-1:z.indexOf("manifest_duration")!=-1)l.Wi=Number(z[z.indexOf("manifest_duration")+1]);if(y.N||y.isManifestless)y.subscribe("clienttemp",l.Md,l),k?y.subscribe("refresh",l.DX,l):y.subscribe("cuepointsadded",l.oy,l);y.J()?l.V9=!0:rk=
void 0;l.xa&&(y.C=l.xa,y.isLive=!0,l.isLivePlayback=!0);y.isPremiere=l.isPremiere;y.isLiveHeadPlayable=l.isLiveHeadPlayable};
PF=function(l){return l.X("html5_tvos_skip_dash_audio_check")||MediaSource.isTypeSupported('audio/webm; codecs="opus"')};
JP=function(l){return Uw()?!PF(l):CL()?!(!l.Ze||!l.X("html5_enable_safari_fairplay")&&Q6()):!1};
NC=function(l){return l.gb?l.isLowLatencyLiveStream&&l.Z!=null&&Yp(l.Z)>=5:l.isLowLatencyLiveStream&&l.Z!=void 0&&Yp(l.Z)>=5};
l4z=function(l){l.loading=!0;l.q_=!1;if(vRT(l))g.kst(l.videoId).then(z=>{if(l.playerResponse?.streamingData){var r=[];for(const Z of z)z=Object.assign({},Z),z.signatureCipher="",r.push(z);r.length<2&&l.Md("offmlf",{len:r.length});r=BUq(l,r);gH(l)&&EV5(r,!1);Fj(l,r);l.Md("dlr",{})}else l.Md("offsdm",{cotn:l.Ei?l.Ei.cotn:"0",cpn:l.clientPlaybackNonce})}).then(()=>{l.BE()});
else{qR(l.vB)||g.WH(new g.WO("DASH MPD Origin invalid: ",l.vB));var y=l.vB,k=g.i_(l.Qj.experiments,"dash_manifest_version")||4;y=g.UI(y,{mpd_version:k});l.isLowLatencyLiveStream&&l.latencyClass!=="NORMAL"||(y=g.UI(y,{pacing:0}));Mit(y,l.Qj.experiments,l.isLivePlayback).then(z=>{l.IR()||(Fj(l,z,!0),Jt("mrc",void 0,l.C_),l.BE())},z=>{l.IR()||(l.loading=!1,l.publish("dataloaderror",new g.Gr("manifest.net.retryexhausted",{backend:"manifest",
rc:z.status},1)))});
Jt("mrs",void 0,l.C_)}};
sK=function(l){if(!l.isProximaLatencyEligible)return 0;const y=iY();return l.Qj.getWebPlayerContextConfig()?.enableProximaLowLatency?2:y===1?1:l.X("html5_enable_proxima")?2:0};
Sn=function(l,y){return l.X(y)?!0:(l.fflags||"").includes(y+"=true")};
y75=function(l,y){const k=y||ERP(l)||l.isExternallyHostedPodcast;if(!l.Z||k)return l.Md("skipDash",{dm:!!l.Z,air:y,dd:l.DY,mss:Q6(),"3pp":l.isExternallyHostedPodcast}),yu();gH(l)&&EV5(l.Z,l.isLivePlayback);return k9().then(()=>uu5(l.Ky,g.j2(l),l.Qj.J,l.Z,l.J,z=>l.publish("ctmp","fmtflt",z),l.g8,LN(l)).then(z=>{l.Rb(z);
l.Ky.C=null;/^av/.test(l.clientPlaybackNonce)&&l.xz&&l.Md("av1",l.xz.C)}))};
zWg=function(l,y){if(y&&l.hlsvp)return yu();if(l.hlsFormats){if(y=S2(l.hlsFormats)){const z=[];for(var k of y)k.url&&(k.url=wJQ(k.url)),l.xz?.Z&&z.push(k.itag);l.xz?.Z&&z.length>0&&l.Md("hlsfmt",{itags:z.join(".")})}l.vn=sG5(l.Qj,y);l.vn&&kre(l,l.vn);k=l.clientPlaybackNonce;return Ry5(l.Qj,l.isAd(),y,l.playerResponse?.captions?.playerCaptionsRenderer?.baseUrl??null,l.y0,k,z=>l.publish("ctmp","hlsflt",z)).then(z=>{let r=0;
const Z=[];for(const e of z)Z.push(e.getInfo()?.itag),e.getInfo()?.A()?.numChannels>r&&(r=e.getInfo().audio.numChannels);r>2&&l.Md("hlschl",{mn:r});l.xz?.Z&&l.Md("hlsfmtaf",{itags:Z.join(".")});if(l.X("html5_enable_vp9_fairplay")&&l.J?.Z()){l.Md("drm",{sbdlfbk:1});for(const e of l.pS)if(y6(e)){l.J=e;break}}vF(l,z)})}return yu()};
r7y=function(l){if(l.isExternallyHostedPodcast&&l.t$){const y=S2(l.t$);if(!y[0])return yu();l.Xh=y[0];return zCT(l.Qj,y[0]).then(k=>{vF(l,k)})}return l.kK&&l.On?kKQ(l.Qj,l.isAd(),l.kK).then(y=>{vF(l,y)}):yu()};
A7Q=function(l){if(l.isExternallyHostedPodcast)return yu();const y=S2(l.t$,l.eU);if(l.hlsvp){const k=d6q(l.hlsvp,l.clientPlaybackNonce,l.y0);y.push(k)}return Zk5(l.Qj,l.isAd(),y,eWT(l)).then(k=>{vF(l,k)})};
LN=function(l){const y=l.X("html5_enable_server_format_filter")&&!l.eb(),k=l.X("html5_enable_server_format_filter_for_drm")&&l.eb();return Kc(l)&&(y||k)};
kre=function(l,y){y.sort((k,z)=>k.toString().localeCompare(z.toString(),l.Qj.hostLanguage))};
vF=function(l,y){l.WG=y;l.Rb(new YM(g.sT(l.WG,k=>k.getInfo())))};
eWT=function(l){const y={cpn:l.clientPlaybackNonce,c:l.Qj.Z.c,cver:l.Qj.Z.cver};l.qE&&(y.ptk=l.qE,y.oid=l.h0,y.ptchn=l.c$,y.pltype=l.ZE,l.fL&&(y.m=l.fL));return y};
g.BF=function(l){return JP(l)&&l.Ze?{fairplay:"https://youtube.com/api/drm/fps?ek=uninitialized"}:l.C&&l.C.contentProtection||null};
HF=function(l){return l.playerResponse&&l.playerResponse.paidContentOverlay&&l.playerResponse.paidContentOverlay.paidContentOverlayRenderer||g.E(l.sj?.playerOverlays?.playerOverlayRenderer?.playerDisclosure,$xy)||null};
QhT=function(l){const y=HF(l);return y&&y.text?g.$b(y.text):l.paidContentOverlayText};
tTT=function(l){const y=HF(l);return y&&y.durationMs?cZ(y.durationMs):l.paidContentOverlayDurationMs};
RH=function(l){let y="";if(l.Zf)return l.Zf;l.isLivePlayback&&(y=l.allowLiveDvr?"dvr":l.isPremiere?"lp":l.xa?"window":"live");l.aj&&(y="post");return y};
g.Dp=function(l,y){return typeof l.keywords[y]!=="string"?null:l.keywords[y]};
g.cF=function(l){return!!(l.vB||l.t$||l.kK||l.hlsvp||l.dJ())};
XJ5=function(l){return(l=l.oY)&&l.showError?l.showError:!1};
g.la=function(l){return nN(l)&&!l.allowLiveDvr};
yi=function(l){return nN(l)&&l.allowLiveDvr};
g.kk=function(l){return!!l.Z&&Iz5(l.Z)};
g.z3=function(l){return!!l.Z&&Tl5(l.Z)};
g.oH=function(l){return!!l.Z&&PHz(l.Z)};
g.ru=function(l){return!!l.Z&&Vi5(l.Z)};
g.Oks=function(l){if(l.F_)return null;let y=l.Gw;y||(y=l.playerResponse&&l.playerResponse.endscreen&&l.playerResponse.endscreen.endscreenUrlRenderer&&l.playerResponse.endscreen.endscreenUrlRenderer.url);return y||null};
g.dxt=function(l){return l.F_?null:l.playerResponse&&l.playerResponse.endscreen&&l.playerResponse.endscreen.endscreenRenderer||null};
g.ZK=function(l){if(!l.playerResponse||!l.playerResponse.annotations)return null;for(const y of l.playerResponse.annotations)if(y.playerAnnotationsExpandedRenderer&&y.playerAnnotationsExpandedRenderer.featuredChannel)return y.playerAnnotationsExpandedRenderer;return null};
eS=function(l){return l.adFormat&&(l.gb?l.adFormat!=="1_5":l.adFormat!="1_5")?"adunit":l.eventLabel||l.Qj.b0};
g.AI=function(l){return eS(l)==="shortspage"};
$k=function(l){return l.lE||eS(l)==="detailpage"||eS(l)==="shortspage"||l.mutedAutoplay};
CHy=function(l){const y=eS(l)==="adunit"?l.X6:$k(l)?eS(l)==="detailpage"||eS(l)==="shortspage"?l.isAutonav||l.mK>0:l.BF?!1:l.Qj.ji||l.Qj.kK||!g.u9(l.Qj)?!0:!1:(l.BF?0:l.jN)&&g.u9(l.Qj)?!0:!1;l.X("html5_log_detailpage_autoplay")&&eS(l)==="detailpage"&&l.Md("autoplay_info",{autoplay:l.lE,autonav:l.isAutonav,wasDompaused:l.BF,result:y});return y};
wt5=function(l){let y=1;var k=g.i_(l.Qj.experiments,"html5_default_ad_gain");k&&l.isAd()&&(y=k);k=l.V?.audio.N!=null?l.V?.audio.N:l.YR;isNaN(k)||(l.Q9=4);return Math.min(1,10**(-k/20))||y};
ygT=function(l){if(l.X("html5_stateful_audio_normalization")){{let z=1;var y=g.i_(l.Qj.experiments,"html5_default_ad_gain");y&&l.isAd()&&(z=y);const r=l.V?.audio.V??l.pW;if(r==null||isNaN(r))l=wt5(l);else{y=(0,g.f)();l.Q9=1;var k=y-l.Qj.e5<=l.maxStatefulTimeThresholdSec*1E3;l.applyStatefulNormalization&&k?l.Q9=2:k||(l.Qj.LS=Infinity,l.Qj.e5=NaN);k=(l.Q9===2?g.gf(l.Qj.LS,l.minimumLoudnessTargetLkfs,l.loudnessTargetLkfs):l.loudnessTargetLkfs)-r;l.Q9!==2&&(k+=l.playerResponse?.playerConfig?.audioConfig?.loudnessNormalizationConfig?.statelessLoudnessAdjustmentGain||
0);k=Math.min(k,0);l.preserveStatefulLoudnessTarget&&(l.Qj.LS=r+k,l.Qj.e5=y);l=Math.min(1,10**(k/20))||z}}}else l=wt5(l);return l};
g.hW5=function(l){return l.UA()&&Kc(l)};
pc=function(l){return!!l.playerResponse?.playerConfig?.mediaCommonConfig?.splitScreenEligible};
Grg=function(l){return isNaN(l)?0:Math.max((Date.now()-l)/1E3-30,0)};
Qi=function(l){return!(!l.tb||!l.Qj.A)&&l.dJ()};
tI=function(l){return l.wu&&l.enableServerStitchedDai};
a4z=function(l){return l.aK&&!l.JU};
Xj=function(l){var y;if(!(y=MC&&l.UA()&&l.eb()&&(l.drmProduct==="1"?!1:!0)&&l.X("html5_sabr_live_drm_streaming_xhr"))){y=l.UA()&&!l.eb()&&MC;var k=l.UA()&&l.latencyClass!=="ULTRALOW"&&!l.isLowLatencyLiveStream&&l.X("html5_sabr_live_normal_latency_streaming_xhr"),z=l.isLowLatencyLiveStream&&l.X("html5_sabr_live_low_latency_streaming_xhr");const r=l.latencyClass==="ULTRALOW"&&l.X("html5_sabr_live_ultra_low_latency_streaming_xhr");y=y&&(k||z||r)}k=y;y=l.enableServerStitchedDai&&k&&l.X("html5_enable_sabr_ssdai_streaming_xhr");
k=!l.enableServerStitchedDai&&k;z=l.UA()&&!MC&&l.X("html5_enable_sabr_live_non_streaming_xhr");l=MC&&(l.j2()||pc(l)&&l.X("html5_enable_sabr_for_lifa_eligible_streams"));return y||k||z||l};
OB=function(l){return l.Z$?["OK","LIVE_STREAM_OFFLINE"].includes(l.Z$.status):!0};
g.ike=function(l){return l.captionsLanguagePreference||l.Qj.captionsLanguagePreference||g.Dp(l,"yt:cc_default_lang")||l.Qj.hj};
MTQ=function(l){return l.Qj.experiments.sA().Z.G7(Uxz)&&l.yf()};
g.du=function(l){return!!l.embeddedPlayerConfig?.embeddedPlayerFlags?.enableMusicUx};
wu=function(l){return l.Qj.V&&l.isPrivate};
Xts=function(l){return l.playerResponse?.playerConfig?.daiConfig?l.OW?1:l.fD?2:0:3};
g.b9=function(l){var y=l.O();const k=g.hI(y);var z=y.Cp;g.U9(y)&&(z&&(k.thirdParty={...k.thirdParty,embedUrl:z}),kds(k,l));(z=l.Y)?k.clickTracking={clickTrackingParams:z}:g.U9(l.O())&&g.Y("EVENT_ID")?k.clickTracking={clickTrackingParams:g.Y("EVENT_ID")}:y.X("html5_log_missing_itct")&&(z=new g.WO("Missing ITCT in InnerTubeContext",{isAd:l.isAd(),Jsj:y.getWebPlayerContextConfig()?.contextId}),g.n(z));z=k.client||{};var r="EMBED",Z=eS(l);Z==="leanback"?r="WATCH":y.X("gvi_channel_client_screen")&&Z===
"profilepage"?r="CHANNEL":l.vZ?r="LIVE_MONITOR":Z==="detailpage"?r="WATCH_FULL_SCREEN":Z==="adunit"?r="ADUNIT":Z==="sponsorshipsoffer"&&(r="UNKNOWN");z.clientScreen=r;if(r=l.kidsAppInfo)z.kidsAppInfo=JSON.parse(r);(Z=l.jw)&&!r&&(z.kidsAppInfo={contentSettings:{ageUpMode:c7q[Z]}});if(r=l.kV)z.unpluggedAppInfo={enableFilterMode:!0};(Z=l.unpluggedFilterModeType)&&!r&&(z.unpluggedAppInfo={filterModeType:CkQ[Z]});if(r=l.MW)z.unpluggedLocationInfo=r;k.client=z;z=k.request||{};l.S2&&(z.isPrefetch=!0);if(r=
l.mdxEnvironment)z.mdxEnvironment=r;if(r=l.mdxControlMode)z.mdxControlMode=bk5[r];k.request=z;z=k.user||{};if(r=l.b0)z.credentialTransferTokens=[{token:r,scope:"VIDEO"}];if(r=l.Oj)z.delegatePurchases={oauthToken:r},z.kidsParent={oauthToken:r};if(y=y.getWebPlayerContextConfig()?.userContentRating)z.serializedUserContentRating=y;k.user=z;if(y=l.contextParams)k.activePlayers=[{playerContextParams:y}];if(l=l.clientScreenNonce)k.clientScreenNonce=l;return k};
g.hI=function(l){const y=g.rl(),k=y.client||{};if(l.forcedExperiments){var z=l.forcedExperiments.split(",");const r=[];for(const Z of z)r.push(Number(Z));k.experimentIds=r}if(z=l.homeGroupInfo)k.homeGroupInfo=JSON.parse(z);if(z=l.getPlayerType())k.playerType=z;if(z=l.Z.ctheme)k.theme=z;if(z=l.livingRoomAppMode)k.tvAppInfo={...k.tvAppInfo,livingRoomAppMode:z};z=l.deviceYear;l.X("html5_propagate_device_year")&&z&&(k.tvAppInfo={...k.tvAppInfo,deviceYear:z});if(z=l.livingRoomPoTokenId)k.tvAppInfo={...k.tvAppInfo,
livingRoomPoTokenId:z};y.client=k;z=y.user||{};l.enableSafetyMode&&(z={...z,enableSafetyMode:!0});!k.tvAppInfo?.usePageidAsHeader&&l.pageId&&(z={...z,onBehalfOfUser:l.pageId});y.user=z;return y};
qo4=function(l){const y=!l?.h2()&&l?.UA()&&T6();return{supportsVp9Encoding:!(!l?.qU()||y),supportXhr:MC}};
xxz=async function(l,y){l={context:g.hI(l.O()),engagementType:"ENGAGEMENT_TYPE_PLAYBACK",ids:[{playbackId:{videoId:l.videoId,cpn:l.clientPlaybackNonce}}]};const k=g.ei(uPq);return await g.Si(y,l,k)};
mxz=function(l,y,k){const z=g.i_(y.experiments,"bg_vm_reinit_threshold");(!dQ||(0,g.f)()-dQ>z)&&xxz(l,k).then(r=>{r&&(r=r.botguardData)&&g.Gk(r,y)},r=>{l.IR()||(r=ah(r),l.Md("attf",r.details))})};
g.G3=function(l,y,...k){l.state.N.publish(y,...k);l.state.C.publish(y,...k)};
B=function(l,y,k){l.state.Z[y]=(...z)=>k.apply(l,z)};
ao=function(l,y,k){l.state.Z.hasOwnProperty(y)||B(l,y,k);l.state.J[y]=(...z)=>k.apply(l,z);
l.state.K.add(y)};
ia=function(l,y,k){l.state.Z.hasOwnProperty(y)||B(l,y,k);l.app.O().A&&(l.state.S[y]=(...z)=>k.apply(l,z),l.state.K.add(y))};
g.UB=function(l,y,k){return l.state.Z[y](...k)};
g.M1=function(l,y,...k){l.state.N.publish(y,...k);l.state.C.publish(y,...k);l.state.V.publish(y,...k)};
g.X5=function(l,y,...k){l.state.N.publish(y,...k);l.state.C.publish(y,...k);l.state.V.publish(y,...k);l.state.A.publish(y,...k)};
q1s=function(l,y,k){typeof l==="string"&&(l={mediaContentUrl:l,startSeconds:y,suggestedQuality:k});a:{if((y=l.mediaContentUrl)&&(y=/\/([ve]|embed)\/([^#?]+)/.exec(y))&&y[2]){y=y[2];break a}y=null}l.videoId=y;return cl(l)};
cl=function(l,y,k){if(typeof l==="string")return{videoId:l,startSeconds:y,suggestedQuality:k};y={};for(const z of WqQ)l[z]&&(y[z]=l[z]);(l=l.embedConfig||l.embed_config)&&(y.embed_config=I4P(l));return y};
Tdz=function(l,y,k,z){if(g.uQ(l)&&!Array.isArray(l)){y="playlist list listType index startSeconds suggestedQuality".split(" ");k={};for(z=0;z<y.length;z++){const r=y[z];l[r]&&(k[r]=l[r])}return k}y={index:y,startSeconds:k,suggestedQuality:z};typeof l==="string"&&l.length===16?y.list="PL"+l:y.playlist=l;return y};
I4P=function(l){if(typeof l==="string")return l;if(g.uQ(l))try{return JSON.stringify(l)}catch(y){console.error("Invalid embedConfig JSON",y)}};
VTC=function(l,y=1){const k={};y=l.app.u5({playerType:y}).getVideoData();if(wu(y))return{};k.video_id=y.videoId;k.author=y.author;k.title=y.title;k.isPlayable=OB(y);k.errorCode=y.errorCode;if(y.C&&y.C.video){k.video_quality=y.C.video.quality;y=y.C.video;const z=[];y.C()&&z.push("hfr");y.isHdr()&&z.push("hdr");y.primaries==="bt2020"&&z.push("wcg");k.video_quality_features=z}if(l=l.getPlaylistId())k.list=l;return k};
PkC=function(l){ao(l,"cueVideoById",l.Y);ao(l,"loadVideoById",l.BF);ao(l,"cueVideoByUrl",l.sj);ao(l,"loadVideoByUrl",l.hj);ao(l,"playVideo",l.Xz);ao(l,"pauseVideo",l.pauseVideo);ao(l,"stopVideo",l.pf);ao(l,"clearVideo",l.clearVideo);ao(l,"getVideoBytesLoaded",l.hv);ao(l,"getVideoBytesTotal",l.MW);ao(l,"getVideoLoadedFraction",l.V);ao(l,"getVideoStartBytes",l.R7);ao(l,"cuePlaylist",l.cuePlaylist);ao(l,"loadPlaylist",l.OA);ao(l,"nextVideo",l.vn);ao(l,"previousVideo",l.Cp);ao(l,"playVideoAt",l.S2);ao(l,
"setShuffle",l.setShuffle);ao(l,"setLoop",l.setLoop);ao(l,"getPlaylist",l.T7);ao(l,"getPlaylistIndex",l.getPlaylistIndex);ao(l,"getPlaylistId",l.getPlaylistId);ao(l,"loadModule",l.S);ao(l,"unloadModule",l.K);ao(l,"setOption",l.C);ao(l,"getOption",l.xz);ao(l,"getOptions",l.Z);ao(l,"mute",l.q_);ao(l,"unMute",l.RY);ao(l,"isMuted",l.isMuted);ao(l,"setVolume",l.oY);ao(l,"getVolume",l.getVolume);ao(l,"seekTo",l.ji);ao(l,"getPlayerMode",l.getPlayerMode);ao(l,"getPlayerState",l.WG);ao(l,"getAvailablePlaybackRates",
l.getAvailablePlaybackRates);ao(l,"getPlaybackQuality",()=>l.getPlaybackQuality(1));
ao(l,"setPlaybackQuality",l.Ky);ao(l,"getAvailableQualityLevels",l.RR);ao(l,"getCurrentTime",l.u0);ao(l,"getDuration",l.Xr);ao(l,"addEventListener",l.C_);ao(l,"removeEventListener",l.Fg);ao(l,"getDebugText",l.PG);ao(l,"getVideoData",()=>VTC(l));
ao(l,"addCueRange",l.A);ao(l,"removeCueRange",l.removeCueRange);ao(l,"setSize",l.setSize);ao(l,"getApiInterface",l.getApiInterface);ao(l,"destroy",l.destroy);ao(l,"mutedAutoplay",l.mutedAutoplay);const y=l.app.O();y.S||(ao(l,"getVideoEmbedCode",l.getVideoEmbedCode),ao(l,"getVideoUrl",l.PF));ao(l,"getMediaReferenceTime",l.gb);ao(l,"getSize",l.getSize);ao(l,"setFauxFullscreen",l.Um);y.X("embeds_enable_move_set_center_crop_to_public")&&ao(l,"setCenterCrop",l.setCenterCrop);y.S||ao(l,"logImaAdEvent",
l.logImaAdEvent);ao(l,"preloadVideoById",l.wY);ao(l,"wakeUpControls",l.wakeUpControls)};
g.Ci=function(l){return(l=J7t(l.app.r4()))?l.KS():null};
ua=function(l){const y=g.CA(l.app.O()),k=l.app.getVideoData()?.hk;l=ba(l.app);return g.j_(y)&&!k||l?!1:!0};
Y1s=function(l,y,k){return typeof l==="number"?{playerType:l,D5:y,cpn:k}:l||{}};
pt4=function(l){let y=l.raw_player_response;if(!y){var k=l.player_response;k&&(y=JSON.parse(k))}delete l.player_response;delete l.raw_player_response;y&&(l.raw_player_response={streamingData:y.streamingData,playerConfig:y.playerConfig},y.playbackTracking?.qoeUrl&&(l.raw_player_response={...l.raw_player_response,playbackTracking:{qoeUrl:y.playbackTracking.qoeUrl}}),y.captions&&(l.raw_player_response={...l.raw_player_response,captions:y.captions}),y.videoDetails&&(y.videoDetails.videoId||y.videoDetails.lengthSeconds)&&
(k={},y.videoDetails.videoId&&(k.videoId=y.videoDetails.videoId),y.videoDetails.lengthSeconds&&(k.lengthSeconds=y.videoDetails.lengthSeconds),l.raw_player_response={...l.raw_player_response,videoDetails:k}))};
xk=function(l,y){const k={};if(l.app.O().Y){for(const z of Kqq)y.hasOwnProperty(z)&&(k[z]=y[z]);if(l=k.qoe_cat)y="",typeof l==="string"&&l.length>0&&(y=l.split(",").filter(z=>g0y.includes(z)).join(",")),k.qoe_cat=y;
pt4(k)}else for(const z of E0y)y.hasOwnProperty(z)&&(k[z]=y[z]);return k};
jh_=function(l){return l?f44[l]||5:5};
S1_=function(l){B(l,"getInternalApiInterface",l.getInternalApiInterface);B(l,"getTrustedApi",l.getTrustedApi);B(l,"addEventListener",l.D);B(l,"removeEventListener",l.va);B(l,"cueVideoByPlayerVars",l.b0);B(l,"loadVideoByPlayerVars",l.jN);B(l,"preloadVideoByPlayerVars",l.O1);B(l,"getAdState",l.getAdState);B(l,"sendAbandonmentPing",l.sendAbandonmentPing);B(l,"setLoopRange",l.setLoopRange);B(l,"getLoopRange",l.getLoopRange);B(l,"setAutonavState",l.setAutonavState);B(l,"seekTo",l.I4);B(l,"seekBy",l.zA);
B(l,"seekToLiveHead",l.seekToLiveHead);B(l,"requestSeekToWallTimeSeconds",l.requestSeekToWallTimeSeconds);B(l,"seekToStreamTime",l.seekToStreamTime);B(l,"prefetchKeyPlay",l.prefetchKeyPlay);B(l,"startSeekCsiAction",l.startSeekCsiAction);B(l,"getStreamTimeOffset",l.getStreamTimeOffset);B(l,"isOrchestrationLeader",l.isOrchestrationLeader);B(l,"getVideoData",l.g4);B(l,"setInlinePreview",l.setInlinePreview);B(l,"getAppState",l.getAppState);B(l,"updateLastActiveTime",l.updateLastActiveTime);B(l,"setBlackout",
l.setBlackout);B(l,"setUserEngagement",l.setUserEngagement);B(l,"updateSubtitlesUserSettings",l.updateSubtitlesUserSettings);B(l,"getPresentingPlayerType",l.N);B(l,"canPlayType",l.canPlayType);B(l,"updatePlaylist",l.updatePlaylist);B(l,"updateVideoData",l.updateVideoData);B(l,"updateEnvironmentData",l.updateEnvironmentData);B(l,"sendVideoStatsEngageEvent",l.kK);B(l,"productsInVideoVisibilityUpdated",l.productsInVideoVisibilityUpdated);B(l,"setSafetyMode",l.setSafetyMode);B(l,"isAtLiveHead",y=>l.isAtLiveHead(void 0,
y));
B(l,"getVideoAspectRatio",l.getVideoAspectRatio);B(l,"getPreferredQuality",l.getPreferredQuality);B(l,"getPlaybackQualityLabel",l.getPlaybackQualityLabel);B(l,"setPlaybackQualityRange",l.Ak);B(l,"onAdUxClicked",l.onAdUxClicked);B(l,"getFeedbackProductData",l.getFeedbackProductData);B(l,"getStoryboardFrame",l.getStoryboardFrame);B(l,"getStoryboardFrameIndex",l.getStoryboardFrameIndex);B(l,"getStoryboardLevel",l.getStoryboardLevel);B(l,"getNumberOfStoryboardLevels",l.getNumberOfStoryboardLevels);B(l,
"getCaptionWindowContainerId",l.getCaptionWindowContainerId);B(l,"getAvailableQualityLabels",l.getAvailableQualityLabels);B(l,"addCueRange",l.addCueRange);B(l,"addUtcCueRange",l.addUtcCueRange);B(l,"showAirplayPicker",l.showAirplayPicker);B(l,"dispatchReduxAction",l.dispatchReduxAction);B(l,"getPlayerResponse",l.Oj);B(l,"getWatchNextResponse",l.SN);B(l,"getHeartbeatResponse",l.mK);B(l,"getCurrentTime",l.rb);B(l,"getDuration",l.g1);B(l,"getPlayerState",l.getPlayerState);B(l,"getPlayerStateObject",
l.kz);B(l,"getVideoLoadedFraction",l.getVideoLoadedFraction);B(l,"getProgressState",l.getProgressState);B(l,"getVolume",l.getVolume);B(l,"setVolume",l.LM);B(l,"isMuted",l.isMuted);B(l,"mute",l.K6);B(l,"unMute",l.dt);B(l,"loadModule",l.loadModule);B(l,"unloadModule",l.unloadModule);B(l,"getOption",l.xv);B(l,"getOptions",l.getOptions);B(l,"setOption",l.setOption);B(l,"loadVideoById",l.t_);B(l,"loadVideoByUrl",l.WK);B(l,"playVideo",l.Ro);B(l,"loadPlaylist",l.loadPlaylist);B(l,"nextVideo",l.nextVideo);
B(l,"previousVideo",l.previousVideo);B(l,"playVideoAt",l.playVideoAt);B(l,"getDebugText",l.getDebugText);B(l,"getWebPlayerContextConfig",l.getWebPlayerContextConfig);B(l,"notifyShortsAdSwipeEvent",l.notifyShortsAdSwipeEvent);B(l,"getVideoContentRect",l.getVideoContentRect);B(l,"setSqueezeback",l.setSqueezeback);B(l,"toggleSubtitlesOn",l.toggleSubtitlesOn);B(l,"isSubtitlesOn",l.isSubtitlesOn);B(l,"getAudioTrack",l.Ja);B(l,"setAudioTrack",l.hk);B(l,"getAvailableAudioTracks",l.HG);B(l,"reportPlaybackIssue",
l.reportPlaybackIssue);B(l,"setAutonav",l.setAutonav);B(l,"isNotServable",l.isNotServable);B(l,"channelSubscribed",l.channelSubscribed);B(l,"channelUnsubscribed",l.channelUnsubscribed);B(l,"togglePictureInPicture",l.togglePictureInPicture);B(l,"supportsGaplessAudio",l.supportsGaplessAudio);B(l,"supportsGaplessShorts",l.supportsGaplessShorts);B(l,"isGaplessTransitionReady",l.isGaplessTransitionReady);B(l,"enqueueVideoByPlayerVars",y=>void l.enqueueVideoByPlayerVars(y));
B(l,"clearQueue",l.clearQueue);B(l,"getMaxPlaybackQuality",l.getMaxPlaybackQuality);B(l,"getUserPlaybackQualityPreference",l.getUserPlaybackQualityPreference);B(l,"getSubtitlesUserSettings",l.getSubtitlesUserSettings);B(l,"resetSubtitlesUserSettings",l.resetSubtitlesUserSettings);B(l,"setMinimized",l.setMinimized);B(l,"setOverlayVisibility",l.setOverlayVisibility);B(l,"confirmYpcRental",l.confirmYpcRental);B(l,"queueNextVideo",l.queueNextVideo);B(l,"handleExternalCall",l.handleExternalCall);B(l,"logApiCall",
l.logApiCall);B(l,"isExternalMethodAvailable",l.isExternalMethodAvailable);B(l,"setScreenLayer",l.setScreenLayer);B(l,"getCurrentPlaylistSequence",l.getCurrentPlaylistSequence);B(l,"getPlaylistSequenceForTime",l.getPlaylistSequenceForTime);B(l,"shouldSendVisibilityState",l.shouldSendVisibilityState);B(l,"syncVolume",l.syncVolume);B(l,"highlightSettingsMenuItem",l.highlightSettingsMenuItem);B(l,"openSettingsMenuItem",l.openSettingsMenuItem);B(l,"getEmbeddedPlayerResponse",l.getEmbeddedPlayerResponse);
B(l,"getVisibilityState",l.getVisibilityState);B(l,"isMutedByMutedAutoplay",l.isMutedByMutedAutoplay);B(l,"isMutedByEmbedsMutedAutoplay",l.isMutedByEmbedsMutedAutoplay);B(l,"setGlobalCrop",l.setGlobalCrop);B(l,"setInternalSize",l.setInternalSize);B(l,"setFauxFullscreen",l.setFauxFullscreen);B(l,"setAppFullscreen",l.setAppFullscreen);B(l,"isKeyboardDisabled",l.isKeyboardDisabled)};
q1=function(l,y,k){l=g.mn(l.As(),y);return k?(k.addOnDisposeCallback(l),null):l};
g.Wl=function(l,y,k){return l.app.O().T7?y:g.Ts("$DESCRIPTION ($SHORTCUT)",{DESCRIPTION:y,SHORTCUT:k})};
n0Q=function(l){l.As().element.setAttribute("aria-live","polite")};
g.Io=function(l,y){l.getPresentingPlayerType()===3?l.publish("mdxautoplaycancel"):g.G3(l,"onAutonavCancelled",y)};
g.T3=function(l){l=l.r4();const y=l.R4.get("endscreen");return y&&y.wz()?!0:l.hg()};
g.Pl=function(l){const y=Vi(l.r4());return l.app.gP&&!l.isFullscreen()||l.getPresentingPlayerType()===3&&y&&y.hasNext()&&y.hasPrevious()||!!l.getPlaylist()};
g.JI=function(l,y){g.UB(l,"addEmbedsConversionTrackingParams",[y])};
g.EH=function(l){return(l=g.Yk(l.r4()))?l.UW():{}};
g.Fq_=function(l){l=(l=l.getVideoData())&&l.C;return!!l&&!(!l.audio||!l.video)&&l.mimeType!=="application/x-mpegURL"};
g.pi=function(l,y,k){l=l.Yz().element;let z=CR(l.children,r=>{r=Number(r.getAttribute("data-layer"));return k-r||1});
z<0&&(z=-(z+1));Mj(l,y,z);y.setAttribute("data-layer",String(k))};
g.Ki=function(l){const y=l.O();if(!y.q_)return!1;const k=l.getVideoData();if(!k||l.getPresentingPlayerType()===3)return!1;var z=(!k.isLiveDefaultBroadcast||y.X("allow_poltergust_autoplay"))&&!k.Ja();z=k.isLivePlayback&&(!y.X("allow_live_autoplay")||!z);const r=k.isLivePlayback&&y.X("allow_live_autoplay_on_mweb");l=l.getPlaylist();l=!!l&&l.hasNext();var Z=k.sj&&k.sj.playerOverlays||null;Z=!!(Z&&Z.playerOverlayRenderer&&Z.playerOverlayRenderer.autoplay);Z=k.Wn&&Z;return!k.ypcPreview&&(!z||r)&&!g.ro(k.dP,
"ypc")&&!l&&(!g.u9(y)||Z)};
NdP=function(l,y){l=o05(l.app.yu().S);for(const k of l){l=k.getAvailableAudioTracks();let z=null;for(const r of l)if(r.getLanguageInfo().getId()===y){z=r;break}z&&k.LR(z,!0)}};
EB=function(){gu||(gu=new she);return gu};
fi=function(l,y){y?l.requestHeaders.Authorization=`Bearer ${y}`:delete l.requestHeaders.Authorization};
jS=function(l){const y=l.L.getRootNode();return l.L.X("web_watch_pip")||l.L.X("web_shorts_pip")?HZ(y):document};
LqC=function(l){l.sourceElement&&(document.activeElement&&g.cf(l.element,document.activeElement)&&l.sourceElement.focus(),l.sourceElement.setAttribute("aria-expanded","false"),l.sourceElement=void 0);l.J.C();l.S=void 0};
SS=function(l,y,k){l.aH()?l.Xv():l.Bn(y,k)};
g.ni=function(l={},y=[],k=!1,z=!1){y.push("ytp-menuitem");"role"in l||(l.role="menuitem");k||"tabindex"in l||(l.tabindex="0");l={U:k?"a":"div",L_:y,G:l,W:[{U:"div",B:"ytp-menuitem-icon",Nd:"{{icon}}"},{U:"div",B:"ytp-menuitem-label",Nd:"{{label}}"},{U:"div",B:"ytp-menuitem-content",Nd:"{{content}}"}]};z&&l.W.push({U:"div",B:"ytp-menuitem-secondary-icon",Nd:"{{secondaryIcon}}"});return l};
g.F5=function(l,y){l.updateValue("label",y)};
oo=function(l){return l?g.$b(l):""};
sB=function(l,y,k,z){y in l.Z||(k=new g.N1(k,z,{id:y,priority:2,namespace:"appad"}),l.api.Wa([k],1),l.Z[y]=k)};
Li=function(l,y){v0g(l,y).then(k=>{g.Eb(y,void 0,void 0,k)})};
vl=function(l,y){y.forEach(k=>{Li(l,k)})};
DxP=function(l,y,k){if(!(k in y))return!1;y=y[k];Array.isArray(y)||(y=[y]);for(const z of y)y={CPN:l.api.getVideoData().clientPlaybackNonce},y=g.TB(z,y),g.Eb(y,void 0,M6(XV(y,BdC),y,!1,"Active View 3rd Party Integration URL")||M6(XV(y,HkC),y,!1,"Google/YouTube Brand Lift URL")||M6(XV(y,RWq),y,!1,"Nielsen OCR URL"));return!0};
v0g=function(l,y){return g.dU(l.api.O())&&xu(y)&&F8(y)?g.jz(l.api.O(),l.api.getVideoData().S()).then(k=>{let z;k&&(z={Authorization:`Bearer ${k}`});return z},void 0):k9()};
lTz=function(l){const y=!l.O().Q9&&l.getPresentingPlayerType()!==3;return l.isFullscreen()||y};
g.Bl=function(l,y,k=!1,z){const r=l.currentTarget;if(!k&&g.ne(l))return l.preventDefault(),!0;y.pauseVideo();l=r.getAttribute("href");g.BW(l,z,!0);return!1};
g.Hl=function(l,y,k){if(Wn(y.O())&&y.getPresentingPlayerType()!==2){if(g.ne(k))return y.isFullscreen()&&!y.O().externalFullscreen&&y.toggleFullscreen(),k.preventDefault(),!0}else{const z=g.ne(k);z&&y.pauseVideo();g.BW(l,void 0,!0);z&&(g.HW(l),k.preventDefault())}return!1};
yNs=function(l){l=Ro.includes("vi")?l.X("delhi_modern_web_player_icons")?h4():{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,G:{d:"M11,11 C9.89,11 9,11.9 9,13 L9,23 C9,24.1 9.89,25 11,25 L25,25 C26.1,25 27,24.1 27,23 L27,13 C27,11.9 26.1,11 25,11 L11,11 Z M17,17 L15.5,17 L15.5,16.5 L13.5,16.5 L13.5,19.5 L15.5,19.5 L15.5,19 L17,19 L17,20 C17,20.55 16.55,21 16,21 L13,21 C12.45,21 12,20.55 12,20 L12,16 C12,15.45 12.45,15 13,15 L16,15 C16.55,15 17,15.45 17,16 L17,17 L17,17 Z M24,17 L22.5,17 L22.5,16.5 L20.5,16.5 L20.5,19.5 L22.5,19.5 L22.5,19 L24,19 L24,20 C24,20.55 23.55,21 23,21 L20,21 C19.45,21 19,20.55 19,20 L19,16 C19,15.45 19.45,15 20,15 L23,15 C23.55,15 24,15.45 24,16 L24,17 L24,17 Z",
fill:"#fff"}}]}:l.X("delhi_modern_web_player_icons")?Hrz():{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,G:{d:"M11,11 C9.9,11 9,11.9 9,13 L9,23 C9,24.1 9.9,25 11,25 L25,25 C26.1,25 27,24.1 27,23 L27,13 C27,11.9 26.1,11 25,11 L11,11 Z M11,17 L14,17 L14,19 L11,19 L11,17 L11,17 Z M20,23 L11,23 L11,21 L20,21 L20,23 L20,23 Z M25,23 L22,23 L22,21 L25,21 L25,23 L25,23 Z M25,19 L16,19 L16,17 L25,17 L25,19 L25,19 Z",fill:"#fff"}}]};l.B="ytp-subtitles-button-icon";
return l};
kHq=function(l){return Ro.includes("vi")?l?h4():{U:"svg",G:{height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M6,14v-4c0-0.55,.45-1,1-1h3c0.55,0,1,.45,1,1v1H9.5v-0.5h-2v3h2V13H11v1c0,.55-0.45,1-1,1H7C6.45,15,6,14.55,6,14z            M14,15h3c0.55,0,1-0.45,1-1v-1h-1.5v0.5h-2v-3h2V11H18v-1c0-0.55-0.45-1-1-1h-3c-0.55,0-1,.45-1,1v4C13,14.55,13.45,15,14,15z            M20,4H4v16h16V4 M21,3v18H3V3.01C3,3,3,3,3.01,3H21L21,3z",fill:"white"}}]}:l?{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",
width:"24"},W:[{U:"path",G:{d:"M21.20 3.01L21 3H3L2.79 3.01C2.30 3.06 1.84 3.29 1.51 3.65C1.18 4.02 .99 4.50 1 5V19L1.01 19.20C1.05 19.66 1.26 20.08 1.58 20.41C1.91 20.73 2.33 20.94 2.79 20.99L3 21H21L21.20 20.98C21.66 20.94 22.08 20.73 22.41 20.41C22.73 20.08 22.94 19.66 22.99 19.20L23 19V5C23.00 4.50 22.81 4.02 22.48 3.65C22.15 3.29 21.69 3.06 21.20 3.01ZM3 19V5H21V19H3ZM8 11H6C5.73 11 5.48 11.10 5.29 11.29C5.10 11.48 5 11.73 5 12C5 12.26 5.10 12.51 5.29 12.70C5.48 12.89 5.73 13 6 13H8C8.26 13 8.51 12.89 8.70 12.70C8.89 12.51 9 12.26 9 12C9 11.73 8.89 11.48 8.70 11.29C8.51 11.10 8.26 11 8 11ZM18 11H12C11.73 11 11.48 11.10 11.29 11.29C11.10 11.48 11 11.73 11 12C11 12.26 11.10 12.51 11.29 12.70C11.48 12.89 11.73 13 12 13H18C18.26 13 18.51 12.89 18.70 12.70C18.89 12.51 19 12.26 19 12C19 11.73 18.89 11.48 18.70 11.29C18.51 11.10 18.26 11 18 11ZM18 15H16C15.73 15 15.48 15.10 15.29 15.29C15.10 15.48 15 15.73 15 16C15 16.26 15.10 16.51 15.29 16.70C15.48 16.89 15.73 17 16 17H18C18.26 17 18.51 16.89 18.70 16.70C18.89 16.51 19 16.26 19 16C19 15.73 18.89 15.48 18.70 15.29C18.51 15.10 18.26 15 18 15ZM12 15H6C5.73 15 5.48 15.10 5.29 15.29C5.10 15.48 5 15.73 5 16C5 16.26 5.10 16.51 5.29 16.70C5.48 16.89 5.73 17 6 17H12C12.26 17 12.51 16.89 12.70 16.70C12.89 16.51 13 16.26 13 16C13 15.73 12.89 15.48 12.70 15.29C12.51 15.10 12.26 15 12 15Z",
fill:"white"}}]}:{U:"svg",G:{height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M5,11h2v2H5V11z M15,15H5v2h10V15z M19,15h-2v2h2V15z M19,11H9v2h10V11z M22,6H2v14h20V6z M3,7h18v12H3V7z",fill:"white"}}]}};
DK=function(){return{U:"div",B:"ytp-spinner-container",W:[{U:"div",B:"ytp-spinner-rotator",W:[{U:"div",B:"ytp-spinner-left",W:[{U:"div",B:"ytp-spinner-circle"}]},{U:"div",B:"ytp-spinner-right",W:[{U:"div",B:"ytp-spinner-circle"}]}]}]}};
lo=function(l){if(document.createRange){const y=document.createRange();y&&(y.selectNodeContents(l),l=window.getSelection())&&(l.removeAllRanges(),l.addRange(y))}};
z3C=function(l,y){const k=y.getAudioTrack();return k.id!=="und"?g.oC(l,z=>z.a7?.name===k.getLanguageInfo().name):l};
rNQ=function(l,y){return y.getUserAudio51Preference()?g.oC(l,y1):l};
ZMz=function(l){return l.map(y=>new FP(y.id,"application/x-mpegURL",{a7:y.a7}))};
e3q=function(l){return g.Ay("yt-player-drc-pref")?g.oC(l,k_):l};
ANC=function(l){return R7s()===2?g.oC(l,zu):l};
$HC=function(l){return D9T()===1?g.oC(l,rW):l};
rW=function(l){return l.audio?.audioQuality==="AUDIO_QUALITY_HIGH"&&!y1(l)};
k_=function(l){return l.audio?.Z===!0};
y1=function(l){return l.S()};
Qi4=function(l){return l.a7!==void 0};
zu=function(l){return l.audio?.C===!0};
ZV=function(l,y){if(l.length<2)return!1;const k=y(l[0]);return l.some(z=>y(z)!==k)};
tLQ=function(l,y){l=new Set(l.map(y));l.delete(void 0);return l.size>=2};
OMz=function(l){return l.L.O().X("web_player_autonav_use_server_provided_state")&&l.hs().hc()};
dHz=function(l){l.isChecked=l.isChecked;l.qd("ytp-autonav-toggle-button").setAttribute("aria-checked",String(l.isChecked));const y=l.isChecked?"Ch\u1ebf \u0111\u1ed9 t\u1ef1 \u0111\u1ed9ng ph\u00e1t \u0111ang b\u1eadt":"Ch\u1ebf \u0111\u1ed9 t\u1ef1 \u0111\u1ed9ng ph\u00e1t \u0111ang t\u1eaft";l.L.O().X("player_tooltip_data_title_killswitch")?l.update({title:y,label:y}):l.update({"data-tooltip-title":y,label:y});l.L.W1()};
h3z=function(l){l.menuItem||(l.menuItem=new wKz(l.api),g.x(l,l.menuItem),l.menuItem.Aa(l.Z))};
GHC=function(l){var y=l.api.X("delhi_modern_web_player_compact_controls"),k=g.i_(l.api.O().experiments,"delhi_modern_web_player_responsive_compact_controls_threshold"),z=y||k>0&&l.api.getPlayerSize().width<=k;y=l.api.getRootNode();y.classList.toggle("ytp-delhi-modern-compact-controls",z);k=z?"40px":"48px";const r=z?"8px":"12px",Z=z?"56px":"72px",e=z?"56px":"64px";let A=z?"48px":"56px",Q=z?"12px":"20px";z=z?"72px":"96px";l.api.X("delhi_modern_web_player_big_mode_consistent_pill_height")&&(A="56px",
Q="12px",z="80px");y.style.setProperty("--yt-delhi-pill-height",k);y.style.setProperty("--yt-delhi-pill-top-height",r);y.style.setProperty("--yt-delhi-bottom-controls-height",Z);y.style.setProperty("--yt-delhi-bottom-controls-height-xsmall-width-mode",e);y.style.setProperty("--yt-delhi-big-mode-pill-height",A);y.style.setProperty("--yt-delhi-big-mode-pill-top-height",Q);y.style.setProperty("--yt-delhi-big-mode-bottom-controls-height",z)};
aT4=function(l,y){for(const k of y){y=Number(k.playbackPosition?.utcTimeMillis)/1E3;const z=`embargo_${y}`;l.api.addUtcCueRange(z,y,y+Number(k.duration?.seconds),"embargo",!1);k.onEnter&&(l.Z[z]=k.onEnter.filter(l.C))}};
UH_=function(l){var y=l.api.getRootNode();y=l.api.getWebPlayerContextConfig().embedsEnableEmc3ds?y.parentElement?.parentElement||y:y;l.Z=new iMQ(y,k=>{k!=null&&(l.api.O().TZ=k,l.api.O().tb="EMBEDDED_PLAYER_VISIBILITY_FRACTION_SOURCE_INTERSECTION_OBSERVER")});
g.x(l,l.Z);l.events.j(l.api,"videoStatsPingCreated",k=>{var z=l.Z;z=z.Z==null?null:Math.round(z.Z*100)/100;k.inview=z!=null?z:void 0;z=l.api.getPlayerSize();if(z.height>0&&z.width>0){z=[Math.round(z.width),Math.round(z.height)];const r=g.gU();r>1&&z.push(r);z=z.join(":")}else z=void 0;k.size=z})};
ML5=function(l){return(l?.messageRenderers||[]).find(y=>!!y.timeCounterRenderer)?.timeCounterRenderer||null};
XK4=function(l){var y=Math,k=y.round;const z=Math.min((0,g.f)()-l.N,l.C);y=k.call(y,(l.C-z)/1E3);l.updateValue("duration",Hm({seconds:y}));y<=0&&l.Z?l.stopTimer():l.Z&&l.Z.start()};
cN5=function(l,y){l.Z||(l.C=y,l.N=(0,g.f)(),l.Z=new g.sj(()=>{XK4(l)},null),XK4(l))};
bMq=function(l,y){let k=0;for(k=0;k<y.length;k++){let z=l.Z[k],r=z?.element;r||(r=new g.H({U:"button",B:"ytp-gated-actions-overlay-button",G:{tabindex:"0"},W:[{U:"div",B:"ytp-gated-actions-overlay-button-title",Nd:"{{buttonText}}"}]}),g.x(l,r),r.Uj(l.C),z={element:r});const Z=g.E(y[k],Ctz);r.update({buttonText:Z?.title||Z?.titleFormatted?.content||""});z.listener&&r.uq(z.listener);z.listener=r.listen("click",()=>{const e=g.E(Z?.onTap,Ji);e&&g.G3(l.api,"innertubeCommand",e)});
l.Z[k]=z}for(;k<l.Z.length;)l.Z.pop().element.dispose()};
eV=function(l,y,k,z){function r(e){const A=!(e.status!==204&&e.status!==200&&!e.response);e={succ:`${+A}`,rc:e.status,lb:e.response?.byteLength||0,rt:((0,g.f)()-Z).toFixed(),shost:g.$7(l),trigger:y};usP(e,l);k&&k(e);z&&!A&&z(new g.Gr("pathprobe.net",e))}
const Z=(0,g.f)();g.o3(l,{format:"RAW",responseType:"arraybuffer",timeout:1E4,onFinish:r,onTimeout:r})};
usP=function(l,y){window.performance?.getEntriesByName&&(y=performance.getEntriesByName(y))&&y.length&&(y=y[0],l.pedns=(y.domainLookupEnd-y.startTime).toFixed(),l.pecon=(y.connectEnd-y.domainLookupEnd).toFixed(),l.perqs=(y.requestStart-y.connectEnd).toFixed())};
$_=function(l){return AJ(l.o7,!l.policy.LS,l.policy.Qk)};
xH_=function(l,y){const k=Math.min(2.5,Q1(l.o7));l=$_(l);return y-k*l};
mHg=function(l,y,k){return Math.ceil(Math.max(Math.max(l.policy.TZ,l.policy.ma*k),Math.min(Math.min(l.policy.u0,31*k),Math.ceil(y*k))))||l.policy.TZ};
tJ=function(l,y,k,z,r=!1){if(l.policy.fD)return Math.ceil(l.policy.fD*y);l.policy.Ng&&(z=Math.abs(z));z/=l.playbackRate;let Z;Z=1/AJ(l.o7);k=Math.max(.9*(z-3),Q1(l.o7)+l.o7.C.Z*Z)/Z*.8/(y+k);k=Math.min(k,z);l.policy.U7>0&&r&&(k=Math.max(k,l.policy.U7));return mHg(l,k,y)};
O2=function(l){return $_(l)/l.playbackRate};
dW=function(l,y,k){const z=l.policy.playbackStartPolicy.resumeMinReadaheadPolicy||[],r=l.policy.playbackStartPolicy.startMinReadaheadPolicy||[];l=Infinity;y=y&&z.length>0?z:r;for(const Z of y)y=Z.minReadaheadMs||0,k<(Z.minBandwidthBytesPerSec||0)||l>y&&(l=y);return l<Infinity?l/1E3:l};
ITC=function(l,y,k,z,r){if(!z.info.N)return k.length===0?k.push(z):(l=k.pop()?.S(z))?k.push(l):k.push(z),r;(k=k.pop()?.S(z))||(k=z);if(k.info.Z)return l.logger&&l.logger({incompleteSegment:k.info.rY()}),r;const {formatId:Z,n_:e,startTimeMs:A,clipId:Q,Ys:t}=l.EQ(k);z={clipId:Q,formatId:Z,startTimeMs:A,durationMs:t,oF:e,Da:e};r=q5g(y,z.startTimeMs);k=r>=0?y[r]:null;var O;if(O=k){O=z;var d=r,w=k.startTimeMs+k.durationMs,h=O.startTimeMs+O.durationMs;if(O.startTimeMs-w>l.Z)O=!1;else if(WVq(l,k.formatId,
O.formatId))k.durationMs=Math.max(w,h)-k.startTimeMs,k.Da=Math.max(k.Da,O.Da),O=!0;else if(Math.abs(k.startTimeMs-O.startTimeMs)<=l.Z)if(k.durationMs>O.durationMs+l.Z){d=k.formatId;var U=k.oF,u=k.Da;k.formatId=O.formatId;k.durationMs=O.durationMs;k.oF=O.oF;k.Da=O.Da;O.formatId=d;O.startTimeMs=h;O.durationMs=w-h;O.oF=U;O.Da=u;O=!1}else k.formatId=O.formatId,O=!0;else w>O.startTimeMs&&(w>h&&(y.splice(d+1,0,{formatId:k.formatId,startTimeMs:h,durationMs:w-h,oF:O.Da+1,Da:k.Da}),l.logger&&l.logger({splitOldStart:k.startTimeMs?.toFixed(3),
splitOldEnd:w?.toFixed(3),splitNewStart:O.startTimeMs?.toFixed(3),splitNewEnd:h?.toFixed(3)})),k.durationMs=O.startTimeMs-k.startTimeMs,k.Da=O.oF-1),O=!1}O?z=k:(r+=1,y.splice(r,0,z));k=0;for(O=r+1;O<y.length;O++){w=l;h=y[O];d=z;U=h.startTimeMs+h.durationMs;u=d.startTimeMs+d.durationMs;u>=U+w.Z?w=!0:u+w.Z<h.startTimeMs?w=!1:WVq(w,h.formatId,d.formatId)?(d.durationMs=U-d.startTimeMs,d.Da=h.Da,w=!0):(h.startTimeMs=u,h.oF=d.Da+1,w=!1);if(!w)break;k++}k&&y.splice(r+1,k);return r};
q5g=function(l,y){l=g.cO(l,{startTimeMs:y},(k,z)=>k.startTimeMs-z.startTimeMs);
return l>=0?l:-l-2};
TVy=function(l,y,k){if(l.logger){var z=[];for(let r=0;r<y.length;r++){const Z=y[r];Z.rI?.startTicks&&z.push(`i.${Z.formatId?.itag}_st.${Z.startTimeMs}_psst.${Z.rI?.startTicks}_psd.${Z.rI?.rQ}`);z.push(`i.${Z.formatId?.itag}_st.${Z.startTimeMs}_e.${Z.startTimeMs+Z.durationMs}_d.${Z.durationMs}_sn.${Z.oF}_en.${Z.Da}`)}l.logger({p:`${k}`,br:z.join(";")})}};
VL_=function(l,y){if(l.i5){var k=l.i5.Za();if(k.length!==0){if(l.N&&y){var z=l.N,r=z.info.V;!D4(k,r)&&z.info.A>0&&(0,g.f)()-l.A<5E3&&(l.logger&&l.logger({dend:z.info.rY()}),k=RfC(k,r,r+.01))}l.policy.Tw&&l.logger&&l.logger({cbri:`${l.C}`});z=[];for(var Z=r=0;r<k.length&&Z<l.U1.length;){var e=k.start(r);let d=k.end(r);var A=l.U1[Z].startTimeMs/1E3;const w=(l.U1[Z].startTimeMs+l.U1[Z].durationMs)/1E3;if(A<=d&&w>=e){const h={...l.U1[Z]};var Q=l.Ej.V.get(I9(l.U1[Z].formatId)),t=Math.max(A,e);e=Q.index.NL(t+
l.Z/1E3);A=Q.index.getStartTime(e);var O=e+ +(Math.abs(A-t)>l.Z/1E3);t=O+l.V;O=Q.index.getStartTime(O)*1E3;Z!==l.C||y?(h.oF=t,h.startTimeMs=O):(l.logger&&l.logger({pEvict:"1",og:h.startTimeMs,adj:A*1E3}),h.oF=e+l.V,h.startTimeMs=A*1E3);e=l.N?.info.duration||11;Z===l.C&&d<w&&w-d<=e*1.01&&(d=w);e=Math.min(w,d);A=Q.index.NL(e-l.Z/1E3);t=Q.index.uU(A);A-=+(Math.abs(t-e)>l.Z/1E3);e=A+l.V;Q=Q.index.uU(A)*1E3;h.Da=e;h.durationMs=Q-h.startTimeMs;h.oF<=h.Da&&z.push(h)}w<d?Z+=1:r+=1}l.U1=z}}};
PtP=function(l){const y=[],k=[...l.vz];l.U1.forEach(Z=>{y.push({...Z})});
const z=l.HG.fW();let r=l.C;for(const Z of z)r=ITC(l,y,k,Z,r);y.forEach(Z=>{Z.startTimeMs&&(Z.startTimeMs+=l.timestampOffset*1E3)});
return{U1:y,vz:k}};
WVq=function(l,y,k){return y.itag!==k.itag||y.xtags!==k.xtags?!1:l.Ej.UA||y.lmt===k.lmt};
pKq=function(l,y,k,z,r){if(!y.oR.Z()){if(!(r=k===0||!!y.C.length&&y.C[0]instanceof wW))a:{if(y.C.length&&(r=y.C[0],r instanceof hJ&&r.zV&&r.Oo)){r=!0;break a}r=!1}r||l.policy.Z||Gu(y);return k}const Z=aM(y,k);if(!isNaN(Z))return Z;if(l.loader.E8(k*1E3))return k;r.qQ?l.policy.nj&&(l=io(l.loader,y),JNQ(y.N,k+l,!0)):(y.YF(),l.loader.fB(!1,`sta_${+y.oR.info.a9()}`));return z&&(l=lt(z.Za(),k),!isNaN(l))?(U2(y,l+Y5e,r),k):U2(y,k,r)};
KVz=function(l,y,k){if(!l.policy.S){l=y.oR.index;var z=y.Z.n_;l.CK(z)||k&&k.n_===z?(y.V=!l.CK(z),y.Y=!l.CK(z)):(y.V=!0,y.Y=!0)}};
EXy=function(l){const y=Math.max(l.videoTrack.N.N||0,l.audioTrack.N.N||0);gXs(l.videoTrack);gXs(l.audioTrack);l.policy.S||fzC(l.Ej);l.Ej.isManifestless&&!l.policy.S&&(l.Z=!0,l.C=0);var k=l.loader;if(!k.policy.C_||k.policy.xz)k.currentTime=y;l.V=!0;l.N=new fA;return l.N};
cw=function(l){var y=l.videoTrack.J!==-1,k=l.audioTrack.J!==-1;if(!y||!k)if(y=!y&&Mk(l.videoTrack),k=!k&&Mk(l.audioTrack),y||k)if(k=y?l.videoTrack:l.audioTrack,y=y?l.audioTrack:l.videoTrack,k.J=Mk(k).info.n_,l.policy.S&&(y.J=Mk(y)?.info.b0()||y.J),y.J!==-1){let z=Math.max(y.oR.index.getStartTime(y.J),k.oR.index.getStartTime(k.J));J6(l.Ej)&&Math.abs(z-J6(l.Ej))>432E3&&SoP(l.Ej);l.C&&(z=l.C,l.C=0);g.o4(()=>{l.policy.S||Xe(l,z,102)});
l.loader.Md("initManifestlessSync",{st:z,ost:z+l.loader.w4(),a:l.audioTrack.J,v:l.videoTrack.J});l.N&&(l.N.resolve(z+.1),l.N=null);l.policy.S&&Xe(l,z,102)}};
fTC=function(l,y,k){if(!l.isSeeking())return-1;k=(k?l.videoTrack:l.audioTrack).oR.index;const z=k.NL(l.targetTime);return(k.CK(l.Ej.Vi)||y.n_===l.Ej.Vi)&&z<l.Ej.Vi?l.Ej.dY():-1};
Xe=function(l,y,k){l.Z&&l.videoTrack.J!==-1&&l.audioTrack.J!==-1&&(l.Z=!1,l.targetTime=y,CX(l.loader,y+.1,{zf:!0,gY:"chunkSelectorSynchronize",Q0:!0,seekSource:k}))};
jis=function(l,y,k,z){if(l.policy.S)!z||!l.Z&&l.policy.kz||g.o4(()=>{cw(l)});
else{if(l.isSeeking()&&l.targetTime){const Z=fTC(l,y,k);if(Z!==-1){l.videoTrack.V=!1;l.audioTrack.V=!1;l.Z=!0;l.C=0;g.o4(()=>{l.loader.Md("seekreason",{reason:"behindMinSq",tgt:Z});Xe(l,Z)});
return}}k?l.videoTrack.Y=!1:l.audioTrack.Y=!1;var r=!l.Z;aM(l.videoTrack,l.targetTime)>=0&&aM(l.audioTrack,l.targetTime)>=0&&r?((l.videoTrack.V||l.audioTrack.V)&&l.loader.Md("iterativeSeeking",{status:"done",count:l.seekCount}),l.videoTrack.V=!1,l.audioTrack.V=!1):z&&g.o4(()=>{if(l.Z||!l.policy.kz)cw(l);else{var Z=y.startTime,e=y.duration;if(!l.policy.S){var A=l.videoTrack.J!==-1&&l.audioTrack.J!==-1,Q=!l.videoTrack.Y&&!l.audioTrack.Y;(k?l.videoTrack.V:l.audioTrack.V)&&A&&Q&&(l.targetTime>=Z&&l.targetTime<
Z+e+.1?((k?l.videoTrack:l.audioTrack).V=!1,l.videoTrack.V||l.audioTrack.V||(l.loader.Md("iterativeSeeking",{status:"done",target:Z,originalTime:Z+l.loader.w4(),count:l.seekCount}),l.seekCount=0)):l.seekCount<8?(l.seekCount++,l.loader.Md("iterativeSeeking",{status:"inprogress",count:l.seekCount,target:l.targetTime,actual:Z,duration:e,isVideo:k}),l.seek(l.targetTime,{})):(l.loader.Md("iterativeSeeking",{status:"incomplete",count:l.seekCount,target:l.targetTime,actual:Z}),l.seekCount=0,l.videoTrack.V=
!1,l.audioTrack.V=!1,CX(l.loader,Z+.1,{zf:!0,gY:"chunkSelectorSynchronizeMedia",Q0:!0})))}}})}};
bo=function(l,y,k){S54(l.o7,y);l.PG&&(l.PG.add(Math.ceil(y)-Math.ceil(l.K)),l.PG.add(Math.max(0,Math.ceil(k/1024)-Math.ceil(l.V/1024))));const z=y-l.K,r=k-l.V;l.S2=r;l.hv=Math.max(l.hv,r/(z+.01)*1E3);l.K=y;l.V=k;l.u0&&k>l.u0&&nXC(l)};
nXC=function(l){l.Xr=Math.max(l.Xr,l.V-l.Cf);l.RR=Math.max(l.RR,l.K-l.O1);l.u0=0};
FVs=function(l,y){l.url=y;window.performance&&!performance.onresourcetimingbufferfull&&(performance.onresourcetimingbufferfull=()=>{performance.clearResourceTimings()})};
oXy=function(l){l.rb=l.Z+l.snapshot.delay*1E3;l.BF=!1};
x_=function(l,y,k){if(!l.eP){y=Math.max(y,.01);var z=l.SE?Math.max(y,k/l.SE):y,r=l.o7.C.N;r&&(z=y,l.SE&&(z=Math.max(y,k/l.SE*r)));uo(l.o7,y,k,z)}};
NVg=function(l){const y=l.mK||l.gb;return y?l.snapshot.delay+Math.min(l.rq,(l.Y-l.b0)/1E3)+y:l.TJ};
siq=function(l){return(l.A-l.Z)/1E3};
mo=function(l,y){if(l.PZ&&l.n_!==void 0&&l.MV!==void 0){var k=Math,z=k.min,r=l.S;var Z=l.PZ;var e=l.Z;if(LVy(Z,l.n_))Z=y;else{var A=0;Z.C2&&(A=.2);Z=e+(Z.rq+A)*1E3}l.S=z.call(k,r,Z);k=Math;z=k.min;r=l.C_;Z=l.PZ;e=l.Z;A=vXz(Z,l.n_,l.MV);A!==2&&(y=A?y:e+Z.rq*1E3,Z.C2&&(y+=Z.rq*1E3));l.C_=z.call(k,r,y);l.S<=l.Z?oXy(l):(l.rb=l.S,l.BF=!0)}};
PO=function(l,y,k){var z=y^l;if((l&103)==l){for(var r=z^8077,Z=[];++r-Z[G[2]]-(z^8173);){switch(r){case z^8086:r=z^8161;continue;case z^8118:r=z^8076;break;case z^8076:r-=z^8159;continue;case z^8183:r=z^8109;continue;case z^8163:r=z^8082}Z[G[z^8151]](String[G[z^8072]](r))}var e=Z}if((l-5^6)>=l&&(l-3^31)<l){r=k[G[z^6786]](G[z^6784]);Z={};for(let Q=0;Q<r[G[2]];Q++)var A=VL(z^6801,z^5058,r,Q,Z);e=Z}if((l<<2&16)<8&&l<<2>=-69){try{k[z^2022]>=-3&&(0,k[z^1992])((0,k[z^1959])(k[z^1986],k[z^2007]),k[z^2021],
(0,k[z^2004])(k[z^1984],k[z^1999]),k[new Date(G[z^2013])/(z^1024)],(0,k[z^1991])(k[z^2021],k[z^2002]),k[z^1993],k[z^1952]),k[5]!=3?(0,k[z^2007])((0,k[z^2021])(k[z^2009],k[z^2040]),k[z^2010],k[z^2008],k[z^1959]):((0,k[z^1988])(k[z^2017],k[z^1962]),k[z^1999])(k[z^1958],k[6])}catch(Q){(0,k[new Date(G[z^2005])/(z^1024)])(k[z^1989],k[z^1959]),(0,k[z^2004])(k[new Date(G[z^1987])/(z^1024)],k[z^2022])}try{k[1]!==-6&&(0,k[z^1988])(k[z^2018],k[z^1998])}catch(Q){(0,k[z^2042])((0,k[z^1997])(),k[z^1991],k[z^1976])}finally{k[2]!=
(z^2018)&&(k[z^1955]>3&&((0,k[z^2037])(k[z^2004],k[z^2012]),G[z^1990])||(0,k[z^2016])(k[z^1991],k[new Date(G[z^2041])/(z^1024)])),k[z^1996]!=-2&&(0,k[z^1994])((0,k[z^2010])(((0,k[z^2037])(k[3],k[z^1967]),k[z^2043])(k[z^1985],k[z^2004]),k[z^2043],k[z^1986],k[new Date(G[z^1989])/(z^1024)]),k[z^2037],((0,k[z^2010])((0,k[z^2021])(k[5],k[z^2015]),k[z^1988],k[z^1990]),k[z^2019])(k[z^1990],k[z^2E3]),k[3],k[z^2021])}try{r=x2(1,z^2976,k)}catch(Q){r=mv(z^1962,z^5835,k,Date)}e=[]}return e};
BVs=function(l,y){if(y+1<=l.totalLength){var k=c5(l,y);k=k<128?1:k<192?2:k<224?3:k<240?4:5}else k=0;if(k<1||!(y+k<=l.totalLength))return[-1,y];if(k===1)l=c5(l,y++);else if(k===2)k=c5(l,y++),l=c5(l,y++),l=(k&63)+64*l;else if(k===3){k=c5(l,y++);var z=c5(l,y++);l=c5(l,y++);l=(k&31)+32*(z+256*l)}else if(k===4){k=c5(l,y++);z=c5(l,y++);const r=c5(l,y++);l=c5(l,y++);l=(k&15)+16*(z+256*(r+256*l))}else k=y+1,l.focus(k),Un(l,k,4)?l=gcC(l).getUint32(k-l.N,!0):(z=c5(l,k+2)+256*c5(l,k+3),l=c5(l,k)+256*(c5(l,k+
1)+256*z)),y+=5;return[l,y]};
HMC=function(l){return g.He(l.info.cF,y=>y.type===3)};
DQ_=async function(l,y){return y?(new hA(l.C)).encrypt(y,l.Z):y};
zPs=async function(l,y){return y?await (new hA(l.C)).decrypt(y,l.Z):y};
R35=function(l){l.N.read().then(l.K,l.onError).then(void 0,qM)};
qk=function(l,y,k,z,r){if(ux(1,5756,l.Ww))return new DHC(l,k);l=l.wZ();return z?SYT()?new lhq(l,y,k,r):new yCy(l,y,k,r):new khP(l,k,r)};
Ww=function(l,y,k){l.Z&&(aG(l.Z,y),y=l.Z,l.Z=null);let z=0,r=0;for(const Q of l.cF){if(Q.range&&z+Q.C<=l.C){z+=Q.C;continue}if(KV(Q)&&!k&&l.C+y.totalLength-r<z+Q.C){({iG:l.Z}=y.split(r));break}a:{var Z=l;var e=Q,A=l.C-z;let t=y.totalLength-r;e.range&&(t=Math.min(e.C-A,t));e=CMQ(e,e.Z+A,t,e.range?e.Z+A+t===e.range.length:!!k);A=il(y,r,t);e=new kp(e,A);if(Z.policy.useUmp&&Z.Af.length&&(A=Z.Af[Z.Af.length-1].S(e))){Z.Af[Z.Af.length-1]=A;Z=t;break a}Z.Af.push(e);Z=t}l.C+=Z;r+=Z;z+=Q.C;if(r===y.totalLength)break}};
IM=function(l){return cy(l.V,wQ(9,4138,l.gZ.Ww))};
zks=function(l){l.pP.C_=(0,g.f)();l=IM(l);l.N=(0,g.f)();l.started+=1};
rCP=function(l,y,k,z){l.timing.PF((0,g.f)(),y,k);y=l.pP;y.C=0;y.J=0;y.A=0;CV(IM(l));z&&(z=IM(l),z.C+=1);l.i_?.C_(l.gZ.Ww)};
Tu=function(l){if(l.lastError==="ump.spsrejectfailure")l.timing.sj||df4(l.pP,!1,l.gZ,l.policy,l.V);else{if(l.lastError==="net.timeout")l.timing.WG((0,g.f)());else{var y=l.timing;bo(y,(0,g.f)(),y.V)}if(l.lastError==="net.nocontent")++l.pP.A;else{if((y=l.lastError==="net.timeout"||l.lastError==="net.connect"||l.lastError==="net.closed")&&!ux(19,5742,l.gZ.Ww)){var k=IM(l);k.timedOut+=1}else k=IM(l),k.Z+=1;l.timing.sj||df4(l.pP,y,l.gZ,l.policy,l.V)}}l.BG.IU(5)};
V1=function(l,y,k,z=!1,r=!1){return y>=400?(l.lastError="net.badstatus",!0):r?(l.lastError="ump.spsrejectfailure",!0):k||z?!1:(l.lastError=y===204?"net.nocontent":"net.connect",!0)};
Pw=function(l,y){if(l.policy.S$)return!1;const k=y.getResponseHeader("content-type"),z=y.UQ();l=!z||z<=l.policy.fR;return(!y.iA()||!k||k.indexOf("text/plain")!==-1)&&l};
x2=function(l,y,k,z,r,Z,e,A,Q,t){var O=y^l;var d;if(((l^4)&15)==2&&k[G[2]]!=0){var w=mv(24,3275,z,k);z=w[0]}(l|56)==l&&k[G[12]]&&(w=pR(69,588,k));(l<<1&7)>=5&&(l>>1&10)<2&&(d=z(r,Z,e,A,Q,t));(l&29)==l&&(k[O^3174]<(O^3150)&&(k[2]<-2||((0,k[O^3173])(k[1]),0))&&(0,k[O^3078])(k[O^3157],k[1]),(0,k[O^3077])(k[O^3175]),(0,k[6])(k[3],k[O^3083]),d=[]);return d};
Z0T=function(l,y){let k="";y=y.r$();y.totalLength<=l.policy.fR&&(l=MB(y),l=bl(l),k=qR(l)?l:"");return k};
ekC=function(l){const y=l.timing.D();y.shost=wQ(9,4138,l.gZ.Ww);l.policy.Cp&&l.policy.MS&&(y.csrc=1);return y};
ACs=function(l,y){return l?.maxWidth>y?.maxWidth||l?.maxHeight>y?.maxHeight};
$es=function(l,y){for(const k of y.keys()){const z=y.get(k);if(z.length===0)continue;g.b2(z,(e,A)=>A.maxFramerate-e.maxFramerate);
const r=[z[0]];let Z=0;for(let e=1;e<z.length;e++)ACs(z[e],r[Z])&&(r.push(z[e]),Z++);l=l.concat(r)}return l};
taC=function(l,y){const k=[];for(const z of y)y=Q5q[z]||0,l.Z&&y>l.Z||k.push(z);return k};
JJ=function(l,y,k){let z=O05[l]||[];k.X("html5_shorts_onesie_mismatched_fix")&&(z=deQ[l]||[]);y.push(...z);k.X("html5_early_media_for_drm")&&y.push(...(w3t[l]||[]))};
MaT=function(l,y){const k=g.j2(l);var z=l.O();const r=z.J;z=z.X("html5_shorts_onesie_mismatched_fix");const Z=l.yf();if(z){if(!r.Z){if(Z&&Y_)return Y_;if(pX)return pX}}else if(pX&&!r.Z)return pX;const e=[],A=[],Q={};var t=KX.concat(hk4);z&&(t=KX.concat(Ght));l.X("html5_early_media_for_drm")&&(t=t.concat(ah4),l.X("allow_vp9_1080p_mq_enc")&&t.push(i05));const O=[...Uez];l.X("html5_iamf_audio_onesie_fmt")&&O.push(["773"]);for(var d of t){t=!1;for(const h of d){var w=nA(h,Z&&z);if(!w||!w.video)continue;
if(w.Z()&&!k.Ja&&w.video.qualityOrdinal>k.IF)continue;const U=g.i_(l.O().experiments,"html5_drm_byterate_soft_cap");if(U>0&&va4(w)&&w.CP>U)continue;if(t){e.push(h);JJ(h,e,l);continue}w=J$(k,w,r);w===!0?(t=!0,e.push(h),JJ(h,e,l)):Q[h]=w}}for(const h of O)for(const U of h){d=jGe(U);if(!d||!d.audio||!l.X("html5_onesie_51_audio")&&d.S())continue;d=J$(k,d,r);if(d===!0){A.push(U);JJ(U,A,l);break}else Q[U]=d}if(!l.X("html5_enable_audio_quality_setting")){l=["141","774"];for(const h of l)A.includes(h)&&(g.Ap(A,
h),Q[h]="blkhqa")}k.Z&&y("orfmts",Q);if(z)return r.Z&&(r.Z=!1,Y_=pX=void 0),Z?Y_={video:e,audio:A}:pX={video:e,audio:A};pX={video:e,audio:A};r.Z=!1;return pX};
g.C$T=function(l,y,k){const z=k.J,r=[],Z=[];var e=k.X("html5_shorts_onesie_mismatched_fix");l=l.yf();var A=KX.concat(hk4);e&&(A=KX.concat(Ght));k.X("html5_early_media_for_drm")&&(A=A.concat(ah4),k.X("allow_vp9_1080p_mq_enc")&&A.push(i05));const Q=[...Uez];k.X("html5_iamf_audio_onesie_fmt")&&Q.push(["773"]);for(const t of A)for(const O of t){A=nA(O,l&&e);if(!A||!A.video)continue;const d=g.i_(k.experiments,"html5_drm_byterate_soft_cap");if(!(d>0&&va4(A)&&A.CP>d)&&J$(y,A,z)===!0){r.push({videoCodec:X3P[i9[O]],
maxWidth:A.video.width,maxHeight:A.video.height,maxFramerate:A.video.fps});break}}for(const t of Q)for(const O of t)if((e=jGe(O))&&e.audio&&(k.X("html5_onesie_51_audio")||!e.S())&&J$(y,e,z)===!0){Z.push({audioCodec:cCP[i9[O]],numChannels:e.audio.numChannels});break}return{videoFormatCapabilities:r,audioFormatCapabilities:Z}};
mes=function(l){const y={};var k=l.Zr;const z=l.Qj,r=l.o7,Z=k.getVideoData();var e=aE(0);var A=k.getVisibilityState();z.X("html5_enable_audio_quality_setting")&&(y.HB=z.HB);e&&(y.f8=e,y.lastManualDirection=NCC(),e=BPP()||0,e>0&&(e=(z.X("html5_use_date_now_for_local_storage")?Date.now():(0,g.f)())-e,z.X("html5_use_date_now_for_local_storage")?e>0&&(y.timeSinceLastManualFormatSelectionMs=e):y.timeSinceLastManualFormatSelectionMs=e));if(r.C_||z.X("html5_sabr_ugc_vod_web_embedded_client_default_bandwidth_on_iphone")&&
us)e=z.X("html5_disable_bandwidth_cofactors_for_sabr_live")?!!l.rZ?.LS:!1,y.Jn=AJ(r,!e);var Q=g.pk.medium,t=Math.floor(Q*16/9);(e=Z.yf())||(Z.Z&&Z.N&&Z.N.videoInfos.length!==0?(e=Z.N.videoInfos[0],e=!!e.video&&e.video.width<e.video.height):e=!1);var O=e;e=O?Q:t;t=O?t:Q;O=k.sW();Q=O.width;O=O.height;y.AJ=Math.max(Q,e);y.ym=Math.max(O,t);z.X("html5_enable_client_viewport_size_logging")&&z.yM()&&(e=k.F1(),k.Md("cvw",{w:Q,h:O,cvw:y.AJ,cvh:y.ym,cvu:e.Z}));y.visibility=A;y.Kz=hW();y.C0=k.o2()*1E3;A=l.Zr.JG();
y.BY={defaultPolicy:A?.tJ?.Z||0,smooth:A?.ZB?.Z||0,visibility:A?.VA?.Z||0,Nw:A?.NF?.Z||0,performance:A?.C7?.Z||0,speed:A?.bB?.Z||0};y.Qd=A?.ox?.Z||0;l.eQ&&Z.SN&&Z.X("html5_allow_multiview_tile_preload")&&(y.Qd=g.pk.small);if(l.eQ||l.C9&&!l.IW)A=Number(z.sA().Z.G7(b0Q))||0,A>0&&(y.Qd===0||y.Qd>A)&&(y.Qd=A,k.Md("lsl",{q:A}));A=(z.X("html5_fix_drm_license_constraint_for_tv_and_onesie")?l.eQ:Z.fetchType==="onesie")||Z.Ac?[{trackType:1,isHdr:!1},{trackType:2,isHdr:!1},{trackType:2,isHdr:!0},{trackType:3,
isHdr:!1},{trackType:3,isHdr:!0},{trackType:4,isHdr:!1},{trackType:4,isHdr:!0},{trackType:5,isHdr:!1},{trackType:5,isHdr:!0}]:[{trackType:1,isHdr:!1},{trackType:2,isHdr:!1},{trackType:2,isHdr:!0}];y.k6=l.authorizedFormats&&l.authorizedFormats.length>0?{authorizedFormats:l.authorizedFormats}:{authorizedFormats:A};l.sabrLicenseConstraint&&(y.k6.sabrLicenseConstraint=l.sabrLicenseConstraint);if(z.X("html5_onesie_media_capabilities")||LN(Z))y.e6=3;z.X("html5_onesie_audio_only_playback")&&gH(Z)&&(y.e6=
1);l.rZ?.hj&&l.aP&&(y.e6=y.e6===void 0?7:y.e6|4);A=Z.xz?Z.xz:g.j2(Z);z.X("html5_onesie_media_capabilities")&&(y.mediaCapabilities=g.C$T(Z,A,z));if(l.rZ?.PG()){t=l.mR;O=l.Ee;var d=l.rZ?.CP;e=[];Q=[];const W=new Map;var w=Z.Ky.Z;for(var h of w.values())if(h.a9)Q.push({audioCodec:cCP[h.Dr],numChannels:h.numChannels,spatialCapabilityBitmask:ude[h.Dr]});else{w=X3P[h.Dr];var U=h.maxBitrateBps||0,u=d?d*8:0;U={videoCodec:w,maxWidth:O?854:h.maxWidth||0,maxHeight:O?480:h.maxHeight||0,maxFramerate:h.maxFramerate||
0,is10BitSupported:h.sH||!1,maxBitrateBps:u&&U?Math.min(u,U):u||U,efficient:!0};w=`${w}_${h.sH}`;u=W.get(w)||[];u.push(U);W.set(w,u)}e=$es(e,W);h=t?[...t]:[];Z.X("html5_ssff_denylist_opus_low")&&h.push(249,350);g.j2(Z);y.mediaCapabilities={videoFormatCapabilities:e,audioFormatCapabilities:Q,hdrModeBitmask:3,perPlaybackAttributes:h.length?{itagDenylist:h}:{}}}l.rZ?.Z&&(y.uS=A.uS,y.IF=l.rZ?.IF);z.Fg&&(y.Wg=z.Fg);y.r5=l.nL;y.XA=l.XA;y.ge=l.ge;y.uX=l.uX;l.bF&&(y.BX=(0,g.f)()-l.bF);l.xr&&(y.xr=l.xr);MC||
(y.qr=!0);h=Q1(r)*1E3;h>0&&(y.nG=h);l.rZ?.oy&&l.Is&&l.Is<Infinity&&(y.Is=l.Is);k=k.getPlaybackRate();k!==1&&(y.playbackRate=k);l.rZ?.SN&&l.wD&&(y.Rw=l.Rw,y.RK=l.RK,y.wD=l.wD);iY()===1&&(y.FI=1);z.X("html5_sabr_force_proxima")&&(y.ju=1);k=g.i_(z.experiments,"html5_sabr_force_max_network_interruption_duration_ms");y.Th=k>0?k:r.interruptions[0]||0;l.rZ?.hv&&(y.Ld=l.Ld);z.mK&&(y.audioTrackId=z.mK);Z.RY()&&!y.audioTrackId&&(z.X("html5_fill_default_mosaic_audio_track_id")||(l=YHt(Z),y.audioTrackId=l),Z?.Md("misstrkchg",
{"default":y.audioTrackId}));if(l=navigator.connection?.type||"")y.detailedNetworkType=xeq[l]||xeq.other;!z.X("html5_enable_voice_boost")||Z.yf()||Z.isAd()||(y.Jz=z.qg);return y};
gW=function(l,y,k,z,r,Z,e){const A={};y&&(A.q3=y);if(!l)return A;A.playbackCookie=k?.playbackCookie;r&&(A.RL=r);A.mx=[];A.VF=[];if(e?.size)for(const Q of e.values())A.VF.push(Q);if(l.sabrContextUpdates.size>0)for(const Q of l.sabrContextUpdates.values())q75(A,Q,z);Kc(l)&&Z&&q75(A,Z,z);y=l.O().Z;A.clientInfo={clientName:W6C[y.c.toUpperCase()]||0};y.cbrand&&(A.clientInfo.deviceMake=y.cbrand);y.cmodel&&(A.clientInfo.deviceModel=y.cmodel);y.cver&&(A.clientInfo.clientVersion=y.cver);y.cos&&(A.clientInfo.osName=
y.cos);y.cosver&&(A.clientInfo.osVersion=y.cosver);y=l.O();y.X("html5_sabr_enable_server_xtag_selection")&&y.hj&&(A.clientInfo.hl=y.hj);l.lS&&(A.lS=l.lS);return A};
q75=function(l,y,k){const z=y.type||0;k?.has(z)?l.VF.push(y):l.mx.push(z)};
IhP=function(l){if(!(Fg(l.info)&&l.info.Ae()&&l.policy.Cf&&l.H0)||l.info.pP.C>=2||aE()>0||!HaQ())return!1;var y=l.gZ.get("aitags");if(!y)return!1;y=ii(y).split(",");const k=[];for(const z of l.H0)g.ro(y,z)&&k.push(z);if(!k.length)return!1;l.gZ.set("altitags",g.am(k.join(",")));return!0};
Ti4=function(l,y,k=!1){g.n(y);l.RU.lastError="player.exception";l.errorMessage=`${y.name}_${y.message}`;k?g.o4(()=>{Tu(l.RU)}):Tu(l.RU)};
VaQ=function(l){l.Rk&&(l.xhr.status=l.Rk,l.I9=l.Rk)};
P$C=function(l,y){l.timing.sj=!0;l.xhr.iA()&&l.timing.Ja();l.policy.BF&&l.J$?.stop();Ww(l.N4,y,!1)};
JCy=function(l,y,k){let z=l.SE?Math.max(y,k/l.SE):y;const r=l.o7.C.N;r&&(z=y,l.SE&&(z=Math.max(y,k/l.SE*r)));uo(l.o7,y,k,z)};
Y7t=function(l,y,k,z,r,Z){l.C_&&(l.C_.add(Math.round(y)),l.C_.add(Math.round(k)),l.C_.add(Math.round(z)),l.C_.add(Math.round(r)),l.C_.add(Math.round(Z)),l.C_.add(Math.round(l.BF)))};
p3_=function(l,y,k){switch(y){case 68:l.yB(k);break;case 35:l.XP(k);break;case 44:l.tR(k);break;case 43:l.cA(k);break;case 53:l.Df(k);break;case 56:l.zg();break;case 57:l.wp(k);break;case 42:l.xI(k);break;case 45:l.gD(k);break;case 59:l.Tg(k);break;case 51:l.YS(k);break;case 49:l.ZR(k);break;case 50:l.Gg(k);break;case 47:l.Wt(k);break;case 58:l.RD(k);break;case 61:l.wV(k);break;case 66:l.Ms(k);break;case 46:l.kS(k);break;case 67:l.onSnackbarMessage(k);break;case 71:y=Vo(k,EaC),l.BG.xR(y)}};
K6y=function(l){E2=l};
gtz=function(l,y,k){l.lq.get(y).onProgress=k};
fX=function(l,y){l.gA(y)&&(E2?l.lq.get(y).fS.clear():l.lq.get(y).Af=new IG,l.C(y),l.V=!0)};
Etz=function(l){for(const [y,k]of l.lq){const z=y;k.xW||fX(l,z)}};
fhe=function(l,y){l=l.lq.get(y);if(!l)return 0;y=0;if(l.cF.length>0){for(const k of l.cF)y+=k.range?.length||0;return y}if(l.Bt.length>0)for(const k of l.Bt)y+=k.uR||0;return y+l.HK};
jV=function(l,y){if(E2){let k=0;l=l.lq.get(y);if(!l?.fS)return 0;for(const z of l.fS.values())k+=z.data.totalLength;return k}return l.lq.get(y)?.Af.J()||0};
SV=function(l,y){l=l.lq.get(y);if(E2){if(!l?.xW)return!1;y=l.fS.size>0;return l.u_.length>0||y}return!!l?.xW&&!!l?.Af.J()};
j5t=function(l,y){const k=l.lq.get(y),z=fhe(l,y),r=!z&&!!k.bytesReceived;if(E2){if(l.Ej?.UA){for(var Z of k.fS.values())if(!Z.bT)return!1;return r}}else if(Z=l.cU(y),r&&l.N&&Z!==void 0)return Z;return(r||k.bytesReceived===z)&&k.N1+jV(l,y)===k.bytesReceived};
nX=function(l,y,k,z){y=S7z(l,y,k);k=k.eZ;z.cF.push(...y);if(E2)z.Nl.has(k)||z.Nl.set(k,[]),z.Nl.get(k).push(...y);else if(z.N4)for(const r of y)z.N4.cF.push(r);else z.N4=new nt4(l.rZ,[...z.cF]),l.rZ?.Wi&&g.x(l,z.N4);return y};
S7z=function(l,y,k){const z=l.Ej?.V.get(y);if(!z)return[];if(k.NH)return z.K(0,k.clipId)?.cF||[];if(z.N()){var r=k.startMs,Z=k.durationMs,e=1E3;l.rZ?.Z&&k.timeRange&&(r=k.timeRange.startTicks??-1,Z=k.timeRange.rQ??-1,e=k.timeRange.timescale??-1);if(k.bY<0||k.ke<0||Z<0||r<0||k.uR<0||e<0)return fX(l,y),[];l=JQ(k.bY,k.uR);y=k.f6||0;return[new jd(3,z,l,"makeSliceInfosMediaBytes",k.ke-1,r/e,Z/e,y,l.length-y,void 0,k.WV,k.clipId)]}if(k.ke<0)return fX(l,y),[];if(l.Ej?.UA)return Z=z.GZ,e=Z*z.info.CP,y=k.f6,
l.rZ?.Z&&l.S.Kc()!=="ONESIE"&&k.timeRange&&!y&&(r=k.timeRange.startTicks/k.timeRange.timescale),[new jd(3,z,void 0,"makeSliceInfosMediaBytes",k.ke,r,Z,y,e,!0,k.WV,k.clipId)];if(l.rZ?.oY&&z instanceof h6){if(!z.Z())return l.lq.get(y).VW.set(k.eZ,k),[];k=k.ke-1;l=z.index.getStartTime(k);r=z.index.getDuration(k);return[new jd(3,z,void 0,"makeSliceInfosMediaBytes",k,l,r,0,r*z.info.CP)]}return[]};
Jp=function(l,y,k,z){var r=y^l;if((l+5^10)<l&&(l+6^27)>=l){x2(r^1901,r^7501,k);var Z=g.nR(k[G[5]],Zaq)}(l&61)==l&&z[G[2]]!=0&&(k=(k%z[G[2]]+z[G[2]])%z[G[2]],z[G[22]](0,1,z[G[22]](k,1,z[0])[0]));if(l>>1>=16&&l>>1<29){var e;x2(r^8471,r^15159,k);(e=k[G[5]][G[r^8477]]||null)&&(e=ux(r^8482,r^8713,e,k));Z=[]}(l+5&46)<l&&(l-1^32)>=l&&(Z=encodeURIComponent(k));return Z};
F6y=function(l,y,k){l.Ej=y;l.rZ=k;for(const [z,r]of l.lq){y=z;k=r;for(const Z of k.hE)nX(l,y,Z,k)}};
otC=function(l){return l.Xj()&&!l.nt};
NiP=function(l){l.policy.XR&&l.eA&&!l.sV?l.sV=!0:l.Fz.Ja()};
s5s=function(l,y){let k=-1,z=-1,r=-1;if(l.xL?.items)for(const Z of l.xL.items)y<Z.R3||Z.R3<k||(k=Z.R3,z=Z.If,r=Z.minReadaheadMs);return{xQ:k,If:z,vr:r}};
Fe=function(l){l.Y||(l.Y=(0,g.f)(),g.TH("mb_s",l.Y,l.Z))};
L6_=function(l){l.sj||(l.sj=(0,g.f)(),g.TH("ovfs_rp",l.sj,l.Z))};
vtC=function(l){l.b0||(l.b0=(0,g.f)(),g.TH("oafs_rp",l.b0,l.Z))};
Biq=function(l,y,k){const z=y instanceof oM&&!l.N&&!l.C,r=!l.N&&k?.info.video;k=!l.C&&k?.info.audio;y.state===3?((r||z)&&l.tick("vrr"),(k||z)&&l.tick("arr")):y.state===4?r?(l.N=y.wZ(),g.bw(),xF(4)):k&&(l.C=y.wZ()):y instanceof hJ&&y.MQ()&&r&&(g.bw(),xF(4))};
Nk=function(l,y,k){l.C!==y&&(l.Md("sdai",{setsst:y,old:l.C,r:k}),l.C=y)};
Rke=function(l,y,k,z=!0){if(!l.policy.Ky){if(k&&!l.Ja.has(y.n_)){var r=y.startTime,Z=[];for(var e=0;e<k.Z.length;e++){var A=k.Z[e],Q=r;r=Q+k.C[e];Z.push({startTime:Q,endTime:r,adCpn:A})}l.Ja.set(y.n_,Z)}l.policy.Fg&&(r=l.D&&y.n_===l.D.n_+1,l.D=y,Z=l.Z&&y.n_===l.Z.n_+1,Z=l.Z&&r&&Z&&l.Z.eI.event!=="stop"&&l.Z.eI.event!=="predictStart",e=y.eI||null,A=l.videoTrack.oR.index.x3(),A=y.n_>=A,Q=l.Ej.isManifestless,e?(l.Z?.eI.event==="predictStart"&&l.Z.n_<y.n_&&e.event==="stop"&&l.loader.handleError("ssdai.missingstartcueevent",
{lastpredict:l.Z?.n_||0,csq:y.n_},0),l.Z={eI:e,n_:y.n_,zQ:!!k,q4:z},A?s2(l,e,y.n_):Q&&(r?Z?s2(l,e,y.n_):e.event==="continue"||e.event==="stop"?H05(l,y):s2(l,e,y.n_):s2(l,e,y.n_))):(Z&&H05(l,y),l.C===4&&Nk(l,5,"qend")))}};
ySy=function(l,y,k,z,r){y!==l.Z?.n_||l.C===1||z||l.Z.eI.event==="predictStart"||l.Md("sdai",{undecevt:1,sq:y,mt:k,evt:l.Z.eI.event},!0);y>l.J&&(l.J=NaN,l.S=NaN);if(l.Z&&l.Z.n_===y){if(z=l.Z,!l.policy.J||!l.policy.C)if(r&&z){var Z=z.eI,e=r.rN(Z);Z.event==="predictStart"&&(l.Y=y);l.Md("sdai",{onqevt:Z.event,sq:y,mt:k,gab:e,cst:Z.startSecs,cueid:l.policy.Pc&&(e||Z.event==="start")?Z.identifier:void 0},!0);e?Z.event!=="predictStart"?(Z.event==="start"&&l.Y===y-1&&l.Md("sdai",{gabonstart:y}),z.zQ?Nk(l,
4,"cue"):(l.J=y,l.S=k,l.Md("sdai",{joinad:l.C,sg:l.J,st:l.S.toFixed(3)}),l.A=Date.now(),Nk(l,2,l.C===3?"staftpred":"join"),De5(r,z.eI))):(e=lGT(l),y+=Math.max(Math.ceil(-Z.Z/e),1),Z=Math.floor(k-Z.Z/1E3),l.policy.C?l.N=Z:l.V=y,l.Md("sdai",{onpred:k,estsq:y,estmt:Z.toFixed(3)}),LX(l.loader,Z,Z,y,e),l.A=Date.now(),Nk(l,3,"predict"),De5(r,z.eI)):l.C===1?l.m8?.T1(k)?(LX(l.loader,k,k,y),Nk(l,4,"sk2head")):Nk(l,5,"nogab"):Z.event==="predictStart"&&(l.policy.C&&l.N>0?(k=Math.floor(k-Z.Z/1E3),l.N!==k&&l.Md("sdai",
{updateSt:k,old:l.N}),l.N=k):l.V>0&&(k=y+Math.max(Math.ceil(-Z.Z/lGT(l)),1),l.V!==k&&(l.Md("sdai",{updateSt:k,old:l.V}),l.V=k)))}else l.Md("sdai",{nulldec:1,sq:y,mt:k.toFixed(3),evt:z?.eI?.event||"none"})}else l.C===1&&Nk(l,5,"noad")};
vw=function(l,y,k){return(k<0||k===l.J)&&!isNaN(l.S)?l.S:y};
s2=function(l,y,k){y.startSecs+=isNaN(l.K)?0:l.K;jIz(l.Ej,y,k)};
H05=function(l,y){if(l.Z){var k=l.Z.eI.yK-(y.startTime+l.K-l.Z.eI.startSecs);k<=0||(k=new v6(l.Z.eI.startSecs-(isNaN(l.K)?0:l.K),k,l.Z.eI.context,l.Z.eI.identifier,"stop",l.Z.eI.Z+y.duration*1E3),l.Md("cuepointdiscontinuity",{segNum:y.n_}),s2(l,k,y.n_))}};
lGT=function(l){switch(l.policy.latencyClass){case "LOW":return 2E3;case "ULTRALOW":return 1E3;default:return 5E3}};
Bw=function(l,y,k,z=!1){z?Nk(l,1,"seek"):y>0&&Math.abs(y-k)>=5&&l.C===4&&Nk(l,5,"sk2t")};
kVy=function(l){if(!l)return"unknown";switch(l){case 5:return"predictStart";case 1:return"start";case 2:return"continue";case 3:return"stop";case 6:return"prefetch";default:return"unknown"}};
Hw=function(l,y){return y?l.policy.Z$&&y.tileContext?`${y.identifier};${y.tileContext}`:y.identifier:""};
z54=function(l,y){let k=-(y.eI?.VQ||0);y.timeRange&&(k+=(y.timeRange.startTicks||0)/(y.timeRange.timescale||1));return new v6(k,y.eI?.wm||0,y.eI?.iD||"",y.eI?.identifier||"",kVy(y.eI?.event),(y.eI?.VQ||0)*1E3,l.policy.Z$?y.tileContext:void 0)};
rSy=function(l){switch(l){case 1:return"timeout";case 2:return"ratecontrol";case 3:return"sverr";case 4:return"deleted";case 5:return"waiting";case 6:return"ready";case 7:return"ssdisabled";default:return"unknown"}};
Zw5=function(l,y){let k="";const z=[];for(const [r,Z]of l.Z.entries()){const e=r,A=Z;A?.startTimeSecs<=y&&y<=A?.startTimeSecs+A?.yK&&z.push(e);k+=`${e}:${A?.startTimeSecs.toFixed(3)}:${A?.yK.toFixed(3)};`}z.length===0&&l.Md("clsdai",{no_cid:1,mt:y.toFixed(3),adConfigMap:k.substring(0,1024)});return z};
e5C=function(l,y,k=!1){k&&(l.S=!0);++l.J;k=6E4*2**l.J;k=(0,g.f)()+k;l.V.set(y.info.id,k)};
RM=function(l){for(const [y,k]of l.V.entries()){const z=y;k<(0,g.f)()&&l.V.delete(z)}return l.V};
DV=function(l,y){l.Z!==y&&(l.Z=y,l.N=!0)};
ASQ=function(l,y){let k=null;if(l.policy.St){let z=[];if(y){const r=g.Dg(l.C.C,Z=>Z.id===y);
if(r&&r.a7){const Z=r.a7.id;z=g.oC(l.C.C,e=>e.a7?.id===Z)}}z.length===0&&(z=g.oC(l.C.C,r=>!!r.a7?.isDefault),y&&l.Md("iaf",{id:y,
sid:z[0]?.id}));z.length>0&&(k=g.Dg(z,r=>r.audio.Z===l.policy.qO)||z[0])}else y&&(k=g.Dg(l.C.C,z=>z.id===y)),k||(k=g.Dg(l.C.C,z=>!!z.a7?.isDefault),y&&l.Md("iaf",{id:y,
sid:k?.id}));return k};
lG=function(l){if(!l.C||!l.policy.V&&!l.C.info.a7){var y=l.S.C;l.C&&(y=y.filter(z=>z.audio.Z===l.C.info.audio.Z),y.length||(y=l.S.C));
l.C=l.Ej.Z[y[0].id];if(y.length>1&&!l.policy.f2){if(!l.policy.Pd){var k=g.Dg(y,z=>z.audio.audioQuality!=="AUDIO_QUALITY_HIGH");
k&&(l.C=l.Ej.Z[k.id])}k=!1;if(k=l.policy.jN?!0:l.Z.isLocked()?l.Z.Z<240:$$4(l,l.C))l.C=l.Ej.Z[g.nC(y).id]}}};
ki=function(l,y){l.Z=y;var k=l.S.videoInfos;if(!l.Z.isLocked()){const Z=(0,g.f)();k=g.oC(k,function(e){if(e.CP>this.policy.CP)return!1;const A=this.Ej.Z[e.id];return RM(this.J).get(e.id)>Z||A.pP.C>4||A.Xr>4?!1:this.Ja.has(+e.itag)?!1:!0},l);
l.J.Ee()&&(k=g.oC(k,e=>e.video.width<=854&&e.video.height<=480))}k.length||(k=l.S.videoInfos);
let z=k;l.policy.iR&&(z=QDP(l,z,y));z=g.oC(z,y.V,y);if(l.Z.isLocked()&&l.J.Z){var r=g.Dg(k,Z=>Z.id===l.J.Z);
r?z=[r]:DV(l.J,"")}l.policy.iR||(z=QDP(l,z,y));z.length||(z=[k[0]]);z.sort((Z,e)=>yr(l,Z)-yr(l,e));
for(y=1;y<z.length;y++)k=z[y-1],r=z[y],k.video.width>r.video.width?(g.ef(z,y),y--):yr(l,k)*l.policy.A>yr(l,r)&&(g.ef(z,y-1),y--);y=z[z.length-1];l.mK=!!l.N&&!!l.N.info&&l.N.info.Dr!==y.Dr;l.V=z;l.PG.clear();k=!1;for(r=0;r<z.length;r++)k?l.PG.add(z[r].itag):z[r].video.qualityOrdinal>=1080&&(k=!0);t7P(l.policy,y,l.Ej.UA)};
Owq=function(l){var y=l.policy.Y;const k=O2(l.b0)/y-yr(l,l.C.info);y=g.yL(l.V,function(z){return yr(this,z)<k},l);
y<0&&(y=0);l.A=y;l.nextVideo=l.Ej.Z[l.V[y].id]};
d$P=function(l){l.rb?l.rb=!1:l.D=(0,g.f)();l.C_=!1;l.u0=!1;return new za(l.K,l.N,l.Z.reason)};
GVt=function(l,y,k){ki(l,y);y=ASQ(l.J,k);k||y||(y=wvy(l));y=y||l.S.C[0];l.C=l.Ej.Z[y.id];lG(l);l.K=l.C;Owq(l);l.RR.length&&(l.nextVideo=h5z(l,l.nextVideo,l.S.videoInfos),l.C=h5z(l,l.C,l.S.C));l.N=l.nextVideo;l.K=l.C;return d$P(l)};
aGg=function(l,y){return l.Z.equals(y)&&(!l.J.Z||!l.Z.isLocked()||l.nextVideo?.info.id===l.J.Z)};
rE=function(l){if(!l.nextVideo||!l.policy.V)if(l.Z.isLocked())l.nextVideo=l.Z.Z<=360?l.Ej.Z[l.V[0].id]:l.Ej.Z[g.nC(l.V).id];else{for(var y=Math.min(l.A,l.V.length-1),k=O2(l.b0),z=yr(l,l.C.info),r=k/l.policy.Y-z;y>0&&!(yr(l,l.V[y])<=r);y--);for(k=k/l.policy.A-z;y<l.V.length-1&&!(yr(l,l.V[y+1])>=k);y++);l.nextVideo=l.Ej.Z[l.V[y].id];l.A=y}};
iwP=function(l,y){if(aGg(l,y))return null;if(y.reason==="m"&&y.isLocked())return ki(l,y),l.A=l.V.length-1,lG(l),rE(l),l.Y=l.Y||l.N!==l.nextVideo,l.N=l.nextVideo,new za(l.C,l.N,y.reason);y.reason==="r"&&(l.D=-1);ki(l,y);rE(l);if(y.reason==="r"&&l.nextVideo===l.N)return new za(l.C,l.nextVideo,y.reason);l.N&&l.nextVideo&&yr(l,l.N.info)<yr(l,l.nextVideo.info)&&(y=l.Z.reason,l.C_=l.C_||y==="r"||y==="u"||y==="v");return null};
U$s=function(l,y){if(y.info.video){if(l.N!==y)return l.N=y,d$P(l)}else l.Xr=l.K!==y,l.K=y;return null};
M7C=function(l,y){if(y.oR.info.video&&y.N){const k=(y.Z+y.C)/y.duration,z=y.oR.info.CP;k&&z&&(l.gb.Tk(1,k/z),l.policy.N&&k/z>1.5&&l.loader.Md("overshoot",{sq:y.n_,br:k,max:z}))}};
Z9=function(l,y,k=!1){e5C(l.J,y,k);l.D=-1;ki(l,l.Z)};
Xv_=function(l,y){return new za(l.K,l.N,y||l.Z.reason)};
yr=function(l,y){if(!l.HG[y.id]){var k=l.Ej.Z[y.id].index.m0(l.sj,15);k=y.eX&&l.N&&l.N.index.isLoaded()?k||y.eX:k||y.CP;l.HG[y.id]=k}k=l.HG[y.id];l.PG.has(y.itag)&&(k*=1.5);return k*=Math.max(1,l.gb.B1()||0)};
cS4=function(l,y){const k={};for(const z of y){if(!z||!z.video)continue;y=z.video.qualityOrdinal;const r=k[y],Z=r&&r.Z()&&r.video.qualityOrdinal>l.policy.IF,e=y<=l.policy.IF?z.Z():z.V();if(!r||Z||e)k[y]=z}return k};
QDP=function(l,y,k){const z=k.reason==="m"||k.reason==="s";l.policy.e1&&e$&&g.Km&&(!z||k.Z<1080)&&(y=y.filter(r=>r.video&&(!r.J||r.J.powerEfficient)));
if(y.length>0)if(eL()){const r=cS4(l,y);y=y.filter(Z=>!!Z&&!!Z.video&&Z.Dr===r[Z.video.qualityOrdinal].Dr)}else{const r=y[0]?.video?.qualityOrdinal;
if(r){k=y.filter(e=>!!e&&!!e.video&&e.video.qualityOrdinal===r);
const Z=cS4(l,k)[r].Dr;y=y.filter(e=>!!e&&!!e.video&&e.Dr===Z)}}return y};
wvy=function(l){const y=g.Dg(l.S.C,z=>z.audio.Z),k=g.Dg(l.S.C,z=>!z.audio.Z);
return y?l.policy.qO?y:k:null};
$$4=function(l,y){let k=0;for(;k+1<l.V.length&&l.V[k].video.quality==="tiny";)k++;const z=O2(l.b0)/l.policy.A;return yr(l,y.info)+yr(l,l.V[k])>z};
h5z=function(l,y,k){if(y.info.Dr==="f"||l.RR.includes(TI(y,l.Ej.UA)))return y;for(let z=0;z<k.length;z++){const r=l.Ej.Z[k[z].id];if(!l.RR.includes(TI(r,l.Ej.UA)))continue;const Z=y.info.Dr,e=r.info.Dr;if(Z===e||eL()){if(y.info.video?y.info.C!==r.info.C:y.info.audio.Z!==r.info.audio.Z||y.info.a7?.id!==r.info.a7?.id)return AU(l,{mismatch:"xtag",f:y.info.id,t:r.info.id}),y;AU(l,{f:y.info.itag,t:r.info.itag});l.rb=!0;return r}AU(l,{mismatch:"efficient",fc:Z,tc:e})}AU(l,{mismatch:"unselectable",fmts:l.RR.join(".")});
return y};
AU=function(l,y){l.policy.E9?l.loader.handleError("onesie.fmt.mismatch",y,0):l.loader.Md("ombifa",y)};
C5q=function(l,y){l=Re(l.Ej.Z,k=>k.info.itag===y);
if(!l)throw Error("Itag "+y+" from server not known.");return l};
bwC=function(l){const y=[];if(l.Z.reason==="m"||l.Z.reason==="s")return y;if(Jtz(l.Ej)){for(let k=Math.max(0,l.A-2);k<l.A&&k<l.V.length;k++)y.push(l.V[k].itag);y.reverse()}return y};
u2e=function(l,y){l.bq("ismp_p");l.C=y};
x$e=function(l){l.Z&&(l.Z.dispose(),l.bq("ismp_d"))};
m$P=function({C2:l=!1,iX:y=!1,hX:k=!1}={}){return l?k?3:2:y?-1:1};
$i=function(l,y,k){const z=[];var r=l.track.i5;if(r){r=r.Za();for(var Z=0;Z<r.length;Z++)z.push(Math.round(r.start(Z)*1E3)),z.push(Math.round(r.end(Z)*1E3))}r=1;Z=z.length;if(Z===l.buffered.length){for(var e=0;e<=Z&&z[e]===l.buffered[e];e++);e>Z?r=0:z[e]>l.buffered[e]&&(e===Z-1?r=2:e===Z-2&&z[e+1]>l.buffered[e+1]&&(r=3))}l.Z.add(y<<3|(k&&4)|r);y=Math.ceil(l.track.o2()*1E3);l.Z.add(y-l.J);l.J=y;if(r===1)for(l.Z.add(Z),y=0,e=0;e<Z;e++)l.Z.add(z[e]-y),y=z[e];r===3&&l.Z.add(z[Z-2]-l.buffered[Z-2]);r>=
2&&l.Z.add(z[Z-1]-l.buffered[Z-1]);k&&l.Z.add(k);l.buffered=z};
qNe=function(l){if(l.policy.zA&&l.policy.gS)for(const y of l.policy.zA){const k=g.MK(y),z=+k.clen,r=+k.csz;if(z>0&&r>0&&l.policy.V===k.docid&&l.Z.info.id===k.fmtid&&l.Z.info.lastModified===+k.lmt)return{clen:z,csz:r,ck:k.ck,civ:k.civ}}};
Qr=function(l){return{downloadedEndTime:Math.round(l.Tv?l.Tv.J:0),maxKnownEndTime:Math.round(l.Z.index.nw()),averageByteRate:Math.round(l.Z.info.eX)}};
dE=function(l,y=!1){!y||l.indexRange&&l.initRange&&l.Tv||tU(l,new Og("Woffle: Expect isFinal to always have indexRange and initRange and lastSlice"));y={lmt:l.Z.info.lastModified,docid:l.policy.V,fmtid:l.Z.info.id,type:l.Z.info.mimeType.split(";")[0],csz:l.chunkSize,clen:l.V*l.chunkSize+l.C};l.crypto&&(y.ck=l.K,y.civ=l.S);y="local://localhost/videoplayback?"+a3(y);y={itag:+l.Z.info.itag,mimeType:l.Z.info.mimeType,bitrate:l.Z.info.CP*8,lastModified:String(l.Z.info.lastModified),initRange:l.initRange?.Z(),
indexRange:l.indexRange?.Z(),url:y};var k=l.Z.info.C;k&&(y.xtags=k);if(k=l.Z.info.video)if(y.quality=k.quality,y.qualityLabel=k.qualityLabel,y.width=k.width,y.height=k.height,k=k.fps)y.fps=k;if(l=l.Z.info.audio){if(k=l.sampleRate)y.audioSampleRate=String(k);if(l=l.numChannels)y.audioChannels=l}return y};
wE=function(l,y,k=!1){y.then(z=>{l.C_.delete(y);(k||z===4)&&l.A.resolve(z)},z=>{l.A.reject(z)})};
hU=function(l){return!!l.Tv&&l.Tv.S()};
tU=function(l,y){g.tP(l.policy.V)!==4&&(g.OK(l.policy.V,4),g.WH(y),l.A.reject(new Og(y.message)))};
WZ_=function(l,y){let k=0;const z=MB(y.C);if(l.V<l.N){k=l.N*l.chunkSize-((y.info.range?.start||0)+y.info.Z);if(k>=z.length)return;if(k<0)throw Error("Missing data");l.V=l.N;l.C=0}for(;k<z.length;){var r=Math.min(z.length-k,l.J.byteLength-l.C);const Z=new Uint8Array(z.buffer,z.byteOffset+k,r);l.J.set(Z,l.C);l.C+=r;k+=r;if(l.C===l.J.length){if(y.info===l.Tv&&hU(l)&&k===z.length)break;r=Qr(l);r=hP(l.policy.V,l.Z.info,dE(l),r,l.policy.gb,l.V,l.J,l.crypto);l.C_.add(r);wE(l,r);l.IR()||(r=Qr(l),l.sj(dE(l),
r!==void 0?(r.downloadedEndTime||0)*r.averageByteRate:r.maxKnownEndTime*r.averageByteRate,r.maxKnownEndTime*r.averageByteRate));l.J=new Uint8Array(l.chunkSize);l.C=0;l.V+=1}}};
TY5=function(l){if(hU(l))if(l.Tv&&l.indexRange)if(l.C){var y=new Uint8Array(l.J.buffer,0,l.C),k=IGT(l),z=l.policy.V;Promise.all(l.C_).then(()=>{const r=hP(z,l.Tv.oR.info,dE(l,!0),k,l.policy.gb,l.V,y,l.crypto);wE(l,r,!0)})}else tU(l,new Og("Woffle: Expect always re-mark currentChunkOffset at EOS"));
else tU(l,new Og("Woffle: Expect at EOS to always have lastSlice or indexRange"))};
V7P=function(l,y){if(!hU(l)&&!l.IR()){if(!(l.b0||(l.b0=!0,l.N>0))){var k=Qr(l);k=hP(l.policy.V,l.Z.info,dE(l),k,l.policy.gb);wE(l,k)}if(y.info.type===1){if(l.Tv){tU(l,Error("Woffle: Expect INIT slices to always start us off"));return}l.initRange=JQ(0,y.C.totalLength)}else if(y.info.type===2)l.Tv&&l.Tv.type===1||tU(l,Error("Woffle: Index before init")),l.indexRange=JQ(l.initRange.end+1,y.C.totalLength);else if(y.info.type===3){if(!l.Tv){tU(l,Error("Woffle: Expect MEDIA slices to always have lastSlice"));
return}if(l.Tv.type===3&&!pV(l.Tv,y.info)&&(l.D=[],y.info.n_!==EL(l.Tv)||y.info.Z!==0))return;if(y.info.N){for(const z of l.D)WZ_(l,z);l.D=[]}else{l.D.push(y);l.Tv=y.info;return}}else{tU(l,Error("Woffle: Unexpected slice type"));return}l.Tv=y.info;WZ_(l,y);TY5(l)}};
IGT=function(l){return{downloadedEndTime:-1,maxKnownEndTime:Math.round(l.Z.index.nw()),averageByteRate:Math.round(l.Z.info.eX)}};
P5Q=function(l){l=g.ZP(l,1886614376);for(const y of l);return g.sT(l,y=>Wtq(y))};
JSq=function(l){var y=ve(l,(z,r)=>z+r.length,0);
y=new Uint8Array(y);let k=0;for(const z of l)y.set(z,k),k+=z.length;return y};
pvt=function(l){a:{var y=l.initData;try{var k=0;const r=new DataView(y.buffer);for(;k<r.byteLength-8;){const Z=r.getUint32(k);if(Z<=1)break;if(r.getUint32(k+4)!==1886614376){k+=Z;continue}let e=32;if(r.getUint8(k+8)>0){const Q=r.getUint32(k+28);e+=Q*16+4}const A=r.getUint32(k+e-4);try{const Q=YNe(y.subarray(k+e,k+e+A));if(Q!==null){var z=Q;break a}}catch(Q){}k+=Z}z=null;break a}catch(r){z=null;break a}z=void 0}if(z!=null){y=VY(mH(z,7,void 0,dZ));y==null||l.Cg||(l.cryptoPeriodIndex=y);y=VY(mH(z,10,
void 0,dZ));y!=null&&y>0&&!l.Cg&&(l.Z=y);for(const r of Yd(z,2,ES,void 0===yR?2:4))z=l.N,y=z.push,k=BG(r),k=g.px(k,4),y.call(z,k)}};
KZT=function(l){return isNaN(l.cryptoPeriodIndex)?g.px(l.initData):`${l.cryptoPeriodIndex}`};
Ga=function(l){if(l.offset>=l.C.totalLength)throw Error();return c5(l.C,l.offset++)};
gsP=function(l,y=!1){var k=Ga(l);if(k===1){y=-1;for(k=0;k<7;k++){var z=Ga(l);y===-1&&z!==255&&(y=0);y>-1&&(y=y*256+z)}return y}z=128;for(let r=0;r<6&&z>k;r++)k=k*256+Ga(l),z*=128;return y?k:k-z};
Ese=function(l){try{const y=gsP(l,!0),k=gsP(l,!1);return{id:y,size:k}}catch(y){return{id:-1,size:-1}}};
jD4=function(l){var y=new fGP(l),k=-1,z=0;let r=0;for(;!z||!r;){const {id:Z,size:e}=Ese(y);if(Z<0)return;if(Z===176){if(e!==2)return;z=y.Z()}else if(Z===186){if(e!==2)return;r=y.Z()}Z===374648427?k=y.Z()+e:Z!==408125543&&Z!==174&&Z!==224&&y.skip(e)}y=Xf(l,0,k);k=new DataView(y.buffer);k.setUint16(z,3840);k.setUint16(r,2160);z=new IG([y]);aG(z,l);return z};
ab=function(l){l.S?.dispose();l.S=null};
SNQ=function(l){return l.C.length?l.C[0]:null};
ns5=function(l,y){return l.C.some(k=>k.info.n_===y)};
iG=function(l,y){y={rst4disc:y,cd:l.K.toFixed(3),sq:l.Ja?l.Ja.n_:-1};l.N=NaN;l.K=0;l.PG=-1;l.Ja=null;l.Xr=NaN;l.u0=NaN;l.rb=null;l.loader.Md("mdstm",y)};
Ug=function(l){l.Z=null;l.Y=-1;l.A=0;l.J=null;l.sj=NaN;l.D=0;l.C_=null};
Mq=function(l,y){if(y.info.N){l.mK=y.info;if(l.J){var k=l.J,z=FZg(l,!1);k=os5(k);l.loader.T4(l.oR,z,k);l.C_||l.policy.Fg||NY4(l);l.C_=null}Ug(l)}l.S&&V7P(l.S,y);if(z=l.KB())if(z=z.S(y,l.policy.Rv,l.policy.wY)){l.C.pop();l.C.push(z);return}l.C.push(y)};
Hw5=function(l,y,k,z=0){if(l.V){var r=l.V.Z+l.V.C;if(k.info.Z>0)if(k.info.n_===l.V.n_&&k.info.Z<r){if(k.info.Z+k.info.C<=r)return;k=F7t(k,r-k.info.Z)[1]}else if(k.info.n_>=0&&l.V.n_>=0&&!pV(l.V,k.info))throw new g.WO("improper_continuation",l.V.rY(),k.info.rY());Mrt(l.V,k.info)||iG(l,"d")}else if(k.info.Z>0)throw new g.WO("continuation_of_null",k.info.rY());l.V=k.info;l.oR=k.info.oR;if(k.info.Z===0){if(l.Z)if(!l.loader.isOffline()||l.policy.bI)l.loader.Md("slice_not_fully_processed",{buffered:l.Z.info.rY(),
push:k.info.rY()});else throw new g.WO("slice_not_fully_processed",l.Z.info.rY(),k.info.rY());Ug(l);l.HG=z}else{if(l.HG&&z&&l.HG!==z)throw l=new g.WO("lmt_mismatch",k.info.n_,l.HG,z),l.level="WARNING",l;!k.info.oR.N()&&l.J&&(z=k.info,r=l.J.segmentNumber,z.K="updateWithEmsg",z.n_=r)}if(l.Z){z=l.Z.S(k);if(!z)throw new g.WO("failed_to_merge",l.Z.info.rY(),k.info.rY());l.Z=z}else l.Z=k;a:{k=g.Lk(l.Z.info.oR.info);if(l.Z.info.type!==3){if(!l.Z.info.N)break a;l.Z.info.type===6?sD5(l,y,l.Z):LZ5(l,l.Z);l.Z=
null}for(;l.Z;){z=l.Z.C.totalLength;if(l.Y<=0&&l.A===0){var Z=l.Z.C;let t=r=-1;if(k){for(var e=0;e+8<Z.totalLength;){var A=fL_(Z,e),Q=fL_(Z,e+4);e+=A||1;if(Q===1836019558)r=e;else if(Q===1835295092){t=e;break}}t<0&&(r=-1)}else{Z=new fGP(Z);for(A=e=!1;;){Q=Z.Z();const {id:w,size:h}=Ese(Z);if(!(w>0))break;if(w!==408125543)if(w===524531317)e=!0,h>=0&&(t=Z.Z()+h,A=!0);else{if(e&&(w===160||w===163)&&(r<0&&(r=Q),A))break;w===163&&(r=Math.max(0,r),t=Z.Z()+h);if(w===160){r<0&&(t=r=Z.Z()+h);break}Z.skip(h)}}r<
0&&(t=-1)}const {Nj:O,Fb:d}={Nj:r,Fb:t};if(O<0)break;l.Y=O;l.A=d-O}if(l.Y>z)break;l.Y?(z=vsz(l,l.Y),z.J&&BYt(l,z),sD5(l,y,z),Mq(l,z),l.Y=0):l.A&&(z=vsz(l,l.A<0?Infinity:l.A),l.A-=z.C.totalLength,Mq(l,z))}}l.Z&&l.Z.info.N&&(Mq(l,l.Z),l.Z=null)};
BYt=function(l,y){var k=g.l9(y);if(Nx(y.info.oR.info)&&y.info.oR.info.video.primaries==="bt2020"){var z=new AQ(k);$$(z,[408125543,374648427,174,224,21936,21937])&&(z=z.start+z.pos,k.getUint8(z)===129&&k.getUint8(z+1)===1&&k.setUint8(z+1,9))}z=y.info.oR.info;z.V()&&!Nx(z)&&(z=g.l9(y),(new AQ(z)).NH(),dF([408125543,374648427,174,224],21936,z));y.info.oR.info.q4()&&(z=y.info.oR,z.info&&z.info.video&&z.info.video.projectionType==="MESH"&&!z.D&&(g.Lk(z.info)?z.D=gET(k):z.info.Cg()&&(z.D=sNe(k))));y.info.oR.info.Cg()&&
y.info.q4()&&(k=g.l9(y),(new AQ(k)).NH(),dF([408125543,374648427,174,224],30320,k)&&dF([408125543,374648427,174,224],21432,k));if(l.policy.FB&&y.info.oR.info.Cg()){z=g.l9(y);var r=new AQ(z);if($$(r,[408125543,374648427,174,29637])){k=OL(r,!0);r=r.start+r.pos;for(var Z=0;Z<k-1;Z++)z.setUint8(r+Z,0);z.setUint8(r+k-1,1)}}if(l.a9()&&g.Lk(y.info.oR.info)){k=g.l9(y);z=g.yC(k,0,1701606260);k=g.yC(k,0,1836476516);if(z&&k){z.skip(2);var e=Sv(z);Z=Fm(z);const A=[];r=[];const Q=[],t=[];if(e)for(e=0;e<Z;++e)A.push(oE(z)),
r.push(oE(z)),Q.push(Sv(z)),t.push(Sv(z));else for(e=0;e<Z;++e)A.push(nb(z)),r.push(nb(z)),Q.push(Sv(z)),t.push(Sv(z));z=A;k=g.k$(k);k=new R5z(r[0]/k,z[0]/k)}else k=null;if(r=k){if(g.Lk(y.info.oR.info))for(k=g.l9(y),Z=g.yC(k,0,1701082227);Z;)z=Z,z.type=1936419184,z.data.setUint32(z.offset+4,1936419184),Z=g.yC(k,Z.offset+Z.size,1701082227);l.gb=!0;y.info.oR.b0=r}}y.info.oR.N()||y.info.oR.C||y.info.oR.indexRange||yA(y)};
D$q=function(l,y){if(l.isDrm()){if(y.info.oR.info.Cg()){var k=new AQ(g.l9(y));if($$(k,[408125543,374648427,174,28032,25152,20533,18402])){var z=OL(k,!0);k=z!==16?null:ix(k,z)}else k=null;z="webm"}else y.info.C_=P5Q(g.l9(y)),k=JSq(y.info.C_),z="cenc";k&&k.length&&(k=new X0(k,z),l.policy.NA&&g.Lk(y.info.oR.info)&&(z=oE5(g.l9(y)))&&(k.C=z),k.Cg=y.info.oR.info.Cg(),y.Z&&y.Z.cryptoPeriodIndex&&(k.cryptoPeriodIndex=y.Z.cryptoPeriodIndex),y.Z&&y.Z.C&&(k.Z=y.Z.C),l.loader.Hd(k))}};
LZ5=function(l,y){!y.info.oR.N()&&y.info.Z===0&&(g.Lk(y.info.oR.info)||y.info.oR.info.Cg())&&BMe(y);if(y.info.type===1)try{BYt(l,y),D$q(l,y)}catch(z){g.n(z);var k=fV(y.info);k.hms="1";l.loader.handleError("fmt.unparseable",k||{},1)}k=y.info.oR;k.u0(y);l.S&&V7P(l.S,y);if(k.Z()&&l.policy.Z)a:{l=l.loader.Ej;y=y.info.clipId;k=g.Bt(k.info,l.UA);if(y){const z=I9({itag:k.itag,lmt:l.UA?0:k.lmt||0,xtags:k.xtags});if(l.Oj[z])break a;l.Oj[z]=y}l.xz.push(k)}};
JNQ=function(l,y,k){if(l.C.length!==0&&(k||l.C.some(z=>z.info.V<y))){k=0;
for(const z of l.C){if(z.info.V<y)break;l.loader.Md("cmat",{max:y,s:z.info.rY()});k+=1}l.C.splice(0,k)}};
lqC=function(l){let y=l.C.reduce((k,z)=>k+z.C.totalLength,0);
l.Z&&(y+=l.Z.C.totalLength);return y};
vsz=function(l,y){var k=l.Z;y=Math.min(y,k.C.totalLength);if(y===k.C.totalLength)return l.Z=null,k;k=F7t(k,y);l.Z=k[1];return k[0]};
sD5=function(l,y,k){if(k.info.oR.N()){if(l.gb&&ysQ(k)){y=g.l9(k);var z=g.yC(y,0,1953658222);if(z){z.skip(1);var r=jv(z)<<16|Sv(z),Z=r&1,e=r&4;if(r&256){y=r&512;var A=r&1024;r&=2048;var Q=Fm(z);Q<2||(Z&&z.skip(4),e&&z.skip(4),Z=Fm(z),z.skip((Q-1)*(4+(y?4:0)+(A?4:0)+(r?4:0))-4),z.data.setUint32(z.offset+z.Z,Z))}}}if(y=l.b0&&!!l.b0.oR.b0)if(y=k.info.q4())y=L75(k),A=l.b0,c4?(z=1/y,y=Cy(l,y)>=Cy(A)+z):y=l.getDuration()>=A.getDuration(),y=!y;y&&ysQ(k)&&(y=l.b0,c4?(z=L75(k),A=1/z,z=Cy(l,z),y=Cy(y)+A-z):
y=y.getDuration()-l.getDuration(),y=1+y/k.info.duration,Yrq(g.l9(k),y))}else{z=!1;l.J||(BMe(k),k.Z&&(l.J=k.Z,z=!0,Z=k.info,e=k.Z.segmentNumber,Z.K="updateWithEmsg",Z.n_=e,Z=k.Z,Z.S&&(e=l.oR.index,e.J=!Z.S,e.S="emsg"),Z=k.info.oR.info,e=g.l9(k),g.Lk(Z)?ed(e,1701671783):Z.Cg()&&dF([408125543],307544935,e)));a:if((Z=$p(k,l.policy.g4))&&vb5(k))e=kSz(l,k),l.K+=e,Z-=e,l.D+=Z,l.N=l.policy.tb?l.N+Z:NaN;else{if(l.policy.Wy){if(e=Q=l.loader.Q0(g.zQ(k),1),l.N>=0&&k.info.type!==6){if(l.policy.tb&&isNaN(l.u0)){g.WH(new g.WO("Missing duration while processing previous chunk",
k.info.rY()));l.loader.isOffline()&&!l.policy.bI||zZz(l,k,e);iG(l,"m");break a}r=Q-l.N;var t=r-l.K;const O=k.info.n_,d=l.Ja?l.Ja.n_:-1,w=l.Xr,h=l.u0,U=l.policy.g8&&r>l.policy.g8,u=Math.abs(t)>10,W=Math.abs(l.N-e)<1E-7;if(Math.abs(t)>1E-4){l.RR+=1;const V=l.J?.N();t={audio:`${+l.a9()}`,sq:O.toFixed(),sliceStart:Q,lastSq:d.toFixed(),lastSliceStart:w,lastSliceDuration:h,totalDrift:(r*1E3).toFixed(),segDrift:(t*1E3).toFixed(),skipRewrite:`${+(U||u)}`};V?.length&&(t.adCpn=V[0]);l.loader.handleError("qoe.avsync",
t);l.PG=O}U||u||W||(e=l.N);Q=kSz(l,k,Q);Z-=Q;l.K=r+Q}}else e=isNaN(l.N)?k.info.startTime:l.N;zZz(l,k,e)&&(l.D+=Z,l.N=e+Z,l.policy.Ei&&l.RR>=l.policy.Ei&&(l.RR=0,l.loader.SZ({resetForRewrites:"count"})))}l.Ja=k.info;l.u0=rb(k);k.N>=0&&(l.Xr=k.N);if(z&&l.J){z=FZg(l,!0);Sd(k.info,z);l.Z&&Sd(l.Z.info,z);for(A of y)l.policy.S&&A.n_!==l.J?.segmentNumber||Sd(A,z);(k.info.N||l.Z&&l.Z.info.N)&&k.info.type!==6||(l.C_=z,l.policy.C?(y=os5(l.J),l.loader.T4(l.oR,z,y)):(y=l.loader,y.Ej.isManifestless&&rsT(y,z,null,
!!l.oR.info.video)),l.policy.Fg||NY4(l))}}D$q(l,k);l.timestampOffset&&NMs(k,l.timestampOffset)};
FZg=function(l,y){let k;const z=l.J;if(k=TvQ(z))k.startSecs+=l.sj;const r=l.sj;let Z=0;l.oR instanceof p2&&(Z=l.oR.GZ);return new Hy(z.segmentNumber,r,y?Z:l.D,z.ingestionTime,`sq/${z.segmentNumber}`,void 0,void 0,y,k)};
os5=function(l){if(l.zQ()){var y=l.data["Stitched-Video-Id"]?l.data["Stitched-Video-Id"].split(",").slice(0,-1):[],k=l.N();var z=[];if(l.data["Stitched-Video-Duration-Us"])for(var r of l.data["Stitched-Video-Duration-Us"].split(",").slice(0,-1))z.push((Number(r)||0)/1E6);r=[];if(l.data["Stitched-Video-Start-Frame-Index"])for(var Z of l.data["Stitched-Video-Start-Frame-Index"].split(",").slice(0,-1))r.push(Number(Z)||0);Z=[];if(l.data["Stitched-Video-Start-Time-Within-Ad-Us"])for(const e of l.data["Stitched-Video-Start-Time-Within-Ad-Us"].split(",").slice(0,
-1))Z.push((Number(e)||0)/1E6);l=new ZEg(y,k,z,Z,g.Pqy(l),g.Jie(l))}else l=null;return l};
NY4=function(l){const y=l.J,k=TvQ(y);k&&(k.startSecs+=l.sj,l.loader.OL(l.oR,k,y.segmentNumber,y.zQ()))};
kSz=function(l,y,k){var z=0;if(y.info.oR.info.Cg()&&!vb5(y))return 0;if(l.b0&&!l.a9()){let t=0;k&&g.Lk(y.info.oR.info)?t=k-l.N:y.info.oR.info.Cg()&&(t=l.K);var r=y.info.n_;k=$p(y,l.policy.g4);var Z=l.b0;const {iK:O,DG:d}={iK:Z.PG,DG:Z.K};Z=Math.abs(d-t)>.02;if((r===O||r>O&&r>l.PG)&&Z){z=Math.max(.95,Math.min(1.05,(k-(d-t))/k));if(g.Lk(y.info.oR.info))Yrq(g.l9(y),z);else if(y.info.oR.info.Cg()&&(Z=t-d,!g.Lk(y.info.oR.info)&&(y.info.oR.info.Cg(),z=new AQ(g.l9(y)),r=y.J?z:new AQ(new DataView(y.info.oR.C.buffer)),
$p(y,!0)))){var e=Z*1E3,A=MO(r);r=z.pos;z.pos=0;if(z.Z.getUint8(z.pos)===160||Xg(z))if(tQ(z,160))if(OL(z,!0),tQ(z,155)){Z=z.pos;var Q=OL(z,!0);z.pos=Z;e=e*1E9/A;A=hQ(z);e=A+Math.max(-A*.7,Math.min(A,e));e=Math.sign(e)*Math.floor(Math.abs(e));if(!(Math.ceil(Math.log(e)/Math.log(2)/8)>Q)){z.pos=Z+1;for(Z=Q-1;Z>=0;Z--)z.Z.setUint8(z.pos+Z,e&255),e>>>=8;z.pos=r}}else z.pos=r;else z.pos=r;else z.pos=r}z=$p(y,l.policy.g4);z=k-z}z&&y.info.oR.info.Cg()&&l.loader.Md("webmDurationAdjustment",{durationAdjustment:z,
videoDrift:t+z,audioDrift:d})}return z};
zZz=function(l,y,k){if(!obQ(y,k))return y=fV(y.info),y.smst="1",l.loader.handleError("fmt.unparseable",y||{},1),!1;isNaN(l.sj)&&(l.sj=k);return!0};
ysQ=function(l){return l.info.oR.N()&&l.info.n_===l.info.oR.index.x3()};
Cy=function(l,y=0){y=y?Math.round(l.timestampOffset*y)/y:l.timestampOffset;l.oR.b0&&y&&(y+=l.oR.b0.Z);return y+l.getDuration()};
eZC=function(l,y){y<0||(l.C.forEach(k=>{NMs(k,y)}),l.timestampOffset=y)};
xi=function(l,y=!1){var k=l.loader.getCurrentTime();if(l.policy.tA){var z=l.loader.A2();isNaN(z)||(k=z-l.loader.w4())}var r=l.N.KB();let Z=r?.info.J||0;if(l.policy.Yr&&!isFinite(k))return 0;r?.info.oR.sj()&&!r.info.N&&(l.policy.e5?Z=r.info.V:l.policy.sS&&(z=r.info,Z=z.range?z.J:Math.min(z.startTime+Math.min(z.duration*z.Z/z.oR.info.CP,z.duration)+(z.range?z.A:Math.min(z.duration,z.duration*z.C/z.oR.info.CP)),z.startTime+z.duration)));if(!l.i5){if((l.policy.Z||l.policy.Wd)&&y&&!isNaN(k)){if(r)return Z-
k;if(l.policy.Wd&&l.oR.info.Dr==="f")return Infinity}return 0}if((z=bG(l))&&uG(z))return z.J;var e=l.i5.Za(!0);if(y&&r)return z=0,l.policy.Z&&(z=zH(e,Z+.02)),z+Z-k;y=zH(e,k);l.policy.LQ&&z&&(r=Rh(e,k),e=Rh(e,z.V-.02),r===e&&(k=z.J-k,l.policy.N&&k>y+.02&&l.Md("abh",{bh:y,bhtls:k}),y=Math.max(y,k)));return y};
gXs=function(l){l.S=!0;l.V=!0;l.J=-1;U2(l,Infinity)};
Gu=function(l){for(const y of l.C)mW(l,y);l.C=[];l.Z=null};
aM=function(l,y,k=!1){if(l.i5){const z=l.i5.Za(),r=lt(z,y);let Z=NaN;const e=bG(l);e&&(Z=lt(z,e.oR.index.getStartTime(e.n_)));if(r===Z&&l.Z&&l.Z.C&&Ass(qq(l),0))return y}l=W4(l,y,k);return l>=0?l:NaN};
U2=function(l,y,k){l.oR.Z();var z=W4(l,y);if(z>=0)return z;l.K?.Y(y,k);z=Math;var r=z.min,Z=l.N;if(Z.S)if(Z=Z.S,Z.Tv&&Z.Tv.type===3)Z=Z.Tv.startTime;else if(Z.N>0){var e=Z.Z.index;e=g.cO(e.offsets.subarray(0,e.count),Z.N*Z.chunkSize);Z=Z.Z.index.getStartTime(e>=0?e:Math.max(0,-e-2))}else Z=0;else Z=Infinity;y=r.call(z,y,Z);l.Z=l.policy.b0?null:l.oR.S(y).cF[0];Ib(l)&&(l.policy.bz&&k?.seekSource===60||l.i5&&l.i5.abort(),l.policy.IL&&l.K?.K());l.HG=0;return l.Z?l.Z.startTime:y};
Mk=function(l){return SNQ(l.N)};
$vg=function(l,y){return!!l.K?.C_(y)||ns5(l.N,y)};
Ta=function(l,y,k=!1){y&&c4&&eZC(l.N,y.lU());k||l.K?.S();l.i5=y;l.K?.b0(l.i5)};
bG=function(l){return l.policy.bG?l.K?.Ja()||null:l.i5&&l.i5.rA()};
QdP=function(l){const y={};for(let k=0;k<l.b0.length;k++)y[`r${k}`]=l.b0[k];return y};
Vr=function(l,y){isNaN(l.C_)||l.Md("aswr",{sq:y.info.cF[0].n_,id:y.info.cF[0].oR.info.itag,xtag:y.info.cF[0].oR.info.C,ep:Date.now()-l.C_});l.C.push(y);l.Z=g.nC(y.info.cF);l.b0.push(y.rY());l.b0.length>4&&l.b0.shift()};
t3C=function(l,y){if(y.LA()){const k=y.AV();for(const z of k)l.policy.N&&y instanceof wW&&l.Md("omblss",{s:z.info.rY()}),P4(l,y.info.cF,z,y.AG())}};
P4=function(l,y,k,z=0){isNaN(l.C_)||(l.Md("aswm",{sq:y[0].n_,id:y[0].oR.info.itag,xtag:y[0].oR.info.C,ep:Date.now()-l.C_}),l.C_=NaN);switch(k.info.type){case 1:case 2:OEq(l,k);break;case 4:var r=k.info.oR;const Z=r.mK(k);l.Z?.D()&&beq(k.info,l.Z)&&(l.Z=r.HG(l.Z).pop());for(const e of Z)P4(l,y,e,z);break;case 3:k.info.oR.info.video?(r=l.timing,r.Ja||(r.Ja=(0,g.f)(),g.TH("fvb_r",r.Ja,r.Z))):(r=l.timing,r.S||(r.S=(0,g.f)(),g.TH("fab_r",r.S,r.Z)));Hw5(l.N,y,k,z);l.policy.Z&&dvt(l);break;case 6:Hw5(l.N,
y,k,z),l.Z=k.info}};
OEq=function(l,y){if(y.info.type===1)if(y.info.oR.info.video){var k=l.timing;k.RR||(k.RR=(0,g.f)(),g.TH("vis_r",k.RR,k.Z))}else k=l.timing,k.A||(k.A=(0,g.f)(),g.TH("ais_r",k.A,k.Z));LZ5(l.N,y);l=l.loader;l.videoTrack.oR.Z()&&l.audioTrack.oR.Z()&&l.policy.Z&&!l.Ej.UA&&(y=l.audioTrack.getDuration(),k=l.videoTrack.getDuration(),Math.abs(y-k)>1&&l.Md("trBug",{af:`${g.Bt(l.audioTrack.oR.info,!1)}`,vf:`${g.Bt(l.videoTrack.oR.info,!1)}`,a:`${y}`,v:`${k}`}))};
dvt=function(l){l.C.length?l.Z=g.nC(g.nC(l.C).info.cF):l.N.C.length?l.Z=l.N.KB().info:l.Z=bG(l)};
JU=function(l,y){const k={U1:[],E6:[]};return l.K?.D(y)??k};
W4=function(l,y,k=!1){if(!l.Z||!l.Z.C)return NaN;l=qq(l);y=wmq(l,y+.02,k);return y<0?NaN:Ass(l,k?y:0)?l[y].startTime:NaN};
Ib=function(l){var y;!(y=l.oR.info.Dr==="f")&&(y=l.policy.V)&&(y=l.N,y=!!y.S&&hU(y.S));if(y)return!0;y=bG(l);if(!y)return!1;const k=uG(y)&&y.N;return l.isManifestless&&l.sj>0?k||y.n_>=l.sj:k};
Yi=function(l){let y=0;for(const k of l.C)y+=xfP(k.info);return y+=lqC(l.N)};
uG=function(l){return l?l.S():!1};
hZq=function(l){const y=bG(l);return y?y.J-l.loader.getCurrentTime():0};
py=function(l,y,k,z){if(!l.oR.index.CK(y,!0))return!1;try{Gu(l);var r=l.N;let Z=null;for(let e=r.C.length-1;e>=0;e--){const A=r.C[e];A.info.n_>=y&&(r.C.pop(),r.N-=$p(A,r.policy.g4),Z=A.info)}Z&&(r.V=r.C.length>0?r.C[r.C.length-1].info:r.rb,r.C.length!==0||r.V||iG(r,"r"));r.loader.Md("mdstm",{rollbk:1,itag:Z?Z.oR.info.itag:"",popped:Z?Z.n_:-1,sq:y,lastslc:r.V?r.V.n_:-1,lastfraget:r.N.toFixed(3)});if(l.policy.Z)return l.Z=null,!0;z>k?U2(l,z):l.Z=l.oR.J(y-1,!1).cF[0]}catch(Z){return y=ah(Z),y.details.reason=
"rollbkerr",l.loader.handleError(y.errorCode,y.details,y.severity),!1}return!0};
mW=function(l,y,k=!1){GST(l,y,k);y.dispose()};
Ky=function(l){const y=l.N.KB();return y?y.info:bG(l)};
gE=function(l,y){let k;for(k=0;k<l.C.length&&y!==l.C[k];k++);if(k===l.C.length)mW(l,y);else{for(;k<l.C.length;)mW(l,l.C.pop());var z=Ky(l);z&&z.oR.A()&&Be(y.info.cF,r=>uhy(r,z))?(l.Z=z,l.policy.N&&l.Md("cer",{lsr:"lsp",
lsp:z.rY()})):(gF(y.info.cF[0])?(l.Z=y.N4&&y.N4.N?c4s(y.N4.N):XWz(y.info.cF[0]),l.policy.N&&l.Md("cer",{lsr:l.Z.rY(),lsp:z?.rY()})):(l.Z=null,l.policy.N&&l.Md("cer",{lsr:"null",lsp:z?.rY()})),l.loader.isOffline()&&!l.policy.bI||mW(l,y,!0))}};
Eg=function(l){return Ib(l)||uG(l.N.KB()?.info)};
qq=function(l){let y=[];const k=bG(l);k&&y.push(k);y=g.QL(y,l.N.Yh());for(const z of l.C)for(const r of z.info.cF)z.eC&&(y=g.oC(y,Z=>!beq(Z,r))),(gF(r)||r.D())&&y.push(r);
l.Z&&!iet(l.Z,g.nC(y),l.Z.oR.N())&&y.push(l.Z);return y};
Ass=function(l,y){if(!l.length)return!1;for(y+=1;y<l.length;y++)if(!Ufe(l[y-1],l[y]))return!1;return!0};
wmq=function(l,y,k=!1){let z=-1;for(let r=0;r<l.length;++r){const Z=l[r];if(Z.V<=y)if(k)z=r;else if(Z.startTime+Z.duration>=y)return r}return z};
fy=function(l){return!(!l.Z||l.Z.oR===l.oR)};
aq4=function(l,y,k){return l.policy.Z?xi(l,!0)<k:(l=Ky(l))&&!uG(l)?l.J>y&&l.J<y+k:!1};
j$=function(l){l.K?.S();l.D=[]};
GST=function(l,y,k=!1){!y.eC||!k&&y.info.cF[0].oR.A()||(l=l.N,l.C_&&!l.policy.F_&&(y=l.loader,y.Ej.isManifestless&&gb(y.Ej,l.C_.n_,!!l.oR.info.video)),l.C_=null,l.J=null,l.V=l.mK,l.N=l.V?l.N-l.D:NaN,Ug(l))};
iEC=function(l){return!!l.Z&&l.Z.n_!==-1&&l.Z.n_<l.oR.index.zi()};
Uv4=function(l){const y=l.Z;y&&y.n_===-1&&(l=l.N.KB())&&gF(l.info)&&(l=l.info.n_,y.K="updateLastSliceRequested",y.n_=l)};
M3Q=function(l){return Be(l.C,y=>y.jQ)};
XmC=function(l,y){const k=Mk(l);return k&&k.info.type!==6?!y.C_(l,k.info.n_):!1};
csq=function(l,y){for(const k of l.D)if(k.segmentNumber===y)return k.vX?2:1;return 0};
bEg=function({hasSubfragmentedFmp4:l=!1,K5:y=!1}={}){const k=new C_g;k.C2=l||y;return k};
S$=function(l){return l.Z&&l.RY&&l.playbackStartPolicy};
t7P=function(l,y,k=!1){y.video.qualityOrdinal>1080&&!l.kV&&(l.rb=36700160,l.Oj=5242880,l.u0=Math.max(4194304,l.u0),l.kV=!0);y.video.qualityOrdinal>2160&&!l.zr&&(l.rb=104857600,l.CP=13107200,l.zr=!0);g.i_(l.Qj.experiments,"html5_samsung_kant_limit_max_bitrate")!==0?y.isEncrypted()&&g.is()&&g.G6("samsung")&&(g.G6("kant")||g.G6("muse"))&&(l.CP=g.i_(l.Qj.experiments,"html5_samsung_kant_limit_max_bitrate")):y.isEncrypted()&&g.is()&&g.G6("kant")&&(l.CP=1310720);l.YM!==0&&y.isEncrypted()&&(l.CP=l.YM);l.Zs!==
0&&y.isEncrypted()&&k&&(l.CP=l.Zs);y.CP&&(l.Qk=Math.max(l.TZ,Math.min(l.u0,5*y.CP)))};
ny=function(l,y,k=0){return g.i_(l.Qj.experiments,y)||k};
F0=function(l,y,k,z){l.RY&&(l.playbackStartPolicy=y,l.us=k,l.L3=z)};
LVy=function(l,y){if(y<0)return!0;const k=l.x3();return y<k||y===k&&!l.iX||y===k&&(l=l.lO())&&y===l.n_?!0:!1};
vXz=function(l,y,k){if(!LVy(l,y))return 0;if(!l.C2||!isNaN(k)&&k>0)return 2;if(y<0)return 1;k=l.x3();return y<k||y===k&&(l=l.lO())&&y===l.n_&&!l.pending?2:1};
uX5=function(l,y,k){const z=l.X4();if(l.isComplete()||!z||l.info.pP.ZW(y,k))return 0;const r=y.zZ;if(!r||z<r)return 0;l=cy(k,Wy(l.info.pP,!0,y));return l.Z||l.timedOut||l.started?0:2};
xvs=function(l,y,k){if(!(y.rh&&l.isComplete()&&l.canRetry()&&l.info.pP.ZW(y,k))||l.info.pP.D)return 0;l=cy(k,Wy(l.info.pP,!1,y));return l.N+y.rh*bx(l,!0)>(0,g.f)()?0:1};
Nq=function(l,y,k){if(l.policy.I4)return!1;var z=l.Z;var r=y.Z?.b0()||-1;z.C===3&&r+1>=z.V?(z.Md("sdai",{haltrq:r+1,est:z.V}),z=!1):z=z.C!==2;if(!z||!(y.Z?y.Z.oR.pP:y.oR.pP).K(l.policy,l.N,l.loader.xE)||l.loader.isSuspended&&(!ob(l.schedule)||l.loader.KL))return!1;if(l.policy.V&&wH>=5)return l.loader.po.Kl(),!1;if(l.Ej.isManifestless){if(y.C.length>0&&y.Z&&y.Z.n_===-1||y.C.length>=l.policy.X_||!l.policy.RI&&y.C.length>0&&!l.policy.K.C2)return!1;if(y.S)return!l.Ej.isLive||!isNaN(l.MV)}if(M3Q(y))return!1;
if(!y.Z){if(!y.oR.Z())return!1;U2(y,l.loader.getCurrentTime())}if(Mk(y)&&(y.KB()!==Mk(y)||l.loader.isSuspended))return!1;r=(z=l.policy.vc)&&!y.C.length&&xi(y,!0)<Math.min(z,xi(k));z=y.C.length+k.C.length;var Z=(y.C.length?y.C[0].MQ():!1)||(k.C.length?k.C[0].MQ():!1)||l.Ej.isLive;(r||Z)&&--z;if(z+1>=l.policy.xV)return!1;z=y.Z;if(!z)return!0;z.D()&&z.oR.Z()&&(y.Z=g.nC(z.oR.HG(z)),z=y.Z);if(!z.S()&&!z.oR.V(z))return!1;Z=l.Ej.aj||l.Ej.C;if(l.Ej.isManifestless&&Z){Z=y.oR.index.x3();var e=k.oR.index.x3();
Z=Math.min(Z,e);if(y.oR.index.Pm()>0&&Z>0&&z.n_>=Z)return y.sj=Z,k.sj=Z,!1}if(z.oR.info.audio&&z.D()||z.S())return!1;Z=!y.V&&!k.V;if(r=!r)r=z.J,r=!!(k.Z&&!uG(k.Z)&&k.Z.J<r);e=y===l.videoTrack&&l.policy.HG;return r&&(!l.Ej.isManifestless||k.Z&&k.Z.J&&z.J)&&Z&&!e||l.policy.kz&&!y.V&&k.V?!1:gF(z)&&z.J>mvz(l,y)?(mvz(l,y),!1):(l=y.i5)&&l.isLocked()?!1:!0};
lB=function(l,y){l.loader.GT(y);var k=xfP(y),z=l.loader.RJ();k={o7:l.schedule,aX:k,VZ:xH_(l.V,k),Ae:KV(y.cF[0]),eP:ux(23,5738,y.pP.Z),Ad:l.policy.N,XF:(r,Z)=>{l.loader.Eq(r,Z)}};
l.schedule.C.S&&(k.SE=(l.videoTrack.oR?.info.CP||0)+(l.audioTrack.oR?.info.CP||0));l.PZ&&(k.n_=y.cF[0].n_,k.MV=y.MV,k.PZ=l.PZ);z={M1:mfP(y,l.loader.getCurrentTime()),H0:l.policy.Cf&&Fg(y)&&y.cF[0].oR.info.video?bwC(l.C):void 0,KM:l.policy.HG,poToken:l.loader.De(),i_:l.loader.xO(),xn:l.xn,zV:isNaN(l.zV)?null:l.zV,Oo:l.Oo,Dk:l.Dk,q3:z};return new hJ(l.policy,y,k,l.N,(r,Z)=>{try{a:{const Zg=r.info.cF[0].oR,es=Zg.info.video?l.videoTrack:l.audioTrack;if(!(r.state>=2)||r.isComplete()||r.X4()||!(!l.loader.yj||
l.loader.isSuspended||xi(es)>3)){const fC=uX5(r,l.policy,l.N);fC===1&&(l.Y=!0);qxy(l,r,fC);if(r.isComplete()||r.IR()&&Z<3){if(l.policy.N){const bQ=r.timing.D();bQ.rst=r.state;bQ.strm=r.xhr.iA();bQ.cncl=r.xhr&&r.RU.J?1:0;l.loader.Md("rqs",bQ)}r.OI&&l.loader.Md("sbwe3",{},!0)}if(!l.IR()&&r.state>=2){Biq(l.timing,r,Zg);var e=l.loader;l.zV&&r.e4&&e&&(l.zV=NaN,l.loader.JE(r.e4),l.loader.AI(),l.loader.Md("cabrUtcSeek",{mediaTimeSeconds:r.e4}));r.Cn&&l.zV&&r.Cn&&!r.Cn.action&&(l.loader.bA(l.zV),l.zV=NaN,
l.loader.Md("cabrUtcSeekFallback",{targetUtcTimeSeconds:l.zV}));r.G6&&l.loader.RD(r.G6);l.policy.BF&&(l.Dk=r.Dk);if(r.state===3){gE(es,r);Fg(r.info)&&sg(l,es,Zg,!0);if(l.m8){const bQ=r.info.N8();bQ&&l.m8.Vs(r.info.cF[0].n_,Zg.info.id,bQ)}l.loader.LK()}else if(r.isComplete()&&r.info.cF[0].type===5){if(r.state!==4)r.R2()&&l.loader.handleError(r.eV(),r.qG());else{var A=(r.info.cF[0].oR.info.video?l.videoTrack:l.audioTrack).C[0]||null;A&&A instanceof hJ&&A.X4()&&A.GN()}r.dispose()}else{if(!r.R2()&&r.jQ&&
r.state>=2&&r.state!==3){var Q=r.xhr.getResponseHeader("X-Response-Itag");if(Q){var t=C5q(l.C,Q),O=r.info.N;if(O){var d=O-t.rb();t.C_=!0;r.info.cF[0].oR.C_=!1;var w=t.K(d);r.info=w;if(r.N4){var h=r.N4,U=w.cF;(U.length!==h.cF.length||U.length<h.Af.length)&&g.DP("dash/request",260511119,`${U.length}`,`${h.cF.length}`,`${h.Af.length}`);h.cF=U;const bQ=U[0].range,js=new IG;for(Z=0;Z<h.Af.length;Z++)aG(js,h.Af[Z].C);for(Z=0;Z<h.Af.length;Z++){h.Af[Z].info=U[Z];const Nt=U[Z].range;h.Af[Z].C=il(js,Nt.start-
bQ.start,Nt.length)}}r.jQ=!1;Ly(l.loader,l.videoTrack,t);var u=l.videoTrack;u.Z&&(u.Z.oR=t);l.loader.bc(t.info.video.quality);var W=r.AG();W&&t.info.lastModified&&t.info.lastModified!==+W&&gE(l.videoTrack,r)}}else r.jQ=!1}r.QB?.itagDenylist&&l.loader.G4(r.QB.itagDenylist);if(r.state===4)v4(l,r),l.Z&&l.Z.HG(r.info,l.m8);else if(l.policy.hX&&r.LA()&&!r.isComplete()&&!v4(l,r)&&!r.R2())break a;if(r.R2()){const bQ=r.info.cF[0].oR,js=r.eV();if(ux(33,5724,bQ.pP.Z)){const Ss=g.Kx(r.hC(),3);l.loader.Md("dldbrerr",
{em:Ss||"none"})}const Nt=r.info.cF[0].n_,Ig=vw(l.Z,r.info.cF[0].V,Nt);js==="net.badstatus"&&(l.J+=1);if(r.canRetry()&&B4(l.loader)){if(!(r.info.pP.C>=l.policy.FD&&l.m8&&r.info.isDecorated()&&js==="net.badstatus"&&H4(l.m8,Ig,Nt))){var V=(bQ.info.video&&bQ.pP.C>1||r.I9===410||r.I9===500||r.I9===503)&&!(RM(l.C.J).size>0)&&!ux(37,5720,bQ.pP.Z),T=r.qG(),J=bQ.info.video?l.videoTrack:l.audioTrack;V&&(T.stun="1");l.loader.handleError(js,T);l.IR()||(V&&Z9(l.C,bQ),gE(J,r),l.loader.LK())}}else t=1,l.m8&&r.info.isDecorated()&&
js==="net.badstatus"&&H4(l.m8,Ig,Nt)&&(t=0),l.Ej.isLive&&r.eV()==="net.badstatus"&&l.J<=l.policy.pS*2?(fzC(l.Ej),l.Ej.aj||l.Ej.isPremiere?CX(l.loader,0,{gY:"badStatusWorkaround"}):l.Ej.C?CX(l.loader,l.Ej.iW,{gY:"badStatusWorkaround",Q0:!0}):Rb(l.loader)):l.loader.handleError(js,r.qG(),t);isNaN(l.zV)||(l.loader.bA(l.zV),l.zV=NaN)}l.policy.R7&&!r.isComplete()?D9(l.loader):l.loader.LK();var K=xvs(r,l.policy,l.N);qxy(l,r,K)}}}}}catch(Zg){K=l.C_?1:0,l.C_=!0,r=h7(K),K=ah(Zg,K),l.loader.handleError(K.errorCode,
K.details,K.severity),r||l.loader.YF()}},z)};
Iqz=function(l,y,k){if(Nq(l,y,k)){k=l.S(y,k);if(l.m8){var z=k.cF[0].oR.info.id;var r=l.Z;var Z=k.cF[0].n_;r=Z<0&&!isNaN(r.J)?r.J:Z;Z=vw(l.Z,k.cF[0].V,r);const Q=y===l.audioTrack?1:2,t=k.cF[0].oR.info.Dr,O=z.split(";")[0];a:{var e=l.Z;if(e.Z){var A=e.Z.eI.event;if(e.Z.n_===r){e=A==="predictStart"?void 0:e.Z.eI.event;break a}if(e.Z.n_===r-1){e=A==="start"||A==="continue"?A:void 0;break a}}e=void 0}if(l.policy.RR&&l.Z.C!==0)z=g.WA5(l.m8,Z,r,z,Q,t,e),r<0&&Q===2&&Bw(l.Z,0,0,!0),z&&(l.loader.Md("sdai",
{ssdaiinfo:"1",ds:z.Ov?.m5||"",skipsq:z.Ov?.Ln||-1,itag:O,f:t,sg:r,st:Z.toFixed(3)}),k.V=z);else if(z=l.m8.N8(Z,r,z,Q,t,e),r<0&&Q===2&&Bw(l.Z,0,0,!0),z){Z={dec_sq:r,itag:O,st:Z.toFixed(3)};if(l.policy.OE&&y.isRequestPending(r-1)){l.loader.Md("sdai",{wt_daistate_on_sg:r-1});return}l.loader.Md("sdai",Z);z&&(k.Z=new g.zq(z));l.policy.N&&(r=k.pP.p5("id")||"",z=k.Z?.get("id")||"",r!==z&&l.loader.Md("stmidmismatch",{cid:r,aid:z}))}else l.Z.C!==5&&l.loader.Md("sdai",{nodec_sq:r,itag:O,st:Z.toFixed(3)})}l.policy.dF&&
k.cF[0].n_!==-1&&k.cF[0].n_<l.Ej.Vi&&(k=y.oR.J(l.Ej.Vi,!1));Vr(y,lB(l,k));Fe(l.timing);l.K?.Z(k.pP)}};
mvz=function(l,y){var k=l.Z;k=k.Z?k.Z.eI:null;if(l.policy.HG&&k)return k.startSecs+k.yK+15;y=io(l.loader,y);l.policy.T7>0&&(k=((0,g.f)()-l.loader.WP)/1E3,y=Math.min(y,l.policy.T7+l.policy.Ak*k));y=l.loader.getCurrentTime()+y;return l.policy.Tr&&(k=TX_(l.loader)+l.policy.Tr,k<y)?(l.loader.Md("mrl",{ori:y,mod:k},!0),l.policy.Y0&&y5(l.loader),k):y};
qxy=function(l,y,k){if(k!==0){a:if(y=y.info,k=k===2,y.Z)y=null;else{var z=y.cF[0];if(y.range)var r=JQ(y.range.start,Math.min(4096,y.N));else{if(y.C&&y.C.indexOf("/range/")>=0||y.pP.p5("defrag")==="1"||y.pP.p5("otf")==="1"){y=null;break a}r=JQ(0,4096)}r=new By([new jd(5,z.oR,r,"createProbeRequestInfo"+z.K,z.n_)],y.C);r.ZW=k;r.Z=y.Z;y=r}y&&lB(l,y)}};
sg=function(l,y,k,z){if(!(k.Z()||k.Ja()||k.C_||!k.pP.K(l.policy,l.N,l.loader.xE)||k.info.Dr==="f"||l.policy.Z)){if(z){z=l.V;var r=k.info;z=mHg(z,r.video?z.policy.Yl:z.policy.qg,r.CP)}else z=0;z=k.K(z);l=lB(l,z);nV(z)&&Vr(y,l);k.C_=!0}};
v4=function(l,y){if(l.policy.useUmp&&y.IR())return!1;try{var k=y.info.cF[0].oR;const e=k.info.video?l.videoTrack:l.audioTrack;var z=e;if(l.Ej.isManifestless&&z){l.J=0;z.S&&(y.IR(),y.isComplete()||y.LA(),z.S=!1);y.QV()&&l.loader.wh.Tk(1,y.QV());var r=y.Pm(),Z=y.KW();EE(l.Ej,r,Z)}if(y.info.Ae()&&!nV(y.info))for(const Q of y.AV())OEq(e,Q);z=e;for(l.loader.getCurrentTime();z.C.length&&z.C[0].state===4;){const Q=z.C.shift();t3C(z,Q);z.RR=Q.EV()}z.C.length&&t3C(z,z.C[0]);const A=!!Mk(e);A&&y instanceof
wW&&(k.info.a9()?vtC(l.timing):L6_(l.timing));return A}catch(e){y=y.qG();y.origin="hrhs";a:{l=l.loader;k=e;if(k instanceof Error){y.msg||(y.msg=`${k.message}`);y.name||(y.name=`${k.name}`);if(k instanceof g.WO&&k.args)for(const [A,Q]of Object.entries(k.args))y[`arg${A}`]=`${Q}`;g.WH(k);if(k.level==="WARNING"){l.Zr.SZ(y);break a}}l.handleError("fmt.unplayable",y,1)}return!1}};
P_5=function(l){const y=l.videoTrack.oR.index;l.PZ=new V3z({iX:l.policy.iX,C2:l.policy.K.C2,rq:y.wc(),x3:()=>y.x3(),
lO:()=>y.lO()})};
Jsz=function(l,y,k=0,z){y!==l.V&&(l.V&&(l.sj=!0),l.V=y,l.OJ(y,l.videoTrack,k,z))};
Yxq=function(l){if(l.C?.isLocked())return l.videoInfos;const y=RM(l.Z);let k=g.oC(l.videoInfos,z=>z.CP>l.rZ.CP?!1:!y.has(z.id));
l.Z.Ee()&&(k=g.oC(k,z=>z.video.width<=854&&z.video.height<=480));
return k};
pmy=function(l,y){const k=[];for(const z of y)k.push(g.Bt(z,l.Ej.UA));return k};
KAt=function(l,y,k=0,z){if(l.K&&y!==l.J)return!0;l.K=!1;y!==l.J&&(l.J=y,l.OJ(y,l.audioTrack,k,z));return!1};
gLe=function(l,y){return l.rZ.qe&&y.reason==="l"||l.rZ.Hu?!1:l.rZ.pQ?!0:y.reason==="l"||y.reason==="b"||y.reason==="o"};
ELy=function(l,y){const k=l.Z.Z;if(k){l.videoInfos=l.S;var z=g.Dg(l.videoInfos,r=>r.id===k);
z&&z.video.qualityOrdinal===y?l.videoInfos=[z]:(z=l.videoInfos.map(r=>r.id),l.loader.Md("sabrpf",{pfid:`${k}`,
vfids:`${z.join(".")}`}),kY(l,y,y),DV(l.Z,""))}else kY(l,y,y)};
kY=function(l,y,k){l.videoInfos=l.S;l.videoInfos=g.oC(l.videoInfos,z=>z.video.qualityOrdinal>=y&&z.video.qualityOrdinal<=k)};
fqT=function(l,y){l.rZ.PG()&&(l.b0=y.reason==="m"||y.reason==="l"?!0:!1);y.reason==="m"?y.isLocked()&&ELy(l,y.Z):gLe(l,y)?kY(l,y.C,y.Z):l.videoInfos=l.S;l.D=!0;l.C=y};
zZ=function(l,y){return l.map(k=>I9(g.Bt(k,y)))};
jdQ=function(l,y,k){if(l.A){var z=g.oC(l.N,r=>r.id===l.A);
return zZ(z,k).includes(y)}z=g.oC(l.N,r=>!!r.a7?.isDefault);
return z.length>0?zZ(z,k).includes(y):zZ(l.N,k).includes(y)};
rG=function(l,y,k=!1){e5C(l.Z,y,k)};
nL5=function(l,y,k,z){const r=l.Ej;var Z=l.Zr.getVideoData(),e=l.G2;const A=mes({o7:l.o7,Qj:Z.O(),Zr:l.Zr,nL:l.nL,rZ:l.rZ,bF:l.bF,Is:l.Is,Rw:l.Rw,RK:l.RK,wD:l.wD,xr:l.xr,mJ:l.mJ,sabrLicenseConstraint:Z.sabrLicenseConstraint,uX:l.uX,Ld:l.Ld,XA:l.XA,ge:l.ge,aP:!!e,authorizedFormats:Z.authorizedFormats,mR:l.mR,Ee:l.Ee,C9:l.C9,IW:l.IW}),Q=gW(Z,l.q3,l.nextRequestPolicy,l.QC,l.RL,l.lc,l.yU);k&&y&&(k=Q.VF?Q.VF.map(d=>d.type):[],y("sabr",{stmctxt:k.join("_"),
unsntctxt:Q.mx?Q.mx.join("_"):""}));y=l.Oq;k=l.d5;k===void 0&&y===void 0&&(k=Sxt(r.UA,l.rB?.video),y=Sxt(r.UA,l.rB?.audio));let t;Z.Oo&&(t=Z.Oo);let O;(Z=l.rZ?.Uf)&&Z>0&&(l.C9||l.gN)&&(O=new Uint8Array(Z));e={oH:A,E6:l.E6,Oq:y,d5:k,G2:e,videoPlaybackUstreamerConfig:t,ph:Q,tM:O};z&&l.KX?l.KX.length>0&&(e.KX=l.KX):l.Ov&&(e.Ov=l.Ov);l.rZ?.PG()&&!eL()&&(l.MX&&(e.MX=l.MX),l.Zv&&(e.Zv=l.Zv));e.U1=l.U1;e.D8=r.xz;return e};
Sxt=function(l,y){return y?[g.Bt(y.info,l)]:[]};
oLC=function(l,y,k){y=qO(l.pP,FAT(l,y,k),y);l.jr()&&y.set("probe","1");return y};
NXy=function(l){const y={},k=[],z=[];if(!l.data)return y;for(var r=0;r<l.data.U1.length;r++){var Z=l.data.U1[r];k.push(`i.${Z.formatId?.itag}_st.${Z.startTimeMs}_e.${Z.startTimeMs+Z.durationMs}_d.${Z.durationMs}_sn.${Z.oF}_en.${Z.Da}`)}for(r=0;r<l.data.E6.length;r++)Z=l.data.E6[r],z.push(`i.${Z.formatId?.itag}_sn.${Z.sequenceNumber}_sl.${Z.WV||NaN}_lb.${Z.GR}_tr.s_${Z.ZJ?.startTicks}_d_${Z.ZJ?.rQ}_t_${Z.ZJ?.timescale}_ed_${Z.QX}`);y.ptime=l.Z?.oH?.r5||0;y.rtype=l.requestType;y.brl=k.join(";");y.ps=
z.join(";");return y};
FAT=function(l,y,k){l.ZW===void 0&&(l.ZW=l.pP.ZW(y,k));return l.ZW};
el=function(l,y,k){const z=l.Z.Z?.encrypt(y,k);return z?z:(new Zd(l.Z.C)).encrypt(y,k)};
LAe=async function(l,y,k){{var z=l.Z;const r=O0();z=r?new sd5(z.C,r):void 0}if(z)try{return await z.encrypt(y,k)}catch(r){}return el(l,y,k)};
vLP=async function(l,y){(0,g.f)();return l.Z.Z?LAe(l,y,l.iv):mB5(l.Z).encrypt(y,l.iv)};
BXC=function(l,y){(0,g.f)();return l.Z.Z?.C(y,l.iv)};
RZy=async function(l,y){(0,g.f)();var k=l.Z;k.J||(k.J=new HEz(k.N));return t9y(k.J,y,l.iv)};
Dv5=async function(l,y,k){(0,g.f)();return l.Z.Z?LAe(l,y,k):mB5(l.Z).decrypt(y,k)};
y$z=function(l,y){var k=y?.primary;A1(l,0,k);k=k?l5s(k):void 0;A1(l,2,k);A1(l,1,y?.secondary)};
$Y=function(l,y,k=!1){return new g.zq(`${k?"http":"https"}://${y}${l.cG.PF.baseUrl}`)};
A1=function(l,y,k){k?(k=k instanceof g.zq?k:$Y(l,k),l.Z.get(y)?.Z()!==wQ(10,4137,k)&&l.Z.set(y,new kkT(k,y))):l.Z.delete(y)};
l5s=function(l){return l.replace(/(\d+)---/g,(y,k)=>{y=Number(k);return`${y===1?2:y-1}---`})};
zqT=function(l,y=!1,k){var z=$f(l.cG.experiments,"debug_bandaid_hostname");return z?(y=g.i_(l.cG.experiments,"debug_bandaid_port"),z=y>0?`${z}:${y}`:z,y=l.cG.experiments.z7("debug_bandaid_insecure_scheme"),$Y(l,z,y)):y&&k?.url&&!l.C?(z=wQ(3,4128,new g.zq(k.url)),$Y(l,z)):l.Z.get(0)?.location.clone()};
t1=async function(l,y){var k=$Y(l,"redirector.googlevideo.com");k.set("alr","yes");k.set("id",`${Math.round(Math.random()*1E5)}`);if(y===1||y===2)k.set("cmo=sensitive_content","yes"),k.set("sc","yes");y===2&&k.set("cmo=td","c.youtube.com");var z=await R3(k.wZ(),{format:"RAW",timeout:5E3});if(z.xhr.status!==200||!z.xhr.responseText)return Promise.reject(new g.WO("b204258371_no_host",k.wZ(),z.xhr.status));var r=new g.zq(z.xhr.responseText);k=wQ(2,4129,r);z=r.get("ms");l=$Y(l,k);r=r.get("mm");l.set("ms",
z);l.set("mm",r);return k&&r$Q(k)?y!==2||Q5(k)?l:Promise.reject(new g.WO("b204258371_untrusted",k,z)):Promise.reject(new g.WO("b204258371_invalid",k,z))};
Zby=function(l,y){l=`https://${y.Z()}/initplayback?c=${AA(l.cG)}`+"&owc=1";eV(l,"pw",k=>{k.ht=y.C})};
OF=function(l,y,k,z){eV(`https://${y}${"/videoplayback?probe=1"}`,k,r=>{!z.X("html5_onesie_host_racing")||z.videoData.isLivePlayback||z.X("html5_onesie_probe_ec_hosts")||z.dA||z.Zo();l.N.push(r)},r=>{l.N.push(r.details)})};
r$Q=function(l){return/.*(\.c\.youtube\.com|.*\.googlevideo\.com)/.test(l)};
Q5=function(l){const y=/sn-[^.]*-/;return/.*\.c\.youtube\.com/.test(l)&&!y.test(l)};
dG=function(l){for(;l.Z.length&&!l.Z[0].isEncrypted;){const {videoId:k,eZ:z,formatId:r,buffer:Z,mH:e}=l.Z.shift();if(Z)l.RZ.BG.kd?.get(k)?.Z(z,r,Z);else if(e)l.RZ.BG.nB(k,z,r);else{var y=l.RZ;y.Z[r].Di=!0;y=y.BG.kd?.get(k);y?.gA(r)&&y?.C(r)}}};
g.QET=function(l){for(;!l.V&&!l.error;){var y=l;y.V=!!wG(y,1);switch(wG(y,2)){case 2:var k=void 0,z=[],r=[];r.length=19;r.fill(0);var Z=wG(y,5)+257;k=wG(y,5)+1;var e=wG(y,4)+4;for(var A=0;A<e;A++)r[eqg[A]]=wG(y,3);r=h1(r);for(e=Z+k;z.length<e;){A=A$t(y,r);let Q;switch(A){case 16:A=z[z.length-1];Q=wG(y,2)+3;break;case 17:A=0;Q=wG(y,3)+3;break;case 18:A=0;Q=wG(y,7)+11;break;default:Q=1}for(;Q>0;Q--)z.push(A)}z.length!==e?y.error=!0:(k=z.slice(-k),z.length=Z,$Nz(y,z,k));break;case 1:$Nz(y,GZ,aF);break;
case 0:iB(y,y.Z&7);z=wG(y,16);Z=wG(y,16);(z^Z)!==65535&&(y.error=!0);y.output.set(y.data.subarray(y.C,y.C+z),y.N);y.C+=z;y.N+=z;break;default:y.error=!0}l.N>l.output.length&&(l.output=new Uint8Array(l.N*2),l.N=0,l.C=0,l.V=!1,l.Z=0,l.register=0)}l.output.length!==l.N&&(l.output=l.output.subarray(0,l.N));return l.error?new Uint8Array(0):l.output};
wG=function(l,y){for(;l.Z<y;){if(l.C>=l.data.length)return l.error=!0,0;l.register|=l.data[l.C++]<<l.Z;l.Z+=8}const k=l.register&(1<<y)-1;l.register>>=y;l.Z-=y;return k};
$Nz=function(l,y,k){y=h1(y);k=h1(k);const z=l.data,r=l.output;let Z=l.N;for(var e=l.register,A=l.Z,Q=l.C;;){if(A<15){if(Q>z.length){l.error=!0;break}e|=(z[Q+1]<<8)+z[Q]<<A;Q+=2;A+=16}var t=y[e&127];if(t<0)for(e>>=7;t<0;)t=y[(e&1)-t],e>>=1;else e>>=t&15;A-=t&15;t>>=4;if(t<256)r[Z++]=t;else if(l.register=e,l.Z=A,l.C=Q,t>256){e=UF[t];e+=wG(l,Mw[t]);Q=A$t(l,k);A=XQ[Q];A+=wG(l,cY[Q]);if(tv5&&e<A)A=Z-A,r.copyWithin(Z,A,A+e);else for(Q=Z+e,t=Z;t<Q;t+=4)r[t]=r[t-A],r[t+1]=r[t-A+1],r[t+2]=r[t-A+2],r[t+3]=
r[t-A+3];Z+=e;e=l.register;A=l.Z;Q=l.C}else break}l.N=Z};
A$t=function(l,y){if(l.Z<7){var k=l.data;const z=l.C;z>k.length&&(l.error=!0);l.register|=(k[z+1]<<8)+k[z]<<l.Z;l.C+=2;l.Z+=16}k=y[l.register&127];if(k>=0)return iB(l,k&15),k>>4;for(iB(l,7);k<0;)k=y[wG(l,1)-k];return k>>4};
iB=function(l,y){l.Z-=y;l.register>>=y};
h1=function(l){var y=[];for(var k of l)y[k]||(y[k]=0),y[k]++;var z=y[0]=0;k=[];var r=0,Z=0;for(var e=1;e<y.length;e++)y[e]?Z=e:y[e]=0,z=z+y[e-1]<<1,k[e]=z,e>7&&(r+=y[e]);for(z=1;z<r;)z<<=1;y=128;Z=new Int16Array(128+(z+Z)*2);for(r=0;r<l.length;r++){e=l[r];if(!e)continue;var A=k[e]++;z=0;for(var Q=0;Q<e;Q++)z=z<<1|A>>Q&1;A=r<<4|e;if(e<=7)for(Q=1<<7-e;Q--;)Z[Q<<e|z]=A;else{Q=z&127;e-=7;for(z>>=7;e--;){Z[Q]||(Z[Q]=-y,y+=2);const t=z&1;z>>=1;Q=t-Z[Q]}Z[Q]=A}}return Z};
C8=function(l,y){l.C(`${"dcmprs"}_${l.context}_${l.Z}_${"gz"}_${y}`)};
Obg=function(l,y){return sx(l,function(){const k=this;return function*(){let z;const r=Date.now();try{C8(k,"s");var Z=yield*LE(y());if(!Z)throw Error("no result");C8(k,"e");return Z}catch(e){throw C8(k,"f"),z=e,k.Al(z,"gz"),e;}finally{Z=Date.now(),k.vF("gz",Z-r,z)}}()})};
a5q=function(l,y,k,z){return sx(void 0,function(){return function*(){const r=(Z,e)=>Obg(new dNy(Z,k,z),()=>fE(e(l)));
if(bB)try{return yield*LE(r("n",w6C))}catch(Z){}if(y)try{return yield*LE(r(y.Z?"a":"w",Z=>hqy(Z,y)))}catch(Z){}return yield*LE(r("p",Gkt))}()})};
w6C=async function(l){if(!bB)throw Error("DecompressionStream is not supported");const y=O9.Jg();var k=new DecompressionStream("gzip");const z=k.writable.getWriter();z.write(l);z.close();l=k.readable.getReader();for(k=new IG([]);;){const {value:r,done:Z}=await l.read();if(Z)break;k.append(r)}l=MB(k);O9.IX("gznb",y,Math.ceil(l.byteLength/16));return l};
Gkt=function(l){const y=O9.Jg();l=g.QET(new g.ibs(l));O9.IX("gzjb",y,Math.ceil(l.byteLength/16));return l};
hqy=function(l,y){const k=O9.Jg();l=y.pY(l);let z;try{const r=l.byteOffset,Z=l.byteLength,e=y.exports.getInflatedSize(r,Z);if(e===0)throw Error("wasm_gz: bad input");const A=y.malloc(e),Q=y.exports.inflateGzip(r,Z,A);if(Q)throw y.free(A),Error(`wasm_gz: fail${Q}`);z=new Uint8Array(y.exports.memory.buffer,A,e)}finally{y.free(l.byteOffset)}y=y.EJ(z);O9.IX("gzwb",k,Math.ceil(y.byteLength/16));return y};
uB=function(l){var y=l.queue;y.Z.length&&y.Z[0].isEncrypted&&!y.C&&(y.Z.length=0);for(const k of Object.keys(l.Z)){const z=l.Z[k];z.Di||(y=l.queue,y.Z.push({videoId:z.videoId,formatId:k,isEncrypted:!1}),y.C||dG(y))}};
UNy=function(l,y){const k=y.totalLength;let z=!1;switch(l.N){case 0:l.tD(y,l.V).then(r=>{var Z=l.BG;Z.bq("oprr");Z.playerResponse=r;Z.qz||(Z.fZ=!1);xY(Z)},r=>{l.BG.fail(r)});
break;case 2:l.bq("ormk");y=MB(y);l.queue.decrypt(y);break;default:z=!0}l.BG.Pi&&l.BG.Md("ombup",`id.${11};pt.${l.N};len.${k}${z?";ignored.1":""}`);l.N=null};
MvP=function(l,y){l.BG.bq("oprgz2_s");y=a5q(y,l.BG.O().xz,l.BG.Pi?l.BG.Md.bind(l.BG):()=>{},k=>{l.BG.bq(k)});
FX(y,()=>{l.BG.bq("oprgz2_e")},()=>{l.BG.bq("oprgz2_f")});
return y};
X6_=async function(l,y){l.BG.bq("oprgz_s");if(bB)try{var k=await w6C(y);l.BG.bq("oprgz_n");l.BG.Md("oprsgz",{i:"n"});return k}catch(z){l.BG.Md("gzerr",{impl:"native",err:`${z}`})}if(k=l.BG.O().xz)try{const z=hqy(y,k);l.BG.bq("oprgz_w");l.BG.Md("oprsgz",{i:"w"});return z}catch(z){l.BG.Md("gzerr",{impl:"wasm",err:`${z}`})}y=Gkt(y);l.BG.bq("oprgz_p");l.BG.Md("oprsgz",{i:"j"});return y};
c$C=function(l){return new Promise(y=>{setTimeout(y,l)})};
CY5=function(l,y){var k=l.O();k=l.S2&&k.X("html5_onesie_preload_use_content_owner");if((y=zqT(y,k,l.b2))&&l.videoId){l=GC(l.videoId);k=[];if(l)for(const z of l)k.push(z.toString(16).padStart(2,"0"));y.set("id",k.join(""));return y}};
bbe=async function(l,y,k=0){const z=[];z.push(y.load());k>0&&z.push(c$C(k));await Promise.race(z);return CY5(l,y)};
umC=function(l,y,k,z=!1){l.set("cpn",y.clientPlaybackNonce);l.set("opr","1");const r=y.O();l.set("por","1");O0()||l.set("onem","1");y.startSeconds>0&&l.set("osts",`${y.startSeconds}`);z||(r.X("html5_onesie_disable_partial_segments")&&l.set("oses","1"),y=r.X("html5_gapless_onesie_no_media_bytes")&&jn(y)&&y.S2,k&&!y?(y=k.audio,l.set("pvi",k.video.join(",")),r.X("html5_onesie_disable_audio_bytes")||l.set("pai",y.join(",")),MC||l.set("osh","1")):(l.set("oad","0"),l.set("ovd","0"),l.set("oaad","0"),l.set("oavd",
"0")))};
xNC=function(l,y,k,z,r=!1){const Z=`${"https://youtubei.googleapis.com/youtubei/"}${y.vV.innertubeApiVersion}/player`,e=[{name:"Content-Type",value:"application/json"}];z&&e.push({name:"Authorization",value:`Bearer ${z}`});e.push({name:"User-Agent",value:g.Xv()});g.Y("EOM_VISITOR_DATA")?e.push({name:"X-Goog-EOM-Visitor-Id",value:g.Y("EOM_VISITOR_DATA")}):(k=k.visitorData||g.Y("VISITOR_DATA"))&&e.push({name:"X-Goog-Visitor-Id",value:k});(k=g.Y("SERIALIZED_LAVA_DEVICE_CONTEXT"))&&e.push({name:"X-YouTube-Lava-Device-Context",
value:k});(y=$f(y.experiments,"debug_sherlog_username"))&&e.push({name:"X-Youtube-Sherlog-Username",value:y});l=W5(JSON.stringify(l));return{url:Z,JL:e,postBody:l,g2:r,r8:r}};
ms=function(l,y,k,z,r,Z,e,A,Q){const t=l.Tq,O=l.D4;l=l.z9;var d=t!==void 0&&O!==void 0;const w=z.getVideoData();var h=y.Z.encryptedClientKey;y=d?y.iv:void 0;d=AJ(Z,!0);r=r||!!O0()&&d>1572864;return{innertubeRequest:{G9:l,sC:t,D4:O,encryptedClientKey:h,iv:y,Z2:!0,b3:!0,Zi:"DecompressionStream"in window||!r,c5:k.experiments.z7("html5_use_jsonformatter_to_parse_player_response")},oH:mes({o7:Z,Qj:k,Zr:z,nL:w.startSeconds*1E3,eQ:!0}),onesieUstreamerConfig:e,lS:A,ph:gW(w),reloadPlaybackParams:w.vV?.reloadPlaybackParams,
ou:Q}};
mNq=function(l,y,k,z,r,Z,e,A){const Q=g.nG(l,Ih);let t;var O;l.r8||((O=BXC(y,Q))?(t=O.Bu,O=O.signature):(O=t=y.encrypt(Q),(0,g.f)(),O=r9P(new $mg(y.Z.N),O,y.iv)));return ms(t&&O?{Tq:t,D4:O}:{z9:Q},y,k,z,!!l.r8,r,Z,e,A)};
qas=async function(l,y,k,z,r,Z,e,A){var Q=g.nG(l,Ih);Q=await vLP(y,Q);const t=await RZy(y,Q);return ms({Tq:Q,D4:t},y,k,z,!!l.r8,r,Z,e,A)};
W8q=function(l,y,k,z,r,Z,e,A){var Q=g.nG(l,Ih);if(Q=BXC(y,Q))return ms({Tq:Q.Bu,D4:Q.signature},y,k,z,!!l.r8,r,Z,e,A)};
TQ_=async function(l,y,k){l.bq("oprd_s");y=I54(l)?await Dv5(l.CZ,y,k):l.CZ.decrypt(y,k);l.bq("oprd_c");return y};
qw=function(l){if(!l.Fz)return{};const y=l.Fz.D();y.d=l.Fz.PG?.jb();y.shost=l.JQ;y.ty="o";return y};
I54=function(l,y){return l.X("html5_onesie_sync_request_encryption")||y?.r8?!1:!!O0()};
VvC=function(l){return l.X("html5_onesie_host_probing")||l.Pi?MC:!1};
xY=function(l){if(!l.playerResponse)return!1;if(l.h8)return!0;var y=l.videoData.X("html5_onesie_audio_only_playback")&&gH(l.videoData);if(l.kd&&l.fZ){if(!l.kd.has(l.uA))return!1;const z=l.kd.get(l.uA);var k;if(k=z){k=!1;for(const r of z.lq.keys()){const Z=z.lq.get(r);if(Z)for(const e of Z.Bt)e.uR>0&&(Z.a9?k=!0:y=!0)}k=!(y&&k)}if(k)return!1}l.bq("ofr");l.kN.resolve(l.playerResponse);l.yd||(l.eT?.start(),l.eK.start());return l.h8=!0};
J$s=function(l){if(l.kd&&!l.X("html5_onesie_media_capabilities")){l.bq("ogsf_s");var y=MaT(l.Zr.getVideoData(),(z,r)=>{l.Md(z,r)}),k=PYs(l.Zr);
y.video=taC(k,y.video);l.bq("ogsf_c");if(y.video.length)return y;l.Md("ombspf",`l.${k.C};u.${k.Z};o.${k.N};r.${k.reason}`)}};
V5=function(l,y){if(y.IR()||l.IR())l.policy.jD||(l.policy.S?WY(l.loader):l.loader.LK());else{if(l.policy.N&&y.isComplete()&&y instanceof oM){var k=l.loader,z=k.Md;var r=Object.assign(y.Fz.D(),{rst:y.state,strm:y.xhr.iA(),d:y.Fz.PG?.jb(),cncl:y.xhr&&y.RU.J?1:0,rqb:y.Iz,cwt:y.RU.N,swt:y.eA?.MU});r=Object.assign(NXy(y.info),r);z.call(k,"rqs",r)}if(y.isComplete()&&y.jr()&&y instanceof oM)l.policy.PF?y.g6()?(y.dispose(),l.Z.length===0?l.loader.LK():(l=l.Z[0],l instanceof oM&&l.X4()&&l.GN())):y.R2()&&l.loader.handleError(y.eV(),
y.qG()):(y.dispose(),l.loader.LK());else{if(y.BP())l.gN=!0,y instanceof oM&&Biq(l.timing,y),Yas(l),IF(l);else if(y.R2())k=l.Zr.gQ(),y instanceof oM&&y.info.Z?.oH?.uX&&k&&l.loader.bA(k),y instanceof oM&&otC(y)?l.loader.bS?.N():y instanceof TZ?l.Z.pop():(k=1,y.canRetry()&&B4(l.loader)&&(p6_(l,y),k=0),l.loader.handleError(y.eV(),y.qG(),k));else{if(l.loader.isSuspended&&!y.isComplete())return;IF(l)}y.IR()||y instanceof TZ||(y.isComplete()?k=xvs(y,l.policy,l.V):(k=uX5(y,l.policy,l.V),k===1&&(l.kz=!0)),
k!==0&&(z=new K8T(1,y.info.pP),z.ZW=k===2,gMQ(l,z)));y.isComplete()&&(l.C9=!1,y.BP()||(l.gN=!1));l.policy.R7&&!y.isComplete()?D9(l.loader):l.loader.LK()}}};
EM_=function(l){l.policy.SN&&(l.rb=void 0,l.wD=0)};
nMT=function(l){if(!f5Q(l,l.Y))return PY(l,"ratelimited"),!1;if(Eg(l.audioTrack)&&Eg(l.videoTrack))return PY(l,"endofstream"),!1;if(l.policy.C)if(l.policy.J){if(l.A?.Y())return PY(l,"ssdaiblocked"),!1}else{var y=!1;if(l.b0.C===2)y=!0;else if(l.b0.C===3){J1(l);l.loader.w4();var k=JU(l.audioTrack,l.loader.isSeeking()).U1;var z=JU(l.videoTrack,l.loader.isSeeking()).U1;var r=l.loader.getCurrentTime()||0;k=YY(l,k,r);z=YY(l,z,r);z=Math.min(k,z);r=l.b0;z>=r.N?(r.Md("sdai",{haltrq:z,est:r.N}),z=!0):z=!1;
z&&(y=!0)}if(y)return PY(l,"waitingforads"),!1}l.policy.va&&(l.Ja=p8(l,l.audioTrack),l.HG=p8(l,l.videoTrack));if(!l.N)return K8(l,{nopolicy:1}),!0;if(l.Zr.gQ())return K8(l,{utc:1}),!0;if(l.C.K)return K8(l,{audio:1}),!0;if(l.policy.Cd&&l.C.D)return K8(l,{constraint:1}),!0;if(!l.N.targetAudioReadaheadMs||!l.N.targetVideoReadaheadMs)return K8(l,{noreadahead:1}),!0;if(l.policy.S&&l.loader.JR())return K8(l,{seekToHead:1}),!0;y=Math.min(io(l.loader,l.audioTrack)*1E3,l.N.targetAudioReadaheadMs);z=Math.min(io(l.loader,
l.videoTrack)*1E3,l.N.targetVideoReadaheadMs);r=Math.min(y,z);var Z=l.Zr.getCurrentTime()*1E3;const {F7:e,kD:A,Dm:Q,Cb:t}=jEC(l,Z);let O;k=e<r;O=A<r;if(gG(l)){Z=EF(l.J,Z);var d=Z<r;l.Zr.yM()&&d&&!k&&!O&&l.loader.Md("sabrcrnm",{cra:Z,mpra:r,cbrl:l.J.length})}if(!(k||O||gG(l)&&d))return l.policy.va&&l.Zr.yM()&&(Q<r||t<r)&&l.loader.Md("sabrncrq",{car:e,vac:A,abh:Q,vbh:t,mar:y,mvr:z}),PY(l,"readaheadmet"),!1;if(l.policy.Gx&&Sa_(l.loader)&&l.videoData.yf())return PY(l,"shortsbufferedtoend"),!1;if(l.policy.KN&&
Sa_(l.loader))return PY(l,"vodbufferedtoend"),!1;d=l.loader.Dp();d.car=e;d.vac=A;d.mar=y;d.mvr=z;d.tar=l.N.targetAudioReadaheadMs;d.tvr=l.N.targetVideoReadaheadMs;d.pcl=l.N.playbackCookie?.length||0;d.vbu=YR(l.Zr.fl()?.Cy()||null);d.abh=Q;d.vbh=t;K8(l,d);return!0};
F8s=function(l,y){const k=new K8T(0,l.Ej.C_,l);l.C.D=!1;return gMQ(l,k,y)};
oMy=function(l,y){nMT(l)&&(y=F8s(l,y),l.Z.push(y),l.sj?.Z(l.Ej.C_),l.D>0&&l.Y.Ia++)};
gMQ=function(l,y,k){var z={o7:l.o7,XF:(Z,e)=>{l.Zr.Eq(Z,e)},
Ae:l.policy.DY,Ad:l.policy.N,UR:l.policy.UR};l.o7.C.S&&(z.SE=(l.videoTrack.oR.info.CP||0)+(l.audioTrack.oR.info.CP||0));l.policy.DW&&(z.rq=l.audioTrack.oR.index.wc(),z.Ae=!1);var r=FAT(y,l.policy,l.V)?2:1;r!==l.C_&&(l.C_=r,Yas(l));k=l.qa(k);if(l.policy.D&&l.policy.N&&k.QC){let Z=r="";for(const e of k.QC)l.videoData.sabrContextUpdates.has(e)||l.policy.D&&k.lc&&k.lc.type===e?r+=`_${e}`:Z+=`_${e}`;l.loader.Md("sabrbldrqs",{ctxts:r,misctxts:Z})}!y.setData(k,l.policy,l.V)&&l.policy.D&&l.loader.handleError("player.exception",
{reason:"buildsabrrequestdatafailed"},1);z=new oM(l.policy,y,l.Ej,l.V,l,z,l.loader.xO());Fe(l.timing);l.policy.S2&&l.loader.Md("sabrcrqinfo",{rn:z.y9(),probe:y.jr()});return z};
p8=function(l,y){J1(l);l.loader.w4();return JU(y,l.loader.isSeeking())};
gG=function(l){return l.policy.hj&&!!l.S};
YY=function(l,y,k){l=l.loader.w4()||0;return EF(y,(k+l)*1E3)/1E3+k};
J1=function(l){const y=l.policy.S&&l.loader?.JR();var k=l.loader.getCurrentTime()||0;k=NQ5(l,k);a:if(l.policy.OG&&l.loader.isSeeking()){var z=W4(l.videoTrack,k);l.loader.Md("asmtfnctv",{b:k,a:z});if(!isNaN(z)){k=z;break a}}z=l.loader.w4()||0;k+=z;z=yi(l.videoData)||g.la(l.videoData);let r=0;y?(z&&(r=Number.MAX_SAFE_INTEGER),l.videoData.xa&&(r=Math.ceil(l.videoData.iW*1E3))):r=Math.ceil(k*1E3);return Math.min(Number.MAX_SAFE_INTEGER,r)};
NQ5=function(l,y){if(l.loader.isSeeking())return y;var k=l.Zr.fl();if(!k)return y;k=k.Cy();if(k.length===0||D4(k,y))return y;if(!l.videoTrack.i4(y)&&!l.audioTrack.i4(y))return l.loader.Md("sundrn",{b:0,lt:y}),y;let z=y,r=Infinity;for(let Z=0;Z<k.length;Z++){if(k.start(Z)>y)continue;const e=y-k.end(Z);e<r&&(r=e,z=k.end(Z))}return z!==y&&(l.loader.Md("sundrn",{bre:z,lt:y}),r>=20)?(l.loader.handleError("player.exception",{reason:"bufferunderrunexceedslimit"}),y):z};
EF=function(l,y){let k=0,z=-1;for(const r of l)if(!(r.startTimeMs+r.durationMs<y)){if(z<0&&r.startTimeMs>y||z>=0&&r.oF>z+1)break;k=Math.max(k,r.startTimeMs+r.durationMs);z=Math.max(z,r.Da)}return Math.max(0,k-y)};
f5Q=function(l,y){a:{if(l.D>0){var k=Math.floor((0,g.f)()/1E4);if(k===y.jq){if(y.Ia>=l.D){y.Ia===l.D&&(k={reason:"toomanyrequests"},k.limit=y.Ia,l.loader.handleError("player.exception",k),y.Ia+=1);y=!1;break a}}else y.jq=k,y.Ia=0}y=!0}return!y||l.loader.isSuspended&&l.loader.KL?!1:l.K&&(0,g.f)()<l.K?(l.loader.po.Kl(),!1):l.Z.length>0&&(!l.policy.D||l.Z.length!==1||!l.Z[0].rE())||!l.Ej.C_?.K(l.policy,l.V,l.loader.xE)||l.Xr?!1:!0};
PY=function(l,y){l.mK=y;l.policy.S2&&l.loader.Md("sabrcrb",{reason:y})};
K8=function(l,y){l.mK=void 0;l.hv=(0,g.f)();l.policy.S2&&l.loader.Md("sabrcrq",y)};
jEC=function(l,y){const {Dm:k,Cb:z}=sEe(l);let r;l.policy.va?(r=EF(l.Ja.U1,y),l=EF(l.HG.U1,y)):(r=k,l=z);return{F7:r,kD:l,Dm:k,Cb:z}};
Yas=function(l){l.videoData.rb.clear();if(l.videoData.sabrContextUpdates.size>0)for(var y of l.videoData.sabrContextUpdates.keys())l.videoData.sabrContextUpdates.get(y)?.sendByDefault&&l.videoData.rb.add(y);if(l.policy.D&&l.Z.length)for(const k of l.Z)(y=k.Bx())&&y.type&&y.sendByDefault&&l.videoData.rb.add(y.type)};
IF=function(l){for(;l.Z.length&&l.Z[0].by(l.Qi());){const y=l.Z.shift();L84(l,y)}l.Z.length&&L84(l,l.Z[0])};
L84=function(l,y){y instanceof oM&&(l.u0=y);var k=new Set(y.nx(l.Qi()));for(const e of k){if(k=y instanceof TZ){k=l.C;var z=k.Ej.UA,r=zZ(k.videoInfos,z);z=jdQ(k,e,z);var Z=r.includes(e);!k.rZ.NU||z||Z||k.loader.Md("sabrcpf",{fid:`${e}`,vfids:`${r.join(".")}`,said:k.A||""});k=!(z||r.includes(e))}if(k)continue;k=y.Yh(e,l.Qi());r=l.policy.hj&&E1(k[0].oR.info.mimeType);if(!y.LA(e,l.Qi()))continue;z=y.AV(e,l.Qi());for(const A of z){l.policy.N&&y instanceof TZ&&l.loader.Md("omblss",{s:A.info.rY()});if(r){z=
l.timing;z.C_||(z.C_=(0,g.f)(),g.TH("fcb_r",z.C_,z.Z));z=l;z.videoData.UA()&&z.S&&I9(z.S)===I9(g.Bt(A.info.oR.info,z.Ej.UA))&&z.Zr.publish("sabrCaptionsDataLoaded",A,z.Mu.bind(z));continue}z=A.info.oR.info.a9();Z=A.info.oR;const Q=y instanceof TZ?1:2;if(z){if(KAt(l.C,Z,Q,y.E4(l.Qi())?.token))continue}else Jsz(l.C,Z,Q,y.E4(l.Qi())?.token);Z=z?l.audioTrack:l.videoTrack;y instanceof TZ&&(Z.S=!1,y instanceof TZ&&(z?vtC(l.timing):L6_(l.timing)));try{P4(Z,k,A)}catch(t){z=ah(t),l.loader.handleError(z.errorCode,
z.details,z.severity),Z.YF(),l.fB(!1,"pushSlice"),WY(l.loader)}}}};
p6_=function(l,y){l.policy.D?l.Z.splice(l.Z.indexOf(y)).forEach(k=>{k.dispose()}):(l.Z.pop(),y?.dispose())};
vMP=function(l,y,k){const z=[];for(let r=0;r<l.Z.length;r++)y&&l.Z[r]instanceof TZ?z.push(l.Z[r]):(l.policy.S2&&l.loader.Md("sabrdis",{d:l.Z[r].y9(),src:k}),l.Z[r].dispose());l.Z=z};
BQT=function(l,y){if(y.R2()||y.IR()){var k=l.loader,z=k.Md,r=y.state;l=l.Qi();y=y.kd?.get(l)?.A()??-1;z.call(k,"sabromb",{s:r,tbytes:y})}else l.xz=!0,l.Z.push(y),y.vy.push(l),Fe(l.timing),l.policy.hk&&y.WQ&&l.gD(y.WQ,y.y9())};
sEe=function(l){const y=xi(l.audioTrack,!0)*1E3;l=xi(l.videoTrack,!0)*1E3;return{Dm:y,Cb:l}};
HbP=function(l,{gH:y,k0:k}){if(y===void 0)return!1;y=k?l.Zr.Wz(y):y;if(y=!l.loader.i4(y)&&f5Q(l,l.Oj)){y=l.Zr.getCurrentTime()*1E3;const {F7:z,kD:r}=jEC(l,y);y=z>=7E3&&r>=7E3}return y};
Rq4=function(l,y){l.delay?.dispose();l.delay=null;const k=Array.from(l.Z.values()).sort((z,r)=>z.mediaTime-r.mediaTime);
k.length!==0&&(y=(k[0].mediaTime-y)*1E3/l.Zr.getPlaybackRate(),l.delay=new g.B_(()=>{f8(l)},y>500?y-500:y),l.delay.start())};
f8=function(l,y){if(ai(l.Zr.getPlayerState())&&l.Z.size!==0){y=y??Array.from(l.Z.values()).sort((r,Z)=>r.mediaTime-Z.mediaTime);
var k=l.getCurrentTime(),z=(y[0].mediaTime-k)*1E3/l.Zr.getPlaybackRate();if(z<500){k=z>0?l.Zr.fl()?.getCurrentTime()??l.Zr.getCurrentTime():k;for(const r of y)if(k>=r.mediaTime)r.resolve([r.mediaTime,r.id]),l.Z.delete(r.id);else break}Rq4(l,k)}};
DNg=function(l,y,k){l.Z.delete(k);return new Promise(z=>{l.Z.set(k,{id:k,mediaTime:y,resolve:z});z=Array.from(l.Z.values()).sort((r,Z)=>r.mediaTime-Z.mediaTime);
k===z[0].id&&f8(l,z)})};
yQg=function(l){const y=l.Zr.fl()?.getCurrentTime()??l.Zr.getCurrentTime(),k=l.V.NL(y);lPC(l,k,y);l.isSeeking=!1;var z=Array.from(l.Z.keys()).filter(r=>r>=k).sort((r,Z)=>r-Z);
for(const r of z)z=r===k?y-l.V.getStartTime(k):0,l.K(r,l.Z.get(r),z)};
kIC=function(l,y,k,z=!1){y!==l.Ol&&(l.Ol=y,l.Zr.publish("playbackstarted",y,k+l.Zr.w4(),z))};
lPC=function(l,y,k){const z=l.Z.get(y),r=l.V.getStartTime(y),Z=l.V.getDuration(y);let e=r;(z?.Z??[l.cpn]).forEach((A,Q)=>{const t=z?.C[Q]??Z;k>=e&&k<e+t&&(Q=A!==l.cpn?e-(z?.V[Q]??0):e,l.C=A,kIC(l,A,Q,!0));e+=t})};
zOT=function(l,y){(l.N.get(y)??[]).forEach(k=>{l.J.Z.delete(k)});
l.N.delete(y)};
rQs=function(l,y,k,z){l.C=k;k=`${y}.${k}`;l.N.has(y)?l.N.get(y).push(k):l.N.set(y,[k]);DNg(l.J,z,k).then(([r,Z])=>{const [e,A]=Z.split(".");[,Z]=[Number(e),A];kIC(l,Z,r)})};
eOq=function(l,y,k,z,r,Z){return y.V9&&y.WG&&k===3?new ZV5(l,y,z,r,Z):null};
AQ5=function(l,y){if(l.policy.VI){var k=y.info.CP,z=AJ(l.schedule);y=y.index.wc();k=Math.max(1,z/k);l.A=Math.round(Math.max(((k-1)*y+l.policy.OA)/k,y-l.policy.eE)*1E3)}};
tdz=function(l,y){var k=Date.now()/1E3,z=k-l.startTimeSecs;const r=k-l.S;var Z=r>=l.policy.Gw,e=!1;if(Z){let A=0;!isNaN(y)&&y>l.J&&(A=y-l.J,l.J=y);A/r<l.policy.wL&&(e=!0);l.S=k}k=z>=l.policy.eE&&!l.N;if(!Z&&!k&&$Oe(l,y))return NaN;k&&(l.N=!0);a:{z=e;k=(0,g.f)()/1E3-(l.oX.B1()||0)-l.K.Z-l.policy.OA;Z=l.C.startTime;k=Z+k;if(z){if(isNaN(y)){jl(l,NaN,"n",y);Z=NaN;break a}z=y-l.policy.CJ;z<k&&(k=z)}else l.N&&(z=k+l.policy.OA-l.C_+l.policy.lK,isNaN(y)||(z=Math.max(z,Math.min(k,y-l.policy.CJ))),k=z);Z=k=
Math.max(k,Z)}l.Z=Z;if(isNaN(l.Z))return l.clear(),NaN;if(!e&&$Oe(l,y))return Q95(l,y),NaN;if(l.Z<=l.C.startTime)return jl(l,NaN,"y",y),l.clear(),NaN;if(!l.D(l.Z,!1))return!Q95(l,y)&&e&&(jl(l,NaN,"t",y),l.clear()),NaN;e=l.Z;jl(l,e,"s",y);l.clear();return e};
$Oe=function(l,y){return isNaN(y)?!0:isNaN(l.Z)?!1:y<l.Z+(l.N?l.policy.CJ:l.policy.yI)};
Q95=function(l,y){return l.D(l.Z,!0)?!1:(jl(l,NaN,"ns",y),l.clear(),!0)};
jl=function(l,y,k,z){const r=l.V.qG();r.ssr_sk=(y*1E3).toFixed(0);r.ssr_t=(l.Z*1E3).toFixed(0);r.ssr_r=k;r.ssr_st=(l.startTimeSecs*1E3).toFixed(0);r.ssr_n=(0,g.f)().toFixed(0);r.ssr_f=(l.K.Z*1E3).toFixed(0);r.ssr_fa=l.N?"1":"0";r.ssr_o=(l.oX.B1()*1E3||0).toFixed(0);r.ssr_v=(z*1E3).toFixed(0);y=l.C.oR.index;y.CK(l.C.n_,!0)&&(r.ssr_ist=(y.getStartTime(l.C.n_)*1E3).toFixed(0),r.ssr_id=(y.getDuration(l.C.n_)*1E3).toFixed(0));l.loader.Md("ssr",r)};
OVQ=function(){const l={},y=window.performance;if(y){const k=y.memory;k&&(l.jsTotal=k.totalJSHeapSize,l.jsUsed=k.usedJSHeapSize,l.jsLimit=k.jsHeapSizeLimit,l.msTotal=k.getMediaSourceTotalAllocatedMemory?.()??k.totalMediaSourceSize,l.msLimit=k.getMediaSourceMaximumMemoryCapacity?.()??k.mediaSourceSizeLimit,l.msUsed=k.getMediaSourceCurrentMemoryCapacity?.()??k.usedMediaSourceMemorySize);y.measureAvailableCpuMemory&&(l.cbFree=y.measureAvailableCpuMemory());y.measureUsedCpuMemory&&(l.cbUsed=y.measureUsedCpuMemory())}window.h5vcc?.cVal&&
(l.cbFree=window.h5vcc.cVal.getValue("Memory.CPU.Free"),l.cbUsed=window.h5vcc.cVal.getValue("Memory.CPU.Used"),l.cbJs=window.h5vcc.cVal.getValue("Memory.JS"));return l};
dOz=function(l){return window.PressureObserver&&new window.PressureObserver(l)};
wyy=async function(l){try{await l.J}catch{}l.N?.disconnect()};
GIC=function(l,y){y?hOC.test(l):(l=g.MK(l),Object.keys(l).includes("cpn"))};
Sl=function(l,y,k,z,r,Z){const e={format:"RAW"},A={};if(bO(l)&&F8()){const Q=g.Y("EOM_VISITOR_DATA");Q?A["X-Goog-EOM-Visitor-Id"]=Q:z?A["X-Goog-Visitor-Id"]=z:g.Y("VISITOR_DATA")&&(A["X-Goog-Visitor-Id"]=g.Y("VISITOR_DATA"));k&&(A["X-Goog-PageId"]=k);(z=y.sj)&&!V6(y)&&(A["X-Goog-AuthUser"]=z);r&&(A.Authorization=`Bearer ${r}`);y.X("enable_datasync_id_header_in_web_vss_pings")&&y.U7&&y.datasyncId&&(A["X-YouTube-DataSync-Id"]=y.datasyncId);if(y.X("enable_rollout_token_header")){const t=g.Y("INNERTUBE_CONTEXT")?.client?.rolloutToken;
t&&(A["X-YouTube-Rollout-Token"]=t)}Q||A["X-Goog-Visitor-Id"]||r||k||z?e.withCredentials=!0:y.X("html5_send_cpn_with_options")&&hOC.test(l)&&(e.withCredentials=!0)}Object.keys(A).length>0&&(e.headers=A);Z&&(e.onFinish=Z);return Object.keys(e).length>1?e:null};
n8=function(l,y,k,z,r,Z,e,A){F8()&&k.token&&(l=cq(l,{ctt:k.token,cttype:k.i7,mdx_environment:k.mdxEnvironment}));z.X("net_pings_low_priority")&&(y||(y={}),y.priority="low");Z||A&&z.X("nwl_skip_retry")?(y==null?y={}:GIC(l,z.X("html5_assert_cpn_with_regex")),e?N8().sendAndWrite(l,y):N8().sendThenWrite(l,y,A)):y?(GIC(l,z.X("html5_assert_cpn_with_regex")),ddP(l,y)):g.Eb(l,r)};
aP5=function(l){const y=[];for(let k=0;k<l;k++){const z={},r=Math.floor(Math.random()*9*1E8)+1E8;let Z="";for(let e=0;e<9;e++)Z+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(Math.random()*52)];z.videoDecoderName=Z;z.elapsedTimeMs=r;y.push(z)}return y};
iV4=function(l){return window.Profiler&&new window.Profiler(l)};
UO5=function(l){/[^a-zA-Z0-9;.!_-]/.test(l)&&(l=l.replace(/[+]/g,"-").replace(/[^a-zA-Z0-9;.!_-]/g,"_"));return l};
Mdz=function(l){const y=l.sampleInterval,k=l.maxBufferSize;if(y>0&&k>0&&!l.C&&l.N<1E7)try{l.V=l.J({sampleInterval:y,maxBufferSize:k}),l.V?.addEventListener("samplebufferfull",async()=>{await l.stop();Mdz(l)})}catch(z){l.C=UO5(z.message)}};
FQ=function(l,y){l=window.h5vcc?.settings?.set(l,y);return q9(l)?FX(fE(l),()=>!0,()=>!1):fE(!!l)};
Xys=function(l){return FQ("MediaSource.EnableUsingMediaSourceBufferedRange",l?1:0)};
cQy=function(l){return FQ("HTTP3",l?1:0)};
Cx_=function(l){return FQ("MediaSource.EnableUsingMediaSourceAttachmentMethods",l?1:0)};
bVt=function(l){return FQ("QUIC",l?1:0)};
ug_=function(l){return FQ("Media.AudioWriteDurationLocal",l)};
xO5=function(l){return FQ("Media.PlayerConfiguration.DecodeToTexturePreferred",l?1:0)};
mOC=function(l){return FQ("Media.VideoDecoderPollIntervalMs",l)};
qLT=function(l){return FQ("Media.VideoInitialMaxFramesInDecoder",l)};
WaT=function(l){return FQ("Media.AppendFirstSegmentSynchronously",l?1:0)};
IP4=function(l){return FQ("Media.IncrementalParseLookAhead",l?1:0)};
TFq=function(l){return FQ("Media.EnableResetAudioDecoder",l?1:0)};
VdC=function(l){return FQ("Media.EnableFlushDuringSeek",l?1:0)};
PxP=function(l){return FQ("DecoderBuffer.EnableInPlaceReuseAllocatorBase",l?1:0)};
JQg=function(l){return FQ("Media.ExperimentalMaxPendingBytesPerParse",l)};
YLz=function(l){return FQ("Media.MaxSamplesPerWrite",l)};
Ka4=function(){var l=window.h5vcc?.settings?.getPersistentSettingAsString?.("cpu_usage_tracker_intervals");if(l!=null){l=JSON.parse(l)??[];var y=l.filter(k=>k.type==="total").map(k=>k.seconds);
for(const k of pyC)y.indexOf(k)===-1&&l.push({type:"total",seconds:k});window.h5vcc?.settings?.set("cpu_usage_tracker_intervals_enabled",1);window.h5vcc?.settings?.set("cpu_usage_tracker_intervals",JSON.stringify(l))}};
g$P=function(){var l=window.H5vccPlatformService;let y="";if(l&&l.has("dev.cobalt.coat.clientloginfo")&&(l=l.open("dev.cobalt.coat.clientloginfo",()=>{}))){const k=l.send(new ArrayBuffer(0));
k&&(y=String.fromCharCode(...(new Uint8Array(k))));l.close()}return y};
E$_=function(l){var y=window.H5vccPlatformService;y?.has("com.google.android.youtube.tv.prodlogger")&&(y=y.open("com.google.android.youtube.tv.prodlogger",()=>{}))&&(y.send(W5(`cpn: ${l}`).buffer),y.close())};
g.Nw=function(l,y,k,z){oF(l,k,`${y.toFixed(3)}:${z.join(":")}`)};
sF=function(l,y){var k=l.provider.getCurrentTime();g.Nw(l,y,"cmt",[k.toFixed(3)]);var z=k=l.provider.YK();if((!l.C||l.provider.cG.X("html5_shorts_gapless_no_gllat")&&jn(l.provider.videoData)?0:z*1E3>l.C.mP+100)&&l.C){z=l.C.isAd;k=k*1E3-l.C.mP;l.q$=y*1E3-l.C.WY-k-l.C.j_;var r=(0,g.f)()-k;y=l.q$;k=l.provider.videoData;var Z=k.isAd();if(z||Z){Z=`${z?"ad":"video"}_to_${Z?"ad":"video"}`;var e={};k.a4&&(e.cttAuthInfo={token:k.a4,videoId:k.videoId});e.startTime=r-y;p4(Z,e);g.YV({targetVideoId:k.videoId,
targetCpn:k.clientPlaybackNonce},Z);Jt("pbs",r,Z)}else r=l.provider.Zr.SV(),r.S!==k.clientPlaybackNonce?(r.J=k.clientPlaybackNonce,r.C=y):k.yf()||g.WH(new g.WO("CSI timing logged before gllat",{cpn:k.clientPlaybackNonce}));l.Md("gllat",{l:l.q$.toFixed(),prev_ad:+z});delete l.C}};
oF=function(l,y,k){const z=l.Z.get(y);z?z.push(k):l.Z.set(y,[k])};
L8=function(l,y,k){if(!isNaN(k.M1)){let z=k.M1;k.C<z&&(z=k.C);g.Nw(l,y,"bh",[z.toFixed(3)])}};
BY=function(l,y=NaN){y=y>=0?y:g.vY(l.provider);const k=l.provider.Zr.AB();var z=k.Ai-(l.rb||0);z>0&&g.Nw(l,y,"bwm",[z,(k.FF-(l.g4||0)).toFixed(3)]);isNaN(l.rb)&&k.Ai&&l.isOffline&&l.nZ(!1);l.rb=k.Ai;l.g4=k.FF;isNaN(k.bandwidthEstimate)||g.Nw(l,y,"bwe",[k.bandwidthEstimate.toFixed(0)]);l.provider.cG.yM()&&Object.keys(k.Z).length!==0&&l.Md("bwinfo",k.Z);if(l.provider.cG.yM()||l.provider.cG.X("html5_log_meminfo"))z=OVQ(),Object.values(z).some(r=>r!==void 0)&&l.Md("meminfo",z);
l.provider.cG.yM()&&(z=l.Xr?.V())&&Object.values(z).some(r=>r!=null)&&l.Md("cpuinfo",z);
l.u0&&l.Md("jsprof",l.u0.flush());l.A&&g.Nw(l,y,"bat",[l.A.level,l.A.charging?"1":"0"]);z=l.provider.Zr.getVisibilityState();l.SN!==z&&(g.Nw(l,y,"vis",[z]),l.SN=z);sF(l,y);(z=fP_(l.provider))&&z!==l.MW&&(g.Nw(l,y,"conn",[z]),l.MW=z);L8(l,y,k)};
SLz=function(l,y,k){const z=g.vY(l.provider);j9C(l,z,y,0,k);BY(l,z);HY(l)};
RF=function(l,y){oF(l,"cat",y)};
n$_=function(l){var y=l.provider.Zr.AB();const k=g.vY(l.provider);L8(l,k,y);const z=y.N;y=y.V;isNaN(z)||(l.provider.cG.X("html5_unified_live_latency_reporting")&&!isNaN(y)&&y?g.Nw(l,k,"e2el",[z.toFixed(3),y.toFixed(3)]):g.Nw(l,k,"e2el",[z.toFixed(3)]))};
Fa_=function(l,y){y={cpn:l.provider.videoData.clientPlaybackNonce,sequenceNumber:y,serializedWatchEndpointLoggingContext:l.provider.videoData.St};l.serializedHouseBrandPlayerServiceLoggingContext&&(y.serializedHouseBrandPlayerServiceLoggingContext=fx(l.serializedHouseBrandPlayerServiceLoggingContext)||void 0);l.provider.videoData.playerResponseCpn&&(y.playerResponseCpn=l.provider.videoData.playerResponseCpn);Dd.length&&(y.decoderInfo=Dd);l.remoteControlMode&&(y.remoteControlMode=l.remoteControlMode);
l.remoteConnectedDevices.length&&(y.remoteConnectedDevices=l.remoteConnectedDevices);if(l.Pe?.length){y.serializedQoeContextData=[];for(var k of l.Pe){const z=GC(k);z&&y.serializedQoeContextData.push(z)}}l.provider.X("html5_send_serialized_one_time_qoe_context_data")&&!l.mK&&l.provider.videoData.serializedOneTimeQoeContextData&&(y.serializedOneTimeQoeContextData=[],k=GC(l.provider.videoData.serializedOneTimeQoeContextData))&&(y.serializedOneTimeQoeContextData.push(k),l.mK=!0);return y};
o$s=function(l,y,k){g.jz(l.provider.cG,l.provider.videoData.S()).then(z=>{var r=!1;y.includes("&dt=")||y.includes("&cotn=")?r=!0:l.provider.cG.X("qoe_with_networkless")&&(r=!0);const Z=l.provider.cG.X("qoe_send_and_write");var e=l.provider.cG;z=Sl(y,e,l.provider.cG.pageId,l.provider.cG.sendVisitorIdHeader?l.provider.videoData.visitorData:void 0,z);e.X("html5_simplify_pings")&&(z=z||{});z?(z.method="POST",z.postBody=k,n8(y,z,{token:l.provider.videoData.a4,i7:l.provider.videoData.XT,mdxEnvironment:l.provider.videoData.mdxEnvironment},
e,void 0,r,Z&&l.sj)):r?(r=l.provider.cG.X("networkless_ajax"),e={method:"POST",postBody:k},Z&&l.sj?N8().sendAndWrite(y,e):r?g.o3(y,{method:"POST",postBody:k}):N8().sendThenWrite(y,e)):kg5(y,k)})};
HY=function(l){if(!l.provider.cG.X("html5_qoe_no_len_check")){var y=0;for(const [k,z]of l.Z.entries())y+=k.length+Number(ve(z,(r,Z)=>r+Z.length,0));
y>96E3&&(new g.B_(l.reportStats,0,l)).start()}};
NFs=function(l){l.provider.videoData.S2&&RF(l,"prefetch");l.provider.videoData.mK&&l.Md("reload",{r:l.provider.videoData.reloadReason,ct:l.provider.videoData.mK});l.provider.videoData.vZ&&RF(l,"monitor");l.provider.videoData.isLivePlayback&&RF(l,"live");MC&&RF(l,"streaming");l.provider.videoData.N7&&l.Md("ctrl",{mode:l.provider.videoData.N7},!0);if(l.provider.videoData.j5){var y=l.provider.videoData.j5.replace(/,/g,"_");l.Md("ytp",{type:y},!0)}l.provider.videoData.Ez&&(y=l.provider.videoData.Ez.replace(/,/g,
"."),l.Md("ytrexp",{ids:y},!0));l.provider.cG.yM()&&l.Md("now",{wt:(0,g.f)()});y=l.provider.videoData;var k=l.provider.cG.X("enable_white_noise")||l.provider.cG.X("enable_webgl_noop");const z=g.oH(y)||g.kk(y)||g.z3(y)||g.ru(y);(k||z)&&(k=(0,g.lm)())&&l.Z.set("gpu",[k]);Qi(l.provider.videoData)&&g.Nw(l,g.vY(l.provider),"dt",["1"]);y.cotn&&!Qi(y)&&l.nZ(!0);l.provider.cG.yM()&&(y=(0,g.f)()-l.provider.cG.va,l.Md("playerage",{secs:(1.6**Math.round(Math.log(y/1E3)/Math.log(1.6))).toFixed()}));l.J=!0;l.C_=
g.Yu(()=>{l.reportStats()},1E4)};
j9C=function(l,y,k,z,r){var Z=l.provider.cG.Z.cbrver;l.provider.cG.Z.cbr==="Chrome"&&/^96[.]/.test(Z)&&k==="net.badstatus"&&/rc\.500/.test(r)&&yB(l,3);l.provider.cG.X("html5_use_ump")&&/b248180278/.test(r)&&yB(l,4);Z=l.provider.getCurrentTime();z=z===1?"fatal":"";k=[k,z,Z.toFixed(3)];z&&(r+=`;a6s.${$W()}`);r&&k.push(s9C(r));g.Nw(l,y,"error",k);l.J=!0};
yB=function(l,y){l.gb||(oF(l,"fcnz",`${y}`),l.gb=!0)};
LaQ=function(l){l.V>=0||(l.provider.cG.wY||l.provider.Zr.getVisibilityState()!==3?l.V=g.vY(l.provider):l.PG=!0)};
v$y=function(l,y){let k;l.provider.videoData.PF()?(l=4,k=1):l=y.source??0;l=`${"sms"}.${l}`;k!==void 0&&(l+=`_${k}`);return l};
kI=function(l,y,k,z,r){const Z=g.vY(l.provider);y!==1&&y!==3&&y!==5||g.Nw(l,Z,"vps",[l.fp]);oF(l,"xvt",`t.${Z.toFixed(3)};m.${r.toFixed(3)};g.${2};tt.${y};np.${0};c.${k};d.${z}`)};
s9C=function(l){/[^a-zA-Z0-9;.!_-]/.test(l)&&(l=l.replace(/[+]/g,"-").replace(/[^a-zA-Z0-9;.!_-]/g,"_"));return l};
io=function(l,y){if(l.PG&&!l.F4)return 3;if(l.isSuspended)return 1;if(l.yj?.HG())return 4;let k=(y.oR.info.audio?l.policy.Oj:l.policy.rb)/(y.CP*l.policy.Gz);if(l.policy.jW>0&&l.yj&&$X(l.yj)&&(y=y.oR.info.video?l.yj.C:l.yj.Z)&&!y.U6()){y=y.Za();const z=Rh(y,l.getCurrentTime());z>=0&&(y=l.getCurrentTime()-y.start(z),k+=Math.max(0,Math.min(y-l.policy.jW,l.policy.uv)))}l.policy.Ja>0&&(k=Math.min(k,l.policy.Ja));return k};
CX=function(l,y,k){BFC(l,k.gY||"unknown");l.Zr.seekTo(y,k)};
LX=function(l,y,k,z,r){l.Zr.getVideoData().j2()?r&&l.C.RR+r/1E3>k&&(l.Md("sdai",{seg:z,rbt:k.toFixed(3),end:l.C.RR.toFixed(3),sd:r.toFixed(3)}),l.fB(!1,"rollback")):l.policy.C&&l.fB(!1,"rollback");if(l.Ej.isManifestless){r=py(l.audioTrack,z,k,y);var Z=py(l.videoTrack,z,k,y);l.policy.vn||(Z&&gb(l.Ej,z,!0),r&&gb(l.Ej,z,!1));Z&&(l.videoTrack.D=[]);r&&(l.audioTrack.D=[]);l.Md("sdai",{rollbk2_seg:z,rbt:k.toFixed(3),lt:y.toFixed(3),a:r,v:Z});(r||Z)&&l.policy.C&&WY(l)}};
TX_=function(l){const y=l.XJ().filter(k=>k.namespace==="ad");
for(const k of y)if(k.start/1E3>l.getCurrentTime())return k.start/1E3;return Infinity};
y5=function(l){var y=(0,g.f)();l.WP=y};
D9=function(l){l.policy.R7&&l.policy.hX&&Math.min(hZq(l.videoTrack),hZq(l.audioTrack))*1E3>l.policy.MA?l.g4.Kl():l.mI()};
Ly=function(l,y,k,z=!1){if(z&&!y.rb||l.policy.EE)eL()||(z=y.i5)&&!z.Vg(k.info)&&l.Zr.Ed(),y.rb=!0;y.oR!==k&&(y.oR=k)};
B4=function(l){return l.xE<l.hj};
Rb=function(l){l.YF();l.pE.isSeeking();l.A&&AQ5(l.A,l.videoTrack.oR);WY(l);return EXy(l.pE)};
zj=function(l){return l.Zr.getVideoData().UA()||l.policy.JI};
HVQ=function(l,y){return(io(l,y)+l.policy.UE)*y.CP};
Sa_=function(l){if(l.Zr.getVideoData().isLivePlayback)return!1;var y=l.Zr.fl();if(!y)return!1;y=y.getDuration();if(l.yj&&l.yj.Z&&l.yj.C){var k=l.getCurrentTime(),z=l.yj.Z.Za();l=l.yj.C.Za();z=z?lt(z,k):k;k=l?lt(l,k):k;k=Math.min(z,k);y=isNaN(k)?!1:k>=y-.01}else y=!1;return y};
WY=function(l){l.R7.Kl()};
eg=function(l,y){y&&rr(l.Zr,new Z1(y.video,y.reason));l.Z.Xr&&(y=Xv_(l.Z,"a"),l.Zr.yg(new Z1(y.audio,y.reason)))};
A3=function(l,y,k,z){const r=bG(y);!r||r.N||pV(r,z)||(k.abort(),l.policy.bG&&y.K?.K(),y.A?.K());if(!k.a8()||eL())try{l.policy.Vz?k.x4(z.oR.info.containerType,z.oR.info.Dr)&&k.Yo(z.oR.info.containerType,z.oR.info.Dr,z.oR.info.mimeType):k.DU(z.oR.info.containerType,z.oR.info.mimeType)}catch(Z){return g.WH(Z),l.Md("ctexp",{name:Z.name,msg:Z.message}),!1}else z.oR.info.containerType!==k.a8()&&l.Md("ctu",{ct:eL(),prev_c:k.a8(),curr_c:z.oR.info.containerType});z=z.oR.b0;l.policy.kE&&z&&(y=0+z.duration,
z=-z.Z,0===k.Qp()&&y===k.bf()||k.b7(0,y),z!==k.w4()&&(k.EG(z),c4&&eZC(l.audioTrack.SU(),k.lU())));return!0};
ROg=function(l,y,k){if(!(l.videoTrack.oR.Z()&&l.audioTrack.oR.Z()&&l.yj&&l.yj.C&&l.yj.Z))return!1;if(k&&l.Ej.isManifestless&&(l.videoTrack.J===-1||l.audioTrack.J===-1))return!0;const z=aM(l.videoTrack,y,k);if(isNaN(z))return!1;l=aM(l.audioTrack,l.policy.WG?y:z,k);return isNaN(l)?!1:!0};
DOt=function(l){l.N?.QB?.itagDenylist&&l.G4(l.N?.QB.itagDenylist);l.N?.playbackStartPolicy&&F0(l.policy,l.N?.playbackStartPolicy,3,l.N?.y9());if(l.policy.Jp){var y=l.Qi();(y=y?l.N?.Kr.get(y):void 0)&&l.C.XP(y,-1)}l.Ej.Y||(y=l.N?.TR,y?.tB&&y?.Ox&&l.Ej.UA&&EE(l.Ej,y.tB,y.Ox));if(l.N?.Mm){y=l.N.Mm.get(l.Qi()||"");if(!y)return;if(l.Ej&&y.formatId){const k=l.Ej.V.get(I9(y.formatId));k&&(k.info.debugInfo=y.debugInfo)}}l.policy.sj&&(l.N?.f0().forEach(k=>{l.Xu(k)}),l.N?.K7())};
y6e=function(l){if(!l.Ej.UA)return!0;var y=l.Zr.getVideoData();if(l.Zr.sG())return l.Md("ombpa",{}),!1;if(!!l.N?.TR?.PY!==l.Ej.aj)return l.Md("ombplmm",{}),!1;var k=y.Xr||y.liveUtcStartSeconds||y.mY;if(l.Ej.aj&&k)return l.Md("ombplst",{}),!1;if(l.Ej.Y)return l.Md("ombab",{}),!1;k=Date.now();return f2(l.Ej)&&!isNaN(l.Ja)&&k-l.Ja>l.policy.FM*1E3?(l.Md("ombttl",{}),!1):l.Ej.Vi&&l.Ej.C||sK(y)!==0&&!l.policy.Z||y.X("html5_disable_onesie_media_for_mosaic")&&y.RY()||y.X("html5_disable_onesie_media_for_lifa_eligible")&&
pc(y)?!1:l.Zr.O().sA().Z.G7(ly4)&&(y=l.N?.jF()??0,y>=0&&l.Ej.C&&(y<l.Ej.iW*1E3||y>l.Ej.Q4*1E3))?(l.Md("ombwnd",{st:y}),!1):l.Ej.Vi&&l.Ej.C?(l.Md("ombminsq",{}),!1):!0};
var ZeT=function(l,y){return Tx[G[19]](this,48,8079,l,y)};
var $I=function(l,y){const k=TI(y.oR,l.Ej.UA);var z=l.C_?.Yh(k)||[];if(z.length===0)return l.Md("ombmsi",{}),!1;z=new By(z);if((!l.policy.b0||isFinite(l.getCurrentTime())||l.Zr.gQ())&&!qPt(z,l.getCurrentTime()))return l.Md("ostmf",{ct:l.getCurrentTime(),a:y.oR.info.a9()}),!1;l.C_?.Ts(k);return!0},kQT=function(l,y){const k=y.oR;
var z=l.Ej.UA;if(y6e(l))if(l.C_&&l.C_.gA(TI(k,z))){if(z=TI(k,z),$I(l,y)){var r=new By(l.C_.Yh(z)),Z=e=>{try{e.R2()?(l.handleError(e.eV(),e.qG()),gE(y,e),Fg(e.info)&&sg(l.S,y,k,!0),l.mI()):v4(l.S,e)&&(l.V?.HG(e.info,l.m8),l.mI())}catch(A){e=ah(A),l.handleError(e.errorCode,e.details,e.severity),l.YF()}};
k.C_=!0;nV(r)&&(Vr(y,new wW(l.policy,z,r,l.C_,Z)),Fe(l.timing))}}else l.Md("ombfmt",{})},zE5=function(l){l.policy.J&&l.N&&(l.N.S4.forEach(y=>{l.CD(y,-1)}),l.N.S4=[])},QB=function(l,y){y=y||l.videoTrack&&l.videoTrack.Z&&l.videoTrack.Z.startTime||l.getCurrentTime();
var k=Ly,z=l.videoTrack,r=l.Z;y=r.nextVideo&&r.nextVideo.index.NL(y)||0;r.sj!==y&&(r.HG={},r.sj=y,ki(r,r.Z));y=!r.Z.isLocked()&&r.D>-1&&(0,g.f)()-r.D<r.policy.PM*1E3;const Z=r.nextVideo&&yr(r,r.nextVideo.info)*3<O2(r.b0);if(!y||Z)lG(r),rE(r),r.Y=r.Y||r.nextVideo!==r.N;r.nextVideo&&!r.nextVideo.index.isLoaded()&&(r.sj=-1);k(l,z,r.nextVideo);Ly(l,l.audioTrack,l.Z.C)},BFC=function(l,y){if(!isNaN(l.T7)){const k=Date.now()-l.T7;
k<1E4&&l.Md("bfaswtch",{ep:k,sk:y!==void 0?"1":"0",sr:y||""})}},r6T=function(l){l.policy.q_=!1;
try{l.dV()}catch(y){g.n(y)}},Z2T=function(l,y=!1){l.yj&&l.yj.Z&&l.yj.C&&(l.yj.Z.zN(l.mK,l),l.yj.C.zN(l.mK,l));
Ta(l.audioTrack,null,y);Ta(l.videoTrack,null,y);l.yj&&(l.yj.J=!1);l.yj=null},eEt=function(l,y,k=!1,z=!1){Ta(l.videoTrack,y.C||null,z);
Ta(l.audioTrack,y.Z||null,z);l.yj=y;l.yj.J=!0;k||l.resume();y.Z.IZ(l.mK,l);y.C.IZ(l.mK,l)},A6z=function(l,y,k=!1,z=!1){l.policy.HG&&(l.policy.RR&&l.Md("loader",{setsmb:0}),l.YF(),l.policy.HG=!1);
Z2T(l,z);if(!y.S()){const r=Mk(l.videoTrack),Z=Mk(l.audioTrack);iu5(y,(r?r.info.oR:l.videoTrack.oR).info,(Z?Z.info.oR:l.audioTrack.oR).info,l.policy.Q9)}eEt(l,y,k,z);try{l.mI()}catch(r){g.n(r)}},t3=function(l){l.yj&&l.yj.AC()&&l.Ux()},Q_g=function(l){l.xz&&!l.isSuspended&&ob(l.schedule)&&($25(l,l.xz),l.xz="")},O2C=function(l,y){Mk(y)?.isLocked&&t1s(y)&&(l.Zr.O().yM()&&l.Md("eosl",{munlock:Mk(y)?.info.rY()}),O_(l,y===l.audioTrack))},d2y=function(l){if(M3Q(l.videoTrack))return"ssf";
if(l.policy.Xr&&Mk(l.videoTrack)?.isLocked&&Mk(l.audioTrack)?.isLocked)return"updateEnd";if(Eg(l.audioTrack)||Eg(l.videoTrack)&&l.videoTrack.oR.info.Dr!=="f")return"";if(l.pE.isSeeking()){var y=l.D;var k=l.videoTrack;var z=l.audioTrack;if(y.policy.Z){var r=y.policy.PV;S$(y.policy)&&(r=dW(y,!1,O2(y)));y=r;k=xi(z,!0)>=y&&xi(k,!0)>=y}else k.C.length||z.C.length?(r=k.oR.info.CP+z.oR.info.CP,r=10*(1-O2(y)/r),y=Math.max(r,y.policy.PV),k=xi(z,!0)>=y&&xi(k,!0)>=y):k=!0;if(!k)return"abr";k=l.videoTrack;if(k.C.length>
0&&k.N.C.length===1&&SNQ(k.N).info.A<k.RR)return"seek"}if(l.policy.C&&XmC(l.videoTrack,l.V)&&XmC(l.audioTrack,l.V))return"ssdai";k=!l.policy.uW||l.getCurrentTime()<10;l.policy.Z||(k=k||l.videoTrack.oR.info.video.qualityOrdinal>360);if(!l.F4||k)return"";k=l.policy.uW;S$(l.policy)&&(k=dW(l.D,l.F4,O2(l.D)));k=aq4(l.videoTrack,l.getCurrentTime(),k)||aq4(l.audioTrack,l.getCurrentTime(),k);return S$(l.policy)?k?"mbnm":"":(l.videoTrack.C.length>0||l.audioTrack.C.length>0||Nq(l.S,l.videoTrack,l.audioTrack)||
Nq(l.S,l.audioTrack,l.videoTrack))&&k?"nord":""},wr=function(l,y,k,z){z.info.oR.Z();
var r=z.info.oR.C;if(!r||!k.Nn()||k.iO()===r)return!1;let Z=r;var e=k.oJ();if(l.policy.LZ&&e&&k.isView()&&g.Lk(z.info.oR.info)){const Q=new DataView(r.buffer,r.byteOffset,r.byteLength);(e=Fty(Q,e))?Z=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):l.Md("fenc",{})}l.policy.j3&&(e=wVe(l,z,new IG([Z])))&&(Z=MB(e));let A;(e=z.info.oR.K(0,z.info.clipId))&&(A=e.cF[0]);if(z===l.SN){if(l.HG+=1,l.Zr.getVideoData().X("html5_shorts_gapless_restart_on_init_seg_retries")&&l.HG>5)return l.HG=0,l.Zr.SZ({initSegStuck:1,
as:z.info.rY()}),!0}else l.HG=0,l.SN=z;l.policy.Hc&&(k.abort(),y.A?.K());r=hEP(l,k,Z,A,r);y.A?.D(r,A);if(r!==0)return l.policy.DJ&&jn(l.Zr.getVideoData())?(l.Zr.Kt()||dr(l,"sepInit",r,z.info),GQ5(l.Zr,"sie")):dr(l,"sepInit",r,z.info),!0;z.info.q4()?(y=l.timing,y.HG||(y.HG=(0,g.f)(),g.TH("vis_a",y.HG,y.Z))):(y=l.timing,y.K||(y.K=(0,g.f)(),g.TH("ais_a",y.K,y.Z)));(z=z.info.oR.YJ)&&l.Zr.Hd(new X0(z.key,z.type));return k.U6()},aye=function(l,y,k){if(l.policy.Xr&&Mk(y)?.isLocked)return!1;
if(k.aW())return!0;if(!k.Nn())return!1;const z=Mk(y);if(!z||z.info.type===6)return!1;if(l.policy.pj||l.V?.C_(y,z.info.n_))l.rb=0;else return l.pE.isSeeking()&&WY(l),l.rb=l.rb||(0,g.f)(),!1;if(!A3(l,y,k,z.info))return!1;if(l.Ej.N&&z.info.Z===0){var r;if(k.iO()==null){var Z=bG(y);if(!(r=!Z||Z.oR!==z.info.oR)){b:if(r=Z.C_,Z=z.info.C_,r.length!==Z.length)r=!1;else{for(var e=0;e<r.length;e++)if(!g.u2(r[e],Z[e])){r=!1;break b}r=!0}r=!r}}else r=k.iO(),z.info.oR.Ja()&&yA(z),Z=z.info.oR.C,r=r!==Z&&!g.u2(r,
Z);r&&(Z=bG(y),l.Md("initchg",{it:z.info.oR.info.id,sr:!!Z&&Z.oR===z.info.oR,ty:z.info.type,seg:z.info.n_}));Z=g.Lk(z.info.oR.info);l.policy.ji&&Z&&!r&&(g.Lk(z.info.oR.info)?(ed(g.l9(z),1836019574),ed(g.l9(z),1718909296)):(r=new AQ(g.l9(z)),BvC(r),tQ(r,524531317,!0),z.C=z.C.split(r.start+r.pos).iG),z.J=!1)}Z=l.A&&!!l.A.V&&y.oR.info.audio;r=l.Ej.isManifestless||z.J;if(!(l.Ej.N&&z.info.Z!==0||r&&!Z)&&wr(l,y,k,z))return!0;if(Z)return!1;Z=io(l,y);Z=l.getCurrentTime()+Z;if(z.info.V>Z)return l.policy.Z&&
(y===l.videoTrack?l.u0=l.u0||(0,g.f)():l.RR=l.RR||(0,g.f)()),l.policy.sQ&&JNQ(y.N,Z,!1),!1;y===l.videoTrack?l.u0=0:l.RR=0;l.policy.TJ&&k===l.yj?.Z&&l.Oj&&(k.S1()===0?(l.Oj=!1,l.policy.TJ=!1):l.kz=k.S1());a:{Z=l.policy.MW?(0,g.f)():0;e=z.J&&z.info.oR.C||void 0;var A=z.C;z.J&&(A=wVe(l,z,A)||A);const Q=MB(A);A=l.policy.MW?(0,g.f)():0;k=hEP(l,k,Q,z.info,e);y.A?.A(z.info,k,A-Z,(0,g.f)()-A);l.HG=0;if(k===0)l.PG&&(l.PG=!1,l.MW=!1),l.WG=0,k=!0;else{if(k===2||k===5)dr(l,"checked",k,z.info);else{if(k===1){if(!l.PG){l.PG=
!0;k=!1;break a}if(!l.MW){l.MW=!0;l.Zr.seekTo(l.getCurrentTime(),{gY:"quotaExceeded",Q0:!0});k=!1;break a}z.info.q4()?(Z=l.policy,Z.rb=Math.floor(Z.rb*.8),Z.Ja=Math.floor(Z.Ja*.8)):(Z=l.policy,Z.Oj=Math.floor(Z.Oj*.8),Z.Ja=Math.floor(Z.Ja*.8));l.policy.Z?rG(l.J,z.info.oR):Z9(l.Z,z.info.oR)}l.Zr.SZ({reattachOnAppend:k})}k=!1}}if(!k)return!1;l.policy.Xr&&z.info.S()?(l.Zr.O().yM()&&l.Md("eosl",{ls:z.info.rY()}),z.isLocked=!0):(y.nD(z),M7C(l.Z,z.info));r&&(y=z.info.oR.YJ)&&l.Zr.Hd(new X0(y.key,y.type));
return!0},wVe=function(l,y,k){var z;
if(z=l.policy.j3&&l.yj&&!l.yj.Y&&!l.Zr.xf())y=y.info.oR.info,z=y.Cg()&&y.V()&&y.video&&y.video.width<3840&&y.video.width>y.video.height;if(z&&(l.yj.Y=!0,XP('video/webm; codecs="vp09.00.50.08.01.01.01.01.00"; width=3840; height=2160')))return k=jD4(k),l.policy.N&&l.Md("sp4k",{s:!!k}),k},hEP=function(l,y,k,z,r){try{const Z=y===l.yj?.Z?l.audioTrack:l.videoTrack;
if(l.policy.Xr&&z?.S()){if(z?.Y>1)return 6;Z.Ja=new g.B_(()=>{const e=Mk(Z);l.IR()||!e?.isLocked?l.Zr.O().yM()&&l.Md("eosl",{delayA:e?.info.rY()}):t1s(Z)?(l.Zr.O().yM()&&l.Md("eosl",{dunlock:e?.info.rY()}),O_(l,Z===l.audioTrack)):(l.Md("nue",{ls:e.info.rY()}),e.info.Y+=1,l.yj&&l.dV())},1E4,l);
l.Zr.O().yM()&&l.Md("eosl",{delayS:z.rY()});Z.Ja.start()}l.policy.DX&&z?.oR instanceof p2&&z.S()&&l.Md("poseos",{itag:z.oR.info.itag,seg:z.n_,lseg:z.oR.index.x3(),es:z.oR.index.S});y.appendBuffer(k,z,r)}catch(Z){if(Z instanceof DOMException){if(Z.code===11)return 2;if(Z.code===12)return 5;if(Z.code===22||Z.message.indexOf("Not enough storage")===0)return y=Object.assign({name:"QuotaExceededError",buffered:YR(y.Za()).replace(/,/g,"_"),vheap:Yi(l.videoTrack),aheap:Yi(l.audioTrack),message:g.Kx(Z.message,
3),track:l.yj?y===l.yj.C?"v":"a":"u"},OVQ()),l.handleError("player.exception",y),1;g.n(Z)}return 4}return l.yj.AC()?3:0},dr=function(l,y,k,z){let r="fmt.unplayable",Z=1;
k===5||k===3?(r="fmt.unparseable",l.policy.Z?!z.oR.info.video||RM(l.J.Z).size>0||rG(l.J,z.oR):!z.oR.info.video||RM(l.Z.J).size>0||Z9(l.Z,z.oR)):k===2&&(l.WG<15?(l.WG++,r="html5.invalidstate",Z=0):r="fmt.unplayable");z=fV(z);z.mrs=l.yj?.N();z.origin=y;z.reason=k;z.trg="appenderr";l.handleError(r,z,Z)},rsT=function(l,y,k,z,r){var Z=l.Ej;
var e=l.policy.Z,A=!1;let Q=-1;for(const d in Z.Z){var t=E1(Z.Z[d].info.mimeType)||Z.Z[d].info.q4();if(z===t)if(t=Z.Z[d].index,t.CK(y.n_)){{A=t;var O=y;const w=A.N(O.n_);w&&w.startTime!==O.startTime?(A.segments=[],A.K(O),A=!0):A=!1}A?Q=y.n_:!y.pending&&e&&(O=t.getDuration(y.n_),O!==y.duration&&(Z.publish("clienttemp","mfldurUpdate",{itag:Z.Z[d].info.itag,seg:y.n_,od:O,nd:y.duration},!1),t.K(y),A=!0))}else t.K(y),A=!0}Q>=0&&Z.publish("clienttemp","resetMflIndex",{[z?"v":"a"]:Q},!1);Z=A;jis(l.pE,y,
z,Z);l.policy.sj||l.V.T4(y,k,z,r);y.n_===l.Ej.Vi&&Z&&J6(l.Ej)&&y.startTime>J6(l.Ej)&&(l.Ej.iW=y.startTime+(isNaN(l.timestampOffset)?0:l.timestampOffset),l.pE.isSeeking()&&l.pE.targetTime<l.Ej.dY()&&l.pE.seek(l.Ej.dY(),{}))},O_=function(l,y){if(l.policy.Xr&&l.yj){var k=y?l.yj?.Z:l.yj?.C;
const z=y?l.audioTrack:l.videoTrack;y=Mk(z);y?.isLocked&&(l.Zr.O().yM()&&l.Md("eosl",{unlock:y.info.rY()}),z.Ja?.stop(),y.isLocked=!1,z.nD(y),M7C(l.Z,y.info),k=k?.rA(),k?.rY()!==y.info.rY()&&l.Md("oue",{bls:k?.rY(),tls:y.info.rY()}))}},$25=function(l,y){eV(y,"cms",k=>{l.policy.N&&l.Md("pathprobe",k)},k=>{l.Zr.handleError(k)})},i2y=function(l,y){l.m8=y;
l.V&&(l.V.m8=y);y=l.m8;var k=l.videoTrack.oR.info.Cg();y.SN=k;y.vF({swebm:k});l.S.m8=l.m8;l.policy.C&&(l.C.m8=l.m8,zE5(l))},U2t=function(l,y){if(l.yj&&l.yj.C){y-=isNaN(l.timestampOffset)?0:l.timestampOffset;
l.getCurrentTime()!==y&&l.resume();if(l.pE.isSeeking()&&l.yj&&!l.yj.AC()){const k=l.getCurrentTime()<=y&&y<l.getCurrentTime()+10,z=D4(l.yj.C.Za(),l.getCurrentTime()+h3);k&&z&&(l.pE.V=!1)}l.pE.isSeeking()||l.policy.C_&&!l.policy.xz||(l.currentTime=y);l.po.Kl()}},M15=function(l,y,k,z){zj(l)&&l.bS&&z&&z===96&&(z=k?l.Zr.Wz(y):y,l.i4(z)||l.bS.Z||l.Md("prebuffer",{miss:1,
t:y.toFixed(3),isUtc:k}))},XVg=function(l,y){const k=qq(l.videoTrack).find(z=>z.startTime>=y&&ROg(l,z.startTime,!1));
return k&&k.startTime<y+k.duration*1.5?k.startTime+.1:0},t1s=function(l){const y=Mk(l)?.info;
return!y||l.i4(Math.min(y.V+h3,y.J))},Gj=function(l,y){l.timestampOffset!==y&&(l.timestampOffset=y,l.policy.vn&&K2(l.Ej),l.V.K=l.timestampOffset,l.Zr.eB(l.timestampOffset),l.Ej.isManifestless&&(l.Ej.timestampOffset=l.timestampOffset),l.videoTrack.EG(l.timestampOffset),l.audioTrack.EG(l.timestampOffset))},c6e=function(l){l.audioTrack.D=[];
l.videoTrack.D=[]},C9Q=function(l){if(!(l.length<=28))for(var y=(0,g.aZ)([60,
0,75,0,73,0,68,0,62,0]),k=28;k<l.length;){a:if(l.length-k<y.length)var z=!1;else{for(z=0;z<y.length;++z)if(l[k+z]!==y[z]){z=!1;break a}z=!0}if(z){k+=y.length;if(l.length<=k+48)break;y=new Uint8Array(24);for(z=0;z<24;++z)y[z]=l[k+z*2];l=bl(y);l=fx(l);if(!l)break;k=l[0];l[0]=l[3];l[3]=k;k=l[1];l[1]=l[2];l[2]=k;k=l[4];l[4]=l[5];l[5]=k;k=l[6];l[6]=l[7];l[7]=k;return l}k++}},b25=function(l,y){a:{var k=y.cryptoPeriodIndex;
if(isNaN(k)&&l.N.size>0)k=!0;else{for(const z of l.N.values())if(z.cryptoPeriodIndex===k){k=!0;break a}k=!1}}l.publish("log_qoe",{wvagt:"reqnews",canskip:k});k||l.publish("rotated_need_key_info_ready",y)},uF4=function(l){switch(l){case "DRM_TRACK_TYPE_AUDIO":return 1;
case "DRM_TRACK_TYPE_SD":return 2;case "DRM_TRACK_TYPE_HD":return 3;case "DRM_TRACK_TYPE_UHD1":return 4;case "DRM_TRACK_TYPE_UHD2":return 5;default:return 0}},qEQ=function(l,y=!1){var k=l.status==="LICENSE_STATUS_OK"?0:9999,z=null;
if(l.license)try{z=fx(l.license)}catch(r){g.n(r)}if(k===0&&!z)return null;z=new x2T(k,z);k!==0&&l.reason&&(z.errorMessage=l.reason);if(l.authorizedFormats){k={};const r=[],Z={};for(const e of l.authorizedFormats){if(!e.trackType||!e.keyId)continue;y&&z.C.push({trackType:uF4(e.trackType),isHdr:!!e.isHdr});let A=m2t[e.trackType];if(A){A==="HD"&&l.isHd720&&(A="HD720");e.isHdr&&(A+="HDR");k[A]||(r.push(A),k[A]=!0);let Q=null;try{Q=fx(e.keyId)}catch(t){g.n(t)}Q&&(Z[g.px(Q,4)]=A)}}z.N=r;z.Z=Z}l.nextFairplayKeyId&&
(z.nextFairplayKeyId=l.nextFairplayKeyId);l.sabrLicenseConstraint&&(z.sabrLicenseConstraint=fx(l.sabrLicenseConstraint));return z},WEt=function(l,y,k){l.onSuccess=y;
l.onError=k},IyT=function(l,y,k,z){const r={timeout:3E4,
onSuccess:Z=>{if(!l.IR())if(Jt("drm_net_r",void 0,l.timer),Z=qEQ(Z,l.C))l.onSuccess(Z,l.requestNumber);else l.onError(l,"drm.net","t.p;p.i")},
onError:Z=>{if(!l.IR())if(Z&&Z.error)Z=Z.error,l.onError(l,"drm.net.badstatus",`t.r;p.i;c.${Z.code};s.${Z.status}`,Z.code);else l.onError(l,"drm.net.badstatus","t.r;p.i;c.n")},
onTimeout:()=>{l.onError(l,"drm.net",`${"rt"}.req.${l.requestNumber}`)}};
z&&(r.JJ=`Bearer ${z}`);g.Lv(k,"player/get_drm_license",y,r)};
var $f5=function(l,y){return Jp[G[19]](this,1,6404,l,y)};
var im=function(l,y,k=!1){wd(y);(k||l.cG.yM())&&l.publish("ctmp","drmlog",y)},Tbt=function(l){let y=l.baseUrl;
F0_(y)||l.error("drm.net",2,"t.x");if(!CY(y,"fexp")){const k=["23898307","23914062","23916106","23883098"].filter(z=>l.cG.experiments.experiments[z]);
k.length>0&&(l.J.fexp=k.join())}for(const k of Object.keys(l.J))y=Lv_(y,k,l.J[k]);return y},P9s=function(l,y,k,z){V1s(y,(r,Z)=>{if(l.cG.sA().Z.G7(U_)&&l.C.flavor==="widevine")a:{let e=!1;
try{e=Vo(r,AB5).type===4}catch(A){}if(e){if(im(l,{cert_cache_hit:!!l.u$?.certificate},!0),z){l.N.length===0&&im(l,{md_gap:1},!0);y?.update(z);break a}}else if(k){k.Z=y??null;k.licenseRequest=r;break a}MI(l,r,Z,e)}else MI(l,r,Z)},(r,Z,e)=>{if(!l.IR()){Z=void 0;
var A=1;g.kf(l.C)&&g.aq(l.cG)&&l.cG.X("html5_enable_safari_fairplay")&&e===1212433232&&(Z="ERROR_HDCP",A=l.cG.X("html5_safari_fairplay_ignore_hdcp")?0:A);l.error("drm.keyerror",A,r,Z)}},()=>{l.IR()||(im(l,{onkyadd:1}),l.Y||(l.publish("sessionready"),l.Y=!0))},r=>{l.SP(r)})},MI=function(l,y,k,z=!1){if(!l.IR())if(y){im(l,{onkmtyp:k});
l.status="km";switch(k){case "license-renewal":case "license-request":case "license-release":break;case "individualization-request":J6q(l,y);return;default:l.publish("ctmp","message_type",{t:k,l:y.byteLength})}l.b0||(Jt("drm_gk_f",void 0,l.videoData.C_),l.b0=!0,l.publish("newsession",l));if(Dy(l.C)&&(y=YEz(y),!y))return;y=new pV_(y,++l.requestNumber,l.videoData.C_,l.cG.X("html5_enable_vp9_fairplay"));WEt(y,r=>{KEy(l,r,z)},(r,Z,e)=>{if(!l.IR()){var A=0;
r.Z.C>=3&&(A=1,Z="drm.net.retryexhausted");im(l,{onlcsrqerr:Z,info:e});l.error(Z,A,e);l.shouldRetry(h7(A),r)&&gpT(l,r)}});
g.x(l,y);Ep_(l,y)}else l.error("drm.unavailable",1,"km.empty")},fys=function(l,y,k=null,z){let r=null;
try{r=y.createSession(l.A,Z=>{im(l,{m:Z})}),P9s(l,r,z,k)}catch(Z){y="t.g",Z instanceof DOMException&&(y+=`;c.${Z.code}`),l.publish("licenseerror","drm.unavailable",1,y,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK")}return r},J6q=function(l,y){im(l,{sdpvrq:1});
l.S=Date.now();if(l.C.flavor!=="widevine")l.error("drm.provision",1,`e.flavor;f.${l.C.flavor};l.${y.byteLength}`);else{var k={cpn:l.videoData.clientPlaybackNonce};Object.assign(k,l.cG.Z);k=g.UI("https://www.googleapis.com/certificateprovisioning/v1/devicecertificates/create?key=AIzaSyB-5OLKTx2iU5mko18DfdwK5611JIjbUhE",k);y={format:"RAW",headers:{"content-type":"application/json"},method:"POST",postBody:JSON.stringify({signedRequest:String.fromCharCode.apply(null,y)}),responseType:"arraybuffer"};g.DC(k,
y,3,500).then(Dq(z=>{z=z.xhr;if(!l.IR()){z=new Uint8Array(z.response);var r=String.fromCharCode.apply(null,z);try{var Z=JSON.parse(r)}catch(e){}Z&&Z.signedResponse?(l.publish("ctmp","drminfo",{provisioning:1}),Z=(Date.now()-l.S)/1E3,l.S=NaN,l.publish("ctmp","provs",{et:Z.toFixed(3)}),l.V&&l.V.update(z)):(Z=Z&&Z.error&&Z.error.message,z="e.parse",Z&&(z+=`;m.${Z}`),l.error("drm.provision",1,z))}}),Dq(z=>{l.IR()||l.error("drm.provision",1,`e.${z.errorCode};c.${z.xhr&&z.xhr.status}`)}))}},KEy=function(l,
y,k){if(!l.IR())if(im(l,{onlcsrsp:1}),l.status="rr",y.statusCode!==0)l.error("drm.auth",1,`t.f;c.${y.statusCode}`,y.errorMessage||void 0);
else{Jt("drm_kr_s",void 0,l.videoData.C_);if(y.heartbeatParams&&y.heartbeatParams.url&&l.videoData.X("outertube_streaming_data_always_use_staging_license_service")){var z=l.C.N.match(/(.*)youtube.com/g);z&&(y.heartbeatParams.url=z[0]+y.heartbeatParams.url)}y.heartbeatParams&&l.publish("newlicense",y.heartbeatParams);y.N&&(l.N=y.N,l.videoData.Wd||l.publish("newlicense",new j_s),l.videoData.Wd=!0,l.K=Be(l.N,r=>r.includes("HDR")));
y.C&&(l.D=y.C);y.Z&&(l.cG.X("html5_enable_vp9_fairplay")&&l.C.Z()?(z=g.px(VW(l.fairplayKeyId),4),l.Z[z]={type:y.Z[z],status:"unknown"}):l.Z=Sf(y.Z,r=>({type:r,status:"unknown"})));
y6(l.C)&&(y.message=j4e(g.px(y.message)));l.V&&(im(l,{updtks:1}),l.status="ku",k&&l.u$&&l.cG.sA().Z.G7(U_)&&(l.u$.certificate=y.message),l.V.update(y.message).then(()=>{Jt("drm_kr_f",void 0,l.videoData.C_);Xi(l)||(im(l,{ksApiUnsup:1}),l.publish("keystatuseschange",l));!k&&l.u$&&l.cG.sA().Z.G7(SET)&&(l.u$.Z=fys(l,l.u$.mediaKeys,l.u$?.certificate,l.u$))},r=>{r=`msuf.req.${l.requestNumber};msg.${g.Kx(r.message,3)}`;
l.error("drm.keyerror",1,r)}));
g.kf(l.C)&&l.publish("fairplay_next_need_key_info",l.baseUrl,y.nextFairplayKeyId);l.cG.X("html5_enable_vp9_fairplay")&&l.C.Z()&&l.publish("qualitychange",np4(l.N));y.sabrLicenseConstraint&&l.publish("sabrlicenseconstraint",y.sabrLicenseConstraint)}},Ep_=function(l,y){l.status="km";
Jt("drm_net_s",void 0,l.videoData.C_);const k=new g.dv(l.cG.vV),z={context:g.XH(k.config_||g.M8())};z.drmSystem=FEe[l.C.flavor];z.videoId=l.videoData.videoId;z.cpn=l.videoData.clientPlaybackNonce;z.sessionId=l.sessionId;z.licenseRequest=g.px(y.message);z.drmParams=l.videoData.drmParams;isNaN(l.cryptoPeriodIndex)||(z.isKeyRotated=!0,z.cryptoPeriodIndex=l.cryptoPeriodIndex);var r=!!l.videoData.C?.K()?.isHdr();z.drmVideoFeature=r?"DRM_VIDEO_FEATURE_PREFER_HDR":"DRM_VIDEO_FEATURE_SDR";l.cG.experiments.sA().Z.G7(ops)&&
(z.context=g.b9(l.videoData));if(z.context&&z.context.client){if(r=l.cG.Z)z.context.client.deviceMake=r.cbrand,z.context.client.deviceModel=r.cmodel,z.context.client.browserName=r.cbr,z.context.client.browserVersion=r.cbrver,z.context.client.osName=r.cos,z.context.client.osVersion=r.cosver;l.cG.experiments.sA().Z.G7(ops)||(z.context.user=z.context.user||{},l.videoData.b0&&(z.context.user.credentialTransferTokens=[{token:l.videoData.b0,scope:"VIDEO"}]),l.videoData.Oj&&(z.context.user.kidsParent={oauthToken:l.videoData.Oj}));
z.context.request=z.context.request||{};z.context.request.mdxEnvironment=l.videoData.mdxEnvironment||z.context.request.mdxEnvironment;g.kf(l.C)&&(z.fairplayKeyId=g.px(VW(l.fairplayKeyId)));g.jz(l.cG,l.videoData.S()).then(Z=>{IyT(y,z,k,Z);l.status="rs"})}else l.error("drm.net",2,"t.r;ic.0")},Nb5=function(l,y,k){const z={};
z.isHdr=y.includes("HDR");switch(y.replace("HDR","").replace("720","")){case "AUDIO":z.trackType=1;break;case "SD":z.trackType=2;break;case "HD":z.trackType=3;break;case "UHD1":z.trackType=4;break;case "UHD2":z.trackType=5;break;default:z.trackType=0}!z.trackType||k[y]||Xi(l)&&!c7(l,y)||(l.authorizedFormats.push(z),k[y]=!0)},s_4=function(l,y){const k=[];
for(const z of Object.keys(l.Z))k.push(`${z}_${l.Z[z].type}_${l.Z[z].status}`);return k.join(y)},Xi=function(l){var y;
if(y=l.C_&&l.V!=null)l=l.V,y=!(!l.Z||!l.Z.keyStatuses);return y},gpT=function(l,y){var k=y.Z.getValue();
k=new g.B_(()=>{Ep_(l,y)},k);
g.x(l,k);k.start();g.yv(y.Z);im(l,{rtyrq:1})},C5=function(l){const y={};
y[l.status]=Xi(l)?s_4(l,"."):l.N.join(".");return y},c7=function(l,y){for(const k in l.Z)if(l.Z[k].status==="usable"&&l.Z[k].type===y)return!0;
return!1},LEq=function(l,y){for(const k in l.Z)if(l.Z[k].type===y)return l.Z[k].status},vpz=function(l){let y;
y=l[0];l[0]=l[3];l[3]=y;y=l[1];l[1]=l[2];l[2]=y;y=l[4];l[4]=l[5];l[5]=y;y=l[6];l[6]=l[7];l[7]=y},np4=function(l){return g.ro(l,"UHD2")||g.ro(l,"UHD2HDR")?"highres":g.ro(l,"UHD1")||g.ro(l,"UHD1HDR")?"hd2160":g.ro(l,"HD")||g.ro(l,"HDHDR")?"hd1080":g.ro(l,"HD720")||g.ro(l,"HD720HDR")?"hd720":"large"},YEz=function(l){var y="";
for(let k=0;k<l.length;k+=2)y+=String.fromCharCode(l[k]);l=hY(new DOMParser,li(y),"text/xml");if(!l)return null;(y=l.querySelector("Challenge"))&&y.childNodes&&y.childNodes.length!==0?(l=Uint8Array,y=EU(y.childNodes[0].nodeValue),y=(0,g.aZ)(y).buffer,l=new l(y)):l=null;return l},V1s=function(l,y,k,z,r){l.J=y;
l.N=k;l.S=z;l.K=r},Bby=function(l){l.Z?(l.V.j(l.Z,"message",l.sj),l.V.j(l.Z,"keystatuseschange",l.SP),l.Z.closed&&l.Z.closed.then(Dq(()=>{l.onClosed()}),null)):l.C&&(rz(l.V,l.C,["mskeymessage",
"webkitkeymessage"],l.Y),rz(l.V,l.C,["mskeyerror","webkitkeyerror"],l.C_),rz(l.V,l.C,["mskeyadded","webkitkeyadded"],l.D))},H2q=function(l,y,k){g.n(k);
l.N&&(k instanceof DOMException&&(y+=`;n.${k.name};m.${k.message}`),l.N(y))},RE5=function(l){rz(l.V,l.element,["keymessage",
"webkitkeymessage"],l.C_);rz(l.V,l.element,["keyerror","webkitkeyerror"],l.D);rz(l.V,l.element,["keyadded","webkitkeyadded"],l.A)},D2e=function(l,y=null){if(l.Z.keySystemAccess)return l.K=l.K.then(()=>l.mediaKeys?Promise.resolve():y?.mediaKeys&&y.BG?.Ly()?(l.mediaKeys=y?.mediaKeys,Promise.resolve()):l.Z.keySystemAccess.createMediaKeys().then(k=>{l.IR()||(l.mediaKeys=k,y?.BG?.Ly()&&(y.mediaKeys=k))})).then(()=>{const k=y?.Jv();
return l.element&&l.element!==k&&l.element.mediaKeys?l.element.setMediaKeys(null):Promise.resolve()}).then(()=>{l.element=y?.Jv();
return l.element&&l.element.mediaKeys!==l.mediaKeys?l.element.setMediaKeys(l.mediaKeys):Promise.resolve()}),l.K;
R_(l.Z)?l.C=new (BV())(l.Z.keySystem):lh(l.Z)?(l.C=new (BV())(l.Z.keySystem),l.element?.webkitSetMediaKeys(l.C)):RE5(l);return null},lwe=function(l,y){const k=new Uint8Array(270);
for(let z=0;z<135;z++)k[z*2]='<PlayReadyCDMData type="LicenseAcquisition"><LicenseAcquisition version="1.0" Proactive="true"></LicenseAcquisition></PlayReadyCDMData>'.charCodeAt(z);l=l.C.createSession("video/mp4",y,k);return new bm(null,null,null,null,l)},kCQ=function(l,y){y=yAg(y,l.Z.Ze);
y=l.C.createSession("video/mp4",y);return new bm(null,null,null,null,y,l.S)},um=function(l,y){let k=l.J[y.sessionId];
!k&&l.N&&(k=l.N,l.N=null,k.sessionId=y.sessionId,l.J[y.sessionId]=k);return k},yAg=function(l,y){var k=l.subarray(4);
k=new Uint16Array(k.buffer,k.byteOffset,k.byteLength/2);k=String.fromCharCode.apply(null,k).match(/ek=([0-9a-f]+)/)[1];var z="";for(var r=0;r<k.length;r+=2)z+=String.fromCharCode(parseInt(k.substring(r,r+2),16));k=z;z=new ArrayBuffer(k.length*2);r=new Uint16Array(z);for(var Z=0;Z<k.length;Z++)r[Z]=k.charCodeAt(Z);k=new Uint8Array(z);z=0;Z=new ArrayBuffer(l.byteLength+4+k.byteLength+4+y.byteLength);r=new Uint8Array(Z);Z=new DataView(Z);r.set(l);z+=l.byteLength;Z.setUint32(z,k.length,!0);z+=4;r.set(k,
z);z+=k.length;Z.setUint32(z,y.byteLength,!0);r.set(y,z+4);return r},rA5=function(l){let y=D2e(l.mediaKeys,l.mediaElement);
y?y.then(Dq(()=>{zc_(l)}),Dq(k=>{if(!l.IR()){g.n(k);
var z="t.a";k instanceof DOMException&&(z+=";n."+k.name+";m."+k.message);l.publish("licenseerror","drm.unavailable",1,z,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK")}})):(l.C({mdkrdy:1}),l.C_=!0);
l.Y&&(y=D2e(l.Y,l.mediaElement))},zc_=function(l){if(!l.IR())if(l.cG.X("html5_drm_set_server_cert")||l.Z.Z()){const y=l.mediaKeys.setServerCertificate();
y?y.then(Dq(k=>{l.cG.yM()&&l.publish("ctmp","ssc",{success:k})}),Dq(k=>{l.publish("ctmp","ssce",{n:k.name,
m:k.message})})).then(Dq(()=>{xI(l)})):xI(l)}else xI(l)},ecz=function(l,y,k){l.Oj=!0;
k=new X0(y,k);l.cG.X("html5_eme_loader_sync")&&(l.S.get(y)||l.S.set(y,k));ZAy(l,k)},ZAy=function(l,y){if(!l.IR()){l.C({onInitData:1});
if(l.cG.X("html5_eme_loader_sync")&&l.videoData.N&&l.videoData.N.Z()){var k=l.A.get(y.initData);y=l.S.get(y.initData);if(!k||!y)return;y=k;k=y.initData;l.S.remove(k);l.A.remove(k)}l.C({initd:y.initData.length,ct:y.contentType});if(l.Z.flavor==="widevine")if(l.RR&&!l.videoData.isLivePlayback)mD(l);else{if(!(l.cG.X("vp9_drm_live")&&l.videoData.isLivePlayback&&y.Cg)){l.RR=!0;k=y.cryptoPeriodIndex;var z=y.Z;pvt(y);y.Cg||(z&&y.Z!==z?l.publish("ctmp","cpsmm",{emsg:z,pssh:y.Z}):k&&y.cryptoPeriodIndex!==
k&&l.publish("ctmp","cpimm",{emsg:k,pssh:y.cryptoPeriodIndex}));l.publish("widevine_set_need_key_info",y)}}else l.HG(y)}},mD=function(l){if(l.Oj&&l.C_&&!l.sj){for(;l.V.length;){const y=l.V[0],k=AAP(l)?KZT(y):g.px(y.initData);
if(l.Z.Z()&&!y.C)l.V.shift();else{if(l.N.get(k))if(l.Z.flavor!=="fairplay"||l.Z.Z()){l.V.shift();continue}else l.N.delete(k);pvt(y);break}}l.V.length&&l.createSession(l.V[0])}},xI=function(l){l.IR()||(l.C_=!0,l.C({onmdkrdy:1}),mD(l))},AAP=function(l){return l.Z.flavor==="widevine"&&l.videoData.X("html5_drm_cpi_license_key")},$V_=async function(l){if(g.is()&&l.mediaKeys.mediaKeys?.getMetrics){var y=await l.mediaKeys.getMetrics();
y&&(QY(y)||(y=g.xW(y)),/^[A-Za-z0-9_-]+={0,3}$/.test(y)||(y=g.Kx(y,void 0,!0)),l.publish("ctmp","drm",{metrics:y}))}},Qq_=function(l,y){if(l.videoData.A)return!1;
l.Qj.WG+=1;if(l.Qj.WG<=10)return!1;y.exiled=`${l.Qj.WG}`;l.ZQ("qoe.start15s",y);l.Zr.publish("playbackstalledatstart");return!0},tzC=function(l){return l.C?!0:l.Qj.C_==="yt"?Kc(l.videoData)?l.Zr.loader?.S2():l.videoData.A?l.videoData.mK<25:!l.videoData.mK:!1},OAz=function(l){if(!l.C){l.C=!0;
var y=l.Zr.getPlayerState();y=y.isPaused()||y.isSuspended();l.Zr.lI();y&&!Qi(l.videoData)||l.Zr.publish("signatureexpired")}},qI=function(l,y,k){const z=l.videoData.C;
var r=l.videoData.V,Z=l.Qj.X("html5_disable_codec_fallback_for_drm")&&l.videoData.eb();jn(l.Zr.getVideoData())&&GQ5(l.Zr,"pe");l.Qj.sA().Z.G7(dVP)&&(k.bkg=l.Zr.gT().isBackground()?"1":"0");if((y==="progressive.net.retryexhausted"||y==="fmt.unplayable"||y==="fmt.decode")&&!l.Zr.bW.J&&z&&z.itag==="22")return l.Zr.bW.J=!0,l.ZQ("qoe.restart",{reason:"fmt.unplayable.22"}),l.Zr.x8(),!0;var e=!1;if(l.videoData.isExternallyHostedPodcast){if(e=l.videoData.Xh)k.mimeType=e.type,l.Md("3pp",{url:e.url});k.ns=
"3pp";l.Zr.jI(y,1,"VIDEO_UNAVAILABLE",wd((new g.Gr(y,k,1)).details));return!0}var A=l.vt+3E4<(0,g.f)()||l.Z.isActive();if(l.Qj.X("html5_empty_src")&&l.videoData.isAd()&&y==="fmt.unplayable"&&/Empty src/.test(`${k.msg}`))return k.origin="emptysrc",l.ZQ("auth",k),!0;A||wn4(l.Zr.gT())||(k.nonfg="paused",A=!0,l.Zr.pauseVideo());y!=="fmt.decode"&&y!=="fmt.unplayable"||!r?.S()||(dBy(l.Qj.J,r.Dr),k.acfallexp=r.Dr,e=A=!0);!A&&l.N>0&&(l.Z.start(),A=!0,k.delayed="1",--l.N);r=l.Zr.loader;A||!z?.Z()&&!z?.V()||
Z||(dBy(l.Qj.J,z.Dr),e=A=!0,k.cfallexp=z.Dr);if(!A)return Qq_(l,k);Z=!1;l.J?l.vt=(0,g.f)():Z=l.J=!0;A=l.videoData;if(A.HG){A=A.HG.J();var Q=Date.now()/1E3+1800;A=A<Q}else A=!1;k.e=y;A&&(k.staleprog="1");l.ZQ("qoe.restart",k);if(A&&tzC(l))return OAz(l),!0;if(!(!g.G6("philips")||y==="fmt.unplayable"&&r&&r.Ja||l.Qj.Z.cplatform==="GAME_CONSOLE"))try{window.close()}catch{}z&&z.Z()&&!l.Qj.X("html5_allow_av1_retry_in_session")?(e=l.Qj.J,e.D=!0,e=e.Z=!0):r?Z||(y=(y=bG(r.videoTrack)||r.videoTrack.Z)?y.oR:
r.videoTrack.oR,y.Xr+=1,r.policy.Z?rG(r.J,y,!0):Z9(r.Z,y,!0)):l.videoData.HG&&l.videoData.HG.V();l.Z.isActive()||l.Zr.Ed(e);return!0},hc5=function(l,y){if((l=l.Zr.fl())&&(y.errorCode==="fmt.unplayable"||y.errorCode==="html5.invalidstate")){const k=l.eV();
y.details.merr=k?k.toString():"0";y.details.mmsg=l.hC()}},GC4=function(l){return l.errorCode==="net.badstatus"&&(l.severity===1||!!l.details.fmt_unav)},awP=function(l,y){return l.Qj.X("html5_use_network_error_code_enums")&&y.details.rc===403||y.details.rc==="403"?(l=y.errorCode,l==="net.badstatus"||l==="manifest.net.retryexhausted"):!1},W7=function(l,y,k){try{y={detail:`pr.${y}`},(TC(l.Qj)||AA(l.Qj)==="TVHTML5_FOR_KIDS")&&l.Qj.X("html5_reload_by_kabuki_app")?l.Zr.jI("qoe.restart",k?1:2,void 0,wd(y),
"7"):(l.ZQ("qoe.restart",y),window.location.reload())}catch{}},iAT=function(l,y){if(!awP(l,y)&&!l.C)return!1;
y.details.sts="20520";if(tzC(l))return h7(y.severity)&&(y=Object.assign({e:y.errorCode},y.details),y=new g.Gr("qoe.restart",y)),l.ZQ(y.errorCode,y.details),OAz(l),!0;(0,g.f)()-l.Qj.va>6048E5&&W7(l,"signature",!0);return!1},UVC=function(l){if(l.videoData.errorDetail==="7"&&g.dU(l.Qj)){const y=!l.videoData.isInlinePlaybackNoAd;
y&&l.Qj.pf++;W7(l,"innertube_player_reload_required",y&&l.Qj.pf>1);return!0}return!1},IZ=function(l,y="fmt.noneavailable"){var k=l.Qj.J;
k.S=!1;k.Z=!0;l.ZQ("qoe.restart",{e:y,detail:"hdr"});l.Zr.Ed(!0)},Mz5=function(l){if(l.Zr.gT().isInline())return Tj;
l=IE[aE()];return g.m8("auto",l,!1,"s")},XnC=function(l,y){var k;
a:if((k=y.Z)&&k.videoInfos.length){for(var z of k.videoInfos)if(z.J?.smooth){k=z.video.qualityOrdinal;break a}k=k.videoInfos[0].video.qualityOrdinal}else k=0;(g.G6("armv7")||g.G6("aarch64")||g.G6("android"))&&!g.dU(l.cG)&&y.Z.videoInfos[0].V()&&(k=Math.min(k,g.pk.large));z=g.i_(l.cG.experiments,"html5_chipset_soft_cap");z>0&&(k=Math.min(k,z));z=g.i_(l.cG.experiments,"html5_sabr_non_streaming_xhr_soft_cap");!MC&&z>0&&(k=Math.min(k,z));if(z=g.i_(l.cG.experiments,"html5_max_vertical_resolution")){let e=
4320;for(var r=0;r<y.Z.videoInfos.length;r++){var Z=y.Z.videoInfos[r];Z.video.height>z&&(e=Math.min(e,Z.video.qualityOrdinal))}if(e<4320){r=0;for(Z=0;Z<y.Z.videoInfos.length;Z++){const A=y.Z.videoInfos[Z].video.qualityOrdinal;A<e&&(r=Math.max(r,A))}r&&(k=Math.min(r,k))}l.Zr.Md("mvr",{h:z,cp:k})}return new xM(0,k,!1,"o")},Chg=function(l,y){let k=4320;
!l.cG.C||g.U9(l.cG)||l.cG.X("hls_for_vod")||l.cG.X("mweb_remove_360p_cap")||(k=g.pk.medium);var z=g.i_(l.cG.experiments,"html5_default_quality_cap");z&&y.Z.Z()&&(l.cG.X("html5_always_apply_default_quality_cap")||!y.videoData.N7&&!y.videoData.contentProtection)&&(k=Math.min(k,z));z=g.i_(l.cG.experiments,"html5_random_playback_cap");var r=/[a-h]$/;z&&r.test(y.videoData.clientPlaybackNonce)&&(k=Math.min(k,z));if(r=z=g.i_(l.cG.experiments,"html5_hfr_quality_cap"))a:{r=y.Z;if(r.Z())for(var Z of r.videoInfos)if(Z.video.C()){r=
!0;break a}r=!1}r&&(k=Math.min(k,z));(Z=g.i_(l.cG.experiments,"html5_live_quality_cap"))&&y.videoData.isLivePlayback&&(k=Math.min(k,Z));k=cAs(l,y,k);l=g.i_(l.cG.experiments,"html5_byterate_soft_cap");return new xM(0,k===4320?0:k,!1,"d",l)},VB=function(l,y){const k=l.Zr.gT();
return k.isInline()&&!y.d8?new xM(0,480,!1,"v"):Kc(y)?Tj:k.isBackground()&&hW()/1E3>60&&!g.dU(l.cG)?new xM(0,360,!1,"v"):Tj},P7=function(l,y,k){if(l.cG.experiments.z7("html5_disable_client_autonav_cap_for_onesie")&&y.eQ()||g.dU(l.cG)&&(aE(-1)>=1080||y.osid))return Tj;
let z=g.i_(l.cG.experiments,"html5_autonav_quality_cap");const r=g.i_(l.cG.experiments,"html5_autonav_cap_idle_secs");return z&&y.isAutonav&&hW()/1E3>r?(k&&(z=cAs(l,k,z)),new xM(0,z,!1,"e")):Tj},J3=function(l,y){if(!y.Z.Z())return l.J?new xM(0,360,!1,"b"):Tj;
var k=!1,z=!1;for(var r of y.Z.videoInfos)r.Z()?k=!0:z=!0;k=k&&z;z=0;r=g.i_(l.cG.experiments,"html5_performance_cap_floor");r=l.cG.C?240:r;for(const Z of y.Z.videoInfos){if(k&&Z.Z())continue;y=FF(Z.Dr,Z.video.fps,l.N);const e=Z.video.qualityOrdinal;if(Math.max(y,r)>=e){z=e;break}}return new xM(0,z,!1,"b")},p5=function(l,y){const k=YI(l,y.Z?.videoInfos),z=l.Zr.getPlaybackRate();
return z>1&&k?(l=QGe(l.cG.J,y.Z.videoInfos,z),new xM(0,l,!0,"o")):new xM(0,0,!1,"o")},bAC=function(l,y){if(l.X("html5_disable_ustreamer_constraint_for_sabr")&&Kc(y.videoData))return Tj;
const k=l.Zr.JK();l.X("html5_use_video_quality_cap_for_ustreamer_constraint")&&k&&k.eh>0&&W6(y.videoData.OG)&&(l=k.eh,y.videoData.OG=new xM(0,l,!1,"u"));return y.videoData.OG},K5=function(l,y,k){g.dU(l.cG)&&(k=k.compose(l.F1(y)));
return k},YI=function(l,y){return y&&g.dU(l.cG)?y.some(k=>k.video.C()):!1},cAs=function(l,y,k){if(l.X("html5_optimality_defaults_chooses_next_higher")&&k)for(l=y.Z.videoInfos,y=1;y<l.length;y++)if(l[y].video.qualityOrdinal<k)return l[y-1].video.qualityOrdinal;
return k},uCP=async function(l){if(!l.Z.Z()||typeof navigator.mediaCapabilities?.decodingInfo!=="function")return Promise.resolve();
await Promise.resolve();for(const y of l.Z.videoInfos)await HWC(y)},xV5=function(l,y){var k=y.Dr,z=y.video.fps,r=y.video.qualityOrdinal-1,Z=l.N;
y=`${k}${z>49?"p60":z>32?"p48":""}`;k=FF(k,z,Z);r>0&&(k=Math.min(k,r));!o_.has(y)&&MN().includes(y)?(z=Ua(),+z[y]>0&&(k=Math.min(+z[y],k)),z[y]!==k&&(z[y]=k,g.eY("yt-player-performance-cap",z,2592E3))):o_.has(y)||Z==null?(z=MN().slice(),z.includes(y)||(z.push(y),g.eY("yt-player-performance-cap-active-set",z,2592E3)),n2.set(y,k)):(o_.add(y),Z?.set(y,k));l.Zr.ww()},mVP=function(){return Sf(Ua(),l=>`${l}`)},q9g=function(l,y,k,z){if(!y||!k||!y.videoData.C)return!1;
const r=g.i_(l.cG.experiments,"html5_df_downgrade_thresh"),Z=l.X("html5_log_media_perf_info");if(!((0,g.f)()-l.V<5E3?0:Z||r>0))return!1;const e=((0,g.f)()-l.V)/1E3;l.V=(0,g.f)();k=k.getVideoPlaybackQuality();if(!k)return!1;const A=k.droppedVideoFrames-l.S,Q=k.totalVideoFrames-l.A;l.S=k.droppedVideoFrames;l.A=k.totalVideoFrames;const t=k.displayCompositedVideoFrames===0?0:k.displayCompositedVideoFrames||-1;Z&&l.cG.yM()&&l.Zr.Md("ddf",{dr:k.droppedVideoFrames,de:k.totalVideoFrames,comp:t});if(z)return l.Z=
0,!1;if((Q-A)/e>l.D||!r||g.dU(l.cG))return!1;l.Z=(Q>60?A/Q:0)>r?l.Z+1:0;if(l.Z!==3)return!1;xV5(l,y.videoData.C);l.Zr.Md("dfd",Object.assign({dr:k.droppedVideoFrames,de:k.totalVideoFrames},mVP()));return!0},Wcq=function(l,y){l.X("html5_log_media_perf_info")&&(l.Zr.Md("perfdb",mVP()),l.Zr.Md("sessionperfdb",Object.fromEntries(n2.entries())),l.Zr.Md("playbackperfdb",Object.fromEntries(l.N.entries())),l.Zr.Md("hwc",{nch:navigator.hardwareConcurrency},!0),y&&l.Zr.Md("mcdb",{itags:y.Z.videoInfos.filter(k=>
k.J?.smooth===!1).map(k=>k.itag).join("-")}))},IwQ=function(l){switch(l.cG.playerCanaryStage?.toLowerCase()){case "xsmall":return"HTML5_PLAYER_CANARY_STAGE_XSMALL";
case "small":return"HTML5_PLAYER_CANARY_STAGE_SMALL";case "medium":return"HTML5_PLAYER_CANARY_STAGE_MEDIUM";case "large":return"HTML5_PLAYER_CANARY_STAGE_LARGE";case "xlarge":return"HTML5_PLAYER_CANARY_STAGE_XLARGE";default:return"HTML5_PLAYER_CANARY_STAGE_UNSPECIFIED"}},TkT=function(l){l.Z>=0||(l.provider.Zr.getVisibilityState()===3?l.J=!0:(l.Z=g.vY(l.provider),l.delay.start()))},VzP=function(l){if(!(l.C<0)){var y=g.vY(l.provider),k=y-l.V;
l.V=y;l.playerState.C()?l.playTimeSecs+=k:l.playerState.isBuffering()&&!l.playerState.Z(16)&&(l.rebufferTimeSecs+=k)}},E_=function(l){l.Z.startTime=l.N;
l.Z.endTime=l.C;l.J6?.length&&(l.Z.J6=l.J6);l.mW?.length&&(l.Z.mW=l.mW);let y=!1;l.segments.length&&g.nC(l.segments).isEmpty()?(l.segments[l.segments.length-1].previouslyEnded&&(l.Z.previouslyEnded=!0),l.segments[l.segments.length-1]=l.Z,y=!0):l.segments.length&&l.Z.isEmpty()||(l.segments.push(l.Z),y=!0);y?l.Z.endTime===0&&(l.previouslyEnded=!1):l.Z.previouslyEnded&&(l.previouslyEnded=!0);l.S+=l.C-l.N;l.Z=gr(l.provider);l.Z.previouslyEnded=l.previouslyEnded;l.provider.cG.sA().Z.G7(Phz)&&(l.J+=JSON.stringify(l.Z).length);
l.previouslyEnded=!1;l.N=l.C},JAT=function(l){g.Kl(l.K);
l.K=NaN},Y9P=function(l){JAT(l);
l.K=g.Yu(()=>{l.update()},100);
l.LB=g.vY(l.provider);l.Z=gr(l.provider)},pnQ=function(l,y,k){k-=l.LB;
return y===l.C&&k>.5},f5=function(l,y){const k=l.sendVisitorIdHeader?l.visitorData:void 0;
return g.jz(l.cG,l.accessToken).then(z=>Sl(l.uri,l.cG,l.pageId,k,z,y))},Kcy=function(l){l.indexOf("watchtime")!==-1&&g.wv("gelDebuggingEvent",{vss3debuggingEvent:{vss2Ping:l}})},gfe=function(l,y){l.attestationResponse&&f5(l).then(k=>{k=k||{};
k.method="POST";k.postParams={atr:l.attestationResponse};l.Ja?l.HG?N8().sendAndWrite(y,k):N8().sendThenWrite(y,k):g.o3(y,k)})},EfT=function(l){const y={s9:[]};
if(Be(l.segments,k=>!!k.J6||!!k.mW)){for(const k of l.segments)y.s9.push({J6:k.J6||[],
mW:k.mW||[]});l=g.nG({Mb:y},OWC);return g.px(l,4)}},fwz=function(l,y){return()=>{l.cG.X("html5_simplify_pings")?(l.Z=l.RR,l.BF=y(),l.hj=0,l.send()):f5(l).then(k=>{var z=ou(l);
z.cmt=z.len;z.lact="0";const r=y().toFixed(3);z.rt=Number(r).toString();z=g.UI(l.uri,z);l.cG.X("vss_through_gel_double")&&Kcy(z);l.Ja?(k==null&&(k={}),l.HG?N8().sendAndWrite(z,k):N8().sendThenWrite(z,k)):k?g.o3(z,k):g.Eb(z)})}},no=function(l,y){return g.sT(y,l.C).join(",")},XO5=function(l,y){if(y&&l.V){var k=new Set(["q",
"feature","mos"]),z=new Set("autoplay cl len fexp delay el ns adformat".split(" ")),r=new Set(["aqi","autonav","list","ssrt","upt"]);l.V.ns==="3pp"&&(y.ns="3pp");for(const Z of Object.keys(l.V))z.has(Z)||k.has(Z)||r.has(Z)&&!l.V[Z]||(y[Z]=l.V[Z])}},jg=function(l,y){var k=jqe(l.provider);
Object.assign(k,{state:l.D});y=new S95(l.provider.videoData,l.provider.cG,y,k);y.Z=l.provider.Zr.YK();k=l.provider.videoData.clientPlaybackNonce;y.Z=l.provider.Zr.vx(k);l.provider.videoData.isLivePlayback||(y.RR=l.provider.Zr.getDuration(k));l.provider.videoData.Z&&(k=l.provider.videoData.Z.QK(y.Z))&&(y.C_=k-y.Z,fN(l.provider.videoData)&&(y.Z+=l.provider.Zr.w4(),y.C_-=l.provider.Zr.w4()));y.BF=g.vY(l.provider);y.segments=[gr(l.provider)];return y},nfQ=function(l){var y=l.provider.videoData.Ng;
const k=l.provider.videoData.V0,z=[10+y,10,10,40+k-y,40];var r=l.provider.videoData.getPlayerResponse()?.playbackTracking;const Z=r?.videostatsScheduledFlushWalltimeSeconds;r=r?.videostatsDefaultFlushIntervalSeconds;if(!(Z&&Z.length>0&&r))return z;y=[Z[0]+y,...Z.slice(1).map((e,A)=>e-Z[A]),
r+k-y,r];return y.some(e=>e<0)?(g.DP(l.logger,347111855,`Neg vss scheduled pings ${Z} ${r}`),z):y},Sg=function(l,y=NaN){const k=g.vY(l.provider);
y=isNaN(y)?k:y;y=Math.ceil(y);const z=l.sj[l.C_];l.C_+1<l.sj.length&&l.C_++;const r=y+z;l.J=g.JK(()=>{if(!l.IR()){l.J=NaN;var Z=l.Y(),e=Fc5(l,Z);e.D=r;var A=l.Ja>1E3;!(Z.length>1)&&Z[0].isEmpty()||A||(e.K=Sg(l,r));e.send();l.Ja++}},(r-k)*1E3);
return l.C=r},n5=function(l,y){const k=l.provider.cG;
g.jz(l.provider.cG,l.provider.videoData.S()).then(z=>{const r=l.provider.cG.pageId,Z=l.provider.cG.sendVisitorIdHeader?l.provider.videoData.visitorData:void 0,e=l.provider.cG.X("vss_pings_using_networkless")||l.provider.cG.X("kevlar_woffle"),A=l.provider.cG.X("allow_skip_networkless");z=Sl(y,k,r,Z,z);n8(y,z,{token:l.provider.videoData.a4,i7:l.provider.videoData.XT,mdxEnvironment:l.provider.videoData.mdxEnvironment},k,void 0,e&&!A,!1,!0)})},Fc5=function(l,y){const k=jg(l,"watchtime");
ofP(l)&&(k.delayThresholdMet=!0,l.rb=!0);if(l.N>0){for(const z of y)z.startTime-=l.N,z.endTime-=l.N;k.Z-=l.N}else k.Z=l.Z.C;k.segments=y;return k};
var eVs=function(l,y){return qt[G[19]](this,64,3956,l,y)};
ofP=function(l){var y;if(y=l.provider.videoData.isLoaded()&&l.provider.videoData.CB&&l.V&&!l.rb)y=l.Z,y=y.S+y.YK()-y.N>=l.provider.videoData.CB;return!!y};
Fi=function(l,y){const k=l.A(!isNaN(l.C));y&&(l.C=NaN);return k};
NkP=function(l){l.provider.videoData.youtubeRemarketingUrl&&!l.u0&&(n5(l,l.provider.videoData.youtubeRemarketingUrl),l.u0=!0)};
sqs=function(l){l.provider.videoData.googleRemarketingUrl&&!l.RR&&(n5(l,l.provider.videoData.googleRemarketingUrl),l.RR=!0)};
oZ=function(l){if(!l.IR()&&l.V){l.D="paused";var y=Fi(l);y.isFinal=!0;y.send();l.dispose()}};
LcC=function(l,y,k){if(!l.HG){k||(k=jg(l,"atr"));k.attestationResponse=y;try{k.send()}catch(z){if(z.message!=="Unknown Error")throw z;}l.HG=!0}};
g.vY=function(l){return vfC(l)()};
fP_=function(l){const y=navigator.connection?.type||"";if(y)return BkT[y]||BkT.other;if(g.dU(l.cG)){l=navigator.userAgent;if(/[Ww]ireless[)]/.test(l))return 3;if(/[Ww]ired[)]/.test(l))return 30}return 0};
gr=function(l){const y=new HAC;y.N=jqe(l).cc?.toString()||"-";y.playbackRate=l.Zr.getPlaybackRate();var k=l.Zr.getVisibilityState();k!==0&&(y.visibilityState=k);l.cG.gb&&(y.C=1);y.V=l.videoData.sR;y.compositeLiveStatusToken=l.videoData.compositeLiveStatusToken;y.heartbeatLoggingToken=l.videoData.heartbeatLoggingToken;k=l.Zr.getAudioTrack();k.a7&&k.a7.id&&k.a7.id!=="und"&&(y.audioId=k.a7.id);y.connectionType=fP_(l);y.volume=l.Zr.getVolume();y.muted=l.Zr.isMuted();y.clipId=l.Zr.Ex()||"-";y.Z=l.videoData.JI||
"-";return y};
jqe=function(l){const y=l.Zr.ER()||{};y.fs=l.Zr.vj();y.volume=l.Zr.getVolume();y.muted=l.Zr.isMuted()?1:0;y.mos=y.muted;y.clipid=l.Zr.Ex();y.playerheight=l.Zr.getPlayerSize()?.height||0;y.playerwidth=l.Zr.getPlayerSize()?.width||0;l=l.videoData;const k={};l.C&&(k.fmt=l.C.itag,l.V&&(l.gb?l.V.itag!==l.C.itag:l.V.itag!=l.C.itag)&&(k.afmt=l.V.itag));k.ei=l.eventId;k.list=l.playlistId;k.cpn=l.clientPlaybackNonce;l.videoId&&(k.v=l.videoId);l.CY&&(k.infringe=1);(l.BF?0:l.jN)&&(k.splay=1);const z=RH(l);z&&
(k.live=z);l.X6&&(k.sautoplay=1);l.lE&&(k.autoplay=1);l.d$&&(k.sdetail=l.d$);l.partnerId&&(k.partnerid=l.partnerId);l.osid&&(k.osid=l.osid);l.Jp&&(k.cc=g.QAs(l.Jp));return Object.assign(y,k)};
vfC=function(l){if(!l.Z){const y=g.IC(z=>{let r=(0,g.f)();z&&r<=631152E6&&(l.Zr.Md("ytnerror",{issue:28799967,value:`${r}`}),r=(new Date).getTime()+2);return r},l.cG.X("html5_validate_yt_now")),k=y();
l.Z=()=>Math.round(y()-k)/1E3;
l.Zr.YI()}return l.Z};
NI=function(l){l.C&&TkT(l.C);l.qoe&&LaQ(l.qoe)};
lp4=function(l,y,k,z){k.adFormat=k.T7;const r=y.Zr;y=new Rc5(new DVt(k,y.cG,{getDuration:()=>k.lengthSeconds,
getCurrentTime:()=>r.getCurrentTime(),
YK:()=>r.YK(),
vx:()=>r.vx(),
AB:()=>r.AB(),
getPlayerSize:()=>r.getPlayerSize(),
getAudioTrack:()=>k.getAudioTrack(),
getPlaybackRate:()=>r.getPlaybackRate(),
j6:()=>r.j6(),
getVisibilityState:()=>r.getVisibilityState(),
SV:()=>r.SV(),
ER:()=>r.ER(),
getVolume:()=>r.getVolume(),
isMuted:()=>r.isMuted(),
vj:()=>r.vj(),
Ex:()=>r.Ex(),
getProximaLatencyPreference:()=>r.getProximaLatencyPreference(),
YI(){r.YI()},Md(Z,e){r.Md(Z,e)},qm:()=>r.qm(),
w4:()=>r.w4()}));
y.N=z;g.x(l,y);return y};
yPz=function(l){l.C&&l.C.send();if(l.qoe){var y=l.qoe;if(y.J){y.fp==="PL"&&(y.fp="N");var k=g.vY(y.provider);g.Nw(y,k,"vps",[y.fp]);y.S||(y.V>=0&&y.Z.set("user_intent",[y.V.toString()]),y.S=!0);y.provider.cG.yM()&&y.Md("finalized",{});y.sj=!0;y.reportStats(k)}}if(l.provider.videoData.enableServerStitchedDai)for(const z of l.N.values())oZ(z);else l.Z&&oZ(l.Z);l.dispose()};
kE5=function(l,y){l.Z&&LcC(l.Z,y)};
zK5=function(l){if(!l.Z)return null;const y=jg(l.Z,"atr");return k=>{l.Z&&LcC(l.Z,k,y)}};
rPy=function(l,y){l=CR(l.array,k=>y-k.start||1);
return l<0?-(l+1):l};
ZNs=function(l,y,k){const z=[];for(y=rPy(l,y);y<l.array.length;++y){const r=l.array[y];(r.end<=k||r.contains(k))&&z.push(r);if(r.start>k)break}return z};
s_=function(l,y){const k=[];for(const z of l.array)if(z.contains(y)&&k.push(z),z.start>y)break;return k};
eK_=function(l){return l.array.slice(rPy(l,0x7ffffffffffff),l.array.length)};
AP4=function(l,y){let k=NaN;for(const z of l.array)if(z.contains(y)&&(isNaN(k)||z.end<k)&&(k=z.end),z.start>y&&(isNaN(k)||z.start<k)){k=z.start;break}return k};
$C5=function(l,y){l.array=l.array.filter(k=>!y.has(k))};
QHy=function(l){return l.Zr.getPlayerState().Z(2)?0x8000000000000:l.Zr.getCurrentTime()*1E3};
L5=function(l,y){const k=[];if(!y.length)return k;for(let z=0;z<y.length;z++){const r=y[z];r.active&&l.C.indexOf(r)===-1&&(l.C.push(r),k.push([1,r]))}return k};
v7=function(l,y){for(const k of y)y=k[1],k[0]===1?l.K(g.uR(y.namespace),y):l.K(g.xR(y.namespace),y)};
B7=function(l,y){const k=[];if(!y.length)return k;y.sort(g.bR);for(const z of y)l.C.splice(l.C.indexOf(z),1),k.push([2,z]);return k};
t2y=function(l){if(l.started&&!l.IR()){l.V.stop();var y=l.Zr.getPlayerState();y.Z(32)&&l.A.start();var k=QHy(l),z=l.isEnded(y,k),r=[],Z=[];for(var e of l.C)e.active&&(z?e.end<0x8000000000000:!e.contains(k))&&Z.push(e);r=r.concat(B7(l,Z));e=Z=null;z?(y=s_(l.Z,0x7ffffffffffff),Z=y.filter(A=>A.end<0x8000000000000),e=eK_(l.Z)):y=l.N<=k&&ai(y)?ZNs(l.Z,l.N,k):s_(l.Z,k);
r=r.concat(L5(l,y));Z&&(r=r.concat(B7(l,Z)));e&&(r=r.concat(L5(l,e)));l.N=k;v7(l,r)}};
H7=function(l,y){return y>l.mediaTime+l.J&&y<l.mediaTime+5};
m4e=function(l,y,k,z,r=!1){if(l.cG.X("html5_seek_refactor_bh_fix")&&!isFinite(y))return!1;if(z=z>1)l.V=!0;if(r||isNaN(l.C))l.C=y;if(l.Z)y!==l.mediaTime&&(l.Z=!1);else if(y>0&&l.mediaTime===y){r=1500;if(l.cG.X("html5_buffer_underrun_transition_fix")){r=g.i_(l.cG.experiments,"html5_min_playback_advance_for_steady_state_secs");const Z=g.i_(l.cG.experiments,"html5_min_underrun_buffered_pre_steady_state_ms");r=r>0&&Z>0&&Math.abs(y-l.C)<r?Z:1500}return k-l.N>(z||!l.V?r:400)}l.mediaTime=y;l.N=k;return!1};
dCC=function(l,y,k){return y.hd(k).then(()=>k9(new ONs(y,y.N)),z=>{z instanceof Error&&g.WH(z);
var r=U1('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),Z=XP('audio/mp4; codecs="mp4a.40.2"'),e=r||Z;const A=y.isLivePlayback&&!g.tA(l.J,!0);z="fmt.noneavailable";A?z="html5.unsupportedlive":e||(z="html5.missingapi");e=A||!e?2:1;r={buildRej:"1",a:y.dJ(),d:!!y.vB,drm:y.eb(),f18:y.t$.indexOf("itag=18")>=0,c18:r};y.Z&&(y.eb()?(r.f142=!!y.Z.Z["142"],r.f149=!!y.Z.Z["149"],r.f279=!!y.Z.Z["279"]):(r.f133=!!y.Z.Z["133"],r.f140=!!y.Z.Z["140"],r.f242=!!y.Z.Z["242"]),r.cAAC=Z,r.cAVC=XP('video/mp4; codecs="avc1.42001E"'),
r.cVP9=XP('video/webm; codecs="vp9"'));y.J&&(r.drmsys=y.J.keySystem,Z=0,y.J.C&&(Z=Object.keys(y.J.C).length),r.drmst=Z);return new g.Gr(z,r,e)})};
D1=function(l,y){y=Math.max(Math.max(1,Math.ceil(l.policy.V/RZ(l))),y);return Math.min(Math.min(8,Math.floor(l.policy.D/RZ(l))),y)};
RZ=function(l){return l.videoData.Z?Yp(l.videoData.Z)||5:5};
hKq=function(l,y){if(y)return y=l.videoData,y=wFe(l,isNaN(y.liveChunkReadahead)?3:y.liveChunkReadahead,y),D1(l,y);if(l.C.length){if(Math.min.apply(null,l.C)>1)return D1(l,l.Z-1);if(l.policy.A)return D1(l,l.Z+1)}return l.Z};
GE4=function(l,y=!1){if(!l.C.length)return!1;const k=l.Z;l.Z=hKq(l,y);if(y=k!==l.Z)l.C=[],l.sx=0;return y};
le=function(l){let y=l.policy.Z;l.V||(y=Math.max(y-1,0));return y*RZ(l)};
yJ=function(l,y){return y>=l.mf()-le(l)};
apQ=function(l,y,k=!0){const z=yJ(l,y);k||z?z&&(l.N=!0):l.N=!1;l.K=l.policy.N===2||l.policy.N===3&&l.N;y=yJ(l,y);l.V!==y&&l.publish("livestatusshift",y);l.V=y};
wFe=function(l,y,k){k.vZ&&y--;NC(k)&&(y=1);sK(k)!==0&&(l=g.i_(l.experiments,"html5_live_chunk_readahead_proxima_override"))&&(y=l,k.Z?.mK()&&y++);return y};
zy=function(l,y,k=null){return new kZ(g.i_(l.cG.experiments,y)||0,k?l.cG.X(k):!1)};
iNQ=function(l,y){l.Z=y};
rw=function(l,y,k,z,r,Z,e,A){y?y.test(k)?(l.ZQ(r,y,e),y.S||Z()):(!y.C||y.V?k=!1:(k=(0,g.f)(),z?y.Z||(y.Z=k):y.Z=0,Z=!z&&k-y.C>3E4,k=y.Z&&k-y.Z>1E3||Z?y.V=!0:!1),k&&(A={...l.Dp(y),...A},A.wn=e,A.we=r,A.wsuc=z,l.Zr.Md("workaroundReport",A),z&&(y.reset(),l.N[r]=!1))):l.Zr.jI("auth",2,"BROWSER_OR_EXTENSION_ERROR",wd({source:"watchdog",name:e}))};
UCC=function(l,y){if(l.Z){var k=l.Z;var z=l.getCurrentTime(),r=k.mf();var Z=k.policy.C;k.V||(Z=Math.max(Z-1,0));Z*=RZ(k);z>=r-Z||!k.Ub()?k=z<k.videoData.dY()?Math.min(k.videoData.dY()+10,k.mf()):NaN:(k.policy.J&&(k.policy.C_?(k.policy.C=Math.min(k.policy.C+k.policy.K,k.policy.S),k.policy.Z=Math.min(k.policy.Z+1,10)):(k.policy.C=Math.max(k.policy.C+1,k.policy.S),k.policy.Z=Math.max(k.policy.Z+1,10))),k=Infinity);if(!isNaN(k)){if(l.loader&&y&&(y=l.HG.isActive(),z=l.Z.mf(),(z=XVg(l.loader,z-l.w4()))&&
!y)){l.HG.start();l.Zr.Md("inBufferPtl",{cmt:l.getCurrentTime(),seekTo:z+l.w4()});l.seekTo(z+l.w4(),{gY:"seektimeline_inBufferSeek",seekSource:34});return}l.seekTo(k,{gY:"seektimeline_pegToLive",seekSource:34})}}};
eQ=function(l,y){if(l.V)if(l.videoData.isLivePlayback&&l.videoData.N&&!l.videoData.N.Z()&&l.mediaElement&&l.mediaElement.N()>0&&dV(l.mediaElement)>0&&(l.C=Z8(l,l.C,!1)),y=l.X("html5_pseudogapless_shorts_seek_to_next_start")&&y?.seekSource===60,!l.mediaElement||!M2P(l,y))l.hv.start(750);else if(!isNaN(l.C)&&isFinite(l.C)&&(y=l.u0-(l.C-l.timestampOffset),!(y===0||Math.abs(y)<.005)))if(y=l.mediaElement.getCurrentTime()-l.C,Math.abs(y)<=l.PG||Math.abs(y)<.005)XFC(l);else{if(l.videoData.Zs)l.videoData.Zs=
!1;else if(!nN(l.videoData)&&l.C>=l.TM()-.1){l.C=l.TM();l.V.resolve(l.TM());l.cG.yM()&&l.Zr.Md("setEndedInSeek",{tgt:`${l.C}`,maxst:`${l.TM()}`});l.Zr.m4();return}try{const k=l.C-l.timestampOffset;l.mediaElement.seekTo(k);l.C_.Z=k;l.u0=k;l.N=l.C;l.Y=!1}catch(k){}}};
CgC=function(l,y){l.Ja=!0;l.X("html5_use_centralized_player_time")&&(l.C=l.S,l.N=l.C,l.S=NaN);cP5(l,y)};
bNs=function(l){let y=0,k=NaN,z="";if(!l.D)return{startSeconds:y,Y$:k,source:z};l.videoData.xa?y=l.videoData.iW:nN(l.videoData)&&(y=Infinity);if(g.la(l.videoData))return{startSeconds:y,Y$:k,source:z};l.videoData.startSeconds?(z="ss",y=l.videoData.startSeconds):l.videoData.mY&&(z="stss",y=l.videoData.mY);l.videoData.liveUtcStartSeconds&&(k=l.videoData.liveUtcStartSeconds);if(isFinite(y)&&(y>l.TM()||y<l.dY())){const r={};r.minSeekableTime=l.dY();r.maxSeekableTime=l.TM();r.cmt=l.getCurrentTime();r.ss=
y;r.utc=k;r.src=z;l.Zr.Md("startSecondsOutOfBounds",r);l.videoData.UA()&&(y=Z8(l,y,!1))}return{startSeconds:y,Y$:k,source:z}};
Aj=function(l){return!!l.videoData.startSeconds&&isFinite(l.videoData.startSeconds)&&l.videoData.startSeconds>1E9};
mCt=function(l,y){l.playbackData=y;l.videoData.isLivePlayback&&(l.A=new ujQ(()=>{a:{if(l.playbackData&&l.playbackData.Z.Z()){if(fc(l.videoData)&&l.loader){var k=l.loader.wh.B1()||0;break a}if(l.videoData.Z){k=l.videoData.Z.HG;break a}}k=0}return k}),l.Z=new xCQ(l.videoData,l.cG.experiments,()=>l.TM(!0)));
$Z(l.Zr)?(l.videoData.vV?.Zw||(y=bNs(l),y.Y$?(Kc(l.videoData)&&l.RV(y.Y$,y.startSeconds),l.N=y.startSeconds):y.startSeconds>0&&l.seekTo(y.startSeconds,{gY:"seektimeline_startPlayback",seekSource:15})),l.D=!1):Aj(l)||(l.N=l.N||l.videoData.startSeconds||0,l.videoData.isLivePlayback||(y=l.Zr.videoData.TM(),l.N>y&&(l.X("html5_sabr_log_invalid_sabr_current_time")&&l.Zr.Md("invalidSabrCmtStart",{rt:l.N,mst:y}),l.X("html5_sabr_vod_invalid_start_time_fallback")&&(l.N=0))))};
QJ=function(l,y){if(l.Z&&l.loader){var k=!1;y?k=!0:l.videoData.isLowLatencyLiveStream||l.videoData.latencyClass==="LOW"||l.videoData.latencyClass==="ULTRALOW"?k=GE4(l.Z):l.xz&&(l.xz=!1,k=GE4(l.Z,!0));k&&(y=l.Zr.l5,k=l.Z,k=RZ(k)*k.Z,y.qoe&&(y=y.qoe,g.Nw(y,g.vY(y.provider),"lra",[k]),y.Md("live-readahead-seconds",{v:k})));y=l.loader;k=l.Z.Z;l=l.Z;l=(l.Z-1+l.policy.Z)*RZ(l);var z=NaN;var r=y.OA;r===2||r===-1?(r=k,NC(y.Zr.getVideoData())&&(z=y.policy.V1)):r=k-1;r=Math.max(r,0);k=y.S;k.MV=r;k.A=z;y.A&&
(y.A.C_=l)}};
Oc=function(l,y){(l.loader=y)?QJ(l,!0):tj(l)};
M2P=function(l,y=!1){if(!l.mediaElement||l.mediaElement.N()===0||l.mediaElement.hasError())return!1;const k=l.mediaElement.getCurrentTime()>0;return l.videoData.N&&l.videoData.N.Z()||l.videoData.isLivePlayback||!l.videoData.eb()?l.C>=0&&!y&&(y=l.mediaElement.A(),y.length||!k)?D4(y,l.C-l.timestampOffset):k:k};
dw=function(l){return l.mediaElement?wV(l.mediaElement):0};
qKT=function(l,y){var k=l.getCurrentTime();const z=l.isAtLiveHead(k);if(l.A&&z){var r=l.A;if(r.Z&&!(k>=r.C&&k<r.N)){var Z=r.Z.NL(k);Z!==-1&&(r.C=r.Z.getStartTime(Z),r.N=r.C+r.Z.getDuration(Z),Z=(0,g.f)()/1E3-r.Z.QK(Z),Z-=r.J(),r.V.add(Z))}}l.Z&&(z&&(r=l.Z,Z=dw(l),r.sx++,r.sx<3||Date.now()-r.S<3E3||(r.S=Date.now(),r.C.push(Z),r.C.length>50&&r.C.shift())),apQ(l.Z,k,y),y&&UCC(l,!0));z!==l.MW&&(y=l.getCurrentTime()-l.kz<=500,k=l.T7>=1E3,y||k||(y=l.Zr.l5,y.qoe&&(y=y.qoe,k=g.vY(y.provider),g.Nw(y,k,"lh",
[z?"1":"0"])),l.MW=z,l.T7++,l.kz=l.getCurrentTime()))};
ww=function(l,y){let k=l.V;k||(l.V=new fA,k=l.V,eQ(l,y));return k};
Z8=function(l,y,k){if(isNaN(y))return NaN;const z=l.dY();k=l.TM(k);return l.X("html5_clamp_invalid_seek_to_min_seekable_time")&&!l.videoData.isLivePlayback&&y>k+1&&y<Infinity?(l.cG.yM()&&l.Zr.Md("clampInvalidSeek",{tgt:`${y}`,maxst:`${k}`}),z):g.gf(y,z,k)};
W3e=function(l,y){l.N=y};
IpC=function(l,y=!1){l.J||!(l.N>0)||l.mediaElement&&l.mediaElement.getCurrentTime()>0||(y={gY:"seektimeline_resumeTime",qQ:y},l.videoData.A||(y.seekSource=15),l.seekTo(l.N,y))};
cP5=function(l,y){THg(l,y).then(void 0,()=>{tj(l)});
ww(l,y).then(k=>{hj(l,k)},()=>{tj(l)});
l.Zr.DD(y);if(l.cG.yM()||V2Q(l))y=l.Dp(),y["native"]=`${+l.Y}`,y.tgt=`${l.C}`,y.otgt=`${l.C+l.timestampOffset}`,y.maxst=`${l.TM()}`,l.Z&&l.X("html5_high_res_seek_logging")&&(y.tht=`${l.Z.J()}`,y.ht=`${l.Z.mf()}`,y.adft=`${le(l.Z)}`),l.X("html5_sabr_parse_live_metadata_playback_boundaries")&&l.videoData.Z&&Kc(l.videoData)&&(y.minst=`${l.videoData.Z.jK}`,y.cminst=`${l.videoData.Z.dY()+l.timestampOffset}`,y.maxst=`${l.videoData.Z.e3}`,y.hts=`${l.videoData.Z.sj}`,y.cmaxst=`${l.videoData.Z.TM()+l.timestampOffset}`),
l.Zr.Md("startSeek",y)};
THg=function(l,y){l.b0||(l.loader?isFinite(l.C)?l.b0=l.loader.seek(l.C-l.timestampOffset,y):(nN(l.videoData),l.X("html5_unified_live_latency_reporting")&&(l.Zr.Tm=0),l.b0=Rb(l.loader),Xj(l.videoData)||(l.C=l.loader.getCurrentTime()+l.timestampOffset)):l.b0=g.SK(l.C-l.timestampOffset));return l.b0};
hj=function(l,y){l.J&&(l.J.resolve(y),l.Zr.h9(),l.cG.yM()||V2Q(l))&&(y=l.Dp(),y["native"]=`${+l.Y}`,y.otgt=`${l.C+l.timestampOffset}`,l.Zr.Md("seekEnd",y));tj(l)};
V2Q=function(l){return l.videoData.yf()&&l.X("html5_enable_shorts_seek_details_logging")};
XFC=function(l){l.V&&(l.V.resolve(l.mediaElement.getCurrentTime()),l.C_.C=null)};
tj=function(l){l.C=NaN;l.S=NaN;l.u0=NaN;l.V=null;l.b0=null;l.J=null;l.Ja=!1;l.Y=!1;l.PG=0;l.HG.stop();l.Xr.stop()};
JP_=function(l){if(l.D)if(l.videoData.vV?.Zw)l.D=!1;else if(g.la(l.videoData))l.D=!1;else{var y="ss",k=0;l.videoData.Z?.isManifestless&&l.videoData.Xr&&!Aj(l)&&(y="mss",k=l.videoData.Xr);(l.videoData.xa?l.X("html5_prioritize_windowed_st_start_seconds"):l.X("html5_prioritize_st_start_seconds"))&&!k&&l.videoData.mY&&(y="stss",k=l.videoData.mY);!k&&PgQ(l)&&(k=l.videoData.liveUtcStartSeconds||l.videoData.Xr,y="utc",k=l.TM()-l.QK(l.TM())+k);!k&&l.videoData.UA()&&l.videoData.mY&&(y="stss",k=l.videoData.mY);
var z={};if(k){if(k>l.TM()||k<l.dY())z.minSeekableTime=l.dY(),z.maxSeekableTime=l.TM(),z.cmt=l.getCurrentTime(),z.it=l.QK(l.getCurrentTime()),z.ss=k,z.utc=PgQ(l)?l.videoData.liveUtcStartSeconds||l.videoData.Xr:0,l.Zr.Md("startSecondsOutOfBounds",z),l.videoData.UA()&&(k=Z8(l,k,!1));l.seekTo(k,{gY:"seektimeline_startSeconds"});z[y]=k;l.Zr.Md("startSeconds",z);l.D=!1}else l.videoData.Xr&&(z[y]=l.videoData.Xr+l.w4(),l.Zr.Md("startSeconds",z))}};
YKz=function(l,y){const k=l.mediaElement,z=y.type;switch(z){case "seeking":const r=k.getCurrentTime()+l.timestampOffset;if(!l.V||l.Y&&r!==l.C)l.V=new fA,l.V.then(Z=>{hj(l,Z)},()=>{tj(l)}),l.videoData.isAd()&&bUs({adCpn:l.videoData.clientPlaybackNonce,
contentCpn:l.videoData.qO??""},y.Z),l.u0=r,iNQ(l.C_,k.getCurrentTime()),l.seekTo(r,{seekSource:104,gY:"seektimeline_mediaElementEvent"}),l.Y=!0;break;case "seeked":XFC(l);break;case "loadedmetadata":$Z(l.Zr)||JP_(l);eQ(l);break;case "progress":eQ(l);break;case "pause":l.K=l.getCurrentTime()}l.K&&((z==="play"||z==="playing"||z==="timeupdate"||z==="progress")&&l.getCurrentTime()-l.K>10&&(l.X("html5_sky_skip_pause_jump")?l.Zr.Md("skipPauseJump",{evt:z,cmt:l.getCurrentTime(),lpt:l.K}):l.seekTo(l.K,{gY:"pauseJump"})),
z!=="pause"&&z!=="play"&&z!=="playing"&&z!=="progress"&&(l.K=0))};
PgQ=function(l){return(yi(l.videoData)||!!l.videoData.liveUtcStartSeconds)&&(!!l.videoData.liveUtcStartSeconds||Aj(l))&&!!l.videoData.Z};
pF5=function(l,y){l.Zr.Md("sdai",{adj4t:y.toFixed(3)});l.RR=y;y+=1;l.C=y;l.N=y;ww(l).then(k=>{hj(l,k)},()=>{tj(l)})};
Gy=function(l,y){return l.Z.get(y)?.buffer.V()||[]};
an=function(l,y){return l.Z.get(y)?.buffer.N()||0};
n5z=function(l,y){function k(Z){return z.C_!=="yt"&&(r.partnerId===38&&z.playerStyle==="books"||r.partnerId===30&&z.playerStyle==="docs"||r.partnerId===33&&z.playerStyle==="google-live")?K3s(l,r,Z):g5y(l,r).then(()=>{z.X("embeds_enable_shorts")&&l.O().Jp&&r.isEmbedsShortsMode(new g.Fn(0,0),!!r.playlistId)?E5s(l,r):ie(l,r)},e=>{ie(l,r,!0);
throw e;})}
const z=l.O(),r=l.getVideoData();r.IR();r.loading=!0;return fp5(l)?jH5(l,r,y).then(()=>{ie(l,r)},Z=>{Z=ah(Z);
if(h7(Z.severity))return ie(l,r,!0),Promise.reject(Z);Z.errorCode==="onesie.response.badproxystatus"&&`${Z.details.st}`==="3"&&(SKC=!0);l.handleError(Z);return k("onesie")}):k("gvi")};
fp5=function(l){var y=l.O();if(y.X("html5_disable_onesie")||!y.X("html5_onesie")||!y.X("html5_onesie_inline")&&l.getVisibilityState()===5||y.C_!=="yt")return!1;var k=y.PF;if(!k||!k.Z)return l.handleError(new g.Gr("onesie.unavailable.hotconfig",{key:"0"})),!1;k.Z.K<(0,g.f)()&&(l.Md("okexp","1"),(k=l.xO())&&y.X("html5_prefer_trusted_host_on_key_expiration")&&(k.C=!0,(y=k.Z.get(0)?.Z())&&!Q5(y)&&k.Z.delete(0)));if(SKC)return l.Md("ost3","1"),!1;y={};return Object.keys(y).length>0?(y.onesie="0",l.handleError(new g.Gr("html5.missingapi",
y)),!1):!0};
Uc=function(l,y){const k=EB();fi(k,y);return g.zJ(k,qYP(),{MG:l.MG(),clientInterface:AA(l)})};
F35=function(l,y){return`${l.getPlayerType()}_${y.videoId}_${y.Rj}_${+y.isAutonav}${+y.X6}`};
jH5=async function(l,y,k){y.fetchType="onesie";var z=void 0;if(MTQ(y))if(z=l.oL){var r=F35(l,y);z=z.get(r)}else z=void 0;r=l.E1.Ny;if(z){if(y.loading=!1,g.VT(y,{player_response:z},!0),y.loading||CN(y))return Promise.resolve()}else{z=WmP(y,l.getPlayerSize(),l.getVisibilityState());k=new TZ(l,z,k);z=await k.fetch();const e={player_response:z};y.loading=!1;if(k.kd){for(const [A,Q]of k.kd.entries()){var Z=A;const t=Q;r.Z.set(Z,t,180);Z===y.videoId&&(Z=t.nx(),y.g8=Z)}r.xj=k}for(const [A,Q]of k.Ig.entries())r.C.set(A,
Q,180);g.VT(y,e,!0);if(y.loading||CN(y))return MTQ(y)&&(y=F35(l,y),l.oL?.put(y,z)),Promise.resolve()}r.Z.removeAll();r.C.removeAll();y.g8=[];l={};r="onesie.response";k=0;y.errorCode?(r="auth",l.ec=y.errorCode,l.ed=y.errorDetail,l.es=y.FT||"",k=2):(l.successButUnplayable="1",l.disposed=`${+y.IR()}`,l.afmts=`${+/adaptiveFormats/.test(z)}`,l.cpn=y.clientPlaybackNonce);return Promise.reject(new g.Gr(r,l,k))};
g5y=async function(l,y){const k=y.isAd();let z=!k,r=k?1:3;for(let e=0;e<r;e++){if(e>0){await e9(5E3);var Z=new g.WO("Retrying OnePlatform request",{attempt:e});g.WH(Z)}try{await o5T(l,y);return}catch(A){const Q=ah(A);Z=Q.errorCode;const t=l.O().X("html5_use_network_error_code_enums")?401:"401";z&&Z==="manifest.net.badstatus"&&Q.details.rc===t&&(z=!1,e===r-1&&(r+=1));if(e===r-1)return l=NHC(k,Q.details),l.details.backend="op",l.details.originec=Z,Promise.reject(l);if(Z==="auth"||Z==="manifest.net.retryexhausted"||
g.U9(l.O()))return Promise.reject(Q);l.handleError(Q);if(h7(Q.severity))break}}return Promise.reject(NHC(k,{backend:"op"}))};
o5T=async function(l,y){y.fetchType="gp";var k=l.O(),z=g.jz(k,y.S());z=z.Z?await z.Z:z.getValue();var r=Uc(k,z);const Z=WmP(y,l.getPlayerSize(),l.getVisibilityState()),e=g.ei(sHy),A=y.S();var Q=(0,g.f)(),t=!1;let O="empty";z=0;l.bq("psns");const d={A8:function(w){w.readyState===2&&l.bq("ps_c")}};
k.MG()&&(d.rX={gt:d8("player",{videoId:String(y.videoId)})});r=await g.Si(r,Z,e,void 0,d);l.bq("psnr");if(!y.IR()){r?"error"in r&&r.error?(t=!0,O=`esf:${r.error.message}`,z=r.error.code):r.errorMetadata&&(t=!0,O="its",z=r.errorMetadata.status):t=!0;if(t)return t=0,r=((0,g.f)()-Q).toFixed(),Q={},Q=k.X("html5_use_network_error_code_enums")?{backend:"op",rc:z,rt:r,reason:O,has_kpt:y.Oj?"1":"0",has_mdx_env:y.mdxEnvironment?"1":"0",has_omit_key_flag:g.Y("INNERTUBE_OMIT_API_KEY_WHEN_AUTH_HEADER_IS_PRESENT")?
"1":"0",has_page_id:k.pageId?"1":"0",has_token:A?"1":"0",has_vvt:y.b0?"1":"0",is_mdx:y.isMdxPlayback?"1":"0",mdx_ctrl:y.N7||"",token_eq:A===y.S()?"1":"0"}:{backend:"op",rc:`${z}`,rt:r,reason:O,has_kpt:y.Oj?"1":"0",has_mdx_env:y.mdxEnvironment?"1":"0",has_omit_key_flag:g.Y("INNERTUBE_OMIT_API_KEY_WHEN_AUTH_HEADER_IS_PRESENT")?"1":"0",has_page_id:k.pageId?"1":"0",has_token:A?"1":"0",has_vvt:y.b0?"1":"0",is_mdx:y.isMdxPlayback?"1":"0",mdx_ctrl:y.N7||"",token_eq:A===y.S()?"1":"0"},y="manifest.net.connect",
z===429?(y="auth",t=2):z>200&&(y="manifest.net.badstatus",z===400&&(t=2)),Promise.reject(new g.Gr(y,Q,t));y.loading=!1;g.VT(y,{raw_player_response:r},!0);g.U9(y.O())&&r&&r.trackingParams&&$M(r.trackingParams);if(y.errorCode)return k={ec:y.errorCode,ed:y.errorDetail,es:y.FT||""},z="auth",g.U9(y.O())&&y.errorCode&&(z=y.errorCode),Promise.reject(new g.Gr(z,k,2));if(!y.loading&&!CN(y))return k=y.isAd()?"auth":"manifest.net.retryexhausted",z=y.isAd()?2:1,Promise.reject(new g.Gr(k,{successButUnplayable:"1",
hasMedia:g.cF(y)?"1":"0"},z))}};
K3s=async function(l,y,k){function z(){return!0}
function r(t){t=ah(t);if(h7(t.severity))return Promise.reject(t);l.handleError(t);return!1}
const Z=E65(l.O(),y,l.getPlayerSize(),l.getVisibilityState(),l.isFullscreen()),e=y.isAd(),A=e?1:3;for(let t=0;t<A;t++){var Q=Z;t>0&&(await e9(5E3),Q={playerretry:t,playerretrysrc:k},e||(Q.recover="embedded"),Q=Cl(Z,Q));if(await L3Q(y,Q).then(z,r))return}y=e?"auth":"manifest.net.retryexhausted";k=e?2:1;if(!e&&Math.random()<1E-4)try{g.WH(new g.WO("b/152131571",btoa(Z)))}catch{}return Promise.reject(new g.Gr(y,{backend:"gvi"},k))};
L3Q=async function(l,y){function k(Q){if(!l.IR()){Q=Q?Q.status:-1;var t=0,O=((0,g.f)()-A).toFixed();O=z.X("html5_use_network_error_code_enums")?{backend:"gvi",rc:Q,rt:O}:{backend:"gvi",rc:`${Q}`,rt:O};var d="manifest.net.connect";Q===429?(d="auth",t=2):Q>200&&(d="manifest.net.badstatus",Q===400&&(t=2));return Promise.reject(new g.Gr(d,O,t))}}
l.fetchType="gvi";const z=l.O();var r;(r=fN4(l))?(r={format:"RAW",method:"POST",withCredentials:!0,timeout:3E4,postParams:r},y=Cl(y,{action_display_post:1})):r={format:"RAW",method:"GET",withCredentials:!0,timeout:3E4};const Z={};z.sendVisitorIdHeader&&l.visitorData&&(Z["X-Goog-Visitor-Id"]=l.visitorData);const e=$f(z.experiments,"debug_sherlog_username");e&&(Z["X-Youtube-Sherlog-Username"]=e);Object.keys(Z).length>0&&(r.headers=Z);const A=(0,g.f)();r=await t6(R3,y,r).then(void 0,function(Q){return k(Q.xhr)});
if(!r||!r.responseText)return k(r);l.loading=!1;r=iO(r.responseText);g.VT(l,r,!0);if(l.errorCode)return Promise.reject(new g.Gr("auth",{ec:l.errorCode,ed:l.errorDetail,es:l.FT||""},2));if(!l.loading&&!CN(l))return r=l.isAd()?"auth":"manifest.net.retryexhausted",y=l.isAd()?2:1,Promise.reject(new g.Gr(r,{successButUnplayable:"1"},y))};
NHC=function(l,y){return new g.Gr(l?"auth":"manifest.net.retryexhausted",y,l?2:1)};
ie=async function(l,y,k=!1){const z=l.O();k&&(!g.JA(z)||eS(y)!=="embedded")||y.Pd||eS(y)!=="adunit"&&(g.dU(z)||uh(z)||g.ow(z)||g.Pn(z)||g.aq(z)||AA(z)==="WEB_CREATOR")||(k=g.jz(z,y.S()),k=k.Z?await k.Z:k.getValue(),v5t(l,y,k))};
v5t=async function(l,y,k){try{const Z=l.O(),e=Uc(Z,k);var z=y.O();const A=g.wz(),Q={context:g.b9(y),videoId:y.videoId,racyCheckOk:y.racyCheckOk,contentCheckOk:y.contentCheckOk,autonavState:"STATE_NONE"};eS(y)==="adunit"&&(Q.isAdPlayback=!0);z.embedConfig&&(Q.serializedThirdPartyEmbedConfig=z.embedConfig);z.iR&&(Q.showContentOwnerOnly=!0);y.yP&&(Q.showShortsOnly=!0);A.G7(141)&&(Q.autonavState=A.G7(140)?"STATE_OFF":"STATE_ON");if(g.xp(z)){const w=A.G7(65);k=w!=null?!w:!1;const h=!!g.Ay("yt-player-sticky-caption");
Q.captionsRequested=k&&h}const t=z.getWebPlayerContextConfig()?.encryptedHostFlags;t&&(Q.playbackContext={encryptedHostFlags:t});var r=Q;const O=g.ei(BHy);l.bq("wn_s");z={};Z.MG()&&(z.rX={gt:d8("next",{videoId:String(y.videoId)})});const d=await g.Si(e,r,O,void 0,z);l.bq("wn_r");!d||"error"in d&&d.error||(g.U9(y.O())&&d.trackingParams&&$M(d.trackingParams),g.VT(y,{raw_watch_next_response:d},!1))}catch(Z){}};
E5s=async function(l,y){var k=g.jz(l.O(),y.S());k=k.Z?await k.Z:k.getValue();HNe(l,y,k)};
HNe=async function(l,y,k){l=l.O();try{const r=Uc(l,k);var z={context:g.b9(y),playerRequest:{videoId:y.videoId},disablePlayerResponse:!0};const Z=g.ei(RKT);k={};l.MG()&&(k.rX={gt:d8("reel_item_watch",{videoId:String(y.videoId)})});const e=await g.Si(r,z,Z,void 0,k);!e||"error"in e&&e.error||g.VT(y,{raw_reel_item_watch_response:e})}catch(r){}};
DCy=function(l,y){l.bq("vir");l.bq("ps_s");Eo("vir",void 0,"video_to_ad");y=n5z(l,y);y.then(function(){l.bq("virc");Eo("virc",void 0,"video_to_ad");l.bq("ps_r");Eo("ps_r",void 0,"video_to_ad")},function(){l.bq("virc");
Eo("virc",void 0,"video_to_ad")});
return y};
Mn=function(){const l=frC();return!(!l||l==="visible")};
yIq=function(l){const y=lKq();y&&document.addEventListener(y,l,!1)};
k3q=function(l){const y=lKq();y&&document.removeEventListener(y,l,!1)};
lKq=function(){let l;if(document.visibilityState)l="visibilitychange";else{if(!document[Fp+"VisibilityState"])return"";l=Fp+"visibilitychange"}return l};
rIg=function(l){zuQ=l};
ZiQ=function(l){cr=l};
PYs=function(l){var y=l.bW;l=l.videoData;const k=VB(y,l);y.X("html5_disable_client_autonav_cap_for_onesie")||k.compose(P7(y,l));return k};
rr=function(l,y){Ct(l,y.reason,y.Z.info,y.source,y.token)};
GQ5=function(l,y){l.E1.Bh()||(l.Md("sgap",{f:y}),l.E1.clearQueue(!1,y==="pe"))};
var lsC=function(){return PO[G[19]](this,4,8137)};
AI_=function(l){l.mediaElement&&(l.yj?(be(l),l.yb(),eu4(l,!1)):(l.videoData.HG&&l.videoData.HG.V(),l.mediaElement.stopVideo()),l.playVideo())};
$Z=function(l){return l.X("html5_disable_video_player_initiated_seeks")&&Kc(l.videoData)};
xZ=function(l,y){l.Lw&&ue(l);l.Lw=new g.N1(y*1E3,0x7ffffffffffff);l.Lw.namespace="endcr";l.addCueRange(l.Lw)};
ue=function(l){l.removeCueRange(l.Lw);l.Lw=null};
qn=function(l){if(l.videoData.N&&l.videoData.N.Z()){var y=mk(l);if(l.loader&&(l=l.loader,!l.IR()))if(l.policy.Z){var k=l.J;if(y.isLocked()&&k.Z.N||k.C===void 0||!y.equals(k.C)){k=l.J.C;fqT(l.J,y);var z;if(z=y.isLocked()&&y.reason==="m"){z=l.J;var r=z.V?.info.K().qualityOrdinal;z=z.sj?!0:z.V?y.Z!==r?!0:!z.Z.N||z.rZ.vV&&z.Z.Z===z.V.info.itag?!1:!0:!1}r=l.policy.kK&&y.reason==="l";k=k.Z>y.Z&&y.reason==="b";z||r||k?(l.Zr.SZ({reattachOnConstraint:z?"u":r?"drm":"perf",lo:y.C,up:y.Z}),l.policy.vV||(l.J.Z.N=
!1)):(l.policy.vV&&(l.J.Z.N=!1),WY(l))}}else!aGg(l.Z,y)&&l.videoTrack&&(r=l.Z.Z,eg(l,iwP(l.Z,y)),QB(l),k=y.isLocked()&&y.reason==="m"&&l.Z.Y,z=l.policy.kK&&y.reason==="l"&&fy(l.videoTrack),y=r.Z>y.Z&&y.reason==="b",r=l.Z.mK&&!eL(),k||z||y||r?l.Zr.SZ({reattachOnConstraint:k?"u":z?"drm":r?"codec":"perf"}):WY(l))}};
In=function(l,y=!0){l.cG.YM&&!l.videoData.backgroundable&&l.mediaElement&&!l.Jk()&&(l.isBackground()&&l.mediaElement.RR()?(l.Md("bgmobile",{suspend:1}),l.lI(!0,!0)):!l.isBackground()&&y&&Wr(l)&&l.Md("bgmobile",{resume:1}))};
Ty=function(l){if(!nN(l.videoData))return NaN;let y=0;l.loader&&l.videoData.Z&&(y=fc(l.videoData)?l.loader.wh.B1()||0:l.videoData.Z.HG);return(0,g.f)()/1E3-l.QK()-y};
$1C=function(l,y){if(l.playerType===2||l.cG.Pd)y.On=!0;var k=waP(y.T7,y.bv,l.cG.V,l.cG.A);k&&(y.adFormat=k);l.playerType===2&&(y.lE=!0);if(l.isFullscreen()||l.cG.V)k=g.Ay("yt-player-autonavstate"),y.autonavState=k||(l.cG.V?2:l.videoData.autonavState);y.endSeconds&&y.endSeconds>y.startSeconds&&xZ(l,y.endSeconds)};
VJ=function(l){l.loader&&(l.loader.dispose(),l.loader=null,Oc(l.Hn,null));l.Ly()?Qo_(l):l.yb()};
d14=function(l){if(!l.playerState.Z(128))if(l.videoData.isLoaded(),l.Ji=g.tp(l.videoData.dP),g.cF(l.videoData)){l.QM.tick("bpd_s");Pr(l).then(()=>{l.QM.tick("bpd_c");if(!l.IR()){l.TX&&(l.e2(cK(cK(l.playerState,512),1)),Wr(l));var k=l.videoData;k.endSeconds&&k.endSeconds>k.startSeconds&&xZ(l,k.endSeconds);l.qs.finished=!0;Jj(l,"dataloaded");l.oV.Wo()&&YZ(l);Wcq(l.bW,l.Jf)}});
l.X("html5_log_media_perf_info")&&l.Md("loudness",{v:l.videoData.YR.toFixed(3)},!0);var y=l.mediaElement?.Jv();if(y&&"disablePictureInPicture"in y&&l.cG.MS)try{y.disablePictureInPicture=l.cG.S2&&!l.videoData.backgroundable}catch(k){g.WH(k)}tS4(l);l.Pu=new OiQ(l.videoData)}else Jj(l,"dataloaded")};
wl_=function(l){const y=l.videoData;DCy(l,l.o7).then(void 0,k=>{l.videoData!==y||y.IR()||(k=ah(k),k.errorCode==="auth"&&l.videoData.errorDetail&&l.videoData.errorDetail!=="7"?l.jI(k.errorCode,2,unescape(l.videoData.errorReason),wd(k.details),l.videoData.errorDetail,l.videoData.FT||void 0):l.handleError(k))})};
pt=function(l){return g.dU(l.cG)&&l.videoData.isLivePlayback&&(!l.cG.X("html5_allow_multiview_tile_preload")||!l.videoData.SN)};
Pr=function(l){VJ(l);l.Jf=null;const y=dCC(l.cG,l.videoData,l.Jk());l.M3=y;l.M3.then(k=>{huT(l,k)},k=>{l.IR()||(k=ah(k),l.visibility.isBackground()?(Kt(l,"vp_none_avail"),l.M3=null,l.qs.reset()):(l.qs.finished=!0,l.jI(k.errorCode,k.severity,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK",wd(k.details))))});
return y};
tS4=function(l){Sn(l.videoData,"html5_set_debugging_opt_in")&&(l=g.wz(),l.G7(183)||(GT(183,!0),l.save()))};
Jj=function(l,y="dataupdated"){l.publish("internalvideodatachange",y,l.videoData)};
huT=function(l,y){if(!l.IR()&&!y.videoData.IR()){l.Jf=y;mCt(l.Hn,l.Jf);if(l.videoData.isLivePlayback){var k=G3C(l.E1.Ny,l.videoData.videoId)||l.loader&&!isNaN(l.loader.Ja);k=l.X("html5_onesie_live")&&k;$Z(l)||l.videoData.Xr>0&&!fc(l.videoData)||k||l.seekTo(l.TM(),{gY:"videoplayer_playbackData",seekSource:18})}if(l.videoData.N.Z()){if(a4z(l.videoData)){l.jI("fmt.missing",2,"BROWSER_OR_EXTENSION_ERROR",wd({missabrurl:1}));return}l.loader?g.WH(Error("Duplicated Loader")):(k=g.i_(l.cG.experiments,"html5_onesie_defer_content_loader_ms"))&&
l.sG()&&G3C(l.E1.Ny,l.videoData.uv)?g.JK(()=>{l.IR()||l.loader||gw(l)},k):gw(l)}else!l.videoData.N.Z()&&Qi(l.videoData)&&l.AN(new Ec(l.videoData.videoId||"",4));
l.D0();uCP(y).then(()=>{const z={};l.ww(z);l.cG.yM()&&l.X("html5_log_media_perf_info")&&l.Md("av1Info",z);qn(l)})}};
Wr=function(l,y=!1){if(!l.mediaElement||!l.videoData.N)return!1;var k=aKs(l,y),z=l.mediaElement.RR();let r=!1;z&&z.equals(k)||(iiQ(l,k),r=!0);l.playerState.Z(2)||IpC(l.Hn,y);a:{y=r;if(Kc(l.videoData)){if(!l.videoData.eb())break a}else if(!g.BF(l.videoData))break a;if(l.mediaElement)if((k=l.videoData.J)&&l.mediaElement.S()){z=l.mediaElement.Jv();if(l.GA)if(z!==l.GA.element)be(l);else if(y&&k.flavor==="fairplay"&&!Uw())be(l);else break a;if(l.X("html5_report_error_for_unsupported_tvos_widevine")&&Uw()&&
k.flavor==="widevine")l.jI("fmt.unplayable",1,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK","trg.unspttvoswidevine");else{l.GA=new U1t(z,l.videoData,l.cG,l.mediaElement,l.u$);l.GA.subscribe("licenseerror",l.df,l);l.GA.subscribe("qualitychange",l.Am,l);l.GA.subscribe("heartbeatparams",l.fv,l);l.GA.subscribe("keystatuseschange",l.SP,l);l.GA.subscribe("ctmp",l.Md,l);for(const Z of l.F5.keys)y=l.F5.get(Z),l.GA.Hd(y);l.X("html5_eme_loader_sync")||l.F5.removeAll()}}else l.jI("fmt.unplayable",1,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK",
"trg.updatedrm")}return r};
gw=function(l){var y=l.videoData.Z,k={cpn:l.videoData.clientPlaybackNonce,c:l.cG.Z.c,cver:l.cG.Z.cver};for(const [A,Q]of Object.entries(k)){k=A;var z=Q;for(var r of Object.values(y.Z))r.pP.Y(k,z);y.C_?.Y(k,z)}r=l.cG;k=l.videoData;z=l.o7;y=new g.MS_(r);var Z=bEg({hasSubfragmentedFmp4:k.hasSubfragmentedFmp4,K5:k.K5});y.K=Z;y.Ja=k.maxReadAheadMediaTimeMs/1E3||y.Ja;z.V.B1()===z.policy.Z?y.T7=10:y.T7=k.minReadAheadMediaTimeMs/1E3||y.T7;y.Ak=k.readAheadGrowthRateMs/1E3||y.Ak;k.uY&&(y.J=!0,y.s6=!0,r.experiments.sA().Z.G7(XlT)&&
Xts(k)===3&&(y.Ky=!0));y.Wb=!AN();g.dU(r)||!AN()?(y.rb=8388608,y.Oj=524288,y.qg=5,y.u0=1048576,y.ma=1.5,y.CP=4587520,MP()&&(y.CP=786432),y.A*=1.1,y.Y*=1.1,y.ji=!0):r.C&&(y.A*=1.3,y.Y*=1.3);g.Mx&&g.G6("crkey")&&(Z=r.Z.cmodel==="CHROMECAST/ANCHOVY",y.rb=20971520,y.Oj=1572864,Z&&(y.CP=812500,y.O1=1E3,y.Yl=5,y.u0=2097152));g.N2&&(y.ji=!0);r.supportsGaplessAudio()||(y.kE=!1);L2&&(y.jN=!0);y.Cf=r.X("html5_peak_shave");k.eQ()&&r.X("html5_disable_peak_shave_for_onesie")&&(y.Cf=!1);Z=k.Z?.J();if(fc(k)){y.Fg=
!0;y.DW||(y.LS=!0);y.g4=!0;y.tb=!0;y.Wy=!0;if(k.latencyClass==="ULTRALOW"||k.latencyClass==="LOW"&&!r.X("html5_disable_low_pipeline"))y.X_=2,y.xV=4;y.iX=k.defraggedFromSubfragments;g.la(k)&&(y.kz=!1);y.dF=g.tL(r)}k.isAd()&&(y.uW=0,y.U7=0);y.V9=r.X("html5_ultra_low_latency_subsegment_readahead")&&k.latencyClass==="ULTRALOW";y.N=r.yM();z.C.V=fc(k)?.5:0;k.isLivePlayback&&(y.PV=g.i_(r.experiments,"html5_min_startup_buffered_media_duration_for_live_secs")||.25,y.Xr=!1);k.eb()&&(y.Xr=!1);z=!r.X("html5_sabr_keep_all_quality_constraints")&&
!k.eb();const e=r.X("html5_sabr_remove_all_quality_constraints_for_drm_traffic")&&k.eb();y.Hu=z||e;y.pf=LN(k);NC(k)&&(y.V9=!0,k.latencyClass==="LOW"?y.OA=g.i_(r.experiments,"html5_jumbo_mobile_subsegment_readahead_target"):k.latencyClass==="ULTRALOW"&&(y.OA=g.i_(r.experiments,"html5_jumbo_ull_subsegment_readahead_target")),y.F_=!0);k.UA()&&(y.Gz=1.3);y.jN=y.jN||k.JX;y.f2=(y.f2||k.f2)&&r.A;y.q_=k.K;r.yM()&&(y.MW=!0);k.K&&!Z&&(y.LZ=!0);k.K&&k.isAd()&&(y.A*=1.6,y.Y*=1.6);Qi(k)&&(y.V=k.videoId,y.Ng=!0,
y.zw=100,k.e5&&k.e5.length>0&&(y.zA=k.e5));y.kK=k.Ac;y.IF=vV(r,{},k.N||void 0,EK(k));y.gb=gH(k)&&(g.ow(r)||g.Pn(r));Kc(k)&&(y.S=!0,y.Yr=r.X("html5_seek_refactor_bh_fix"),y.tA=r.X("html5_use_loader_cmt_for_bh"),y.sS=r.X("html5_estimate_live_partial_slice_duration"),g.dU(r)&&!g.is()&&r.X("html5_force_audio_to_cover_video_keyframe")?y.WG=!1:y.WG=!0,y.hX||k.isLivePlayback||!r.X("html5_sabr_non_streaming_xhr_vod_client_request_cancellation")||(y.MS=!0,y.kC=g.i_(r.experiments,"html5_sabr_non_streaming_xhr_vod_request_cancellation_timeout_ms")),
r.X("html5_sabr_report_partial_segment_estimated_duration")&&(y.TC=!0),y.Z=!0,y.On=r.X("html5_trigger_loader_when_idle_network"),y.d8=r.X("html5_sabr_parse_live_metadata_playback_boundaries"),y.Jp=r.X("html5_consume_onesie_next_request_policy_for_sabr"),y.oy=r.X("html5_sabr_report_next_ad_break_time"),y.jw=r.X("html5_log_high_res_buffer_timeline")&&r.yM(),y.sQ=r.X("html5_remove_stuck_slices_beyond_max_buffer_limits"),y.bG=r.X("html5_gapless_sabr_btl_last_slice")&&jn(k),y.IL=r.X("html5_reset_last_appended_slice_on_seek")&&
jn(k),fc(k)?(y.nj=!0,y.DY=r.X("html5_disable_variability_tracker_for_live"),y.mK=!0,r.X("html5_simplified_backup_timeout_sabr_live")&&(y.Cp=!0,y.O1=y.lR)):y.PF=r.X("html5_probe_request_on_sabr_request_progress"),y.Qq=r.X("html5_serve_start_seconds_seek_for_post_live_sabr"),y.vn=r.X("html5_flush_index_on_updated_timestamp_offset"),y.D=Kc(k),y.e5=r.X("html5_ignore_partial_segment_from_live_readahead"),r.X("html5_include_partial_segment_for_jumbo_ll")&&NC(k)&&(y.e5=!1),y.DX=r.X("html5_use_non_active_broadcast_for_post_live"),
y.C_=r.X("html5_use_centralized_player_time"),y.xz=r.X("html5_log_centralized_player_time"),y.hk=r.X("html5_consume_onesie_sabr_seek"),y.b0=r.X("html5_enable_sabr_seek_loader_refactor"),k.enableServerStitchedDai&&(y.C=!0,y.TD=r.X("html5_reset_server_stitch_state_for_non_sabr_seek"),y.pj=r.X("html5_remove_ssdai_append_pause")&&!k.j2(),y.Xz=r.X("html5_ssdai_log_ssevt_in_loader_timers")),y.bO=r.yM(),y.latencyClass=k.latencyClass,y.JI=!k.UA()&&r.X("html5_prebuffer_instream_media_vod"));y.hj=g.hW5(k);
y.oY=r.X("html5_enable_sabr_otf_in_client");fb(r.J,vt.BITRATE)&&(y.CP=NaN);if(z=g.i_(r.experiments,"html5_request_size_max_kb"))y.u0=z*1024;if(r.J.C)y.Q9="; "+vt.EXPERIMENTAL.name+"=allowed";else if(r.X("html5_enable_cobalt_tunnel_mode")&&g.is()){const {name:A,valid:Q}=vt.TUNNELMODE;y.Q9=`; ${A}=${Q}`}r=k.serverPlaybackStartConfig;r?.enable&&r?.playbackStartPolicy&&(y.RY=!0,F0(y,r.playbackStartPolicy,2));r=cIz(l);l.F5.removeAll();a:{k=l.E1.Ny;if(z=l.videoData.videoId)if(Z=k.Z.get(z)){k.Z.remove(z);
k=Z;break a}k=void 0}l.loader=new Cas(l,l.o7,y,l.videoData.Z,l.videoData.N,mk(l),r,l.videoData.enableServerStitchedDai,k,l.videoData.C_);y=l.videoData.X("html5_disable_preload_for_ssdai_with_preroll")&&l.videoData.isLivePlayback&&l.sG()?!0:l.TX&&pt(l);l.loader.initialize(l.getCurrentTime(),mk(l),y);l.videoData.probeUrl&&(l.loader.xz=l.videoData.probeUrl);!l.Ji.length&&!l.TX||l.videoData.cotn||l.loader?.sj(!1);Oc(l.Hn,l.loader);l.m8&&(i2y(l.loader,l.m8),l.Md("sdai",{sdl:1}));l.videoData.PF()&&(l=l.loader,
l.policy.pS=l.policy.Xh)};
YZ=function(l){l.IR();if(!l.oV.finished&&l.qs.finished&&!l.playerState.Z(128)&&!l.Ji.length){if(!l.Yw.started){var y=l.Yw;y.started=!0;y.sync()}if(!l.pJ()){l.loader&&(l.sA().Z.G7(ft)?y=l.loader.Xr(!0)>0:(y=l.loader.timing,y=!!y.C&&!!y.N),l.ey=y);l.oV.finished||(l.oV.finished=!0);y=l.X("html5_onesie_live")&&l.loader&&!isNaN(l.loader.Ja);!l.videoData.isLivePlayback||l.videoData.Xr>0&&!fc(l.videoData)||y||$Z(l)||(l.seekTo(Infinity,{gY:"videoplayer_readying",seekSource:18}),l.isBackground()&&(l.cJ=!0));
y=l.l5;if(y.qoe){y=y.qoe;const z=y.provider.videoData,r=y.provider.cG;for(var k of r.Qc)RF(y,k);if(y.provider.X("html5_enable_qoe_cat_list"))for(const Z of z.uV)RF(y,Z);else z.Qc&&RF(y,y.provider.videoData.Qc);z.UA()&&(k=z.Z,fc(z)&&RF(y,"manifestless"),k&&Yp(k)&&RF(y,`live-segment-${Yp(k).toFixed(1)}`));Kc(z)?RF(y,"sabr"):y.WU(sK(z));if(pc(z)||z.j2())z.j2()&&RF(y,"ssa"),RF(y,"lifa");fN(z)&&RF(y,"cdm");z.gatewayExperimentGroup&&(k=z.gatewayExperimentGroup,k==="EXPERIMENT_GROUP_SPIKY_AD_BREAK_EXPERIMENT"?
k="spkadtrt":k==="EXPERIMENT_GROUP_SPIKY_AD_BREAK_CONTROL"&&(k="spkadctrl"),RF(y,k));r.C_!=="yt"&&y.Z.set("len",[z.lengthSeconds.toFixed(2)]);z.cotn&&!Qi(z)&&y.nZ(!0);r.yM()&&(k=g$P())&&y.Md("cblt",{m:k});r.X("html5_log_screen_diagonal")&&y.Md("cbltdiag",{v:window.H5vccScreen?.GetDiagonal?window.H5vccScreen.GetDiagonal():0})}l.publish("playbackready");K4("pl_c",l.QM.timerName)||(l.QM.tick("pl_c"),Eo("pl_c",void 0,"video_to_ad"));K4("pbr",l.QM.timerName)||(l.QM.tick("pbr"),Eo("pbr",void 0,"video_to_ad"))}}};
Kt=function(l,y){l.playerState.Z(128)||(l.e2(bt(l.playerState,1028,9)),l.Md("dompaused",{r:y}),l.publish("onAutoplayBlocked"))};
g.jQ=function(l){const y=mk(l);return W6(y)||!l.Jf?null:g.Dg(l.Jf.Z.videoInfos,k=>y.V(k))};
Ct=function(l,y,k,z,r){var Z=l.l5;const e=l.videoData;e.C=k;var A=g.jQ(l);k=new bis(k,y,A?A.itag:"",z,r);if(Z.qoe){Z=Z.qoe;z=r=g.vY(Z.provider);A=[k.Z.id,k.C,Z.PF,k.reason];Z.provider.cG.sA().Z.G7(ft)&&!Z.b0&&A.push(v$y(Z,k));k.token&&A.push(k.token);g.Nw(Z,z,"vfs",A);Z.PF=k.Z.id;A=Z.provider.Zr.getPlayerSize();if(A.width>0&&A.height>0){A=[Math.round(A.width),Math.round(A.height)];const Q=g.gU();Q>1&&A.push(Q);g.Nw(Z,z,"view",A)}Z.b0||(Z.provider.cG.yM()&&RF(Z,"rqs2"),Z.provider.videoData.Z&&Va(Z.provider.videoData.Z)&&
Z.Z.set("preload",["1"]));Z.b0=!0;Z.J=!0;k.reason==="m"&&++Z.Xz===100&&yB(Z,2);g.Nw(Z,r,"vps",[Z.fp]);Z.Y||Z.reportStats(r)}k=l.bW;k.C=0;k.Z=0;l.publish("internalvideoformatchange",e,y==="m")};
mk=function(l){if(l.Jf){var y=l.bW;var k=l.Jf;l=l.jp();let z=Mz5(y);if(W6(z)){if(z=y.F1(k).compose(XnC(y,k)).compose(Chg(y,k)).compose(VB(y,k.videoData)).compose(P7(y,k.videoData,k)).compose(J3(y,k)).compose(p5(y,k)),W6(l)||y.X("html5_apply_pbr_cap_for_drm"))z=z.compose(bAC(y,k))}else y.X("html5_perf_cap_override_sticky")&&(z=z.compose(J3(y,k))),y.X("html5_ustreamer_cap_override_sticky")&&(z=z.compose(bAC(y,k)));z=z.compose(p5(y,k));y=k.videoData.s6.compose(z).compose(k.videoData.TC).compose(l)}else y=
Tj;return y};
u5C=function(l){const y="loadstart loadedmetadata play playing progress pause ended suspend seeking seeked timeupdate durationchange ratechange error waiting resize".split(" ");for(const k of y)l.FR.j(l.mediaElement,k,l.zb,l);l.cG.OG&&l.mediaElement.S()&&(l.FR.j(l.mediaElement,"webkitplaybacktargetavailabilitychanged",l.v3,l),l.FR.j(l.mediaElement,"webkitcurrentplaybacktargetiswirelesschanged",l.UO,l))};
Qo_=function(l){if(l.yj)if(l.Ux(),l.yj.K)try{l.cG.yM()&&l.Md("rms",{l:"vprms",sr:l.Ly(),rs:l.yj.N()}),l.yj.clear(),l.mediaElement?.PF(l.yj),l.yj=null}catch(k){var y=new g.WO(`Error while clearing Media Source in VideoPlayer: ${k.name}, ${k.message}`);y=ah(y);l.handleError(y);l.yb()}else l.yb()};
Zk5=function(l,y,k,z){const r=[];for(const A of k){if(!A.url)continue;k=new g.zq(A.url,!0);if(A.s){var Z=k,e=A.sp;const Q=pR(45,3210,mv(32,7489,A.s));Z[G[37]](e,Jp(11,7898,Q))}for(const Q of Object.keys(z))k.set(Q,z[Q]);Z=oh(A.type,A.quality,A.itag,A.width,A.height);r.push(new x1s(Z,k))}return FC(l.J,r,xf(l,y),!1)};
mv=function(l,y,k,z,r,Z,e){var A=y^l;var Q;(l|48)==l&&(Q=z(r,Z,e));(l&105)==l&&(Q=decodeURIComponent(k));(l|64)==l&&(k[A^4426]!=-(A^4454)&&(k[A^4439]<-5&&(((0,k[A^4433])(((((0,k[A^4433])((0,k[A^4474])(k[A^4440],k[A^4401]),k[A^4464],k[A^4392],k[3]),k[A^4417])((0,k[A^4447])(k[A^4468],k[3]),k[A^4429],(0,k[A^4477])(k[A^4469],k[A^4442]),k[A^4467],k[A^4398]),k[A^4471])(k[A^4418],k[A^4464]),k[A^4388])(k[A^4464],k[A^4478]),k[A^4388],k[A^4467],k[1]),(0,k[A^4457])((0,k[A^4457])((0,k[A^4457])((0,k[A^4436])(k[A^
4428],k[A^4424]),k[A^4474],k[A^4427],k[A^4470]),k[A^4430],(0,k[A^4422])(),k[A^4396],k[A^4435]),k[A^4433],k[A^4461],k[6]),k[A^4443])(k[6],k[A^4386]),1)||((((0,k[A^4458])(k[A^4440],k[A^4417]),(0,k[A^4420])(k[6],k[A^4395]),k[A^4398])((0,k[A^4420])(k[A^4419],k[A^4456]),k[A^4444],k[6]),k[A^4420])(k[A^4396],k[A^4464]),(0,k[A^4388])(k[A^4444],(0,k[A^4427])(k[A^4396],k[A^4468]),((0,k[A^4398])((0,k[A^4458])(k[A^4423],k[A^4397]),k[A^4420],k[6],k[A^4466]),(0,k[A^4420])(k[A^4397],k[A^4465]),k[A^4430])((0,k[A^
4422])(),k[A^4397],k[A^4474]),(0,k[A^4430])((0,k[new z(G[A^4440])/(A^4745)])(),k[A^4397],k[A^4435]),k[A^4396]),k[A^4430])((0,k[A^4387])(),k[A^4396],k[A^4435])),k[A^4460]>=-(A^4459)&&((0,k[A^4398])(((0,k[A^4458])(k[A^4428],k[A^4396]),k[A^4433])(k[A^4424],k[6]),k[A^4433],k[1],k[A^4417])*((0,k[A^4458])(k[A^4460],k[0]),k[A^4476])((0,k[A^4429])(),k[A^4443],k[A^4471])>>>(0,k[A^4425])(k[A^4465],k[A^4462])!==(0,k[A^4394])(k[A^4464],k[A^4391]))*(0,k[A^4444])((0,k[A^4473])(k[A^4385],k[A^4445]),k[A^4425],k[4],
k[A^4436]),k[A^4463]!==-(A^4454)&&(k[A^4454]<-(A^4454)||((0,k[A^4392])(k[A^4401]),null))&&(0,k[A^4418])(k[A^4395],k[A^4439]),k[A^4454]!=(A^4454)&&(k[A^4399]!==-4?(((0,k[A^4442])(k[A^4395]),k[A^4441])(k[A^4395],k[A^4432]),k[A^4442])(k[A^4395]):((0,k[A^4418])(k[A^4395],k[A^4399]),k[new z(G[A^4402])/(A^4745)%(A^4573)-(A^4400)+(A^4581)])((0,k[A^4442])(k[A^4479]),k[A^4425],k[A^4417],k[2])),Q=[]);if(!((l^27)>>3)){k=(k%z[G[2]]+z[G[2]])%z[G[2]];var t=z[0];z[0]=z[k];z[k]=t;Q=[k]}return Q};
be=function(l){l.GA&&(l.GA.dispose(),l.GA=null)};
m1s=function(l){l.mediaElement&&l.mediaElement.Jk()&&(l.h3=(0,g.f)());l.cG.xC?g.JK(()=>{SQ(l)},0):SQ(l)};
SQ=function(l){if(!l.yj?.oZ()){if(l.mediaElement)try{l.R1=l.mediaElement.playVideo()}catch(y){Kt(l,`err.${y}`)}if(l.R1){const y=l.R1;y.then(void 0,k=>{if(!(l.playerState.Z(4)||l.playerState.Z(256)||l.R1!==y||k&&k.name==="AbortError"&&k.message&&k.message.includes("load"))){let z="promise";k&&k.name&&(z+=`;m.${k.name}`);Kt(l,z);l.HH=!0;l.videoData.BF=!0}})}}};
var zVt=function(l,y,k,z,r,Z,e,A){return x2[G[19]](this,3,4516,l,y,k,z,r,Z,e,A)};
var eu4=function(l,y=!1){if(l.yj)return l.yj.V;qB5(l,y);return l.bX()?.Ja()||null},aKs=function(l,y=!1){let k=null;
l.videoData.N?.Z()?(k=eu4(l,y),l.loader?.resume()):(VJ(l),l.videoData.HG&&(k=l.videoData.HG.C()));return k},WnT=function(l,y){if(y.Z.video.quality==="auto"&&y.getInfo().N()&&l.videoData.WG)for(const k of l.videoData.WG)if(k.getHeight()===l.k7&&k.Z.video.quality!=="auto")return k.getInfo();
return y.getInfo()},IK4=function(l){return!!(l.X("html5_native_audio_track_switching")&&g.Km&&l.videoData.C?.N())},Tug=function(l){if(!IK4(l))return!1;
l=l.mediaElement?.audioTracks();return!!(l&&l.length>1)},PaQ=function(l){const y=VSy(l);
if(y){var k=nt[y]||y;return l.videoData.getAvailableAudioTracks().find(z=>z.a7.getName()===k)}},VSy=function(l){if(l=l.mediaElement?.audioTracks())for(let y=0;y<l.length;++y){const k=l[y];
if(k.enabled)return k.label}},JI5=function(l){const y=l.mediaElement?.audioTracks();
if(y){var k=[];for(let r=0;r<y.length;++r){var z=y[r];z=new g.NV(z.label,new g.XF(nt[z.label]||z.label,z.label,!1));k.push(z)}l.videoData.bO=k}},cIz=function(l){let y;
const k=l.videoData.getAvailableAudioTracks(),z=l.cG.mK;z&&(y=k.find(r=>r.getLanguageInfo().id===z));
if(l.cG.experiments.z7("enable_audio_description_setting")&&g.wz().G7(198))for(const r of k)if(r.J){y=r;break}l.sA().Z.G7(YBt)&&l.videoData.cotn&&(y=k.find(r=>!!r.S));
y||(l=l.getAudioTrack(),y=l.a7.isDefault?void 0:l);return y},qB5=function(l,y=!1){let k;
try{g.is()&&l.videoData.Zu()&&C85(l.mediaElement),k=l.mediaElement.bX(l.Jr(),l.RA())}catch(z){if(qI(l.JV,"html5.missingapi",{updateMs:"1"}))return;console.error("window.URL object overwritten by external code",z);l.jI("html5.missingapi",2,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK","updateMs.1");return}l.V_(k,!1,!1,y)},plt=function(l,y=!1){if(l.loader){l.videoData.enableServerStitchedDai&&c6e(l.loader);
const k=l.getCurrentTime()-l.w4();l.loader.seek(k,{qQ:y}).Ya(()=>{})}else gw(l)},KnC=function(l,y,k=!1,z=!1){!l.yj||y&&l.yj!==y||(y=l.getDuration(),!y&&fc(l.videoData)&&(y=25200,l.X("html5_use_centralized_player_time")&&(y=46800)),l.yj.isView?y>l.yj.getDuration()&&l.yj&&(l.yj.BZ(y),l.loader?.BF(y)):l.yj&&(l.yj.BZ(y),l.loader?.BF(y)),A6z(l.loader,l.yj,k,z),l.publish("mediasourceattached"))},gk_=function(l,y){if(l.cG.yM()&&l.mediaElement){const k=l.mediaElement.Dp();
k.omt=(l.mediaElement.getCurrentTime()+l.w4()).toFixed(3);k.ps=l.playerState.state.toString(16);k.rt=(g.vY(l.l5.provider)*1E3).toFixed();k.e=y;l.UX[l.M0++%5]=k}},EkC=function(l){if(g.G6("cobalt")&&g.G6("nintendo switch")){var y=!window.matchMedia("screen and (max-height: 720px) and (min-resolution: 200dpi)").matches;
l.Md("nxdock",{d:y})}},fKt=function(l){g.Kl(l.v0);
FR(l)||(l.v0=g.Yu(()=>FR(l),100))},FR=function(l){var y=l.mediaElement;
y&&l.BC&&!l.videoData.A&&!K4("vfp",l.QM.timerName)&&y.N()>=2&&!y.isEnded()&&kX(y.Cy())&&l.QM.tick("vfp");return(y=l.mediaElement)&&!l.videoData.A&&y.getDuration()>0&&(y.isPaused()&&y.N()>=2&&kX(y.Cy())&&(K4("pbp",l.QM.timerName)||l.QM.tick("pbp"),!l.videoData.kz||l.bJ||y.isSeeking()||(l.bJ=!0,l.publish("onPlaybackPauseAtStart"))),y=y.getCurrentTime(),H7(l.Ey,y))?(l.jS(),!0):!1},on=function(l,y){l.cG.X("html5_log_rebuffer_reason")&&(y={r:y,
lact:hW()},l.mediaElement&&(y.bh=wV(l.mediaElement)),l.Md("bufreason",y))},jo5=function(l){l.l5.onProgress();
if(nN(l.videoData)&&Date.now()>l.Tm+6283){if(l.X("html5_unified_live_latency_reporting")){var y=l.l5;y.qoe&&n$_(y.qoe)}else!l.isAtLiveHead()||l.videoData.Z&&mE(l.videoData.Z)||(y=l.l5,y.qoe&&n$_(y.qoe));y=g.tL(l.cG);const k=l.X("html5_always_log_rawlat");(y||k)&&l.Md("rawlat",{l:an(l.X0,"rawlivelatency").toFixed(3)});l.Tm=Date.now()}l.videoData.C&&l.videoData.C.N()&&(y=l.Ap())&&y.videoHeight!==l.k7&&(l.k7=y.videoHeight,Ct(l,"a",WnT(l,l.videoData.HG)))};
var A4Q=function(l,y,k){return wQ[G[19]](this,13,5790,l,y,k)};
SB4=function(l){if(l.cG.yM()){l.UX.sort((y,k)=>+y.rt-+k.rt);
for(const y of l.UX)l.Md("vpe",Object.assign({t:y.rt},y));l.UX=[];l.M0=0}};
iiQ=function(l,y){l.QM.tick("vta");Eo("vta",void 0,"video_to_ad");l.getCurrentTime()>0&&W3e(l.Hn,l.getCurrentTime());l.mediaElement.activate(y);l.yj&&xF(4);!l.videoData.A&&l.playerState.isOrWillBePlaying()&&l.Rs.start();IK4(l)&&(y=l.mediaElement?.audioTracks())&&(y.onaddtrack=()=>{JI5(l)},y.onremovetrack=()=>{JI5(l)},y.onchange=()=>{l.publish("internalaudioformatchange",l.videoData,!0)})};
Nn=function(l,y,k){const z=l.api.getCurrentTime()*1E3<y?1:-1;l.api.renderChapterSeekingAnimation(z,k);l.api.seekTo(y/1E3,void 0,void 0,void 0,3)};
nkq=function(l,y){const k=g.IH.getState().entities;l=Zp(k,l)?.markersList?.markerType;for(const z of y.RR)if(l===Zp(k,z)?.markersList?.markerType)return!0;return!1};
Fne=function(l){l=l.api.getPlayerStateObject();l=l.isCued()||l.isError()?"none":l.isOrWillBePlaying()?"playing":"paused";navigator.mediaSession.playbackState=l};
ok4=function(l){if(navigator.mediaSession.setPositionState)if(l.api.X("web_player_media_session_infinity")&&l.api.getVideoData().isLivePlayback)try{navigator.mediaSession.setPositionState({duration:Infinity})}catch(z){}else{var y=l.api.getProgressState().seekableEnd,k=Math.min(l.api.getCurrentTime(),y);y&&Number.isFinite(k)&&navigator.mediaSession.setPositionState({duration:y,playbackRate:l.api.getPlaybackRate(),position:k})}};
sc=function(l,y){try{navigator.mediaSession.setActionHandler(l,y)}catch(k){}};
NuC=function(l){const y=[];if(!l||!l.thumbnails)return y;for(const k of l.thumbnails)k.url&&(!k.width||k.width<=0||!k.height||k.height<=0||g.cJ(k.url)&&y.push({src:k.url||"",sizes:`${k.width}x${k.height}`,type:"image/jpeg"}));return y};
so5=function(l){sc("play",()=>{l.api.playVideo();Lt(l)});
sc("pause",()=>{l.api.pauseVideo();Lt(l)});
sc("seekbackward",()=>{l.api.seekBy(-5*l.api.getPlaybackRate());Lt(l)});
sc("seekforward",()=>{l.api.seekBy(5*l.api.getPlaybackRate());Lt(l)});
sc("seekto",y=>{y=y.seekTime;y!=null&&l.api.seekTo(y);Lt(l)})};
Lt=function(l){l.api.X("web_reset_lact_on_media_actions")&&l.api.updateLastActiveTime()};
Lnt=function(l,y){for(const k of y){y=Number(k.playbackRelativePosition?.utcTimeMs)/1E3;const z=y+Number(k.duration?.seconds),r=`composite_embargo_${y}`;if(k.onEnter){const Z=k.onEnter.filter(l.V);Z.length&&(l.C.set(r,Z),l.api.addUtcCueRange(r,y,z,"compositeembargo",!1))}}};
vkT=function(l,y){l.Z?.id!==y?.id&&(l.Z&&(l.C.delete(l.Z.id),l.api.t6([l.Z],1)),l.Z=y)};
Buz=function(l){l=l?.qualityDetails||[];return g.uQ(l)&&!Array.isArray(l)?l:l.reduce((y,{key:k,value:z})=>{k&&z&&(y[k]=z);return y},{})};
HiT=function(l,y,k){const z=[],r=y?156595:151874;for(const e of l){var Z=e.video;l={formatId:e.id,qualityLabel:Z.qualityLabel,quality:Z.quality,isPlayable:y};if(Z=k[Z.qualityLabel])l.paygatedQualityDetails={paygatedIndicatorText:Z.paygatedIndicatorText,endpoint:Z.endpoint,veType:r,trackingParams:Z.trackingParams};z.push(l)}return z};
D1C=function(l){vr()&&(l.QM=l.api.SV(),l.Z=new fA,l.N=2,l.QM.GJ("pt_pish"),window.requestIdleCallback?window.requestIdleCallback(()=>{RuC(l)}):RuC(l))};
vr=function(){return window.android&&window.android.webview&&window.android.webview.getExperimentalMediaIntegrityTokenProvider};
RuC=function(l){if(vr()){l.QM=l.api.SV();l.QM.GJ("pt_pis");try{window.android.webview.getExperimentalMediaIntegrityTokenProvider({cloudProjectNumber:868618676952}).then(y=>{l.C=y;l.Z?.resolve();l.QM.GJ("pt_pif")}).catch(y=>{Br(y,"player_start");
l.QM.GJ("pt_pie");l.Z?.reject(y)})}catch(y){Br(y,"player_start_catch"),l.api.Md("pfes",{}),l.Z?.reject(y)}}};
Br=function(l,y){l.message&&g.WH(Error(`${y}_${l.message}`))};
lVT=function(l,y){if(l.C){var k=y.videoId;l.N=3;l.QM.GJ("pt_ms");try{l.C.requestToken(k).then(z=>{l.QM.GJ("pt_mf");if(z=GC(z))y.Wb={HY:z}}).catch(z=>{l.QM.GJ("pt_me");
Br(z,"player_generate");l.handleError(z,y)})}catch(z){Br(z,"player_generate_catch"),l.handleError(z,y)}}};
yJP=function(l){const y=l.api.getVideoData();l.button.fP(y.e1)};
kuQ=function(l,y){TC(l.api.O())&&(y?l.J.show():l.J.hide())};
rJ5=function(l){l.V<l.N.length?zS4(l):(l.api.getPlayerStateObject(1).Z(2)&&(l.S=!0),l.Z=!0,l.V=0,l.N.length=0,l.api.hU(),l.Z=!1)};
ZXy=function(l){var {interstitials:y}=l.api.getVideoData();const k=[];for(const Q of y){y=k;var z=y.push,r=l,Z=Q.playerVars,e=Q.iS,A=Q.time;const t=`yto-${r.A++}`;A=new g.N1(A,A,{id:t,priority:7,namespace:"yto"});r.K[t]={playerVars:Z,playerType:e};z.call(y,A);y=l.api.getVideoData({playerType:1});y=Object.assign({oauth_token:y.oauthToken},Q.playerVars);l.api.preloadVideoByPlayerVars(y,Q.iS)}l.api.Wa(k,1)};
zS4=function(l){var y=l.N[l.V];if(y){var {playerVars:k,playerType:z}=l.K[y];l.Z=!0;l.V++;y=l.api.getVideoData({playerType:1});y=Object.assign({oauth_token:y.oauthToken},k);l.api.loadVideoByPlayerVars(y,!0,z,!0);l.Z=!1}};
eSz=async function(l){if(!l.Z){const y=await g.Wa();if(!y)throw Error("PES is undefined");l.Z=y}};
AJ5=async function(l){if(l.Z)try{var y=await g.mp(l.Z,"videoPlaybackPositionEntity"),k=await g.mp(l.Z,"mainVideoEntity");const z=new Set(k.map(e=>e.videoId)),r=y.filter(e=>!z.has(e.videoId));
r.sort((e,A)=>Number(A.lastUpdatedClientTimestampMs)-Number(e.lastUpdatedClientTimestampMs));
const Z=Date.now()-864E5;y=[];for(k=0;k<r.length;k++){const e=r[k];(k>=l.N||Number(e.lastUpdatedClientTimestampMs)<Z)&&e.key&&y.push(e.key)}await uZ5(l.Z,y)}catch(z){throw Error("Failed to expire playback position",{cause:z});}};
$k5=async function(l,y,k,z){await eSz(l);if(l.Z)try{const r={key:g.RG(y,"videoPlaybackPositionEntity"),videoId:y,lastPlaybackPositionSeconds:k.toString(),lastUpdatedClientTimestampMs:z.toString()};await g.u7(l.Z,r,"videoPlaybackPositionEntity");l.C!==y&&(await AJ5(l),l.C=y)}catch(r){throw Error("Failed to add or update playback position",{cause:r});}};
Hr=function(l){g.I(l.badge.element,"ytp-suggested-action-badge-with-controls",l.RR||!l.b0)};
Rn=function(l,y=!0){const k=l.Oj();l.expanded!==k&&(l.expanded=k,y?(l.jN.stop(),l.SN.stop(),l.BF.stop(),l.jN.start()):(l.J.fP(l.expanded),g.I(l.badge.element,"ytp-suggested-action-badge-expanded",l.expanded)),l.Xr())};
D8=function(l){const y=l.text||"",k=g.rt("ytp-suggested-action-badge-title",l.element);k&&g.C9(k,y);l.badge.element.setAttribute("aria-label",y);l.dismissButton.element.setAttribute("aria-label",l.MW?l.MW:"")};
lc=function(l){return l.backButton?(l.backButton.focus(),!0):!1};
QMs=function(l,y=!1){l.Yv&&g.I(l.qd("ytp-panel-footer"),"ytp-panel-hide-footer",y)};
tV_=function(l,y){return y.priority-l.priority};
g.yM=function(l){for(const y of l.items)y.unsubscribe("size-change",l.GI,l);l.items=[];try{g.Uq(l.menuItems.element)}catch(y){g.WH(new g.WO("Failed to remove menu items from panel menu.",{error:y.message,originalStack:y.stack,childToBeRemoved:l.menuItems.element.firstChild?.textContent??"child element not found"}))}l.menuItems.publish("size-change")};
g.zN=function(l){if(!(l.Z.length<=1)){var y=l.Z.pop(),k=l.Z[0];l.Z=[k];kK(l,y,k,!0)}};
OX4=function(l){const y=l.Z[l.Z.length-1];if(y){g.r7(l.element,l.maxWidth||"100%",l.maxHeight||"100%");g.n9(y.element,"width","");g.n9(y.element,"height","");g.n9(y.element,"maxWidth","100%");g.n9(y.element,"maxHeight","100%");g.n9(y.content.element,"height","");const r=g.Zo(y.element);r.width+=1;r.height+=1;g.n9(y.element,"width",`${r.width}px`);g.n9(y.element,"height",`${r.height}px`);g.n9(y.element,"maxWidth","");g.n9(y.element,"maxHeight","");var k=0;y.cK&&(k=g.Zo(y.qd("ytp-panel-header")).height);
var z=0;y.Yv&&(z=y.qd("ytp-panel-footer"),g.n9(z,"width",`${r.width}px`),z=g.Zo(z).height);g.n9(y.content.element,"height",`${r.height-k-z}px`);y.element instanceof HTMLElement&&(k=y.element,z=k.scrollWidth-k.clientWidth,k.offsetWidth-k.clientWidth>0&&z>0&&(r.width+=z,g.n9(y.element,"width",`${r.width}px`)));l.size=r}};
dkC=function(l){l.N&&g.H_(l.N);l.V&&g.H_(l.V)};
kK=function(l,y,k,z){dkC(l);y&&(y.unsubscribe("size-change",l.BT,l),y.unsubscribe("back",l.M7,l));k.subscribe("size-change",l.BT,l);k.subscribe("back",l.M7,l);if(l.VM){g.zi(k.element,z?"ytp-panel-animate-back":"ytp-panel-animate-forward");k.Uj(l.content);k.focus();l.element.scrollLeft=0;l.element.scrollTop=0;var r=l.size;OX4(l);g.r7(l.element,r);l.N=new g.B_(()=>{wwP(l,y,k,z)},20,l);
l.N.start()}else k.Uj(l.content),y&&y.detach()};
g.rK=function(l,y){const k=l.Z[l.Z.length-1];k!==y&&(l.Z.push(y),kK(l,k,y))};
wwP=function(l,y,k,z){l.N.dispose();l.N=null;g.zi(l.element,"ytp-popup-animating");z?(g.zi(y.element,"ytp-panel-animate-forward"),g.ZM(k.element,"ytp-panel-animate-back")):(g.zi(y.element,"ytp-panel-animate-back"),g.ZM(k.element,"ytp-panel-animate-forward"));g.r7(l.element,l.size);l.V=new g.B_(()=>{g.ZM(l.element,"ytp-popup-animating");y.detach();g.eM(y.element,["ytp-panel-animate-back","ytp-panel-animate-forward"]);l.V.dispose();l.V=null},250,l);
l.V.start()};
Gue=function(l,y,k){const z=y?.text?.simpleText;z&&(k=hSg(l,k,z,y?.icon,y?.secondaryIcon),y.navigationEndpoint&&k.listen("click",()=>{g.G3(l.L,"innertubeCommand",y.navigationEndpoint);l.hide()},l))};
aV_=function(l,y,k){const z=y?.text?.simpleText;z&&hSg(l,k,z,y?.icon).listen("click",()=>{y?.icon?.iconType==="HIDE"?l.L.publish("featuredproductdismissed"):y.serviceEndpoint&&g.G3(l.L,"innertubeCommand",y.serviceEndpoint);l.hide()},l)};
hSg=function(l,y,k,z,r){y=new g.ZE(g.ni({},[],!1,!!r),y,k);r&&y.updateValue("secondaryIcon",iXP(r));y.setIcon(iXP(z));g.x(l,y);l.DQ.tv(y,!0);return y};
iXP=function(l){if(!l)return null;switch(l.iconType){case "ACCOUNT_CIRCLE":return{U:"svg",G:{height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 1c4.96 0 9 4.04 9 9 0 1.42-.34 2.76-.93 3.96-1.53-1.72-3.98-2.89-7.38-3.03A3.99 3.99 0 0016 9c0-2.21-1.79-4-4-4S8 6.79 8 9c0 1.97 1.43 3.6 3.31 3.93-3.4.14-5.85 1.31-7.38 3.03C3.34 14.76 3 13.42 3 12c0-4.96 4.04-9 9-9zM9 9c0-1.65 1.35-3 3-3s3 1.35 3 3-1.35 3-3 3-3-1.35-3-3zm3 12c-3.16 0-5.94-1.64-7.55-4.12C6.01 14.93 8.61 13.9 12 13.9c3.39 0 5.99 1.03 7.55 2.98C17.94 19.36 15.16 21 12 21z",
fill:"#fff"}}]};case "FLAG":return{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M13.18 4L13.42 5.2L13.58 6H14.4H19V13H13.82L13.58 11.8L13.42 11H12.6H6V4H13.18ZM14 3H5V21H6V12H12.6L13 14H20V5H14.4L14 3Z",fill:"white"}}]};case "HELP":return G1();case "HIDE":return{U:"svg",G:{"enable-background":"new 0 0 24 24",fill:"#fff",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"g",W:[{U:"path",G:{d:"M16.24,9.17L13.41,12l2.83,2.83l-1.41,1.41L12,13.41l-2.83,2.83l-1.41-1.41L10.59,12L7.76,9.17l1.41-1.41L12,10.59 l2.83-2.83L16.24,9.17z M4.93,4.93c-3.91,3.91-3.91,10.24,0,14.14c3.91,3.91,10.24,3.91,14.14,0c3.91-3.91,3.91-10.24,0-14.14 C15.17,1.02,8.83,1.02,4.93,4.93z M18.36,5.64c3.51,3.51,3.51,9.22,0,12.73s-9.22,3.51-12.73,0s-3.51-9.22,0-12.73 C9.15,2.13,14.85,2.13,18.36,5.64z"}}]}]};
case "OPEN_IN_NEW":return UP()}};
eX=function(l){l.isInitialized&&(l.enabled=l.isVisible,l.HG=l.isVisible,Rn(l),l.C(),l.thumbnailImage.fP(l.isVisible),l.shouldHideDismissButton||l.dismissButton.fP(l.isVisible),l.shouldShowOverflowButton&&l.overflowButton.fP(l.isVisible))};
Co5=function(l,y,k){if(k){var z="";Ukq(l,y)&&(z=y,l.api.O().mK=y);z&&MVy(l,z)&&(NdP(l.api,z),FX(Sz(l.api.O(),l.api.getVideoData()?.S()),r=>{var Z=z;Xws(r)!==Z&&cJe(l,Aa(r),{stringValue:Z})}))}};
$K=function(l){c6()?.size&&FX(Sz(l.api.O(),l.api.getVideoData()?.S()),y=>{(y=Xws(y))&&MVy(l,y)&&(l.api.O().mK=y)})};
ueC=function(l,y){Nv(FX(FX(l.gW(),k=>EJ_(k,[Aa(y)])),k=>{if(k)for(const {key:z,
value:r}of k)z&&r&&(bXC([{settingItemId:z,settingOptionValue:r}]),$K(l))}),()=>{l.Z=!0})};
Ukq=function(l,y){l=l.api.getAvailableAudioTracks();for(const k of l)if(k.getLanguageInfo().getId()===y)return k;return null};
MVy=function(l,y){return y.split(".")[0]!==""&&l.api.getVideoData()?.lR()&&!0};
Xws=function(l){{l=Aa(l);const y=c6();l=y?y.get(l):void 0}return l&&l.stringValue?l.stringValue:""};
cJe=function(l,y,k){bXC([{settingItemId:y,settingOptionValue:k}]);FX(l.gW(),z=>{j7z(z,y,k)})};
Aa=function(l){let y=(484).toString();l&&(y=(483).toString());return y};
bXC=function(l){let y=c6();y||(y=new Map);for(const k of l)y.set(k.settingItemId,k.settingOptionValue);l=JSON.stringify(Object.fromEntries(y));g.eY("yt-player-user-settings",l,2592E3)};
xkC=function(l){if(l.A){const y=l.options[l.A];y.element.getAttribute("aria-checked");y.element.setAttribute("aria-checked","false");l.A=null}};
q2C=function(l,y){g.yM(l.aU);const k={};let z=!1;for(let Z=0;Z<y.length;Z++){var r=y[Z];if(r instanceof mky)r=new g.ZE({U:"div",L_:["ytp-menuitem","ytp-menuitem-section-header"],G:{"aria-disabled":"true"},W:[{U:"div",L_:["ytp-menuitem-label"],Nd:"{{label}}"}]},-Z,r.label),l.aU.tv(r,!0);else{let e=l.options[r];const A=r===l.A;A&&(z=!0);e&&e.priority===-Z?(g.F5(l.options[r],l.N(r,!0)),delete l.options[r]):e=l.D(r,-Z,A);k[r]=e;l.aU.tv(e,!0)}}z||(l.A=null);for(const Z of Object.keys(l.options))l.options[Z].dispose();
l.options=k};
Woy=function(l,y=!1){QMs(l.aU,y)};
IVT=function(l){var y="Off 10 15 20 30 45 60".split(" ");l.L.getVideoData()?.isLivePlayback||y.push("End of video");const k=l.L.getPlaylist();k&&k.listId?.type!=="RD"&&y.push("End of playlist");l.V(g.sT(y,l.J));l.rb=g.Ey(y,l.J,l);y=l.J("End of video");l.options[y]&&g.F5(l.options[y],l.Y)};
ta=function(l){l.J=null;l.K=null;l.j(QM("over"),l.uT);l.j("touchstart",l.A);l.Z&&l.j(QM("down"),l.rb)};
OZ=function(l){l.V.C(!l.Z)};
QM=function(l){return window.navigator.msPointerEnabled?`MSPointer${l.charAt(0).toUpperCase()}${l.substring(1)}`:`mouse${l}`};
dK=function(l){return l&&TW4?HZ(l)||document:document};
VVy=function(l,y){for(let k=0;k<y.changedTouches.length;k++){const z=y.changedTouches[k];if(z.identifier===l.K)return z}return null};
Poy=function(l){TW4=l};
ha=function(l){var y=l.api.getVideoData();const k=l.api.O().experiments;y=!!l.D&&!y?.isLivePlayback&&!(k.sA().Z.G7(JJg)&&y?.Zu())&&!l.api.pg()&&l.api.getPresentingPlayerType()!==2&&!l.api.getPlayerStateObject().Z(2)&&!g.Ci(l.api)?.xw()&&!l.api.isEmbedsShortsMode()&&wn4(l.api.gT());l.V!==y&&(l.V=y,l.V?l.Z.subscribe("dragstart",l.Y,l):(l.Z.unsubscribe("dragstart",l.Y,l),l.Z.unsubscribe("dragmove",l.S,l),l.Z.unsubscribe("dragend",l.J,l),wK(l)))};
Y2P=function(l,y,k,z){k||(z?y.keyCode!==32||y.repeat||l.N||!l.V||l.delay.Kl():wK(l))};
wK=function(l){l.delay.stop();l.Z.unsubscribe("dragmove",l.S,l);l.Z.unsubscribe("dragend",l.J,l);l.N&&(l.N=!1,l.speedmasterUserEdu.J(),l.api.setPlaybackRate(l.b0),l.api.showControls(),l.Ja&&l.api.pauseVideo(),l.X("enable_smart_skip_speedmaster_on_web")&&l.api.publish("speedmasterchanged",!1))};
pwC=function(l,y,k){for(const z of y){y=Number(z.playbackRelativePosition?.utcTimeMs)/1E3;const r=y+Number(z.duration?.seconds),Z=`stations:${k}:${y}`;l.C.has(Z)||(l.C.add(Z),z.onEnter&&(l.Z[Z]=z.onEnter),l.api.addUtcCueRange(Z,y,r,k,!1))}};
kBy=function(l){const y=/codecs="([^"]*)"/.exec(l.mimeType);return y&&y[1]?y[1]+" ("+l.itag+")":l.itag};
GN=function(l,y){if(l.heightPx===-1){var k=null;try{k=g.Gf("CANVAS"),l.C=k.getContext("2d")}catch(e){}if(l.C){var z=l.Z*l.sampleCount;l.N=k;l.N.width=z;l.N.style.width=`${z}px`;l.element.appendChild(l.N)}else for(l.sampleCount=Math.floor(l.sampleCount/4),l.Z*=4,k=0;k<l.sampleCount;k++)z=g.Gf("SPAN"),z.style.width=`${l.Z}px`,z.style.left=`${l.Z*k}px`,l.element.appendChild(z)}k=l.element.clientHeight||24;k!==l.heightPx&&(l.heightPx=k,l.C&&(k=(window.devicePixelRatio||1)>1?2:1,l.N.height=l.heightPx*
k,l.N.style.height=`${l.heightPx}px`,l.C.scale(1,k)));for(var r of y){y=l;var Z=l.index;for(k=0;k+2<y.V.length&&y.V[k+1]<r;)k++;z=Math.min(1,(r-y.V[k])/(y.V[k+1]-y.V[k]));if(y.C)y.C.fillStyle=y.J[k],y.C.fillRect(Z*y.Z,0,y.Z,y.heightPx),y.C.fillStyle=y.J[k+1],y.C.fillRect(Z*y.Z,y.heightPx*(1-z),y.Z,y.heightPx);else{Z=y.element.children[Z];const e=window.devicePixelRatio||1;z=Math.min(y.heightPx,Math.round(y.heightPx*z*e)/e)||0;Z.style.height=`${z}px`;Z.style.backgroundColor=y.J[k+1];Z.style.borderTop=
`solid ${y.heightPx-z}px ${y.J[k]}`}l.index=(l.index+1)%l.sampleCount}r=l.index;l.C?l.C.clearRect(r*l.Z,0,l.Z,l.heightPx):(l=l.element.children[r],l.style.height="0px",l.style.borderTop="")};
g_y=function(l,y){const k=!!l.aU?.Q9();l.aU||(l.aU=new Kos(l.api),g.x(l,l.aU),g.pi(l.api,l.aU.element,4));l.aU.fP(y);const z=Vi(l.api.r4());z&&z.loaded&&k!==y&&z.xo();y&&l.api.Md("sfn",{},!0)};
fV_=function(l){const y=[];l=l.match(E_s);for(let k=0;k<l.length;k++){const z=l[k]===" "?NaN:Number(l[k]);y.push(isNaN(z)?l[k]:z)}return y};
jMy=function(l,y,k){let z="";for(let r=0;r<l.length;r++){const Z=l[r];z=typeof Z==="number"?z+(Z+(y[r]-Z)*k):z+Z}return z};
S25=function(l,y){if(y.U==="path")return y.G.d;if(y.W)for(let z=0;z<y.W.length;z++){var k=y.W[z];if(k&&typeof k!=="string"&&(k=S25(l,k)))return k}};
al=function(l,y,k){l.C=y;l.startTime=(0,g.f)();l.duration=k;l.Z()};
n_z=function(l,y,k){k=S25(l,k);const z=y.getElementsByTagName("path")[0],r=z.getAttribute("d");if(z.getAttribute("id")){const A=rM();y=y.getElementsByTagName("use");for(let Q=0;Q<y.length;Q++)y[Q].setAttributeNS("http://www.w3.org/1999/xlink","href",`#${A}`);z.setAttribute("id",A)}const Z=fV_(r),e=fV_(k);al(l,A=>{z.setAttribute("d",jMy(Z,e,A))},200)};
FoQ=function(l,y){return l.N===void 0?!1:y.seekDirection==="TIMELY_ACTION_TRIGGER_DIRECTION_FORWARD"&&Number(y.seekLengthMilliseconds)===5E3?l.N===72:y.seekDirection==="TIMELY_ACTION_TRIGGER_DIRECTION_FORWARD"&&Number(y.seekLengthMilliseconds)===1E4?l.N===74:y.seekDirection==="TIMELY_ACTION_TRIGGER_DIRECTION_BACKWARD"&&Number(y.seekLengthMilliseconds)===5E3?l.N===71:y.seekDirection==="TIMELY_ACTION_TRIGGER_DIRECTION_BACKWARD"&&Number(y.seekLengthMilliseconds)===1E4?l.N===73:!1};
o_y=function(l){l.timelyActions&&(l.J=l.timelyActions.reduce((y,k)=>{if(k.cueRangeId===void 0)return y;y[k.cueRangeId]=0;return y},{}))};
ic=function(l){l.b0&&clearTimeout(l.b0);l.b0=void 0;l.C_=!1};
UZ=function(l,y){if(l.timelyActions)for(const k of l.timelyActions)if(k.cueRangeId===y)return k};
NWy=function(l,y){if((l=UZ(l,y))&&l.onCueRangeExit)return pz(l.onCueRangeExit)};
sM4=function(l,y){const k=Number(y?.maxVisibleDurationMilliseconds);k&&(ic(l),l.b0=setTimeout(()=>{if(l.Z!==void 0&&y?.cueRangeId===l.Z){l.C_=!1;var z=NWy(l,l.Z);z&&g.G3(l.api,"innertubeCommand",z)}},k))};
BWz=function(l){if(l=l.getWatchNextResponse())if(l=g.E(l.playerOverlays?.playerOverlayRenderer?.timelyActionsOverlayViewModel,LoP),l?.timelyActions)return l?.timelyActions.map(y=>g.E(y,v_g)).filter(y=>!!y)};
RSC=function(l){l.menuItem||(l.menuItem=new HX4(l.api,y=>{l.setVoiceBoostUserPreference(y)},()=>l.getVoiceBoostUserPreference(),()=>l.getVoiceBoostState()),g.x(l,l.menuItem))};
Dke=function(l){l=l.wZ();if(!l)return!1;l=g.MK(l).exp||"";return l.includes("xpv")||l.includes("xpe")};
l9t=function(l){for(const y of g.ML(l,!0))if(Dke(y))return!0;return!1};
yU5=function(l,y){for(const z of g.ML(l,!0))if(Dke(z)){l=z;var k={potc:"1",pot:y};l.url&&(l.url=cq(l.url,k))}};
ka5=async function(l){try{await l}catch(y){}};
z0t=function(l){const y=new q3,k={["X-Goog-Api-Key"]:"AIzaSyDyT5W0Jh49F30Pqqtyfdf7pDLFKLJoAnw"};return new ZW(y,l,()=>k)};
rUQ=function(l){return new uJ(l)};
ZyP=function(l){l.C&&(l.V=new fA,l.J.promise.then(()=>{l.QM.GJ("pot_if");XY(l)}))};
$qs=function(l){const y=(l.X("html5_generate_session_po_token")||l.X("html5_generate_content_po_token"))&&!l.useLivingRoomPoToken;try{if(l.X("html5_use_shared_owl_instance")||l.api.O().sA().Z.G7(e0C))AU4(l);else if(y){l.QM.GJ("pot_isc");const k=g.i_(l.api.O().experiments,"html5_webpo_kaios_defer_timeout_ms");k?(cB(l),g.JK(()=>{CJ(l)},k)):l.X("html5_webpo_idle_priority_job")?(cB(l),g.cs(g.bw(),()=>{CJ(l)})):CJ(l)}}catch(k){k instanceof Error&&g.WH(k)}};
AU4=async function(l){bc(l,"swpo_i");cB(l);XY(l);var y=await Mi(ZH());bc(l,"swpo_co");y=await bKe(y);l.X("html5_web_po_token_disable_caching")||y.yx(150);l.C=y;bc(l,"swpo_cc");ka5(y.Zc()).then(()=>{l.Z=!0;l.J.resolve();bc(l,"swpo_re")});
g.JK(()=>{CJ(l);bc(l,"swpo_si")},0)};
cB=function(l){l.N||(l.N=Jn())};
CJ=function(l){var y=l.api.O();l.QM.GJ("pot_ist");l.C||QbT(l);l.X("html5_bandaid_attach_content_po_token")||(l.X("html5_generate_session_po_token")&&(XY(l),ZyP(l)),y=g.i_(y.experiments,"html5_session_po_token_interval_time_ms")||0,y>0&&(l.A=g.Yu(()=>{XY(l)},y)),l.K=!0)};
t$5=function(l){const y=$f(l.experiments,"html5_web_po_request_key");return y?y:g.dU(l)?"Z1elNkAKLpSR3oPOUMSN":"O43z0dpjhgX20SCx4KAo"};
bc=function(l,y){l.X("html5_webpo_bge_ctmp")&&l.api.Md(y,{hwpo:!!l.C,hwpor:l.Z})};
XY=async function(l){if(l.X("html5_generate_session_po_token")&&!l.useLivingRoomPoToken){var y=l.api.O(),k=g.Y("EOM_VISITOR_DATA")||g.Y("VISITOR_DATA");k=y.U7?y.datasyncId:k;k=$f(y.experiments,"html5_mock_content_binding_for_session_token")||y.livingRoomPoTokenId||k;y.zA=uc(l,k)}};
QbT=function(l){const y=l.api.O();var k=t$5(y);k=z0t(k);const z=k.hG.bind(k);k.hG=async Z=>{Z=await z(Z);l.api.Md("itr",{});return Z};
let r;try{r=rUQ({xj:k,Sl:{maxAttempts:5},PE:{qL:"CLEn",disable:y.experiments.z7("html5_web_po_disable_remote_logging"),L0:ZGe(y.experiments),XD:e=>{var A=Oye.get(e);A||(A=new dqC(e),A=new FZ(A),Oye.set(e,A));return A},
Jm:l.X("wpo_dis_lfdms")?0:1E3},gk:g.WH});const Z=new w4q({qK:r,xj:k,onError:g.WH});ka5(Z.Zc()).then(()=>{l.Z=!0;l.J.resolve()});
l.X("html5_web_po_token_disable_caching")||Z.yx(150);g.x(l,r);g.x(l,Z);l.C=Z}catch(Z){g.WH(Z),r?.dispose()}};
uc=function(l,y){if(!l.C){if(l.N)try{return l.N(y)}catch(k){g.WH(k)}return""}try{l.QM.GJ(l.Z?"pot_cms":"pot_csms");const k={Lr:!0,ue:!0,cj:y};l.X("html5_web_po_token_disable_caching")||(k.bQ={oQ:y,bL:!0,Qa:!0});const z=l.C.AR(k);l.QM.GJ(l.Z?"pot_cmf":"pot_csmf");l.Z&&(l.V?.resolve(),l.V=null,l.S&&(l.S=!1,l.api.app.je().U_(!1)));return z}catch(k){return g.WH(k),""}};
h0e=function(l,y){let k;switch(y){case 2:y="\u1ea8n video";k="Hide recommendations grid";break;default:y="Video kh\u00e1c",k="Show recommendations grid"}l.updateValue("title",y);l.element.ariaLabel=k;l.V.textContent=y};
g.xK=function(l,y,k){g.I(l.element,"ytp-suggestion-set",!!y.videoId);var z=y.playlistId;k=y.uE(k?k:"mqdefault.jpg");let r=null,Z=null;y instanceof m3&&(y.lengthText?(r=y.lengthText||null,Z=y.HU||null):y.lengthSeconds&&(r=g.Sr(y.lengthSeconds),Z=g.Sr(y.lengthSeconds,!0)));const e=!!z;z=e&&rH(z).type==="RD";const A=y instanceof m3?y.isLivePlayback:null,Q=y instanceof m3?y.isUpcoming:null,t=y.author,O=y.shortViewCount,d=y.publishedTimeText,w=[],h=[];t&&w.push(t);O&&(w.push(O),h.push(O));d&&h.push(d);
k={title:y.title,author:t,author_and_views:w.join(" \u2022 "),aria_label:y.ariaLabel||g.Ts("Xem $TITLE",{TITLE:y.title}),duration:r,timestamp:Z,url:y.A6(),is_live:A,is_upcoming:Q,is_list:e,is_mix:z,background:k?`background-image: url(${k})`:"",views_and_publish_time:h.join(" \u2022 "),autoplayAlternativeHeader:y.Cx};y instanceof qC&&(k.playlist_length=y.playlistLength);l.update(k)};
g.Gas=function(l,y){if(l.suggestion!==y){l.suggestion=y;var k=l.api.O(),z="hqdefault.jpg";y.uE("sddefault.jpg")&&(z="sddefault.jpg");g.xK(l,y,z);g.u9(k)&&!l.api.X("web_player_log_click_before_generating_ve_conversion_params")&&(k=y.A6(),z={},g.UB(l.api,"addEmbedsConversionTrackingParams",[z]),k=g.UI(k,z),l.updateValue("url",k));(y=(y=y.sessionData)&&y.itct)&&l.api.setTrackingParams(l.element,y)}};
a9q=function(l,y){let k="";const z=g.Wl(l.player,"Video kh\u00e1c","v");y===2?k="\u1ea8n video":y===1&&(k="Video kh\u00e1c");l.element.setAttribute("title",z);l.element.setAttribute("data-title-no-tooltip",k);l.element.setAttribute("aria-label",k);if(y=l.qd("ytp-fullscreen-grid-hover-overlay"))y.setAttribute("title",z),y.setAttribute("data-title-no-tooltip",k),y.setAttribute("aria-label",k);!l.S&&(y=l.qd("ytp-fullscreen-grid-expand-button"))&&(y.setAttribute("title",z),y.setAttribute("data-title-no-tooltip",
k),y.setAttribute("aria-label",k));l.player.W1()};
WB=function(l){const y=mh(l);g.I(l.api.getRootNode(),"ytp-full-bleed-player",y);l.b0&&g.A2(l.b0,y);l.playerOverlayVideoDetailsRenderer&&g.A2(l.playerOverlayVideoDetailsRenderer,y);l.V&&qL(l)};
TN=function(l,y,k){l.N=y;l.C?.IU(y,k);l.D?.IU(y);l.Z=0;Il(l);iyt(l,y)};
CG5=function(l,y,k){y.j(k,"keyboardserviceglobalkeydown",(z,r)=>{l.V&&z.keyCode===86&&!z.repeat&&l.N!==0&&(r&&(r.l7=!0),l.Y("INTERACTION_LOGGING_GESTURE_TYPE_KEY_PRESS"))});
y.j(l.api.getRootNode(),"wheel",z=>{if(!l.C_&&l.V&&l.C?.element&&!l.api.getPlayerStateObject().Z(2)&&l.N!==0&&mh(l))if(g.zi(l.api.getRootNode(),"ytp-grid-scrolling"),l.J===0&&(l.J=window.innerHeight),l.N===1)l.J!==0&&(l.Z+=z.deltaY/l.J,l.Z=g.gf(l.Z,0,.7),Il(l),Uq5(l,l.K/l.J+l.Z>=.7,2));else if(l.N===2){const r=z.deltaY<0,Z=l.C?.V?.scrollTop===0,e=l.Z!==0;r&&Z||e&&!r?l.J!==0&&(l.Z=Math.max(0,l.Z-z.deltaY/l.J),Il(l),Uq5(l,l.K/l.J+Math.abs(l.Z)>=.7,1)):l.Z!==0&&(l.Z=0,Il(l))}},l,!0);
y.j(k,"standardControlsInitialized",()=>{if(!l.C){l.C=new M$e(l.api,l.u0.bind(l));l.HG&&(l.D=new X4e(l.api),g.x(l,l.D),l.D.element.setAttribute("data-overlay-order","12"),l.api.Sf(l.D.element,4),l.D.listen("click",l.Y,l));g.x(l,l.C);var z=l.api.getRootNode().querySelector(".ytp-chrome-bottom");z&&z.parentNode&&z.parentNode.insertBefore(l.C.element,z.nextSibling);cU5(l)}});
y.j(k,"presentingplayerstatechange",()=>{qL(l)});
y.j(k,"autonavvisibility",()=>{qL(l)});
l.api.gT().subscribe("visibilitystatechange",()=>{qL(l)});
iyt(l,l.N)};
qL=function(l){if(l.V)if(g.ZM(l.api.getRootNode(),"ytp-grid-scrolling"),l.api.getPresentingPlayerType()===2||l.api.pg()||l.api.isMinimized())TN(l,0);else{var y=l.api.getPlayerStateObject().Z(2);if(y)TN(l,2,"INTERACTION_LOGGING_GESTURE_TYPE_AUTOMATED");else if(l.isEnded&&!y){const k=mh(l)?1:0;l.isEnded=y;TN(l,k)}else mh(l)?l.N!==2&&TN(l,1):TN(l,0);l.isEnded=y}};
iyt=function(l,y){const k=l.api.getRootNode();g.I(k,"ytp-fullscreen-grid-peeking",y===1);g.I(k,"ytp-fullscreen-grid-active",y===2);y===1&&cU5(l)};
cU5=function(l){const y=l.api.getRootNode();var k=l.api.getPlayerStateObject().Z(256)||l.api.getPlayerStateObject().Z(32)||l.api.getPlayerStateObject().Z(16)?l.K:l.RR&&l.api.getPlayerStateObject().isPaused()?(l.C?.element.clientWidth||0)*.5625/3*l.rb||l.sj:l.sj;l.K=k;y.style.setProperty("--ytp-grid-peek-height",`${l.K}px`);g.I(y,"ytp-disable-bottom-gradient",l.K<=12&&l.S===0)};
mh=function(l){return l.api.isFullscreen()||l.PG&&l.api.yR()};
Il=function(l){l.Z===0&&l.api.getRootNode().style.setProperty("--ytp-grid-scroll-percentage","0");requestAnimationFrame(()=>{const y=l.Z-l.S;let k=y;l.Z!==0&&(k=g.gf(y,-.01,.01));l.S+=k;l.api.getRootNode().style.setProperty("--ytp-grid-scroll-percentage",`${l.S.toString()}`);l.S!==l.Z&&Il(l)})};
Uq5=function(l,y,k){l.A&&clearTimeout(l.A);l.Z===0&&g.ZM(l.api.getRootNode(),"ytp-grid-scrolling");y?bye(l,k):l.Z<.1&&(l.A=window.setTimeout(()=>{bye(l)},1E3))};
bye=function(l,y){l.A&&(clearTimeout(l.A),l.A=null);l.J=0;l.V&&l.N!==0&&(y?TN(l,y):Math.abs(l.Z)>=.15&&l.Y("INTERACTION_LOGGING_GESTURE_TYPE_SCROLL_BEGAN_DRAGGING"),l.Z=0,Il(l),g.ZM(l.api.getRootNode(),"ytp-grid-scrolling"))};
VM=function(l,y,k){Jt("pbs",y??(0,g.f)(),k??l.timerName)};
u0C=function(l,y,k){var z=g.U9(y.Qj)&&!y.Qj.S;if(y.Qj.uW&&(XC(y.Qj)||y.Qj.b0==="shortspage"||Iq(y.Qj)||z)&&!l.N){l.N=!0;l.S=y.clientPlaybackNonce;g.Y("TIMING_ACTION")||AK("TIMING_ACTION",l.cG.csiPageType);l.cG.csiServiceName&&AK("CSI_SERVICE_NAME",l.cG.csiServiceName);if(l.Z){z=l.Z.SV();for(var r of Object.keys(z))Jt(r,z[r],l.timerName);r=g.OJ(cT4)(l.Z.Pv);g.YV(r,l.timerName);r=l.Z;r.C={};r.Pv={}}g.YV({playerInfo:{visibilityState:g.OJ(XQQ)()},playerType:"LATENCY_PLAYER_HTML5"},l.timerName);l.J!==
y.clientPlaybackNonce||Number.isNaN(l.C)||(K4("_start",l.timerName)?k=g.OJ(bH)("_start",l.timerName)+l.C:g.WH(new g.WO("attempted to log gapless pbs before CSI timeline started",{cpn:y.clientPlaybackNonce})));!k||K4("pbs",l.timerName)||y.LZ||VM(l,k)}};
PB=function(l){PA_();VOq();l.timerName=""};
qt=function(l,y,k,z,r){var Z=y^l;var e;(l&29)==l&&z[G[26]](k);(l+1&79)>=l&&l+9>>2<l&&(z=(z%k[G[2]]+k[G[2]])%k[G[2]],k[G[Z^3874]](-z)[G[Z^3867]]()[G[Z^3942]](function(A){k[G[Z^3876]](A)}));
(l^74)>>4>=2&&(l-1&16)<8&&k[G[47]]();if((l+4&6)==2){if(z===G[Z^663]){let A;(A=r[G[Z^728]](G[Z^748]))>=0?(z=`cmo=${r[G[Z^724]](0,A)}`,r=r[G[Z^724]](A+1)):(A=r[G[Z^728]](G[Z^646]))>=0&&(z=`cmo=${r[G[Z^724]](0,A)}`,r=r[G[Z^724]](A+3))}k[z]=r}return e};
xq5=function(l){if(l.Z){var y=l.Z;y.C={};y.Pv={}}l.N=!1;l.J=void 0;l.C=NaN};
Ja=function(l){return!!(l.playlist||l.list||l.api)};
g.pJ=function(l,y,k,z){y=y!==void 0?y:l.index;y=l.items&&y in l.items?l.items[l.order[y]]:null;let r=null;y&&(k&&(y.autoplay="1"),z&&(y.autonav="1"),r=new g.YK(l.Qj,y),g.x(l,r),r.hk=!0,r.startSeconds=l.startSeconds||r.clipStart||0,l.listId&&(r.playlistId=l.listId.toString()));return r};
mq4=function(l,y){if(y.video&&y.video.length){l.title=y.title||"";l.description=y.description;l.views=y.views;l.likes=y.likes;l.dislikes=y.dislikes;l.author=y.author||"";var k=y.loop;k&&(l.loop=k);k=g.pJ(l);l.items=[];for(const z of y.video)z&&(z.video_id=z.encrypted_id,l.items.push(z));l.length=l.items.length;(y=y.index)?l.index=y:l.findIndex(k);l.setShuffle(!1);l.loaded=!0;l.C++;l.Z&&l.Z()}};
ux=function(l,y,k,z,r,Z,e,A){var Q=y^l;var t;l<<1&6||(t=z(Z,e,A));if((l-1^15)<l&&(l+5^2)>=l){var O=Tx(Q^825,Q^1323,k);z[G[Q^782]](G[Q^797],O);t=[]}(l<<2&6)>=1&&((l|4)&8)<3&&(t=k[G[12]]?k[G[12]][G[6]](G[10]):k[G[13]]===G[10]);return t};
qgT=function(l){const y=l.index+1;return y>=l.length?0:y};
WWq=function(l){const y=l.index-1;return y<0?l.length-1:y};
KJ=function(l,y){l.index=g.gf(y,0,l.length-1);l.startSeconds=0};
V$z=async function(l,y){const k=g.zJ();var z=l.O();const r={context:g.b9(l),playbackContext:{contentPlaybackContext:{ancestorOrigins:z.ancestorOrigins}}};var Z=z.getWebPlayerContextConfig();Z?.encryptedHostFlags&&(r.playbackContext.contentPlaybackContext.encryptedHostFlags=Z.encryptedHostFlags);Z?.hideInfo&&(r.playerParams={showinfo:!1});Z=z.embedConfig;const e=l.va;var A=y.docid||y.video_id||y.videoId||y.id;if(!A){A=y.raw_embedded_player_response;if(!A){var Q=y.embedded_player_response;Q&&(A=JSON.parse(Q))}A=
A?g.E(A?.embedPreview?.thumbnailPreviewRenderer?.playButton?.buttonRenderer?.navigationEndpoint,g.ug)?.videoId||null:null}A=A?A:void 0;Q=l.playlistId?l.playlistId:y.list;const t=y.listType;if(Q){var O;t==="user_uploads"?O={username:Q}:O={playlistId:Q};I94(Z,e,A,y,O,z.experiments);r.playlistRequest=O}else y.playlist?(O={templistVideoIds:y.playlist.toString().split(",")},I94(Z,e,A,y,O,z.experiments),r.playlistRequest=O):A&&(O={videoId:A},e&&z.X("embeds_enable_per_video_embed_config")?O.serializedThirdPartyEmbedConfig=
e:Z&&(O.serializedThirdPartyEmbedConfig=Z),r.singleVideoRequest=O);z=g.ei(TE4);try{const d=await g.Si(k,r,z),w=l.O();y.raw_embedded_player_response=d;w.Ja=fL(y,g.u9(w));w.N=w.Ja==="EMBEDDED_PLAYER_MODE_PFL";d&&d.trackingParams&&$M(d.trackingParams);return new g.YK(w,y)}catch(d){return d instanceof Error||(d=Error("b259802748")),g.n(d),l}};
I94=function(l,y,k,z,r,Z){z.index&&(r.playlistIndex=String(Number(z.index)+1));r.videoId=k?k:"";y&&Z.z7("embeds_enable_per_video_embed_config")?r.serializedThirdPartyEmbedConfig=y:l&&(r.serializedThirdPartyEmbedConfig=l)};
g.EZ=function(l,y){gK.get(l);gK.set(l,y)};
g.ML=function(l,y){return y?l.Z.concat(l.C):l.Z};
PGQ=function(l,y){g.Dg(y,k=>l.equals(k))||y.push(l)};
g.fJ=function(l,y){switch(y.kind){case "asr":PGQ(y,l.C);break;default:PGQ(y,l.Z)}};
g.JU_=function(l,y){return y.O().X("html5_use_hls_native_captions")&&g.Km&&l.UA()&&!!l.C?.N()};
g.jX=function(l,y){return l.O().X("safari_live_drm_captions_fix")&&l.getVideoData()?.eb()?!1:g.tL(l.O())&&!y.isManifestless};
g.SX=function(l,y){return E1(l.info.mimeType)?y?l.info.itag===y:!0:!1};
g.Ygz=function(l,y){if(l.Z!=null&&g.jX(y,l.Z)&&l.Z.Z.rawcc!=null)return!0;if(!l.UA())return!1;y=!!l.Z&&l.Z.isManifestless&&Object.values(l.Z.Z).some(k=>g.SX(k,"386"));
l=!!l.Z&&!l.Z.isManifestless&&g.cte(l.Z);return y||l};
J7t=function(l){if(l.L.O().Xr)return l.R4.get("ux")};
nJ=function(l){return l.R4.get("ad")};
g.FY=function(l){return l.R4.get("captions")};
g.ol=function(l){return l.R4.get("annotations_module")};
Vi=function(l){if(l.L.O().V9)return l.R4.get("remote")};
NL=function(l){return l.R4.get("creatorendscreen")};
sZ=function(l){if(uh(l.L.O()))return l.R4.get("kids")};
g.Yk=function(l){return l.R4.get("webgl")};
LJ=function(l){if(l.L.O().Ak)return l.R4.get("offline")};
p45=function(l){if(l.L.O().showMiniplayerUiWhenMinimized)return l.R4.get("miniplayer")};
KWs=function(l,y){l.N=y};
giC=function(l){const y=l.L.getVideoData();return g.JU_(y,l.L)||!!y.R7||!!y.captionTracks.length||g.Ygz(y,l.L)};
vB=function(l,y,k=!1,z=!1,r){var Z;let e=l.R4.get(y);if(!e||z)if(r||(r=()=>{vB(l,y,k,z)}),Z||(Z=()=>{BB(l,y)}),e=e||Eie(l,y,f95(l,y),r,Z))l.R4.set(y,e),e.create(),l.L.publish("modulecreated",y),k&&g.X5(l.L,"onApiChange")};
HB=function(l){if(l.L.O().N)return!1;if(l=l.L.getVideoData({playerType:1}).getPlayerResponse()){const y=l.adPlacements;if(y)for(let k=0;k<y.length;k++)if(y[k].adPlacementRenderer)return!0;if(l.adSlots)return!0}return!1};
Rl=function(l){return l.L.O().X("html5_allow_asmjs")||l.L.O().sA().Z.G7(jb4)};
Sg4=function(l){if(l.L.isEmbedsShortsMode())return!1;l=l.L;const y=l.O();if(y.N||y.getWebPlayerContextConfig()?.embedsEnableEmc3ds||y.controlsType==="3")return!1;if(y.playerStyle==="creator-endscreen-editor")return!0;l=l.getVideoData();return!!l&&(!!g.Oks(l)||!!g.dxt(l))};
g.niC=function(l){var y=l.L.O();if(y.N||Iq(y)||y.S||!y.BF&&!y.I4)return!1;var k=l.L.getPresentingPlayerType();if(k===2||k===3)return!1;l=l.L.getVideoData();if(!l)return!1;k=!l.isLiveDefaultBroadcast||y.X("allow_poltergust_autoplay");k=l.isLivePlayback&&(!y.X("allow_live_autoplay")||!k);y=l.isLivePlayback&&y.X("allow_live_autoplay_on_mweb");return!k||y};
FWe=function(l){const y=l.L.getVideoData();l=l.L.O();var k=g.cD();const z=l.X("enable_spherical_kabuki"),r=g.sE(l);if(g.ru(y))return k||z||r;if(g.kk(y))return r||k||z;if(g.z3(y))return r||k||!1;if(g.oH(y))return r||!1;k=y.C&&y.C.video&&y.C.video.isHdr();return r&&!g.BF(y)&&!k&&l.X("enable_webgl_noop")};
f95=function(l,y){switch(y){case "ad":return HB(l);case "annotations_module":return l.L.isEmbedsShortsMode()?l=!1:(y=l.L,l=y.O(),y=y.getVideoData(),l=l.N||y.FD||l.controlsType==="3"?!1:l.RR.isEmpty()&&l.playerStyle!=="annotation-editor"&&l.playerStyle!=="live-dashboard"?!!y.ZY||!!y.pf()||!!g.ZK(y):!0),l;case "asmjs":return Rl(l);case "creatorendscreen":return Sg4(l);case "embed":return g.u9(l.L.O());case "endscreen":return g.niC(l);case "heartbeat":return l.fR();case "kids":return uh(l.L.O());case "remote":return l.L.O().V9;
case "miniplayer":return l.L.O().showMiniplayerUiWhenMinimized;case "offline":return l.L.O().Ak;case "captions":return giC(l);case "unplugged":return g.aq(l.L.O());case "ux":return l.L.O().Xr;case "webgl":return FWe(l);case "ypc":return l.hg();default:return g.n(Error(`Module descriptor ${y} does not match`)),!1}};
BB=function(l,y){y=oiQ[y];for(const k of y)l.L.ud(k)};
Eie=function(l,y,k,z,r){try{if(k){const Z=gK.get(y);if(Z)return new Z(l.L);NEq(l,y,z,r)}else BB(l,y)}catch(Z){BB(l,y),g.n(Z)}return null};
NEq=function(l,y,k,z){if(l.K){var r=sbq[y];y=l.K+r;l.V&&(y+=`?cb=${l.V}`);LW4(l,y,()=>{l.S.add(r);k.call(l)},z)}};
viq=async function(l){var y=l.R4.get("asmjs");if(y)return y;y=gK.get("asmjs")??await new Promise((k,z)=>{NEq(l,"asmjs",()=>{const r=gK.get("asmjs");r?k(r):z("cannot load module asmjs")},z)});
if(!y)return Promise.reject("cannot load module asmjs");y=new y(l.L);l.R4.set("asmjs",y);y.create();return y};
DE=function(l){var y=l.L.getVideoData();if(l=y.X("web_player_defer_ad")){if(g.ro(y.dP,"ad")||NUs(y)||y.enableServerStitchedDai)var k=!1;else{l=y.startSeconds;var z=y.playerResponse?.adPlacements;if(y=z){y=Number.MAX_VALUE;for(k of z)if(z=k.adPlacementRenderer){const r=z.config?.adPlacementConfig;r?.kind==="AD_PLACEMENT_KIND_MILLISECONDS"&&(z=(Number(r?.adTimeOffset?.offsetStartMilliseconds)||0)-Number(z.renderer?.adBreakServiceRenderer?.prefetchMilliseconds||0),z<y&&(y=z))}y=y-5E3<=l*1E3}k=y?!1:!0}l=
k}return l};
BE5=async function(l){return await viq(l)};
Hys=function(l){const y=l.L.getVideoData();let k=l.C_&&!y.isInlinePlaybackNoAd;l.L.X("html5_defer_modules_on_ads_only")&&!y.isAd()&&(k=!1);return k};
lC=function(l){DE(l)&&l.J();Hys(l)&&(vB(l,"captions",!0),vB(l,"endscreen"),l.Z(),vB(l,"creatorendscreen",!0))};
yQ=function(l,y,k){for(const z of R0t){const r=l.R4.get(z);r&&(k||r.Xf(y))&&(g.yb(r),l.R4.delete(z))}l.L.publish("modulesDestroyed",y)};
DqC=function(l){return nE(()=>l.R4.get("asmjs")??BE5(l))};
LW4=function(l,y,k,z){var r=g.yq("SCRIPT");let Z=!1,e;for(let h=0;h<r.length;h++){const U=r[h];if(U.src===y||U.getAttribute("data-original-src")===y)e=U}e||(e=g.Gf("SCRIPT"),e.setAttribute("data-original-src",y),Z=!0);const A=()=>{l.IR()||k.call(l)},Q=()=>{l.IR()||z.call(l)},t=e.onload;
e.onload=h=>{Pd(A);t&&t.apply(window,[h])};
const O=e.onerror;e.onerror=h=>{if(Math.random()<.01){const U=new g.WO("Unable to load player module",y,document.location&&document.location.origin);g.n(U)}Pd(Q);O&&O(h)};
const d=e,w=d.onreadystatechange;d.onreadystatechange=h=>{switch(d.readyState){case "loaded":case "complete":Pd(A)}w&&w(h)};
Z&&((r=l.L.O().cspNonce)&&e.setAttribute("nonce",r),g.$v(e,g.zp(y)),r=g.yq("HEAD")[0]||document.body,r.insertBefore(e,r.firstChild),l.addOnDisposeCallback(()=>{e.parentNode&&e.parentNode.removeChild(e)}))};
zU=function(l,y,k){l.IR();const z=k1(l);k?(l.C|=y,y&1&&l.D.start(),y&2&&l.C_.start(),y&2048&&l.Y.start()):(l.C&=~y,y&1&&l.D.stop(),y&2&&l.C_.stop(),y&2048&&l.Y.stop(),y&512&&l.b0.stop());l.C&512&&!(l.C&128)&&l.b0.Kl(l.RR);y=k1(l);z!==y&&l.publish("autohideupdate",y)};
ld5=function(l){zU(l,4,!1);l.K&&(l.Z.uq(l.K),l.K=null,l.N=l.Z.j(l.target,"mouseover",l.uT));l.N&&(l.Z.uq(l.N),l.N=l.Z.j(l.target,"mouseover",l.uT))};
k1=function(l){let y=l.C;l.api.X("allow_autohide_on_paused_videos")&&(y&=-129);l.api.X("web_player_default_autohide")&&(y&=-513);return!y};
y1y=function(l,...y){var k=l.api.O();for(const Z of y){if(!Z||Z instanceof g.YK&&!Z.videoId)continue;var z=l.api.Yz().getPlayerSize();var r=g.gU();y=z.width*r;r*=z.height;if(y>1280||r>720)if(z=Z.uE("maxresdefault.jpg"))break;if(y>640||r>480)if(z=Z.uE("maxresdefault.jpg"))break;if(y>320||r>180)if(z=Z.uE("sddefault.jpg")||Z.uE("hqdefault.jpg")||Z.uE("mqdefault.jpg"))break;if(z=Z.uE("default.jpg"))break}g.JA(k)&&(k=new Image,k.addEventListener("load",()=>{fX4()}),k.src=z?z:"",l.api.SV().tick("ftr"));
l.J.style.backgroundImage=z?`url(${z})`:""};
kZz=function(l){for(let y=0;y<l.keys.length;y++)l.uq(l.keys[y]);l.keys=[]};
Z0=function(l,y,k,z=!1,r=!1,Z,e=!0){r||(r=l.api.O().V);const A=l.api.getVideoData();y=g.Ts(g.r6[y]||"",z?{CPN:A.clientPlaybackNonce}:{}).split(/\$(BEGIN|END)_LINK/);z=[];Z&&z.push({U:"h2",Nd:Z});z.push(y[0]);e&&z.push({U:"br"});z.push({U:"a",G:{href:k,target:r?"_blank":null},B:"ytp-error-link",Nd:y[2]});l.N=!0;z.push(y[4]);return{U:"span",W:z}};
g.ep=function(l){l=l.split(zsg);const y=[];for(let k=0;k<l.length;k+=3){const z=l[k++].split("\n");y.push(z[0]);for(let r=1;r<z.length;r++)y.push({U:"br"}),y.push(z[r]);k<l.length&&y.push({U:"a",G:{href:l[k],target:l[k+1]},Nd:l[k+2]})}return{U:"span",W:y}};
r1q=function(l,y){const k=l.element.getElementsByTagName("a");for(let z=0;z<k.length;z++){const r=l.j(k[z],"click",y);l.keys.push(r)}};
A8=function(l,y,k,z){const r=Number(y.getAttribute("data-overlay-order"))||0;let Z=0,e=null;for(const A of k.children){if(z&&A.classList.contains("ytp-overlay-inline-container")){e=A;break}if(r<(Number(A.getAttribute("data-overlay-order"))||0))break;Z++}e?A8(l,y,e,!1):z?(l=document.createElement("div"),l.classList.add("ytp-overlay-inline-container"),l.setAttribute("data-overlay-order",`${r}`),e=l,e.appendChild(y),Mj(k,e,Z)):Mj(k,y,Z)};
esz=function(l,y){const k=QhT(y),z=tTT(y);y.MI&&l.L.pJ()||(l.Z||l.L.X("enable_paid_content_overlay_bugfix")?y.videoId&&y.videoId!==l.videoId&&(l.Z?.hV(),!l.L.X("enable_paid_content_overlay_bugfix")||k&&z?(l.videoId=y.videoId,l.V=!!z,l.V&&k&&Z8g(l,z,k,y)):l.V=!1):k&&z&&!l.L.X("enable_paid_content_overlay_bugfix")&&Z8g(l,z,k,y))};
A1g=function(l,y){l.Z&&(y.Z(8)&&l.V?(l.V=!1,l.C?l.C.start():l.Bn()):(y.Z(2)||y.Z(64))&&l.videoId&&(l.videoId=null,l.C&&l.C.stop()))};
Z8g=function(l,y,k,z){l.Z&&l.Z.dispose();l.Z=new g.B_(l.Xv,y,l);g.x(l,l.Z);z=HF(z);y=z?.navigationEndpoint;z=z?.icon?.iconType;let r=g.E(y,g.Iw)?.url;l.L.setTrackingParams(l.element,y?.clickTrackingParams||null);y&&!r?(l.innertubeCommand=y,r="#!"):l.innertubeCommand=null;l.N.update({href:r??"#",text:k,icon:z==="MONEY_HAND"?{U:"svg",G:{fill:"none",height:"100%",viewBox:"0 0 24 24",width:"100%"},W:[{U:"path",G:{d:"M6 9H5V5V4H6H19V5H6V9ZM21.72 16.04C21.56 16.8 21.15 17.5 20.55 18.05C20.47 18.13 18.42 20.01 14.03 20.01C13.85 20.01 13.67 20.01 13.48 20C11.3 19.92 8.51 19.23 5.4 18H2V10H5H6H7V6H21V13H16.72C16.37 13.59 15.74 14 15 14H12.7C13.01 14.46 13.56 15 14.5 15H15.02C16.07 15 17.1 14.64 17.92 13.98C18.82 13.26 20.03 13.22 20.91 13.84C21.58 14.32 21.9 15.19 21.72 16.04ZM15 10C15 9.45 14.55 9 14 9C13.45 9 13 9.45 13 10H15ZM20 11C19.45 11 19 11.45 19 12H20V11ZM19 7C19 7.55 19.45 8 20 8V7H19ZM8 8C8.55 8 9 7.55 9 7H8V8ZM8 10H12C12 8.9 12.9 8 14 8C15.1 8 16 8.9 16 10V10.28C16.59 10.63 17 11.26 17 12H18C18 10.9 18.9 10 20 10V9C18.9 9 18 8.1 18 7H10C10 8.1 9.1 9 8 9V10ZM5 13.5V11H3V17H5V13.5ZM20.33 14.66C19.81 14.29 19.1 14.31 18.6 14.71C17.55 15.56 16.29 16 15.02 16H14.5C12.62 16 11.67 14.46 11.43 13.64L11.24 13H15C15.55 13 16 12.55 16 12C16 11.45 15.55 11 15 11H6V13.5V17.16C8.9 18.29 11.5 18.93 13.52 19C17.85 19.15 19.85 17.34 19.87 17.32C20.33 16.9 20.62 16.4 20.74 15.84C20.84 15.37 20.68 14.91 20.33 14.66Z",
fill:"white"}}]}:null,chevron:r||l.innertubeCommand?g.dM():null})};
$wz=function(l){l.Z||(l.Z=!0,l.api.logVisibility(l.element,!0))};
QFT=function(l){const y=af()&&w8()>=67&&!l.api.O().K;l=l.api.O().disableOrganicUi;return!g.G6("tizen")&&!L2&&!y&&!l};
tlg=function(l,y){if(!y)return!1;var k=l.api.fl();if(k.S()&&(k=k.Jv())&&g.cf(k,y))return k.controls;for(k=0;k<l.ib.length;k++)if(g.cf(l.ib[k],y))return!1;for(const z of l.rd)if(g.ka(y,z))return!1;return y===l.api.getRootNode()?!1:!0};
O8_=function(l){const y=l.api.getPresentingPlayerType()===2&&(l.api.Yz().AK||l.api.O().disableOrganicUi)&&l.api.O().C&&$1&&k5>=11;l=l.api.O().K&&$1;return!(!y&&!l)};
t8=function(l,y){l.fg.T6();if(l.jA&&l.B_)l.B_=!1;else if(!l.api.O().rb&&!l.u4()){const k=l.api.getPlayerStateObject();k.Z(2)&&g.T3(l.api)||l.Ch(k);y&&QQ(l,y)?dwC(l):!l.api.O().Oj||k.isCued()||k.Z(1024)?l.yc():l.x$.isActive()?(l.NR(),l.x$.stop()):l.x$.start()}};
OD=function(l,y){return!l.api.isInline()&&!tlg(l,kF(y))&&g.ne(y)};
d6=function(l,y){return l.api.getVideoData()?.mutedAutoplay&&y.target?.className?.includes("ytp-info-panel")?!1:g.ne(y)&&l.api.isMutedByMutedAutoplay()?(l.api.unMute(),l.api.getPresentingPlayerType()===2&&l.api.playVideo(),y=l.api.getPlayerStateObject(),!y.Z(4)||y.Z(8)||y.Z(2)||l.yc(),!0):!1};
QQ=function(l,y){if(!l.api.O().X("web_player_invisible_fullscreen_button"))return!1;var k=l.api.getRootNode().getBoundingClientRect();let z,r;y.targetTouches&&y.targetTouches.length?(z=y.targetTouches[0].clientX,r=y.targetTouches[0].clientY):y.clientX!==void 0&&(z=y.clientX,r=y.clientY);return z!==void 0&&r!==void 0&&(y=z-k.left,k=r-k.top,l=l.api.getPlayerSize(),k>=l.height-40&&y>=l.width-40)?!0:!1};
dwC=function(l){if(l.api.O().Oj&&l.api.getPresentingPlayerType()!==3)try{l.api.toggleFullscreen().catch(y=>{l.dc(y)}),l.api.X("web_player_fullscreen_double_click_ve")&&l.api.logClick(l.api.Yz().element)}catch(y){l.dc(y)}};
wYe=function(l,y,k){l.api.isFullscreen()?k<1-y&&l.api.toggleFullscreen():k>1+y&&l.api.toggleFullscreen()};
w6=function(l,y,k="",z=""){l.updateValue("label",k);l.updateValue("icon",y);l.Z.hV();l.C.start();l.updateValue("title",z);g.I(l.element,"ytp-bezel-text-hide",!z)};
h8=function(l,y,k){let z;y<=0?(k=xb(),y="\u0111\u00e3 t\u1eaft ti\u1ebfng",z=0):(k=k?{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,G:{d:"M8,21 L12,21 L17,26 L17,10 L12,15 L8,15 L8,21 Z M19,14 L19,22 C20.48,21.32 21.5,19.77 21.5,18 C21.5,16.26 20.48,14.74 19,14 Z",fill:"#fff"}}]}:{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,G:{d:"M8,21 L12,21 L17,26 L17,10 L12,15 L8,15 L8,21 Z M19,14 L19,22 C20.48,21.32 21.5,19.77 21.5,18 C21.5,16.26 20.48,14.74 19,14 Z M19,11.29 C21.89,12.15 24,14.83 24,18 C24,21.17 21.89,23.85 19,24.71 L19,26.77 C23.01,25.86 26,22.28 26,18 C26,13.72 23.01,10.14 19,9.23 L19,11.29 Z",
fill:"#fff"}}]},z=Math.floor(y),y=z+"\u00e2m l\u01b0\u1ee3ng");w6(l,k,y,`${z}%`)};
hsT=function(l,y){y=y?{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"M 17,24 V 12 l -8.5,6 8.5,6 z m .5,-6 8.5,6 V 12 l -8.5,6 z"}}]}:PLq();const k=l.L.getPlaybackRate(),z=g.Ts("T\u1ed1c \u0111\u1ed9 l\u00e0 $RATE",{RATE:String(k)});w6(l,y,z,k+"x")};
GZQ=function(l,y){y=y?"Ph\u1ee5 \u0111\u1ec1 b\u1eadt":"Ph\u1ee5 \u0111\u1ec1 t\u1eaft";w6(l,yNs(l.L),y)};
adg=function(l,y){l.Z=y;l.element.classList.toggle(GU.NOTIFICATIONS_ENABLED,l.Z);const k=l.api.getVideoData();k?(y=y?k.Gr:k.Oi)?(l=l.api.gW())?ji(l,y):g.n(Error("No innertube service available when updating notification preferences.")):g.n(Error("No update preferences command available.")):g.n(Error("No video data when updating notification preferences."))};
aX=function(l,y,k){const z=document.location.protocol;l=NoC(`${z}//${l}/signin?context=popup`,"feature",y,"next",`${z}//${location.hostname}/post_login`);i8s(l,k)};
i8s=function(l,y){if(l=g.kv(window,l,"loginPopup","width=800,height=600,resizable=yes,scrollbars=yes"))w24(()=>{y()}),l.moveTo((screen.width-800)/2,(screen.height-600)/2)};
c1C=function(l){const y=l.api.O();Uw5(l);l.updateValue("flyoutUnfocusable","true");l.updateValue("channelTitleFocusable","-1");l.updateValue("shouldHideExpandedTitleForA11y","true");l.updateValue("shouldHideExpandedSubtitleForA11y","true");y.C||y.u0||(l.j(l.channel,"mouseenter",l.S),l.j(l.channel,"mouseleave",l.J),l.j(l.channel,"focusin",l.S),l.j(l.channel,"focusout",k=>{l.channel.contains(k.relatedTarget)||l.J()}));
l.N=new g.B_(()=>{l.isExpanded()&&(l.api.logVisibility(l.channelName,!1),l.subscribeButton&&(l.subscribeButton.hide(),l.api.logVisibility(l.subscribeButton.element,!1)),l.Z&&(l.Z.hide(),l.api.logVisibility(l.Z.element,!1)),l.channel.classList.remove("ytp-title-expanded"),l.channel.classList.add("ytp-title-show-collapsed"))},500);
g.x(l,l.N);l.j(l.channel,Mly,()=>{XYy(l)});
l.j(l.api,"onHideControls",l.K);l.j(l.api,"appresize",l.K);l.j(l.api,"fullscreentoggled",l.K)};
iC=function(l){var y=l.api.O();const k=l.api.getVideoData();let z=g.E9(y)+k.u0;g.du(k)&&(z="https://music.youtube.com"+k.u0);if(!g.u9(y))return z;y={};g.UB(l.api,"addEmbedsConversionTrackingParams",[y]);return g.UI(z,y)};
CBP=function(l){const y=l.api.getPlayerSize();return g.u9(l.api.O())&&y.width>=524};
Uw5=function(l){if(!l.api.O().MW){var y=l.api.getVideoData(),k=new g.UD("\u0110\u0103ng k\u00fd",null,"\u0110\u00e3 \u0111\u0103ng k\u00fd",null,!0,!1,y.Fu,y.subscribed,"channel_avatar",null,l.api,!0);l.api.createServerVe(k.element,l);l.api.setTrackingParams(k.element,y.subscribeButtonRenderer?.trackingParams||null);l.j(k.element,"click",()=>{l.api.logClick(k.element)});
l.subscribeButton=k;g.x(l,l.subscribeButton);l.subscribeButton.Uj(l.A);l.subscribeButton.hide();var z=new b85(l.api);l.Z=z;g.x(l,z);z.Uj(l.A);z.hide();l.j(l.api,"SUBSCRIBE",()=>{y.ji&&(z.show(),l.api.logVisibility(z.element,!0))});
l.j(l.api,"UNSUBSCRIBE",()=>{y.ji&&(z.hide(),l.api.logVisibility(z.element,!1),adg(z,!1))})}};
XYy=function(l){l.channel.classList.remove("ytp-title-show-collapsed");l.channel.classList.remove("ytp-title-show-expanded")};
uQy=function(l,y="",k=""){l.V?(l.D!==y&&(l.C.style.backgroundImage=`url(${y})`,l.D=y),l.updateValue("channelLink",iC(l)),l.updateValue("channelLogoLabel",g.Ts("H\u00ecnh \u1ea3nh c\u1ee7a $CHANNEL_NAME",{CHANNEL_NAME:k})),g.zi(l.api.getRootNode(),"ytp-title-enable-channel-logo")):g.ZM(l.api.getRootNode(),"ytp-title-enable-channel-logo");l.api.logVisibility(l.C,l.V&&l.C_)};
M7=function(l,y){l.element.setAttribute("aria-haspopup",String(y))};
xw4=function(){let l=document.queryCommandSupported&&document.queryCommandSupported("copy");p3("Chromium")>=43&&(l=!0);p3("Firefox")<=40&&(l=!1);return l};
XG=function(l){l.WB?.fP(!l.L.isFullscreen()&&!l.L.isMinimized()&&l.L.getPresentingPlayerType()!==2&&l.L.O().showMiniplayerButton)};
mwq=function(l){const y=!!l.OT;g.F5(l.Dp,y?"Sao ch\u00e9p th\u00f4ng tin g\u1ee1 l\u1ed7i":"Xem th\u00f4ng tin g\u1ee1 l\u1ed7i");M7(l.Dp,!y);g.F5(l.kh,y?"Sao ch\u00e9p m\u00e3 nh\u00fang":"Nh\u1eadn m\u00e3 nh\u00fang");M7(l.kh,!y);g.F5(l.getVideoUrl,y?"Sao ch\u00e9p URL video":"Nh\u1eadn URL video");M7(l.getVideoUrl,!y);g.F5(l.c7,y?"Sao ch\u00e9p URL video trong th\u1eddi gian hi\u1ec7n t\u1ea1i":"Nh\u1eadn URL video \u1edf th\u1eddi gian hi\u1ec7n t\u1ea1i");M7(l.c7,!y);l.kh.setIcon(y?Th5():null);
l.getVideoUrl.setIcon(y?aw():null);l.c7.setIcon(y?aw():null)};
qFt=function(l,y){var k=l.L.O();const z=l.L.getPresentingPlayerType()===2;var r=!z||y.isListed;r=!k.Y&&!!y.videoId&&r;k.playerStyle!=="play"?k="https://support.google.com/youtube/?p=report_playback":(k={contact_type:"playbackissue",html5:1,ei:y.eventId,v:y.videoId,p:"movies_playback"},y.C&&(k.fmt=y.C.itag),y.clientPlaybackNonce&&(k.cpn=y.clientPlaybackNonce),y.partnerId&&(k.partnerid=y.partnerId),k=g.UI("//support.google.com/googleplay/",k));l.kh.fP(r&&y.allowEmbed);l.getVideoUrl.fP(r);l.c7.fP(r&&
!y.isLivePlayback);l.AO.setContent(k,"href");l.uG?.fP(!y.isLivePlayback&&!z);XG(l);l.xq?.fP(!z)};
cA=function(l,y){let k=!1;if(l.OT){const z=l.OT.element;z.value=y;z.select();try{k=document.execCommand("copy")}catch(r){}}k?l.eN.Xv():(l.RX.setContent(y,"text"),g.rK(l.eN,l.iL),lo(l.RX.element),l.OT&&(l.OT=null,mwq(l)));return k};
WsP=function(l){return g.u9(l.L.O())?l.xq:l.uG};
Id4=function(l){l.C.C();var y=l.L.O();y.playerStyle==="gvn"||y.C||y.u0||(y=l.L.Yz(),l.C.j(y,"contextmenu",l.RR),l.C.j(y,"touchstart",l.onTouchStart,null,!0),l.C.j(y,"touchmove",l.Y,null,!0),l.C.j(y,"touchend",l.Y,null,!0))};
TGy=function(l){l.L.isFullscreen()?g.pi(l.L,l.element,10):l.Uj(jS(l).body)};
Vls=async function(l,y){try{return await navigator.clipboard.writeText(y),!0}catch{let k=!1;const z=g.Gf("TEXTAREA");z.value=y;z.setAttribute("readonly","");l=l.api.getRootNode();l.appendChild(z);if(Zu){const r=window.getSelection();r.removeAllRanges();const Z=document.createRange();Z.selectNodeContents(z);r.addRange(Z);z.setSelectionRange(0,y.length)}else z.select();try{k=document.execCommand("copy")}catch(r){}l.removeChild(z);return k}};
PBP=function(l){l.updateValue("icon",t4());if(l.api.O().C)l.tooltip.Ml(l.element,"\u0110\u00e3 sao ch\u00e9p \u0111\u01b0\u1eddng li\u00ean k\u1ebft v\u00e0o b\u1ea3ng nh\u1edb t\u1ea1m");else{l.updateValue("title-attr","\u0110\u00e3 sao ch\u00e9p \u0111\u01b0\u1eddng li\u00ean k\u1ebft v\u00e0o b\u1ea3ng nh\u1edb t\u1ea1m");l.updateValue("tooltip-title","\u0110\u00e3 sao ch\u00e9p \u0111\u01b0\u1eddng li\u00ean k\u1ebft v\u00e0o b\u1ea3ng nh\u1edb t\u1ea1m");l.tooltip.W1();l.tooltip.Ml(l.element);
const y=l.listen("mouseleave",()=>{l.uq(y);l.Aa();l.tooltip.WZ()})}};
J1e=function(l){var y=l.api.O();const k=l.api.getVideoData(),z=l.api.Yz().getPlayerSize().width;y=y.N;return!!k.videoId&&z>=240&&k.LS&&!k.Wn&&!l.api.isEmbedsShortsMode()&&!y};
YFs=function(l,y){y=g.Ts("$TOTAL_SEEK_TIME gi\u00e2y",{TOTAL_SEEK_TIME:y.toString()});l.updateValue("seekTime",y)};
pYe=function(l,y){l.L.X("web_enable_shopping_timely_shelf_client")&&!l.L.X("web_force_featured_product_banner_with_timely_shelf")&&y&&!y.isPremiere&&y.getPlayerResponse()?.videoDetails?.isLiveContent===!1?l.badge.element.classList.add("ytp-timely-shelf-present"):l.badge.element.classList.remove("ytp-timely-shelf-present")};
CP=function(l){l.PG=[];l.u0();l.L.Ur("featured_product")};
uC=function(l){l.S2?.stop();l.Y.hide();l.D.hide();bC(l)};
bC=function(l){if(l.trendingOfferEntityKey){var y=g.IH.getState().entities;(y=yX(y,"trendingOfferEntity",l.trendingOfferEntityKey))?y.encodedSkuId!==l.Z?.bannerData?.itemData?.encodedOfferSkuId?x1(l):(l.V.update({trendingOffer:`${y.shortLabel} \u2022 ${y.countLabel}`}),l.V.show(),l.banner.update({vendor:mG(l)})):x1(l)}else x1(l)};
Ks5=function(l){const y=l.Z?.bannerData?.itemData;return y?.priceReplacementText||l.L.X("web_player_enable_featured_product_banner_promotion_text_on_desktop")||!y?.dealsData?.sales?.originalPrice?null:y?.dealsData?.sales?.originalPrice};
gYe=function(l){const y=l.Z?.bannerData?.itemData;return y?.priceReplacementText||l.L.X("web_player_enable_featured_product_banner_promotion_text_on_desktop")||y?.dealsData?.sales?.originalPrice||!y?.dealsData?.priceDrop?.referencePrice?null:y?.dealsData?.priceDrop?.referencePrice};
EYg=function(l){const y=l.Z?.bannerData?.itemData;return l.L.X("web_player_enable_featured_product_banner_promotion_text_on_desktop")&&!y?.priceReplacementText&&y?.promotionText?y?.promotionText.content:null};
fd5=function(l){const y=l.Z?.bannerData?.itemData;return y?.priceReplacementText?y?.priceReplacementText:y?.promotionText&&l.L.X("web_player_enable_featured_product_banner_promotion_text_on_desktop")?`${y?.price} ${y?.promotionText?.content}`:y?.dealsData?.sales?.originalPrice?y?.dealsData?.sales?.salesPriceAccessibilityLabel:y?.dealsData?.priceDrop?.referencePrice?`${y?.price} ${y?.dealsData?.priceDrop?.referencePrice}`:y?.price};
mG=function(l){return l.L.X("web_player_enable_featured_product_banner_promotion_text_on_desktop")?l.V.VM?null:l.Z?.bannerData?.itemData?.vendorName:l.V.VM||l.D.VM||l.Z?.bannerData?.itemData?.affiliateDisclaimer?null:l.Z?.bannerData?.itemData?.vendorName};
jF_=function(l){const y=(Number(l.Z?.bannerData?.itemData?.hiddenProductOptions?.dropTimestampMs)-Date.now())/1E3;l.countdownTimer.setContent(Hm({seconds:y}));y>0&&l.hv?.start()};
SFg=function(l){l=l.Z?.bannerData?.itemData;return!l?.affiliateDisclaimer&&l?.exclusivesData?.exclusiveOfferLabelText&&l?.exclusivesData?.expirationTimestampMs&&l?.exclusivesData?.exclusiveOfferCountdownText?!0:!1};
nYC=function(l){var y=(Number(l.Z?.bannerData?.itemData?.exclusivesData?.expirationTimestampMs)-Date.now())/1E3;if(y>0){if(y<604800){var k=l.Z?.bannerData?.itemData?.exclusivesData?.exclusiveOfferCountdownText;if(k!==void 0){var z=Date.now();for(const r of k){if(r===void 0||r.text===void 0)continue;k=Number(r.textDisplayStartTimestampMs);if(!isNaN(k)&&z>=k){r.insertCountdown?(y=r.text.replace(/\$0/,String(Hm({seconds:y}))),l.Y.setContent(y)):l.Y.setContent(r.text);l.Y.show();break}}}}l.D.update({exclusive:l.Z?.bannerData?.itemData?.exclusivesData?.exclusiveOfferLabelText});
l.D.show();x1(l);l.S2?.start()}else uC(l)};
x1=function(l){l.V.hide();l.banner.update({vendor:mG(l)})};
Fsy=function(l){if(l!==void 0&&l.trim()!==""&&(l=Math.trunc(Number(l.trim())),!(isNaN(l)||l<0)))return l};
oY_=function(l,y){CP(l);if(y){var k=g.IH.getState().entities;k=yX(k,"featuredProductsEntity",y);if(k?.productsData){y=[];for(const z of k.productsData)if(z?.identifier&&z.featuredSegments){l.PG.push(z);for(const r of z?.featuredSegments){k=Fsy(r.startTimeSec);if(k===void 0)continue;const Z=Fsy(r.endTimeSec);y.push(new g.N1(k*1E3,Z===void 0?0x7ffffffffffff:Z*1E3,{id:z.identifier,namespace:"featured_product"}))}}l.L.Wa(y)}}};
NGT=function(l){switch(l){case "OPEN_IN_NEW":return UP();case "NOT_INTERESTED":return{U:"svg",G:{fill:"#fff",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M18.71,6C20.13,7.59,21,9.69,21,12c0,4.97-4.03,9-9,9c-2.31,0-4.41-0.87-6-2.29L18.71,6z M3,12 c0-4.97,4.03-9,9-9c2.31,0,4.41,.87,6,2.29L5.29,18C3.87,16.41,3,14.31,3,12z M12,2c5.52,0,10,4.48,10,10c0,5.52-4.48,10-10,10 C6.48,22,2,17.52,2,12C2,6.48,6.48,2,12,2z","fill-rule":"evenodd"}}]};case "HELP_OUTLINE":return G1();default:return UP()}};
q7=function(l,y){if(!y.MI||!l.L.pJ()){var k=y.sS||1E4,z=!!y.PG?.title?.content||!!y.PG?.bodyText?.content;l.Z?y.videoId&&y.videoId!==l.videoId&&(l.Z.hV(),l.videoId=y.videoId,z?(sF_(l,k,y),l.Bn()):(l.Xv(),l.Z.dispose(),l.Z=null)):z&&(y.videoId&&(l.videoId=y.videoId),sF_(l,k,y),l.Bn())}};
Lsy=function(l,y){l.Z&&(y.Z(8)?(l.C=!0,l.Bn(),l.Z.start()):(y.Z(2)||y.Z(64))&&l.videoId&&(l.videoId=null))};
sF_=function(l,y,k){l.Z&&l.Z.dispose();l.Z=new g.B_(l.A,y,l);g.x(l,l.Z);l.L.setTrackingParams(l.element,k.PG?.trackingParams||null);k?.PG?.title?.content?(y=k.PG?.title?.content,k.PG?.bodyText?.content&&(y+=" \u2022 ")):y="";l.update({text:y+(k.PG?.bodyText?.content||""),chevron:g.dM()})};
WA=function(l){let y=null;try{y=l.toLocaleString("vi",{style:"percent"})}catch(k){y=l.toLocaleString(void 0,{style:"percent"})}return y};
IX=function(l,y){let k=0;for(const z of l){if(z.startTime>y)break;k++}return k===0?k:k-1};
vYz=function(l,y){let k=0;for(const z of l){if(y<z.timeRangeStartMillis)return null;if(y>=z.timeRangeStartMillis&&y<z.timeRangeStartMillis+z.Z)break;k++}k+1<l.length&&l[k+1].timeRangeStartMillis<=y&&k++;return k<l.length?k:null};
BG_=function(l,y){y=IX(l,y)+1;return y<l.length?y:-1};
H8q=function(l,y){return IX(l,y)-1};
RsQ=function(l,y){return new g.N1(l,y,{namespace:"timedMarkerCueRange",priority:9,id:`tm_${l}`})};
Dws=function(l,y){g.FY(l.api.r4())&&l.api.setOption("captions","sampleSubtitles",y)};
TU=function(l,y){l.V.O8=y;g.I(l.api.getRootNode(),"ytp-probably-keyboard-focus",y);g.I(l.contextMenu.element,"ytp-probably-keyboard-focus",y)};
VQ=function(l,y,k){const z=l.api.getCurrentTime(),r=l14(l,z);l=l14(l,z+y);return{startMediaTimeMs:r,endMediaTimeMs:l,seekSource:k}};
y3q=function(l){const y=l.api.getVideoData()?.j2();return l.api.getPresentingPlayerType(y)!==2};
J8=function(l,y,k,z){var r=g.FY(l.api.r4());if(r&&r.loaded){var Z=l.api.getSubtitlesUserSettings();r=void 0;for(var e=0;e<g.PA.length;e++){var A=g.PA[e];if(A.option===y){r=A.options;break}}e=void 0;for(A=0;A<r.length;A++)r[A].option===Z[y]&&(e=A);if(z)if(k){if(e===0)return}else if(e===r.length-1)return;z={};z[y]=r[(e+(k?r.length-1:1))%r.length].option;l.api.updateSubtitlesUserSettings(z);Dws(l,!0);l.J.start()}};
l14=function(l,y){if(y<0)return"0";l=Math.floor(Math.min(y,l.api.getDuration())*1E3);return l>2**31-1?"0":String(l)};
Y1=function(l,y){l.actionButtons.includes(y)||(l.actionButtons.push(y),l.updateValue("buttons",l.actionButtons))};
kj_=function(l){var y=document.querySelectorAll(`[data-tooltip-target-id="${l.tooltipRenderer.targetId}"]`);y=y.length>0?y[0]:null;const k=g.rt("ytp-ad-module");l.N=!!g.rt("ytp-chrome-bottom")?.contains(y);l.K=!!k?.contains(y);l.A=!!y?.hasAttribute("data-tooltip-target-fixed");return y};
pP=function(l){var y;if(!(y=!l.Z)){y=l.Z;var k=window.getComputedStyle(y);y=k.display==="none"||k.visibility==="hidden"||y.getAttribute("aria-hidden")==="true"}if(y||l.L.isMinimized())l.fP(!1);else if(y=g.Zo(l.Z),y.width&&y.height){l.L.O_(l.element,l.Z);var z=l.L.Yz().getPlayerSize().height;k=g.Zo(l.qd("ytp-promotooltip-container")).height;l.N?l.element.style.top=`${z-k-y.height-12}px`:l.A||(z=l.L.rz().height-k-y.height-12,l.element.style.top=`${z}px`);z=l.qd("ytp-promotooltip-pointer");const r=g.zn(l.Z,
l.L.getRootNode()),Z=Number(l.element.style.left.replace(/[^\d\.]/g,""));l=l.L.isFullscreen()?18:12;z.style.left=`${r.x-Z+y.width/2-l}px`;z.style.top=`${k}px`}else l.fP(!1)};
KP=function(l){l.fP(!1);l.C&&l.L.logVisibility(l.element,l.VM)};
z2_=function(l){const y=g.E(l.dismissButton,$L)?.text?.runs?.length&&!!g.E(l.dismissButton,$L).text.runs[0].text;return g.E(l.acceptButton,$L)?.text?.runs?.length&&!!g.E(l.acceptButton,$L).text.runs[0].text||y};
Z5C=function(l,y=1,k=!0){l.N=l.V.animate([{offset:0,opacity:y},{offset:1,opacity:0}],{duration:200,fill:"forwards",easing:"cubic-bezier(0.20, 0.00, 0.60, 1.00)"});k&&(l.N.addEventListener("finish",()=>{l.N=void 0;r3e(l);l.hide()}),l.Z="fading-out")};
e2Q=function(l,y){l.N=l.V.animate([{offset:0,easing:"cubic-bezier(0.20, 0.00, 0.60, 1.00)",opacity:y},{offset:1,opacity:1}],{duration:200,fill:"forwards"});l.N.addEventListener("finish",()=>{l.N=void 0;l.S.start();l.Z="lingering"})};
A3z=function(l,y,k=!1,z=!1){var r=[];r.push({offset:0,transform:`translateX(${l.C===-1?20:-20}px)`,opacity:k?"0":"1"});k&&r.push({offset:.5,opacity:"1"});r.push({offset:1,transform:"translateX(0)",opacity:"1"});k=y.animate(r,{duration:400,easing:"cubic-bezier(0.05, 0.00, 0.00, 1.00)"});y=y.querySelector("path");r=[];const Z={offset:0,d:l.C===-1?'path("M 18 4 L 18 16 L 18 28")':'path("M 4 4 L 4 16 L 4 28")'};z&&(Z.filter="drop-shadow(0 0 0.5px rgba(0, 0, 0, 0.8))");r.push(Z);z&&r.push({offset:.8,filter:"drop-shadow(0 0 0.5px rgba(0, 0, 0, 0.8))"});
l={offset:1,d:l.C===-1?'path("M 18 4 L 6 16 L 18 28")':'path("M 4 4 L 16 16 L 4 28")'};z&&(l.filter="drop-shadow(0 0 0.5px rgba(0, 0, 0, 0))");r.push(l);y.animate(r,{duration:333,easing:"cubic-bezier(0.05, 0.00, 0.00, 1.00)",fill:"forwards"});return k};
$I_=function(l){const y=l.V.querySelector(".ytp-seek-overlay-arrow-persistent").cloneNode(!0);y.classList.add("ytp-seek-overlay-arrow-additional");y.classList.remove("ytp-seek-overlay-arrow-persistent");l.V.appendChild(y);A3z(l,y,!0,!0).addEventListener("finish",()=>{y.remove()})};
r3e=function(l){l.J=0;l.Z="hidden";l.C=void 0;l.V=void 0;l.S.stop();l.N=void 0};
QZy=function(l){const y=Number(getComputedStyle(l.V).opacity);l.N?.cancel();l.N=void 0;return y};
tgy=function(l,y,k){l.updateValue("text",y);if(k){a:{switch(k){case "PREMIUM_STANDALONE":y=ojT();break a;case "PREMIUM_STANDALONE_CAIRO":y=Nhg();break a}y=void 0}l.updateValue("icon",y)}for(const z of l.D.getAnimations())z.cancel();l.D.animate([{offset:0,opacity:0},{offset:.3,opacity:1},{offset:.7,opacity:1},{offset:1,opacity:0}],{duration:1400}).addEventListener("finish",()=>{l.updateValue("text","");l.updateValue("icon","")})};
O5C=function(l,y){y.name!=="InvalidStateError"&&y.name!=="AbortError"&&(y.name==="NotAllowedError"?(l.Z.u4(),SS(l.C,l.element,!1)):g.n(y))};
g6=function(l){var y=l.api.O();const k=l.api.getVideoData(),z=g.u9(y)&&g.Pl(l.api)&&l.api.getPlayerStateObject().Z(128);y=y.N||y.disableSharing&&l.api.getPresentingPlayerType()!==2||!k.showShareButton||k.LS||z||k.Wn||!1;l=l.api.Yz().getPlayerSize().width;return!!k.videoId&&l>=240&&!y};
Gjg=function(l,y){dIQ(l);const k=y.links||y.shareTargets;let z=0;for(let A=0;A<k.length&&z<2;A++){const Q=k[A];a:switch(Q.img||Q.iconId){case "facebook":var r={U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 38 38",width:"100%"},W:[{U:"rect",G:{fill:"#fff",height:"34",width:"34",x:"2",y:"2"}},{U:"path",G:{d:"M 34.2,0 3.8,0 C 1.70,0 .01,1.70 .01,3.8 L 0,34.2 C 0,36.29 1.70,38 3.8,38 l 30.4,0 C 36.29,38 38,36.29 38,34.2 L 38,3.8 C 38,1.70 36.29,0 34.2,0 l 0,0 z m -1.9,3.8 0,5.7 -3.8,0 c -1.04,0 -1.9,.84 -1.9,1.9 l 0,3.8 5.7,0 0,5.7 -5.7,0 0,13.3 -5.7,0 0,-13.3 -3.8,0 0,-5.7 3.8,0 0,-4.75 c 0,-3.67 2.97,-6.65 6.65,-6.65 l 4.75,0 z",
fill:"#39579b"}}]};break a;case "twitter":r={U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 38 38",width:"100%"},W:[{U:"rect",G:{fill:"#fff",height:"34",width:"34",x:"2",y:"2"}},{U:"path",G:{d:"M 34.2,0 3.8,0 C 1.70,0 .01,1.70 .01,3.8 L 0,34.2 C 0,36.29 1.70,38 3.8,38 l 30.4,0 C 36.29,38 38,36.29 38,34.2 L 38,3.8 C 38,1.70 36.29,0 34.2,0 l 0,0 z M 29.84,13.92 C 29.72,22.70 24.12,28.71 15.74,29.08 12.28,29.24 9.78,28.12 7.6,26.75 c 2.55,.40 5.71,-0.60 7.41,-2.06 -2.50,-0.24 -3.98,-1.52 -4.68,-3.56 .72,.12 1.48,.09 2.17,-0.05 -2.26,-0.76 -3.86,-2.15 -3.95,-5.07 .63,.28 1.29,.56 2.17,.60 C 9.03,15.64 7.79,12.13 9.21,9.80 c 2.50,2.75 5.52,4.99 10.47,5.30 -1.24,-5.31 5.81,-8.19 8.74,-4.62 1.24,-0.23 2.26,-0.71 3.23,-1.22 -0.39,1.23 -1.17,2.09 -2.11,2.79 1.03,-0.14 1.95,-0.38 2.73,-0.77 -0.47,.99 -1.53,1.9 -2.45,2.66 l 0,0 z",
fill:"#01abf0"}}]};break a;default:r=null}if(!r)continue;const t=Q.sname||Q.serviceName,O=new g.H({U:"a",L_:["ytp-share-panel-service-button","ytp-button"],G:{href:Q.url,target:"_blank",title:t},W:[r]});O.listen("click",d=>{var w=Q.url;if(g.ne(d)){var h={};h.target=h.target||"YouTube";h.width=h.width||"600";h.height=h.height||"600";{var U=h;U||(U={});h=window;var u=w instanceof n3?w:g.L3(typeof w.href!="undefined"?w.href:String(w));var W=self.crossOriginIsolated!==void 0,V="strict-origin-when-cross-origin";
window.Request&&(V=(new Request("/")).referrerPolicy);var T=U.noreferrer;if(W&&T&&V==="unsafe-url")throw Error("Cannot use the noreferrer option on a page that sets a referrer-policy of `unsafe-url` in modern browsers!");V=T&&!W;w=U.target||w.target;T=[];let K=[],Zg=!1;for(var J in U){const es=U[J];switch(J){case "width":case "height":case "top":case "left":T.push(J+"="+es);break;case "target":break;case "noopener":case "noreferrer":es?K.push(J):(Zg=!0,K.push(J+"=false"));break;case "attributionsrc":T.push(J+
(es?"="+es:""));break;default:T.push(J+"="+(es?1:0))}}J=w!==void 0&&!["_blank","_self","_top","_parent",""].includes(w);J=Vm()&&J;w7q&&W&&T.length===0&&K.length>0&&!J&&!Zg?(K.length===2&&(K=["noreferrer"]),g.kv(h,u,w,K[0]),h=LW()):(W=T.join(","),Te()&&h.navigator&&h.navigator.standalone&&w&&w!="_self"?(W=g.Gf("A"),g.HC(W,u),W.target=w,V&&(W.rel="noreferrer"),((U=U.attributionsrc)||U==="")&&W.setAttribute("attributionsrc",U),U=document.createEvent("MouseEvent"),U.initMouseEvent("click",!0,!0,h,1),
W.dispatchEvent(U),h=LW()):V?(h=g.kv(h,"",w,W),U=g.Fv(u),h&&(h.opener=null,U===""&&(U="javascript:''"),U='<meta name="referrer" content="no-referrer"><meta http-equiv="refresh" content="0; url='+Um(U)+'">',U=li(U),(u=h.document)&&u.write&&(u.write(yN(U)),u.close()))):((h=g.kv(h,u,w,W))&&U.noopener&&(h.opener=null),h&&U.noreferrer&&(h.opener=null)))}h&&(h.opener||(h.opener=window),h.focus());d.preventDefault()}});
O.addOnDisposeCallback(g.mn(l.tooltip,O.element));t==="Facebook"?l.api.createClientVe(O.element,O,164504):t==="Twitter"&&l.api.createClientVe(O.element,O,164505);l.j(O.element,"click",()=>{l.api.logClick(O.element)});
l.api.logVisibility(O.element,!0);l.C.push(O);z++}const Z=y.more||y.moreLink,e=new g.H({U:"a",L_:["ytp-share-panel-service-button","ytp-button"],W:[{U:"span",B:"ytp-share-panel-service-button-more",W:[{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 38 38",width:"100%"},W:[{U:"rect",G:{fill:"#fff",height:"34",width:"34",x:"2",y:"2"}},{U:"path",G:{d:"M 34.2,0 3.8,0 C 1.70,0 .01,1.70 .01,3.8 L 0,34.2 C 0,36.29 1.70,38 3.8,38 l 30.4,0 C 36.29,38 38,36.29 38,34.2 L 38,3.8 C 38,1.70 36.29,0 34.2,0 Z m -5.7,21.85 c 1.57,0 2.85,-1.27 2.85,-2.85 0,-1.57 -1.27,-2.85 -2.85,-2.85 -1.57,0 -2.85,1.27 -2.85,2.85 0,1.57 1.27,2.85 2.85,2.85 z m -9.5,0 c 1.57,0 2.85,-1.27 2.85,-2.85 0,-1.57 -1.27,-2.85 -2.85,-2.85 -1.57,0 -2.85,1.27 -2.85,2.85 0,1.57 1.27,2.85 2.85,2.85 z m -9.5,0 c 1.57,0 2.85,-1.27 2.85,-2.85 0,-1.57 -1.27,-2.85 -2.85,-2.85 -1.57,0 -2.85,1.27 -2.85,2.85 0,1.57 1.27,2.85 2.85,2.85 z",
fill:"#4e4e4f","fill-rule":"evenodd"}}]}]}],G:{href:Z,target:"_blank",title:"Th\u00eam"}});e.listen("click",A=>{var Q=Z;l.api.logClick(l.moreButton.element);Q=h2P(l,Q);g.Hl(Q,l.api,A)&&g.G3(l.api,"SHARE_CLICKED")});
e.addOnDisposeCallback(g.mn(l.tooltip,e.element));l.api.createClientVe(e.element,e,164506);l.j(e.element,"click",()=>{l.api.logClick(e.element)});
l.api.logVisibility(e.element,!0);l.C.push(e);l.moreButton=e;l.updateValue("buttons",l.C)};
dIQ=function(l){for(const y of l.C)y.detach(),g.yb(y);l.C=[]};
h2P=function(l,y){const k={};g.u9(l.api.O())&&(g.UB(l.api,"addEmbedsConversionTrackingParams",[k]),y=g.UI(y,k));return y};
ED=function(l){return l===void 0||l.startSec===void 0||l.endSec===void 0?!1:!0};
fP=function(l,y){l.startSec+=y;l.endSec+=y};
jp=function(l){l.L.Ur("shopping_overlay_visible");l.L.Ur("shopping_overlay_preview_collapsed");l.L.Ur("shopping_overlay_preview_expanded");l.L.Ur("shopping_overlay_expanded")};
a1s=function(l,y){l.isContentForward=y;g.I(l.badge.element,"ytp-suggested-action-badge-content-forward",y)};
Sp=function(l){const y=l.isContentForward&&!l.Oj();g.I(l.badge.element,"ytp-suggested-action-badge-preview-collapsed",y&&l.Z);g.I(l.badge.element,"ytp-suggested-action-badge-preview-expanded",y&&l.V)};
i5y=function(l){l.D&&l.xz.element.removeChild(l.D.element);l.D=void 0};
Mg_=function(l,y){return y.map(k=>{if((k=g.E(k,UIe)?.thumbnail?.thumbnails)&&k.length!==0)return k[0].url}).filter(k=>k!==void 0).map(k=>{k=new g.H({U:"img",
B:"ytp-suggested-action-product-thumbnail",G:{alt:"",src:k}});g.x(l,k);return k})};
nP=function(l,y,k){return new g.N1(l*1E3,y*1E3,{priority:9,namespace:k})};
X7P=function(l){l.j(l.L,g.uR("shopping_overlay_visible"),()=>{l.Ul(!0)});
l.j(l.L,g.xR("shopping_overlay_visible"),()=>{l.Ul(!1)});
l.j(l.L,g.uR("shopping_overlay_expanded"),()=>{l.HG=!0;Rn(l)});
l.j(l.L,g.xR("shopping_overlay_expanded"),()=>{l.HG=!1;Rn(l)});
l.j(l.L,g.uR("shopping_overlay_preview_collapsed"),()=>{l.Z=!0;Sp(l)});
l.j(l.L,g.xR("shopping_overlay_preview_collapsed"),()=>{l.Z=!1;Sp(l)});
l.j(l.L,g.uR("shopping_overlay_preview_expanded"),()=>{l.V=!0;Sp(l)});
l.j(l.L,g.xR("shopping_overlay_preview_expanded"),()=>{l.V=!1;Sp(l)})};
c3y=function(l){var y=l.api.O(),k=l.api.getVideoData();k=g.E9(y)+k.u0;if(!g.u9(y))return k;y={};g.UB(l.api,"addEmbedsConversionTrackingParams",[y]);return g.UI(k,y)};
Cmt=function(l){if(!l.api.O().MW){var y=l.api.getVideoData(),k=new g.UD("\u0110\u0103ng k\u00fd",null,"\u0110\u00e3 \u0111\u0103ng k\u00fd",null,!0,!1,y.Fu,y.subscribed,"channel_avatar",null,l.api,!0);l.api.createServerVe(k.element,l);l.api.setTrackingParams(k.element,y.subscribeButtonRenderer?.trackingParams||null);l.j(k.element,"click",()=>{l.api.logClick(k.element)});
l.subscribeButton=k;g.x(l,l.subscribeButton);l.subscribeButton.Uj(l.element)}};
b5C=function(l,y,k="",z=""){y?(l.C!==k&&(l.Z.style.backgroundImage=`url(${k})`,l.C=k),l.updateValue("channelLogoLabel",g.Ts("H\u00ecnh \u1ea3nh c\u1ee7a $CHANNEL_NAME",{CHANNEL_NAME:z})),g.zi(l.api.getRootNode(),"ytp-title-enable-channel-logo")):g.ZM(l.api.getRootNode(),"ytp-title-enable-channel-logo");l.api.logVisibility(l.Z,y&&l.C_);l.api.logVisibility(l.channelName,y&&l.C_)};
uiz=function(l,y){if(l.Z){y=Math.floor(y*.4);y=Math.max(y,47);var k=y+2;if(l.N!==k){l.N=k;l.C.height=k;l.Z.clearRect(0,0,1,k);var z=l.Z.createLinearGradient(0,2,0,2+y),r=y-42;z.addColorStop(0,"rgba(0, 0, 0, 0)");z.addColorStop(r/y,"rgba(0, 0, 0, 0.3)");z.addColorStop(1,"rgba(0, 0, 0, 0.68)");l.Z.fillStyle=z;l.Z.fillRect(0,2,1,y);l.element.style.height=`${k}px`;try{l.element.style.backgroundImage=`url(${l.C.toDataURL()})`}catch(Z){}}}};
xIe=function(l,y){y!==l.S&&(l.update({chapterTitle:y,ariaLabel:y}),l.S=y);y?l.show():l.hide()};
mI5=function(l){l.Z.disabled=l.C==null;g.I(l.Z,"ytp-chapter-container-disabled",l.Z.disabled);l.Pn()};
q_4=function(l,y,k,z,r){const Z=y.L9/y.rows;let e=Math.min(k/(y.xS/y.columns),z/Z),A=y.xS*e,Q=y.L9*e;A=Math.floor(A/y.columns)*y.columns;Q=Math.floor(Q/y.rows)*y.rows;let t=A/y.columns,O=Q/y.rows;const d=-y.column*t,w=-y.row*O;r&&Z<=45&&(O-=1/e);t-=2/e;l=l.style;l.width=`${t}px`;l.height=`${O}px`;r||(z=(z-O)/2,k=(k-t)/2,l.marginTop=Math.floor(z)+"px",l.marginBottom=Math.ceil(z)+"px",l.marginLeft=Math.floor(k)+"px",l.marginRight=Math.ceil(k)+"px");l.background=`url(${y.url}) ${d}px ${w}px/${A}px ${Q}px`};
FG=function(l,y){const k=!!l.Z;l.Z=y;l.Z?(k||(l.events.j(l.api,"videodatachange",()=>{FG(l,l.api.mS())}),l.events.j(l.api,"progresssync",l.onProgress),l.events.j(l.api,"appresize",l.V)),l.frameIndex=NaN,oX(l),l.fade.show(200)):(k&&l.events.C(),l.fade.hide(),l.fade.stop())};
oX=function(l){var y=l.Z;const k=l.api.getCurrentTime(),z=l.api.Yz().getPlayerSize();var r=GE(y,z.width);r=Oc5(y,r,k);l.update({timestamp:g.Sr(k)});r!==l.frameIndex&&(l.frameIndex=r,tnq(y,r,z.width),y=ALC(y,r,z.width),q_4(l.C,y,z.width,z.height))};
WDC=function(l,y){return l.L.X("delhi_modern_web_player_icons")?y?{U:"svg",G:{height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M3.29 3.29C3.11 3.46 3.01 3.70 3.00 3.94C2.98 4.19 3.06 4.43 3.22 4.63L3.29 4.70L7.58 8.99H5C4.73 8.99 4.48 9.10 4.29 9.29C4.10 9.47 4 9.73 4 9.99C4 10.26 4.10 10.51 4.29 10.70C4.48 10.89 4.73 10.99 5 10.99H11V4.99C11 4.73 10.89 4.47 10.70 4.29C10.51 4.10 10.26 3.99 10 3.99C9.73 3.99 9.48 4.10 9.29 4.29C9.10 4.47 9 4.73 9 4.99V7.58L4.70 3.29L4.63 3.22C4.43 3.06 4.19 2.98 3.94 3.00C3.70 3.01 3.46 3.11 3.29 3.29ZM19 13H13V19C13 19.26 13.10 19.51 13.29 19.70C13.48 19.89 13.73 20 14 20C14.26 20 14.51 19.89 14.70 19.70C14.89 19.51 15 19.26 15 19V16.41L19.29 20.70L19.36 20.77C19.56 20.92 19.80 21.00 20.04 20.99C20.29 20.98 20.52 20.87 20.70 20.70C20.87 20.52 20.98 20.29 20.99 20.04C21.00 19.80 20.92 19.56 20.77 19.36L20.70 19.29L16.41 15H19C19.26 15 19.51 14.89 19.70 14.70C19.89 14.51 20 14.26 20 14C20 13.73 19.89 13.48 19.70 13.29C19.51 13.10 19.26 13 19 13Z",
fill:"white"}}]}:{U:"svg",G:{height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M10 3H3V10C3 10.26 3.10 10.51 3.29 10.70C3.48 10.89 3.73 11 4 11C4.26 11 4.51 10.89 4.70 10.70C4.89 10.51 5 10.26 5 10V6.41L9.29 10.70L9.36 10.77C9.56 10.92 9.80 11.00 10.04 10.99C10.29 10.98 10.52 10.87 10.70 10.70C10.87 10.52 10.98 10.29 10.99 10.04C11.00 9.80 10.92 9.56 10.77 9.36L10.70 9.29L6.41 5H10C10.26 5 10.51 4.89 10.70 4.70C10.89 4.51 11 4.26 11 4C11 3.73 10.89 3.48 10.70 3.29C10.51 3.10 10.26 3 10 3ZM20 13C19.73 13 19.48 13.10 19.29 13.29C19.10 13.48 19 13.73 19 14V17.58L14.70 13.29L14.63 13.22C14.43 13.07 14.19 12.99 13.95 13.00C13.70 13.01 13.47 13.12 13.29 13.29C13.12 13.47 13.01 13.70 13.00 13.95C12.99 14.19 13.07 14.43 13.22 14.63L13.29 14.70L17.58 19H14C13.73 19 13.48 19.10 13.29 19.29C13.10 19.48 13 19.73 13 20C13 20.26 13.10 20.51 13.29 20.70C13.48 20.89 13.73 21 14 21H21V14C21 13.73 20.89 13.48 20.70 13.29C20.51 13.10 20.26 13 20 13Z",
fill:"white"}}]}:y?{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"g",B:"ytp-fullscreen-button-corner-2",W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"m 14,14 -4,0 0,2 6,0 0,-6 -2,0 0,4 0,0 z"}}]},{U:"g",B:"ytp-fullscreen-button-corner-3",W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"m 22,14 0,-4 -2,0 0,6 6,0 0,-2 -4,0 0,0 z"}}]},{U:"g",B:"ytp-fullscreen-button-corner-0",W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"m 20,26 2,0 0,-4 4,0 0,-2 -6,0 0,6 0,0 z"}}]},{U:"g",B:"ytp-fullscreen-button-corner-1",
W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"m 10,22 4,0 0,4 2,0 0,-6 -6,0 0,2 0,0 z"}}]}]}:{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"g",B:"ytp-fullscreen-button-corner-0",W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"m 10,16 2,0 0,-4 4,0 0,-2 L 10,10 l 0,6 0,0 z"}}]},{U:"g",B:"ytp-fullscreen-button-corner-1",W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"m 20,10 0,2 4,0 0,4 2,0 L 26,10 l -6,0 0,0 z"}}]},{U:"g",B:"ytp-fullscreen-button-corner-2",W:[{U:"path",N_:!0,B:"ytp-svg-fill",
G:{d:"m 24,24 -4,0 0,2 L 26,26 l 0,-6 -2,0 0,4 0,0 z"}}]},{U:"g",B:"ytp-fullscreen-button-corner-3",W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"M 12,20 10,20 10,26 l 6,0 0,-2 -4,0 0,-4 0,0 z"}}]}]}};
I15=function(l,y){y?l.element.classList.add("ytp-jump-button-enabled"):l.element.classList.remove("ytp-jump-button-enabled");l.L.logVisibility(l.element,y);l.L.W1()};
TrT=function(l){var y=l.L.getVideoData()?.RR;if(y){l=l.V.mK;for(const k of y)if((y=l[k])&&y.onTap?.innertubeCommand?.changeEngagementPanelVisibilityAction?.targetId!=="engagement-panel-macro-markers-problem-walkthroughs")return y}};
Vgt=function(l){return l.L.X("delhi_modern_web_player_icons")?gjg():Mf()};
Pms=function(l,y){l.C.style.setProperty("--yt-slider-shape-gradient-percent",`${(y-l.N)/(l.S-l.N)*100}%`)};
N7=function(l,y,k=!1){l.V&&(cancelAnimationFrame(l.V),l.V=0);k?J35(l,l.Z,y):Y_q(l,y)};
J35=function(l,y,k){const z=performance.now(),r=k-y;if(r!==0){var Z=e=>{e=(e-z)/400;e>1&&(e=1);Y_q(l,y+r*bu(p74,uu(p74,e)));l.V=e<1?requestAnimationFrame(Z):0};
l.V=requestAnimationFrame(Z)}};
Y_q=function(l,y){l.Z=y;l.update({slidervalue:l.Z,ariaValueNow:l.Z,ariaValueText:`${l.Z.toFixed(2)}`});l.C.valueAsNumber=l.Z;Pms(l,y)};
KDg=function(l,y){l.element.classList.toggle("ytp-volume-popover-hovering",y);l.isVisible=y;(l=l.element.closest(".ytp-chrome-bottom"))&&l.classList.toggle("ytp-volume-popover-showing",y)};
gI4=function(l){var y=null;const k="Tr\u00ecnh duy\u1ec7t c\u1ee7a b\u1ea1n kh\u00f4ng h\u1ed7 tr\u1ee3 thay \u0111\u1ed5i \u00e2m l\u01b0\u1ee3ng. $BEGIN_LINKT\u00ecm hi\u1ec3u th\u00eam$END_LINK".split(/\$(BEGIN|END)_LINK/);y=new sD(l.L,{U:"span",L_:["ytp-popup","ytp-generic-popup"],G:{tabindex:"0"},W:[k[0],{U:"a",G:{href:"https://support.google.com/youtube/?p=noaudio",target:l.L.O().D},Nd:k[2]},k[4]]},100,!0);g.x(l,y);y.hide();y.subscribe("show",z=>{l.L.CU(y,z)});
g.pi(l.L,y.element,4)};
jZz=function(l,y){l.A=y;let k=l.u0;l.L.X("delhi_modern_web_player_icons")?l.C.qd("ytp-svg-volume-animation-big-ripple").setAttribute("transform",`translate(${LP}, ${vA}) scale(${y}) translate(-${LP},-${vA})`):y&&(k+=jMy(EIT,f1P,y));l.Y.setAttribute("d",k)};
FD5=function(l,y){let k;y===1?k=l.L.X("delhi_modern_web_player_icons")?{U:"svg",G:{height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M11.60 2.08L11.48 2.14L3.91 6.68C3.02 7.21 2.28 7.97 1.77 8.87C1.26 9.77 1.00 10.79 1 11.83V12.16L1.01 12.56C1.07 13.52 1.37 14.46 1.87 15.29C2.38 16.12 3.08 16.81 3.91 17.31L11.48 21.85C11.63 21.94 11.80 21.99 11.98 21.99C12.16 22.00 12.33 21.95 12.49 21.87C12.64 21.78 12.77 21.65 12.86 21.50C12.95 21.35 13 21.17 13 21V3C12.99 2.83 12.95 2.67 12.87 2.52C12.80 2.37 12.68 2.25 12.54 2.16C12.41 2.07 12.25 2.01 12.08 2.00C11.92 1.98 11.75 2.01 11.60 2.08ZM4.94 8.4V8.40L11 4.76V19.23L4.94 15.6C4.38 15.26 3.92 14.80 3.58 14.25C3.24 13.70 3.05 13.07 3.00 12.43L3 12.17V11.83C2.99 11.14 3.17 10.46 3.51 9.86C3.85 9.25 4.34 8.75 4.94 8.4ZM21.29 8.29L19 10.58L16.70 8.29L16.63 8.22C16.43 8.07 16.19 7.99 15.95 8.00C15.70 8.01 15.47 8.12 15.29 8.29C15.12 8.47 15.01 8.70 15.00 8.95C14.99 9.19 15.07 9.43 15.22 9.63L15.29 9.70L17.58 12L15.29 14.29C15.19 14.38 15.12 14.49 15.06 14.61C15.01 14.73 14.98 14.87 14.98 15.00C14.98 15.13 15.01 15.26 15.06 15.39C15.11 15.51 15.18 15.62 15.28 15.71C15.37 15.81 15.48 15.88 15.60 15.93C15.73 15.98 15.86 16.01 15.99 16.01C16.12 16.01 16.26 15.98 16.38 15.93C16.50 15.87 16.61 15.80 16.70 15.70L19 13.41L21.29 15.70L21.36 15.77C21.56 15.93 21.80 16.01 22.05 15.99C22.29 15.98 22.53 15.88 22.70 15.70C22.88 15.53 22.98 15.29 22.99 15.05C23.00 14.80 22.93 14.56 22.77 14.36L22.70 14.29L20.41 12L22.70 9.70C22.80 9.61 22.87 9.50 22.93 9.38C22.98 9.26 23.01 9.12 23.01 8.99C23.01 8.86 22.98 8.73 22.93 8.60C22.88 8.48 22.81 8.37 22.71 8.28C22.62 8.18 22.51 8.11 22.39 8.06C22.26 8.01 22.13 7.98 22.00 7.98C21.87 7.98 21.73 8.01 21.61 8.06C21.49 8.12 21.38 8.19 21.29 8.29Z",
fill:"white"}}]}:xb():k=l.C;l.RR=y;if(l.L.X("delhi_modern_web_player_icons"))l.C.qd("ytp-svg-volume-animation-small-ripple").setAttribute("transform",`translate(${S_e}, ${nIs}) scale(${1-y}) translate(-${S_e},-${nIs})`),l.C.qd("ytp-svg-volume-animation-big-ripple").setAttribute("transform",`translate(${LP}, ${vA}) scale(${l.A-y}) translate(-${LP}, -${vA})`);else{var z=20*y;for(var r=0;r<l.J.length;r++)l.J[r].setAttribute("transform",`translate(${z}, ${z})`);for(z=0;z<l.V.length;z++)r=l.V[z],r?.style&&
(r.style.display=y===0?"none":"")}k!==l.b0&&(l.updateValue("icon",k),l.b0=k)};
oIQ=function(l,y){if(l.L.O().HG){var k=g.Wl(l.L,"T\u1eaft ti\u1ebfng","m");const z=g.Wl(l.L,"B\u1eadt \u00e2m thanh","m");k=y?z:k;l.L.O().X("player_tooltip_data_title_killswitch")?l.updateValue("title",k):l.update({"tooltip-title":k,"aria-label":k});l.update({"data-title-no-tooltip":y?"B\u1eadt \u00e2m thanh":"T\u1eaft ti\u1ebfng"});l.tooltip.W1()}};
BA=function(l,y){l=l.L.X("delhi_modern_web_player_icons");switch(y){case 1:return l?cW():Xh();case 2:return l?njg():Sse();case 3:return l?{U:"svg",G:{fill:"none",height:"36",viewBox:"0 0 36 36",width:"36"},W:[{U:"path",G:{d:"M11.29 2.92C14.85 1.33 18.87 1.06 22.61 2.15L22.96 2.26C26.56 3.40 29.67 5.74 31.75 8.89L31.95 9.19C33.90 12.28 34.77 15.93 34.42 19.56L34.38 19.93C34.04 22.79 32.96 25.51 31.25 27.83C29.53 30.14 27.23 31.97 24.59 33.12C21.95 34.27 19.05 34.71 16.18 34.40C13.32 34.08 10.59 33.02 8.26 31.32L7.97 31.10C4.87 28.73 2.71 25.33 1.88 21.52L3.34 21.20L4.81 20.88C5.49 24.00 7.25 26.77 9.79 28.72L10.27 29.07C12.19 30.40 14.41 31.22 16.74 31.44C19.06 31.65 21.40 31.27 23.53 30.31C25.66 29.35 27.50 27.86 28.88 25.98C30.26 24.10 31.13 21.89 31.40 19.58L31.46 18.98C31.68 16.00 30.90 13.03 29.25 10.54C27.60 8.05 25.17 6.18 22.34 5.22L21.77 5.04C19.02 4.23 16.08 4.33 13.38 5.31C10.68 6.29 8.37 8.11 6.77 10.5H10.5L10.65 10.50C11.03 10.54 11.38 10.73 11.63 11.02C11.88 11.31 12.01 11.69 11.99 12.07C11.97 12.46 11.81 12.82 11.53 13.08C11.25 13.35 10.88 13.49 10.5 13.5H1.5V4.5L1.50 4.34C1.54 3.97 1.71 3.63 1.99 3.38C2.27 3.13 2.62 3.00 3 3.00C3.37 3.00 3.72 3.13 4.00 3.38C4.28 3.63 4.45 3.97 4.49 4.34L4.5 4.5V8.51C6.21 6.07 8.56 4.13 11.29 2.92ZM24 18L15 12.75V23.25L24 18ZM3.02 19.73C2.63 19.82 2.29 20.05 2.08 20.39C1.86 20.72 1.79 21.13 1.88 21.52L4.81 20.88C4.77 20.69 4.69 20.50 4.57 20.34C4.46 20.18 4.32 20.04 4.15 19.94C3.99 19.83 3.80 19.76 3.61 19.72C3.41 19.69 3.21 19.69 3.02 19.73Z",
fill:"white"}}]}:g.Ce();case 4:return l?Bhy():vjT();default:return null}};
HA=function(l){const y={duration:null,preview:null,text:null,title:null,"tooltip-title":null,url:null,"data-title-no-tooltip":null,"aria-keyshortcuts":null};var k=l.playlist!=null&&l.playlist.hasNext();k=g.Pl(l.L)&&(!l.Z||k);const z=l.Z&&g.Ki(l.L),r=Nry(l),Z=l.Z&&l.L.getPresentingPlayerType()===5,e=g.Wl(l.L,"Ti\u1ebfp theo","SHIFT+n");var A=g.Wl(l.L,"Tr\u01b0\u1edbc","SHIFT+p");if(Z)y.title="Ph\u00e1t video",y["tooltip-title"]="Ph\u00e1t video";else if(l.N)y.title="Ph\u00e1t l\u1ea1i",y["tooltip-title"]=
"Ph\u00e1t l\u1ea1i";else if(k){let Q=null;l.playlist&&(Q=g.pJ(l.playlist,l.Z?qgT(l.playlist):WWq(l.playlist)));if(Q){if(Q.videoId){const t=l.playlist.listId;y.url=l.L.O().getVideoUrl(Q.videoId,t?t.toString():void 0)}y.text=Q.title;y.duration=Q.lengthText?Q.lengthText:Q.lengthSeconds?g.Sr(Q.lengthSeconds):null;y.preview=Q.uE("mqdefault.jpg")}l.Z?(y.title=e,y["tooltip-title"]=e,y["data-title-no-tooltip"]="Ti\u1ebfp theo",y["aria-keyshortcuts"]="SHIFT+n"):(y.title=A,y["tooltip-title"]=A,y["data-title-no-tooltip"]=
"Tr\u01b0\u1edbc",y["aria-keyshortcuts"]="SHIFT+p")}else if(z){if(A=l.videoData?.D())y.url=A.A6(),y.text=A.title,y.duration=A.lengthText?A.lengthText:A.lengthSeconds?g.Sr(A.lengthSeconds):null,y.preview=A.uE("mqdefault.jpg");y.title=e;y["tooltip-title"]=e;y["data-title-no-tooltip"]="Ti\u1ebfp theo";y["aria-keyshortcuts"]="SHIFT+n"}y.disabled=!z&&!k&&!r&&!Z;l.update(y);l.K=!!y.url;z||k||l.N||r||Z?l.C||(l.C=g.mn(l.tooltip,l.element),l.J=l.listen("click",l.onClick,l)):l.C&&(l.C(),l.C=null,l.uq(l.J),
l.J=null);l.tooltip.W1();g.I(l.element,"ytp-playlist-ui",l.Z&&(k||l.L.X("web_hide_next_button")))};
sZQ=function(l){l.playlist&&l.playlist.unsubscribe("shuffle",l.onVideoDataChange,l)};
LDe=function(l){return!!l.playlist&&!l.Z&&!!l.videoData&&!l.videoData.isLivePlayback&&l.L.getCurrentTime()>=3&&l.L.getPresentingPlayerType()!==2};
Nry=function(l){const y=Vi(l.L.r4());return y?l.Z?y.hasNext():y.hasPrevious():!1};
vI5=function(l,y){return l?y?Eje():iM():y?{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M4 4C3.73 4 3.48 4.10 3.29 4.29C3.10 4.48 3 4.73 3 5V19C3 19.26 3.10 19.51 3.29 19.70C3.48 19.89 3.73 20 4 20C4.26 20 4.51 19.89 4.70 19.70C4.89 19.51 5 19.26 5 19V5C5 4.73 4.89 4.48 4.70 4.29C4.51 4.10 4.26 4 4 4ZM18.95 4.23L6 12.00L18.95 19.77C19.15 19.89 19.39 19.96 19.63 19.96C19.87 19.97 20.10 19.91 20.31 19.79C20.52 19.67 20.69 19.50 20.81 19.29C20.93 19.09 21.00 18.85 21 18.61V5.38C20.99 5.14 20.93 4.91 20.81 4.70C20.69 4.50 20.52 4.33 20.31 4.21C20.10 4.09 19.87 4.03 19.63 4.03C19.39 4.04 19.15 4.10 18.95 4.23Z",
fill:"white"}}]}:s1q()};
RX=function(l,y){const k=g.Sr(y),z=g.Ts("Tua t\u1edbi $PROGRESS",{PROGRESS:g.Sr(y,!0)});l.update({ariamin:0,ariamax:Math.floor(l.api.getDuration()),arianow:Math.floor(y),arianowtext:z,seekTime:k})};
D0=function(l){l.D=NaN;l.A=0;l.K=l.N};
l6=function(l,y){l.Y&&(l.Y.kO=!0);l.update({seekTime:g.Sr(y)});const k=l.S*l.scale;y=y<l.interval/2?-y*k/l.interval*2+l.Z/2:-y*k/l.interval-k/2+l.Z/2;y=g.gf(y,Bry(l),l.Z/2);l.K=y;l.N=l.K;g.n9(l.b0,"transform",`translateX(${l.K-l.Z/2}px)`);g.n9(l.b0,"padding",`0px ${l.Z/2}px`);g.n9(l.J,"position","relative")};
H5Q=function(l,y){const k=l.S*l.scale;y-=l.Z/2;return y>-k?-y/k*l.interval*.5:-(y+k/2)/k*l.interval};
Bry=function(l){return-((l.J.offsetWidth||(l.frameCount-1)*l.S*l.scale)-l.Z/2)};
l8C=function(l){var y=l.api.mS();if(y){var k=90*l.scale,z=GE(y,160*l.scale);if(y=y.levels[z]){l.S=y.width;if(!l.V.length){z=[];var r=aH(y,y.C()),Z=y.columns*y.rows,e=y.frameCount;for(var A=0;A<=r;A++){var Q=e<Z?Math.ceil(e/y.columns):y.rows;for(let t=0;t<y.rows;t++){const O=e<y.columns?e:y.columns,d={url:y.wZ(A),column:0,columns:O,row:t,rows:Q,xS:y.width*O,L9:y.height*Q};z.push(d);e-=O;if(e<=1)break}}l.V=z;l.frameCount=y.J();l.interval=y.Z/1E3||l.api.getDuration()/l.frameCount}for(;l.thumbnails.length>
l.V.length;)l.thumbnails.pop()?.dispose();for(;l.thumbnails.length<l.V.length;)z=new R2T,l.thumbnails.push(z),z.Uj(l.J),g.x(l,z);for(e=0;e<l.V.length;e++)z=l.thumbnails[e].element,r=l.V[e],Z=l.S*l.scale,A=r.L9/r.rows,Q=k/A,z.style.background=`url(${r.url}) 0 ${-r.row*r.L9/r.rows*Q}px/${Z*y.columns}px ${A*r.rows*Q}px`,z.style.width=`${Z*r.columns}px`,z.style.height=`${k}px`;l6(l,l.api.getCurrentTime());for(k=l.api.getVideoData().hj;l.C.length>k.length;)l.C.pop()?.dispose();for(;l.C.length<k.length;)z=
new DIg,l.C.push(new DIg),g.x(l,z);for(z=0;z<k.length;z++)r=k[z],l.C[z].update({chapterTitle:r.title}),r=Math.round(r.startTime/y.Z),Z=Math.floor(r/y.rows),g.n9(l.C[z].element,"transform",`translateX(${r%y.rows*l.S*l.scale}px)`),Z<l.thumbnails.length&&l.thumbnails[Z]&&l.C[z].Uj(l.thumbnails[Z].element);l.Ja=!0}}};
yjz=function(l,y){y>0&&(l.C=y,l.K.style.height=`${l.C}px`)};
kys=function(l,y,k,z,r=!1){yjz(l,z);k=V95(y,k,l.C,z,r);y=y.length===0?"":IZ5(k);l.api.X("delhi_modern_web_player")?l.N.setAttribute("d",y):l.J.setAttribute("d",y);l.Ij=y!=="";g.I(l.api.getRootNode(),"ytp-heat-map",l.Ij);g.I(l.api.getRootNode(),"ytp-heat-map-played_bar",l.api.X("web_player_heat_map_played_bar")&&y!=="");l.api.X("delhi_modern_web_player")?(l.V.style.display="none",l.Z.style.display="none"):l.N.style.display="none"};
znC=function(l,y,k,z,r=!1){yjz(l,z);k=Png(y,k,l.C,z,r);y=y.length===0?"":IZ5(k);l.api.X("delhi_modern_web_player")?l.N.setAttribute("d",y):l.J.setAttribute("d",y);l.Ij=y!=="";g.I(l.api.getRootNode(),"ytp-heat-map",l.Ij);l.api.X("delhi_modern_web_player")?(l.V.style.display="none",l.Z.style.display="none"):l.N.style.display="none"};
var y44=function(l,y,k,z,r,Z){return ux[G[19]](this,4,553,l,y,k,z,r,Z)};
yU=function(l,y){g.n9(l.Z,"width",y)};
kl=function(l,y){g.n9(l.Z,"margin-right",`${y}px`)};
Zte=function(l){if(l.Z.length===0){const y=new rjz;l.Z.push(y);g.x(l,y);y.Uj(l.xz,0)}for(;l.Z.length>1;)l.Z.pop().dispose();yU(l.Z[0],"100%");l.Z[0].startTime=0;l.Z[0].title=""};
zD=function(l){const y=g.xp(l.api.O())&&(l.api.X("web_shorts_pip")||l.api.X("web_watch_pip"));return!l.api.getVideoData()?.isLivePlayback&&!l.api.isMinimized()&&!l.api.isInline()&&(!l.api.Bw()||!y)};
Aj_=function(l){const y=new en5(l.api);l.V.push(y);g.x(l,y);y.Uj(l.b0)};
rO=function(l){for(;l.A.length;)l.A.pop().dispose()};
Qny=function(l){return g.E(g.E(l.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.decoratedPlayerBarRenderer,e2)?.playerBar,$n5)?.chapters};
Ott=function(l,y){let k=0,z=!1;for(const e of y){if(g.E(e,tQ5)){y=g.E(e,tQ5);var r={startTime:NaN,title:null,onActiveCommand:void 0},Z=y.title;r.title=Z?g.$b(Z):"";Z=y.timeRangeStartMillis;Z!=null&&(r.startTime=Z);r.onActiveCommand=y.onActiveCommand;y=r;k===0&&y.startTime!==0&&(l.Z[k].startTime=0,l.Z[k].title="",l.Z[k].onActiveCommand=y.onActiveCommand,k++,z=!0);l.Z.length<=k&&(r=new rjz,l.Z.push(r),g.x(l,r),r.Uj(l.xz,l.xz.children.length));l.Z[k].startTime=y.startTime;l.Z[k].title=y.title?y.title:
"";l.Z[k].onActiveCommand=y.onActiveCommand;l.Z[k].index=z?k-1:k}k++}for(;k<l.Z.length;)l.Z.pop().dispose();g.Zn(l);eP(l)};
dnP=function(l){var y=l.Z;const k=[];for(let r=0;r<y.length;r++)if(!isNaN(y[r].startTime)){var z=y[r].startTime;z=new g.N1(z,r===y.length-1?Infinity:y[r+1].startTime,{namespace:"chapterCueRange",priority:9,id:`c_${z}`});k.push(z)}l.api.Ur("chapterCueRange");l.api.Wa(k)};
$l=function(l,y){var k=l.hv[y]?.chapters;k&&(Ott(l,k),l.api.getVideoData().hj=l.Z,dnP(l));if((k=l.hv[y]?.markers)&&y!=="HEATSEEKER"){rO(l);for(var z of k){k=new wrP;var r=g.E(z,g.hns);r&&(k.title=r.title?.simpleText||"",k.timeRangeStartMillis=r.timeRangeStartMillis??NaN,k.onActiveCommand=r?.onActiveCommand??void 0,GyC(l,k))}Ax(l,l.A);z=l.A;k=l.Um;r=[];for(var Z=0;Z<z.length;Z++)if(!isNaN(z[Z].timeRangeStartMillis)&&z[Z].onActiveCommand){var e=RsQ(z[Z].timeRangeStartMillis,Z===z.length-1?Infinity:
z[Z+1].timeRangeStartMillis);r.push(e);k[e.id]=z[Z].onActiveCommand}l.api.Wa(r)}if(y=g.E(l.hv[y]?.heatmap,a84)){z=y.heatMarkers||[];k=y.minHeightDp??0;r=y.maxHeightDp??60;Z=l.Z.length;e=null;for(let Q=0;Q<Z;Q++){const t=l.Z[Q].startTime,O=Q===Z-1?Infinity:l.Z[Q+1].startTime;Q===l.V.length&&Aj_(l);const d=[];e&&d.push(e);for(var A of z){const w=g.E(A,Tmq)?.timeRangeStartMillis??-1;w>=t&&w<=O&&d.push(A)}r>0&&(l.b0.style.height=`${r}px`);kys(l.V[Q],d,k,r,Q===0);d.length>0&&(e=d[d.length-1])}g.Zn(l);
y=y.heatMarkersDecorations||[];A=[];for(const Q of y)if(y=g.E(Q,itQ))z=y.label,A.push({visibleTimeRangeStartMillis:y.visibleTimeRangeStartMillis??-1,visibleTimeRangeEndMillis:y.visibleTimeRangeEndMillis??-1,decorationTimeMillis:y.decorationTimeMillis??NaN,label:z?g.$b(z):""});l.heatMarkersDecorations=A}};
g.Zn=function(l){l.rb=l.Z.length-1;l.T7=0;Uny(l,!0)&&Uny(l,!1);var y=0;for(var k=0;k<l.Z.length;k++)if(l.Z[k].width===0){if(k===l.Z.length-1)for(var z=l.Z.length-1;z>=0;z--)if(l.Z[z].width>0){kl(l.Z[z],0);const r=Math.floor(l.Z[z].width);l.Z[z].width=r;yU(l.Z[z],`${r}px`);break}l.Z[k].width=0;yU(l.Z[k],"0")}else k===l.Z.length-1?(z=Math.floor(l.Z[k].width+y),l.Z[k].width=z,yU(l.Z[k],`${z}px`)):(y=l.Z[k].width+y,z=Math.round(y),y-=z,l.Z[k].width=z,yU(l.Z[k],`${z}px`));k=0;if(l.V.length===l.Z.length)for(y=
0;y<l.V.length;y++)z=l.Z[y].width,l.V[y].element.style.width=`${z}px`,l.V[y].element.style.left=`${k}px`,k+=z+QU(l);l.api.X("delhi_modern_web_player")&&(l.Z.length===1?l.Z[0].C.classList.add("ytp-progress-bar-start","ytp-progress-bar-end"):(l.Z[0].C.classList.remove("ytp-progress-bar-end"),l.Z[0].C.classList.add("ytp-progress-bar-start"),l.Z[l.Z.length-1].C.classList.add("ytp-progress-bar-end")))};
eP=function(l){if(l.K){var y=l.api.getProgressState(),k=l.api.getVideoData();if(!(k&&k.enableServerStitchedDai&&k.wu)||isFinite(y.current)){k=l.api.getVideoData()?.Ja()&&y.airingStart&&y.airingEnd?tx(l,y.airingStart,y.airingEnd):l.api.getPresentingPlayerType()===2?(k=l.api.getVideoData()?.getPlayerResponse()?.playerConfig?.webPlayerConfig?.skippableAdProgressBarDuration)?tx(l,y.seekableStart,k/1E3):tx(l,y.seekableStart,y.seekableEnd):tx(l,y.seekableStart,y.seekableEnd);var z=Fh(k,y.loaded,0);y=Fh(k,
y.current,0);var r=l.N.C!==k.C||l.N.Z!==k.Z;l.N=k;OG(l,y,z);r&&MQT(l);XrC(l);y=48;k=l.api.O();z=g.i_(l.api.O().experiments,"delhi_modern_web_player_responsive_compact_controls_threshold");z=l.api.X("delhi_modern_web_player_compact_controls")||z>0&&l.api.getPlayerSize().width<=z;l.api.X("delhi_modern_web_player")?y=l.api.getPlayerSize().width<=528?z?56:64:l.S?z?72:96:z?56:72:l.S?y=54:g.u9(k)&&!k.C&&(y=40);l.sj=y}}};
Ax=function(l,y){for(const k of y){y=dO(l,k.timeRangeStartMillis/(l.N.Z*1E3),wO(l));const z=l.api.X("delhi_modern_web_player")?.667:.6;g.n9(k.element,"transform",`translateX(${y}px) scaleX(${z})`)}};
Ces=function(l,y){y=g.E(y.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.decoratedPlayerBarRenderer,e2);if(y?.progressColor)for(let k=0;k<l.Z.length;k++)l.Z[k].Jv("PLAY_PROGRESS").style.background=T5z(y.progressColor);y=g.E(y?.playhead,cjQ);l.HG=y?.playheadImage?.thumbnails&&y?.playheadImage?.thumbnails[0].url;l.OA=y?.playheadFastForwardImage?.thumbnails&&y?.playheadFastForwardImage?.thumbnails[0].url;l.BF=y?.playheadRewindImage?.thumbnails&&y?.playheadRewindImage?.thumbnails[0].url;
g.I(l.PV,"ytp-decorated-scrubber-container",!!l.HG&&!l.api.Yz().nK);y?.loggingDirectives?.trackingParams&&(l.api.setTrackingParams(l.Ja,y?.loggingDirectives?.trackingParams),l.api.createServerVe(l.Ja,l));l.HG&&!l.api.Yz().nK&&(l.Ja.src=l.HG);l.OA&&fetch(l.OA,{cache:"force-cache"});l.BF&&fetch(l.BF,{cache:"force-cache"})};
GyC=function(l,y){l.A.push(y);g.x(l,y);y.Uj(l.vV,l.vV.children.length)};
dO=function(l,y,k){var z=-1;for(var r of l.Z)y*l.N.Z*1E3>r.startTime&&r.width>0&&z++;z=z<0?0:z;r=k.Z-QU(l)*l.rb;return y*r+QU(l)*z+k.V};
wO=function(l){let y=l.kz.x;y=g.gf(y,0,l.K);l.V9.update(y,l.K);return l.V9};
Uny=function(l,y){let k=0,z=!1;const r=l.Z.length;let Z=l.N.Z*1E3;Z===0&&(Z=l.api.getProgressState().seekableEnd*1E3);if(Z>0&&l.K>0){const Q=l.K-QU(l)*l.rb,t=l.T7===0?3:Q*l.T7;for(var e of l.Z)e.width=0;for(;k<r;){let O=Z-l.Z[k].startTime;k<r-1&&(O=l.Z[k+1].startTime-l.Z[k].startTime,kl(l.Z[k],QU(l)));g.I(l.Z[k].Z,"ytp-exp-chapter-hover-container",l.Z.length>1);const d=(Z===0?0:O/Z*Q)+l.Z[k].width;if(d>t)l.Z[k].width=d;else{l.Z[k].width=0;e=l;var A=k;const w=e.Z[A-1];w!==void 0&&w.width>0?w.width+=
d:A<e.Z.length-1&&(e.Z[A+1].width+=d);kl(e.Z[A],0);y&&(l.rb--,O/Z>l.T7&&(l.T7=O/Z),z=!0)}k++}}return z};
QU=function(l){return l.api.X("delhi_modern_web_player")?4:l.S?3:2};
tx=function(l,y,k){return hx(l)?new GD(Math.max(y,l.HF.startTimeMs/1E3),Math.min(k,l.HF.endTimeMs/1E3)):new GD(y,k)};
OG=function(l,y,k){l.Y=y;l.WG=k;const z=wO(l);var r=l.N.Z,Z=WLq(l.N,l.Y),e=g.Ts("$PLAY_PROGRESS / $DURATION",{PLAY_PROGRESS:g.Sr(Z,!0),DURATION:g.Sr(r,!0)}),A=IX(l.Z,Z*1E3);A=l.Z[A].title;l.update({ariamin:Math.floor(l.N.C),ariamax:Math.floor(r),arianow:Math.floor(Z),arianowtext:A?A+" "+e:e});r=l.clipStart;Z=l.clipEnd;l.HF&&l.api.getPresentingPlayerType()!==2&&(r=l.HF.startTimeMs/1E3,Z=l.HF.endTimeMs/1E3);r=Fh(l.N,r,0);A=Fh(l.N,Z,1);e=l.api.getVideoData();Z=g.gf(y,r,A);k=e?.PF()?1:g.gf(k,r,A);y=dO(l,
y,z);g.n9(l.PV,"transform",`translateX(${y}px)`);l.api.X("delhi_modern_web_player")&&l.api.X("delhi_modern_web_player_cutout")&&aQ(l,y);i6(l,z,r,Z,"PLAY_PROGRESS");e?.Ja()?(y=l.api.getProgressState().seekableEnd)&&i6(l,z,Z,Fh(l.N,y),"LIVE_BUFFER"):i6(l,z,r,k,"LOAD_PROGRESS");l.api.X("web_player_heat_map_played_bar")&&l.V[0]?.D(Z)};
MQT=function(l){l.kK.style.removeProperty("height");for(const y of Object.keys(l.Xr))btP(l,y);UG(l);OG(l,l.Y,l.WG)};
XrC=function(l){if(!l.api.getVideoData()?.Ja()){var y=wO(l);i6(l,y,l.Y,Math.max(y.C,l.Y),"HOVER_PROGRESS");var k=MW(l,y.Z*l.Y,!0),z=MW(l,y.N,!0);for(let r=k;r<=z;r++)g.I(l.Z[r].N,"ytp-hover-progress-light",y.C>l.Y);g.I(l.kK,"ytp-scrubber-button-hover",k===z&&l.Z.length>1);l.api.X("web_player_heat_map_played_bar")&&l.V[0]?.A(y.C)}};
hx=function(l){return!!l.HF?.postId&&l.api.getPresentingPlayerType()!==2};
XE=function(l,y,k,z,r){y=uRq(l,y);k=uRq(l,k);l=l.progressBar.visualElement;z={seekData:{startMediaTimeMs:y,endMediaTimeMs:k,seekSource:z}};(y=g.MM())&&yk(y,l,r,z)};
C7=function(l,y){y?l.D||(l.element.removeAttribute("aria-disabled"),l.D=new g.cu(l.progressBar,!0),l.api.X("enable_smart_skip_player_controls_shown_on_web_increased_triggering_sensitivity")&&l.D.subscribe("hoverstart",l.tb,l),l.D.subscribe("hovermove",l.DW,l),l.D.subscribe("hoverend",l.Wi,l),l.D.subscribe("dragstart",l.TZ,l),l.D.subscribe("dragmove",l.Z$,l),l.D.subscribe("dragend",l.Yr,l),l.api&&l.api.X("delhi_modern_web_player")&&l.api.X("delhi_modern_web_player_cutout")&&(l.va=new g.cu(l.progressBar,
!0),l.va.subscribe("hoverstart",()=>{l.zA=!0;aQ(l)},l),l.va.subscribe("hoverend",()=>{l.zA=!1;
aQ(l)},l)),l.pS=l.listen("keydown",l.xF)):l.D&&(l.element.setAttribute("aria-disabled","true"),l.uq(l.pS),l.D.cancel(),l.D.dispose(),l.D=null)};
b6=function(l){l.C&&(l.C.disable(),l.gb=0,l.b0.style.removeProperty("transform"),l.progressBar.style.removeProperty("transform"),l.Oj.style.removeProperty("height"),l.element.parentElement&&l.element.parentElement.style.removeProperty("height"))};
xnz=function(l,y){if(l.HF?.type==="repeatChapter"||y?.type==="repeatChapter")y&&(y=l.Z[IX(l.Z,y.startTimeMs)],g.I(y.Z,"ytp-repeating-chapter",!1)),l.HF&&(y=l.Z[IX(l.Z,l.HF.startTimeMs)],g.I(y.Z,"ytp-repeating-chapter",!0)),l.Z.forEach(k=>{g.I(k.Z,"ytp-exp-chapter-hover-container",!l.HF)})};
UG=function(l){var y=!!l.HF&&l.api.getPresentingPlayerType()!==2;let k=l.clipStart;var z=l.clipEnd;let r=!0,Z=!0;y&&l.HF?(k=l.HF.startTimeMs/1E3,z=l.HF.endTimeMs/1E3):(r=k>l.N.C,Z=l.N.Z>0&&z<l.N.Z);if(l.HF?.postId||l.HF?.type==="repeatChapter")Z=r=!1;g.I(l.element,"ytp-loop-range-enabled",y);g.I(l.element,"ytp-clip-start-enabled",r);g.I(l.element,"ytp-clip-end-enabled",Z);y=r?Fh(l.N,k,0):0;z=Z?Fh(l.N,z,1):1;l.PF.style.left=`${Math.round(y*1E3)/10}%`;l.R7.style.left=`${Math.round(z*1E3)/10}%`;l.S2.style.width=
`${Math.round(y*1E3)/10}%`;l.q_.style.left=`${Math.round(z*1E3)/10}%`;l.q_.style.width=`${Math.round((1-z)*1E3)/10}%`};
u6=function(l,y){var k=WLq(l.N,y.C);if(l.Z.length>1){k=MW(l,y.N,!0);let z=0;for(let r=0;r<k;r++)l.Z[r].width>0&&(z+=l.Z[r].width,z+=QU(l));k=(l.Z[k].startTime+(y.N-z)/l.Z[k].width*((k===l.Z.length-1?l.N.Z*1E3:l.Z[k+1].startTime)-l.Z[k].startTime))/1E3||0}return k};
MW=function(l,y,k=!1){let z=0;k&&(y-=mny(l,y)*QU(l));for(const r of l.Z){if(y>r.width)y-=r.width;else break;z++}return z===l.Z.length?z-1:z};
qcs=function(l,y){const k=y/((l.S?135:90)-l.sj)*l.sj;g.n9(l.progressBar,"transform",`translateY(${-y}px)`);g.n9(l.b0,"transform",`translateY(${-y}px)`);g.n9(l.Oj,"transform",`translateY(${k}px)`);l.Oj.style.height=`${y+k}px`;l.element.parentElement&&(l.element.parentElement.style.height=`${l.sj-k}px`)};
uRq=function(l,y){if(y<0)return"0";l=Math.floor(Math.min(y,l.api.getDuration())*1E3);return l>2**31-1?"0":String(l)};
WkC=function(l,y,k){if(k>=l.Z.length)return!1;const z=l.K-QU(l)*l.rb;return Math.abs(y-l.Z[k].startTime/1E3)/l.N.Z*z<4};
btP=function(l,y){var k=l.Xr[y];y=l.SN[y];const z=wO(l);let r=Fh(l.N,k.start/1E3,0),Z;const e=vCP(k,l.S)/z.width;Z=Fh(l.N,k.end/1E3,1);e!==Number.POSITIVE_INFINITY&&(r=g.gf(r,0,Z-e));Z=Math.min(Z,r+e);k.color&&(y.style.background=k.color);k=r;y.style.left=`${Math.max(k*z.Z+z.V,0)}px`;xl(l,y,g.gf((Z-k)*z.Z+z.V,0,z.width),z.width,!0)};
aQ=function(l,y){l.api.getPresentingPlayerType()!==1?l.xz.style.removeProperty("clip-path"):(y||(y=dO(l,l.Y,wO(l))),l.xz.style.clipPath='path("'+(l.zA?I8z(l,8,y,l.S?50:36,0,6):I8z(l,4,y,l.S?34:24,2,3))+'")')};
i6=function(l,y,k,z,r){var Z=l.Z.length,e=y.Z-l.rb*QU(l),A=k*e;k=MW(l,A);var Q=z*e;e=MW(l,Q);r==="HOVER_PROGRESS"&&(e=MW(l,y.Z*z,!0),Q=y.Z*z-mny(l,y.Z*z)*QU(l));z=Math.max(A-Twt(l,k),0);for(A=k;A<Z;A++)l.Z[A].Jv(r).style.left=k===A?`${z}px`:"0";y=dO(l,l.Y,y);for(Z=k;Z<e;Z++){A=l.Z[Z].Jv(r);const t=l.Z[Z].width,O=Z===k?t-z:t;xl(l,A,O,t);VQe(l,A,O,t,Z,y,r)}Z=l.Z[e].width;Q=g.gf(Q-Twt(l,e),0,Z);k===e&&(Q-=z);z=l.Z[e].Jv(r);xl(l,z,Q,Z);VQe(l,z,Q,Z,e,y,r);Q=e;e=l.Z.length;for(Q+=1;Q<e;Q++)Pe_(l,Q,r);for(e=
0;e<k;e++)Pe_(l,e,r)};
I8z=function(l,y,k,z,r,Z){const e=k-z/2;k+=z/2;y+=r;return`M 0 ${r} L 0 ${y} L ${e} ${y} C ${e+Z} ${y} ${e+Z} ${r} ${e} ${r} L 0 ${r} M ${k} ${r} L ${l.K} ${r} L ${l.K} ${y} L ${k} ${y} C ${k-Z} ${y} ${k-Z} ${r} ${k} ${r}`};
mny=function(l,y){const k=l.Z.length;let z=0;for(const r of l.Z)if(r.width!==0)if(y>r.width)y-=r.width,y-=QU(l),z++;else break;return z===k?k-1:z};
Twt=function(l,y){if(y>=l.Z.length)return l.K;let k=0,z=0;for(;z<y;)k+=l.Z[z].width,z++;return k};
xl=function(l,y,k,z,r){r||l.api.O().C?y.style.width=`${k}px`:g.n9(y,"transform",`scalex(${z?k/z:0})`)};
VQe=function(l,y,k,z,r,Z,e){e==="PLAY_PROGRESS"&&(k=!z||l.api.O().C?1:k/z,l.S2.clientWidth>0||l.q_.clientWidth>0?(Z=y.clientWidth/k,l=-1*l.S2.clientWidth/k):(Z/=k,l=-1*l.Z[r].element.offsetLeft/k),g.n9(y,"background-size",`${Z}px`),g.n9(y,"background-position-x",`${l}px`))};
Pe_=function(l,y,k){k=l.Z[y].Jv(k);xl(l,k,0,l.Z[y].width)};
g.Jj4=function(l,y,k,z){const r=l.K!==k,Z=l.S!==z;l.e5=y;l.K=k;l.S=z;zD(l)&&l.C?.Oj(z);MQT(l);l.Z.length===1&&(l.Z[0].width=k||0);r&&g.Zn(l);l.C&&Z&&zD(l)&&(l.C.isEnabled&&(y=l.S?135:90,k=y-l.sj,l.Oj.style.height=`${y}px`,g.n9(l.b0,"transform",`translateY(${-k}px)`),g.n9(l.progressBar,"transform",`translateY(${-k}px)`)),l8C(l.C))};
Ycg=function(l,y){const k=y.getId();l.Xr[k]===y&&(g.XI(l.SN[k]),delete l.Xr[k],delete l.SN[k])};
m$=function(l,y){l.C=!!y;l.Z(l.L.Yz().getPlayerSize())};
prs=function(l,y,k,z){y={U:"span",L_:z,W:[y]};let r;z="ytp-swatch-color";if(l.Y||l.J)z="ytp-swatch-color-white";k==="highres"?r="8K":k==="hd2880"?r="5K":k==="hd2160"?r="4K":k.indexOf("hd")===0&&k!=="hd720"&&(r="HD");r&&(y.W.push(" "),y.W.push({U:"sup",B:z,Nd:r}));return y};
Kk5=function(l,y,k){const z=l.PG[y],r=g.pk[y];return prs(l,z?z.qualityLabel:r?`${r}p`:"T\u01b0\u0323 \u0111\u00f4\u0323ng",y,k)};
qW=function(l,y,k,z,r){const Z=(y=l.J?l.S[y]:l.sj[y])&&y.quality;var e=y&&y.qualityLabel;e=e?e:"T\u01b0\u0323 \u0111\u00f4\u0323ng";z&&(e=`(${e}`);l=prs(l,e,Z||"",r);z&&l.W.push(")");(z=(z=y&&y.paygatedQualityDetails)&&z.paygatedIndicatorText)&&k&&l.W.push({U:"div",B:"ytp-premium-label",Nd:z});return l};
Wu=function(l,y){l=Number(g.gf(y,l.N,l.V).toFixed(2));y=Math.floor((l+.001)*100%5+2E-15);let k=l;y!==0&&(k=l-y*.01);return Number(k.toFixed(2))};
gZq=function(l,y){const k=IQ(y);l.J&&(l.b0||y===l.sj)?(l.C(l.J),l.setContent(y.toString())):l.C(k)};
f8C=function(l){var y=l.Y.map(IQ);l.S&&y.push(l.S);l.V(y);l.J=null;l.sj=null;y=l.L.getPlaybackRate();TD(l.L)&&EZz(l,y);!l.Y.includes(y)||l.b0?l.C(l.J):l.C(IQ(y))};
EZz=function(l,y){l.sj=y;l.J=g.Ts("T\u00f9y ch\u1ec9nh ($CURRENT_CUSTOM_SPEED)",{CURRENT_CUSTOM_SPEED:y.toString()});y=l.Y.map(IQ);y.unshift(l.J);l.S&&y.push(l.S);l.V(y)};
jnq=function(l,y,k,z){k=new g.ZE({U:"div",L_:["ytp-menuitem"],G:{tabindex:"0",role:"menuitemradio","aria-checked":z?"true":"false"},W:[{U:"div",L_:["ytp-menuitem-label"],W:[{U:"div",L_:["ytp-menuitem-container-with-badge"],W:[{U:"div",Nd:"{{label}}"},l.Ja]}]}]},k,l.N(y));k.listen("click",()=>{l.RR(y)});
return k};
IQ=function(l){return l.toString()};
TD=function(l){return l.X("web_settings_menu_surface_custom_playback")};
ScC=function(l,y){return!!y&&l.getAvailablePlaybackRates()[l.getAvailablePlaybackRates().length-1]<=2};
VU=function(l){return l.X("web_settings_menu_surface_custom_playback")&&l.X("web_settings_use_input_slider")};
nZy=function(l,y){l.publish("settingChange",l.setting+"Override",!y);l.eN.M7()};
Fkz=function(l,y){l.languages=g.Ey(y,l.J,l);l.V(g.sT(y,l.J))};
oZy=function(l,y){l.L.setOption("captions","sampleSubtitles",y)};
Pu=function(l){return Object.values(l.tracks).find(y=>y.languageCode==="en"&&y.kind==="asr")};
Jx=function(l,y){l.L.setOption("captions","track",y)};
Nwz=function(l,y){l.settingsButton=y;l.element.id=y.element.getAttribute("aria-controls")};
snC=function(l){if(l.L.X("delhi_modern_web_player_icons"))return l=Ro.includes("vi")?Yl(l)&&l.isEnabled()?{U:"svg",G:{height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M21 3H3C2.46 3 1.96 3.21 1.58 3.58C1.21 3.96 1 4.46 1 5V19C1 19.53 1.21 20.03 1.58 20.41C1.96 20.78 2.46 21 3 21H21C21.53 21 22.03 20.78 22.41 20.41C22.78 20.03 23 19.53 23 19V5C23 4.46 22.78 3.96 22.41 3.58C22.03 3.21 21.53 3 21 3ZM9.03 8.08L9.29 8.16C9.79 8.35 10.24 8.65 10.60 9.05L10.77 9.26L10.83 9.34C10.96 9.55 11.01 9.80 10.96 10.05C10.92 10.29 10.79 10.51 10.59 10.66C10.40 10.81 10.15 10.89 9.91 10.87C9.66 10.85 9.43 10.74 9.26 10.57L9.19 10.49L9.11 10.39C8.98 10.24 8.81 10.12 8.62 10.05L8.54 10.02C8.32 9.97 8.10 10.00 7.91 10.11C7.67 10.24 7.48 10.43 7.35 10.67L7.28 10.79C7.09 11.16 6.99 11.58 7 12L7.00 12.16C7.02 12.52 7.11 12.88 7.28 13.20L7.35 13.32C7.48 13.56 7.67 13.75 7.91 13.88L7.99 13.92C8.16 14.00 8.35 14.02 8.54 13.97L8.62 13.94C8.85 13.85 9.05 13.70 9.19 13.50L9.26 13.43C9.44 13.24 9.68 13.13 9.93 13.12C10.19 13.11 10.44 13.20 10.63 13.37C10.82 13.53 10.94 13.77 10.97 14.02C11.00 14.27 10.93 14.53 10.77 14.73C10.39 15.23 9.88 15.61 9.29 15.83L9.03 15.91C8.43 16.06 7.79 16.01 7.21 15.77L6.97 15.65C6.42 15.35 5.95 14.90 5.64 14.36L5.50 14.12C5.21 13.55 5.04 12.92 5.00 12.27L5 12C4.99 11.26 5.17 10.53 5.50 9.87L5.64 9.63C5.96 9.09 6.42 8.64 6.97 8.34C7.60 8.00 8.34 7.91 9.03 8.08ZM17.03 8.08L17.29 8.16C17.79 8.35 18.24 8.65 18.60 9.05L18.77 9.26L18.83 9.34C18.96 9.55 19.01 9.80 18.96 10.05C18.92 10.29 18.79 10.51 18.59 10.66C18.40 10.81 18.15 10.89 17.91 10.87C17.66 10.85 17.43 10.74 17.26 10.57L17.19 10.49L17.11 10.39C16.98 10.24 16.81 10.12 16.62 10.05L16.54 10.02C16.32 9.97 16.10 10.00 15.91 10.11C15.67 10.24 15.48 10.43 15.35 10.67L15.28 10.79C15.09 11.16 14.99 11.58 15 12L15.00 12.16C15.02 12.52 15.11 12.88 15.28 13.20L15.35 13.32C15.48 13.56 15.67 13.75 15.91 13.88L15.99 13.92C16.16 14.00 16.35 14.02 16.54 13.97L16.62 13.94C16.85 13.85 17.05 13.70 17.19 13.50L17.26 13.43C17.44 13.24 17.68 13.13 17.93 13.12C18.19 13.11 18.44 13.20 18.63 13.37C18.82 13.53 18.94 13.77 18.97 14.02C19.00 14.27 18.93 14.53 18.77 14.73C18.39 15.23 17.88 15.61 17.29 15.83L17.03 15.91C16.43 16.06 15.79 16.01 15.21 15.77L14.97 15.65C14.42 15.35 13.95 14.90 13.64 14.36L13.50 14.12C13.21 13.55 13.04 12.92 13.00 12.27L13 12C12.99 11.26 13.17 10.53 13.50 9.87L13.64 9.63C13.96 9.09 14.42 8.64 14.97 8.34C15.60 8.00 16.34 7.91 17.03 8.08Z",
fill:"white"}}]}:h4():Yl(l)&&l.isEnabled()?{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M21 3H3C2.46 3 1.96 3.21 1.58 3.58C1.21 3.96 1 4.46 1 5V19C1 19.53 1.21 20.03 1.58 20.41C1.96 20.78 2.46 21 3 21H21C21.53 21 22.03 20.78 22.41 20.41C22.78 20.03 23 19.53 23 19V5C23 4.46 22.78 3.96 22.41 3.58C22.03 3.21 21.53 3 21 3ZM6 11H8C8.26 11 8.51 11.10 8.70 11.29C8.89 11.48 9 11.73 9 12C9 12.26 8.89 12.51 8.70 12.70C8.51 12.89 8.26 13 8 13H6C5.73 13 5.48 12.89 5.29 12.70C5.10 12.51 5 12.26 5 12C5 11.73 5.10 11.48 5.29 11.29C5.48 11.10 5.73 11 6 11ZM12 11H18C18.26 11 18.51 11.10 18.70 11.29C18.89 11.48 19 11.73 19 12C19 12.26 18.89 12.51 18.70 12.70C18.51 12.89 18.26 13 18 13H12C11.73 13 11.48 12.89 11.29 12.70C11.10 12.51 11 12.26 11 12C11 11.73 11.10 11.48 11.29 11.29C11.48 11.10 11.73 11 12 11ZM16 15H18C18.26 15 18.51 15.10 18.70 15.29C18.89 15.48 19 15.73 19 16C19 16.26 18.89 16.51 18.70 16.70C18.51 16.89 18.26 17 18 17H16C15.73 17 15.48 16.89 15.29 16.70C15.10 16.51 15 16.26 15 16C15 15.73 15.10 15.48 15.29 15.29C15.48 15.10 15.73 15 16 15ZM6 15H12C12.26 15 12.51 15.10 12.70 15.29C12.89 15.48 13 15.73 13 16C13 16.26 12.89 16.51 12.70 16.70C12.51 16.89 12.26 17 12 17H6C5.73 17 5.48 16.89 5.29 16.70C5.10 16.51 5 16.26 5 16C5 15.73 5.10 15.48 5.29 15.29C5.48 15.10 5.73 15 6 15Z",
fill:"white"}}]}:Hrz()};
Yl=function(l){return g.FY(l.L.r4())!=null?g.FY(l.L.r4()).HJ()?!!l.L.getOption("captions","tracklist",{includeAsr:!0}).length:!0:!1};
LkC=function(l,y){const k=l.liveBadge.element,z=l.api.isLifaAdPlaying();k.disabled=z||y;!p7(l)||l.A===y&&l.K===l.liveIndicatorText&&l.S===l.isPremiere||(l.A=y,l.K=l.liveIndicatorText,l.S=l.isPremiere,l.Pn(),y?k.classList.add("ytp-live-badge-is-livehead"):k.classList.remove("ytp-live-badge-is-livehead"),l.liveIndicatorText?l.liveBadge.setContent(l.liveIndicatorText):l.liveBadge.setContent(l.isPremiere?"C\u00f4ng chi\u1ebfu":"Tr\u1ef1c ti\u1ebfp"),y?l.Z&&(l.Z(),l.Z=null,k.removeAttribute("data-tooltip-title")):
(k.setAttribute("data-tooltip-title","B\u1ecf qua t\u1edbi ph\u00e1t tr\u1ef1c ti\u1ebfp."),l.Z=g.mn(l.tooltip,l.liveBadge.element)))};
vZ_=function(l,y){const k=l.HF!==y;l.HF=y;k&&K7(l)};
gO=function(l){return!!l.HF&&!!l.HF.postId&&l.api.getPresentingPlayerType()!==2&&(!l.HF.type||l.HF.type==="clips")};
p7=function(l){const y=l.api.O().X("enable_linear_program_progress"),k=l.api.getPresentingPlayerType()===2;return l.Nf&&!gO(l)&&(!y||!l.C)&&!k};
K7=function(l){l.updateValue("clipicon",{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 24 24",width:"100%"},W:[{U:"path",G:{d:"M22,3h-4l-5,5l3,3l6-6V3L22,3z M10.79,7.79C10.91,7.38,11,6.95,11,6.5C11,4.01,8.99,2,6.5,2S2,4.01,2,6.5S4.01,11,6.5,11 c0.45,0,.88-0.09,1.29-0.21L9,12l-1.21,1.21C7.38,13.09,6.95,13,6.5,13C4.01,13,2,15.01,2,17.5S4.01,22,6.5,22s4.5-2.01,4.5-4.5 c0-0.45-0.09-0.88-0.21-1.29L12,15l6,6h4v-2L10.79,7.79z M6.5,8C5.67,8,5,7.33,5,6.5S5.67,5,6.5,5S8,5.67,8,6.5S7.33,8,6.5,8z M6.5,19C5.67,19,5,18.33,5,17.5S5.67,16,6.5,16S8,16.67,8,17.5S7.33,19,6.5,19z"}}]});
l.Nf&&!l.C?l.updateValue("watchfullvideo","Xem video ph\u00e1t tr\u1ef1c ti\u1ebfp"):l.updateValue("watchfullvideo","Xem to\u00e0n b\u1ed9 video");g.I(l.element,"ytp-clip",gO(l));g.I(l.element,"ytp-live",p7(l))};
BwC=function(l,y){l.fP(y.width>=350)};
EG=function(l,y,k){var z=Math.floor(y),r=`${z}% ${"\u00e2m l\u01b0\u1ee3ng"}`+(k?" \u0111\u00e3 t\u1eaft ti\u1ebfng":"");k=k?0:y/100;l.updateValue("valuenow",z);l.updateValue("valuetext",r);z=l.N?78:52;r=!l.api.X("delhi_modern_web_player")&&l.N?18:12;l.RR.style.left=`${(z-r)*k}px`;l.volume=y};
Hts=function(l){const y=l.api.qV();l.N!==y&&(l.N=y,EG(l,l.api.getVolume(),l.api.isMuted()))};
f7=function(l,y,k,z,r){const Z=l.Z||l.isDragging||l.C||l.IH;l.Z=y;l.isDragging=k;l.C=z;l.IH=r;y=l.Z||l.isDragging||l.C||l.IH;Z!==y&&(y?l.J=l.j(l.element,"wheel",l.sj):(l.uq(l.J),l.J=null),g.I(l.S,"ytp-volume-slider-active",y))};
jP=function(l,y,k,z,r){y.Uj(k,r);l.L.X("frosted_glass_controls_opacity_animation")&&(l=y.element,z&&(l=y.qd(z)),l.classList.add("ytp-autohide-fade-transition"))};
n7=function(l,y,k){l.L.X("delhi_modern_web_player")?y.Uj(l.V.qd(SP[k])):y.Uj(l.V.element)};
Rn5=function(l){l.Z.element.classList.toggle("ytp-xsmall-width-right-controls-expanded",l.A.isExpanded())};
Dn_=function(l,y){l.L.getPlayerStateObject().isCued()||y?y&&(l.Ja.hide(),l.HG.hide(),l.muteButton&&l.muteButton.Cl(!1),l.S&&l.S.Cl(!1),l.J&&l.J.Cl(!1),l.L.WZ(l.Jv())):y||(l.Ja.show(),l.HG.show(),l.muteButton&&l.muteButton.Cl(!0),l.S&&l.S.Cl(!0),l.J&&l.J.Cl(!0),l.Ko())};
FE=function(l){if(l.L.X("web_player_rtr_ctrls")&&l.L.Yz().nK)return 0;const y=l.L.qV(),k=l.L.getVideoData().Wn;let z=0;l.L.qV()&&l.L.isEmbedsShortsMode()&&(z=(l.L.Yz().getPlayerSize().width-l.L.getVideoContentRect().width)/2);return 12*(k?0:y?2:1)+z};
lE5=function(l){const y=l.L.Yz().getPlayerSize().width;return Math.max(y-FE(l)*2,100)};
oQ=function(l){var y=l.L.qV()?72:50;const k=l.L.O();g.xp(k)&&(k.X("delhi_modern_web_player")?(y=g.i_(k.experiments,"delhi_modern_web_player_responsive_compact_controls_threshold"),y=l.L.X("delhi_modern_web_player_compact_controls")||y>0&&l.L.getPlayerSize().width<=y,y=l.L.qV()?k.X("delhi_modern_web_player_big_mode_consistent_pill_height")?100:112:y?70:78,l.L.getRootNode().classList.contains("ytp-fullscreen-grid-peeking")&&(l=getComputedStyle(l.L.getRootNode()).getPropertyValue("--ytp-grid-peek-height")||
"36px",y+=Number(l.replace("px","")))):y=62,g.U9(k)&&(y=54));return y};
yaz=function(l){l.suggestedActions={};l.L.Ur("suggested_action_button_visible");l.Z=null;l.L.setTrackingParams(l.badge.element,null);l.N=!1;l.V=!1};
kNz=function(l){l.updateValue("channelLink","");l.updateValue("channelName","");g.U9(l.api.O())||l.api.X("enable_channel_title_always_focusable")?l.updateValue("channelTitleFocusable","0"):l.updateValue("channelTitleFocusable","-1")};
g.mn=function(l,y){if(l.Ja)return()=>{};
y.addEventListener("mouseover",l.S);y.addEventListener("focus",l.S);const k=l.env.X("player_tooltip_data_title_killswitch")?y.getAttribute("title"):y.getAttribute("data-tooltip-title");k&&!y.hasAttribute("aria-label")&&y.setAttribute("aria-label",k);return()=>{l.Z===y&&l.J();y.removeEventListener("mouseover",l.S);y.removeEventListener("focus",l.S)}};
NW=function(l){let y;if(l.Z){y=l.Z.getAttribute("data-tooltip-text");if(l.N&&l.Z.getAttribute("aria-label")!==l.N)var k=l.N;var z=l.Z.getAttribute("aria-keyshortcuts"),r=l.Z.getAttribute("data-title-no-tooltip");z&&r&&(k=g.Ts("$BUTTON_TITLE ph\u00edm t\u1eaft $SHORTCUT_KEY",{BUTTON_TITLE:r,SHORTCUT_KEY:z}));k&&l.Z.setAttribute("aria-label",k);if(y&&!l.A){zIt(l,!0);var Z=l.Z;l.updateValue("text",y);k=Z.getAttribute("data-duration");l.update({title:l.N,duration:k});Z=Z.getAttribute("data-preview");
l.env.X("delhi_modern_web_player")?(l.updateValue("title",r),l.updateValue("keyBoardShortcutTitle",z.toUpperCase())):zIt(l,!1);z=243*l.scale;r=141*l.scale;l.bg.style.width=`${z}px`;l.bg.style.height=`${r}px`;l.bg.style.backgroundImage=Z?`url(${Z})`:"";l.bg.style.backgroundSize=`${z}px ${r}px`;l.wrapper.style.width=`${z}px`;g.rx(l.element,["ytp-text-detail","ytp-preview"]);g.I(l.element,"ytp-has-duration",!!k)}else r&&z&&l.env.X("delhi_modern_web_player")?(l.updateValue("text",r),l.updateValue("keyBoardShortcut",
z.toUpperCase())):l.updateValue("text",l.N),g.eM(l.element,["ytp-text-detail","ytp-preview","ytp-has-duration"]);k=l.Z;k.hasAttribute("data-tooltip-offset-y")?(k=Number(k.getAttribute("data-tooltip-offset-y")),k=isNaN(k)?0:k):k=0;ras(l,!!y,void 0,k)}};
zIt=function(l,y){l.env.X("delhi_modern_web_player")&&l.scale!==.6&&(l.scale=y?.8:1)};
ZJt=function(l,y){g.I(l.element,"ytp-preview",y>=0);if(!(y<0||y===l.V)){l.V=y;y=243*l.scale;var k=141*l.scale,z=ALC(l.C,l.V,y);q_4(l.bg,z,y,k,!0);l.b0.start()}};
ras=function(l,y,k,z){const r=Math.min(l.o0,300*l.scale);l.element.style.maxWidth=y?"":`${r}px`;l.u0.O_(l.element,l.Z,k,l.type===1,z);l.element.style.top?g.zi(l.element,"ytp-bottom"):l.element.style.bottom&&g.zi(l.element,"ytp-top");l.type===3&&l.sj.start()};
eIC=function(l,y,k,z){if(y&&!y.hasAttribute)l=new g.WO("showElementTooltip called with non-element.",y.toString()),g.n(l);else{isNaN(l.V)||(l.V=NaN,l.bg.style.background="");g.ZM(l.element,"ytp-tooltip-progress-bar-style");l.Z=y;l.A=!!z;z?l.N=z:(l.env.X("player_tooltip_data_title_killswitch")?l.N=y.getAttribute("title"):l.N=y.getAttribute("data-tooltip-title"),l.env.X("player_tooltip_data_title_killswitch")?y.removeAttribute("title"):y.removeAttribute("data-tooltip-title"));g.yp(l.element,"ytp-tooltip");
l.api.X("frosted_glass_controls_opacity_animation")&&g.zi(l.element,"ytp-frosted-glass-fade-transition");var r=y.getAttribute("data-tooltip-image");r&&(l.image.style.backgroundImage=`url(${r})`);z?l.update({ariaHidden:"false"}):l.update({ariaHidden:"true"});g.I(l.element,"ytp-tooltip-image-enabled",!!r);y=y.getAttribute("data-tooltip-opaque");g.I(l.element,"ytp-tooltip-opaque",!!y);l.type=k;l.api.addEventListener("appresize",l.Y);l.K&&(NW(l),l.fade.show(0))}};
Aa4=function(l){const y=l.Z;l.type===3&&l.sj.stop();l.api.removeEventListener("appresize",l.Y);l.A||(l.env.X("player_tooltip_data_title_killswitch")?y.setAttribute("title",l.N):y.setAttribute("data-tooltip-title",l.N));l.N="";l.Z=null;l.update({keyBoardShortcut:"",keyBoardShortcutTitle:""});l.wrapper.style.width=""};
$LC=function(l){if(!l.isRequestPending){l.isRequestPending=!0;l.Aa(3);var y=l.L.getVideoData();y=l.Z?y.removeFromWatchLaterCommand:y.addToWatchLaterCommand;const k=l.L.gW(),z=l.Z?()=>{l.Z=!1;l.isRequestPending=!1;l.Aa(2);l.L.O().A&&g.G3(l.L,"WATCH_LATER_VIDEO_REMOVED")}:()=>{l.Z=!0;
l.isRequestPending=!1;l.Aa(1);l.L.O().C&&l.L.Ml(l.element);l.L.O().A&&g.G3(l.L,"WATCH_LATER_VIDEO_ADDED")};
ji(k,y).then(z,()=>{l.isRequestPending=!1;l.Aa(4,"\u0110\u00e3 x\u1ea3y ra l\u1ed7i. Vui l\u00f2ng th\u1eed l\u1ea1i sau.");l.L.O().A&&g.G3(l.L,"WATCH_LATER_ERROR","\u0110\u00e3 x\u1ea3y ra l\u1ed7i. Vui l\u00f2ng th\u1eed l\u1ea1i sau.")})}};
QlT=function(l){const y=l.L.getPlayerSize(),k=l.L.O(),z=l.L.getVideoData(),r=g.u9(k)&&g.Pl(l.L)&&l.L.getPlayerStateObject().Z(128),Z=k.N;return k.OA&&y.width>=240&&!z.isAd()&&z.OA&&!r&&!z.Wn&&!l.L.isEmbedsShortsMode()&&!Z};
tXs=function(l,y){if(y!==l.icon){let k;switch(y){case 3:k=DK();break;case 1:k=t4();break;case 2:k={U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"M18,8 C12.47,8 8,12.47 8,18 C8,23.52 12.47,28 18,28 C23.52,28 28,23.52 28,18 C28,12.47 23.52,8 18,8 L18,8 Z M16,19.02 L16,12.00 L18,12.00 L18,17.86 L23.10,20.81 L22.10,22.54 L16,19.02 Z"}}]};break;case 4:k={U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",
N_:!0,G:{d:"M7,27.5h22L18,8.5L7,27.5z M19,24.5h-2v-2h2V24.5z M19,20.5h-2V16.5h2V20.5z",fill:"#fff"}}]}}l.updateValue("icon",k);l.icon=y}};
OJ4=function(l,y){aX(g.mc(l.L.O()),"wl_button",()=>{BCg({videoId:y});window.location.reload()})};
dL5=function(l){const y=l.api.O(),k=l.api.getPlayerStateObject().Z(128);return y.V&&k&&!l.api.isFullscreen()};
sG=function(l){if(l.xw()&&!l.api.isEmbedsShortsMode()&&l.Hw){var y=l.api.X("web_player_hide_overflow_button_if_empty_menu");!l.jZ||y&&!QlT(l.jZ)||Y1(l.Hw,l.jZ);!l.shareButton||y&&!g6(l.shareButton)||Y1(l.Hw,l.shareButton);!l.copyLinkButton||y&&!J1e(l.copyLinkButton)||Y1(l.Hw,l.copyLinkButton)}else{const k=l.api.O().getWebPlayerContextConfig();if(l.Hw){y=l.Hw;for(const z of y.actionButtons)z.detach();y.actionButtons=[]}l.searchButton&&!g.cf(l.H1.element,l.searchButton.element)&&l.searchButton.Uj(l.H1.element);
!l.jZ||k?.hideTopWatchNextButton||g.cf(l.H1.element,l.jZ.element)||l.jZ.Uj(l.H1.element);!l.shareButton||k?.hideTopShareButton||g.cf(l.H1.element,l.shareButton.element)||l.shareButton.Uj(l.H1.element);l.copyLinkButton&&!g.cf(l.H1.element,l.copyLinkButton.element)&&l.copyLinkButton.Uj(l.H1.element)}};
L7=function(l,y,k){y=k?y.lastElementChild:y.firstElementChild;let z=null;for(;y;){if(L9(y,"display")!=="none"&&y.getAttribute("aria-hidden")!=="true"){let r;y.tabIndex>=0?r=y:r=L7(l,y,k);r&&(z?k?r.tabIndex>z.tabIndex&&(z=r):r.tabIndex<z.tabIndex&&(z=r):z=r)}y=k?y.previousElementSibling:y.nextElementSibling}return z};
hIQ=function(l,y,k){if(l.api.X("web_player_nitrate_promo_tooltip")&&l.api.getPresentingPlayerType(!0)!==2){var z=l.api.getVideoData({playerType:1});z?.tooltipRenderer&&(z=z.tooltipRenderer,l.pZ||y&&(z.tooltipDisplayStrategy?.type==="TOOLTIP_DISPLAY_TYPE_DO_NOT_SHOW_IMMEDIATELY"||z.promoConfig?.promoId==="dtip-edu-player-iseecaptions"||z.promoConfig?.promoId==="dtip-edu-player-tc-m2")||(l.pZ=new wBQ(z,l.api),g.x(l,l.pZ),g.pi(l.api,l.pZ.element,9)),l.pZ?.J(z,k))}};
aET=function(){GNy||(window.addEventListener(vu?"touchstart":"click",()=>{for(let l=Bu.length;l<4;l++){const y=g.Gf("VIDEO");y.load();Bu.push(new g.Hu(y))}},{capture:!0,
passive:!0}),GNy=!0)};
RQ=function(l,y,k,z){var r=k.getVideoData();const Z=y.getVideoData();if(k.getPlayerState().isError())return{msg:"player-error"};var e=Z.N;if(y.YK()>z/1E3+1)return{msg:"in-the-past"};if(Z.isLivePlayback&&!isFinite(z))return{msg:"live-infinite"};z=y.fl();var A=null;z&&(A=z.isView()?z.mediaElement.J():z.J());if(A&&A.length>12&&g.BF(r))return{msg:"played-ranges"};if(!r.N)return null;if(!e)return{msg:"no-pvd-formats"};if(!r.N.Z()||!e.Z())return{msg:"non-dash"};z=e.videoInfos[0];A=r.N.videoInfos[0];l.C_&&
jn(Z)&&(z=y.Jr(),A=k.Jr());if(!z||!A)return{msg:"no-video-info"};if(l.S&&(z.Z()||A.Z()))return{msg:"av1"};y=l.V&&Z.yf()&&eL();if(A.containerType!==z.containerType)if(y)Z.Md("sgap",{ierr:"container"});else return{msg:"container"};if(l.J&&!y&&(A.Dr!==z.Dr||A.Dr===""||z.Dr===""))return{msg:"codec"};if(l.K&&A.video&&z.video&&Math.abs(A.video.width/A.video.height-z.video.width/z.video.height)>.01)return{msg:"ratio"};if(g.BF(Z)&&g.BF(r))return{msg:"content-protection"};e=e.C[0];r=r.N.C[0];k=e.audio;const Q=
r.audio;if(k.sampleRate!==Q.sampleRate&&!g.Mx)if(y)Z.Md("sgap",{ierr:"srate"});else return{msg:"sample-rate",ci:e.itag,cr:k.sampleRate,ni:r.itag,nr:Q.sampleRate};return(k.numChannels||2)!==(Q.numChannels||2)?{msg:"channel-count"}:l.A&&Z.yf()&&z.video.fps!==A.video.fps?{msg:"fps"}:null};
iJC=function(l,y,k){const z=l.getVideoData(),r=y.getVideoData();if(!z.O().supportsGaplessShorts())return{nq:"env"};if((!k.D||z.lE&&!z.isAd()||r.lE&&!r.isAd())&&(!k.C||z.lE&&!z.isAd()||r.lE)&&(!k.N||r.lE&&!r.isAd()||z.lE)&&(z.lE||r.lE))return{nq:"autoplay"};if(z.endSeconds>0)return{nq:"endcr"};if(!z.K)return{nq:"client"};if(!l.Bh())return{nq:"no-empty"};l=RQ(k,l,y,Infinity);return l!=null?{nq:l.msg}:null};
MXP=function(l){const y=new UL4;y.V=l.X("h5_gapless_support_types_diff");y.A=!1;y.C_=l.X("html5_gapless_use_format_info_fix");y.S=l.X("html5_gapless_disable_on_av1")&&!l.X("html5_gapless_enable_on_av1");y.J=l.X("html5_gapless_check_codec_diff_strictly");y.D=l.X("html5_gapless_on_ad_autoplay");y.K=l.X("html5_gapless_disable_diff_aspect_radio");y.C=l.X("html5_gapless_ad_autoplay_on_ad_to_video_only")&&!l.X("html5_disable_loop_range_for_shorts_ads");y.Z=l.X("html5_pseudogapless_shorts_seek_to_next_start");
y.N=l.X("html5_gapless_ad_autoplay_on_video_to_ad_only");return y};
Dn=function(l,y){y<=l.status.status||(l.status={status:y,error:null},y===5&&l.kN.resolve())};
XBT=function(l,y,k,z){l=l.isView()?l.mediaElement:l;return new g.lS(l,y,k,z)};
caC=async function(l){if(l.IR())return Promise.reject(Error(l.status.error||"disposed"));l.timeout.start();await l.kN;var y=l.Z.fl();if(y.isEnded())return l.FS("ended_in_finishTransition"),Promise.reject(Error(l.status.error||""));if(!l.J||!$X(l.J))return l.FS("next_mse_closed"),Promise.reject(Error(l.status.error||""));if(l.C.bX()!==l.J)return l.FS("next_mse_mismatch"),Promise.reject(Error(l.status.error||""));const {mM:k,Op:z,gR:r}=l.A();l.Z.Uo(!1,!0);const Z=XBT(y,k,r,!l.C.getVideoData().isAd());
l.C.setMediaElement(Z);const e=l.Z.Bo();e&&l.C.yr(e.zl,e.Tl);l.Ja&&(l.policy.Z||l.C.seekTo(l.C.getCurrentTime()+.001,{zf:!0,B9:3,gY:"gapless_pseudo"}),Z.play());y=y.Dp();y.cpn=l.Z.getVideoData().clientPlaybackNonce;y.st=`${k}`;y.et=`${r}`;l.C.Md("gapless",y);l.Z.Md("gaplessTo",{cpn:l.C.getVideoData().clientPlaybackNonce});y=l.Z.getPlayerType()===l.C.getPlayerType();l.Z.SK(z,!0,!1,y,l.C.getVideoData().clientPlaybackNonce);l.C.SK(l.C.getCurrentTime(),!0,!0,y,l.Z.getVideoData().clientPlaybackNonce);
l.C.Zn();g.o4(()=>{!l.C.getVideoData().A&&l.C.getPlayerState().isOrWillBePlaying()&&l.C.jS()});
Dn(l,6);l.dispose();return Promise.resolve()};
bJz=function(l){if(l.C.getVideoData().N){var y=l.E1.O().X("html5_gapless_suspend_next_loader")&&l.S===1;l.C.V_(l.J,y,l.S===1&&Kc(l.Z.getVideoData()));Dn(l,3);Ccy(l);var {o$:k,Ty:z}=y9(l);k.subscribe("updateend",l.K,l);z.subscribe("updateend",l.K,l);l.K(k);l.K(z)}};
Ccy=function(l){l.Z.unsubscribe("internalvideodatachange",l.N,l);l.C.unsubscribe("internalvideodatachange",l.N,l);l.E1.O().X("html5_gapless_use_format_info_fix")&&(l.Z.unsubscribe("internalvideoformatchange",l.N,l),l.C.unsubscribe("internalvideoformatchange",l.N,l));l.Z.unsubscribe("mediasourceattached",l.N,l);l.C.unsubscribe("statechange",l.Y,l)};
y9=function(l){return{o$:l.V.Z.Y3,Ty:l.V.C.Y3}};
xLC=async function(l){if(!l.IR()&&l.V&&l.Z){l.C_&&l.app.je().m4(!0,!1);var y=null;if(l.N)try{await caC(l.N)}catch(z){y=z}if(l.Z&&(uYQ.BA("vqsp",()=>{l.app.Sw(l.Z)}),l.Z)){var k=l.Z.fl();
l.app.O().X("html5_gapless_seek_on_negative_time")&&k&&k.getCurrentTime()<-.01&&l.Z.seekTo(0);uYQ.BA("vqpv",()=>{l.app.playVideo()});
y&&(l.Z?(y=y?y.message:"forced",l.C?.Md("gapfulfbk",{r:y}),l.Z.Xl(y)):l.C?.Md("gapsp",{}));y=l.V;kP(l);y&&y.resolve();Promise.resolve()}}};
zG=function(l){l.D&&l.S&&l.D.removeEventListener("timeupdate",l.S);l.S=null;l.D=null};
kP=function(l,y=!1){if(l.C){if(l.K){var k=l.C;l.app.K_.removeEventListener(g.uR("vqueued"),l.A);k.removeCueRange(l.K)}l.C=null;l.K=null}l.N&&(l.N.status.status!==6&&(k=l.N,k.status.status!==Infinity&&k.S!==1&&k.FS("Canceled")),l.N=null);l.V=null;l.Z&&!y&&l.Z!==l.app.b5()&&l.Z!==l.app.je()&&l.Z.dispose();l.Z&&y&&l.Z.yb();l.Z=null;l.C_=!1};
mL4=function(l,y,k=!0){const z=l.app.je(),r=z.getVideoData().isLivePlayback?Infinity:z.L2(!0)*1E3;y>r&&(y=r-200,l.C_=!0);k&&z.getCurrentTime()>=y/1E3?l.A():(l.C=z,k&&(k=y,y=l.C,l.app.K_.addEventListener(g.uR("vqueued"),l.A),k=isFinite(k)||k/1E3>y.getDuration()?k:0x8000000000000,l.K=new g.N1(k,0x8000000000000,{namespace:"vqueued"}),y.addCueRange(l.K)))};
Whe=function(l,y,k,z=0,r=0){l.Bh()||(zG(l),kP(l));l.V=new fA;l.Z=y;mL4(l,k,r===0);var Z=z/=1E3,e=y.getVideoData().Z;if(z&&e&&l.C){let A=z,Q=0;y.getVideoData().isLivePlayback&&(Z=Math.min(k/1E3,l.C.L2(!0)),Q=Math.max(0,Z-l.C.getCurrentTime()),A=Math.min(z,y.L2()+Q));Z=gVy(e,A)||z;Z!==z&&l.Z.Md("qvaln",{st:z,at:Z,rm:Q,ct:A})}y=Z;z=l.Z;z.getVideoData().S2=!0;z.getVideoData().K=!0;z.KD(!0);e={};l.C&&(e=l.C.o2(),Z=l.C.getVideoData().clientPlaybackNonce,e={crt:(e*1E3).toFixed(),cpn:Z});z.Md("queued",e);
y!==0&&z.seekTo(y+.01,{zf:!0,B9:3,gY:"videoqueuer_queued"});l.N=new qZC(l.J,l.app.je(),l.Z,k,l.app,r);k=l.N;k.status.status!==Infinity&&(Dn(k,1),k.Z.subscribe("internalvideodatachange",k.N,k),k.C.subscribe("internalvideodatachange",k.N,k),k.E1.O().X("html5_gapless_use_format_info_fix")&&(k.Z.subscribe("internalvideoformatchange",k.N,k),k.C.subscribe("internalvideoformatchange",k.N,k)),k.Z.subscribe("mediasourceattached",k.N,k),k.C.subscribe("statechange",k.Y,k),k.Z.subscribe("newelementrequired",
k.sj,k),k.N());return l.V};
VX4=function(l,y){if(l.app.O().sA().Z.G7(IE_)){var k=l.app.O().sA().Z.G7(TKT);if(!(k<=0)){zG(l);var z=l.app.je()?.fl();z&&l.Z&&(l.Z.getVideoData().LZ=!0,l.S=()=>{var r=z.getCurrentTime();r>=y+k/1E3&&(r=Date.now()-(r-y)*1E3,l.app.SV().tick("pbs",r),zG(l))},l.D=z,z.addEventListener("timeupdate",l.S))}}};
Pcq=function(l,y,k){if(l.Bh())return"qie";if(l.Z==null||l.Z.IR()||l.Z.getVideoData()==null)return"qpd";if(y.videoId!==l.Z.Qi())return"vinm";if((l.N?.C_()||-1)<=0)return"ivd";if(k!==1)return"upt";l=l.N?.HG();return l!=null?l:null};
wn4=function(l){return!(l.isMinimized()||l.isInline()||l.isBackground()||l.Bw()||l.Co()||l.J8()||l.yR())};
Z7=function(l){const y=(0,g.f)();l.data.forEach(k=>{k.expire<y&&rN(l,k,!0)});
l.data=g.oC(l.data,k=>!(k.expire<y))};
ex=function(l){l.Z.stop();var y=Infinity;for(const k of l.data)k.expire<y&&(y=k.expire);y&&isFinite(y)&&(y=Math.max(y-Date.now(),100),l.Z.start(y))};
o05=function(l){Z7(l);return l.data.map(y=>y.value)};
rN=function(l,y,k){k&&l.C&&l.C(y.value)};
Ja5=function(l){const y=l.Z?[l.Z]:[];for(const k of Object.values(l.V))k.dispose(),delete l.J[k.dZ()];l.V={};l.Z=null;l.K=null;l.A.clear();AH(l,[],y)};
AH=function(l,y,k){const z=[l.C];l.Z&&z.push(l.Z);l.api.publish("playbackChange",{active:z.filter(r=>r.getPlayerType()!==0).map(r=>({cpn:r.dZ()})),
started:y.filter(r=>r.getPlayerType()!==0).map(r=>({cpn:r.dZ()})),
ended:k.filter(r=>r.getPlayerType()!==0).map(r=>({cpn:r.dZ()}))})};
$P=function(l,y,k){const z=[y],r=l.Z?[l.Z]:[];l.V[y.dZ()]=y;l.J[y.dZ()]=y;l.Z=y;k&&(l.K=y);l.A.set("",y);AH(l,z,r)};
Kh4=function(l){const y=l.experiments,k=y.z7.bind(y);Q9=k("html5_use_async_stopVideo");YZg=k("html5_pause_for_async_stopVideo");tH=k("html5_not_reset_media_source")||k("html5_not_reset_media_source_non_drm_vod");k("html5_listen_for_audio_output_changed")&&(x4z=!0);QS=k("html5_not_reset_media_source")||k("html5_not_reset_media_source_non_drm_vod");pBQ=k("html5_not_reset_media_source")||k("html5_not_reset_media_source_non_drm_vod");OM=k("html5_retain_source_buffer_appends_for_debugging");Poy(k("web_watch_pip")||
k("web_shorts_pip"));rIg(k("log_foreground_not_focused_as_background"));ZiQ(k("web_player_pip_logging_fix"));k("html5_mediastream_applies_timestamp_offset")&&(c4=!0);l.yM()&&Ka4();Error.stackTraceLimit=50;const z=g.i_(y,"html5_idle_rate_limit_ms");z&&Object.defineProperty(window,"requestIdleCallback",{value:r=>window.setTimeout(r,z)});
OGQ(l.J);K6y(k("html5_use_ump_request_slicer"));k("html5_disable_streaming_xhr")&&(MC=!1);k("html5_byterate_constraints")&&(qN=!0);k("html5_use_non_active_broadcast_for_post_live")&&(dN=!0);k("html5_enable_encrypted_av1")&&(s1=!0);FRt(g.i_(l.experiments,"html5_sticky_duration_mos"))};
DL5=function(l){const y={};var k=l.experiments.mZ();const z=[];l=(Z,e,A)=>{z.push(FX(e(A),Q=>{y[Z]=Q}))};
var r=k.Z.G7(gKC);r&&l("MediaSource.EnableUsingMediaSourceBufferedRange",Xys,r===1);(r=k.Z.G7(EKC))&&l("HTTP3",cQy,r===1);(r=k.Z.G7(fEP))&&l("MediaSource.EnableUsingMediaSourceAttachmentMethods",Cx_,r===1);(r=k.Z.G7(jlC))&&l("QUIC",bVt,r===1);(r=k.Z.G7(SZT))&&l("Media.PlayerConfiguration.DecodeToTexturePreferred",xO5,r===1);(r=k.Z.G7(nKt))&&l("Media.AudioWriteDurationLocal",ug_,Number(r));(r=k.Z.G7(Fht))&&l("Media.AppendFirstSegmentSynchronously",WaT,Number(r)===1);(r=k.Z.G7(oKt))&&l("Media.ExperimentalMaxPendingBytesPerParse",
JQg,Number(r));(r=k.Z.G7(NKQ))&&l("Media.EnableFlushDuringSeek",VdC,Number(r)===1);(r=k.Z.G7(sl4))&&l("DecoderBuffer.EnableInPlaceReuseAllocatorBase",PxP,Number(r)===1);(r=k.Z.G7(LhC))&&l("Media.EnableResetAudioDecoder",TFq,Number(r)===1);(r=k.Z.G7(vK5))&&l("Media.IncrementalParseLookAhead",IP4,Number(r)===1);(r=k.Z.G7(BKC))&&l("Media.MaxSamplesPerWrite",YLz,Number(r));(r=k.Z.G7(HJe))&&l("Media.VideoDecoderPollIntervalMs",mOC,r);(k=k.Z.G7(RI_))&&l("Media.VideoInitialMaxFramesInDecoder",qLT,k);return FX(wkC(z),
()=>y)};
AJ=function(l,y=!1,k=1048576){let z=wN(l);z=1/((l.K.B1()||0)*l.policy.D+1/z);let r=l.HG.B1();r=r>0?r:1;var Z=Math.max(z,r);l.policy.V>0&&r<z&&(Z=Math.min(l.policy.V,1),Z=(1-Z)*z+Z*r);if(!y)return Z;y=1E-9+Q1(l);k=Z*Math.min(1,k/(Z*y));l.policy.C||(l=((l.D.percentile(.98)||0)-1)/2,l=Math.max(0,Math.min(1,l)),k*=1-.5*l);return k};
Q1=function(l){l=l.A.B1()+l.Ja.B1()||0;l=isNaN(l)?.5:l;return l=Math.min(l,5)};
hH=function(l){const y={delay:Q1(l),stall:l.K.B1()||0,byterate:wN(l),init:l.RR},k=l.N[0];k.stamp=Math.round(l.S/36E5)*36E5;k.net=Math.ceil(l.sj);k.max=l.interruptions[0]||0;y.interruptions=l.N;return y};
l0y=function(l){l.J||(l.J=(0,g.f)());l.policy.A&&(l.S=(0,g.f)())};
S54=function(l,y){if(l.J){const k=y-l.J;if(k<6E4){if(k>1E3){const z=l.interruptions;z.push(Math.ceil(k));z.sort((r,Z)=>Z-r);
z.length>16&&z.pop()}l.sj+=k}}l.J=y};
GG=function(l,y,k){isNaN(k)||(l.b0+=k);isNaN(y)||(l.PG+=y)};
uo=function(l,y,k,z=y){l.V.Tk(z,k/y);l.S=(0,g.f)()};
a$=function(l,y,k){y=Math.max(y,l.C.Z);l.K.Tk(1,k/y)};
iS=function(l,y,k,z,r,Z=!1){l.HG.Tk(y,k/y);l.S=(0,g.f)();r||l.D.Tk(1,y-z);Z||(l.J=0);l.Y>-1&&(0,g.f)()-l.Y>3E4&&(o6T(hH(l)),l.Y=(0,g.f)(),l.C_=!0)};
ob=function(l){return(0,g.f)()-l.S>=4E3};
wN=function(l){l=l.V.B1();return l>0?l:1};
y8T=function(l,y,k=!1){y.Ai=l.b0;y.FF=l.PG;y.bandwidthEstimate=AJ(l);if(k){k=(l.A.B1()*1E3).toFixed();var z=(l.Ja.B1()*1E3).toFixed(),r=Q1(l).toFixed(2),Z=((l.K.B1()||0)*1E9).toFixed(2),e=l.V.B1().toFixed(0),A=l.HG.B1().toFixed(0),Q=l.D.percentile(.5).toFixed(2),t=l.D.percentile(.92).toFixed(2),O=l.D.percentile(.96).toFixed(2),d=l.D.percentile(.98).toFixed(2);l.Z?l.Z.reset():l.Z=new UM;l.Z.add(l.sj);l.Z.add(l.interruptions.length);let U=0;for(var w=l.interruptions.length-1;w>=0;w--){var h=l.interruptions[w];
l.Z.add(h-U);U=h}U=0;for(w=l.N.length-1;w>=0;w--){h=l.N[w];const u=h.stamp/36E5;l.Z.add(u-U);U=u;l.Z.add(h.net/1E3);l.Z.add(h.max)}l=l.Z.jb();y.Z={ttr:k,ttm:z,d:r,st:Z,bw:e,abw:A,v50:Q,v92:t,v96:O,v98:d,"int":l}}};
zbq=function(l,y,k){const z=new kU5(k);l&&(z.N=!0,z.J=.1);k.z7("html5_media_time_weight")&&(z.N=!1);y&&(z.Z=y/8);z.C=aE()>=480;return z};
r8C=function(l,y,k=!0){l.Z=0;l.startTimeSecs=y;l.N=k;l.C=!0};
ZPz=function(l,y,k){l=l.C;var z=g.cO(l,{Jj:y},(r,Z)=>r.Jj-Z.Jj);
z=z<0?(z+2)*-1:z;if(z>=0)for(let r=z;r<=z+1&&r<l.length;r++){const Z=l[r];if(y>=Z.Jj-k&&y<=Z.Ha+k)return Z}};
ebq=function(l,y,k){const z=l.Z.get(y);z?(z.push(k),g.b2(z,(r,Z)=>r.Jj-Z.Jj)):l.Z.set(y,[k])};
A8s=function(l,y){g.KR(l.C,y,(k,z)=>k.Jj===z.Jj?k.durationMs-z.durationMs:k.Jj-z.Jj);
l.N.set(y.cpn,y);y.MJ&&ebq(l,y.MJ,y)};
$7t=function(l,y){const k=[];for(const z of l.C)y(z)||k.push(z);if(l.cG.X("html5_sstm_fixes"))for(const z of l.C)y(z)&&l.N.delete(z.cpn);l.C=k};
QXP=function(l,y){y=g.cO(l.C,{Ha:y},(k,z)=>k.Ha-z.Ha);
return y>=0?l.C[y]:null};
tp5=function(l,y){const k=l.C.indexOf(y);k>=0&&l.C.splice(k,1);l.N.delete(y.cpn)};
De5=function(l,y){if(l.lX||y.identifier&&l.S2.has(y.identifier))l.vF({startnoad:y.identifier}),M_(l);else if(Be(l.A,k=>k.identifier===y.identifier))l.vF({timedoutcp:1}),l.S.start(0);
else if(Be(l.rb,k=>k.identifier===y.identifier))l.vF({fetchedcp:1}),M_(l);
else if(l.S.isActive())l.vF({racingcp:`${l.J?.identifier}_${y.identifier}`});else{l.OA=(new Date).getTime()/1E3;l.vF({adf:1});let k=5E3;k&&y.event==="predictStart"&&(k-=y.Z);l.gb=Math.max(k,15E3);l.K=!1;l.S.start(l.gb);l.J=y;l.C_.clearAll();l.Xr=[]}};
g.WA5=function(l,y,k,z,r,Z,e){var A=r===3,Q=OP4(l,y,k,r,z,e);if(!Q)return Xx(l,k,A),Q=g.cM(l,k)?"undec":"ncp",l.vF({gvprp:Q,mt:y,seg:k,tt:r,itag:z,ce:e}),null;A||l.fA.set(k,Q);e=Q.MJ;r=l.iP(k-1,r,Z)?.m5||"";r===""&&l.vF({eds:1});Z=d7Q(l,Q.ssdaiAdsConfig);A=l.playback.getVideoData();A=A.zz[A.C?.containerType||0];Q=Q.KK&&k>=Q.KK?Q.KK:void 0;Q={GB:e?C_(l,e):[],adsConfig:Z,m5:r,Ln:Q,Mv:cZ(A.split(";")[0]),s5:A.split(";")[1]||""};r={Ov:Q};l.mK&&l.vF({gvprpro:"v",sq:k,mt:y.toFixed(3),itag:z,acpns:Q.GB?.join("_")||
"none",abid:e});return r};
H4=function(l,y,k,z,r){z=z||{reason:"disablessdai"};if(y&&k){if(!bS(l,y,k))return!1;z.sq=k}if(l.lX)return!1;l.lX=!0;l.ES>0&&(l.ES=0,l.ML="",l.iQ(l.playback.dZ(),0),l.api.publish("serverstitchedvideochange"));l.playback.mX(z,r);return!0};
wAt=function(l,y,k){const z=l.kz||l.app.je().getPlayerState();uS(l,!0);l.playback.seekTo(y,k);l=l.app.je();y=l.getPlayerState();z.isOrWillBePlaying()&&!y.isOrWillBePlaying()?l.playVideo():z.isPaused()&&!y.isPaused()&&l.pauseVideo()};
xP=function(l){l.mK&&l.vF({adf:`0_${(new Date).getTime()/1E3-l.OA}_isTimeout_${l.K}`})};
hbz=function(l,y,k){if(l.A.length)for(const z of l.A){const r=z.startSecs*1E3,Z=z.yK*1E3+r;if(y>r&&y<Z||k>r&&k<Z)return Be(l.hj,e=>e.identifier===z.identifier)||(l.vF({adskip:y}),l.hj.push(z)),z}};
mU=function(l,y,k){l.playback.OX(y,k)};
M_=function(l){l.K=!1;l.S.isActive()&&xP(l);l.S.stop();l.wQ(!1)};
a0T=function(l,y){return y?l.cG.sA().Z.G7(GUg)&&y?.tileContext?`${y?.Yq};${y?.tileContext}`:y?.Yq:""};
U7P=function(l,y,k){(l.app.yu().V[y.clientPlaybackNonce]||null)?.dispose();y=new iPP(y,l.playback,k/1E3);l.b0.set(y.dZ(),y);l=l.app.yu();l.V[y.dZ()]=y;l.J[y.dZ()]=y};
q_=function(l,y,k){return{ssvc:y,cpn:k?.cpn||"",vid:k?.videoData.videoId||"",ct:(l.playback.getCurrentTime()||0).toFixed(3),cmt:(l.playback.YK()||0).toFixed(3)}};
MpC=function(l,y,k){return new g.N1(l,y,{id:k,namespace:"serverstitchedcuerange",priority:9})};
WM=function(l,y,k,z){l.cG.X("html5_ssdai_log_ssevt_in_loader_timers")&&(z=l.D?0:Math.round((z-k)*1E3),l.playback.Md("ssevt",{tag:"sstme",ad:y!==l.playback.dZ(),cpn:y,st:(k-l.playback.rD()).toFixed(3),late:z}))};
TG=function(l,y){l.N||l.D||I$(l,l.ML);const k=y.td,z=y.Ga;if(z.cpn===l.ML)l.vF({igtranssame:1,enter:z.cpn,exit:k.cpn});else{var r=l.D,Z=!!l.N;l.N="";var e=y.du,A=k.playerType===2?k.Jj/1E3+k.videoData.g4:l.dM().videoData.g4;l.api.X("html5_ssdai_enable_media_end_cue_range")&&(Z||r||k.playerType!==2?(r||Z)&&l.vF({mecr:0,seek:r,skip:Z}):l.api.OD(k.cpn));if(k.playerType===2&&z.playerType===2)Z?l.vF({igtransskip:1,enter:z.cpn,exit:k.cpn,seek:r,skip:l.N}):XA_(l,k,z,A,e,r,Z);else{l.ML=z.cpn;l.iQ(z.cpn,z.startTimeSecs||
e);y=y.oM;if(k.playerType===1&&z.playerType===2){l.sj=0;c8P(l,z);var Q=q_(l,"c2a",z);l.vF(Q);l.ES++}else if(k.playerType===2&&z.playerType===1){l.api.publish("serverstitchedvideochange");Q=q_(l,"a2c");l.vF(Q);l.ES=0;l.sj=A;Q=k.cpn;var t=l.sj;if(Q!==l.playback.dZ()){const O=l.b0.get(Q);O?O.Z=t:l.vF({nop_e:Q})}l.zU(k.MJ)}Q=CC_(l);l.playback.g5(k,z,A,e,r,Z,y,Q)}bPP(l)}};
c8P=function(l,y){var k=l.app;tI(k.hs())&&k.D3.N[2]&&g.DP(l.logger,360717806,"SSTM lingering playback");l.api.Hv();l.api.publish("serverstitchedvideochange",y.cpn,y.z$)};
V9=function(l,y,k=0){return{DM:ZPz(l.Z,y*1E3,k*1E3),gV:y}};
I$=function(l,y){var k=y||l.ML;const z=l.Z.u5(k);z?(y=z.videoData,k=z.z$||(l.C.get(k)?.start??0)/1E3,l=l.playback.getCurrentTime()-k,y.g4=l>0?l:0):l.dM().videoData.g4=l.playback.getCurrentTime()};
uG5=function(l,y,k){l.playback.Ed();l.playback.seekTo(y,k);l.playback.playVideo()};
uS=function(l,y){l.MW=NaN;l.hv=null;l.WG.stop();l.HG&&y&&l.HG.SX();l.kz=null;l.HG=null};
JH=function(l){x7C(l);for(var y of l.C.values())y.start>=-1&&y.end<=Infinity&&(l.playback.removeCueRange(y),l.C.delete(y.getId()),l.vF({rmAdCR:1}));const {DM:k,gV:z}=V9(l,-.001);k&&(y=z*1E3-k.Jj,PM(l,k,y,k.Jj+y),y=l.C.get(k.cpn))&&(y.start=k.Jj,y.end=k.Jj+k.durationMs);({DM:y}=V9(l,Infinity));y&&l.Al(`Invalid_clearEndTimeMs_${Infinity}_that_falls_during_${`playback_cpn_${y.cpn}_video_id_${y.videoData?.videoId}_durationMs_${y.durationMs}_enterTimeMs_${y.Jj}_parentReturnTimeMs_${y.Ha}`}._`+"Child_playbacks_can_only_have_duration_updated_not_their_start.")};
m7C=function(l){l.C_.clearAll();l.C.clear();l.Z.clear();l.fA.clear();l.Xr=[];l.J=null;l.S2.clear();l.u0.clear();l.A=[];l.rb=[];l.hj=[];l.BF=[];l.jN.clear();l.vn.clear();l.q_.clear();l.Oj.clear();l.K=!1;l.sj=0;l.D=!1;l.PG=!1;l.ES=0;l.OA=0;l.SN=!1;l.lX=!1;l.N="";Ja5(l.app.yu());$P(l.app.yu(),l.playback,!1);l.b0.clear();l.S.isActive()&&M_(l)};
x7C=function(l){$7t(l.Z,y=>y.Jj>=-1&&y.Ha<=Infinity)};
PM=function(l,y,k,z){y.durationMs=k;y.Ha=z;(z=l.b0.get(y.cpn))?z.BZ(k/1E3):l.vF({nop_d:y.cpn})};
g.cM=function(l,y){for(const k of l.Xr)if(y>=k.start&&y<=k.end)return!0;return!1};
bS=function(l,y,k,z,r){let Z=l.fA.get(k);if(!Z){if(Z=YP(l,y))return Z;y=l.iP(k-1,z??2);if(r)return l.vF({misscue:r,sq:k,type:z,prevsstate:y?.vu,prevrecord:l.fA.has(k-1)}),l.fA.get(k-1);if(y?.vu===2)return l.vF({adnf:1,sq:k,type:z,prevrecord:l.fA.has(k-1)}),l.fA.get(k-1)}return Z};
OP4=function(l,y,k,z,r,Z){if(!l.lX)if(g.cM(l,k))l.vF({gdu:"undec",seg:k,itag:r});else if(y=bS(l,y,k,z,Z),!l.playback.getVideoData().j2()||!y?.EP)return y};
YP=function(l,y){y+=l.rD();if(l.playback.getVideoData().j2()){a:{var k=l.Z;l=y*1E3;for(z of k.C)if(k=z.z$?z.z$*1E3:z.Jj,l>=z.Jj-1E3&&l<=k+z.durationMs+1E3)break a;var z=void 0}z={DM:z,gV:y}}else z=V9(l,y),z?.DM||(z=V9(l,y,1));return z?.DM};
Xx=function(l,y,k=!1){if(!k){for(const z of l.Xr){if(y>=z.start&&y<=z.end)return;if(y===z.end+1){z.end+=1;return}}l.Xr.push(new qDP(y))}};
d7Q=function(l,y=""){const k=GC(y)||void 0;y&&k||l.vF({adcfg:y?.length,dcfg:k?.length});return k};
C_=function(l,y){const k=[];l=l.Z.Z.get(y);if(!l)return[];for(const z of l)z.cpn&&k.push(z.cpn);return k};
WG5=function(l,y,k){let z=!1;if(k=l.Z.Z.get(k))for(const r of k)r.durationMs!==0&&r.Ha!==r.Jj&&(k=r.cpn,y===k&&(z=!0),z&&!l.vn.has(k)&&(l.vF({decoratedAd:k}),l.vn.add(k)))};
I0s=function(l,y,k){let z=0;l=l.Z.Z.get(k);if(!l)return-1;for(const r of l){if(r.cpn===y)return z;z++}return-1};
T6g=function(l,y){let k=0;l=l.Z.Z.get(y);if(!l)return 0;for(const z of l)z.durationMs!==0&&z.Ha!==z.Jj&&k++;return k};
VpC=function(l){for(const y of l.C.values())l.playback.removeCueRange(y);l.C.clear();l.C_.clearAll()};
CC_=function(l){if(l.xz||l.PF){var y=Array.from(l.app.yu().A.values()),k=[],z=[],r=[],Z=[],e=[],A=[];for(var Q of y)if(y=l.Z.u5(Q.dZ()))y.J6&&k.push(y.J6),y.F$&&z.push(y.F$),y.jR&&z.push(y.jR),Z.push(y.cpn),e.push(y.videoData.videoId||""),A.push(y.videoData.adFormat||y.videoData.T7),y.serializedQoeContextData!=null&&r.push(y.serializedQoeContextData);y=Q=void 0;l.xz&&(y={J6:k,mW:z});l.PF&&(Q={GB:Z,YX:e,adFormats:A,serializedQoeContextData:r});return{J5:y,Rz:Q}}};
XA_=function(l,y,k,z,r,Z,e){if(y&&k){l.ML=k.cpn;l.iQ(k.cpn,k.startTimeSecs||r);c8P(l,k);var A=q_(l,"a2a",k);l.vF(A);l.ES++;A=CC_(l);l.playback.g5(y,k,z||0,r||0,!!Z,!!e,void 0,A)}else l.vF({misspbkonadtrans:1,enter:k?.cpn||"",exit:y?.cpn||"",seek:Z,skip:e})};
bPP=function(l){l.Oj.add(l.N);l.N="";l.D=!1};
PC4=function(l,y,k){var z;if(z=l.playback.getVideoData().j2())z=(z=l.Z.u5(y))&&z.MJ?(l=l.Z.Z.get(z?.MJ))&&l.slice(-1)[0].cpn===y:!1;return z&&k===2?1E3:0};
J8z=function(l,y,k,z){y={td:y,Ga:k,du:l.playback.getCurrentTime(),oM:z};TG(l,y)};
pAC=function(l,y,k={}){const z=l.S||l.app.je().getPlayerState();p_(l,!0);y=isFinite(y)?y:l.Z.mf();const {DM:r,gV:Z}=K_(l,y);y=r&&!gN(l,r)||!r&&l.Z!==l.app.je();var e=Z*1E3;e=l.N&&l.N.start<=e&&e<=l.N.end;!y&&e||EM(l);r?YDe(l,r,Z,k,z):f_(l,Z,k,z,"_execute")};
jx=function(l,y,k,z){l.Z.Md("timelineerror",{e:y,cpn:k?k:void 0,videoId:z?z:void 0})};
Sx=function(l,y){return new g.N1(Math.max(0,l-5E3),y?0x8000000000000:l-1,{namespace:"childplayback",priority:9})};
KGC=function(l,y,k){const z=y.UT;y.UT=k;gN(l,y)&&(k=l.app.je(),z.cV===l.N&&EM(l),k.removeCueRange(z.cV),k.addCueRange(y.UT.cV))};
YDe=function(l,y,k,z,r){const Z=gN(l,y);if(!Z){y.playerVars.prefer_gapless=!0;var e=new g.YK(l.cG,y.playerVars);e.Rj=y.Rj;l.api.CX(e,y.playerType)}e=l.app.je();Z||e.addCueRange(y.UT.cV);e.seekTo(k,{gY:"application_timelinemanager",...z});g1g(l,r)};
f0_=function(l,y,k,z,r,Z){var e=y.cpn,A=y.docid||y.video_id||y.videoId||y.id,Q=l.Z;Z=Z===void 0?r+z:Z;if(r>Z)return jx(l,`enterAfterReturn enterTimeMs=${r} is greater than parentReturnTimeMs=${Z.toFixed(3)}`,e,A),"";var t=Q.dY()*1E3;if(r<t)return jx(l,`enterBeforeMinSeekable enterTimeMs=${r} is less than parentMinSeekableTimeMs=${t}`,e,A),"";t=Q.getDuration()*1E3;if(Z>t)return Q=`returnAfterDuration parentReturnTimeMs=${Z.toFixed(3)} is greater than parentDurationMs=${t}. And timestampOffset in seconds is ${Q.w4()}`,
jx(l,Q,e,A),"";t=null;for(const d of l.C){if(r>=d.Jj&&r<d.Ha)return jx(l,"overlappingEnter",e,A),"";if(Z<=d.Ha&&Z>d.Jj)return jx(l,"overlappingReturn",e,A),"";if(Z===d.Jj)return jx(l,"outOfOrder",e,A),"";r===d.Ha&&(t=d)}e=`cs_childplayback_${E1z++}`;A={cV:Sx(z,!0),S8:Infinity,target:null};const O={Rj:e,playerVars:y,playerType:k,durationMs:z,Jj:r,Ha:Z,UT:A};l.C=l.C.concat(O).sort((d,w)=>d.Jj-w.Jj);
t?KGC(l,t,{cV:Sx(t.durationMs,!0),S8:t.UT.S8,target:O}):(y={cV:Sx(r,!1),S8:r,target:O},l.J.set(y.cV,y),Q.addCueRange(y.cV));y=!0;if(l.Z===l.app.je()&&(Q=Q.getCurrentTime()*1E3,Q>=O.Jj&&Q<O.Ha)){const d=l.app.je().getPlayerState(),w=Q-O.Jj;Pd(()=>{YDe(l,O,w/1E3,{},d)});
y=!1}y&&(l.Y.unshift(O),l.b0.Kl(0));return e};
jXC=function(l,y,k,z){l.N=z;z=y.Rj;const r=y.playerVars,Z=y.playerType;l.K=y;r&&l.api.enqueueVideoByPlayerVars(r,Z,k,z)};
SDP=function(l,y,k,z){l.N=z;l.api.Fo(l.Z,k,y)};
EM=function(l){l.K=null;l.N=null;l.api.Bh()||l.api.clearQueue()};
gN=function(l,y){l=l.app.je();return!!l&&l.getVideoData().Rj===y.Rj};
n1e=function(l,y){gN(l,y)||jx(l,"childPlaybackIsNotPresenting");return y.Ha===y.Jj+y.durationMs?y.Jj+l.app.je().getCurrentTime()*1E3:y.Ha};
K_=function(l,y){let k=0;for(const z of l.C){l=z.Jj/1E3+k;const r=l+z.durationMs/1E3;if(l>y)break;if(r>y)return{DM:z,gV:y-l};k=r-z.Ha/1E3}return{DM:null,gV:y-k}};
p_=function(l,y){l.C_=NaN;l.D=null;l.A.stop();l.V&&y&&l.V.SX();l.S=null;l.V=null};
f_=function(l,y,k,z,r){const Z=l.Z;Z!==l.app.je()&&l.app.hU();l.cG.X("html5_sabr_csdai_seek_log")||(r="");Z.seekTo(y,{gY:"application_timelinemanager"+(r??""),...k});g1g(l,z)};
g1g=function(l,y){l=l.app.je();const k=l.getPlayerState();y.isOrWillBePlaying()&&!k.isOrWillBePlaying()?l.playVideo():y.isPaused()&&!k.isPaused()&&l.pauseVideo()};
FGQ=function(l){var y=l.C.find(k=>gN(l,k));
if(y){const k=l.app.je();EM(l);const z=new g.U5(8);y=n1e(l,y)/1E3;f_(l,y,{},z,"_force");k.Md("forceParentTransition",{childPlayback:1});l.Z.Md("forceParentTransition",{parentPlayback:1})}};
n_=function(l,y=-1,k=Infinity){for(const [A,Q]of l.J){var z=A,r=Q;r.S8>=y&&r.target&&r.target.Ha<=k&&(l.Z.removeCueRange(z),l.J.delete(z))}z=[];for(const A of l.C)A.Jj>=y&&A.Ha<=k?(r=l,r.K===A&&EM(r),gN(r,A)&&r.app.hU()):z.push(A);l.C=z;const {DM:Z,gV:e}=K_(l,y/1E3);Z&&(y=e*1E3,o1z(l,Z,y,Z.Ha===Z.Jj+Z.durationMs?Z.Jj+y:Z.Ha));({DM:y}=K_(l,k/1E3));y&&jx(l,`Invalid clearEndTimeMs=${k} that falls during ${`playback={timelinePlaybackId=${y.Rj} video_id=${y.playerVars.video_id} durationMs=${y.durationMs} enterTimeMs=${y.Jj} parentReturnTimeMs=${y.Ha}}`}.`+
"Child playbacks can only have duration updated not their start.")};
o1z=function(l,y,k,z){y.durationMs=k;y.Ha=z;z={cV:Sx(k,!0),S8:k,target:null};KGC(l,y,z);gN(l,y)&&l.app.je().getCurrentTime()*1E3>k&&(y=n1e(l,y)/1E3,k=l.app.je().getPlayerState(),f_(l,y,{},k,"_update"))};
sXT=function(l){l&&l!=="web"&&N6T.includes(l)};
G3C=function(l,y){return y?!!l.Z.get(y):!1};
LGg=function(l,y){l.dataset.version=y};
v1P=function(l){l.nK=!l.nK;l.GY=!0;l.element.classList.toggle("ytp-retro-player",l.nK);l.resize();l.GY=!1;g.G3(l.app.K_,"onRetroModeChanged",l.nK)};
B6y=function(l){const y=l.app.K_,k=()=>{l.Xn=new g.f9(0,0,0,0);l.kH=new g.f9(0,0,0,0)},z=e=>{e.getVideoData()&&l.updateVideoData(e.getVideoData())},r=(e,A)=>{l.HZ(e,A)},Z=e=>{l.cn&&Fx(l);
o$(l)!==l.lw&&l.resize();l.app.O().X("web_enable_smart_zoom")&&l.ix&&(e.state.isPaused()?l.ix.pause():e.tj(8)&&l.ix.playState==="paused"&&l.ix.play())};
y.addEventListener("initializingmode",k);y.addEventListener("videoplayerreset",z);y.addEventListener("videodatachange",r);y.addEventListener("presentingplayerstatechange",Z);l.addOnDisposeCallback(()=>{y.removeEventListener("initializingmode",k);y.removeEventListener("videoplayerreset",z);y.removeEventListener("videodatachange",r);y.removeEventListener("presentingplayerstatechange",Z)})};
D7t=function(l){var y=l.uI();let k=1;var z=!1;const r=HP5(l,y,l.getVideoAspectRatio()),Z=l.app.O(),e=Z.X("enable_desktop_player_underlay"),A=boy();var Q=g.i_(Z.experiments,"player_underlay_min_player_width");Q=e&&l.uc&&l.getPlayerSize().width>Q;if(o$(l)){var t=RbQ(l);var O=isNaN(t)||g.eG||e$&&g.Km||Q;Zu&&!g.KK(601)?t=r.aspectRatio:O=O||Z.controlsType==="3";O?Q?(O=Z.X("place_shrunken_video_on_left_of_player")?16:l.getPlayerSize().width-y.width-16,t=Math.max((l.getPlayerSize().height-y.height)/2,0),
O=new g.f9(O,t,y.width,y.height),l.cn.style.setProperty("border-radius","12px")):O=new g.f9(0,0,y.width,y.height):(k=r.aspectRatio/t,O=new g.f9((y.width-r.width/k)/2,(y.height-r.height)/2,r.width/k,r.height),k===1&&g.Km&&(t=O.width-y.height*t,t>0&&(O.width+=t,O.height+=t)));g.I(l.element,"ytp-fit-cover-video",Math.max(O.width-r.width,O.height-r.height)<1);if(A||l.t0)l.cn.style.display="";l.lw=!0}else{O=-y.height;Zu?O*=window.devicePixelRatio:g.pA&&(O-=window.screen.height);O=new g.f9(0,O,y.width,
y.height);if(A||l.t0)l.cn.style.display="none";l.lw=!1}jU(l.Xn,O)||(l.Xn=O,g.aq(Z)?(l.cn.style.setProperty("width",O.width+"px","important"),l.cn.style.setProperty("height",O.height+"px","important")):g.r7(l.cn,O.getSize()),z=new g.jD(O.left,O.top),g.Hf(l.cn,Math.round(z.x),Math.round(z.y)),z=!0);y=new g.f9((y.width-r.width)/2,(y.height-r.height)/2,r.width,r.height);jU(l.kH,y)||(l.kH=y,z=!0);g.n9(l.cn,"transform",k===1?"":`scaleX(${k})`);e&&Q!==l.u2&&(Q&&(l.cn.addEventListener(N_,l.Ci),l.cn.addEventListener("transitioncancel",
l.Ci),l.cn.classList.add(g.Cb.VIDEO_CONTAINER_TRANSITIONING)),l.u2=Q,l.app.K_.publish("playerUnderlayVisibilityChange",l.u2?"transitioning":"hidden"));return z};
Fx=function(l){var y=l.app.O().controlsType==="3"&&!l.AK&&o$(l)&&!l.app.SQ||!1;l.cn.controls=y;l.cn.tabIndex=y?0:-1;l.app.O().V&&(l.cn.ariaHidden="true");y?l.cn.removeEventListener("focus",l.AD):l.cn.addEventListener("focus",l.AD)};
RbQ=function(l){var y=l.app.je();if(y=y?y.getVideoData():null){if(g.kk(y)||g.z3(y)||g.ru(y))return 16/9;if(KN(y)&&y.N.Z())return l=y.N.videoInfos[0].video,sM(l.width,l.height)}return(l=l.cn)?sM(l.videoWidth,l.videoHeight):16/9};
sM=function(l,y){return Math.abs(L_*y-l)<1||Math.abs(L_/l-y)<1?L_:l/y};
HP5=function(l,y,k,z){let r=k;const Z=sM(y.width,y.height);l.gs?r=k<Z?Infinity:0:isNaN(l.Ge)?isNaN(l.pv)||(r=l.pv):r=l.Ge;isFinite(r)||(r=Math.max(k,Z));l=r>Z?{width:y.width,height:y.width/r,aspectRatio:r}:r<Z?{width:y.height*r,height:y.height,aspectRatio:r}:{width:y.width,height:y.height,aspectRatio:Z};z||isNaN(k)||(k>r?l.width=l.height*k:k<r&&(l.height=l.width/k),l.aspectRatio=k);return l};
o$=function(l){if(l.app.getAppState()===1)return!1;if(l.app.getAppState()===6)return!0;var y=l.app.je();if(!y||y.pJ())return!1;l=l.app.K_.getPlayerStateObject();y=!l.Z(2)||y&&y.getVideoData().K;const k=l.Z(1024);return l&&y&&!k&&!l.isCued()};
lnC=function(l){if(l.csn!==g.MM())if(l.csn==="UNDEFINED_CSN")l.csn=g.MM();else{var y=g.MM(),k=g.Ur();if(y&&k){l.csn=y;for(const z of l.elements){const r=z.visualElement;r&&r.isClientVe()&&y&&k&&(g.EJ("combine_ve_grafts")?Z5(zk(),r,k):g.OJ(g.nz)(void 0,y,k,r))}}if(y)for(const z of l.Z)(l=z.visualElement)&&l.isClientVe()&&g.HH(y,l)}};
yxy=async function(l){if(!l.gq){l.gq=l.b0(l.Y);try{const k=Promise.withResolvers();var y=setTimeout(()=>{k.reject("timeout")},1E4);
l.gq.onerror=()=>{k.reject("error")};
l.gq.onmessage=()=>{k.resolve();clearTimeout(y)};
await k.promise;l.gq.onmessage=null;l.gq.onerror=null;l.gq.addEventListener("message",z=>void l.receive(z));
l.Md("workerCtor",{})}catch(k){clearTimeout(y),l.gq?.terminate(),l.gq.onmessage=null,l.gq.onerror=null,l.gq=void 0,l.Md("workerErr",{e:`${k}`})}}};
kDt=function(l,y){if(l.Z&&l.Z.byteLength===y)return l.Z;const k=new Uint8Array(y);let z=0;for(;y>0;){const r=new Uint8Array(Math.min(y,65536));crypto.getRandomValues(r);k.set(r,z);y-=r.length;z+=r.length}return l.Z=k};
zR4=function(l,y){l.gq&&(y=kDt(l,y),y.length>0&&y[0]++,y={[0]:0,[1]:performance.now(),[2]:y},l.request(y))};
rx4=async function(l){l.C!==void 0||l.N||(l.N=!0,await yxy(l),l.N=!1,l.gq&&(zR4(l,l.D),l.C=setInterval(()=>{l.sendRequest()},l.intervalMs)))};
Z7s=function(l,y){const k=l.D3.xe;return k?xX(k.getPlayerState()):l.getVideoData().enableServerStitchedDai&&y===2?(l.cG.sA().Z.G7(vM)?l.D3.Z?.isAd()??!1:l.l$?.T7(l.getCurrentTime()))?l.Dx:-1:y!==2||l.CE()?l.Dx:l.DN};
ba=function(l){return l.SQ&&l.getVideoData().mutedAutoplay};
BM=function(l,y,k){y&&(y=l.u5({playerType:k}),y===l.b5()&&(y.getVideoData().jN=!0))};
HM=function(l,y,k=!0,z,r,Z){const e=l.u5({playerType:r});var A=e.getVideoData();e.getPlayerType()===2&&!l.CE(e)&&!A.isSeekable||g.la(A)||((A=l.D3.xe)?A.seekTo(y,{Ef:!k,G3:z,gY:"application",seekSource:Z}):(e&&e===l.b5()&&l.HF&&!eRe(l,y)&&l.setLoopRange(null),l.seekTo(y,k,z,r,Z,"_request")))};
lf=function(l,y){y=l.u5({playerType:y});y=R$(l,y);return D7(l,y.L2(),y)};
zF=function(l,y,k){l.cG.HG&&(l.Gk=y,y.muted||ys(l,!1),k&&l.cG.storeUserVolume&&!l.cG.SN&&(k={volume:Math.floor(y.volume),muted:y.muted},k.unstorable||(g.eY("yt-player-volume",k),g.eY("yt-player-volume",k,2592E3))),k8(l),k=g.Mx&&l.mediaElement&&!l.mediaElement.VR(),l.cG.SN&&!k||g.X5(l.K_,"onVolumeChange",{muted:y.muted,volume:y.volume,unstorable:!l.cG.storeUserVolume}))};
ry=function(l,y,k,z,r,Z,e){y={id:y,namespace:e??"appapi"};Z==="chapter"?(y.style=m_.CHAPTER_MARKER,y.visible=!0):isNaN(r)||(Z==="ad"?y.style=m_.AD_MARKER:(y.style=m_.TIME_MARKER,y.color=r),y.visible=!0);l.hp([new g.N1(k*1E3,z*1E3,y)],1);return!0};
Axs=function(l,y,k=!0,z,r){const Z=l.u5({playerType:1});let e=0;Z.getStreamTimeOffset()&&!Z.w4()&&(e=Z.getStreamTimeOffset());HM(l,y-e,k,z,1,r)};
$Wg=function(l){if(l.cG.storeUserVolume){l=g.Ay("yt-player-volume")||{};const y=l.volume;l={volume:isNaN(y)?100:g.gf(Math.floor(y),0,100),muted:!!l.muted}}else l={volume:100,muted:l.cG.mute};return l};
QQ5=function(l,y,k,z,r,Z=!0){const e=l.QK();if(!e)return Z&&l.getVideoData().isLivePlayback&&l.ZX.push({id:y,ez:k,Ck:z}),!1;Z=e-l.getCurrentTime();return ry(l,y,k-Z,z-Z,void 0,void 0,r)};
tPs=function(l,y){l.hs().autonavState=y;g.eY("yt-player-autonavstate",y);l.K_.publish("autonavchange",y)};
ZU=function(l,y){l.playlist&&(g.yb(l.playlist),l.playlist=null);y&&(l.gP&&(y.fetch=0),l.playlist=new O7g(l.cG,y))};
Al=function(l,y,k){y=l.u5({playerType:k}).Ur(y);k&&l.getPresentingPlayerType()!==k||ec(l,"cuerangesremoved",y)};
tl=function(l,y,k,z=Infinity,r=0){var Z=l.je();k=k||Z.getPlayerType();(Z=$8(l,k,y,!0))||(Z=Qs(l,k,y,!0));y=l.b5();k===2&&y&&(k=Z.getVideoData(),y.pD(k.clientPlaybackNonce,k.T7||"",k.breakType||0,k.YR,k.videoId||""));l.Fo(Z,z,0,r)};
dW_=function(l){const y=l.webPlayerContextConfig.trustedJsUrl;return y?lO(y).toString():l.webPlayerContextConfig.jsUrl};
hRz=function(l){var y="";let k="";var z=dW_(l),r=CY(z,"cb");r&&/^[\w-]+$/.test(r)&&(k=r);z.indexOf("//")===0&&(z=l.cG.protocol+":"+z);r=z.lastIndexOf("/base.js");r!==-1&&(y=z.substring(0,r+1));if(z=Error().stack)if(z=z.match(/\((.*?\/(debug-)?player-.*?):\d+:\d+\)/))z=z[1],z.includes(y)||g.WH(Error("Player module URL mismatch: "+`${z} vs ${y}.`));y=new wuQ(l.K_,y,k);KWs(y,{destroyed:()=>{l.onApiChange()}});
return y};
GD5=function(l){sx(l,function(){const y=this;return function*(){y.QM.tick("wasm_s");const k=Rl(y.i$)?z=>FX(DqC(y.i$),r=>r.RP(z)):void 0;
try{const z=Clg(y.webPlayerContextConfig.wasmModuleUrl,k,y.A9.bind(y)),r=yield*LE(z);y.QM.tick(r.Z?"wasm_fa":"wasm_fw");K1s(y.cG,r)}catch(z){y.QM.tick("wasm_ferr")}}()})};
ant=function(l){const y=new g.YK(l.cG,l.lf);l.K_.publish("initialvideodatacreated",y);return Qs(l,1,y,!1)};
UWy=function(l){const y=l.b5();y.setPlaybackRate(l.cG.V?1:i7C(l,Number(g.Ay("yt-player-playback-rate"))||1));y.IZ(l.eq,l);y.pn()};
Xuz=function(l){l.OU();var y=l.lf;O6(l);l.events.j(window,"resize",l.lk);const k=l.hs();g.X5(l.K_,"onVolumeChange",l.Gk);if(y&&Ja(y)){const z=Wn(l.cG);z&&!l.gP&&(y.fetch=0);const r=g.u9(l.cG);r&&!l.gP&&(y.fetch=0);ZU(l,y);g.u9(l.cG)&&l.QM.tick("ep_pr_s");if(!z||l.gP)if(r&&!l.gP)dy(l);else if(!k.Ij())l.playlist.onReady(()=>{wy(l)})}l.Sw(l.b5(),!1,!0);
l.b5().getPlayerState().Z(128)||(y=Pde(!l.cG.deviceIsAudioOnly),y==="fmt.noneavailable"?l.FS("html5.missingapi",2,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK","nocodecs.1"):y==="html5.missingapi"?l.FS(y,2,"UNSUPPORTED_DEVICE","nocanplaymedia.1"):k&&k.Ij()&&hl(l)&&(l.cG.ji||l.cG.kK)?GF(l):k.lr?l.K_.mutedAutoplay({durationMode:k.mutedAutoplayDurationMode}):g.Ay("yt-player-playback-on-reload")?(g.wv("embedsItpPlayedOnReload",{playedOnReload:!0,isLoggedIn:!!l.cG.sj}),g.eY("yt-player-playback-on-reload",!1),
GF(l)):Iq(l.cG)||MPT(l),g.xp(l.cG)||AA(l.cG)==="MWEB"?(g.cs(g.bw(),()=>{a6(l)}),g.cs(g.bw(),()=>{CDq()})):(a6(l),CDq()))};
cx_=function(l){const y=k=>{k.stack&&k.stack.indexOf("player")!==-1&&l.je().jd(k)};
Vt.subscribe("handleError",y);Qe.push(y);return()=>{Vt.unsubscribe("handleError",y);const k=Qe.indexOf(y);k!==-1&&Qe.splice(k,1)}};
Qs=function(l,y,k,z,r){l=g.C6s(l,y,k,r);l=new g.U6(l);z&&l.pn();return l};
i7C=function(l,y){var k=l.K_.getAvailablePlaybackRates();y=Number(y.toFixed(2));l=k[0];k=k[k.length-1];y<=l?y=l:y>=k?y=k:(l=Math.floor(y*100+.001)%5,l!==0&&(y-=l*.01,y=Math.floor(y*100+.001)/100));return y};
Xa=function(l){MX(l);l.setLoopVideo(!1);l.setLoopRange(null);l.K_.publish("legacyadtrackingpingreset");l.g$={};l.ZX=[];xq5(l.QM);if(l.l$){var y=l.l$,k=l.b5();k.getPlayerType();uS(y,!1);JH(y);m7C(y);y.playback=k}y=l.m8;l=l.b5();l.getPlayerType()!==1&&jx(y,"invalidParentVideoPlayerType");p_(y,!1);n_(y);y.Z=l};
b7t=function(l){const y=l.mediaElement;ct()?l.sD.j(y,"webkitpresentationmodechanged",l.Wl):window.document.pictureInPictureEnabled&&(l.sD.j(y,"enterpictureinpicture",()=>{l.Bd(!0)}),l.sD.j(y,"leavepictureinpicture",()=>{l.Bd(!1)}));
us&&(l.sD.j(y,"webkitbeginfullscreen",()=>{l.yG(3)}),l.sD.j(y,"webkitendfullscreen",()=>{l.yG(0)}))};
O6=function(l){l.mediaElement=l.cG.deviceIsAudioOnly?new g.Hu(g.Gf("AUDIO")):Bu.pop()||new g.Hu(g.Gf("VIDEO"));g.x(l,l.mediaElement);l.je().setMediaElement(l.mediaElement);try{l.cG.SN?(l.xl&&l.events.uq(l.xl),l.xl=l.events.j(l.mediaElement,"volumechange",l.jj)):(l.mediaElement.D(l.Gk.muted),l.mediaElement.setVolume(l.Gk.volume/100))}catch(r){l.FS("html5.missingapi",2,"UNSUPPORTED_DEVICE",`setvolume.1;emsg.${r&&typeof r==="object"&&"message"in r&&typeof r.message==="string"&&r.message.replace(/[;:,]/g,
"_")}`);return}l.sD.C();b7t(l);var y=l.template,k=l.mediaElement.Jv();y.cn=k;y.AK=!1;y.cn.parentNode||Mj(y.Sp,y.cn,0);y.Xn=new g.f9(0,0,0,0);D7t(y);Fx(y);k=y.cn;g.zi(k,"video-stream");g.zi(k,g.Cb.MAIN_VIDEO);const z=y.app.O();z.Q9&&k.setAttribute("data-no-fullscreen","true");z.X("html5_local_playsinline")?"playsInline"in ik()&&(k.playsInline=!0):z.s6&&(k.setAttribute("webkit-playsinline",""),k.setAttribute("playsinline",""));z.sS&&y.cn&&y.j(k,"click",k.play,k);try{l.mediaElement.activate()}catch(r){l.FS("html5.missingapi",
2,"UNSUPPORTED_DEVICE",`activate.1;emsg.${r&&typeof r==="object"&&"message"in r&&typeof r.message==="string"&&r.message.replace(/[;:,]/g,"_")}`)}};
ec=function(l,y,k){l.K_.publish(y,k);const z=g.dU(l.cG)||g.aq(l.cG)||g.ow(l.cG);if(k&&z){let r;switch(y){case "cuerangemarkersupdated":r="onCueRangeMarkersUpdated";break;case "cuerangesadded":r="onCueRangesAdded";break;case "cuerangesremoved":r="onCueRangesRemoved"}r&&g.G3(l.K_,r,k.map(Z=>({getId(){return this.id},end:Z.end,id:Z.getId(),namespace:Z.namespace==="ad"?"ad":"",start:Z.start,style:Z.style,visible:Z.visible,markerPositionMs:Z.markerPositionMs})))}};
uET=function(l,y=!0){var k;if(k=l.Kp){k=l.Kp;var z=l.mediaElement;k=!!z&&z===k.mediaElement}k&&(l.Uo(),O6(l));k=l.je();k.Uo(!y);k.zN(l.rG,l);k.getPlayerType()!==1&&k.dispose();l=l.D3;y=[l.C];l.C=l.D;AH(l,[],y)};
Cg=function(l,y,k,z){k&&(l.Uo(),O6(l));k=l.je();k.G8(y);const r=l.getVideoData(),Z={};Z.video_id=r.videoId;Z.adformat=r.adFormat;r.isLivePlayback||(Z.start=k.getCurrentTime(),Z.resume="1");r.isLivePlayback&&fc(r)&&g.tL(l.cG)&&(Z.live_utc_start=k.QK(),Z.resume="1");r.b0&&(Z.vvt=r.b0);r.a4&&(Z.vss_credentials_token=r.a4,Z.vss_credentials_token_type=r.XT);r.oauthToken&&(Z.oauth_token=r.oauthToken);Z.autoplay=1;Z.reload_count=r.mK+1;Z.reload_reason=y;r.qg&&(Z.unplugged_partner_opt_out=r.qg);r.O1&&(Z.ypc_is_premiere_trailer=
r.O1);r.playerParams&&(Z.player_params=r.playerParams);r.Y&&(Z.itct=r.Y);l.loadVideoByPlayerVars(Z,void 0,!0,void 0,void 0,z);y==="signature"&&l.l$&&cN(l)};
mWz=function(l){if(!xWt(l)){var y=l.b5().fl();y&&(y=y.Y(),y instanceof Promise&&y.catch(()=>{}));
bf(l,xX(l.getPlayerStateObject()))}};
xWt=function(l){if(l.playlist&&(g.U9(l.cG)||l.cG.b0==="background_audio_playback")&&l.pU()){const y=l.cG.X("html5_player_autonav_logging");l.nextVideo(!1,y);return!0}return!1};
bf=function(l,y){const k=l.je(),z=k.getPlayerType();if(z!==2||l.CE()){if(z===2&&l.CE()||z===5||z===6||z===7)if(y===-1||y===0||y===5)return;if(y===0){if(l.HF)return;if(k.Ti()&&g.dU(l.cG)){l.playVideo();return}}l.Dx!==y&&(l.Dx=y,g.X5(l.K_,"onStateChange",y))}else l.DN!==y&&(l.DN=y,g.X5(l.K_,"onAdStateChange",y))};
uf=function(l,y){return l.D3.u5(y)};
g.C6s=function(l,y,k,z){let r=l.QM;y===2&&(r=new qGs(l.cG));y=new g.x8(l.cG,y,r,l.template,(Z,e,A)=>{l.K_.publish(Z,e,A)},()=>l.K_.getVisibilityState(),l.visibility,l,l.o7,k,z,l.u$,l.oL);
l.cG.sA().Z.G7(W$z)&&l.Mz(k.clientPlaybackNonce);return y};
R$=function(l,y){return l.CE(y)?l.b5():y};
mf=function(l,y){const k=l.je();return y===l.b5()&&l.CE(y)&&l.CE(k)?k:y};
qX=function(l){l=Vi(l.i$);return!!l&&l.loaded};
InC=function(l){const y=l.getVideoData();var k=l.i$;DE(k)||k.J();!dk&&Rl(k)&&BE5(k);vB(k,"embed");vB(k,"kids");vB(k,"remote");vB(k,"miniplayer");vB(k,"offline");vB(k,"unplugged");vB(k,"ypc",!1,!0);vB(k,"webgl",!1,!0);Hys(k)||(vB(k,"captions",!0),vB(k,"endscreen"),k.Z(),vB(k,"creatorendscreen",!0));k.D();k.L.publish("modulesCreated");l.K_.publish("videoready",y)};
cN=function(l){if(!qX(l)){const y=nJ(l.i$);y&&!y.created&&HB(l.i$)&&y.create()}};
k8=function(l){var y=l.getVideoData();if(!y.CY){y=l.cG.SN?1:ygT(y);const k=l.mediaElement;k.D(l.Gk.muted);try{k.setVolume(l.Gk.volume*y/100)}catch{g.WH(new g.WO("b183742307",`multiplier: ${y}, volume: ${l.Gk.volume}`))}}};
hl=function(l){l=l.hs();l.Ij();return $k(l)};
dy=function(l,y){const k=(y?y:l.hs()).IL;l.QM.tick("ep_pr_r");if(k!=null&&(mq4(l.playlist,k),l.r7))l.playlist.onReady(()=>{wy(l,y)})};
wy=function(l,y){const k=g.u9(l.cG)&&!l.cG.Y;var z=k&&y?y:g.pJ(l.playlist);y=k&&y?y:l.getVideoData();z&&(y.lE&&(l.cG.ji||l.cG.kK)||!l.s_?(y=y.jN,z=l.CX(z,1),y&&BM(l,z)):WN(l,z,1));g.u9(l.cG)&&l.QM.tick("ep_p_l");l.r7=!1;g.M1(l.K_,"onPlaylistUpdate")};
GF=function(l){var y=l.b5();if(y.getPlayerState().Z(128))return!1;y=y.getVideoData();hl(l)&&l.cG.kK&&(Bu.length&&l.SQ?(zF(l,{muted:!1,volume:l.Gk.volume},!1),ys(l,!1)):Bu.length||l.Gk.muted||(zF(l,{muted:!0,volume:l.Gk.volume},!1),ys(l,!0)));hl(l)&&g.u9(l.cG)&&y.mutedAutoplay&&(zF(l,{muted:!0,volume:l.Gk.volume},!1),ys(l,!0));y.Vm&&zF(l,{muted:!0,volume:l.Gk.volume},!1);$8(l,1,y,!1);const k=l.b5();l.K_.publish("initializingmode");l.Sw(k);l.iN(3);var z;if(!(z=!l.cG.Ng)){if(z=l.Kp){z=l.Kp;var r=l.mediaElement;
z=!!r&&r===z.mediaElement}z=z&&l.vK}z&&(l.Uo(),O6(l),k.setMediaElement(l.mediaElement));k.PT();if(k.getPlayerState().Z(128))return!1;y.kz||bf(l,3);return l.vK=!0};
MPT=function(l){l.K_.publish("initializingmode");l.iN(2);vB(l.i$,"remote");vB(l.i$,"miniplayer")};
a6=function(l){if(!l.X("use_rta_for_player"))if(l.X("fetch_att_independently"))l.MY.Kl();else{var y=l.getVideoData().botguardData;y&&g.Gk(y,l.cG,l.getVideoData().rg||"")}};
ys=function(l,y){y!==l.SQ&&(l.SQ=y,g.M1(l.K_,"onMutedAutoplayChange",y))};
$8=function(l,y,k,z){const r=I6(y,k),Z=l.D3.S.get(r)||null;if(!Z)return null;l.D3.S.remove(r);if(Z.IR())return null;if(Z.getPlayerState().Z(128))return Z.dispose(),null;if(Z===uf(l,{playerType:y}))return l.QM.infoGel({isCacheHit:!0}),Z;if((Z.getVideoData().oauthToken||k.oauthToken)&&Z.getVideoData().oauthToken!==k.oauthToken)return null;y===1&&(y=l.je().getVideoData(),jn(y)&&y.isAd()&&z||MX(l));z||l.Sw(Z,!0);l.QM.infoGel({isCacheHit:!0});return Z};
TOT=function(l){const y=(0,g.f)();var k=l.getCurrentTime();l=l.getVideoData();k=1E3*(k-l.startSeconds);l.isLivePlayback&&(k=0);return y-Math.max(k,0)};
eRe=function(l,y){if(!l.HF)return!1;const k=l.HF.startTimeMs*.001-1;let z=l.HF.endTimeMs*.001;l.HF.type==="repeatChapter"&&z--;return Math.abs(y-k)<=1E-6||Math.abs(y-z)<=1E-6||y>=k&&y<=z};
VPs=function(l){var y=l.je();if(l.X("html5_disable_loop_range_for_shorts_ads")&&y.getVideoData().isAd()?0:jn(y.getVideoData())&&!y.Zy())y=lf(l)*1E3-l.getVideoData().Bc,l.X("html5_gapless_new_slr")?(l=l.ZL,Al(l.app,"gaplessshortslooprange"),y=new g.N1(0,y,{id:"gaplesslooprange",namespace:"gaplessshortslooprange"}),(l=l.app.je())&&l.addCueRange(y)):l.setLoopRange({startTimeMs:0,endTimeMs:y,type:"shortsLoop"})};
P6P=function(l){const y=l.b5();if(!(y.getPlayerState().Z(64)&&l.hs().isLivePlayback&&l.HF.startTimeMs<5E3)){if(l.HF.type==="repeatChapter"){var k=J7t(l.r4())?.KS(),z=l.getVideoData()?.hj;k instanceof g.TF&&z&&(z=z[IX(z,l.HF.startTimeMs)],k.renderChapterSeekingAnimation(0,z.title));isNaN(Number(l.HF.loopCount))?l.HF.loopCount=0:l.HF.loopCount++;l.HF.loopCount===1&&g.G3(l.K_,"innertubeCommand",l.getVideoData().PM)}k={gY:"application_loopRangeStart"};if(l.HF.type==="clips"||l.HF.type==="shortsLoop")k.seekSource=
58;y.seekTo(l.HF.startTimeMs*.001,k)}};
D7=function(l,y,k){if(l.CE(k)&&(k=k.getVideoData(),!Vs(l))){l=l.m8;for(var z of l.C)if(k.Rj===z.Rj){y+=z.Jj/1E3;break}z=y;for(const r of l.C){if(k.Rj===r.Rj)break;l=r.Jj/1E3;if(l<y)z+=r.durationMs/1E3+l-r.Ha/1E3;else break}return z}return y};
Vs=function(l){return l.getVideoData().enableServerStitchedDai&&!!l.l$};
MX=function(l){(l=nJ(l.r4()))&&l.created&&l.destroy()};
Jx5=function(l){const y=l.getVideoData().CY,k=l.cG.gb,z=l.isInline()&&!l.getVideoData().b1,r=l.mediaElement;y||k||z?r.Oj():(r.kz(),zF(l,l.Gk))};
I6=function(l,y){return`${l}_${y.videoId}_${y.Rj}_${+y.isAutonav}${+y.X6}`};
YG4=function(l,y){return y&&l.cG.S2&&!l.getVideoData()?.backgroundable?(l.Nm?l.Nm.start():l.IG(),!0):!1};
WN=function(l,y,k=1){if(y.Ij()){var z=Qs(l,k,y,!1);l.cancelPlayback(4,k);l.Sw(z);z.pn();k===1&&(l.iN(1),g.u9(l.cG)&&!OB(y)?(y.dispose(),l.b5().dispose()):MPT(l))}else y.dispose(),(y=uf(l,{playerType:k}))&&y.dispose(),tI(l.hs())&&k===2&&l.Hv()};
puz=function(l,y,k,z,r){y=Tdz(y,k,z,r);(k=g.u9(l.cG)&&!l.cG.Y)&&!l.gP&&(y.fetch=0);ZU(l,y);g.u9(l.cG)&&l.QM.tick("ep_a_pr_s");if(k&&!l.gP)k=l.hs(),V$z(k,y).then(Z=>{l.r7=!0;dy(l,Z)});
else l.playlist.onReady(()=>{wy(l)});
g.u9(l.cG)&&l.QM.tick("ep_a_pr_r")};
PN=function(l){const y=vD(!0);return y&&(y===l.template.element||l.mediaElement&&y===l.mediaElement.Jv())?y:null};
gly=function(l,y){var k=window.screen?.orientation;if(l.cG.K&&k&&k.lock&&(!g.Mx||!K$z))if(y){y=k.type.indexOf("portrait")===0;const z=l.template.getVideoAspectRatio();let r=y;z<1?r=!0:z>1&&(r=!1);l.bV&&r===y||(k=k.lock(r?"portrait":"landscape"),k!=null&&k.catch(()=>{}),l.bV=!0)}else l.bV&&(l.bV=!1,k.unlock())};
El5=function(l,y){y.bounds=l.getBoundingClientRect();const k=["display","opacity","visibility","zIndex"];for(const z of k)y[z]=L9(l,z);y.hidden=!!l.hidden};
fnz=function(l,y){const k=uf(l,{playerType:1});if(k){if(k.getVideoData().clientPlaybackNonce===y)return k;if((l=l.Ye.Z)&&l.getVideoData().clientPlaybackNonce===y)return l}return null};
jQ5=function(l){return l.name==="TypeError"&&l.stack.includes("/s/player/")&&w8()<=105};
SGg=function(l){return l.isTimeout?"NO_BID":"ERR_BID"};
nlg=function(){let l=null;YCT().then(y=>l=y,y=>l=SGg(y));
return l};
F$Q=function(){const l=e9(1E3,"NO_BID");return g.vd(HK5([YCT(),l]).Ya(SGg),()=>{l.cancel()})};
eYt=function(l){return l.q_?g.wz().G7(140)?"STATE_OFF":"STATE_ON":"STATE_NONE"};
Jl=function(l,y,{xZ:k,cV:z,cueProcessedMs:r}={},Z=""){const e=l.player.getVideoData({playerType:1}),A=l.player.O().kC;var Q=0;if(r&&z&&!k){const w=z.end-z.start;w>0&&(Q=Math.floor(w/1E3))}Q=k?k.yK:Q;const t={AD_BLOCK:l.Z++,AD_BREAK_LENGTH:Q,AUTONAV_STATE:eYt(l.player.O()),CA_TYPE:"image",CPN:e.clientPlaybackNonce,DRIFT_FROM_HEAD_MS:l.player.ot()*1E3,LACT:hW(),LIVE_INDEX:k?l.C++:1,LIVE_TARGETING_CONTEXT:k&&k.context?k.context:"",MIDROLL_POS:z?Math.round(z.start/1E3):0,MIDROLL_POS_MS:z?Math.round(z.start):
0,VIS:l.player.getVisibilityState(),P_H:l.player.Yz().uI().height,P_W:l.player.Yz().uI().width,YT_REMOTE:A?A.join(","):""},O=qK(Wq);Object.keys(O).forEach(w=>{O[w]!=null&&(t[w.toUpperCase()]=O[w].toString())});
Z!==""&&(t.BISCOTTI_ID=Z);z={};xu(y)&&(z.sts="20520",(Z=l.player.O().forcedExperiments)&&(z.forced_experiments=Z));const d=Cl(g.TB(y,t),z);return d.split("?").length!==2?n6(Error("Invalid AdBreakInfo URL")):g.jz(l.player.O(),e?.oauthToken).then(w=>{if(w&&F8()){var h=EB();fi(h,w)}w=l.player.gW(h);h=k&&l.player.O().X("html5_send_cuepoint_id_in_ad_break_request")?k.identifier:void 0;h=Ouq(l,d,t,e.isMdxPlayback,r,h);return g.Si(w,h,"/youtubei/v1/player/ad_break").then(U=>U)})};
olT=function(l,y){l=l.player.O();if(TC(l)||V6(l))l=g.Y("INNERTUBE_CONTEXT"),l?.adSignalsInfo?.advertisingId&&typeof l?.adSignalsInfo?.limitAdTracking!=="undefined"&&(y.advertisingId=l.adSignalsInfo.advertisingId,y.advertisingIdSignalType="DEVICE_ID_TYPE_CONNECTED_TV_IFA",y.limitAdTracking=l.adSignalsInfo.limitAdTracking)};
ZuC=function(l,y,k,z,r,Z){y.client||(y.client={});l.player.O().X("h5_remove_url_for_get_ad_break")||(y.client.originalUrl=k);const e=bO(k);let A=g.$7(k)?!1:!0;(e||A)&&typeof Intl!=="undefined"&&(y.client.timeZone=(new Intl.DateTimeFormat).resolvedOptions().timeZone);A=g.$7(k)?!1:!0;if(e||A||z!==""){const Q={};k=a3(I3(z)).split("&");const t=new Map;k.forEach(O=>{O=O.split("=");O.length>1&&t.set(O[0].toString(),decodeURIComponent(O[1].toString()))});
t.has("bid")&&(Q.bid=t.get("bid"));Q.params=[];NO4.forEach(O=>{t.has(O)&&(O={key:O,value:t.get(O)},Q.params.push(O))});
olT(l,Q);y.adSignalsInfo=Q}y.client.unpluggedAppInfo||(y.client.unpluggedAppInfo={});y.client.unpluggedAppInfo.enableFilterMode=!1;k=r.Z.cosver;k!=null&&k!=="cosver"&&(y.client.osVersion=k);k=r.Z.cplatform;k!=null&&k!=="cplatform"&&k!==""&&(y.client.platform=k);k=r.Z.cmodel;k!=null&&k!=="cmodel"&&(y.client.deviceModel=k);k=r.Z.cplayer;k!=null&&k!=="cplayer"&&(y.client.playerType=k);k=r.Z.cbrand;k!=null&&k!=="cbrand"&&(y.client.deviceMake=k);y.user||(y.user={});y.user.lockedSafetyMode=!1;g.U9(r)&&
kds(y,Z,l.player.getPlayerState(1));if(l=r.livingRoomPoTokenId)y.client.tvAppInfo={...y.client.tvAppInfo,livingRoomPoTokenId:l}};
AR_=function(l,y){let k=!1;if(y==="")return k;y.split(",").forEach(z=>{const r={},Z={clientName:"UNKNOWN_INTERFACE",platform:"UNKNOWN_PLATFORM",clientVersion:""};let e="ACTIVE";z[0]==="!"&&(z=z.substring(1),e="INACTIVE");z=z.split("-");z.length<3||(z[0]in sQ_&&(Z.clientName=sQ_[z[0]]),z[1]in L$4&&(Z.platform=L$4[z[1]]),Z.applicationState=e,Z.clientVersion=z.length>2?z[2]:"",r.remoteClient=Z,l.remoteContexts?l.remoteContexts.push(r):l.remoteContexts=[r],k=!0)});
return k};
rH5=function(l){const y=new vlq(l.Z.GM);g.x(l,y);l=[new BOq(l.Z.Se),new H7z(l.Z.L),new RRq(l.Z.Se),new DW5(l.Z.LJ,l.Z.pK),new l7q,new yHq(l.Z.gz,l.Z.E7,l.Z.Se),new kGy,new zH5(l.Z.E7)];for(const k of l)R4t(y,k);for(const k of["adInfoDialogEndpoint","adFeedbackEndpoint"])VX(y,k,()=>{});
return y};
Y8=function(l){const y=l.wb,k=l.p_;l=l.TA;const z={QjG:new Z_C(y.get(),k),p_:k};return{Av:new eHy(k,l,y),context:z}};
fM=function(l){l.C=!1;const y={};l.Z&&l.videoId&&(y.cttAuthInfo={token:l.Z,videoId:l.videoId});p4("ad_to_video",y);AHP(l)};
$__=function(l){if(l.L.getVideoData({playerType:1})?.A){l.C=!1;var y={};l.Z&&l.videoId&&(y.cttAuthInfo={token:l.Z,videoId:l.videoId});p4("video_to_ad",y)}};
Q$4=function(l,y){for(const k of y)if((l=k.renderer)&&(l.instreamVideoAdRenderer||l.linearAdSequenceRenderer||l.sandwichedLinearAdRenderer||l.instreamSurveyAdRenderer)){Jt("ad_i");g.YV({isMonetized:!0});break}};
AHP=function(l){if(l.N)if(l.V==="AD_PLACEMENT_KIND_START"&&l.actionType==="video_to_ad")TX("video_to_ad");else{var y={adBreakType:Ii(l.V),playerType:"LATENCY_PLAYER_HTML5",playerInfo:{preloadType:"LATENCY_PLAYER_PRELOAD_TYPE_PREBUFFER"},videoStreamType:l.videoStreamType};l.actionType==="ad_to_video"?(l.contentCpn&&(y.targetCpn=l.contentCpn),l.videoId&&(y.targetVideoId=l.videoId)):(l.adCpn&&(y.targetCpn=l.adCpn),l.adVideoId&&(y.targetVideoId=l.adVideoId));l.adFormat&&(y.adType=l.adFormat);l.contentCpn&&
(y.clientPlaybackNonce=l.contentCpn);l.videoId&&(y.videoId=l.videoId);l.adCpn&&(y.adClientPlaybackNonce=l.adCpn);l.adVideoId&&(y.adVideoId=l.adVideoId);g.YV(y,l.actionType);l.L.O().experiments.z7("html5_ads_csi_qoes")&&(y=l.L.o2(l.actionType==="ad_to_video"?1:2),y=(0,g.f)()-1E3*y,gl("qoes",y,l.actionType))}};
txz=function(l){l.contentCpn=null;l.adCpn=null;l.videoId=null;l.adVideoId=null;l.adFormat=null;l.V="AD_PLACEMENT_KIND_UNKNOWN";l.actionType="unknown_type";l.N=!1;l.C=!1};
pg=function(l,y){l.L.cueVideoByPlayerVars(y,2)};
Jv=function(l,y,...k){y==="onAdStart"||y==="onAdEnd"?g.X5(l.L,y,...k):g.G3(l.L,y,...k)};
iR=function(l,y){return l.L.O().X(y)};
O_q=function(l){return l.L.O().experiments.z7("enable_desktop_discovery_video_abandon_pings")||TC(l.L.O())};
d__=function(l){return l.L.O().experiments.z7("enable_progres_commands_lr_feeds")};
wMP=function(l){return l.L.O().experiments.z7("enable_progress_commands_lr_shorts")};
sN=function(l,y){return l.L.O().X("html5_cue_video_for_preroll")&&y?.kind==="AD_PLACEMENT_KIND_START"?!1:l.L.O().experiments.z7("html5_load_ads_instead_of_cue")};
Lw=function(l){return l.L.O().experiments.z7("html5_preload_ads")};
hHP=function(l){return l.L.O().experiments.z7("html5_load_empty_player_in_media_break_sub_lra")};
Kg=function(l){return l.L.O().experiments.z7("html5_ssdai_enable_media_end_cue_range")};
gy=function(l){return l.L.O().X("substitute_ad_cpn_macro_in_ssdai")};
ad=function(l){return l.L.getVideoData({playerType:1}).getPlayerResponse()?.playerConfig?.daiConfig?.enableServerStitchedDai||!1};
Zq=function(l){return l.L.O().experiments.z7("enable_progress_commands_el_dai")};
s3C=function(l){l=l.L.getVideoData({playerType:1});return!!l&&l.X("html5_preload_first_vod_video_ad")&&!l.isDaiEnabled()&&!l.isLivePlayback};
pw=function(l){return l.L.O().experiments.z7("enable_desktop_player_underlay")};
$8Q=function(l){return l.L.O().X("html5_enable_vod_slar_with_notify_pacf")};
Wm=function(l){return l.L.O().experiments.z7("enable_ads_control_flow_deterministic_id_generation")};
Ux=function(l){return l.L.O().experiments.z7("html5_cuepoint_identifier_logging")};
GGQ=function(l){return l.L.O().X("html5_recognize_predict_start_cue_point")};
a7C=function(l){return l.L.O().experiments.z7("should_ignore_cuepoints_during_lifa_preroll")};
i_5=function(l){switch(l){case "audio_audible":return"adaudioaudible";case "audio_measurable":return"adaudiomeasurable";case "fully_viewable_audible_half_duration_impression":return"adfullyviewableaudiblehalfdurationimpression";case "measurable_impression":return"adactiveviewmeasurable";case "overlay_unmeasurable_impression":return"adoverlaymeasurableimpression";case "overlay_unviewable_impression":return"adoverlayunviewableimpression";case "overlay_viewable_end_of_session_impression":return"adoverlayviewableendofsessionimpression";
case "overlay_viewable_immediate_impression":return"adoverlayviewableimmediateimpression";case "viewable_impression":return"adviewableimpression";default:return null}};
fg=function(){if(E6===null){E6=new U_Q;qb(tT).C="b";var l=qb(tT);let y=KU(l)=="h"||KU(l)=="b",k=!(H2(),!1);y&&k&&(l.RR=!0,l.u0=new MxP)}return E6};
XM5=function(l,y,k){l.Z[y]=k};
cHz=function(l){switch(l){case "abandon":case "unmuted_abandon":return"abandon";case "active_view_fully_viewable_audible_half_duration":return"fully_viewable_audible_half_duration_impression";case "active_view_measurable":return"measurable_impression";case "active_view_viewable":return"viewable_impression";case "audio_audible":return"audio_audible";case "audio_measurable":return"audio_measurable";case "complete":case "unmuted_complete":return"complete";case "end_fullscreen":case "unmuted_end_fullscreen":return"exitfullscreen";
case "first_quartile":case "unmuted_first_quartile":return"firstquartile";case "fullscreen":case "unmuted_fullscreen":return"fullscreen";case "impression":case "unmuted_impression":return"impression";case "midpoint":case "unmuted_midpoint":return"midpoint";case "mute":case "unmuted_mute":return"mute";case "pause":case "unmuted_pause":return"pause";case "progress":case "unmuted_progress":return"progress";case "resume":case "unmuted_resume":return"resume";case "swipe":case "skip":case "unmuted_skip":return"skip";
case "start":case "unmuted_start":return"start";case "third_quartile":case "unmuted_third_quartile":return"thirdquartile";case "unmute":case "unmuted_unmute":return"unmute";default:return null}};
Sc=function(l,y,k){const z=k.Dg,r=k.Of,Z=k.listener;k=k.Tx;if(l.Z.has(y))EP("Unexpected registration of layout in LidarApi");else{if(k){if(l.C.has(k))return;l.C.add(k)}l.Z.set(y,Z);Qm(H2().QE,"fmd",1);GW(qb(tT),z);XM5(fg(),y,{Px:()=>{if(!r)return{};const e=l.L.getPresentingPlayerType(!0);return l.L.getVideoData({playerType:e})?.isAd()?{currentTime:l.vG.get().getCurrentTimeSec(e,!1,void 0),duration:r,isPlaying:jc(l.vG.get(),e).isPlaying(),isVpaid:!1,isYouTube:!0,volume:l.vG.get().isMuted()?0:l.vG.get().getVolume()/
100}:{}}})}};
ng=function(l,y){l.Z.has(y)?(l.Z.delete(y),delete fg().Z[y]):EP("Unexpected unregistration of layout in LidarApi")};
CSz=function(l,y){if(l.L.isLifaAdPlaying()){var k=l.L.rz(!0,!0);l.K(y,k.width*.5*1.1,k.height*.25*1.1,k.width*.5*.9,k.height*.5*.9)}};
x_C=function(l,y){const k={};b_C(l,k,y);uxC(k);k.LACT=Fa(()=>hW().toString());
k.VIS=Fa(()=>l.getVisibilityState().toString());
k.SDKV="h.3.0";k.VOL=Fa(()=>l.isMuted()?"0":Math.round(l.getVolume()).toString());
k.VED="";return k};
m_5=function(l,y){const k={};if(y||!l||!l.kind)return k;if(l.kind==="AD_PLACEMENT_KIND_MILLISECONDS"||l.kind==="AD_PLACEMENT_KIND_CUE_POINT_TRIGGERED"){if(!l.adTimeOffset||!l.adTimeOffset.offsetStartMilliseconds)return g.n(Error("malformed AdPlacementConfig")),k;k.MIDROLL_POS=Fa(Tf(Math.round(cZ(l.adTimeOffset.offsetStartMilliseconds)/1E3).toString()))}else k.MIDROLL_POS=Fa(Tf("0"));return k};
Fa=function(l){return{toString(){return l()}}};
qM_=function(l,y,k){if(!k||g.DB(k))return l;const z=Object.assign({},l),r=y?encodeURIComponent:Z=>Z;
l=(Z,e)=>{(e=k[e])&&(z[Z]=r(e))};
l("DV_VIEWABILITY","doubleVerifyViewability");l("IAS_VIEWABILITY","integralAdsViewability");l("MOAT_INIT","moatInit");l("MOAT_VIEWABILITY","moatViewability");l=(Z,e)=>{(e=k[e])&&(z[Z]=e)};
l("GOOGLE_VIEWABILITY","googleViewability");l("VIEWABILITY","viewability");return z};
b_C=function(l,y,k){y.CPN=Fa(()=>{var z;(z=l.getVideoData({playerType:1}))?z=z.clientPlaybackNonce:(g.WH(Error("Video data is null.")),z=null);return z});
y.AD_MT=Fa(()=>{if(k!=null)var z=k;else l.O().X("enable_h5_shorts_ad_fill_ad_mt_macro")||l.O().X("enable_desktop_discovery_pings_ad_mt_macro")||TC(l.O())?(z=l.getPresentingPlayerType(!0),z=l.getVideoData({playerType:z})?.isAd()?l.getCurrentTime({playerType:z,D5:!1}):0):z=l.getCurrentTime({playerType:2,D5:!1});return WUe(z)});
y.MT=Fa(()=>WUe(l.getCurrentTime({playerType:1,D5:!1})));
y.P_H=Fa(()=>l.Yz().uI().height.toString());
y.P_W=Fa(()=>l.Yz().uI().width.toString());
y.PV_H=Fa(()=>l.Yz().getVideoContentRect().height.toString());
y.PV_W=Fa(()=>l.Yz().getVideoContentRect().width.toString())};
WUe=function(l){return Math.round(Math.max(0,l*1E3)).toString()};
uxC=function(l){l.CONN=Fa(Tf("0"));l.WT=Fa(()=>Date.now().toString())};
I74=async function(l,y,k,z,r){const Z=!!y.scrubReferrer;k=g.TB(y.baseUrl,qM_(k,Z,z));z={};if(y.headers){var e=l.V();e=e.Z?await e.Z:e.getValue();for(const A of y.headers)switch(A.headerType){case "VISITOR_ID":g.Y("VISITOR_DATA")&&(z["X-Goog-Visitor-Id"]=g.Y("VISITOR_DATA"));break;case "EOM_VISITOR_ID":g.Y("EOM_VISITOR_DATA")&&(z["X-Goog-EOM-Visitor-Id"]=g.Y("EOM_VISITOR_DATA"));break;case "USER_AUTH":e&&(z.Authorization=`Bearer ${e}`);break;case "PLUS_PAGE_ID":(y=l.J())&&(z["X-Goog-PageId"]=y);break;
case "AUTH_USER":y=l.Z();!e&&y&&(z["X-Goog-AuthUser"]=y);break;case "DATASYNC_ID":l.N()?.z7("enable_datasync_id_header_in_web_vss_pings")&&(y=l.C(),bO(k)&&g.Y("LOGGED_IN")&&y&&(z["X-YouTube-DataSync-Id"]=y))}"X-Goog-EOM-Visitor-Id"in z&&"X-Goog-Visitor-Id"in z&&delete z["X-Goog-Visitor-Id"]}g.Eb(k,void 0,Z,Object.keys(z).length!==0?z:void 0,"",!0,r)};
Fs=function(l,y,k){typeof k==="string"?l.L.getVideoData({playerType:1}).yZ(y,k):l.L.getVideoData({playerType:1}).Md(y,k)};
nc=function(l,y){l.L.sendVideoStatsEngageEvent(y,void 0,2)};
eD5=function(l,y,k,z=[],r,Z){const e=CE(l.C.get(),y);if(e){var A=l.EA.get().Wh(y,k),Q=vJ(l,o6(e),e,r,Z);z.forEach((t,O)=>{t.baseUrl&&(l.N.send(t.baseUrl,Q,A,t.attributionSrcMode),t.serializedAdPingMetadata&&l.Av.Z("ADS_CLIENT_EVENT_TYPE_PING_DISPATCHED",void 0,void 0,void 0,void 0,e,new TNC(t,O),void 0,void 0,e.adLayoutLoggingData))})}else EP("Trying to track from an unknown layout.",void 0,void 0,{layoutId:y,
trackingType:k})};
NX=function(l,y){l.Z.has(y.S6())?EP("Trying to register an existing AdErrorInfoSupplier."):l.Z.set(y.S6(),y)};
s6=function(l,y){l.Z.delete(y.S6())||EP("Trying to unregister a AdErrorInfoSupplier that has not been registered yet.")};
SL=function(l,y){g.wv("adsClientStateChange",y)};
Vx5=function(l,y,k,z,r){const Z=CE(l.C.get(),k);Z?(k=vJ(l,o6(Z),Z,void 0,void 0,z),y.hasOwnProperty("baseUrl")?l.V.send(y,k):l.N.send(y,k,{},r)):EP("Trying to ping from an unknown layout",void 0,void 0,{layoutId:k})};
vJ=function(l,y,k,z,r,Z){const e=k?PS4(l):{},A=k?JHq(l,k.layoutId):{},Q=YMQ(l),t=r??O1(l.wb.get(),2)?.clientPlaybackNonce;l={...x_C(l.L,z),...m_5(y.adPlacementConfig,k?.renderingContent!==void 0),...A,...e,...Q,FINAL:Fa(()=>"1"),
AD_CPN:Fa(()=>t||"")};
k?.renderingContent!==void 0||(l.SLOT_POS=Fa(()=>(y.oe||0).toString()));
k={};Z=Object.assign({},l,Z);for(const O of Object.values(pMQ))l=Z[O],l!=null&&l.toString()!=null&&(k[O]=l.toString());return k};
o6=function(l){const y=l.clientMetadata.aR("metadata_type_ad_placement_config");l=l.clientMetadata.aR("metadata_type_media_sub_layout_index");return{adPlacementConfig:y,oe:l}};
PS4=function(l){const y={},k=l.mQ?.AP();k!=null&&(y.SURVEY_ELAPSED_MS=Fa(()=>Math.round(k*1E3).toString()));
y.SURVEY_LOCAL_TIME_EPOCH_S=Fa(()=>Math.round(Date.now()/1E3).toString());
return y};
JHq=function(l,y){l=l.Z.get(y);return l?(l=l.VV())?{YT_ERROR_CODE:l.QL.toString(),ERRORCODE:l.jl.toString(),ERROR_MSG:l.errorMessage}:{}:{}};
YMQ=function(l){const y={},k=l.L.getVideoData({playerType:1});y.ASR=Fa(()=>k?.F3??null);
y.EI=Fa(()=>k?.eventId??null);
return y};
O1=function(l,y){const k=l.L.getVideoData({playerType:y});return k?l.hd(k,y||l.L.getPresentingPlayerType(!0)):null};
Lg=function(l,y,k){const z=l.hd(y,k);l.gJ=z;l.listeners.forEach(r=>{r.Wr(z)})};
KUC=function(l,y){l.jc=l.jc.filter(k=>k!==y)};
vN=function(l,y){g.zi(l.L.getRootNode(),y)};
BN=function(l,y){g.ZM(l.L.getRootNode(),y)};
jc=function(l,y){return l.L.getPlayerStateObject(y)};
HN=function(l){l.L.cueVideoByPlayerVars({videoId:"empty_video"},2)};
gPQ=function(l,y){const k=l.L.O();g.ih(k)||k.controlsType!=="3"||l.L.Yz().Hk(y)};
R6=function(l,y,k){return l.getCurrentTimeSec(y,k)};
DU=function(l,y){y=l.wb.get().Oz.get(y)??null;if(y===null)return EP("Expected ad video start time on playback timeline"),0;l=l.L.getCurrentTime({playerType:2,D5:!0});return l<y?0:l-y};
EPC=function(l){const y=l.L.Yz().uI();l=l.L.rz(!0,!0);return y.height-(l.height+l.top)};
f7Q=function(l,y){if(!l)return{ow:[],adSlots:[],En:!0,ssdaiAdsConfig:void 0};l.trackingParams&&$M(l.trackingParams);if(l.adThrottled)return{ow:[],adSlots:[],En:!0,ssdaiAdsConfig:void 0};const k=l.adSlots??[];var z=l.playerAds??[];if(!(z&&z.length||k.length))return{ow:[],adSlots:k,En:!1,ssdaiAdsConfig:void 0};z=z.map(r=>r.adPlacementRenderer).filter(r=>!(!r||!r.renderer));
if(!z.length&&!k.length)return{ow:[],adSlots:k,En:!1,ssdaiAdsConfig:void 0};if(y.end>0){const r=y.end.toString();z.forEach(Z=>{(Z=Z.config&&Z.config.adPlacementConfig)&&Z.kind==="AD_PLACEMENT_KIND_MILLISECONDS"&&Z.adTimeOffset&&Z.adTimeOffset.offsetEndMilliseconds==="-1"&&Z.adTimeOffset.offsetEndMilliseconds!==r&&(Z.adTimeOffset.offsetEndMilliseconds=r)});
k.map(Z=>g.E(Z,xt)).forEach(Z=>{(Z=Z?.slotEntryTrigger?.mediaTimeRangeTrigger)&&Z.offsetEndMilliseconds==="-1"&&(Z.offsetEndMilliseconds=r)})}return{ow:z,
adSlots:k,En:!1,ssdaiAdsConfig:l.ssdaiAdsConfig}};
SMP=function(l,y,k){y=g.sT(y,z=>new j$Q(z,k,z.id));
g.G3(l.L,"onAdUxUpdate",y)};
l3=function(l,y){for(const k of l.listeners)y(k)};
nPs=function(l,y){var k=l.startSecs+l.yK;k=k<=0?null:k;if(k===null)return null;switch(l.event){case "start":case "continue":case "stop":break;case "predictStart":if(y)break;return null;default:return null}y=Math.max(l.startSecs,0);return{wB:new xa(y,k),L8:new v6(y,k-y,l.context,l.identifier,l.event,l.Z)}};
RYT=function(l,y,k){const z=g.cO(l.Z,y);if(z>=0)return y;y=-z-1;return y>=l.Z.length||l.Z[y]>k?null:l.Z[y]};
FUz=function(l,y){l.Kn.push(y);let k=!1;for(const z of l.listeners)k=z.TI(y)||k;l.V=k;Ux(l.p_.get())&&Fs(l.Se.get(),"onci",`cpi.${y.identifier};cpe.${y.event};cps.${y.startSecs};cbi.${k}`)};
NNT=function(l,y){SL(l.Se.get(),{cuepointTrigger:{event:oPz(y.event),cuepointId:y.identifier,totalCueDurationMs:y.yK*1E3,playheadTimeMs:y.Z,cueStartTimeMs:y.startSecs*1E3,cuepointReceivedTimeMs:Date.now(),contentCpn:l.L.getVideoData({playerType:1}).clientPlaybackNonce}})};
oPz=function(l){switch(l){case "unknown":return"CUEPOINT_EVENT_UNKNOWN";case "start":return"CUEPOINT_EVENT_START";case "continue":return"CUEPOINT_EVENT_CONTINUE";case "stop":return"CUEPOINT_EVENT_STOP";case "predictStart":return"CUEPOINT_EVENT_PREDICT_START";case "prefetch":return"CUEPOINT_EVENT_PREFETCH";default:return Rg(l,"Unexpected cuepoint event")}};
s$4=function(l){switch(l){case 1:return 1;case 2:return 2;case 3:return 3;case 4:return 4;case 5:return 5;case 6:return 6;case 7:return 7;default:Rg(l,"unknown transitionReason")}};
lUq=function(l,y,k,z,r){try{{const e=y.O();if(g.xp(e))var Z=new LUq(l,y,k,z,r);else if(g.JA(e))Z=new vPz(l,y,k,z,r);else if(uh(e))Z=new BN5(l,y,k,z,r);else if(g.ow(e))Z=new H_s(l,y,k,z,r);else if(g.aq(e))Z=new RH5(l,y,k,z,r);else throw new TypeError("Unknown web interface");}return Z}catch{return z=y.O(),EP("Unexpected interface not supported in Ads Control Flow",void 0,void 0,{platform:z.Z.cplatform,interface:z.Z.c,s9R:z.Z.cver,Mbe:z.Z.ctheme,bEr:z.Z.cplayer,j9R:z.playerStyle}),new D_T(l,y,k,r)}};
yP=function(l){return l.Z.rV};
yl5=function(l){l=l.O();return OH(l)&&!g.tL(l)&&l.playerStyle==="desktop-polymer"};
kFT=function(l){const y=g.rt("html5-video-player");y&&g.I(y,"ytp-ad-display-override",l)};
zxP=function(l){const y=new g.kD({U:"div",B:"ytp-ad-text-overlay",W:[{U:"div",B:"ytp-ad-overlay-ad-info-button-container"},{U:"div",B:"ytp-ad-overlay-close-container",W:[{U:"button",B:"ytp-ad-overlay-close-button",W:[m7(zL)]}]},{U:"div",B:"ytp-ad-overlay-title",Nd:"{{title}}"},{U:"div",B:"ytp-ad-overlay-desc",Nd:"{{description}}"},{U:"div",L_:["ytp-ad-overlay-link-inline-block","ytp-ad-overlay-link"],Nd:"{{displayUrl}}"}]});l.j(y.qd("ytp-ad-overlay-title"),"click",k=>{r$(l,y.element,k)});
l.j(y.qd("ytp-ad-overlay-link"),"click",k=>{r$(l,y.element,k)});
l.j(y.qd("ytp-ad-overlay-close-container"),"click",l.rb);y.hide();return y};
rl4=function(l){const y=new g.kD({U:"div",L_:["ytp-ad-text-overlay","ytp-ad-enhanced-overlay"],W:[{U:"div",B:"ytp-ad-overlay-ad-info-button-container"},{U:"div",B:"ytp-ad-overlay-close-container",W:[{U:"button",B:"ytp-ad-overlay-close-button",W:[m7(zL)]}]},{U:"div",B:"ytp-ad-overlay-text-image",W:[{U:"img",G:{src:"{{imageUrl}}"}}]},{U:"div",B:"ytp-ad-overlay-title",Nd:"{{title}}"},{U:"div",B:"ytp-ad-overlay-desc",Nd:"{{description}}"},{U:"div",L_:["ytp-ad-overlay-link-inline-block","ytp-ad-overlay-link"],
Nd:"{{displayUrl}}"}]});l.j(y.qd("ytp-ad-overlay-title"),"click",k=>{r$(l,y.element,k)});
l.j(y.qd("ytp-ad-overlay-link"),"click",k=>{r$(l,y.element,k)});
l.j(y.qd("ytp-ad-overlay-close-container"),"click",l.rb);l.j(y.qd("ytp-ad-overlay-text-image"),"click",l.PF);y.hide();return y};
Zg_=function(l){const y=new g.kD({U:"div",B:"ytp-ad-image-overlay",W:[{U:"div",B:"ytp-ad-overlay-ad-info-button-container"},{U:"div",B:"ytp-ad-overlay-close-container",W:[{U:"button",B:"ytp-ad-overlay-close-button",W:[m7(zL)]}]},{U:"div",B:"ytp-ad-overlay-image",W:[{U:"img",G:{src:"{{imageUrl}}",width:"{{width}}",height:"{{height}}"}}]}]});l.j(y.qd("ytp-ad-overlay-image"),"click",k=>{r$(l,y.element,k)});
l.j(y.qd("ytp-ad-overlay-close-container"),"click",l.rb);y.hide();return y};
r$=function(l,y,k){const z=g.r4(l.macros),r=g.Zo(y);z.AW={toString:()=>r.width.toString()};
z.AH={toString:()=>r.height.toString()};
const Z=g.zn(k,y).floor();z.I_X={toString:()=>Z.x.toString()};
z.NX={toString:()=>Z.x.toString()};
z.I_Y={toString:()=>Z.y.toString()};
z.NY={toString:()=>Z.y.toString()};
z.NM={toString:()=>l.K.toString()};
for(const e of l.S)l.layoutId?a0(l.l0,e,l.layoutId,z):g.n(Error("Missing layoutId for invideo_overlay_ad."));l.api.pauseVideo()};
exQ=function(l,y){l=l.api.getRootNode();g.I(l,"ytp-ad-overlay-open",y);g.I(l,"ytp-ad-overlay-closed",!y)};
ey=function(l,y){if(y){var k=g.E(y,I5)||null;k==null?g.n(Error("AdInfoRenderer did not contain an AdHoverTextButtonRenderer.")):(y=g.rt("video-ads ytp-ad-module")||null,y==null?g.n(Error("Could not locate the root ads container element to attach the ad info dialog.")):(l.Y=new g.kD({U:"div",B:"ytp-ad-overlay-ad-info-dialog-container"}),g.x(l,l.Y),l.Y.Uj(y),y=new Z$(l.api,l.layoutId,l.interactionLoggingClientData,l.l0,l.Y.element,!1),g.x(l,y),y.init(kb("ad-info-hover-text-button"),k,l.macros),l.J?
(y.Uj(l.J,0),y.subscribe("f",l.T7,l),y.subscribe("e",l.kI,l),l.j(l.J,"click",l.R7),l.j(g.rt("ytp-ad-button",y.element),"click",()=>{if(g.E(g.E(k.button,$L)?.serviceEndpoint,G9T))l.Xr=l.api.getPlayerState(1)===2,l.api.pauseVideo();else l.api.onAdUxClicked("ad-info-hover-text-button",l.layoutId)}),l.xz=y):g.n(Error("Ad info button container within overlay ad was not present."))))}else g.WH(Error("AdInfoRenderer was not present within InvideoOverlayAdRenderer."))};
Ale=function(l,y){if(Af(l,$D)||l.api.isMinimized())return!1;const k=A4(y.title),z=A4(y.description);if(g.G0(k)||g.G0(z))return!1;l.createServerVe(l.N.element,y.trackingParams||null);l.N.updateValue("title",A4(y.title));l.N.updateValue("description",A4(y.description));l.N.updateValue("displayUrl",A4(y.displayUrl));y.navigationEndpoint&&g.Gx(l.S,y.navigationEndpoint);l.N.show();l.sj.start();l.logVisibility(l.N.element,!0);l.j(l.N.element,"mouseover",()=>{l.K++});
return!0};
$Xg=function(l,y){if(Af(l,$D)||l.api.isMinimized())return!1;const k=A4(y.title),z=A4(y.description);if(g.G0(k)||g.G0(z))return!1;l.createServerVe(l.C.element,y.trackingParams||null);l.C.updateValue("title",A4(y.title));l.C.updateValue("description",A4(y.description));l.C.updateValue("displayUrl",A4(y.displayUrl));l.C.updateValue("imageUrl",br_(y.image));y.navigationEndpoint&&g.Gx(l.S,y.navigationEndpoint);l.gb=y.imageNavigationEndpoint||null;l.C.show();l.sj.start();l.logVisibility(l.C.element,!0);
l.j(l.C.element,"mouseover",()=>{l.K++});
return!0};
Q6P=function(l,y){if(l.api.isMinimized())return!1;const k=uWq(y.image);let z=k;k.width<$D.width&&(z=$D);if(k.width===0||k.height===0||Af(l,z))return!1;l.createServerVe(l.Z.element,y.trackingParams||null);l.Z.updateValue("imageUrl",br_(y.image));l.Z.updateValue("width",k.width);l.Z.updateValue("height",k.height);y.navigationEndpoint&&g.Gx(l.S,y.navigationEndpoint);g.n9(l.Z.qd("ytp-ad-image-overlay"),"max-width",k.width+"px");l.Z.show();l.logVisibility(l.Z.element,!0);l.j(l.Z.element,"mouseover",()=>
{l.K++;l.api.SM("invideo-overlay",l.layoutId)});
l.j(l.Z.element,"mouseout",()=>{l.api.I3("invideo-overlay",l.layoutId)});
return!0};
tc5=function(l){return l.V&&l.V.closeButton&&l.V.closeButton.buttonRenderer&&(l=l.V.closeButton.buttonRenderer,l.serviceEndpoint)?[l.serviceEndpoint]:[]};
Af=function(l,y){var k=l.api.Yz().uI();const z=l.api.rz(!0,!1);return(y=Ri(k,k.height-(z.height+z.top),y))?(l.PG&&y&&(k=g.r4(l.macros),k.ERRORCODE=y.jl.toString(),k.ERROR_MSG=y.errorMessage,l.layoutId?a0(l.l0,l.PG,l.layoutId,k):g.n(Error("Missing layoutId for invideo_overlay_ad."))),!0):!1};
Og4=function(l,y){l=l.api.getRootNode();g.I(l,"ytp-ad-overlay-open",y);g.I(l,"ytp-ad-overlay-closed",!y)};
dX_=function(l){const y=g.rt("html5-video-player");y&&g.I(y,"ytp-ad-display-override",l)};
tf=function(l,y,k=!1){l.Z&&(y?l.Z.hide():l.Z.show(),k&&l.Z instanceof QP&&!l.Z.S&&q$4(l.Z,!1));l.C&&(y?l.C.show():l.C.hide())};
wN4=function(l){function y(k){return{toString:()=>k()}}
l.macros.SURVEY_LOCAL_TIME_EPOCH_S=y(()=>{const k=new Date;return(Math.round(k.valueOf()/1E3)+-1*k.getTimezoneOffset()*60).toString()});
l.macros.SURVEY_ELAPSED_MS=y(()=>(Date.now()-l.V).toString())};
hxT=function(l,y){y=g.$b(y);g.C9(l.questionText,y);l.S&&l.questionText.setAttribute("id",kb("survey-question-text"))};
aU_=function(l,y,k,z){z=new GFC(l.api,l.layoutId,l.interactionLoggingClientData,l.l0,z,l.sj);z.Uj(l.answers);z.init(kb("survey-answer"),y,k);l.S&&(y=l.questionText.getAttribute("id"),y!=null&&(z.Z!==null?z.Z.C.setAttribute("aria-describedby",y):z.answer.getElementsByTagName("button")[0].setAttribute("aria-describedby",y)));l.C.push(z)};
McC=function(l,y){if(y){var k=y.background;k&&g.E(k,igC)&&(k=(k=g.E(k,igC).image)&&T1(k)||"",g.G0(k)?g.WH(Error("Found ThumbnailDetails without valid image URL")):g.n9(l.PG,"backgroundImage",`url(${k})`));if(y.durationMilliseconds==null||y.durationMilliseconds===void 0||y.durationMilliseconds===0)l=Error("durationMilliseconds unset or 0 for SurveyAdQuestionCommon: "+`${JSON.stringify(y)}`),g.n(l);else{l.V=g.T5();l.Z=new O3(l.api,y.durationMilliseconds);g.x(l,l.Z);if(l.Z&&y.instreamAdPlayerOverlay&&
g.E(y.instreamAdPlayerOverlay,W3))try{var z=new UXe(l.api,l.layoutId,l.interactionLoggingClientData,l.l0,l.Z);z.Uj(l.playerOverlay);z.init(kb("survey-player-overlay"),g.E(y.instreamAdPlayerOverlay,W3),l.macros);l.N=z;g.x(l,z);l.K()}catch(r){z=Error("ISAPOR had an error when initializing. Error: "+`${r} SurveyAdQuestionCommon: ${JSON.stringify(y)}`),g.n(z)}else z=Error("ISAPOR was not present in renderer. SurveyAdQuestionCommon: "+`${JSON.stringify(y)}`),g.n(z);l.Z&&y.durationMilliseconds&&y.durationMilliseconds>
0?(y=new d$(l.api,l.Z),y.Uj(l.playerOverlay),g.x(l,y)):(l=Error("Survey progress bar was not added. SurveyAdQuestionCommon: "+`${JSON.stringify(y)}`),g.n(l))}}else g.n(Error("addCommonComponents() needs to be called before starting countdown."))};
clz=function(l,y,k){l.noneOfTheAbove=new XN5(l.api,l.layoutId,l.interactionLoggingClientData,l.l0);l.noneOfTheAbove.Uj(l.answers);l.noneOfTheAbove.init(kb("survey-none-of-the-above"),y,k)};
Cfg=function(l){l.C.forEach(y=>{y.Z.toggleButton(!1)});
tf(l.N,w$(l),!0)};
w$=function(l){return l.C.some(y=>y.Z.isToggled())||l.noneOfTheAbove.button.isToggled()};
xXC=function(l,y){const k=l.C[y];l.N?.dispose();g.E(k,qe)?bgt(l,g.E(k,qe),l.macros):g.E(k,m6)&&uas(l,g.E(k,m6),l.macros);l.Z=y};
bgt=function(l,y,k){const z=new mX5(l.api,l.layoutId,l.interactionLoggingClientData,l.l0,l.V.bind(l));z.Uj(l.J);z.init(kb("survey-question-single-select"),y,k);l.api.O().X("supports_multi_step_on_desktop")?l.N=z:l.questions.push(z);g.x(l,z)};
uas=function(l,y,k){const z=new q6Q(l.api,l.layoutId,l.interactionLoggingClientData,l.l0,l.V.bind(l));z.Uj(l.J);z.init(kb("survey-question-multi-select"),y,k);l.api.O().X("supports_multi_step_on_desktop")?l.N=z:l.questions.push(z);g.x(l,z)};
WfP=function(l,y){y=y&&T1(y)||"";if(g.G0(y))g.WH(Error("Found ThumbnailDetails without valid image URL"));else{var k=l.style;l=l.style.cssText;const z=document.implementation.createHTMLDocument("").createElement("DIV");z.style.cssText=l;l=fo5(z.style);k.cssText=[l,`background-image:url("${y}");`].join("")}};
IUT=function(l){const y=g.rt("html5-video-player");y&&g.I(y,"ytp-ad-display-override",l)};
TyT=function(l){switch(l.size){case "AD_AVATAR_SIZE_XXS":return 16;case "AD_AVATAR_SIZE_XS":return 24;case "AD_AVATAR_SIZE_S":return 32;case "AD_AVATAR_SIZE_M":return 36;case "AD_AVATAR_SIZE_L":return 56;case "AD_AVATAR_SIZE_XL":return 72;default:return 36}};
Vcg=function(l){const y=g.rt("html5-video-player");y&&g.I(y,"ytp-ad-display-override",l)};
Pf4=function(l){const y=g.rt("html5-video-player");y&&g.I(y,"ytp-ad-display-override",l)};
JlC=function(l){if(!l.adAvatar||!g.E(l.adAvatar,hf))return g.n(Error("VideoInterstitialButtonedCenteredLayoutRenderer has no avatar.")),!1;if(!l.headline)return g.n(Error("VideoInterstitialButtonedCenteredLayoutRenderer has no headline.")),!1;if(!l.adBadge||!g.E(l.adBadge,GL))return g.n(Error("VideoInterstitialButtonedCenteredLayoutRenderer has no ad badge.")),!1;if(!l.adButton||!g.E(l.adButton,a8))return g.n(Error("VideoInterstitialButtonedCenteredLayoutRenderer has no action button.")),!1;if(!l.adInfoRenderer||
!g.E(l.adInfoRenderer,I5))return g.n(Error("VideoInterstitialButtonedCenteredLayoutRenderer has no ad info button.")),!1;l=l.durationMilliseconds||0;return typeof l!=="number"||l<=0?(g.n(Error("durationMilliseconds was specified incorrectly in "+`VideoInterstitialButtonedCenteredLayoutRenderer with a value of: ${l}`)),!1):!0};
o8Q=function(l,y,k,z,r={},Z=!1,e=!1){switch(l){case "invideo-overlay":l=new Y64(y,z,r,k);break;case "player-overlay":l=new pNC(y,z,r,k,new i3(y),e);break;case "player-overlay-layout":l=new Kf_(y,z,r,k,new i3(y));break;case "survey":l=new g8s(y,z,r,k);break;case "ad-action-interstitial":l=new E85(y,z,r,k,Z,e);break;case "video-interstitial-buttoned-centered":l=new fU5(y,z,r,k);break;case "survey-interstitial":l=new j6Q(y,z,r,k);break;case "ad-message":l=new S6s(y,z,r,k,new i3(y,1));break;case "player-underlay":l=
new n84(y,z,r,k);break;case "display-underlay-text-grid-cards":l=new FfC(y,z,r,k,new i3(y));break;default:return null}return l};
Nyg=function(l,y){l=g.ko(l.components,y.id,null);l==null&&g.WH(Error("Component not found for element id: "+y.id));return l||null};
U3=function(l,y){y===l.Tz&&(l.Tz=void 0)};
nug=function(l,y,k=[],z="",r="",Z,e){const A=yP(l.Z).E7,Q=l.player.getVideoData({playerType:1});Q&&Q.getPlayerResponse();Q&&Q.UA();k=s64(y,k,A,yP(l.Z).TQ);LKs(yP(l.Z).VK,z,k.Jo,k.ZA,y,r,Z,e)};
LfQ=function(l){var y=yP(l.Z).Nx,k=y.V().yV("SLOT_TYPE_PLAYER_BYTES",1);y=O1(y.wb.get(),1).clientPlaybackNonce;let z=!1;for(const r of k)k=r.slotType==="SLOT_TYPE_PLAYER_BYTES"&&r.slotEntryTrigger instanceof K0?r.slotEntryTrigger.dN:void 0,k&&k===y&&(z&&EP("More than 1 preroll playerBytes slot detected",r),z=!0);z||yP(l.Z).Gl.Wu()};
v8e=function(l){l=yP(l.Z).LJ;let y="";for(const k of l.q7.keys()){if(k.slotType==="SLOT_TYPE_PLAYER_BYTES"&&k.f_==="core")return!0;y+=k.slotType+" "}Math.random()<.01&&EP("Ads Playback Not Managed By Controlflow",void 0,null,{slotTypes:y});return!1};
MZ=function(l){l=yP(l.Z).LJ;for(const y of l.q7.values())if(y.layoutType==="LAYOUT_TYPE_MEDIA_BREAK")return!0;return!1};
By5=function(l){l.created!==l.loaded&&EP("Created and loaded are out of sync")};
s64=function(l,y,k,z){y={Jo:[],ZA:y};for(const Z of l){if(!Z)continue;if(Z.renderer==null)continue;l=Z.renderer;if(!k.L.O().X("html5_enable_vod_lasr_with_notify_pacf")){var r=z;g.E(l.sandwichedLinearAdRenderer?.adVideoStart,wX)?(r=JZq(g.E(l.sandwichedLinearAdRenderer?.adVideoStart,wX),r),g.Kz(l.sandwichedLinearAdRenderer.adVideoStart,wX,r)):g.E(l.linearAdSequenceRenderer?.adStart,wX)&&(r=JZq(g.E(l.linearAdSequenceRenderer?.adStart,wX),r),g.Kz(l.linearAdSequenceRenderer.adStart,wX,r))}y.Jo.push(Z)}return y};
g.X4=function(l){if(typeof DOMParser!="undefined")return hY(new DOMParser,ku(l),"application/xml");throw Error("Your browser does not support loading xml documents");};
g.Hge=function(l){const y=l.O();return y.BF&&!y.N&&g.u9(y)?l.isEmbedsShortsMode()?(l=l.rz(),Math.min(l.width,l.height)>=315):!l.xw():!1};
Rxz=function(l){for(let y=0;y<16;++y){const k=new g.H({U:"a",B:"ytp-suggestion-link",G:{href:"{{link}}",target:l.api.O().D,"aria-label":"{{aria_label}}"},W:[{U:"div",B:"ytp-suggestion-image"},{U:"div",B:"ytp-suggestion-overlay",G:{style:"{{blink_rendering_hack}}","aria-hidden":"{{aria_hidden}}"},W:[{U:"div",B:"ytp-suggestion-title",Nd:"{{title}}"},{U:"div",B:"ytp-suggestion-author",Nd:"{{author_and_views}}"},{U:"div",G:{"data-is-live":"{{is_live}}"},B:"ytp-suggestion-duration",Nd:"{{duration}}"}]}]});
g.x(l,k);const z=k.qd("ytp-suggestion-link");g.n9(z,"transitionDelay",`${y/20}s`);l.N.j(z,"click",r=>{var Z=y;if(l.C){var e=l.suggestionData[Z],A=e.sessionData;l.J&&l.api.X("web_player_log_click_before_generating_ve_conversion_params")?(l.api.logClick(l.Z[Z].element),Z=e.A6(),e={},g.JI(l.api,e),Z=g.UI(Z,e),g.Hl(Z,l.api,r)):g.Bl(r,l.api,l.J,A||void 0)&&l.api.E2(e.videoId,A,e.playlistId)}else r.preventDefault(),document.activeElement.blur()});
k.Uj(l.suggestions.element);l.Z.push(k);l.api.createServerVe(k.element,k)}};
DX4=function(l){if(l.api.O().X("web_player_log_click_before_generating_ve_conversion_params")){var y=Math.floor(-l.scrollPosition/(l.V+8));const k=Math.min(y+l.columns,l.suggestionData.length)-1;for(;y<=k;y++)l.api.logVisibility(l.Z[y].element,!0)}};
g.cb=function(l){var y=l.api.qV()?32:16;y=l.K/2+y;l.next.element.style.bottom=`${y}px`;l.previous.element.style.bottom=`${y}px`;y=l.scrollPosition;const k=l.containerWidth-l.suggestionData.length*(l.V+8);g.I(l.element,"ytp-scroll-min",y>=0);g.I(l.element,"ytp-scroll-max",y<=k)};
yfC=function(l){var y=l.suggestionData.length;for(let Z=0;Z<y;++Z){var k=void 0,z=void 0;let e=void 0;k=l;var r=k.api.O();const A=k.suggestionData[Z],Q=k.Z[Z];e=k.api.isEmbedsShortsMode()?A.shortViewCount||"":A.shortViewCount?`${A.author} \u2022 ${A.shortViewCount}`:A.author;Q.element.style.display="";g.n9(Q.qd("ytp-suggestion-link"),"display","inline-block");l$s.test(A.title)&&(Q.qd("ytp-suggestion-title").dir="rtl");l$s.test(e)&&(Q.qd("ytp-suggestion-author").dir="rtl");z=A.isLivePlayback?"Tr\u1ef1c ti\u1ebfp":
A.lengthSeconds?g.Sr(A.lengthSeconds):"";let t=A.A6(k.api.isEmbedsShortsMode());if(g.u9(r)&&!r.X("web_player_log_click_before_generating_ve_conversion_params")){const O={};g.UB(k.api,"addEmbedsConversionTrackingParams",[O]);t=g.UI(t,O)}r.X("web_player_log_click_before_generating_ve_conversion_params")&&(r=(r=A.sessionData)&&r.itct)&&k.api.setTrackingParams(Q.element,r);Q.update({author_and_views:e,duration:z,link:t,title:A.title,aria_label:A.ariaLabel||A.title,is_live:A.isLivePlayback,aria_hidden:!!A.ariaLabel,
blink_rendering_hack:g.Mx||g.Yf?"will-change: opacity":void 0});z=Q.qd("ytp-suggestion-image");k=k.api.isEmbedsShortsMode()?A.uE("hq2.jpg"):A.uE();z.style.backgroundImage=k?`url(${k})`:""}if(y<16)for(;y<16;++y)g.n9(l.Z[y].qd("ytp-suggestion-link"),"display","none");g.cb(l)};
lQ=[];y5C=typeof Object.create=="function"?Object.create:function(l){function y(){}
y.prototype=l;return new y};
lg5=typeof Object.defineProperties=="function"?Object.defineProperty:function(l,y,k){if(l==Array.prototype||l==Object.prototype)return l;l[y]=k.value;return l};
Qz=globalThis;z5="Int8 Uint8 Uint8Clamped Int16 Uint16 Int32 Uint32 Float32 Float64".split(" ");Qz.BigInt64Array&&(z5.push("BigInt64"),z5.push("BigUint64"));var k5e=Object.setPrototypeOf;$4("Symbol.dispose",function(l){return l?l:Symbol("Symbol.dispose")});
$4("SuppressedError",function(l){function y(k,z,r){if(!(this instanceof y))return new y(k,z,r);r=Error(r);"stack"in r&&(this.stack=r.stack);this.message=r.message;this.error=k;this.suppressed=z}
if(l)return l;z_C(y,Error);y.prototype.name="SuppressedError";return y});
$4("String.prototype.replaceAll",function(l){return l?l:function(y,k){if(y instanceof RegExp&&!y.global)throw new TypeError("String.prototype.replaceAll called with a non-global RegExp argument.");return y instanceof RegExp?this.replace(y,k):this.replace(new RegExp(String(y).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08"),"g"),k)}});
$4("Array.prototype.at",function(l){return l?l:OT});
A5("at",function(l){return l?l:OT});
$4("String.prototype.at",function(l){return l?l:OT});
$4("Promise.withResolvers",function(l){return l?l:function(){var y,k;return{promise:new Promise(function(z,r){y=z;k=r}),
resolve:y,reject:k}}});
$4("Array.prototype.findLastIndex",function(l){return l?l:function(y,k){return G5(this,y,k).qR}});
A5("findLastIndex",function(l){return l?l:function(y,k){return G5(this,y,k).qR}});var PU,x4,r5Q;PU=PU||{};g.aC=this||self;x4="closure_uid_"+(Math.random()*1E9>>>0);r5Q=0;g.J5(ET,Error);ET.prototype.name="CustomError";var Rm;var kLC={NONE:0,mz:1},ziC={A5:0,Aaz:1,yaj:2,wGr:3},CQ={U5:"a",S9:"d",VIDEO:"v"};var rfQ=class{constructor(){this.Pa=0;this.Z=!1;this.C=-1;this.eY=!1;this.Fk=0}isVisible(){return this.eY?this.Pa>=.3:this.Pa>=.5}};var b3={VO:0,W4:1},ZQC={NONE:0,WD:1,bZ:2};var eR="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");var u3=class{constructor(){this.C=null;this.Z=!1}getValue(){return this.C}},ag4=class extends u3{constructor(l){super();this.V=l}N(l){this.C===null&&g.BO(this.V,l)&&(this.C=l)}},eiC=class extends u3{N(l){this.C===null&&typeof l==="number"&&(this.C=l)}},iCq=class extends u3{N(l){this.C===null&&typeof l==="string"&&(this.C=l)}};var AfP=class{constructor(){this.Z={};this.C=!0;this.N={}}disable(){this.C=!1}enable(){this.C=!0}isEnabled(){return this.C}reset(){this.Z={};this.C=!0;this.N={}}};var $Z_=l=>{$o(l,"od",kLC);$o(l,"opac",b3).Z=!0;$o(l,"sbeos",b3).Z=!0;$o(l,"prf",b3).Z=!0;$o(l,"mwt",b3).Z=!0;$o(l,"iogeo",b3)};var FL=document,qj=window;var Q8Q=Xy(1,!0),cC=Xy(610401301,!1);Xy(899588437,!1);Xy(772657768,!0);Xy(513659523,!1);Xy(568333945,!0);var w7q=Xy(1331761403,!1);Xy(651175828,!1);Xy(722764542,!1);Xy(748402145,!1);Xy(748402146,!1);var i0=Xy(748402147,!0),xD=Xy(824648567,!0),Pi=Xy(824656860,!0);Xy(333098724,!1);Xy(861377723,!1);Xy(861377724,!1);Xy(869336903,!1);Xy(2147483644,!1);Xy(2147483645,!1);Xy(2147483646,Q8Q);Xy(2147483647,!0);var C3=!!g.UT("yt.config_.EXPERIMENTS_FLAGS.html5_enable_client_hints_override");var Tqe=/&/g,VsC=/</g,PQq=/>/g,J55=/"/g,YTs=/'/g,pes=/\x00/g,Igg=/[\x00&<>"']/;var br,ty4=g.aC.navigator;br=ty4?ty4.userAgentData||null:null;var K3=globalThis.trustedTypes,g4;var f3=class{constructor(l){this.Z=l}toString(){return this.Z+""}};var n3=class{constructor(l){this.Z=l}toString(){return this.Z}},uyt=new n3("about:invalid#zClosurez");var og=class{constructor(l){this.Ij=l}},OQC=Ng("tel"),dZg=Ng("sms"),sl=[Ng("data"),Ng("http"),Ng("https"),Ng("mailto"),Ng("ftp"),new og(l=>/^[^:]*([/?#]|$)/.test(l))],xt_=/^\s*(?!javascript:)(?:[\w+.-]+:|[^:/?#]*(?:[/?#]|$))/i;var De=class{constructor(l){this.Z=l}toString(){return this.Z+""}};var rf=class{constructor(l){this.Z=l}toString(){return this.Z+""}};var QN=class{constructor(l){this.Z=l}toString(){return this.Z}};var df={};JY[" "]=function(){};var Nj,e$,K$z,wbP,hiq,GLC,vu,L2,mF;g.Yf=qg();g.wx=WC();g.eG=xo("Edge");g.pA=g.eG||g.wx;Nj=xo("Gecko")&&!(ir(g.Xv(),"WebKit")&&!xo("Edge"))&&!(xo("Trident")||xo("MSIE"))&&!xo("Edge");g.tV=ir(g.Xv(),"WebKit")&&!xo("Edge");e$=VN();K$z=PZ();g.WD=WZ();wbP=Im();hiq=xo("iPad");GLC=xo("iPod");vu=Te();L2=ir(g.Xv(),"KaiOS");
a:{let l="";const y=function(){const k=g.Xv();if(Nj)return/rv:([^\);]+)(\)|;)/.exec(k);if(g.eG)return/Edge\/([\d\.]+)/.exec(k);if(g.wx)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(k);if(g.tV)return/WebKit\/(\S+)/.exec(k);if(g.Yf)return/(?:Version)[ \/]?(\S+)/.exec(k)}();
y&&(l=y?y[1]:"");if(g.wx){var qZ;const k=g.aC.document;qZ=k?k.documentMode:void 0;if(qZ!=null&&qZ>parseFloat(l)){mF=String(qZ);break a}}mF=l}var pK=mF,E45={};var us,x9;g.N2=Vm();us=Im()||xo("iPod");x9=xo("iPad");g.Wb=Yo();g.Mx=PC();g.Km=Jm()&&!Te();var O3_=!g.wx&&!Jm();g.b=g.jD.prototype;g.b.clone=function(){return new g.jD(this.x,this.y)};
g.b.equals=function(l){return l instanceof g.jD&&nK(this,l)};
g.b.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};
g.b.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};
g.b.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};
g.b.scale=function(l,y){this.x*=l;this.y*=typeof y==="number"?y:l;return this};g.b=g.Fn.prototype;g.b.clone=function(){return new g.Fn(this.width,this.height)};
g.b.aspectRatio=function(){return this.width/this.height};
g.b.isEmpty=function(){return!Ny(this)};
g.b.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};
g.b.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};
g.b.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};
g.b.scale=function(l,y){this.width*=l;this.height*=typeof y==="number"?y:l;return this};var IN=class{constructor(l,y){this.Z=l===Td&&y||""}toString(){return this.Z}},Td={};new IN(Td,"");var LK=/^[a-z][a-z\d-]*$/i,n4C="APPLET BASE EMBED IFRAME LINK MATH META OBJECT SCRIPT STYLE SVG TEMPLATE".split(" "),o4P="AREA BR COL COMMAND HR IMG INPUT KEYGEN PARAM SOURCE TRACK WBR".split(" "),sCy=["action","formaction","href"];var Zj={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};g.b=BZ.prototype;g.b.Jv=function(l){return l4(this.Z,l)};
g.b.getElementsByTagName=function(l,y){return(y||this.Z).getElementsByTagName(String(l))};
g.b.qd=function(l){return g.rt(l,this.Z)};
g.b.setProperties=eU;g.b.createElement=function(l){return dt(this.Z,l)};
g.b.appendChild=g.i4;g.b.append=function(l,y){wt(HZ(l),l,arguments,1)};
g.b.canHaveChildren=function(l){if(l.nodeType!=1)return!1;switch(l.tagName){case "APPLET":case "AREA":case "BASE":case "BR":case "COL":case "COMMAND":case "EMBED":case "FRAME":case "HR":case "IMG":case "INPUT":case "IFRAME":case "ISINDEX":case "KEYGEN":case "LINK":case "NOFRAMES":case "NOSCRIPT":case "META":case "OBJECT":case "PARAM":case "SCRIPT":case "SOURCE":case "STYLE":case "TRACK":case "WBR":return!1}return!0};
g.b.removeNode=g.XI;g.b.getChildren=function(l){return l.children};
g.b.contains=g.cf;g.b.isFocusable=u4;var a$t=class{constructor(){this.Z=this.e0=null}};var iQ4=class{now(){return 0}C(){return 0}N(){return 0}Z(){return 0}};var UZC=class extends iQ4{constructor(){super();if(!Wf())throw Error();}now(){return Wf()&&qj.performance.now?qj.performance.now():super.now()}C(){return Wf()&&qj.performance.memory?qj.performance.memory.totalJSHeapSize||0:super.C()}N(){return Wf()&&qj.performance.memory?qj.performance.memory.usedJSHeapSize||0:super.N()}Z(){return Wf()&&qj.performance.memory?qj.performance.memory.jsHeapSizeLimit||0:super.Z()}};var Mly=Ip("AnimationEnd"),N_=Ip("TransitionEnd");g.b=p9.prototype;g.b.getHeight=function(){return this.bottom-this.top};
g.b.clone=function(){return new p9(this.top,this.right,this.bottom,this.left)};
g.b.contains=function(l){return this&&l?l instanceof p9?l.left>=this.left&&l.right<=this.right&&l.top>=this.top&&l.bottom<=this.bottom:l.x>=this.left&&l.x<=this.right&&l.y>=this.top&&l.y<=this.bottom:!1};
g.b.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};
g.b.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};
g.b.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};
g.b.scale=function(l,y){y=typeof y==="number"?y:l;this.left*=l;this.right*=l;this.top*=y;this.bottom*=y;return this};g.b=g.f9.prototype;g.b.clone=function(){return new g.f9(this.left,this.top,this.width,this.height)};
g.b.contains=function(l){return l instanceof g.jD?l.x>=this.left&&l.x<=this.left+this.width&&l.y>=this.top&&l.y<=this.top+this.height:this.left<=l.left&&this.left+this.width>=l.left+l.width&&this.top<=l.top&&this.top+this.height>=l.top+l.height};
g.b.getSize=function(){return new g.Fn(this.width,this.height)};
g.b.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};
g.b.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};
g.b.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};
g.b.scale=function(l,y){y=typeof y==="number"?y:l;this.left*=l;this.width*=l;this.top*=y;this.height*=y;return this};var v4Q=/^--.+/,op={};var R__=Pf(()=>{let l=!1;try{const y=Object.defineProperty({},"passive",{get(){l=!0}});g.aC.addEventListener("test",null,y)}catch(y){}return l});var MyQ=class{isVisible(){return t2(FL)===1}};var DtC=RegExp("^https?://(\\w|-)+\\.cdn\\.ampproject\\.(net|org)(\\?|/|$)"),lBq=class{constructor(l,y,k){this.Z=l;this.C=y;this.N=k}},Gn=class{constructor(l,y){this.url=l;this.Z=!!y;this.depth=null}};var RY=class{constructor(){this.N="&";this.C={};this.V=0;this.Z=[]}wZ(l,y,k){l=l+"//"+y+k;var z=z1C(this)-k.length;if(z<0)return"";this.Z.sort((r,Z)=>r-Z);
k=null;y="";for(let r=0;r<this.Z.length;r++){const Z=this.Z[r],e=this.C[Z];for(let A=0;A<e.length;A++){if(!z){k=k==null?Z:k;break}let Q=cG(e[A],this.N,",$");if(Q){Q=y+Q;if(z>=Q.length){z-=Q.length;l+=Q;y=this.N;break}k=k==null?Z:k}}}z="";k!=null&&(z=`${y}${"trn"}=${k}`);return l+z}};var I8=class{constructor(l,y){this.Z=l;this.depth=y}},ZRQ=()=>{var l=aU();const y=Math.max(l.length-1,0);var k=iN(l);l=k.Z;var z=k.C;const r=k.N,Z=[];k=(A,Q)=>A==null?Q:A;
r&&Z.push(new I8([r.url,r.Z?2:0],k(r.depth,1)));z&&z!=r&&Z.push(new I8([z.url,2],0));l.url&&l!=r&&Z.push(new I8([l.url,0],k(l.depth,y)));const e=g.sT(Z,(A,Q)=>Z.slice(0,Z.length-Q));
!l.url||(r||z)&&l!=r||(z=/https?:\/\/[^\/]+/.exec(l.url)?.[0]??"")&&e.push([new I8([z,1],k(l.depth,y))]);e.push([]);return g.sT(e,A=>rpC(y,A))};var GxC=Cx(l=>typeof l==="number"),QY=Cx(l=>typeof l==="string"),q9=Cx(l=>l!=null&&typeof l==="object"&&typeof l.then==="function"),h74=Cx(l=>typeof l==="function"),Xby=Cx(l=>!!l&&(typeof l==="object"||typeof l==="function"));var yp5={yv:"allow-forms",Az:"allow-modals",wd:"allow-orientation-lock",xb:"allow-pointer-lock",fk:"allow-popups",i8:"allow-popups-to-escape-sandbox",l8:"allow-presentation",jz:"allow-same-origin",FH:"allow-scripts",O$:"allow-top-navigation",G_:"allow-top-navigation-by-user-activation"},Apz=Pf(()=>kxy());var qb=l=>{const y="NV";if(l.NV&&l.hasOwnProperty(y))return l.NV;const k=new l;l.NV=k;l.hasOwnProperty(y);return k};var ORs=class{constructor(){this.C=new MyQ;this.Z=Wf()?new UZC:new iQ4}setInterval(l,y){return qj.setInterval(l,y)}clearInterval(l){qj.clearInterval(l)}setTimeout(l,y){return qj.setTimeout(l,y)}clearTimeout(l){qj.clearTimeout(l)}};var tft=class{};var jq=!0,fp,WG;var YU={},jJ=null;var SJ=/[-_.]/g,wOe={"-":"+",_:"/",".":"="},Nb={};var oU=class{isEmpty(){return this.Z==null}sizeBytes(){const l=vG(this);return l?l.length:0}constructor(l,y){Lx(y);this.Z=l;if(l!=null&&l.length===0)throw Error("ByteString should be constructed with non-empty values");}},FK;var RU=void 0;var kH=lj("jas",!0),Bh=lj(),r0=lj(),cfC=lj(),xRP=lj(),Syq=lj(),Vf5=lj(),l0=lj("m_m",!0),qyz=lj(),C3q=lj();[...Object.values({Pf:1,uj:2,L1:4,SO:8,F8e:16,H8:32,b9:64,Ua:128,ZS:256,HP7:512,eG:1024,LT:2048,pu:4096,Sn:8192})];var T7,bQt=[];bQt[kH]=7;T7=Object.freeze(bQt);var y3={},yY={},yR=Object.freeze({}),P_={},Ao={};var Nd=Cx(l=>l>=u45&&l<=xZz),u45=BigInt(Number.MIN_SAFE_INTEGER),xZz=BigInt(Number.MAX_SAFE_INTEGER);var OC=0,dP=0,f$;var YH=typeof BigInt==="function"?BigInt.asIntN:void 0,C2g=typeof BigInt==="function"?BigInt.asUintN:void 0,Sw=Number.isSafeInteger,xH=Number.isFinite,jw=Math.trunc,aBP=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;var Wvq={};var AO=class{},mZ5={tW:!0};var $d;var w0,hO;var Yyt=to(0),dZ={};var UO=class{constructor(l,y,k){this.buffer=l;if(k&&!y)throw Error();this.Z=y}};var q3e=class{constructor(l,y,k,z){this.C=null;this.S=!1;this.J=null;this.Z=this.N=this.V=0;this.init(l,y,k,z)}init(l,y,k,{CO:z=!1,zH:r=!1}={}){this.CO=z;this.zH=r;l&&(l=Mo(l,this.zH),this.C=l.buffer,this.S=l.Z,this.J=null,this.V=y||0,this.N=k!==void 0?this.V+k:this.C.length,this.Z=this.V)}free(){this.clear();TL.length<100&&TL.push(this)}clear(){this.C=null;this.S=!1;this.J=null;this.Z=this.N=this.V=0;this.CO=!1}reset(){this.Z=this.V}},TL=[];var pOt=class{constructor(l,y,k,z){if(TL.length){const r=TL.pop();r.init(l,y,k,z);l=r}else l=new q3e(l,y,k,z);this.Z=l;this.V=this.Z.Z;this.C=this.N=-1;Yh(this,z)}free(){this.Z.clear();this.C=this.N=-1;JF.length<100&&JF.push(this)}reset(){this.Z.reset();this.V=this.Z.Z;this.C=this.N=-1}},JF=[];var WFP=class{constructor(){if(P_!==P_)throw Error();}};var No=class{constructor(l,y){this.C=l>>>0;this.Z=y>>>0}},ok,v$=class{constructor(l,y){this.C=l>>>0;this.Z=y>>>0}},Lp;var I$T=class{constructor(){this.Z=[]}length(){return this.Z.length}end(){const l=this.Z;this.Z=[];return l}};var n2T=class{constructor(){this.N=[];this.C=0;this.Z=new I$T}};var tE=AE(),T$5=AE(),VP=AE(),Pb=AE(),Vys=AE(),P3g=AE(),Jf=AE(),Jf5=AE(),YD=AE(),Y3C=AE(),pb_=AE();var U4=class{constructor(l,y,k){this.Mx=G7(l,y,k,2048)}toJSON(){return d0(this)}jb(l){return JSON.stringify(d0(this,l))}clone(){const l=this.Mx,y=l[kH]|0;return Mh(this,l,y)?XU(this,l,!0):new this.constructor(US(l,y,!1))}};U4.prototype[l0]=y3;U4.prototype.toString=function(){return this.Mx.toString()};var Qx=class{constructor(l,y,k){this.HM=l;this.Rh=y;l=Pe(tE);this.Z=!!l&&k===l||!1}},KvQ=O4(function(l,y,k,z,r){if(l.C!==2)return!1;EO(l,Hh(y,z,k),r);return!0},wp),g2z=O4(function(l,y,k,z,r){if(l.C!==2)return!1;
EO(l,Hh(y,z,k),r);return!0},wp),mB=Symbol(),X3=Symbol(),bU=Symbol(),Tg=Symbol(),uU=Symbol(),hE,Gg;var KFq=to(0),gDQ=K$(function(l,y,k){if(l.C!==1)return!1;E4(y,k,TM(l.Z));return!0},jk,YD),EDz=K$(function(l,y,k,z){if(l.C!==1)return!1;
LZ(y,k,z,TM(l.Z));return!0},jk,YD),pQ=K$(function(l,y,k){if(xD)return l.C!==0?l=!1:(E4(y,k,c$(l.Z,UC)),l=!0),l;
if(l.C!==0)return!1;E4(y,k,c$(l.Z,ij));return!0},Sk,Jf),f$q=K$(function(l,y,k,z){if(xD)return l.C!==0?l=!1:(LZ(y,k,z,c$(l.Z,UC)),l=!0),l;
if(l.C!==0)return!1;LZ(y,k,z,c$(l.Z,ij));return!0},Sk,Jf),KQ=K$(function(l,y,k){if(l.C!==0)return!1;
E4(y,k,mx(l.Z));return!0},n$,Pb),j84=K$(function(l,y,k,z){if(l.C!==0)return!1;
LZ(y,k,z,mx(l.Z));return!0},n$,Pb),S3g=K$(function(l,y,k){if(xD)return l.C!==1?l=!1:(E4(y,k,Ik(l.Z)),l=!0),l;
if(l.C!==1)return!1;E4(y,k,W$(l.Z));return!0},function(l,y,k){Zv(l,k,vi(y))},Jf5),nDz=gp(function(l,y,k){if(xD)return l.C!==1&&l.C!==2?l=!1:(y=nZ(y,y[kH]|0,k),l.C==2?Fc(l,Ik,y):y.push(Ik(l.Z)),l=!0),l;
if(l.C!==1&&l.C!==2)return!1;y=nZ(y,y[kH]|0,k);l.C==2?Fc(l,W$,y):y.push(W$(l.Z));return!0},function(l,y,k){y=P2(vi,y,!1);
if(y!=null)for(let z=0;z<y.length;z++)Zv(l,k,y[z])},Jf5),FFt=K$(function(l,y,k){if(l.C!==5)return!1;
E4(y,k,qo(l.Z));return!0},function(l,y,k){y=VY(y);
y!=null&&(kq(l,k,5),Rk(l.Z,y))},P3g),oD5=K$(function(l,y,k){if(l.C!==0)return!1;
E4(y,k,Cp(l.Z));return!0},F3,T$5),N$T=K$(function(l,y,k,z){if(l.C!==0)return!1;
LZ(y,k,z,Cp(l.Z));return!0},F3,T$5),g$=K$(function(l,y,k){if(l.C!==2)return!1;
E4(y,k,Sq(l));return!0},oY,VP),s8q=gp(function(l,y,k){if(l.C!==2)return!1;
l=Sq(l);nZ(y,y[kH]|0,k).push(l);return!0},function(l,y,k){y=P2(Ru,y,!0);
if(y!=null)for(let e=0;e<y.length;e++){var z=l,r=k,Z=y[e];Z!=null&&ek(z,r,IU(Z))}},VP),LFt=K$(function(l,y,k,z){if(l.C!==2)return!1;
LZ(y,k,z,Sq(l));return!0},oY,VP),E3=function(l,y,k=tE){return new Qx(l,y,k)}(function(l,y,k,z,r){if(l.C!==2)return!1;
z=as(void 0,z);nZ(y,y[kH]|0,k).push(z);EO(l,z,r);return!0},function(l,y,k,z,r){if(Array.isArray(y)){for(let Z=0;Z<y.length;Z++)NJ(l,y[Z],k,z,r);
l=y[kH]|0;l&1||(y[kH]=l|1)}}),fQ=O4(function(l,y,k,z,r,Z){if(l.C!==2)return!1;
let e=y[kH]|0;Nh(y,e,Z,k,$H(e));y=Hh(y,z,k);EO(l,y,r);return!0},NJ),jy=K$(function(l,y,k){if(l.C!==2)return!1;
E4(y,k,np(l));return!0},function(l,y,k){y=Bi(y);
y!=null&&ek(l,k,Mo(y,!0).buffer)},Y3C),vDg=gp(function(l,y,k){if(l.C!==2)return!1;
l=np(l);nZ(y,y[kH]|0,k).push(l);return!0},function(l,y,k){y=P2(Bi,y,!1);
if(y!=null)for(let e=0;e<y.length;e++){var z=l,r=k,Z=y[e];Z!=null&&ek(z,r,Mo(Z,!0).buffer)}},Y3C),Sy=K$(function(l,y,k){if(l.C!==0)return!1;
E4(y,k,mx(l.Z)>>>0);return!0},function(l,y,k){y=VY(y);
y!=null&&y!=null&&(kq(l,k,0),DO(l.Z,y))},Vys),nQ=K$(function(l,y,k){if(l.C!==0)return!1;
E4(y,k,mx(l.Z));return!0},function(l,y,k){y=TA(y);
y!=null&&(y=parseInt(y,10),kq(l,k,0),lU(l.Z,y))},pb_);var B$Q=new Map,HQT=class extends WFP{constructor(l,y){super();this.typeName=l;this.Z=y;if(P_!==P_)throw Error();B$Q.set(l,this)}};var DZC=class{constructor(l){var y=Ris;this.Z=l;this.isRepeated=0;this.C=DD;this.defaultValue=void 0;this.N=y.messageId!=null?Ao:void 0}register(){JY(this)}};var O$=class extends U4{constructor(l){super(l)}};O$.prototype.C=L$([0,K$(function(l,y,k){if(l.C!==1)return!1;l=TM(l.Z);E4(y,k,l===0?void 0:l);return!0},jk,YD),
K$(function(l,y,k){if(xD)return l.C!==0?y=!1:(l=c$(l.Z,UC),E4(y,k,l===KFq?void 0:l),y=!0),y;if(l.C!==0)return!1;l=c$(l.Z,ij);E4(y,k,l===0?void 0:l);return!0},Sk,Jf),
-2,K$(function(l,y,k){if(l.C!==0)return!1;l=mx(l.Z);E4(y,k,l===0?void 0:l);return!0},n$,Pb)]);var laP=class{constructor(l){this.N=l;this.Z=-1;this.C=this.V=0}};var yu5=class{constructor(l,y){this.C=l;this.N=y;this.Z=new laP(l)}};var k$5=class{constructor(){this.Z={}}G7(l){const y=this.Z[l.key];if(l.valueType==="proto"){try{const k=JSON.parse(y);if(Array.isArray(k))return k}catch(k){}return l.defaultValue}return typeof y===typeof l.defaultValue?y:l.defaultValue}};var zN5={W8:1,xP:2,s0:3,1:"POSITION",2:"VISIBILITY",3:"MONITOR_VISIBILITY"};var FvQ=class{constructor(){this.N=void 0;this.C=this.S=0;this.J=-1;this.QE=new AfP;$o(this.QE,"mv",ZQC).Z=!0;$o(this.QE,"omid",b3);$o(this.QE,"epoh",b3).Z=!0;$o(this.QE,"epph",b3).Z=!0;$o(this.QE,"umt",b3).Z=!0;$o(this.QE,"phel",b3).Z=!0;$o(this.QE,"phell",b3).Z=!0;$o(this.QE,"oseid",zN5).Z=!0;var l=this.QE;l.Z.sloi||(l.Z.sloi=new eiC);l.Z.sloi.Z=!0;$o(this.QE,"mm",CQ);$o(this.QE,"ovms",ziC).Z=!0;$o(this.QE,"xdi",b3).Z=!0;$o(this.QE,"amp",b3).Z=!0;$o(this.QE,"prf",b3).Z=!0;$o(this.QE,"gtx",b3).Z=
!0;$o(this.QE,"mvp_lv",b3).Z=!0;$o(this.QE,"ssmol",b3).Z=!0;$o(this.QE,"fmd",b3).Z=!0;$o(this.QE,"gen204simple",b3);this.Z=new yu5(xU(),this.QE);this.V=!1;this.flags=new k$5}PA(l){if(typeof l==="string"&&l.length!=0){var y=this.QE;if(y.C){l=l.split("&");for(let r=l.length-1;r>=0;r--){var k=l[r].split("="),z=decodeURIComponent(k[0]);k.length>1?(k=decodeURIComponent(k[1]),k=/^[0-9]+$/g.exec(k)?parseInt(k,10):k):k=1;(z=y.Z[z])&&z.N(k)}}}}};var rut=class{constructor(){let l="https:";qj&&qj.location&&qj.location.protocol==="http:"&&(l="http:");this.C=l;this.Z=.01}};var Zjy=class{constructor(l,y){this.error=l;this.meta={};this.context=y.context;this.msg=y.message||"";this.id=y.id||"jserror"}};var F4=null;var eNC=class{constructor(l,y,k){this.label=l;this.type=y;this.value=k;this.duration=0;this.taskId=this.slotId=void 0;this.uniqueId=Math.random()}};var k7=g.aC.performance,AuP=!!(k7&&k7.mark&&k7.measure&&k7.clearMarks),zo=Pf(()=>{var l;if(l=AuP){var y;l=window;if(F4===null){F4="";try{let k="";try{k=l.top.location.hash}catch(z){k=l.location.hash}k&&(F4=(y=k.match(/\bdeid=([\d,]+)/))?y[1]:"")}catch(k){}}y=F4;l=!!y.indexOf&&y.indexOf("1337")>=0}return l});var o2z=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$"),cL=/#|$/,seg=/[?&]($|#)/;var $sC=class{constructor(l=null){this.Z=t_;this.qF="jserror";this.Ls=!0;this.ZN=null;this.C=this.k_;this.Aj=l}k_(l,y,k,z,r){r=r||this.qF;let Z;try{const w=new RY;var e=w;e.Z.push(1);e.C[1]=Mb("context",l);y.error&&y.meta&&y.id||(y=new x7(uI(y)));e=y;if(e.msg){y=w;var A=e.msg.substring(0,512);y.Z.push(2);y.C[2]=Mb("msg",A)}var Q=e.meta||{};A=Q;if(this.ZN)try{this.ZN(A)}catch(h){}if(z)try{z(A)}catch(h){}z=w;Q=[Q];z.Z.push(3);z.C[3]=Q;Z=iN();if(Z.C){Q=w;var t=Z.C.url||"";Q.Z.push(4);Q.C[4]=Mb("top",
t)}var O={url:Z.Z.url||""};if(Z.Z.url){const h=g.ee(Z.Z.url);var d=Z3(h[1],null,h[3],h[4])}else d="";t=w;O=[O,{url:d}];t.Z.push(5);t.C[5]=O;Dv(this.Z,r,w,k)}catch(w){try{Dv(this.Z,r,{context:"ecmserr",rctx:l,msg:uI(w),url:Z&&Z.Z.url},k)}catch(h){}}return this.Ls}},x7=class extends Zjy{constructor(l){super(Error(l),{message:l})}};var t_,qA,o8=new class{constructor(l,y){this.events=[];this.C=y||g.aC;let k=null;y&&(y.google_js_reporting_queue=y.google_js_reporting_queue||[],this.events=y.google_js_reporting_queue,k=y.google_measure_js_timing);this.Z=zo()||(k!=null?k:Math.random()<l)}disable(){this.Z=!1;this.events!==this.C.google_js_reporting_queue&&(zo()&&g.Fy(this.events,rD),this.events.length=0)}start(l,y){if(!this.Z)return null;const k=yK()||lI();l=new eNC(l,y,k);y=`goog_${l.label}_${l.uniqueId}_start`;k7&&zo()&&k7.mark(y);
return l}end(l){if(this.Z&&typeof l.value==="number"){var y=yK()||lI();l.duration=y-l.value;y=`goog_${l.label}_${l.uniqueId}_end`;k7&&zo()&&k7.mark(y);!this.Z||this.events.length>2048||this.events.push(l)}}}(1,window),QTy=()=>{qj&&typeof qj.google_measure_js_timing!="undefined"&&(qj.google_measure_js_timing||o8.disable())};
t_=new rut;qA=new $sC(o8);qj&&qj.document&&(qj.document.readyState=="complete"?QTy():o8.Z&&QW(qj,"load",()=>{QTy()}));
var noq=l=>{qA.ZN=y=>{g.Fy(l,k=>{k(y)})}},Us=(l,y)=>mI(qA,l,y),bp=(l,y)=>WL(l,y),H3C=(l,y)=>{qA.k_(538,l,.01,y)};var To=Date.now(),PL=-1,IK=-1,fr,Jw=-1,VK=!1;var MG=class{constructor(l,y,k){var z=new p9(0,0,0,0);this.time=l;this.volume=null;this.N=y;this.Z=z;this.C=k}equals(l,y=!1){return!!l&&(!y||this.volume==l.volume)&&this.N==l.N&&gt(this.Z,l.Z)&&!0}};var t8y=class{constructor(l,y,k,z,r,Z,e,A){this.V=l;this.K=y;this.N=k;this.S=z;this.Z=r;this.J=Z;this.C=e;this.A=A}Jv(){return this.K}equals(l,y=!1){return this.V.equals(l.V,y)&&this.K==l.K&&gt(this.N,l.N)&&gt(this.S,l.S)&&this.Z==l.Z&&this.J==l.J&&this.C==l.C&&this.A==l.A}};var Oj5={currentTime:1,duration:2,isVpaid:4,volume:8,isYouTube:16,isPlaying:32},SA={XB:"start",fF:"firstquartile",qA:"midpoint",gx:"thirdquartile",COMPLETE:"complete",ERROR:"error",Jw:"metric",PAUSE:"pause",II:"resume",n3:"skip",wx:"viewable_impression",Q$:"mute",BN:"unmute",jL:"fullscreen",xx:"exitfullscreen",E5:"bufferstart",XL:"bufferfinish",FL:"fully_viewable_audible_half_duration_impression",V$:"measurable_impression",Rc:"abandon",wl:"engagedview",O5:"impression",Bp:"creativeview",LOADED:"loaded",
h$K:"progress",CLOSE:"close",ZV:"collapse",yn:"overlay_resize",Ax:"overlay_unmeasurable_impression",w9:"overlay_unviewable_impression",fu:"overlay_viewable_immediate_impression",xB:"overlay_viewable_end_of_session_impression",yA:"custom_metric_viewable",LF:"audio_audible",Pp:"audio_measurable",un:"audio_impression"},wZC="start firstquartile midpoint thirdquartile resume loaded".split(" "),hT=["start","firstquartile","midpoint","thirdquartile"],Cr5=["abandon"],AT={UNKNOWN:-1,XB:0,fF:1,qA:2,gx:3,COMPLETE:4,
Jw:5,PAUSE:6,II:7,n3:8,wx:9,Q$:10,BN:11,jL:12,xx:13,FL:14,V$:15,Rc:16,wl:17,O5:18,Bp:19,LOADED:20,yA:21,E5:22,XL:23,un:27,Pp:28,LF:29};var BoC={u8:"addEventListener",NZ:"getMaxSize",Vw:"getScreenSize",J4:"getState",o6:"getVersion",Eza:"removeEventListener",aE:"isViewable"};var $gC=()=>{const l=window.document;return l&&typeof l.elementFromPoint==="function"};var I1=(l,y)=>{y=Math.pow(10,y);return Math.floor(l*y)/y};var DRe=class{constructor(){this.N=!OU(qj.top);this.isMobileDevice=w7()||h2();const l=aU();this.domain=l.length>0&&l[l.length-1]!=null&&l[l.length-1].url!=null?g.$7(l[l.length-1].url)||"":"";this.Z=new p9(0,0,0,0);this.V=new g.Fn(0,0);this.J=new g.Fn(0,0);this.K=new p9(0,0,0,0);this.frameOffset=new g.jD(0,0);this.S=0;this.A=!1;this.C=!(!qj||!Y7(qj).H7);this.update(qj)}update(l){l&&l.document&&(this.K=KY(!1,l,this.isMobileDevice),this.Z=KY(!0,l,this.isMobileDevice),nY(this,l),Se(this,l))}};var dsz=class{constructor(l){this.N=l;this.C=0;this.Z=null}cancel(){xU().clearTimeout(this.Z);this.Z=null}schedule(){const l=xU(),y=H2().Z.Z;this.Z=l.setTimeout(B2(y,bp(143,()=>{this.C++;this.N.sample()})),v2C())}};var NZ=class{constructor(l,y,k="na"){this.N=l;this.WG=k;this.J=[];this.isInitialized=!1;this.V=new MG(-1,!0,this);this.Z=this;this.Y=y;this.HG=this.b0=!1;this.mK="uk";this.u0=!1;this.K=!0}sj(){return!1}initialize(){return this.isInitialized=!0}D(){return this.Z.mK}Ja(){return this.Z.HG}fail(l,y=!1){if(!this.HG||y)this.HG=!0,this.mK=l,this.Y=0,this.Z!=this||sI(this)}getName(){return this.Z.WG}XE(){return this.Z.gb()}gb(){return{}}gg(){return this.Z.Y}PG(){var l=je();l.Z=KY(!0,this.N,l.isMobileDevice)}Xr(){Se(je(),
this.N)}xz(){return this.V.Z}sample(){}isActive(){return this.Z.K}C_(l){const y=this.Z;this.Z=l.gg()>=this.Y?l:this;y!==this.Z?(this.K=this.Z.K,sI(this)):this.K!==this.Z.K&&(this.K=this.Z.K,sI(this))}S(l){if(l.C===this.Z){const y=!this.V.equals(l,this.b0);this.V=l;y&&NA(this)}}xN(){return this.b0}dispose(){this.u0=!0}IR(){return this.u0}};var wxe=class{constructor(l,y,k,z){this.element=l;this.Z=new p9(0,0,0,0);this.N=null;this.Y=new p9(0,0,0,0);this.C=y;this.QE=k;this.xz=z;this.PG=!1;this.timestamp=-1;this.RR=new t8y(y.V,this.element,this.Z,new p9(0,0,0,0),0,0,Date.now()-To,0);this.A=void 0}observe(){return!0}unobserve(){}K(l){this.A=l}dispose(){if(!this.IR()){var l=this.C;g.Ap(l.J,this);l.b0&&this.xN()&&vL(l);this.unobserve();this.PG=!0}}IR(){return this.PG}XE(){return this.C.XE()}gg(){return this.C.gg()}D(){return this.C.D()}Ja(){return this.C.Ja()}C_(){}S(){this.J()}xN(){return this.xz}};var s3=class{constructor(l){this.A=!1;this.Z=l;this.K=()=>{}}gg(){return this.Z.gg()}D(){return this.Z.D()}Ja(){return this.Z.Ja()}create(l,y,k){let z=null;
this.Z&&(z=this.V(l,y,k),LY(this.Z,z));return z}Y(){return this.N()}N(){return!1}init(l){return this.Z.initialize()?(LY(this.Z,this),this.K=l,!0):!1}C_(l){l.gg()==0&&this.K(l.D(),this)}S(){}xN(){return!1}dispose(){this.A=!0}IR(){return this.A}XE(){return{}}};var hNC=class{constructor(l,y,k=0){this.N=k;this.C=l;this.Z=y==null?"":y}};var rh=class{constructor(){this.N=0;this.Z=[];this.C=!1}add(l,y,k){++this.N;l=new hNC(l,y,k);this.Z.push(new hNC(l.C,l.Z,l.N+this.N/4096));this.C=!0;return this}};var k0z=l=>{const y=l.C;l=l.Z;return l===""?y:typeof l==="boolean"?l?y:"":Array.isArray(l)?l.length===0?y:`${y}=${l.join()}`:`${y}=${g.ro(["mtos","tos","p"],y)?l:encodeURIComponent(l)}`};var rm_=class{constructor(l){this.Z=new rh;l!==void 0&&ymt(this.Z,l);this.Z.add("v","unreleased",-16)}toString(){let l="//pagead2.googlesyndication.com//pagead/gen_204";const y=lL(this.Z);y.length>0&&(l+="?"+y);return l}};var dyt=l=>{const y=[],k=[];g.fR(l,(z,r)=>{if(!(r in Object.prototype)&&typeof z!="undefined")switch(Array.isArray(z)&&(z=z.join(",")),z=[r,"=",z].join(""),r){case "adk":case "r":case "tt":case "error":case "mtos":case "tos":case "p":case "bs":y.unshift(z);break;case "req":case "url":case "referrer":case "iframe_loc":k.push(z);break;default:y.push(z)}});
return y.concat(k)},Zc=l=>{l=l.toString();
xU();uN(l)};var z6T=class{constructor(){this.Z=0}};g.zP.prototype.Cf=!1;g.zP.prototype.IR=function(){return this.Cf};
g.zP.prototype.dispose=function(){this.Cf||(this.Cf=!0,this.Vj())};
g.zP.prototype[Symbol.dispose]=function(){this.dispose()};
g.zP.prototype.addOnDisposeCallback=function(l,y){this.Cf?y!==void 0?l.call(y):l():(this.TJ||(this.TJ=[]),y&&(l=l.bind(y)),this.TJ.push(l))};
g.zP.prototype.Vj=function(){if(this.TJ)for(;this.TJ.length;)this.TJ.shift()()};var G$z=[0,pQ,FFt,-1];var LQ=class{constructor(){this.C=this.N=this.V=this.Z=0}update(l,y,k=!l){l&&(this.Z+=y,this.C+=y,this.V+=y,this.N=Math.max(this.N,this.V));k&&(this.V=0)}};var aaQ=[1,.75,.5,.3,0],vb=class{constructor(l=aaQ){this.C=l;this.Z=g.sT(this.C,()=>new LQ)}update(l,y,k,z,r,Z=!0){y=r?Math.min(l,y):y;
for(r=0;r<this.C.length;r++){var e=this.C[r];const A=y>0&&y>=e;e=!(l>0&&l>=e)||k;this.Z[r].update(Z&&A,z,!Z||e)}}};var ijC=class{constructor(){this.C=new vb;this.rb=this.RR=0;this.PG=new LQ;this.Y=this.K=-1;this.gb=1E3;this.xz=new vb([1,.9,.8,.7,.6,.5,.4,.3,.2,.1,0]);this.Ja=this.b0=-1}update(l,y,k,z){this.K=this.K!=-1?Math.min(this.K,y.Pa):y.Pa;this.Y=Math.max(this.Y,y.Pa);this.b0=this.b0!=-1?Math.min(this.b0,y.Fk):y.Fk;this.Ja=Math.max(this.Ja,y.Fk);this.xz.update(y.Fk,k.Fk,y.Z,l,z);this.RR+=l;y.Pa===0&&(this.rb+=l);this.C.update(y.Pa,k.Pa,y.Z,l,z);k=z||k.eY!=y.eY?k.isVisible()&&y.isVisible():k.isVisible();
y=!y.isVisible()||y.Z;this.PG.update(k,l,y)}dg(){return this.PG.N>=this.gb}};if(FL&&FL.URL){var UsP=FL.URL,Bb;a:{if(UsP){var M8T=RegExp(".*[&#?]google_debug(=[^&]*)?(&.*)?$");try{const l=M8T.exec(decodeURIComponent(UsP));if(l){Bb=l[1]&&l[1].length>1?l[1].substring(1):"true";break a}}catch{}}Bb=""}qA.Ls=!(Bb.length>0)}var FW=(l,y,k,z)=>{k=WL(z,k);QW(l,y,k,{capture:!1})};var XxC=new p9(0,0,0,0);var cuQ=new p9(0,0,0,0),CvQ=class extends g.zP{constructor(l,y){super();this.position=cuQ.clone();this.vC=this.HI();this.Cv=-2;this.timeCreated=Date.now();this.Ke=-1;this.LB=y;this.C6=null;this.hB=!1;this.iF=null;this.opacity=-1;this.requestSource=7;this.xk=!1;this.VY=()=>{};
this.tZ=()=>{};
this.rK=new a$t;this.rK.e0=l;this.rK.Z=l;this.kM=!1;this.XO={Lv:null,UL:null};this.W$=!0;this.Hy=null;this.Tf=this.K8=!1;H2().S++;this.Jl=this.XU();this.P9=-1;this.SI=null;this.hasCompleted=this.n8=!1;this.QE=new AfP;$Z_(this.QE);dgT(this);this.requestSource==1?Qm(this.QE,"od",1):Qm(this.QE,"od",0)}Vj(){if(this.rK.Z){if(this.XO.Lv){var l=this.rK.Z;typeof l.removeEventListener==="function"&&l.removeEventListener("mouseover",this.XO.Lv,$U());this.XO.Lv=null}this.XO.UL&&(l=this.rK.Z,typeof l.removeEventListener===
"function"&&l.removeEventListener("mouseout",this.XO.UL,$U()),this.XO.UL=null)}this.Hy&&this.Hy.dispose();this.SI&&this.SI.dispose();delete this.vC;delete this.VY;delete this.tZ;delete this.rK.e0;delete this.rK.Z;delete this.XO;delete this.Hy;delete this.SI;delete this.QE;super.Vj()}Kx(){return this.SI?this.SI.Z:this.position}PA(l){H2().PA(l)}xN(){return!1}HI(){return new ijC}BV(){return this.vC}yX(l){return cp(this,l,1E4)}Aa(l,y,k,z,r,Z,e){this.kM||(this.hB&&(l=this.Jh(l,k,r,e),z=z&&this.Jl.Pa>=
(this.eY()?.3:.5),this.cR(Z,l,z),this.LB=y,l.Pa>0&&-1===this.P9&&(this.P9=y),this.Ke==-1&&this.dg()&&(this.Ke=y),this.Cv==-2&&(this.Cv=a1(this.Kx())?l.Pa:-1),this.Jl=l),this.VY(this))}cR(l,y,k){this.BV().update(l,y,this.Jl,k)}XU(){return new rfQ}Jh(l,y,k,z){k=this.XU();k.Z=y;y=xU().C;y=t2(FL)===0?-1:y.isVisible()?0:1;k.C=y;k.Pa=this.XN(l);k.eY=this.eY();k.Fk=z;return k}XN(l){return this.opacity===0&&tm(this.QE,"opac")===1?0:l}eY(){return!1}SA(){return this.n8||this.K8}uT(){Date.now()}IC(){Date.now()}Kc(){return this.requestSource}Hj(){return 0}dg(){return this.vC.dg()}FG(){var l=
this.hB;l=(this.hasCompleted||this.IR())&&!l;const y=H2().C!==2||this.xk;return this.kM||y&&l?2:this.dg()?4:3}M8(){return 0}};g.Cr.prototype.next=function(){return g.Hb};
g.Hb={done:!0,value:void 0};g.Cr.prototype.kq=function(){return this};var bjq=class{constructor(){this.V=this.Z=this.N=this.C=this.J=0}};var urz=class extends rfQ{constructor(){super();this.fullscreen=!1;this.volume=void 0;this.paused=!1;this.mediaTime=-1}};var R8=(l,y,k=!0,z=()=>!0)=>r=>{const Z=r[l];
if(Array.isArray(Z)&&z(r))return xsy(Z,y,k)},D$=(l,y)=>k=>y(k)?k[l]:void 0,mse=l=>y=>{for(let k=0;k<l.length;k++)if(l[k]===y.e||l[k]===void 0&&!y.hasOwnProperty("e"))return!0;
return!1},xsy=(l,y,k=!0)=>k?g.oC(l,(z,r)=>g.ro(y,r)):g.sT(y,(z,r,Z)=>l.slice(r>0?Z[r-1]+1:0,z+1).reduce((e,A)=>e+A,0));var lv=mse([void 0,1,2,3,4,8,16]),yG=mse([void 0,4,8,16]),qvC={sv:"sv",v:"v",cb:"cb",e:"e",nas:"nas",msg:"msg","if":"if",sdk:"sdk",p:"p",p0:D$("p0",yG),p1:D$("p1",yG),p2:D$("p2",yG),p3:D$("p3",yG),cp:"cp",tos:"tos",mtos:"mtos",amtos:"amtos",mtos1:R8("mtos1",[0,2,4],!1,yG),mtos2:R8("mtos2",[0,2,4],!1,yG),mtos3:R8("mtos3",[0,2,4],!1,yG),mcvt:"mcvt",ps:"ps",scs:"scs",bs:"bs",vht:"vht",mut:"mut",a:"a",a0:D$("a0",yG),a1:D$("a1",yG),a2:D$("a2",yG),a3:D$("a3",yG),ft:"ft",dft:"dft",at:"at",dat:"dat",as:"as",
vpt:"vpt",gmm:"gmm",std:"std",efpf:"efpf",swf:"swf",nio:"nio",px:"px",nnut:"nnut",vmer:"vmer",vmmk:"vmmk",vmiec:"vmiec",nmt:"nmt",tcm:"tcm",bt:"bt",pst:"pst",vpaid:"vpaid",dur:"dur",vmtime:"vmtime",dtos:"dtos",dtoss:"dtoss",dvs:"dvs",dfvs:"dfvs",dvpt:"dvpt",fmf:"fmf",vds:"vds",is:"is",i0:"i0",i1:"i1",i2:"i2",i3:"i3",ic:"ic",cs:"cs",c:"c",c0:D$("c0",yG),c1:D$("c1",yG),c2:D$("c2",yG),c3:D$("c3",yG),mc:"mc",nc:"nc",mv:"mv",nv:"nv",qmt:D$("qmtos",lv),qnc:D$("qnc",lv),qmv:D$("qmv",lv),qnv:D$("qnv",lv),
raf:"raf",rafc:"rafc",lte:"lte",ces:"ces",tth:"tth",femt:"femt",femvt:"femvt",emc:"emc",emuc:"emuc",emb:"emb",avms:"avms",nvat:"nvat",qi:"qi",psm:"psm",psv:"psv",psfv:"psfv",psa:"psa",pnk:"pnk",pnc:"pnc",pnmm:"pnmm",pns:"pns",ptlt:"ptlt",pngs:"pings",veid:"veid",ssb:"ssb",ss0:D$("ss0",yG),ss1:D$("ss1",yG),ss2:D$("ss2",yG),ss3:D$("ss3",yG),dc_rfl:"urlsigs",obd:"obd",omidp:"omidp",omidr:"omidr",omidv:"omidv",omida:"omida",omids:"omids",omidpv:"omidpv",omidam:"omidam",omidct:"omidct",omidia:"omidia",
omiddc:"omiddc",omidlat:"omidlat",omiddit:"omiddit",nopd:"nopd",co:"co",tm:"tm",tu:"tu"},WCg=Object.assign({},qvC,{avid:Tf("audio"),avas:"avas",vs:"vs"}),Ia4={atos:"atos",avt:R8("atos",[2]),davs:"davs",dafvs:"dafvs",dav:"dav",ss:((l,y)=>k=>k[l]===void 0&&y!==void 0?y:k[l])("ss",0),
t:"t"};var Te5=class{constructor(){this.C=this.Z=""}};var V8P=class{};var Pv_=class{constructor(){this.C={vs:[1,0],vw:[0,1],am:[2,2],a:[4,4],f:[8,8],bm:[16,16],b:[32,32],avw:[0,64],avs:[64,0],pv:[256,256],gdr:[0,512],p:[0,1024],r:[0,2048],m:[0,4096],um:[0,8192],ef:[0,16384],s:[0,32768],pmx:[0,16777216],mut:[33554432,33554432],umutb:[67108864,67108864],tvoff:[134217728,134217728]};this.Z={};for(const l in this.C)this.C[l][1]>0&&(this.Z[l]=0);this.N=0}};var kr=class{constructor(){this.Z=this.C=0}getValue(){return this.C}update(l,y){l>=32||(this.Z&1<<l&&!y?this.C&=~(1<<l):this.Z&1<<l||!y||(this.C|=1<<l),this.Z|=1<<l)}};var JuQ=class extends ijC{constructor(){super();this.N=new LQ;this.u0=this.D=this.sj=0;this.A=-1;this.Oj=new LQ;this.J=new LQ;this.Z=new vb;this.S=this.V=-1;this.C_=new LQ;this.gb=2E3;this.HG=new kr;this.mK=new kr;this.Xr=new kr}update(l,y,k,z){if(!y.paused){super.update(l,y,k,z);var r=uL(y)&&uL(k),Z=(z?Math.min(y.Pa,k.Pa):k.Pa)>=.5;fY(y.volume)&&(this.V=this.V!=-1?Math.min(this.V,y.volume):y.volume,this.S=Math.max(this.S,y.volume));Z&&(this.sj+=l,this.D+=r?l:0);this.Z.update(y.Pa,k.Pa,y.Z,l,z,r);
this.N.update(!0,l);this.J.update(r,l);this.C_.update(k.fullscreen,l);this.Oj.update(r&&!Z,l);l=Math.floor(y.mediaTime/1E3);this.HG.update(l,y.isVisible());this.mK.update(l,y.Pa>=1);this.Xr.update(l,uL(y))}}};var YvC=class{constructor(){this.J=!1}C(l){this.J||(this.Z(l)?(l=E$(this.D,this.N,l),this.V|=l,l=l==0):l=!1,this.J=l)}};var z$=class extends YvC{constructor(l,y){super();this.N=l;this.D=y;this.V=0}Z(){return!0}S(){return!1}getId(){const l=HO(SA,y=>y==this.N);
return AT[l].toString()}toString(){let l="";this.S()&&(l+="c");this.J&&(l+="s");this.V>0&&(l+=`:${this.V}`);return this.getId()+l}};var pxt=class extends z${constructor(l,y){super(l,y);this.K=[]}C(l,y=null){y!=null&&this.K.push(y);super.C(l)}};var KCg=class{};var re=class extends KCg{C(){return null}N(){return[]}};var Za=class extends wxe{HG(){if(this.element){var l=this.element,y=this.C.Z.N;try{try{var k=gD(l.getBoundingClientRect())}catch(t){k=new p9(0,0,0,0)}const r=k.right-k.left,Z=k.bottom-k.top,e=yW(l,y),A=e.x,Q=e.y;var z=new p9(Math.round(Q),Math.round(A+r),Math.round(Q+Z),Math.round(A))}catch(r){z=XxC.clone()}this.N=z;this.Z=HL(this,this.N)}}Xr(){this.Y=this.C.V.Z}gb(l){const y=tm(this.QE,"od")==1;return tR5(l,this.Y,this.element,y)}mK(){this.timestamp=Date.now()-To}J(){this.mK();this.HG();if(this.element&&
typeof this.element.videoWidth==="number"&&typeof this.element.videoHeight==="number"){var l=this.element;var y=new g.Fn(l.videoWidth,l.videoHeight);l=this.Z;var k=K9(l),z=l.getHeight(),r=y.width;y=y.height;r<=0||y<=0||k<=0||z<=0||(r/=y,y=k/z,l=l.clone(),r>y?(k/=r,z=(z-k)/2,z>0&&(z=l.top+z,l.top=Math.round(z),l.bottom=Math.round(z+k))):(z*=r,k=Math.round((k-z)/2),k>0&&(k=l.left+k,l.left=Math.round(k),l.right=Math.round(k+z))));this.Z=l}this.Xr();l=this.Z;k=this.Y;l=l.left<=k.right&&k.left<=l.right&&
l.top<=k.bottom&&k.top<=l.bottom?new p9(Math.max(l.top,k.top),Math.min(l.right,k.right),Math.min(l.bottom,k.bottom),Math.max(l.left,k.left)):new p9(0,0,0,0);k=l.top>=l.bottom||l.left>=l.right?new p9(0,0,0,0):l;l=this.C.V;y=r=z=0;(this.Z.bottom-this.Z.top)*(this.Z.right-this.Z.left)>0&&(this.gb(k)?k=new p9(0,0,0,0):(z=je().V,y=new p9(0,z.height,z.width,0),z=iL(k,this.A??this.Z),r=iL(k,je().Z),y=iL(k,y)));k=k.top>=k.bottom||k.left>=k.right?new p9(0,0,0,0):Eq(k,-this.Z.left,-this.Z.top);oK()||(r=z=0);
this.RR=new t8y(l,this.element,this.Z,k,z,r,this.timestamp,y)}getName(){return this.C.getName()}};var grC=new p9(0,0,0,0),Er5=class extends Za{constructor(l,y,k){super(null,l,y,k);this.sj=l.isActive();this.b0=0}observe(){this.V();return!0}S(){super.J()}mK(){}HG(){}J(){this.V();super.J()}C_(l){l=l.isActive();l!==this.sj&&(l?this.V():(je().Z=new p9(0,0,0,0),this.Z=new p9(0,0,0,0),this.Y=new p9(0,0,0,0),this.timestamp=-1));this.sj=l}};var xge={firstquartile:0,midpoint:1,thirdquartile:2,complete:3},fa5=class extends CvQ{constructor(l,y,k,z=new re){super(l,y);this.p$=k;this.Gq=0;this.Lf={};this.KE=new Pv_;this.Nv={};this.s7="";this.mK=null;this.T7=!1;this.Z=[];this.zO=z.C();this.S=z.N();this.V=null;this.N=-1;this.u0=this.C_=void 0;this.b0=this.Y=0;this.HG=-1;this.xz=this.gb=!1;this.Ja=this.D=this.C=this.AA=this.WG=0;new vb;this.RR=this.PG=0;this.Xr=-1;this.I2=0;this.A=g.Vq;this.sj=[this.HI()];this.MW=2;this.IK={};this.IK.pause="p";
this.IK.resume="r";this.IK.skip="s";this.IK.mute="m";this.IK.unmute="um";this.IK.exitfullscreen="ef";this.J=null;this.Oj=this.kz=!1;this.hv=Math.floor(Date.now()/1E3-1704067200);this.rb=0}xN(){return!0}V4(){return this.I2==2}yX(l){return cp(this,l,Math.max(1E4,this.N/3))}Aa(l,y,k,z,r,Z,e){const A=this.A(this)||{};g.Am(A,r);this.N=A.duration||this.N;this.C_=A.isVpaid||this.C_;this.u0=A.isYouTube||this.u0;xU();this.Oj=!1;r=MRC(this,y);Yj(this)===1&&(Z=r);super.Aa(l,y,k,z,A,Z,e);this.zO&&this.zO.J&&
g.Fy(this.S,Q=>{Q.C(this)})}cR(l,y,k){super.cR(l,y,k);
pr(this).update(l,y,this.Jl,k);this.xz=uL(this.Jl)&&uL(y);this.HG==-1&&this.gb&&(this.HG=this.BV().N.Z);this.KE.N=0;l=this.dg();y.isVisible()&&mu(this.KE,"vs");l&&mu(this.KE,"vw");fY(y.volume)&&mu(this.KE,"am");uL(y)?mu(this.KE,"a"):mu(this.KE,"mut");this.Tf&&mu(this.KE,"f");y.C!=-1&&(mu(this.KE,"bm"),y.C==1&&(mu(this.KE,"b"),uL(y)&&mu(this.KE,"umutb")));uL(y)&&y.isVisible()&&mu(this.KE,"avs");this.xz&&l&&mu(this.KE,"avw");y.Pa>0&&mu(this.KE,"pv");Kr(this,this.BV().N.Z,!0)&&mu(this.KE,"gdr");dh(this.BV().C,
1)>=2E3&&mu(this.KE,"pmx");this.Oj&&mu(this.KE,"tvoff")}HI(){return new JuQ}BV(){return this.vC}XU(){return new urz}Jh(l,y,k,z=-1){l=super.Jh(l,y,k,z);l.fullscreen=this.Tf;l.paused=this.V4();l.volume=k.volume;fY(l.volume)||(this.WG++,y=this.Jl,fY(y.volume)&&(l.volume=y.volume));k=k.currentTime;l.mediaTime=k!==void 0&&k>=0?k:-1;return l}XN(l){return je(),this.Tf?1:super.XN(l)}Hj(){return 1}getDuration(){return this.N}FG(){return this.kM?2:gh(this)?5:this.dg()?4:3}M8(){return this.kz?this.BV().J.N>=
2E3?4:3:2}K(l){this.SI&&this.SI.K(l)}};var jTP=g.T5(),MxP=class{constructor(){this.Z={};const l=Oq();o1(this,l,document);const y=VRz();try{if("1"==y){for(let k=l.parent;k!=l.top;k=k.parent)o1(this,k,k.document);o1(this,l.top,l.top.document)}}catch(k){}}};var Sve=class{constructor(){this.Z=[];this.C=[]}reset(){this.Z=[];this.C=[]}},vp=qb(Sve);var A_=class{constructor(){this.Z=this.C=null}};var AYQ=class extends s3{constructor(l){l=Kiz(l);super(l.length?l[l.length-1]:new NZ(qj,0));this.J=l;this.C=null}getName(){return(this.C?this.C:this.Z).getName()}XE(){return(this.C?this.C:this.Z).XE()}gg(){return(this.C?this.C:this.Z).gg()}init(l){let y=!1;g.Fy(this.J,k=>{k.initialize()&&(y=!0)});
y&&(this.K=l,LY(this.Z,this));return y}dispose(){g.Fy(this.J,l=>{l.dispose()});
super.dispose()}Y(){return Be(this.J,l=>l.sj())}N(){return Be(this.J,l=>l.sj())}V(l,y,k){return new Za(l,this.Z,y,k)}S(l){this.C=l.C}};var goy={threshold:[0,.3,.5,.75,1]},nrC=class extends Za{constructor(l,y,k,z){super(l,y,k,z);this.u0=this.rb=this.b0=this.sj=this.V=null}observe(){this.u0||(this.u0=Date.now()-To);if(Us(298,()=>Eot(this)))return!0;
this.C.fail("msf");return!1}unobserve(){if(this.V&&this.element)try{this.V.unobserve(this.element),this.sj?(this.sj.unobserve(this.element),this.sj=null):this.b0&&(this.b0.disconnect(),this.b0=null)}catch(l){}}J(){const l=lp(this);l.length>0&&Dc(this,l);super.J()}HG(){}gb(){return!1}Xr(){}XE(){return Object.assign(this.C.XE(),{niot_obs:this.u0,niot_cbk:this.rb})}getName(){return"nio"}};var V7=class extends s3{constructor(l=qj){super(new NZ(l,2))}getName(){return"nio"}N(){return!je().C&&this.Z.Z.N.IntersectionObserver!=null}V(l,y,k){return new nrC(l,this.Z,y,k)}};var rYq=class extends NZ{constructor(){const l=y7();super(qj.top,l,"geo")}xz(){return je().Z}sj(){const l=y7();this.Y!==l&&(this.Z!=this&&l>this.Z.Y&&(this.Z=this,sI(this)),this.Y=l);return l==2}};var $A=class{};var FCt=class{constructor(){this.done=!1;this.Z={D1:0,WR:0,e3b:0,YD:0,RW:-1,mT:0,KG:0,Bg:0,UY:0};this.V=null;this.J=!1;this.N=null;this.S=0;this.C=new dsz(this)}sample(){z9(this,Bp(),!1)}},Z2=qb(FCt);var d5=null,pU="",YA=!1;var orq=()=>"av.default_js".includes("ima_html5_sdk")?{Y8:"ima",Z0:null}:"av.default_js".includes("ima_native_sdk")?{Y8:"nima",Z0:null}:"av.default_js".includes("admob-native-video-javascript")?{Y8:"an",Z0:null}:"youtube.player.web_20260308_08_RC00".includes("cast_js_sdk")?{Y8:"cast",Z0:w5()}:"youtube.player.web_20260308_08_RC00".includes("youtube.player.web")?{Y8:"yw",Z0:w5()}:"youtube.player.web_20260308_08_RC00".includes("outstream_web_client")?{Y8:"out",Z0:w5()}:"youtube.player.web_20260308_08_RC00".includes("drx_rewarded_web")?
{Y8:"r",Z0:w5()}:"youtube.player.web_20260308_08_RC00".includes("gam_native_web_video")?{Y8:"n",Z0:w5()}:"youtube.player.web_20260308_08_RC00".includes("admob_interstitial_video")?{Y8:"int",Z0:w5()}:{Y8:"j",Z0:null},eO=orq().Y8,mL=orq().Z0;var d2=(l,y)=>{const k={sv:"968"};mL!==null&&(k.v=mL);k.cb=eO;k.nas=vp.Z.length;k.msg=l;y!==void 0&&(l=w2(y))&&(k.e=AT[l]);return k},w2=l=>{const y=w4(l,"custom_metric_viewable")?"custom_metric_viewable":l.toLowerCase();
return HO(SA,k=>k==y)};var N4y={YA:"visible",R5:"audible",v2R:"time",UWr:"timetype"},h_={visible:l=>/^(100|[0-9]{1,2})$/.test(l),
audible:l=>l=="0"||l=="1",
timetype:l=>l=="mtos"||l=="tos",
time:l=>/^(100|[0-9]{1,2})%$/.test(l)||/^([0-9])+ms$/.test(l)},yYg=class{constructor(){this.Z=void 0;
this.C=!1;this.N=0;this.V=-1;this.J="tos"}setTime(l,y,k="tos"){y=="ms"?(this.N=l,this.V=-1):(this.N=-1,this.V=l);this.J=k;return this}};var keQ=class extends z${constructor(l,y,k,z){super(y,z);this.K=l;this.A=k}getId(){return this.K}S(){return!0}Z(l){const y=l.BV(),k=l.getDuration();return Be(this.A,z=>{if(z.Z!=void 0)var r=Lis(z,y);else b:{switch(z.J){case "mtos":r=z.C?y.J.N:y.N.Z;break b;case "tos":r=z.C?y.J.Z:y.N.Z;break b}r=0}r==0?z=!1:(z=z.N!=-1?z.N:k!==void 0&&k>0?z.V*k:-1,z=z!=-1&&r>=z);return z})}};var Ne4=class extends V8P{Z(l){const y=new Te5;y.Z=xj(l,qvC);y.C=xj(l,Ia4);return y}};var sT5=class extends z${constructor(l){super("fully_viewable_audible_half_duration_impression",l)}Z(l){return gh(l)}};var LCT=class extends KCg{constructor(l){super();this.Z=l}};var vrP=class extends z${constructor(l){super("viewable_impression",l)}Z(l){return l.BV().dg()}};var BeP=class extends pxt{constructor(l){super("measurable_impression",l)}Z(l){const y=g.ro(this.K,tm(H2().QE,"ovms"));return!l.kM&&(l.I2!=0||y)}};var Hj5=class extends LCT{C(){return new BeP(this.Z)}N(){return[new vrP(this.Z),new sT5(this.Z)]}};var RN5=class extends Er5{V(){const l=g.UT("ima.admob.getViewability"),y=tm(this.QE,"queryid");typeof l==="function"&&y&&l(y)}getName(){return"gsv"}};var ZKe=class extends s3{constructor(){super(new NZ(qj,2))}getName(){return"gsv"}N(){const l=je();H2();return l.C&&!1}V(l,y,k){return new RN5(this.Z,y,k)}};var Dsz=class extends Er5{V(){const l=g.UT("ima.bridge.getNativeViewability"),y=tm(this.QE,"queryid");typeof l==="function"&&y&&l(y,k=>{g.DB(k)&&this.b0++;const z=k.opt_nativeViewVisibleBounds||{},r=k.opt_nativeViewHidden;this.Z=EI(k.opt_nativeViewBounds||{});const Z=this.C.V;Z.Z=r?grC.clone():EI(z);this.timestamp=k.opt_nativeTime||-1;je().Z=Z.Z;k=k.opt_nativeVolume;k!==void 0&&(Z.volume=k)})}getName(){return"nis"}};var eJy=class extends s3{constructor(){super(new NZ(qj,2))}getName(){return"nis"}N(){const l=je();H2();return l.C&&!1}V(l,y,k){return new Dsz(this.Z,y,k)}};var G9=class extends NZ{constructor(){super(qj,2,"mraid");this.Oj=0;this.RR=this.rb=!1;this.A=null;this.C=Y7(this.N);this.V.Z=new p9(0,0,0,0);this.kz=!1}sj(){return this.C.H7!=null}gb(){const l={};this.Oj&&(l.mraid=this.Oj);this.rb&&(l.mlc=1);l.mtop=this.C.qC;this.A&&(l.mse=this.A);this.kz&&(l.msc=1);l.mcp=this.C.compatibility;return l}initialize(){if(this.isInitialized)return!this.Ja();this.isInitialized=!0;if(this.C.compatibility===2)return this.A="ng",this.fail("w"),!1;if(this.C.compatibility===
1)return this.A="mm",this.fail("w"),!1;je().A=!0;this.N.document.readyState&&this.N.document.readyState=="complete"?CU(this):FW(this.N,"load",()=>{xU().setTimeout(bp(292,()=>CU(this)),100)},292);
return!0}PG(){const l=je(),y=xA(this,"getMaxSize");l.Z=new p9(0,y.width,y.height,0)}Xr(){je().V=xA(this,"getScreenSize")}dispose(){up(this);super.dispose()}};var l6C=new class{constructor(l,y=!1){this.key=l;this.defaultValue=y;this.valueType="boolean"}}("45378663");var yGC=class{constructor(){this.isInitialized=!1;this.Z=this.C=null;this.xz={start:this.OA,firstquartile:this.MW,midpoint:this.R7,thirdquartile:this.BF,complete:this.WG,error:this.T7,pause:this.rb,resume:this.kz,skip:this.SN,viewable_impression:this.N,mute:this.V,unmute:this.V,fullscreen:this.g4,exitfullscreen:this.hv,fully_viewable_audible_half_duration_impression:this.N,measurable_impression:this.N,abandon:this.rb,engagedview:this.N,impression:this.N,creativeview:this.N,progress:this.V,custom_metric_viewable:this.N,
bufferstart:this.rb,bufferfinish:this.kz,audio_measurable:this.N,audio_audible:this.N};this.jN={overlay_resize:this.PF,abandon:this.HG,close:this.HG,collapse:this.HG,overlay_unmeasurable_impression:l=>nr(l,"overlay_unmeasurable_impression",oK()),
overlay_viewable_immediate_impression:l=>nr(l,"overlay_viewable_immediate_impression",oK()),
overlay_unviewable_impression:l=>nr(l,"overlay_unviewable_impression",oK()),
overlay_viewable_end_of_session_impression:l=>nr(l,"overlay_viewable_end_of_session_impression",oK())};
H2().C=3;DgC(this);this.J=null}A(l){MS(l,!1);JmQ(l)}D(){}Y(l,y,k,z){l=new fa5(l,k?y:-1,this.sj(),this.mK());l.s7=z;Ut_(l.QE);Qm(l.QE,"queryid",l.s7);l.PA("");G0z(l,(...r)=>this.gb(...r),(...r)=>llq(this,...r));
(z=qb(A_).Z)&&XW(l,z);this.J&&(l.K(this.J),this.J=null);l.rK.e0&&qb($A);return l}C_(l){switch(l.gg()){case 0:if(l=qb(A_).Z)l=l.Z,g.Ap(l.J,this),l.b0&&this.xN()&&vL(l);J_();break;case 2:eb()}}S(){}xN(){return!1}OA(l){var y=l.A(l);y&&(y=y.volume,l.kz=fY(y)&&y>0);Es(l,0);return nr(l,"start",oK())}V(l,y,k){z9(Z2,[l],!oK());return this.N(l,y,k)}N(l,y,k){return nr(l,k,oK())}MW(l){return ZX(l,"firstquartile",1)}R7(l){l.gb=!0;return ZX(l,"midpoint",2)}BF(l){return ZX(l,"thirdquartile",3)}WG(l){const y=ZX(l,
"complete",4);Jq(l);return y}T7(l){l.I2=3;return nr(l,"error",oK())}kz(l,y,k){y=oK();if(l.V4()&&!y){var z=l.BV(),r=Date.now()-To;z.A=r}z9(Z2,[l],!y);l.V4()&&(l.I2=1);return nr(l,k,y)}SN(l,y){y=this.V(l,y||{},"skip");Jq(l);return y}g4(l,y){MS(l,!0);return this.V(l,y||{},"fullscreen")}hv(l,y){MS(l,!1);return this.V(l,y||{},"exitfullscreen")}rb(l,y,k){y=l.BV();var z=Date.now()-To;y.u0=qS(y,z,l.I2!=1);z9(Z2,[l],!oK());l.I2==1&&(l.I2=2);return nr(l,k,oK())}PF(l){z9(Z2,[l],!oK());return l.C()}HG(l){z9(Z2,
[l],!oK());this.Oj(l);Jq(l);return l.C()}gb(){}PG(){}Oj(){}Xr(){}Ja(){}mK(){this.Z||(this.Z=this.Ja());return this.Z==null?new re:new Hj5(this.Z)}sj(){return new Ne4}};var kv_=class extends z${constructor(l){super("audio_audible",l)}Z(l){return l.M8()==4}};var zp5=class extends pxt{constructor(l){super("audio_measurable",l)}Z(l){l=l.M8();return l==3||l==4}};var rG4=class extends LCT{C(){return new zp5(this.Z)}N(){return[new kv_(this.Z)]}};var ZD_=class extends V8P{Z(l){l&&(l.e===28&&(l=Object.assign({},l,{avas:3})),l.vs===4||l.vs===5)&&(l=Object.assign({},l,{vs:3}));const y=new Te5;y.Z=xj(l,WCg);y.C=xj(l,Ia4);return y}};var epe=class{constructor(l){this.Z=l}C(){return g.UT(this.Z)}};var tT=class extends yGC{constructor(){super();this.u0=null;this.RR=!1;this.b0="ACTIVE_VIEW_TRAFFIC_TYPE_UNSPECIFIED"}D(l,y){let k;const z=qb(A_);if(z.Z!=null)switch(z.Z.getName()){case "nis":k=hJC(this,l,y);break;case "gsv":k=Ge4(this,l,y);break;case "exc":k=alQ(this,l)}k||(y.opt_overlayAdElement?k=void 0:y.opt_adElement&&(k=tD_(this,l,y.opt_adElement,y.opt_osdId)));k&&k.Hj()==1&&(k.A==g.Vq&&(k.A=r=>this.Xr(r)),iKs(this,k,y));
return k}Xr(l){l.C=0;l.Ja=0;let y;if(l.V=="h"||l.V=="n"){H2();l.mK&&(H2(),KU(this)!="h"&&KU(this));var k=g.UT("ima.common.getVideoMetadata");if(typeof k==="function")try{y=k(l.s7)}catch(z){l.C|=4}else l.C|=2}else if(l.V=="b")if(k=g.UT("ytads.bulleit.getVideoMetadata"),typeof k==="function")try{y=k(l.s7)}catch(z){l.C|=4}else l.C|=2;else if(l.V=="ml")if(k=g.UT("ima.common.getVideoMetadata"),typeof k==="function")try{y=k(l.s7)}catch(z){l.C|=4}else l.C|=2;else l.C|=1;l.C||(y===void 0?l.C|=8:y===null?
l.C|=16:g.DB(y)?l.C|=32:y.errorCode!=null&&(l.Ja=y.errorCode,l.C|=64));y==null&&(y={});k=y;l.D=0;for(const z in Oj5)k[z]==null&&(l.D|=Oj5[z]);W0(k,"currentTime");W0(k,"duration");fY(y.volume)&&fY()&&(y.volume*=NaN);return y}Ja(){H2();KU(this)!="h"&&KU(this);const l=Uy5(this);return l!=null?new epe(l):null}PG(l){!l.Z&&l.kM&&r2(this,l,"overlay_unmeasurable_impression")&&(l.Z=!0)}Oj(l){l.W$&&(l.dg()?r2(this,l,"overlay_viewable_end_of_session_impression"):r2(this,l,"overlay_unviewable_impression"),l.W$=
!1)}gb(){}Y(l,y,k,z){if(H2().flags.G7(l6C)){var r=tm(H2().QE,"mm");(r={[CQ.U5]:"ACTIVE_VIEW_TRAFFIC_TYPE_AUDIO",[CQ.VIDEO]:"ACTIVE_VIEW_TRAFFIC_TYPE_VIDEO"}[r])&&GW(this,r);this.b0==="ACTIVE_VIEW_TRAFFIC_TYPE_UNSPECIFIED"&&qA.k_(1044,Error(),void 0,void 0)}l=super.Y(l,y,k,z);this.RR&&(y=this.u0,l.J==null&&(l.J=new bjq),y.Z[l.s7]=l.J,l.J.J=jTP);return l}A(l){l&&l.Hj()==1&&this.RR&&delete this.u0.Z[l.s7];return super.A(l)}mK(){this.Z||(this.Z=this.Ja());return this.Z==null?new re:this.b0==="ACTIVE_VIEW_TRAFFIC_TYPE_AUDIO"?
new rG4(this.Z):new Hj5(this.Z)}sj(){return this.b0==="ACTIVE_VIEW_TRAFFIC_TYPE_AUDIO"?new ZD_:new Ne4}K(l,y,k,z,r){y=new p9(k,y+z,k+r,y);(l=NS(vp,l))?l.K(y):this.J=y}},AGy=WL(193,OQ,void 0,qG);g.iQ("Goog_AdSense_Lidar_sendVastEvent",AGy);var $r_;$r_=WL(194,function(l,y={}){l=Qj(qb(tT),l,y);return $w(l)});
g.iQ("Goog_AdSense_Lidar_getViewability",$r_);var QBq=WL(195,function(){return m2()});
g.iQ("Goog_AdSense_Lidar_getUrlSignalsArray",QBq);var tFQ;tFQ=WL(196,function(){return JSON.stringify(m2())});
g.iQ("Goog_AdSense_Lidar_getUrlSignalsList",tFQ);var lvT=class{constructor({url:l,flj:y}){this.C=l;this.V=y;this.N=(new Date).getTime()-17040672E5;this.Z={};const k=/[?&]([^&=]+)=([^&]*)/g;for(;y=k.exec(l);)this.Z[y[1]]=y[2]}};var cQ=class extends Error{constructor(l,y,k=Error()){super();this.code=l;y+=":";k instanceof Error?(this.message=y+k.message,this.stack=k.stack||""):(this.message=y+String(k),this.stack="");Object.setPrototypeOf(this,new.target.prototype)}};var Ci5=class extends g.zP{constructor(l){super();this.wpc=l}Zc(){return this.wpc.f()}yx(l){this.wpc.c(l)}N(l){return this.wpc.m(X9(l))}AR(l){return this.wpc.mws(X9(l))}},UQ=class extends g.zP{constructor(l){super();this.qK=l;this.N="keydown keypress keyup input focusin focusout select copy cut paste change click dblclick auxclick pointerover pointerdown pointerup pointermove pointerout dragenter dragleave drag dragend mouseover mousedown mouseup mousemove mouseout touchstart touchend touchmove wheel".split(" ");
this.C=void 0;this.Y4=this.qK.p;this.V=this.o1.bind(this);this.addOnDisposeCallback(()=>void cYt(this))}snapshot(l){return this.qK.s({...(l.cj&&{c:l.cj}),
...(l.UB&&{s:l.UB}),...(l.u7!==void 0&&{p:l.u7})})}o1(l){this.qK.e(l)}Pk(){return this.qK.l()}};var ODQ=class extends g.zP{constructor(){super(...arguments);this.b0=1}share(){if(this.IR())throw Error("E:AD");this.b0++;return this}dispose(){--this.b0||super.dispose()}};var dr_=class{constructor(l){this.Z=l;t9(l,"/client_streamz/bg/frs",g.mg("mk"))}GV(l,y){this.Z.GV("/client_streamz/bg/frs",l,y)}},wIg=class{constructor(l){this.Z=l;t9(l,"/client_streamz/bg/wrl",g.mg("mn"),xw("ac"),xw("sc"),g.mg("rk"),g.mg("mk"))}GV(l,y,k,z,r,Z){this.Z.GV("/client_streamz/bg/wrl",l,y,k,z,r,Z)}},hpP=class{constructor(l){this.C=l;g.dm(l,"/client_streamz/bg/ec",g.mg("en"),g.mg("mk"))}Z(l,y){g.h9(this.C,"/client_streamz/bg/ec",l,y)}},Gvs=class{constructor(l){this.Z=l;t9(l,"/client_streamz/bg/el",
g.mg("en"),g.mg("mk"))}GV(l,y,k){this.Z.GV("/client_streamz/bg/el",l,y,k)}},a6T=class{constructor(l){this.C=l;g.dm(l,"/client_streamz/bg/cec",xw("ec"),g.mg("mk"))}Z(l,y){g.h9(this.C,"/client_streamz/bg/cec",l,y)}},iDP=class{constructor(l){this.C=l;g.dm(l,"/client_streamz/bg/po/csc",xw("cs"),g.mg("mk"))}Z(l,y){g.h9(this.C,"/client_streamz/bg/po/csc",l,y)}},UrT=class{constructor(l){this.C=l;g.dm(l,"/client_streamz/bg/po/ctav",g.mg("av"),g.mg("mk"))}Z(l,y){g.h9(this.C,"/client_streamz/bg/po/ctav",l,
y)}},MFQ=class{constructor(l){this.C=l;g.dm(l,"/client_streamz/bg/po/cwsc",g.mg("su"),g.mg("mk"))}Z(l,y){g.h9(this.C,"/client_streamz/bg/po/cwsc",l,y)}},XIe=class{constructor(l){this.Z=l;t9(l,"/client_streamz/bg/od/p",g.mg("mk"))}GV(l,y){this.Z.GV("/client_streamz/bg/od/p",l,y)}},cG_=class{constructor(l){this.Z=l;t9(l,"/client_streamz/bg/od/n",g.mg("et"),g.mg("mk"))}GV(l,y,k){this.Z.GV("/client_streamz/bg/od/n",l,y,k)}};var eAe=class extends U4{constructor(l){super(l)}};var PQ=class extends U4{constructor(l){super(l)}},JT=[1,2,3];var IV=class extends U4{constructor(l){super(l)}},TW=[1,2,3];var Vj=class extends U4{constructor(l){super(l)}};var CbC=class extends U4{constructor(l){super(l)}};var bDC=class extends U4{constructor(l){super(l)}},uoe=[1,2,3];var qi=class extends U4{constructor(l){super(l)}Sr(){var l=Yd(this,3,Ru,3,!0);Zr(l);return l[void 0]}};qi.prototype.C=L$([0,g$,[0,uoe,fQ,[0,g$,-1,oD5],fQ,[0,g$,-1,KQ,oD5],fQ,[0,g$]],s8q,E3,[0,E3,[0,JT,LFt,j84,N$T],[0,TW,f$q,EDz,fQ,[0,E3,[0,gDQ,pQ]]]],S3g,nDz]);var xrC=class extends U4{constructor(l){super(l)}};g.b=EQ.prototype;g.b.isEnabled=function(){if(!g.aC.navigator.cookieEnabled)return!1;if(!this.isEmpty())return!0;this.set("TESTCOOKIESENABLED","1",{rf:60});if(this.get("TESTCOOKIESENABLED")!=="1")return!1;this.remove("TESTCOOKIESENABLED");return!0};
g.b.set=function(l,y,k){let z;var r=!1;let Z;if(typeof k==="object"){Z=k.sameSite;r=k.secure||!1;z=k.domain||void 0;var e=k.path||void 0;var A=k.rf}if(/[;=\s]/.test(l))throw Error('Invalid cookie name "'+l+'"');if(/[;\r\n]/.test(y))throw Error('Invalid cookie value "'+y+'"');A===void 0&&(A=-1);k=z?";domain="+z:"";e=e?";path="+e:"";r=r?";secure":"";A=A<0?"":A==0?";expires="+(new Date(1970,1,1)).toUTCString():";expires="+(new Date(Date.now()+A*1E3)).toUTCString();this.Z.cookie=l+"="+y+k+e+A+r+(Z!=null?
";samesite="+Z:"")};
g.b.get=function(l,y){const k=l+"=",z=(this.Z.cookie||"").split(";");for(let r=0,Z;r<z.length;r++){Z=z[r].trim();if(Z.lastIndexOf(k,0)==0)return Z.slice(k.length);if(Z==l)return""}return y};
g.b.remove=function(l,y,k){const z=this.get(l)!==void 0;this.set(l,"",{rf:0,path:y,domain:k});return z};
g.b.e8=function(){return fB(this).keys};
g.b.s2=function(){return fB(this).values};
g.b.isEmpty=function(){return!this.Z.cookie};
g.b.clear=function(){const l=fB(this).keys;for(let y=l.length-1;y>=0;y--)this.remove(l[y])};
var r8=new EQ(typeof document=="undefined"?null:document);var mrz=class{async compress(l){var y=new CompressionStream("gzip");const k=(new Response(y.readable)).arrayBuffer();y=y.writable.getWriter();await y.write((new TextEncoder).encode(l));await y.close();return new Uint8Array(await k)}isSupported(l){return l<1024?!1:typeof CompressionStream!=="undefined"}};var e8=class extends U4{constructor(l){super(l)}};var qet=class{constructor(l,y){this.intervalMs=l;this.callback=y;this.enabled=!1;this.Z=()=>g.T5();
this.C=this.Z()}setInterval(l){this.intervalMs=l;this.timer&&this.enabled?(this.stop(),this.start()):this.timer&&this.stop()}start(){this.enabled=!0;this.timer||(this.timer=setTimeout(()=>{this.tick()},this.intervalMs),this.C=this.Z())}stop(){this.enabled=!1;
this.timer&&(clearTimeout(this.timer),this.timer=void 0)}tick(){if(this.enabled){const l=Math.max(this.Z()-this.C,0);l<this.intervalMs*.8?this.timer=setTimeout(()=>{this.tick()},this.intervalMs-l):(this.timer&&(clearTimeout(this.timer),this.timer=void 0),this.callback(),this.enabled&&(this.stop(),this.start()))}else this.timer=void 0}};var Weg=class extends U4{constructor(l){super(l)}};var I6e=class extends U4{constructor(l){super(l)}};g.Au=class extends U4{constructor(l){super(l)}aJ(){return OO(this,1)}};g.Au.prototype.fY=yz(1);var oV=class extends U4{constructor(l){super(l)}};var HQ=class extends U4{constructor(l){super(l)}},JY5=v2(HQ);var DX=class extends U4{constructor(l){super(l)}};var Ni=["platform","platformVersion","architecture","model","uaFullVersion"],F9=new HQ,sQ=null;var vQ=class extends U4{constructor(l){super(l)}};var TjC=class extends U4{constructor(l){super(l)}};var VFP=class extends U4{constructor(l){super(l,4)}};var $r=class extends U4{constructor(l){super(l,37)}X(){const l=this.Mx;return Rs(l,l[kH]|0,TjC,7)!==void 0}BL(){return DD(this,e8,16)}};var Pbs=class extends U4{constructor(l){super(l,19)}T2(l){return iW(this,2,l)}};var JGQ=class{constructor(l,y=!1){this.OR=y;this.uach=this.locale=null;this.C=0;this.isFinal=!1;this.Z=new Pbs;Number.isInteger(l)&&this.Z.T2(l);y||(this.locale=document.documentElement.getAttribute("lang"));RV(this,new vQ)}T2(l){this.Z.T2(l);return this}build(l,y=0,k=0,z=null,r=0,Z=0){if(!this.OR){var e=BQ(this);var A=new g.Au;A=iW(A,1,this.C);A=Wh(A,2,uj(this.isFinal));k=Wh(A,3,Wi(k>0?k:void 0));r=Wh(k,4,Wi(r>0?r:void 0));Z=Wh(r,5,Wi(Z>0?Z:void 0));r=Z.Mx;k=r[kH]|0;Z=zA(Z,k)?Z:Mh(Z,r,k)?XU(Z,r):
new Z.constructor(US(r,k,!0));rZ(e,g.Au,10,Z)}e=this.Z.clone();Z=Date.now().toString();e=Wh(e,4,fo(Z));l=eq(e,$r,3,l.slice());z&&(e=new Weg,z=Wh(e,13,Wi(z)),e=new I6e,z=rZ(e,Weg,2,z),e=new VFP,z=rZ(e,I6e,1,z),z=iW(z,2,9),rZ(l,VFP,18,z));y&&hF(l,14,y);return l}};g.lD.prototype.C=0;g.lD.prototype.reset=function(){this.Z=this.N=this.V;this.C=0};
g.lD.prototype.getValue=function(){return this.N};var Ris=class extends U4{constructor(l){super(l,8)}},Ye5=v2(Ris);var QG;QG=new DZC(class extends U4{constructor(l){super(l)}});var pI4=class extends g.zP{constructor(l){super();this.componentId="";this.Z=[];this.RR="";this.pageId=null;this.rb=this.b0=-1;this.K=this.experimentIds=null;this.C_=this.Y=this.S=this.V=0;this.u0=1;this.timeoutMillis=0;this.sj=!1;this.logSource=l.logSource;this.X8=l.X8||(()=>{});
this.N=new JGQ(l.logSource,l.OR);this.network=l.network||null;this.GS=l.GS||null;this.A=l.WX||null;this.sessionIndex=l.sessionIndex||null;this.TK=l.TK||!1;this.logger=null;this.withCredentials=!l.kZ;this.OR=l.OR||!1;this.D=!this.OR&&!!Oq()&&!!Oq().navigator&&Oq().navigator.sendBeacon!==void 0;this.HG=typeof URLSearchParams!=="undefined"&&!!(new URL(kc())).searchParams&&!!(new URL(kc())).searchParams.set;const y=LB(new vQ);RV(this.N,y);this.J=new g.lD(1E4,3E5,.1);l=pZT(this,l.pC);this.C=new qet(this.J.getValue(),
l);this.Ja=new qet(6E5,l);this.TK||this.Ja.start();this.OR||(document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ZL(this)}),document.addEventListener("pagehide",()=>{ZL(this)}))}Vj(){ZL(this);
this.C.stop();this.Ja.stop();super.Vj()}dispatch(l){if(l instanceof $r)this.log(l);else try{var y=new $r,k=l.jb();var z=GM(y,8,k);this.log(z)}catch{}}log(l){if(this.HG){l=l.clone();var y=this.u0++;l=hF(l,21,y);this.componentId&&GM(l,26,this.componentId);y=l;{var k=mH(y,1);const z=typeof k;k=k==null?k:z==="bigint"?String(YH(64,k)):mY(k)?z==="string"?Jo(k):EC(k):void 0}k==null&&(k=Date.now(),k=Number.isFinite(k)?k.toString():"0",Wh(y,1,fo(k)));(Pi?sC(mH(y,15,void 0,void 0,Lo)):sC(mH(y,15)))!=null||
hF(y,15,(new Date).getTimezoneOffset()*60);this.experimentIds&&(k=this.experimentIds.clone(),rZ(y,e8,16,k));y=this.Z.length-1E3+1;y>0&&(this.Z.splice(0,y),this.V+=y);this.Z.push(l);this.TK||this.C.enabled||this.C.start()}}flush(l,y){if(this.Z.length===0)l&&l();else if(this.sj&&this.D)this.N.C=3,gvT(this);else{var k=Date.now();if(this.rb>k&&this.b0<k)y&&y("throttled");else{this.network&&(typeof this.network.aJ==="function"?Pig(this.N,this.network.aJ()):this.N.C=0);var z=this.N.build(this.Z,this.V,
this.S,this.GS,this.Y,this.C_),r=this.X8();if(r&&this.RR===r)y&&y("stale-auth-token");else{this.Z=[];this.C.enabled&&this.C.stop();this.V=0;k=z.jb();let Z;this.K&&this.K.isSupported(k.length)&&(Z=this.K.compress(k));const e=EvC(this,k,r),A=O=>{this.J.reset();this.C.setInterval(this.J.getValue());if(O){var d=null;try{var w=JSON.stringify(JSON.parse(O.replace(")]}'\n","")));d=Ye5(w)}catch(h){}if(d){O=Number(QR(d,1,to("-1")));O>0&&(this.b0=Date.now(),this.rb=this.b0+O);(O=Pe(r0))&&d.Mx[O]?.[175237375]!=
null&&Do(cfC,3);if(Pe(C3q)&&Pe(r0)&&void 0===C3q&&(O=d.Mx,w=O[r0])&&(w=w.zY))try{w(O,175237375,mZ5)}catch(h){Tn(h)}d=QG.Z?QG.C(d,QG.Z,175237375,QG.N):QG.C(d,175237375,null,QG.N);if(d=d===null?void 0:d)d=g.$h(d,1,-1),d!==-1&&(this.J=new g.lD(d<1?1:d,3E5,.1),this.C.setInterval(this.J.getValue()))}}l&&l();this.S=0},Q=(O,d)=>{var w=kh(z,$r,3);
var h=Number(QR(z,14));g.yv(this.J);this.C.setInterval(this.J.getValue());O===401&&r&&(this.RR=r);h&&(this.V+=h);d===void 0&&(d=this.isRetryable(O));d&&(this.Z=w.concat(this.Z),this.TK||this.C.enabled||this.C.start());y&&y("net-send-failed",O);++this.S},t=()=>{this.network&&this.network.send(e,A,Q)};
Z?Z.then(O=>{e.requestHeaders["Content-Encoding"]="gzip";e.requestHeaders["Content-Type"]="application/binary";e.body=O;e.QU=2;t()},()=>{t()}):t()}}}}isRetryable(l){return 500<=l&&l<600||l===401||l===0}};var KeC=class{constructor(){this.kP=typeof AbortController!=="undefined"}async send(l,y,k){const z=this.kP?new AbortController:void 0,r=z?setTimeout(()=>{z.abort()},l.timeoutMillis):void 0;
try{const Z=await fetch(l.url,{method:l.requestType,headers:{...l.requestHeaders},...(l.body&&{body:l.body}),...(l.withCredentials&&{credentials:"include"}),signal:l.timeoutMillis&&z?z.signal:null});Z.status===200?y?.(await Z.text()):k?.(Z.status)}catch(Z){switch(Z?.name){case "AbortError":k?.(408);break;default:k?.(400)}}finally{clearTimeout(r)}}aJ(){return 4}};var nS=class extends g.zP{constructor(){super();this.logSource=1828;this.sessionIndex="0";this.BO="https://play.google.com/log?format=json&hasfast=true";this.network=this.buildLabel=null;this.componentId="";this.Z=this.GS=null;this.C=!1;this.logger=this.pageId=null}kZ(){this.N=!0;return this}build(){this.network||(this.network=new KeC);const l=new pI4({logSource:this.logSource,X8:this.X8?this.X8:nB,sessionIndex:this.sessionIndex,WX:this.BO,OR:!1,TK:!1,kZ:this.N,pC:this.pC,network:this.network});g.x(this,
l);if(this.buildLabel){var y=this.buildLabel,k=BQ(l.N);GM(k,7,y)}l.K=new mrz;this.componentId&&(l.componentId=this.componentId);this.GS&&(l.GS=this.GS);this.pageId&&(l.pageId=this.pageId);this.Z&&((k=this.Z)?(l.experimentIds||(l.experimentIds=new e8),y=l.experimentIds,k=k.jb(),GM(y,4,k)):l.experimentIds&&Wh(l.experimentIds,4));this.C&&(l.sj=l.D);YmC(l.N);this.network.T2&&this.network.T2(this.logSource);this.network.bM&&this.network.bM(l);return l}};var AV5=class extends g.zP{constructor(l){super();this.logSource=1828;this.componentId="";l||(l=new nS,l.componentId="",g.x(this,l),l=l.build());this.Z=l}flush(l){l=l||[];if(l.length){const y=new xrC,k=[];for(let z=0;z<l.length;z++){const r=l[z],Z=Yw(r);k.push(Z);r.clear()}eq(y,qi,1,k);this.Z.dispatch(y);this.Z.flush()}}};var UW=class{constructor(l){this.Z=l}};var gTC=class{constructor(l,y,k){this.C=l;this.N=y;this.fields=k||[];this.Z=new Map}clear(){this.Z.clear()}};var OW=class extends gTC{constructor(l,y){super(l,3,y)}};var Qc=class extends gTC{constructor(l,y){super(l,2,y)}GV(l,...y){y=[y];const k=WQ(this,y);k?k.push(new UW(l)):this.Z.set(AM([y]),[new UW(l)])}};g.$c.prototype.stopPropagation=function(){this.C=!0};
g.$c.prototype.preventDefault=function(){this.defaultPrevented=!0};g.J5(Qv,g.$c);
Qv.prototype.init=function(l,y){const k=this.type=l.type,z=l.changedTouches&&l.changedTouches.length?l.changedTouches[0]:null;this.target=l.target||l.srcElement;this.currentTarget=y;y=l.relatedTarget;y||(k=="mouseover"?y=l.fromElement:k=="mouseout"&&(y=l.toElement));this.relatedTarget=y;z?(this.clientX=z.clientX!==void 0?z.clientX:z.pageX,this.clientY=z.clientY!==void 0?z.clientY:z.pageY,this.screenX=z.screenX||0,this.screenY=z.screenY||0):(this.clientX=l.clientX!==void 0?l.clientX:l.pageX,this.clientY=
l.clientY!==void 0?l.clientY:l.pageY,this.screenX=l.screenX||0,this.screenY=l.screenY||0);this.button=l.button;this.keyCode=l.keyCode||0;this.key=l.key||"";this.charCode=l.charCode||(k=="keypress"?l.keyCode:0);this.ctrlKey=l.ctrlKey;this.altKey=l.altKey;this.shiftKey=l.shiftKey;this.metaKey=l.metaKey;this.pointerId=l.pointerId||0;this.pointerType=l.pointerType;this.state=l.state;this.Z=l;l.defaultPrevented&&Qv.Ws.preventDefault.call(this)};
Qv.prototype.stopPropagation=function(){Qv.Ws.stopPropagation.call(this);this.Z.stopPropagation?this.Z.stopPropagation():this.Z.cancelBubble=!0};
Qv.prototype.preventDefault=function(){Qv.Ws.preventDefault.call(this);const l=this.Z;l.preventDefault?l.preventDefault():l.returnValue=!1};var tM="closure_listenable_"+(Math.random()*1E6|0);var ovC=0;g.b=ws.prototype;g.b.add=function(l,y,k,z,r){const Z=l.toString();l=this.listeners[Z];l||(l=this.listeners[Z]=[],this.Z++);const e=Gq(l,y,z,r);e>-1?(y=l[e],k||(y.Mn=!1)):(y=new Nf5(y,this.src,Z,!!z,r),y.Mn=k,l.push(y));return y};
g.b.remove=function(l,y,k,z){l=l.toString();if(!(l in this.listeners))return!1;const r=this.listeners[l];y=Gq(r,y,k,z);return y>-1?(ds(r[y]),g.ef(r,y),r.length==0&&(delete this.listeners[l],this.Z--),!0):!1};
g.b.removeAll=function(l){l=l&&l.toString();let y=0;for(const k in this.listeners)if(!l||k==l){const z=this.listeners[k];for(let r=0;r<z.length;r++)++y,ds(z[r]);delete this.listeners[k];this.Z--}return y};
g.b.nU=function(l,y,k,z){l=this.listeners[l.toString()];let r=-1;l&&(r=Gq(l,y,k,z));return r>-1?l[r]:null};
g.b.hasListener=function(l,y){const k=l!==void 0,z=k?l.toString():"",r=y!==void 0;return g.nR(this.listeners,function(Z){for(let e=0;e<Z.length;++e)if(!(k&&Z[e].type!=z||r&&Z[e].capture!=y))return!0;return!1})};var cd="closure_lm_"+(Math.random()*1E6|0),mO={},bD=0,q0="__closure_events_fn_"+(Math.random()*1E9>>>0);g.J5(g.Wd,g.zP);g.Wd.prototype[tM]=!0;g.b=g.Wd.prototype;g.b.addEventListener=function(l,y,k,z){g.iD(this,l,y,k,z)};
g.b.removeEventListener=function(l,y,k,z){uD(this,l,y,k,z)};
g.b.dispatchEvent=function(l){var y=this.QZ;if(y){var k=[];for(var z=1;y;y=y.QZ)k.push(y),++z}y=this.WN;z=l.type||l;if(typeof l==="string")l=new g.$c(l,y);else if(l instanceof g.$c)l.target=l.target||y;else{var r=l;l=new g.$c(z,y);g.Am(l,r)}r=!0;let Z,e;if(k)for(e=k.length-1;!l.C&&e>=0;e--)Z=l.currentTarget=k[e],r=I4(Z,z,!0,l)&&r;l.C||(Z=l.currentTarget=y,r=I4(Z,z,!0,l)&&r,l.C||(r=I4(Z,z,!1,l)&&r));if(k)for(e=0;!l.C&&e<k.length;e++)Z=l.currentTarget=k[e],r=I4(Z,z,!1,l)&&r;return r};
g.b.Vj=function(){g.Wd.Ws.Vj.call(this);this.cz&&this.cz.removeAll(void 0);this.QZ=null};
g.b.listen=function(l,y,k,z){return this.cz.add(String(l),y,!1,k,z)};
g.b.Pt=function(l,y,k,z){return this.cz.add(String(l),y,!0,k,z)};
g.b.uq=function(l,y,k,z){this.cz.remove(String(l),y,k,z)};
g.b.nU=function(l,y,k,z){return this.cz.nU(String(l),y,k,z)};
g.b.hasListener=function(l,y){return this.cz.hasListener(l!==void 0?String(l):void 0,y)};var Tq=typeof AsyncContext!=="undefined"&&typeof AsyncContext.Snapshot==="function"?l=>l&&AsyncContext.Snapshot.wrap(l):l=>l;var ETz=class{constructor(l,y){this.N=l;this.V=y;this.C=0;this.Z=null}get(){let l;this.C>0?(this.C--,l=this.Z,this.Z=l.next,l.next=null):l=this.N();return l}put(l){this.V(l);this.C<100&&(this.C++,l.next=this.Z,this.Z=l)}};var Vv;var f6y=class{constructor(){this.C=this.Z=null}add(l,y){const k=Yc.get();k.set(l,y);this.C?this.C.next=k:this.Z=k;this.C=k}remove(){let l=null;this.Z&&(l=this.Z,this.Z=this.Z.next,this.Z||(this.C=null),l.next=null);return l}},Yc=new ETz(()=>new jB5,l=>l.reset()),jB5=class{constructor(){this.next=this.scope=this.Z=null}set(l,y){this.Z=l;
this.scope=y;this.next=null}reset(){this.next=this.scope=this.Z=null}};var tu,p6,JM,Seg;p6=!1;JM=new f6y;g.o4=(l,y)=>{tu||Seg();p6||(tu(),p6=!0);JM.add(l,y)};
Seg=()=>{const l=Promise.resolve(void 0);tu=()=>{l.then(Bf4)}};Ei.prototype.reset=function(){this.context=this.C=this.N=this.Z=null;this.V=!1};
var f6=new ETz(function(){return new Ei},function(l){l.reset()});
g.gs.prototype.then=function(l,y,k){return yc(this,Tq(typeof l==="function"?l:null),Tq(typeof y==="function"?y:null),k)};
g.gs.prototype.$goog_Thenable=!0;g.b=g.gs.prototype;g.b.finally=function(l){l=Tq(l);return new g.gs((y,k)=>{L6(this,z=>{l();y(z)},z=>{l();
k(z)})})};
g.b.Ya=function(l,y){return yc(this,null,Tq(l),y)};
g.b.catch=g.gs.prototype.Ya;g.b.cancel=function(l){if(this.Z==0){const y=new ln(l);g.o4(function(){Bd(this,y)},this)}};
g.b.FY=function(l){this.Z=0;K6(this,2,l)};
g.b.OY=function(l){this.Z=0;K6(this,3,l)};
g.b.UC=function(){let l;for(;l=Hd(this);)R4(this,l,this.Z,this.K);this.S=!1};
var z8=Tn;g.J5(ln,ET);ln.prototype.name="cancel";g.J5(g.rm,g.Wd);g.b=g.rm.prototype;g.b.enabled=!1;g.b.Aj=null;g.b.setInterval=function(l){this.h6=l;this.Aj&&this.enabled?(this.stop(),this.start()):this.Aj&&this.stop()};
g.b.gm=function(){if(this.enabled){const l=g.T5()-this.x6;l>0&&l<this.h6*.8?this.Aj=this.Iq.setTimeout(this.uL,this.h6-l):(this.Aj&&(this.Iq.clearTimeout(this.Aj),this.Aj=null),this.dispatchEvent("tick"),this.enabled&&(this.stop(),this.start()))}};
g.b.start=function(){this.enabled=!0;this.Aj||(this.Aj=this.Iq.setTimeout(this.uL,this.h6),this.x6=g.T5())};
g.b.stop=function(){this.enabled=!1;this.Aj&&(this.Iq.clearTimeout(this.Aj),this.Aj=null)};
g.b.Vj=function(){g.rm.Ws.Vj.call(this);this.stop();delete this.Iq};var FZ=class extends g.zP{constructor(l){super();this.A=l;this.J=0;this.N=100;this.S=!1;this.C=new Map;this.K=new Set;this.flushInterval=3E4;this.Z=new g.rm(this.flushInterval);this.Z.listen("tick",this.V,!1,this);g.x(this,this.Z)}sendIsolatedPayload(l){this.S=l;this.N=1}V(){const l=[...this.C.values()].filter(y=>y.Z.size);
l.length&&this.A.flush(l,this.S);ljy(l);this.J=0;this.Z.enabled&&this.Z.stop()}GV(l,y,...k){(l=a7(this,l))&&l instanceof Qc&&(l.GV(y,k),G8(this))}};var m0=class extends Error{constructor(l,y,k={}){super(y);this.code=l;this.metadata=k;this.name="RpcError";Object.setPrototypeOf(this,new.target.prototype)}toString(){let l=`RpcError(${yVC(this.code)||String(this.code)})`;this.message&&(l+=": "+this.message);return l}};XZ.prototype.jb=function(l){const y=[];CS(this,l,y);return y.join("")};
var un={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},kfT=/\uffff/.test("\uffff")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;var nTT;g.J5(m5,xJ);m5.prototype.Z=function(){return new XMLHttpRequest};
nTT=new m5;g.J5(g.qm,g.Wd);var Z9P=/^https?$/i,FeQ=["POST","PUT"],WU=[];g.b=g.qm.prototype;g.b.Pg=function(){this.dispose();g.Ap(WU,this)};
g.b.send=function(l,y,k,z){if(this.Z)throw Error("[goog.net.XhrIo] Object is active with another request="+this.A+"; newUri="+l);y=y?y.toUpperCase():"GET";this.A=l;this.V="";this.C=0;this.Y=!1;this.N=!0;this.Z=this.Ja?this.Ja.Z():nTT.Z();this.Z.onreadystatechange=Tq((0,g.We)(this.Gb,this));try{this.getStatus(),this.b0=!0,this.Z.open(y,String(l),!0),this.b0=!1}catch(Z){this.getStatus();Vc(this,Z);return}l=k||"";k=new Map(this.headers);if(z)if(Object.getPrototypeOf(z)===Object.prototype)for(var r in z)k.set(r,
z[r]);else if(typeof z.keys==="function"&&typeof z.get==="function")for(const Z of z.keys())k.set(Z,z.get(Z));else throw Error("Unknown input type for opt_headers: "+String(z));z=Array.from(k.keys()).find(Z=>"content-type"==Z.toLowerCase());
r=g.aC.FormData&&l instanceof g.aC.FormData;!g.ro(FeQ,y)||z||r||k.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const [Z,e]of k)this.Z.setRequestHeader(Z,e);this.sj&&(this.Z.responseType=this.sj);"withCredentials"in this.Z&&this.Z.withCredentials!==this.K&&(this.Z.withCredentials=this.K);try{this.S&&(clearTimeout(this.S),this.S=null),this.C_>0&&(this.getStatus(),this.S=setTimeout(this.C3.bind(this),this.C_)),this.getStatus(),this.D=!0,this.Z.send(l),this.D=!1}catch(Z){this.getStatus(),
Vc(this,Z)}};
g.b.C3=function(){typeof PU!="undefined"&&this.Z&&(this.V="Timed out after "+this.C_+"ms, aborting",this.C=8,this.getStatus(),this.dispatchEvent("timeout"),this.abort(8))};
g.b.abort=function(l){this.Z&&this.N&&(this.getStatus(),this.N=!1,this.J=!0,this.Z.abort(),this.J=!1,this.C=l||7,this.dispatchEvent("complete"),this.dispatchEvent("abort"),T8(this))};
g.b.Vj=function(){this.Z&&(this.N&&(this.N=!1,this.J=!0,this.Z.abort(),this.J=!1),T8(this,!0));g.qm.Ws.Vj.call(this)};
g.b.Gb=function(){this.IR()||(this.b0||this.D||this.J?pS(this):this.K4())};
g.b.K4=function(){pS(this)};
g.b.isActive=function(){return!!this.Z};
g.b.isComplete=function(){return g.J9(this)==4};
g.b.getStatus=function(){try{return g.J9(this)>2?this.Z.status:-1}catch(l){return-1}};
g.b.getResponseHeader=function(l){if(this.Z&&this.isComplete())return l=this.Z.getResponseHeader(l),l===null?void 0:l};
g.b.getLastError=function(){return typeof this.V==="string"?this.V:String(this.V)};var jmy=class{send(l,y=()=>{},k=()=>{}){rVT(l.url,z=>{z=z.target;
YJ(z)?y(g.KS(z)):k(z.getStatus())},l.requestType,l.body,l.requestHeaders,l.timeoutMillis,l.withCredentials)}aJ(){return 1}};var Ov=class{constructor(l,y){this.logger=l;this.event=y;this.startTime=j9()}done(){this.logger.N(this.event,j9()-this.startTime)}},de=class extends ODQ{constructor(){super(...arguments);this.d4={BL:()=>[]}}},o7=class extends de{V(){}Z(){}N(){}Al(){}A(){}K(){}C(){}J(l,y,k,z){return z}C_(){}S(){}D(){}},oTz=class extends de{constructor(l){super();
this.logger=l;this.d4={Zg$:()=>this.logger,
BL:()=>this.logger.d4.BL()};
this.addOnDisposeCallback(()=>void this.logger.dispose())}update(l){this.logger.dispose();
this.logger=l}Z(l){this.logger.Z(l)}N(l,y){this.logger.N(l,y)}Al(l){this.logger.Al(l)}A(l){this.logger.A(l)}K(l,y){this.logger.K(l,y)}C(){this.logger.C()}J(l,y,k,z){return this.logger.J(l,y,k,z)}C_(l){this.logger.C_(l)}S(l){this.logger.S(l)}D(l){this.logger.D(l)}V(l){this.logger.V(l)}},NjC=class extends g.zP{constructor(l,y){super();this.callback=l;this.C=y;this.Z=-y;this.addOnDisposeCallback(()=>void clearTimeout(this.timer))}},sBQ=class extends de{constructor(l,y){super();
this.metrics=l;this.qL=y}V(l){this.metrics.HX.GV(l,this.qL)}Z(l){this.metrics.eventCount.Z(l,this.qL)}N(l,y){this.metrics.v2.GV(y,l,this.qL)}Al(l){this.metrics.errorCount.Z(l,this.qL)}J(l,y,k,z){const r=j9(),Z=e=>{if(!this.IR()){var A=j9()-r;this.metrics.qb.GV(A,l,k,e,y,this.qL)}};
z.then(()=>void Z(0),e=>void Z(e instanceof m0?e.code:-1));
return z}C_(l){this.metrics.Qv.Z(l,this.qL)}S(l){this.metrics.Hg.Z(l,this.qL)}D(l){this.metrics.ol.Z(l,this.qL)}A(l){this.metrics.payloadSize.GV(l,this.qL)}K(l,y){this.metrics.pH.GV(y,l,this.qL)}},tUy=class extends sBQ{constructor(l,y=[]){const k={qL:l.qL||"_",Wv:l.Wv||[],eM:l.eM|0,BO:l.BO,FV:l.FV||(()=>{}),
XD:l.XD||((r,Z)=>$je(r,Z,k.FV,k.BO))},z=k.XD("53",k.Wv.concat(y));
super({HX:new dr_(z),errorCount:new a6T(z),eventCount:new hpP(z),v2:new Gvs(z),qb:new wIg(z),Qv:new iDP(z),Hg:new UrT(z),ol:new MFQ(z),payloadSize:new XIe(z),pH:new cG_(z)},k.qL);this.d4={BL:()=>this.options.Wv.concat(this.Ja).sort((r,Z)=>r-Z)};
this.options=k;this.service=z;this.sj=!l.XD;this.Y=new NjC(()=>void this.service.V(),k.eM);
this.addOnDisposeCallback(()=>{this.Y.dispose();this.sj&&this.service.dispose()});
g.b2(this.Ja=y.slice())}C(){Qps(this.Y)}};var BU=class extends U4{constructor(l){super(l)}};var HU=class extends U4{constructor(l){super(l)}};var lJ=class extends U4{constructor(l){super(l,0,lJ.messageId)}},MUt=v2(lJ),Les=function(l){return Cx(y=>y instanceof l&&!zA(y))}(lJ);
lJ.messageId="bfkj";var CB=class extends U4{constructor(l){super(l)}};var vTe=class extends U4{constructor(l){super(l)}},Bjs=v2(vTe);g.OX=class{constructor(){this.promise=new Promise((l,y)=>{this.resolve=l;this.reject=y})}};var Q0=class extends g.zP{constructor(l){super();this.C=Math.floor(Math.random()*200);this.Z=new vTe;let y;if("challenge"in l&&Les(l.challenge)){y=tF(l.challenge,4,void 0,Ao);var k=tF(l.challenge,5,void 0,Ao);tF(l.challenge,7,void 0,Ao)&&(this.Z=Bjs(tF(l.challenge,7,void 0,Ao)))}else({program:y,globalName:k}=l);this.addOnDisposeCallback(async()=>{const {JM:O}=await this.N;O?.()});
this.logger=Nm(l.PE||{},this.Z);g.x(this,this.logger);const z=new g.OX;this.N=z.promise;this.logger.Z("t");const r=this.logger.share(),Z=new Ov(r,"t"),e=(O,d,w,h)=>{if(!this.logger.IR()){var U="k";d?U="h":w&&(U="u");U!=="k"?h!==0&&(this.logger.Z(U),this.logger.N(U,O)):this.C<=0?(this.logger.Z(U),this.logger.N(U,O),this.C=Math.floor(Math.random()*200)):this.C--}},A=(O,d,w,h)=>{Promise.resolve().then(()=>{Z.done();
r.C();r.dispose();z.resolve({bD:O,JM:d,o_:w,Wwr:h})})},Q=[(O,d)=>{this.logger.N(O,d)},
O=>{this.logger.Al(O)},
O=>{this.logger.A(O)},
(O,d)=>{this.logger.K(O,d)}];
if(!g.aC[k])throw this.logger.Al(25),Error("EGOU");if(!g.aC[k].a)throw this.logger.Al(26),Error("ELIU");try{const O=g.aC[k].a;k=[];const d=[];var t=bA(this.Z);for(let U=0;U<t.length;U++)k.push(t[U]),d.push(1);const w=uns(this.Z);for(t=0;t<w.length;t++)k.push(w[t]),d.push(2);const [h]=O(y,A,!0,l.CF,e,[k,d],tF(this.Z,5),!1,Q);this.V=h;this.Y4=z.promise.then(()=>{})}catch(O){throw this.logger.Al(28),O;
}}snapshot(l){if(this.IR())throw Error("Already disposed");this.logger.Z("n");const y=this.logger.share();return this.N.then(({bD:k})=>new Promise(z=>{const r=new Ov(y,"n");k(Z=>{r.done();y.V(Z.length);y.C();y.dispose();z(Z)},[l.cj,
l.UB,l.qv,l.u7])}))}Ce(l){if(this.IR())throw Error("Already disposed");
this.logger.Z("n");const y=S9(this.logger,()=>this.V([l.cj,l.UB,l.qv,l.u7]),"n");
this.logger.V(y.length);this.logger.C();return y}o1(l){this.N.then(({o_:y})=>{y?.(l)})}Pk(){return this.logger.share()}};var sW=class{constructor(){this.C={};this.Z=null}};var DZ=class extends U4{constructor(l){super(l)}};var kC=class extends U4{constructor(l){super(l)}};var ZW=class{constructor(l,y,k){this.client=l;this.requestKey=y;this.Z=k}hG(l){return r3(this,l,new o7,0)}};var uJ=class extends g.zP{constructor(l){super();this.options=l;this.S=new g.OX;this.Y4=this.S.promise;this.J=new g.OX;this.A=1;this.C=new g.OX;this.V=[];this.isPaused=!1;this.Dv=l.Dv||(()=>{});
this.logger=new oTz(Nm(l.PE||{}));uIy(this,l.xj,l.CE$,l.CHr,l.uJb,{...HDy,...(l.Sl||{})});this.addOnDisposeCallback(()=>void xjz(this))}async snapshot(l){if(this.IR())throw Error("Already disposed");
this.N||this.K||await this.J.promise;if(this.N)return await this.N.snapshot(l);throw this.K;}pause(){this.IR()||this.isPaused||(this.isPaused=!0,this.Z&&this.Z.pause())}resume(){!this.IR()&&this.isPaused&&(this.isPaused=!1,this.Z&&this.Z.resume())}async checkForRefresh(){if(this.IR())throw Error("Already disposed");if(this.Z){var l=this.Z;l.isExpired()?(d3(l),l.MD(0),l=!0):l=!1;l&&await this.C.promise}else await this.C.promise}o1(l){this.N?.o1?.(l)}handleError(l){this.IR()||(this.K=l,this.J.resolve(),
this.options.gk?.(l))}Pk(){return this.logger.share()}},HDy={fN:432E5,AQ:3E5,g3:10,gB:1E4,SF:3E4,Gh:3E4,sY:6E4,Qe:1E3,oB:6E4,rO:6E5,H2:.25,qw:2,maxAttempts:10},$C=class{constructor(l,y,k){this.endTimeMs=0;this.Z=null;this.isPaused=!1;this.tick=()=>{if(!this.isPaused){var z=this.endTimeMs-Date.now();z<=this.N?(this.Z=null,this.MD(0)):this.Z=setTimeout(this.tick,Math.min(z,this.AQ))}};
this.AQ=y;this.N=k;this.promise=new Promise(z=>{this.MD=z});
WMe(this,l)}pause(){this.isPaused||(this.isPaused=!0,d3(this))}resume(){this.isPaused&&(this.isPaused=!1,this.tick())}C(){d3(this);this.endTimeMs=0;this.isPaused=!1;this.MD(1)}isExpired(){return Date.now()>this.endTimeMs}};var Ij5=Math.imul??((l,y)=>l*y|0),Gw=[196,
200,224,18],UX=class{constructor(l,y=0,k=[]){this.maxItems=l;this.Z=y;this.C=k}jb(){return String(this.Z)+","+this.C.join()}mV(l,y){let k=void 0;if(this.C[this.Z]!==l){const z=this.C.indexOf(l);z!==-1?(this.C.splice(z,1),z<this.Z&&this.Z--,this.C.splice(this.Z,0,l)):(k=this.C[this.Z],this.C[this.Z]=l)}this.Z=(this.Z+1)%this.maxItems;l=w3("iU5q-!O9@$",this.jb());k&&l&&y(k);return l}},Rps=class{constructor(l,y){this.logger=y;try{var k=globalThis.sessionStorage&&!!globalThis.sessionStorage.getItem&&
!!globalThis.sessionStorage.setItem&&!!globalThis.sessionStorage.removeItem}catch(z){k=!1}k&&(this.index=P4_(l))}Z(l,y,k,z){const r=this.index?S9(this.logger,()=>Tt5(this.index,aj(l),y,k,z),"W"):"u";
this.logger.D(r)}C(l,y){const [k,z]=this.index?S9(this.logger,()=>VUP(aj(l),y),"R"):["u"];
this.logger.S(k);return z}};var Yqz={toString:function(l){let y=[],k=0;l-=-2147483648;y[k++]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(l%52);for(l=Math.floor(l/52);l>0;)y[k++]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".charAt(l%62),l=Math.floor(l/62);return y.join("")}};var we=class extends g.zP{constructor(l){super();this.logger=l;this.V=new g.OX}AR(l,y){const k=this.N(l);y?.(k);return S9(this.logger,()=>g.px(k,2),this.C)}n6(l,y,k){return S9(this.logger,()=>y?this.AR(l,k):this.N(l,k),this.Z)}},Wc=class extends we{constructor(l,y,k,z){super(l);
this.J=y;this.K=k;this.Z="m";this.C="x";this.S=0;cc(this,z)}N(l,y){this.logger.Z(this.Z);++this.S>=this.K&&this.V.resolve();const k=l();l=S9(this.logger,()=>this.J(k),"C");
if(l===void 0)throw new cQ(17,"YNJ:Undefined");if(!(l instanceof Uint8Array))throw new cQ(18,"ODM:Invalid");y?.(l);return l}},Sq_=class extends we{constructor(l,y,k){super(l);this.J=y;this.Z="f";this.C="z";cc(this,k)}N(){return this.J}},jp5=class extends we{constructor(l,y,k){super(l);this.J=y;this.Z="w";this.C="z";cc(this,k)}N(){return S9(this.logger,()=>fx(this.J),"d")}AR(){return this.J}},sps=class extends we{constructor(l,y){super(l);
this.error=y;this.Z="e";this.C="y"}N(){if(this.J)return this.J;this.J=bJ(this,l=>"_"+pfC(l));
return bJ(this,l=>l)}},Pc=class extends we{constructor(l,y,k){super(l);
this.J=y;this.clientState=k;this.Z="S";this.C="q"}N(){var l=Math.floor(Date.now()/1E3),y=[Math.random()*255,Math.random()*255],k=y.concat([this.J&255,this.clientState],[l>>24&255,l>>16&255,l>>8&255,l&255]);l=new Uint8Array(2+k.length);l[0]=34;l[1]=k.length;l.set(k,2);k=l.subarray(2);y=y.length;for(let z=y;z<k.length;++z)k[z]^=k[z%y];this.logger.C_(this.clientState);return l}};var Dre={n0:3E4,pz:2E4},w4q=class extends g.zP{constructor(l){super();this.V=new g.OX;this.J=0;this.C=void 0;this.state=2;this.qK=l.qK;this.xj=l.xj;this.Sl={...Dre,...(l.Sl||{})};this.logger=l.qK.Pk();this.onError=l.onError??(()=>{});
this.pF=l.pF||!1;if(lbP(l)){const z=this.qK;this.S=()=>mjC(z).catch(r=>{this.C=r=this.reportError(new cQ(this.Z?20:32,"TRG:Disposed",r));this.Z?.dispose();this.Z=void 0;this.V.reject(r)});
qqe(z,()=>void qu(this));
z.A===2&&qu(this)}else this.S=l.Bqb,qu(this);const y=this.logger.share();y.Z("o");const k=new Ov(y,"o");this.V.promise.then(()=>{k.done();y.C();y.dispose()},()=>void y.dispose());
this.addOnDisposeCallback(()=>{this.Z?(this.Z.dispose(),this.Z=void 0):this.C?this.logger.C():(this.C=this.reportError(new cQ(32,"TNP:Disposed")),this.logger.C(),this.V.reject(this.C))});
g.x(this,this.logger)}Zc(){return this.V.promise}N(l){return Tw(this,{...l},!1)}AR(l){return Tw(this,{...l},!0)}yx(l){if(!(l>150))try{this.cache=new Rps(l,this.logger)}catch(y){this.reportError(new cQ(22,"GBJ:init",y))}}reportError(l){this.logger.Al(l.code);this.onError(l);return l}},lbP=function(l){return Cx(y=>{if(!Xby(y))return!1;for(const [k,z]of Object.entries(l)){const r=k,Z=z;if(!(r in y)){if(Z.JCr===!0)continue;return!1}if(!Z(y[r]))return!1}return!0})}({qK:function(l){return Cx(y=>y instanceof
l)}(uJ)},"");var yc4=class{constructor(){var l=g.sP();this.C=l;g.dm(l,"/client_streamz/youtube/aba/gac",xw("type"),xw("sequence"))}Z(l,y){g.h9(this.C,"/client_streamz/youtube/aba/gac",l,y)}};var AoC=(new Date).getTime();var kl5=class extends U4{constructor(l){super(l)}};var zos=class{constructor(l,y,k){this.n7=l;this.HQ=y;this.metadata=k}getMetadata(){return this.metadata}};var LMT=class{constructor(l,y={}){this.zP=l;this.metadata=y;this.status=null}getMetadata(){return this.metadata}getStatus(){return this.status}};var rc4=class{constructor(l,y,k,z,r){this.name=l;this.methodType="unary";this.requestType=y;this.responseType=k;this.Z=z;this.C=r}S(l,y={}){return new zos(l,this,y)}getName(){return this.name}};var Z1z=new rc4("/google.internal.waa.v1.Waa/Create",DZ,kl5,l=>l.jb(),v2(kl5));var eog=class extends U4{constructor(l){super(l)}};var XfP=new rc4("/google.internal.waa.v1.Waa/GenerateIT",kC,eog,l=>l.jb(),v2(eog));var wGg=new Set(["SAPISIDHASH","APISIDHASH"]);var RAP=class extends U4{constructor(l){super(l)}getValue(){const l=mH(this,2);if(Array.isArray(l)||l instanceof U4)throw Error("Cannot access the Any.value field on Any protos encoded using the jspb format, call unpackJspb instead");return fZ(this,2)}};var H9C=v2(class extends U4{constructor(l){super(l)}getMessage(){return tF(this,2)}});var aos=class{constructor(l,y){this.C=[];this.V=[];this.J=[];this.N=[];this.Z=[];this.S=l.H3;this.K=y;this.xhr=l.xhr;this.S&&Btt(this)}Qr(l,y){l==="data"?this.C.push(y):l==="metadata"?this.V.push(y):l==="status"?this.J.push(y):l==="end"?this.N.push(y):l==="error"&&this.Z.push(y)}removeListener(l,y){l==="data"?jo(this.C,y):l==="metadata"?jo(this.V,y):l==="status"?jo(this.J,y):l==="end"?jo(this.N,y):l==="error"&&jo(this.Z,y);return this}cancel(){this.xhr.abort()}},Dj4=class extends Error{constructor(){super();
this.name="AsyncStack";Object.setPrototypeOf(this,new.target.prototype)}};g.J5(g.So,xJ);g.So.prototype.Z=function(){const l=new nf(this.V,this.N);this.C&&l.setCredentialsMode(this.C);return l};
g.So.prototype.setCredentialsMode=function(l){this.C=l};
g.J5(nf,g.Wd);g.b=nf.prototype;g.b.open=function(l,y){if(this.readyState!=0)throw this.abort(),Error("Error reopening a connection");this.Y=l;this.C_=y;this.readyState=1;oj(this)};
g.b.send=function(l){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");if(this.A.signal.aborted)throw this.abort(),Error("Request was aborted.");this.Z=!0;const y={headers:this.D,method:this.Y,credentials:this.J,cache:void 0,signal:this.A.signal};l&&(y.body=l);(this.b0||g.aC).fetch(new Request(this.C_,y)).then(this.Mj.bind(this),this.EW.bind(this))};
g.b.abort=function(){this.response=this.responseText="";this.D=new Headers;this.status=0;this.A.abort("Request was aborted.");this.N&&this.N.cancel("Request was aborted.").catch(()=>{});
this.readyState>=1&&this.Z&&this.readyState!=4&&(this.Z=!1,Nu(this));this.readyState=0};
g.b.Mj=function(l){if(this.Z&&(this.V=l,this.C||(this.status=this.V.status,this.statusText=this.V.statusText,this.C=l.headers,this.readyState=2,oj(this)),this.Z&&(this.readyState=3,oj(this),this.Z)))if(this.responseType==="arraybuffer")l.arrayBuffer().then(this.C8.bind(this),this.EW.bind(this));else if(typeof g.aC.ReadableStream!=="undefined"&&"body"in l){this.N=l.body.getReader();if(this.S){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=
[]}else this.response=this.responseText="",this.K=new TextDecoder;F7(this)}else l.text().then(this.bK.bind(this),this.EW.bind(this))};
g.b.cq=function(l){if(this.Z){if(this.S&&l.value)this.response.push(l.value);else if(!this.S){var y=l.value?l.value:new Uint8Array(0);if(y=this.K.decode(y,{stream:!l.done}))this.response=this.responseText+=y}l.done?Nu(this):oj(this);this.readyState==3&&F7(this)}};
g.b.bK=function(l){this.Z&&(this.response=this.responseText=l,Nu(this))};
g.b.C8=function(l){this.Z&&(this.response=l,Nu(this))};
g.b.EW=function(){this.Z&&Nu(this)};
g.b.setRequestHeader=function(l,y){this.D.append(l,y)};
g.b.getResponseHeader=function(l){return this.C?this.C.get(l.toLowerCase())||"":""};
g.b.getAllResponseHeaders=function(){if(!this.C)return"";const l=[],y=this.C.entries();for(var k=y.next();!k.done;)k=k.value,l.push(k[0]+": "+k[1]),k=y.next();return l.join("\r\n")};
g.b.setCredentialsMode=function(l){this.J=l};
Object.defineProperty(nf.prototype,"withCredentials",{get:function(){return this.J==="include"},
set:function(l){this.setCredentialsMode(l?"include":"same-origin")}});g.sX.prototype.toString=function(){const l=[];var y=this.J;y&&l.push(y8(y,Ace,!0),":");var k=this.Z;if(k||y=="file")l.push("//"),(y=this.A)&&l.push(y8(y,Ace,!0),"@"),l.push(g.am(k).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),k=this.N,k!=null&&l.push(":",String(k));if(k=this.C)this.Z&&k.charAt(0)!="/"&&l.push("/"),l.push(y8(k,k.charAt(0)=="/"?$F4:Qzg,!0));(k=this.V.toString())&&l.push("?",k);(k=this.S)&&l.push("#",y8(k,tEQ));return l.join("")};
g.sX.prototype.resolve=function(l){const y=this.clone();let k=!!l.J;k?g.Lf(y,l.J):k=!!l.A;k?y.A=l.A:k=!!l.Z;k?g.vc(y,l.Z):k=l.N!=null;var z=l.C;if(k)g.Hc(y,l.N);else if(k=!!l.C){if(z.charAt(0)!="/")if(this.Z&&!this.C)z="/"+z;else{var r=y.C.lastIndexOf("/");r!=-1&&(z=y.C.slice(0,r+1)+z)}r=z;if(r==".."||r==".")z="";else if(g.ag(r,"./")||g.ag(r,"/.")){z=w4(r,"/");r=r.split("/");const Z=[];for(let e=0;e<r.length;){const A=r[e++];A=="."?z&&e==r.length&&Z.push(""):A==".."?((Z.length>1||Z.length==1&&Z[0]!=
"")&&Z.pop(),z&&e==r.length&&Z.push("")):(Z.push(A),z=!0)}z=Z.join("/")}else z=r}k?y.C=z:k=l.V.toString()!=="";k?Rj(y,l.V.clone()):k=!!l.S;k&&(y.S=l.S);return y};
g.sX.prototype.clone=function(){return new g.sX(this)};
var Ace=/[#\/\?@]/g,Qzg=/[#\?:]/g,$F4=/[#\?]/g,Zxz=/[#\?@]/g,tEQ=/#/g;g.b=ld.prototype;g.b.add=function(l,y){zB(this);this.N=null;l=rn(this,l);let k=this.Z.get(l);k||this.Z.set(l,k=[]);k.push(y);this.C=this.C+1;return this};
g.b.remove=function(l){zB(this);l=rn(this,l);return this.Z.has(l)?(this.N=null,this.C=this.C-this.Z.get(l).length,this.Z.delete(l)):!1};
g.b.clear=function(){this.Z=this.N=null;this.C=0};
g.b.isEmpty=function(){zB(this);return this.C==0};
g.b.forEach=function(l,y){zB(this);this.Z.forEach(function(k,z){k.forEach(function(r){l.call(y,r,z,this)},this)},this)};
g.b.e8=function(){zB(this);const l=Array.from(this.Z.values()),y=Array.from(this.Z.keys()),k=[];for(let z=0;z<y.length;z++){const r=l[z];for(let Z=0;Z<r.length;Z++)k.push(y[z])}return k};
g.b.s2=function(l){zB(this);let y=[];if(typeof l==="string")Zf(this,l)&&(y=y.concat(this.Z.get(rn(this,l))));else{l=Array.from(this.Z.values());for(let k=0;k<l.length;k++)y=y.concat(l[k])}return y};
g.b.set=function(l,y){zB(this);this.N=null;l=rn(this,l);Zf(this,l)&&(this.C=this.C-this.Z.get(l).length);this.Z.set(l,[y]);this.C=this.C+1;return this};
g.b.get=function(l,y){if(!l)return y;l=this.s2(l);return l.length>0?String(l[0]):y};
g.b.toString=function(){if(this.N)return this.N;if(!this.Z)return"";const l=[],y=Array.from(this.Z.keys());for(let z=0;z<y.length;z++){var k=y[z];const r=g.am(k);k=this.s2(k);for(let Z=0;Z<k.length;Z++){let e=r;k[Z]!==""&&(e+="="+g.am(k[Z]));l.push(e)}}return this.N=l.join("&")};
g.b.clone=function(){const l=new ld;l.N=this.N;this.Z&&(l.Z=new Map(this.Z),l.C=this.C);return l};
g.b.extend=function(l){for(let y=0;y<arguments.length;y++)zBC(arguments[y],function(k,z){this.add(z,k)},this)};g.J5(g.Q8,g.zP);var O15=[];g.b=g.Q8.prototype;g.b.listen=function(l,y,k,z){Array.isArray(y)||(y&&(O15[0]=y.toString()),y=O15);for(let r=0;r<y.length;r++){const Z=g.iD(l,y[r],k||this.handleEvent,z||!1,this.C||this);if(!Z)break;this.Z[Z.key]=Z}return this};
g.b.Pt=function(l,y,k,z){return tg(this,l,y,k,z)};
g.b.uq=function(l,y,k,z,r){if(Array.isArray(y))for(let Z=0;Z<y.length;Z++)this.uq(l,y[Z],k,z,r);else k=k||this.handleEvent,z=g.uQ(z)?!!z.capture:!!z,r=r||this.C||this,k=Ui(k),z=!!z,y=Oi(l)?l.nU(y,k,z,r):l?(l=XS(l))?l.nU(y,k,z,r):null:null,y&&(xc(y),delete this.Z[y.key])};
g.b.removeAll=function(){g.fR(this.Z,function(l,y){this.Z.hasOwnProperty(y)&&xc(l)},this);
this.Z={}};
g.b.Vj=function(){g.Q8.Ws.Vj.call(this);this.removeAll()};
g.b.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};var A2q=class{constructor(){this.N=!0;this.C=0;this.Z=""}isInputValid(){return this.N}};dn.prototype.isInputValid=function(){return this.Z!=3};
dn.prototype.hC=function(){return this.S};
dn.prototype.A1=function(){return!0};
dn.prototype.parse=function(l){function y(Q){Q&128&&wn(Z,e,A,"invalid tag");(Q&7)!=2&&wn(Z,e,A,"invalid wire type");Z.N=Q>>>3;Z.N!=1&&Z.N!=2&&Z.N!=15&&wn(Z,e,A,"unexpected tag");Z.Z=1;Z.C=0;Z.V=0}
function k(Q){Z.V++;Z.V==5&&Q&240&&wn(Z,e,A,"message length too long");Z.C|=(Q&127)<<(Z.V-1)*7;Q&128||(Z.Z=2,Z.A=0,typeof Uint8Array!=="undefined"?Z.J=new Uint8Array(Z.C):Z.J=Array(Z.C),Z.C==0&&r())}
function z(Q){Z.J[Z.A++]=Q;Z.A==Z.C&&r()}
function r(){if(Z.N<15){const Q={};Q[Z.N]=Z.J;Z.K.push(Q)}Z.Z=0}
const Z=this,e=l instanceof Array?l:new Uint8Array(l);let A=0;for(;A<e.length;){switch(Z.Z){case 3:wn(Z,e,A,"stream already broken");break;case 0:y(e[A]);break;case 1:k(e[A]);break;case 2:z(e[A]);break;default:throw Error("unexpected parser state: "+Z.Z);}Z.D++;A++}l=Z.K;Z.K=[];return l.length>0?l:null};hg.prototype.isInputValid=function(){return this.Z===null};
hg.prototype.hC=function(){return this.Z};
hg.prototype.A1=function(){return!1};
hg.prototype.parse=function(l){this.Z!==null&&GB(this,l,"stream already broken");let y=null;try{{var k=this.N;k.N||Oj(k,l,"stream already broken");k.Z+=l;const Z=Math.floor(k.Z.length/4);if(Z==0)var z=null;else{try{var r=EU(k.Z.slice(0,Z*4))}catch(e){Oj(k,k.Z,e.message)}k.C+=Z*4;k.Z=k.Z.slice(Z*4);z=r}}y=z===null?null:this.V.parse(z)}catch(Z){GB(this,l,Z.message)}this.C+=l.length;return y};g.b=id.prototype;g.b.isInputValid=function(){return this.J!=3};
g.b.hC=function(){return this.D};
g.b.done=function(){return this.J===2};
g.b.A1=function(){return!1};
g.b.parse=function(l){function y(){for(;d<l.length;)if(at(l[d]))d++,Z.N++;else break;return d<Q}
function k(){for(var h;;){h=l[d++];if(!h)break;Z.N++;switch(Z.Z){case 0:h==="{"?Z.Z=2:h==="["?Z.Z=4:at(h)||Uj(Z,l,d);continue;case 7:case 2:if(at(h))continue;if(Z.Z===7)e.push(8);else if(h==="}"){r("{}");Z.Z=z();continue}else e.push(3);h==='"'?Z.Z=6:Uj(Z,l,d);continue;case 8:case 3:if(at(h))continue;h===":"?(Z.Z===3&&(e.push(3),Z.C++),Z.Z=1):h==="}"?(Z.C--,r(),Z.Z=z()):h===","?(Z.Z===3&&e.push(3),Z.Z=7):Uj(Z,l,d);continue;case 4:case 1:if(at(h))continue;if(Z.Z===4)if(Z.C++,Z.Z=1,h==="]"){Z.C--;if(Z.C===
0){Z.Z=5;return}r("[]");Z.Z=z();continue}else e.push(5);h==='"'?Z.Z=6:h==="{"?Z.Z=2:h==="["?Z.Z=4:h==="t"?Z.Z=9:h==="f"?Z.Z=12:h==="n"?Z.Z=16:h!=="-"&&("0123456789".indexOf(h)!==-1?Z.Z=20:Uj(Z,l,d));continue;case 5:if(h===",")e.push(5),Z.Z=1,Z.C===1&&(O=d);else if(h==="]"){Z.C--;if(Z.C===0)return;r();Z.Z=z()}else if(at(h))continue;else Uj(Z,l,d);continue;case 6:const U=d;a:for(;;){for(;Z.A>0;)if(h=l[d++],Z.A===4?Z.A=0:Z.A++,!h)break a;if(h==='"'&&!Z.K){Z.Z=z();break}if(h==="\\"&&!Z.K&&(Z.K=!0,h=l[d++],
!h))break;if(Z.K)if(Z.K=!1,h==="u"&&(Z.A=1),h=l[d++])continue;else break;A.lastIndex=d;h=A.exec(l);if(!h){d=l.length+1;break}d=h.index+1;h=l[h.index];if(!h)break}Z.N+=d-U;continue;case 9:if(!h)continue;h==="r"?Z.Z=10:Uj(Z,l,d);continue;case 10:if(!h)continue;h==="u"?Z.Z=11:Uj(Z,l,d);continue;case 11:if(!h)continue;h==="e"?Z.Z=z():Uj(Z,l,d);continue;case 12:if(!h)continue;h==="a"?Z.Z=13:Uj(Z,l,d);continue;case 13:if(!h)continue;h==="l"?Z.Z=14:Uj(Z,l,d);continue;case 14:if(!h)continue;h==="s"?Z.Z=15:
Uj(Z,l,d);continue;case 15:if(!h)continue;h==="e"?Z.Z=z():Uj(Z,l,d);continue;case 16:if(!h)continue;h==="u"?Z.Z=17:Uj(Z,l,d);continue;case 17:if(!h)continue;h==="l"?Z.Z=18:Uj(Z,l,d);continue;case 18:if(!h)continue;h==="l"?Z.Z=z():Uj(Z,l,d);continue;case 19:h==="."?Z.Z=20:Uj(Z,l,d);continue;case 20:if("0123456789.eE+-".indexOf(h)!==-1)continue;else d--,Z.N--,Z.Z=z();continue;default:Uj(Z,l,d)}}}
function z(){const h=e.pop();return h!=null?h:1}
function r(h){Z.C>1||(h||(h=O===-1?Z.V+l.substring(t,d):l.substring(O,d)),Z.C_?Z.S.push(h):Z.S.push(JSON.parse(h)),O=d)}
const Z=this,e=Z.Y,A=Z.b0,Q=l.length;let t=0,O=-1,d=0;for(;d<Q;)switch(Z.J){case 3:return Uj(Z,l,d),null;case 2:return y()&&Uj(Z,l,d),null;case 0:if(y()){var w=l[d++];Z.N++;if(w==="["){Z.J=1;t=d;Z.Z=4;continue}else Uj(Z,l,d)}return null;case 1:return k(),Z.C===0&&Z.Z==5?(Z.J=2,Z.V=l.substring(d)):Z.V=O===-1?Z.V+l.substring(t):l.substring(O),Z.S.length>0?(w=Z.S,Z.S=[],w):null}return null};M3.prototype.isInputValid=function(){return this.J===null};
M3.prototype.hC=function(){return this.J};
M3.prototype.A1=function(){return!1};
M3.prototype.parse=function(l){function y(Q){Z.C=6;Z.J="The stream is broken @"+Z.Z+"/"+e+". Error: "+Q+". With input:\n";throw Error(Z.J);}
function k(){Z.N=new id({d_$:!0,OZ:!0})}
function z(Q){if(Q)for(let t=0;t<Q.length;t++){const O={};O[1]=Q[t];Z.V.push(O)}}
function r(Q){if(Q){(Z.S||Q.length>1)&&y("extra status: "+Q);Z.S=!0;const t={};t[2]=Q[0];Z.V.push(t)}}
const Z=this;let e=0;for(;e<l.length;){var A;if(A=Z.C!==2){a:{for(;e<l.length;){if(!at(l[e])){A=!0;break a}e++;Z.Z++}A=!1}A=!A}if(A)return null;switch(Z.C){case 6:y("stream already broken");break;case 0:l[e]==="["?(Z.C=1,e++,Z.Z++):y("unexpected input token");break;case 1:l[e]==="["?(Z.C=2,k()):l[e]===","||l.slice(e,e+5)=="null,"?Z.C=3:l[e]==="]"?(Z.C=5,e++,Z.Z++):y("unexpected input token");break;case 2:A=Z.N.parse(l.substring(e));z(A);Z.N.done()?(Z.C=3,A=Z.N.V,Z.Z+=l.length-e-A.length,l=A,e=0):
(Z.Z+=l.length-e,e=l.length);break;case 3:l[e]===","||l.slice(e,e+5)=="null,"?(Z.C=4,k(),Z.N.parse("["),e+=l[e]===","?1:5,Z.Z++):l[e]==="]"&&(Z.C=5,e++,Z.Z++);break;case 4:A=Z.N.parse(l.substring(e));r(A);Z.N.done()?(Z.C=5,A=Z.N.V,Z.Z+=l.length-e-A.length,l=A,e=0):(Z.Z+=l.length-e,e=l.length);break;case 5:y("extra input after stream end")}}return Z.V.length>0?(l=Z.V,Z.V=[],l):null};var hBP=class{constructor(l){this.Z=l;this.C=null;this.J=this.N=0;this.D=!1;this.V=this.K=this.S=null;this.A=new g.Q8(this);this.A.listen(this.Z,"readystatechange",this.C_)}O4(){return this.Z}getStatus(){return this.J}C_(l){l=l.target;try{if(l==this.Z)a:{const Z=g.J9(this.Z);var y=this.Z.C,k=this.Z.getStatus();const e=g.KS(this.Z);l=[];if(g.gm(this.Z)instanceof Array){const A=g.gm(this.Z);A.length>0&&A[0]instanceof Uint8Array&&(this.D=!0,l=A)}if(!(Z<3||Z==3&&!e&&l.length==0))if(k=k==200||k==206,Z==
4&&(y==8?Xk(this,7):y==7?Xk(this,8):k||Xk(this,3)),this.C||(this.C=$be(this.Z),this.C==null&&Xk(this,5)),this.J>2)c_(this);else{if(l.length>this.N){const A=l.length;y=[];try{if(this.C.A1())for(var z=0;z<A;z++){var r=this.C.parse(Array.from(l[z]));r&&(y=y.concat(r))}else{r="";if(!this.S){if(typeof TextDecoder==="undefined")throw Error("TextDecoder is not supported by this browser.");this.S=new TextDecoder}for(z=0;z<A;z++)r+=this.S.decode(l[z],{stream:Z==4&&z==A-1});y=this.C.parse(r)}l.splice(0,A);
y&&this.V(y)}catch(Q){Xk(this,5);c_(this);break a}}else if(e.length>this.N){z=e.slice(this.N);this.N=e.length;try{const A=this.C.parse(z);A!=null&&this.V&&this.V(A)}catch(A){Xk(this,5);c_(this);break a}}Z==4?(e.length!=0||this.D?Xk(this,2):Xk(this,4),c_(this)):Xk(this,1)}}}catch(Z){Xk(this,6),c_(this)}}};var GnT=class{constructor(l){l=this.N=l;var y=(0,g.We)(this.V,this);l.V=y;l=this.N;y=(0,g.We)(this.J,this);l.K=y;this.C={};this.Z={}}Qr(l,y){let k=this.C[l];k||(k=[],this.C[l]=k);k.push(y)}addListener(l,y){this.Qr(l,y);return this}removeListener(l,y){const k=this.C[l];k&&g.Ap(k,y);(l=this.Z[l])&&g.Ap(l,y);return this}once(l,y){let k=this.Z[l];k||(k=[],this.Z[l]=k);k.push(y);return this}V(l){var y=this.C.data;y&&CF(l,y);(y=this.Z.data)&&CF(l,y);this.Z.data=[]}J(){switch(this.N.getStatus()){case 1:bd(this,
"readable");break;case 5:case 6:case 4:case 7:case 3:bd(this,"error");break;case 8:bd(this,"close");break;case 2:bd(this,"end")}}};var ixq=class{constructor(){var l={format:"jspb"};this.v9=l.v9||g.UT("suppressCorsPreflight",l)||!1;this.withCredentials=l.withCredentials||g.UT("withCredentials",l)||!1;this.H9=l.H9||[];this.kp=l.kp||[];this.sM=l.sM;this.Z=l.iyd||!1}serverStreaming(l,y,k,z){const r=l.substring(0,l.length-z.name.length);return QUe(Z=>{const e=Z.HQ;var A=Z.getMetadata();const Q=ud(this,!1);A=xe(this,A,Q,r+e.getName());const t=mS(Q,e.C,!0);Z=e.Z(Z.n7);Q.send(A,"POST",Z);return t},this.H9).call(this,z.S(y,k))}};q3.prototype.create=function(l,y,k){return zw(this.Z,this.C+"/$rpc/google.internal.waa.v1.Waa/Create",l,y||{},Z1z,k)};var hu=class{constructor(l,y){this.EU=3;this.Lx=l;this.defaultValue=y;this.Cc="bool"}},G$=class{constructor(l,y){this.EU=3;this.Lx=l;this.defaultValue=y;this.Cc="int"}},aT=class{constructor(l,y){this.EU=3;this.Lx=l;this.defaultValue=y;this.Cc="double"}};var dVP,dFz,U_,SET,ho5,XlT,GlC,Phz,abP,i15,UFy,MET,XE5,cce,b15,uB5,xFQ,mFq,YBt,ft,IE_,TKT,qRq,Wd5,ops,IbC,UbP,W$z,TaQ,VE4,j0Q,PzP,Jc5,YRT,pEC,Kd4,gne,En4,fbT,Uxz,jze,SRC,ly4,vM,GUg,zDe,nng,Fde,onq,b0Q,e0C,jb4,szP,JJg;dVP=new hu(45759580,!1);dFz=new hu(45766273,!1);g.wE_=new hu(45757878,!1);U_=new hu(45749396,!1);SET=new hu(45751227,!1);ho5=new hu(45751228,!1);XlT=new hu(45745123,!1);GlC=new hu(45742118,!1);Phz=new hu(45742119,!1);abP=new hu(45754339,!1);i15=new hu(45757087,!1);
UFy=new hu(45756446,!1);MET=new hu(45739196,!1);XE5=new hu(45739198,!1);cce=new hu(45739197,!1);g.Cze=new G$(45750947,to("0"));b15=new aT(45746966,0);uB5=new aT(45746967,0);xFQ=new aT(45737488,0);mFq=new aT(45737489,0);YBt=new hu(45732791,!0);ft=new hu(45728572,!1);IE_=new hu(45737482,!1);TKT=new aT(45741773,0);qRq=new hu(45763496,!1);Wd5=new hu(45731083,!1);ops=new hu(45728553,!1);IbC=new hu(45734191,!1);UbP=new hu(45745610,!1);W$z=new hu(45756619,!1);TaQ=new hu(45758290,!1);
VE4=new hu(45762920,!1);j0Q=new hu(45735523,!1);PzP=new aT(45735428,4E3);Jc5=new hu(45748009,!1);YRT=new hu(45752604,!1);pEC=new hu(45755066,!1);Kd4=new hu(45735462,!1);gne=new hu(45751943,!1);En4=new hu(45751944,!1);fbT=new hu(45751945,!1);Uxz=new hu(45764592,!1);jze=new aT(45764593,0);SRC=new hu(45756939,!1);ly4=new hu(45766511,!1);vM=new hu(45728181,!1);GUg=new hu(45746180,!1);zDe=new hu(45756543,!1);nng=new hu(45756620,!1);Fde=new G$(45761760,to("200"));onq=new hu(45740357,!1);
b0Q=new G$(45762838,to("0"));g.Na5=new hu(45755760,!1);e0C=new hu(45760017,!1);jb4=new hu(45732775,!1);szP=new hu(45765818,!1);g.LdQ=new hu(45734776,!1);JJg=new hu(45755924,!1);var Fht=new aT(45756872,0),nKt=new aT(45725542,0),SZT=new aT(45725543,0),NKQ=new aT(45757426,0),EKC=new aT(45725539,0),sl4=new aT(45764252,0),jlC=new aT(45725541,0),LhC=new aT(45757427,0),fEP=new aT(45725540,0),gKC=new aT(45725538,0),oKt=new aT(45764523,0),vK5=new aT(45764217,0),BKC=new aT(45764524,0),HJe=new aT(45757957,0),RI_=new aT(45758467,0);var vn_=class{constructor(l){this.Z=l}};var Bat=class{constructor(l){this.Z=l}};var It="://secure-...imrworldwide.com/ ://cdn.imrworldwide.com/ ://aksecure.imrworldwide.com/ ://[^.]*.moatads.com ://youtube[0-9]+.moatpixel.com ://pm.adsafeprotected.com/youtube ://pm.test-adsafeprotected.com/youtube ://e[0-9]+.yt.srs.doubleverify.com www.google.com/pagead/xsul www.youtube.com/pagead/slav".split(" "),MJt=/\bocr\b/;var c2s=/(?:\[|%5B)([a-zA-Z0-9_]+)(?:\]|%5D)/g;var H1C=class extends U4{constructor(l){super(l,500)}};var RoP=class extends U4{constructor(l){super(l,500)}};var CNQ=class extends U4{constructor(l){super(l)}getName(){return tF(this,1)}getOptions(){return DD(this,RoP,3)}clearOptions(){return Wh(this,3)}};var uK5=function(l){return y=>{y=JSON.parse(y);if(!Array.isArray(y))throw Error("Expected jspb data to be an array, got "+ce(y)+": "+y);y[kH]|=34;return new l(y)}}(class extends U4{constructor(l){super(l)}getName(){return tF(this,1)}getOptions(){return DD(this,H1C,3)}clearOptions(){return Wh(this,3)}gT(){return OO(this,6)}fP(l){iW(this,6,l)}});var V8=Symbol();var Jg=Symbol();var Ye=!1,Io5=1,KF=Symbol("SIGNAL");var qUQ={version:0,Q97:0,LY:!1,producers:void 0,W$j:void 0,xD:void 0,NZa:void 0,D4a:!1,bp$:!1,MI0:!1,kind:"unknown",TqG:()=>!1,
tbG:()=>{},
Xb:()=>{},
sjK:()=>{},
JF:function(l,y){return Object.is(l,y)},
value:void 0,kind:"signal"};var j5=class extends g.Wd{constructor(l){super();this.J=this.C=0;this.Jy=l??{zk:(y,k)=>setTimeout(y,k),
qJ:y=>{clearTimeout(y)}};
this.Z=window.navigator?.onLine??!0;this.N=async()=>{await S5(this)};
window.addEventListener("offline",this.N);window.addEventListener("online",this.N);this.J||this.mI()}dispose(){window.removeEventListener("offline",this.N);window.removeEventListener("online",this.N);this.Jy.qJ(this.J);delete j5.instance}Qf(){return this.Z}mI(){this.J=this.Jy.zk(async()=>{this.Z?window.navigator?.onLine||await S5(this):await S5(this);this.mI()},3E4)}};var Y0s=s4(class extends U4{constructor(l){super(l)}C(){return OO(this,5)}},[0,nQ,G$z,KQ,nQ,-2,KQ,pQ]);var $d4=class{constructor(){this.data=[];this.Z=-1}set(l,y=!0){0<=l&&l<52&&Number.isInteger(l)&&this.data[l]!==y&&(this.data[l]=y,this.Z=-1)}get(l){return!!this.data[l]}};var Fk;g.J5(g.sj,g.zP);g.b=g.sj.prototype;g.b.start=function(){this.stop();this.V=!1;const l=LF(this),y=v_(this);l&&!y&&this.C.mozRequestAnimationFrame?(this.Z=g.iD(this.C,"MozBeforePaint",this.N),this.C.mozRequestAnimationFrame(null),this.V=!0):this.Z=l&&y?l.call(this.C,this.N):this.C.setTimeout(LPe(this.N),20)};
g.b.stop=function(){if(this.isActive()){const l=LF(this),y=v_(this);l&&!y&&this.C.mozRequestAnimationFrame?xc(this.Z):l&&y?y.call(this.C,this.Z):this.C.clearTimeout(this.Z)}this.Z=null};
g.b.isActive=function(){return this.Z!=null};
g.b.ek=function(){this.V&&this.Z&&xc(this.Z);this.Z=null;this.S.call(this.J,g.T5())};
g.b.Vj=function(){this.stop();g.sj.Ws.Vj.call(this)};g.J5(g.B_,g.zP);g.b=g.B_.prototype;g.b.Vq=0;g.b.Vj=function(){g.B_.Ws.Vj.call(this);this.stop();delete this.Z;delete this.C};
g.b.start=function(l){this.stop();this.Vq=g.ZZ(this.N,l!==void 0?l:this.h6)};
g.b.Kl=function(l){this.isActive()||this.start(l)};
g.b.stop=function(){this.isActive()&&g.aC.clearTimeout(this.Vq);this.Vq=0};
g.b.hV=function(){this.isActive()&&g.H_(this)};
g.b.isActive=function(){return this.Vq!=0};
g.b.jh=function(){this.Vq=0;this.Z&&this.Z.call(this.C)};g.iv=class extends g.zP{constructor(l,y,k){super();this.J=k!=null?l.bind(k):l;this.h6=y;this.N=null;this.Z=!1;this.C=0;this.Aj=null}V(l){this.N=arguments;this.Aj||this.C?this.Z=!0:Rt(this)}stop(){this.Aj&&(g.aC.clearTimeout(this.Aj),this.Aj=null,this.Z=!1,this.N=null)}pause(){this.C++}resume(){this.C--;this.C||!this.Z||this.Aj||(this.Z=!1,Rt(this))}Vj(){super.Vj();this.stop()}};g.DFQ=class{constructor(l,y){this.Z=l[g.aC.Symbol.iterator]();this.C=y}[Symbol.iterator](){return this}next(){const l=this.Z.next();return{value:l.done?void 0:this.C.call(void 0,l.value),done:l.done}}};g.J5(g.$a,g.Wd);g.b=g.$a.prototype;g.b.isPlaying=function(){return this.Z==1};
g.b.isPaused=function(){return this.Z==-1};
g.b.lF=function(){this.j8("begin")};
g.b.ew=function(){this.j8("end")};
g.b.onFinish=function(){this.j8("finish")};
g.b.onStop=function(){this.j8("stop")};
g.b.j8=function(l){this.dispatchEvent(l)};var lFz=Pf(function(){const l=g.Gf("DIV");var y=g.tV?"-webkit":Nj?"-moz":null;let k="transition:opacity 1s linear;";y&&(k+=y+"-transition:opacity 1s linear;");y=NqC({style:k});if(l.nodeType===1&&/^(script|style)$/i.test(l.tagName))throw Error("");l.innerHTML=yN(y);return g.sq(l.firstChild,"transition")!=""});g.J5(Qp,g.$a);g.b=Qp.prototype;g.b.play=function(){if(this.isPlaying())return!1;this.lF();this.j8("play");this.startTime=g.T5();this.Z=1;if(lFz())return g.n9(this.C,this.S),this.N=g.ZZ(this.pN,void 0,this),!0;this.Ks(!1);return!1};
g.b.pN=function(){g.Zo(this.C);PNs(this.C,this.K);g.n9(this.C,this.V);this.N=g.ZZ((0,g.We)(this.Ks,this,!1),this.J*1E3)};
g.b.stop=function(){this.isPlaying()&&this.Ks(!0)};
g.b.Ks=function(l){g.n9(this.C,"transition","");g.aC.clearTimeout(this.N);g.n9(this.C,this.V);this.endTime=g.T5();this.Z=0;if(l)this.onStop();else this.onFinish();this.ew()};
g.b.Vj=function(){this.stop();Qp.Ws.Vj.call(this)};
g.b.pause=function(){};var J2T={rgb:!0,rgba:!0,alpha:!0,rect:!0,image:!0,"linear-gradient":!0,"radial-gradient":!0,"repeating-linear-gradient":!0,"repeating-radial-gradient":!0,"cubic-bezier":!0,matrix:!0,perspective:!0,rotate:!0,rotate3d:!0,rotatex:!0,rotatey:!0,steps:!0,rotatez:!0,scale:!0,scale3d:!0,scalex:!0,scaley:!0,scalez:!0,skew:!0,skewx:!0,skewy:!0,translate:!0,translate3d:!0,translatex:!0,translatey:!0,translatez:!0,"var":!0};Ou("Element","attributes")||Ou("Node","attributes");Ou("Element","innerHTML")||Ou("HTMLElement","innerHTML");Ou("Node","nodeName");Ou("Node","nodeType");Ou("Node","parentNode");Ou("Node","childNodes");Ou("HTMLElement","style")||Ou("Element","style");Ou("HTMLStyleElement","sheet");var gUq=dx("getPropertyValue"),EUP=dx("setProperty");Ou("Element","namespaceURI")||Ou("Node","namespaceURI");var K2s={"-webkit-border-horizontal-spacing":!0,"-webkit-border-vertical-spacing":!0};var nUT,l$s,SUC,jUs,F2e;nUT=RegExp("[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0900-\u1fff\u200e\u2c00-\ud801\ud804-\ud839\ud83c-\udbff\uf900-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]");l$s=RegExp("^[\u0591-\u06ef\u06fa-\u08ff\u200f\ud802-\ud803\ud83a-\ud83b\ufb1d-\ufdff\ufe70-\ufefc]");g.yry=RegExp("^[^\u0591-\u06ef\u06fa-\u08ff\u200f\ud802-\ud803\ud83a-\ud83b\ufb1d-\ufdff\ufe70-\ufefc]*[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0900-\u1fff\u200e\u2c00-\ud801\ud804-\ud839\ud83c-\udbff\uf900-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]");
g.Gi=RegExp("^[^A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0900-\u1fff\u200e\u2c00-\ud801\ud804-\ud839\ud83c-\udbff\uf900-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]*[\u0591-\u06ef\u06fa-\u08ff\u200f\ud802-\ud803\ud83a-\ud83b\ufb1d-\ufdff\ufe70-\ufefc]");SUC=/^http:\/\/.*/;g.kYz=RegExp("^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)","i");jUs=/\s+/;F2e=/[\d\u06f0-\u06f9]/;Intl.NumberFormat.supportedLocalesOf(["vi".replace("_","-")]);var iu=class{constructor(l){this.C=l}kq(){return new Uu(this.C())}[Symbol.iterator](){return new Mp(this.C())}Z(){return new Mp(this.C())}},Uu=class extends g.Cr{constructor(l){super();this.C=l}next(){return this.C.next()}[Symbol.iterator](){return new Mp(this.C)}Z(){return new Mp(this.C)}},Mp=class extends iu{constructor(l){super(()=>l);
this.N=l}next(){return this.N.next()}};c9.prototype.clone=function(){return new c9(this.Z,this.K,this.N,this.J,this.V,this.S,this.C,this.A)};
c9.prototype.equals=function(l){return this.Z==l.Z&&this.K==l.K&&this.N==l.N&&this.J==l.J&&this.V==l.V&&this.S==l.S&&this.C==l.C&&this.A==l.A};xa.prototype.clone=function(){return new xa(this.start,this.end)};(function(){if(K$z){var l=/Windows NT ([0-9.]+)/;return(l=l.exec(g.Xv()))?l[1]:"0"}return e$?(l=/1[0|1][_.][0-9_.]+/,(l=l.exec(g.Xv()))?l[0].replace(/_/g,"."):"10"):g.WD?(l=/Android\s+([^\);]+)(\)|;)/,(l=l.exec(g.Xv()))?l[1]:""):wbP||hiq||GLC?(l=/(?:iPhone|CPU)\s+OS\s+(\S+)/,(l=l.exec(g.Xv()))?l[1].replace(/_/g,"."):""):""})();var oUz=function(){if(g.N2)return mw(/Firefox\/([0-9.]+)/);if(g.wx||g.eG||g.Yf)return pK;if(g.Mx){if(Te()||VN()){var l=mw(/CriOS\/([0-9.]+)/);if(l)return l}return mw(/Chrome\/([0-9.]+)/)}if(g.Km&&!Te())return mw(/Version\/([0-9.]+)/);if(us||x9){if(l=/Version\/(\S+).*Mobile\/(\S+)/.exec(g.Xv()))return l[1]+"."+l[2]}else if(g.Wb)return(l=mw(/Android\s+([0-9.]+)/))?l:mw(/Version\/([0-9.]+)/);return""}();g.J5(g.W9,g.zP);g.b=g.W9.prototype;g.b.subscribe=function(l,y,k){let z=this.C[l];z||(z=this.C[l]=[]);const r=this.S;this.Z[r]=l;this.Z[r+1]=y;this.Z[r+2]=k;this.S=r+3;z.push(r);return r};
g.b.unsubscribe=function(l,y,k){if(l=this.C[l]){const z=this.Z;if(l=l.find(function(r){return z[r+1]==y&&z[r+2]==k}))return this.Dl(l)}return!1};
g.b.Dl=function(l){const y=this.Z[l];if(y){const k=this.C[y];this.V!=0?(this.N.push(l),this.Z[l+1]=()=>{}):(k&&g.Ap(k,l),delete this.Z[l],delete this.Z[l+1],delete this.Z[l+2])}return!!y};
g.b.publish=function(l,y){var k=this.C[l];if(k){const r=Array(arguments.length-1);var z=arguments.length;let Z;for(Z=1;Z<z;Z++)r[Z-1]=arguments[Z];if(this.K)for(Z=0;Z<k.length;Z++)z=k[Z],N7P(this.Z[z+1],this.Z[z+2],r);else{this.V++;try{for(Z=0,z=k.length;Z<z&&!this.IR();Z++){const e=k[Z];this.Z[e+1].apply(this.Z[e+2],r)}}finally{if(this.V--,this.N.length>0&&this.V==0)for(;k=this.N.pop();)this.Dl(k)}}return Z!=0}return!1};
g.b.clear=function(l){if(l){const y=this.C[l];y&&(y.forEach(this.Dl,this),delete this.C[l])}else this.Z.length=0,this.C={}};
g.b.Vj=function(){g.W9.Ws.Vj.call(this);this.clear();this.N.length=0};g.IS.prototype.set=function(l,y){y===void 0?this.My.remove(l):this.My.set(l,g.cU(y))};
g.IS.prototype.get=function(l){let y;try{y=this.My.get(l)}catch(k){return}if(y!==null)try{return JSON.parse(y)}catch(k){throw"Storage: Invalid value was encountered";}};
g.IS.prototype.remove=function(l){this.My.remove(l)};g.J5(Ti,g.IS);Ti.prototype.set=function(l,y){Ti.Ws.set.call(this,l,P9(y))};
Ti.prototype.jX=function(l){l=Ti.Ws.get.call(this,l);if(l===void 0||l instanceof Object)return l;throw"Storage: Invalid value was encountered";};
Ti.prototype.get=function(l){if(l=this.jX(l)){if(l=l.data,l===void 0)throw"Storage: Invalid value was encountered";}else l=void 0;return l};g.J5(JB,Ti);JB.prototype.set=function(l,y,k){if(y=P9(y)){if(k){if(k<g.T5()){JB.prototype.remove.call(this,l);return}y.expiration=k}y.creation=g.T5()}JB.Ws.set.call(this,l,y)};
JB.prototype.jX=function(l,y){const k=JB.Ws.jX.call(this,l);if(k)if(!y&&g.Ya(k))JB.prototype.remove.call(this,l);else return k};g.J5(g.pW,JB);g.J5(KW,sUP);KW.prototype[Symbol.iterator]=function(){return g.XA(this.kq(!0)).Z()};
KW.prototype.clear=function(){const l=Array.from(this);for(const y of l)this.remove(y)};g.J5(gx,KW);g.b=gx.prototype;g.b.isAvailable=function(){if(this.C===null){var l=this.Z;if(l)try{l.setItem("__sak","1");l.removeItem("__sak");var y=!0}catch(k){y=k instanceof DOMException&&(k.name==="QuotaExceededError"||k.code===22||k.code===1014||k.name==="NS_ERROR_DOM_QUOTA_REACHED")&&l&&l.length!==0}else y=!1;this.C=y}return this.C};
g.b.set=function(l,y){Eu(this);try{this.Z.setItem(l,y)}catch(k){if(this.Z.length==0)throw"Storage mechanism: Storage disabled";throw"Storage mechanism: Quota exceeded";}};
g.b.get=function(l){Eu(this);l=this.Z.getItem(l);if(typeof l!=="string"&&l!==null)throw"Storage mechanism: Invalid value was encountered";return l};
g.b.remove=function(l){Eu(this);this.Z.removeItem(l)};
g.b.kq=function(l){Eu(this);var y=0,k=this.Z,z=new g.Cr;z.next=function(){if(y>=k.length)return g.Hb;var r=k.key(y++);if(l)return g.bL(r);r=k.getItem(r);if(typeof r!=="string")throw"Storage mechanism: Invalid value was encountered";return g.bL(r)};
return z};
g.b.clear=function(){Eu(this);this.Z.clear()};
g.b.key=function(l){Eu(this);return this.Z.key(l)};g.J5(fW,gx);g.J5(jM,gx);g.J5(SM,KW);SM.prototype.set=function(l,y){this.C.set(this.Z+l,y)};
SM.prototype.get=function(l){return this.C.get(this.Z+l)};
SM.prototype.remove=function(l){this.C.remove(this.Z+l)};
SM.prototype.kq=function(l){const y=this.C[Symbol.iterator](),k=this,z=new g.Cr;z.next=function(){var r=y.next();if(r.done)return r;for(r=r.value;r.slice(0,k.Z.length)!=k.Z;){r=y.next();if(r.done)return r;r=r.value}return g.bL(l?r.slice(k.Z.length):k.C.get(r))};
return z};FA.prototype.getValue=function(){return this.C};
FA.prototype.clone=function(){return new FA(this.Z,this.C)};var Uv=class{constructor(l){this.Z=[];if(l)a:{let k;if(l instanceof Uv){if(k=l.e8(),l=l.s2(),this.Z.length<=0){var y=this.Z;for(let z=0;z<k.length;z++)y.push(new FA(k[z],l[z]));break a}}else k=g.LR(l),l=sy(l);for(y=0;y<k.length;y++)this.mV(k[y],l[y])}}mV(l,y){var k=this.Z;k.push(new FA(l,y));l=k.length-1;y=this.Z;for(k=y[l];l>0;){const z=l-1>>1;if(y[z].Z>k.Z)y[l]=y[z],l=z;else break}y[l]=k}remove(){var l=this.Z,y=l.length;const k=l[0];if(!(y<=0)){if(y==1)l.length=0;else{l[0]=l.pop();l=0;y=this.Z;
const r=y.length,Z=y[l];for(;l<r>>1;){var z=l*2+1;const e=l*2+2;z=e<r&&y[e].Z<y[z].Z?e:z;if(y[z].Z>Z.Z)break;y[l]=y[z];l=z}y[l]=Z}return k.getValue()}}s2(){const l=this.Z,y=[],k=l.length;for(let z=0;z<k;z++)y.push(l[z].getValue());return y}e8(){const l=this.Z,y=[],k=l.length;for(let z=0;z<k;z++)y.push(l[z].Z);return y}clone(){return new Uv(this)}isEmpty(){return this.Z.length===0}clear(){this.Z.length=0}};var zds=class extends Uv{enqueue(l,y){this.mV(l,y)}};oS.NV=void 0;oS.getInstance=function(){return oS.NV?oS.NV:oS.NV=new oS};
oS.prototype.Z=0;var v9={},rre=typeof Uint8Array!=="undefined"&&typeof Uint16Array!=="undefined"&&typeof Int32Array!=="undefined";v9.assign=function(l){for(var y=Array.prototype.slice.call(arguments,1);y.length;){var k=y.shift();if(k){if(typeof k!=="object")throw new TypeError(k+"must be non-object");for(var z in k)Object.prototype.hasOwnProperty.call(k,z)&&(l[z]=k[z])}}return l};
v9.vJ=function(l,y){if(l.length===y)return l;if(l.subarray)return l.subarray(0,y);l.length=y;return l};
var ZOg={Z8:function(l,y,k,z,r){if(y.subarray&&l.subarray)l.set(y.subarray(k,k+z),r);else for(var Z=0;Z<z;Z++)l[r+Z]=y[k+Z]},
UV:function(l){var y,k;var z=k=0;for(y=l.length;z<y;z++)k+=l[z].length;var r=new Uint8Array(k);z=k=0;for(y=l.length;z<y;z++){var Z=l[z];r.set(Z,k);k+=Z.length}return r}},edP={Z8:function(l,y,k,z,r){for(var Z=0;Z<z;Z++)l[r+Z]=y[k+Z]},
UV:function(l){return[].concat.apply([],l)}};
v9.MC=function(){rre?(v9.nR=Uint8Array,v9.Cw=Uint16Array,v9.KF=Int32Array,v9.assign(v9,ZOg)):(v9.nR=Array,v9.Cw=Array,v9.KF=Array,v9.assign(v9,edP))};
v9.MC();var Ar5=!0;try{new Uint8Array(1)}catch(l){Ar5=!1};var PR={};PR=function(l,y,k,z){var r=l&65535|0;l=l>>>16&65535|0;for(var Z;k!==0;){Z=k>2E3?2E3:k;k-=Z;do r=r+y[z++]|0,l=l+r|0;while(--Z);r%=65521;l%=65521}return r|l<<16|0};for(var JR={},Ms,$z4=[],Xr=0;Xr<256;Xr++){Ms=Xr;for(var Q25=0;Q25<8;Q25++)Ms=Ms&1?3988292384^Ms>>>1:Ms>>>1;$z4[Xr]=Ms}JR=function(l,y,k,z){k=z+k;for(l^=-1;z<k;z++)l=l>>>8^$z4[(l^y[z])&255];return l^-1};var cR={};cR={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};var Op=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],hR=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Dbz=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],xG=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],mJ=Array(576);H9(mJ);var q4=Array(60);H9(q4);var wL=Array(512);H9(wL);var tR=Array(256);H9(tR);var dL=Array(29);H9(dL);var GR=Array(30);H9(GR);var nu,FN,ov,SW=!1;var Ep;Ep=[new gL(0,0,0,0,function(l,y){var k=65535;for(k>l.U2-5&&(k=l.U2-5);;){if(l.zE<=1){YG(l);if(l.zE===0&&y===0)return 1;if(l.zE===0)break}l.qW+=l.zE;l.zE=0;var z=l.VG+k;if(l.qW===0||l.qW>=z)if(l.zE=l.qW-z,l.qW=z,WR(l,!1),l.Er.Or===0)return 1;if(l.qW-l.VG>=l.RF-262&&(WR(l,!1),l.Er.Or===0))return 1}l.mV=0;if(y===4)return WR(l,!0),l.Er.Or===0?3:4;l.qW>l.VG&&WR(l,!1);return 1}),
new gL(4,4,8,4,pu),new gL(4,5,16,8,pu),new gL(4,6,32,32,pu),new gL(4,4,16,16,Ku),new gL(8,16,32,32,Ku),new gL(8,16,128,128,Ku),new gL(8,32,128,256,Ku),new gL(32,128,258,1024,Ku),new gL(32,258,258,4096,Ku)];var jW={};jW=function(){this.input=null;this.Ui=this.Sa=this.SY=0;this.output=null;this.F0=this.Or=this.X5=0;this.msg="";this.state=null;this.FN=2;this.Js=0};var N4=Object.prototype.toString;
fu.prototype.push=function(l,y){var k=this.Er,z=this.options.chunkSize;if(this.ended)return!1;var r=y===~~y?y:y===!0?4:0;typeof l==="string"?k.input=B9(l):N4.call(l)==="[object ArrayBuffer]"?k.input=new Uint8Array(l):k.input=l;k.SY=0;k.Sa=k.input.length;do{k.Or===0&&(k.output=new v9.nR(z),k.X5=0,k.Or=z);l=RB5(k,r);if(l!==1&&l!==0)return this.ew(l),this.ended=!0,!1;if(k.Or===0||k.Sa===0&&(r===4||r===2))if(this.options.to==="string"){var Z=v9.vJ(k.output,k.X5);y=Z;Z=Z.length;if(Z<65537&&(y.subarray&&
Ar5||!y.subarray))y=String.fromCharCode.apply(null,v9.vJ(y,Z));else{for(var e="",A=0;A<Z;A++)e+=String.fromCharCode(y[A]);y=e}this.chunks.push(y)}else y=v9.vJ(k.output,k.X5),this.chunks.push(y)}while((k.Sa>0||k.Or===0)&&l!==1);if(r===4)return(k=this.Er)&&k.state?(z=k.state.status,z!==42&&z!==69&&z!==73&&z!==91&&z!==103&&z!==113&&z!==666?l=Cu(k,-2):(k.state=null,l=z===113?Cu(k,-3):0)):l=-2,this.ew(l),this.ended=!0,l===0;r===2&&(this.ew(0),k.Or=0);return!0};
fu.prototype.ew=function(l){l===0&&(this.result=this.options.to==="string"?this.chunks.join(""):v9.UV(this.chunks));this.chunks=[];this.err=l;this.msg=this.Er.msg};var BR=()=>Math.random().toString(36).substring(7).split("").join("."),vR=`@@redux/INIT${BR()}`,kAq=`@@redux/REPLACE${BR()}`;var Rv=typeof Symbol==="function"&&Symbol.observable||"@@observable";var YNe=s4(class extends U4{constructor(l){super(l)}},[0,nQ,vDg,g$,jy,g$,-1,Sy,jy,Sy,-1,nQ,Sy,vDg,E3,[0,jy,-3,Sy],g$,-1,Sy]);var Qwt=96227457;var tNz=function(l,y){return(()=>{const k=new HQT(l,y);return()=>k})()}("youtube.api.innertube.AttestationError",'[null,[["ATTESTATION_ERROR_UNKNOWN",0],["ATTESTATION_ERROR_VM_NOT_INITIALIZED",1],["ATTESTATION_ERROR_VM_NO_RESPONSE",2],["ATTESTATION_ERROR_VM_TIMEOUT",3],["ATTESTATION_ERROR_VM_INTERNAL_ERROR",4],["ATTESTATION_ERROR_PREFETCH_CHALLENGE_INVALID",5],["ATTESTATION_ERROR_PREFETCH_CHALLENGE_NETWORK_ERROR",6],["ATTESTATION_ERROR_PREFETCH_CHALLENGE_OFFLINE",7],["ATTESTATION_ERROR_PREFETCH_CHALLENGE_INTERNAL_ERROR",8],["ATTESTATION_ERROR_API_NOT_READY",9],["ATTESTATION_ERROR_DEVICE_OFFLINE",10],["ATTESTATION_ERROR_KEY_PAIR_INIT_FAILED",12],["ATTESTATION_ERROR_SIGNING_DATA_MISSING",13],["ATTESTATION_ERROR_SIGNING_FAILED",14],["ATTESTATION_ERROR_CERT_CHAIN_RETRIEVAL_FAILED",15]],null,[[11,11]]]');g.D=class{constructor(l){this.name=l}};var G9T=new g.D("adInfoDialogEndpoint");var Bmz=new g.D("adPingingEndpoint");var VWQ=new g.D("crossDeviceProgressCommand");var kt=new g.D("actionCompanionAdRenderer");var eT=new g.D("adActionInterstitialRenderer");var OOC=new g.D("adDurationRemainingRenderer");var I5=new g.D("adHoverTextButtonRenderer");var Mbs=new g.D("adInfoDialogRenderer");var wX=new g.D("adMessageRenderer");var Th=new g.D("adPreviewRenderer");var ri=new g.D("adsEngagementPanelRenderer");var qJ4=new g.D("dismissablePanelTextPortraitImageRenderer");var Xd=new g.D("adsEngagementPanelSectionListViewModel");var dz5=new g.D("flyoutCtaRenderer");var zh=new g.D("imageCompanionAdRenderer");var rd=new g.D("instreamAdPlayerOverlayRenderer");var igC=new g.D("instreamSurveyAdBackgroundImageRenderer");var W3=new g.D("instreamSurveyAdPlayerOverlayRenderer");var hC=new g.D("instreamSurveyAdRenderer"),qe=new g.D("instreamSurveyAdSingleSelectQuestionRenderer"),m6=new g.D("instreamSurveyAdMultiSelectQuestionRenderer"),cx=new g.D("instreamSurveyAdAnswerRenderer"),wj_=new g.D("instreamSurveyAdAnswerNoneOfTheAboveRenderer");var PK=new g.D("instreamVideoAdRenderer");var hdg=new g.D("textOverlayAdContentRenderer"),GYg=new g.D("enhancedTextOverlayAdContentRenderer"),aF5=new g.D("imageOverlayAdContentRenderer");var Z4=new g.D("playerOverlayLayoutRenderer");var A7=new g.D("videoInterstitialButtonedCenteredLayoutRenderer");var POC=new g.D("aboveFeedAdLayoutRenderer");var JKz=new g.D("belowPlayerAdLayoutRenderer");var Vu5=new g.D("inPlayerAdLayoutRenderer");var YJ5=new g.D("inPlayerOrganicOverlayAdLayoutRenderer");var i$=new g.D("playerBytesAdLayoutRenderer");var u$=new g.D("playerBytesSequenceItemAdLayoutRenderer");var b$=new g.D("playerUnderlayAdLayoutRenderer");var wi=new g.D("adIntroRenderer");var O7=new g.D("playerBytesSequentialLayoutRenderer");var M_T=new g.D("slidingTextPlayerOverlayRenderer");var Gh=new g.D("surveyTextInterstitialRenderer");var U7=new g.D("videoAdTrackingRenderer");var ble=new g.D("videoInterstitialCenteredLayoutViewModel");var iOg=new g.D("simpleAdBadgeRenderer");var LM=new g.D("skipAdRenderer"),UzQ=new g.D("skipButtonRenderer");var xt=new g.D("adSlotRenderer");var c3=new g.D("squeezebackPlayerSidePanelRenderer");var MNt=new g.D("timedPieCountdownRenderer");var hf=new g.D("adAvatarViewModel");var GL=new g.D("adBadgeViewModel");var a8=new g.D("adButtonViewModel");var XjQ=new g.D("adDetailsLineViewModel");var cry=new g.D("adDisclosureBannerViewModel");var CE_=new g.D("adPodIndexViewModel");var bOC=new g.D("imageBackgroundViewModel");var uO4=new g.D("adGridCardCollectionViewModel");var xzq=new g.D("adGridCardTextViewModel");var mz5=new g.D("adPreviewViewModel");var qzy=new g.D("playerAdAvatarLockupCardButtonedViewModel");var WQg=new g.D("skipAdButtonViewModel");var IFT=new g.D("skipAdViewModel");var T1e=new g.D("timedPieCountdownViewModel");var VNe=new g.D("visitAdvertiserLinkViewModel");var Zh=new g.D("bannerImageLayoutViewModel");var ea=new g.D("topBannerImageTextIconButtonedLayoutViewModel");var AC=new g.D("adsEngagementPanelLayoutViewModel");var C0=new g.D("displayUnderlayTextGridCardsLayoutViewModel");g.bg=new g.D("browseEndpoint");var PEC=new g.D("confirmDialogEndpoint");var Cj=class{constructor(l){this.Z=l}},bv=class extends Cj{get entityMetadata(){return this.Z.entityMetadata}set entityMetadata(l){this.Z.entityMetadata=l}};var JrT=class extends bv{C(){return[]}};var Yzt=new g.D("commandContext");var pje=class extends bv{C(){return[]}};var KQ4=class extends bv{C(){return[]}};var bYq=new g.D("rawColdConfigGroup");var CIe=new g.D("rawHotConfigGroup");g.jr=new g.D("commandExecutorCommand");var gNq=class extends U4{constructor(l){super(l)}};var ENQ={OPz:0,Cqr:1,rjj:32,LwG:61,XnR:67,a3j:103,Pqr:86,QUG:42,HlR:60,blG:62,U_0:73,Rxj:76,I3b:88,S1$:90,E3_:99,q1e:98,n3z:100,v3a:102,g3e:41,Kwj:69,m_a:70,BYd:71,HN:2,Rm:27,ANDROID:3,W5:54,DK:14,VD:91,Yb:55,cW:24,h7:20,ZP:18,ev:21,b6:104,qt:30,rr:29,HW:28,DW7:101,pV:34,J7:36,CV:38,IOS:5,Yy:15,qp:92,cf:40,Zt:25,C1:17,bj:19,Mp:64,Np:66,V8:26,Q8:22,rC:33,Hf:68,RE:35,JY:53,oE:37,hY:39,E2e:7,g2j:57,K8j:43,B4e:59,mWj:93,QD:74,yvK:75,Avj:85,wFG:65,fpa:80,iPK:8,n2j:10,j7j:58,lpz:63,xWd:72,o5:23,wnz:11,
x_R:13,WW:12,XF_:16,o37:56,uz0:31,Qn:77,Qw:84,pn0:87,HD:89,r_:94,Wf:95};var bX=class extends U4{constructor(l){super(l)}B2(){return tF(this,3)}xi(){return tF(this,5)}aV(l){return GM(this,5,l)}};var cS=class extends U4{constructor(l){super(l)}};var fFt=class extends U4{constructor(l){super(l)}};var Go_=class extends U4{constructor(l){super(l)}getDeviceId(){return tF(this,6)}BL(l){var y=Yd(this,9,TA,3,!0);Zr(y,l);return y[l]}getPlayerType(){return OO(this,36)}setHomeGroupInfo(l){return rZ(this,fFt,81,l)}clearLocationPlayabilityToken(){return Wh(this,89)}};var iYe=class extends U4{constructor(l){super(l)}getValue(){return tF(this,vh(this,UAy,2))}},UAy=[2,3,4,5,6];var j2e=class extends U4{constructor(l){super(l)}setTrackingParams(l){return Wh(this,1,rP(l,!1))}};var a3T=class extends U4{constructor(l){super(l)}};var Cv=class extends U4{constructor(l){super(l)}BL(l){var y=Yd(this,5,VY,3,!0);Zr(y,l);return y[l]}};var Mes=class extends U4{constructor(l){super(l)}getToken(){return wZ(this,2)}setToken(l){return GM(this,2,l)}};var rv=class extends U4{constructor(l){super(l)}setSafetyMode(l){return iW(this,5,l)}};var zd=class extends U4{constructor(l){super(l)}N(l){return rZ(this,Go_,1,l)}};var QV=new g.D("thumbnailLandscapePortraitRenderer");g.Sz_=new g.D("changeEngagementPanelVisibilityAction");var sRs=new g.D("continuationCommand");var nN4=new g.D("openPopupAction");g.yT=new g.D("signalAction");g.uv=new g.D("webCommandMetadata");var m6T=new g.D("metadataBadgeRenderer");var N5C=new g.D("signalServiceEndpoint");var Ji=new g.D("innertubeCommand");var FQ5=new g.D("loggingDirectives");var mdT={xA:"EMBEDDED_PLAYER_MODE_UNKNOWN",yO:"EMBEDDED_PLAYER_MODE_DEFAULT",w0:"EMBEDDED_PLAYER_MODE_PFP",Au:"EMBEDDED_PLAYER_MODE_PFL"};var nRC=new g.D("channelThumbnailEndpoint");var cLt=new g.D("embeddedPlayerErrorMessageRenderer");var hPz=new g.D("embeddedPlayerOverlayVideoDetailsRenderer"),F_s=new g.D("embeddedPlayerOverlayVideoDetailsCollapsedRenderer"),oRC=new g.D("embeddedPlayerOverlayVideoDetailsExpandedRenderer");var Mny=new g.D("embedsInfoPanelRenderer");var oNt=class extends bv{C(){return[]}};var N15=class extends bv{C(){return[]}};var s2T=class extends bv{C(){const l=[];this.Z.alternateChannel&&l.push(this.Z.alternateChannel);this.Z.alternateChannelList&&l.push(...this.Z.alternateChannelList);this.Z.oneofChannelEntity&&l.push(this.Z.oneofChannelEntity);return[...(new Set(l))]}};var LQ4=class extends bv{C(){const l=[];this.Z.entryCollection&&l.push(this.Z.entryCollection);return[...(new Set(l))]}},B14=class extends bv{C(){const l=[];this.Z.parentPlaylist&&l.push(this.Z.parentPlaylist);if(this.Z.entries)for(const y of this.Z.entries)l.push(...(new vNC(y)).C());return[...(new Set(l))]}},vNC=class extends Cj{C(){const l=[];this.Z.video&&l.push(this.Z.video);return[...(new Set(l))]}};var HOq=class extends bv{C(){const l=[];this.Z.descriptionEntity&&l.push(this.Z.descriptionEntity);this.Z.creators&&l.push(...this.Z.creators);this.Z.theBiggestFan&&l.push(this.Z.theBiggestFan);return[...(new Set(l))]}},Rd5=class extends bv{C(){return[]}};var xr=new g.D("feedbackEndpoint");var Dzg=class extends bv{C(){return[]}};var lms=class extends bv{C(){return[]}};var yX_=class extends bv{C(){return[]}};var kz5=new g.D("youtubeIconSource");var za5=new g.D("callToActionButtonViewModel");var rXC=class extends bv{C(){return[]}};var ZTs=class extends bv{C(){return[]}};var eas=new g.D("interactionLoggingCommandMetadata");var Mq_={Jjz:"WEB_DISPLAY_MODE_UNKNOWN",M2K:"WEB_DISPLAY_MODE_BROWSER",NYz:"WEB_DISPLAY_MODE_MINIMAL_UI",V20:"WEB_DISPLAY_MODE_STANDALONE",sUK:"WEB_DISPLAY_MODE_FULLSCREEN"};var AXQ=class extends U4{constructor(l){super(l)}getPlayerType(){return OO(this,7)}Qi(){return tF(this,19)}setVideoId(l){return GM(this,19,l)}};var tOe=class extends U4{constructor(l){super(l)}};var QVy=class extends U4{constructor(l){super(l)}};var Ai=class extends U4{constructor(l){super(l,500)}},$cQ=[2,3,5,6,7,11,13,20,21,22,23,24,28,32,37,45,59,72,73,74,76,78,79,80,85,91,97,100,102,105,111,117,119,126,127,136,146,148,151,156,157,158,159,163,164,168,176,177,178,179,184,188,189,190,191,193,194,195,196,197,198,199,200,201,202,203,204,205,206,208,209,215,219,222,225,226,227,229,232,233,234,240,241,244,247,248,249,251,254,255,256,257,258,259,260,261,266,270,272,278,288,291,293,300,304,308,309,310,311,313,314,319,320,321,323,324,327,328,330,
331,332,334,337,338,340,344,348,350,351,352,353,354,355,356,357,358,361,363,364,368,369,370,373,374,375,378,380,381,383,388,389,399,402,403,410,411,412,413,414,415,416,417,418,423,424,425,426,427,429,430,431,439,441,444,448,458,469,471,473,474,480,481,482,484,485,486,491,495,496,506,507,509,511,512,513,514,515,516,517,518,519,520,522,523,524,525,526,527,528,529,530,531,536,537,538,539,541,545];var QOQ=new g.D("loggingContext");var cwe=class extends U4{constructor(l){super(l)}};var zmq=class extends U4{constructor(l){super(l)}Qi(){return wZ(this,vh(this,vk,1))}setVideoId(l){return sS(this,1,vk,Hi(l))}getPlaylistId(){return wZ(this,vh(this,vk,2))}},vk=[1,2];g.kE=class extends U4{constructor(l){super(l)}};g.kE.prototype.fY=yz(0);var tjs=new g.D("dismissPlayerOverlayCommand");var OT5=class extends bv{C(){return[]}};var dcC=class extends bv{C(){return[]}};var wzq=class extends bv{C(){return[]}};var haT=class extends bv{C(){const l=[];this.Z.downloadsList&&l.push(this.Z.downloadsList);this.Z.smartDownloadsList&&l.push(this.Z.smartDownloadsList);this.Z.recommendedDownloadsList&&l.push(this.Z.recommendedDownloadsList);this.Z.refresh&&l.push(this.Z.refresh);return[...(new Set(l))]}};var amq=class extends bv{C(){const l=[];this.Z.refresh&&l.push(this.Z.refresh);if(this.Z.downloads)for(const y of this.Z.downloads)l.push(...(new Gzy(y)).C());return[...(new Set(l))]}},Gzy=class extends Cj{C(){const l=[];this.Z.video&&l.push(this.Z.video);this.Z.playlist&&l.push(this.Z.playlist);this.Z.videoItem&&l.push(this.Z.videoItem);this.Z.playlistItem&&l.push(this.Z.playlistItem);return[...(new Set(l))]}};var iTQ=class extends bv{C(){const l=[];this.Z.localImageEntities&&l.push(...this.Z.localImageEntities);return[...(new Set(l))]}};var Uc5=class extends bv{C(){const l=[];this.Z.playbackData&&l.push(this.Z.playbackData);this.Z.localImageEntities&&l.push(...this.Z.localImageEntities);this.Z.videoDownloadContextEntity&&l.push(this.Z.videoDownloadContextEntity);return[...(new Set(l))]}};var Mje=class extends bv{C(){return[]}};var Xzy=class extends bv{C(){const l=[];this.Z.fakeChildren&&l.push(...this.Z.fakeChildren);return[...(new Set(l))]}};var cXC=class extends bv{C(){const l=[];this.Z.video&&l.push(this.Z.video);this.Z.playbackData&&l.push(this.Z.playbackData);this.Z.offlineVideoPolicy&&l.push(this.Z.offlineVideoPolicy);return[...(new Set(l))]}};var CTT=class extends bv{C(){return[]}};var bTT=class extends bv{C(){const l=[];this.Z.channelOwner&&l.push(this.Z.channelOwner);this.Z.videos&&l.push(...this.Z.videos);this.Z.collaboratorChannels&&l.push(...this.Z.collaboratorChannels);this.Z.downloadState&&l.push(this.Z.downloadState);this.Z.refresh&&l.push(this.Z.refresh);return[...(new Set(l))]}};var u_C=class extends bv{C(){const l=[];this.Z.video&&l.push(this.Z.video);this.Z.channelContributor&&l.push(this.Z.channelContributor);return[...(new Set(l))]}};var mcq=class extends Cj{C(){const l=[];this.Z.recommendedVideoMetadata&&l.push(...(new xc5(this.Z.recommendedVideoMetadata)).C());return[...(new Set(l))]}},xc5=class extends Cj{C(){const l=[];this.Z.localImageEntities&&l.push(...this.Z.localImageEntities);this.Z.videoDownloadContextEntity&&l.push(this.Z.videoDownloadContextEntity);return[...(new Set(l))]}};var qkq=class extends Cj{C(){const l=[];this.Z.playbackPosition&&l.push(this.Z.playbackPosition);return[...(new Set(l))]}};var WXy=class extends bv{C(){const l=[];this.Z.owner&&l.push(this.Z.owner);this.Z.downloadState&&l.push(this.Z.downloadState);this.Z.userState&&l.push(...(new qkq(this.Z.userState)).C());this.Z.additionalMetadata&&l.push(...(new mcq(this.Z.additionalMetadata)).C());return[...(new Set(l))]}};var Imt=class extends bv{C(){const l=[];this.Z.userChannelDetails&&l.push(this.Z.userChannelDetails);return[...(new Set(l))]}};var TST=class extends bv{C(){const l=[];this.Z.channelOwner&&l.push(this.Z.channelOwner);this.Z.playbackPosition&&l.push(this.Z.playbackPosition);this.Z.localImageEntities&&l.push(...this.Z.localImageEntities);this.Z.downloadStatus&&l.push(this.Z.downloadStatus);return[...(new Set(l))]}};var VjC=class extends bv{C(){return[]}};var PTQ=class extends bv{C(){return[]}};var JXP=class extends bv{C(){return[]}};var YkP=class extends bv{C(){return[]}};var pzy=class extends bv{C(){return[]}};var KXe=class extends bv{C(){return[]}};var gyg=class extends bv{C(){return[]}};var Ey4=class extends bv{C(){return[]}};var fmQ=class extends bv{C(){return[]}};var WF=new g.D("changeKeyedMarkersVisibilityCommand");var jO5=new g.D("changeMarkersVisibilityCommand");var qHg=new g.D("loadMarkersCommand");var SkC=new g.D("suggestedActionDataViewModel");var v_g=new g.D("timelyActionViewModel");var LoP=new g.D("timelyActionsOverlayViewModel");var nyT=class extends bv{C(){return[]}};var FX4=class extends bv{C(){return[]}};var oyy=class extends bv{C(){return[]}};var UIe=new g.D("productListItemRenderer");var NS_=new g.D("shoppingOverlayRenderer");var sO_=class extends bv{C(){return[]}};var LXq=class extends bv{C(){const l=[];this.Z.compositeSourceKeys&&l.push(...this.Z.compositeSourceKeys);return[...(new Set(l))]}};var vy_=class extends bv{C(){const l=[];this.Z.trackDownloadMetadatas&&l.push(...this.Z.trackDownloadMetadatas);return[...(new Set(l))]}};var BSg=class extends bv{C(){const l=[];this.Z.downloadedTracks&&l.push(...this.Z.downloadedTracks);this.Z.smartDownloadedTracks&&l.push(...this.Z.smartDownloadedTracks);this.Z.downloadedEpisodes&&l.push(...this.Z.downloadedEpisodes);this.Z.downloadedAlbumReleases&&l.push(...this.Z.downloadedAlbumReleases);this.Z.smartDownloadedAlbumReleases&&l.push(...this.Z.smartDownloadedAlbumReleases);this.Z.downloadedPlaylists&&l.push(...this.Z.downloadedPlaylists);this.Z.smartDownloadedPlaylists&&l.push(...this.Z.smartDownloadedPlaylists);
this.Z.metadataOnlyTracks&&l.push(...this.Z.metadataOnlyTracks);return[...(new Set(l))]}};var HTe=class extends bv{C(){const l=[];this.Z.trackDownloadMetadatas&&l.push(...this.Z.trackDownloadMetadatas);return[...(new Set(l))]}};var RaP=class extends bv{C(){const l=[];this.Z.playbackData&&l.push(this.Z.playbackData);this.Z.localImageEntities&&l.push(...this.Z.localImageEntities);this.Z.videoDownloadContextEntity&&l.push(this.Z.videoDownloadContextEntity);return[...(new Set(l))]}};var Dcg=class extends bv{C(){const l=[];this.Z.musicLibraryStatusEntity&&l.push(this.Z.musicLibraryStatusEntity);this.Z.primaryArtists&&l.push(...this.Z.primaryArtists);this.Z.details&&l.push(this.Z.details);this.Z.userDetails&&l.push(this.Z.userDetails);this.Z.tracks&&l.push(...this.Z.tracks);this.Z.share&&l.push(this.Z.share);this.Z.downloadMetadata&&l.push(this.Z.downloadMetadata);this.Z.refresh&&l.push(this.Z.refresh);return[...(new Set(l))]}},lie=class extends bv{C(){const l=[];this.Z.albumRelease&&
l.push(this.Z.albumRelease);this.Z.tracks&&l.push(...this.Z.tracks);return[...(new Set(l))]}},ykq=class extends bv{C(){const l=[];this.Z.albumRelease&&l.push(this.Z.albumRelease);return[...(new Set(l))]}};var k2T=class extends bv{C(){const l=[];this.Z.details&&l.push(this.Z.details);this.Z.userDetails&&l.push(this.Z.userDetails);return[...(new Set(l))]}},zw_=class extends bv{C(){const l=[];this.Z.parentArtist&&l.push(this.Z.parentArtist);return[...(new Set(l))]}},rkz=class extends bv{C(){const l=[];this.Z.parentArtist&&l.push(this.Z.parentArtist);return[...(new Set(l))]}};var Zsq=class extends bv{C(){return[]}};var ewC=class extends bv{C(){return[]}};var $EC=class extends bv{C(){const l=[];this.Z.tracks&&l.push(...this.Z.tracks);this.Z.refresh&&l.push(this.Z.refresh);this.Z.musicLibraryStatusEntity&&l.push(this.Z.musicLibraryStatusEntity);this.Z.details&&l.push(this.Z.details);this.Z.downloadMetadata&&l.push(this.Z.downloadMetadata);this.Z.sideloadMetadata&&l.push(this.Z.sideloadMetadata);this.Z.userDetails&&l.push(this.Z.userDetails);this.Z.entryCollection&&l.push(this.Z.entryCollection);this.Z.share&&l.push(this.Z.share);this.Z.podcastShowAdditionalMetadata&&
l.push(...(new Ak_(this.Z.podcastShowAdditionalMetadata)).C());return[...(new Set(l))]}},Ak_=class extends Cj{C(){const l=[];this.Z.creatorEntity&&l.push(this.Z.creatorEntity);return[...(new Set(l))]}};var Qry=class extends bv{C(){return[]}};var tZ_=class extends bv{C(){const l=[];this.Z.musicLibraryStatusEntity&&l.push(this.Z.musicLibraryStatusEntity);this.Z.artists&&l.push(...this.Z.artists);this.Z.audioModeVersion&&l.push(this.Z.audioModeVersion);this.Z.videoModeVersion&&l.push(this.Z.videoModeVersion);this.Z.userDetails&&l.push(this.Z.userDetails);this.Z.details&&l.push(this.Z.details);this.Z.albumRelease&&l.push(this.Z.albumRelease);this.Z.share&&l.push(this.Z.share);this.Z.libraryEdit&&l.push(this.Z.libraryEdit);this.Z.downloadMetadata&&
l.push(this.Z.downloadMetadata);this.Z.playbackPosition&&l.push(this.Z.playbackPosition);this.Z.lyrics&&l.push(this.Z.lyrics);return[...(new Set(l))]}},Os5=class extends bv{C(){const l=[];this.Z.parentTrack&&l.push(this.Z.parentTrack);return[...(new Set(l))]}},dE4=class extends bv{C(){const l=[];this.Z.parentTrack&&l.push(this.Z.parentTrack);return[...(new Set(l))]}};var a_z=new g.D("musicEmbeddedPlayerOverlayVideoDetailsRenderer");var wTQ=new g.D("adFeedbackEndpoint");var hwT=new g.D("menuEndpoint");var G2g=new g.D("phoneDialerEndpoint");var ai_=new g.D("sendSmsEndpoint");var SHt=new g.D("copyTextEndpoint");var ise=new g.D("shareEndpoint"),UET=new g.D("shareEntityEndpoint"),MZg=new g.D("shareEntityServiceEndpoint"),XT4=new g.D("webPlayerShareEntityServiceEndpoint");g.Iw=new g.D("urlEndpoint");g.ug=new g.D("watchEndpoint");var ckz=new g.D("watchPlaylistEndpoint");var Cye=class extends bv{C(){return[]}};var bsC=class extends bv{C(){return[]}};var u6P=class extends bv{C(){return[]}};var xET=class extends bv{C(){return[]}};var mET=class extends bv{C(){const l=[];this.Z.transfer&&l.push(this.Z.transfer);this.Z.adsPlaybackData&&l.push(...this.Z.adsPlaybackData);this.Z.drmLicense&&l.push(this.Z.drmLicense);this.Z.offlineVideoPolicy&&l.push(this.Z.offlineVideoPolicy);this.Z.videoDownloadContextEntity&&l.push(this.Z.videoDownloadContextEntity);return[...(new Set(l))]}};var qt5=class extends bv{C(){return[]}};var WTy=class extends bv{C(){const l=[];this.Z.offlineVideoStreams&&l.push(...this.Z.offlineVideoStreams);this.Z.captionTrack&&l.push(...this.Z.captionTrack);return[...(new Set(l))]}};var Ii5=class extends bv{C(){return[]}};var TBQ=class extends bv{C(){return[]}};var VZ5=class extends bv{C(){return[]}};var PyC=new g.D("compositeVideoOverlayRenderer");var JkC=new g.D("miniplayerRenderer");var $xy=new g.D("paidContentOverlayRenderer");var T9T=new g.D("playerMutedAutoplayOverlayRenderer"),V4t=new g.D("playerMutedAutoplayEndScreenRenderer");var ub5=new g.D("unserializedPlayerResponse"),S0T=new g.D("unserializedPlayerResponse");var Ytq=new g.D("playlistEditEndpoint");var pTy=class extends bv{C(){return[]}};var $L=new g.D("buttonRenderer"),mC=new g.D("toggleButtonRenderer");var xKg=new g.D("counterfactualRenderer");var KTt=new g.D("resolveUrlCommandMetadata");var gz_=class extends bv{C(){return[]}};var Ez5=new g.D("modifyChannelNotificationPreferenceEndpoint");var vJC=new g.D("pingingEndpoint");var fiQ=new g.D("unsubscribeEndpoint");var jr4=class extends bv{C(){return[]}};g.pN=new g.D("subscribeButtonRenderer");var St_=new g.D("subscribeEndpoint");var nz5=class extends bv{C(){return[]}};var FTC=class extends bv{C(){return[]}};var oz_=class extends bv{C(){return[]}};var Ctz=new g.D("buttonViewModel");var NBy=class extends bv{C(){return[]}};var sr4=class extends bv{C(){return[]}};var LT5=class extends bv{C(){return[]}};var vzQ=class extends bv{C(){return[]}};var BBC=class extends bv{C(){return[]}};var Hsy=class extends bv{C(){return[]}};var mK_=new g.D("qrCodeRenderer");var Rwt={lj:"LIVING_ROOM_APP_MODE_UNSPECIFIED",xt:"LIVING_ROOM_APP_MODE_MAIN",wC:"LIVING_ROOM_APP_MODE_KIDS",f1:"LIVING_ROOM_APP_MODE_MUSIC",ij:"LIVING_ROOM_APP_MODE_UNPLUGGED",AY:"LIVING_ROOM_APP_MODE_GAMING"};var DEQ=class extends bv{C(){return[]}};var lS5=class extends bv{C(){return[]}};var bcP=new g.D("autoplaySwitchButtonRenderer");var e2,$n5,Lpz,tQ5;e2=new g.D("decoratedPlayerBarRenderer");$n5=new g.D("chapteredPlayerBarRenderer");Lpz=new g.D("multiMarkersPlayerBarRenderer");tQ5=new g.D("chapterRenderer");g.hns=new g.D("markerRenderer");var cjQ=new g.D("decoratedPlayheadRenderer");var x6T=new g.D("desktopOverlayConfigRenderer");var WKT=new g.D("engagementPanelSectionListRenderer");var uVq=new g.D("gatedActionsOverlayViewModel");var Tmq=new g.D("heatMarkerRenderer");var a84=new g.D("heatmapRenderer");var U6C=new g.D("playlistPanelRenderer");var ybT=new g.D("productUpsellSuggestedActionViewModel");var qs=new g.D("suggestedActionTimeRangeTrigger"),kcy=new g.D("suggestedActionsRenderer"),zry=new g.D("suggestedActionRenderer");var itQ=new g.D("timedMarkerDecorationRenderer");var rbt=class extends bv{C(){return[]}};var Zdq=class extends bv{C(){return[]}};var erg=class extends bv{C(){return[]}};var AbP=class extends bv{C(){return[]}};var $U_=class extends bv{C(){return[]}};var Qys=class extends bv{C(){return[]}};var tIC=class extends bv{C(){return[]}};var kWg=new g.D("cipher");var xQT=new g.D("playerVars");var nmy=new g.D("playerVars");var Odg=g.aC.window,eu=Odg?.yt?.config_||Odg?.ytcfg?.data_||{};g.iQ("yt.config_",eu);var Qe=[];var ezT=/^[\w.]*$/,Zoy={q:!0,search_query:!0},roq=String(Gp);var Wq=new class{constructor(l,y){this.Z=l;this.C=y}}(window,window.document);g.iQ("yt.ads_.signals_.getAdSignalsString",function(l){return a3(I3(l))});g.T5();var Tp="XMLHttpRequest"in g.aC?()=>new XMLHttpRequest:null;var dUq="absolute_experiments client_dev_domain client_dev_expflag client_dev_regex_map client_dev_root_url client_rollout_override expflag forcedCapability jsfeat jsmode mods theme".split(" ");[...dUq];var F$={Authorization:"AUTHORIZATION","X-Goog-EOM-Visitor-Id":"EOM_VISITOR_DATA","X-Goog-Visitor-Id":"SANDBOXED_VISITOR_ID","X-Youtube-Domain-Admin-State":"DOMAIN_ADMIN_STATE","X-Youtube-Chrome-Connected":"CHROME_CONNECTED_HEADER","X-YouTube-Client-Name":"INNERTUBE_CONTEXT_CLIENT_NAME","X-YouTube-Client-Version":"INNERTUBE_CONTEXT_CLIENT_VERSION","X-YouTube-Delegation-Context":"INNERTUBE_CONTEXT_SERIALIZED_DELEGATION_CONTEXT","X-YouTube-Device":"DEVICE","X-Youtube-Identity-Token":"ID_TOKEN","X-YouTube-Page-CL":"PAGE_CL",
"X-YouTube-Page-Label":"PAGE_BUILD_LABEL","X-Goog-AuthUser":"SESSION_INDEX","X-Goog-PageId":"DELEGATED_SESSION_ID"},UdC=["app","debugcss","debugjs","expflag","force_ad_params","force_ad_encrypted","force_viral_ad_response_params","forced_experiments","innertube_snapshots","innertube_goldens","internalcountrycode","internalipoverride","absolute_experiments","conditional_experiments","sbb","sr_bns_address",...dUq],vq=!1,wi4=nl;var Hq=class extends ET{constructor(l,y,k){super(`${l}, errorCode=${y}`);this.errorCode=y;this.xhr=k;this.name="PromiseAjaxError"}},Mwy=class{constructor(l){this.xhr=l}};var ls=class{constructor(l=null){this.Z=l;this.N=0;this.C=null}then(l,y,k){return this.Z?this.Z.then(l,y,k):this.N===1&&l?(l=l.call(k,this.C))&&typeof l.then==="function"?l:k9(l):this.N===2&&y?(l=y.call(k,this.C))&&typeof l.then==="function"?l:yu(l):this}getValue(){return this.C}};ls.prototype.$goog_Thenable=!0;var z6=!1;var Zu=us||x9;var u85=/^([0-9\.]+):([0-9\.]+)$/;var Jog=class extends ET{constructor(l){super(l.message||l.description||l.name);this.isMissing=l instanceof nL;this.isTimeout=l instanceof Hq&&l.errorCode=="net.timeout";this.isCanceled=l instanceof ln}};Jog.prototype.name="BiscottiError";var nL=class extends ET{constructor(){super("Biscotti ID is missing from server")}};nL.prototype.name="BiscottiMissingError";var WYy={format:"RAW",method:"GET",timeout:5E3,withCredentials:!0},S_=null;var EHy={};var wX_=0,Fp=g.tV?"webkit":Nj?"moz":g.wx?"ms":g.Yf?"o":"",hr4=g.UT("ytDomDomGetNextId")||(()=>++wX_);
g.iQ("ytDomDomGetNextId",hr4);var GcC={stopImmediatePropagation:1,stopPropagation:1,preventMouseEvent:1,preventManipulation:1,preventDefault:1,layerX:1,layerY:1,screenX:1,screenY:1,scale:1,rotation:1,webkitMovementX:1,webkitMovementY:1},NP4=class{constructor(l){this.type="";this.state=this.source=this.data=this.currentTarget=this.relatedTarget=this.target=null;this.charCode=this.keyCode=0;this.metaKey=this.shiftKey=this.ctrlKey=this.altKey=!1;this.rotation=this.clientY=this.clientX=0;this.scale=1;this.changedTouches=this.touches=
null;try{if(l=l||window.event){this.event=l;for(let z in l)z in GcC||(this[z]=l[z]);this.scale=l.scale;this.rotation=l.rotation;var y=l.target||l.srcElement;y&&y.nodeType==3&&(y=y.parentNode);this.target=y;var k=l.relatedTarget;if(k)try{k=k.nodeName?k:null}catch(z){k=null}else this.type=="mouseover"?k=l.fromElement:this.type=="mouseout"&&(k=l.toElement);this.relatedTarget=k;this.clientX=l.clientX!=void 0?l.clientX:l.pageX;this.clientY=l.clientY!=void 0?l.clientY:l.pageY;this.keyCode=l.keyCode?l.keyCode:
l.which;this.charCode=l.charCode||(this.type=="keypress"?this.keyCode:0);this.altKey=l.altKey;this.ctrlKey=l.ctrlKey;this.shiftKey=l.shiftKey;this.metaKey=l.metaKey;this.Z=l.pageX;this.C=l.pageY}}catch(z){}}preventDefault(){this.event&&(this.event.returnValue=!1,this.event.preventDefault&&this.event.preventDefault())}stopPropagation(){this.event&&(this.event.cancelBubble=!0,this.event.stopPropagation&&this.event.stopPropagation())}stopImmediatePropagation(){this.event&&(this.event.cancelBubble=!0,
this.event.stopImmediatePropagation&&this.event.stopImmediatePropagation())}};var Rf=g.aC.ytEventsEventsListeners||{};g.iQ("ytEventsEventsListeners",Rf);var oHe=g.aC.ytEventsEventsCounter||{count:0};g.iQ("ytEventsEventsCounter",oHe);var aS_=Pf(function(){let l=!1;try{const y=Object.defineProperty({},"passive",{get:function(){l=!0}});
window.addEventListener("test",null,y)}catch(y){}return l}),suC=Pf(function(){let l=!1;
try{const y=Object.defineProperty({},"capture",{get:function(){l=!0}});
window.addEventListener("test",null,y)}catch(y){}return l});var Wx;Wx=window;g.f=Wx.ytcsi&&Wx.ytcsi.now?Wx.ytcsi.now:Wx.performance&&Wx.performance.timing&&Wx.performance.now&&Wx.performance.timing.navigationStart?()=>Wx.performance.timing.navigationStart+Wx.performance.now():()=>(new Date).getTime();g.J5(zT,g.zP);zT.prototype.D=function(l){l.Z===void 0&&nHQ(l);var y=l.Z;l.C===void 0&&nHQ(l);this.Z=new g.jD(y,l.C)};
zT.prototype.Kx=function(){return this.Z||new g.jD};
zT.prototype.C_=function(){if(this.Z){var l=(0,g.f)();if(this.V!=0){var y=this.S,k=this.Z,z=y.x-k.x;y=y.y-k.y;z=Math.sqrt(z*z+y*y)/(l-this.V);this.C[this.N]=Math.abs((z-this.J)/this.J)>.5?1:0;y=0;for(k=0;k<4;k++)y+=this.C[k]||0;y>=3&&this.K();this.J=z}this.V=l;this.S=this.Z;this.N=(this.N+1)%4}};
zT.prototype.Vj=function(){g.Kl(this.A);g.lw(this.Y)};var IT=class extends g.zP{constructor(l){super();this.K=[];this.MW=l||this}j(l,y,k,z,r){k=g.OJ((0,g.We)(k,z||this.MW));k={target:l,name:y,callback:k};let Z;r&&aS_()&&(Z={passive:!0});l.addEventListener(y,k.callback,Z);this.K.push(k);return k}uq(l){for(let y=0;y<this.K.length;y++)if(this.K[y]==l){this.K.splice(y,1);l.target.removeEventListener(l.name,l.callback);break}}C(l){for(;this.K.length;){const y=this.K.pop();let k;l&&aS_()&&(k={passive:!0});y.target.removeEventListener(y.name,y.callback,k)}}Vj(){this.C();
super.Vj()}};var uPq=["att/get"],TE4=["embedded_player"],K5s=["account/get_setting_values"],idC=["share/get_share_panel"],UU5=["share/get_web_player_share_panel"],MIQ=["feedback"],XXy=["notification/modify_channel_preference"],sHy=["player"],cbe=["browse/edit_playlist"],RKT=["reel/reel_item_watch"],fZ5=["account/set_setting"],CZy=["subscription/subscribe"],bdz=["subscription/unsubscribe"],BHy=["next","unplugged/watch_next"];g.ZA={X1:Pf(function(){let l;try{const y=new fW;l=y.isAvailable()?y:null}catch(y){return null}return l?new g.pW(l):null}),
xg:Pf(function(){const l=new jM;return l.isAvailable()?new g.pW(l):null})};g.T$=window.yt&&window.yt.msgs_||window.ytcfg&&window.ytcfg.msgs||{};g.iQ("yt.msgs_",g.T$);var oAC=class{constructor(l){this.C=void 0;this.Z=!1;l.addEventListener("beforeinstallprompt",y=>{y.preventDefault();this.C=y});
l.addEventListener("appinstalled",()=>{this.Z=!0},{once:!0})}};var OV=class{constructor(){this.Ug=!0}Hm(l,y){l={};var k=[];"USER_SESSION_ID"in eu&&k.push({key:"u",value:g.Y("USER_SESSION_ID")});if(k=nB(k))l.Authorization=k,k=y=y?.sessionIndex,k===void 0&&(k=Number(g.Y("SESSION_INDEX",0)),k=isNaN(k)?0:k),g.EJ("voice_search_auth_header_removal")||(l["X-Goog-AuthUser"]=k.toString()),"INNERTUBE_HOST_OVERRIDE"in eu||(l["X-Origin"]=window.location.origin),y===void 0&&"DELEGATED_SESSION_ID"in eu&&(l["X-Goog-PageId"]=g.Y("DELEGATED_SESSION_ID"));return l}};var uX={identityType:"UNAUTHENTICATED_IDENTITY_TYPE_UNKNOWN"};var hy=g.UT("ytglobal.prefsUserPrefsPrefs_")||{};g.iQ("ytglobal.prefsUserPrefsPrefs_",hy);
var DdP=class{constructor(){this.Z=g.Y("ALT_PREF_COOKIE_NAME","PREF");this.C=g.Y("ALT_PREF_COOKIE_DOMAIN","youtube.com");const l=g.e_(this.Z);l&&this.parse(l)}get(l,y){iw(l);aa(l);l=hy[l]!==void 0?hy[l].toString():null;return l!=null?l:y?y:""}set(l,y){iw(l);aa(l);if(y==null)throw Error("ExpectedNotNull");hy[l]=y.toString()}G7(l){return!!((lDQ(`f${Math.floor(l/31)+1}`)||0)&1<<l%31)}remove(l){iw(l);aa(l);delete hy[l]}save(){let l=!0;g.EJ("web_secure_pref_cookie_killswitch")&&(l=!1);g.ZY(this.Z,this.dump(),
63072E3,this.C,l)}clear(){g.lr(hy)}dump(){const l=[];for(const y in hy)hy.hasOwnProperty(y)&&l.push(`${y}=`+encodeURIComponent(String(hy[y])));return l.join("&")}parse(l){l=decodeURIComponent(l).split("&");for(let k=0;k<l.length;k++){var y=l[k].split("=");const z=y[0];(y=y[1])&&(hy[z]=y.toString())}}},dz;var k7q={bluetooth:"CONN_DISCO",cellular:"CONN_CELLULAR_UNKNOWN",ethernet:"CONN_WIFI",none:"CONN_NONE",wifi:"CONN_WIFI",wimax:"CONN_CELLULAR_4G",other:"CONN_UNKNOWN",unknown:"CONN_UNKNOWN","slow-2g":"CONN_CELLULAR_2G","2g":"CONN_CELLULAR_2G","3g":"CONN_CELLULAR_3G","4g":"CONN_CELLULAR_4G"},X$4={CONN_DEFAULT:0,CONN_UNKNOWN:1,CONN_NONE:2,CONN_WIFI:3,CONN_CELLULAR_2G:4,CONN_CELLULAR_3G:5,CONN_CELLULAR_4G:6,CONN_CELLULAR_UNKNOWN:7,CONN_DISCO:8,CONN_CELLULAR_5G:9,CONN_WIFI_METERED:10,CONN_CELLULAR_5G_SA:11,
CONN_CELLULAR_5G_NSA:12,CONN_WIRED:30,CONN_INVALID:31},cFe={EFFECTIVE_CONNECTION_TYPE_UNKNOWN:0,EFFECTIVE_CONNECTION_TYPE_OFFLINE:1,EFFECTIVE_CONNECTION_TYPE_SLOW_2G:2,EFFECTIVE_CONNECTION_TYPE_2G:3,EFFECTIVE_CONNECTION_TYPE_3G:4,EFFECTIVE_CONNECTION_TYPE_4G:5},rOy={"slow-2g":"EFFECTIVE_CONNECTION_TYPE_SLOW_2G","2g":"EFFECTIVE_CONNECTION_TYPE_2G","3g":"EFFECTIVE_CONNECTION_TYPE_3G","4g":"EFFECTIVE_CONNECTION_TYPE_4G"};g.WO=class extends Error{constructor(l,...y){super(l);this.args=[...y];Object.setPrototypeOf(this,new.target.prototype)}};var ut4=class{constructor(){this.Z=new WeakMap}zk(l,y){return Xl(l,1,y)}RS(l){(l=this.Z.get(l))&&l()}};g.UT("yt.scheduler.instance.timerIdMap_");var Cm;Cm=class extends ut4{qJ(l){if(l===void 0||!Number.isNaN(Number(l))){var y=g.UT("yt.scheduler.instance.cancelJob");y?y(l):g.pl(l)}}start(){const l=g.UT("yt.scheduler.instance.start");l&&l()}pause(){const l=g.UT("yt.scheduler.instance.pause");l&&l()}};g.fF=g.bw();var SG=class{constructor(l){this.Z=(l=g.nW(l))?new JB(l):null;this.N=document.domain||window.location.hostname}C(){return!!this.Z}set(l,y,k,z){k=k||31104E3;this.remove(l);if(this.C())try{this.Z.set(l,y,Date.now()+k*1E3);return}catch(Z){}var r="";if(z)try{r=escape(g.cU(y))}catch(Z){return}else r=escape(y);g.ZY(l,r,k,this.N)}get(l,y){var k=void 0,z=!this.C();if(!z)try{k=this.Z.get(l)}catch(r){z=!0}if(z&&(k=g.e_(l))&&(k=unescape(k),y))try{k=JSON.parse(k)}catch(r){this.remove(l),k=void 0}return k}remove(l){this.C()&&
this.Z.remove(l);g.AD(l,"/",this.N)}getCreationTime(l){return this.C()&&(l=(this.Z.jX(l)||{}).creation,typeof l==="number")?l:null}};var ml=(()=>{let l;return()=>{l||(l=new SG("ytidb"));return l}})();var TT=[],Ia,Ws=!1;var xUz,mUT,qfP,Wry,gz,AO_;
xUz={AUTH_INVALID:"No user identifier specified.",EXPLICIT_ABORT:"Transaction was explicitly aborted.",IDB_NOT_SUPPORTED:"IndexedDB is not supported.",MISSING_INDEX:"Index not created.",MISSING_OBJECT_STORES:"Object stores not created.",DB_DELETED_BY_MISSING_OBJECT_STORES:"Database is deleted because expected object stores were not created.",DB_REOPENED_BY_MISSING_OBJECT_STORES:"Database is reopened because expected object stores were not created.",UNKNOWN_ABORT:"Transaction was aborted for unknown reasons.",QUOTA_EXCEEDED:"The current transaction exceeded its quota limitations.",
QUOTA_MAYBE_EXCEEDED:"The current transaction may have failed because of exceeding quota limitations.",EXECUTE_TRANSACTION_ON_CLOSED_DB:"Can't start a transaction on a closed database",INCOMPATIBLE_DB_VERSION:"The binary is incompatible with the database version"};
mUT={AUTH_INVALID:"ERROR",EXECUTE_TRANSACTION_ON_CLOSED_DB:"WARNING",EXPLICIT_ABORT:"IGNORED",IDB_NOT_SUPPORTED:"ERROR",MISSING_INDEX:"WARNING",MISSING_OBJECT_STORES:"ERROR",DB_DELETED_BY_MISSING_OBJECT_STORES:"WARNING",DB_REOPENED_BY_MISSING_OBJECT_STORES:"WARNING",QUOTA_EXCEEDED:"WARNING",QUOTA_MAYBE_EXCEEDED:"WARNING",UNKNOWN_ABORT:"WARNING",INCOMPATIBLE_DB_VERSION:"WARNING"};
qfP={AUTH_INVALID:!1,EXECUTE_TRANSACTION_ON_CLOSED_DB:!1,EXPLICIT_ABORT:!1,IDB_NOT_SUPPORTED:!1,MISSING_INDEX:!1,MISSING_OBJECT_STORES:!1,DB_DELETED_BY_MISSING_OBJECT_STORES:!1,DB_REOPENED_BY_MISSING_OBJECT_STORES:!1,QUOTA_EXCEEDED:!1,QUOTA_MAYBE_EXCEEDED:!0,UNKNOWN_ABORT:!0,INCOMPATIBLE_DB_VERSION:!1};
g.pm=class extends g.WO{constructor(l,y={},k=xUz[l],z=mUT[l],r=qfP[l]){super(k,{name:"YtIdbKnownError",isSw:self.document===void 0,isIframe:self!==self.top,type:l,...y});this.type=l;this.message=k;this.level=z;this.Z=r;Object.setPrototypeOf(this,g.pm.prototype)}};Wry=class extends g.pm{constructor(l,y){super("MISSING_OBJECT_STORES",{expectedObjectStores:y,foundObjectStores:l},xUz.MISSING_OBJECT_STORES);Object.setPrototypeOf(this,Wry.prototype)}};
gz=class extends Error{constructor(l,y){super();this.index=l;this.objectStore=y;Object.setPrototypeOf(this,gz.prototype)}};AO_=["The database connection is closing","Can't start a transaction on a closed database","A mutation operation was attempted on a database that did not allow mutations"];var nm;nm=class{constructor(l){this.Z=l}};g.jY=class{constructor(l){this.state={status:"PENDING"};this.Z=[];this.C=[];l=l.Z;const y=z=>{if(this.state.status==="PENDING"){this.state={status:"FULFILLED",value:z};for(const r of this.Z)r()}},k=z=>{if(this.state.status==="PENDING"){this.state={status:"REJECTED",
reason:z};for(const r of this.C)r()}};
try{l(y,k)}catch(z){k(z)}}static all(l){return new g.jY(new nm((y,k)=>{const z=[];let r=l.length;r===0&&y(z);for(let Z=0;Z<l.length;++Z)g.jY.resolve(l[Z]).then(e=>{z[Z]=e;r--;r===0&&y(z)}).catch(e=>{k(e)})}))}static resolve(l){return new g.jY(new nm((y,k)=>{l instanceof g.jY?l.then(y,k):y(l)}))}static reject(l){return new g.jY(new nm((y,k)=>{k(l)}))}then(l,y){const k=l??QsP,z=y??$hy;
return new g.jY(new nm((r,Z)=>{this.state.status==="PENDING"?(this.Z.push(()=>{t6C(this,this,k,r,Z)}),this.C.push(()=>{OZz(this,this,z,r,Z)})):this.state.status==="FULFILLED"?t6C(this,this,k,r,Z):this.state.status==="REJECTED"&&OZz(this,this,z,r,Z)}))}catch(l){return this.then(void 0,l)}};var h94=class{constructor(l,y){this.request=l;this.cursor=y}};var IDy=class{constructor(l,y){this.Z=l;this.options=y;this.transactionCount=0;this.N=Math.round((0,g.f)());this.C=!1}add(l,y,k){return g.sV(this,[l],{mode:"readwrite",nP:!0,commit:Nl()},z=>z.objectStore(l).add(y,k))}clear(l){return g.sV(this,[l],{mode:"readwrite",
nP:!0},y=>y.objectStore(l).clear())}close(){this.Z.close();
this.options?.closed&&this.options.closed()}count(l,y){return g.sV(this,[l],{mode:"readonly",nP:!0,commit:Nl()},k=>k.objectStore(l).count(y))}delete(l,y){return g.sV(this,[l],{mode:"readwrite",
nP:!0,commit:Nl()&&!(y instanceof IDBKeyRange)},k=>k.objectStore(l).delete(y))}get(l,y){return g.sV(this,[l],{mode:"readonly",
nP:!0,commit:Nl()},k=>k.objectStore(l).get(y))}getAll(l,y,k){return g.sV(this,[l],{mode:"readonly",
nP:!0},z=>z.objectStore(l).getAll(y,k))}put(l,y,k){return g.sV(this,[l],{mode:"readwrite",
nP:!0,commit:Nl()},z=>z.objectStore(l).put(y,k))}objectStoreNames(){return Array.from(this.Z.objectStoreNames)}getName(){return this.Z.name}},XhP=class{constructor(l){this.Z=l}add(l,y){return Fl(this.Z.add(l,y))}autoIncrement(){return this.Z.autoIncrement}clear(){return Fl(this.Z.clear()).then(()=>{})}count(l){return Fl(this.Z.count(l))}delete(l){return l instanceof IDBKeyRange?C0Q(this,l):Fl(this.Z.delete(l))}get(l){return Fl(this.Z.get(l))}getAll(l,y){return"getAll"in IDBObjectStore.prototype?Fl(this.Z.getAll(l,
y)):bZT(this,l,y)}index(l){try{return new IS4(this.Z.index(l))}catch(y){if(y instanceof Error&&y.name==="NotFoundError")throw new gz(l,this.Z.name);
throw y;}}getName(){return this.Z.name}keyPath(){return this.Z.keyPath}put(l,y){return Fl(this.Z.put(l,y))}},iZQ=class{constructor(l){this.Z=l;this.C=new Map;this.aborted=!1;this.done=new Promise((y,k)=>{this.Z.addEventListener("complete",()=>{y()});
this.Z.addEventListener("error",z=>{z.currentTarget===z.target&&k(this.Z.error)});
this.Z.addEventListener("abort",()=>{var z=this.Z.error;if(z)k(z);else if(!this.aborted){z=g.pm;var r=this.Z.objectStoreNames;const Z=[];for(let e=0;e<r.length;e++){const A=r.item(e);if(A===null)throw Error("Invariant: item in DOMStringList is null");Z.push(A)}z=new z("UNKNOWN_ABORT",{objectStoreNames:Z.join(),dbName:this.Z.db.name,mode:this.Z.mode});k(z)}})})}abort(){this.Z.abort();
this.aborted=!0;throw new g.pm("EXPLICIT_ABORT");}commit(){this.aborted||this.Z.commit?.()}objectStore(l){l=this.Z.objectStore(l);let y=this.C.get(l);y||(y=new XhP(l),this.C.set(l,y));return y}},IS4=class{constructor(l){this.Z=l}count(l){return Fl(this.Z.count(l))}delete(l){return g.lX(this,{query:l},y=>y.delete().then(()=>g.DA(y)))}get(l){return Fl(this.Z.get(l))}getAll(l,y){return"getAll"in IDBIndex.prototype?Fl(this.Z.getAll(l,y)):qST(this,l,y)}keyPath(){return this.Z.keyPath}unique(){return this.Z.unique}},
WHP=class{constructor(l,y){this.request=l;
this.cursor=y}delete(){return Fl(this.cursor.delete()).then(()=>{})}getValue(){return this.cursor.value}update(l){return Fl(this.cursor.update(l))}};var Tg5=class{constructor(l,y){this.name=l;this.options=y;this.N=!0;this.J=this.V=0}C(l,y,k={}){return V6q(l,y,k)}delete(l={}){return y4(this.name,l)}open(){if(!this.N)throw P0C(this);if(this.Z)return this.Z;let l;const y=()=>{this.Z===l&&(this.Z=void 0)},k={blocking:r=>{r.close()},
closed:y,nz:y,upgrade:this.options.upgrade},z=async()=>{var r=Error().stack??"";try{const A=await this.C(this.name,this.options.version,k);var Z=A,e=this.options;const Q=[];for(const t of Object.keys(e.Zg)){const {Bz:O,ckj:d=Number.MAX_VALUE}=e.Zg[t];!(Z.Z.version>=O)||Z.Z.version>=d||Z.Z.objectStoreNames.contains(t)||Q.push(t)}if(Q.length!==0){const t=Object.keys(this.options.Zg),O=A.objectStoreNames();if(this.J<fl("ytidb_reopen_db_retries",0))return this.J++,A.close(),VE(new g.pm("DB_REOPENED_BY_MISSING_OBJECT_STORES",
{dbName:this.name,expectedObjectStores:t,foundObjectStores:O})),z();if(this.V<fl("ytidb_remake_db_retries",1))return this.V++,await this.delete(),VE(new g.pm("DB_DELETED_BY_MISSING_OBJECT_STORES",{dbName:this.name,expectedObjectStores:t,foundObjectStores:O})),z();throw new Wry(O,t);}return A}catch(A){if(A instanceof DOMException?A.name==="VersionError":"DOMError"in self&&A instanceof DOMError?A.name==="VersionError":A instanceof Object&&"message"in A&&A.message==="An attempt was made to open a database using a lower version than the existing version."){r=
await this.C(this.name,void 0,{...k,upgrade:void 0});Z=r.Z.version;if(this.options.version!==void 0&&Z>this.options.version+1)throw r.close(),this.N=!1,P0C(this,Z);return r}y();A instanceof Error&&!g.EJ("ytidb_async_stack_killswitch")&&(A.stack=`${A.stack}\n${r.substring(r.indexOf("\n")+1)}`);throw EV(A,this.name,"",this.options.version??-1);}};
return this.Z=l=z()}};var z4=new Tg5("YtIdbMeta",{Zg:{databases:{Bz:1}},upgrade(l,y){y(1)&&Lm(l,"databases",{keyPath:"actualName"})}});var $O,AZ=new class{constructor(){}}(new class{constructor(){}});new g.OX;var ssC=class extends Tg5{constructor(l,y){super(l,y);this.options=y;Jy(l)}C(l,y,k={}){return(this.options.shared?SSy:jse)(l,y,{...k})}delete(l={}){return(this.options.shared?N0P:nd_)(this.name,l)}};var vd5=Ob("ytGcfConfig",{Zg:{coldConfigStore:{Bz:1},hotConfigStore:{Bz:1}},shared:!1,upgrade(l,y){y(1)&&(Bs(Lm(l,"hotConfigStore",{keyPath:"key",autoIncrement:!0}),"hotTimestampIndex","timestamp"),Bs(Lm(l,"coldConfigStore",{keyPath:"key",autoIncrement:!0}),"coldTimestampIndex","timestamp"))},version:1});var VIz=class extends g.zP{constructor(){super();this.C=[];this.Z=[];const l=g.UT("yt.gcf.config.hotUpdateCallbacks");l?(this.C=[...l],this.Z=l):(this.Z=[],g.iQ("yt.gcf.config.hotUpdateCallbacks",this.Z))}Vj(){for(const y of this.C){var l=this.Z;const k=l.indexOf(y);k>=0&&l.splice(k,1)}this.C.length=0;super.Vj()}};var wc=class{constructor(){this.J=!1;this.N=this.V=0;this.S=new VIz;this.d4={eZ_:()=>{this.J=!0},
WmK:()=>this.Z,
Hye:l=>{hZ(this,l)},
aV:l=>{this.aV(l)},
VVr:l=>{G4(this,l)},
B2:()=>this.coldHashData,
xi:()=>this.hotHashData,
HgG:()=>this.C,
s4_:()=>aL(),
Vi7:()=>iX(),
Nyr:()=>g.UT("yt.gcf.config.coldHashData"),
Jf7:()=>g.UT("yt.gcf.config.hotHashData"),
whe:()=>{rFC(this)},
h3j:()=>{this.aV(void 0);Ub(this);delete wc.instance},
oe_:l=>{this.N=l},
etz:()=>this.N}}Km(){return iX()??g.Y("RAW_HOT_CONFIG_GROUP")}aV(l){this.hotHashData=l;
g.iQ("yt.gcf.config.hotHashData",this.hotHashData||null)}};var PZy=typeof TextEncoder!=="undefined"?new TextEncoder:null,PWg=PZy?l=>PZy.encode(l):l=>{l=g.PG(l);
const y=new Uint8Array(l.length);for(let k=0;k<y.length;k++)y[k]=l[k];return y};var pQz={next:"wn_s",browse:"br_s",search:"sr_s",reel:"r_wrs",player:"ps_s"},gws={next:"wn_r",browse:"br_r",search:"sr_r",reel:"r_wrr",player:"ps_r"};xO.prototype.jb=function(){return{version:this.version,args:this.args}};m9.prototype.toString=function(){return this.topic};var JbQ=g.UT("ytPubsub2Pubsub2Instance")||new g.W9;g.W9.prototype.subscribe=g.W9.prototype.subscribe;g.W9.prototype.unsubscribeByKey=g.W9.prototype.Dl;g.W9.prototype.publish=g.W9.prototype.publish;g.W9.prototype.clear=g.W9.prototype.clear;g.iQ("ytPubsub2Pubsub2Instance",JbQ);var IL=g.UT("ytPubsub2Pubsub2SubscribedKeys")||{};g.iQ("ytPubsub2Pubsub2SubscribedKeys",IL);var T4=g.UT("ytPubsub2Pubsub2TopicToKeys")||{};g.iQ("ytPubsub2Pubsub2TopicToKeys",T4);var ucC=g.UT("ytPubsub2Pubsub2IsAsync")||{};
g.iQ("ytPubsub2Pubsub2IsAsync",ucC);g.iQ("ytPubsub2Pubsub2SkipSubKey",null);var TZz=fl("max_body_size_to_compress",5E5),Vq_=fl("min_body_size_to_compress",500),JFe=0;var Yf5=class{constructor(l){this.Zx=this.Z=!1;this.potentialEsfErrorCounter=this.C=0;this.handleError=()=>{};
this.F8=()=>{};
this.now=Date.now;this.tI=!1;this.d4={qdR:y=>{this.Gv=y},
xVa:()=>{this.N()},
RS:()=>{this.V()},
hR:async y=>{await this.hR(y)},
Yn:(y,k)=>this.Yn(y,k),
CM:()=>{this.CM()}};
this.uB=l.uB??100;this.A0=l.A0??1;this.P$=l.P$??2592E6;this.UI=l.UI??12E4;this.yQ=l.yQ??5E3;this.Gv=l.Gv??void 0;this.yy=!!l.yy;this.Qy=l.Qy??.1;this.P0=l.P0??10;l.handleError&&(this.handleError=l.handleError);l.F8&&(this.F8=l.F8);l.tI&&(this.tI=l.tI);l.Zx&&(this.Zx=l.Zx);this.z7=l.z7;this.Jy=l.Jy;this.wT=l.wT;this.rT=l.rT;this.Pb=l.Pb;this.sF=l.sF;this.Pr=l.Pr;JZ(this)&&(!this.z7||this.z7("networkless_logging"))&&p$s(this)}writeThenSend(l,y={}){if(JZ(this)&&this.Z){const k={url:l,options:y,timestamp:this.now(),
status:"NEW",sendCount:0};this.wT.set(k,this.Gv).then(z=>{k.id=z;this.rT.Qf()&&this.hR(k)}).catch(z=>{this.hR(k);
YO(this,z)})}else this.Pb(l,y)}sendThenWrite(l,y={},k){if(JZ(this)&&this.Z){const z={url:l,
options:y,timestamp:this.now(),status:"NEW",sendCount:0};this.z7&&this.z7("nwl_skip_retry")&&(z.skipRetry=k);if(this.rT.Qf()||this.z7&&this.z7("nwl_aggressive_send_then_write")&&!z.skipRetry){if(!z.skipRetry){const r=y.onError?y.onError:()=>{};
y.onError=async(Z,e)=>{await this.wT.set(z,this.Gv).catch(A=>{YO(this,A)});
r(Z,e)}}this.Pb(l,y,z.skipRetry)}else this.wT.set(z,this.Gv).catch(r=>{this.Pb(l,y,z.skipRetry);
YO(this,r)})}else k=this.z7&&this.z7("nwl_skip_retry")&&k,this.Pb(l,y,k)}sendAndWrite(l,y={}){if(JZ(this)&&this.Z){const k={url:l,
options:y,timestamp:this.now(),status:"NEW",sendCount:0};let z=!1;const r=y.onSuccess?y.onSuccess:()=>{};
k.options.onSuccess=(Z,e)=>{k.id!==void 0?this.wT.vL(k.id,this.Gv):z=!0;this.rT.PU&&this.z7&&this.z7("vss_network_hint")&&this.rT.PU(!0);r(Z,e)};
this.Pb(k.url,k.options,void 0,!0);this.wT.set(k,this.Gv).then(Z=>{k.id=Z;z&&this.wT.vL(k.id,this.Gv)}).catch(Z=>{YO(this,Z)})}else this.Pb(l,y,void 0,!0)}N(){if(!JZ(this))throw Error("IndexedDB is not supported: throttleSend");
this.C||(this.C=this.Jy.zk(async()=>{const l=await this.wT.AF("NEW",this.Gv);l?(await this.hR(l),this.C&&(this.C=0,this.N())):this.V()},this.uB))}V(){this.Jy.qJ(this.C);
this.C=0}async hR(l){if(!JZ(this))throw Error("IndexedDB is not supported: immediateSend");l.id!==void 0&&(await this.wT.kQ(l.id,this.Gv)||this.F8(Error("The request cannot be found in the database.")));this.Yn(l,this.P$)?(l.skipRetry||(l=Eh_(this,l)),l&&(l.skipRetry&&l.id!==void 0&&await this.wT.vL(l.id,this.Gv),this.Pb(l.url,l.options,!!l.skipRetry))):(this.F8(Error("Networkless Logging: Stored logs request expired age limit")),l.id!==void 0&&await this.wT.vL(l.id,this.Gv))}Yn(l,y){l=l.timestamp;
return this.now()-l>=y?!1:!0}CM(){if(!JZ(this))throw Error("IndexedDB is not supported: retryQueuedRequests");this.wT.AF("QUEUED",this.Gv).then(l=>{l&&!this.Yn(l,this.UI)?this.Jy.zk(async()=>{l.id!==void 0&&await this.wT.Fy(l.id,this.Gv);this.CM()}):this.rT.Qf()&&this.N()})}};var pv;var qIT={accountStateChangeSignedIn:23,accountStateChangeSignedOut:24,delayedEventMetricCaptured:11,latencyActionBaselined:6,latencyActionInfo:7,latencyActionTicked:5,offlineTransferStatusChanged:2,offlineImageDownload:335,playbackStartStateChanged:9,systemHealthCaptured:3,mangoOnboardingCompleted:10,mangoPushNotificationReceived:230,mangoUnforkDbMigrationError:121,mangoUnforkDbMigrationSummary:122,mangoUnforkDbMigrationPreunforkDbVersionNumber:133,mangoUnforkDbMigrationPhoneMetadata:134,mangoUnforkDbMigrationPhoneStorage:135,
mangoUnforkDbMigrationStep:142,mangoAsyncApiMigrationEvent:223,mangoDownloadVideoResult:224,mangoHomepageVideoCount:279,mangoHomeV3State:295,mangoImageClientCacheHitEvent:273,sdCardStatusChanged:98,framesDropped:12,thumbnailHovered:13,deviceRetentionInfoCaptured:14,thumbnailLoaded:15,backToAppEvent:318,streamingStatsCaptured:17,offlineVideoShared:19,appCrashed:20,youThere:21,offlineStateSnapshot:22,mdxSessionStarted:25,mdxSessionConnected:26,mdxSessionDisconnected:27,bedrockResourceConsumptionSnapshot:28,
nextGenWatchWatchSwiped:29,kidsAccountsSnapshot:30,zeroStepChannelCreated:31,tvhtml5SearchCompleted:32,offlineSharePairing:34,offlineShareUnlock:35,mdxRouteDistributionSnapshot:36,bedrockRepetitiveActionTimed:37,unpluggedDegradationInfo:229,uploadMp4HeaderMoved:38,uploadVideoTranscoded:39,uploadProcessorStarted:46,uploadProcessorEnded:47,uploadProcessorReady:94,uploadProcessorRequirementPending:95,uploadProcessorInterrupted:96,uploadFrontendEvent:241,assetPackDownloadStarted:41,assetPackDownloaded:42,
assetPackApplied:43,assetPackDeleted:44,appInstallAttributionEvent:459,playbackSessionStopped:45,adBlockerMessagingShown:48,distributionChannelCaptured:49,dataPlanCpidRequested:51,detailedNetworkTypeCaptured:52,sendStateUpdated:53,receiveStateUpdated:54,sendDebugStateUpdated:55,receiveDebugStateUpdated:56,kidsErrored:57,mdxMsnSessionStatsFinished:58,appSettingsCaptured:59,mdxWebSocketServerHttpError:60,mdxWebSocketServer:61,startupCrashesDetected:62,coldStartInfo:435,offlinePlaybackStarted:63,liveChatMessageSent:225,
liveChatUserPresent:434,liveChatBeingModerated:457,liveCreationCameraUpdated:64,liveCreationEncodingCaptured:65,liveCreationError:66,liveCreationHealthUpdated:67,liveCreationVideoEffectsCaptured:68,liveCreationStageOccured:75,offlineSystemFailure:546,liveCreationBroadcastScheduled:123,liveCreationArchiveReplacement:149,liveCreationCostreamingConnection:421,liveCreationPlayablesMetrics:533,liveCreationStreamWebrtcStats:288,liveCreationWebrtcError:526,mdxSessionRecoveryStarted:69,mdxSessionRecoveryCompleted:70,
mdxSessionRecoveryStopped:71,visualElementShown:72,visualElementHidden:73,visualElementGestured:78,visualElementStateChanged:208,screenCreated:156,playbackAssociated:202,visualElementAttached:215,playbackContextEvent:214,cloudCastingPlaybackStarted:74,webPlayerApiCalled:76,tvhtml5AccountDialogOpened:79,foregroundHeartbeat:80,foregroundHeartbeatScreenAssociated:111,kidsOfflineSnapshot:81,mdxEncryptionSessionStatsFinished:82,playerRequestCompleted:83,liteSchedulerStatistics:84,mdxSignIn:85,spacecastMetadataLookupRequested:86,
spacecastBatchLookupRequested:87,spacecastSummaryRequested:88,spacecastPlayback:89,spacecastDiscovery:90,tvhtml5LaunchUrlComponentChanged:91,mdxBackgroundPlaybackRequestCompleted:92,mdxBrokenAdditionalDataDeviceDetected:93,tvhtml5LocalStorage:97,tvhtml5DeviceStorageStatus:147,autoCaptionsAvailable:99,playbackScrubbingEvent:339,flexyState:100,interfaceOrientationCaptured:101,mainAppBrowseFragmentCache:102,offlineCacheVerificationFailure:103,offlinePlaybackExceptionDigest:217,vrCopresenceStats:104,
vrCopresenceSyncStats:130,vrCopresenceCommsStats:137,vrCopresencePartyStats:153,vrCopresenceEmojiStats:213,vrCopresenceEvent:141,vrCopresenceFlowTransitEvent:160,vrCowatchPartyEvent:492,vrCowatchUserStartOrJoinEvent:504,vrPlaybackEvent:345,kidsAgeGateTracking:105,offlineDelayAllowedTracking:106,mainAppAutoOfflineState:107,videoAsThumbnailDownload:108,videoAsThumbnailPlayback:109,liteShowMore:110,renderingError:118,kidsProfilePinGateTracking:119,abrTrajectory:124,scrollEvent:125,streamzIncremented:126,
kidsProfileSwitcherTracking:127,kidsProfileCreationTracking:129,buyFlowStarted:136,mbsConnectionInitiated:138,mbsPlaybackInitiated:139,mbsLoadChildren:140,liteProfileFetcher:144,mdxRemoteTransaction:146,reelPlaybackError:148,reachabilityDetectionEvent:150,mobilePlaybackEvent:151,courtsidePlayerStateChanged:152,musicPersistentCacheChecked:154,musicPersistentCacheCleared:155,playbackInterrupted:157,playbackInterruptionResolved:158,fixFopFlow:159,anrDetection:161,backstagePostCreationFlowEnded:162,clientError:163,
gamingAccountLinkStatusChanged:164,liteHousewarming:165,buyFlowEvent:167,kidsParentalGateTracking:168,kidsSignedOutSettingsStatus:437,kidsSignedOutPauseHistoryFixStatus:438,tvhtml5WatchdogViolation:444,ypcUpgradeFlow:169,yongleStudy:170,ypcUpdateFlowStarted:171,ypcUpdateFlowCancelled:172,ypcUpdateFlowSucceeded:173,ypcUpdateFlowFailed:174,liteGrowthkitPromo:175,paymentFlowStarted:341,transactionFlowShowPaymentDialog:405,transactionFlowStarted:176,transactionFlowSecondaryDeviceStarted:222,transactionFlowSecondaryDeviceSignedOutStarted:383,
transactionFlowCancelled:177,transactionFlowPaymentCallBackReceived:387,transactionFlowPaymentSubmitted:460,transactionFlowPaymentSucceeded:329,transactionFlowSucceeded:178,transactionFlowFailed:179,transactionFlowPlayBillingConnectionStartEvent:428,transactionFlowSecondaryDeviceSuccess:458,transactionFlowErrorEvent:411,liteVideoQualityChanged:180,watchBreakEnablementSettingEvent:181,watchBreakFrequencySettingEvent:182,videoEffectsCameraPerformanceMetrics:183,adNotify:184,startupTelemetry:185,playbackOfflineFallbackUsed:186,
outOfMemory:187,ypcPauseFlowStarted:188,ypcPauseFlowCancelled:189,ypcPauseFlowSucceeded:190,ypcPauseFlowFailed:191,uploadFileSelected:192,ypcResumeFlowStarted:193,ypcResumeFlowCancelled:194,ypcResumeFlowSucceeded:195,ypcResumeFlowFailed:196,adsClientStateChange:197,ypcCancelFlowStarted:198,ypcCancelFlowCancelled:199,ypcCancelFlowSucceeded:200,ypcCancelFlowFailed:201,ypcCancelFlowGoToPaymentProcessor:402,ypcDeactivateFlowStarted:320,ypcRedeemFlowStarted:203,ypcRedeemFlowCancelled:204,ypcRedeemFlowSucceeded:205,
ypcRedeemFlowFailed:206,ypcFamilyCreateFlowStarted:258,ypcFamilyCreateFlowCancelled:259,ypcFamilyCreateFlowSucceeded:260,ypcFamilyCreateFlowFailed:261,ypcFamilyManageFlowStarted:262,ypcFamilyManageFlowCancelled:263,ypcFamilyManageFlowSucceeded:264,ypcFamilyManageFlowFailed:265,restoreContextEvent:207,embedsAdEvent:327,autoplayTriggered:209,clientDataErrorEvent:210,experimentalVssValidation:211,tvhtml5TriggeredEvent:212,tvhtml5FrameworksFieldTrialResult:216,tvhtml5FrameworksFieldTrialStart:220,musicOfflinePreferences:218,
watchTimeSegment:219,appWidthLayoutError:221,accountRegistryChange:226,userMentionAutoCompleteBoxEvent:227,downloadRecommendationEnablementSettingEvent:228,musicPlaybackContentModeChangeEvent:231,offlineDbOpenCompleted:232,kidsFlowEvent:233,kidsFlowCorpusSelectedEvent:234,videoEffectsEvent:235,unpluggedOpsEogAnalyticsEvent:236,playbackAudioRouteEvent:237,interactionLoggingDebugModeError:238,offlineYtbRefreshed:239,kidsFlowError:240,musicAutoplayOnLaunchAttempted:242,deviceContextActivityEvent:243,
deviceContextEvent:244,templateResolutionException:245,musicSideloadedPlaylistServiceCalled:246,embedsStorageAccessNotChecked:247,embedsHasStorageAccessResult:248,embedsItpPlayedOnReload:249,embedsRequestStorageAccessResult:250,embedsShouldRequestStorageAccessResult:251,embedsRequestStorageAccessState:256,embedsRequestStorageAccessFailedState:257,embedsItpWatchLaterResult:266,searchSuggestDecodingPayloadFailure:252,siriShortcutActivated:253,tvhtml5KeyboardPerformance:254,latencyActionSpan:255,elementsLog:267,
ytbFileOpened:268,tfliteModelError:269,apiTest:270,yongleUsbSetup:271,touStrikeInterstitialEvent:272,liteStreamToSave:274,appBundleClientEvent:275,ytbFileCreationFailed:276,adNotifyFailure:278,ytbTransferFailed:280,blockingRequestFailed:281,liteAccountSelector:282,liteAccountUiCallbacks:283,dummyPayload:284,browseResponseValidationEvent:285,entitiesError:286,musicIosBackgroundFetch:287,mdxNotificationEvent:289,layersValidationError:290,musicPwaInstalled:291,liteAccountCleanup:292,html5PlayerHealthEvent:293,
watchRestoreAttempt:294,liteAccountSignIn:296,notaireEvent:298,kidsVoiceSearchEvent:299,adNotifyFilled:300,delayedEventDropped:301,analyticsSearchEvent:302,systemDarkThemeOptOutEvent:303,flowEvent:304,networkConnectivityBaselineEvent:305,ytbFileImported:306,downloadStreamUrlExpired:307,directSignInEvent:308,lyricImpressionEvent:309,accessibilityStateEvent:310,tokenRefreshEvent:311,genericAttestationExecution:312,tvhtml5VideoSeek:313,unpluggedAutoPause:314,scrubbingEvent:315,bedtimeReminderEvent:317,
tvhtml5UnexpectedRestart:319,tvhtml5DeviceStorageStats:535,tvhtml5StabilityTraceEvent:478,tvhtml5OperationHealth:467,tvhtml5WatchKeyEvent:321,voiceLanguageChanged:322,tvhtml5LiveChatStatus:323,parentToolsCorpusSelectedEvent:324,offerAdsEnrollmentInitiated:325,networkQualityIntervalEvent:326,deviceStartupMetrics:328,heartbeatActionPlayerTransitioned:330,tvhtml5Lifecycle:331,heartbeatActionPlayerHalted:332,adaptiveInlineMutedSettingEvent:333,mainAppLibraryLoadingState:334,thirdPartyLogMonitoringEvent:336,
appShellAssetLoadReport:337,tvhtml5AndroidAttestation:338,tvhtml5StartupSoundEvent:340,iosBackgroundRefreshTask:342,iosBackgroundProcessingTask:343,sliEventBatch:344,postImpressionEvent:346,musicSideloadedPlaylistExport:347,idbUnexpectedlyClosed:348,voiceSearchEvent:349,mdxSessionCastEvent:350,idbQuotaExceeded:351,idbTransactionEnded:352,idbTransactionAborted:353,tvhtml5KeyboardLogging:354,idbIsSupportedCompleted:355,creatorStudioMobileEvent:356,idbDataCorrupted:357,parentToolsAppChosenEvent:358,
webViewBottomSheetResized:359,activeStateControllerScrollPerformanceSummary:360,navigatorValidation:361,mdxSessionHeartbeat:362,clientHintsPolyfillDiagnostics:363,clientHintsPolyfillEvent:364,proofOfOriginTokenError:365,kidsAddedAccountSummary:366,musicWearableDevice:367,ypcRefundFlowEvent:368,tvhtml5PlaybackMeasurementEvent:369,tvhtml5WatermarkMeasurementEvent:370,clientExpGcfPropagationEvent:371,mainAppReferrerIntent:372,leaderLockEnded:373,leaderLockAcquired:374,googleHatsEvent:375,persistentLensLaunchEvent:376,
parentToolsChildWelcomeChosenEvent:378,browseThumbnailPreloadEvent:379,finalPayload:380,mdxDialAdditionalDataUpdateEvent:381,webOrchestrationTaskLifecycleRecord:382,startupSignalEvent:384,accountError:385,gmsDeviceCheckEvent:386,accountSelectorEvent:388,accountUiCallbacks:389,mdxDialAdditionalDataProbeEvent:390,downloadsSearchIcingApiStats:391,downloadsSearchIndexUpdatedEvent:397,downloadsSearchIndexSnapshot:398,dataPushClientEvent:392,kidsCategorySelectedEvent:393,mdxDeviceManagementSnapshotEvent:394,
prefetchRequested:395,prefetchableCommandExecuted:396,gelDebuggingEvent:399,webLinkTtsPlayEnd:400,clipViewInvalid:401,persistentStorageStateChecked:403,cacheWipeoutEvent:404,playerEvent:410,sfvEffectPipelineStartedEvent:412,sfvEffectPipelinePausedEvent:429,sfvEffectPipelineEndedEvent:413,sfvEffectChosenEvent:414,sfvEffectLoadedEvent:415,sfvEffectUserInteractionEvent:465,sfvEffectFirstFrameProcessedLatencyEvent:416,sfvEffectAggregatedFramesProcessedLatencyEvent:417,sfvEffectAggregatedFramesDroppedEvent:418,
sfvEffectPipelineErrorEvent:430,sfvEffectGraphFrozenEvent:419,sfvEffectGlThreadBlockedEvent:420,mdeQosEvent:510,mdeVideoChangedEvent:442,mdePlayerPerformanceMetrics:472,mdeExporterEvent:497,genericClientExperimentEvent:423,homePreloadTaskScheduled:424,homePreloadTaskExecuted:425,homePreloadCacheHit:426,polymerPropertyChangedInObserver:427,applicationStarted:431,networkCronetRttBatch:432,networkCronetRttSummary:433,repeatChapterLoopEvent:436,seekCancellationEvent:462,lockModeTimeoutEvent:483,externalVideoShareToYoutubeAttempt:501,
parentCodeEvent:502,offlineTransferStarted:4,musicOfflineMixtapePreferencesChanged:16,mangoDailyNewVideosNotificationAttempt:40,mangoDailyNewVideosNotificationError:77,dtwsPlaybackStarted:112,dtwsTileFetchStarted:113,dtwsTileFetchCompleted:114,dtwsTileFetchStatusChanged:145,dtwsKeyframeDecoderBufferSent:115,dtwsTileUnderflowedOnNonkeyframe:116,dtwsBackfillFetchStatusChanged:143,dtwsBackfillUnderflowed:117,dtwsAdaptiveLevelChanged:128,blockingVisitorIdTimeout:277,liteSocial:18,mobileJsInvocation:297,
biscottiBasedDetection:439,coWatchStateChange:440,embedsVideoDataDidChange:441,shortsFirst:443,cruiseControlEvent:445,qoeClientLoggingContext:446,atvRecommendationJobExecuted:447,tvhtml5UserFeedback:448,producerProjectCreated:449,producerProjectOpened:450,producerProjectDeleted:451,producerProjectElementAdded:453,producerProjectElementRemoved:454,producerAppStateChange:509,producerProjectDiskInsufficientExportFailure:516,producerMediaServicesResetDetails:522,tvhtml5ShowClockEvent:455,deviceCapabilityCheckMetrics:456,
youtubeClearcutEvent:461,offlineBrowseFallbackEvent:463,getCtvTokenEvent:464,startupDroppedFramesSummary:466,screenshotEvent:468,miniAppPlayEvent:469,elementsDebugCounters:470,fontLoadEvent:471,webKillswitchReceived:473,webKillswitchExecuted:474,cameraOpenEvent:475,manualSmoothnessMeasurement:476,tvhtml5AppQualityEvent:477,polymerPropertyAccessEvent:479,miniAppSdkUsage:480,cobaltTelemetryEvent:481,crossDevicePlayback:482,channelCreatedWithObakeImage:484,channelEditedWithObakeImage:485,offlineDeleteEvent:486,
crossDeviceNotificationTransfer:487,androidIntentEvent:488,unpluggedAmbientInterludesCounterfactualEvent:489,keyPlaysPlayback:490,shortsCreationFallbackEvent:493,vssData:491,castMatch:494,miniAppPerformanceMetrics:495,userFeedbackEvent:496,kidsGuestSessionMismatch:498,musicSideloadedPlaylistMigrationEvent:499,sleepTimerSessionFinishEvent:500,watchEpPromoConflict:503,innertubeResponseCacheMetrics:505,miniAppAdEvent:506,dataPlanUpsellEvent:507,producerProjectRenamed:508,producerMediaSelectionEvent:511,
embedsAutoplayStatusChanged:512,remoteConnectEvent:513,connectedSessionMisattributionEvent:514,producerProjectElementModified:515,adsSeenClientLogging:517,producerEvent:518,tvhtml5CleanStart:519,deviceAccountMetricsEvent:520,derpLogEvent:521,playablesPortalEvent:523,ipValidationStarted:524,ipValidationReceived:525,reelsSequenceMutationEvent:527,watchZoomStateChange:528,metadataEditorEvent:529,kidsPrismaDeeplinksEvent:530,creationOrchestrationEvent:531,coordinatedSamplingTriggered:532,dnaRecapScreenshotEvent:534,
mdxLocalNetworkPermissionRequestEvent:536,mdxLocalNetworkPermissionResponseEvent:537,sessionReplayEvent:538,sessionReplayStatusEvent:539,loggingReliabilityProbe:540,keyValueStoreStatsEvent:541,deviceLocationPermissionEvent:542,remoteControlStarted:543,remoteControlCompleted:544,reelsAdsEvents:545,ytlrLoaderTestHarnessEvent:547};var vh5=Ob("ServiceWorkerLogsDatabase",{Zg:{SWHealthLog:{Bz:1}},shared:!0,upgrade:(l,y)=>{y(1)&&Bs(Lm(l,"SWHealthLog",{keyPath:"id",autoIncrement:!0}),"swHealthNewRequest",["interface","timestamp"])},
version:1});var fv={},zlq=0;var jG;var FH=class{constructor(){this.Z=new Map;this.C=!1}requestComplete(l,y){y&&(this.C=!0);l=this.removeParams(l);this.Z.get(l)||this.Z.set(l,y)}isEndpointCFR(l){l=this.removeParams(l);return(l=this.Z.get(l))?!1:l===!1&&this.C?!0:null}removeParams(l){return l.split("?")[0]}};FH.prototype.removeParams=FH.prototype.removeParams;FH.prototype.isEndpointCFR=FH.prototype.isEndpointCFR;FH.prototype.requestComplete=FH.prototype.requestComplete;FH.getInstance=elz;var oL=class extends g.Wd{constructor(){super();this.C=!1;this.Z=T75();this.Z.listen("networkstatus-online",()=>{if(this.C&&g.EJ("offline_error_handling")){var l=nv().get("errors",!0);if(l){for(const y in l)if(l[y]){const k=new g.WO(y,"sent via offline_errors");k.name=l[y].name;k.stack=l[y].stack;k.level=l[y].level;g.tK(k)}nv().set("errors",{},2592E3,!0)}}})}Qf(){return this.Z.Qf()}PU(l){this.Z.Z=l}TW(){const l=window.navigator.onLine;
return l===void 0?!0:l}Mw(){this.C=!0}listen(l,y){return this.Z.listen(l,y)}ob(l){return S5(this.Z,l)}};oL.prototype.sendNetworkCheckRequest=oL.prototype.ob;oL.prototype.listen=oL.prototype.listen;oL.prototype.enableErrorFlushing=oL.prototype.Mw;oL.prototype.getWindowStatus=oL.prototype.TW;oL.prototype.networkStatusHint=oL.prototype.PU;oL.prototype.isNetworkAvailable=oL.prototype.Qf;oL.getInstance=AEt;g.VG=class extends g.Wd{constructor(l={}){super();this.Z=this.V=0;this.C=AEt();const y=g.UT("yt.networkStatusManager.instance.listen").bind(this.C);y&&(l.rateLimit?(this.rateLimit=l.rateLimit,y("networkstatus-online",()=>{$J5(this,"publicytnetworkstatus-online")}),y("networkstatus-offline",()=>{$J5(this,"publicytnetworkstatus-offline")})):(y("networkstatus-online",()=>{this.dispatchEvent("publicytnetworkstatus-online")}),y("networkstatus-offline",()=>{this.dispatchEvent("publicytnetworkstatus-offline")})))}Qf(){const l=
g.UT("yt.networkStatusManager.instance.isNetworkAvailable");
return l?l.bind(this.C)():!0}PU(l){const y=g.UT("yt.networkStatusManager.instance.networkStatusHint").bind(this.C);y&&y(l)}async ob(l){const y=g.UT("yt.networkStatusManager.instance.sendNetworkCheckRequest").bind(this.C);return g.EJ("skip_network_check_if_cfr")&&elz().isEndpointCFR("generate_204")?new Promise(k=>{this.PU(window.navigator?.onLine||!0);k(this.Qf())}):y?y(l):!0}};var Px,QY_=class extends Yf5{constructor(){Px||(Px=new g.VG({HEj:!0,Hpa:!0}));super({wT:{uD:skT,vL:NZ5,AF:nhs,kQ:Fxg,Fy:oh5,set:SO4},rT:Px,handleError:(l,y,k)=>{const z=k?.error?.code;z===400||z===415?(l=new g.WO(l.message,y,k?.error?.code),dJ(l,void 0,void 0,void 0,!0)):g.tK(l)},
F8:dJ,Pb:O$t,now:g.f,Hp:Z$5,Jy:g.bw(),sF:"publicytnetworkstatus-online",Pr:"publicytnetworkstatus-offline",yy:!0,Qy:.1,P0:fl("potential_esf_error_limit",10),z7:g.EJ,tI:!(Ml()&&g.$7(document.location.toString())!=="www.youtube-nocookie.com")});this.J=new g.OX;g.EJ("networkless_immediately_drop_all_requests")&&Lxt();N0P("LogsDatabaseV2")}writeThenSend(l,y){y||(y={});y=sb(l,y);Ml()||(this.Z=!1);super.writeThenSend(l,y)}sendThenWrite(l,y,k){y||(y={});y=sb(l,y);Ml()||(this.Z=!1);super.sendThenWrite(l,
y,k)}sendAndWrite(l,y){y||(y={});y=sb(l,y);Ml()||(this.Z=!1);super.sendAndWrite(l,y)}awaitInitialization(){return this.J.promise}};var dJs=g.aC.ytNetworklessLoggingInitializationOptions||{isNwlInitialized:!1};g.iQ("ytNetworklessLoggingInitializationOptions",dJs);g.dv=class{constructor(l){this.config_=null;l?this.config_=l:do5()&&(this.config_=g.M8())}isReady(){!this.config_&&do5()&&(this.config_=g.M8());return!!this.config_}};var pXq,BS,RL;pXq=g.aC.ytPubsubPubsubInstance||new g.W9;BS=g.aC.ytPubsubPubsubSubscribedKeys||{};RL=g.aC.ytPubsubPubsubTopicToKeys||{};g.HS=g.aC.ytPubsubPubsubIsSynchronous||{};g.W9.prototype.subscribe=g.W9.prototype.subscribe;g.W9.prototype.unsubscribeByKey=g.W9.prototype.Dl;g.W9.prototype.publish=g.W9.prototype.publish;g.W9.prototype.clear=g.W9.prototype.clear;g.iQ("ytPubsubPubsubInstance",pXq);g.iQ("ytPubsubPubsubTopicToKeys",RL);g.iQ("ytPubsubPubsubIsSynchronous",g.HS);
g.iQ("ytPubsubPubsubSubscribedKeys",BS);var UJt={};var Kr5=class extends g.zP{append(l){l=l.Jv();this.Jv().appendChild(l)}},Ju=class extends Kr5{constructor(l){super();this.Z=l}Jv(){return this.Z}};var gQT=class extends g.zP{constructor(l,y){super();this.N=[];this.K=!1;this.C=0;this.J=this.S=this.V=!1;this.C_=null;const k=(0,g.We)(l,y);this.Z=new g.B_(()=>k(this.C_),300);
g.x(this,this.Z);this.D=this.A=Infinity}onTouchStart(l){this.K=!0;this.C=l.touches.length;this.Z.isActive()&&(this.Z.stop(),this.J=!0);l=l.touches;this.S=cEq(this,l)||l.length!=1;var y=l.item(0);this.S||!y?this.D=this.A=Infinity:(this.A=y.clientX,this.D=y.clientY);this.N.length=0;for(y=0;y<l.length;y++){const k=l.item(y);this.N.push(k.identifier)}}onTouchMove(l){l=l.changedTouches.item(0);var y;if(y=Te()){y=g.Xv();var k="";if(PZ())k=/Windows (?:NT|Phone) ([0-9.]+)/,k=(y=k.exec(y))?y[1]:"0.0";else if(Te())k=
/(?:iPhone|iPod|iPad|CPU)\s+OS\s+(\S+)/,k=(y=k.exec(y))&&y[1].replace(/_/g,".");else if(VN())k=/Mac OS X ([0-9_.]+)/,k=(y=k.exec(y))?y[1].replace(/_/g,"."):"10";else if(ir(g.Xv(),"KaiOS"))k=/(?:KaiOS)\/(\S+)/i,k=(y=k.exec(y))&&y[1];else if(WZ())k=/Android\s+([^\);]+)(\)|;)/,k=(y=k.exec(y))&&y[1];else if(xv()?br.platform==="Chrome OS":xo("CrOS"))k=/(?:CrOS\s+(?:i686|x86_64)\s+([0-9.]+))/,k=(y=k.exec(y))&&y[1];y=!(g.Mg(k||"",8)>=0)}if(y||l&&(l.clientX-this.A)**2+(l.clientY-this.D)**2>25)this.V=!0}onTouchEnd(l){var y=
l.changedTouches;y&&this.K&&this.C==1&&!this.V&&!this.J&&!this.S&&cEq(this,y)&&(this.C_=l,this.Z.start());this.C=l.touches.length;this.C===0&&(this.V=this.K=!1,this.N.length=0);this.J=!1}};var $6=Date.now().toString();var wC={};var UY=Symbol("injectionDeps"),Yr=class{constructor(l){this.name=l}toString(){return`InjectionToken(${this.name})`}},G_=class{constructor(l){this.key=l}},mJ5=class{constructor(){this.C=new Map;this.N=new Map;this.Z=new Map;this.d4={Rtr:()=>new Map(this.C),
w1K:l=>{const y=this.C.get(l.jf),k=this.Z.get(l.jf);this.Z.delete(l.jf);iP(this,l);return()=>{this.C.delete(l.jf);this.Z.delete(l.jf);y&&iP(this,y);k&&this.Z.set(l.jf,k)}}}}resolve(l){return l instanceof G_?M9(this,l.key,[],!0):M9(this,l,[])}};var X1;var Ca=window;var IW=g.EJ("web_enable_lifecycle_monitoring")&&bP()!==0,VkT=g.EJ("web_enable_lifecycle_monitoring");var gqe=class{constructor(l){this.scheduler=g.bw();this.C=new g.OX;this.Z=l;for(let y=0;y<this.Z.length;y++){const k=this.Z[y];l=()=>{k.Fj();this.Z[y].EX=!0;this.Z.every(r=>r.EX===!0)&&this.C.resolve()};
const z=Xl(l,k.priority??0);this.Z[y]={...k,Fj:l,jobId:z}}}cancel(){for(const l of this.Z)l.jobId===void 0||l.EX||this.scheduler.qJ(l.jobId),l.EX=!0;this.C.resolve()}};var EQ_=class{constructor(){this.state="none";this.plugins=[];this.C=void 0;this.V={};IW&&uP(this.state)}get currentState(){return this.state}install(l){this.plugins.push(l);return this}uninstall(...l){l.forEach(y=>{y=this.plugins.indexOf(y);y>-1&&this.plugins.splice(y,1)})}transition(l,y){IW&&Ivy(this.state);
var k=this.transitions.find(z=>Array.isArray(z.from)?z.from.find(r=>r===this.state&&z.to===l):z.from===this.state&&z.to===l);
if(k){this.N&&(Tp5(this.N),this.N=void 0);PU5(this,l,y);this.state=l;IW&&uP(this.state);k=k.action.bind(this);const z=this.plugins.filter(r=>r[l]).map(r=>r[l]);
k(KB_(this,z),y)}else throw Error(`no transition specified from ${this.state} to ${l}`);}};var Eqy=class extends EQ_{constructor(){super();this.Z=null;this.C=10;this.transitions=[{from:"none",to:"application_navigating",action:this.J},{from:"application_navigating",to:"none",action:this.S},{from:"application_navigating",to:"application_navigating",action:()=>{}},
{from:"none",to:"none",action:()=>{}}]}J(l,y){this.Z=g.cs(0,()=>{this.currentState==="application_navigating"&&this.transition("none")},5E3);
l(y?.event)}S(l,y){this.Z&&(g.fF.qJ(this.Z),this.Z=null);l(y?.event)}},T_;var Qt=[];g.iQ("yt.logging.transport.getScrapedGelPayloads",function(){return Qt});var Pk=void 0,VD=void 0;var Ka=class{constructor(){this.store={};this.Z=0;this.C={};this.d4={bgd:()=>this.Z}}storePayload(l,y){l=JW(l);
this.store[l]?this.store[l].push(y):(this.C={},this.store[l]=[y]);this.Z++;g.EJ("more_accurate_gel_parser")&&(y=new CustomEvent("TRANSPORTING_NEW_EVENT"),window.dispatchEvent(y));return l}smartExtractMatchingEntries(l){if(!l.keys.length)return[];const y=pa(this,l.keys.splice(0,1)[0]),k=[];for(let z=0;z<y.length;z++)this.store[y[z]]&&l.sizeLimit&&(this.store[y[z]].length<=l.sizeLimit?(k.push(...this.store[y[z]]),delete this.store[y[z]]):k.push(...this.store[y[z]].splice(0,l.sizeLimit)));this.Z-=k.length;
l?.sizeLimit&&k.length<l?.sizeLimit&&(l.sizeLimit-=k.length,k.push(...this.smartExtractMatchingEntries(l)));return k}extractMatchingEntries(l){l=pa(this,l);const y=[];for(let k=0;k<l.length;k++)this.store[l[k]]&&(y.push(...this.store[l[k]]),delete this.store[l[k]]);this.Z-=y.length;return y}getSequenceCount(l){l=pa(this,l);let y=0;for(let k=0;k<l.length;k++)y+=this.store[l[k]]?.length||0;return y}};Ka.prototype.getSequenceCount=Ka.prototype.getSequenceCount;Ka.prototype.extractMatchingEntries=Ka.prototype.extractMatchingEntries;
Ka.prototype.smartExtractMatchingEntries=Ka.prototype.smartExtractMatchingEntries;Ka.prototype.storePayload=Ka.prototype.storePayload;var uL4=new Yr("FinchConfigManagerService");var $AC=fl("initial_gel_batch_timeout",2E3),Aws=fl("gel_queue_timeout_max_ms",6E4),QKQ=fl("gel_min_batch_size",5),F1=void 0,pj=class{constructor(){this.V=this.Z=this.C=0;this.N=!1}},mAP=new pj,xA5=new pj,emP=new pj,ZYC=new pj,sY,DN=!0,e0=1,EY=new Map,Hk=g.aC.ytLoggingTransportTokensToCttTargetIds_||{};g.iQ("ytLoggingTransportTokensToCttTargetIds_",Hk);var Bk=g.aC.ytLoggingTransportTokensToJspbCttTargetIds_||{};g.iQ("ytLoggingTransportTokensToJspbCttTargetIds_",Bk);var Sm={},nq_=!1;var ti=g.aC.ytLoggingGelSequenceIdObj_||{};g.iQ("ytLoggingGelSequenceIdObj_",ti);var $SC=[];var f3T,Kj=g.aC.ytLoggingDocDocumentNonce_;Kj||(Kj=g.tW(16),g.iQ("ytLoggingDocDocumentNonce_",Kj));f3T=Kj;var KIg={A5:0,l6:1,Ju:2,oI:3,Uu:4,hxj:5,r9:6,SHARE:7,Mee:8,frR:9,kEa:10,jO:11,tY:12,0:"DEFAULT",1:"CHAT",2:"CONVERSATIONS",3:"MINIPLAYER",4:"DIALOG",5:"VOZ",6:"MUSIC_WATCH_TABS",7:"SHARE",8:"PUSH_NOTIFICATIONS",9:"RICH_GRID_WATCH",10:"UNPLUGGED_BROWSE",11:"PICTURE_IN_PICTURE",12:"MEDIA_CLIENT"};var TDg=1,hi=class{constructor(l){this.Z=l}getAsJson(){const l={};this.Z.trackingParams!==void 0?l.trackingParams=this.Z.trackingParams:(l.veType=this.Z.veType,this.Z.veCounter!==void 0&&(l.veCounter=this.Z.veCounter),this.Z.elementIndex!==void 0&&(l.elementIndex=this.Z.elementIndex));this.Z.dataElement!==void 0&&(l.dataElement=this.Z.dataElement.getAsJson());this.Z.youtubeData!==void 0&&(l.youtubeData=this.Z.youtubeData);this.Z.isCounterfactual&&(l.isCounterfactual=!0);return l}getAsJspb(){const l=
new j2e;this.Z.trackingParams!==void 0?l.setTrackingParams(this.Z.trackingParams):(this.Z.veType!==void 0&&Wh(l,2,Wi(this.Z.veType)),this.Z.veCounter!==void 0&&Wh(l,6,Wi(this.Z.veCounter)),this.Z.elementIndex!==void 0&&Wh(l,3,Wi(this.Z.elementIndex)),this.Z.isCounterfactual&&Wh(l,5,uj(!0)));if(this.Z.dataElement!==void 0){var y=this.Z.dataElement.getAsJspb();rZ(l,j2e,7,y)}this.Z.youtubeData!==void 0&&rZ(l,gNq,8,this.Z.jspbYoutubeData);return l}toString(){return JSON.stringify(this.getAsJson())}isClientVe(){return!this.Z.trackingParams&&
!!this.Z.veType}getLoggingDirectives(){return this.Z.loggingDirectives}};g.iQ("yt_logging_screen.getRootVeType",Jwt);g.iQ("yt_logging_screen.getCurrentCsn",g.MM);g.iQ("yt_logging_screen.getCttAuthInfo",Xu);g.iQ("yt_logging_screen.setCurrentScreen",jKg);var FIg="absolute_experiments app conditional_experiments debugcss debugjs expflag forced_experiments pbj pbjreload sbb spf spfreload sr_bns_address sttick".split(" ");var kPq=[{QY:l=>`Cannot read property '${l.key}'`,
QS:{Error:[{Tc:/(Permission denied) to access property "([^']+)"/,groups:["reason","key"]}],TypeError:[{Tc:/Cannot read property '([^']+)' of (null|undefined)/,groups:["key","value"]},{Tc:/\u65e0\u6cd5\u83b7\u53d6\u672a\u5b9a\u4e49\u6216 (null|undefined) \u5f15\u7528\u7684\u5c5e\u6027\u201c([^\u201d]+)\u201d/,groups:["value","key"]},{Tc:/\uc815\uc758\ub418\uc9c0 \uc54a\uc74c \ub610\ub294 (null|undefined) \ucc38\uc870\uc778 '([^']+)' \uc18d\uc131\uc744 \uac00\uc838\uc62c \uc218 \uc5c6\uc2b5\ub2c8\ub2e4./,
groups:["value","key"]},{Tc:/No se puede obtener la propiedad '([^']+)' de referencia nula o sin definir/,groups:["key"]},{Tc:/Unable to get property '([^']+)' of (undefined or null) reference/,groups:["key","value"]},{Tc:/(null) is not an object \(evaluating '(?:([^.]+)\.)?([^']+)'\)/,groups:["value","base","key"]}]}},{QY:l=>`Cannot call '${l.key}'`,
QS:{TypeError:[{Tc:/(?:([^ ]+)?\.)?([^ ]+) is not a function/,groups:["base","key"]},{Tc:/([^ ]+) called on (null or undefined)/,groups:["key","value"]},{Tc:/Object (.*) has no method '([^ ]+)'/,groups:["base","key"]},{Tc:/Object doesn't support property or method '([^ ]+)'/,groups:["key"]},{Tc:/\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f '([^']+)' \u30d7\u30ed\u30d1\u30c6\u30a3\u307e\u305f\u306f\u30e1\u30bd\u30c3\u30c9\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u305b\u3093/,groups:["key"]},
{Tc:/\uac1c\uccb4\uac00 '([^']+)' \uc18d\uc131\uc774\ub098 \uba54\uc11c\ub4dc\ub97c \uc9c0\uc6d0\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4./,groups:["key"]}]}},{QY:l=>`${l.key} is not defined`,
QS:{ReferenceError:[{Tc:/(.*) is not defined/,groups:["key"]},{Tc:/Can't find variable: (.*)/,groups:["key"]}]}}];var v7s={TO:[],Rd:[{callback:o7y,weight:500},{callback:NDP,weight:500}]};var sK5=class{constructor(){this.Rd=[];this.TO=[]}},Cz;var Vt=new g.W9;var zh5=new Set,DAg=0,eht=0,ZrP=0,yqg=[],lcq=[],Aqg=["PhantomJS","Googlebot","TO STOP THIS SECURITY SCAN go/scan"];var Q1T=new g.D("parallelCommand");var dSC=new g.D("performOnceCommand");var OrQ=new g.D("serialCommand");var YE=void 0;Ej({},"sgPmTd");Ej(null,"jypsq");Ej(null,"mWiOof");Date.now();var GP_=class extends xO{constructor(l){super(arguments);this.csn=l}},bp_=new m9("screen-created",GP_),vH=[],hh5=Xpy,BH=0,Er=new Map,fz=new Map,j0=new Map;var ge=class{constructor(l,y=null,k={},z,r,Z){this.componentType=l;this.renderer=y;this.macros=k;this.layoutId=z;this.interactionLoggingClientData=r;this.Z=Z;this.id=kb(l)}};g.J5(g.z1,g.zP);g.b=g.z1.prototype;g.b.subscribe=function(l,y,k){return this.IR()?0:this.Xz.subscribe(l,y,k)};
g.b.unsubscribe=function(l,y,k){return this.IR()?!1:this.Xz.unsubscribe(l,y,k)};
g.b.Dl=function(l){return this.IR()?!1:this.Xz.Dl(l)};
g.b.publish=function(l,y){return this.IR()?!1:this.Xz.publish.apply(this.Xz,arguments)};
g.b.IZ=function(l,y){for(let k in l)this.subscribe(k,l[k],y)};
g.b.zN=function(l,y){for(let k in l)this.unsubscribe(k,l[k],y)};var L_=16/9,fSg=[.25,.5,.75,1,1.25,1.5,1.75,2],jy5=fSg.concat([3,4,5,6,7,8,9,10,15]),Sfz=fSg.concat([2.5,3,3.5,4]);var cqQ=1;g.Ev=class extends g.zP{constructor(l){super();this.g4={};this.hk={};this.element=this.createElement(l)}createElement(l,y){y=y||l.U==="svg";let k;var z=l.B,r=l.L_;y?(k=document.createElementNS("http://www.w3.org/2000/svg",l.U),g.pA&&(l.G||(l.G={}),l.G.focusable="false")):k=g.Gf(l.U);if(z){if(z=Zs(this,k,"class",z))er(this,k,"class",z),this.g4[z]=k}else if(r){for(var Z of r)this.g4[Z]=k;er(this,k,"class",r.join(" "))}z=l.Nd;r=l.W;if(z)y=Zs(this,k,"child",z),y!==void 0&&k.appendChild(g.ap(y));else if(r){z=
0;for(var e of r)e&&(typeof e==="string"?(r=Zs(this,k,"child",e),r!=null&&k.appendChild(g.ap(r))):e.element?k.appendChild(e.element):(Z=e,r=this.createElement(Z,y),k.appendChild(r),Z.N_&&(Z=rM(),r.id=Z,r=document.createElementNS("http://www.w3.org/2000/svg","use"),r.setAttribute("class","ytp-svg-shadow"),r.setAttributeNS("http://www.w3.org/1999/xlink","href",`#${Z}`),Mj(k,r,z++))))}if(l=l.G){y=k;for(const A of Object.keys(l))e=l[A],er(this,y,A,typeof e==="string"?Zs(this,y,A,e):e)}return k}qd(l){return this.g4[l]}Uj(l,
y){typeof y==="number"?Mj(l,this.element,y):l.appendChild(this.element)}detach(){g.XI(this.element)}update(l){for(const y of Object.keys(l))this.updateValue(y,l[y])}updateValue(l,y){(l=this.hk[`{{${l}}}`])&&er(this,l[0],l[1],y)}Vj(){this.g4={};this.hk={};this.detach();super.Vj()}};g.H=class extends g.Ev{constructor(l){super(l);this.VM=!0;this.C_=!1;this.listeners=[]}setContent(l,y){this.updateValue(y||"content",l)}show(){this.VM||(g.n9(this.element,"display",""),this.VM=!0)}hide(){this.VM&&(g.n9(this.element,"display","none"),this.VM=!1)}fP(l){l?this.show():this.hide()}Cl(l){this.C_=l}Q9(){return this.VM}listen(l,y,k){return this.j(this.element,l,y,k)}j(l,y,k,z){k=(0,g.We)(k,z||this);z={target:l,type:y,listener:k};this.listeners.push(z);l.addEventListener(y,k);return z}uq(l){this.listeners.forEach((y,
k)=>{y===l&&(y=this.listeners.splice(k,1)[0],y.target.removeEventListener(y.type,y.listener))})}focus(){this.element.focus()}Vj(){for(;this.listeners.length;){const l=this.listeners.pop();
l&&l.target.removeEventListener(l.type,l.listener)}super.Vj()}};g.kD=class extends g.H{constructor(l){super(l);this.MW=new g.z1;g.x(this,this.MW)}subscribe(l,y,k){return this.MW.subscribe(l,y,k)}unsubscribe(l,y,k){return this.MW.unsubscribe(l,y,k)}Dl(l){return this.MW.Dl(l)}publish(l,...y){return this.MW.publish(l,...y)}};var nQT=new WeakSet,fj=class extends g.kD{constructor(l,y,k,z,r,Z,e=null){super(y);this.api=l;this.macros={};this.componentType=k;this.A=this.D=null;this.kz=e;this.layoutId=z;this.interactionLoggingClientData=r;this.l0=Z;this.mK=null;this.TY=new Ju(this.element);g.x(this,this.TY);this.Oj=this.j(this.element,"click",this.onClick);this.RR=[];this.HG=new gQT(this.onClick,this);g.x(this,this.HG);this.hv=!1;this.u0=this.b0=null}bind(l){this.mK||l.renderer&&this.init(l.id,l.renderer,{},l);return Promise.resolve()}init(l,
y,k){this.mK=l;this.element.setAttribute("id",this.mK);this.kz&&g.zi(this.element,this.kz);this.b0=y&&y.adRendererCommands;this.u0=y.interaction;this.u0?.onTap&&g.zi(this.element,"ytp-ad-component--clickable");this.macros=k;this.D=y.trackingParams||null;this.A=g.E(y.rendererContext,QOQ)?.loggingDirectives??y.loggingDirectives;this.D!=null?this.createServerVe(this.element,this.D):this.A&&(l=this.element,y=this.A,this.api.createServerVe(l,this,!0),this.api.setTrackingParams(l,y.trackingParams||null))}clear(){}hide(){super.hide();
(this.D!=null||this.A)&&this.logVisibility(this.element,!1)}show(){super.show();if(!this.hv){this.hv=!0;var l=this.b0&&this.b0.impressionCommand;const y=this.u0?.onFirstVisible;l?this.Ja(l):y&&(l=pz(y))&&this.Ja(l)}(this.D!=null||this.A)&&this.logVisibility(this.element,!0)}onClick(l){if((this.D||this.A)&&!nQT.has(l)){var y=this.element;this.api.hasVe(y)&&this.VM&&this.api.logClick(y,this.interactionLoggingClientData);nQT.add(l)}var k=this.b0&&this.b0.clickCommand;y=this.u0?.onTap;if(k){var z=this.WG(k);
this.Ja(z)}else{if(k=y)a:{k=this.element;l=l.composedPath();for(z of l){if(z===k)break;if(z.className.indexOf("ytp-ad-component--clickable")>=0){k=!1;break a}}k=!0}k&&(z=pz(y))&&this.Ja(z)}}WG(l){return l}onTouchStart(l){this.HG.onTouchStart(l)}onTouchMove(l){this.HG.onTouchMove(l)}onTouchEnd(l){if(this.HG)this.HG.onTouchEnd(l)}Ja(l){this.layoutId?this.l0.executeCommand(l,this.layoutId):(l=new g.WO("There is undefined layoutId when calling the runCommand method.",{componentType:this.componentType}),
g.n(l))}createServerVe(l,y){this.api.createServerVe(l,this);this.api.setTrackingParams(l,y)}logVisibility(l,y){this.api.hasVe(l)&&this.api.logVisibility(l,y,this.interactionLoggingClientData)}Vj(){this.clear(null);this.uq(this.Oj);for(const l of this.RR)this.uq(l);super.Vj()}};var PW=class extends fj{constructor(l,y,k,z,r=[],Z="button",e=!1,A,Q=!1){r={U:"button",L_:["ytp-ad-button"].concat(r)};A!=null&&(r.G={tabindex:A});super(l,r,Z,y,k,z);this.Z=this.C=this.N=null;this.J=e;this.V=Q;this.hide()}init(l,y,k){super.init(l,y,k);this.Z=y;if(y.text==null&&y.icon==null)g.WH(Error("ButtonRenderer did not have text or an icon set."));else{switch(y.style||null){case "STYLE_UNKNOWN":l="ytp-ad-button-link";break;default:l=null}l!=null&&g.zi(this.element,l);y.text!=null&&(l=g.$b(y.text),
g.G0(l)||(this.element.setAttribute("aria-label",l),this.N=new g.kD({U:"span",B:"ytp-ad-button-text",Nd:l}),g.x(this,this.N),this.N.Uj(this.element)));y.accessibilityData&&y.accessibilityData.accessibilityData&&y.accessibilityData.accessibilityData.label&&!g.G0(y.accessibilityData.accessibilityData.label)&&this.element.setAttribute("aria-label",y.accessibilityData.accessibilityData.label);y.icon!=null&&(y=m7(y.icon,this.V),y!=null&&(this.C=new g.kD({U:"span",B:"ytp-ad-button-icon",W:[y]}),g.x(this,
this.C)),this.J?Mj(this.element,this.C.element,0):this.C.Uj(this.element))}}clear(){this.hide()}onClick(l){super.onClick(l);for(const y of Rh_(this))this.layoutId?this.l0.executeCommand(y,this.layoutId):g.n(Error("Missing layoutId for button."));this.api.onAdUxClicked(this.componentType,this.layoutId)}};var DSt=class extends g.zP{constructor(){super();this.Z=new Map;this.C=vH5(l=>{if(l.target&&(l=this.Z.get(l.target))&&l)for(let y=0;y<l.length;y++)g.Eb(l[y])})}Vj(){this.C&&g.lw(this.C);
this.Z.clear();qf=null;super.Vj()}register(l,y){y&&this.Z.set(l,y)}},qf=null;var Fr_=class extends fj{constructor(l,y,k,z,r,Z=!1){super(l,{U:"span",L_:["ytp-ad-hover-text-button"].concat(["ytp-ad-info-hover-text-button"])},"ad-info-hover-text-button",y,k,z);this.button=this.C=null;this.J=r;this.N=Z;this.hide()}init(l,y,k){super.init(l,y,k);l=y.hoverText||null;y=y.button&&g.E(y.button,$L)||null;y==null?g.n(Error("AdHoverTextButtonRenderer.button was not set in response.")):(this.button=new PW(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,void 0,void 0,void 0,
void 0,this.N),g.x(this,this.button),this.button.init(kb("button"),y,this.macros),l&&this.button.element.setAttribute("aria-label",g.$b(l)),this.button.Uj(this.element),!g.ka(this.button.element,"ytp-ad-clickable")&&g.zi(this.button.element,"ytp-ad-clickable"),this.N&&g.zi(this.button.element,"ytp-ad-hover-text-button--clean-player"),l&&(this.C=new g.kD({U:"div",B:"ytp-ad-hover-text-container"}),this.J&&(y=new g.kD({U:"div",B:"ytp-ad-hover-text-callout"}),y.Uj(this.C.element),g.x(this,y)),g.x(this,
this.C),this.C.Uj(this.element),y=WW(l),Mj(this.C.element,y,0)),this.show())}hide(){this.button&&this.button.hide();this.C&&this.C.hide();super.hide()}show(){this.button&&this.button.show();super.show()}};var j8=class extends fj{constructor(l,y,k,z,r=null,Z=!1){super(l,{U:"img",B:"ytp-ad-image"},"ad-image",y,k,z,r);this.Z=Z;this.hide()}init(l,y,k){super.init(l,y,k);k=(l=y.thumbnail)&&T1(l)||"";g.G0(k)?Math.random()<.01&&g.WH(Error("Found AdImage without valid image URL")):(this.Z?g.n9(this.element,"backgroundImage",`url(${k})`):eU(this.element,{src:k}),eU(this.element,{alt:l&&l.accessibility&&l.accessibility.label||""}),y&&y.adRendererCommands&&y.adRendererCommands.clickCommand?this.element.classList.add("ytp-ad-clickable-element"):
this.element.classList.remove("ytp-ad-clickable-element"),this.show())}clear(){this.hide()}};var oQ4=class extends fj{constructor(l,y,k,z){super(l,{U:"div",L_:["ytp-ad-confirm-dialog-background"],W:[{U:"div",B:"ytp-ad-confirm-dialog-container",W:[{U:"div",L_:["ytp-ad-confirm-dialog"].concat([]),G:{role:"dialog",tabindex:"-1"},W:[{U:"div",B:"ytp-ad-confirm-dialog-title",Nd:"{{title}}"},{U:"div",B:"ytp-ad-confirm-dialog-messages"},{U:"div",B:"ytp-ad-confirm-dialog-confirm-container",W:[{U:"button",B:"ytp-ad-confirm-dialog-cancel-button",Nd:"{{cancelLabel}}"},{U:"button",B:"ytp-ad-confirm-dialog-confirm-button",
Nd:"{{confirmLabel}}"}]}]}]},{U:"button",L_:["ytp-ad-confirm-dialog-close-overlay-button","ytp-ad-button","ytp-ad-button-link"],W:[{U:"span",B:"ytp-ad-button-icon",W:[g.wM()]}]}]},"ad-mute-confirm-dialog",y,k,z);this.sj=this.qd("ytp-ad-confirm-dialog-close-overlay-button");this.K=this.qd("ytp-ad-confirm-dialog-cancel-button");this.Y=this.qd("ytp-ad-confirm-dialog-confirm-button");this.rb=this.qd("ytp-ad-confirm-dialog-messages");this.N=null;this.Z=new IT;g.x(this,this.Z);this.C=null;this.hide()}hide(){super.hide();
this.N&&this.N.focus()}show(){this.N=document.activeElement;super.show();this.K.focus()}init(l,y,k){super.init(l,y,k);this.C=y;y.dialogMessages||y.title!=null?y.confirmLabel==null?g.n(Error("ConfirmDialogRenderer.confirmLabel was not set.")):y.cancelLabel==null?g.n(Error("ConfirmDialogRenderer.cancelLabel was not set.")):z$P(this,y):g.n(Error("Neither ConfirmDialogRenderer.title nor ConfirmDialogRenderer.dialogMessages were set."))}clear(){this.Z.C();this.hide()}J(){this.hide()}V(){const l=this.C.cancelEndpoint;
l&&(this.layoutId?this.l0.executeCommand(l,this.layoutId):g.n(Error("Missing layoutId for confirm dialog.")));this.hide()}S(){const l=this.C.confirmNavigationEndpoint||this.C.confirmEndpoint;l&&(this.layoutId?this.l0.executeCommand(l,this.layoutId):g.n(Error("Missing layoutId for confirm dialog.")));this.hide()}};var S8=class extends fj{constructor(l,y,k,z,r=[]){const Z=kb("ytp-ad-toggle-button-input");let e={role:"button","aria-label":"{{tooltipText}}"};l.O().experiments.z7("fix_h5_toggle_button_a11y")&&(e.tabindex="0");e.role="checkbox";super(l,{U:"div",L_:["ytp-ad-toggle-button"].concat(r),W:[{U:"label",B:"ytp-ad-toggle-button-label",G:{"for":Z},W:[{U:"span",B:"ytp-ad-toggle-button-icon",G:e,W:[{U:"span",B:"ytp-ad-toggle-button-untoggled-icon",Nd:"{{untoggledIconTemplateSpec}}"},{U:"span",B:"ytp-ad-toggle-button-toggled-icon",
Nd:"{{toggledIconTemplateSpec}}"}]},{U:"input",B:"ytp-ad-toggle-button-input",G:{id:Z,type:"checkbox"}},{U:"span",B:"ytp-ad-toggle-button-text",Nd:"{{buttonText}}"},{U:"span",B:"ytp-ad-toggle-button-tooltip",Nd:"{{tooltipText}}"}]}]},"toggle-button",y,k,z);this.V=this.qd("ytp-ad-toggle-button");this.Z=this.qd("ytp-ad-toggle-button-input");this.C=this.qd("ytp-ad-toggle-button-icon");this.S=this.qd("ytp-ad-toggle-button-untoggled-icon");this.J=this.qd("ytp-ad-toggle-button-toggled-icon");this.sj=this.qd("ytp-ad-toggle-button-text");
this.N=null;this.Y=!1;this.hide()}init(l,y,k){super.init(l,y,k);this.N=y;if(y.defaultText==null&&y.defaultIcon==null)g.n(Error("ToggleButtonRenderer must have either text or icon set."));else if(y.defaultIcon==null&&y.toggledIcon!=null)g.n(Error("ToggleButtonRenderer cannot have toggled icon set without a default icon."));else{if(y.style){switch(y.style.styleType){case "STYLE_UNKNOWN":case "STYLE_DEFAULT":l="ytp-ad-toggle-button-default-style";break;default:l=null}l!=null&&g.zi(this.V,l)}l={};y.defaultText?
(k=g.$b(y.defaultText),g.G0(k)||(l.buttonText=k,this.api.O().experiments.z7("a11y_h5_associate_survey_question")||this.Z.setAttribute("aria-label",k),this.api.O().experiments.z7("fix_h5_toggle_button_a11y")&&this.C.setAttribute("aria-label",k))):g.A2(this.sj,!1);y.defaultTooltip&&(l.tooltipText=y.defaultTooltip,this.Z.hasAttribute("aria-label")||this.C.setAttribute("aria-label",y.defaultTooltip));y.defaultIcon?(k=m7(y.defaultIcon),this.updateValue("untoggledIconTemplateSpec",k),y.toggledIcon?(this.Y=
!0,k=m7(y.toggledIcon),this.updateValue("toggledIconTemplateSpec",k)):(g.A2(this.S,!0),g.A2(this.J,!1)),g.A2(this.Z,!1)):g.A2(this.C,!1);g.DB(l)||this.update(l);y.isToggled&&(g.zi(this.V,"ytp-ad-toggle-button-toggled"),this.toggleButton(y.isToggled));Vk(this);this.j(this.element,"change",this.K);this.show()}}onClick(l){this.RR.length>0&&(this.toggleButton(!this.isToggled()),this.K());super.onClick(l)}K(){g.I(this.V,"ytp-ad-toggle-button-toggled",this.isToggled());for(const l of r_z(this,this.isToggled()))this.layoutId?
this.l0.executeCommand(l,this.layoutId):g.n(Error("Missing layoutId for toggle button."));if(this.isToggled())this.api.onAdUxClicked("toggle-button",this.layoutId);Vk(this)}clear(){this.hide()}toggleButton(l){g.I(this.V,"ytp-ad-toggle-button-toggled",l);this.Z.checked=l;Vk(this)}isToggled(){return this.Z.checked}};var j$Q=class{constructor(l,y,k){this.actionType=y;this.id=k;this.content=l}};var NgT=class extends IT{constructor(l){super();this.Z=l;this.j(this.Z,"onAdUxUpdate",this.S)}S(l){if(Array.isArray(l))for(const y of l)y instanceof j$Q&&this.V(y)}};var OUy=class extends fj{constructor(l,y,k,z){super(l,{U:"div",B:"ytp-ad-feedback-dialog-background",W:[{U:"div",B:"ytp-ad-feedback-dialog-container",W:[{U:"div",B:"ytp-ad-feedback-dialog-form",G:{role:"dialog",tabindex:"-1"},W:[{U:"div",B:"ytp-ad-feedback-dialog-title",W:[{U:"span",Nd:"{{title}}"}]},{U:"span",B:"ytp-ad-info-dialog-feedback-options-title",Nd:"{{reasonsTitle}}"},{U:"div",B:"ytp-ad-info-dialog-feedback-options"},{U:"div",B:"ytp-ad-feedback-dialog-confirm-container",W:[{U:"button",B:"ytp-ad-feedback-dialog-cancel-button",
Nd:"{{cancelLabel}}"},{U:"button",B:"ytp-ad-feedback-dialog-confirm-button",Nd:"{{confirmLabel}}"}]}]}]}]},"ad-info-dialog",y,k,z);this.V=[];this.Z=null;this.J=this.qd("ytp-ad-feedback-dialog-cancel-button");this.S=this.qd("ytp-ad-feedback-dialog-confirm-button");this.Y=this.qd("ytp-ad-info-dialog-feedback-options");this.sj=this.qd("ytp-ad-feedback-dialog-title");this.N=this.C=null;this.hide()}init(l,y,k){super.init(l,y,k);y.reasons?y.confirmLabel==null?g.n(Error("AdFeedbackRenderer.confirmLabel was not set.")):
(y.cancelLabel==null&&g.WH(Error("AdFeedbackRenderer.cancelLabel was not set.")),y.title==null&&g.WH(Error("AdFeedbackRenderer.title was not set.")),$Gg(this,y)):g.n(Error("AdFeedbackRenderer.reasons were not set."))}clear(){yE(this.J);yE(this.S);this.V.length=0;this.hide()}hide(){this.Z&&this.Z.hide();this.C&&this.C.hide();super.hide();this.N&&this.N.focus()}show(){this.Z&&this.Z.show();this.C&&this.C.show();this.N=document.activeElement;super.show();this.J.focus()}K(){this.api.onAdUxClicked("ad-feedback-dialog-close-button",
this.layoutId);this.publish("a");this.hide()}rb(){this.hide()}},QR_=class{constructor(l,y){this.C=y;this.Z=new g.kD({U:"label",B:"ytp-ad-feedback-dialog-reason-label",W:[{U:"input",B:"ytp-ad-feedback-dialog-reason-input",G:{type:"radio",name:"feedback-reason-group"}},{U:"span",B:"ytp-ad-feedback-dialog-reason-text",Nd:g.$b(l)}]});this.N=this.Z.qd("ytp-ad-feedback-dialog-reason-input")}Jv(){return this.Z.element}getCommand(){return this.C}isChecked(){return this.N.checked}};var w05=class extends oQ4{J(l){super.J(l);this.api.onAdUxClicked("ad-mute-confirm-dialog-close-button")}V(l){super.V(l);this.api.onAdUxClicked("ad-mute-confirm-dialog-close-button")}S(l){super.S(l);this.api.onAdUxClicked("ad-mute-confirm-dialog-confirm-button");this.publish("b")}};var X0C=class extends fj{constructor(l,y,k,z,r){super(l,{U:"div",B:"ytp-ad-info-dialog-background",W:[{U:"div",B:"ytp-ad-info-dialog-container",W:[{U:"div",B:"ytp-ad-info-dialog-form",G:{role:"dialog",tabindex:"-1"},W:[{U:"div",B:"ytp-ad-info-dialog-title",Nd:"{{title}}"},{U:"ul",B:"ytp-ad-info-dialog-ad-reasons"},{U:"div",B:"ytp-ad-info-dialog-message"},{U:"div",B:"ytp-ad-info-dialog-mute-container"},{U:"div",B:"ytp-ad-info-dialog-confirm-container",W:[{U:"button",B:"ytp-ad-info-dialog-confirm-button",
Nd:"{{confirmLabel}}"}]}]}]}]},"ad-info-dialog",y,k,z);this.Z=this.C=null;this.S=this.qd("ytp-ad-info-dialog-confirm-button");this.gb=this.qd("ytp-ad-info-dialog-mute-container");this.Xr=this.qd("ytp-ad-info-dialog-message");this.rb=this.qd("ytp-ad-info-dialog-ad-reasons");this.V=this.N=null;this.Y=r;this.J=null;this.PG=!1;this.K=null;this.hide()}init(l,y,k){super.init(l,y,k);this.J=y;if(y.dialogMessage==null&&y.title==null)g.n(Error("Neither AdInfoDialogRenderer.dialogMessage nor AdInfoDialogRenderer.title was set."));
else{y.confirmLabel==null&&g.WH(Error("AdInfoDialogRenderer.confirmLabel was not set."));if(l=y.closeOverlayRenderer&&g.E(y.closeOverlayRenderer,$L)||null)this.Z=new PW(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,["ytp-ad-info-dialog-close-button"],"ad-info-dialog-close-button"),g.x(this,this.Z),this.Z.init(kb("button"),l,this.macros),this.Z.Uj(this.element);y.title&&(l=g.$b(y.title),this.updateValue("title",l));if(y.adReasons)for(l=y.adReasons,k=0;k<l.length;k++){const z=WW(l[k]);
if(!g.G0(z.textContent)){const r=hV("LI");r.appendChild(z);this.rb.appendChild(r)}}else g.A2(this.rb,!1);y.dialogMessage&&(l=WW(y.dialogMessage,!0),this.Xr.appendChild(l));y.confirmLabel&&(l=g.$b(y.confirmLabel),this.updateValue("confirmLabel",l));y.muteAdRenderer&&(y=g.E(y.muteAdRenderer,$L)||null)&&(l=y.navigationEndpoint&&g.E(y.navigationEndpoint,wTQ)||null,k=y.navigationEndpoint&&g.E(y.navigationEndpoint,PEC)||null,l==null&&k==null?g.WH(Error("AdInfoDialogRenderer.muteAdRenderer was specified but contains neither an AdFeedbackEndpoint, nor a ConfirmDialogEndpoint.")):
(l?dGC(this,l):k&&h$P(this,k),this.N=new PW(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,["ytp-ad-info-dialog-mute-button"],"button",!0),g.x(this,this.N),this.N.init(kb("button"),y,this.macros),this.N.listen("click",this.xz,this),this.N.Uj(this.gb)));tbe(this)}}clear(){yE(this.S);this.hide()}hide(){this.C?this.C.hide():this.V&&this.V.hide();this.Z&&this.Z.hide();this.N&&this.N.hide();super.hide();this.K&&this.K.focus()}show(){this.Z&&this.Z.show();this.N&&this.N.show();if(!this.PG){const l=
this.J&&this.J.impressionEndpoints||[];for(const y of l)this.layoutId?this.l0.executeCommand(y,this.layoutId):g.n(Error("Missing layoutId for ad info dialog."));this.PG=!0}this.K=document.activeElement;super.show();this.S.focus()}sj(){if(this.J&&this.J.confirmServiceEndpoint){const l=this.J.confirmServiceEndpoint;this.layoutId?this.l0.executeCommand(l,this.layoutId):g.n(Error("Missing layoutId for ad info dialog."))}this.api.onAdUxClicked("ad-info-dialog-close-button",this.layoutId);this.publish("d");
this.hide()}xz(){const l=this.C?this.C:this.V;l&&!l.VM&&(this.hide(),l.show())}};var Z$=class extends Fr_{constructor(l,y,k,z,r,Z=!0,e=!1){super(l,y,k,z,Z,e);this.Z=null;this.V=r;this.hide()}init(l,y,k){super.init(l,y,k);l=y.button&&g.E(y.button,$L)||null;l!=null&&(UGC(this,l,k),this.show())}hide(){this.button&&this.button.hide();this.Z&&this.Z.hide();super.hide()}show(){this.button&&this.button.show();super.show()}clear(){this.hide()}};var nj=class extends fj{constructor(l,y,k,z,r=null,Z="ad-text"){super(l,{U:"div",B:"ytp-ad-text"},Z,y,k,z,r);this.Z=null;this.hide()}init(l,y,k){super.init(l,y,k);this.Z=y;this.isTemplated()||g.C9(this.element,A4(this.Z));if(y.backgroundImage&&(l=(l=y.backgroundImage.thumbnail)?T1(l):"",k=(k=this.api.getVideoData({playerType:1}))&&k.vT,l&&k&&(this.element.style.backgroundImage=`url(${l})`,this.element.style.backgroundSize="100%"),y.style&&y.style.adTextStyle))switch(y.style.adTextStyle.fontSize){case "AD_FONT_SIZE_MEDIUM":this.element.style.fontSize=
"26px"}(l=g.My(y.targetId))&&this.element.setAttribute("data-tooltip-target-id",l);y&&y.adRendererCommands&&y.adRendererCommands.clickCommand?this.element.classList.add("ytp-ad-clickable-element"):this.element.classList.remove("ytp-ad-clickable-element");this.show()}isTemplated(){return this.Z.isTemplated||!1}clear(){this.hide()}};var syq={seekableStart:0,seekableEnd:1,current:0};var Fr=class extends fj{constructor(l,y,k,z,r,Z,e){super(l,y,k,z,r,Z);this.Z=e;g.x(this,this.Z);this.Xr=this.Y=-1}clear(){this.dispose()}};g.oT=class extends g.zP{constructor(l,y,k,z,r,Z){super();this.element=l;this.state=null;k||l.hide();this.N=y;this.V=z===void 0?y:z;this.C=Z;this.onHidden=r;this.delay=new g.B_(this.Z,0,this);g.x(this,this.delay)}show(l){this.state!==1&&this.state!==2&&(this.state===4&&this.Z(),this.state===5?(this.element.show(),this.state=null,this.delay.stop(),this.C&&this.C()):this.element.VM||(Ke(this,!0),this.state=1,l?this.delay.start(l):this.Z()))}hide(){this.state!==4&&(this.state===1||this.state===2?(this.element.hide(),
this.state=null,this.delay.stop()):this.element.VM&&(Ke(this,!0),this.state=4,this.delay.start(this.V)))}Z(){switch(this.state){case 1:this.element.show();this.state=2;this.delay.start(10);break;case 2:Ke(this,!1);this.state=3;this.delay.start(this.N);break;case 3:this.state=null;this.C&&this.C();break;case 4:this.element.hide();Ke(this,!1);this.state=5;this.delay.start(0);break;case 5:if(this.state=null,this.onHidden)this.onHidden()}}stop(){for(;this.state!==null&&this.state!==5;)this.delay.stop(),
this.Z()}Vj(){this.element.IR()||this.element.element.removeAttribute("aria-hidden");super.Vj()}};var Ns=class extends Fr{constructor(l,y,k,z,r,Z){super(l,{U:"div",B:"ytp-ad-preview-slot"},"ad-preview",y,k,z,r);this.xz=-1;this.S=this.api.O().experiments.z7("enable_modern_skip_button_on_web");this.C=new g.kD({U:"span",B:"ytp-ad-preview-container"});this.S&&this.C.element.classList.add("ytp-ad-preview-container-detached");g.x(this,this.C);this.V=this.S?new nj(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,"ytp-ad-preview-text-modern"):new nj(this.api,this.layoutId,this.interactionLoggingClientData,
this.l0,"ytp-ad-preview-text");g.x(this,this.V);this.V.Uj(this.C.element);this.rb=this.S?new g.kD({U:"span",B:"ytp-ad-preview-image-modern"}):new g.kD({U:"span",B:"ytp-ad-preview-image"});g.x(this,this.rb);this.K=new j8(this.api,this.layoutId,this.interactionLoggingClientData,this.l0);g.x(this,this.K);this.K.Uj(this.rb.element);this.rb.Uj(this.C.element);this.C.Uj(this.element);this.sj=new g.oT(this.C,400,!1,100,()=>this.hide());
g.x(this,this.sj);this.PG=0;this.gb=!1;this.T7=Z;this.hide()}init(l,y,k){super.init(l,y,k);l=y.durationMilliseconds;typeof l==="number"&&l<0&&g.n(Error("durationMilliseconds was specified incorrectly in AdPreviewRenderer with a value of: "+l));this.T7&&(this.S?g.zi(this.C.element,"modern-countdown-next-to-thumbnail"):g.zi(this.C.element,"countdown-next-to-thumbnail"));l=y.durationMilliseconds;this.PG=l==null||l===0?this.Z.Vt():l;if(y.templatedCountdown)var z=y.templatedCountdown.templatedAdText;else y.staticPreview&&
(z=y.staticPreview);this.V.init(kb("ad-text"),z,k);(z=this.api.getVideoData({playerType:1}))&&z.vT&&y.thumbnail?this.K.init(kb("ad-image"),y.thumbnail,k):(this.rb.hide(),this.S&&this.T7&&g.zi(this.V.element,"ytp-ad-preview-text-modern-postroll"))}clear(){this.hide()}hide(){this.C.hide();this.V.hide();this.K.hide();pe(this);super.hide()}show(){Yb(this);this.C.show();this.V.show();this.K.show();super.show()}J(){this.hide()}N(){if(this.Z!=null){var l=this.Z.getProgressState();l!=null&&l.current!=null&&
(l=1E3*l.current,!this.gb&&l>=this.PG?(this.sj.hide(),this.gb=!0,this.publish("i")):this.V&&this.V.isTemplated()&&(l=Math.max(0,Math.ceil((this.PG-l)/1E3)),l!=this.xz&&(J4(this.V,{TIME_REMAINING:String(l)}),this.xz=l)))}}};var Lrg=class extends Fr{constructor(l,y,k,z,r,Z){super(l,{U:"div",L_:["ytp-flyout-cta","ytp-flyout-cta-inactive"],W:[{U:"div",B:"ytp-flyout-cta-icon-container"},{U:"div",B:"ytp-flyout-cta-body",W:[{U:"div",B:"ytp-flyout-cta-text-container",W:[{U:"div",B:"ytp-flyout-cta-headline-container"},{U:"div",B:"ytp-flyout-cta-description-container"}]},{U:"div",B:"ytp-flyout-cta-action-button-container"}]}]},"flyout-cta",y,k,z,r);this.V=new j8(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,
"ytp-flyout-cta-icon");g.x(this,this.V);this.V.Uj(this.qd("ytp-flyout-cta-icon-container"));this.V.element.classList.add("ytp-flyout-cta-icon-rounded");this.K=new nj(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,"ytp-flyout-cta-headline");g.x(this,this.K);this.K.Uj(this.qd("ytp-flyout-cta-headline-container"));this.S=new nj(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,"ytp-flyout-cta-description");g.x(this,this.S);this.S.Uj(this.qd("ytp-flyout-cta-description-container"));
this.C=new PW(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,["ytp-flyout-cta-action-button","ytp-flyout-cta-action-button-rounded"]);g.x(this,this.C);this.C.Uj(this.qd("ytp-flyout-cta-action-button-container"));this.C.element.setAttribute("tabIndex","-1");nF(this.C.element);this.sj=null;this.PG=0;this.gb=Z;this.hide()}init(l,y,k){super.init(l,y,k);if(y.image&&y.image.thumbnail)if(y.headline)if(y.description)if((l=y.actionButton&&g.E(y.actionButton,$L))&&l.navigationEndpoint){const r=
this.api.getVideoData({playerType:2});if(r!=null)if(y.image&&y.image.thumbnail){var z=y.image.thumbnail.thumbnails;z!=null&&z.length>0&&g.G0(g.My(z[0].url))&&(z[0].url=r.profilePicture)}else g.WH(Error("FlyoutCtaRenderer does not have image.thumbnail."));this.V.init(kb("ad-image"),y.image,k);this.K.init(kb("ad-text"),y.headline,k);this.S.init(kb("ad-text"),y.description,k);this.C.init(kb("button"),l,k);k=N3(this.C.element);ot(this.C.element,k+" This link opens in new tab");this.sj=l.navigationEndpoint;
this.api.N$()||this.show();this.api.addEventListener("playerUnderlayVisibilityChange",this.rb.bind(this));this.PG=y.startMs||0;Yb(this)}else g.n(Error("FlyoutCtaRenderer has no valid action button."));else g.n(Error("FlyoutCtaRenderer has no description AdText."));else g.n(Error("FlyoutCtaRenderer has no headline AdText."));else g.WH(Error("FlyoutCtaRenderer has no image."))}onClick(l){super.onClick(l);this.api.pauseVideo();!g.cf(this.C.element,l.target)&&this.sj&&(this.layoutId?this.l0.executeCommand(this.sj,
this.layoutId):g.n(Error("Missing layoutId for flyout cta.")))}N(){if(this.Z){var l=this.Z.getProgressState();(l&&l.current||this.gb)&&1E3*l.current>=this.PG&&(pe(this),g.ZM(this.element,"ytp-flyout-cta-inactive"),this.C.element.removeAttribute("tabIndex"))}}J(){this.clear()}clear(){this.hide();this.api.removeEventListener("playerUnderlayVisibilityChange",this.rb.bind(this))}show(){this.C&&this.C.show();super.show()}hide(){this.C&&this.C.hide();super.hide()}rb(l){l=="hidden"?this.show():this.hide()}};var vQC=class extends fj{constructor(l,y,k,z){super(l,{U:"div",B:"ytp-ad-instream-user-sentiment-container"},"instream-user-sentiment",y,k,z,null);this.Z=null;this.N=new S8(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,["ytp-ad-instream-user-sentiment-like-button"]);g.x(this,this.N);this.N.Uj(this.element);this.C=new S8(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,["ytp-ad-instream-user-sentiment-dislike-button"]);g.x(this,this.C);this.C.Uj(this.element);this.V=
new g.oT(this,400,!1,500,()=>this.hide());
g.x(this,this.V);this.hide()}init(l,y,k){super.init(l,y,k);this.Z=y;if(this.Z.rectangle){l=this.Z.likeButton&&g.E(this.Z.likeButton,mC);y=this.Z.dislikeButton&&g.E(this.Z.dislikeButton,mC);this.N.init(kb("toggle-button"),l,k);this.C.init(kb("toggle-button"),y,k);this.j(this.element,"change",this.J);this.V.show(100);this.show();for(const z of this.Z&&this.Z.impressionCommands||[])this.layoutId?this.l0.executeCommand(z,this.layoutId):g.n(Error("Missing layoutId for instream user sentiment."))}}clear(){this.hide()}hide(){this.N.hide();
this.C.hide();super.hide()}show(){this.N.show();this.C.show();super.show()}J(){AB(this.element,"ytp-ad-instream-user-sentiment-selected");this.Z.postMessageAction&&g.G3(this.api,"onYtShowToast",this.Z.postMessageAction);this.V.hide()}onClick(l){this.RR.length>0&&this.J();super.onClick(l)}};var Lj=class extends g.zP{constructor(l,y,k,z,r=0,Z=!1){super();this.C=l;this.N=!1;this.b0=z;this.sj=Z;this.S=!1;this.Z=null;y>0&&(this.Z=new g.B_(this.C_,y,this),g.x(this,this.Z));this.J=new g.B_(this.C_,k,this);g.x(this,this.J);this.Y=tB(this.C,r,1,z);g.x(this,this.Y);this.K=tB(this.C,0,z,1);g.x(this,this.K);this.V=new IT;g.x(this,this.V)}Vj(){this.reset();super.Vj()}reset(){this.V.C();this.S=!1;this.Z&&this.Z.stop();this.J.stop();this.N&&(this.N=!1,this.K.play())}start(){this.reset();this.V.j(this.C,
"mouseover",this.D,this);this.V.j(this.C,"mouseout",this.A,this);this.sj&&(this.V.j(this.C,"focusin",this.D,this),this.V.j(this.C,"focusout",this.A,this));this.Z?this.Z.start():(this.S=this.N=!0,g.n9(this.C,{opacity:this.b0}))}D(){this.N&&(this.N=!1,this.K.play());this.J.stop();this.Z&&this.Z.stop()}A(){this.S?this.J.start():this.Z&&this.Z.start()}C_(){this.N||(this.N=!0,this.Y.play(),this.S=!0)}};var vx=class{constructor(l,y){this.C=l;this.Z=y}},uDQ=[new vx("b.f_",0),new vx("j.s_",2),new vx("r.s_",4),new vx("e.h_",6),new vx("i.s_",8),new vx("s.t_",10),new vx("p.h_",12),new vx("s.i_",14),new vx("f.i_",16),new vx("a.b_",18),new vx("a.o_"),new vx("g.o_",22),new vx("p.i_",24),new vx("p.m_"),new vx("n.k_",20),new vx("i.f_"),new vx("a.s_"),new vx("m.c_"),new vx("n.h_",26),new vx("o.p_"),new vx("m.p_",28),new vx("o.a_"),new vx("d.p_"),new vx("e.i_")].reduce((l,y)=>{l[y.C]=y;return l},{});g.WK=class{constructor(l,y){this.state=l;this.oldState=y}tj(l){return fe(this,l)>0}};var Bgq=class extends Fr{constructor(l,y,k,z,r,Z){super(l,{U:"div",B:"ytp-ad-skip-button-slot"},"skip-button",y,k,z,r);this.sj=null;this.rb=!1;this.gb=Z;this.K=this.api.O().experiments.z7("enable_modern_skip_button_on_web");this.xz=!1;this.S=new g.kD({U:"span",L_:["ytp-ad-skip-button-container"]});this.K&&this.S.element.classList.add("ytp-ad-skip-button-container-detached");g.x(this,this.S);this.S.Uj(this.element);this.C=this.V=null;this.T7=new g.oT(this.S,500,!1,100,()=>this.hide());
g.x(this,this.T7);this.PG=new Lj(this.S.element,15E3,5E3,.5,.5,this.K);g.x(this,this.PG);this.hide()}init(l,y,k){super.init(l,y,k);this.sj=y;(this.rb=mGe(this))&&g.WH(Error("hasAdControlInClickCommands_ is true."));if(!y||g.DB(y))g.n(Error("SkipButtonRenderer was not specified or empty."));else if(!y.message||g.DB(y.message))g.n(Error("SkipButtonRenderer.message was not specified or empty."));else{l=this.K?{iconType:"SKIP_NEXT_NEW"}:{iconType:"SKIP_NEXT"};y=this.api.O().X("delhi_modern_web_player_icons");
const z=m7(l,!1,!1,y);z==null?g.n(Error("Icon for SkipButton was unable to be retrieved. Icon.IconType: "+l.iconType+".")):(this.api.O().X("disable_touch_events_on_skip_button")&&(z.G={...z.G,"aria-hidden":"true",focusable:"false"}),this.V=new g.kD({U:"button",L_:[this.K?"ytp-ad-skip-button-modern":"ytp-ad-skip-button","ytp-button",y?"ytp-ad-skip-button-icon-delhi":""],W:[{U:"span",B:this.K?"ytp-ad-skip-button-icon-modern":"ytp-ad-skip-button-icon",W:[z]}]}),g.x(this,this.V),this.V.Uj(this.S.element),
this.C=new nj(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,"ytp-ad-skip-button-text"),this.K&&this.C.element.classList.add("ytp-ad-skip-button-text-centered"),this.C.init(kb("ad-text"),this.sj.message,k),g.x(this,this.C),Mj(this.V.element,this.C.element,0));this.api.O().X("disable_touch_events_on_skip_button")||(k=this.api.O(),!(this.RR.length>0)&&k.C&&(L2?0:"ontouchstart"in document.documentElement&&(h2()||w7()))&&(this.uq(this.Oj),this.RR=[this.j(this.element,"touchstart",this.onTouchStart,
this),this.j(this.element,"touchmove",this.onTouchMove,this),this.j(this.element,"touchend",this.onTouchEnd,this)]))}}clear(){this.PG.reset();this.hide()}hide(){this.S.hide();this.C&&this.C.hide();pe(this);super.hide()}onClick(l){if(this.V!=null){if(l){var y=l||window.event;y.returnValue=!1;y.preventDefault&&y.preventDefault()}if(Cp_(l,{contentCpn:this.api.getVideoData({playerType:1})?.clientPlaybackNonce||""})===0)g.G3(this.api,"onAbnormalityDetected");else if(super.onClick(l),this.publish("j"),
g.G3(this.api,"onAdSkip"),this.gb||!this.rb)this.api.onAdUxClicked(this.componentType,this.layoutId)}}WG(l){if(!this.gb)return this.rb&&EP("SkipButton click commands not pruned while ALC exist"),l;const y=g.E(l,g.jr)?.commands;if(!y)return l;l=[];for(let k=0;k<y.length;k++){const z=y[k];z.adLifecycleCommand&&xGz(z.adLifecycleCommand)||z.pingingEndpoint||z.adPingingEndpoint||l.push(z)}return{commandExecutorCommand:{commands:l}}}show(){this.PG.start();this.S.show();this.C&&this.C.show();Yb(this);super.show();
this.xz&&this.api.O().X("enable_skip_to_next_messaging")&&this.api.publish("showpromotooltip",this.element)}J(){this.publish("k")}N(){}};var QP=class extends Fr{constructor(l,y,k,z,r,Z){super(l,{U:"div",B:"ytp-ad-skip-ad-slot"},"skip-ad",y,k,z,r);this.sj=Z;this.S=!1;this.K=0;this.V=this.C=null;this.hide()}init(l,y,k){super.init(l,y,k);l=y&&y.preskipRenderer&&g.E(y.preskipRenderer,Th)||{};if(l=g.DB(l)?null:l){this.K=l.durationMilliseconds!=null&&l.durationMilliseconds!==void 0?l.durationMilliseconds:5E3;const z=$f(this.api.O().experiments,"preskip_button_style_ads_backend")=="countdown_next_to_thumbnail"&&OH(this.api.O());this.C=new Ns(this.api,
this.layoutId,this.interactionLoggingClientData,this.l0,this.Z,z);this.C.init(kb("preskip-component"),l,k);l=this.C;l.sj.show(100);l.show();g.x(this,this.C);this.C.Uj(this.element)}else y.skipOffsetMilliseconds&&(this.K=y.skipOffsetMilliseconds);l=y&&y.skippableRenderer&&g.E(y.skippableRenderer,UzQ)||{};l=g.DB(l)?null:l;l==null?g.n(Error("SkipButtonRenderer was not set in player response.")):(this.V=new Bgq(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,this.Z,this.sj),this.V.init(kb("skip-button"),
l,k),g.x(this,this.V),this.V.Uj(this.element),this.api.O().experiments.z7("enable_skip_to_next_messaging")&&(k=g.My(y.targetId))&&(y=this.V,y.V!=null&&(y.xz=!0,y.V.element.setAttribute("data-tooltip-target-id",k),y.V.element.setAttribute("data-tooltip-target-fixed",""))),this.show())}show(){this.S&&this.V?this.V.show():this.C&&this.C.show();Yb(this);super.show()}J(){}clear(){this.C&&this.C.clear();this.V&&this.V.clear();pe(this);super.hide()}hide(){this.C&&this.C.hide();this.V&&this.V.hide();pe(this);
super.hide()}N(){1E3*this.Z.getProgressState().current>=this.K&&q$4(this,!0)}};var HdQ=class extends PW{constructor(l,y,k,z){super(l,y,k,z,["ytp-ad-visit-advertiser-button"],"visit-advertiser")}init(l,y,k){super.init(l,y,k);l=!1;y.text!=null&&(l=g.$b(y.text),l=!g.G0(l));l?y.navigationEndpoint==null?g.WH(Error("No visit advertiser clickthrough provided in renderer,")):y.style!=="STYLE_UNKNOWN"?g.WH(Error("Button style was not a link-style type in renderer,")):this.show():g.WH(Error("No visit advertiser text was present in the renderer."))}};var Bx=class extends fj{constructor(l,y,k,z,r=!1,Z=!1){super(l,{U:"span",B:"ytp-ad-simple-ad-badge"},"simple-ad-badge",y,k,z);this.Z=this.qd("ytp-ad-simple-ad-badge");(this.C=r)&&this.Z.classList.add("ytp-ad-simple-ad-badge--clean-player");Z&&this.Z.classList.add("ytp-ad-simple-ad-badge--survey");this.hide()}init(l,y,k){super.init(l,y,k);l=y.text;g.G0(A4(l))?g.WH(Error("SimpleAdBadgeRenderer has invalid or empty text")):(l&&l.text&&(y=l.text,this.C||(y=this.api.O(),y=l.text+" "+(y&&y.C?"\u2022":"\u00b7")),
y={text:y,isTemplated:l.isTemplated},l.style&&(y.style=l.style),l.targetId&&(y.targetId=l.targetId),l=new nj(this.api,this.layoutId,this.interactionLoggingClientData,this.l0),l.init(kb("simple-ad-badge"),y,k),l.Uj(this.element),g.x(this,l)),this.show())}clear(){this.hide()}};var Hx=class extends ge{constructor(l,y,k,z,r=!1){super("player-overlay",l,{},y,z);this.videoAdDurationSeconds=k;this.interactionLoggingClientData=z;this.Ib=r}};var O3=class extends g.z1{constructor(l,y){super();this.api=l;this.durationMs=y;this.Z=null;this.handler=new IT(this);g.x(this,this.handler);this.C=syq;this.handler.j(this.api,"presentingplayerstatechange",this.N);this.Z=this.handler.j(this.api,"onAdPlaybackProgress",this.Pn)}Vt(){return this.durationMs}stop(){this.Z&&this.handler.uq(this.Z)}Pn(l){this.C={seekableStart:0,seekableEnd:this.durationMs/1E3,current:l.current};this.publish("h")}getProgressState(){return this.C}N(l){l.tj(2)&&this.publish("g")}};var RT=class extends g.z1{constructor(l){super();this.Z=!1;this.rP=0;this.handler=new IT(this);g.x(this,this.handler);this.durationMs=l;this.timer=new g.rm(100);g.x(this,this.timer);this.handler.j(this.timer,"tick",this.Pn);this.C={seekableStart:0,seekableEnd:l/1E3,current:0};this.start()}Vt(){return this.durationMs}start(){this.Z||(this.Z=!0,this.timer.start())}stop(){this.Z&&(this.Z=!1,this.timer.stop())}Pn(){this.rP+=100;let l=!1;this.rP>this.durationMs&&(this.rP=this.durationMs,this.timer.stop(),
l=!0);this.C={seekableStart:0,seekableEnd:this.durationMs/1E3,current:this.rP/1E3};this.publish("h");l&&this.publish("g")}getProgressState(){return this.C}};var Da=class extends Fr{constructor(l,y,k,z,r,Z,e){super(l,{U:"span",B:e?"ytp-ad-duration-remaining--clean-player":"ytp-ad-duration-remaining"},"ad-duration-remaining",y,k,z,r);this.videoAdDurationSeconds=Z;this.C=null;e&&this.api.O().C&&(this.element.classList.add("ytp-ad-duration-remaining--mweb"),Zu&&this.element.classList.add("ytp-ad-duration-remaining--mweb-ios"));this.hide()}init(l,y,k){super.init(l,y,k);if(y?.templatedCountdown?.templatedAdText){l=y.templatedCountdown.templatedAdText;if(!l.isTemplated){g.WH(Error("AdDurationRemainingRenderer has no templated ad text."));
return}this.C=new nj(this.api,this.layoutId,this.interactionLoggingClientData,this.l0);this.C.init(kb("ad-text"),l,{});this.C.Uj(this.element);g.x(this,this.C)}this.show()}clear(){this.hide()}hide(){pe(this);super.hide()}J(){this.hide()}N(){if(this.Z!=null){var l=this.Z.getProgressState();if(l!=null&&l.current!=null&&this.C){var y=this.Z instanceof O3?this.videoAdDurationSeconds!==void 0?this.videoAdDurationSeconds:l.seekableEnd:this.videoAdDurationSeconds!==void 0?this.videoAdDurationSeconds:this.Z instanceof
RT?l.seekableEnd:this.api.getDuration({playerType:2,D5:!1});l=l.current;y=this.api.getVideoData()?.j2?.()?Math.max(y-l,0):y-l;J4(this.C,{FORMATTED_AD_DURATION_REMAINING:String(g.Sr(y)),TIME_REMAINING:String(Math.ceil(y))})}}}show(){Yb(this);super.show()}};var Rr5=class extends nj{constructor(l,y,k,z){super(l,y,k,z,"ytp-video-ad-top-bar-title","ad-title")}onClick(l){super.onClick(l);this.api.onAdUxClicked(this.componentType)}};var lb=class{constructor(l){this.content=l.content;if(l.commandRuns)for(const y of l.commandRuns)this.loggingDirectives=g.E(y,FQ5),y.onTap&&(this.interaction={onTap:y.onTap})}},yZ=class extends fj{constructor(l,y,k,z){super(l,{U:"div",B:"ad-simple-attributed-string"},"ad-simple-attributed-string",y,k,z);this.hide()}init(l,y){super.init(l,y,{});(l=y.content)?(g.C9(this.element,l),this.element.setAttribute("aria-label",y.interaction?.accessibility?.label||l)):g.n(Error("AdSimpleAttributedString does not have text content"))}clear(){this.hide()}onClick(l){super.onClick(l)}};var kT=class extends fj{constructor(l,y,k,z,r){super(l,{U:"span",B:r?"ytp-ad-badge--clean-player":"ytp-ad-badge"},"ad-badge",y,k,z);this.C=r;this.adBadgeText=new yZ(this.api,this.layoutId,this.interactionLoggingClientData,this.l0);this.adBadgeText.Uj(this.element);g.x(this,this.adBadgeText);r?(this.adBadgeText.element.classList.add("ytp-ad-badge__text--clean-player"),Zu&&this.adBadgeText.element.classList.add("ytp-ad-badge--stark-clean-player-ios")):this.adBadgeText.element.classList.add("ytp-ad-badge__text");
this.hide()}init(l,y){super.init(l,y,{});(l=y.label)&&l.content&&!g.G0(l.content)?(this.adBadgeText.init(kb("ad-simple-attributed-string"),new lb(l)),(y=y.adPodIndex)&&y.content&&!g.G0(y.content)&&(this.Z=new yZ(this.api,this.layoutId,this.interactionLoggingClientData,this.l0),this.Z.Uj(this.element),g.x(this,this.Z),this.Z.element.classList.add("ytp-ad-badge__pod-index"),this.Z.init(kb("ad-simple-attributed-string"),new lb(y))),this.element.classList.add(this.C?"ytp-ad-badge--stark-clean-player":
"ytp-ad-badge--stark"),this.show()):g.n(Error("No label is returned in AdBadgeViewModel."))}show(){this.adBadgeText.show();this.Z?.show();super.show()}hide(){this.adBadgeText.hide();this.Z?.hide();super.hide()}};var DU5=class extends fj{constructor(l,y,k,z){super(l,{U:"span",B:"ytp-ad-pod-index"},"ad-pod-index",y,k,z);this.api.O().C&&(this.element.classList.add("ytp-ad-pod-index--mweb"),Zu&&this.element.classList.add("ytp-ad-pod-index--mweb-ios"));this.hide()}init(l,y){super.init(l,y,{});(l=y.adPodIndex)&&l.content&&!g.G0(l.content)&&(this.Z=new yZ(this.api,this.layoutId,this.interactionLoggingClientData,this.l0),this.Z.Uj(this.element),g.x(this,this.Z),this.Z.init(kb("ad-simple-attributed-string"),new lb(l)),
y.visibilityCondition==="AD_POD_INDEX_VISIBILITY_CONDITION_AUTOHIDE"&&this.element.classList.add("ytp-ad-pod-index--autohide"));this.element.classList.add("ytp-ad-pod-index--stark");this.show()}show(){this.Z?.show();super.show()}hide(){this.Z?.hide();super.hide()}};var lI5=class extends fj{constructor(l,y,k,z){super(l,{U:"div",B:"ytp-ad-disclosure-banner"},"ad-disclosure-banner",y,k,z);this.hide()}init(l,y){super.init(l,y,{});y?.text?y.text?.content&&!g.G0(y.text.content)&&(this.Z=new g.kD({U:"div",B:"ytp-ad-disclosure-banner__text",Nd:y.text.content}),g.x(this,this.Z),this.Z.Uj(this.element),this.api.O().X("enable_ad_disclosure_banner_a11y_fix")?((l=y.interaction?.accessibility?.label)||(l=`${y.text.content} ${"This link opens in new tab"}`),ot(this.element,
l)):this.element.setAttribute("aria-label",y.interaction?.accessibility?.label||y.text.content),y.interaction?.onTap&&(this.api.O().X("remove_chevron_from_ad_disclosure_banner_h5")||(this.C=new g.kD({U:"div",B:"ytp-ad-disclosure-banner__chevron",W:[g.dM()]}),g.x(this,this.C),this.C.Uj(this.element)),this.api.O().X("enable_ad_disclosure_banner_a11y_fix")&&(nF(this.element),this.element.setAttribute("tabindex","0"),this.listen("keydown",this.xF))),this.show()):g.n(Error("No banner text found in AdDisclosureBanner."))}xF(l){if(l.key===
"Enter"||l.key===" ")l.preventDefault(),this.element.click()}clear(){this.hide()}};var GD=class{constructor(l,y){this.C=l;this.Z=y}};var d$=class extends g.kD{constructor(l,y,k,z=!1){super({U:"div",B:"ytp-ad-persistent-progress-bar-container",W:[{U:"div",B:"ytp-ad-persistent-progress-bar"}]});this.api=l;this.C=y;this.N=k;z&&this.element.classList.add("ytp-ad-persistent-progress-bar-container--clean-player");g.x(this,this.C);this.progressBar=this.qd("ytp-ad-persistent-progress-bar");this.Z=-1;this.j(l,"presentingplayerstatechange",this.onStateChange);this.hide();this.onStateChange()}Pn(){const l=this.C.getProgressState();let y=
l.seekableEnd;this.api.getPresentingPlayerType()===2&&(y=this.N?this.N/1E3:l.seekableEnd);this.progressBar.style.width=Fh(new GD(l.seekableStart,y),l.current,0)*100+"%"}onStateChange(){g.aq(this.api.O())||(this.api.getPresentingPlayerType()===2?this.Z===-1&&(this.show(),this.Z=this.C.subscribe("h",this.Pn,this),this.Pn()):this.Z!==-1&&(this.hide(),this.C.Dl(this.Z),this.Z=-1))}};var pNC=class extends fj{constructor(l,y,k,z,r,Z){super(l,{U:"div",B:"ytp-ad-player-overlay",W:[{U:"div",B:"ytp-ad-player-overlay-flyout-cta"},{U:"div",B:"ytp-ad-player-overlay-instream-info"},{U:"div",B:"ytp-ad-player-overlay-skip-or-preview"},{U:"div",B:"ytp-ad-player-overlay-progress-bar"},{U:"div",B:"ytp-ad-player-overlay-instream-user-sentiment"},{U:"div",B:"ytp-ad-player-overlay-ad-disclosure-banner"}]},"player-overlay",y,k,z);this.S=Z;this.J=this.qd("ytp-ad-player-overlay-flyout-cta");this.J.classList.add("ytp-ad-player-overlay-flyout-cta-rounded");
this.Z=this.qd("ytp-ad-player-overlay-instream-info");this.V=null;I2e(this)&&(l=hV("div"),g.zi(l,"ytp-ad-player-overlay-top-bar-gradients"),y=l,k=this.Z,k.parentNode&&k.parentNode.insertBefore(y,k),(y=this.api.getVideoData({playerType:2}))&&y.isListed&&y.title&&(k=new Rr5(this.api,this.layoutId,this.interactionLoggingClientData,this.l0),k.Uj(l),k.init(kb("ad-title"),{text:y.title},this.macros),g.x(this,k)),this.V=l);this.N=null;this.rb=this.qd("ytp-ad-player-overlay-skip-or-preview");this.sj=this.qd("ytp-ad-player-overlay-progress-bar");
this.Y=this.qd("ytp-ad-player-overlay-instream-user-sentiment");this.K=this.qd("ytp-ad-player-overlay-ad-disclosure-banner");this.C=r;g.x(this,this.C);this.hide()}init(l,y,k,z){super.init(l,y,k);if(y.skipOrPreviewRenderer){if(l=g.E(y.skipOrPreviewRenderer,LM))k=new QP(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,this.C,this.S),k.Uj(this.rb),k.init(kb("skip-button"),l,this.macros),g.x(this,k);if(l=g.E(y.skipOrPreviewRenderer,LM))var r=l.skipOffsetMilliseconds}y.brandInteractionRenderer&&
(l=y.brandInteractionRenderer.brandInteractionRenderer,k=new vQC(this.api,this.layoutId,this.interactionLoggingClientData,this.l0),k.Uj(this.Y),k.init(kb("instream-user-sentiment"),l,this.macros),g.x(this,k));if(l=g.E(y,dz5))if(k=g.E(l,dz5))l=new Lrg(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,this.C,!!y.showWithoutLinkedMediaLayout),g.x(this,l),l.Uj(this.J),l.init(kb("flyout-cta"),k,this.macros);z=z&&z.videoAdDurationSeconds;y.adBadgeRenderer&&(k=y.adBadgeRenderer,l=g.E(k,GL),
l!=null?(k=new kT(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,!1),g.x(this,k),k.Uj(this.Z),k.init(kb("ad-badge"),l,this.macros),this.N=k.element):(l=k.simpleAdBadgeRenderer,l==null&&(l={text:{text:"QC",isTemplated:!1}}),k=new Bx(this.api,this.layoutId,this.interactionLoggingClientData,this.l0),g.x(this,k),k.Uj(this.Z),k.init(kb("simple-ad-badge"),l,this.macros)));y.adPodIndex&&(l=g.E(y.adPodIndex,CE_),l!=null&&(k=new DU5(this.api,this.layoutId,this.interactionLoggingClientData,
this.l0),g.x(this,k),k.Uj(this.Z),k.init(kb("ad-pod-index"),l)));y.adDurationRemaining&&!y.showWithoutLinkedMediaLayout&&(l=y.adDurationRemaining.adDurationRemainingRenderer,l==null&&(l={templatedCountdown:{templatedAdText:{text:"{FORMATTED_AD_DURATION_REMAINING}",isTemplated:!0}}}),z=new Da(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,this.C,z,!1),g.x(this,z),z.Uj(this.Z),z.init(kb("ad-duration-remaining"),l,this.macros));y.adInfoRenderer&&(z=g.E(y.adInfoRenderer,I5))&&(l=new Z$(this.api,
this.layoutId,this.interactionLoggingClientData,this.l0,this.element,void 0,!1),g.x(this,l),this.N!==null?this.Z.insertBefore(l.element,this.N.nextSibling):l.Uj(this.Z),l.init(kb("ad-info-hover-text-button"),z,this.macros));y.visitAdvertiserRenderer&&(l=g.E(y.visitAdvertiserRenderer,$L))&&(k=I2e(this)&&this.V?this.V:this.Z)&&(z=new HdQ(this.api,this.layoutId,this.interactionLoggingClientData,this.l0),g.x(this,z),z.Uj(k),z.init(kb("visit-advertiser"),l,this.macros),nF(z.element),l=N3(z.element),ot(z.element,
l+" This link opens in new tab"));!(z=this.api.O())||g.ih(z)||g.u9(z)||z.controlsType!="3"&&!z.disableOrganicUi||(r=new d$(this.api,this.C,r,!1),r.Uj(this.sj),g.x(this,r));y.adDisclosureBannerRenderer&&(r=g.E(y.adDisclosureBannerRenderer,cry))&&(y=new lI5(this.api,this.layoutId,this.interactionLoggingClientData,this.l0),y.Uj(this.K),y.init(kb("ad-disclosure-banner"),r),g.x(this,y));this.api.O().X("enable_updated_html5_player_focus_style")&&g.zi(this.element,"ytp-ad-player-overlay-updated-focus-style");
this.show()}clear(){this.hide()}};var yh5=class{flush(l=[],y=!1){if(g.EJ("enable_client_streamz_web"))for(const k of l)l=Yw(k),this.Z&&rZ(l,bDC,2,this.Z),l={serializedIncrementBatch:g.px(l.C())},g.wv("streamzIncremented",l,{sendIsolatedPayload:y})}},Vby=class extends yh5{constructor(){super()}},dqC=class extends yh5{constructor(l){super();var y=new bDC;var k=new CbC;k=GM(k,1,"botguard");l=GM(k,2,l);this.Z=ZO(y,CbC,1,uoe,l)}};var Nf,Oye=new Map;var vm5=class{constructor(l){this.Z=new JB(l)}set(l,y,k){k=k!==void 0?Date.now()+k:void 0;this.Z.set(l,y,k)}get(l){return this.Z.get(l)}remove(l){this.Z.remove(l)}};var J_4=null;var Rw=null,Ds=null,lH=null,EAC=null;g.iQ("yt.www.ads.eventcache.getLastCompanionData",function(){return Rw});
g.iQ("yt.www.ads.eventcache.getLastPlaShelfData",function(){return null});
g.iQ("yt.www.ads.eventcache.getLastUpdateEngagementPanelAction",function(){return Ds});
g.iQ("yt.www.ads.eventcache.getLastChangeEngagementPanelVisibilityAction",function(){return lH});
g.iQ("yt.www.ads.eventcache.getLastScrollToEngagementPanelCommand",function(){return EAC});var S$y=new Map([["dark","USER_INTERFACE_THEME_DARK"],["light","USER_INTERFACE_THEME_LIGHT"]]);var kV=class{constructor(){this.Z={};if(this.C=$9()){const l=g.e_("CONSISTENCY");l&&FLs(this,{encryptedTokenJarContents:l})}}handleResponse(l,y){if(!y)throw Error("request needs to be passed into ConsistencyService");y=y.YO.context?.request?.consistencyTokenJars||[];(l=l.responseContext?.consistencyTokenJar)&&this.replace(y,l)}replace(l,y){for(const k of l)delete this.Z[k.encryptedTokenJarContents];FLs(this,y)}};var kOt=window.location.hostname.split(".").slice(-2).join("."),zX=class{constructor(){this.C=-1;let l=g.Y("LOCATION_PLAYABILITY_TOKEN");g.Y("INNERTUBE_CLIENT_NAME")==="TVHTML5"&&(this.localStorage=yw(this))&&(l=this.localStorage.get("yt-location-playability-token"));l&&(this.locationPlayabilityToken=l,this.Z=void 0)}static getInstance(){zv=g.UT("yt.clientLocationService.instance");zv||(zv=new zX,g.iQ("yt.clientLocationService.instance",zv));return zv}setLocationOnInnerTubeContext(l){l.client||(l.client=
{});if(this.Z)l.client.locationInfo||(l.client.locationInfo={}),l.client.locationInfo.latitudeE7=Math.floor(this.Z.coords.latitude*1E7),l.client.locationInfo.longitudeE7=Math.floor(this.Z.coords.longitude*1E7),l.client.locationInfo.horizontalAccuracyMeters=Math.round(this.Z.coords.accuracy),l.client.locationInfo.forceLocationPlayabilityTokenRefresh=!0;else if(this.N||this.locationPlayabilityToken)l.client.locationPlayabilityToken=this.N||this.locationPlayabilityToken}handleResponse(l){l=l.responseContext?.locationPlayabilityToken;
l!==void 0&&(this.locationPlayabilityToken=l,this.Z=void 0,g.Y("INNERTUBE_CLIENT_NAME")==="TVHTML5"?(this.localStorage=yw(this))&&this.localStorage.set("yt-location-playability-token",l,15552E3):g.ZY("YT_CL",JSON.stringify({loctok:l}),15552E3,kOt,!0))}clearLocationPlayabilityToken(l){l==="TVHTML5"?(this.localStorage=yw(this))&&this.localStorage.remove("yt-location-playability-token"):g.AD("YT_CL");this.N=void 0;this.C!==-1&&(clearTimeout(this.C),this.C=-1)}getCurrentPositionFromGeolocation(){if(!(navigator&&
navigator.geolocation&&navigator.geolocation.getCurrentPosition))return Promise.reject(Error("Geolocation unsupported"));let l=!1,y=1E4;g.Y("INNERTUBE_CLIENT_NAME")==="MWEB"&&(l=!0,y=15E3);return new Promise((k,z)=>{navigator.geolocation.getCurrentPosition(r=>{this.Z=r;k(r)},r=>{z(r)},{enableHighAccuracy:l,
maximumAge:0,timeout:y})})}createUnpluggedLocationInfo(l){const y={};
l=l.coords;l?.latitude&&(y.latitudeE7=Math.floor(l.latitude*1E7));l?.longitude&&(y.longitudeE7=Math.floor(l.longitude*1E7));l?.accuracy&&(y.locationRadiusMeters=Math.round(l.accuracy));return y}createLocationInfo(l){const y={};l=l.coords;l?.latitude&&(y.latitudeE7=Math.floor(l.latitude*1E7));l?.longitude&&(y.longitudeE7=Math.floor(l.longitude*1E7));return y}},zv;var zF5=class{constructor(){this.Z={}}contains(l){return Object.prototype.hasOwnProperty.call(this.Z,l)}get(l){if(this.contains(l))return this.Z[l]}set(l,y){this.Z[l]=y}e8(){return Object.keys(this.Z)}remove(l){delete this.Z[l]}};new class{constructor(){this.mappings=new zF5}get(l){a:{var y=this.mappings.get(l.toString());switch(y.type){case "mapping":l=y.value;break a;case "factory":y=y.value();this.mappings.set(l.toString(),{type:"mapping",value:y});l=y;break a;default:l=Rg(y,void 0)}}return l}registerService(l,y){this.mappings.set(l.toString(),{type:"mapping",value:y});return l}};var B5P={WEB_UNPLUGGED:"^unplugged/",WEB_UNPLUGGED_ONBOARDING:"^unplugged/",WEB_UNPLUGGED_OPS:"^unplugged/",WEB_UNPLUGGED_PUBLIC:"^unplugged/",WEB_CREATOR:"^creator/",WEB_KIDS:"^kids/",WEB_EXPERIMENTS:"^experiments/",WEB_MUSIC:"^music/",WEB_REMIX:"^music/",WEB_MUSIC_EMBEDDED_PLAYER:"^music/",WEB_MUSIC_EMBEDDED_PLAYER:"^main_app/|^sfv/"};var rh_=class{J(l,y={},k=uX){var z={context:g.rl(l.clickTrackingParams,!1,this.V)};var r=this.C(l);if(r){this.Z(z,r,y);r=g.ei(this.N());const Z=g.E(l.commandMetadata,g.uv)?.apiUrl;Z&&(r=Z);r=tD(Qu(r));l={command:l,...(void 0)};z={input:r,Ue:Ow(r),YO:z,config:l};z.config.rJ?z.config.rJ.identity=k:z.config.rJ={identity:k};y.abortSignal&&(z.Ue.signal=y.abortSignal);return z}y=new g.WO("Error: Failed to create Request from Command.",l);g.n(y)}get V(){return!1}},rj=class extends rh_{};var ZIe={GET_DATASYNC_IDS:Zz(class extends rj{J(){return{input:"/getDatasyncIdsEndpoint",Ue:Ow("/getDatasyncIdsEndpoint","GET"),YO:{}}}N(){return[]}C(){}Z(){}})};var rTz=fl("ytcsi_debug_max_size",100);var $iQ={auto_search:"LATENCY_ACTION_AUTO_SEARCH",ad_to_ad:"LATENCY_ACTION_AD_TO_AD",ad_to_video:"LATENCY_ACTION_AD_TO_VIDEO",app_startup:"LATENCY_ACTION_APP_STARTUP",browse:"LATENCY_ACTION_BROWSE",cast_splash:"LATENCY_ACTION_CAST_SPLASH",call_to_cast:"LATENCY_ACTION_CALL_TO_CAST",channel_activity:"LATENCY_ACTION_FAMILY_CENTER_CHANNEL_ACTIVITY",channels:"LATENCY_ACTION_CHANNELS",chips:"LATENCY_ACTION_CHIPS",commerce_transaction:"LATENCY_ACTION_COMMERCE_TRANSACTION",direct_playback:"LATENCY_ACTION_DIRECT_PLAYBACK",
editor:"LATENCY_ACTION_EDITOR",embed:"LATENCY_ACTION_EMBED",embed_no_video:"LATENCY_ACTION_EMBED_NO_VIDEO",entity_key_serialization_perf:"LATENCY_ACTION_ENTITY_KEY_SERIALIZATION_PERF",entity_key_deserialization_perf:"LATENCY_ACTION_ENTITY_KEY_DESERIALIZATION_PERF",explore:"LATENCY_ACTION_EXPLORE",favorites:"LATENCY_ACTION_FAVORITES",home:"LATENCY_ACTION_HOME",inboarding:"LATENCY_ACTION_INBOARDING",landing:"LATENCY_ACTION_LANDING",learning:"LATENCY_ACTION_LEARNING",learning_journey_browse:"LATENCY_ACTION_LEARNING_JOURNEY_BROWSE",
learning_journey_watch:"LATENCY_ACTION_LEARNING_JOURNEY_WATCH",library:"LATENCY_ACTION_LIBRARY",live:"LATENCY_ACTION_LIVE",live_pagination:"LATENCY_ACTION_LIVE_PAGINATION",management:"LATENCY_ACTION_MANAGEMENT",mini_app:"LATENCY_ACTION_MINI_APP_PLAY",notification_settings:"LATENCY_ACTION_FAMILY_CENTER_NOTIFICATION_SETTINGS",onboarding:"LATENCY_ACTION_ONBOARDING",parent_profile_settings:"LATENCY_ACTION_KIDS_PARENT_PROFILE_SETTINGS",parent_tools_collection:"LATENCY_ACTION_PARENT_TOOLS_COLLECTION",parent_tools_dashboard:"LATENCY_ACTION_PARENT_TOOLS_DASHBOARD",
player_att:"LATENCY_ACTION_PLAYER_ATTESTATION",prebuffer:"LATENCY_ACTION_PREBUFFER",prefetch:"LATENCY_ACTION_PREFETCH",profile_settings:"LATENCY_ACTION_KIDS_PROFILE_SETTINGS",profile_switcher:"LATENCY_ACTION_LOGIN",projects:"LATENCY_ACTION_PROJECTS",reel_watch:"LATENCY_ACTION_REEL_WATCH",results:"LATENCY_ACTION_RESULTS",red:"LATENCY_ACTION_PREMIUM_PAGE_GET_BROWSE",premium:"LATENCY_ACTION_PREMIUM_PAGE_GET_BROWSE",privacy_policy:"LATENCY_ACTION_FAMILY_CENTER_PRIVACY_POLICY",review:"LATENCY_ACTION_REVIEW",
search_overview_answer:"LATENCY_ACTION_SEARCH_OVERVIEW_ANSWER",search_ui:"LATENCY_ACTION_SEARCH_UI",search_suggest:"LATENCY_ACTION_SUGGEST",search_zero_state:"LATENCY_ACTION_SEARCH_ZERO_STATE",secret_code:"LATENCY_ACTION_KIDS_SECRET_CODE",switchplan:"LATENCY_ACTION_UNPLUGGED_SWITCH_PLAN",seek:"LATENCY_ACTION_PLAYER_SEEK",settings:"LATENCY_ACTION_SETTINGS",store:"LATENCY_ACTION_STORE",supervision_dashboard:"LATENCY_ACTION_FAMILY_CENTER_SUPERVISION_DASHBOARD",bedtime_reminder_settings:"LATENCY_ACTION_FAMILY_CENTER_BEDTIME_REMINDER_SETTINGS",
break_reminder_settings:"LATENCY_ACTION_FAMILY_CENTER_BREAK_REMINDER_SETTINGS",supervision_settings_dashboard:"LATENCY_ACTION_FAMILY_CENTER_SUPERVISION_SETTINGS_DASHBOARD",time_management:"LATENCY_ACTION_FAMILY_CENTER_TIME_MANAGEMENT",update_profile:"LATENCY_ACTION_FAMILY_CENTER_UPDATE_PROFILE",viewing_permissions:"LATENCY_ACTION_FAMILY_CENTER_VIEWING_PERMISSIONS",shorts_settings:"LATENCY_ACTION_FAMILY_CENTER_SHORTS_SETTINGS",privacy_settings:"LATENCY_ACTION_FAMILY_CENTER_PRIVACY_SETTINGS",tenx:"LATENCY_ACTION_TENX",
video_preview:"LATENCY_ACTION_VIDEO_PREVIEW",video_to_ad:"LATENCY_ACTION_VIDEO_TO_AD",watch:"LATENCY_ACTION_WATCH",watch_it_again:"LATENCY_ACTION_KIDS_WATCH_IT_AGAIN","watch,watch7":"LATENCY_ACTION_WATCH","watch,watch7_html5":"LATENCY_ACTION_WATCH","watch,watch7ad":"LATENCY_ACTION_WATCH","watch,watch7ad_html5":"LATENCY_ACTION_WATCH",wn_comments:"LATENCY_ACTION_LOAD_COMMENTS",ww_rqs:"LATENCY_ACTION_WHO_IS_WATCHING",voice_assistant:"LATENCY_ACTION_VOICE_ASSISTANT",cast_load_by_entity_to_watch:"LATENCY_ACTION_CAST_LOAD_BY_ENTITY_TO_WATCH",
networkless_performance:"LATENCY_ACTION_NETWORKLESS_PERFORMANCE",gel_compression:"LATENCY_ACTION_GEL_COMPRESSION",gel_jspb_serialize:"LATENCY_ACTION_GEL_JSPB_SERIALIZE",attestation_challenge_fetch:"LATENCY_ACTION_ATTESTATION_CHALLENGE_FETCH"};
Object.assign($iQ,{"analytics.explore":"LATENCY_ACTION_CREATOR_ANALYTICS_EXPLORE","artist.analytics":"LATENCY_ACTION_CREATOR_ARTIST_ANALYTICS","artist.events":"LATENCY_ACTION_CREATOR_ARTIST_CONCERTS","artist.presskit":"LATENCY_ACTION_CREATOR_ARTIST_PROFILE","asset.claimed_videos":"LATENCY_ACTION_CREATOR_CMS_ASSET_CLAIMED_VIDEOS","asset.composition":"LATENCY_ACTION_CREATOR_CMS_ASSET_COMPOSITION","asset.composition_ownership":"LATENCY_ACTION_CREATOR_CMS_ASSET_COMPOSITION_OWNERSHIP","asset.composition_policy":"LATENCY_ACTION_CREATOR_CMS_ASSET_COMPOSITION_POLICY",
"asset.embeds":"LATENCY_ACTION_CREATOR_CMS_ASSET_EMBEDS","asset.history":"LATENCY_ACTION_CREATOR_CMS_ASSET_HISTORY","asset.issues":"LATENCY_ACTION_CREATOR_CMS_ASSET_ISSUES","asset.licenses":"LATENCY_ACTION_CREATOR_CMS_ASSET_LICENSES","asset.metadata":"LATENCY_ACTION_CREATOR_CMS_ASSET_METADATA","asset.ownership":"LATENCY_ACTION_CREATOR_CMS_ASSET_OWNERSHIP","asset.potential_embeds":"LATENCY_ACTION_CREATOR_CMS_ASSET_POTENTIAL_EMBEDS","asset.policy":"LATENCY_ACTION_CREATOR_CMS_ASSET_POLICY","asset.references":"LATENCY_ACTION_CREATOR_CMS_ASSET_REFERENCES",
"asset.shares":"LATENCY_ACTION_CREATOR_CMS_ASSET_SHARES","asset.sound_recordings":"LATENCY_ACTION_CREATOR_CMS_ASSET_SOUND_RECORDINGS","asset_group.assets":"LATENCY_ACTION_CREATOR_CMS_ASSET_GROUP_ASSETS","asset_group.campaigns":"LATENCY_ACTION_CREATOR_CMS_ASSET_GROUP_CAMPAIGNS","asset_group.claimed_videos":"LATENCY_ACTION_CREATOR_CMS_ASSET_GROUP_CLAIMED_VIDEOS","asset_group.metadata":"LATENCY_ACTION_CREATOR_CMS_ASSET_GROUP_METADATA","song.analytics":"LATENCY_ACTION_CREATOR_SONG_ANALYTICS",creator_channel_dashboard:"LATENCY_ACTION_CREATOR_CHANNEL_DASHBOARD",
"channel.analytics":"LATENCY_ACTION_CREATOR_CHANNEL_ANALYTICS","channel.comments":"LATENCY_ACTION_CREATOR_CHANNEL_COMMENTS","channel.content":"LATENCY_ACTION_CREATOR_CONTENT","channel.content.posts":"LATENCY_ACTION_CREATOR_POST_LIST","channel.content.promotions":"LATENCY_ACTION_CREATOR_PROMOTION_LIST","channel.copyright":"LATENCY_ACTION_CREATOR_CHANNEL_COPYRIGHT","channel.editing":"LATENCY_ACTION_CREATOR_CHANNEL_EDITING","channel.monetization":"LATENCY_ACTION_CREATOR_CHANNEL_MONETIZATION","channel.music":"LATENCY_ACTION_CREATOR_CHANNEL_MUSIC",
"channel.music_storefront":"LATENCY_ACTION_CREATOR_CHANNEL_MUSIC_STOREFRONT","channel.playlists":"LATENCY_ACTION_CREATOR_CHANNEL_PLAYLISTS","channel.translations":"LATENCY_ACTION_CREATOR_CHANNEL_TRANSLATIONS","channel.videos":"LATENCY_ACTION_CREATOR_CHANNEL_VIDEOS","channel.live_streaming":"LATENCY_ACTION_CREATOR_LIVE_STREAMING","dialog.copyright_strikes":"LATENCY_ACTION_CREATOR_DIALOG_COPYRIGHT_STRIKES","dialog.video_copyright":"LATENCY_ACTION_CREATOR_DIALOG_VIDEO_COPYRIGHT","dialog.uploads":"LATENCY_ACTION_CREATOR_DIALOG_UPLOADS",
owner:"LATENCY_ACTION_CREATOR_CMS_DASHBOARD","owner.allowlist":"LATENCY_ACTION_CREATOR_CMS_ALLOWLIST","owner.analytics":"LATENCY_ACTION_CREATOR_CMS_ANALYTICS","owner.art_tracks":"LATENCY_ACTION_CREATOR_CMS_ART_TRACKS","owner.assets":"LATENCY_ACTION_CREATOR_CMS_ASSETS","owner.asset_groups":"LATENCY_ACTION_CREATOR_CMS_ASSET_GROUPS","owner.bulk":"LATENCY_ACTION_CREATOR_CMS_BULK_HISTORY","owner.campaigns":"LATENCY_ACTION_CREATOR_CMS_CAMPAIGNS","owner.channel_invites":"LATENCY_ACTION_CREATOR_CMS_CHANNEL_INVITES",
"owner.channels":"LATENCY_ACTION_CREATOR_CMS_CHANNELS","owner.claimed_videos":"LATENCY_ACTION_CREATOR_CMS_CLAIMED_VIDEOS","owner.claims":"LATENCY_ACTION_CREATOR_CMS_MANUAL_CLAIMING","owner.claims.manual":"LATENCY_ACTION_CREATOR_CMS_MANUAL_CLAIMING","owner.delivery":"LATENCY_ACTION_CREATOR_CMS_CONTENT_DELIVERY","owner.delivery_templates":"LATENCY_ACTION_CREATOR_CMS_DELIVERY_TEMPLATES","owner.issues":"LATENCY_ACTION_CREATOR_CMS_ISSUES","owner.licenses":"LATENCY_ACTION_CREATOR_CMS_LICENSES","owner.pitch_music":"LATENCY_ACTION_CREATOR_CMS_PITCH_MUSIC",
"owner.policies":"LATENCY_ACTION_CREATOR_CMS_POLICIES","owner.releases":"LATENCY_ACTION_CREATOR_CMS_RELEASES","owner.reports":"LATENCY_ACTION_CREATOR_CMS_REPORTS","owner.videos":"LATENCY_ACTION_CREATOR_CMS_VIDEOS","playlist.videos":"LATENCY_ACTION_CREATOR_PLAYLIST_VIDEO_LIST","post.comments":"LATENCY_ACTION_CREATOR_POST_COMMENTS","post.edit":"LATENCY_ACTION_CREATOR_POST_EDIT","promotion.edit":"LATENCY_ACTION_CREATOR_PROMOTION_EDIT","video.analytics":"LATENCY_ACTION_CREATOR_VIDEO_ANALYTICS","video.claims":"LATENCY_ACTION_CREATOR_VIDEO_CLAIMS",
"video.comments":"LATENCY_ACTION_CREATOR_VIDEO_COMMENTS","video.copyright":"LATENCY_ACTION_CREATOR_VIDEO_COPYRIGHT","video.edit":"LATENCY_ACTION_CREATOR_VIDEO_EDIT","video.editor":"LATENCY_ACTION_CREATOR_VIDEO_EDITOR","video.editor_async":"LATENCY_ACTION_CREATOR_VIDEO_EDITOR_ASYNC","video.live_settings":"LATENCY_ACTION_CREATOR_VIDEO_LIVE_SETTINGS","video.live_streaming":"LATENCY_ACTION_CREATOR_VIDEO_LIVE_STREAMING","video.monetization":"LATENCY_ACTION_CREATOR_VIDEO_MONETIZATION","video.policy":"LATENCY_ACTION_CREATOR_VIDEO_POLICY",
"video.rights_management":"LATENCY_ACTION_CREATOR_VIDEO_RIGHTS_MANAGEMENT","video.translations":"LATENCY_ACTION_CREATOR_VIDEO_TRANSLATIONS"});var Wg4=class extends xO{constructor(l,y){super(arguments);this.timer=y}},qQz=new m9("aft-recorded",Wg4);var OB_=g.aC.ytLoggingGelSequenceIdObj_||{};g.iQ("ytLoggingGelSequenceIdObj_",OB_);var iH=g.aC.ytLoggingLatencyUsageStats_||{};g.iQ("ytLoggingLatencyUsageStats_",iH);
var GX=class{constructor(){this.Z=0}tick(l,y,k,z){Uo(this,`tick_${l}_${y}`)||g.wv("latencyActionTicked",{tickName:l,clientActionNonce:y},{timestamp:k,cttAuthInfo:z})}info(l,y,k){const z=Object.keys(l).join("");Uo(this,`info_${z}_${y}`)||(l=Object.assign({},l),l.clientActionNonce=y,g.wv("latencyActionInfo",l,{cttAuthInfo:k}))}jspbInfo(l,y,k){let z="";for(let r=0;r<d0(l).length;r++)d0(l)[r]!==void 0&&(z=r===0?z.concat(`${r}`):z.concat(`_${r}`));Uo(this,`info_${z}_${y}`)||(GM(l,2,y),y={cttAuthInfo:k},
k=g.EJ("jspb_sparse_encoded_pivot")?new Ai([{}]):new Ai,ZO(k,AXQ,7,$cQ,l),wQq(k,y))}span(l,y,k){const z=Object.keys(l).join("");Uo(this,`span_${z}_${y}`)||(l.clientActionNonce=y,g.wv("latencyActionSpan",l,{cttAuthInfo:k}))}};var Z6=window,eFs=class{constructor(){this.timing={};this.clearResourceTimings=()=>{};
this.webkitClearResourceTimings=()=>{};
this.mozClearResourceTimings=()=>{};
this.msClearResourceTimings=()=>{};
this.oClearResourceTimings=()=>{}}},M5=Z6.performance||Z6.mozPerformance||Z6.msPerformance||Z6.webkitPerformance||new eFs;var mig=!1,iBP=!1,Vw={'script[name="scheduler/scheduler"]':"sj",'script[name="player/base"]':"pj",'link[rel="preload"][name="player/embed"]':"pej",'link[rel="stylesheet"][name="www-player"]':"pc",'link[rel="stylesheet"][name="player/www-player"]':"pc",'script[name="desktop_polymer/desktop_polymer"]':"dpj",'link[rel="import"][name="desktop_polymer"]':"dph",'script[name="mobile-c3"]':"mcj",'link[rel="stylesheet"][name="mobile-c3"]':"mcc",'script[name="player-plasma-ias-phone/base"]':"mcppj",'script[name="player-plasma-ias-tablet/base"]':"mcptj",
'link[rel="stylesheet"][name="mobile-polymer-player-ias"]':"mcpc",'link[rel="stylesheet"][name="mobile-polymer-player-svg-ias"]':"mcpsc",'script[name="mobile_blazer_core_mod"]':"mbcj",'link[rel="stylesheet"][name="mobile_blazer_css"]':"mbc",'script[name="mobile_blazer_logged_in_users_mod"]':"mbliuj",'script[name="mobile_blazer_logged_out_users_mod"]':"mblouj",'script[name="mobile_blazer_noncore_mod"]':"mbnj","#player_css":"mbpc",'script[name="mobile_blazer_desktopplayer_mod"]':"mbpj",'link[rel="stylesheet"][name="mobile_blazer_tablet_css"]':"mbtc",
'script[name="mobile_blazer_watch_mod"]':"mbwj",'script[name="embed_client"]':"ecj",'link[rel="stylesheet"][name="embed-ui"]':"ecc"},T2q=(0,g.We)(M5.clearResourceTimings||M5.webkitClearResourceTimings||M5.mozClearResourceTimings||M5.msClearResourceTimings||M5.oClearResourceTimings||g.Vq,M5);var eF=window;eF.ytcsi&&(eF.ytcsi.infoGel=g.YV,eF.ytcsi.tick=Jt);var HBT="tokens consistency service_params mss client_location entities adblock_detection response_received_commands store manifest player_preload shorts_prefetch".split(" "),vw_=["type.googleapis.com/youtube.api.pfiinnertube.YoutubeApiInnertube.BrowseResponse","type.googleapis.com/youtube.api.pfiinnertube.YoutubeApiInnertube.PlayerResponse","type.googleapis.com/youtube.api.pfiinnertube.YoutubeApiInnertube.PanelResponse"],f4=class{constructor(l,y,k,z,r){this.V=l;this.rT=y;this.Z=k;this.J=z;this.N=
r;this.C=new Map;l.QF||(l.QF={});l.QF={...ZIe,...l.QF}}MP(l){return LL4(l,this.V)}};var aLP=new Yr("INNERTUBE_TRANSPORT_TOKEN");var wdg=class extends rj{N(){return CZy}get V(){return!0}C(l){return g.E(l,St_)||void 0}Z(l,y,k={}){y.channelIds&&(l.channelIds=y.channelIds);y.siloName&&(l.siloName=y.siloName);y.params&&(l.params=y.params);k.botguardResponse&&(l.botguardResponse=k.botguardResponse);k.feature&&(l.clientFeature=k.feature)}};var hUt=class extends rj{N(){return bdz}get V(){return!0}C(l){return g.E(l,fiQ)||void 0}Z(l,y){y.channelIds&&(l.channelIds=y.channelIds);y.siloName&&(l.siloName=y.siloName);y.params&&(l.params=y.params)}};var d05=class extends rj{constructor(l){super();this.S=l}N(){return idC}C(l){return g.E(l,UET)||g.E(l,MZg)||g.E(l,ise)}Z(l,y){y.serializedShareEntity&&(l.serializedSharedEntity=y.serializedShareEntity);y.clientParamIdentifier&&this.S?.Z(y.clientParamIdentifier)&&(l.clientParams=this.S.C(y.clientParamIdentifier))}};d05[UY]=[new Yr("SHARE_CLIENT_PARAMS_PROVIDER_TOKEN")];var Q4q=class extends rj{N(){return MIQ}get V(){return!0}C(l){return g.E(l,xr)||void 0}Z(l,y,k){l.feedbackTokens=[];y.feedbackToken&&l.feedbackTokens.push(y.feedbackToken);if(y=y.cpn||k.cpn)l.feedbackContext={cpn:y};l.isFeedbackTokenUnencrypted=!!k.is_feedback_token_unencrypted;l.shouldMerge=!1;k.extra_feedback_tokens&&(l.shouldMerge=!0,l.feedbackTokens=l.feedbackTokens.concat(k.extra_feedback_tokens))}};var tK_=class extends rj{N(){return XXy}C(l){return g.E(l,Ez5)||void 0}Z(l,y){y.params&&(l.params=y.params);y.secondaryParams&&(l.secondaryParams=y.secondaryParams)}};var O6Q=class extends rj{N(){return cbe}C(l){return g.E(l,Ytq)||void 0}Z(l,y){y.actions&&(l.actions=y.actions);y.params&&(l.params=y.params);y.playlistId&&(l.playlistId=y.playlistId)}};var Gq_=class extends rj{N(){return UU5}C(l){return g.E(l,XT4)}Z(l,y,k={}){y.serializedShareEntity&&(l.serializedSharedEntity=y.serializedShareEntity);k.includeListId&&(l.includeListId=!0)}};var Dz=new Yr("CLIENT_NAME_TOKEN");var ll=new Yr("DEFAULT_STORE_EXPIRATION_TOKEN");var Ahz=class{constructor(l,y){this.clientName=l;this.C=y}async put(l,y){y={...y.data};y.key=l;y.clientName=this.clientName;y.expireTimestampMs===void 0&&(y.expireTimestampMs=(Math.round((0,g.f)())+this.C).toString());return Rty(this,l,y)}};Ahz[UY]=[Dz,ll];var DiQ=class{constructor(l){this.data={...l};delete this.data.innertubeResponse?.frameworkUpdates}isExpired(){return Number(this.data.expireTimestampMs||0)<(0,g.f)()}isProcessed(){return!!this.data.isProcessed}};var AMQ=class extends Ahz{constructor(){super(...arguments);this.Z=new Map}async get(l){return lLy(this,l)}async remove(l){yMP(this,l)}async removeAll(){this.Z.forEach(l=>{clearTimeout(l.timer)});
this.Z.clear()}has(l){return!!this.Z.get(l)}e8(){return this.Z.keys()}};var yo=new Yr("EPHEMERAL_STORE_TOKEN");var kq_=class{constructor(l){this.Z=l.responseContext?.stateTags}};var $05=class{constructor(l){this.Z=l}handleResponse(l,y){if(!y)throw Error("request needs to be passed into StoreResponseProcessorService");n4(this,l,y.config?.rX?.gt)}};$05[UY]=[yo];var kW=new Yr("STORE_RESPONSE_PROCESSOR_TOKEN");g.FJ=class extends g.WO{constructor(l,...y){super(l,y);this.errorType=1;Object.setPrototypeOf(this,new.target.prototype)}};var eUs=class{constructor(l){this.Z=l}async fetch(l,y,k,z){l=zUy(this,l,y);try{const r=await fetch(l);if(g.EJ("web_unified_fetch")&&z&&r.ok&&r.body&&typeof r.body.getReader==="function"){const Z=r.clone().body.getReader(),{value:e}=await Z.read();Z.cancel().catch(()=>{});
if(e&&e[0]===91){const A=r.body.pipeThrough(new TextDecoderStream).getReader();return rMg(this,A,new id,[],z)}}return await this.handleResponse(r,k)}catch(r){if(g.WH(r),k?.PB&&r instanceof g.FJ&&r.errorType===1)throw r;}}handleResponse(l,y){let k;k=l.text().then(z=>{if(y?.Aq&&l.ok)return $q(y.Aq,z);z=z.replace(")]}'","");let r;if(y?.PB&&z)try{r=JSON.parse(z)}catch(Z){throw new g.FJ("JSON parsing failed after fetch");}return r??JSON.parse(z)});
l.redirected||l.ok?this.Z&&this.Z.success():(this.Z&&this.Z.Eda(),k=k.then(z=>{g.WH(new g.WO("Error: API fetch failed",l.status,l.url,z));return{...z,errorMetadata:{status:l.status}}}));
return k}};eUs[UY]=[aW(new Yr("NETWORK_SLI_TOKEN"))];var Z6z=new Yr("NETWORK_MANAGER_TOKEN");var oI;var U0e=class{constructor(l){this.Z=l}bindInnertubeChallengeFetcher(l){this.Z.bicf(l)}registerChallengeFetchedCallback(l){this.Z.bcr(l)}getLatestChallengeResponse(){return this.Z.blc()}};var cMg=[],Xd4=(0,g.vZ)`https://static.doubleclick.net/instream/ad_status.js`,A0=!1;var wR=class{constructor(l,y,k){this.network=l;this.options=y;this.V=k;this.N=0;this.Z=null;this.C=new yc4;y.D2?Qo(this,b6e(this)):y.preload&&Qo(this,new Promise(z=>{g.cs(0,()=>{z(dR(this))},0)}))}async S(){return!!await Promise.race([this.Z,
null])}async J(l,y,k){this.Z===null&&Qo(this,dR(this));let z=!1;const r={};return Promise.race([(async()=>{this.options.Uxj&&this.options.D2&&await (await i6y())?.checkForRefresh();var Z=await this.Z;r.challenge=Z.challenge;if(Z.qK){var e={c:Z.challenge,e:l,...y};try{z=!0;let A;(A=await Z.qK.snapshot({cj:e}))?r.webResponse=A:r.error="ATTESTATION_ERROR_VM_NO_RESPONSE"}catch{r.error="ATTESTATION_ERROR_VM_INTERNAL_ERROR"}}else"c1a"in Z.ys&&(r.error="ATTESTATION_ERROR_VM_NOT_INITIALIZED");l==="ENGAGEMENT_TYPE_PLAYBACK"&&
(Z=Z.ys,e={},Z.c6a&&(e.reportingStatus=String(Number(Z.c)^$W())),Z.c6b&&(e.broadSpectrumDetectionResult=String(Number(Z.c)^Number(g.Y("CATSTAT",0)))),r.adblockReporting=e);return r})(),
ILt(k,()=>{const Z=Object.assign({},r);z&&(Z.error="ATTESTATION_ERROR_VM_TIMEOUT");return Z})])}};var Yiz=["APP_STATE","PI"];var U9P=[3611,27686,221058,85013,23462,241187,157557,42016,26926,51236,79148,50160,77504,310281,153587,87907,18630,177018,177023,54445,80935,152172,184553,105675,150723,37521,147285,47786,231255,231254,231258,231259,98349,237299,168271,168954,168277,168273,168270,123695,272018,226987,226990,226988,6827,29434,255010,171388,244189,236208,7282,124448,299903,299897,299904,299901,299899,299902,299900,299898,196088,250897,198104,32276,195115,195114,76278,200635,230594,147868,147869,276243,93911,274188,
276651,106531,257234,252598,252597,252600,252599,252596,225031,177843,27259,27262,27263,21759,283670,160866,204249,222900,204250,180626,177959,177957,180628,205716,197878,273766,171243,160789,171244,171241,171245,171242,225560,180627,177960,231589,177958,180629,205717,197879,177565,212573,210709,230684,229801,230685,197337,209010,197336,197338,198618,300884,175492,198052,198051,197852,197976,175493,175494,175495,189254,175496,175497,38408,175498,175503,175504,175505,175506,175507,175508,80637,68727,
206933,207944,206934,303123,206929,221575,68728,221576,80353,80356,308033,249107,180635,74610,45707,83962,83970,46713,166591,89711,74612,213809,179607,245006,155792,93265,74611,131380,128979,139311,128978,131391,105350,139312,134800,131392,113533,229298,93252,99357,94521,114252,113532,94522,94583,202371,88E3,139580,93253,93254,94387,94388,93255,97424,72502,219868,212991,110111,76019,117092,117093,89431,191831,110466,231346,77240,60508,186091,148123,148124,137401,137402,137046,73393,246776,113534,
276200,92098,131381,84517,83759,309580,230676,249183,230679,230678,230677,230681,230680,162711,235234,162712,80357,243315,86113,72598,168413,72733,107349,124275,118203,200410,133275,160157,152569,156651,133274,160159,160158,133272,133273,133276,144507,143247,175994,156652,143248,143249,143250,143251,189892,189894,189893,156653,214236,144401,117431,133797,225137,273905,222612,222613,153964,201133,201134,201135,201136,201137,128572,200411,200412,190337,133405,117429,117430,177950,174734,177951,201138,
201139,201140,201141,201142,117432,173996,173995,174953,173994,173997,120080,117259,178546,297752,197891,156655,156654,121692,211414,211411,211412,211413,211403,184846,185993,145656,156656,145655,145653,145654,145657,132972,133051,133658,132971,97615,181262,190762,250344,254027,143359,143356,143361,143358,143360,143357,142303,143353,282159,172859,143354,144479,143355,31402,181590,133624,146477,133623,133622,133621,192418,84774,304776,197993,241460,160801,197995,95117,172721,150497,98930,98931,98932,
153320,153321,43347,305268,249295,210016,210017,262686,211851,211852,307219,211853,129889,197888,197889,149123,221959,221627,221958,45474,100352,98443,117985,74613,155911,74614,64502,136032,74615,74616,122224,74617,77820,74618,262988,262989,226981,93278,93274,93275,93276,200688,200686,200687,199841,22110,29433,133798,132295,281332,120541,222112,82047,113550,75836,75837,303882,192409,203221,42352,84512,76065,75989,205911,205912,252649,205913,252650,252651,51879,16623,32594,27240,293324,32633,74858,
304150,297045,275198,271884,222932,279119,271886,213915,275199,225216,251244,258251,218674,251266,258250,251265,301662,251245,271885,156999,3945,16989,45520,25488,25492,25494,232113,55760,14057,18451,57204,57203,17897,18198,17898,17909,43980,221053,195529,189660,308088,306448,306447,308087,308086,46220,11721,147994,49954,96369,3854,217640,151633,56251,205192,216797,159108,181568,234789,25624,152036,16906,99999,68172,47973,72773,26970,26971,96805,17752,282181,278926,73233,205923,109512,22256,14115,
22696,234409,234408,89278,89277,195745,109513,43278,43459,43464,89279,43717,55764,22255,147912,89281,40963,43277,43442,91824,283898,120137,186350,186351,256690,264349,264351,264350,264352,211026,250896,96367,36850,72694,37414,36851,124863,121343,73491,54473,166861,43375,46674,302631,242528,143815,139095,144402,149968,149969,32473,72901,72906,50612,50613,50942,84938,84943,84939,84941,84944,84940,84942,35585,51926,79983,18921,57893,41182,135732,33424,22207,36229,22206,22205,44763,33427,67793,22182,
37091,34650,50617,22287,25144,97917,220122,62397,150871,150874,125598,137935,36961,108035,27426,27857,27846,27854,69692,61411,39299,38696,62520,36382,108701,192682,279531,50663,36387,14908,37533,105443,61635,62274,161670,133818,182119,65702,65703,65701,76256,298157,263843,196075,194768,252201,194769,191885,281480,233634,265810,194770,296933,195350,301607,195349,194771,293041,293042,293043,301116,166382,37671,49953,220669,249229,213774,204572,191389,253830,253831,253832,272252,253833,253834,204574,
191390,179556,238596,212661,191392,197826,191393,204573,36216,28237,241212,272049,173718,39553,192547,29222,304845,26107,241211,38050,26108,275810,120745,26109,26110,66881,28236,14586,297672,160598,57929,226736,74723,44098,173689,44099,23528,61699,134104,134103,198313,59149,181013,278306,282472,277848,173191,173192,173193,101951,171502,196043,198305,97346,118051,95102,64882,119505,63595,294119,257268,63349,281127,240553,95101,75240,27039,68823,21537,83464,75707,252904,170215,223033,83113,101952,101953,
79610,125755,24402,24400,32925,193406,57173,183351,156421,122502,145268,138480,64423,64424,33986,100828,129089,299541,21409,282218,299506,299540,299507,299509,299539,299508,299510,185612,222825,245366,135155,135156,135157,135158,158225,135159,135160,167651,135161,135162,135163,158226,158227,135164,135165,135166,11070,11074,17880,270560,30709,30707,30711,30710,30708,185213,185273,146143,63648,63649,221056,264490,211189,111059,211188,5754,264491,20445,233471,151308,151152,228067,130975,130976,247244,
271622,271813,261210,210815,295069,246127,245256,244950,191925,167637,234545,197196,302735,214295,110386,221054,273960,282111,113746,268886,66557,183215,17310,28631,201935,21589,242036,238351,164817,168011,154946,68012,162617,60480,184431,138664,294089,249827,194E3,141121,164502,31571,195002,206793,141978,233985,250895,254052,254053,254054,254051,254050,254055,150105,304169,150106,150107,150108,76980,41577,45469,38669,13768,13777,141842,62985,213190,4724,223052,59369,43927,43928,12924,197853,100355,
56219,27669,209928,10337,203648,203649,47896,122629,186204,222824,275869,271673,274637,139723,139722,121258,253789,253787,253786,253788,253790,107598,127991,96639,107536,130169,216522,296316,96661,145188,213904,269342,96658,116646,159428,168611,168612,121122,219862,96660,282208,127738,127083,155281,162959,220886,227356,248007,163566,307646,186641,147842,273646,273647,217932,104443,96659,147595,106442,247162,231493,213427,296813,246575,182423,162776,228908,134840,63667,63668,63669,130686,248381,147036,
239094,262743,189810,239095,78314,147799,305919,305924,237146,174049,148649,55761,127098,134841,96368,67374,48992,146176,176105,233035,49956,267645,275782,190190,225739,31961,26388,23811,5E4,126250,96370,210549,47355,47356,37935,45521,21760,83769,49977,49974,93497,93498,34325,140759,115803,123707,100081,35309,237706,68314,25602,100339,170873,143516,299247,178921,268574,254884,258232,59018,18248,50625,9729,37168,37169,21667,16749,18635,39305,18046,221057,301897,301900,269990,53969,8213,93926,221055,
210542,212552,102852,110099,22678,69076,137575,139224,100856,235770,154430,235861,209757,17736,3832,147111,55759,64031,234746,93044,93045,281302,170701,170702,194796,34388,167841,170419,17657,17655,39579,39578,170412,77448,8196,11357,69877,8197,168501,156512,161613,156509,208274,161612,161614,267692,267851,267577,279755,267693,267694,267578,262801,271218,266131,266132,267977,267579,262800,262799,262802,267580,262798,267695,267581,273232,82039];var Qc5=class{constructor(){var l=$T5;const y=Lu(lr4());this.store=HR(l,void 0,y)}getState(){return this.store.getState()}dispatch(l){return this.store.dispatch(l)}subscribe(l){return this.store.subscribe(l)}replaceReducer(l){return this.store.replaceReducer(l)}[Symbol.observable](){return this.store[Symbol.observable]()}};var IG=class{constructor(l=[]){this.Z=[];this.N=this.C=0;this.V=void 0;this.totalLength=0;l.forEach(y=>{this.append(y)})}J(){return this.totalLength}append(l){if(KOe(this,l)){const y=this.Z[this.Z.length-1];
this.Z[this.Z.length-1]=new Uint8Array(y.buffer,y.byteOffset,y.length+l.length);GJ(this)}else this.Z.push(l);this.totalLength+=l.length}split(l){const y=new IG,k=new IG;for(const z of this.Z)l>=z.length?(y.append(z),l-=z.length):l?(y.append(new Uint8Array(z.buffer,z.byteOffset,l)),k.append(new Uint8Array(z.buffer,z.byteOffset+l,z.length-l)),l=0):k.append(z);return{Wm:y,iG:k}}isFocused(l){return l>=this.N&&l<this.N+this.Z[this.C].length}focus(l){if(!this.isFocused(l)){for(l<this.N&&GJ(this);this.N+
this.Z[this.C].length<=l&&this.C<this.Z.length;)this.N+=this.Z[this.C].length,this.C+=1;this.V=void 0}}};var ul,CG,m1;g.aZ=(()=>{const l=z=>new Uint8Array(z),y=z=>{const r=new Uint8Array(z.length);
for(let Z=0;Z<z.length;Z++)r[Z]=z[Z];return r},k=new Uint8Array([1]);
return k.length===1&&k[0]===1?l:y})();
ul=Array(1024);CG=window.TextDecoder?new TextDecoder:void 0;m1=window.TextEncoder?new TextEncoder:void 0;var TJ=class{constructor(l){this.Z=l;this.pos=0;this.C=-1}};var ncz=class{constructor(l=4096){this.pos=0;this.C=[];this.Z=Siy(l);this.view=new DataView(this.Z.buffer,this.Z.byteOffset,this.Z.byteLength)}};var s4C={animationEntity:302,accountLinkStatusEntity:122,booleanEntity:307,buttonEntity:358,captionTrack:225,channelHandle:275,chipEntity:498,commerceAcquisitionClientPayloadEntity:276,commerceCartListEntity:236,compositeSourceEntity:594,contextNoteFeedEntityPayload:483,contextNoteUserRatingEntityPayload:576,continuationTokenEntity:406,downloadQualityPickerEntity:202,downloadsPageRefreshTokenEntity:299,downloadsPageViewConfigurationEntity:264,downloadStatusEntity:141,dismissState:540,sfvAudioItemCurrentlyPlayingEntity:186,
emojiFountainDataEntity:393,emojiCustomizationSetEntity:496,fakeChannel:2,fakePlaylist:279,fakePlaylistEntryCollection:280,fakeVideo:182,fakeVideoDescription:278,featuredProductsEntity:392,flowStateEntity:252,iconBadgeEntity:229,interstitialInteractionStateEntity:443,likeButtonAnimationEntity:567,liveChatPollStateEntity:217,liveViewerLeaderboardChatEntryPointStateEntity:563,liveViewerLeaderboardPointsEntity:564,liveReactionsDataEntity:503,logoEntity:245,macroMarkerEntity:329,mainDownloadsLibraryEntity:158,
mainDownloadsListEntity:164,mainPlaylistDownloadStateEntity:373,mainPlaylistEntity:306,mainPlaylistVideoEntity:368,mainVideoDownloadStateEntity:262,mainVideoEntity:261,markersEngagementPanelSyncEntity:196,markersVisibilityOverrideEntity:312,musicAlbumReleaseDetail:18,musicAlbumReleaseDownloadMetadataEntity:259,musicAlbumRelease:17,musicAlbumReleaseUserDetail:19,musicArtistDetail:21,musicArtist:20,musicArtistUserDetail:22,musicDownloadsLibraryEntity:257,musicLibraryEdit:121,musicLibraryStatusEntity:318,
musicPlaylist:24,musicPlaylistDownloadMetadataEntity:248,musicShare:100,musicTrackDetail:29,musicTrackDownloadMetadataEntity:234,musicTrack:28,musicTrackUserDetail:30,offlineOrchestrationActionWrapperEntity:169,offlineVideoPolicy:130,offlineVideoStreams:198,offlineabilityEntity:246,orchestrationWebSamplingEntity:242,pageHeaderEntity:495,pdpStateEntity:524,pinnedProductEntity:273,playbackData:119,quantityIncrementerEntity:356,playerStateEntity:323,refresh:148,saveToPlaylistListEntity:231,selectedChipIndexEntityPayload:479,
settingEntity:297,stringEntity:382,suggestedFeedbackChipStateEntity:485,transfer:120,trendingOfferEntity:469,videoDownloadContextEntity:461,videoOverviewAsyncDataEntity:545,videoPlaybackPositionEntity:76,votingEntity:561,ytMainChannelEntity:152,youchatPendingResponseEntity:553,ytMainDownloadedVideoEntity:155,ytMainVideoEntity:151},Ns5={};for(const [l,y]of Object.entries(s4C)){const k=l,z=y;z&&(Ns5[z]=k)};var km;var th_=!1,$m,r9,ZQ,e4,Av,OIz=class extends g.zP{constructor(l){super();this.counter=[0,0,0,0];this.C=new Uint8Array(16);this.Z=16;if(!th_){var y,k=new Uint8Array(256),z=new Uint8Array(256);var r=1;for(y=0;y<256;y++)k[r]=y,z[y]=r,r^=r<<1^(r>>7&&283);$m=new Uint8Array(256);r9=zK(256);ZQ=zK(256);e4=zK(256);Av=zK(256);for(let e=0;e<256;e++){r=e?z[255^k[e]]:0;r^=r<<1^r<<2^r<<3^r<<4;r=r&255^r>>>8^99;$m[e]=r;y=r<<1^(r>>7&&283);var Z=y^r;r9[e]=y<<24|r<<16|r<<8|Z;ZQ[e]=Z<<24|r9[e]>>>8;e4[e]=r<<24|ZQ[e]>>>
8;Av[e]=r<<24|e4[e]>>>8}th_=!0}r=zK(44);for(k=0;k<4;k++)r[k]=l[4*k]<<24|l[4*k+1]<<16|l[4*k+2]<<8|l[4*k+3];for(z=1;k<44;k++)l=r[k-1],k%4||(l=($m[l>>16&255]^z)<<24|$m[l>>8&255]<<16|$m[l&255]<<8|$m[l>>>24],z=z<<1^(z>>7&&283)),r[k]=r[k-4]^l;this.key=r}encrypt(l){const y=l.length;l=new Uint8Array(l.buffer.slice(l.byteOffset,l.byteOffset+y));const k=this.C;let z=0;for(;z<y&&this.Z<16;)l[z++]^=k[this.Z++];const r=y-(y-z)%16;for(;z<r;)RU5(this),l[z++]^=k[0],l[z++]^=k[1],l[z++]^=k[2],l[z++]^=k[3],l[z++]^=
k[4],l[z++]^=k[5],l[z++]^=k[6],l[z++]^=k[7],l[z++]^=k[8],l[z++]^=k[9],l[z++]^=k[10],l[z++]^=k[11],l[z++]^=k[12],l[z++]^=k[13],l[z++]^=k[14],l[z++]^=k[15];if(z<y)for(RU5(this),this.Z=0;z<y;)l[z++]^=k[this.Z++];return l}};var QX=!1;(()=>{const l=z=>new Uint8Array(z),y=z=>{const r=new Uint8Array(z.length);
for(let Z=0;Z<z.length;Z++)r[Z]=z[Z];return r},k=new Uint8Array([1]);
return k.length===1&&k[0]===1?l:y})();
var tv;var hA=class{constructor(l){const y=O0();y&&(this.Z=new sd5(l,y));this.C=new Zd(l)}async encrypt(l,y){if(this.Z)try{return await this.Z.encrypt(l,y)}catch(k){g.WH(k),QX=!0,this.Z=void 0}return this.C.encrypt(l,y)}decrypt(l,y){return this.encrypt(l,y)}},sd5=class{constructor(l,y){this.C=l;this.subtleCrypto=y}async encrypt(l,y){try{return await D0q(this,l,y)}catch(k){throw g.WH(k),QX=!0,k;}}},Zd=class{constructor(l){this.C=l}encrypt(l,y){this.Z||(this.Z=new OIz(this.C));var k=this.Z;for(let z=0;z<4;z++)k.counter[z]=
y[z*4]<<24|y[z*4+1]<<16|y[z*4+2]<<8|y[z*4+3];k.Z=16;return this.Z.encrypt(l)}decrypt(l,y){return this.encrypt(l,y)}};var z4T=class{constructor(l){this.J=new Uint8Array(64);this.N=new Uint8Array(64);this.V=0;this.S=new Uint8Array(64);this.C=0;this.J.set(l);this.N.set(l);for(l=0;l<64;l++)this.J[l]^=92,this.N[l]^=54;this.reset()}reset(){lZ5(this);this.update(this.N)}update(l){let y=0;const k=l.length;this.V+=k;this.C&&this.C+k>=64&&(this.S.set(l.subarray(0,64-this.C),this.C),y=64-this.C,this.C=0,y9C(this,this.S,0));for(;y+64<=k;y+=64)y9C(this,l,y);y<k&&(l=l.subarray(y),this.S.set(l,this.C),this.C+=l.length)}},d9=[1116352408,
1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,
430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];var $mg=class{constructor(l){this.Z=l}},e4T=class{constructor(l,y){this.C=l;this.subtleCrypto=y}},HEz=class{constructor(l){this.Z=l}};g.dTQ=Ob("yt-idb-pref-storage",{Zg:{prefs:{Bz:1}},shared:!1,upgrade(l,y){y(1)&&Bs(Lm(l,"prefs",{keyPath:"key"}),"byExpiration","expirationTimestampMs")},version:1});var wPg={INVALID_ENCODER_VERSION:"Invalid encoder version",KEY_CREATION_FAILED:"Failed to create encoder key",UNKNOWN_DECODE_ERROR:"Failed to decode PES data",UNKNOWN_ENCODE_ERROR:"Failed to encode PES data",WRONG_DATA_TYPE:"Encoder cannot process the data type"},w9=class extends g.WO{constructor(l,y={}){super(wPg[l],{name:"PESEncoderError",type:l,...y});this.type=l;this.level="WARNING";Object.setPrototypeOf(this,w9.prototype)}};var hFz=class{};var GO5=class extends hFz{constructor(l){super();this.Z=l}N(l,y){y=hv(y);l=(new TextEncoder).encode(JSON.stringify(l));return this.Z.encrypt(l,y)}C(l,y){if(!(l instanceof Uint8Array))throw new w9("WRONG_DATA_TYPE",{MF:1});const k=new TextDecoder;y=hv(y);l=this.Z.decrypt(l,y);return JSON.parse(k.decode(l))}};var G8y={animationEntity:nz5,accountLinkStatusEntity:lms,booleanEntity:oNt,buttonEntity:DEQ,captionTrack:Cye,channelHandle:JrT,chatLoadingStateEntity:rbt,chipEntity:FTC,commerceAcquisitionClientPayloadEntity:Zdq,commerceCartListEntity:erg,compositeSourceEntity:sO_,multiviewStagingEntity:LXq,contextNoteFeedEntityPayload:pje,contextNoteUserRatingEntityPayload:KQ4,continuationTokenEntity:CTT,downloadQualityPickerEntity:OT5,downloadsPageRefreshTokenEntity:wzq,downloadsPageViewConfigurationEntity:VjC,
downloadStatusEntity:dcC,dismissState:oz_,sfvAudioItemCurrentlyPlayingEntity:pTy,emojiFountainDataEntity:BBC,emojiCustomizationSetEntity:vzQ,fakeChannel:s2T,fakePlaylist:LQ4,fakePlaylistEntryCollection:B14,fakeVideo:HOq,fakeVideoDescription:Rd5,featuredProductsEntity:nyT,flowStateEntity:Dzg,iconBadgeEntity:AbP,interstitialInteractionStateEntity:rXC,likeButtonAnimationEntity:PTQ,liveChatPollStateEntity:ZTs,dataFreshnessEntity:LT5,liveViewerLeaderboardChatEntryPointStateEntity:TBQ,liveViewerLeaderboardPointsEntity:VZ5,
liveReactionsDataEntity:Hsy,logoEntity:yX_,macroMarkerEntity:JXP,mainDownloadsLibraryEntity:haT,mainDownloadsListEntity:amq,mainPlaylistDownloadStateEntity:iTQ,mainPlaylistEntity:bTT,mainPlaylistVideoEntity:u_C,mainVideoDownloadStateEntity:Uc5,mainVideoEntity:WXy,markersEngagementPanelSyncEntity:YkP,markersVisibilityOverrideEntity:pzy,musicAlbumReleaseDetail:lie,musicAlbumReleaseDownloadMetadataEntity:vy_,musicAlbumRelease:Dcg,musicAlbumReleaseUserDetail:ykq,musicArtistDetail:zw_,musicArtist:k2T,
musicArtistUserDetail:rkz,musicDownloadsLibraryEntity:BSg,musicLibraryEdit:Zsq,musicLibraryStatusEntity:ewC,musicPlaylist:$EC,musicPlaylistDownloadMetadataEntity:HTe,musicShare:Qry,musicTrackDetail:Os5,musicTrackDownloadMetadataEntity:RaP,musicTrack:tZ_,musicTrackUserDetail:dE4,offlineOrchestrationActionWrapperEntity:bsC,offlineVideoPolicy:u6P,offlineVideoStreams:xET,offlineabilityEntity:Mje,orchestrationWebSamplingEntity:Xzy,pageHeaderEntity:NBy,pdpStateEntity:$U_,pinnedProductEntity:FX4,playbackData:mET,
playerStateEntity:KXe,quantityIncrementerEntity:Qys,refresh:qt5,saveToPlaylistListEntity:gz_,selectedChipIndexEntityPayload:gyg,settingEntity:jr4,stringEntity:N15,suggestedFeedbackChipStateEntity:Ey4,transfer:WTy,trendingOfferEntity:oyy,videoDownloadContextEntity:Ii5,videoOverviewAsyncDataEntity:tIC,videoPlaybackPositionEntity:lS5,votingEntity:sr4,ytMainChannelEntity:Imt,youchatPendingResponseEntity:fmQ,ytMainDownloadedVideoEntity:cXC,ytMainVideoEntity:TST};var bSP=class{constructor(l,y){this.Z=l;this.C=y;this.N={}}};var aIe=class extends hFz{N(l){return l}C(l){if(l instanceof Uint8Array)throw new w9("WRONG_DATA_TYPE",{MF:0});return l}};var mms=class{constructor(){this.Z={};this.Z[0]=new aIe;if(!g.EJ("aes_pes_encoder_killswitch")){var l=this.Z;try{const z=g.UV();var y=hv(z);var k=new GO5(new Zd(y),new hA(y))}catch(z){throw l=z instanceof Error?new w9("KEY_CREATION_FAILED",{originalMessage:z.message}):new w9("KEY_CREATION_FAILED"),g.n(l),l;}l[1]=k}}};var qWs=class extends g.zP{constructor(l,y){super();this.token=l;this.Z=y;this.observers=[];l=new g.aC.BroadcastChannel(`${"PERSISTENT_ENTITY_STORE_SYNC"}:${g.UV()}`);l.onmessage=this.C.bind(this);this.channel=l}observe(l){this.observers.push(l);return()=>{const y=this.observers.indexOf(l);y>=0&&this.observers.splice(y,1)}}C(l){Cnt(this,l.data)}Vj(){this.channel.close()}},qQ;g.RG("","downloadsPageViewConfigurationEntity");g.RG("DOWNLOADS_LIST_ENTITY_ID_MANUAL_DOWNLOADS","mainDownloadsListEntity");g.AG=g.RG("DOWNLOADS_LIST_ENTITY_ID_SMART_DOWNLOADS","mainDownloadsListEntity");g.RG("DOWNLOADS_LIST_ENTITY_ID_SMART_DOWNLOADS","refresh");g.RG("SMART_DOWNLOADS_ENABLED","settingEntity");var J95=class{constructor(l,y){this.C=this.Z=0;this.Z=y.x-l.x;this.C=y.y-l.y}};var iIC=class{constructor(){this.Z=new Map}};var nJ5=new Yr("POSTMESSAGE_TUNNEL_TOKEN");var s7q=["www.youtube-nocookie.com","www.youtubeeducation.com","youtube.googleapis.com"],UTT=class{constructor(){this.state=1;this.qK=null;this.nS=void 0}initialize(l,y,k,z){this.nS=z;if(l.program){var r;z=l.interpreterUrl??null;l.interpreterSafeScript?r=DJ(l.interpreterSafeScript):r=l.interpreterScript??null;l.interpreterSafeUrl&&(z=lO(l.interpreterSafeUrl).toString());NmC(this,r,z,l.program,y,k)}else g.WH(Error("BL:CIP"))}isInitialized(){return this.C()}getState(){return this.state}isLoading(){return this.state===
2}invoke(l={}){return this.C()?this.N({cj:l}):null}dispose(){this.Z(null);this.IU(8)}C(){return!!this.qK}N(l){return this.qK.Ce(l)}Z(l){g.yb(this.qK);this.qK=l}IU(l){this.state=l}};var MhC=class extends UTT{Z(l){TK()?.bgvma();if(l){const y={bgvma:l.dispose.bind(l),bgvmb:l.snapshot.bind(l),bgvmc:l.Ce.bind(l)};g.iQ("yt.abuse.playerAttLoader",y);Vz(k=>l.snapshot(k))}else g.iQ("yt.abuse.playerAttLoader",null),g.iQ("yt.abuse.playerAttLoaderRun",null)}C(){return!!TK()}N(l){return TK().bgvmc(l)}};var zH5=class{constructor(l){this.E7=l}Sr(){return"crossDeviceProgressCommand"}xM(l){if(l.crossDevicePings){const y=[];for(const k of l.crossDevicePings)y.push({baseUrl:k.baseUrl});l={crossDevicePings:y,enableBatchedCrossDevicePings:!0};this.E7.L.O().experiments.z7("relax_bg_notification_throttling")&&(l.relaxBgNotificationThrottling=!0);this.E7.L.O().experiments.z7("relax_bg_notification_throttling_counterfactual")&&(l.relaxBgNotificationThrottlingCounterfactual=!0);g.wv("crossDeviceNotificationTransfer",
l)}}};var DW5=class{constructor(l,y){this.LJ=l;this.pK=y}Sr(){return"muteAdEndpoint"}xM(l,y){switch(l.type){case "SKIP":L5P(this.LJ,this.pK,y)}}};var kGy=class{Sr(){return"openPopupAction"}xM(){}};var l7q=class{Sr(){return"pingingEndpoint"}xM(){}};var lWC={clickTrackingParams:!0,commandMetadata:!0,loggingUrls:!0},vlq=class extends g.zP{constructor(l){super();this.GM=l;this.Z=new Map;VX(this,"commandExecutorCommand",(y,k,z)=>{HSC(this,y.commands,k,z)});
VX(this,"clickTrackingParams",()=>{})}};var pMQ={H5:"FINAL",al:"AD_BREAK_LENGTH",Il:"AD_CPN",Sz:"AH",nk:"AD_MT",E$:"ASR",B5:"AW",kG:"NM",Tu:"NX",t7:"NY",CI:"CONN",q6:"CPN",g0:"DV_VIEWABILITY",j9:"ERRORCODE",d0:"ERROR_MSG",zj:"EI",pT:"GOOGLE_VIEWABILITY",lZ:"IAS_VIEWABILITY",Xc:"LACT",y8:"LIVE_TARGETING_CONTEXT",dC:"I_X",kt:"I_Y",Dt:"MT",hx:"MIDROLL_POS",Zb:"MIDROLL_POS_MS",Cu:"MOAT_INIT",eO:"MOAT_VIEWABILITY",O0:"P_H",Gn:"PV_H",d9:"PV_W",kB:"P_W",Tn:"TRIGGER_TYPE",FKR:"SDKV",MNd:"SLOT_POS",RJR:"SURVEY_LOCAL_TIME_EPOCH_S",pFa:"SURVEY_ELAPSED_MS",
xP:"VIS",W8b:"VIEWABILITY",YAr:"VED",cj0:"VOL",Zla:"WT",f3j:"YT_ERROR_CODE"};var yHq=class{constructor(l,y,k){this.gz=l;this.Z=y;this.Se=k;iP(ck(),{jf:nJ5,y_:iIC})}Sr(){return"urlEndpoint"}xM(l,y,k){{var z=this.Se.get();const r=CE(z.C.get(),y);r?y=vJ(z,o6(r),r,void 0,void 0,k):(EP("Trying to ping from an unknown layout",void 0,void 0,{layoutId:y}),y={})}y={...y};iR(this.Z,"h5_inplayer_enable_adcpn_macro_substitution_for_click_pings")&&(k=O1(this.gz,2))&&(y.AD_CPN=k.clientPlaybackNonce);y=g.TB(l.url,y);l=g.HW(y,void 0,void 0,void 0,l.attributionSrcMode==="ATTRIBUTION_SRC_MODE_LABEL_CHROME");
F55(l,y)}};var $T=class{constructor(l){this.value=l}get(){return this.value}},zg4=class extends $T{Z(){return"metadata_type_action_companion_ad_renderer"}},ZLq=class extends $T{Z(){return"metadata_type_top_banner_image_text_icon_buttoned_layout_view_model"}},tGC=class extends $T{Z(){return"metadata_type_ads_engagement_panel_renderer"}},Ovz=class extends $T{Z(){return"metadata_type_ads_engagement_panel_layout_view_model"}},Hv=class extends $T{Z(){return"metadata_type_ad_next_params"}},RD=class extends $T{Z(){return"metadata_type_ad_video_clickthrough_endpoint"}},
F9s=class extends $T{Z(){return"metadata_type_invideo_overlay_ad_renderer"}},d85=class extends $T{Z(){return"metadata_type_image_companion_ad_renderer"}},wSs=class extends $T{Z(){return"metadata_type_banner_image_layout_view_model"}},hXT=class extends $T{Z(){return"metadata_type_shopping_companion_carousel_renderer"}},jLz=class extends $T{Z(){return"metadata_type_ad_info_ad_metadata"}},Sbg=class extends $T{Z(){return"metadata_ad_video_is_listed"}},e7=class extends $T{Z(){return"metadata_type_ad_placement_config"}},
xs=class extends $T{Z(){return"metadata_type_ad_pod_info"}},Bv=class extends $T{Z(){return"metadata_type_ad_pod_skip_index"}},DG=class extends $T{Z(){return"metadata_type_ad_pod_skip_target"}},N$=class extends $T{Z(){return"metadata_type_ad_pod_skip_target_callback_ref"}},u5=class extends $T{Z(){return"metadata_type_ad_video_id"}},i5=class extends $T{Z(){return"metadata_type_content_cpn"}},Cw=class extends $T{Z(){return"metadata_type_instream_ad_player_overlay_renderer"}},b5=class extends $T{Z(){return"metadata_type_player_overlay_layout_renderer"}},
fu4=class extends $T{Z(){return"metadata_type_player_underlay_renderer"}},UlC=class extends $T{Z(){return"metadata_type_player_underlay_ad_slot_renderer"}},cye=class extends $T{Z(){return"metadata_type_media_associated_in_player_slot"}},oOQ=class extends $T{Z(){return"metadata_type_shrunken_player_bytes_config"}},xl_=class extends $T{Z(){return"metadata_type_ad_action_interstitial_renderer"}},FlQ=class extends $T{Z(){return"metadata_type_valid_survey_text_interstitial_renderer"}},CsC=class extends $T{Z(){return"METADATA_TYPE_VALID_INSTREAM_SURVEY_AD_RENDERER_FOR_DAI"}},
wDt=class extends $T{Z(){return"METADATA_TYPE_VALID_INSTREAM_SURVEY_AD_RENDERER_FOR_VOD"}},iLQ=class extends $T{Z(){return"metadata_type_sliding_text_player_overlay_renderer"}},S7=class extends $T{Z(){return"metadata_type_linked_player_bytes_layout_id"}},ulC=class extends $T{Z(){return"metadata_type_linked_second_player_bytes_layout_id"}},vv=class extends $T{Z(){return"metadata_type_linked_in_player_layout_id"}},kL=class extends $T{Z(){return"metadata_type_linked_in_player_layout_type"}},aAT=class extends $T{Z(){return"metadata_type_linked_in_player_slot_id"}},
pSP=class extends $T{Z(){return"metadata_type_player_bytes_callback"}},Wv=class extends $T{Z(){return"metadata_type_player_bytes_callback_ref"}},dX=class extends $T{constructor(){super({current:null})}Z(){return"metadata_type_player_bytes_layout_controls_callback_ref"}},yZy=class extends $T{Z(){return"metadata_type_sub_layouts"}},aus=class extends $T{Z(){return"metadata_type_cue_point"}},gY=class extends $T{Z(){return"metadata_type_triggering_cue_point"}},UN=class extends $T{Z(){return"metadata_type_video_length_seconds"}},
M$=class extends $T{Z(){return"metadata_type_player_vars"}},MY_=class extends $T{Z(){return"metadata_type_preload_player_vars"}},q$=class extends $T{Z(){return"metadata_type_sodar_extension_data"}},X2=class extends $T{Z(){return"metadata_type_layout_enter_ms"}},cv=class extends $T{Z(){return"metadata_type_layout_exit_ms"}},VF=class extends $T{Z(){return"metadata_type_media_sub_layout_index"}},ID=class extends $T{constructor(){super({})}Z(){return"metadata_type_dai"}},ws5=class extends $T{constructor(){super({})}Z(){return"metadata_type_ad_intro"}},
VYQ=class extends $T{Z(){return"metadata_type_client_forecasting_ad_renderer"}},mZ=class extends $T{Z(){return"metadata_type_drift_recovery_ms"}},rX=class extends $T{Z(){return"metadata_type_fulfilled_layout"}},HlC=class extends $T{Z(){return"metadata_type_ad_break_request_data"}},JnP=class extends $T{Z(){return"metadata_type_ad_break_response_data"}},l_=class extends $T{Z(){return"metadata_type_remote_slots_data"}},wY=class extends $T{Z(){return"METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds"}},yV=
class extends $T{Z(){return"METADATA_TYPE_MEDIA_BREAK_LAYOUT_DURATION_MILLISECONDS"}},Xst=class extends $T{Z(){return"metadata_type_legacy_info_card_vast_extension"}},Hvg=class extends $T{Z(){return"metadata_type_valid_ad_message_renderer"}},hS=class extends $T{Z(){return"METADATA_TYPE_INTERACTIONS_AND_PROGRESS_LAYOUT_COMMANDS"}},Rgs=class extends $T{Z(){return"metadata_type_served_from_live_infra"}},JDs=class extends $T{Z(){return"metadata_type_survey_overlay"}},TV=class extends $T{Z(){return"metadata_type_active_view_traffic_type"}},
WlC=class extends $T{Z(){return"metadata_type_active_view_identifier"}},$lz=class extends $T{Z(){return"metadata_type_ssdai_ads_config"}},RLC=class extends $T{constructor(){super(!0)}Z(){return"metadata_type_allow_pause_ad_break_request_slot_reschedule"}},EN=class extends $T{Z(){return"metadata_type_player_bytes_slot_metadata"}},QaQ=class extends $T{constructor(){super({})}Z(){return"metadata_type_prefetch_metadata"}};var Uuy=new Map([["TRIGGER_CATEGORY_LAYOUT_EXIT_NORMAL","normal"],["TRIGGER_CATEGORY_LAYOUT_EXIT_USER_SKIPPED","skipped"],["TRIGGER_CATEGORY_LAYOUT_EXIT_USER_MUTED","muted"],["TRIGGER_CATEGORY_LAYOUT_EXIT_USER_INPUT_SUBMITTED","user_input_submitted"],["TRIGGER_CATEGORY_LAYOUT_EXIT_USER_CANCELLED","user_cancelled"]]);var gi=()=>"",u7C=new Map([["TRIGGER_CATEGORY_LAYOUT_EXIT_NORMAL",
"trigger_category_layout_exit_normal"],["TRIGGER_CATEGORY_LAYOUT_EXIT_USER_SKIPPED","trigger_category_layout_exit_user_skipped"],["TRIGGER_CATEGORY_LAYOUT_EXIT_USER_MUTED","trigger_category_layout_exit_user_muted"],["TRIGGER_CATEGORY_SLOT_EXPIRATION","trigger_category_slot_expiration"],["TRIGGER_CATEGORY_SLOT_FULFILLMENT","trigger_category_slot_fulfillment"],["TRIGGER_CATEGORY_SLOT_ENTRY","trigger_category_slot_entry"],["TRIGGER_CATEGORY_LAYOUT_EXIT_USER_INPUT_SUBMITTED","trigger_category_layout_exit_user_input_submitted"],
["TRIGGER_CATEGORY_LAYOUT_EXIT_USER_CANCELLED","trigger_category_layout_exit_user_cancelled"]]);var AL=class extends ET{constructor(l,y,k,z=!1){super(l);this.NS=k;this.Q2=z;this.args=[];y&&this.args.push(y)}};var F=class extends ET{constructor(l,y,k,z=!1){super(l);this.NS=k;this.Q2=z;this.args=[];y&&this.args.push(y)}};var nq=class{constructor(l){const y=new Map;l.forEach(k=>{y.set(k.Z(),k)});
this.Z=y}aR(l){l=this.Z.get(l);if(l!==void 0)return l.get()}};new Promise(()=>{});var rnT=new Map([["unspecified","CONTROL_FLOW_MANAGER_LAYER_UNSPECIFIED"],["core","CONTROL_FLOW_MANAGER_LAYER_CORE"],["adapter","CONTROL_FLOW_MANAGER_LAYER_ADAPTER"],["surface","CONTROL_FLOW_MANAGER_LAYER_SURFACE"],["external","CONTROL_FLOW_MANAGER_LAYER_EXTERNAL"]]),kwT=new Map([["normal",{eW:"ADS_CLIENT_EVENT_TYPE_NORMAL_EXIT_LAYOUT_REQUESTED",pR:"ADS_CLIENT_EVENT_TYPE_LAYOUT_EXITED_NORMALLY"}],["skipped",{eW:"ADS_CLIENT_EVENT_TYPE_SKIP_EXIT_LAYOUT_REQUESTED",pR:"ADS_CLIENT_EVENT_TYPE_LAYOUT_EXITED_SKIP"}],
["muted",{eW:"ADS_CLIENT_EVENT_TYPE_MUTE_EXIT_LAYOUT_REQUESTED",pR:"ADS_CLIENT_EVENT_TYPE_LAYOUT_EXITED_MUTE"}],["abandoned",{eW:"ADS_CLIENT_EVENT_TYPE_ABANDON_EXIT_LAYOUT_REQUESTED",pR:"ADS_CLIENT_EVENT_TYPE_LAYOUT_EXITED_ABANDON"}],["user_input_submitted",{eW:"ADS_CLIENT_EVENT_TYPE_USER_INPUT_SUBMITTED_EXIT_LAYOUT_REQUESTED",pR:"ADS_CLIENT_EVENT_TYPE_LAYOUT_EXITED_USER_INPUT_SUBMITTED"}],["user_cancelled",{eW:"ADS_CLIENT_EVENT_TYPE_USER_CANCELLED_EXIT_LAYOUT_REQUESTED",pR:"ADS_CLIENT_EVENT_TYPE_LAYOUT_EXITED_USER_CANCELLED"}],
["error",{eW:"ADS_CLIENT_EVENT_TYPE_ABORTED_EXIT_LAYOUT_REQUESTED",pR:"ADS_CLIENT_EVENT_TYPE_LAYOUT_EXITED_ABORTED"}]]),QZ=class{constructor(l){this.p_=l;l=Math.random();var y=this.p_.get();y=g.i_(y.L.O().experiments,"html5_debug_data_log_probability");y=Number.isFinite(y)&&y>=0&&y<=1?y:0;this.Z=l<y}};var W0g=class extends g.zP{constructor(l,y,k,z){super();this.C=y;this.Av=k;this.p_=z;this.Z=l(this,this,this,this,this);g.x(this,this.Z);for(const r of y)g.x(this,r)}yV(l,y){return this.Z.yV(l,y)}fE(l,y){this.Av.Z("ADS_CLIENT_EVENT_TYPE_OPPORTUNITY_RECEIVED",l,y);for(const k of this.C)k.fE(l,y)}gy(l){if(NQ(this.Z,l)){va(this.Av,"ADS_CLIENT_EVENT_TYPE_SLOT_ENTERED",l);this.Z.gy(l);for(const y of this.C)y.gy(l);toe(this,l)}}Kg(l){if(NQ(this.Z,l)){va(this.Av,"ADS_CLIENT_EVENT_TYPE_SLOT_EXITED",l);this.Z.Kg(l);
for(const y of this.C)y.Kg(l);NQ(this.Z,l)&&s0(this.Z,l).J&&DQ(this,l,!1)}}Yu(l){va(this.Av,"ADS_CLIENT_EVENT_TYPE_SLOT_FULFILLMENT_CANCELLED",l);NQ(this.Z,l)&&(this.Z.Yu(l),DQ(this,l,!1))}s1(l,y){if(NQ(this.Z,l)){zs(this.Av,"ADS_CLIENT_EVENT_TYPE_LAYOUT_ENTERED",l,y);for(const k of this.C)k.s1(l,y)}}iq(l,y,k){if(NQ(this.Z,l)){zs(this.Av,zQP(k),l,y);this.Z.iq(l,y);for(const z of this.C)z.iq(l,y,k);(k=Ba(this.Z,l))&&y.layoutId===k.layoutId&&Qje(this,l,!1)}}iH(l,y,k,z){k.NS&&z?(EP(k,l,y,void 0,k.Q2),
Z_(this.Av,z,k.NS,l,y)):EP("adsClientErrorMessage is missing.",l,y);DQ(this,l,!0)}Vj(){const l=bfQ(this.Z);for(const y of l)DQ(this,y,!1);super.Vj()}M4(l,y){zs(this.Av,"ADS_CLIENT_EVENT_TYPE_UNSCHEDULE_LAYOUT_REQUESTED",l,y);zs(this.Av,"ADS_CLIENT_EVENT_TYPE_LAYOUT_UNSCHEDULED",l,y);for(const k of this.C)y&&k.M4(l,y)}};var cZP=class{constructor(l){this.slot=l;this.b0=new Map;this.C_=new Map;this.D=new Map;this.Y=new Map;this.N=this.layout=this.C=this.K=void 0;this.S=this.J=!1;this.A=[];this.Z="not_scheduled";this.V="not_filled"}isActive(){switch(this.Z){case "entered":case "rendering":case "rendering_stop_requested":case "exit_requested":return!0;default:return!1}}};var IWg=class extends g.zP{constructor(l,y,k,z,r,Z){super();this.Ud=l;this.N=y;this.J=k;this.V=z;this.C=r;this.p_=Z;this.Z=new Map}yV(l,y){l=RA(this,`${l}_${y}`);y=[];for(const k of l.values())y.push(k.slot);return y}iE(l){l=s0(this,l);l.Z!=="not_scheduled"&&rU(l.slot,l.Z,"onSlotScheduled");l.Z="scheduled"}Nh(l){l=s0(this,l);l.V="fill_requested";l.K.Nh()}gy(l){l=s0(this,l);l.Z!=="enter_requested"&&rU(l.slot,l.Z,"onSlotEntered");l.Z="entered"}Yu(l){s0(this,l).V="fill_canceled"}Kg(l){l=s0(this,l);l.Z!==
"exit_requested"&&rU(l.slot,l.Z,"onSlotExited");l.Z="scheduled"}iq(l,y){l=s0(this,l);l.layout!=null&&l.layout.layoutId===y.layoutId&&(l.Z!=="rendering_stop_requested"&&rU(l.slot,l.Z,"onLayoutExited"),l.Z="entered")}};var qXP=class extends g.zP{constructor(l){super();this.Z=l;this.instance=null;this.addOnDisposeCallback(()=>{g.yb(this.instance);this.instance=null})}get(){Math.random()<.001&&this.IR()&&EP("Tried to retrieve object during dispose",void 0,void 0,{type:typeof this.instance});
this.instance||(this.instance=this.Z());return this.instance}};var XP5=class extends g.zP{constructor(l){super();this.Z=l;this.C=T3y(this)}N(){return this.C}};var tG=class{constructor(l){this.Z=l}executeCommand(l,y){Pa(this.Z(),l,y)}};var ch5=class{constructor(){this.listeners=new Set}addListener(l){this.listeners.add(l)}removeListener(l){this.listeners.delete(l)}};var Oe=class{constructor(l){this.p_=l}};var C1e=class{constructor(l,y,k,z,r){this.callback=l;this.slot=y;this.C=k;this.TA=z;this.p_=r;this.Z=null}};var m_={AD_MARKER:"ytp-ad-progress",CHAPTER_MARKER:"ytp-chapter-marker",TIME_MARKER:"ytp-time-marker"};var BdC=RegExp("^https?://([^.]*\\.moatads\\.com/|e[0-9]+\\.yt\\.srs\\.doubleverify\\.com|pagead2\\.googlesyndication\\.com/pagead/gen_204\\?id=yt3p&sr=1&|pm\\.adsafeprotected\\.com/youtube|pm\\.test-adsafeprotected\\.com/youtube|youtube[0-9]+\\.moatpixel\\.com/)"),K0q=RegExp("^https://([a-z]+\\.)?[0-9a-f]{1,63}\\.sslproxy\\.corp\\.google\\.com/|^https://([a-z]+\\.)?[a-z0-9\\-]{1,63}\\.demos\\.corp\\.google\\.com/|^https://[0-9a-f]{1,63}\\.proxy\\.googleprod\\.com/|^https?://(([-\\w]*www[-\\w]*\\.|[-\\w]*web[-\\w]*\\.|[-\\w]*canary[-\\w]*\\.|[-\\w]*dev[-\\w]*\\.|[-\\w]{1,3}\\.)+(corp\\.)?youtube(-nocookie|kids|education)?\\.com/|([A-Za-z0-9-]{1,63}\\.)*(youtube\\.googleapis\\.com)[.]?(:[0-9]+)?/|([a-z]+\\.)?[a-z0-9\\-]{1,63}\\.([a-z]{3}|i)\\.corp\\.google\\.com(:[0-9]+)?/|([a-z]+\\.)?[a-z0-9\\-]{1,63}\\.c\\.googlers\\.com(:[0-9]+)?/|(docs|drive)\\.google\\.com/(a/[^/\\\\%]+/|)|(music|music-green-qa|music-release-qa|yt-music-green\\.corp)\\.youtube\\.com/|(tv|tv-green-qa|tv-green-qa\\.corp|tv-release-qa|tv-release-qa\\.corp|tv-integration-qa|tv-integration-qa\\.corp|yt-tv-autopush\\.corp|yt-tv-integration\\.corp|yt-tv-staging\\.corp)\\.youtube\\.com/|[A-Za-z0-9-]+\\.prod\\.google\\.com(:[0-9]+)?/)"),
HkC=RegExp("^https?://(www\\.google\\.com/pagead/xsul|www\\.youtube\\.com/pagead/slav)"),oC4=RegExp("^https://([A-Za-z0-9-]{1,63}\\.)+demos\\.corp\\.google\\.com(/(?!url\\b)|$)|^https://([A-Za-z0-9-]{1,63}\\.)+sslproxy\\.corp\\.google\\.com(/|$)|^https?://(([A-Za-z0-9-]{1,63}\\.)*(corp\\.google\\.com|proxy\\.googleprod\\.com|c\\.googlers\\.com|proxy\\.googlers\\.com|docs\\.google\\.com|drive\\.google\\.com|prod\\.google\\.com|currents\\.google\\.com|mail\\.google\\.com|youtube\\.com|youtubeeducation\\.com|youtube\\-nocookie\\.com|youtubekids\\.com)[.]?(:[0-9]+)?/|([A-Za-z0-9-]{1,63}\\.)*(sandbox\\.google\\.com)(:[0-9]+)?(/(?!url\\b)|$))"),
nCT=RegExp("^https://([A-Za-z0-9-]{1,63}\\.)+demos\\.corp\\.google\\.com(/(?!url\\b)|$)|^https://([A-Za-z0-9-]{1,63}\\.)+sslproxy\\.corp\\.google\\.com(/|$)|^https?://(([A-Za-z0-9-]{1,63}\\.)*(corp\\.google\\.com|proxy\\.googleprod\\.com|c\\.googlers\\.com|proxy\\.googlers\\.com|borg\\.google\\.com|prod\\.google\\.com|youtube\\.com|youtubekids\\.com)[.]?(:[0-9]+)?/|([A-Za-z0-9-]{1,63}\\.)*(sandbox\\.google\\.com)(:[0-9]+)?(/(?!url\\b)|$))"),fW_=RegExp("^((http(s)?):)?\\/\\/((((lh[3-6](-tt|-d[a-g,z])?\\.((ggpht)|(googleusercontent)|(google)|(sandbox\\.google)))|(lh7\\-(eu|us|qw|rt)\\.((googleusercontent)|(google)))|((photos|testonly|work)\\.fife\\.usercontent\\.google)|([\\w\\-]+\\.fife\\.usercontent\\.google)|(([1-4]\\.bp\\.blogspot)|(bp[0-3]\\.blogger))|(ccp-lh\\.googleusercontent)|((((cp|ci|gp)[3-6])|(ap[1-2]))\\.(ggpht|googleusercontent))|(gm[1-4]\\.ggpht)|(play-(ti-)?lh\\.googleusercontent)|(gz0\\.googleusercontent)|(((yt[3-4])|(sp[1-3]))\\.(ggpht|googleusercontent)))\\.com)|(drive\\.google\\.com\\/drive\\-(usercontent|viewer))|(dp[3-6]\\.googleusercontent\\.cn)|(dp4\\.googleusercontent\\.com)|((photos|drive|contribution)\\-image\\-(dev|qa)(-us|-eu)?(-auth|-cookie)?\\.corp\\.google\\.com)|(photos\\-image\\-dev\\-dl\\-(auth|eu|us)\\.corp\\.google\\.com)|((dev|dev2|dev3|qa|qa2|qa3|qa-red|qa-blue|canary)[-.]lighthouse\\.sandbox\\.google\\.com\\/image)|(image\\-(dev|qa)\\-lighthouse(-auth)?\\.sandbox\\.google\\.com(\\/image)?)|(drive\\-qa\\.corp\\.google\\.com\\/drive\\-(usercontent|viewer))|(docs(\\-(dev|qa)\\.corp)?\\.google\\.com\\/(u\\/[0-9]+\\/)?(docs|sheets|slides|drawings|forms|videos|pictures)\\-images\\-(rt|qw))|(docs\\.sandbox\\.google\\.com\\/(u\\/[0-9]+\\/)?(docs|sheets|slides|drawings|forms|videos|pictures)\\-images))\\/|^https://([A-Za-z0-9-]{1,63}\\.)+demos\\.corp\\.google\\.com(/(?!url\\b)|$)|^https://([A-Za-z0-9-]{1,63}\\.)+sslproxy\\.corp\\.google\\.com(/|$)|^https?://(([A-Za-z0-9-]{1,63}\\.)*(corp\\.google\\.com|proxy\\.googleprod\\.com|c\\.googlers\\.com|proxy\\.googlers\\.com|borg\\.google\\.com|docs\\.google\\.com|drive\\.google\\.com|googleplex\\.com|play\\.google\\.com|prod\\.google\\.com|currents\\.google\\.com|video\\.google\\.com|youtube\\.com|ytimg\\.com|ytimg\\.sandbox\\.google\\.com|chat\\.google\\.com)[.]?(:[0-9]+)?/|([A-Za-z0-9-]{1,63}\\.)*(sandbox\\.google\\.com)(:[0-9]+)?(/(?!url\\b)|$)|s2\\.googleusercontent\\.com/s2/favicons\\?|yt[3-4]\\.ggpht\\.com/)"),
RWq=RegExp("^https?.*#ocr$|^https?://(aksecure\\.imrworldwide\\.com/|cdn\\.imrworldwide\\.com/|secure\\-..\\.imrworldwide\\.com/)"),jjQ=RegExp("^https?://(googleads\\.g\\.doubleclick\\.net/(aclk|pagead/conversion)|www\\.google\\.com/(aclk|pagead/conversion)|www\\.googleadservices\\.com/(aclk|pagead/(aclk|conversion))|www\\.youtube\\.com/pagead/conversion)"),ECQ=RegExp("^((http(s)?):)?\\/\\/((((lh[3-6](-tt|-d[a-g,z])?\\.((ggpht)|(googleusercontent)|(google)|(sandbox\\.google)))|(lh7\\-(eu|us|qw|rt)\\.((googleusercontent)|(google)))|((photos|testonly|work)\\.fife\\.usercontent\\.google)|([\\w\\-]+\\.fife\\.usercontent\\.google)|(([1-4]\\.bp\\.blogspot)|(bp[0-3]\\.blogger))|(ccp-lh\\.googleusercontent)|((((cp|ci|gp)[3-6])|(ap[1-2]))\\.(ggpht|googleusercontent))|(gm[1-4]\\.ggpht)|(play-(ti-)?lh\\.googleusercontent)|(gz0\\.googleusercontent)|(((yt[3-4])|(sp[1-3]))\\.(ggpht|googleusercontent)))\\.com)|(drive\\.google\\.com\\/drive\\-(usercontent|viewer))|(dp[3-6]\\.googleusercontent\\.cn)|(dp4\\.googleusercontent\\.com)|((photos|drive|contribution)\\-image\\-(dev|qa)(-us|-eu)?(-auth|-cookie)?\\.corp\\.google\\.com)|(photos\\-image\\-dev\\-dl\\-(auth|eu|us)\\.corp\\.google\\.com)|((dev|dev2|dev3|qa|qa2|qa3|qa-red|qa-blue|canary)[-.]lighthouse\\.sandbox\\.google\\.com\\/image)|(image\\-(dev|qa)\\-lighthouse(-auth)?\\.sandbox\\.google\\.com(\\/image)?)|(drive\\-qa\\.corp\\.google\\.com\\/drive\\-(usercontent|viewer))|(docs(\\-(dev|qa)\\.corp)?\\.google\\.com\\/(u\\/[0-9]+\\/)?(docs|sheets|slides|drawings|forms|videos|pictures)\\-images\\-(rt|qw))|(docs\\.sandbox\\.google\\.com\\/(u\\/[0-9]+\\/)?(docs|sheets|slides|drawings|forms|videos|pictures)\\-images))\\/|^https://([A-Za-z0-9-]{1,63}\\.)+demos\\.corp\\.google\\.com(/(?!url\\b)|$)|^https://([A-Za-z0-9-]{1,63}\\.)+sslproxy\\.corp\\.google\\.com(/|$)|^https?://(([A-Za-z0-9-]{1,63}\\.)*(corp\\.google\\.com|proxy\\.googleprod\\.com|c\\.googlers\\.com|proxy\\.googlers\\.com|borg\\.google\\.com|docs\\.google\\.com|drive\\.google\\.com|googleplex\\.com|googlevideo\\.com|prod\\.google\\.com|lh3\\.photos\\.google\\.com|currents\\.google\\.com|mail\\.google\\.com|youtube\\.com|yt\\.akamaized\\.net|chat\\.google\\.com)[.]?(:[0-9]+)?/|([A-Za-z0-9-]{1,63}\\.)*(sandbox\\.google\\.com)(:[0-9]+)?(/(?!url\\b)|$)|([A-Za-z0-9-]{1,63}\\.)*c\\.lh3(-d[a-gyz]|-testonly)?\\.(googleusercontent|photos\\.google)\\.com/.*$)"),
bIs=RegExp("^https?://(([A-Za-z0-9-]{1,63}\\.)*(imasdk\\.googleapis\\.com|2mdn\\.net|googlesyndication\\.com|corp\\.google\\.com|proxy\\.googleprod\\.com|c\\.googlers\\.com|proxy\\.googlers\\.com|borg\\.google\\.com|googleads\\.g\\.doubleclick\\.net|prod\\.google\\.com|static\\.doubleclick\\.net|static\\.googleadsserving\\.cn|studioapi\\.doubleclick\\.net|youtube\\.com|youtube\\.googleapis\\.com|youtube\\-nocookie\\.com|youtubekids\\.com|ytimg\\.com|ytimg\\.sandbox\\.google\\.com)[.]?(:[0-9]+)?/|lightbox-(demos|builder)\\.appspot\\.com/|s[01](qa)?\\.2mdn\\.net/ads/richmedia/studio/mu/templates/tetris|www\\.gstatic\\.com/doubleclick/studio/innovation/h5/layouts/tetris|www\\.gstatic\\.com/doubleclick/studio/innovation/ytplayer)"),
uzQ=RegExp("^https://([A-Za-z0-9-]{1,63}\\.)*(crowdsource|datacompute)\\.google\\.com/|^https://([A-Za-z0-9-]{1,63}\\.)+demos\\.corp\\.google\\.com(/(?!url\\b)|$)|^https://([A-Za-z0-9-]{1,63}\\.)+sslproxy\\.corp\\.google\\.com(/|$)|^https://(ads|adwords\\.corp)\\.google\\.com/(aw/(assetgroup/(edit|new)|campaigns/(new/(performancemax|demandgen)|edit/demandgen))|$)|^https://(adwords-)?canary\\.qa\\.adz\\.google\\.com/(aw/(assetgroup/(edit|new)|campaigns/(new/(performancemax|demandgen)|edit/demandgen))|$)|^https://(books|play-books-(autopush|internal|preprod|staging)(-sandbox|\\.corp))\\.googleusercontent\\.com(/|$)|^https://ads(-external)?-prod\\.qa\\.adz\\.google\\.com/(aw/(assetgroup/(edit|new)|campaigns/(new/(performancemax|demandgen)|edit/demandgen))|$)|^https://canvastester-3fd0b\\.appspot\\.com(/|$)|^https://localhost\\.googleusercontent\\.com(:\\d+)?(/|$)|^https://narrative-news-cast-receiver-d\\.appspot\\.com(/|$)|^https://narrative-news-cast-receiver-f\\.appspot\\.com(/|$)|^https://one\\.google\\.com(/|$)|^https://www\\.google\\.com/culturalinstitute/manage/.*$|^https://www\\.gstatic\\.com/aog_howto|^https://www\\.gstatic\\.com/narrative_cast_receiver/news|^https?://(([A-Za-z0-9-]{1,63}\\.)*(imasdk\\.googleapis\\.com|corp\\.google\\.com|proxy\\.googleprod\\.com|c\\.googlers\\.com|proxy\\.googlers\\.com|borg\\.google\\.com|docs\\.google\\.com|drive\\.google\\.com|googleads\\.g\\.doubleclick\\.net|googleplex\\.com|play\\.google\\.com|prod\\.google\\.com|photos\\.google\\.com|get\\.google\\.com|currents\\.google\\.com|blogger\\.com|mail\\.google\\.com|survey\\.g\\.doubleclick\\.net|youtube\\.com|youtube\\.googleapis\\.com|youtubeeducation\\.com|youtube\\-nocookie\\.com|yt\\-web\\-embedded\\-player\\.appspot\\.com|youtubekids\\.com|vevo\\.com|chat\\.google\\.com|meet\\.google\\.com|artsandculture\\.google\\.com)[.]?(:[0-9]+)?(/|$)|([A-Za-z0-9-]{1,63}\\.)*(sandbox\\.google\\.com)(:[0-9]+)?(/(?!url\\b)|$)|(www\\.|encrypted\\.)?google\\.(cat|com(\\.(a[fgiru]|b[dhnorz]|c[ouy]|do|e[cgt]|fj|g[hit]|hk|jm|kh|kw|l[bcy]|m[mtxy]|n[afgip]|om|p[aeghkry]|qa|s[abglv]|t[jnrw]|ua|uy|vc|vn))?|a[cdelmstz]|c[acdfghilmnvz]|b[aefgijsty]|ee|es|d[ejkmz]|g[aefglmpry]|f[imr]|i[emoqrst]|h[nrtu]|k[giz]|je|jo|m[degklnsuvw]|l[aiktuv]|n[eloru]|p[lnst]|s[cehikmnort]|r[osuw]|us|t[dgklmnot]|ws|vg|vu|co\\.(ao|bw|ck|cr|i[dln]|jp|ke|kr|ls|ma|mz|nz|th|tz|u[gkz]|ve|vi|z[amw]))/(search|webhp)\\?|(www\\.|encrypted\\.)google\\.(cat|com(\\.(a[fgiru]|b[dhnorz]|c[ouy]|do|e[cgt]|fj|g[hit]|hk|jm|kh|kw|l[bcy]|m[mtxy]|n[afgip]|om|p[aeghkry]|qa|s[abglv]|t[jnrw]|ua|uy|vc|vn))?|a[cdelmstz]|c[acdfghilmnvz]|b[aefgijsty]|ee|es|d[ejkmz]|g[aefglmpry]|f[imr]|i[emoqrst]|h[nrtu]|k[giz]|je|jo|m[degklnsuvw]|l[aiktuv]|n[eloru]|p[lnst]|s[cehikmnort]|r[osuw]|us|t[dgklmnot]|ws|vg|vu|co\\.(ao|bw|ck|cr|i[dln]|jp|ke|kr|ls|ma|mz|nz|th|tz|u[gkz]|ve|vi|z[amw]))/?$|lightbox-(demos|builder)\\.appspot\\.com/|s0\\.2mdn\\.net/instream/html5/native/|s[01](qa)?\\.2mdn\\.net/ads/richmedia/studio/mu/templates/tetris|www\\.gstatic\\.com/doubleclick/studio/innovation/h5/layouts/tetris)"),
xTq=RegExp("^(https://play\\.google\\.com|https://photos\\.google\\.com|https://get\\.google\\.com|https://currents\\.google\\.com|https://mail\\.google\\.com|https://yt\\-web\\-embedded\\-player\\.appspot\\.com|http://yt\\-web\\-embedded\\-player\\.appspot\\.com|https://chat\\.google\\.com|https://one\\.google\\.com|https://artsandculture\\.google\\.com|https://adstransparency\\.google\\.com|https://ads\\.google\\.com|https://adwords\\.corp\\.google\\.com|https://ads\\-external\\-prod\\.qa\\.adz\\.google\\.com|https://ads\\-prod\\.qa\\.adz\\.google\\.com|https://adwords\\-canary\\.qa\\.adz\\.google\\.com|https://canary\\.qa\\.adz\\.google\\.com)$|^http://[0-9]+\\.[a-z0-9\\-_]+\\.[a-z0-9\\-_]+\\.[a-z0-9\\-_]+\\.([a-z]{2}|i)\\.borg\\.google\\.com(:[0-9]+)?$|^https://((autopush|beta-lookup|daily-[0-6]|manual-qual|preprod|stream)\\.)?meet\\.google\\.com$|^https://([A-Za-z0-9-]{1,63}\\.)*(crowdsource|datacompute)\\.google\\.com$|^https://([A-Za-z0-9-]{1,63}\\.)*(youtube|youtubekids|youtubeeducation)\\.com$|^https://([A-Za-z0-9-]{1,63}\\.)+demos\\.corp\\.google\\.com$|^https://([A-Za-z0-9-]{1,63}\\.)+sandbox\\.google\\.com$|^https://([A-Za-z0-9-]{1,63}\\.)+sslproxy\\.corp\\.google\\.com$|^https://(books|play-books-(autopush|internal|preprod|staging)(-sandbox|\\.corp))\\.googleusercontent\\.com$|^https://(draft|www|(www\\.)?dev\\.sandbox|(www\\.)?autopush\\.sandbox|(www\\.)?staging\\.sandbox|(www\\.)?restore\\.sandbox)\\.blogger\\.com$|^https://[0-9a-f]{1,63}\\.proxy\\.googleprod\\.com$|^https://localhost\\.googleusercontent\\.com(:\\d+)?$|^https?://(((docs|m|sing|ss|sss|www)\\.)?drive\\.google\\.com$|([A-Za-z0-9-]{1,63}\\.)*c\\.googlers\\.com(:[0-9]+)?$|([A-Za-z0-9-]{1,63}\\.)*corp\\.google\\.com(:[0-9]+)?$|([A-Za-z0-9-]{1,63}\\.)*googleplex\\.com(:[0-9]+)?$|([A-Za-z0-9-]{1,63}\\.)*proxy\\.googlers\\.com(:[0-9]+)?$|(www\\.|encrypted\\.)google\\.(cat|com(\\.(a[fgiru]|b[dhnorz]|c[ouy]|do|e[cgt]|fj|g[hit]|hk|jm|kh|kw|l[bcy]|m[mtxy]|n[afgip]|om|p[aeghkry]|qa|s[abglv]|t[jnrw]|ua|uy|vc|vn))?|a[cdelmstz]|c[acdfghilmnvz]|b[aefgijsty]|ee|es|d[ejkmz]|g[aefglmpry]|f[imr]|i[emoqrst]|h[nrtu]|k[giz]|je|jo|m[degklnsuvw]|l[aiktuv]|n[eloru]|p[lnst]|s[cehikmnort]|r[osuw]|us|t[dgklmnot]|ws|vg|vu|co\\.(ao|bw|ck|cr|i[dln]|jp|ke|kr|ls|ma|mz|nz|th|tz|u[gkz]|ve|vi|z[amw]))/?$|[A-Za-z0-9-]+\\.prod\\.google\\.com(:[0-9]+)?$|docs\\.google\\.com$)");var mTC;g.N1=class{constructor(l,y,k={}){this.start=l;this.end=y;this.active=!0;this.color="";this.C=mTC++;this.id=k.id||"";this.priority=k.priority||9;this.visible=k.visible||!1;this.style=k.style||m_.AD_MARKER;this.namespace=k.namespace||"";if(l=k.color)l=l.toString(16),this.color=`#${Array(7-l.length).join("0")}${l}`;this.tooltip=k.tooltip;this.icons=k.icons?k.icons.filter(z=>g.He(z.thumbnails,r=>g.cJ(r.url))):null;
this.associatedClipId=k.associatedClipId;this.markerPositionMs=k.markerPositionMs;this.visible=this.visible;this.style=this.style;this.start=this.start}getId(){return this.id}toString(){return"CueRange{"+this.namespace+":"+this.id+"}["+L05(this.start)+", "+L05(this.end)+"]"}contains(l,y){return l>=this.start&&(l<this.end||l===this.end&&this.start===this.end)&&(y==null||l<y&&y<=this.end)}};mTC=1;g.N1.prototype.getId=g.N1.prototype.getId;var qAC=class{constructor(l,y,k,z,r,Z,e,A,Q){this.slot=y;this.C=k;this.Se=e;this.vG=A;this.yE=Q;this.Z=new C1e(l,y,z,r,Z)}Nh(){let l=0;YX_(this.Z,()=>{const y=this.slot.clientMetadata.aR("metadata_type_ad_break_request_data");l=Date.now();Fs(this.Se.get(),"abrs",`ct.${l};cmt.${this.vG.get().getCurrentTimeSec(1,!1)};sid.${this.slot.slotId};`);return this.C.get().fetch({Cq:y.getAdBreakUrl,fO:new g.N1(y.Hb,y.rF),xZ:this.slot.clientMetadata.aR("metadata_type_cue_point"),cueProcessedMs:y.cueProcessedMs})},
()=>{B3Q(this)},y=>{var k=Date.now()-l;
Fs(this.Se.get(),"abrr",`ct.${(new Date).getTime()};cmt.${this.vG.get().getCurrentTimeSec(1,!1)};l.${k.toString()};sid.${this.slot.slotId};`);k=y.ow;k.length>=2&&y.ssdaiAdsConfig&&EP("Unexpected ad placement renderers length",this.slot,null,{length:k.length});y.adSlots?.some(z=>g.E(z,xt)?.adSlotMetadata?.slotType==="SLOT_TYPE_PLAYER_BYTES")||k.some(z=>!!z.renderer?.linearAdSequenceRenderer?.linearAds?.length||!!z.renderer?.instreamVideoAdRenderer)||B3Q(this)})}H_(){pcq(this.Z)}};var Wyz=class{constructor(l,y,k,z,r,Z){this.slot=y;this.Z=k;this.C=new C1e(l,y,z,r,Z)}Nh(){YX_(this.C,()=>{const l=this.slot.clientMetadata.aR("metadata_type_ad_break_request_data");return l.cueProcessedMs?this.Z.get().fetch({Cq:l.getAdBreakUrl,fO:new g.N1(l.Hb,l.rF),cueProcessedMs:l.cueProcessedMs}):this.Z.get().fetch({Cq:l.getAdBreakUrl,fO:new g.N1(l.Hb,l.rF)})})}H_(){pcq(this.C)}};var II5=class{constructor(l,y){this.callback=l;this.slot=y}Nh(){var l=this.slot.clientMetadata;l=this.slot.fulfilledLayout??l.aR("metadata_type_fulfilled_layout");OfC(this.callback,this.slot,l)}H_(){en(this.callback,this.slot,new F(`Got CancelSlotFulfilling request for ${this.slot.slotType} in `+"DirectFulfillmentAdapter.",void 0,"ADS_CLIENT_ERROR_MESSAGE_INVALID_FULFILLMENT_CANCELLATION_REQUEST"),"ADS_CLIENT_ERROR_TYPE_FULFILL_SLOT_FAILED")}};var T_C=class{build(l,y){return y.fulfilledLayout||q6(y,{qx:["metadata_type_fulfilled_layout"]})?new II5(l,y):this.N(l,y)}};var dj=class extends T_C{constructor(l,y,k,z,r,Z,e){super();this.Z=l;this.C=y;this.TA=k;this.p_=z;this.Se=r;this.vG=Z;this.yE=e}N(l,y){if(q6(y,{qx:["metadata_type_ad_break_request_data","metadata_type_cue_point"],slotType:"SLOT_TYPE_AD_BREAK_REQUEST"}))return new qAC(l,y,this.Z,this.C,this.TA,this.p_,this.Se,this.vG,this.yE);if(q6(y,{qx:["metadata_type_ad_break_request_data"],slotType:"SLOT_TYPE_AD_BREAK_REQUEST"}))return new Wyz(l,y,this.Z,this.C,this.TA,this.p_);throw new F(`Unsupported slot with type: ${y.slotType} and client metadata: ${Kq(y.clientMetadata)} in `+
"AdBreakRequestSlotFulfillmentAdapterFactory.");}};var wj=class extends T_C{N(l,y){throw new F(`Unsupported slot with type: ${y.slotType} and client metadata: ${Kq(y.clientMetadata)} in `+"DefaultFulfillmentAdapterFactory.");}};var Vhs=class{constructor(l,y,k,z,r,Z){this.callback=l;this.slot=y;this.layout=k;this.N=z;this.Z=r;this.C=Z}Y2(){return this.slot}Zp(){return this.layout}init(){}release(){}startRendering(l){if(l.layoutId!==this.layout.layoutId)this.callback.iH(this.slot,l,new AL("Tried to start rendering an unknown layout, this adapter "+`requires LayoutId: ${this.layout.layoutId}`+`and LayoutType: ${this.layout.layoutType}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_UNKNOWN_LAYOUT"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED");
else{var y=l.clientMetadata.aR("metadata_type_ad_break_response_data");this.slot.slotType==="SLOT_TYPE_AD_BREAK_REQUEST"?(this.callback.s1(this.slot,l),ou4(this.N,this.slot,y)):EP("Unexpected slot type in AdBreakResponseLayoutRenderingAdapter - this should never happen",this.slot,l)}}Xm(l,y){l.layoutId!==this.layout.layoutId?this.callback.iH(this.slot,l,new AL("Tried to stop rendering an unknown layout, this adapter "+`requires LayoutId: ${this.layout.layoutId}`+`and LayoutType: ${this.layout.layoutType}`,
void 0,"ADS_CLIENT_ERROR_MESSAGE_UNKNOWN_LAYOUT"),"ADS_CLIENT_ERROR_TYPE_EXIT_LAYOUT_FAILED"):(this.callback.iq(this.slot,l,y),RQs(this),Duy(this))}};var P1Q=class{constructor(l,y,k){this.Z=l;this.slot=y;this.layout=k}};var hG=class extends g.z1{constructor(l,y,k,z){super();this.callback=l;this.N=z;this.Z=[];this.C=new P1Q(l,y,k)}Y2(){return this.C.slot}Zp(){return this.C.layout}get slot(){return this.C.slot}get layout(){return this.C.layout}init(){this.N.get().addListener(this)}release(){this.N.get().removeListener(this);this.dispose()}Dc(){}tG(){}Te(){}n5(){}startRendering(l){Vd(this.C,l,()=>void this.nM())}nM(){this.N.get().nM(this.Z)}Xm(l,y){Vd(this.C,l,()=>{var k=this.N.get();
SMP(k,this.Z,3);this.Z=[];this.callback.iq(this.slot,l,y)})}Vj(){this.N.IR()||this.N.get().removeListener(this);
super.Vj()}};var DT=class{constructor(l,y,k,z,r=null){this.N=l;this.Se=y;this.layoutId=z;this.V=0;this.S=null;this.J=void 0;this.Z=new Set;this.C=Array.from(this.N.get("progress")||[]);this.C.sort((Z,e)=>(Z.offsetMilliseconds||0)-(e.offsetMilliseconds||0));
this.K={adPlacementConfig:k,oe:r}}Wh(l,y=!1){const k=(this.N.get(l)||[]).concat();if(y=y&&ZFC(l)){const z=this.N.get(y);z&&k.push(...z)}BJ(this,l,k);this.Z.add(l);y&&this.Z.add(y)}Fv(l,y=!1){if(!this.Z.has(l)){var k=y&&ZFC(l);k&&(y=!this.Z.has(k));this.Wh(l,y)}}};var Jhq=class extends ge{constructor(l,y,k,z,r){super("ads-engagement-panel-layout",l,y,k,z,r)}};var YAg=class extends hG{constructor(l,y,k,z,r,Z,e){super(l,y,k,z);this.Se=r;this.oU=Z;this.S=e;this.Vf=!0;this.V=null;this.J=k.clientMetadata.aR("metadata_type_linked_player_bytes_layout_id");Fb(this.oU(),this);l=k.clientMetadata.aR("metadata_type_ad_placement_config");this.Fr=new DT(k.NW,this.Se,l,k.layoutId)}Z5(l,y){FV("ads-engagement-panel-layout",l,this.S.get().q7,this.Se.get(),this.V,this.J,this.Y2(),this.Zp(),y)}startRendering(l){JL(this.Fr,this.Y2(),this.Zp(),g.E(this.Zp().renderingContent,
AC),this.callback,"metadata_type_ads_engagement_panel_layout_view_model",(y,k,z,r,Z)=>new Jhq(y,k,z,r,Z),this.Z);
super.startRendering(l)}s1(l,y){this.J===y.layoutId&&(this.V===null?this.V=this.Se.get().bH():EP("OnLayoutEntered should set engagePingCallback, but it was not null",this.slot,this.layout))}iq(){}iE(){}Od(){}lH(){}gy(){}Kg(){}jV(){}FJ(){}Hh(){}M4(){}fE(){}Vj(){oA(this.oU(),this);super.Vj()}};var pPz=class extends ge{constructor(l,y,k,z,r){super("banner-image",l,y,k,z,r)}};var Kyq=class extends hG{constructor(l,y,k,z,r,Z,e){super(l,y,k,z);this.Se=r;this.oU=Z;this.S=e;this.Vf=!0;this.V=null;this.J=k.clientMetadata.aR("metadata_type_linked_player_bytes_layout_id");Fb(this.oU(),this);this.adPlacementConfig=k.clientMetadata.aR("metadata_type_ad_placement_config");this.Fr=new DT(k.NW,this.Se,this.adPlacementConfig,k.layoutId)}Z5(l,y){FV("banner-image",l,this.S.get().q7,this.Se.get(),this.V,this.J,this.Y2(),this.Zp(),y)}startRendering(l){JL(this.Fr,this.Y2(),this.Zp(),g.E(this.Zp().renderingContent,
Zh),this.callback,"metadata_type_banner_image_layout_view_model",(y,k,z,r,Z)=>new pPz(y,k,z,r,Z),this.Z);
super.startRendering(l)}s1(l,y){this.J===y.layoutId&&(this.V===null?this.V=this.Se.get().bH():EP("OnLayoutEntered should set engagePingCallback, but it was not null",this.slot,this.layout))}iq(){}iE(){}Od(){}lH(){}gy(){}Kg(){}jV(){}FJ(){}Hh(){}M4(){}fE(){}Vj(){oA(this.oU(),this);super.Vj()}};var g3s=class extends ge{constructor(l,y,k,z,r){super("action-companion",l,y,k,z,r)}};var E3C=class extends hG{constructor(l,y,k,z,r,Z,e){super(l,y,k,z);this.Se=r;this.oU=Z;this.S=e;this.Vf=!0;this.V=null;this.J=k.clientMetadata.aR("metadata_type_linked_player_bytes_layout_id");Fb(this.oU(),this);l=k.clientMetadata.aR("metadata_type_ad_placement_config");this.Fr=new DT(k.NW,this.Se,l,k.layoutId)}Z5(l,y){FV("action-companion",l,this.S.get().q7,this.Se.get(),this.V,this.J,this.Y2(),this.Zp(),y)}startRendering(l){JL(this.Fr,this.Y2(),this.Zp(),g.E(this.Zp().renderingContent,kt),this.callback,
"metadata_type_action_companion_ad_renderer",(y,k,z,r,Z)=>new g3s(y,k,z,r,Z),this.Z);
super.startRendering(l)}s1(l,y){y.layoutId===this.layout.layoutId?this.Fr.Fv("impression"):this.J===y.layoutId&&(this.V===null?this.V=this.Se.get().bH():EP("OnLayoutEntered should set engagePingCallback, but it was not null",this.slot,this.layout))}iq(){}iE(){}Od(){}lH(){}gy(){}Kg(){}jV(){}FJ(){}Hh(){}M4(){}fE(){}Vj(){oA(this.oU(),this);super.Vj()}};var fIC=class extends ge{constructor(l,y,k,z,r){super("image-companion",l,y,k,z,r)}};var jc5=class extends hG{constructor(l,y,k,z,r,Z,e){super(l,y,k,z);this.Se=r;this.oU=Z;this.S=e;this.Vf=!0;this.V=null;this.J=k.clientMetadata.aR("metadata_type_linked_player_bytes_layout_id");Fb(this.oU(),this);l=k.clientMetadata.aR("metadata_type_ad_placement_config");this.Fr=new DT(k.NW,this.Se,l,k.layoutId)}Z5(l,y){FV("image-companion",l,this.S.get().q7,this.Se.get(),this.V,this.J,this.Y2(),this.Zp(),y)}startRendering(l){JL(this.Fr,this.Y2(),this.Zp(),g.E(this.Zp().renderingContent,zh),this.callback,
"metadata_type_image_companion_ad_renderer",(y,k,z,r,Z)=>new fIC(y,k,z,r,Z),this.Z);
super.startRendering(l)}s1(l,y){y.layoutId===this.layout.layoutId?this.Fr.Fv("impression"):this.J===y.layoutId&&(this.V===null?this.V=this.Se.get().bH():EP("OnLayoutEntered should set engagePingCallback, but it was not null",this.slot,this.layout))}iq(){}iE(){}Od(){}lH(){}gy(){}Kg(){}jV(){}FJ(){}Hh(){}M4(){}fE(){}Vj(){oA(this.oU(),this);super.Vj()}};var SAg=class extends ge{constructor(l,y,k,z,r){super("shopping-companion",l,y,k,z,r)}};var n34=class extends hG{constructor(l,y,k,z,r,Z,e){super(l,y,k,z);this.Se=r;this.oU=Z;this.S=e;this.Vf=!0;this.V=null;this.J=k.clientMetadata.aR("metadata_type_linked_player_bytes_layout_id");Fb(this.oU(),this);l=k.clientMetadata.aR("metadata_type_ad_placement_config");this.Fr=new DT(k.NW,this.Se,l,k.layoutId)}Z5(l,y){FV("shopping-companion",l,this.S.get().q7,this.Se.get(),this.V,this.J,this.Y2(),this.Zp(),y)}startRendering(l){JL(this.Fr,this.Y2(),this.Zp(),void 0,this.callback,"metadata_type_shopping_companion_carousel_renderer",
(y,k,z,r,Z)=>new SAg(y,k,z,r,Z),this.Z);
super.startRendering(l)}s1(l,y){y.layoutId===this.layout.layoutId?this.Fr.Fv("impression"):this.J===y.layoutId&&(this.V===null?this.V=this.Se.get().bH():EP("OnLayoutEntered should set engagePingCallback, but it was not null",this.slot,this.layout))}iq(){}iE(){}Od(){}lH(){}gy(){}Kg(){}jV(){}FJ(){}Hh(){}M4(){}fE(){}Vj(){oA(this.oU(),this);super.Vj()}};var Gv=class{constructor(l,y,k,z){this.LP=l;this.layoutId=k;this.J=z;this.C=[];this.Z=[];this.N=this.V=0;for(const r of y)switch(r.adVideoOffset?.kind){case "AD_VIDEO_PROGRESS_KIND_PERCENT":(r.adVideoOffset?.kind!=="AD_VIDEO_PROGRESS_KIND_PERCENT"?0:r.adVideoOffset?.percent!=null)?this.C.push(r):EP("Invalid AdVideoProgressPercentCommand");break;case "AD_VIDEO_PROGRESS_KIND_MILLISECONDS":(r.adVideoOffset?.kind!=="AD_VIDEO_PROGRESS_KIND_MILLISECONDS"?0:r.adVideoOffset?.milliseconds!=null&&!isNaN(Number(r.adVideoOffset.milliseconds)))?
this.Z.push(r):EP("Invalid AdVideoProgressMillisecondsCommand");break;default:EP("Unknown or invalid AdVideoProgressOffSet kind")}this.C.sort((r,Z)=>r.adVideoOffset.percent-Z.adVideoOffset.percent);
this.Z.sort((r,Z)=>Number(r.adVideoOffset.milliseconds)-Number(Z.adVideoOffset.milliseconds))}};var Fyy=class extends hG{constructor(l,y,k,z,r,Z){super(l,y,k,z);this.Se=r;this.oU=Z;this.Vf=!0;Fb(this.oU(),this);l=k.clientMetadata.aR("metadata_type_ad_placement_config");this.Fr=new DT(k.NW,this.Se,l,k.layoutId)}startRendering(l){JL(this.Fr,this.Y2(),this.Zp(),void 0,this.callback,"metadata_type_action_companion_ad_renderer",(y,k,z,r,Z)=>new g3s(y,k,z,r,Z),this.Z);
super.startRendering(l)}s1(){}iq(){}iE(){}Od(){}lH(){}gy(){}Kg(){}jV(){}FJ(){}Hh(){}M4(){}fE(){}Vj(){oA(this.oU(),this);super.Vj()}Z5(){}};var o35=class{constructor(l,y,k,z,r,Z,e,A){this.callback=l;this.slot=y;this.layout=k;this.vG=z;this.Se=r;this.p_=e;this.EA=A;this.Z=!1;l=k.clientMetadata.aR("metadata_type_ad_placement_config");this.Fr=new DT(k.NW,this.Se,l,k.layoutId);l=this.layout.clientMetadata.aR("METADATA_TYPE_INTERACTIONS_AND_PROGRESS_LAYOUT_COMMANDS")?.progressCommands||[];const Q=k.clientMetadata.aR("METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds");this.C=new Gv(Z,l,k.layoutId,()=>Q*1E3)}Y2(){return this.slot}Zp(){return this.layout}init(){this.vG.get().addListener(this);
this.vG.get().jc.push(this);const l=this.layout.clientMetadata.aR("metadata_type_video_length_seconds"),y=this.layout.clientMetadata.aR("metadata_type_active_view_traffic_type");o0(this.layout.NW)&&Sc(this.EA.get(),this.layout.layoutId,{Dg:y,Of:l,listener:this})}release(){this.vG.get().removeListener(this);KUC(this.vG.get(),this);o0(this.layout.NW)&&ng(this.EA.get(),this.layout.layoutId)}startRendering(l){this.callback.s1(this.slot,l)}Xm(l,y){O_q(this.p_.get())&&!this.Z&&(this.Fr.Fv("abandon"),this.Z=
!0);this.callback.iq(this.slot,l,y)}Xk(l){switch(l.id){case "part2viewed":this.Fr.Fv("start");this.Fr.Fv("impression");break;case "videoplaytime25":this.Fr.Fv("first_quartile");break;case "videoplaytime50":this.Fr.Fv("midpoint");break;case "videoplaytime75":this.Fr.Fv("third_quartile");break;case "videoplaytime100":O_q(this.p_.get())?this.Z||(this.Fr.Fv("complete"),this.Z=!0):this.Fr.Fv("complete");lk(this.Fr)&&R0(this.Fr,Infinity,!0);d__(this.p_.get())&&y_(this.C,Infinity,!0);break;case "engagedview":lk(this.Fr)||
this.Fr.Fv("progress");break;case "conversionview":case "videoplaybackstart":case "videoplayback2s":case "videoplayback10s":break;default:EP("Cue Range ID unknown in DiscoveryLayoutRenderingAdapter",this.slot,this.layout)}}onVolumeChange(){}n2(){}QR(){}Ev(){}onFullscreenToggled(){}CS(){}lW(){}Kv(l){d__(this.p_.get())&&y_(this.C,l*1E3,!1);lk(this.Fr)&&R0(this.Fr,l*1E3,!1)}K2(){}gp(){this.Fr.Fv("active_view_measurable")}K9(){this.Fr.Fv("active_view_viewable")}E_(){this.Fr.Fv("active_view_fully_viewable_audible_half_duration")}XZ(){this.Fr.Fv("audio_measurable")}n9(){this.Fr.Fv("audio_audible")}};var WSC=class extends hG{constructor(l,y,k,z,r,Z){super(l,y,k,z);this.vG=r;this.J=Z;this.V=!1}init(){super.init();const l=this.layout.clientMetadata.aR("metadata_type_instream_ad_player_overlay_renderer"),y={adsClientData:this.layout.KP};this.Z.push(new Hx(l,this.layout.layoutId,this.layout.clientMetadata.aR("METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds"),y,!0))}It(){this.V||this.vG.get().resumeVideo(1)}startRendering(l){super.startRendering(l);vN(this.vG.get(),"ad-showing");this.callback.s1(this.slot,
l);this.J.Tz=this}Xm(l,y){super.Xm(l,y);BN(this.vG.get(),"ad-showing");U3(this.J,this)}Z5(l){switch(l){case "ad-info-icon-button":(this.V=this.vG.get().V4(1))||this.vG.get().pauseVideo();break;case "visit-advertiser":this.vG.get().pauseVideo()}}Vj(){super.Vj()}};var N_y=class extends ge{constructor(l,y,k,z,r){super("top-banner-image-text-icon-buttoned",l,y,k,z,r)}};var scz=class extends hG{constructor(l,y,k,z,r,Z){super(l,y,k,z);this.Se=r;this.oU=Z;this.Vf=!0;Fb(this.oU(),this);l=k.clientMetadata.aR("metadata_type_ad_placement_config");this.Fr=new DT(k.NW,this.Se,l,k.layoutId)}startRendering(l){JL(this.Fr,this.Y2(),this.Zp(),void 0,this.callback,"metadata_type_top_banner_image_text_icon_buttoned_layout_view_model",(y,k,z,r,Z)=>new N_y(y,k,z,r,Z),this.Z);
super.startRendering(l)}s1(){}iq(){}iE(){}Od(){}lH(){}gy(){}Kg(){}jV(){}FJ(){}Hh(){}M4(){}fE(){}Vj(){oA(this.oU(),this);super.Vj()}Z5(){}};var Ly5=class extends ge{constructor(l,y,k){super("display-underlay-text-grid-cards",l,{},y,k);this.interactionLoggingClientData=k}};var v35=class extends hG{constructor(l,y,k,z,r,Z){super(l,y,k,z);this.Se=r;this.V=Z;this.J=this.layout.clientMetadata.aR("metadata_type_linked_player_bytes_layout_id")}init(){super.init();this.Z.push(new Ly5(g.E(this.layout.renderingContent,C0),this.layout.layoutId,{adsClientData:this.layout.KP}))}Z5(){cm(this.V.get(),this.J)&&nc(this.Se.get(),3)}startRendering(l){super.startRendering(l);this.callback.s1(this.slot,l)}Vj(){super.Vj()}};var aB=class extends ge{constructor(l,y,k,z){super("ad-action-interstitial",l,y,k,z);this.interactionLoggingClientData=z;this.Ib=this.R$=!0}};var m3T=class extends hG{constructor(l,y,k,z,r){super(l,y,k,z);l=k.clientMetadata.aR("metadata_type_ad_placement_config");this.Fr=new DT(k.NW,r,l,k.layoutId)}init(){super.init();const l=g.E(this.layout.renderingContent,eT)||this.layout.clientMetadata.aR("metadata_type_ad_action_interstitial_renderer"),y=PJ(this.Fr);this.Z.push(new aB(l,y,this.layout.layoutId,{adsClientData:this.layout.KP}))}startRendering(l){super.startRendering(l);this.callback.s1(this.slot,l)}Z5(l,y){if(y===this.layout.layoutId)switch(l){case "skip-button":(l=
this.layout.clientMetadata.aR("metadata_type_ad_pod_skip_target_callback_ref")?.current)&&KM(l,this.Y2(),this.layout)}}Vj(){super.Vj()}};var ib=class{constructor(l,y,k){this.C=l;this.N=y;this.Z=k}build(l,y,k,z){if(k0(z,{qx:["metadata_type_ad_break_response_data"],MK:["LAYOUT_TYPE_AD_BREAK_RESPONSE","LAYOUT_TYPE_THROTTLED_AD_BREAK_RESPONSE"]}))return new Vhs(l,k,z,this.C,this.N,this.Z);throw new AL(`Unsupported layout with type: ${z.layoutType} and client metadata: ${Kq(z.clientMetadata)} in `+"AdBreakRequestLayoutRenderingAdapterFactory.");}};var B_C=class extends ge{constructor(l,y,k,z,r){super("ads-engagement-panel",l,y,k,z,r)}};var HIP=class extends hG{constructor(l,y,k,z,r,Z,e){super(l,y,k,z);this.Se=r;this.oU=Z;this.S=e;this.Vf=!0;this.V=null;this.J=k.clientMetadata.aR("metadata_type_linked_player_bytes_layout_id");Fb(this.oU(),this);l=k.clientMetadata.aR("metadata_type_ad_placement_config");this.Fr=new DT(k.NW,this.Se,l,k.layoutId)}Z5(l,y){FV("ads-engagement-panel",l,this.S.get().q7,this.Se.get(),this.V,this.J,this.Y2(),this.Zp(),y)}startRendering(l){JL(this.Fr,this.Y2(),this.Zp(),g.E(this.Zp().renderingContent,ri),this.callback,
"metadata_type_ads_engagement_panel_renderer",(y,k,z,r,Z)=>new B_C(y,k,z,r,Z),this.Z);
super.startRendering(l)}s1(l,y){y.layoutId===this.layout.layoutId?this.Fr.Fv("impression"):this.J===y.layoutId&&(this.V===null?this.V=this.Se.get().bH():EP("OnLayoutEntered should set engagePingCallback, but it was not null",this.slot,this.layout))}iq(){}iE(){}Od(){}lH(){}gy(){}Kg(){}jV(){}FJ(){}Hh(){}M4(){}fE(){}Vj(){oA(this.oU(),this);super.Vj()}};var RF_=class extends hG{constructor(l,y,k,z,r,Z,e){super(l,y,k,z);this.Se=r;this.oU=Z;this.S=e;this.Vf=!0;this.V=null;this.J=k.clientMetadata.aR("metadata_type_linked_player_bytes_layout_id");Fb(this.oU(),this);this.adPlacementConfig=k.clientMetadata.aR("metadata_type_ad_placement_config");this.Fr=new DT(k.NW,this.Se,this.adPlacementConfig,k.layoutId)}Z5(l,y){FV("top-banner-image-text-icon-buttoned",l,this.S.get().q7,this.Se.get(),this.V,this.J,this.Y2(),this.Zp(),y)}startRendering(l){JL(this.Fr,
this.Y2(),this.Zp(),g.E(this.Zp().renderingContent,ea),this.callback,"metadata_type_top_banner_image_text_icon_buttoned_layout_view_model",(y,k,z,r,Z)=>new N_y(y,k,z,r,Z),this.Z);
super.startRendering(l)}s1(l,y){this.J===y.layoutId&&(this.V===null?this.V=this.Se.get().bH():EP("OnLayoutEntered should set engagePingCallback, but it was not null",this.slot,this.layout))}iq(){}iE(){}Od(){}lH(){}gy(){}Kg(){}jV(){}FJ(){}Hh(){}M4(){}fE(){}Vj(){oA(this.oU(),this);super.Vj()}};var DT4=class{constructor(l,y,k,z,r){this.M_=l;this.Se=y;this.oU=k;this.Z=z;this.EA=r}build(l,y,k,z){if(k0(z,afC())||g.E(z.renderingContent,ri)!==void 0)return new HIP(l,k,z,this.M_,this.Se,this.oU,this.Z);if(k0(z,t5t())||g.E(z.renderingContent,kt)!==void 0)return new E3C(l,k,z,this.M_,this.Se,this.oU,this.Z);if(k0(z,OFC())||g.E(z.renderingContent,zh)!==void 0)return new jc5(l,k,z,this.M_,this.Se,this.oU,this.Z);if(k0(z,d3z()))return new n34(l,k,z,this.M_,this.Se,this.oU,this.Z);if(k0(z,w__()))return new Fyy(l,
k,z,this.M_,this.Se,this.oU);if(k0(z,Qt5())||g.E(z.renderingContent,Zh)!==void 0)return new Kyq(l,k,z,this.M_,this.Se,this.oU,this.Z);if(k0(z,iFs())||g.E(z.renderingContent,ea)!==void 0)return new RF_(l,k,z,this.M_,this.Se,this.oU,this.Z);if(k0(z,hDg()))return new scz(l,k,z,this.M_,this.Se,this.oU);if(k0(z,$3Q())||g.E(z.renderingContent,AC)!==void 0)return new YAg(l,k,z,this.M_,this.Se,this.oU,this.Z);throw new AL(`Unsupported layout with type: ${z.layoutType} and client metadata: ${Kq(z.clientMetadata)} in `+
"DesktopAboveFeedLayoutRenderingAdapterFactory.");}};var lRC=class{constructor(l,y,k){this.M_=l;this.Se=y;this.Z=k}build(l,y,k,z){if(k0(z,{qx:["metadata_type_linked_player_bytes_layout_id"],MK:["LAYOUT_TYPE_DISPLAY_UNDERLAY_TEXT_GRID_CARDS"]}))return new v35(l,k,z,this.M_,this.Se,this.Z);throw new AL(`Unsupported layout with type: ${z.layoutType} and client metadata: ${Kq(z.clientMetadata)} in `+"DesktopPlayerUnderlayLayoutRenderingAdapterFactory.");}};var yd5=class{constructor(l,y,k,z,r){this.callback=l;this.slot=y;this.layout=k;this.Se=z;this.v7=r;l=this.layout.clientMetadata.aR("metadata_type_ad_placement_config");this.Fr=new DT(k.NW,this.Se,l,k.layoutId)}Y2(){return this.slot}Zp(){return this.layout}init(){}release(){}startRendering(l){l.layoutId!==this.layout.layoutId?this.callback.iH(this.slot,l,new AL("Tried to start rendering an unknown layout, this adapter "+`requires LayoutId: ${this.layout.layoutId}`+`and LayoutType: ${this.layout.layoutType}`,
void 0,"ADS_CLIENT_ERROR_MESSAGE_UNKNOWN_LAYOUT"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED"):(this.callback.s1(this.slot,l),this.Fr.Fv("impression"),jL(this.v7,l))}Xm(l,y){l.layoutId!==this.layout.layoutId?this.callback.iH(this.slot,l,new AL("Tried to stop rendering an unknown layout, this adapter "+`requires LayoutId: ${this.layout.layoutId}`+`and LayoutType: ${this.layout.layoutType}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_UNKNOWN_LAYOUT"),"ADS_CLIENT_ERROR_TYPE_EXIT_LAYOUT_FAILED"):this.callback.iq(this.slot,
l,y)}};var Ue=class{constructor(l,y,k,z){this.p_=l;this.Se=y;this.v7=k;this.EA=z}build(l,y,k,z){this.p_.get();if(k0(z,U3C()))return new yd5(l,k,z,this.Se,this.v7);throw new AL(`Unsupported layout with type: ${z.layoutType} and client metadata: ${Kq(z.clientMetadata)} in `+"ForecastingLayoutRenderingAdapterFactory.");}};var kmz=class extends ge{constructor(l,y,k,z){super("player-overlay-layout",l,{},k,z);this.videoAdDurationSeconds=y;this.interactionLoggingClientData=z}};var x35=class extends hG{constructor(l,y,k,z,r,Z,e,A,Q){super(l,y,k,z);this.vG=r;this.Se=Z;this.S=e;this.J=A;this.p_=Q;this.V=!1;this.K=this.layout.clientMetadata.aR("metadata_type_linked_player_bytes_layout_id")}init(){super.init();const l=g.E(this.layout.renderingContent,Z4)||this.layout.clientMetadata.aR("metadata_type_player_overlay_layout_renderer"),y={adsClientData:this.layout.KP};this.Z.push(new kmz(l,this.layout.clientMetadata.aR("METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds"),this.layout.layoutId,
y))}It(){this.V||this.vG.get().resumeVideo(2)}startRendering(l){super.startRendering(l);this.callback.s1(this.slot,l);this.J.Tz=this}Xm(l,y){super.Xm(l,y);U3(this.J,this)}Z5(l,y){if(!iR(this.p_.get(),"stop_handling_click_for_non_rendering_overlay_layout")||y===this.layout.layoutId){if(cm(this.S.get(),this.K))switch(l){case "visit-advertiser-link":nc(this.Se.get(),3)}switch(l){case "ad-mute-confirm-dialog-close-button":case "ad-feedback-undo-mute-button":case "ad-info-dialog-close-button":this.V||
this.vG.get().resumeVideo(2);break;case "ad-info-icon-button":case "ad-player-overflow-button":(this.V=this.vG.get().V4(2))||this.vG.get().pauseVideo();break;case "visit-advertiser-link":this.vG.get().pauseVideo();cgy(this).W0();break;case "skip-button":l=cgy(this),this.layout.renderingContent&&!Ym(this.layout.clientMetadata,"metadata_type_dai")||!l||!l.zd?(l=this.layout.clientMetadata.aR("metadata_type_ad_pod_skip_target_callback_ref")?.current)&&KM(l,this.Y2(),this.layout):(EP("Requesting to skip by LegacyPlayerBytes when components enabled"),
l.hO(this.Y2(),this.layout))}}}Vj(){super.Vj()}};var uky=class extends hG{constructor(l,y,k,z,r,Z,e,A,Q){super(l,y,k,z);this.vG=r;this.Se=Z;this.S=e;this.J=A;this.p_=Q;this.V=!1;this.K=this.layout.clientMetadata.aR("metadata_type_linked_player_bytes_layout_id")}init(){super.init();const l=g.E(this.layout.renderingContent,rd)||this.layout.clientMetadata.aR("metadata_type_instream_ad_player_overlay_renderer"),y={adsClientData:this.layout.KP};var k;(k=!!this.layout.renderingContent)||(k=zr(this),k=!(k&&k.zd));this.Z.push(new Hx(l,this.layout.layoutId,
this.layout.clientMetadata.aR("METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds"),y,k))}It(){this.V||this.vG.get().resumeVideo(2)}startRendering(l){super.startRendering(l);this.callback.s1(this.slot,l);this.J.Tz=this}Xm(l,y){super.Xm(l,y);U3(this.J,this)}Z5(l,y){if(!this.p_||!iR(this.p_.get(),"stop_handling_click_for_non_rendering_overlay_layout")||y===this.layout.layoutId){if(cm(this.S.get(),this.K))switch(l){case "visit-advertiser":nc(this.Se.get(),3)}switch(l){case "ad-mute-confirm-dialog-close-button":case "ad-feedback-undo-mute-button":case "ad-info-dialog-close-button":this.V||
this.vG.get().resumeVideo(2);break;case "ad-info-icon-button":case "ad-player-overflow-button":(this.V=this.vG.get().V4(2))||this.vG.get().pauseVideo();break;case "visit-advertiser":this.vG.get().pauseVideo();zr(this).W0();break;case "skip-button":l=zr(this),this.layout.renderingContent&&!Ym(this.layout.clientMetadata,"metadata_type_dai")||!l||!l.zd?(l=this.layout.clientMetadata.aR("metadata_type_ad_pod_skip_target_callback_ref")?.current)&&KM(l,this.Y2(),this.layout):(EP("Requesting to skip by LegacyPlayerBytes"),
l.hO(this.Y2(),this.layout))}}}Vj(){super.Vj()}};var zM4=class extends ge{constructor(l,y,k){super("ad-message",l,void 0,y,k)}};var qjy=class extends hG{constructor(l,y,k,z,r,Z){super(k,l,y,z);this.vG=r;this.p_=Z}startRendering(l){Vd(this.C,l,()=>{this.Z.push(new zM4(this.layout.clientMetadata.aR("metadata_type_valid_ad_message_renderer"),l.layoutId,l.KP));this.nM();this.callback.s1(this.slot,l);jc(this.vG.get(),1).Z(512)&&this.callback.iH(this.Y2(),this.Zp(),new AL("player is stuck during adNotify",void 0,"ADS_CLIENT_ERROR_MESSAGE_PLAYER_STUCK_DURING_ADNOTIFY"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED")})}lW(){}CS(l){l.state.isError()&&
this.callback.iH(this.Y2(),this.Zp(),new AL("A player error happened during adNotify",{playerErrorCode:l.state.Ip?.errorCode},"ADS_CLIENT_ERROR_MESSAGE_PLAYER_ERROR_DURING_ADNOTIFY"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED")}onFullscreenToggled(){}QR(){}Ev(){}n2(){}onVolumeChange(){}Xk(){}K2(){}Z5(){}};var rdq=class extends ge{constructor(l,y,k,z){super("video-interstitial-buttoned-centered",l,y,k,z);this.interactionLoggingClientData=z}};var Ifs=class extends hG{constructor(l,y,k,z,r){super(l,y,k,z);l=k.clientMetadata.aR("metadata_type_ad_placement_config");this.Fr=new DT(k.NW,r,l,k.layoutId)}init(){super.init();const l=g.E(this.layout.renderingContent,A7),y=PJ(this.Fr);this.Z.push(new rdq(l,y,this.layout.layoutId,{adsClientData:this.layout.KP}))}startRendering(l){super.startRendering(l);this.callback.s1(this.slot,l)}Z5(l,y){if(y===this.layout.layoutId)switch(l){case "skip-button":(l=this.layout.clientMetadata.aR("metadata_type_ad_pod_skip_target_callback_ref")?.current)&&
KM(l,this.Y2(),this.layout)}}Vj(){super.Vj()}};var ZH5=class{constructor(l,y,k,z,r,Z){this.M_=l;this.vG=y;this.Se=k;this.C=z;this.Z=r;this.p_=Z}build(l,y,k,z){if(l=$0(l,k,z,this.M_,this.vG,this.Se,this.C,this.Z,this.p_))return l;throw new AL(`Unsupported layout with type: ${z.layoutType} and client metadata: ${Kq(z.clientMetadata)} in `+"OtherWebInPlayerLayoutRenderingAdapterFactory.");}};var eMq=class{constructor(l,y,k,z,r,Z,e,A,Q){this.callback=l;this.slot=y;this.layout=k;this.vG=z;this.Se=r;this.p_=e;this.EA=A;this.wb=Q;this.Z=!1;l=k.clientMetadata.aR("metadata_type_ad_placement_config");this.Fr=new DT(k.NW,this.Se,l,k.layoutId);l=this.layout.clientMetadata.aR("METADATA_TYPE_INTERACTIONS_AND_PROGRESS_LAYOUT_COMMANDS")?.progressCommands||[];this.C=new Gv(Z,l,k.layoutId,()=>Tnt(this)*1E3)}Y2(){return this.slot}Zp(){return this.layout}init(){this.vG.get().addListener(this);
this.vG.get().jc.push(this);const l=Tnt(this);var y=g.E(this.layout.renderingContent,U7);const k=y?N6(y.pings):this.layout.clientMetadata.aR("metadata_type_active_view_traffic_type");y=y?y.pings?.activeViewTracking?.identifier:this.layout.clientMetadata.aR("metadata_type_active_view_identifier");o0(this.layout.NW)&&Sc(this.EA.get(),this.layout.layoutId,{Dg:k,Of:l,listener:this,Tx:y})}release(){this.vG.get().removeListener(this);KUC(this.vG.get(),this);o0(this.layout.NW)&&ng(this.EA.get(),this.layout.layoutId)}startRendering(l){this.callback.s1(this.slot,
l)}Xm(l,y){dd(this,"abandon");this.callback.iq(this.slot,l,y)}Xk(l){switch(l.id){case "part2viewed":this.Fr.Fv("start");this.Fr.Fv("impression");break;case "videoplaytime25":this.Fr.Fv("first_quartile");break;case "videoplaytime50":this.Fr.Fv("midpoint");break;case "videoplaytime75":this.Fr.Fv("third_quartile");break;case "videoplaytime100":dd(this,"complete");lk(this.Fr)&&R0(this.Fr,Infinity,!0);wMP(this.p_.get())&&y_(this.C,Infinity,!0);break;case "engagedview":lk(this.Fr)||this.Fr.Fv("progress");
break;case "conversionview":case "videoplaybackstart":case "videoplayback2s":case "videoplayback10s":break;default:EP("Cue Range ID unknown in ShortsPlaybackTrackingLayoutRenderingAdapter",this.slot,this.layout)}}onVolumeChange(){}n2(){}QR(){}Ev(){}onFullscreenToggled(){}CS(l){this.Z||(l.tj(4)&&!l.tj(2)?HJ(this.Fr,"pause"):fe(l,4)<0&&!(fe(l,2)<0)&&HJ(this.Fr,"resume"))}lW(){}Kv(l){wMP(this.p_.get())&&y_(this.C,l*1E3,!1);lk(this.Fr)&&R0(this.Fr,l*1E3,!1)}K2(){dd(this,"swipe")}gp(){this.Fr.Fv("active_view_measurable")}K9(){this.Fr.Fv("active_view_viewable")}E_(){this.Fr.Fv("active_view_fully_viewable_audible_half_duration")}XZ(){this.Fr.Fv("audio_measurable")}n9(){this.Fr.Fv("audio_audible")}};var Ads=class{constructor(l,y,k,z,r,Z){this.vG=l;this.Se=y;this.LP=k;this.p_=z;this.EA=r;this.wb=Z}build(l,y,k,z){if(k.slotType==="SLOT_TYPE_PLAYER_BYTES_SEQUENCE_ITEM"&&g.E(z.renderingContent,U7)!==void 0)return new eMq(l,k,z,this.vG,this.Se,this.LP,this.p_,this.EA,this.wb);y=["metadata_type_ad_placement_config"];for(const r of Lc())y.push(r);if(k0(z,{qx:y,MK:["LAYOUT_TYPE_DISCOVERY_PLAYBACK_TRACKER"]}))return k.slotType==="SLOT_TYPE_PLAYER_BYTES_SEQUENCE_ITEM"?new eMq(l,k,z,this.vG,this.Se,this.LP,
this.p_,this.EA,this.wb):new o35(l,k,z,this.vG,this.Se,this.LP,this.p_,this.EA);throw new AL(`Unsupported layout with type: ${z.layoutType} and client metadata: ${Kq(z.clientMetadata)} in `+"PlaybackTrackingLayoutRenderingAdapterFactory.");}};g.Gr=class{constructor(l,y={},k=0){this.errorCode=l;this.details=y;this.severity=k}};var $Yz;
$Yz={z_:"ALREADY_PINNED_ON_A_DEVICE",AUTHENTICATION_EXPIRED:"AUTHENTICATION_EXPIRED",Us:"AUTHENTICATION_MALFORMED",LV:"AUTHENTICATION_MISSING",I5:"BAD_REQUEST",BW:"CAST_SESSION_DEVICE_MISMATCHED",yD:"CAST_SESSION_VIDEO_MISMATCHED",A7:"CAST_TOKEN_EXPIRED",wr:"CAST_TOKEN_FAILED",xG:"CAST_TOKEN_MALFORMED",fV:"CGI_PARAMS_MALFORMED",i6:"CGI_PARAMS_MISSING",v4:"DEVICE_FALLBACK",Fd:"GENERIC_WITH_LINK_AND_CPN",Ou:"ERROR_HDCP",Gj:"LICENSE",kA:"VIDEO_UNAVAILABLE",h4:"FORMAT_UNAVAILABLE",MZ:"GEO_FAILURE",BD:"HTML5_AUDIO_RENDERER_ERROR",
yw:"GENERIC_WITHOUT_LINK",A4:"HTML5_NO_AVAILABLE_FORMATS_FALLBACK",w_:"HTML5_NO_AVAILABLE_FORMATS_FALLBACK_WITH_LINK",fT:"HTML5_NO_AVAILABLE_FORMATS_FALLBACK_WITH_LINK_SHORT",iZ:"HTML5_SPS_UMP_STATUS_REJECTED",DS:"INVALID_DRM_MESSAGE",e$0:"PURCHASE_NOT_FOUND",b_R:"PURCHASE_REFUNDED",gz$:"RENTAL_EXPIRED",xdr:"RETRYABLE_ERROR",ddK:"SERVER_ERROR",ZPj:"SIGNATURE_EXPIRED",JvG:"STOPPED_BY_ANOTHER_PLAYBACK",qA_:"STREAMING_DEVICES_QUOTA_PER_24H_EXCEEDED",o2j:"STREAMING_NOT_ALLOWED",Q7z:"STREAM_LICENSE_NOT_FOUND",
P50:"TOO_MANY_REQUESTS",ap0:"TOO_MANY_REQUESTS_WITH_LINK",IpR:"TOO_MANY_STREAMS_PER_ENTITLEMENT",SAr:"TOO_MANY_STREAMS_PER_USER",UNSUPPORTED_DEVICE:"UNSUPPORTED_DEVICE",T4z:"VIDEO_FORBIDDEN",tNj:"VIDEO_NOT_FOUND",gr:"BROWSER_OR_EXTENSION_ERROR"};
g.r6={ALREADY_PINNED_ON_A_DEVICE:"Video n\u00e0y \u0111\u00e3 \u0111\u01b0\u1ee3c t\u1ea3i xu\u1ed1ng s\u1ed1 thi\u1ebft b\u1ecb t\u1ed1i \u0111a m\u00e0 ch\u1ee7 b\u1ea3n quy\u1ec1n cho ph\u00e9p. B\u1ea1n c\u1ea7n b\u1ecf ghim video n\u00e0y tr\u00ean m\u1ed9t thi\u1ebft b\u1ecb kh\u00e1c th\u00ec m\u1edbi c\u00f3 th\u1ec3 ph\u00e1t video n\u00e0y t\u1ea1i \u0111\u00e2y.",DEVICE_FALLBACK:"R\u1ea5t ti\u1ebfc, video n\u00e0y kh\u00f4ng kh\u1ea3 d\u1ee5ng tr\u00ean thi\u1ebft b\u1ecb n\u00e0y.",GENERIC_WITH_LINK_AND_CPN:"\u0110\u00e3 x\u1ea3y ra l\u1ed7i. Vui l\u00f2ng th\u1eed l\u1ea1i sau. (M\u00e3 l\u01b0\u1ee3t ph\u00e1t: $CPN) $BEGIN_LINKT\u00ecm hi\u1ec3u th\u00eam$END_LINK",
LICENSE:"R\u1ea5t ti\u1ebfc, \u0111\u00e3 x\u1ea3y ra l\u1ed7i khi c\u1ea5p ph\u00e9p video n\u00e0y.",VIDEO_UNAVAILABLE:"Video kh\u00f4ng c\u00f3 s\u1eb5n",FORMAT_UNAVAILABLE:"Video n\u00e0y hi\u1ec7n kh\u00f4ng ho\u1ea1t \u0111\u1ed9ng \u1edf ch\u1ea5t l\u01b0\u1ee3ng \u0111\u00e3 ch\u1ecdn. Vui l\u00f2ng th\u1eed l\u1ea1i sau.",GEO_FAILURE:"Video n\u00e0y kh\u00f4ng kh\u1ea3 d\u1ee5ng \u1edf qu\u1ed1c gia c\u1ee7a b\u1ea1n.",HTML5_AUDIO_RENDERER_ERROR:"L\u1ed7i t\u00e1i t\u1ea1o \u00e2m thanh. Vui l\u00f2ng kh\u1edfi \u0111\u1ed9ng l\u1ea1i m\u00e1y t\u00ednh c\u1ee7a b\u1ea1n.",
GENERIC_WITHOUT_LINK:"\u0110\u00e3 x\u1ea3y ra l\u1ed7i. Vui l\u00f2ng th\u1eed l\u1ea1i sau.",HTML5_NO_AVAILABLE_FORMATS_FALLBACK:"\u0110\u1ecbnh d\u1ea1ng video n\u00e0y kh\u00f4ng \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3.",HTML5_NO_AVAILABLE_FORMATS_FALLBACK_WITH_LINK:"Tr\u00ecnh duy\u1ec7t c\u1ee7a b\u1ea1n hi\u1ec7n kh\u00f4ng nh\u1eadn ra b\u1ea5t k\u1ef3 \u0111\u1ecbnh d\u1ea1ng video kh\u1ea3 d\u1ee5ng n\u00e0o. $BEGIN_LINKNh\u1ea5p v\u00e0o \u0111\u00e2y \u0111\u1ec3 truy c\u1eadp c\u00e1c c\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p c\u1ee7a ch\u00fang t\u00f4i v\u1ec1 video HTML5.$END_LINK",
HTML5_NO_AVAILABLE_FORMATS_FALLBACK_WITH_LINK_SHORT:"Tr\u00ecnh duy\u1ec7t c\u1ee7a b\u1ea1n kh\u00f4ng th\u1ec3 ph\u00e1t video n\u00e0y. $BEGIN_LINKT\u00ecm hi\u1ec3u th\u00eam$END_LINK",HTML5_SPS_UMP_STATUS_REJECTED:"\u0110\u00e3 x\u1ea3y ra l\u1ed7i. H\u00e3y l\u00e0m m\u1edbi ho\u1eb7c th\u1eed l\u1ea1i sau. $BEGIN_LINKT\u00ecm hi\u1ec3u th\u00eam$END_LINK",INVALID_DRM_MESSAGE:"Th\u00f4ng b\u00e1o ri\u00eang c\u1ee7a h\u1ec7 th\u1ed1ng DRM kh\u00f4ng h\u1ee3p l\u1ec7.",PURCHASE_NOT_FOUND:"Video n\u00e0y y\u00eau c\u1ea7u thanh to\u00e1n.",
PURCHASE_REFUNDED:"Giao d\u1ecbch mua video n\u00e0y \u0111\u00e3 \u0111\u01b0\u1ee3c ho\u00e0n l\u1ea1i ti\u1ec1n.",RENTAL_EXPIRED:"Th\u1eddi gian thu\u00ea video n\u00e0y \u0111\u00e3 h\u1ebft h\u1ea1n.",CAST_SESSION_DEVICE_MISMATCHED:"Thi\u1ebft b\u1ecb trong Phi\u00ean truy\u1ec1n kh\u00f4ng kh\u1edbp v\u1edbi thi\u1ebft b\u1ecb \u0111\u01b0\u1ee3c y\u00eau c\u1ea7u.",CAST_SESSION_VIDEO_MISMATCHED:"Video trong Phi\u00ean truy\u1ec1n kh\u00f4ng kh\u1edbp v\u1edbi video \u0111\u01b0\u1ee3c y\u00eau c\u1ea7u.",
CAST_TOKEN_FAILED:"Phi\u00ean truy\u1ec1n kh\u00f4ng kh\u1ea3 d\u1ee5ng. H\u00e3y l\u00e0m m\u1edbi ho\u1eb7c th\u1eed l\u1ea1i sau.",CAST_TOKEN_EXPIRED:"Phi\u00ean truy\u1ec1n \u0111\u00e3 h\u1ebft h\u1ea1n. H\u00e3y l\u00e0m m\u1edbi.",CAST_TOKEN_MALFORMED:"Phi\u00ean truy\u1ec1n kh\u00f4ng h\u1ee3p l\u1ec7. H\u00e3y l\u00e0m m\u1edbi ho\u1eb7c th\u1eed l\u1ea1i sau.",SERVER_ERROR:"\u0110\u00e3 x\u1ea3y ra l\u1ed7i m\u00e1y ch\u1ee7 n\u1ed9i b\u1ed9. Vui l\u00f2ng th\u1eed l\u1ea1i sau.",STOPPED_BY_ANOTHER_PLAYBACK:"T\u00e0i kho\u1ea3n c\u1ee7a b\u1ea1n \u0111ang ph\u00e1t video n\u00e0y \u1edf m\u1ed9t v\u1ecb tr\u00ed kh\u00e1c. H\u00e3y t\u1ea3i l\u1ea1i trang n\u00e0y \u0111\u1ec3 ti\u1ebfp t\u1ee5c xem.",
STREAM_LICENSE_NOT_FOUND:"Ph\u00e1t l\u1ea1i video b\u1ecb gi\u00e1n \u0111o\u1ea1n. Vui l\u00f2ng th\u1eed l\u1ea1i.",STREAMING_DEVICES_QUOTA_PER_24H_EXCEEDED:"B\u1ea1n \u0111\u00e3 s\u1eed d\u1ee5ng qu\u00e1 nhi\u1ec1u thi\u1ebft b\u1ecb/\u0111\u1ecba ch\u1ec9 IP trong kho\u1ea3ng th\u1eddi gian 24 gi\u1edd.",STREAMING_NOT_ALLOWED:"Kh\u00f4ng \u0111\u01b0\u1ee3c ph\u00e9p ph\u00e1t l\u1ea1i v\u00ec video n\u00e0y \u0111\u00e3 \u0111\u01b0\u1ee3c ghim tr\u00ean m\u1ed9t thi\u1ebft b\u1ecb kh\u00e1c.",
RETRYABLE_ERROR:"\u0110\u00e3 x\u1ea3y ra l\u1ed7i m\u00e1y ch\u1ee7 t\u1ea1m th\u1eddi. Vui l\u00f2ng th\u1eed l\u1ea1i sau.",TOO_MANY_REQUESTS:"Vui l\u00f2ng \u0111\u0103ng nh\u1eadp \u0111\u1ec3 xem video n\u00e0y.",TOO_MANY_REQUESTS_WITH_LINK:"Vui l\u00f2ng $BEGIN_LINKnh\u1ea5p v\u00e0o \u0111\u00e2y$END_LINK \u0111\u1ec3 xem video n\u00e0y tr\u00ean YouTube.",TOO_MANY_STREAMS_PER_USER:"Qu\u00e1 tr\u00ecnh ph\u00e1t l\u1ea1i b\u1ecb d\u1eebng do c\u00f3 qu\u00e1 nhi\u1ec1u video thu\u1ed9c c\u00f9ng m\u1ed9t t\u00e0i kho\u1ea3n \u0111ang ph\u00e1t.",
TOO_MANY_STREAMS_PER_ENTITLEMENT:"Qu\u00e1 tr\u00ecnh ph\u00e1t l\u1ea1i b\u1ecb d\u1eebng do video n\u00e0y \u0111\u00e3 \u0111\u01b0\u1ee3c ph\u00e1t tr\u00ean qu\u00e1 nhi\u1ec1u thi\u1ebft b\u1ecb.",UNSUPPORTED_DEVICE:"Thi\u1ebft b\u1ecb n\u00e0y kh\u00f4ng h\u1ed7 tr\u1ee3 ph\u00e1t l\u1ea1i.",VIDEO_FORBIDDEN:"B\u1ea1n kh\u00f4ng \u0111\u01b0\u1ee3c ph\u00e9p truy c\u1eadp video n\u00e0y.",VIDEO_NOT_FOUND:"Kh\u00f4ng th\u1ec3 t\u00ecm th\u1ea5y video n\u00e0y.",BROWSER_OR_EXTENSION_ERROR:"\u0110\u00e3 x\u1ea3y ra l\u1ed7i. H\u00e3y l\u00e0m m\u1edbi ho\u1eb7c th\u1eed l\u1ea1i sau. $BEGIN_LINKT\u00ecm hi\u1ec3u th\u00eam$END_LINK"};var Mr;{var QPP=g.Xv();const l=QPP.match(/\((iPad|iPhone|iPod)( Simulator)?;/);if(!l||l.length<2)Mr=void 0;else{var Xo=QPP.match(/\((iPad|iPhone|iPod)( Simulator)?; (U; )?CPU (iPhone )?OS (\d+_\d)[_ ]/);Mr=Xo&&Xo.length===6?Number(Xo[5].replace("_",".")):0}}var k5=Mr,$1=k5>=0;g.cI=class extends IT{j(l,y,k,z,r){return super.j(l,y,k,z,r)}};var cV={FAIRPLAY:"fairplay",PLAYREADY:"playready",WIDEVINE:"widevine",CLEARKEY:null,FLASHACCESS:null,UNKNOWN:null,WIDEVINE_CLASSIC:null};var ST=class{constructor(l=0,y=0,k="SPATIAL_AUDIO_TYPE_NONE",z=!1,r,Z,e="AUDIO_QUALITY_UNKNOWN",A=!1){this.sampleRate=l;this.numChannels=y;this.spatialAudioType=k;this.Z=z;this.N=r;this.V=Z;this.audioQuality=e;this.C=A}isMultiChannelAudio(){return this.numChannels>2}};var vt={WIDTH:{name:"width",video:!0,valid:640,qc:99999},HEIGHT:{name:"height",video:!0,valid:360,qc:99999},FRAMERATE:{name:"framerate",video:!0,valid:30,qc:9999},BITRATE:{name:"bitrate",video:!0,valid:3E5,qc:2E9},EOTF:{name:"eotf",video:!0,valid:"bt709",qc:"catavision"},CHANNELS:{name:"channels",video:!1,valid:2,qc:99},CRYPTOBLOCKFORMAT:{name:"cryptoblockformat",video:!0,valid:"subsample",qc:"invalidformat"},DECODETOTEXTURE:{name:"decode-to-texture",video:!0,valid:"false",qc:"nope"},AV1_CODECS:{name:"codecs",
video:!0,valid:"av01.0.05M.08",qc:"av99.0.05M.08"},EXPERIMENTAL:{name:"experimental",video:!0,valid:"allowed",qc:"invalid"},TUNNELMODE:{name:"tunnelmode",video:!0,valid:"true",qc:"false"}};var ttT=["h","H"],OHT=["9","("],dY_=["9h","(h"],w8C=["8","*"],hMt=["a","A"],Gmz=["o","O"],aRP=["m","M"],iH5=["mac3","MAC3"],UYy=["meac3","MEAC3"],Lm_={h:ttT,H:ttT,["9"]:OHT,["("]:OHT,["9h"]:dY_,["(h"]:dY_,["8"]:w8C,["*"]:w8C,a:hMt,A:hMt,o:Gmz,O:Gmz,m:aRP,M:aRP,mac3:iH5,MAC3:iH5,meac3:UYy,MEAC3:UYy},Mtg=new Set("o O a ah A m M mac3 MAC3 meac3 MEAC3 so sa".split(" ")),izP=new Set("m M mac3 MAC3 meac3 MEAC3".split(" "));var i9={["0"]:"f",["160"]:"h",["133"]:"h",["134"]:"h",["135"]:"h",["136"]:"h",["137"]:"h",["264"]:"h",["266"]:"h",["138"]:"h",["298"]:"h",["299"]:"h",["304"]:"h",["305"]:"h",["214"]:"h",["216"]:"h",["374"]:"h",["375"]:"h",["140"]:"a",["141"]:"a",["327"]:"sa",["258"]:"m",["380"]:"mac3",["328"]:"meac3",["161"]:"H",["142"]:"H",["143"]:"H",["144"]:"H",["222"]:"H",["223"]:"H",["145"]:"H",["224"]:"H",["225"]:"H",["146"]:"H",["226"]:"H",["227"]:"H",["147"]:"H",["384"]:"H",["376"]:"H",["385"]:"H",["377"]:"H",
["149"]:"A",["261"]:"M",["381"]:"MAC3",["329"]:"MEAC3",["598"]:"9",["278"]:"9",["242"]:"9",["243"]:"9",["244"]:"9",["775"]:"9",["776"]:"9",["777"]:"9",["778"]:"9",["779"]:"9",["780"]:"9",["781"]:"9",["782"]:"9",["783"]:"9",["247"]:"9",["248"]:"9",["353"]:"9",["355"]:"9",["356"]:"9",["271"]:"9",["577"]:"9",["313"]:"9",["579"]:"9",["272"]:"9",["302"]:"9",["303"]:"9",["407"]:"9",["408"]:"9",["308"]:"9",["315"]:"9",["330"]:"9h",["331"]:"9h",["332"]:"9h",["333"]:"9h",["334"]:"9h",["335"]:"9h",["336"]:"9h",
["337"]:"9h",["338"]:"so",["600"]:"o",["250"]:"o",["251"]:"o",["774"]:"o",["194"]:"*",["195"]:"*",["220"]:"*",["221"]:"*",["196"]:"*",["197"]:"*",["279"]:"(",["280"]:"(",["317"]:"(",["318"]:"(",["273"]:"(",["274"]:"(",["357"]:"(",["358"]:"(",["275"]:"(",["359"]:"(",["360"]:"(",["276"]:"(",["583"]:"(",["584"]:"(",["314"]:"(",["585"]:"(",["561"]:"(",["277"]:"(",["361"]:"(h",["362"]:"(h",["363"]:"(h",["364"]:"(h",["365"]:"(h",["366"]:"(h",["591"]:"(h",["592"]:"(h",["367"]:"(h",["586"]:"(h",["587"]:"(h",
["368"]:"(h",["588"]:"(h",["562"]:"(h",["409"]:"(",["410"]:"(",["411"]:"(",["412"]:"(",["557"]:"(",["558"]:"(",["394"]:"1",["395"]:"1",["396"]:"1",["397"]:"1",["398"]:"1",["399"]:"1",["720"]:"1",["721"]:"1",["400"]:"1",["401"]:"1",["571"]:"1",["402"]:"1",["694"]:"1h",["695"]:"1h",["696"]:"1h",["697"]:"1h",["698"]:"1h",["699"]:"1h",["700"]:"1h",["701"]:"1h",["702"]:"1h",["703"]:"1h",["386"]:"3",["387"]:"w",["406"]:"6",["787"]:"1",["788"]:"1",["548"]:"1e",["549"]:"1e",["550"]:"1e",["551"]:"1e",["809"]:"1e",
["810"]:"1e",["552"]:"1e",["811"]:"1e",["812"]:"1e",["553"]:"1e",["813"]:"1e",["814"]:"1e",["554"]:"1e",["815"]:"1e",["816"]:"1e",["555"]:"1e",["817"]:"1e",["818"]:"1e",["572"]:"1e",["556"]:"1e",["645"]:"(",["646"]:"(",["647"]:"(",["648"]:"(",["649"]:"(",["650"]:"(",["651"]:"(",["652"]:"(",["653"]:"(",["654"]:"(",["655"]:"(",["656"]:"(",["657"]:"(",["658"]:"(",["659"]:"(",["660"]:"(",["661"]:"(",["662"]:"(",["663"]:"(",["664"]:"(",["665"]:"(",["666"]:"(",["667"]:"(",["668"]:"(",["669"]:"(",["670"]:"(",
["671"]:"(",["672"]:"(",["673"]:"(",["674"]:"(h",["675"]:"(h",["676"]:"(h",["677"]:"(h",["678"]:"(h",["679"]:"(h",["680"]:"(h",["681"]:"(h",["682"]:"(h",["683"]:"(h",["684"]:"(h",["685"]:"(h",["686"]:"(h",["687"]:"(h",["688"]:"A",["689"]:"A",["690"]:"A",["691"]:"MEAC3",["773"]:"i",["806"]:"I",["805"]:"I",["829"]:"9",["830"]:"9",["831"]:"9",["832"]:"9",["833"]:"9",["834"]:"9",["835"]:"9",["836"]:"9",["892"]:"9",["893"]:"9",["837"]:"9",["838"]:"9",["839"]:"9",["840"]:"9",["841"]:"(",["842"]:"(",["843"]:"(",
["844"]:"(",["845"]:"(",["846"]:"(",["847"]:"(",["848"]:"(",["894"]:"(",["895"]:"(",["849"]:"(",["850"]:"(",["851"]:"(",["852"]:"(",["865"]:"9",["866"]:"9",["867"]:"9",["868"]:"9",["869"]:"9",["870"]:"9",["871"]:"9",["872"]:"9",["896"]:"9",["897"]:"9",["873"]:"9",["874"]:"9",["875"]:"9",["876"]:"9",["877"]:"(",["878"]:"(",["879"]:"(",["880"]:"(",["881"]:"(",["882"]:"(",["883"]:"(",["884"]:"(",["898"]:"(",["899"]:"(",["885"]:"(",["886"]:"(",["887"]:"(",["888"]:"(",["900"]:"2",["901"]:"2",["902"]:"2",
["903"]:"2",["904"]:"2",["905"]:"2",["906"]:"2",["907"]:"2",["908"]:"2"};var eTy={STEREO_LAYOUT_UNKNOWN:0,STEREO_LAYOUT_LEFT_RIGHT:1,STEREO_LAYOUT_TOP_BOTTOM:2};var oaC={ar0:0,qjr:124,Jaa:144,rae:220,QR$:240,pGr:340,H_e:360,R$R:480,UdR:588,vz0:608,LKe:720,urj:740,sRe:1080,Nb7:1100,Vej:1440,oz$:2160,P0_:9999,0:"QUALITY_ORDINAL_UNKNOWN",124:"QUALITY_ORDINAL_144P_SAVER",144:"QUALITY_ORDINAL_144P",220:"QUALITY_ORDINAL_240P_SAVER",240:"QUALITY_ORDINAL_240P",340:"QUALITY_ORDINAL_360P_SAVER",360:"QUALITY_ORDINAL_360P",480:"QUALITY_ORDINAL_480P",588:"QUALITY_ORDINAL_608P_SAVER",608:"QUALITY_ORDINAL_608P",720:"QUALITY_ORDINAL_720P",740:"QUALITY_ORDINAL_720P_ENHANCED",
1080:"QUALITY_ORDINAL_1080P",1100:"QUALITY_ORDINAL_1080P_ENHANCED",1440:"QUALITY_ORDINAL_1440P",2160:"QUALITY_ORDINAL_2160P",9999:"QUALITY_ORDINAL_HIGHRES"};g.X84={Ic:"auto",L8z:"tiny",K1:"light",s7b:"small",Yt:"medium",Ec:"large",SG:"hd720",uZ:"hd1080",PD:"hd1440",a6:"hd2160",I6:"hd2880",KT:"highres",UNKNOWN:"unknown"};var IE,$5q;g.pk={auto:0,tiny:144,light:144,small:240,medium:360,large:480,hd720:720,hd1080:1080,hd1440:1440,hd2160:2160,hd2880:2880,highres:4320};IE={0:"auto",144:"tiny",240:"small",360:"medium",480:"large",720:"hd720",1080:"hd1080",1440:"hd1440",2160:"hd2160",2880:"hd2880",4320:"highres"};
$5q={QUALITY_ORDINAL_UNKNOWN:0,QUALITY_ORDINAL_144P_SAVER:124,QUALITY_ORDINAL_144P:144,QUALITY_ORDINAL_240P_SAVER:220,QUALITY_ORDINAL_240P:240,QUALITY_ORDINAL_360P_SAVER:340,QUALITY_ORDINAL_360P:360,QUALITY_ORDINAL_480P:480,QUALITY_ORDINAL_608P_SAVER:588,QUALITY_ORDINAL_608P:608,QUALITY_ORDINAL_720P:720,QUALITY_ORDINAL_720P_ENHANCED:740,QUALITY_ORDINAL_1080P:1080,QUALITY_ORDINAL_1080P_ENHANCED:1100,QUALITY_ORDINAL_1440P:1440,QUALITY_ORDINAL_2160P:2160,QUALITY_ORDINAL_HIGHRES:9999};var Y0="highres hd2880 hd2160 hd1440 hd1080 hd720 large medium small tiny".split(" ");var nk=class{constructor(l,y,k,z,r,Z,e,A,Q,t){this.width=l;this.height=y;this.N=A;this.quality=Z||Kk(l,y);this.qualityOrdinal=g.pk[this.quality];this.fps=k||0;this.stereoLayout=!r||z!=null&&z!=="UNKNOWN"&&z!=="RECTANGULAR"?0:r;this.projectionType=z?z==="EQUIRECTANGULAR"&&r===2?"EQUIRECTANGULAR_THREED_TOP_BOTTOM":z:"UNKNOWN";(l=e)||(k=g.pk[this.quality],k===0?l="T\u01b0\u0323 \u0111\u00f4\u0323ng":(l=this.projectionType,y=this.fps,l=k.toString()+(l==="EQUIRECTANGULAR"||l==="EQUIRECTANGULAR_THREED_TOP_BOTTOM"||
l==="MESH"?"s":"p")+(y>55?"60":y>49?"50":y>39?"48":"")));this.qualityLabel=l;this.Z=Q||"";this.primaries=t||""}C(){return this.fps>32}isHdr(){return this.Z==="smpte2084"||this.Z==="arib-std-b67"}};var FP=class{constructor(l,y,k={}){this.id=l;this.mimeType=y;k.CP>0||(k.CP=16E3);Object.assign(this,k);[this.itag,this.C]=this.id.split(";");this.containerType=gd(y);this.Dr=i9[this.itag]||""}K(){return this.video}A(){return this.audio}Cg(){return this.containerType===2}V(){return this.Dr==="9"||this.Dr==="("||this.Dr==="9h"||this.Dr==="(h"}Z(){return this.Dr==="1"||this.Dr==="1h"||s1&&this.Dr==="1e"}S(){return this.Dr==="mac3"||this.Dr==="meac3"||this.Dr==="m"||this.Dr==="i"||Lwe(this)}isEncrypted(){return!!this.contentProtection}a9(){return!!this.audio}q4(){return!!this.video}N(){return this.mimeType===
"application/x-mpegURL"}},s1=!1;var U4Q=class extends g.z1{constructor(l,y,k,z){super();this.Y3=l;this.start=y;this.end=k;this.isActive=z;this.appendWindowStart=0;this.appendWindowEnd=Infinity;this.timestampOffset=0;this.TT={error:()=>{!this.IR()&&this.isActive&&this.publish("error",this)},
updateend:()=>{!this.IR()&&this.isActive&&this.publish("updateend",this)}};
this.Y3.IZ(this.TT);this.kY=this.isActive}appendBuffer(l,y,k){if(this.Y3.Qp()!==this.appendWindowStart+this.start||this.Y3.bf()!==this.appendWindowEnd+this.start||this.Y3.w4()!==this.timestampOffset+this.start)this.Y3.supports(1),this.Y3.b7(this.appendWindowStart+this.start,this.appendWindowEnd+this.start),this.Y3.EG(this.timestampOffset+this.start);this.Y3.appendBuffer(l,y,k)}abort(){this.Y3.abort()}remove(l,y){this.Y3.remove(l+this.start,y+this.start)}removeAll(){this.remove(this.appendWindowStart,
this.appendWindowEnd)}clear(){this.Y3.clear()}b7(l,y){this.appendWindowStart=l;this.appendWindowEnd=y}lU(){return this.timestampOffset+this.start}Qp(){return this.appendWindowStart}bf(){return this.appendWindowEnd}EG(l){this.timestampOffset=l}w4(){return this.timestampOffset}Za(l=!1){l=this.Y3.Za(l);return rV(l,this.start,this.end)}U6(){return this.Y3.U6()}S1(){return this.Y3.S1()}oZ(){return this.Y3.oZ()}aW(){return this.Y3.aW()}J2(){this.Y3.J2()}Vg(l){return this.Y3.Vg(l)}iO(){return this.Y3.iO()}oJ(){return this.Y3.oJ()}DU(l,
y,k){this.Y3.DU(l,y,k)}Yo(l,y,k){this.Y3.Yo(l,y,k)}x4(l,y){return this.Y3.x4(l,y)}supports(l){return this.Y3.supports(l)}rA(){return this.Y3.rA()}isView(){return!0}Nn(){return this.Y3.Nn()?this.isActive:!1}isLocked(){return this.kY&&!this.isActive}Dp(l){l=this.Y3.Dp(l);l.vw=`${this.start}-${this.end}`;return l}Qt(){return this.Y3.Qt()}a8(){return this.Y3.a8()}mL(){return this.Y3.mL()}Vj(){this.Y3.zN(this.TT);super.Vj()}};var c4=!1;var aJT=class extends g.z1{constructor(l,y,k,z,r,Z){super();this.i5=l;this.py=y;this.id=k;this.containerType=z;this.Dr=r;this.q4=Z;this.zm=this.pm=this.Tv=null;this.pL=!1;this.appendWindowStart=this.timestampOffset=0;this.Qx=Ht([],[]);this.Kj=!1;this.Ht=[];this.hA=OM?[]:void 0;this.handler=e=>this.publish(e.type,this);
this.i5?.addEventListener&&(this.i5.addEventListener("updateend",this.handler),this.i5.addEventListener("error",this.handler))}appendBuffer(l,y,k){this.Kj=!1;k&&(this.pm=k);l.length&&(this.i5?.appendBuffer?this.i5.appendBuffer(l):this.i5?this.i5.append(l):this.py&&this.py.webkitSourceAppend(this.id,l));y&&(y.isEncrypted()&&(this.zm=this.pm),y.type===3&&(this.Tv=y),this.Ht.push(y.rY()),this.Ht.length>4&&this.Ht.shift());this.hA&&(this.hA.length>=2||l.length>1048576?delete this.hA:this.hA.push(l))}abort(){try{this.i5?
this.i5.abort():this.py&&this.py.webkitSourceAbort(this.id)}catch(l){pBQ&&g.WH(new g.WO(`Error while abort the source buffer: ${l.name}, ${l.message}`))}this.pm=this.Tv=null}remove(l,y,k){this.Kj=!1;this.i5?.remove&&(k&&k({b:YR(this.Za()),s:l,e:y}),this.i5.remove(l,y))}removeAll(){this.remove(this.Qp(),this.bf())}clear(){this.oZ()||(this.abort(),this.removeAll(),this.zm=this.pm=this.Tv=null,this.appendWindowStart=this.timestampOffset=0,this.Qx=Ht([],[]),this.Kj=!1,this.hA=OM?[]:void 0,this.pL=!0)}Qp(){return c4&&
this.q4?this.appendWindowStart:this.i5?.appendWindowStart||0}bf(){return this.i5?.appendWindowEnd||0}b7(l,y){this.i5&&(c4&&this.q4?(this.appendWindowStart=l,this.i5.appendWindowEnd=y):l>this.Qp()?(this.i5.appendWindowEnd=y,this.i5.appendWindowStart=l):(this.i5.appendWindowStart=l,this.i5.appendWindowEnd=y))}lU(){return this.timestampOffset}EG(l){c4?this.timestampOffset=l:this.supports(1)&&(this.i5.timestampOffset=l)}w4(){return c4?this.timestampOffset:this.supports(1)?this.i5.timestampOffset:0}Za(l=
!1){if(l)return this.Kj||this.U6()||(this.Qx=this.Za(!1),this.Kj=!0),this.Qx;try{return this.i5?this.i5.buffered:this.py?this.py.webkitSourceBuffered(this.id):Ht([0],[Infinity])}catch(y){return Ht([],[])}}U6(){return this.i5?.updating||!1}oZ(){return this.pL}aW(){return!this.pL&&this.U6()}J2(){this.pL=!1}Vg(l){const y=l?.Dr;l=l?.containerType;return!y&&!l||y===this.Dr&&l===this.containerType}iO(){return this.pm}oJ(){return this.zm}x4(l,y){return this.containerType!==l||this.Dr!==y}DU(l,y,k){if(this.containerType!==
l||k&&this.x4(l,k))this.supports(4),eL()&&this.i5.changeType(y),k&&(this.Dr=k);this.containerType=l}Yo(l,y,k){this.containerType&&this.x4(l,y)&&eL()&&this.i5.changeType(k);this.containerType=l;this.Dr=y}rA(){return this.Tv}isView(){return!1}supports(l){switch(l){case 1:return this.i5?.timestampOffset!==void 0;case 0:return!!this.i5?.appendBuffer;case 2:return!!this.i5?.remove;case 3:return!(!this.i5?.addEventListener||!this.i5?.removeEventListener);case 4:return!(!this.i5||!this.i5.changeType);default:return!1}}Nn(){return!this.U6()}isLocked(){return!1}Dp(l){l.to=
this.w4();l.up=this.U6();l.aw=`${(this.i5?.appendWindowStart||0).toFixed(3)}-${(this.i5?.appendWindowEnd||Infinity).toFixed(3)}`;return l}S1(){return this.i5?.writeHead||0}Qt(){const l={};for(let y=0;y<this.Ht.length;y++)l[`s${y}`]=this.Ht[y];return l}Vj(){this.supports(3)&&(this.i5.removeEventListener("updateend",this.handler),this.i5.removeEventListener("error",this.handler));super.Vj()}a8(){return this.containerType}mL(){return this.hA}},OM=!1,pBQ=!1;var CD=class{constructor(l,y=!1){this.pP=l;this.Z=y;this.C=!1}dispose(){if(!this.IR()){if(this.Z)try{URL.revokeObjectURL(this.pP)}catch(l){}this.C=!0}}IR(){return this.C}N(){return this.Z}equals(l){return l!==null&&l.pP===this.pP}toString(){return`MediaResource {${this.pP}}`}};var O5=class extends g.zP{constructor(l,y,k=!1){super();this.mediaElement=l;this.yj=y;this.isView=k;this.A=0;this.J=!1;this.K=!0;this.b0=0;this.callback=null;this.Y=!1;this.yj||(this.py=this.mediaElement.Jv());this.events=new g.cI(this);g.x(this,this.events);this.V=new CD(this.yj?window.URL.createObjectURL(this.yj):this.py.webkitMediaSourceURL,!0);l=this.yj||this.py;rz(this.events,l,["sourceopen","webkitsourceopen"],this.rb);rz(this.events,l,["sourceclose","webkitsourceclose"],this.RR);this.D={updateend:this.sj}}Ja(){return this.V}getDuration(){return this.yj?.duration||
this.b0}BZ(l){try{this.yj?this.yj.duration=l:(this.b0=l,this.py.webkitSourceSetDuration(l))}catch(y){}}S(){return!!this.Z||!!this.C}AC(){try{return this.N()==="closed"}catch(l){return!0}}N(){if(this.yj)return this.yj.readyState;switch(this.py.webkitSourceState){case this.py.SOURCE_OPEN:return"open";case this.py.SOURCE_ENDED:return"ended";default:return"closed"}}U6(){return!!(this.Z&&this.Z.U6()||this.C&&this.C.U6())}rb(){!this.IR()&&$X(this)&&this.callback&&(this.callback(this),this.callback=null)}RR(){this.dispose()}sj(l){QS&&
!this.J&&l.oZ()&&l.Za().length===0&&(tN(this.mediaElement,{l:"mswoue",sr:this.mediaElement.BG?.Ly()},!1),l.J2(),this.oZ()||(this.mediaElement.wA=!0,this.mediaElement.setCurrentTime(0)))}clear(){hYe(this,()=>{});
this.Z?.clear();this.C?.clear()}C_(){this.Z?.J2();this.C?.J2();this.K=!1}oZ(){return this.C?.oZ()||this.Z?.oZ()}Vg(l,y){return!!this.Z&&!!this.C&&this.Z.Vg(y)&&this.C.Vg(l)}HG(){return!!this.yj&&this.yj.streaming===!1}},QS=!1;var fA=class{constructor(){this.wI=this.MD=A5Q;this.promise=new g.gs((l,y)=>{this.MD=l;this.wI=y})}then(l,y){return this.promise.then(l,y)}resolve(l){this.MD(l)}reject(l){this.wI(l)}};var cdQ=class extends g.zP{constructor(){super();this.wA=!1;this.pP=null;this.hv=this.xz=!1;this.HG=new g.Wd;this.mediaKeys=this.BG=null;g.x(this,this.HG)}RR(){return this.pP}activate(l){let y="";l&&(XRP(this,l),y=l.pP);if(!this.VR()||y)y&&this.VR()!==y&&(this.gb(y),delete this.C,this.V&&(this.V.reject(),delete this.V),!window.MediaSource&&window.ManagedMediaSource&&this.g4(!!l?.N())),l&&l.Z||this.load(),this.hv||(this.addEventListener("volumechange",this.R7),this.hv=!0)}bX(l,y){if(this.C)if(tH&&
this.C.S()&&!this.C.Vg(l,y))tN(this,{l:"megms",sr:this.BG?.Ly()}),C85(this),this.stopVideo();else return this.yj=this.C,this.C=void 0,this.yj;l=window.MediaSource?new O5(this,new window.MediaSource,!1):window.ManagedMediaSource?new O5(this,new window.ManagedMediaSource,!1):window.WebKitMediaSource?new O5(this,new window.WebKitMediaSource,!1):new O5(this,void 0,!1);this.activate(l.V);this.yj=l;this.wA=!1;return l}PF(l){this.C=l}playVideo(){this.isEnded()&&this.seekTo(0);!this.VR()&&this.pP&&(g.n(Error("playVideo without src")),
this.gb(this.pP.pP),this.pP.Z||this.load());const l=this.play();this.BG?.NC()||$1&&(k5||0)>=7&&(!l||this.BG?.X("mweb_ios_allow_playback_workaround_when_ready"))&&V5y(this,()=>{g.JK(()=>{buz(this,this.getCurrentTime(),0)},500)});
return l}seekTo(l){this.N()>0&&($1&&k5<4&&(l=Math.max(.1,l)),this.setCurrentTime(l))}lI(){if(!this.C&&this.yj)if(this.yj.K)try{tN(this,{l:"mer",sr:this.BG?.Ly(),rs:this.yj.N()}),this.yj.clear(),this.PF(this.yj),this.yj=void 0}catch(l){const y=new g.WO(`Error while clearing Media Source in MediaElement: ${l.name}, ${l.message}`);g.n(y);this.stopVideo()}else this.stopVideo()}stopVideo(){if(!this.C)if(this.yj?.C_(),Q9){if(!this.V){var l=new fA;l.then(void 0,()=>{});
this.V=l;YZg&&this.pause();g.JK(()=>{this.V===l&&(hN(this),l.resolve())},200)}}else hN(this)}qS(){const l=this.Cy();
return kX(l)&&this.getDuration()?lt(l,this.getCurrentTime()):0}FO(){const l=this.getDuration();return l===Infinity?1:l?this.qS()/l:0}Dp(){try{const l=this.getSize();return{vct:this.getCurrentTime().toFixed(3),vd:this.getDuration().toFixed(3),vpl:YR(this.J(),",",3),vbu:YR(this.Cy()),vbs:YR(this.A()),vpa:`${+this.isPaused()}`,vsk:`${+this.isSeeking()}`,ven:`${+this.isEnded()}`,vpr:`${this.getPlaybackRate()}`,vrs:`${this.N()}`,vns:`${this.PG()}`,vec:`${this.eV()}`,vemsg:this.hC(),vvol:`${this.getVolume()}`,
vdom:`${+this.T7()}`,vsrc:`${+!!this.VR()}`,vw:`${l.width}`,vh:`${l.height}`}}catch{return{}}}hasError(){return this.eV()>0}addEventListener(l,y){this.HG.listen(l,y,!1,this);this.WG(l)}removeEventListener(l,y){this.HG.uq(l,y,!1,this)}dispatchEvent(l){if(this.V&&l.type==="pause")return!1;if(tH){var y=l.Z?.timeStamp||Infinity;y=y>performance.now()?y-Date.now()+performance.now():y;const k=this.C||this.yj;if(k?.oZ()||y<=(k?.A||0))return tN(this,{l:"mede",sr:this.BG?.Ly(),et:l.type}),!1;if(this.wA)return tN(this,
{l:"medes",et:l.type}),k&&l.type==="seeking"&&(k.A=performance.now(),this.wA=!1),!1}return this.HG.dispatchEvent(l)}kz(){this.xz=!1}Oj(){this.xz=!0;this.D(!0)}R7(){this.xz&&!this.u0()&&this.D(!0)}equals(l){return!!l&&l.Jv()===this.Jv()}Vj(){this.hv&&this.removeEventListener("volumechange",this.R7);Q9&&hN(this);super.Vj()}},Q9=!1,YZg=!1,tH=!1,x4z=!1;var bb;g.U5=class{constructor(l,y=null,k=null){this.Ip=y;this.seekSource=k;this.state=l||64}Z(l){return!!(this.state&l)}isPaused(){return this.Z(4)}isPlaying(){return this.Z(8)&&!this.Z(512)&&!this.Z(64)&&!this.Z(2)}isOrWillBePlaying(){return this.Z(8)&&!this.Z(2)&&!this.Z(1024)}C(){return this.state===8}isCued(){return this.Z(64)&&!this.Z(8)&&!this.Z(4)}isBuffering(){return this.Z(1)&&!this.Z(2)}isError(){return this.Z(128)}isSuspended(){return this.Z(512)}zX(){return this.Z(64)&&this.Z(4)}toString(){return`PSt.${this.state.toString(16)}`}};
bb={BUFFERING:"buffering-mode",CUED:"cued-mode",ENDED:"ended-mode",PAUSED:"paused-mode",PLAYING:"playing-mode",SEEKING:"seeking-mode",UNSTARTED:"unstarted-mode"};var CVe=class extends g.zP{constructor(l,y,k,z,r,Z,e,A,Q,t,O,d,w,h,U){super();this.z6=l;this.slot=y;this.layout=k;this.Se=z;this.EA=r;this.wb=Z;this.vG=e;this.Ll=A;this.LP=Q;this.Bj=t;this.position=O;this.V=d;this.p_=w;this.WI=h;this.context=U;this.Vf=!0;this.N=!1;this.Z3="not_rendering";this.Z=!1;l=this.layout.clientMetadata.aR("metadata_type_ad_placement_config");this.Fr=new DT(k.NW,this.Se,l,k.layoutId);l=mV(this)?.progressCommands||[];this.C=new Gv(Q,l,k.layoutId,()=>this.yJ())}Y2(){return this.slot}Zp(){return this.layout}init(){const l=
this.layout.clientMetadata.aR("metadata_type_video_length_seconds"),y=this.layout.clientMetadata.aR("metadata_type_active_view_traffic_type");
o0(this.layout.NW)&&Sc(this.EA.get(),this.layout.layoutId,{Dg:y,Of:l,listener:this});NX(this.Se.get(),this);this.x0()}WL(){}release(){o0(this.layout.NW)&&ng(this.EA.get(),this.layout.layoutId);s6(this.Se.get(),this);this.c6()}iT(){}ND(){}startRendering(l){if(l.layoutId!==this.layout.layoutId){this.z6.iH(this.slot,l,new AL("Tried to start rendering an unknown layout, this adapter "+`requires LayoutId: ${this.layout.layoutId}`+`and LayoutType: ${this.layout.layoutType}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_UNKNOWN_LAYOUT"),
"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED");var y=!1}else y=!0;y&&(this.Z3="rendering_start_requested",this.Bj(-1),this.ql(l),this.YW(!1))}s1(l,y){y.layoutId===this.layout.layoutId&&(this.Z3="rendering",this.Z=this.vG.get().isMuted()||this.vG.get().getVolume()===0,this.Fv("impression"),this.Fv("start"),this.vG.get().isMuted()&&(qH(this,"mute"),l=mV(this)?.muteCommands||[],Gs(this.LP.get(),l,this.layout.layoutId)),this.vG.get().isFullscreen()&&(this.Wh("fullscreen"),l=mV(this)?.fullscreenCommands||
[],Gs(this.LP.get(),l,this.layout.layoutId)),l=this.Ll.get(),l.N&&!l.C&&(l.J=!1,l.C=!0,l.actionType!=="ad_to_video"&&(Eo("pbs",void 0,l.actionType),g.EJ("finalize_all_timelines")&&JTQ(l.actionType))),this.Bj(1),this.xU(y),y=mV(this)?.impressionCommands||[],Gs(this.LP.get(),y,this.layout.layoutId))}wf(l,y,k){this.J={QL:3,jl:l==="load_timeout"?402:400,errorMessage:y.message};this.Fv("error");l=mV(this)?.errorCommands||[];Gs(this.LP.get(),l,this.layout.layoutId);this.z6.iH(this.slot,this.layout,y,k)}Ay(l,
y=!1){if(this.Z3==="rendering"){R0(this.Fr,l*1E3,y);TLT(this,l*1E3,y);var k=this.yJ();k&&(k/=1E3,(l>=k*.25||y)&&this.Fv("first_quartile"),(l>=k*.5||y)&&this.Fv("midpoint"),(l>=k*.75||y)&&this.Fv("third_quartile"),this.p_.get().L.O().experiments.z7("enable_progress_command_flush_on_kabuki")?y_(this.C,l*1E3,y):y_(this.C,l*1E3,P8T(this)?y:!1))}}ra(){return O1(this.wb.get(),1)?.clientPlaybackNonce||""}cM(l,y){l.layoutId!==this.layout.layoutId?this.z6.iH(this.slot,l,new AL("Tried to stop rendering an unknown layout, this adapter "+
`requires LayoutId: ${this.layout.layoutId}`+`and LayoutType: ${this.layout.layoutType}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_UNKNOWN_LAYOUT"),"ADS_CLIENT_ERROR_TYPE_EXIT_LAYOUT_FAILED"):y()}iq(l,y,k){if(y.layoutId===this.layout.layoutId)switch(this.Z3="not_rendering",this.layoutExitReason=void 0,(l=k!=="normal"||this.position+1===this.V)&&this.YW(l),this.iB(k),this.Bj(0),k){case "abandoned":D_(this.Fr,"impression")&&(k=mV(this)?.abandonCommands||[],Gs(this.LP.get(),k,this.layout.layoutId));break;case "normal":k=
mV(this)?.completeCommands||[];Gs(this.LP.get(),k,this.layout.layoutId);break;case "skipped":k=mV(this)?.skipCommands||[],Gs(this.LP.get(),k,this.layout.layoutId)}}S6(){return this.layout.layoutId}VV(){return this.J}gp(){if(this.Z3==="rendering"){this.Fr.Fv("active_view_measurable");var l=mV(this)?.activeViewMeasurableCommands||[];Gs(this.LP.get(),l,this.layout.layoutId)}}E_(){if(this.Z3==="rendering"){this.Fr.Fv("active_view_fully_viewable_audible_half_duration");var l=mV(this)?.activeViewFullyViewableAudibleHalfDurationCommands||
[];Gs(this.LP.get(),l,this.layout.layoutId)}}K9(){if(this.Z3==="rendering"){this.Fr.Fv("active_view_viewable");var l=mV(this)?.activeViewViewableCommands||[];Gs(this.LP.get(),l,this.layout.layoutId)}}n9(){if(this.Z3==="rendering"){this.Fr.Fv("audio_audible");var l=mV(this)?.activeViewAudioAudibleCommands||[];Gs(this.LP.get(),l,this.layout.layoutId)}}XZ(){if(this.Z3==="rendering"){this.Fr.Fv("audio_measurable");var l=mV(this)?.activeViewAudioMeasurableCommands||[];Gs(this.LP.get(),l,this.layout.layoutId)}}YW(l){this.Ll.get().YW(this.layout.clientMetadata.aR("metadata_type_ad_placement_config").kind,
l,this.position,this.V,!1)}onFullscreenToggled(l){this.Z3==="rendering"&&(l?(this.Wh("fullscreen"),l=mV(this)?.fullscreenCommands||[],Gs(this.LP.get(),l,this.layout.layoutId)):(this.Wh("end_fullscreen"),l=mV(this)?.endFullscreenCommands||[],Gs(this.LP.get(),l,this.layout.layoutId)))}onVolumeChange(){if(this.Z3==="rendering")if(this.vG.get().isMuted()){qH(this,"mute");var l=mV(this)?.muteCommands||[];Gs(this.LP.get(),l,this.layout.layoutId)}else qH(this,"unmute"),l=mV(this)?.unmuteCommands||[],Gs(this.LP.get(),
l,this.layout.layoutId)}QR(){}Ev(){}n2(){}Xk(){}K2(){}Wh(l){this.Fr.Wh(l,!this.Z)}Fv(l){this.Fr.Fv(l,!this.Z)}};var EGC=class extends CVe{constructor(l){super(l.z6,l.slot,l.Om,l.Se,l.EA,l.wb,l.vG,l.Ll,l.LP,l.Bj,l.dD,l.jo,l.p_,l.WI,l.context);this.zd=!0;this.Y7=this.rP=0;this.LL=JV(()=>{this.z6.s1(this.slot,this.layout)});
this.GM=l.GM;this.D7=l.D7;this.il=JV(()=>{this.Z3!=="rendering_stop_requested"&&this.D7(this);this.Uh()});
this.timer=new g.rm(200);this.timer.listen("tick",()=>{this.Pn()});
g.x(this,this.timer)}Uh(){this.layoutExitReason?this.z6.iq(this.slot,this.layout,this.layoutExitReason):qpC(this)}x0(){}c6(){var l=this.Se.get();l.mQ===this&&(l.mQ=null);this.timer.stop()}iT(){this.timer.stop();WJP(this)}ND(){gGq(this);IJs(this)}yJ(){return this.Zp().clientMetadata.aR("METADATA_TYPE_MEDIA_BREAK_LAYOUT_DURATION_MILLISECONDS")}AP(){return this.rP/1E3}Xm(l,y){this.cM(l,()=>{this.Z3!=="rendering_stop_requested"&&(this.Z3="rendering_stop_requested",this.layoutExitReason=y,JRg(this,y),
this.timer.stop())})}Pn(){const l=Date.now(),y=l-this.Y7;
this.Y7=l;this.rP+=y;this.rP>=this.yJ()?(this.rP=this.yJ(),this.Ay(this.rP/1E3,!0),VS(this,this.rP),this.il()):(this.Ay(this.rP/1E3),VS(this,this.rP))}CS(l){if(this.Z3!=="not_rendering"){l=YpT(this,l);var y=this.vG.get().getPresentingPlayerType()===2;this.Z3==="rendering_start_requested"?y&&Q_(l)&&this.LL():y?l.tj(2)?EP("Receive player ended event during MediaBreak",this.Y2(),this.Zp()):pRC(this,l):this.GC()}}ql(){KJQ(this);HN(this.vG.get());this.Se.get().mQ=this;K4("pbp")||K4("pbs")||Eo("pbp");K4("pbp",
"watch")||K4("pbs","watch")||Eo("pbp",void 0,"watch");this.LL()}xU(l){this.Ll.get();var y=l.clientMetadata.aR("metadata_type_ad_placement_config").kind,k=this.position===0;l=l.clientMetadata.aR("metadata_type_linked_in_player_layout_type");l={adBreakType:Ii(y),adType:PXT(l)};let z=void 0;k?y!=="AD_PLACEMENT_KIND_START"&&(z="video_to_ad"):z="ad_to_ad";Jt("ad_mbs",void 0,z);g.YV(l,z);gGq(this)}GC(){this.il()}iB(){}lW(){}};var jv_=class extends CVe{Uh(){this.Z3!=="rendering_stop_requested"&&this.D7(this);this.layoutExitReason?this.z6.iq(this.slot,this.layout,this.layoutExitReason):qpC(this)}constructor(l){super(l.callback,l.slot,l.Om,l.Se,l.EA,l.wb,l.vG,l.Ll,l.LP,l.Bj,l.dD,l.jo,l.p_,l.WI,l.context);this.adCpn="";this.BK=this.hJ=0;this.LL=JV(()=>{this.z6.s1(this.slot,this.layout)});
this.il=JV(()=>{this.Uh()});
this.q5=l.wb;this.wy=l.wy;this.mw=l.mw;this.VE=l.VE;this.GM=l.GM;this.Sb=l.Sb;this.D7=l.D7;iR(this.p_.get(),"html5_disable_media_load_timeout")||(this.L6=new g.B_(()=>{this.wf("load_timeout",new AL("Media layout load timeout.",{},"ADS_CLIENT_ERROR_MESSAGE_MEDIA_LAYOUT_LOAD_TIMEOUT",!0),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED")},1E4));
l=sN(this.p_.get());const y=Lw(this.p_.get());l&&y&&(this.Lo=new g.B_(()=>{const k=this.layout.clientMetadata.aR("metadata_type_preload_player_vars");k&&this.mw.get().L.preloadVideoByPlayerVars(k,2,300)}))}GC(){this.il()}CS(l){this.Yg(l)}x0(){this.Zp().clientMetadata.aR("metadata_type_player_bytes_callback_ref").current=this;
this.shrunkenPlayerBytesConfig=this.Zp().clientMetadata.aR("metadata_type_shrunken_player_bytes_config")}c6(){this.Zp().clientMetadata.aR("metadata_type_player_bytes_callback_ref").current=null;this.bd&&this.VE.get().removeCueRange(this.bd);this.bd=void 0;this.L6?.dispose();this.Lo&&this.Lo.dispose()}ql(l){var y=l.clientMetadata.aR("metadata_type_ad_placement_config");y=sN(this.p_.get(),y);var k=Lw(this.p_.get());if(y&&k){k=l.clientMetadata.aR("metadata_type_preload_player_vars");var z=this.p_.get();
z=g.i_(z.L.O().experiments,"html5_preload_wait_time_secs");k&&this.Lo&&this.Lo.start(z*1E3)}k=l.clientMetadata.aR("metadata_type_ad_video_id");z=l.clientMetadata.aR("metadata_type_legacy_info_card_vast_extension");k&&z&&this.Sb.get().L.O().RR.add(k,{oO:z});(k=l.clientMetadata.aR("metadata_type_sodar_extension_data"))&&VoP(this.wy.get(),k);gPQ(this.vG.get(),!1);KJQ(this);y?(k=this.mw.get(),l=l.clientMetadata.aR("metadata_type_player_vars"),k.L.loadVideoByPlayerVars(l,!1,2)):pg(this.mw.get(),l.clientMetadata.aR("metadata_type_player_vars"));
this.L6?.start();y||this.mw.get().L.playVideo(2)}xU(){this.L6?.stop();this.hD();(this.adCpn=O1(this.wb.get(),2)?.clientPlaybackNonce||"")||EP("Media layout confirmed started, but ad CPN not set.");Jv(this.GM.get(),"onAdStart",this.adCpn);this.hJ=Date.now()}yJ(){return O1(this.wb.get(),2)?.eR}W0(){this.Fr.Wh("clickthrough")}Xm(l,y){this.cM(l,()=>{this.Z3!=="rendering_stop_requested"&&(this.Z3="rendering_stop_requested",this.layoutExitReason=y,JRg(this,y),this.L6?.stop(),this.Lo&&this.Lo.stop(),gPQ(this.vG.get(),
!0),this.shrunkenPlayerBytesConfig?.shouldRequestShrunkenPlayerBytes&&this.vG.get().lN(!1))})}onCueRangeEnter(l){l!==this.bd?EP("Received CueRangeEnter signal for unknown layout.",this.Y2(),this.Zp(),{cueRangeId:l}):(this.VE.get().removeCueRange(this.bd),this.bd=void 0,l=this.Zp().clientMetadata.aR("metadata_type_video_length_seconds"),(!JN(this)||(this.q5.get().getAccumulatedWatchTime()?.accumulatedWatchTimeMillis||-1)>=l*1E3-500)&&this.Ay(l,!0),this.Fv("complete"))}iB(l){l!=="abandoned"&&Jv(this.GM.get(),
"onAdComplete");
Jv(this.GM.get(),"onAdEnd",this.adCpn)}hD(){this.bd=`${"adcompletioncuerange"}:${this.Zp().layoutId}`;this.VE.get().addCueRange(this.bd,0x7ffffffffffff,0x8000000000000,!1,this,2,2)}onCueRangeExit(){}lW(l){this.Z3==="rendering"&&(this.shrunkenPlayerBytesConfig&&this.shrunkenPlayerBytesConfig.shouldRequestShrunkenPlayerBytes&&l>=(this.shrunkenPlayerBytesConfig.playerProgressOffsetSeconds||0)&&this.vG.get().lN(!0),JN(this)?(l=this.q5.get().getAccumulatedWatchTime()?.accumulatedWatchTimeMillis||-1,l>
0&&this.Ay(l/1E3)):this.Ay(l))}Ay(l,y=!1){super.Ay(l,y);y=Date.now()-this.hJ;const k=l*1E3,z={contentCpn:this.ra(),adCpn:O1(this.wb.get(),2)?.clientPlaybackNonce||""};if(l-this.BK>=5){const r=y<k*.4?0:1;gM(r,"n.k_",{metadata:z,cg:y,hn:Math.floor(k/1E3)});AK("NKDSTAT",r);if(y=r===0)y=this.Y2().clientMetadata.aR("metadata_type_player_bytes_slot_metadata"),y===void 0&&EP("PlayerBytesSlotMetadata is not filled",this.Y2(),this.Zp()),y=y?.tp===!0;y&&Jv(this.GM.get(),"onAbnormalityDetected");this.BK=l}}Yg(l){if(this.Z3!==
"not_rendering"){l=YpT(this,l);var y=this.vG.get().getPresentingPlayerType()===2;this.Z3==="rendering_start_requested"?y&&Q_(l)&&(JN(this)?this.z6.s1(this.slot,this.layout):this.LL()):!y||l.tj(2)?JN(this)?this.Uh():this.il():pRC(this,l)}}};var LJ_=class extends g.zP{constructor(l,y,k,z,r,Z,e,A,Q,t,O,d,w,h){super();this.callback=l;this.wb=y;this.yE=k;this.mw=z;this.vG=r;this.Qu=Z;this.Ll=e;this.H6=A;this.slot=Q;this.layout=t;this.Ps=O;this.v7=d;this.oU=w;this.p_=h;this.Vf=!0;this.WO=!1;this.fJ=[];this.dW=-1;this.PP=!1}Y2(){return this.slot}Zp(){return this.layout}Wr(){}iT(l,y){const k=YX(this);y.layoutId!==pM(k,l,y)?EP("pauseLayout for a PlayerBytes layout that is not currently active",l,y):k.iT()}ND(l,y){const k=YX(this);y.layoutId!==
pM(k,l,y)?EP("resumeLayout for a PlayerBytes layout that is not currently active",l,y):k.ND()}hO(l,y){const k=YX(this);this.dW===this.fJ.length-1&&EP("Unexpected skip requested during the last sublayout",YX(this)?.Y2(),YX(this)?.Zp(),{requestingSlot:l,requestingLayout:y});y.layoutId!==pM(k,l,y)?(EP("onSkipRequested for a PlayerBytes layout that is not currently active",k.Y2(),k.Zp()),l=!1):l=!0;l&&E5(this,k.Y2(),k.Zp(),"skipped")}hW(l,y){hQQ(this.H6,l,y)}s1(l,y){YX(this)?.s1(l,y)}iq(l,y,k){y.layoutId===
this.Zp().layoutId&&(this.WO=!1,oA(this.oU(),this));YX(this)?.iq(l,y,k)}lW(l){YX(this)?.lW(l)}Wx(l,y,k){this.dW===-1&&(this.callback.s1(this.slot,this.layout),this.dW++);const z=YX(this);z?z.wf(l,y,k):EP("No active adapter found onLayoutError in PlayerBytesVodCompositeLayoutRenderingAdapter",void 0,void 0,{activeSubLayoutIndex:String(this.dW),layoutId:this.Zp().layoutId})}onFullscreenToggled(l){YX(this)?.onFullscreenToggled(l)}QR(l){YX(this)?.QR(l)}n2(l){YX(this)?.n2(l)}onVolumeChange(){YX(this)?.onVolumeChange()}init(){var l=
this.Zp().clientMetadata.aR("metadata_type_player_bytes_layout_controls_callback_ref");l&&(l.current=this);if(this.fJ.length<1)throw new F("Invalid sub layout rendering adapter length when scheduling composite layout.",{length:String(this.fJ.length)});if(l=this.Zp().clientMetadata.aR("metadata_type_ad_pod_skip_target_callback_ref"))l.current=this;for(const y of this.fJ)y.init(),duQ(this.H6,this.slot,y.Zp()),wcC(this.H6,this.slot,y.Zp())}release(){var l=this.Zp().clientMetadata.aR("metadata_type_player_bytes_layout_controls_callback_ref");
l&&(l.current=null);if(l=this.Zp().clientMetadata.aR("metadata_type_ad_pod_skip_target_callback_ref"))l.current=null;for(const z of this.fJ){l=this.H6;var y=this.slot,k=z.Zp();for(const r of l.C)r.M4(y,k);z.release()}}cM(l){return l.layoutId!==this.Zp().layoutId?(this.callback.iH(this.Y2(),l,new AL("Tried to start rendering an unknown layout, this adapter "+`requires LayoutId: ${this.Zp().layoutId}`+`and LayoutType: ${this.Zp().layoutType}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_UNKNOWN_LAYOUT"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED"),
!1):!0}hh(){this.vG.get().addListener(this);Fb(this.oU(),this)}startRendering(l){this.cM(l)&&(this.hh(),$__(this.Ll.get()),hHP(this.p_.get())||HN(this.vG.get()),this.dW===-1&&gV(this,this.dW+1))}Xm(l,y){this.WO=!0;this.dW===this.fJ.length?this.callback.iq(this.slot,this.layout,y):(l=YX(this),l.Xm(l.Zp(),y),this.oN=()=>{this.callback.iq(this.slot,this.layout,y)});
this.vG.get().L.hU();pg(this.mw.get(),{});l=jc(this.vG.get(),1);l.isPaused()&&!l.Z(2)&&this.vG.get().playVideo();this.vG.get().removeListener(this);this.WO&&sv4(this)}CS(l){if(l.state.isError())this.Wx(l.state.Ip?.errorCode,new AL("There was a player error during this media layout.",{playerErrorCode:l.state.Ip?.errorCode},"ADS_CLIENT_ERROR_MESSAGE_PLAYER_ERROR"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED");else{var y=YX(this);y&&y.CS(l)}}Ev(){}iE(){}Od(){}lH(){}gy(){}Kg(){}jV(){}FJ(){}Hh(){}M4(){}fE(){}Xk(){}K2(){}CN(l,
y,k){E5(this,l,y,k)}Z_(l,y){E5(this,l,y,"error")}};var BLe=class extends g.zP{constructor(l,y,k,z,r,Z,e){super();this.callback=l;this.mw=y;this.vG=k;this.Ll=z;this.aY=r;this.oU=Z;this.p_=e;this.Vf=!0;this.WO=!1}Y2(){return this.aY.Y2()}Zp(){return this.aY.Zp()}init(){const l=this.Zp().clientMetadata.aR("metadata_type_player_bytes_layout_controls_callback_ref");l&&(l.current=this);this.x0()}x0(){this.aY.init()}release(){const l=this.Zp().clientMetadata.aR("metadata_type_player_bytes_layout_controls_callback_ref");l&&(l.current=null);this.c6()}c6(){this.aY.release()}iT(){this.aY.iT()}ND(){this.aY.ND()}hO(l,
y){EP("Unexpected onSkipRequested from PlayerBytesVodSingleLayoutRenderingAdapter.  Skip should be handled by Triggers",this.Y2(),this.Zp(),{requestingSlot:l,requestingLayout:y})}startRendering(l){l.layoutId!==this.Zp().layoutId?this.callback.iH(this.Y2(),l,new AL("Tried to start rendering an unknown layout, this adapter "+`requires LayoutId: ${this.Zp().layoutId}`+`and LayoutType: ${this.Zp().layoutType}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_UNKNOWN_LAYOUT"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED"):
(this.vG.get().addListener(this),Fb(this.oU(),this),$__(this.Ll.get()),hHP(this.p_.get())||HN(this.vG.get()),this.aY.startRendering(l))}Xm(l,y){this.WO=!0;this.aY.Xm(l,y);this.vG.get().L.hU();pg(this.mw.get(),{});l=jc(this.vG.get(),1);l.isPaused()&&!l.Z(2)&&this.vG.get().playVideo();this.vG.get().removeListener(this);this.WO&&this.aY.GC()}s1(l,y){this.aY.s1(l,y)}iq(l,y,k){y.layoutId===this.Zp().layoutId&&(this.WO=!1,oA(this.oU(),this));this.aY.iq(l,y,k);y.layoutId===this.Zp().layoutId&&fM(this.Ll.get())}lW(l){this.aY.lW(l)}CS(l){l.state.isError()?
this.Wx(l.state.Ip?.errorCode,new AL("There was a player error during this media layout.",{playerErrorCode:l.state.Ip?.errorCode},"ADS_CLIENT_ERROR_MESSAGE_PLAYER_ERROR"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED"):this.aY.CS(l)}Wx(l,y,k){this.aY.wf(l,y,k)}onFullscreenToggled(l){this.aY.onFullscreenToggled(l)}QR(l){this.aY.QR(l)}n2(l){this.aY.n2(l)}onVolumeChange(){this.aY.onVolumeChange()}Ev(){}iE(){}Od(){}lH(){}gy(){}Kg(){}jV(){}FJ(){}Hh(){}M4(){}fE(){}Xk(){}K2(){}};var bH5=class{constructor(l,y,k,z,r,Z,e,A,Q,t){this.callback=l;this.slot=y;this.layout=k;this.wb=z;this.yE=r;this.Ba=Z;this.vG=e;this.Fr=A;this.Se=Q;this.K=t;this.driftRecoveryMs=this.layout.clientMetadata.aR("metadata_type_drift_recovery_ms")||null;this.V=this.layout.clientMetadata.aR("metadata_type_prefetch_metadata")!==void 0}Y2(){return this.slot}Zp(){return this.layout}init(){this.Ba.get().addListener(this);this.vG.get().addListener(this);var l=this.layout.clientMetadata.aR("metadata_type_layout_enter_ms");
var y=this.layout.clientMetadata.aR("metadata_type_layout_exit_ms");if(this.V){var k=this.Ba.get().Kn.slice(-1)[0];k!==void 0&&(l=k.startSecs*1E3,y=(k.startSecs+k.yK)*1E3)}this.WL(l,y);k=this.wb.get().gJ?.clientPlaybackNonce;const z=this.layout.KP.adClientDataEntry;SL(this.Se.get(),{daiStateTrigger:{filledAdsDurationMs:y-l,contentCpn:k,adClientData:z}});var r=this.Ba.get();r=RYT(r.N,l,y);r!==null&&(SL(this.Se.get(),{daiStateTrigger:{filledAdsDurationMs:r-l,contentCpn:k,cueDurationChange:"DAI_CUE_DURATION_CHANGE_SHORTER",
adClientData:z}}),this.yE.get().VJ(r,y))}release(){this.c6();this.Ba.get().removeListener(this);this.vG.get().removeListener(this)}startRendering(){this.ql();this.callback.s1(this.slot,this.layout)}Xm(l,y){this.S(y);this.driftRecoveryMs!==null&&(nM(this,{driftRecoveryMs:this.driftRecoveryMs.toString(),breakDurationMs:Math.round(D45(this)-this.layout.clientMetadata.aR("metadata_type_layout_enter_ms")).toString(),driftFromHeadMs:Math.round(this.vG.get().L.ot()*1E3).toString()}),this.driftRecoveryMs=
null);this.callback.iq(this.slot,this.layout,y)}TI(){return!1}m7(l){const y=this.layout.clientMetadata.aR("metadata_type_layout_enter_ms"),k=this.layout.clientMetadata.aR("metadata_type_layout_exit_ms");l*=1E3;y<=l&&l<k&&(SL(this.Se.get(),{daiStateTrigger:{filledAdsDurationMs:l-y,contentCpn:this.wb.get().gJ?.clientPlaybackNonce,cueDurationChange:"DAI_CUE_DURATION_CHANGE_SHORTER",adClientData:this.layout.KP.adClientDataEntry}}),this.yE.get().VJ(l,k))}lW(l){this.J(l);l=R6(this.vG.get(),2,!0);if(cm(this.K.get(),
this.layout.layoutId)){var y=this.layout.clientMetadata.aR("metadata_type_layout_enter_ms"),k=this.driftRecoveryMs;if(!(k===null||l*1E3<y+k)){this.driftRecoveryMs=null;var z=D45(this),r=this.vG.get().L.ot(),Z=Math.min(l+r,z/1E3);Z<=l?nM(this,{driftRecoveryMs:k.toString(),breakDurationMs:Math.round(z-y).toString(),driftFromHeadMs:Math.round(r*1E3).toString()}):(nM(this,{driftRecoveryMs:k.toString(),breakDurationMs:Math.round(z-y).toString(),driftFromHeadMs:Math.round(r*1E3).toString(),appliedDriftRecoveryMs:Math.round(l*
1E3-y).toString(),destinationMs:Math.round(Z*1E3-y).toString()}),this.vG.get().L.seekTo(Z,void 0,void 0,1))}}}QR(){}Ev(){}n2(){}onVolumeChange(){}Xk(){}K2(){}};var uqC=class extends bH5{constructor(l,y,k,z,r,Z,e,A,Q,t,O){super(l,y,k,z,r,Z,e,A,Q,t);this.N=O;this.C=this.Z=null;for(const d of this.N)Ym(d.Zp().clientMetadata,"metadata_type_survey_overlay")&&(this.C=d.Zp().layoutId)}WL(l,y){this.wb.get().addListener(this);if(this.V){var k=l,z=0,r=[];l=this.N.slice();l.sort((Z,e)=>Z.Zp().clientMetadata.aR("metadata_type_media_sub_layout_index")-e.Zp().clientMetadata.aR("metadata_type_media_sub_layout_index"));
l.forEach(Z=>{const e=k,A=Z.Zp().clientMetadata.aR("metadata_type_video_length_seconds"),Q=Math.min(e+A*1E3,y);k=Q;z++;r.push(A);Z.WL(e,Q)})}else this.N.forEach(Z=>{Z.init()});
this.C!=null&&Fs(this.Se.get(),"ads_ssmplra_init",`lid.${this.layout.layoutId};smlid.${this.C}`)}c6(){this.wb.get().removeListener(this);this.Z=null;this.N.forEach(l=>{l.release()})}ql(){if(this.Z)EP("Failed to restart rendering",this.slot,this.layout,{hasSurveyMediaSubLayout:String(!!this.C)});
else{var l=this.wb.get().gJ?.layoutId;yKC(this,l)}}S(l){this.Z?.KA?.Xm(this.Z?.KA?.Zp(),l);this.Z=null}Wr({videoId:l,layoutId:y}){l==="nPpU29QrbiU"&&Fs(this.Se.get(),"ads_ssmplra_opdcs",`vid.${l};lid.${this.layout.layoutId};smlid.${this.C};slrs.${!!this.Z};slrslid.${this.Z?.KA?.Zp().layoutId}`);this.Z&&(this.Z.KA?.Zp().layoutId===y?EP("Unexpected transition into the same layout ID",this.slot,this.layout,{layoutId:y}):(this.Z.KA?.Xm(this.Z.KA?.Zp(),"normal"),yKC(this,y)))}J(){}CS(){}onFullscreenToggled(){}};var xY5=class{constructor(l,y,k,z,r,Z,e,A,Q,t,O,d,w,h){this.callback=l;this.slot=y;this.layout=k;this.yE=z;this.Fr=r;this.vG=Z;this.B7=e;this.EA=A;this.wy=Q;this.p_=t;this.Se=O;this.wb=d;this.VE=w;this.LP=h;this.zd=!0;this.Rj=this.Z3=null;this.adCpn=void 0;this.Z=!1;l=this.layout.clientMetadata.aR("METADATA_TYPE_INTERACTIONS_AND_PROGRESS_LAYOUT_COMMANDS")?.progressCommands||[];this.C=new Gv(h,l,k.layoutId,()=>this.layout.clientMetadata.aR("metadata_type_video_length_seconds")*1E3)}Y2(){return this.slot}Zp(){return this.layout}WL(l,
y){this.layout.clientMetadata.aR("metadata_type_player_bytes_callback_ref").current=this;
this.Rj=kpt(this.slot,this.layout,this.layout.clientMetadata.aR("metadata_type_player_vars"),l,y,this.layout.clientMetadata.aR("metadata_type_video_length_seconds")*1E3,this.yE.get(),this.B7.get(),()=>{var k={...vK(this.layout)};var z=this.slot.clientMetadata.aR("metadata_type_fulfilled_layout")||this.slot.fulfilledLayout;const r=z.clientMetadata.aR("metadata_type_sub_layouts")||z.mE;z={...vK(z),adPlacementConfig:z.clientMetadata.aR("metadata_type_ad_placement_config"),subLayouts:(r||[]).map(vK)};
return{layoutType:"LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES",...k,compositeLayout:z,hasSurveyOverlay:Ym(this.layout.clientMetadata,"metadata_type_survey_overlay"),surveyOverlay:this.layout.clientMetadata.aR("metadata_type_survey_overlay")}},this.Se.get());
this.vG.get().addListener(this);l=this.layout.clientMetadata.aR("metadata_type_video_length_seconds");y=this.layout.clientMetadata.aR("metadata_type_active_view_traffic_type");o0(this.layout.NW)&&Sc(this.EA.get(),this.layout.layoutId,{Dg:y,Of:l,listener:this});duQ(this.callback,this.slot,this.layout);wcC(this.callback,this.slot,this.layout)}init(){const l=this.layout.clientMetadata.aR("metadata_type_layout_enter_ms"),y=this.layout.clientMetadata.aR("metadata_type_layout_exit_ms");this.WL(l,y)}release(){this.vG.get().removeListener(this);
o0(this.layout.NW)&&ng(this.EA.get(),this.layout.layoutId);this.p_.get();var l=this.callback,y=this.slot,k=this.layout;for(const z of l.C)z.M4(y,k);Kg(this.p_.get())&&(this.bd&&(Fs(this.Se.get(),"ads_ccru",`acpn.${O1(this.wb.get(),2)?.clientPlaybackNonce};cr.${this.bd}`),this.VE.get().removeCueRange(this.bd)),this.bd=void 0)}startRendering(){Ym(this.layout.clientMetadata,"metadata_type_survey_overlay")&&Fs(this.Se.get(),"ads_ssmlra_srs",`lid.${this.layout.layoutId}`);if(this.Z3)EP("Expected the layout not to be entered before start rendering",
this.slot,this.layout,{hasSurveyOverlay:Ym(this.layout.clientMetadata,"metadata_type_survey_overlay"),surveyOverlay:this.layout.clientMetadata.aR("metadata_type_survey_overlay")});else{this.Z3={qH:null,Fp:!1};this.Z=!1;gy(this.p_.get())&&(this.adCpn=O1(this.wb.get(),2)?.clientPlaybackNonce);this.p_.get().L.O().experiments.z7("html5_disable_sodar_for_tvhtml5")||zLe(this.slot,this.layout,this.wy.get());o0(this.layout.NW)&&CSz(this.EA.get(),this.layout.layoutId);this.Fr.Fv("start");if(ad(this.p_.get())){const l=
jc(this.vG.get()),y=this.layout.clientMetadata.aR("metadata_type_video_length_seconds"),k=R6(this.vG.get(),2,!1);rKq(this.Fr,this.Z3.qH,l,y,k,()=>void dK5(this,"teois"),O1(this.wb.get(),1).j2)}hQQ(this.callback,this.slot,this.layout);
Kg(this.p_.get())&&(this.adCpn||EP("Media layout confirmed started, but ad CPN not set."),this.hD());Ym(this.layout.clientMetadata,"metadata_type_survey_overlay")&&Fs(this.Se.get(),"ads_ssmlra_sre",`lid.${this.layout.layoutId}`)}}Xm(l,y){if(this.Z3){if(ad(this.p_.get()))if(this.Rj===null)EP("Unexpected media sub layout exited without a timeline playback ID");else{l=this.layout.clientMetadata.aR("metadata_type_video_length_seconds");const k=DU(this.vG.get(),this.Rj);gy(this.p_.get())&&this.adCpn===
void 0&&EP("Expected ad CPN in SSDAI macro data",this.slot,this.layout,{contentCpn:this.layout.clientMetadata.aR("metadata_type_content_cpn")});AgC(this.Fr,k,this.adCpn);NH(this.Fr,null,this.Z3.qH,l,k,O1(this.wb.get(),1).j2,z=>void wqQ(this,z,"fue"),gy(this.p_.get()),Kg(this.p_.get()));
Zq(this.p_.get())&&this.Ay(k,!0)}this.Z3=null;aWq(this.callback,this.slot,this.layout,this.Z&&this.p_.get().L.O().X("dai_layout_log_skip_exit_reason")?"skipped":y)}else EP("Expected the layout to be entered before stop rendering",this.slot,this.layout)}onCueRangeEnter(l){if(l!==this.bd)EP("Received CueRangeEnter signal for unknown layout.",this.Y2(),this.Zp(),{cueRangeId:l});else if(this.adCpn===void 0&&EP("Expected ad CPN in SSDAI macro data",this.slot,this.layout,{contentCpn:this.layout.clientMetadata.aR("metadata_type_content_cpn")}),
D_(this.Fr,"impression")&&ad(this.p_.get()))if(this.Rj===null)EP("Unexpected cue range enter without a timeline playback ID");else{const y=DU(this.vG.get(),this.Rj);Fs(this.Se.get(),"ads_ccre",`cpn.${this.layout.clientMetadata.aR("metadata_type_content_cpn")};acpn.${O1(this.wb.get(),2)?.clientPlaybackNonce};cr.${l};cts.${y}`);this.VE.get().removeCueRange(this.bd);this.bd=void 0;Zq(this.p_.get())&&this.Ay(y,!0);this.Fr.Fv("complete")}}onCueRangeExit(){}wf(){}GC(){}lW(l){if(this.Z3){if(D_(this.Fr,"impression")){const y=
jc(this.vG.get()),k=this.layout.clientMetadata.aR("metadata_type_video_length_seconds");s5(this.Fr,y,l,this.Z3.qH,k,z=>void wqQ(this,z,"tpaqe"));
Zq(this.p_.get())&&this.Ay(l)}this.Z3.qH=l}}Ay(l,y=!1){this.Z3&&y_(this.C,l*1E3,y)}CS(l){if(this.Z3){ad(this.p_.get())||this.Z3.Fp||(this.Z3.Fp=!0,l=new g.WK(l.state,new g.U5));var y=this.layout.clientMetadata.aR("metadata_type_video_length_seconds"),k=R6(this.vG.get(),2,!1);oi(this.Fr,this.Z3.qH,l,y,k,O1(this.wb.get(),1).j2,!ad(this.p_.get()),()=>void dK5(this,"teosc"))}}onFullscreenToggled(l){Zl5(this.Fr,l)}QR(){}Ev(){}n2(){}hO(l,y){l=this.Se.get();
var k=D_(this.Fr,"impression"),z=D_(this.Fr,"skip");var r=!!this.Fr.N.get("skip")?.length;Fs(l,"ads_dsr",`ti.${k};ts.${z};hp.${r};cpn.${this.layout.clientMetadata.aR("metadata_type_content_cpn")};acpn.${O1(this.wb.get(),2)?.clientPlaybackNonce};sl.${y.clientMetadata.aR("metadata_type_linked_player_bytes_layout_id")===this.layout.layoutId}`);D_(this.Fr,"impression")&&this.Fr.Fv("skip");y=O1(this.wb.get(),1).j2;this.Z=!0;this.yE.get().Pz(y)||(this.Z=!1,EP("Unexpected failure to skip a server stitched ad",
this.slot,this.layout))}onVolumeChange(){}s1(){}iq(){}iT(){}ND(){}W0(){eLy(this.Fr)}gp(){AKq(this.Fr)}E_(){$K4(this.Fr)}K9(){Q3g(this.Fr)}n9(){tug(this.Fr)}XZ(){Ol_(this.Fr)}Xk(){}K2(){}hD(){this.bd||(this.bd=`${"adcompletioncuerange"}:${this.Zp().layoutId}`,this.VE.get().addCueRange(this.bd,0x7ffffffffffff,0x8000000000000,!1,this,2,2,this.adCpn),Fs(this.Se.get(),"ads_ccr",`acpn.${O1(this.wb.get(),2)?.clientPlaybackNonce};cr.${this.bd}`))}};var mYT=class extends bH5{constructor(l,y,k,z,r,Z,e,A,Q,t,O,d,w,h){super(l,y,k,z,r,e,A,Q,t,d);this.B7=Z;this.wy=O;this.EA=w;this.p_=h;this.Rj=this.Z3=null}WL(){this.layout.clientMetadata.aR("metadata_type_player_bytes_callback_ref").current=this;const l=this.layout.clientMetadata.aR("metadata_type_layout_enter_ms"),y=this.layout.clientMetadata.aR("metadata_type_layout_exit_ms");this.Rj=kpt(this.slot,this.layout,this.layout.clientMetadata.aR("metadata_type_player_vars"),l,y,this.layout.clientMetadata.aR("metadata_type_video_length_seconds")*
1E3,this.yE.get(),this.B7.get(),()=>({layoutType:"LAYOUT_TYPE_MEDIA",enterMs:l,exitMs:y,adPlacementConfig:this.layout.clientMetadata.aR("metadata_type_ad_placement_config")}),this.Se.get());
const k=this.layout.clientMetadata.aR("metadata_type_video_length_seconds"),z=this.layout.clientMetadata.aR("metadata_type_active_view_traffic_type");o0(this.layout.NW)&&Sc(this.EA.get(),this.layout.layoutId,{Dg:z,Of:k,listener:this})}c6(){o0(this.layout.NW)&&ng(this.EA.get(),this.layout.layoutId)}ql(){if(this.Z3)EP("Expected the layout not to be entered before start rendering",this.slot,this.layout);else if(this.Z3={qH:null,Fp:!1},zLe(this.slot,this.layout,this.wy.get()),this.Fr.Fv("start"),ad(this.p_.get())){const l=
jc(this.vG.get()),y=this.layout.clientMetadata.aR("metadata_type_video_length_seconds"),k=R6(this.vG.get(),2,!1);rKq(this.Fr,this.Z3.qH,l,y,k,()=>void hLe(this,"teois"),!1)}}S(){if(this.Z3){if(ad(this.p_.get()))if(this.Rj===null)EP("Unexpected single media layout exited without a timeline playback ID");
else{const l=this.layout.clientMetadata.aR("metadata_type_video_length_seconds"),y=DU(this.vG.get(),this.Rj);AgC(this.Fr,y);NH(this.Fr,null,this.Z3.qH,l,y,!1,k=>void Gp5(this,k,"fue"))}this.Z3=null}else EP("Expected the layout to be entered before stop rendering",this.slot,this.layout)}J(l){if(this.Z3){if(D_(this.Fr,"impression")){const y=jc(this.vG.get()),k=this.layout.clientMetadata.aR("metadata_type_video_length_seconds");
s5(this.Fr,y,l,this.Z3.qH,k,z=>void Gp5(this,z,"tpaqe"))}this.Z3.qH=l}}CS(l){if(this.Z3){ad(this.p_.get())||this.Z3.Fp||(this.Z3.Fp=!0,l=new g.WK(l.state,new g.U5));
var y=this.layout.clientMetadata.aR("metadata_type_video_length_seconds"),k=R6(this.vG.get(),2,!1);oi(this.Fr,this.Z3.qH,l,y,k,!1,!ad(this.p_.get()),()=>void hLe(this,"teosc"))}}onFullscreenToggled(l){Zl5(this.Fr,l)}W0(){eLy(this.Fr)}gp(){AKq(this.Fr)}E_(){$K4(this.Fr)}K9(){Q3g(this.Fr)}n9(){tug(this.Fr)}XZ(){Ol_(this.Fr)}};var qdC=class{constructor(l,y,k,z,r,Z,e,A,Q,t,O,d,w,h,U,u,W,V,T,J,K){this.oU=l;this.Ps=y;this.v7=k;this.wb=z;this.yE=r;this.vG=Z;this.Qu=e;this.Se=A;this.B7=Q;this.Ba=t;this.EA=O;this.wy=d;this.mw=w;this.VE=h;this.Ll=U;this.GM=u;this.LP=W;this.Sb=V;this.p_=T;this.Z=J;this.context=K}build(l,y,k,z){if(Ym(k.clientMetadata,"metadata_type_dai")){var r=z.clientMetadata.aR("metadata_type_ad_placement_config");k0(z,{qx:"metadata_type_video_length_seconds metadata_type_player_vars metadata_type_layout_enter_ms metadata_type_layout_exit_ms metadata_type_player_bytes_callback_ref metadata_type_content_cpn".split(" "),
MK:["LAYOUT_TYPE_MEDIA"]})&&r!==void 0?(r=new DT(z.NW,this.Se,r,z.layoutId,null),r=new mYT(l,k,z,this.wb,this.yE,this.B7,this.Ba,this.vG,r,this.Se,this.wy,this.Z,this.EA,this.p_)):r=null;if(r)return r;a:{var Z=z.mE??z.clientMetadata.aR("metadata_type_sub_layouts");const e=z.clientMetadata.aR("metadata_type_ad_placement_config");if(k0(z,{qx:["metadata_type_layout_enter_ms","metadata_type_drift_recovery_ms","metadata_type_layout_exit_ms"],MK:["LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES"]})&&Z!==void 0&&e!==
void 0){r=[];for(const A of Z){Z=A.clientMetadata.aR("metadata_type_media_sub_layout_index");if(!k0(A,{qx:"metadata_type_video_length_seconds metadata_type_player_vars metadata_type_layout_enter_ms metadata_type_layout_exit_ms metadata_type_player_bytes_callback_ref metadata_type_content_cpn".split(" "),MK:["LAYOUT_TYPE_MEDIA"]})||Z===void 0){l=null;break a}Z=new DT(A.NW,this.Se,e,A.layoutId,Z);r.push(new xY5(y,k,A,this.yE,Z,this.vG,this.B7,this.EA,this.wy,this.p_,this.Se,this.wb,this.VE,this.LP))}y=
new DT(z.NW,this.Se,e,z.layoutId);l=new uqC(l,k,z,this.wb,this.yE,this.Ba,this.vG,y,this.Se,this.Z,r)}else l=null}if(l)return l}else if(l=Hu5(l,y,k,z,this.oU,this.Ps,this.v7,this.Se,this.EA,this.wy,this.mw,this.wb,this.vG,this.Qu,this.VE,this.Ll,this.GM,this.LP,this.Sb,this.p_,this.yE,this.context))return l;throw new AL(`Unsupported layout with type: ${z.layoutType} and client metadata: ${Kq(z.clientMetadata)} in `+"PlayerBytesLayoutRenderingAdapterFactory.");}};var ub=class{constructor(l,y,k,z,r,Z,e,A,Q,t,O,d,w,h,U,u,W,V){this.oU=l;this.Ps=y;this.v7=k;this.Se=z;this.EA=r;this.wy=Z;this.mw=e;this.wb=A;this.vG=Q;this.Qu=t;this.VE=O;this.Ll=d;this.GM=w;this.LP=h;this.Sb=U;this.p_=u;this.yE=W;this.context=V}build(l,y,k,z){if(l=Hu5(l,y,k,z,this.oU,this.Ps,this.v7,this.Se,this.EA,this.wy,this.mw,this.wb,this.vG,this.Qu,this.VE,this.Ll,this.GM,this.LP,this.Sb,this.p_,this.yE,this.context))return l;throw new AL(`Unsupported layout with type: ${z.layoutType} and client metadata: ${Kq(z.clientMetadata)} in `+
"PlayerBytesVodOnlyLayoutRenderingAdapterFactory.");}};var Wz5=class extends ge{constructor(l,y,k,z){super("survey-interstitial",l,y,k,z)}};var IRg=class extends hG{constructor(l,y,k,z,r){super(k,l,y,z);this.Se=r;l=y.clientMetadata.aR("metadata_type_ad_placement_config");this.Fr=new DT(y.NW,r,l,y.layoutId)}startRendering(l){const y=PJ(this.Fr),k={adsClientData:this.layout.KP};this.Z.push(new Wz5(this.layout.clientMetadata.aR("metadata_type_valid_survey_text_interstitial_renderer"),y,this.Zp().layoutId,k));super.startRendering(l);this.callback.s1(this.slot,l)}Z5(l,y){y!==this.layout.layoutId||l!=="survey-interstitial"&&l!=="button"||((l=
this.layout.clientMetadata.aR("metadata_type_player_bytes_layout_controls_callback_ref").current)?l.hO(this.slot,this.layout):EP("Tried to skip SurveyInterstitial but PlayerBytes callback is null"))}Vj(){super.Vj()}};var HK=new g.Fn(320,63);var TAg=class extends ge{constructor(l,y,k,z){super("invideo-overlay",l,y,k,z);this.interactionLoggingClientData=z}};var Vtt=class extends hG{constructor(l,y,k,z,r,Z,e,A,Q,t,O){super(r,l,y,z);this.Se=k;this.V=Z;this.vG=e;this.LP=A;this.p_=Q;this.S=t;this.J=O;this.Fr=aCz(y,k)}lW(){}CS(){}onFullscreenToggled(){}QR(l){l&&u_(this.V,this.layout)}Ev(){}n2(l){const y=l$(this.layout);if(this.K=Ri(l,EPC(this.vG.get())))y.onErrorCommand&&this.LP.get().executeCommand(y.onErrorCommand,this.layout.layoutId),u_(this.V,this.layout)}onVolumeChange(){}S6(){return this.Zp().layoutId}VV(){return this.K}Z5(l){this.J.Z5(l);l==="in_video_overlay_close_button"&&
u_(this.V,this.layout)}n5(l){l==="invideo-overlay"&&u_(this.V,this.layout)}It(){this.J.It()}startRendering(l){super.startRendering(l);this.callback.s1(this.slot,l);this.S.Tz=this}Xm(l,y){super.Xm(l,y);U3(this.S,this)}init(){super.init();NX(this.Se.get(),this);this.vG.get().addListener(this);this.Z.push(new TAg(l$(this.layout),PJ(this.Fr),this.layout.layoutId,{adsClientData:this.layout.KP}))}release(){super.release();this.vG.get().removeListener(this);s6(this.Se.get(),this)}Xk(){}K2(){}};var PVT=class extends hG{constructor(l,y,k,z,r,Z,e,A,Q,t,O,d){super(r,l,y,z);this.Se=k;this.V=Z;this.A=e;this.vG=A;this.LP=Q;this.p_=t;this.S=O;this.J=d;this.Fr=aCz(y,k)}init(){super.init();NX(this.Se.get(),this);this.vG.get().addListener(this);this.Z.push(new TAg(l$(this.layout),PJ(this.Fr),this.layout.layoutId,{adsClientData:this.layout.KP}))}It(){this.J.It()}startRendering(l){super.startRendering(l);this.callback.s1(this.slot,l);this.S.Tz=this}Xm(l,y){super.Xm(l,y);U3(this.S,this)}Z5(l){this.J.Z5(l);
l==="in_video_overlay_close_button"&&u_(this.V,this.layout)}tG(l){if(l==="invideo-overlay"){l=VGy(this.A,this.layout);for(const y of l)y.stop()}}n5(l){l==="invideo-overlay"&&u_(this.V,this.layout)}Te(l){if(l==="invideo-overlay"){l=VGy(this.A,this.layout);for(const y of l)y.start()}}lW(){}CS(){}onFullscreenToggled(){}QR(l){l&&u_(this.V,this.layout)}Ev(){}n2(l){const y=l$(this.layout),k=y.contentSupportedRenderer.imageOverlayAdContentRenderer;if(this.K=Ri(l,EPC(this.vG.get()),MuC(k.image)))y.onErrorCommand&&
this.LP.get().executeCommand(y.onErrorCommand,this.layout.layoutId),u_(this.V,this.layout)}onVolumeChange(){}S6(){return this.Zp().layoutId}VV(){return this.K}release(){super.release();this.vG.get().removeListener(this);s6(this.Se.get(),this)}Xk(){}K2(){}};var xT=class{constructor(l){this.vG=l;this.Z=!1}Z5(l){l==="ad-info-hover-text-button"&&((this.Z=this.vG.get().V4(1))||this.vG.get().pauseVideo())}It(){this.Z||this.vG.get().resumeVideo(1)}};var Jd5=class extends ge{constructor(l,y,k){super("survey",l,{},y,k)}};var YdT=class extends hG{constructor(l,y,k,z,r,Z,e){super(k,l,y,z);this.V=r;this.vG=Z;this.p_=e}init(){super.init();this.vG.get().addListener(this)}startRendering(l){const y=this.layout.clientMetadata.aR("METADATA_TYPE_VALID_INSTREAM_SURVEY_AD_RENDERER_FOR_VOD");this.Z.push(new Jd5(y,this.layout.layoutId,{adsClientData:this.layout.KP}));super.startRendering(l);this.callback.s1(this.slot,l)}s1(){}Z5(l,y){y!==this.layout.layoutId||l!=="ad-info-icon-button"&&l!=="ad-info-dialog-close-button"||((y=this.layout.clientMetadata.aR("metadata_type_player_bytes_layout_controls_callback_ref").current)?
l==="ad-info-icon-button"?y.iT(this.slot,this.layout):l==="ad-info-dialog-close-button"&&y.ND(this.slot,this.layout):EP("Tried to use LayoutControlsCallback on Survey but it is null",this.slot,this.layout,{ComponentType:l}))}n2(l){l.width<450&&u_(this.V,this.layout)}onVolumeChange(){}lW(){}onFullscreenToggled(){}QR(){}Ev(){}CS(){}Xk(){}K2(){}Vj(){super.Vj()}release(){super.release();this.vG.get().removeListener(this)}};var p8T=class{constructor(l,y,k,z,r,Z,e,A,Q,t){this.M_=l;this.vG=y;this.Se=k;this.V=z;this.EA=r;this.C=Z;this.N=e;this.LP=A;this.p_=Q;this.Z=t}build(l,y,k,z){if(y=$0(l,k,z,this.M_,this.vG,this.Se,this.V,this.Z,this.p_))return y;if(k0(z,UKQ()))return new PVT(k,z,this.Se,this.M_,l,this.C,this.N,this.vG,this.LP,this.p_,this.Z,new xT(this.vG));if(k0(z,il5()))return new Vtt(k,z,this.Se,this.M_,l,this.C,this.vG,this.LP,this.p_,this.Z,new xT(this.vG));if(k0(z,{qx:["METADATA_TYPE_VALID_INSTREAM_SURVEY_AD_RENDERER_FOR_VOD"],
MK:["LAYOUT_TYPE_SURVEY"]}))return new YdT(k,z,l,this.M_,this.C,this.vG,this.p_);if(k0(z,{qx:["metadata_type_player_bytes_layout_controls_callback_ref","metadata_type_valid_survey_text_interstitial_renderer","metadata_type_ad_placement_config"],MK:["LAYOUT_TYPE_VIDEO_INTERSTITIAL_BUTTONED_LEFT"]}))return new IRg(k,z,l,this.M_,this.Se);if(k0(z,bFz()))return new qjy(k,z,l,this.M_,this.vG,this.p_);throw new AL(`Unsupported layout with type: ${z.layoutType} and client metadata: ${Kq(z.clientMetadata)} in `+
"WebDesktopMainInPlayerLayoutRenderingAdapterFactory.");}};var KzC=class{constructor(l,y,k,z,r,Z,e,A,Q,t){this.M_=l;this.vG=y;this.Se=k;this.V=z;this.EA=r;this.C=Z;this.N=e;this.LP=A;this.p_=Q;this.Z=t}build(l,y,k,z){if(y=$0(l,k,z,this.M_,this.vG,this.Se,this.V,this.Z,this.p_))return y;if(k0(z,UKQ()))return new PVT(k,z,this.Se,this.M_,l,this.C,this.N,this.vG,this.LP,this.p_,this.Z,new xT(this.vG));if(k0(z,il5()))return new Vtt(k,z,this.Se,this.M_,l,this.C,this.vG,this.LP,this.p_,this.Z,new xT(this.vG));throw new AL(`Unsupported layout with type: ${z.layoutType} and client metadata: ${Kq(z.clientMetadata)} in `+
"WebEmbeddedInPlayerLayoutRenderingAdapterFactory.");}};var gxC=class extends uky{constructor(l,y,k,z,r,Z,e,A,Q,t){super(l,y,k,z,r,Z,e,Q);this.gM=A;this.wb=t}startRendering(l){super.startRendering(l);if(l.renderingContent?X_P(l,O1(this.wb.get(),2)||void 0):this.layout.clientMetadata.aR("metadata_ad_video_is_listed")){const y=l.renderingContent?M5t(l,O1(this.wb.get(),2)||void 0):this.layout.clientMetadata.aR("metadata_type_ad_info_ad_metadata");l=this.gM.get();g.G3(l.L,"onAdMetadataAvailable",y)}}};var Ex5=class{constructor(l,y,k,z,r,Z,e){this.M_=l;this.vG=y;this.Se=k;this.C=z;this.gM=r;this.Z=Z;this.wb=e}build(l,y,k,z){if(k0(z,Xq4())||z.layoutType==="LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY"&&g.E(z.renderingContent,rd)!==void 0)return new gxC(l,k,z,this.M_,this.vG,this.Se,this.C,this.gM,this.Z,this.wb);throw new AL(`Unsupported layout with type: ${z.layoutType} and client metadata: ${Kq(z.clientMetadata)} in `+"WebRemixInPlayerLayoutRenderingAdapterFactory.");}};var fR4=class{constructor(l,y,k,z,r,Z,e,A){this.M_=l;this.vG=y;this.Se=k;this.C=z;this.gM=r;this.Z=Z;this.p_=e;this.wb=A}build(l,y,k,z){if(k0(z,Xq4()))return new gxC(l,k,z,this.M_,this.vG,this.Se,this.C,this.gM,this.Z,this.wb);if(l=$0(l,k,z,this.M_,this.vG,this.Se,this.C,this.Z,this.p_))return l;throw new AL(`Unsupported layout with type: ${z.layoutType} and client metadata: ${Kq(z.clientMetadata)} in `+"WebUnpluggedInPlayerLayoutRenderingAdapterFactory.");}};var aD=class{constructor(l,y){this.adPodIndex=l;this.Z=y.length;this.adBreakLengthSeconds=y.reduce((z,r)=>z+r,0);
let k=0;for(l+=1;l<y.length;l++)k+=y[l];this.adBreakRemainingLengthSeconds=k}};var K0=class{constructor(l,y,k){this.dN=y;this.triggerType="TRIGGER_TYPE_BEFORE_CONTENT_VIDEO_ID_STARTED";this.triggerId=k||l(this.triggerType)}};var Ne=class{constructor(l,y,k){this.Z=y;this.triggerType="TRIGGER_TYPE_CLOSE_REQUESTED";this.triggerId=k||l(this.triggerType)}};var L0=class{constructor(l,y,k,z){this.dN=y;this.visible=k;this.triggerType="TRIGGER_TYPE_CONTENT_VIDEO_ID_ENDED";this.triggerId=z||l(this.triggerType)}};var D84=class{constructor(l){this.triggerType="TRIGGER_TYPE_CUE_BREAK_IDENTIFIED";this.triggerId=l(this.triggerType)}};var DKz=class{constructor(l){this.triggerType="TRIGGER_TYPE_DURATION_AFTER_MEDIA_PAUSED";this.triggerId=l(this.triggerType)}};var VV=class{constructor(l,y,k){this.triggeringLayoutId=y;this.slotId=k;this.triggerType="TRIGGER_TYPE_LAYOUT_ID_ACTIVE_AND_SLOT_ID_HAS_EXITED";this.triggerId=l(this.triggerType)}};var v3=class{constructor(l,y,k){this.triggeringLayoutId=y;this.triggerType="TRIGGER_TYPE_LAYOUT_ID_ENTERED";this.triggerId=k||l(this.triggerType)}};var f0=class{constructor(l,y,k,z){this.triggeringLayoutId=y;this.Z=k;this.triggerType="TRIGGER_TYPE_LAYOUT_EXITED_FOR_REASON";this.triggerId=z||l(this.triggerType)}};var E7=class{constructor(l,y,k){this.triggeringLayoutId=y;this.triggerType="TRIGGER_TYPE_LAYOUT_ID_EXITED";this.triggerId=k||l(this.triggerType)}};var Dh=class{constructor(l,y){this.triggerType="TRIGGER_TYPE_LIVE_STREAM_BREAK_ENDED";this.triggerId=y||l(this.triggerType)}};var l5=class{constructor(l,y){this.breakDurationMs=l;this.triggerType="TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_MATCHED";this.triggerId=y||""}};var yF=class{constructor(l,y){this.breakDurationMs=l;this.triggerType="TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_NOT_MATCHED";this.triggerId=y||""}};var R5=class{constructor(l,y){this.triggerType="TRIGGER_TYPE_LIVE_STREAM_BREAK_STARTED";this.triggerId=y||l(this.triggerType)}};var yDC=class{constructor(l){this.triggerId=l;this.triggerType="TRIGGER_TYPE_MEDIA_RESUMED"}};var k_5=class{constructor(l,y,k,z,r){this.dN=y;this.Z=k;this.visible=z;this.layoutId=r;this.triggerType="TRIGGER_TYPE_MEDIA_TIME_RANGE_ALLOW_REACTIVATION_ON_USER_CANCELLED";this.triggerId=l(this.triggerType)}};var s7=class{constructor(l,y,k,z,r){this.dN=y;this.Z=k;this.visible=z;this.triggerType="TRIGGER_TYPE_MEDIA_TIME_RANGE";this.triggerId=r||l(this.triggerType)}};var ks=class{constructor(l,y){this.breakDurationMs=l;this.triggerType="TRIGGER_TYPE_NEW_SLOT_SCHEDULED_WITH_BREAK_DURATION";this.triggerId=y||""}};var RXq=class{constructor(l,y,k){this.dN=y;this.Z=k;this.triggerType="TRIGGER_TYPE_NOT_IN_MEDIA_TIME_RANGE";this.triggerId=l(this.triggerType)}};var H3=class{constructor(l,y,k,z,r){this.Z=y;this.slotType=k;this.layoutType=z;this.triggerType="TRIGGER_TYPE_ON_DIFFERENT_LAYOUT_ID_ENTERED";this.triggerId=r||l(this.triggerType)}};var Id=class{constructor(l,y){this.Z=y;this.slotType="SLOT_TYPE_IN_PLAYER";this.triggerType="TRIGGER_TYPE_ON_DIFFERENT_SLOT_ID_ENTER_REQUESTED";this.triggerId=l(this.triggerType)}};var Sa=class{constructor(l,y,k){this.layoutId=y;this.triggerType="TRIGGER_TYPE_ON_LAYOUT_SELF_EXIT_REQUESTED";this.triggerId=k||l(this.triggerType)}};var Yt=class{constructor(l,y,k){this.Z=y;this.triggerType="TRIGGER_TYPE_ON_NEW_PLAYBACK_AFTER_CONTENT_VIDEO_ID";this.triggerId=k||l(this.triggerType)}};var PJ_=class{constructor(l,y){this.opportunityType="OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED";this.associatedSlotId=y;this.triggerType="TRIGGER_TYPE_ON_OPPORTUNITY_TYPE_RECEIVED";this.triggerId=l(this.triggerType)}};var TNC=class{constructor(l,y){this.Z=l;this.index=y}};var cDT=class{constructor(l){this.triggerType="TRIGGER_TYPE_PLAYBACK_MINIMIZED";this.triggerId=l(this.triggerType)}};var zV=class{constructor(l,y){this.triggerType="TRIGGER_TYPE_PREFETCH_CACHE_EXPIRED";this.triggerId=y||l(this.triggerType)}};var L9Q=class{constructor(l,y,k){this.layoutId=y;this.offsetMs=k;this.triggerType="TRIGGER_TYPE_PROGRESS_PAST_MEDIA_TIME_WITH_OFFSET_RELATIVE_TO_LAYOUT_ENTER";this.triggerId=l(this.triggerType)}};var Bcg=class{constructor(l,y){this.layoutId=y;this.triggerType="TRIGGER_TYPE_SEEK_BACKWARD_BEFORE_LAYOUT_ENTER_TIME";this.triggerId=l(this.triggerType)}};var vO4=class{constructor(l,y,k){this.layoutId=y;this.offsetMs=k;this.triggerType="TRIGGER_TYPE_SEEK_FORWARD_PAST_MEDIA_TIME_WITH_OFFSET_RELATIVE_TO_LAYOUT_ENTER";this.triggerId=l(this.triggerType)}};var n0=class{constructor(l,y,k){this.triggeringLayoutId=y;this.triggerType="TRIGGER_TYPE_SKIP_REQUESTED";this.triggerId=k||l(this.triggerType)}};var Fd=class{constructor(l,y,k){this.triggeringSlotId=y;this.triggerType="TRIGGER_TYPE_SLOT_ID_ENTERED";this.triggerId=k||l(this.triggerType)}clone(l){return new Fd(()=>this.triggerId,l)}};var p0=class{constructor(l,y,k){this.triggeringSlotId=y;this.triggerType="TRIGGER_TYPE_SLOT_ID_EXITED";this.triggerId=k||l(this.triggerType)}clone(l){return new p0(()=>this.triggerId,l)}};var pE=class{constructor(l,y){this.triggeringSlotId=y;this.triggerType="TRIGGER_TYPE_SLOT_ID_FULFILLED_EMPTY";this.triggerId=l(this.triggerType)}clone(l){return new pE(()=>this.triggerId,l)}};var YL=class{constructor(l,y){this.triggeringSlotId=y;this.triggerType="TRIGGER_TYPE_SLOT_ID_FULFILLED_NON_EMPTY";this.triggerId=l(this.triggerType)}clone(l){return new YL(()=>this.triggerId,l)}};var JC=class{constructor(l,y,k){this.triggeringSlotId=y;this.triggerType="TRIGGER_TYPE_SLOT_ID_SCHEDULED";this.triggerId=k||l(this.triggerType)}clone(l){return new JC(()=>this.triggerId,l)}};var Pm=class{constructor(l,y){this.triggeringSlotId=y;this.triggerType="TRIGGER_TYPE_SLOT_ID_UNSCHEDULED";this.triggerId=l(this.triggerType)}clone(l){return new Pm(()=>this.triggerId,l)}};var o5=class{constructor(l,y,k){this.triggeringLayoutId=y;this.triggerType="TRIGGER_TYPE_SURVEY_SUBMITTED";this.triggerId=k||l(this.triggerType)}};var B3=class{constructor(l,y,k,z){this.durationMs=y;this.triggeringLayoutId=k;this.triggerType="TRIGGER_TYPE_TIME_RELATIVE_TO_LAYOUT_ENTER";this.triggerId=z||l(this.triggerType)}};var xL=class{constructor(l,y,k,z){this.category=l;this.trigger=y;this.slot=k;this.layout=z}};var me=class extends g.zP{constructor(l,y,k,z,r,Z,e){super();this.p_=l;this.Z=y;this.C=k;this.wb=z;this.V=r;this.N=Z;this.mw=e}};var F2={layoutExitMuteTriggers:[],layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitUserCancelledTriggers:[],layoutExitUserInputSubmittedTriggers:[]};var qr={jn:1,Fc:2,Oc:3,1:"LOAD_POLICY_ALWAYS",2:"LOAD_POLICY_BY_PREFERENCE",3:"LOAD_POLICY_BY_REQUEST"};var WI=class{constructor(l,y,k,z,r,Z,e,A,Q,t=1){this.V=l;this.C=y;this.Z=k;this.p_=z;this.TA=r;this.N=Z;this.vG=e;this.Ph=A;this.Bs=Q;this.loadPolicy=t}};var IB=class extends g.zP{constructor(l,y,k,z,r,Z,e,A){super();this.C=l;this.N=y;this.Ba=z;this.vG=r;this.p_=Z;this.Se=e;this.yE=A;this.Z=null;k.get().addListener(this);this.addOnDisposeCallback(()=>{k.IR()||k.get().removeListener(this)});
z.get().addListener(this);this.addOnDisposeCallback(()=>{z.IR()||z.get().removeListener(this)})}Br(l){if(this.Z)EP("Unexpected multiple fetch instructions for the current content");
else{this.Z=l;for(const y of this.Ba.get().Kn)Mv(this,this.Z,y)}}TI(l){if(!this.Z)return this.p_.get().L.O().X("high_ccv_client_side_caching_h5")||this.yE?.get().pX(l.identifier),Fs(this.Se.get(),"ads_nfi",`a.cpoa;cid.${l.identifier}`),!1;Mv(this,this.Z,l);return!0}m7(){}Ft(l){this.Z&&this.Z.contentCpn!==l&&(EP("Fetch instructions carried over from previous content video",void 0,void 0,{contentCpn:l,fetchInstructionsCpn:this.Z.contentCpn}),this.Z=null)}pA(l){this.Z&&this.Z.contentCpn!==l&&EP("Expected content video of the current fetch instructions to end",
void 0,void 0,{contentCpn:l,fetchInstructionsCpn:this.Z.contentCpn},!0);this.Z=null}Vj(){super.Vj();this.Z=null}};var jPC=["metadata_type_content_cpn","metadata_type_player_bytes_callback_ref","metadata_type_instream_ad_player_overlay_renderer","metadata_type_ad_placement_config"],Sdq=["metadata_type_content_cpn","metadata_type_player_bytes_callback_ref","metadata_type_player_overlay_layout_renderer","metadata_type_ad_placement_config"];var Tv=class extends g.zP{constructor(l,y,k,z,r,Z,e,A){super();this.V=l;this.S=jPC;this.J=y;this.N=k;this.Z=z;this.C=r;this.TA=Z;this.p_=e;this.wb=A;this.Vf=!0}s1(l,y){if(y.layoutType==="LAYOUT_TYPE_MEDIA"&&(pq(y,this.S)||pq(y,Sdq))){var k=O1(this.wb.get(),2),z=this.V(y,k||void 0);z?WJ(this.N.get(),"OPPORTUNITY_TYPE_PLAYER_BYTES_MEDIA_LAYOUT_ENTERED",()=>{const r=[Fb5(this.Z.get(),z.contentCpn,z.Wj,Z=>this.J(Z.slotId,"core",z,S4(this.TA.get(),Z)),z.inPlayerSlotId)];
z.instreamAdPlayerUnderlayRenderer&&pw(this.p_.get())&&r.push(XSy(this,z,z.instreamAdPlayerUnderlayRenderer));return r}):EP("Expected MediaLayout to carry valid opportunity on entered",l,y)}}iE(){}Od(){}gy(){}lH(){}Kg(){}jV(){}FJ(){}Hh(){}M4(){}fE(){}iq(){}};var PI=class extends g.zP{constructor(l,y,k,z,r,Z,e){super();this.C=l;this.Z=y;this.N=k;this.V=z;this.wb=r;this.vG=Z;this.Ll=e}Ft(l,y,k,z,r,Z,e){const A=O1(this.wb.get(),1);A.vO?this.vG.get().Wu():(Q$4(this.Ll.get(),z),WJ(this.C.get(),"OPPORTUNITY_TYPE_PLAYER_RESPONSE_RECEIVED",()=>Vh(this.Z.get(),z,r,Z,l,y,e,A,"")),LfQ(this.N))}pA(){}};var JG=class extends g.zP{constructor(l){super();this.Z=l}};var pD=class extends g.zP{constructor(l,y,k,z,r){super();this.C=l;this.N=y;this.VE=k;this.context=r;this.Z=new Map;z.get().addListener(this);this.addOnDisposeCallback(()=>{z.IR()||z.get().removeListener(this)})}onCueRangeEnter(){}onCueRangeExit(l){const y=this.Z.get(l);
y&&(this.Z.delete(l),this.VE.get().removeCueRange(l),WJ(this.C.get(),"OPPORTUNITY_TYPE_THROTTLED_AD_BREAK_REQUEST_SLOT_REENTRY",()=>{var k=this.N.get();k=I0(k.C.get(),"SLOT_TYPE_AD_BREAK_REQUEST");if(y.slotEntryTrigger){var z=y.slotId;var r=y.slotEntryTrigger;z=r.triggeringSlotId!=null&&r.triggeringSlotId===z?r.clone(k):r}else z=void 0;return[{...y,slotId:k,slotEntryTrigger:z,slotFulfillmentTriggers:lNQ(y.slotId,k,y.slotFulfillmentTriggers),slotExpirationTriggers:lNQ(y.slotId,k,y.slotExpirationTriggers)}]},
y.slotId))}Ft(){for(const l of this.Z.keys())this.VE.get().removeCueRange(l);
this.Z.clear()}pA(){}};var KD=class extends g.zP{constructor(){super(...arguments);this.Vf=!0;this.q7=new Map;this.Z=new Map}iE(){}Od(l){g.cs(g.bw(),()=>{const y=this.Z.get(l);y&&EP("Expected layouts to be properly unscheduled",l,void 0,{slotType:l.slotType,layoutTypes:[...y].map(k=>k.layoutType)})},0)}gy(){}lH(){}Kg(){}jV(){}FJ(){}Hh(l,y){this.Z.has(l)||this.Z.set(l,new Set);
this.Z.get(l).add(y)}M4(l,y){this.q7.has(l)&&this.q7.get(l)===y&&EP("Unscheduled a Layout that is currently entered.",l,y);if(this.Z.has(l)){var k=this.Z.get(l);k.has(y)?(k.delete(y),k.size===0&&this.Z.delete(l)):EP("Trying to unscheduled a Layout that was not scheduled.",l,y)}else EP("Trying to unscheduled a Layout that was not scheduled.",l,y)}s1(l,y){this.q7.set(l,y)}iq(l){this.q7.delete(l)}fE(){}};var nxt=class{constructor(l,y){this.callback=l;this.slot=y}init(){}Y2(){return this.slot}Oh(){this.callback.gy(this.slot)}Ta(){this.callback.Kg(this.slot)}release(){}};var gj=class{build(l,y){return new nxt(l,y)}};var Fzq=class{constructor(l,y,k){this.callback=l;this.slot=y;this.vG=k}init(){}Y2(){return this.slot}Oh(){vN(this.vG.get(),"ad-showing");this.callback.gy(this.slot)}Ta(){this.callback.Kg(this.slot);BN(this.vG.get(),"ad-showing")}release(){}};var oxy=class{constructor(l,y,k){this.callback=l;this.slot=y;this.vG=k;this.C=!1;this.Z=0}init(){}Y2(){return this.slot}Oh(){vN(this.vG.get(),"ad-showing");vN(this.vG.get(),"ad-interrupting");this.C=this.vG.get().isAtLiveHead();this.Z=Math.ceil(Date.now()/1E3);this.callback.gy(this.slot)}Ta(){BN(this.vG.get(),"ad-showing");BN(this.vG.get(),"ad-interrupting");const l=this.C?Infinity:R6(this.vG.get(),1,!0)+Math.floor(Date.now()/1E3)-this.Z;this.vG.get().L.seekTo(l,void 0,void 0,1);this.callback.Kg(this.slot)}release(){}};var NA4=class{constructor(l,y,k){this.callback=l;this.slot=y;this.vG=k}init(){}Y2(){return this.slot}Oh(){vN(this.vG.get(),"ad-showing");vN(this.vG.get(),"ad-interrupting");this.callback.gy(this.slot)}Ta(){this.vG.get().Wu();BN(this.vG.get(),"ad-showing");BN(this.vG.get(),"ad-interrupting");this.callback.Kg(this.slot)}release(){this.vG.get().Wu()}};var Ee=class{constructor(l){this.vG=l}build(l,y){if(g9(y,["metadata_type_dai"],"SLOT_TYPE_PLAYER_BYTES"))return new Fzq(l,y,this.vG);if(y.slotEntryTrigger instanceof s7&&g9(y,["metadata_type_served_from_live_infra"],"SLOT_TYPE_PLAYER_BYTES"))return new oxy(l,y,this.vG);if(g9(y,[],"SLOT_TYPE_PLAYER_BYTES"))return new NA4(l,y,this.vG);throw new F(`Unsupported slot with type ${y.slotType} and client metadata: ${Kq(y.clientMetadata)} in ${"PlayerBytesSlotAdapterFactory"}.`);}};var sP4=class extends g.zP{constructor(l){super();this.G5=l;this.I7=new Map}};var fD=class extends sP4{constructor(l,y,k){super(l);this.p_=k;y.get().addListener(this);this.addOnDisposeCallback(()=>{y.IR()||y.get().removeListener(this)})}Z5(l,y){if(y)if(l==="skip-button"){l=[];
for(const k of this.I7.values()){const z=k.trigger;z instanceof n0&&k.category==="TRIGGER_CATEGORY_LAYOUT_EXIT_USER_SKIPPED"&&z.triggeringLayoutId===y&&l.push(k)}l.length&&lR(this.G5(),l)}else iR(this.p_.get(),"supports_multi_step_on_desktop")?l==="ad-action-submit-survey"&&b_(this,y):l==="survey-submit"?b_(this,y):l==="survey-single-select-answer-button"&&b_(this,y)}Dc(l){const y=[];for(const k of this.I7.values()){const z=k.trigger;z instanceof n0&&k.category==="TRIGGER_CATEGORY_LAYOUT_EXIT_USER_MUTED"&&
z.triggeringLayoutId===l&&y.push(k)}y.length?lR(this.G5(),y):EP("Mute requested but no registered triggers can be activated.")}iI(l,y,k,z){if(this.I7.has(y.triggerId))throw new F("Tried to register duplicate trigger for slot.");if(!(y instanceof o5||y instanceof n0))throw new F("Incorrect TriggerType: Tried to register trigger of type "+y.triggerType+" in AdUxUpdateTriggerAdapter.");this.I7.set(y.triggerId,new xL(l,y,k,z))}dK(l){this.I7.delete(l.triggerId)}tG(){}Te(){}n5(){}};var jF=class extends g.zP{constructor(l){super();this.Z=l;this.Vf=!0;this.I7=new Map;this.J=new Set;this.N=new Set;this.V=new Set;this.S=new Set;this.C=new Set}iI(l,y,k,z){if(this.I7.has(y.triggerId))throw new F("Tried to register duplicate trigger for slot.");if(!(y instanceof Fd||y instanceof p0||y instanceof pE||y instanceof YL||y instanceof JC||y instanceof Pm||y instanceof Id||y instanceof v3||y instanceof E7||y instanceof f0||y instanceof H3||y instanceof VV))throw new F("Incorrect TriggerType: Tried to register trigger of type "+
y.triggerType+" in AdsControlFlowEventTriggerAdapter");l=new xL(l,y,k,z);this.I7.set(y.triggerId,l);y instanceof JC&&this.J.has(y.triggeringSlotId)&&lR(this.Z(),[l]);y instanceof Fd&&this.N.has(y.triggeringSlotId)&&lR(this.Z(),[l]);y instanceof v3&&this.C.has(y.triggeringLayoutId)&&lR(this.Z(),[l])}dK(l){this.I7.delete(l.triggerId)}iE(l){this.J.add(l.slotId);const y=[];for(const k of this.I7.values())k.trigger instanceof JC&&l.slotId===k.trigger.triggeringSlotId&&y.push(k);y.length>0&&lR(this.Z(),
y)}Od(l){this.J.delete(l.slotId);const y=[];for(const k of this.I7.values()){const z=k.trigger;z instanceof Pm&&z.triggeringSlotId===l.slotId&&y.push(k)}y.length>0&&lR(this.Z(),y)}lH(l){const y=[];for(const k of this.I7.values()){const z=k.trigger;z instanceof Id&&z.slotType===l.slotType&&z.Z!==l.slotId&&y.push(k)}y.length>0&&lR(this.Z(),y)}gy(l){this.N.add(l.slotId);const y=[];for(const k of this.I7.values())k.trigger instanceof Fd&&l.slotId===k.trigger.triggeringSlotId&&y.push(k);y.length>0&&lR(this.Z(),
y)}Kg(l){this.N.delete(l.slotId);this.V.add(l.slotId);const y=[];for(const k of this.I7.values())if(k.trigger instanceof p0)l.slotId===k.trigger.triggeringSlotId&&y.push(k);else if(k.trigger instanceof VV){const z=k.trigger;l.slotId===z.slotId&&this.C.has(z.triggeringLayoutId)&&y.push(k)}y.length>0&&lR(this.Z(),y)}jV(l){const y=[];for(const k of this.I7.values())k.trigger instanceof pE&&l.slotId===k.trigger.triggeringSlotId&&y.push(k);y.length>0&&lR(this.Z(),y)}FJ(l){const y=[];for(const k of this.I7.values())k.trigger instanceof
YL&&l.slotId===k.trigger.triggeringSlotId&&y.push(k);y.length>0&&lR(this.Z(),y)}Hh(l,y){this.S.add(y.layoutId)}M4(l,y){this.S.delete(y.layoutId)}s1(l,y){this.C.add(y.layoutId);const k=[];for(const r of this.I7.values())if(r.trigger instanceof v3)y.layoutId===r.trigger.triggeringLayoutId&&k.push(r);else if(r.trigger instanceof H3){var z=r.trigger;l.slotType===z.slotType&&y.layoutType===z.layoutType&&y.layoutId!==z.Z&&k.push(r)}else r.trigger instanceof VV&&(z=r.trigger,y.layoutId===z.triggeringLayoutId&&
this.V.has(z.slotId)&&k.push(r));k.length>0&&lR(this.Z(),k)}iq(l,y,k){this.C.delete(y.layoutId);l=[];for(const z of this.I7.values())if(z.trigger instanceof E7&&y.layoutId===z.trigger.triggeringLayoutId&&l.push(z),z.trigger instanceof f0){const r=z.trigger;y.layoutId===r.triggeringLayoutId&&r.Z.includes(k)&&l.push(z)}l.length>0&&lR(this.Z(),l)}fE(){}Ft(){this.V.clear()}pA(){}};var Lzt=class extends g.zP{constructor(l){super();this.Z=l;this.I7=new Map}iI(l,y,k,z){if(this.I7.has(y.triggerId))throw new F("Tried to register duplicate trigger for slot.");if(!(y instanceof Ne))throw new F("Incorrect TriggerType: Tried to register trigger of type "+y.triggerType+" in CloseRequestedTriggerAdapter");this.I7.set(y.triggerId,new xL(l,y,k,z))}dK(l){this.I7.delete(l.triggerId)}};var SF=class extends g.zP{constructor(l,y,k){super();this.Z=l;this.context=k;this.I7=new Map;y.get().addListener(this);this.addOnDisposeCallback(()=>{y.IR()||y.get().removeListener(this)})}iI(l,y,k,z){if(this.I7.has(y.triggerId))throw new F("Tried to register duplicate trigger for slot.");
if(!(y instanceof K0||y instanceof Yt))throw new F("Incorrect TriggerType: Tried to register trigger of type "+y.triggerType+" in ContentPlaybackLifecycleTriggerAdapter");this.I7.set(y.triggerId,new xL(l,y,k,z))}dK(l){this.I7.delete(l.triggerId)}Ft(l){const y=[];var k=y.push,z=this.I7,r=[];for(const Z of z.values())Z.trigger instanceof K0&&Z.trigger.dN===l&&r.push(Z);k.call(y,...r);k=y.push;z=this.I7;r=[];for(const Z of z.values())Z.trigger instanceof Yt&&Z.trigger.Z!==l&&r.push(Z);k.call(y,...r);
y.length&&lR(this.Z(),y)}pA(l){const y=[];var k=y.push,z=this.I7;const r=[];for(const Z of z.values())z=Z.trigger,z instanceof Yt&&z.Z===l&&r.push(Z);k.call(y,...r);y.length&&lR(this.Z(),y)}};var nD=class extends g.zP{constructor(l,y,k,z){super();this.C=l;this.VE=y;this.vG=k;this.wb=z;this.Vf=!0;this.I7=new Map;this.Z=new Set;k.get().addListener(this);this.addOnDisposeCallback(()=>{k.IR()||k.get().removeListener(this)})}iI(l,y,k,z){if(this.I7.has(y.triggerId))throw new F("Tried to register duplicate trigger for slot.");
const r=`${"adtriggercuerange"}:${y.triggerId}`;if(y instanceof s7)CXy(this,l,y,k,z,r,y.Z.start,y.Z.end,y.dN,y.visible);else if(y instanceof L0)CXy(this,l,y,k,z,r,0x7ffffffffffff,0x8000000000000,y.dN,y.visible);else throw new F("Incorrect TriggerType: Tried to register trigger of type "+y.triggerType+" in CueRangeTriggerAdapter");}dK(l){const y=this.I7.get(l.triggerId);y&&this.VE.get().removeCueRange(y.cueRangeId);this.I7.delete(l.triggerId)}onCueRangeEnter(l){if(l=bvz(this,l))if(l=this.I7.get(l))if(jc(this.vG.get()).Z(32))this.Z.add(l.cueRangeId);
else{var y=l?.PH.trigger;(y instanceof s7||y instanceof L0)&&lR(this.C(),[l.PH])}}onCueRangeExit(l){(l=bvz(this,l))&&(l=this.I7.get(l))&&this.Z.delete(l.cueRangeId)}CS(l){if(fe(l,16)<0){for(const y of this.Z)this.onCueRangeEnter(y,!0);this.Z.clear()}}iE(){}Od(){}lH(){}gy(){}Kg(){}jV(){}FJ(){}Hh(){}M4(){}s1(){}iq(){}fE(){}lW(){}onFullscreenToggled(){}QR(){}Ev(){}n2(){}onVolumeChange(){}Xk(){}K2(){}};var vxQ=class extends g.zP{constructor(l,y){super();this.V=l;this.C=new Map;this.N=new Map;this.Z=null;y.get().addListener(this);this.addOnDisposeCallback(()=>{y.IR()||y.get().removeListener(this)});
this.Z=y.get().gJ?.slotId||null}iI(l,y,k,z){if(this.C.has(y.triggerId)||this.N.has(y.triggerId))throw new F("Tried to re-register the trigger.");l=new xL(l,y,k,z);if(l.trigger instanceof R5)this.C.set(l.trigger.triggerId,l);else if(l.trigger instanceof Dh)this.N.set(l.trigger.triggerId,l);else throw new F("Incorrect TriggerType: Tried to register trigger of type "+l.trigger.triggerType+" in LiveStreamBreakTransitionTriggerAdapter");this.C.has(l.trigger.triggerId)&&l.slot.slotId===this.Z&&lR(this.V(),
[l])}dK(l){this.C.delete(l.triggerId);this.N.delete(l.triggerId)}Wr({slotId:l}){if(this.Z!==l){var y=[];this.Z!=null&&y.push(...uH_(this.N,this.Z));l!=null&&y.push(...uH_(this.C,l));this.Z=l;y.length&&lR(this.V(),y)}}};var Fo=class extends g.zP{constructor(l){super();this.Z=l;this.Vf=!0;this.I7=new Map}iI(l,y,k,z){if(this.I7.has(y.triggerId))throw new F("Tried to register duplicate trigger for slot.");if(!(y instanceof Sa))throw new F("Incorrect TriggerType: Tried to register trigger of type "+y.triggerType+" in OnLayoutSelfRequestedTriggerAdapter");this.I7.set(y.triggerId,new xL(l,y,k,z))}dK(l){this.I7.delete(l.triggerId)}s1(){}iq(){}iE(){}Od(){}lH(){}gy(){}Kg(){}jV(){}FJ(){}Hh(){}M4(){}fE(){}};var oB=class extends g.zP{constructor(l){super();this.Z=l;this.Vf=!0;this.I7=new Map}fE(l,y){const k=[];for(const z of this.I7.values()){const r=z.trigger;r.opportunityType===l&&(r.associatedSlotId&&r.associatedSlotId!==y||k.push(z))}k.length&&lR(this.Z(),k)}iI(l,y,k,z){if(this.I7.has(y.triggerId))throw new F("Tried to register duplicate trigger for slot.");if(!(y instanceof PJ_))throw new F("Incorrect TriggerType: Tried to register trigger of type "+y.triggerType+" in OpportunityEventTriggerAdapter");
this.I7.set(y.triggerId,new xL(l,y,k,z))}dK(l){this.I7.delete(l.triggerId)}iE(){}Od(){}lH(){}gy(){}Kg(){}jV(){}FJ(){}Hh(){}M4(){}s1(){}iq(){}};var Nr=class extends g.zP{constructor(l,y,k,z,r,Z){super();this.S=l;this.Ba=y;this.vG=k;this.Se=z;this.Ph=Z;this.Z=null;this.V=!1;this.Vf=!0;this.I7=new Map;y.get().addListener(this);this.addOnDisposeCallback(()=>{y.IR()||y.get().removeListener(this)});
r.get().addListener(this);this.addOnDisposeCallback(()=>{r.IR()||r.get().removeListener(this)})}iI(l,y,k,z){l=new xL(l,y,k,z);
if(y instanceof l5||y instanceof ks||y instanceof yF||y instanceof zV||y instanceof D84){if(this.I7.has(y.triggerId))throw new F("Tried to register duplicate trigger for slot.");this.I7.set(y.triggerId,l)}else throw new F("Incorrect TriggerType: Tried to register trigger of type "+y.triggerType+" in PrefetchTriggerAdapter");}dK(l){this.I7.delete(l.triggerId)}iE(l){const y=l.slotFulfillmentTriggers.find(k=>k instanceof l5);
y&&(mA(this,"TRIGGER_TYPE_NEW_SLOT_SCHEDULED_WITH_BREAK_DURATION",y.breakDurationMs,new Set([l.slotId]),!0),Fs(this.Se.get(),"ads_css",`sid.${l.slotId};bd.${y.breakDurationMs}`))}Od(){}lH(){}gy(){}Kg(){}jV(){}FJ(){}Hh(){}M4(){}s1(){}iq(){}fE(){}TI(l){if(!this.Z)return Fs(this.Se.get(),"ads_nfi",`a.pta;cid.${l.identifier}`),!1;this.C&&this.C.stop();this.J&&this.J.Kl();const y=x8z(this,l);if(!y){var k=m8C(this);const z=this.K!==void 0&&Date.now()<=this.K+1E4;Fs(this.Se.get(),"ads_ncfs",`cid.${l.identifier};cd.${l.yK.toFixed(3)};ccs.${z};cfa.${this.V};bdc.${k.length};${k.slice(0,
6).map(r=>`;bd.${r}`).join("")}`);
return z?(Mv(this.Ph,this.Z,l),!0):!1}(k=y.slot.clientMetadata.aR("metadata_type_triggering_cue_point"))?k.current=l:EP("Expected triggering cue point ref to be available",y.slot);(new g.B_(()=>{const z=y.trigger,r=y.slot;mA(this,"TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_MATCHED",z.breakDurationMs,new Set,!0);mA(this,"TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_NOT_MATCHED",z.breakDurationMs,new Set,!1);let Z=0;for(const e of this.I7.values()){const A=e.trigger;e.slot.slotId===r.slotId&&
(this.I7.delete(A.triggerId),Z++)}Fs(this.Se.get(),"ads_csf",`sid.${r.slotId};bd.${z.breakDurationMs};dt.${Z}`)},10)).start();
return!0}m7(){}Ft(l){this.V=!1;this.K=Date.now();this.Z&&this.Z.contentCpn!==l?(EP("Fetch instructions carried over from previous content video",void 0,void 0,{contentCpn:l,fetchInstructionsCpn:this.Z.contentCpn}),qv(this)):(this.N=new g.B_(()=>{if(this.V)delete this.N;else{var y=this.vG.get().getGetAdBreakContext();Number(y?.livePlaybackPosition?.utcTimeMillis)>0?(delete this.N,W9e(this)):this.N?.start()}},200),this.N?.start())}pA(l){this.Z&&this.Z.contentCpn!==l&&EP("Expected content video of the current fetch instructions to end",
void 0,void 0,{contentCpn:l,
fetchInstructionsCpn:this.Z.contentCpn},!0);qv(this)}Br(l){if(this.Z)EP("Unexpected multiple fetch instructions for the current content");else{this.Z=l;l=IuC(l);this.C=new g.B_(()=>{W9e(this)},l?l:6E5);
this.C.start();this.J=new g.B_(()=>{this.Z&&(this.C&&(this.C.stop(),this.C.start()),qbC(this,"TRIGGER_TYPE_CUE_BREAK_IDENTIFIED"))},Tc5(this.Z));
l=this.vG.get().getCurrentTimeSec(1,!1);for(const y of this.Ba.get().Kn)Fs(this.Se.get(),"nocache",`ct.${Date.now()};cmt.${l};d.${y.yK.toFixed(3)};tw.${y.startSecs-l};cid.${y.identifier};`)}}Vj(){super.Vj();qv(this)}};var BAs=class extends g.zP{constructor(l){super();this.N=l;this.Vf=!0;this.I7=new Map;this.Z=new Map;this.C=new Map}iI(l,y,k,z){if(this.I7.has(y.triggerId))throw new F("Tried to register duplicate trigger for slot.");if(!(y instanceof B3))throw new F("Incorrect TriggerType: Tried to register trigger "+`of type ${y.triggerType}`+" in TimeRelativeToLayoutEnterTriggerAdapter");this.I7.set(y.triggerId,new xL(l,y,k,z));l=this.Z.has(y.triggeringLayoutId)?this.Z.get(y.triggeringLayoutId):new Set;l.add(y);
this.Z.set(y.triggeringLayoutId,l)}dK(l){this.I7.delete(l.triggerId);if(!(l instanceof B3))throw new F("Incorrect TriggerType: Tried to unregister trigger "+`of type ${l.triggerType}`+" in TimeRelativeToLayoutEnterTriggerAdapter");var y=this.C.get(l.triggerId);y&&(y.dispose(),this.C.delete(l.triggerId));if(y=this.Z.get(l.triggeringLayoutId))y.delete(l),y.size===0&&this.Z.delete(l.triggeringLayoutId)}iE(){}Od(){}lH(){}gy(){}Kg(){}jV(){}FJ(){}Hh(){}M4(){}fE(){}s1(l,y){if(this.Z.has(y.layoutId)){l=this.Z.get(y.layoutId);
for(const k of l)l=new g.B_(()=>{const z=this.I7.get(k.triggerId);lR(this.N(),[z])},k.durationMs),l.start(),this.C.set(k.triggerId,l)}}iq(){}};var se=class extends g.zP{constructor(){super();this.I7=new Map}iI(l,y){if(this.I7.has(y.triggerId))throw new F("Tried to register duplicate trigger for slot.");throw new F("Incorrect TriggerType: Tried to register trigger of type "+y.triggerType+" in VideoTransitionTriggerAdapter.");}dK(l){this.I7.delete(l.triggerId)}};var LD=class{constructor(l){this.p_=l;this.C=new Map;this.Z=new Map;this.N=new Map}};var vI=class{constructor(l){this.C=l;this.Z=y=>zS(this.C.get(),y)}};var BI=class{constructor(l,y,k){this.C=l;this.N=y;this.p_=k;this.Z=z=>zS(this.C.get(),z)}tp(l){return l.kind==="AD_PLACEMENT_KIND_START"}};var q4q=class{Z(l){l&&g.wv("adsSeenClientLogging",{serializedAdServingDataEntry:l.serializedAdServingDataEntry})}};var HH5=class extends g.zP{constructor(l,y){super();this.p_=l;this.C=y;this.eventCount=0;this.N=WBz()()}logEvent(l){this.Z(l)}Z(l,y,k,z,r,Z,e,A,Q,t,O,d=0){iR(this.p_.get(),"h5_enable_pacf_debug_logs")&&console.log(`[PACF]: ${l}`,"slot:",r,"layout:",Z,"ping:",e,"Opportunity:",{opportunityType:y,associatedSlotId:k,Eea:z,Ak$:A,adSlotLoggingData:Q,adLayoutLoggingData:t});try{const w=()=>{if(!this.p_.get().L.O().X("html5_disable_client_tmp_logs")&&l!=="ADS_CLIENT_EVENT_TYPE_UNSPECIFIED"){l||EP("Empty PACF event type",
r,Z);var h=j4(this.C.get());const U={eventType:l,eventOrder:++this.eventCount},u={};r&&(u.slotData=fq(h,r));Z&&(u.layoutData=ZfT(h,Z));e&&(u.pingData={pingDispatchStatus:"ADS_CLIENT_PING_DISPATCH_STATUS_SUCCESS",serializedAdPingMetadata:e.Z.serializedAdPingMetadata,pingIndex:e.index});A&&(u.triggerData=E0(A.trigger,A.category));y&&(u.opportunityData=eQz(h,y,k,z));h={organicPlaybackContext:{contentCpn:O1(this.wb.get(),1).clientPlaybackNonce}};h.organicPlaybackContext.isLivePlayback=O1(this.wb.get(),
1).UA;h.organicPlaybackContext.isMdxPlayback=O1(this.wb.get(),1)?.isMdxPlayback;O1(this.wb.get(),1)?.daiEnabled&&(h.organicPlaybackContext.isDaiContent=!0);const W=O1(this.wb.get(),2)?.clientPlaybackNonce;W&&(h.adVideoPlaybackContext={adVideoCpn:W});h&&(u.externalContext=h);U.adClientData=u;Q&&(U.serializedSlotAdServingData=Q.serializedSlotAdServingDataEntry);t&&(U.serializedAdServingData=t.serializedAdServingDataEntry);O&&(U.errorInfo=O);g.wv("adsClientStateChange",{adsClientEvent:U})}};
d&&d>0?g.cs(g.bw(),()=>w(),d):w()}catch(w){iR(this.p_.get(),"html5_log_pacf_logging_errors")&&g.cs(g.bw(),()=>{EP(w instanceof Error?w:String(w),r,Z,{pacf_message:"exception during pacf logging"})})}}};var eHy=class extends HH5{constructor(l,y,k){super(l,y);this.p_=l;this.wb=k}Z(l,y,k,z,r,Z,e,A,Q,t,O){var d=this.p_.get();g.dU(d.L.O())?(d=this.p_.get(),d=g.i_(d.L.O().experiments,"H5_async_logging_delay_ms")):d=void 0;super.Z(l,y,k,z,r,Z,e,A,Q,t,O,d)}};var HI=class{constructor(){this.Z=new Map}clear(){this.Z.clear()}};var gX=class{constructor(l){this.Z="pending";this.C=[];this.N=[];try{l(this.V.bind(this),this.reject.bind(this))}catch(y){this.reject(y)}}state(){return this.Z==="fulfilled"?{state:"fulfilled",value:this.result}:this.Z==="rejected"?{state:"rejected",reason:this.error}:{state:"pending"}}V(l){q9(l)||Ex(l)?FX(fE(l),this.V.bind(this),this.reject.bind(this)):(this.Z="fulfilled",this.result=l,od(this))}reject(l){this.Z="rejected";this.error=l;od(this)}},Ex=Cx(l=>Xby(l)?l instanceof gX:!1);var Bm=window.ila||"vi";var lY=class{constructor(){this.V=new Set;this.C=new Set;this.J=new Map;this.client=void 0;this.csn=null}N(l){this.client=l}Z(){this.clear();this.csn=g.MM()}clear(){this.V.clear();this.C.clear();this.J.clear();this.csn=null}};var A$=class{N(l){g.OJ(ya().N).bind(ya())(l)}clear(){g.OJ(ya().clear).bind(ya())()}};var kM=class{constructor(){this.A=[];this.D=[];this.Z=[];this.S=[];this.C_=[];this.V=new Map;this.K=new Map;this.C=new Set;this.sj=new Map}N(l){this.client=l}b0(l,y={}){g.OJ(()=>{const k=g.E(l?.commandMetadata,g.uv)?.rootVe||g.E(l?.commandMetadata,eas)?.screenVisualElement?.uiType;if(k){var z=g.E(l?.commandMetadata,KTt);if(z?.parentTrackingParams){var r=g.Gd(z.parentTrackingParams);if(z.parentCsn)var Z=z.parentCsn}else y.clickedVisualElement?r=y.clickedVisualElement:l.clickTrackingParams&&(r=g.Gd(l.clickTrackingParams));
a:{z=g.E(l,g.ug);var e=g.E(l,ckz);if(z){if(e=iaq(z,"VIDEO")){z={token:e,videoId:z.videoId};break a}}else if(e&&(z=iaq(e,"PLAYLIST"))){z={token:z,playlistId:e.playlistId};break a}z=void 0}y={cttAuthInfo:z,parentCsn:Z,...y};g.EJ("expectation_logging")&&(y.loggingExpectations=g.E(l?.commandMetadata,eas)?.loggingExpectations||void 0);rQ(this,k,r,y)}else g.WH(new g.WO("Error: Trying to create a new screen without a rootVeType",l))})()}clickCommand(l,y,k=0){return m9Q(this,l.clickTrackingParams,y,k)}stateChanged(l,
y,k=0){this.visualElementStateChanged(g.Gd(l),y,k)}visualElementStateChanged(l,y,k=0){k===0&&this.C.has(k)?this.D.push([l,
y]):cWz(this,l,y,k)}Mz(l){const y=l.cpn;if(this.Z.length&&this.Z[this.Z.length-2]?.cpn!==y){var k=g.MM();if(y&&k&&k!=="UNDEFINED_CSN"){let z;l.itct&&(z=g.Gd(l.itct||""));const r={};g.EJ("web_playback_associated_log_ctt")&&l.a4&&(r.cttAuthInfo={token:l.a4,videoId:l.videoId});l={cpn:y,csn:k};g.EJ("web_playback_associated_ve")&&z&&(g.HH(k,z),l.playbackVe=z.getAsJson());g.wv("playbackAssociated",l,r);this.Z[this.Z.length-1].cpn=y}}}};var Qa=class{fetch(l,y,k){const z=WRQ(l,y,k);return new Promise((r,Z)=>{const e=()=>{if(k?.PB)try{const A=this.handleResponse(l,z.status,z.response,k);r(A)}catch(A){Z(A)}else r(this.handleResponse(l,z.status,z.response,k))};
z.onerror=e;z.onload=e;z.send(y.body??null)})}handleResponse(l,y,k,z){k=k.replace(")]}'","");
let r;try{r=JSON.parse(k)}catch(Z){g.WH(new g.WO("JSON parsing failed after XHR fetch",l,y,k));if(z?.PB&&k)throw new g.FJ("JSON parsing failed after XHR fetch");r={}}y!==200&&(g.WH(new g.WO("XHR API fetch failed",l,y,k)),r={...r,errorMetadata:{status:y}});return r}};var t$=class{static getInstance(){let l=g.UT("ytglobal.storage_");l||(l=new t$,g.iQ("ytglobal.storage_",l));return l}async estimate(){const l=navigator;if(l.storage?.estimate)return l.storage.estimate();if(l.webkitTemporaryStorage?.queryUsageAndQuota)return INP()}};g.iQ("ytglobal.storageClass_",t$);var RM5=class{constructor(l,y){this.handleError=l;this.Z=y;this.C=!1;self.document===void 0||self.addEventListener("beforeunload",()=>{this.C=!0});
this.N=Math.random()<=.2}Al(l){this.handleError(l)}logEvent(l,y){switch(l){case "IDB_DATA_CORRUPTED":g.EJ("idb_data_corrupted_killswitch")||this.Z("idbDataCorrupted",y);break;case "IDB_UNEXPECTEDLY_CLOSED":this.Z("idbUnexpectedlyClosed",y);break;case "IS_SUPPORTED_COMPLETED":g.EJ("idb_is_supported_completed_killswitch")||this.Z("idbIsSupportedCompleted",y);break;case "QUOTA_EXCEEDED":VmC(this,y);break;case "TRANSACTION_ENDED":this.N&&Math.random()<=.1&&this.Z("idbTransactionEnded",y);break;case "TRANSACTION_UNEXPECTEDLY_ABORTED":this.Z("idbTransactionAborted",
{...y,hasWindowUnloaded:this.C})}}};var RCs=Ob("yt-player-local-media",{Zg:{index:{Bz:2},media:{Bz:2},captions:{Bz:5}},shared:!1,upgrade(l,y){y(2)&&(Lm(l,"index"),Lm(l,"media"));y(5)&&Lm(l,"captions");y(6)&&(vs(l,"metadata"),vs(l,"playerdata"))},version:5});var DYq={cupcake:1.5,donut:1.6,eclair:2,froyo:2.2,gingerbread:2.3,honeycomb:3,"ice cream sandwich":4,jellybean:4.1,kitkat:4.4,lollipop:5.1,marshmallow:6,nougat:7.1},D6;a:{var lz=g.Xv();lz=lz.toLowerCase();if(g.ag(lz,"android")){var lt5=lz.match(/android\s*(\d+(\.\d+)?)[^;|)]*[;)]/);if(lt5){const l=parseFloat(lt5[1]);if(l<100){D6=l;break a}}var yz5=lz.match("("+Object.keys(DYq).join("|")+")");D6=yz5?DYq[yz5[0]]:0}else D6=void 0}var yH=D6,KA=yH>=0;var PPg=Pf(()=>window.matchMedia?.("(prefers-reduced-motion: reduce)").matches);var dQ;g.Oa=new MhC;dQ=0;g.kts=class{constructor(l){this.videoData=l;this.Z={c1a:()=>{const y=[];if(g.Oa.isInitialized()){var k="";this.videoData&&this.videoData.rg&&(k=this.videoData.rg+`&${"r1b"}=${this.videoData.clientPlaybackNonce}`);k={atr_challenge:k};Eo("bg_v",void 0,"player_att");(k=KRC(k))?(Eo("bg_s",void 0,"player_att"),y.push(`${"r1a"}=${k}`)):(Eo("bg_e",void 0,"player_att"),y.push("r1c=2"))}else Eo("bg_e",void 0,"player_att"),window.trayride||window.botguard?y.push("r1c=1"):y.push("r1c=4");y.push(`${"r1d"}=${g.Oa.getState()}`);
return y.join("&")},
c6a:y=>"r6a="+(Number(y.c)^$W()),
c6b:y=>`${"r6b"}=${Number(y.c)^Number(g.Y("CATSTAT",0))}`};
this.videoData&&this.videoData.rg?this.ys=iO(this.videoData.rg):this.ys={}}};var MC=SYT()?!0:typeof window.fetch==="function"&&window.ReadableStream&&window.AbortController&&!g.eG?!0:!1;var Y2={vQ:function(l){l[G[47]]()},
FC:function(l,y){var k=l[0];l[0]=l[y%l[G[2]]];l[y%l[G[2]]]=k},
k2:function(l,y){l[G[22]](0,y)}};var z84={Kk:"adunit",Ri:"detailpage",KI:"editpage",B4:"embedded",gC:"leanback",Db:"previewpage",ca_:"profilepage",y$:"unplugged",zn:"playlistoverview",VNG:"sponsorshipsoffer",DdK:"shortspage",R6:"handlesclaiming",jG:"immersivelivepage",QO:"creatormusic",F9:"immersivelivepreviewpage",P5:"admintoolyurt",WKj:"shortsaudiopivot",M6:"consumption",PW:"background_audio_playback"};var n6y=2592E3;var SP;g.Cb={STOP_EVENT_PROPAGATION:"html5-stop-propagation",IV_DRAWER_ENABLED:"ytp-iv-drawer-enabled",IV_DRAWER_OPEN:"ytp-iv-drawer-open",MAIN_VIDEO:"html5-main-video",VIDEO_CONTAINER:"html5-video-container",VIDEO_CONTAINER_TRANSITIONING:"html5-video-container-transitioning",HOUSE_BRAND:"house-brand"};SP={RIGHT_CONTROLS_LEFT:"ytp-right-controls-left",RIGHT_CONTROLS_RIGHT:"ytp-right-controls-right"};var lxz={allowed:"AUTOPLAY_BROWSER_POLICY_ALLOWED","allowed-muted":"AUTOPLAY_BROWSER_POLICY_ALLOWED_MUTED",disallowed:"AUTOPLAY_BROWSER_POLICY_DISALLOWED"};var ri5={ANDROID:3,ANDROID_KIDS:18,ANDROID_MUSIC:21,ANDROID_UNPLUGGED:29,WEB:1,WEB_REMIX:67,WEB_UNPLUGGED:41,IOS:5,IOS_KIDS:19,IOS_MUSIC:26,IOS_UNPLUGGED:33},Zzt={android:"ANDROID","android.k":"ANDROID_KIDS","android.m":"ANDROID_MUSIC","android.up":"ANDROID_UNPLUGGED",youtube:"WEB","youtube.m":"WEB_REMIX","youtube.up":"WEB_UNPLUGGED",ytios:"IOS","ytios.k":"IOS_KIDS","ytios.m":"IOS_MUSIC","ytios.up":"IOS_UNPLUGGED"},rzT={"mdx-pair":1,"mdx-dial":2,"mdx-cast":3,"mdx-voice":4,"mdx-inappdial":5};var I_T={DISABLED:1,ENABLED:2,PAUSED:3,1:"DISABLED",2:"ENABLED",3:"PAUSED"};g.zq=class{constructor(l,y=!1){this[G[12]]=l;this[G[18]]=y;this[G[25]]=this[G[15]]=this[G[13]]=G[3];this[G[5]]={};this[G[9]]=G[3]}set(l,y){this[G[5]][l]!==y&&(this[G[5]][l]=y,this[G[9]]=G[3])}get(l){x2(61,6685,this);return this[G[5]][l]||null}wZ(){this[G[9]]||(this[G[9]]=dl(16,4391,this));return this[G[9]]}clone(){const l=new g.zq(this[G[12]],this[G[18]]);l[G[13]]=this[G[13]];l[G[15]]=this[G[15]];l[G[25]]=this[G[25]];l[G[5]]=g.r4(this[G[5]]);l[G[9]]=this[G[9]];return l}};g.NV=class{constructor(l,y){this.id=l;this.a7=y;this.captionTracks=[];this.N=this.V=null;this.xtags="";this.S=this.J=!1;this.Z=null;this.C="UNKNOWN";this.captionsInitialState="CAPTIONS_INITIAL_STATE_UNKNOWN";l=this.a7.id.split(".");l.length>1&&(this.J=l[1]==="2",this.S=l[1]==="4")}getLanguageInfo(){return this.a7}getXtags(){if(!this.xtags){const l=this.id.split(";");l.length>1&&(this.xtags=l[1])}return this.xtags}toString(){return this.a7.name}isAutoDubbed(){return this.a7.getIsAutoDubbed()}};
g.NV.prototype.getLanguageInfo=g.NV.prototype.getLanguageInfo;g.NV.prototype.isAutoDubbed=g.NV.prototype.isAutoDubbed;var xM=class{constructor(l,y,k,z,r=0){this.C=l;this.Z=y;this.N=k;this.reason=z;this.CP=r}equals(l){return this.C===l.C&&this.Z===l.Z&&this.N===l.N&&this.reason===l.reason&&(!qN||this.CP===l.CP)}isLocked(){return this.N&&!!this.C&&this.C===this.Z}compose(l){if(l.N&&W6(l))return Tj;if(l.N||W6(this))return l;if(this.N||W6(l))return this;let y=this.C&&l.C?Math.max(this.C,l.C):this.C||l.C;const k=this.Z&&l.Z?Math.min(this.Z,l.Z):this.Z||l.Z;y=Math.min(y,k);let z=0;qN&&(z=this.CP!==0&&l.CP!==0?Math.min(this.CP,
l.CP):this.CP===0?l.CP:this.CP);return qN&&y===this.C&&k===this.Z&&z===this.CP||!qN&&y===this.C&&k===this.Z?this:qN?new xM(y,k,!1,k===this.Z&&z===this.CP?this.reason:l.reason,z):new xM(y,k,!1,k===this.Z?this.reason:l.reason)}V(l){return!l.video||qN&&this.CP!==0&&this.CP<l.CP?!1:Aiq(this,l.video.quality)}},Znt=g.m8("auto","hd1080",!1,"l"),kn=g.m8("auto","large",!1,"l"),Tj=g.m8("auto","auto",!1,"p"),qN=!1;var YM=class{constructor(l,y,k,z){this.videoInfos=l;this.C=y;this.audioTracks=[];this.N=z||[];if(this.C){l=new Set;k?.({ainfolen:this.C.length});for(const r of this.C){if(!r.a7||l.has(r.a7.id)){k?.({atkerr:!!r.a7,itag:r.itag,xtag:r.C,lang:r.a7?.name||"",langid:r.a7?.id||""});continue}y=new g.NV(r.id,r.a7);l.add(r.a7.id);this.audioTracks.push(y)}k?.({atklen:this.audioTracks.length})}}Gi(l){l=l||Tj;const y=g.oC(this.videoInfos,r=>l.V(r)),k=[],z={};
for(let r=0;r<y.length;r++){const Z=y[r].video;z[Z.quality]||(k.push(Z),z[Z.quality]=!0)}return k}Id(l){l=l||Tj;return g.oC(this.videoInfos,y=>l.V(y))}getAvailableAudioTracks(){return this.audioTracks}Z(){return!!this.C}};var xMs=new Set(["356"]),e8T=class extends g.zP{constructor(){super(...arguments);this.C=null;this.Z=new Map}Vj(){super.Vj()}};var Hy=class{constructor(l,y,k,z,r,Z,e,A,Q){this.n_=l;this.startTime=y;this.duration=k;this.ingestionTime=z;this.sourceURL=r;this.eI=Q;this.endTime=y+k;this.Z=e||0;this.range=Z||null;this.pending=A||!1;this.eI=Q||null}};g.zl=class{constructor(){this.segments=[];this.C=null;this.J=!0;this.S=""}K(l){this.segments.push(l)}CK(l){return!!this.N(l)}getDuration(l){return(l=this.N(l))?l.duration:0}D(l){return this.getDuration(l)}wc(){return 0}zi(){return this.segments.length?this.segments[0].n_:-1}QK(l){return(l=this.N(l))?l.ingestionTime:NaN}x3(){return this.segments.length?this.segments[this.segments.length-1].n_:-1}qf(l){return this.x3()===l&&!this.J&&l>=0}nw(){const l=this.segments[this.segments.length-1];return l?l.endTime:
NaN}dY(){return this.segments[0].startTime}wj(){return this.segments.length}Z(){return 0}NL(l){return(l=this.V(l))?l.n_:-1}A(l){return(l=this.N(l))?l.sourceURL:""}getStartTime(l){return(l=this.N(l))?l.startTime:0}uU(l){return this.getStartTime(l)+this.getDuration(l)}isLoaded(){return this.segments.length>0}N(l){if(this.C&&this.C.n_===l)return this.C;l=g.cO(this.segments,new Hy(l,0,0,0,""),(y,k)=>y.n_-k.n_);
return this.C=l>=0?this.segments[l]:null}V(l){if(this.C&&this.C.startTime<=l&&l<this.C.startTime+this.C.duration)return this.C;l=g.cO(this.segments,{startTime:l},(y,k)=>y.startTime-k.startTime);
return this.C=l>=0?this.segments[l]:this.segments[Math.max(0,-l-2)]}append(l){if(l.length)if(l=g.tp(l),this.segments.length){var y=this.segments.length?g.nC(this.segments).endTime:0,k=l[0].n_-this.x3();k>1&&ZB(this.segments);k=k>0?0:-k+1;for(let z=k;z<l.length;z++)k=l[z],k.startTime=y,k.endTime=k.startTime+k.duration,y+=l[z].duration,this.segments.push(l[z])}else this.segments=l}m0(){return 0}};g.zl.prototype.uf=yz(3);var pHq=class{constructor(l,y,k,z,r=!1){this.data=l;this.offset=y;this.size=k;this.type=z;this.Z=(this.C=r)?0:8;this.dataOffset=this.offset+this.Z}skip(l){this.Z+=l}};var nET=class{constructor(l){this.offset=0;this.data=new DataView(new ArrayBuffer(l))}};var v6=class{constructor(l,y,k,z,r,Z,e){this.startSecs=l;this.yK=y;this.context=k;this.identifier=z;this.event=r;this.Z=Z;this.tileContext=e}},AzP=class{};var $Dg={predictStart:"predictStart",start:"start",["continue"]:"continue",stop:"stop",prefetch:"prefetch"},Ix4={EVENT_PREDICT_START:"predictStart",EVENT_START:"start",EVENT_CONTINUE:"continue",EVENT_STOP:"stop",EVENT_PREFETCH:"prefetch"};var jNz=class{constructor(l,y){this.data=l;this.uri=y||"http://youtube.com/streaming/metadata/segment/102015";this.segmentNumber=Lb(this,"Sequence-Number");this.J=Lb(this,"Segment-Count");this.K=this.data["Segment-Durations-Ms"]||"";this.ingestionTime=Lb(this,"Ingestion-Walltime-Us")/1E6;this.Z=(Lb(this,"First-Frame-Time-Us")+Lb(this,"First-Frame-Uncertainty-Us"))/1E6;this.GZ=Lb(this,"Target-Duration-Us")/1E6;this.S=this.data["Stream-Finished"]==="T";this.V=this.data.Streamable==="T";this.cryptoPeriodIndex=
Lb(this,"Crypto-Period-Index");this.C=Lb(this,"Crypto-Period-Seconds")}N(){return this.data["Stitched-Video-Cpn"]?this.data["Stitched-Video-Cpn"].split(",").slice(0,-1):[]}zQ(){return!!(this.data["Stitched-Video-Id"]||this.data["Stitched-Video-Cpn"]||this.data["Stitched-Video-Duration-Us"]||this.data["Stitched-Video-Start-Frame-Index"]||this.data["Serialized-State"]||this.data["Is-Ad-Break-Finished"])}toString(){let l="";for(const y of Object.keys(this.data))l+=y+":"+this.data[y]+";";return l}};var R5z=class{constructor(l,y){this.Z=l;this.duration=y}};var KtQ=class{constructor(l,y,k,z,r){this.C=r;this.Z=l||0;this.pitch=y||0;this.yaw=k||0;this.roll=z||0;this.crc=r.getUint32(4)}};var AQ=class{constructor(l,y){this.Z=l;this.pos=0;this.start=y||0}NH(){const l=this.pos;this.pos=0;let y=!1;try{tQ(this,440786851)&&(this.pos=0,tQ(this,408125543)&&(y=!0))}catch(k){if(k instanceof RangeError)this.pos=0,y=!1,g.WH(k);else throw k;}this.pos=l;return y}};var ma=class{constructor(l){this.Ww=l;this.Z={};this.url=""}set(l,y){this.Ww.get(l);this.Z[l]=y;this.url=""}get(l){return this.Z[l]||this.Ww.get(l)}wZ(){this.url||(this.url=DMq(this));return this.url}};var trC=class{constructor(){this.C=this.Z=this.timedOut=this.started=this.V=this.N=0}};var D6Q=class{constructor(l){this.C_=this.A=this.J=this.C=0;this.D=this.S=!1;this.Z=l;this.V=l.clone()}ZW(l,y){return l.hv?this.D?this.S=!0:this.S=Oet(this,l,y):Oet(this,l,y)}K(l,y,k=0){k>1?l=l.vg:(y=cy(y,Wy(this,this.ZW(l,y),l)),l=Math.max(this.J,y.timedOut)+l.f3*(this.C-this.J)+.25*this.A,l=l>3?1E3*1.6**(l-3):0);return l===0?!0:this.C_+l<(0,g.f)()}Y(l,y){this.Z.set(l,y);this.V.set(l,y);this.N&&this.N.set(l,y)}p5(l){return this.V.get(l)}dZ(){return this.V.get("cpn")||""}Vs(l,y){l.Ww===this.Z&&(this.Z=
rs(l,y));l.Ww===this.N&&(this.N=rs(l,y))}b0(){this.D=!0}Ld(){return this.Z!==this.N&&!this.S}};var ra=class{constructor(l,y,k,z){this.initRange=k;this.indexRange=z;this.C=null;this.C_=!1;this.Xr=0;this.b0=this.YJ=this.D=null;this.info=y;this.pP=new D6Q(l)}Z(){return!!this.C&&this.index.isLoaded()}Ja(){return!1}mK(l){return[l]}HG(l){return[l]}};var VC=class{constructor(l,y){this.start=l;this.end=y;this.length=y-l+1}toString(){return this.start+"-"+(this.end==null?"":this.end)}Z(){return this.end==null?{start:String(this.start)}:{start:String(this.start),end:String(this.end)}}};var jd=class{constructor(l,y,k,z="",r,Z,e,A,Q,t,O,d=""){this.type=l;this.oR=y;this.range=k;this.source=z;this.WV=O;this.clipId=d;this.C_=[];this.K="";this.n_=-1;this.Y=0;this.K=z;this.n_=r>=0?r:-1;this.startTime=Z||0;this.duration=e||0;this.Z=A||0;this.C=Q>=0?Q:this.range?this.range.length:NaN;this.N=this.range?this.Z+this.C===this.range.length:t===void 0?!!this.C:t;this.range?(this.V=this.startTime+this.duration*this.Z/this.range.length,this.A=this.duration*this.C/this.range.length,this.J=this.V+
this.A):ase(this)}S(){return this.N&&this.oR.index.qf(this.n_)}isEncrypted(){return this.oR.info.isEncrypted()}equals(l){return!(!l||l.oR!==this.oR||l.type!==this.type||(this.range&&l.range?l.range.start!==this.range.start||l.range.end!==this.range.end:l.range!==this.range)||l.n_!==this.n_||l.Z!==this.Z||l.C!==this.C)}D(){return this.type===4}q4(){return!!this.oR.info.video}b0(){return this.n_}rY(){const l=fV(this);let y="";g.fR(l,(k,z)=>{y+=`${z}_${k}_`});
return y.slice(0,-1)}};var By=class{constructor(l,y){this.cF=l;this.V=this.Z=null;this.J=this.MV=NaN;this.ZW=this.requestId=null;this.d4={Bya:()=>this.range};
this.pP=l[0].oR.pP;this.C=y||"";this.cF[0].range&&this.cF[0].C>0&&(hVC(l)?(this.range=wWz(l),this.N=this.range.length):(this.range=this.cF[this.cF.length-1].range,this.N=G1P(l)))}N8(){return this.Z?this.Z.wZ():""}isDecorated(){return!!(this.Z||this.V&&this.V.Ov)}Ae(){return KV(this.cF[0])}Vs(l,y){this.pP.Vs(l,y);if(this.Z){this.Z=rs(l,y);for(const k of["acpns","cpn","daistate","skipsq"])this.Z["set"](k,null)}this.requestId=l.get("req_id")}};var p2=class extends ra{constructor(l,y,k,z,r,Z=0){super(l,y,z);this.gb=k;this.GZ=Z;this.index=r||new g.zl}N(){return!1}A(){return!0}sj(){return!1}Ja(){return!this.gb}K(){return new By([new jd(1,this,this.initRange,"getMetadataRequestInfo")],this.gb)}Y(){return null}RR(l){this.V(l);return this.A()&&l.C&&!l.N?new By([new jd(l.type,l.oR,l.range,"liveGetNextRequestInfoBySegment",l.n_,l.startTime,l.duration,l.Z+l.C,NaN,!0)],this.index.A(l.n_)):this.J(EL(l),!1)}S(l,y=!1){l=this.index.NL(l);y&&(l=Math.min(this.index.x3(),
l+1));return this.J(l,!0)}u0(l){yA(l)}V(l){return l.C===0?!0:this.index.x3()>l.n_&&this.index.zi()<=l.n_+1}update(l,y,k){this.index.append(l);qrT(this.index,k);l=this.index;l.J=y;l.S="update"}Z(){return this.Ja()?!0:super.Z()}J(l,y){const k=this.index.A(l),z=this.index.getStartTime(l);let r=this.index.getDuration(l),Z;y?r=Z=0:Z=this.info.CP>0?this.info.CP*r:1E3;return new By([new jd(3,this,void 0,"liveCreateRequestInfoForSegment",l,z,r,0,Z,!y)],k)}rb(){return this.Ja()?0:this.initRange.length}PG(){return!1}};var Qx_=class{constructor(l,y,k,z,r){this.n_=l;this.startSecs=y;this.yK=k;this.Z=z||NaN;this.C=r||NaN}};var LV=class{constructor(){this.Z=[];this.C=null;this.S=0;this.N=[];this.J=!1;this.K="";this.V=-1}update(l){var y=void 0;this.C&&(y=this.C);{const U=new LV;var k=Array.from(l.getElementsByTagName("S"));if(k.length){var z=+NO(l,"timescale")||1,r=(+k[0].getAttribute("t")||0)/z,Z=+NO(l,"startNumber")||0;U.V=r;var e=y?y.startSecs+y.yK:0,A=Date.parse(Isq(NO(l,"yt:segmentIngestTime")))/1E3;U.J=l.parentElement.tagName==="SegmentTemplate";U.J&&(U.K=NO(l,"media"));l=y?Z-y.n_:1;U.S=l>0?0:-l+1;for(h of k){l=
+h.getAttribute("d")/z;k=(+h.getAttribute("yt:sid")||0)/z;const u=+h.getAttribute("r")||0;for(let W=0;W<=u;W++){if(y&&Z<=y.n_){Z++;continue}var Q=new Qx_(Z,e,l,A+k,r);U.Z.push(Q);b:{var t=h;var O=z,d=Q.startSecs;Q=t.getAttribute("yt:cuepointTimeOffset");var w=t.getAttribute("yt:cuepointDuration");if(!Q||!w){t=null;break b}Q=Number(Q);d=-Q/O+d;O=Number(w)/O;w=t.getAttribute("yt:cuepointContext")||null;const V=t.getAttribute("yt:cuepointIdentifier")||"";t=t.getAttribute("yt:cuepointEvent")||"";t=new v6(d,
O,w,V,$Dg[t]||"unknown",Q)}t&&U.N.push(t);Z++;e+=l;r+=l;A+=l+k}}U.Z.length&&(U.C=g.nC(U.Z))}var h=U}this.S=h.S;this.C=h.C||this.C;g.Gx(this.Z,h.Z);g.Gx(this.N,h.N);this.J=h.J;this.K=h.K;this.V===-1&&(this.V=h.getStreamTimeOffset())}getStreamTimeOffset(){return this.V===-1?0:this.V}};var tHy=class{constructor(){this.V=[];this.Z=null;this.C={};this.N={}}};var OnC=class extends g.zl{constructor({GZ:l=0,zB:y=!1,Ho:k=0,Vi:z=0,wW:r=Infinity,EH:Z=0,aj:e=!1,DO:A=!1}={}){super();this.Je=this.Rt=-1;this.rq=l;this.Ho=k;this.zB=y;this.Vi=z;this.wW=r;this.EH=Z;((this.aj=e)||isFinite(r)&&this.wW>0)&&y&&dN&&(this.J=!1,this.S="postLive");this.DO=A}wc(){return this.rq}CK(l,y){l=vy(this,l);return l>=0&&(y||!this.segments[l].pending)}zi(){return this.zB?this.segments.length?this.V(this.dY()).n_:-1:super.zi()}dY(){if(this.aj)return 0;if(!this.zB)return super.dY();if(!this.segments.length)return 0;
const l=Math.max(g.nC(this.segments).endTime-this.Ho,0);return this.Vi>0&&this.V(l).n_<this.Vi?this.N(this.Vi).startTime:l}nw(){if(this.DO&&this.Je&&this.Je>0)return this.Je/1E3;if(!this.segments.length)return super.nw();var l=this.x3();if(!this.zB||l<=this.segments[this.segments.length-1].n_)l=this.segments[this.segments.length-1];else{var y=this.segments[this.segments.length-1];l=new Hy(l,Math.max(0,y.startTime-(y.n_-l)*this.rq),this.rq,0,`sq/${l}`,void 0,void 0,!0)}return this.aj?Math.min(this.Ho,
l.endTime):l.endTime}wj(){return this.zB?this.segments.length?this.x3()-this.zi()+1:0:super.wj()}x3(){let l=Math.min(this.wW,Math.max(super.x3(),this.Rt));var y=this.Ho*1E3;y=this.Je>0&&this.Je<y;this.aj&&this.Ho>0&&this.Rt>0&&!y&&(y=this.V(this.Ho))&&(l=Math.min(y.n_-1,l));return l}lO(){return this.segments.length?this.segments[this.segments.length-1]:null}K(l){var y=vy(this,l.n_);if(y>=0)this.segments[y]=l;else if(this.segments.splice(-(y+1),0,l),this.EH&&l.n_%(300/this.rq)===0){var k=this.segments[0].n_,
z=Math.floor(this.EH/this.rq);l=l.n_-z;y=-(y+1)-z;y>0&&l>k&&(this.segments=this.segments.slice(y))}}C_(l){l=vy(this,l);l>=0&&this.segments.splice(l,1)}Pm(){return this.Rt}qf(l){return dN?!this.J&&l>=0&&this.x3()<=l:super.qf(l)}V(l){if(!this.zB)return super.V(l);if(!this.segments.length)return null;var y=this.segments[this.segments.length-1];if(l<this.segments[0].startTime)y=Math.max(0,this.segments[0].n_-Math.ceil((this.segments[0].startTime-l)/this.rq));else if(l>=y.endTime)y=y.n_+Math.floor((l-
y.endTime)/this.rq+1);else{y=CR(this.segments,z=>l<z.startTime?-1:l>=z.endTime?1:0);
if(y>=0)return this.segments[y];var k=-(y+1);y=this.segments[k-1];k=this.segments[k];y=Math.floor((l-y.endTime)/((k.startTime-y.endTime)/(k.n_-y.n_-1))+1)+y.n_}return this.N(y)}N(l){if(!this.zB)return super.N(l);if(!this.segments.length)return null;var y=vy(this,l);if(y>=0)return this.segments[y];const k=-(y+1);y=this.rq;if(k===0)var z=Math.max(0,this.segments[0].startTime-(this.segments[0].n_-l)*y);else k===this.segments.length?(z=this.segments[this.segments.length-1],z=z.endTime+(l-z.n_-1)*y):(z=
this.segments[k-1],y=this.segments[k],y=(y.startTime-z.endTime)/(y.n_-z.n_-1),z=z.endTime+(l-z.n_-1)*y);return new Hy(l,z,y,0,`sq/${l}`,void 0,void 0,!0)}},dN=!1;var HcC=class extends p2{constructor(l,y,k={}){super(l,y,"",void 0,void 0,k.GZ||0);this.index=new OnC(k)}sj(){return!0}Z(){return!0}V(l){return this.A()&&l.C&&!l.N||!l.oR.index.qf(l.n_)}K(){}S(l,y=!1){return typeof l!=="number"||isFinite(l)?super.S(l,y):new By([new jd(3,this,void 0,"mlLiveGetReqInfoStubForTime",-1,void 0,this.GZ,void 0,this.GZ*this.info.CP)],"")}J(l,y){if(this.index.CK(l))return super.J(l,y);const k=this.index.getStartTime(l);let z=Math.round(this.GZ*this.info.CP),r=this.GZ;y&&(r=
z=0);return new By([new jd(3,this,void 0,"mlLiveCreateReqInfoForSeg",l,k,r,void 0,z,!y)],l>=0?`sq/${l}`:"")}};var h6=class extends ra{constructor(l,y){super(l,y);l=this.index=new g.zl;l.J=!1;l.S="d"}N(){return!1}A(){return!1}sj(){return!1}K(){return new By([new jd(1,this,void 0,"otfInit")],"sq/0")}Y(){return null}RR(l){this.V(l);return K7t(this,EL(l),!1)}S(l,y=!1){l=this.index.NL(l);y&&(l=Math.min(this.index.x3(),l+1));return K7t(this,l,!0)}u0(l){l.info.type===1&&(this.C||(this.C=Xf(l.C)),l.Z&&l.Z.uri==="http://youtube.com/streaming/otf/durations/112015"&&gbs(this,l.Z))}V(l){return l.C===0?!0:this.index.x3()>
l.n_&&this.index.zi()<=l.n_+1}rb(){return 0}PG(){return!1}};var fsT,dD5,SP_,nbQ,jwz;g.R9=class{constructor(l){this.tag=l}};fsT=new Map;dD5=class{constructor(){this.Z=new Map;this.d4={Opd:()=>this.Z}}};
SP_=class{constructor(){this.Z=10;this.C=Date.now()}};nbQ=new Map;jwz=new dD5;var kp=class{constructor(l,y){this.info=l;this.C=y;this.Z=null;this.V=this.N=-1;this.timestampOffset=0;this.isLocked=this.K=!1;this.J=this.info.oR.Ja()&&!this.info.Z}S(l,y=!1,k=0){if(this.isLocked||l.isLocked||!pV(this.info,l.info)||this.info.N)return null;if(k){if(this.C.totalLength+l.C.totalLength>k)return null}else if(y&&(y=this.C,k=l.C,y=!(k.Z.length?KOe(y,k.Z[0]):1)),y)return null;y=new jd(this.info.type,this.info.oR,this.info.range,this.info.K,this.info.n_,this.info.startTime,this.info.duration,
this.info.Z,this.info.C,this.info.N,this.info.WV,this.info.clipId);k=l.info;y.C+=k.C;y.range&&(y.A+=k.A);y.J=k.J;y.N=k.N;k=new IG;aG(k,this.C);aG(k,l.C);y=new kp(y,k);y.Z!=null&&l.Z!=null&&g.DP("dash",414627957,`merged slice emsg overridden; prev: ${y.Z.zQ()} next: ${l.Z.zQ()}`);y.Z=l.Z||this.Z;y.N=this.N!==-1?this.N:l.N;y.V=this.V!==-1?this.V:l.V;return y}};g.Zb=class{constructor(){this.count=0;this.C=1;this.N=!1;this.offsets=new Float64Array(128);this.startTicks=new Float64Array(128)}CK(l){return l<=this.x3()}Z(l){return this.offsets[l]}getStartTime(l){return this.startTicks[l]/this.C}uU(l){return this.getStartTime(l)+this.getDuration(l)}QK(){return NaN}getDuration(l){l=this.D(l);return l>=0?l/this.C:-1}D(l){return l+1<this.count||this.N?this.startTicks[l+1]-this.startTicks[l]:-1}wc(){return 0}zi(){return 0}x3(){return this.count-1}qf(l){return this.x3()===
l&&l>=0}nw(){return this.N?this.startTicks[this.count]/this.C:NaN}dY(){return 0}wj(){return this.count}A(){return""}NL(l){l=g.cO(this.startTicks.subarray(0,this.count),l*this.C);return l>=0?l:Math.max(0,-l-2)}isLoaded(){return this.x3()>=0}m0(l,y){if(l>=this.x3())return 0;let k=0;for(y=this.getStartTime(l)+y;l<this.x3()&&y>this.getStartTime(l);l++)k=Math.max(k,Hes(this,l)/this.getDuration(l));return k}resize(l){l+=2;const y=this.offsets;this.offsets=new Float64Array(l+1);const k=this.startTicks;this.startTicks=
new Float64Array(l+1);for(l=0;l<this.count+1;l++)this.offsets[l]=y[l],this.startTicks[l]=k[l]}cap(l,y){QA(this);this.N=!0;this.startTicks[this.count]=y;this.offsets[this.count]=l}};g.Zb.prototype.uf=yz(2);var GQ=class extends ra{constructor(l,y,k,z){super(l,y,k,z);this.J=null;this.d4={yp:(r,Z,e)=>this.yp(r,Z,e)};
this.index=new g.Zb}K(l,y){var k=new jd(2,this,this.indexRange,"indexInfo",void 0,void 0,void 0,void 0,void 0,void 0,void 0,y);const z=[new jd(1,this,this.initRange,"initInfo",void 0,void 0,void 0,void 0,void 0,void 0,void 0,y),k];this.info.contentLength>0&&l&&(k=k.range.end+1,l=Math.min(l,this.info.contentLength-k),l>0&&z.push(new jd(4,this,JQ(k,l),"tbdRange",void 0,void 0,void 0,void 0,void 0,void 0,void 0,y)));return new By(z)}u0(l){if(l.info.type===1){if(this.C)return;this.C=Xf(l.C)}else if(l.info.type===
2){if(this.J||this.index.x3()>=0)return;if(g.Lk(this.info)){var y=this.index,k=g.l9(l);l=l.info.range.start;var z=g.yC(k,0,1936286840);k=EEe(z);y.C=k.timescale;var r=k.hP;y.offsets[0]=k.EC+l+z.size;y.startTicks[0]=r;y.N=!0;var Z=k.BJ.length;for(var e=0;e<Z;e++)l=y,r=k.w2[e],z=k.BJ[e],l.count++,QA(l),l.offsets[l.count]=l.offsets[l.count-1]+r,l.startTicks[l.count]=l.startTicks[l.count-1]+z}else this.J=g.l9(l)}if(this.info.Cg()&&this.C&&this.J){l=new DataView(this.C.buffer);y=this.index;r=this.J;k=this.indexRange.end;
z=new AQ(l);l=z;z=l.pos;Z={Ix:1E6,S7:1E9,duration:0,f7:0,ZU:0};if(tQ(l,408125543))if(Z.f7=OL(l,!0),Z.ZU=l.start+l.pos,tQ(l,357149030)){for(e=QC(l);!wF(e);){var A=OL(e,!1);A===2807729?Z.Ix=hQ(e):A===2807730?Z.S7=hQ(e):A===17545?Z.duration=a9(e):GI(e)}l.pos=z;l=Z}else l.pos=z,l=null;else l.pos=z,l=null;if(l!==null){y.C=l.S7/l.Ix;z=new AQ(r);r=z;e=l.ZU;z=r.pos;Z=[];if(tQ(r,475249515)){for(A=QC(r);tQ(A,187);){let Q=QC(A);if(!tQ(Q,179))continue;const t=hQ(Q);if(!tQ(Q,183))continue;Q=QC(Q);let O=e;for(;tQ(Q,
241);)O=hQ(Q)+e;Z.push({RO:O,xs:t})}if(Z.length>0&&k===Z[0].RO)for(k=0;k<Z.length;k++)Z[k].RO+=1;r.pos=z;k=Z}else r.pos=z,k=null;if(k!==null){for(const Q of k)k=y,r=Q.RO,z=Q.xs,QA(k),k.offsets[k.count]=r,k.startTicks[k.count]=z,k.count++;y.cap(l.f7+l.ZU,l.duration)}}this.J=null}}yp(l,y,k){const z=[];for(let r=l;r<=this.index.x3();r++){const Z=JQ(this.index.Z(r),Hes(this.index,r)),e=this.index.getStartTime(r),A=this.index.getDuration(r),Q=Math.max(0,y-Z.start),t=Math.min(Z.end+1,y+k)-(Z.start+Q);z.push(new jd(3,
this,Z,"getRequestInfoForRange",r,e,A,Q,t));if(Z.start+Q+t>=y+k)break}z.length||(l=new g.WO("b189619593",`${l}`,`${y}`,`${k}`),g.n(l));return new By(z)}mK(l){const y=this.HG(l.info),k=l.info.range.start+l.info.Z,z=[];for(let r=0;r<y.length;r++){const Z=il(l.C,y[r].range.start+y[r].Z-k,y[r].C);z.push(new kp(y[r],Z))}return z}HG(l){const y=l.range.start+l.Z;let k=0;for(;k<this.index.x3()&&y>=this.index.Z(k+1);)k++;return this.yp(k,y,l.C).cF}V(l){l.S();return this.Z()?!0:l.range.end+1<this.info.contentLength}Y(l,
y){this.V(l);if(!this.Z())return y=JQ(l.range.end+1,y),y.end+1>this.info.contentLength&&(y=new VC(y.start,this.info.contentLength-1)),new By([new jd(4,l.oR,y,"getNextRequestInfoByLength",void 0,void 0,void 0,void 0,void 0,void 0,void 0,l.clipId)]);l.type===4&&(l=this.HG(l),l=l[l.length-1]);let k=0;const z=l.range.start+l.Z+l.C;l.type===3&&(l.S(),k=l.n_,z===l.range.end+1&&(k+=1));return this.yp(k,z,y)}RR(){return null}S(l,y=!1){l=this.index.NL(l);y&&(l=Math.min(this.index.x3(),l+1));return this.yp(l,
this.index.Z(l),0)}N(){return!0}A(){return!0}sj(){return!1}rb(){return this.indexRange.length+this.initRange.length}PG(){return this.indexRange&&this.initRange&&this.initRange.end+1===this.indexRange.start?!0:!1}};var d5T=class{constructor(l,y,k,z="",r="",Z=""){this.displayName=l;this.vssId=y;this.languageCode=k;this.kind=z;this.xtags=r;this.id=Z}};var At_={COLOR_PRIMARIES_BT709:"bt709",COLOR_PRIMARIES_BT2020:"bt2020",COLOR_PRIMARIES_UNKNOWN:null,COLOR_PRIMARIES_UNSPECIFIED:null},RVP={COLOR_TRANSFER_CHARACTERISTICS_BT709:"bt709",COLOR_TRANSFER_CHARACTERISTICS_BT2020_10:"bt2020",COLOR_TRANSFER_CHARACTERISTICS_SMPTEST2084:"smpte2084",COLOR_TRANSFER_CHARACTERISTICS_ARIB_STD_B67:"arib-std-b67",COLOR_TRANSFER_CHARACTERISTICS_UNKNOWN:null,COLOR_TRANSFER_CHARACTERISTICS_UNSPECIFIED:null};g.XF=class{constructor(l,y,k,z=!1){this.name=l;this.id=y;this.isDefault=k;this.isAutoDubbed=z}getName(){return this.name}getId(){return this.id}getIsDefault(){return this.isDefault}getIsAutoDubbed(){return this.isAutoDubbed}toString(){return this.name}};g.XF.prototype.getName=g.XF.prototype.getName;g.XF.prototype.getId=g.XF.prototype.getId;g.XF.prototype.getIsDefault=g.XF.prototype.getIsDefault;g.XF.prototype.getIsAutoDubbed=g.XF.prototype.getIsAutoDubbed;var kXe=/action_display_post/;g.OE=class extends g.z1{constructor(l="",y=null,k=!1){super();this.sourceUrl=l;this.isLivePlayback=k;this.PG=this.duration=0;this.isPremiere=this.aj=this.C=this.isLiveHeadPlayable=this.isLive=this.N=!1;this.wW=this.Vi=0;this.isOtf=this.UA=!1;this.rb=(0,g.f)();this.b0=Infinity;this.Z={};this.V=new Map;this.state=this.I9=0;this.A=null;this.isManifestless=!1;this.Ja=[];this.S=null;this.HG=0;this.K="";this.RR=NaN;this.iW=this.Q4=this.timestampOffset=this.D=0;this.e3=this.jK=NaN;this.Ob=0;this.u0=this.Y=
!1;this.xz=[];this.Oj={};this.kz=this.sj=NaN;this.d4={Fwe:z=>{wb(this,z)}};
this.WG=y?.z7("html5_use_network_error_code_enums");nVq=!!y&&y.z7("html5_modern_vp9_mime_type");UE=!!y?.z7("html5_enable_flush_during_seek")&&g.is();M2=!!y?.z7("html5_enable_reset_audio_decoder")&&g.is()}isLoading(){return this.state===1}R2(){return this.state===3}mK(){return g.nR(this.Z,l=>!!l.info.video&&l.info.video.qualityOrdinal>=2160)}J(){return g.nR(this.Z,l=>!!l.info.contentProtection)}T7(l){var y=l.getElementsByTagName("Representation");
if(l.getElementsByTagName("SegmentList").length>0||l.getElementsByTagName("SegmentTemplate").length>0){this.UA=this.N=!0;this.A||(this.A=new tHy);YP_(this.A,l);this.publish("refresh");for(l=0;l<y.length;l++){var k=pot(this,y[l]);if(!this.Z[k.id]){var z=$E(sL(y[l],"BaseURL").textContent),r=sL(y[l],"Initialization"),Z=NO(r,"sourceURL");r=Py(NO(r,"range"));this.Z[k.id]=new p2(z,k,Z,r)}k=this.Z[k.id];Z=NO(y[l],"id","AdaptationSet");Z=Z!==""?Z:NO(y[l],"mimetype","AdaptationSet");z=this.A;Z=z.N[k.info.id]||
z.C[Z]||z.Z||null;z=Z.Z;!this.D&&Z.getStreamTimeOffset()&&(this.D=Z.getStreamTimeOffset());if(Z.J){r=[];for(var e of z){z=k.info.id;var A=k.info.CP*8,Q=e.n_,t=e.startSecs,O=Z.K.split("$$");for(var d=0;d<O.length;d++)O[d]=O[d].replace("$RepresentationID$",z),O[d]=O[d].replace("$Number$",Q.toString()),O[d]=O[d].replace("$Bandwidth$",A.toString()),O[d]=O[d].replace("$Time$",t.toString());r.push(new Hy(e.n_,e.startSecs,e.yK,e.Z,O.join("$"),null,e.C))}z=r}else{Z=ae(sL(y[l],"SegmentList").getElementsByTagName("SegmentURL"),
Z.S);t=[];for(O=0;O<Z.length;O++){r=t;A=r.push;d=void 0;var w=Z[O];Q=z[O];let h=w.getAttribute("media");if(w=w.getAttribute("mediaRange")){const U=w.split("-");U[1]&&Number(U[1])>=0?d=Py(w):h=`${h}?range=${w}`}A.call(r,new Hy(Q.n_,Q.startSecs,Q.yK,Q.Z,h,d,Q.C))}z=t}k.update(z,this.isLive,this.PG)}pW_(this.A);return!0}this.duration=W7s(NO(l,"mediaPresentationDuration"));a:{for(e=0;e<y.length;e++){z=y[e];l=pot(this,z);k=$E(sL(z,"BaseURL").textContent);Z=sL(z,"SegmentBase");z=Py(Z.attributes.getNamedItem("indexRange").value);
Z=Py(Z.getElementsByTagName("Initialization")[0].attributes.getNamedItem("range").value);l=new GQ(k,l,Z,z);if(!l){y=!1;break a}wb(this,l)}y=!0}return y}Xr(l){return this.A?ae(this.A.V,l):this.Ja.length?ae(this.Ja,l):[]}refresh(){if(!this.isLoading()&&!this.IR()){var l=g.UI(this.sourceUrl,{start_seq:Kmg(this).toString()});U5e(this,l).Ya(()=>{})}}resume(){Xo5(this)}TM(){if(this.isManifestless&&this.C&&PV(this))return PV(this);
const l=this.Z;let y=!1,k=NaN,z=NaN;for(const Z in l){const e=l[Z];var r=e.index;if(!r.isLoaded()||E1(e.info.mimeType))continue;e.b0&&(y=!0);r=r.nw();e.info.a9()&&(isNaN(k)||r<k)?k=r:e.info.q4()&&(isNaN(z)||r<z)&&(z=r)}return y||isNaN(z)?k:Math.min(k,z)}dY(){if(this.isManifestless){if(J6(this))return J6(this);if(this.Ob){var l=this.QK(this.TM());if(l&&(l-=this.Ob,l>0))return this.TM()-l}}l=this.Z;for(const y in l){const k=l[y].index;if(k.isLoaded()&&!E1(l[y].info.mimeType))return k.dY()}return 0}getStreamTimeOffset(){return this.D}QK(l){for(const y in this.Z){const k=
this.Z[y].index;if(k.isLoaded()){const z=k.NL(l),r=k.QK(z);if(r)return r+l-k.getStartTime(z)}}return NaN}hv(){for(const l in this.Z)this.Z.hasOwnProperty(l)&&(this.Z[l].C=null,this.Z[l].C_=!1)}};g.OE.prototype.gb=yz(4);var nVq,UE,M2,j1=null,S1=!!navigator.mediaCapabilities?.decodingInfo,YoC={commentary:1,alternate:2,dub:3,main:4};var o_=new Set,n2=new Map;var oV4=class{constructor(l){this.Qj=l;this.PF=this.uS=this.HG=this.J=this.V=this.f2=this.PG=this.C_=!1;this.K=this.S=0;this.gb=!1;this.Y=!0;this.mK=!1;this.IF=0;this.u0=this.rb=this.h2=this.Ja=!1;this.C={};this.kz=this.WG=this.R7=this.disableAv1=this.b0=this.BF=this.xz=this.Oj=this.Z=this.A=!1;this.sj=0;this.jN=this.Qj.X("html5_disable_aac_preference");this.g4=Infinity;this.wX=0;this.MW=this.Qj.yM();this.T7=this.Qj.experiments.z7("html5_enable_vp9_fairplay");this.q_=this.Qj.X("html5_force_av1_for_testing");
this.vn=this.Qj.sA().Z.G7(Wd5);this.Xr=g.i_(this.Qj.experiments,"html5_av1_ordinal_cap");this.hj=this.Qj.X("html5_disable_hfr_when_vp9_encrypted_2k4k_unsupported");this.OA=this.Qj.X("html5_account_onesie_format_selection_during_format_filter");this.CP=g.i_(this.Qj.experiments,"html5_max_byterate");this.hv=this.Qj.X("html5_enable_iamf_audio");this.RR=this.Qj.experiments.z7("html5_allow_capability_merge");this.SN=this.Qj.X("html5_enable_encrypted_av1")}};var ez=class{constructor(l,y,k,z){this.flavor=l;this.keySystem=y;this.N=k;this.experiments=z;this.C={};this.Ze=this.keySystemAccess=null;this.Yf=this.cI=-1;this.fn=null;this.V=!!z&&z.z7("edge_nonprefixed_eme");z&&z.z7("html5_enable_vp9_fairplay")}clone(l){return new ez(this.flavor,l,this.N,this.experiments)}Z(){return this.keySystem==="com.youtube.fairplay.sbdl"}Dp(){return{flavor:this.flavor,keySystem:this.keySystem}}getInfo(){switch(this.keySystem){case "com.youtube.playready":return"PRY";case "com.microsoft.playready":return"PRM";
case "com.widevine.alpha":return"WVA";case "com.youtube.widevine.l3":return"WVY";case "com.youtube.fairplay":return"FPY";case "com.youtube.fairplay.sbdl":return"FPC";case "com.apple.fps.1_0":return"FPA";default:return this.keySystem}}},zC={playready:["com.youtube.playready","com.microsoft.playready"],widevine:["com.youtube.widevine.l3","com.widevine.alpha"]},FEe={widevine:"DRM_SYSTEM_WIDEVINE",fairplay:"DRM_SYSTEM_FAIRPLAY",playready:"DRM_SYSTEM_PLAYREADY"},w1P={widevine:1,fairplay:2,playready:3};var s0q=class extends g.zP{constructor(l,y,k,z=!1,r){super();this.Qj=y;this.useCobaltWidevine=z;this.Md=r;this.C=[];this.N={};this.Z={};this.callback=null;this.J=!1;this.V=[];this.initialize(l,!k)}initialize(l,y){for(const z of Object.keys(l)){var k=z;for(const r of l[k])if(r.contentProtection)for(const Z of Object.keys(r.contentProtection)){k=Z;let e=zC[Z];!e&&this.X("html5_enable_vp9_fairplay")&&k==="fairplay"&&(e=["com.youtube.fairplay.sbdl"]);if(e)for(const A of e)this.N[A]=this.N[A]||new ez(k,
A,r.contentProtection[k],this.Qj.experiments),this.Z[k]=this.Z[k]||{},this.Z[k][r.mimeType]=!0}}Uw()&&(this.N["com.youtube.fairplay"]=new ez("fairplay","com.youtube.fairplay","",this.Qj.experiments),this.X("html5_enable_vp9_fairplay")||(this.Z.fairplay=this.Z.fairplay||{},this.Z.fairplay['video/mp4; codecs="avc1.4d400b"']=!0,this.Z.fairplay['audio/mp4; codecs="mp4a.40.5"']=!0));this.C=vV4(y,this.useCobaltWidevine,this.X("html5_enable_safari_fairplay")&&!0,this.X("html5_enable_vp9_fairplay")).filter(z=>
!!this.N[z])}X(l){return this.Qj.experiments.z7(l)}},rk;var h8_={"":"LIVE_STREAM_MODE_UNKNOWN",dvr:"LIVE_STREAM_MODE_DVR",lp:"LIVE_STREAM_MODE_LP",post:"LIVE_STREAM_MODE_POST",window:"LIVE_STREAM_MODE_WINDOW",live:"LIVE_STREAM_MODE_LIVE"};var Gtt={OFF:"0",ON:"1",Ic:"2",HN:"3"};var atC={RED:"red",yjj:"white"};var inT=class{constructor(l){l=Gp(l.serializedClientExperimentFlags??"","&");this.flags=new Map(Object.entries(l).map(([y,k])=>typeof k==="string"?[y,k]:[y,k[0]]))}G7(l){if(l.EU!==3)throw Error("WpccFlagRetriever only supports WPCC flags");
return r04(this,l)}z7(l){return this.flags.get(`${l}`)==="true"}};var UD4=class{constructor(l,y,k){this.Z=void 0;this.experimentIds=l?l.split(","):[];this.flags=Gp(y||"","&");l={};for(const z of this.experimentIds)l[z]=!0;this.experiments=l;k=new inT(k);this.N=new Bat(k);this.C=new vn_(k)}sA(){return this.N}mZ(){return this.C}z7(l){l=this.G7(l);JSON.stringify(l);return l==="true"}G7(l){return this.flags[l]}};var MHe=Promise.resolve(),X1t=l=>MHe.then(l),tBq=window.queueMicrotask?window.queueMicrotask.bind(window):X1t;var uT5=class{constructor(l,y,k=!1){this.experiments=l;this.b0=y;this.sj=k;this.A=!!g.UT("cast.receiver.platform.canDisplayType");this.K={};this.D=!1;this.N=new Map;this.S=!0;this.Z=this.C=!1;this.C_=0;this.Y=this.experiments.z7("html5_disable_vp9_encrypted");this.V=this.experiments.z7("html5_enable_encrypted_av1");l=g.UT("cast.receiver.platform.getValue");this.J=!this.A&&l&&l("max-video-resolution-vpx")||null;$B5(this);this.C=!!(Uw()&&hD()>=21)}canPlayType(l,y){l=l.canPlayType?l.canPlayType(y):!1;
Zu?l=l||czQ[y]:yH===2.2?l=l||CKs[y]:af()&&(l=l||bn4[y]);return!!l}isTypeSupported(l){return this.A?window.cast.receiver.platform.canDisplayType(l):XP(l)}},CKs={'video/mp4; codecs="avc1.42001E, mp4a.40.2"':"maybe"},bn4={"application/x-mpegURL":"maybe"},czQ={"application/x-mpegURL":"maybe"};var xDe=class extends g.z1{constructor(){super();this.items={}}add(l,y){if(!this.items[l]&&(y.oO||y.t2r||y.w3)){var k=this.items;let z=y;Object.isFrozen&&!Object.isFrozen(y)&&(z=Object.create(y),Object.freeze(z));k[l]=z;this.publish("vast_info_card_add",l)}}remove(l){const y=this.get(l);delete this.items[l];return y}get(l){return this.items[l]||null}isEmpty(){return g.DB(this.items)}};var mDy=class{constructor(l,y){this.Z=l;this.cipher=this.Z.exports.AES128CTRCipher_create(y.byteOffset)}encrypt(l){this.Z.exports.AES128CTRCipher_encrypt(this.cipher,l.byteOffset,l.byteLength);return l}IR(){return this.cipher===0}dispose(){this.Z.exports.AES128CTRCipher_release(this.cipher);this.cipher=0}};var GJt=class{constructor(){this.C=this.US=0;this.Z=Array.from({length:eE.length}).fill(0)}GV(l,y=1){this.US+=y;this.C+=l;l/=y;for(let k=0;k<eE.length&&!(l<eE[k]);++k)this.Z[k]+=y}toString(){return""}},eE=[20,100,500,2E3];var q8C=class{},Wje=class{constructor(){this.startTimeMs=(0,g.f)();this.Z=!1}},Itt=class{constructor(){this.Z=new q8C}isActive(){return!0}aN(l,y){if(y){var k=this;for(const z in y){if(!y.hasOwnProperty(z))continue;const r=l.prototype[z],Z=y[z];l.prototype[z]=function(...e){const A=this,Q=(0,g.f)(),t=r.apply(A,e);return hy5(k,t,null,Q,O=>Z.apply(A,[O].concat(e)))}}}}Jg(){return new Wje}IX(l,y,k=1){y instanceof Wje&&(aHs(this,l,(0,g.f)()-y.startTimeMs,k),y.Z=!0)}BA(l,y){const k=(0,g.f)();
y=y();hy5(this,y,l,k)}LW(){const l={};for(const k in this.Z){if(!this.Z.hasOwnProperty(k))continue;a:{var y=this.Z[k];if(y.US===0){y=null;break a}let z=Math.ceil(y.US).toFixed(0)+"."+y.C.toFixed(0);for(let r=0;r<eE.length;++r)if(y.Z[r]>0)z+="."+eE[r].toFixed(0)+"_"+y.Z[r].toFixed(0);else break;y=z}y&&(l[k]=y)}this.Z=new q8C;return l}toString(){return""}};var Ac=new class{isActive(){return!1}aN(){}Jg(){}IX(){}BA(l,y){y()}LW(){return{}}toString(){return""}},TIy=!!+$u("html5_enable_profiler"),VHQ=!!+$u("html5_onesie_enable_profiler"),$n=TIy||VHQ?new Itt:Ac,uYQ=TIy?$n:Ac,O9=VHQ?$n:Ac;var PK4=class{emscripten_notify_memory_growth(){}},JzC=class{constructor(){this.proc_exit=()=>{};
this.fd_write=(l,y,k)=>{if(!this.exports)return 1;l=new Uint32Array(this.exports.memory.buffer,y,k*2);y=[];for(let r=0;r<k;++r){var z=new Uint8Array(this.exports.memory.buffer,l[r*2],l[r*2+1]);z=g.xW(z);y.push(z)}return y.reduce((r,Z)=>r+Z.length,0)}}},X5y=class{constructor(){this.env=new PK4;
this.wasi_snapshot_preview1=new JzC}};var wk=class{constructor(l,y,k){this.instance=l;this.Z=k;this.exports=this.instance.exports;y.wasi_snapshot_preview1.exports=this.exports;l=Math.floor(Math.random()*256);y=Math.floor(Math.random()*256);k=0;try{k=this.exports.malloc(16);(new Uint8Array(this.exports.memory.buffer,k,16)).fill(l);if(this.exports.sentinel(k,16,y)!==y*16%256)throw"wasm.wm.vi";const z=new Uint8Array(this.exports.memory.buffer,k,16);for(let r=0;r<16;r++)if(z[r]!==(l+y)%256)throw`wasm.wm.vi${r}`;}finally{k!==0&&this.exports.free(k)}}malloc(l){return this.exports.malloc(l)}free(l){this.exports.free(l)}realloc(l,
y){return this.exports.realloc(l,y)}pY(l){var y=this.malloc(l.byteLength);y=new Uint8Array(this.exports.memory.buffer,y,l.byteLength);y.set(l);return y}EJ(l){const y=l.slice();l.buffer===this.exports.memory.buffer&&this.free(l.byteOffset);return y}},bGC=new class{constructor(){this.Z="WebAssembly"in window}},dk="WebAssembly"in window&&("instantiateStreaming"in window.WebAssembly||"instantiate"in window.WebAssembly);O9.aN(wk,{pY:l=>({profile:"copyj2w",US:l===void 0?0:Math.ceil(l.byteLength/16)}),
EJ:l=>({profile:"copyw2j",US:l===void 0?0:Math.ceil(l.byteLength/16)})});var Y84=class{constructor(l,y,k){this.Z=l;this.V=!1;y=this.Z.pY(y);this.C=new mDy(l,y);this.Z.free(y.byteOffset);k&&(this.N=this.Z.pY(k))}encrypt(l,y){return xBy(this,l,y,!1).Bu}IR(){return this.V}dispose(){this.IR()||(g.yb(this.C),this.N&&this.Z.free(this.N.byteOffset),this.V=!0)}};var p1t=class{constructor(l,y,k){this.Z=new Y84(l,y,k)}encrypt(l,y){try{return this.Z.encrypt(l,y)}catch(k){PH(k,"wasm ocwce"),g.WH(k)}}C(l,y){try{const k=xBy(this.Z,l,y,!0);return{Bu:k.Bu,signature:k.signature}}catch(k){PH(k,"wasm ocwceas"),g.WH(k)}}IR(){return this.Z.IR()}dispose(){this.Z.dispose()}};var Kjt=class extends g.zP{constructor(l,y,k){super();this.encryptedClientKey=y;this.K=k;this.C=new Uint8Array(l.buffer,0,16);this.N=new Uint8Array(l.buffer,16)}S(l){this.Z=new p1t(l,this.C,this.N);g.x(this,this.Z)}};var gBq=class extends g.zP{constructor(l,y){super();if(!y&&l)try{y=JSON.parse(l)}catch{}if(y){l=y.clientKey?GC(y.clientKey):null;var k=y.encryptedClientKey?GC(y.encryptedClientKey):null,z=y.keyExpiresInSeconds?Number(y.keyExpiresInSeconds)*1E3+(0,g.f)():null;l&&k&&z&&(this.Z=new Kjt(l,k,z),g.x(this,this.Z));y.onesieUstreamerConfig&&(this.onesieUstreamerConfig=GC(y.onesieUstreamerConfig)||void 0);this.baseUrl=y.baseUrl}}};var EBC=class extends g.zP{constructor(){super();this.values={};this.OQ={};this.C={};this.N=this.Z=0;this.V=new g.B_(()=>{qn5(this)},1E4);
g.x(this,this.V)}};var fte="blogger discover-ads ads-preview ads-fe gac books docs duo flix google-live google-one play play-ads shopping chat hangouts-meet photos-edu picasaweb gmail jamboard".split(" "),TRC={Mt:"caoe",Nt:"capsv",Xe:"cbrand",Es:"cbr",KV:"cbrver",Fe:"cchip",DP:"ccappver",YG:"ccrv",cD:"cfrmver",GG:"c",TG:"cver",zG:"ctheme",d_:"cplayer",M2:"cmodel",vN:"cnetwork",B8:"cos",OS_VERSION:"cosver",FW:"cplatform",Bbr:"crqyear"},jxP=class extends g.zP{constructor(l,y,k,z){super();this.webPlayerContextConfig=y;
this.Yr=z;this.csiServiceName=this.csiPageType="";this.userAge=NaN;this.oY=this.kz=this.vn=this.Ky=this.userDisplayName=this.userDisplayImage=this.Um="";this.RY=null;this.Z={};this.hv={};this.controlsType="0";this.y0=NaN;this.gb=!1;this.va=(0,g.f)();this.pf=this.WG=0;this.Z$=this.Gz=!1;this.PV=!0;this.preferGapless=this.Wi=this.O1=this.N=this.wY=!1;this.Qc=[];this.Fg=!1;this.qg=0;l=l?g.r4(l):{};y&&y.csiPageType&&(this.csiPageType=y.csiPageType);y&&y.csiServiceName&&(this.csiServiceName=y.csiServiceName);
y&&y.preferGapless&&(this.preferGapless=y.preferGapless);this.experiments=new UD4(y?y.serializedExperimentIds:l.fexp,y?y.serializedExperimentFlags:l.fflags,y??{});this.forcedExperiments=y?y.serializedForcedExperimentIds:KL("",l.forced_experiments)||void 0;this.cspNonce=y?.cspNonce?y.cspNonce:KL("",l.csp_nonce);this.X("web_player_deprecated_uvr_killswitch");try{var r=document.location.toString()}catch(w){r=""}this.Xz=r;this.ancestorOrigins=(z=window.location.ancestorOrigins)?Array.from(z):[];this.V=
JD(!1,y?y.isEmbed:l.is_embed);if(y&&y.device){if(z=y.device,z.androidOsExperience&&(this.Z.caoe=`${z.androidOsExperience}`),z.androidPlayServicesVersion&&(this.Z.capsv=`${z.androidPlayServicesVersion}`),z.brand&&(this.Z.cbrand=z.brand),z.browser&&(this.Z.cbr=z.browser),z.browserVersion&&(this.Z.cbrver=z.browserVersion),z.cobaltReleaseVehicle&&(this.Z.ccrv=`${z.cobaltReleaseVehicle}`),this.Z.c=z.interfaceName||"WEB",this.Z.cver=z.interfaceVersion||"html5",z.interfaceTheme&&(this.Z.ctheme=z.interfaceTheme),
this.Z.cplayer=z.interfacePlayerType||"UNIPLAYER",z.model&&(this.Z.cmodel=z.model),z.network&&(this.Z.cnetwork=z.network),z.os&&(this.Z.cos=z.os),z.osVersion&&(this.Z.cosver=z.osVersion),z.platform&&(this.Z.cplatform=z.platform),r=$f(this.experiments,"html5_log_vss_extra_lr_cparams_freq"),r==="all"||r==="once")z.chipset&&(this.hv.cchip=z.chipset),z.cobaltAppVersion&&(this.hv.ccappver=z.cobaltAppVersion),z.firmwareVersion&&(this.hv.cfrmver=z.firmwareVersion),z.deviceYear&&(this.hv.crqyear=z.deviceYear)}else this.Z.c=
l.c||"web",this.Z.cver=l.cver||"html5",this.Z.cplayer="UNIPLAYER";this.loaderUrl=y?this.V||W15(this)&&y.loaderUrl?y.loaderUrl||"":this.Xz:this.V||W15(this)&&l.loaderUrl?KL("",l.loaderUrl):this.Xz;this.V&&g.iQ("yt.embedded_player.embed_url",this.loaderUrl);this.u0=qP()||If();this.A=XV(this.loaderUrl,uzQ)||!1;z=this.loaderUrl;this.Pd=M6(XV(z,bIs),z,!1,"Trusted Ad Domain URL");this.R7=JD(!1,l.privembed);this.protocol=this.Xz.indexOf("http:")===0?"http":"https";this.nS=gC5((y?y.customBaseYoutubeUrl:l.BASE_YT_URL)||
"")||gC5(this.Xz)||`${this.protocol}://www.youtube.com/`;z=y?y.eventLabel:l.el;r="detailpage";z==="adunit"?r=this.V?"embedded":"detailpage":z==="embedded"||this.A?r=Y9(r,z,z84):z&&(r="embedded");this.b0=r;u3Q();z=null;r=y?y.playerStyle:l.ps;const Z=g.ro(fte,r);!r||Z&&!this.A||(z=r);this.playerStyle=z;this.S=g.ro(fte,this.playerStyle);this.houseBrandUserStatus=y?.houseBrandUserStatus;this.Y=this.S&&this.playerStyle!=="play"&&this.playerStyle!=="jamboard";this.Zs=!this.Y;this.rb=JD(!1,l.disableplaybackui);
this.disablePaidContentOverlay=JD(!1,y?.disablePaidContentOverlay);this.disableSeek=JD(!1,y?.disableSeek);this.enableSpeedOptions=y?.enableSpeedOptions||(ik().defaultPlaybackRate?vu||g.WD||L2?g.N2&&qp("20")||g.Mx&&qp("4")||g.Yf&&qp("11")||bs():!(g.Yf&&!g.G6("chrome")||vu||g.G6("android")||g.G6("silk")):!1);this.zz=JD(!1,l.enable_faster_speeds);this.supportsVarispeedExtendedFeatures=y?.supportsVarispeedExtendedFeatures??!1;this.C=JD(this.playerStyle==="blazer",l.is_html5_mobile_device||y&&y.isMobileDevice);
this.YM=this.X("mweb_allow_background_playback")?!1:this.C&&!this.S;this.HG=Ck();this.xC=g.Wb;this.CJ=!!y?.embedsHostFlags?.optOutApiDeprecation;var e;y?y.hideInfo!==void 0&&(e=!y.hideInfo):e=l.showinfo;this.Mg=g.u9(this)&&!this.CJ||JD(!MV(this)&&!XC(this)&&!this.S,e);this.s6=y?!!y.mobileIphoneSupportsInlinePlayback:JD(!1,l.playsinline);e=this.C&&KA&&yH!=null&&yH>0&&yH<=2.3;z=y?y.useNativeControls:l.use_native_controls;this.K=g.u9(this)&&this.C;r=this.C&&!this.K;z=g.ih(this)||!e&&JD(r,z)?"3":"1";
this.disableOrganicUi=!!y?.disableOrganicUi;r=y?y.controlsType:l.controls;this.controlsType=this.disableOrganicUi||r==="0"||r===0?"0":z;this.hk=this.C;this.controlsType==="1"&&(this.hk||Y9("2",y?y.autohide:l.autohide,Gtt));this.color=Y9("red",y?y.progressBarColor:l.color,atC);this.Wd=this.controlsType==="3";this.g4=!this.V;this.sR=(z=!this.g4&&!XC(this)&&!this.Y&&!this.S&&!MV(this))&&!this.Wd&&this.controlsType==="1";this.jN=g.U9(this)&&z&&this.controlsType==="0"&&!this.sR&&!y?.embedsEnableEmc3ds;
this.jw=this.sS=e;this.SN=(this.controlsType==="3"||this.C||JD(!1,l.use_media_volume))&&!this.K;this.Ng=us&&!g.KK(601)?!1:!0;this.DY=this.V||!1;this.Cp=XC(this)?"":(this.loaderUrl||l.post_message_origin||"").substring(0,128);this.widgetReferrer=KL("",y?y.widgetReferrer:l.widget_referrer);var A;y?y.disableCastApi&&(A=!1):A=l.enablecastapi;A=!this.A||JD(!0,A);e=!0;y&&y.disableMdxCast&&(e=!1);this.V9=this.X("enable_cast_for_web_unplugged")&&g.aq(this)&&e||g.ow(this)&&e||A&&e&&this.controlsType==="1"&&
!this.C&&(XC(this)||g.U9(this)||g.cn(this));this.lR=!!window.document.pictureInPictureEnabled||ct();A=y?!!y.supportsAutoplayOverride:JD(!1,l.autoplayoverride);this.ji=!(this.C&&!g.u9(this))&&!g.G6("nintendo wiiu")||A;this.kK=(y?!!y.enableMutedAutoplay:JD(!1,l.mutedautoplay))&&!1;A=(XC(this)||MV(this))&&this.playerStyle==="blazer";this.Q9=y?!!y.disableFullscreen:!JD(!0,l.fs);e=g.j_(g.CA(this))&&g.u9(this);this.Oj=!this.Q9&&(A||g.LL())&&!e;this.Cd=this.X("html5_picture_in_picture_logging_onresize");
this.bO=g.i_(this.experiments,"html5_picture_in_picture_logging_onresize_ratio")??.33;this.eE=this.X("html5_picture_in_picture_blocking_onresize");this.bG=this.X("html5_picture_in_picture_blocking_ontimeupdate");this.hc=this.X("html5_picture_in_picture_blocking_document_fullscreen");this.MS=this.X("html5_picture_in_picture_blocking_standard_api");A=af()&&qp(58)&&!If();e=Zu||typeof MediaSource==="undefined";this.S2=this.X("uniplayer_block_pip")&&(A||e)||this.eE||this.bG||this.MS;A=g.u9(this)&&!this.CJ;
var Q;y?y.disableRelatedVideos!==void 0&&(Q=!y.disableRelatedVideos):Q=l.rel;this.BF=A||JD(!this.S,Q);this.iR=JD(!1,y?y.enableContentOwnerRelatedVideos:l.co_rel);this.D=If()&&yH>0&&yH<=4.4?"_top":"_blank";this.I4=g.cn(this);this.uW=JD(this.playerStyle==="blazer",y?y.enableCsiLogging:l.enablecsi);switch(this.playerStyle){case "blogger":Q="bl";break;case "discover-ads":Q="dd";break;case "gmail":Q="gm";break;case "gac":Q="ga";break;case "ads-preview":Q="ap";break;case "ads-fe":Q="adfe";break;case "books":Q=
"gb";break;case "docs":case "flix":Q="gd";break;case "duo":Q="gu";break;case "google-live":Q="gl";break;case "google-one":Q="go";break;case "play":case "play-ads":Q="gp";break;case "chat":Q="hc";break;case "hangouts-meet":Q="hm";break;case "photos-edu":case "picasaweb":Q="pw";break;default:Q="yt"}this.C_=Q;this.sj=KL("",y?y.authorizedUserIndex:l.authuser);this.MW=g.u9(this)&&(this.R7||!$9()||this.u0);var t;y?y.disableWatchLater!==void 0&&(t=!y.disableWatchLater):t=l.showwatchlater;this.OA=((Q=!this.MW)||
!!this.sj&&Q)&&JD(!this.Y,this.A?t:void 0);this.T7=y?y.isMobileDevice||!!y.disableKeyboardControls:JD(!1,l.disablekb);this.loop=JD(!1,l.loop);this.pageId=KL("",y?y.initialDelegatedSessionId:l.pageid);this.fD=JD(!0,l.canplaylive);this.HB=this.experiments.z7("html5_lr_overwrite_default_audio_quality_setting")?1:2;this.vZ=JD(!1,l.livemonitor);this.disableSharing=JD(this.S,y?y.disableSharing:l.ss);(t=y&&this.X("fill_video_container_size_override_from_wpcc")?y.videoContainerOverride:l.video_container_override)?
(Q=t.split("x"),Q.length!==2?t=null:(t=Number(Q[0]),Q=Number(Q[1]),t=isNaN(t)||isNaN(Q)||t*Q<=0?null:new g.Fn(t,Q))):t=null;this.V0=t;this.mute=y?!!y.startMuted:JD(!1,l.mute);this.storeUserVolume=!this.mute&&JD(this.controlsType!=="0",y?y.storeUserVolume:l.store_user_volume);t=y?y.annotationsLoadPolicy:l.iv_load_policy;this.annotationsLoadPolicy=this.controlsType==="3"?3:Y9(void 0,t,qr);this.captionsLanguagePreference=y?y.captionsLanguagePreference||"":KL("",l.cc_lang_pref);t=Y9(2,y?y.captionsLanguageLoadPolicy:
l.cc_load_policy,qr);this.controlsType==="3"&&t===2&&(t=3);this.bI=t;this.hj=y?y.hl||"en_US":KL("en_US",l.hl);this.region=y?y.contentRegion||"US":KL("US",l.cr);this.hostLanguage=y?y.hostLanguage||"en":KL("en",l.host_language);this.dF=!this.R7&&Math.random()<g.i_(this.experiments,"web_player_api_logging_fraction");this.PG=!this.R7;this.enabledEngageTypes=new Set;this.deviceIsAudioOnly=!!y?.deviceIsAudioOnly;this.y0=pL(this.y0,l.ismb);this.Zs?(t=l.vss_host||"s.youtube.com",t==="s.youtube.com"&&(t=ZT(this.nS)||
"www.youtube.com")):t="video.google.com";this.JX=t;bh(this,l,!0);this.RR=new xDe;g.x(this,this.RR);Q=y?y.innertubeApiKey:KL("",l.innertube_api_key);A=y?y.innertubeApiVersion:KL("",l.innertube_api_version);t=y?y.innertubeContextClientVersion:KL("",l.innertube_context_client_version);Q=g.Y("INNERTUBE_API_KEY")||Q;A=g.Y("INNERTUBE_API_VERSION")||A;e=g.Y("INNERTUBE_CONTEXT_CLIENT_CONFIG_INFO");z=AA(this);r=typeof this.Z.c==="number"?Number(this.Z.c):Object.keys(ENQ).indexOf(this.Z.c);this.vV={innertubeApiKey:Q,
innertubeApiVersion:A,j1:e,vP:z,UP:r,innertubeContextClientVersion:g.Y("INNERTUBE_CONTEXT_CLIENT_VERSION")||t,Lt:this.hostLanguage,U8:this.region,uy:g.Y("INNERTUBE_HOST_OVERRIDE")||"",PK:!!g.Y("INNERTUBE_USE_THIRD_PARTY_AUTH",!1),p8:!!g.Y("INNERTUBE_OMIT_API_KEY_WHEN_AUTH_HEADER_IS_PRESENT",!1)};this.OG=window.WebKitPlaybackTargetAvailabilityEvent!=null;this.J=new uT5(this.experiments,this.X("html5_force_hfr_support")?!0:OH(this)||MP()||Xp()||VBz(this),g.Mx&&g.KK(56)||g.N2&&g.KK(54)||this.X("html5_force_vp9_subsample_encryption_support")||
VBz(this));this.enableSafetyMode=y?.initialEnableSafetyMode??JD(!1,l.enable_safety_mode);t=this.rb?!1:XC(this)&&this.playerStyle!=="blazer";var O;y?y.disableAutonav!=null&&(O=!y.disableAutonav):O=l.allow_autonav;this.q_=JD(t,!this.Y&&O);this.sendVisitorIdHeader=y?!!y.sendVisitorIdHeader:JD(!1,l.send_visitor_id_header);let d;this.playerStyle==="docs"&&(y?d=y.disableNativeContextMenu:d=l.disable_native_context_menu);this.disableNativeContextMenu=JD(!1,d);this.jD=OH(this)&&this.X("enable_skip_intro_button");
this.embedConfig=KL("",y?y.serializedEmbedConfig:l.embed_config);this.Ja=fL(l,g.u9(this));this.N=this.Ja==="EMBEDDED_PLAYER_MODE_PFL";this.embedsErrorLinks=!!y?.embedsErrorLinks;this.pS=JD(!1,l.full_window);this.Xr=!this.webPlayerContextConfig?.chromeless;this.livingRoomAppMode=Y9("LIVING_ROOM_APP_MODE_UNSPECIFIED",l.living_room_app_mode||y?.device?.livingRoomAppMode,Rwt);O=pL(NaN,y?.device?.deviceYear);isNaN(O)||(this.deviceYear=O);this.transparentBackground=y?!!y.transparentBackground:JD(!1,l.transparent_background);
this.showMiniplayerButton=y?!!y.showMiniplayerButton:JD(!1,l.show_miniplayer_button);this.externalFullscreen=g.u9(this)&&!y?.embedsHostFlags?.allowSetFauxFullscreen?!1:y?!!y.externalFullscreen:JD(!1,l.external_fullscreen);this.showMiniplayerUiWhenMinimized=y?!!y.showMiniplayerUiWhenMinimized:JD(!1,l.use_miniplayer_ui);this.PV=y&&y.hideLoopVideoToggle!==void 0?!y.hideLoopVideoToggle:l.show_loop_video_toggle??!0;this.kE=Math.random()<1E-4;if(l.onesie_hot_config||y?.onesieHotConfig)this.PF=new gBq(l.onesie_hot_config,
y?.onesieHotConfig),g.x(this,this.PF);this.isTectonic=y?!!y.isTectonic:!!l.isTectonic;this.playerCanaryState=k;this.playerCanaryStage=y?.canaryStage;this.DW=new EBC;g.x(this,this.DW);this.datasyncId=y?.datasyncId||g.Y("DATASYNC_ID");this.U7=g.Y("LOGGED_IN",!1);this.Ak=y?.allowWoffleManagement||!1;this.LS=Infinity;this.e5=NaN;this.livingRoomPoTokenId=y?.livingRoomPoTokenId;this.X("html5_high_res_logging_always")?this.O1=!0:this.O1=Math.random()*100<g.i_(this.experiments,"html5_high_res_logging_percent");
this.Wi=!!y?.embedsHostFlags?.allowRcat;this.Wb=!g.aq(this)&&!uh(this);l=l.embedded_player_response?JSON.parse(l.embedded_player_response).trackingParams:void 0;l&&(this.zZ=l);this.Jp=!!this.webPlayerContextConfig?.embedsEnableEmc3ds}X(l){return this.experiments.z7(l)}sA(){return this.experiments.sA()}mZ(){return this.experiments.mZ()}getWebPlayerContextConfig(){return this.webPlayerContextConfig}getVideoUrl(l,y,k,z,r,Z,e){y={list:y};k&&(r?y.time_continue=k:y.t=k);k=e?"music.youtube.com":g.mc(this);
r=k==="www.youtube.com";!Z&&z&&r?Z=`https://youtu.be/${l}`:g.aq(this)?(Z=`https://${k}/fire`,y.v=l):(Z&&r?(Z=`${this.protocol}://${k}/shorts/${l}`,z&&(y.feature="share")):(Z=this.protocol+"://"+k+"/watch",y.v=l),Zu&&(l=rJ())&&(y.ebc=l));return g.UI(Z,y)}getVideoEmbedCode(l,y,k,z){y=`https://${g.mc(this)}/embed/${y}`;z&&(y=g.UI(y,{list:z}));z=k.width;k=k.height;y=Um(y);l=Um(l??"YouTube video player");return`<iframe width="${z}" height="${k}" src="${y}" title="${l}"`+' frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>'}supportsGaplessAudio(){return g.Mx&&
!Zu&&w8()>=74||g.N2&&g.KK(68)?!0:!1}supportsGaplessShorts(){return!this.X("html5_enable_short_gapless")||this.u0||g.Km?!1:!0}getPlayerType(){return this.Z.cplayer}yM(){return this.O1}MG(){return this.V&&this.X("embeds_enable_innertube_store")}},p5T=["www.youtube-nocookie.com","youtube.googleapis.com","www.youtubeeducation.com","youtubeeducation.com"],IH5=["EMBEDDED_PLAYER_LITE_MODE_UNKNOWN","EMBEDDED_PLAYER_LITE_MODE_NONE","EMBEDDED_PLAYER_LITE_MODE_FIXED_PLAYBACK_LIMIT","EMBEDDED_PLAYER_LITE_MODE_DYNAMIC_PLAYBACK_LIMIT"],
J0C=[19];var fH5={["140"]:{numChannels:2},["141"]:{numChannels:2},["251"]:{audioSampleRate:48E3,numChannels:2},["774"]:{audioSampleRate:48E3,numChannels:2},["380"]:{numChannels:6},["328"]:{numChannels:6},["773"]:{}},gWC={["1"]:'video/mp4; codecs="av01.0.08M.08"',["1h"]:'video/mp4; codecs="av01.0.12M.10.0.110.09.16.09.0"',["1e"]:'video/mp4; codecs="av01.0.08M.08"',["9"]:'video/webm; codecs="vp9"',["("]:'video/webm; codecs="vp9"',["9h"]:'video/webm; codecs="vp09.02.51.10.01.09.16.09.00"',h:'video/mp4; codecs="avc1.64001e"',
H:'video/mp4; codecs="avc1.64001e"',o:'audio/webm; codecs="opus"',a:'audio/mp4; codecs="mp4a.40.2"',ah:'audio/mp4; codecs="mp4a.40.2"',mac3:'audio/mp4; codecs="ac-3"; channels=6',meac3:'audio/mp4; codecs="ec-3"; channels=6',i:'audio/mp4; codecs="iamf.001.001.Opus"'},EWe={["337"]:{width:3840,height:2160,bitrate:3E7,fps:30},["336"]:{width:2560,height:1440,bitrate:15E6,fps:30},["335"]:{width:1920,height:1080,bitrate:75E5,fps:30},["702"]:{width:7680,height:4320,bitrate:4E7,fps:60},["701"]:{width:3840,
height:2160,bitrate:2E7,fps:60},["700"]:{width:2560,height:1440,bitrate:1E7,fps:60},["412"]:{width:1920,height:1080,bitrate:85E5,fps:60,cryptoblockformat:"subsample"},["359"]:{width:1920,height:1080,bitrate:8E6,fps:30,cryptoblockformat:"subsample"},["411"]:{width:1920,height:1080,bitrate:3316E3,fps:60,cryptoblockformat:"subsample"},["410"]:{width:1280,height:720,bitrate:4746E3,fps:60,cryptoblockformat:"subsample"},["409"]:{width:1280,height:720,bitrate:1996E3,fps:60,cryptoblockformat:"subsample"},
["360"]:{width:1920,height:1080,bitrate:5331E3,fps:30,cryptoblockformat:"subsample"},["358"]:{width:1280,height:720,bitrate:3508E3,fps:30,cryptoblockformat:"subsample"},["357"]:{width:1280,height:720,bitrate:3206E3,fps:30,cryptoblockformat:"subsample"},["274"]:{width:1280,height:720,bitrate:1446E3,fps:30,cryptoblockformat:"subsample"},["315"]:{width:3840,height:2160,bitrate:2E7,fps:60},["308"]:{width:2560,height:1440,bitrate:1E7,fps:60},["303"]:{width:1920,height:1080,bitrate:5E6,fps:60},["302"]:{width:1280,
height:720,bitrate:25E5,fps:60},["299"]:{width:1920,height:1080,bitrate:75E5,fps:60},["298"]:{width:1280,height:720,bitrate:35E5,fps:60},["571"]:{width:7680,height:4320,bitrate:3E7,fps:60},["401"]:{width:3840,height:2160,bitrate:15E6,fps:60},["400"]:{width:2560,height:1440,bitrate:75E5,fps:60},["399"]:{width:1920,height:1080,bitrate:2E6,fps:60},["398"]:{width:1280,height:720,bitrate:1E6,fps:60},["397"]:{width:854,height:480,bitrate:4E5,fps:30},["396"]:{width:640,height:360,bitrate:25E4,fps:30},["787"]:{width:1080,
height:608,bitrate:2E5,fps:30},["788"]:{width:1080,height:608,bitrate:4E5,fps:30},["572"]:{width:7680,height:4320,bitrate:3E7,fps:60},["555"]:{width:3840,height:2160,bitrate:15E6,fps:60},["554"]:{width:2560,height:1440,bitrate:75E5,fps:60},["553"]:{width:1920,height:1080,bitrate:2E6,fps:60},["552"]:{width:1280,height:720,bitrate:1E6,fps:60},["551"]:{width:854,height:480,bitrate:4E5,fps:30},["550"]:{width:640,height:360,bitrate:25E4,fps:30},["313"]:{width:3840,height:2160,bitrate:8E6,fps:30},["271"]:{width:2560,
height:1440,bitrate:4E6,fps:30},["248"]:{width:1920,height:1080,bitrate:2E6,fps:30},["247"]:{width:1280,height:720,bitrate:15E5,fps:30},["244"]:{width:854,height:480,bitrate:52E4,fps:30},["243"]:{width:640,height:360,bitrate:28E4,fps:30},["137"]:{width:1920,height:1080,bitrate:4E6,fps:30},["136"]:{width:1280,height:720,bitrate:3E6,fps:30},["135"]:{width:854,height:480,bitrate:1E6,fps:30},["385"]:{width:1920,height:1080,bitrate:6503313,fps:60},["376"]:{width:1280,height:720,bitrate:5706960,fps:60},
["384"]:{width:1280,height:720,bitrate:3660979,fps:60},["225"]:{width:1280,height:720,bitrate:5805E3,fps:30},["224"]:{width:1280,height:720,bitrate:453E4,fps:30},["145"]:{width:1280,height:720,bitrate:2682052,fps:30}};var QH=class{constructor(l){this.Z=l}getInfo(){return this.Z}C(){return null}J(){var l=this.C();return l?(l=g.MK(l.pP),Number(l.expire)):NaN}V(){}getHeight(){return this.Z.video.height}};var Snz=class{constructor(l){this.itag=l.itag;this.url=l.url;this.codecs=l.codecs;this.width=l.width;this.height=l.height;this.fps=l.fps;this.bitrate=l.bitrate;this.C=l.audioItag?.split(",")||[];this.wH=l.wH;this.contentProtection=l.contentProtection||"";this.a7=l.a7;this.audioChannels=l.audioChannels;this.Z=""}};var DBt=class{constructor(l,y,k,z,r){this.N=l;this.C=y;this.J=k;this.cpn=z;this.S=r;this.V=0;this.Z=""}build(){oW4(this);const l=["#EXTM3U","#EXT-X-INDEPENDENT-SEGMENTS"],y={};a:if(this.Z)var k=this.Z;else{k="";for(var z of this.N)if(z.a7){if(z.a7.getIsDefault()){k=z.a7.getId();break a}k||(k=z.a7.getId())}}for(var r of this.N)if(this.S||!r.a7||r.a7.getId()===k)y[r.itag]||(y[r.itag]=[]),y[r.itag].push(r);for(var Z of this.C)if(r=y[Z.Z])for(var e of r){r=l;k=r.push;z="#EXT-X-MEDIA:TYPE=AUDIO,";let O=
"YES";var A="audio";if(e.a7){A=e.a7;var Q=A.getId().split(".")[0];Q&&(z+=`LANGUAGE="${Q}",`);(this.Z?this.Z===A.getId():A.getIsDefault())||(O="NO");A=A.getName()}Q="";Z!==null&&(Q=Z.itag.toString());Q=oq(this,e.url,Q);z=z+`NAME="${A}",DEFAULT=${O},AUTOSELECT=YES,`+`GROUP-ID="${NRg(e,Z)}",URI="${Q}"`;k.call(r,z)}for(var t of this.J)Z=S8t,Z=(e=t.a7)?'#EXT-X-MEDIA:URI="'+oq(this,t.url)+'",TYPE=SUBTITLES,GROUP-ID="'+Z+'",LANGUAGE="'+e.getId()+'",NAME="'+e.getName()+'",DEFAULT=NO,AUTOSELECT=YES':void 0,
Z&&l.push(Z);t=this.J.length>0?S8t:void 0;for(const O of this.C)e=y[O.Z],e?.length>0&&(Z=O,e=e[0],e=`#EXT-X-STREAM-INF:BANDWIDTH=${Z.bitrate+e.bitrate},CODECS="${Z.codecs},${e.codecs}",RESOLUTION=${Z.width}x${Z.height},AUDIO="${NRg(e,Z)}",`+(t?'SUBTITLES="'+t+'",':"")+"CLOSED-CAPTIONS=NONE",Z.fps>1&&(e+=`,FRAME-RATE=${Z.fps}`),Z.wH&&(e+=`,VIDEO-RANGE=${Z.wH}`),l.push(e),l.push(oq(this,O.url,"")));return l.join("\n")}},S8t="text";var lQy=class extends QH{constructor(l,y,k){super(l);this.N=y;this.expiration=k;this.pP=null}J(){return this.expiration}C(){if(!this.pP||this.pP.IR()){var l=this.N.build();l="data:application/x-mpegurl;charset=utf-8,"+encodeURIComponent(l);this.pP=new CD(l)}return this.pP}};var x1s=class extends QH{constructor(l,y){super(l);this.N=y}C(){return new CD(this.N.wZ())}V(){this.N=S3(this.N)}};var yvP=class extends QH{constructor(l,y){super(l);this.N=y}C(){return new CD(this.N)}};var rvy={PLAYABILITY_ERROR_CODE_VIDEO_BLOCK_BY_MRM:"mrm.blocked",PLAYABILITY_ERROR_CODE_PERMISSION_DENIED:"auth",PLAYABILITY_ERROR_CODE_EMBEDDER_IDENTITY_DENIED:"embedder.identity.denied",PLAYABILITY_ERROR_CODE_EMBEDDER_IDENTITY_MISSING_REFERRER:"embedder.identity.missing.referrer"};var Avz=class{constructor(l){if(l=l.commonConfig)this.url=l.url,this.urlQueryOverride=l.urlQueryOverride,l.ustreamerConfig&&(this.lS=GC(l.ustreamerConfig)||void 0)}};g.lg=class{constructor(l={}){this.languageCode=l.languageCode||"";this.languageName=l.languageName||null;this.kind=l.kind||"";this.name=l.name===void 0?null:l.name;this.displayName=l.displayName||null;this.id=l.id||null;this.Z=l.is_servable||!1;this.isTranslateable=l.is_translateable||!1;this.url=l.url||null;this.vssId=l.vss_id||"";this.isDefault=l.is_default||!1;this.translationLanguage=l.translationLanguage||null;this.xtags=l.xtags||"";this.captionId=l.captionId||""}getId(){return this.id}getName(){return this.name}isServable(){return this.Z}wZ(){return this.url}getXtags(){return this.xtags}toString(){return this.languageCode+
": "+g.s9(this)+" - "+this.vssId+" - "+(this.captionId||"")}equals(l){return l?this.toString()===l.toString():!1}Ij(){return!(!this.languageCode||this.translationLanguage&&!this.translationLanguage.languageCode)}};var t4_={"ad-trueview-indisplay-pv":6,"ad-trueview-insearch":7},OqQ={"ad-trueview-indisplay-pv":2,"ad-trueview-insearch":2},dQe=/^(\d*)_((\d*)_?(\d*))$/;var hCQ={iurl:"default.jpg",iurlmq:"mqdefault.jpg",iurlhq:"hqdefault.jpg",iurlsd:"sddefault.jpg",iurlpop1:"pop1.jpg",iurlpop2:"pop2.jpg",iurlhq720:"hq720.jpg",iurlmaxres:"maxresdefault.jpg"},GKC={120:"default.jpg",320:"mqdefault.jpg",480:"hqdefault.jpg",560:"pop1.jpg",640:"sddefault.jpg",854:"pop2.jpg",1280:"hq720.jpg"};var iqC={ALWAYS:1,BY_REQUEST:3,UNKNOWN:void 0},om_={MDE_STREAM_OPTIMIZATIONS_RENDERER_LATENCY_UNKNOWN:"UNKNOWN",MDE_STREAM_OPTIMIZATIONS_RENDERER_LATENCY_NORMAL:"NORMAL",MDE_STREAM_OPTIMIZATIONS_RENDERER_LATENCY_LOW:"LOW",MDE_STREAM_OPTIMIZATIONS_RENDERER_LATENCY_ULTRA_LOW:"ULTRALOW"};var $T5;
$T5=function(l){const y=Object.keys(l),k={};for(let Z=0;Z<y.length;Z++){const e=y[Z];typeof l[e]==="function"&&(k[e]=l[e])}const z=Object.keys(k);let r;try{yoC(k)}catch(Z){r=Z}return function(Z={},e){if(r)throw r;let A=!1;const Q={};for(let t=0;t<z.length;t++){const O=z[t],d=Z[O],w=(0,k[O])(d,e);if(typeof w==="undefined")throw Z=e&&e.type,Error(`When called with an action of type ${Z?`"${String(Z)}"`:"(unknown type)"}, the slice reducer for key "${O}" returned undefined. `+"To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.");Q[O]=
w;A=A||w!==d}return(A=A||z.length!==Object.keys(Z).length)?Q:Z}}({entities:function(l={},y){return vcP(l,y)}});
g.IH=new Qc5;var zE=class{constructor(l,y){this.type=l||"";this.id=y||""}toString(){return this.type+this.id}};var qC=class{constructor(l,y){this.Qj=l;this.author="";this.Mh=null;this.playlistLength=0;this.Z=this.sessionData=null;this.TV={};this.title="";if(y){this.author=y.author||y.playlist_author||"";this.title=y.playlist_title||"";if(l=y.session_data)this.sessionData=Gp(l,"&");this.Z=y.thumbnail_ids?.split(",")[0]||null;this.TV=Bn(y,"playlist_");this.videoId=y.video_id||void 0;if(l=y.list)switch(y.listType){case "user_uploads":this.playlistId=(new zE("UU",`PLAYER_${l}`)).toString();break;default:const k=
y.playlist_length;k&&(this.playlistLength=Number(k)||0);this.playlistId=rH(l).toString();if(y=y.video)this.videoId=(y[0]||null).video_id||void 0}else y.playlist&&(this.playlistLength=y.playlist.toString().split(",").length)}}uE(l){l=l||"hqdefault.jpg";const y=this.TV[l];if(y)return y;if(l==="sddefault.jpg"||l==="hq720.jpg"||l==="maxresdefault.jpg")return y;if(this.Z)return qV(this.Qj,this.Z,l)}A6(){return this.Qj.getVideoUrl(this.videoId,this.playlistId)}};var m3=class{constructor(l,y){this.Qj=l;this.Cx=this.author="";this.Mh=null;this.isUpcoming=this.isLivePlayback=!1;this.lengthSeconds=0;this.HU=this.lengthText="";this.sessionData=null;this.TV={};this.title="";if(y){this.ariaLabel=y.aria_label||void 0;this.author=y.author||"";this.Cx=y.Cx||"";if(l=y.endscreen_autoplay_session_data)this.Mh=Gp(l,"&");this.PL=y.PL;this.isLivePlayback=y.live_playback==="1";this.isUpcoming=!!y.isUpcoming;if(l=y.length_seconds)this.lengthSeconds=typeof l==="string"?Number(l):
l;this.lengthText=y.lengthText||"";this.HU=y.HU||"";this.publishedTimeText=y.publishedTimeText||void 0;if(l=y.session_data)this.sessionData=Gp(l,"&");this.shortViewCount=y.short_view_count_text||void 0;this.TV=Bn(y);this.title=y.title||"";this.videoId=y.docid||y.video_id||y.videoId||y.id||void 0;this.watchUrl=y.watchUrl||void 0}}uE(l){l||(l="hqdefault.jpg");const y=this.TV[l];return y?y:l==="pop1.jpg"||l==="pop2.jpg"||l==="sddefault.jpg"||l==="hq720.jpg"||l==="maxresdefault.jpg"?y:qV(this.Qj,this.videoId,
l)}A6(l){return this.watchUrl||this.Qj.getVideoUrl(this.videoId,void 0,void 0,void 0,void 0,l)}};var PR5=class{constructor(l){this.Z=l.playback_progress_0s_url;this.N=l.playback_progress_2s_url;this.C=l.playback_progress_10s_url}};var $5=void 0;pdT("LMS",async function(){return g.QT()});var wH;wH=0;g.Zcq=/^([\w\-_]+)\|(\d+)(;[\w\-_]+)?\|(\d+)\|(\d+)$/;pdT("LMDB",async function(){const l=await g.tZ();if(!l)throw g.fm("edd");return g.sV(await g.dH(l),["index","media","captions"],{mode:"readonly",nP:!0},y=>{const k={};y=[g.Ra(y.objectStore("index"),{},z=>{k[z.cursor.key]=z.getValue();return g.DA(z)}),
mhT(y.objectStore("media")),mhT(y.objectStore("captions"))];return g.jY.all(y).then(([,z,r])=>({index:k,media:ePt(z||[]),captions:r}))})});var nBC=class extends g.z1{constructor(){super();this.Z=null;this.N=new zds;this.Z=null;this.S=new Set;this.crossOrigin=""}Vj(){this.Z&&(this.Z=this.Z.onload=null);super.Vj()}};g.tc=class{constructor(l,y,k,z){this.level=l;this.C_=y;this.loaded=new Set;this.level=l;this.C_=y;l=k.split("#");this.width=Math.floor(Number(l[0]));this.height=Math.floor(Number(l[1]));this.frameCount=Math.floor(Number(l[2]));this.columns=Math.floor(Number(l[3]));this.rows=Math.floor(Number(l[4]));this.Z=Math.floor(Number(l[5]));this.A=l[6];this.signature=l[7];this.videoLength=z}getHeight(){return this.height}J(){return this.frameCount}isDefault(){return this.A.indexOf("default")!==-1}isLoaded(l){return this.loaded.has(l)}wZ(l){let y=
this.C_;y=y.replace("$N",this.A);y=y.replace("$L",this.level.toString());y=y.replace("$M",l.toString());this.signature&&(y=g.UI(y,{sigh:this.signature}));return Cc(y)}V(l){const y=this.J()-1;return g.gf(this.Z===0?Math.round(l*this.frameCount/this.videoLength):Math.round(l*1E3/this.Z),0,y)}C(){return this.frameCount-1}S(){return this.frameCount?0:-1}K(){}};g.tc.prototype.D=yz(5);var OR=class extends nBC{constructor(l,y,k=!1,z=!1){super();this.isLive=k;this.K=!!z;this.levels=this.C(l,y);this.V=new Map;this.levels.length>1&&this.levels[0].isDefault()&&this.levels.splice(0,1)}C(l,y){const k=[];l=l.split("|");const z=l[0];for(let r=1;r<l.length;r++){const Z=this.J(r-1,z,l[r],y);(this.K||Z.getHeight()<180)&&k.push(Z)}return k}J(l,y,k,z){return new g.tc(l,y,k,z)}};var Fjz=class extends g.tc{constructor(l,y,k,z){k=k.split("#");k=[k[1],k[2],0,k[3],k[4],-1,k[0],""].join("#");super(l,y,k,0);this.N=null;this.Y=z?2:0}J(){return this.N.wj()}V(l){const y=this.rows*this.columns*this.Y,k=this.N,z=k.x3();l=k.NL(l);return l>z-y?-1:l}C(){return this.N.x3()}S(){return this.N.zi()}K(l){this.N=l}};var oBq=class extends OR{constructor(l,y,k,z=!1){super(l,0,y,!!z);for(l=0;l<this.levels.length;l++)this.levels[l].K(k)}C(l,y){return super.C(`$N|${l}`,y)}J(l,y,k){return new Fjz(l,y,k,this.isLive)}};var NIz;
g.YK=class extends g.z1{constructor(l,y){super();this.Qj=l;this.adaptiveFormats="";this.F3=this.adQueryId=this.bI=null;this.Gz={start:NaN,end:NaN};this.cueRanges=this.contentProtection=null;this.eE=new Map;this.drmProduct=this.drmParams="";this.eventLabel=null;this.allowEmbed=!0;this.allowLiveDvr=this.offlineable=this.backgroundable=!1;this.ZY="";this.kW=!1;this.Gw=null;this.MI=this.SW=this.jC=!1;this.V=null;this.Vm=this.CY=!1;this.YR=NaN;this.applyStatefulNormalization=this.preserveStatefulLoudnessTarget=!1;
this.maxStatefulTimeThresholdSec=0;this.pW=NaN;this.loudnessTargetLkfs=Infinity;this.minimumLoudnessTargetLkfs=-Infinity;this.Q9=0;this.cT=!1;this.cycToken=null;this.author="";this.nj=!1;this.g4=0;this.Um=!1;this.Mg=null;this.zr=[];this.vO=this.DY=!1;this.clientScreenNonce=this.playerResponseCpn=this.clientPlaybackNonce=this.videoCountText=this.u0=this.R7="";this.contentCheckOk=!1;this.limitedPlaybackDurationInSeconds=this.endSeconds=this.CB=0;this.fn=this.Ze=this.C=null;this.eU="";this.loading=!1;
this.y0=this.Ng=0;this.Hu=this.pipable=this.X6=this.isAutonav=!1;this.paidContentOverlayDurationMs=0;this.mutedAutoplay=this.lE=!1;this.mutedAutoplayDurationMode=0;this.isLiveHeadPlayable=this.isLivePlayback=this.vZ=this.isPrivate=this.isListed=this.BF=!1;this.Zf="";this.isLowLatencyLiveStream=this.isLivingRoomDeeplink=this.isTvfilmVideo=this.isLiveDefaultBroadcast=this.iR=this.xa=this.aj=!1;this.latencyClass="UNKNOWN";this.XR=this.fD=this.OW=this.pj=this.LZ=this.Zs=this.wu=this.Sy=this.RM=this.uY=
this.enableServerStitchedDai=this.CE=this.isMdxPlayback=this.isUpcoming=this.isPremiere=!1;this.mdxControlMode=null;this.isPharma=this.showSeekingControls=!1;this.mK=0;this.reloadReason="";this.On=this.jN=!1;this.keywords={};this.Oj="";this.jw=0;this.kV=!1;this.unpluggedFilterModeType=0;this.liveChunkReadahead=NaN;this.Wi=null;this.V0=this.lengthSeconds=0;this.playerParams=this.musicVideoType=null;this.TD=this.paygated=!1;this.rM=[];this.hk=!1;this.dP=[];this.Oo=null;this.yP=this.racyCheckOk=!1;this.Yl=
{};this.isProximaLatencyEligible=!1;this.lV=0;this.N=null;this.autonavState=1;this.Qm=null;this.shortDescription="";this.A=this.e1=!1;this.mY=this.Xr=this.startSeconds=0;this.s6=this.TC=this.OG=Tj;this.zZ=this.suggestions=null;this.uW=this.PV=void 0;this.isExternallyHostedPodcast=!1;this.kK=null;this.jW=this.expandedSubtitle=this.expandedTitle=this.subtitle=this.title="";this.RR=[];this.hj=[];this.hlsFormats=this.t$="";this.DW=this.MS=this.Cp=this.WG=this.HG=this.U7=this.bO=this.vn=null;this.XT="vvt";
this.O1=!1;this.Jt=null;this.xu="";this.CQ=NaN;this.e$=this.JT=this.h1=this.VL=this.Nq=this.iY=this.YY=this.oh=this.Zm=this.qq="";this.lY=null;this.KQ=!1;this.clipStart=0;this.clipEnd=Infinity;this.h_=!1;this.heartbeatToken="";this.NP=this.BI=NaN;this.S2=this.V9=this.q_=this.La=this.VN=!1;this.vT=!0;this.TV={};this.captionTracks=[];this.pO=[];this.SJ=0;this.RQ=[];this.qn=[];this.Jd=!1;this.zz={};this.Ak=new g.NV("und",new g.XF("Default","und",!0));this.X_=0;this.J=null;this.pS=[];this.Wd=!1;this.bv=
this.T7="";this.slotPosition=-1;this.breakType=0;this.embeddedPlayerConfig=this.reelItemWatchResponse=this.sj=this.Ei=this.Cd=this.playerResponse=this.IL=this.Z$=this.oY=this.Eo=null;this.Pd=!1;this.MW=null;this.isInlinePlaybackNoAd=this.Ac=this.YM=this.useCobaltWidevine=this.DE=this.b_=!1;this.b1=!0;this.dQ=this.Yj=NaN;this.defraggedFromSubfragments=this.K5=this.hasSubfragmentedFmp4=!1;this.liveExperimentalContentId=NaN;this.rb=new Set;this.sabrContextUpdates=new Map;this.gatewayExperimentGroup=
"";this.JX=this.f2=this.cO=!1;this.interstitials=[];this.Wn=this.bz=!1;this.bN="";this.allowImaMonetization=!1;this.Ie="";this.lr=!1;this.Qc="";this.uV=[];this.g8=[];this.Rj="";this.d8=this.K=this.Wy=!1;this.Dq="";this.O3=this.No=this.cE=this.readAheadGrowthRateMs=this.minReadAheadMediaTimeMs=this.maxReadAheadMediaTimeMs=NaN;this.showShareButton=!0;this.LS=!1;this.ji=this.OA=!0;this.errorDetail=this.userGenderAge="";this.Oi=this.Gr=this.getSharePanelCommand=this.removeFromWatchLaterCommand=this.addToWatchLaterCommand=
this.unsubscribeCommand=this.subscribeCommand=this.contextParams=this.FT=this.errorReason=this.errorCode=null;this.tb=!1;this.e5=[];this.Ob=this.iW=this.Q4=this.wW=this.Vi=0;this.fetchType=null;this.rS=!0;this.transitionEndpointAtEndOfStream=void 0;this.kC=this.sQ=-1;this.zA=this.hv=!1;this.xz=null;this.C_="";this.watchUrl=null;this.Yr=[];this.visibleOnLoadKeys=[];this.rh=[];this.inlineMetricEnabled=this.kz=!1;this.va=this.embedsRctn=this.embedsRct="";this.sS=NaN;this.authorizedFormats=[];this.Lb=
(0,g.f)();this.Mq=this.wY=0;this.lS=null;this.Bq=this.Qq=this.aK=this.j3=!1;this.JO={};this.tA=.25;this.Tw=2;this.V1=this.SN=!1;this.isSeekable=null;this.gb=this.Qj.experiments.z7("html5_use_triple_equals");this.Bc=g.i_(this.Qj.experiments,"html5_gapless_loop_seek_offset_in_milli");this.d4={setData:k=>{this.setData(k)},
BE:()=>{this.BE()},
Rb:k=>{this.Rb(k)}};
this.hv=this.X("web_new_autonav_countdown");this.zA=this.X("web_new_big_thumbnail_endscreen");this.Qj.zZ&&(this.Y=this.Qj.zZ);this.setData(y);this.Ky=new e8T;g.x(this,this.Ky)}setData(l){l=l||{};var y=l.errordetail;y!=null&&(this.errorDetail=y);y=l.errorcode;y!=null?this.errorCode=y:l.status==="fail"&&(this.errorCode="auth");y=l.reason;y!=null&&(this.errorReason=y);y=l.subreason;y!=null&&(this.FT=y);this.clientPlaybackNonce||(this.clientPlaybackNonce=l.cpn??(this.Qj.yM()?"r"+g.tW(15):g.tW(16)),this.bG?.clear());
this.vZ=JD(this.Qj.vZ,l.livemonitor);CR5(this,l);if(y=l.raw_player_response)this.Ei=y;else{var k=l.player_response;k&&(y=JSON.parse(k))}y&&(this.playerResponse=y);if(this.playerResponse){(y=this.playerResponse.annotations)&&UQt(this,y);(y=this.playerResponse.attestation)&&M4P(this,y);if(y=this.playerResponse.cotn)this.cotn=y;(y=this.playerResponse.heartbeatParams)&&bqs(this,y);(y=this.playerResponse.messages)&&q05(this,y);(y=this.playerResponse.overlay)&&P7T(this,y);if(y=this.playerResponse.playabilityStatus)Jve(this,
y),(k=y.errorScreen)&&Fpy(this,k);(k=this.playerResponse.playbackTracking)&&pa_(this,k,l);var z=this.playerResponse.playerCueRanges;z&&z.length>0&&(this.cueRanges=z);(z=this.playerResponse.playerCueRangeSet)&&g.x5(this,z);z=JLT(this.playerResponse.adPlacements);k&&k.promotedPlaybackTracking&&z&&g.WH(new g.WO("Player Response with both promotedPlaybackTracking and videoAdTrackingRenderer"));if(z||KKC(this.playerResponse.adSlots))this.TD=!0;(k=this.playerResponse.playerAds)&&Kp5(this,k,l);(k=this.playerResponse.playerConfig)&&
gm4(this,k);(z=this.playerResponse.streamingData)&&EmQ(this,z,k||null);if(z=this.playerResponse.trackingParams)this.Y=z;if(z=this.playerResponse.videoDetails)jAP(this,z,l),N9C(this,z,k||null,l),k=z.isPrivate,k!==void 0&&(this.isPrivate=JD(this.isPrivate,k));y&&C7_(this,y,z||null);(y=this.playerResponse.interstitialPods)&&mQP(this,y);this.ZY&&this.eventId&&(this.ZY=Cl(this.ZY,{ei:this.eventId}));(y=this.playerResponse.captions)&&y.playerCaptionsTracklistRenderer&&cvy(this,y.playerCaptionsTracklistRenderer);
(this.clipConfig=this.playerResponse.clipConfig)&&this.clipConfig.startTimeMs!=null&&(this.O3=Number(this.clipConfig.startTimeMs)*.001);this.playerResponse&&this.playerResponse.playerConfig&&this.playerResponse.playerConfig.webPlayerConfig&&this.playerResponse.playerConfig.webPlayerConfig.webPlayerActionsPorting&&WpQ(this,this.playerResponse.playerConfig.webPlayerConfig.webPlayerActionsPorting);this.compositeLiveIngestionOffsetToken=this.playerResponse.playbackTracking?.compositeLiveIngestionOffsetToken;
this.compositeLiveStatusToken=this.playerResponse.playbackTracking?.compositeLiveStatusToken;this.X("html5_fill_default_mosaic_audio_track_id")&&this.RY()&&(this.Qj.mK=YHt(this));y=this.playerResponse.playerConfig?.granularVariableSpeedConfig?.minimumPlaybackRate;k=this.playerResponse.playerConfig?.granularVariableSpeedConfig?.maximumPlaybackRate;y&&k&&(this.tA=y/100,this.Tw=k/100);this.X("html5_web_po_on_demand_init")&&this.playerResponse.onResponseReceivedActions&&this.playerResponse.onResponseReceivedActions.forEach(r=>
{g.E(r,g.yT)?.signal==="INIT_ATT_SERVICE"&&(this.V1=!0)})}TE(this,l);
W_C(this,l);l.queue_info&&(this.queueInfo=l.queue_info);y=l.hlsdvr;y!=null&&(this.allowLiveDvr=Number(y)===1?Q6()?!0:x9&&k5<5?!1:!0:!1);this.adQueryId=l.ad_query_id||null;this.F3||(this.F3=l.encoded_ad_safety_reason||null);this.CY=JD(this.CY,l.infringe||l.muted);this.Vl=l.authkey;this.K$=l.authuser;this.mutedAutoplay=JD(this.mutedAutoplay,l&&l.playmuted);this.mutedAutoplayDurationMode=pL(this.mutedAutoplayDurationMode,l&&l.muted_autoplay_duration_mode);this.lr=JD(this.lr,l&&l.mutedautoplay);if(y=
l.length_seconds)this.lengthSeconds=typeof y==="string"?cZ(y):y;this.isAd()||this.hk||!g.j_(g.CA(this.Qj))?this.endSeconds=pL(this.endSeconds,this.No||l.end||l.endSeconds):pJ5(this,g.CA(this.Qj),this.lengthSeconds);this.Y=KL(this.Y,l.itct);this.iR=JD(this.iR,l.is_live_destination);this.isLivePlayback=JD(this.isLivePlayback,l.live_playback);this.enableServerStitchedDai=this.enableServerStitchedDai&&this.UA();l.isUpcoming&&(this.isUpcoming=JD(this.isUpcoming,l.isUpcoming));this.aj=JD(this.aj,l.post_live_playback);
this.xa&&(this.aj=!1);this.isMdxPlayback=JD(this.isMdxPlayback,l.mdx);if(y=l.mdx_control_mode)this.mdxControlMode=typeof y==="number"?y:cZ(y);this.isInlinePlaybackNoAd=JD(this.isInlinePlaybackNoAd,l.is_inline_playback_no_ad);this.mK=pL(this.mK,l.reload_count);this.reloadReason=KL(this.reloadReason,l.reload_reason);this.vT=JD(this.vT,l.show_content_thumbnail);this.cycToken=l.cyc||null;y=Bn(l);Object.keys(y).length>0&&(this.TV=y);this.b0=KL(this.b0,l.vvt);this.mdxEnvironment=KL(this.mdxEnvironment,
l.mdx_environment);l.source_container_playlist_id&&(this.sourceContainerPlaylistId=l.source_container_playlist_id);l.serialized_mdx_metadata&&(this.serializedMdxMetadata=l.serialized_mdx_metadata);this.U9=l.osig;this.eventId||(this.eventId=l.eventid);this.osid||(this.osid=l.osid);this.playlistId=KL(this.playlistId,l.list);l.index&&(this.playlistIndex=this.playlistIndex===void 0?pL(0,l.index):pL(this.playlistIndex,l.index));this.Uz=l.pyv_view_beacon_url;this.Iv=l.pyv_quartile25_beacon_url;this.S$=
l.pyv_quartile50_beacon_url;this.nQ=l.pyv_quartile75_beacon_url;this.Pc=l.pyv_quartile100_beacon_url;y=l.session_data;!this.X3&&y&&(this.X3=Gp(y,"&").feature);this.isFling=pL(this.isFling?1:0,l.is_fling)===1;this.vnd=pL(this.vnd,l.vnd);this.forceAdsUrl=KL(this.forceAdsUrl,l.force_ads_url);this.N7=KL(this.N7,l.ctrl);this.j5=KL(this.j5,l.ytr);this.xJ=l.ytrcc;this.Ez=l.ytrexp;this.xV=l.ytrext;this.T7=KL(this.T7,l.adformat);this.bv=KL(this.bv,l.attrib);this.slotPosition=pL(this.slotPosition,l.slot_pos);
this.breakType=l.break_type;this.Zq=JD(this.Zq,l.ssrt);this.videoId=Ew(l)||this.videoId;this.a4=KL(this.a4,l.vss_credentials_token);this.XT=KL(this.XT,l.vss_credentials_token_type);this.cO=JD(this.cO,l.audio_only);this.f2=JD(this.f2,l.aac_high);this.JX=JD(this.JX,l.prefer_low_quality_audio);this.d8=JD(this.d8,l.uncap_inline_quality);this.X("html5_enable_qoe_cat_list")?l.qoe_cat&&(this.uV=this.uV.concat(l.qoe_cat.split(","))):this.Qc=KL(this.Qc,l.qoe_cat);this.tb=JD(this.tb,l.download_media);this.K=
K_4(this,l.prefer_gapless);Yb4(this.playerResponse)&&this.dP.push("ad");if(y=l.adaptive_fmts)this.adaptiveFormats=y,this.Md("adpfmts",{},!0);if(y=l.allow_embed)this.allowEmbed=Number(y)===1;if(y=l.backgroundable)this.backgroundable=Number(y)===1;if(y=l.autonav)this.isAutonav=Number(y)===1;if(y=l.autoplay)this.lE=this.X6=Number(y)===1;if(y=l.iv_load_policy)this.annotationsLoadPolicy=Y9(this.annotationsLoadPolicy,y,qr);if(y=l.cc_lang_pref)this.captionsLanguagePreference=KL(y,this.captionsLanguagePreference);
if(y=l.cc_load_policy)this.Mg=Y9(this.Mg,y,qr);this.deviceCaptionsOn=l.device_captions_on??void 0;this.ma=l.device_captions_lang_pref??"";this.zr=l.viewer_selected_caption_langs??[];if(y=l.cached_load)this.vO=JD(this.vO,y);if(l.dash==="0"||l.dash===0||l.dash===!1)this.DY=!0;if(y=l.dashmpd)this.vB=g.UI(y,{cpn:this.clientPlaybackNonce});if(y=l.delay)this.CB=cZ(y);y=this.No||l.end;if(this.gb?y!=null:y!=void 0)this.clipEnd=pL(this.clipEnd,y);if(y=l.fmt_list)this.eU=y;l.heartbeat_preroll&&this.dP.push("heartbeat");
NIz&&(this.Ng=-Math.floor(Math.random()*10),this.V0=-Math.floor(Math.random()*40));if(y=l.is_listed)this.isListed=JD(this.isListed,y);if(y=l.is_private)this.isPrivate=JD(this.isPrivate,y);if(y=l.is_dni)this.Wn=JD(this.Wn,y);if(y=l.dni_color)this.bN=KL(this.bN,y);if(y=l.pipable)this.pipable=JD(this.pipable,y);this.e1=(this.Hu=this.pipable&&this.Qj.lR)&&!this.Qj.showMiniplayerButton;if(y=l.paid_content_overlay_duration_ms)this.paidContentOverlayDurationMs=cZ(y);if(y=l.paid_content_overlay_text)this.paidContentOverlayText=
y;if(y=l.url_encoded_fmt_stream_map)this.t$=y;if(y=l.hls_formats)this.hlsFormats=y;if(y=l.hlsvp)this.hlsvp=y;if(y=l.live_start_walltime)this.vM=typeof y==="number"?y:cZ(y);if(y=l.live_manifest_duration)this.Wi=typeof y==="number"?y:cZ(y);if(y=l.player_params)this.playerParams=y;if(y=l.partnerid)this.partnerId=pL(this.partnerId,y);if(y=l.probe_url)this.probeUrl=Cc(g.UI(y,{cpn:this.clientPlaybackNonce}));(y=l.pyv_billable_url)&&SXT(y)&&(this.yS=y);(y=l.pyv_conv_url)&&SXT(y)&&(this.LQ=y);TUs(this,l);
this.startSeconds>0?this.X("html5_log_start_seconds_inconsistency")&&this.startSeconds!==(this.O3||this.cE||l.start||l.startSeconds)&&this.Md("lss",{css:this.startSeconds,pcss:this.O3,iss:this.cE,ps:l.start||void 0,pss:l.startSeconds||void 0}):(this.startSeconds=pL(this.startSeconds,this.O3||this.cE||l.start||l.startSeconds),this.X("html5_log_start_seconds_inconsistency")&&this.startSeconds>0&&this.Md("lsss",{css:this.startSeconds,pcss:this.O3,iss:this.cE,ps:l.start||void 0,pss:l.startSeconds||void 0}),
this.Xr=this.startSeconds);this.liveUtcStartSeconds&&this.liveUtcStartSeconds>0||(y=l.live_utc_start,y!=null?this.liveUtcStartSeconds=Number(y):gR5(this.startSeconds)&&(this.liveUtcStartSeconds=this.startSeconds));this.liveUtcStartSeconds&&this.liveUtcStartSeconds>0||!(y=l.utc_start_millis)||(this.liveUtcStartSeconds=Number(y)*.001);if(y=l.stream_time_start_millis)this.mY=Number(y)*.001;y=this.cE||l.start;(this.gb?y==null||Number(l.resume)===1:y==void 0||l.resume=="1")||this.isLivePlayback||(this.clipStart=
pL(this.clipStart,y));if(y=l.url_encoded_third_party_media)this.kK=UJ(y);if(y=l.ypc_offer_button_formatted_text)k=JSON.parse(y),this.Jt=k!=null?k:null,this.xu=y;if(y=l.ypc_offer_button_text)this.qq=y;if(y=l.ypc_offer_description)this.Zm=y;if(y=l.ypc_offer_headline)this.oh=y;if(y=l.ypc_full_video_message)this.YY=y;if(y=l.ypc_offer_id)this.iY=y;if(y=l.ypc_buy_url)this.Nq=y;if(y=l.ypc_item_thumbnail)this.VL=y;if(y=l.ypc_item_title)this.h1=y;if(y=l.ypc_item_url)this.JT=y;if(y=l.ypc_vid)this.e$=y;l.ypc_overlay_timeout&&
(this.CQ=Number(l.ypc_overlay_timeout));if(y=l.ypc_trailer_player_vars)this.lY=iO(y);if(y=l.ypc_original_itct)this.E9=y;this.Fu=KL(this.Fu,l.ucid);this.MS=l.storyboard_spec||null;this.DW=l.live_storyboard_spec||null;this.Gw=l.iv_endscreen_url||null;this.jC=JD(this.jC,l.iv3_module);this.SW=JD(this.SW,l.ypc_module);this.MI=JD(this.MI,l.ypc_clickwrap_module);this.SW&&this.dP.push("ypc");this.MI&&this.dP.push("ypcRentalActivation");this.Yl={video_id:l.video_id,eventid:l.eventid,cbrand:l.cbrand,cbr:l.cbr,
cbrver:l.cbrver,c:l.c,cver:l.cver,ctheme:l.ctheme,cplayer:l.cplayer,cmodel:l.cmodel,cnetwork:l.cnetwork,cos:l.cos,cosver:l.cosver,cplatform:l.cplatform,user_age:l.user_age,user_display_image:l.user_display_image,user_display_name:l.user_display_name,user_gender:l.user_gender,csi_page_type:l.csi_page_type,csi_service_name:l.csi_service_name,enablecsi:l.enablecsi,enabled_engage_types:l.enabled_engage_types};Vnt(this,l);if(y=l.cotn)this.cotn=y;ERP(this)?JP(this)&&(this.isLivePlayback&&this.vB&&(this.q_=
!0),this.Ze&&(this.V9=!0)):vRT(this)?this.q_=!0:RP5(this)?this.enableServerStitchedDai=this.enableServerStitchedDai&&fc(this):this.vB&&(this.Qj.C_==="yt"&&this.UA()&&this.X("drm_manifestless_unplugged")&&this.X("html5_deprecate_manifestful_fallback")?this.Md("deprecateMflFallback",{}):this.q_=!0);if(y=l.adpings)this.bI=y?iO(y):null;if(y=l.feature)this.KZ=y;if(y=l.referrer)this.referrer=y;this.clientScreenNonce=KL(this.clientScreenNonce,l.csn);this.lV=pL(this.lV,l.root_ve_type);this.jw=pL(this.jw,
l.kids_age_up_mode);this.gb||l.kids_app_info==void 0||(this.kidsAppInfo=l.kids_app_info);this.gb&&l.kids_app_info!=null&&(this.kidsAppInfo=l.kids_app_info);this.kV=JD(this.kV,l.upg_content_filter_mode);this.unpluggedFilterModeType=pL(this.unpluggedFilterModeType,l.unplugged_filter_mode_type);if(y=l.unplugged_location_info)this.MW=y;if(y=l.unplugged_partner_opt_out)this.qg=KL("",y);this.Pd=JD(this.Pd,l.disable_watch_next);this.xC=KL(this.xC,l.internal_ip_override);this.bz=!!l.is_yto_interstitial;this.interstitials.length&&
this.dP.push("playableSequences");if(y=l.rM)this.rM=y;this.C_=KL(this.C_,l.csi_timer);l.watchUrl&&(this.watchUrl=l.watchUrl);y=l.watch_endpoint;this.X("html5_attach_watch_endpoint_ustreamer_config")&&y&&$QQ(this,y);y?.ustreamerConfig&&(this.lS=GC(y.ustreamerConfig));if(y=y?.loggingContext?.qoeLoggingContext?.serializedContextData)this.St=y;g.u9(this.Qj)&&this.Qj.Wi&&(this.embedsRct=KL(this.embedsRct,l.rct),this.embedsRctn=KL(this.embedsRctn,l.rctn));l.embed_config&&(this.va=l.embed_config);this.kz=
this.kz||!!l.pause_at_start;l.default_active_source_video_id&&(this.defaultActiveSourceVideoId=l.default_active_source_video_id);this.SN=this.SN||!!l.live_preload}hc(){return this.autoplaySwitchButtonRenderer?.enabled!==void 0}O(){return this.Qj}X(l){return this.Qj.X(l)}wq(){return!this.isLivePlayback||this.allowLiveDvr}hasSupportedAudio51Tracks(){return!!this.xz?.xz}getUserAudio51Preference(){let l=1;V6(this.Qj)&&this.X("html5_ytv_surround_toggle_default_off")?l=0:TC(this.Qj)&&this.isLivePlayback&&
this.eb()&&(l=0);return g.Ay("yt-player-audio51")??l}zD(){return this.playerResponse?.playerConfig?.compositeVideoConfig?.sourceConfigs??[]}DX(){this.IR()||(this.Z.N||this.Z.unsubscribe("refresh",this.DX,this),this.oy(-1))}oy(l){if(!this.isLivePlayback||!this.J||this.J.flavor!=="fairplay"){var y=this.Z.Xr(this.X_);if(y.length>0){for(const k of y)k.startSecs=Math.max(k.startSecs,this.dY()),this.X("html5_cuepoint_identifier_logging")&&k.event==="start"&&this.Md("cuepoint",{pubCue:k.identifier,segNum:l});
this.publish("cuepointupdated",y,l);this.X_+=y.length;if(fc(this)&&this.Qj.yM())for(const k of y)this.Md("cuepoint",{segNum:l,event:k.event,startSecs:k.startSecs,id:k.identifier.slice(-16)}),k.event==="start"&&(y=k.startSecs,this.Gz.start=this.g4,this.Gz.end=y+3)}}}BE(){this.IR()||(this.loading=!1,this.publish("dataloaded"))}eb(){return this.TZ!==void 0?this.TZ:this.TZ=!!this.contentProtection||!!this.Z&&this.Z.J()}hd(l){if(this.IR())return yu();this.WG=this.HG=this.N=null;Sn(this,"html5_high_res_logging_always")&&
(this.Qj.O1=!0);return y75(this,l).then(void 0,()=>zWg(this,l)).then(void 0,()=>r7y(this)).then(void 0,()=>A7Q(this))}Rb(l){this.N=l;
kre(this,this.N.getAvailableAudioTracks());if(this.N)for(var y of this.N.videoInfos)l=y.containerType,l!==0&&(this.zz[l]=y.id);y=this.getAvailableAudioTracks();y=y.concat(this.Ak);for(l=0;l<this.pO.length;l++){const z=this.pO[l];for(let r=0;r<y.length;r++){const Z=y[r];var k=Z.a7.id===z.audioTrackId;if(Z.a7.isDefault&&l===this.SJ||k){if(z.captionTrackIndices)for(k=0;k<z.captionTrackIndices.length;k++)Z.captionTracks[k]=this.captionTracks[z.captionTrackIndices[k]];z.defaultCaptionTrackIndex!==void 0&&
(Z.N=this.captionTracks[z.defaultCaptionTrackIndex]);z.forcedCaptionTrackIndex!==void 0&&(Z.Z=this.captionTracks[z.forcedCaptionTrackIndex]);Z.C=z.visibility||"UNKNOWN";Z.captionsInitialState=z.captionsInitialState||"CAPTIONS_INITIAL_STATE_UNKNOWN"}}}if(this.J&&this.N&&this.N.videoInfos&&!(this.N.videoInfos.length<=0)&&(y=this.N.videoInfos[0].N(),this.J.flavor==="fairplay"!==y))for(const z of this.pS)if(y===(z.flavor==="fairplay")){this.J=z;break}}mS(){if(this.cotn)return null;const l=g.tL(this.Qj)||
this.X("web_l3_storyboard");if(!this.Cp)if(this.playerResponse&&this.playerResponse.storyboards){var y=this.playerResponse.storyboards,k=y.playerStoryboardSpecRenderer;k&&k.spec?this.Cp=new OR(k.spec,this.lengthSeconds,!1,l):(y=y.playerLiveStoryboardSpecRenderer)&&y.spec&&this.Z&&(k=NR(this.Z.Z).index)&&(this.Cp=new oBq(y.spec,this.Z.isLive,k,l))}else this.MS?this.Cp=new OR(this.MS,this.lengthSeconds,!1,l):this.DW&&this.Z&&(y=NR(this.Z.Z).index)&&(this.Cp=new oBq(this.DW,this.Z.isLive,y,l));return this.Cp}getStoryboardFormat(){if(this.cotn)return null;
if(this.playerResponse&&this.playerResponse.storyboards){var l=this.playerResponse.storyboards;return(l=l.playerStoryboardSpecRenderer||l.playerLiveStoryboardSpecRenderer)&&l.spec||null}return this.MS||this.DW}TM(){return this.Z&&!isNaN(this.Z.TM())?this.Z.TM():fc(this)?0:this.lengthSeconds}dY(){return this.Z&&!isNaN(this.Z.dY())?this.Z.dY():0}getPlaylistSequenceForTime(l){if(this.Z&&this.C){var y=this.Z.Z[this.C.id];if(!y)return null;const k=y.index.NL(l);y=y.index.getStartTime(k);return{sequence:k,
elapsed:Math.floor((l-y)*1E3)}}return null}Ij(){return!this.IR()&&!(!this.videoId&&!this.kK)}dJ(){return!!this.adaptiveFormats||!!this.playerResponse?.streamingData?.adaptiveFormats?.length}isLoaded(){return CN(this)&&!this.q_&&!this.V9}uE(l){l||(l="hqdefault.jpg");const y=this.TV[l];return y||this.Qj.Y||l==="pop1.jpg"||l==="pop2.jpg"||l==="sddefault.jpg"||l==="hq720.jpg"||l==="maxresdefault.jpg"?y:qV(this.Qj,this.videoId,l)}UA(){return this.isLivePlayback||this.aj||this.xa||!(!this.liveUtcStartSeconds||
!this.Wi)}isOtf(){return!!this.Z&&(this.Z.isOtf||!this.aj&&!this.isLivePlayback&&this.Z.N)}getAvailableAudioTracks(){if(this.N){if(this.N.getAvailableAudioTracks().length>0)return this.N.getAvailableAudioTracks();if(this.vn)return this.vn;if(this.bO)return this.bO}return[]}getAudioTrack(){if(this.V&&!this.V.N()){var l=g.Dg(this.getAvailableAudioTracks(),y=>y.id===this.V.id);
if(!l&&this.V.a7?.id){const y=this.V.a7.id;l=g.Dg(this.getAvailableAudioTracks(),k=>k.a7.id===y)}return l||this.Ak}if(this.vn){if(!this.U7)for(l of this.vn)if(l.a7.getIsDefault()){this.U7=l;
break}return this.U7||this.Ak}return this.Ak}getPlayerResponse(){return this.playerResponse}getWatchNextResponse(){return this.sj}getReelItemWatchResponse(){return this.reelItemWatchResponse}getHeartbeatResponse(){return this.Cd}A6(){return this.watchUrl?this.watchUrl:this.Qj.getVideoUrl(this.videoId)}Zu(){return!!this.Z&&(Iz5(this.Z)||Tl5(this.Z)||Vi5(this.Z))}qU(){const l=g.j2(this),y=this.O().J,k=nA("243");return k?J$(l,k,y,!0)===!0:!1}I4(){return this.X("enable_wn_infocards")}pf(){return(this.I4()?
this.sj?.cards?.cardCollectionRenderer:this.playerResponse?.cards?.cardCollectionRenderer)||null}getEmbeddedPlayerResponse(){return this.Eo}yf(){return(this.eventLabel||this.Qj.b0)==="shortspage"}isAd(){return this.j3||!!this.adFormat}S(){return this.oauthToken||this.Qj.oY}isDaiEnabled(){return!!(this.playerResponse&&this.playerResponse.playerConfig&&this.playerResponse.playerConfig.daiConfig&&this.playerResponse.playerConfig.daiConfig.enableDai)}j2(){return this.isDaiEnabled()&&this.enableServerStitchedDai&&
!!this.playerResponse?.playerConfig?.daiConfig?.ssaEnabledPlayback}RY(){return!!this.playerResponse?.compositePlayabilityStatus}lR(){return!this.RY()}fR(){return this.h_}hg(){return this.SW||this.O1}PF(){if(!this.Z||!this.C||!this.V)return!1;var l=this.Z.Z;const y=!!l[this.C.id]&&ux(39,5722,l[this.C.id].pP.Z);l=!!l[this.V.id]&&ux(21,5736,l[this.V.id].pP.Z);return(this.C.itag==="0"||y)&&l}eQ(){return this.fetchType==="onesie"}h2(){return Sn(this,"html5_samsung_vp9_live")}Md(l,y,k){this.publish("ctmp",
l,y,k)}yZ(l,y,k){this.publish("ctmpstr",l,y,k)}hasProgressBarBoundaries(){return!(!this.progressBarStartPosition||!this.progressBarEndPosition)}Ja(){return!(!this.isLivePlayback||!this.hasProgressBarBoundaries())}D(){return this.zZ||this.suggestions?.[0]||null}getGetAdBreakContext(l=NaN,y=NaN){const k={isSabr:Kc(this)};var z=this.getHeartbeatResponse()?.adBreakHeartbeatParams;z&&(k.adBreakHeartbeatParams=z);if(this.X("enable_ltc_param_fetch_from_innertube")&&this.isLivePlayback&&this.Z&&!isNaN(l)&&
!isNaN(y)){y=l-y;for(var r in this.Z.Z){z=this.Z.Z[r];if(!z.info.q4()&&!z.info.a9())continue;z=z.index;if(!z.isLoaded())continue;r=z.NL(y);z=z.QK(r)+y-z.getStartTime(r);this.Md("gabc",{t:l.toFixed(3),mt:y.toFixed(3),sg:r,igt:z.toFixed(3)});k.livePlaybackPosition={utcTimeMillis:""+(z*1E3).toFixed(0)};break}}return k}isEmbedsShortsMode(l,y){return!g.u9(this.Qj)||(this.Qj.Ja||"EMBEDDED_PLAYER_MODE_DEFAULT")!=="EMBEDDED_PLAYER_MODE_DEFAULT"||y?!1:this.X("embeds_enable_shorts")?!!this.embeddedPlayerConfig?.embeddedPlayerFlags?.isShortsExperienceEligible:
!!(this.embeddedPlayerConfig?.embeddedPlayerFlags?.isShortsExperienceEligible&&l.width<=l.height)}gS(){return this.K||this.X("web_player_media_session_infinity")&&this.isLivePlayback}Vj(){super.Vj();this.bI=null;delete this.NU;delete this.accountLinkingConfig;delete this.Z;this.N=this.Cd=this.playerResponse=this.sj=null;this.t$=this.adaptiveFormats="";delete this.botguardData;this.RR=this.suggestions=this.zZ=null;this.sabrContextUpdates.clear()}};NIz=!0;var x5q={phone:"SMALL_FORM_FACTOR",tablet:"LARGE_FORM_FACTOR"},m5z={desktop:"DESKTOP",phone:"MOBILE",tablet:"TABLET"},b4C={preroll:"BREAK_PREROLL",midroll:"BREAK_MIDROLL",postroll:"BREAK_POSTROLL"},c7q={0:"YT_KIDS_AGE_UP_MODE_UNKNOWN",1:"YT_KIDS_AGE_UP_MODE_OFF",2:"YT_KIDS_AGE_UP_MODE_TWEEN",3:"YT_KIDS_AGE_UP_MODE_PRESCHOOL"},bk5={0:"MDX_CONTROL_MODE_UNKNOWN",1:"MDX_CONTROL_MODE_REMOTE",2:"MDX_CONTROL_MODE_VOICE"},CkQ={0:"UNPLUGGED_FILTER_MODE_TYPE_UNKNOWN",1:"UNPLUGGED_FILTER_MODE_TYPE_NONE",2:"UNPLUGGED_FILTER_MODE_TYPE_PG",
3:"UNPLUGGED_FILTER_MODE_TYPE_PG_THIRTEEN"},uJq={0:"EMBEDDED_PLAYER_MUTED_AUTOPLAY_DURATION_MODE_UNSPECIFIED",1:"EMBEDDED_PLAYER_MUTED_AUTOPLAY_DURATION_MODE_30_SECONDS",2:"EMBEDDED_PLAYER_MUTED_AUTOPLAY_DURATION_MODE_FULL"};var sxq=class extends g.zP{constructor(l,y){super();this.app=l;this.state=y}handleExternalCall(l,y,k){const z=this.state.J[l],r=this.state.S[l];let Z=z;if(r)if(k&&XV(k,xTq))Z=r;else if(!z)throw Error(`API call from an untrusted origin: "${k}"`);this.logApiCall(l,k);if(Z){a:{for(const e of y)if(String(e).includes("javascript:")){k=!0;break a}k=!1}k&&g.WH(Error(`Dangerous call to "${l}" with [${y}].`));return Z.apply(this,y)}throw Error(`Unknown API method: "${l}".`);}logApiCall(l,y,k){const z=this.app.O();
z.dF&&!this.state.D.has(l)&&(this.state.D.add(l),g.wv("webPlayerApiCalled",{callerUrl:z.loaderUrl,methodName:l,origin:y||void 0,playerStyle:z.playerStyle||void 0,embeddedPlayerMode:z.Ja,errorCode:k}))}publish(l,...y){this.state.N.publish(l,...y);if(l==="videodatachange"||l==="resize"||l==="cardstatechange")this.state.C.publish(l,...y),this.state.V.publish(l,...y)}X(l){return this.app.O().X(l)}Vj(){if(this.state.element){var l=this.state.element,y;for(y in this.state.Z)this.state.Z.hasOwnProperty(y)&&
(l[y]=null);this.state.element=null}super.Vj()}};var da=class extends g.W9{constructor(){super();this.J=new Map}publish(l,...y){if(this.J.has(l))return this.J.get(l).push(y),!0;let k=!1;try{for(y=[y],this.J.set(l,y);y.length;)k=super.publish(l,...y.shift())}finally{this.J.delete(l)}return k}};var Ljs=class extends g.zP{constructor(){super(...arguments);this.element=null;this.K=new Set;this.J={};this.S={};this.Z={};this.D=new Set;this.N=new da;this.C=new da;this.V=new da;this.A=new da}Vj(){this.A.dispose();this.V.dispose();this.C.dispose();this.N.dispose();this.D=this.Z=this.S=this.J=this.K=void 0}};var WqQ=new Set("endSeconds startSeconds mediaContentUrl suggestedQuality videoId rct rctn playmuted muted_autoplay_duration_mode".split(" "));var vB4=class extends sxq{getApiInterface(){return Array.from(this.state.K)}C_(l,y){this.state.A.subscribe(l,y)}Fg(l,y){this.state.A.unsubscribe(l,y)}getPlayerState(l){return Z7s(this.app,l)}WG(){return Z7s(this.app)}ji(l,y,k){ua(this)&&(BM(this.app,!0,1),HM(this.app,l,y,k,1))}getCurrentTime(l,y,k){l=Y1s(l,y,k);y=l.playerType;k=this.getPlayerState(y);return this.app.getAppState()===2&&k===5?this.app.getVideoData()?.startSeconds||0:this.X("web_player_max_seekable_on_ended")&&k===0?lf(this.app,y):this.app.getCurrentTime(l)}u0(){return this.app.getCurrentTime({playerType:1})}gb(){const l=
this.app.QK(1);return isNaN(l)?this.getCurrentTime({playerType:1}):l}Xr(){return this.app.getDuration({playerType:1})}LM(l,y){l=g.gf(Math.floor(l),0,100);isFinite(l)&&zF(this.app,{volume:l,muted:this.isMuted()},y)}oY(l){this.LM(l,!1)}K6(l){zF(this.app,{muted:!0,volume:this.getVolume()},l)}q_(){this.K6(!1)}dt(l){zF(this.app,{muted:!1,volume:Math.max(5,this.getVolume())},l)}RY(){ba(this.app)||this.dt(!1)}getPlayerMode(){const l={};this.app.getVideoData().Wn&&(l.pfp={enableIma:this.app.hs().allowImaMonetization,
autoplay:$k(this.app.hs()),mutedAutoplay:this.app.hs().mutedAutoplay});return l}Ro(){const l=this.app.getPresentingPlayerType();if(l===2&&!this.app.CE()){var y=nJ(this.app.r4());if(!(v8e(y)||g.u9(this.app.O())&&this.app.je().getPlayerState().Z(1024))||MZ(y))return}(y=this.app.yu().xe)?y.playVideo():this.app.playVideo(l)}Xz(){BM(this.app,!0,1);this.Ro()}pauseVideo(l){const y=this.app.getPresentingPlayerType();if(y!==2||this.app.CE()||v8e(nJ(this.app.r4()))){var k=this.app.yu().xe;k?k.pauseVideo():
this.app.pauseVideo(y,l)}}pf(){var l=this.app;let y=!1;l.cG.g4&&(l.K_.publish("pageTransition"),y=!0);l.stopVideo(y)}clearVideo(){}getAvailablePlaybackRates(){var l=this.app.O();if(l.enableSpeedOptions){if(["https://admin.youtube.com","https://viacon.corp.google.com","https://yurt.corp.google.com"].includes(l.V?l.ancestorOrigins[0]:window.location.origin)||l.zz)return jy5;l=this.app.getVideoData();const y=l.tA,k=l.Tw;return Sfz.filter(z=>z>=y&&z<=k)}return[1]}getPlaybackQuality(l){return this.app.u5({playerType:l}).getPlaybackQuality()}Ky(){}getAvailableQualityLevels(l){l=
this.app.u5({playerType:l});
l=g.sT(l.Gi(),y=>y.quality);
l.length&&(l[0]==="auto"&&l.shift(),l=l.concat(["auto"]));return l}RR(){return this.getAvailableQualityLevels(1)}hv(){return this.V()}MW(){return 1}getVideoLoadedFraction(l){return this.app.getVideoLoadedFraction(l)}V(){return this.getVideoLoadedFraction()}R7(){return 0}getSize(){const l=this.app.Yz().getPlayerSize();return{width:l.width,height:l.height}}setSize(){this.app.Yz().resize()}loadVideoById(l,y,k,z){if(!l)return!1;l=cl(l,y,k);return this.app.loadVideoByPlayerVars(l,z)}BF(l,y,k){l=this.loadVideoById(l,
y,k,1);BM(this.app,l,1)}cueVideoById(l,y,k,z){l=cl(l,y,k);this.app.cueVideoByPlayerVars(l,z)}Y(l,y,k){this.cueVideoById(l,y,k,1)}loadVideoByUrl(l,y,k,z){l=q1s(l,y,k);return this.app.loadVideoByPlayerVars(l,z)}hj(l,y,k){l=this.loadVideoByUrl(l,y,k,1);BM(this.app,l,1)}cueVideoByUrl(l,y,k,z){l=q1s(l,y,k);this.app.cueVideoByPlayerVars(l,z)}sj(l,y,k){this.cueVideoByUrl(l,y,k,1)}PF(){const l=this.app.O();if(l.Y)return"";const y=this.app.hs();let k=void 0;y.isLivePlayback||(k=Math.floor(this.app.getCurrentTime({playerType:1})));
return l.getVideoUrl(y.videoId,this.getPlaylistId()||void 0,k)}PG(){return this.app.getDebugText()}getVideoEmbedCode(){const l=this.app.O();if(l.Y)return"";const y=this.app.hs();return l.getVideoEmbedCode(y.isPrivate?"":y.title,this.app.hs().videoId,this.app.Yz().getPlayerSize(),this.getPlaylistId()||void 0)}A(l,y,k){return ry(this.app,l,y,k)}removeCueRange(l){return this.app.uJ(l)}loadPlaylist(l,y,k,z){this.app.loadPlaylist(l,y,k,z)}OA(l,y,k,z){this.loadPlaylist(l,y,k,z);BM(this.app,!0,1)}cuePlaylist(l,
y,k,z){this.app.cuePlaylist(l,y,k,z)}nextVideo(l,y){this.app.nextVideo(l,y)}vn(){this.nextVideo();BM(this.app,!0,1)}previousVideo(l){this.app.previousVideo(l)}Cp(){this.previousVideo();BM(this.app,!0,1)}playVideoAt(l){this.app.playVideoAt(l)}S2(l){this.playVideoAt(l);BM(this.app,!0,1)}setShuffle(l){const y=this.app.getPlaylist();y&&y.setShuffle(l)}setLoop(l){const y=this.app.getPlaylist();y&&(y.loop=l)}T7(){const l=this.app.getPlaylist();if(!l)return null;const y=[];for(let k=0;k<l.length;k++){const z=
g.pJ(l,k);z&&y.push(z.videoId)}return y}getPlaylistIndex(){const l=this.app.getPlaylist();return l?l.index:-1}getPlaylistId(){const l=this.app.getPlaylist();return l&&l.listId?l.listId.toString():null}S(l){l==="captions"&&(l=g.FY(this.app.r4()))&&!l.loaded&&l.load()}K(l){l==="captions"&&(l=g.FY(this.app.r4()))&&l.loaded&&l.T9()}C(l,y,k){if(!y)return null;const z=this.app.r4();return l==="captions"?(l=g.FY(z))&&l.ef(y,k):null}xz(l,y,k){return wu(this.app.b5().getVideoData())?{}:this.C(l,y,k)}Z(l){const y=
this.app.r4();return l==="captions"?g.FY(y)?.getOptions()||null:l?null:(l=[],g.FY(y)&&l.push("captions"),l)}getVolume(){return this.app.Gk.volume}isMuted(){return this.app.Gk.muted}destroy(){this.app.dispose()}logImaAdEvent(l,y){const k=this.app.O();this.app.hs().allowImaMonetization&&(l={adSource:"EMBEDS_AD_SOURCE_IMA",breakType:y,embedUrl:g.tw(this.app.O().loaderUrl),eventType:l,youtubeHost:g.$7(this.app.O().nS)||""},l.embeddedPlayerMode=k.Ja,g.wv("embedsAdEvent",l))}mutedAutoplay(l){const y=this.app.O();
y.getWebPlayerContextConfig()?.embedsHostFlags?.allowMutedAutoplayDurationMode?.length&&!y.N&&this.app.mutedAutoplay(l)}preloadVideoById(l,y,k,z){this.app.O().getWebPlayerContextConfig()?.embedsHostFlags?.allowPreloadVideoById&&l&&(l=cl(l,y,k),this.app.preloadVideoByPlayerVars(l,z))}wY(l,y,k){this.preloadVideoById(l,y,k,1)}setFauxFullscreen(l){g.LL();this.app.yG(l?2:0)}Um(l){this.app.O().getWebPlayerContextConfig()?.embedsHostFlags?.allowSetFauxFullscreen&&this.setFauxFullscreen(l)}setCenterCrop(l){this.app.O().getWebPlayerContextConfig()?.embedsHostFlags?.allowSetCenterCrop&&
this.app.Yz().setCenterCrop(l)}wakeUpControls(){const l=g.Ci(this);l&&l.T6()}};var g0y="driveweb flix flix_from_driveweb hovercard projector texmex wshbp".split(" ");var BIz=class extends vB4{CG(l,y){this.state.V.subscribe(l,y)}Ok(l,y){this.state.V.unsubscribe(l,y)}cueVideoByPlayerVars(l,y){this.app.cueVideoByPlayerVars(l,y)}fG(l,y=1){this.cueVideoByPlayerVars(xk(this,l),y)}loadVideoByPlayerVars(l,y,k,z,r){this.app.loadVideoByPlayerVars(l,k,y,z,r)}dL(l,y,k=1,z){this.loadVideoByPlayerVars(xk(this,l),y,k,z)}preloadVideoByPlayerVars(l,y,k=NaN,z="",r=""){this.app.preloadVideoByPlayerVars(l,y,k,z,r)}I_(l,y=1,k,z){this.preloadVideoByPlayerVars(xk(this,l),y,k,z)}t_(l,
y,k){this.loadVideoById(l,y,k,1)}WK(l,y,k){this.loadVideoByUrl(l,y,k,1)}l3(l){return this.getPlayerState(l)}jm(l=1){const y=VTC(this,l);l=this.app.u5({playerType:l}).getVideoData();y.backgroundable=l.backgroundable;y.eventId=l.eventId;y.cpn=l.clientPlaybackNonce;y.isLive=l.isLivePlayback;y.isWindowedLive=l.xa;y.isManifestless=fc(l);y.allowLiveDvr=l.allowLiveDvr;y.isListed=l.isListed;l.liveUtcStartSeconds!=null&&(y.liveUtcStartSeconds=l.liveUtcStartSeconds);l.eb()&&(y.isEncrypted=!0);if(l.N)for(const k of l.N.videoInfos)if(k.video?.isHdr()){y.isHdr=
!0;break}y.isMultiChannelAudio=!!l.V?.audio?.isMultiChannelAudio();return y}seekBy(l,y,k,z,r){ua(this)&&HM(this.app,this.app.getCurrentTime()+l,y,k,r,z)}cX(l,y,k){this.seekBy(l,y,k,void 0,1)}seekTo(l,y,k,z,r){ua(this)&&HM(this.app,l,y,k,z,r)}hM(l,y,k,z=1){this.seekTo(l,y,k,z)}getStoryboardFormat(){return wu(this.app.getVideoData())?null:this.app.getStoryboardFormat()}ye(l=1,y){return this.getCurrentTime({playerType:l,D5:y})}N(){let l=this.app.getPresentingPlayerType(!0);l===2&&this.app.CE()&&(l=1);
return l}getDuration(l,y){return this.app.getDuration(Y1s(l,y))}g1(l=1,y){return this.getDuration({playerType:l,D5:y})}dO(l){return this.getVideoLoadedFraction(l)}loadModule(l){if(l==="annotations_module"){const y=g.ol(this.app.r4());y&&!y.loaded&&y.load()}this.S(l)}unloadModule(l){if(l==="annotations_module"){const y=g.ol(this.app.r4());y&&y.loaded&&y.unload()}this.K(l)}getOption(l,y,k,z){return wu(this.app.u5({playerType:z}).getVideoData())?{}:this.setOption(l,y,k)}xv(l,y,k){return this.getOption(l,
y,k,1)}getOptions(l){const y=this.app.r4();switch(l){case "ad":return nJ(y)?.getOptions?.()||null;case "remote":return Vi(y)?.getOptions?.()||null;case "annotations_module":return g.ol(y)?.getOptions?.()||null;case "creatorendscreen":return NL(y)?.getOptions?.()||null;case "unplugged":return y.IJ()?.getOptions?.()||null;case "kids":return sZ(y)?.getOptions?.()||null}if(!l){l=this.Z();if(!l)return l;nJ(y)&&l.push("ad");Vi(y)&&l.push("remote");g.ol(y)&&l.push("annotations_module");NL(y)&&l.push("creatorendscreen");
y.IJ()&&l.push("unplugged");sZ(y)&&l.push("kids");return l}return this.Z(l)}setOption(l,y,k){if(!y)return null;const z=this.app.r4();switch(l){case "ad":return(l=nJ(z))&&l.ef&&l.ef(y,k);case "kids":return(l=sZ(z))&&l.ef(y,k);case "remote":return(l=Vi(z))&&l.ef(y,k);case "unplugged":return(l=z.IJ())&&l.ef(y,k);case "annotations_module":return(l=g.ol(z))&&l.ef(y,k);case "creatorendscreen":return(l=NL(z))&&l.ef(y,k)}return this.C(l,y,k)}addCueRange(l,y,k,z,r){return ry(this.app,l,y,k,z,r)}getDebugText(l){return this.app.getDebugText(l)}getCurrentBroadcastId(){return null}handleGlobalKeyDown(l,
y=!1,k=!1,z=!1,r=!1,Z,e,A){const Q=g.Ci(this);Q&&Q.handleGlobalKeyDown(l,y,k,z,r,Z,e,A)}handleGlobalKeyUp(l,y=!1,k=!1,z=!1,r=!1,Z,e){const A=g.Ci(this);A&&A.handleGlobalKeyUp(l,y,k,z,r,Z,e)}setSizeStyle(l,y){this.app.setSizeStyle(l,y)}showControls(){const l=g.Ci(this);l&&l.showControls(!0)}hideControls(){const l=g.Ci(this);l&&l.showControls(!1)}getVideoContentRect(l){l=this.app.Yz().getVideoContentRect(l);return{left:l.left,top:l.top,width:l.width,height:l.height}}toggleFullscreen(){const l=k=>{g.WH(k)};
var y=this.app.O();if(y.externalFullscreen){if(!g.JA(y))return this.isFullscreen()?HD(window.document.documentElement):NP(window.document.documentElement).catch(l)}else if(g.LL()||y.K)return this.isFullscreen()?HD(vD()):y.controlsType!=="3"&&g.LL()?NP(this.app.Yz().element).catch(l):(y=this.app.fl().Jv())?NP(y).catch(l):Promise.reject(Error("Media element missing"));g.X5(this,"onFullscreenToggled",this.isFullscreen());return Promise.resolve(void 0)}isFullscreen(){return this.app.isFullscreen()}vj(){return this.app.vj()}cancelPlayback(){var l=
nJ(this.app.r4());l&&l.created&&l.destroy();this.app.je().stopVideo();(l=this.app.r4().R4.get("endscreen"))&&l.Pq()&&g.Io(this.app.K_,!0)}getProgressState(l){if(this.N()===3)return Vi(this.app.r4()).getProgressState();const y=this.app.getVideoData();var k=this.app.u5({playerType:l}),z=k.getPlayerType();a:{var r=this.app.getVideoData();if(r.progressBarStartPosition?.utcTimeMillis&&(r=Number(r.progressBarStartPosition.utcTimeMillis)/1E3,!isNaN(r))){r=this.Wz(r,l);break a}r=0}a:{var Z=this.app.getVideoData();
if(Z.progressBarEndPosition?.utcTimeMillis&&(Z=Number(Z.progressBarEndPosition.utcTimeMillis)/1E3,!isNaN(Z))){Z=this.Wz(Z,l);break a}Z=0}const e=this.getCurrentTime({playerType:l});l=this.getDuration({playerType:l});const A=this.app.QK(z),Q=this.app.isAtLiveHead(z),t=this.app.qS();var O=this.app;var d=O.u5({playerType:z});d=R$(O,d);O=D7(O,d.ET(),d);d=lf(this.app,z);k=k.w4();const w=this.app.getVideoData().Mq;z=!w||isNaN(w)?0:this.Wz(w,z);return{airingStart:r,airingEnd:Z,allowSeeking:this.app.wq(),
clipEnd:y.clipEnd,clipStart:y.clipStart,current:e,displayedStart:-1,duration:l,ingestionTime:A,isAtLiveHead:Q,loaded:t,seekableStart:O,seekableEnd:d,offset:k,viewerLivestreamJoinMediaTime:z}}Wz(l,y){const k=this.app.QK(y);if(!k)return 0;y=k-this.app.getCurrentTime({playerType:y});return l-y}isInline(){return this.app.isInline()}setInline(l){this.app.setInline(l)}zW(){return this.app.b5().Dp(!0)}toggleSubtitles(l){const y=g.FY(this.app.r4());y&&y.AM(l)}getPlayerSize(){const l=this.app.Yz().getPlayerSize();
return{width:l.width,height:l.height}}setCenterCrop(l){this.app.Yz().setCenterCrop(l)}getLoopVideo(){return this.app.getLoopVideo()}setLoopVideo(l){this.app.setLoopVideo(l)}},Kqq="BASE_URL BASE_YT_URL adformat adaptive_fmts allow_embed audio_only authuser autoplay cc_load_policy cpn dash dashmpd disable_native_context_menu disablekb docid el enable_faster_speeds enablecastapi end eventid external_fullscreen fmt_list hl hlsdvr hlsvp iurl iurlhq iurlmq length_seconds live_playback osig override_hl partnerid pause_at_start pipable player_response playsinline plid post_live_playback postid ps public qoe_cat raw_player_response rel show_loop_video_toggle start startSeconds status suggestedQuality timestamp title token ttsurl use_native_controls url_encoded_fmt_stream_map video_id videoId".split(" "),
E0y="adformat allow_embed authuser autohide autonav autoplay c cbr cbrver cc_load_policy controls cos cosver cr csi_page_type cver cyc dash dashmpd disablekb el enablecastapi enablecsi end external_fullscreen external_list fs hl host_language innertube_api_key innertube_api_version innertube_context_client_version iurl iurlhq iurlmq iv_load_policy jsapicallback length_seconds live_playback live_storyboard_spec loaderUrl osig override_hl pageid partnerid pipable player_params player_wide playsinline plid postid profile_picture ps rel show_miniplayer_button showinfo showwatchlater start startSeconds status storyboard_spec suggestedQuality timestamp title tkn token transparent_background ucid url_encoded_fmt_stream_map use_miniplayer_ui use_native_controls videoId video_id vss_host watermark".split(" ");var f44={["api.invalidparam"]:2,auth:150,["drm.auth"]:150,["heartbeat.net"]:150,["heartbeat.servererror"]:150,["heartbeat.stop"]:150,["html5.unsupportedads"]:5,["fmt.noneavailable"]:5,["fmt.decode"]:5,["fmt.unplayable"]:5,["html5.missingapi"]:5,["html5.unsupportedlive"]:5,["drm.unavailable"]:5,["mrm.blocked"]:151,["embedder.identity.denied"]:152,["embedder.identity.missing.referrer"]:153};g.wa=class extends BIz{isExternalMethodAvailable(l,y){return this.state.J[l]?!0:!!(this.state.S[l]&&y&&XV(y,xTq))}getBandwidthEstimate(){return AJ(this.app.o7)}reportPlaybackIssue(l=""){const y=this.app.je();l={gpu:(0,g.lm)(),d:l};y.handleError(new g.Gr("feedback",l))}getInternalApi(){return{...this.state.Z}}getTrustedApi(){return{...this.state.J,...this.state.S}}getInternalApiInterface(){return g.LR(this.state.Z)}queueNextVideo(l,y,k=NaN,z="",r=""){this.app.queueNextVideo(l,y,k,z,r)}kz(l){l=this.app.getPlayerStateObject(l);
return{isBuffering:l.Z(1),isCued:l.isCued(),isDomPaused:l.Z(1024),isEnded:l.Z(2),isError:l.Z(128),isOrWillBePlaying:l.isOrWillBePlaying(),isPaused:l.isPaused(),isPlaying:l.isPlaying(),isSeeking:l.Z(16),isUiSeeking:l.Z(32),isUnstarted:l.Z(64)}}createSubtitlesModuleIfNeeded(){return this.app.createSubtitlesModuleIfNeeded()}startSeekCsiAction(){this.app.SV().V.Z=(0,g.f)()}rb(l=1,y,k){return this.getCurrentTime({playerType:l,D5:y,cpn:k})}seekToStreamTime(l,y,k,z){Axs(this.app,l,y,k,z)}getStreamTimeOffset(){return this.app.b5().getStreamTimeOffset()}seekToLiveHead(l,
y){const k=this.app.b5().getVideoData();k&&k.isLivePlayback&&HM(this.app,Infinity,l,y,1)}requestSeekToWallTimeSeconds(l,y,k){this.app.b5().RV(l,y,k)}I4(l,y,k,z=1,r){this.seekTo(l,y,k,z,r)}zA(l,y,k,z){this.seekBy(l,y,k,z,1)}prefetchKeyPlay(l,y){this.app.b5().prefetchKeyPlay(l,y)}setVolume(l,y=!0){this.LM(l,y)}mute(l=!0){this.K6(l)}unMute(l=!0){this.dt(l)}syncVolume(){const l=$Wg(this.app);zF(this.app,{volume:l.volume,muted:l.muted},!1)}getAvailableQualityLabels(){return g.sT(this.app.b5().Gi(),l=>
l.qualityLabel)}channelSubscribed(){g.G3(this,"SUBSCRIBE",this.app.hs().Fu)}channelUnsubscribed(){g.G3(this,"UNSUBSCRIBE",this.app.hs().Fu)}setScreenLayer(l){this.app.setScreenLayer(l)}getCurrentPlaylistSequence(){return this.app.je().getPlaylistSequenceForTime(this.app.getCurrentTime())}getPlaylistSequenceForTime(l){return this.app.je().getPlaylistSequenceForTime(l)}shouldSendVisibilityState(){return!0}confirmYpcRental(){this.app.b5().ud("ypcRentalActivation")}setHomeGroupInfo(l){this.app.O().homeGroupInfo=
l}setConnectedRemoteApps(l){this.app.O().kC=l}setLivingRoomAppMode(l){this.app.O().livingRoomAppMode=Y9("LIVING_ROOM_APP_MODE_UNSPECIFIED",l,Rwt)}setEnablePrivacyFilter(l=!1){this.app.O().enablePrivacyFilter=l}togglePictureInPicture(){this.app.togglePictureInPicture()}addUtcCueRange(l,y,k,z,r){return QQ5(this.app,l,y,k,z,r)}g4(l=1){const y=this.jm(l);
l=this.app.u5({playerType:l}).getVideoData();y.hasProgressBarBoundaries=l.hasProgressBarBoundaries();y.isPremiere=l.isPremiere;y.itct=l.Y;y.playerResponseCpn=l.playerResponseCpn;y.progressBarStartPositionUtcTimeMillis=l.hasProgressBarBoundaries()&&l.progressBarStartPosition?.utcTimeMillis?cZ(l.progressBarStartPosition.utcTimeMillis):null;y.progressBarEndPositionUtcTimeMillis=l.hasProgressBarBoundaries()&&l.progressBarEndPosition?.utcTimeMillis?cZ(l.progressBarEndPosition.utcTimeMillis):null;y.ypcOriginalItct=
l.E9;y.ypcPreview=l.ypcPreview;y.paidContentOverlayText=QhT(l);y.paidContentOverlayDurationMs=tTT(l);l.Z&&Va(l.Z)&&(y.usingLocalMedia="true");y.transitionEndpointAtEndOfStream=l.transitionEndpointAtEndOfStream;y.isSeekable=l.isSeekable;return y}getAdState(){return this.app.getAdState()}isNotServable(l){if(l!==this.app.lf.video_id)return!1;const y=(l=this.app.b5().getPlayerState())?l.Ip:null;return!!(l&&y&&l.Z(128)&&jh_(y.errorCode)===5)}supportsGaplessAudio(){return this.app.O().supportsGaplessAudio()}supportsGaplessShorts(){return this.app.O().supportsGaplessShorts()}isGaplessTransitionReady(l){return this.app.wP(l)}enqueueVideoByPlayerVars(l,
y,k=Infinity,z=""){this.app.enqueueVideoByPlayerVars(l,y,k,z)}clearQueue(){this.app.clearQueue()}KS(){return g.Ci(this)}sendAbandonmentPing(){this.app.je().sendAbandonmentPing()}setAutonavState(l,y=!1){if(this.X("web_player_autonav_use_server_provided_state")&&!y&&(y=this.app.hs(),y?.hc()))if(l===3)y.autonavState!==3&&(y.dF=y.autonavState);else if(y.dF!==void 0)l=y.dF,y.dF=void 0;else return;tPs(this.app,l)}setAutonav(l,y=!1){this.setAutonavState(l?2:1,y)}setLoopRange(l){this.app.setLoopRange(l)}getLoopRange(){return this.app.getLoopRange()}hasSupportedAudio51Tracks(){return this.app.b5().hasSupportedAudio51Tracks()}setUserAudio51Preference(l,
y=!1){this.app.b5().setUserAudio51Preference(l,y)}getUserAudio51Preference(){return this.app.b5().getUserAudio51Preference()}setProximaLatencyPreference(l){this.app.b5().setProximaLatencyPreference(l)}getProximaLatencyPreference(){return this.app.b5().getProximaLatencyPreference()}isProximaLatencyEligible(){return this.app.b5().isProximaLatencyEligible()}getAppState(){return this.app.getAppState()}updateLastActiveTime(){OY()}setBlackout(l){this.app.setBlackout(l)}setUserEngagement(l){this.app.O().Z$!==
l&&(this.app.O().Z$=l,this.app.b5().D0())}updateSubtitlesUserSettings(l,y=!0){g.FY(this.app.r4()).Yp(l,y)}getCaptionWindowContainerId(){const l=g.FY(this.app.r4());return l?l.getCaptionWindowContainerId():""}toggleSubtitlesOn(){const l=g.FY(this.app.r4());l&&l.mF()}isSubtitlesOn(){const l=g.FY(this.app.r4());return l?l.isSubtitlesOn():!1}getPlayerResponse(l){return this.app.u5({playerType:l}).getVideoData().getPlayerResponse()}Oj(){return this.getPlayerResponse(1)}getEmbeddedPlayerResponse(){return this.app.b5().getVideoData().getEmbeddedPlayerResponse()}getWatchNextResponse(l){return this.app.u5({playerType:l}).getVideoData().getWatchNextResponse()}SN(){return this.getWatchNextResponse(1)}getHeartbeatResponse(l){return this.app.u5({playerType:l}).getVideoData().getHeartbeatResponse()}mK(){return this.getHeartbeatResponse(1)}getStoryboardFrame(l,
y){const k=this.app.mS();if(!k)return null;y=k.levels[y];return y?(l=g.ig(y,l))?{column:l.column,columns:l.columns,height:l.L9,row:l.row,rows:l.rows,url:l.url,width:l.xS}:null:null}getStoryboardFrameIndex(l,y){const k=this.app.mS();if(!k)return-1;y=k.levels[y];if(!y)return-1;l-=this.w4();return y.V(l)}getStoryboardLevel(l){var y=this.app.mS();return y?(y=y.levels[l])?{index:l,intervalMs:y.Z,maxFrameIndex:y.C(),minFrameIndex:y.S()}:null:null}getNumberOfStoryboardLevels(){const l=this.app.mS();return l?
l.levels.length:0}O2(l){return this.app.je().O2(l)}Zl(){this.app.je().Zl();this.publish("onFilterAudioFeatures")}Ja(){return this.getAudioTrack(1)}getAudioTrack(l){return this.app.u5({playerType:l}).getAudioTrack()}nY(){return this.app.u5({playerType:void 0}).nY()}setAudioTrack(l,y,k){const z=this.app.yu().xe;z&&z.LR(l);(l=this.app.u5({playerType:k}).LR(l,y))&&this.Zl();return l}hk(l,y){return this.setAudioTrack(l,y,1)}HG(){return this.getAvailableAudioTracks(1)}getAvailableAudioTracks(l){return this.app.u5({playerType:l}).getAvailableAudioTracks()}getMaxPlaybackQuality(){const l=
this.app.b5();return l.getVideoData().C?Tk(l.L5()):"unknown"}getUserPlaybackQualityPreference(){return this.app.b5().getUserPlaybackQualityPreference()}getSubtitlesUserSettings(){const l=g.FY(this.app.r4());return l?l.GW():null}resetSubtitlesUserSettings(){g.FY(this.app.r4()).kT()}setMinimized(l){this.app.setMinimized(l)}setOverlayVisibility(l){this.publish("overlayvisibilitychange",l)}setInlinePreview(l){this.app.setInlinePreview(l)}setSqueezeback(l){this.app.setSqueezeback(l)}setGlobalCrop(l){this.app.Yz().setGlobalCrop(l)}setAppFullscreen(l){this.app.yG(l?
4:0)}gT(){return this.app.gT()}getVisibilityState(){return this.gT().getVisibilityState(this.Jk(),this.vj()||g.ih(this.app.O()),this.isMinimized(),this.isInline(),this.app.Bw(),this.app.Co(),this.app.J8(),this.app.yR())}isMutedByMutedAutoplay(){return this.app.SQ}isMutedByEmbedsMutedAutoplay(){return ba(this.app)}setInternalSize(l,y){this.app.Yz().setInternalSize(new g.Fn(l,y))}w4(l){return this.app.u5({playerType:l}).w4()}isMinimized(){return this.app.isMinimized()}Bw(){return this.app.Bw()}Jk(){return this.app.je().Jk()}isOrchestrationLeader(){return this.app.isOrchestrationLeader()}setSafetyMode(l){this.app.O().enableSafetyMode=
l}canPlayType(l){return this.app.canPlayType(l)}updatePlaylist(l){if(l){var y=this.getPlaylistId(),k=!1;y&&y!==l.list&&(k=!0);l.external_list!==void 0&&(this.app.gP=JD(!1,l.external_list));const z=l.video;(y=this.app.getPlaylist())&&!k?this.isFullscreen()&&((k=z[y.index])&&k.encrypted_id!==g.pJ(y).videoId||(l.index=y.index)):ZU(this.app,{list:l.list,index:l.index,playlist_length:z.length});mq4(this.app.getPlaylist(),l);g.M1(this,"onPlaylistUpdate")}else this.app.updatePlaylist()}updateVideoData(l,
y){g.VT(this.app.b5().getVideoData(),l,y)}updateEnvironmentData(l){bh(this.app.O(),l,!1)}kK(l){this.app.sendVideoStatsEngageEvent(l,1)}productsInVideoVisibilityUpdated(l){this.publish("changeProductsInVideoVisibility",l)}isAtLiveHead(l,y=!0){return this.app.isAtLiveHead(l,y)}getVideoAspectRatio(){return this.app.Yz().getVideoAspectRatio()}getPreferredQuality(){return this.app.je().getPreferredQuality()}getPlaybackQualityLabel(l){return this.app.u5({playerType:l}).getVideoData().C?.K()?.qualityLabel||
""}setPlaybackQualityRange(l,y,k,z){this.app.u5({playerType:z}).DR(g.m8(l,y||l,!0,"m"),!0,k)}Ak(l,y,k){this.setPlaybackQualityRange(l,y,k,1)}onAdUxClicked(l,y){this.publish("aduxclicked",l,y)}showAirplayPicker(){this.app.showAirplayPicker()}dispatchReduxAction(l){g.IH.dispatch(l)}highlightSettingsMenuItem(l){this.publish("highlightSettingsMenu",l)}openSettingsMenuItem(l){this.publish("openSettingsMenuItem",l)}D(l,y){this.state.C.subscribe(l,y)}va(l,y){this.state.C.unsubscribe(l,y)}b0(l,y=1){this.cueVideoByPlayerVars(l,
y)}jN(l,y,k=1,z){this.loadVideoByPlayerVars(l,y,k,z)}O1(l,y=1,k,z){this.preloadVideoByPlayerVars(l,y,k,z)}getFeedbackProductData(){return this.app.getFeedbackProductData()}qV(){return g.Ci(this).qV()}xw(){return g.Ci(this).xw()}IH(){return g.Ci(this).IH()}As(){return this.KS().As()}WZ(...l){this.As().WZ(...l)}W1(){this.As().W1()}VC(){this.As().VC()}J(){this.As().hide()}X2(l,y,k,z,r,Z,e,A){this.As().X2(l,y,k,z,r,Z,e,A)}Ml(l,y){this.As().Ml(l,y)}O_(l,y,k,z,r){this.KS().O_(l,y,k,z,r)}We(l){this.As().setEnabled(l)}cL(l,
y){this.KS().cL(l,y)}CU(l,y){this.KS().CU(l,y)}uP(l,y){this.KS().uP(l,y)}u4(){this.KS().u4()}Nu(l,y){this.KS().Nu(l,y)}renderChapterSeekingAnimation(l,y,k){this.KS().renderChapterSeekingAnimation(l,y,k)}fd(){this.KS().fd()}getWebPlayerContextConfig(){return this.app.O().getWebPlayerContextConfig()}notifyShortsAdSwipeEvent(){this.publish("shortsadswipe")}De(){return this.app.je().De()}Sf(l,y,k=!1){this.KS()?.Sf(l,y,k)}isKeyboardDisabled(){return this.app.O().T7}};g.wa.prototype.JA=yz(7);g.hc=class extends g.wa{constructor(l,y){super(l,y);S1_(this);ia(this,"addEventListener",this.CG);ia(this,"removeEventListener",this.Ok);ia(this,"cueVideoByPlayerVars",this.fG);ia(this,"loadVideoByPlayerVars",this.dL);ia(this,"preloadVideoByPlayerVars",this.I_);ia(this,"loadVideoById",this.t_);ia(this,"loadVideoByUrl",this.WK);ia(this,"playVideo",this.Ro);ia(this,"loadPlaylist",this.loadPlaylist);ia(this,"nextVideo",this.nextVideo);ia(this,"previousVideo",this.previousVideo);ia(this,"playVideoAt",
this.playVideoAt);ia(this,"getVideoData",this.jm);ia(this,"seekBy",this.cX);ia(this,"seekTo",this.hM);ia(this,"showControls",this.showControls);ia(this,"hideControls",this.hideControls);ia(this,"cancelPlayback",this.cancelPlayback);ia(this,"getProgressState",this.getProgressState);ia(this,"isInline",this.isInline);ia(this,"setInline",this.setInline);ia(this,"setLoopVideo",this.setLoopVideo);ia(this,"getLoopVideo",this.getLoopVideo);ia(this,"getVideoContentRect",this.getVideoContentRect);ia(this,"getVideoStats",
this.zW);ia(this,"getCurrentTime",this.ye);ia(this,"getDuration",this.g1);ia(this,"getPlayerState",this.l3);ia(this,"getVideoLoadedFraction",this.dO);ia(this,"mute",this.K6);ia(this,"unMute",this.dt);ia(this,"setVolume",this.LM);ia(this,"loadModule",this.loadModule);ia(this,"unloadModule",this.unloadModule);ia(this,"getOption",this.xv);ia(this,"getOptions",this.getOptions);ia(this,"setOption",this.setOption);ia(this,"addCueRange",this.addCueRange);ia(this,"getDebugText",this.getDebugText);ia(this,
"getStoryboardFormat",this.getStoryboardFormat);ia(this,"toggleFullscreen",this.toggleFullscreen);ia(this,"isFullscreen",this.isFullscreen);ia(this,"getPlayerSize",this.getPlayerSize);ia(this,"toggleSubtitles",this.toggleSubtitles);ia(this,"setCenterCrop",this.setCenterCrop);ia(this,"setFauxFullscreen",this.setFauxFullscreen);ia(this,"setSizeStyle",this.setSizeStyle);ia(this,"handleGlobalKeyDown",this.handleGlobalKeyDown);ia(this,"handleGlobalKeyUp",this.handleGlobalKeyUp);PkC(this)}E2(l,y,k,z,r,
Z,e){return this.app.E2(l,y,k,z,r,Z,e)}pU(){return this.app.pU()}r4(){return this.app.r4()}pg(){const l=this.r4().R4.get("endscreen");return!!l&&l.pg()}getRootNode(){return this.Yz().element}O(){return this.app.O()}OS(){return this.app.vI()}gW(l){return this.app.gW(l)}Kf(){return g.Ci(this)?.Kf()||null}getSourceConfigForActiveAudioTrack(){const l=this.getVideoData()?.zD();if(l){const y=this.getAudioTrack().getLanguageInfo().getId();for(const k of l)for(const z of k.audioTracks??[])if(z.id===y)return k}}lP(){return this.app.je().lP()}getStartTime(l){return this.app.u5(l).getStartTime()}getPlayerStateObject(l){return this.app.getPlayerStateObject(l)}Yz(){return this.app.Yz()}getPlaylist(){return this.app.getPlaylist()}getVideoData(l=
{}){const y=this.app.u5(l).getVideoData();l.D5===!1?l=y:y.enableServerStitchedDai&&l.playerType===2?(l=this.app,l=l.l$?l.D3.Z?.getVideoData()||l.getVideoData():l.getVideoData()):l=y;return l}Ap(){return this.app.je().Ap()}mS(l){return this.app.mS(l)}yR(){return this.app.yR()}isHdr(){return this.app.je().isHdr()}yC(){return this.app.yC()}isEmbedsShortsMode(){var l=g.Ci(this);const y=this.getVideoData();l=l?l.f5:this.getPlayerSize();const k=!!this.getPlaylist();return!(!y||!y.isEmbedsShortsMode(new g.Fn(l.width,
l.height),k))}on(l,y){this.app.on(l,1,y)}jI(l,y,k,z,r){this.app.FS(l,y,k,z,r)}playVideo(l,y){try{const k=this.app.yu().xe;if(k){k.playVideo();return}if(!l&&this.getPresentingPlayerType()===2){const z=nJ(this.app.r4());if(z&&MZ(z))return}}catch(k){g.n(k)}this.app.playVideo(l,y)}stopVideo(l){this.app.u5({playerType:l}).stopVideo()}lI(l){this.app.u5({playerType:l}).lI()}addEventListener(l,y){this.state.N.subscribe(l,y)}removeEventListener(l,y){this.state.N.unsubscribe(l,y)}Uq(l){this.app.Uq(l)}setPlaybackQuality(l,
y){this.setPlaybackQualityRange(l,l,y)}Gi(){const l={},y=this.app.je().Gi();for(const k of y)l[k.quality]=k;return l}Id(){return this.app.je().Id()}Dn(l){this.app.Dn(l);l&&tPs(this.app,l)}getVideoUrl(l,y,k,z){let r=this.getPresentingPlayerType(),Z=r===2;if(z&&Z||r===3)Z=!1,r=1;z=this.getVideoData({playerType:r});if(!z)return"";let e;l||z.isLivePlayback||(e=Math.floor(this.getCurrentTime({playerType:r})));l=Z?void 0:this.getPlaylistId()||void 0;y&&l==="WL"&&(l=void 0);return this.app.getVideoUrl(z.videoId,
l,e,y,k)}zc(l){this.app.je().zc(l)}HE(l,y){this.r4().HE(l,y)}Jb(){const l=g.ol(this.r4());return!!l&&l.Jb()}TB(){const l=g.ol(this.r4());return!!l&&l.TB()}Ni(l,y,k){const z=g.ol(this.r4());z&&z.Ni(l,y,k)}wF(){this.app.je().Kd()}Hk(l){g.M1(this,"onVideoAreaChange");g.M1(this,l?"onShowControls":"onHideControls")}rz(l,y){const k=g.Ci(this);if(k)return k.rz(l,y);l=this.app.Yz().uI();return new g.f9(0,0,l.width,l.height)}Vk(){const l=this.r4().R4.get("heartbeat");return!!l&&l.Vk()}wq(){var l=this.O();
if(l.rb||l.disableSeek)return!1;const y=this.app.je(),k=y.getVideoData();if(!k.Ij()||g.la(k)||this.getPresentingPlayerType()===2&&!this.app.CE()&&!k.isSeekable||k.j2()&&this.getPresentingPlayerType(!0)===2||y.pJ()&&this.getPresentingPlayerType()!==3)return!1;l=g.CA(l);return g.j_(l)&&!k.hk||ba(this.app)?!1:!0}Fl(){return this.app.je().q8()}isLifaAdPlaying(){const l=this.getVideoData()?.j2();return l?this.getPresentingPlayerType(l)===2:!1}gw(){this.app.je().gw()}sendVideoStatsEngageEvent(l,y,k){this.app.sendVideoStatsEngageEvent(l,
k,y)}Wa(l,y,k){this.app.hp(l,y,k)}t6(l,y){this.app.ZI(l,y)}Ur(l,y){Al(this.app,l,y)}OD(l){return this.app.OD(l)}ud(l,y){this.app.u5({playerType:y}).ud(l)}pJ(){return this.app.u5({playerType:void 0}).pJ()}dJ(){const l=this.getVideoData();return!!l&&(l.dJ()||!!l.hlsFormats||!!l.vB)}getPlaybackRate(){return this.app.b5().getPlaybackRate()}setPlaybackRate(l,y){this.app.setPlaybackRate(l,y)}fl(){return this.app.fl()}SV(){return this.app.SV()}bH(l){return this.app.bH(l)}createClientVe(l,y,k,z=!1){this.O().PG&&
this.app.AX.createClientVe(l,y,k,z)}createServerVe(l,y,k=!1){this.O().PG&&this.app.AX.createServerVe(l,y,k)}setTrackingParams(l,y){this.O().PG&&this.app.AX.setTrackingParams(l,y)}logClick(l,y){this.O().PG&&(this.app.AX.click(l,y),this.publish("veClickLogged",l))}logVisibility(l,y,k){this.O().PG&&this.app.AX.fP(l,y,k)}hasVe(l){return this.O().PG?this.app.AX.hasVe(l):!1}destroyVe(l){this.O().PG&&this.app.AX.destroyVe(l)}getPresentingPlayerType(l){return this.app.getPresentingPlayerType(l)}getPlayerType(l){return this.app.u5({cpn:l}).getPlayerType()}hU(){this.app.hU()}iN(l){this.app.iN(l)}RC(){this.app.RC()}addPlayerResponseForAssociation(){}finishSegmentByCpn(l,
y,k){return this.app.finishSegmentByCpn(l,y,k)}Lj(l,y,k,z,r,Z,e,A){return this.app.Lj(l,y,k,z,r,Z,e,A)}Cm(l,y,k,z,r,Z,e,A){this.app.Cm(l,y,k,z,r,Z,e,A)}Td(){return this.app.Td()}pX(l){this.app.pX(l)}VJ(l=-1,y=Infinity){this.app.VJ(l,y)}z0(l){g.FY(this.r4())?.z0(l)}By(l,y,k){this.app.By(l,y,k)}ot(){return this.app.ot()}Fo(l,y,k=0){this.app.Fo(l,y,k)}Bh(){return this.app.Bh()}CE(){return this.app.CE()}CX(l,y,k){return this.app.CX(l,y,k)}Md(l,y,k=!1,z){this.app.u5({playerType:z}).Md(l,y,k)}SM(l,y){this.publish("aduxmouseover",
l,y)}I3(l,y){this.publish("aduxmouseout",l,y)}kI(l,y){this.publish("muteadaccepted",l,y)}N$(){return this.app.Yz().N$()}lN(l){this.app.Yz().lN(l)}Pz(l){return l?this.app.PJ():this.app.je().Pz()}Vh(l){this.app.Vh(l)}x8(){this.app.je().x8()}Hv(){this.app.Hv()}getGetAdBreakContext(){const l=this.app.b5();return l.getVideoData().getGetAdBreakContext(l.getCurrentTime(),l.w4())}ID(l,y){this.app.je().ID(l,y)}s3(){return this.app.je().s3()}o2(l){return this.app.u5({playerType:l}).o2()||0}};g.b=g.hc.prototype;
g.b.mC=yz(46);g.b.tO=yz(44);g.b.FQ=yz(42);g.b.pB=yz(40);g.b.Mi=yz(36);g.b.dT=yz(35);g.b.Rp=yz(29);g.b.Zh=yz(23);g.b.KU=yz(17);g.b.Qb=yz(15);g.b.jP=yz(11);g.b.SD=yz(9);var she=class extends OV{constructor(){super(...arguments);this.requestHeaders={}}Hm(l,y){return{...super.Hm(l,y),...this.requestHeaders}}},gu;var Hnq=class{constructor(l){this.experiments=l;this.Z=2048;this.V=0;this.C_=(this.K=this.X("html5_streaming_resilience"))?.5:.25;this.N=g.i_(this.experiments,"html5_media_time_weight_prop")||0;this.D=(this.J=this.experiments.z7("html5_consider_end_stall"))&&MC;this.C=this.experiments.z7("html5_measure_max_progress_handling");this.A=this.X("html5_treat_requests_pre_elbow_as_metadata");this.S=this.X("html5_media_time_weight")||!!this.N;this.X("html5_sabr_live_audio_early_return_fix")&&MC&&(this.Z=
65536)}X(l){return this.experiments.z7(l)}};g.U6=class extends g.zP{constructor(l){super();this.Zr=l;this.d4={FU:()=>this.Zr}}Vj(){this.V();
super.Vj()}V(){this.Zr.dispose()}addCueRange(l){this.Zr.addCueRange(l)}hp(l,y){this.Zr.hp(l,y)}mG(){this.Zr.mG()}PO(){return this.Zr.PO()}fC(l){return this.Zr===l}Kd(){this.Zr.wF()}mX(l,y){this.Zr.mX(l,y)}sb(l,y){return this.Zr.sb(l,y)}SX(l){this.Zr.SX(l)}Zl(){this.Zr.Zl()}O2(l){return this.Zr.O2(l)}getAudioTrack(){return this.Zr.getAudioTrack()}nY(){return this.Zr.nY()}getAvailableAudioTracks(){return this.Zr.getAvailableAudioTracks()}Gi(){return this.Zr.Gi()}Id(){return this.Zr.Id()}dZ(){return this.getVideoData().clientPlaybackNonce}XJ(){return this.Zr.XJ()}gj(){return this.Zr.gj()}YK(){return this.Zr.YK()}getCurrentTime(){return this.Zr.getCurrentTime()}KY(){return this.Zr.KY()}Jr(){return this.Zr.Jr()}Dp(l){return this.Zr.Dp(l)}getDuration(l){return this.Zr.getDuration(l)}mf(){return this.Zr.mf()}QK(){return this.Zr.QK()}q8(){return this.Zr.q8()}ot(){return this.Zr.ot()}qS(){return this.Zr.qS()}OS(){return this.Zr.OS()}o2(){return this.Zr.o2()}Ti(){return this.Zr.Ti()}L2(l){return this.Zr.L2(l)}fl(){return this.Zr.fl()}bX(){return this.Zr.bX()}dY(){return this.Zr.dY()}ET(){return this.Zr.ET()}Ed(l,
y,k){return this.Zr.Ed(l,y,k)}getPlaybackQuality(){return this.Zr.getPlaybackQuality()}getPlaybackRate(){return this.Zr.getPlaybackRate()}getPlayerState(){return this.Zr.getPlayerState()}getPlayerType(){return this.Zr.getPlayerType()}getPlaylistSequenceForTime(l){return this.Zr.getPlaylistSequenceForTime(l)}bH(l){return this.Zr.bH(l)}De(){return this.Zr.De()}getPreferredQuality(){return this.Zr.getPreferredQuality()}Bo(){return this.Zr.Bo()}getProximaLatencyPreference(){return this.Zr.getProximaLatencyPreference()}L5(){return this.Zr.L5()}getStartTime(){return 0}mS(){return this.getVideoData().mS()}getStoryboardFormat(){return this.getVideoData().getStoryboardFormat()}getStreamTimeOffset(){return this.Zr.getStreamTimeOffset()}rD(){return this.Zr.rD()}w4(){return this.Zr.w4()}lP(){return this.Zr.lP()}getUserAudio51Preference(){return this.Zr.getUserAudio51Preference()}getUserPlaybackQualityPreference(){return this.Zr.getUserPlaybackQualityPreference()}getVideoData(){return this.Zr.getVideoData()}Ap(){return this.Zr.Ap()}Qi(){return this.Zr.Qi()}getVideoLoadedFraction(){if(this.getVideoData().PF())return 1;
const l=this.Zr.fl();return l?l.FO():0}FU(){return this.Zr}wQ(l){this.Zr.wQ(l)}handleError(l){this.Zr.handleError(l)}GQ(l){this.Zr.GQ(l)}Xl(l){this.Zr.Xl(l)}pJ(){return this.Zr.pJ()}hasSupportedAudio51Tracks(){return this.Zr.hasSupportedAudio51Tracks()}isAd(){return this.getVideoData().isAd()}sG(){return this.Zr.sG()}Jk(){return this.Zr.Jk()}isAtLiveHead(l,y){return this.Zr.isAtLiveHead(l,y)}Zy(){return this.Zr.Zy()}isGapless(){return this.Zr.isGapless()}wP(){return this.Zr.wP()}isHdr(){return this.Zr.isHdr()}zX(){return this.Zr.zX()}M$(){return this.Zr.M$()}s3(){return this.Zr.s3()}isProximaLatencyEligible(){return this.Zr.isProximaLatencyEligible()}Bh(){return this.Zr.Bh()}VB(l){return!!this.Zr.loader?.VB(l)}JN(){return this.Zr.JN()}Q1(){this.Zr.Q1()}U_(l){this.Zr.U_(l)}A3(){this.Zr.A3()}oD(){this.Zr.oD()}jS(){this.Zr.jS()}OH(){this.Zr.OH()}jd(l){this.Zr.jd(l)}Zn(){this.Zr.Zn()}pauseVideo(l){this.Zr.pauseVideo(l)}prefetchKeyPlay(l,
y){this.Zr.prefetchKeyPlay(l,y)}rH(l){this.Zr.rH(l)}Q_(l){this.Zr.Q_(l)}playVideo(l,y){return this.Zr.playVideo(l,y)}pD(l,y,k,z,r){this.Zr.pD(l,y,k,z,r)}SK(l,y,k,z,r){this.Zr.SK(l,y,k,z,r)}Md(l,y,k){this.Zr.Md(l,y,k)}zc(l){this.Zr.zc(l)}ID(l,y){this.Zr.l5.ID(l,y)}S0(l,y,k){this.Zr.S0(l,y,k)}ZQ(l){this.Zr.ZQ(l)}Fn(l){this.Zr.Fn(l)}OX(l,y){this.Zr.OX(l,y)}g5(l,y,k,z,r,Z,e,A){this.Zr.g5(l,y,k,z,r,Z,e,A)}L7(){NI(this.Zr.l5)}G8(l){this.Zr.G8(l)}lI(l,y){this.Zr.lI(l,y)}removeCueRange(l){this.Zr.removeCueRange(l)}ZI(l){this.Zr.ZI(l)}Ur(l){return this.Zr.Yw.Ur(l)}yb(l){this.Zr.yb(l)}Uo(l,
y,k){this.Zr.Uo(l,y,k)}Du(){this.Zr.Du()}gG(){this.Zr.Yw.reset()}ZO(){this.Zr.ZO()}RV(l,y,k){this.Zr.RV(l,y,k)}seekTo(l,y){this.Zr.seekTo(l,y)}sendAbandonmentPing(){this.Zr.sendAbandonmentPing()}sendVideoStatsEngageEvent(l,y){this.Zr.sendVideoStatsEngageEvent(l,y)}m4(l,y,k){this.Zr.m4(l,y,k)}setLoop(l){this.Zr.setLoop(l)}pM(){this.Zr.pM()}setMediaElement(l){this.Zr.setMediaElement(l)}V_(l,y,k,z){this.Zr.V_(l,y,k,z)}setPlaybackRate(l){this.Zr.setPlaybackRate(l)}jI(l,y,k,z,r,Z){this.Zr.jI(l,y,k,z,r,
Z)}yr(l,y){this.Zr.yr(l,y)}ud(l){this.Zr.ud(l)}setProximaLatencyPreference(l){this.Zr.setProximaLatencyPreference(l)}FP(l,y,k){this.Zr.FP(l,y,k)}ED(l){this.Zr.ED(l)}pn(){this.Zr.pn()}UK(l){this.Zr.UK(l)}setUserAudio51Preference(l,y){this.Zr.setUserAudio51Preference(l,y)}DR(l,y,k){this.Zr.DR(l,y,k)}Ly(){return this.Zr.Ly()}gw(){this.Zr.gw()}Pz(){return this.Zr.Pz()}KD(l){this.Zr.KD(l)}PT(){this.Zr.PT()}In(l){this.Zr.In(l)}stopVideo(){this.Zr.stopVideo()}subscribe(l,y,k){return this.Zr.subscribe(l,
y,k)}IZ(l,y){this.Zr.IZ(l,y)}togglePictureInPicture(){this.Zr.togglePictureInPicture()}OD(l){return this.Zr.Yw.OD(l)}Be(l){this.Zr.Yw.Be(l)}unsubscribe(l,y,k){return this.Zr.unsubscribe(l,y,k)}zN(l,y){this.Zr.zN(l,y)}LR(l,y){return this.Zr.LR(l,y)}D0(){this.Zr.D0()}tQ(l){this.Zr.tQ(l)}x8(){this.Zr.x8()}};g.b=g.U6.prototype;g.b.nJ=yz(51);g.b.pB=yz(39);g.b.dT=yz(34);g.b.Rp=yz(28);g.b.Zh=yz(22);g.b.Qb=yz(14);var R8C=class{constructor(){this.licenseRequest=this.mediaKeys=this.Z=this.certificate=null;this.C=!1}dispose(){this.certificate=null;this.Z?.dispose();this.licenseRequest=this.Z=null;this.mediaKeys?.dispose();this.mediaKeys=null;this.C=!0}IR(){return this.C}};var sD=class extends g.kD{constructor(l,y,k,z=!1){super(y);this.L=l;this.HG=z;this.J=new g.cI(this);this.fade=new g.oT(this,k,!0,void 0,void 0,()=>{this.D()});
g.x(this,this.J);g.x(this,this.fade)}show(){const l=this.aH();super.show();this.HG&&(this.J.j(window,"blur",this.Xv),this.J.j(jS(this),"click",this.Ja));l||this.publish("show",!0)}hide(){const l=this.aH();super.hide();LqC(this);l&&this.publish("show",!1)}Bn(l,y){this.sourceElement=l;this.fade.show();y?(this.S||(this.S=this.J.j(this.L,"appresize",this.A)),this.A()):this.S&&(this.J.uq(this.S),this.S=void 0)}D(){this.sourceElement&&this.element&&(this.sourceElement.getAttribute("aria-haspopup"),this.sourceElement.setAttribute("aria-expanded",
"true"),this.focus())}A(){const l=g.Ci(this.L);this.sourceElement&&l.O_(this.element,this.sourceElement)}Xv(){const l=this.aH();LqC(this);this.fade.hide();l&&this.publish("show",!1)}Ja(l){const y=kF(l);y&&(g.cf(this.element,y)||this.sourceElement&&g.cf(this.sourceElement,y)||!g.ne(l))||this.Xv()}aH(){return this.VM&&this.fade.state!==4}};var DDe=class extends sD{constructor(l,y,k,z){z=new g.H({U:"div",L_:["ytp-linked-account-popup-button"],Nd:z,G:{role:"button",tabindex:"0"}});y=new g.H({U:"div",B:"ytp-linked-account-popup",G:{role:"dialog","aria-modal":"true",tabindex:"-1"},W:[{U:"div",B:"ytp-linked-account-popup-title",Nd:y},{U:"div",B:"ytp-linked-account-popup-description",Nd:k},{U:"div",B:"ytp-linked-account-popup-buttons",W:[z]}]});super(l,{U:"div",B:"ytp-linked-account-popup-container",W:[y]},100);this.dialog=y;g.x(this,this.dialog);
z.listen("click",()=>{this.Xv()});
g.x(this,z);g.pi(this.L,this.element,4);this.hide()}Bn(){super.Bn();this.dialog.focus()}};g.ZE=class extends g.kD{constructor(l,y,k,z){super(l);this.priority=y;k&&g.F5(this,k);z&&this.setContent(z)}setIcon(l){this.updateValue("icon",l)}updateValue(l,y){super.updateValue(l,y);this.publish("size-change")}};g.Gl={sE:18,k5:17,Gs:16,XGe:15,eJr:14,oI:13,K3:12,SL:11,md:10,vp:9,AUDIO:8,SUBTITLES:7,SLEEP_TIMER:6,OM:5,ac:4,PN:3,Bf:2,REMOTE:1,N6:0,18:"LOOP",17:"STABLE_VOLUME",16:"VOICE_BOOST",15:"REMOTE_SELECT",14:"SIZE",13:"MINIPLAYER",12:"THREED",11:"AUTONAV",10:"CINEMATIC",9:"ANNOTATIONS",8:"AUDIO",7:"SUBTITLES",6:"SLEEP_TIMER",5:"SPEED",4:"AUDIO_SETTINGS",3:"QUALITY",2:"LINKEDACCOUNT",1:"REMOTE",0:"CONTEXTMENU"};var lk4=class extends g.ZE{constructor(l){super(g.ni({"aria-haspopup":"true"},["ytp-linked-account-menuitem"]),2);this.L=l;this.C=this.Z=!1;this.eN=l.Kf();l.createServerVe(this.element,this,!0);this.j(this.L,"settingsMenuVisibilityChanged",y=>{this.Cl(y)});
this.j(this.L,"videodatachange",this.V);this.listen("click",this.onClick);this.V()}Cl(l){this.C&&this.L.logVisibility(this.element,this.Z&&l)}V(){var l=this.L.getVideoData()?.accountLinkingConfig?.linked;l&&!this.Z?(l=this.L.getVideoData()?.accountLinkingConfig,this.setIcon(aw()),g.F5(this,oo(l?.menuData?.connectedMenuLabel)),this.N=new DDe(this.L,oo(l?.menuData?.connectedDialogTitle),oo(l?.menuData?.connectedDialogMessage),oo(l?.menuData?.confirmButtonText)),g.x(this,this.N),l=l?.menuData?.trackingParams||
null,(this.C=!!l)&&this.L.setTrackingParams(this.element,l),this.eN.tv(this),this.Z=!0):!l&&this.Z&&(this.eN.Lg(this),this.Z=!1)}onClick(){this.C&&this.L.logClick(this.element);this.eN.Xv();this.N&&this.N.Bn()}};var az=class extends g.zP{constructor(l){super();this.api=l}X(l){return this.api.X(l)}};var ye5=class extends az{constructor(l){super(l);B(l,"setAccountLinkState",y=>{this.setAccountLinkState(y)});
B(l,"updateAccountLinkingConfig",y=>{this.updateAccountLinkingConfig(y)});
l.addEventListener("videodatachange",(y,k)=>{this.onVideoDataChange(k)});
l.addEventListener("settingsMenuInitialized",()=>{this.menuItem=new lk4(this.api);g.x(this,this.menuItem)})}onVideoDataChange(l){if(!l.accountLinkingConfig){var y=l.getPlayerResponse()?.accountLinkingConfig;
l.accountLinkingConfig=y}if(y=l.accountLinkingConfig?.alsParam)l.JI=y}setAccountLinkState(l){this.api.getVideoData().JI=l;this.api.wF()}updateAccountLinkingConfig(l){const y=this.api.getVideoData(),k=y.accountLinkingConfig;k&&(k.linked=l);this.api.publish("videodatachange","dataupdated",y,this.api.getPresentingPlayerType())}};var kbC=class extends az{constructor(l){super(l);this.Z=null;this.events=new g.cI(l);g.x(this,this.events);this.events.j(l,"applicationvideodatachange",()=>{this.Xa()})}Xa(){const l=this.api.getPlaybackRate();
var y=this.api.getVideoData();if(y){var k=y.adFormat==="17_8";var z=y.DH?.C()===8;k=y.isAd()&&(k||z)}else k=!1;k||((y=this.api.getVideoData())?(k=y.adFormat==="15_6",z=y.DH?.C()===7,k=y.isAd()&&(k||z)):k=!1);k?(l!==1&&(this.Z=l),this.api.setPlaybackRate(1)):this.Z!==null&&(this.api.setPlaybackRate(this.Z),this.Z=null)}};var zeQ=class{constructor(l){this.api=l;this.Z={}}};var reP=class extends az{constructor(l){super(l);this.events=new g.cI(this);g.x(this,this.events);this.Z=new zeQ(this.api);this.events.j(this.api,"legacyadtrackingpingreset",()=>{this.Z.Z={}});
this.events.j(this.api,"legacyadtrackingpingchange",y=>{var k=this.Z;sB(k,"part2viewed",1,0x8000000000000);sB(k,"engagedview",Math.max(1,y.CB*1E3),0x8000000000000);if(!y.isLivePlayback){var z=y.lengthSeconds*1E3;jn(y)&&k.api.X("html5_shorts_gapless_ads_duration_fix")&&(z=k.api.getProgressState().seekableEnd*1E3-y.Bc);sB(k,"videoplaytime25",z*.25,z);sB(k,"videoplaytime50",z*.5,z);sB(k,"videoplaytime75",z*.75,z);sB(k,"videoplaytime100",z,0x8000000000000);sB(k,"conversionview",z,0x8000000000000);sB(k,
"videoplaybackstart",1,z);sB(k,"videoplayback2s",2E3,z);sB(k,"videoplayback10s",1E4,z)}});
this.events.j(this.api,g.uR("appad"),this.C);this.events.j(this.api,g.xR("appad"),this.C)}C(l){var y=l.getId();const k=this.api.getVideoData({playerType:1}),z=!this.api.isInline();if(!k.inlineMetricEnabled||z){if(y==="part2viewed"){if(k.Uz&&g.Eb(k.Uz),k.KR&&Li(this,k.KR),k.B0){var r={CPN:this.api.getVideoData().clientPlaybackNonce};for(var Z of k.B0)Li(this,g.TB(Z,r))}}else y==="engagedview"&&k.yS&&(r={CPN:this.api.getVideoData().clientPlaybackNonce},g.Eb(g.TB(k.yS,r)));k.LQ&&(r=k.LQ,Z=l.getId(),
r=cq(r,{label:Z}),g.Eb(r));switch(y){case "videoplaytime25":k.pQ&&Li(this,k.pQ);k.Xy&&vl(this,k.Xy);k.Iv&&g.Eb(k.Iv);break;case "videoplaytime50":k.Rv&&Li(this,k.Rv);k.EF&&vl(this,k.EF);k.S$&&g.Eb(k.S$);break;case "videoplaytime75":k.vc&&Li(this,k.vc);k.gI&&vl(this,k.gI);k.nQ&&g.Eb(k.nQ);break;case "videoplaytime100":k.Hc&&Li(this,k.Hc),k.n$&&vl(this,k.n$),k.Pc&&g.Eb(k.Pc)}(r=this.api.getVideoData().bI)&&DxP(this,r,l.getId())&&DxP(this,r,`${l.getId()}gaia`)}if(k.inlineMetricEnabled&&!z)switch(y){case "videoplaybackstart":(y=
k.CJ?.Z)&&Li(this,y);break;case "videoplayback2s":(y=k.CJ?.N)&&Li(this,y);break;case "videoplayback10s":(y=k.CJ?.C)&&Li(this,y)}this.api.t6([l],1)}};var ZhC=class extends az{constructor(l){super(l);this.events=new g.cI(l);g.x(this,this.events);this.events.j(l,"videoready",y=>{l.getPresentingPlayerType()===1&&(y={playerDebugData:{pmlSignal:!!y.getPlayerResponse()?.adPlacements?.some(k=>k?.adPlacementRenderer?.renderer),
contentCpn:y.clientPlaybackNonce}},g.wv("adsClientStateChange",y))})}};var eeC=class extends az{constructor(l){super(l);this.accumulatedWatchTimeMillis=0;this.Ol=this.Z=null;this.events=new g.cI(l);g.x(this,this.events);B(this.api,"getAccumulatedWatchTime",()=>this.getAccumulatedWatchTime());
this.events.j(l,"progresssync",()=>{var y=this.api.getVideoData();if(y&&(y=y.clientPlaybackNonce)){this.Ol!==y&&(this.accumulatedWatchTimeMillis=0,this.Z=null,this.Ol=y);var k=this.api.getPlayerStateObject();y=Math.round((this.api.getCurrentTime()||0)*1E3);k.Z(8)&&this.Z!==null&&(k=y-this.Z,k>0&&k<1E3&&(this.accumulatedWatchTimeMillis+=k));this.Z=y}})}getAccumulatedWatchTime(){return this.Ol?{cpn:this.Ol,
accumulatedWatchTimeMillis:this.accumulatedWatchTimeMillis}:null}};var iz=class extends g.ZE{constructor(l,y){super(g.ni({role:"menuitemcheckbox","aria-checked":"false"}),y,l,{U:"div",B:"ytp-menuitem-toggle-checkbox"});this.checked=!1;this.enabled=!0;this.listen("click",this.onClick)}onClick(){this.enabled&&(this.Z(!this.checked),this.publish("select",this.checked))}getValue(){return this.checked}Z(l){this.checked=l;this.element.setAttribute("aria-checked",String(this.checked))}setEnabled(l){(this.enabled=l)?this.element.removeAttribute("aria-disabled"):this.element.setAttribute("aria-disabled",
"true")}};var AeC={vW:2,Gs:1,k5:0,2:"AUDIO_TRACK",1:"VOICE_BOOST",0:"STABLE_VOLUME"};var Ro=["en-CA","en","es-MX","fr-CA"];var $aq=class extends iz{constructor(l,y){super(l.X("web_fix_annotations")?"L\u1edbp ph\u1ee7 c\u00f3 ch\u00fa th\u00edch":"Ch\u00fa th\u00edch",g.Gl.vp);this.L=l;this.eN=y;this.C=!1;l.X("web_settings_menu_icons")&&(y=l.X("delhi_modern_web_player_icons")?{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M9.65 6.00L9.5 6H2.5L2.34 6.00C1.97 6.04 1.63 6.21 1.38 6.49C1.13 6.77 1.00 7.12 1 7.5V13.5L1.00 13.65C1.04 14.02 1.21 14.36 1.49 14.61C1.77 14.86 2.12 15 2.5 15H4.5L3.81 17.75C3.77 17.89 3.77 18.03 3.79 18.17C3.82 18.31 3.87 18.45 3.95 18.56C4.03 18.68 4.14 18.78 4.26 18.85C4.38 18.92 4.51 18.97 4.66 18.99L4.78 19H8.55L8.72 18.98C8.88 18.95 9.04 18.89 9.17 18.79C9.30 18.68 9.40 18.55 9.47 18.40L9.52 18.24L10.62 13.96C10.84 13.11 10.96 12.24 10.99 11.36L11 10.98V7.5C11 7.12 10.86 6.77 10.61 6.49C10.36 6.21 10.02 6.04 9.65 6.00ZM21.65 6.00L21.5 6H14.5L14.34 6.00C13.97 6.04 13.63 6.21 13.38 6.49C13.13 6.77 13 7.12 13 7.5V13.5L13.00 13.65C13.04 14.02 13.21 14.36 13.49 14.61C13.77 14.86 14.12 15 14.5 15H16.5L15.81 17.75C15.77 17.89 15.77 18.03 15.79 18.17C15.82 18.31 15.87 18.44 15.95 18.56C16.03 18.68 16.14 18.78 16.26 18.85C16.38 18.92 16.51 18.97 16.66 18.99L16.78 19H20.55L20.72 18.98C20.88 18.95 21.04 18.89 21.17 18.79C21.30 18.68 21.40 18.55 21.47 18.40L21.52 18.24L22.62 13.96C22.84 13.11 22.96 12.24 22.99 11.36L23 10.98V7.5C23 7.12 22.86 6.77 22.61 6.49C22.36 6.21 22.02 6.04 21.65 6.00ZM3 13V8H9V10.98C9.00 11.71 8.91 12.44 8.76 13.16L8.68 13.47L7.78 17H6.06L6.44 15.48L7.06 13H3ZM15 13V8H21V10.98C21 11.71 20.91 12.44 20.76 13.16L20.68 13.47L19.78 17H18.06L18.44 15.48L19.06 13H15Z",
fill:"white"}}]}:{U:"svg",G:{height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M17.5,7c1.93,0,3.5,1.57,3.5,3.5c0,1-0.53,4.5-0.85,6.5h-2.02l0.24-1.89l0.14-1.09l-1.1-0.03C15.5,13.94,14,12.4,14,10.5 C14,8.57,15.57,7,17.5,7             M6.5,7C8.43,7,10,8.57,10,10.5c0,1-0.53,4.5-0.85,6.5H7.13l0.24-1.89l0.14-1.09l-1.1-0.03 C4.5,13.94,3,12.4,3,10.5C3,8.57,4.57,7,6.5,7             M17.5,6C15.01,6,13,8.01,13,10.5c0,2.44,1.95,4.42,4.38,4.49L17,18h4c0,0,1-6,1-7.5 C22,8.01,19.99,6,17.5,6L17.5,6z             M6.5,6C4.01,6,2,8.01,2,10.5c0,2.44,1.95,4.42,4.38,4.49L6,18h4c0,0,1-6,1-7.5 C11,8.01,8.99,6,6.5,6L6.5,6z",
fill:"white"}}]},this.setIcon(y));this.j(l,"videodatachange",this.Aa);this.j(l,"onApiChange",this.Aa);this.subscribe("select",this.onSelect,this);this.Aa()}isLoaded(){const l=g.ol(this.L.r4());return l!==void 0&&l.loaded}Aa(){!this.L.X("web_fix_annotations")&&g.ol(this.L.r4())===void 0||this.L.getPresentingPlayerType()===3?this.C&&(this.eN.Lg(this),this.C=!1):this.C||(this.eN.tv(this),this.C=!0);this.L.X("web_fix_annotations")?this.Z(this.L.X("web_fix_annotations")&&!!this.L.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.isAnnotationsEnabled):
this.Z(this.isLoaded())}onSelect(l){this.L.X("web_fix_annotations")||this.isLoaded();l?this.L.loadModule("annotations_module"):this.L.unloadModule("annotations_module");this.L.publish("annotationvisibility",l)}Vj(){this.C&&this.eN.Lg(this);super.Vj()}};var QJT=class extends az{constructor(l){super(l);this.events=new g.cI(l);g.x(this,this.events);l.addEventListener("settingsMenuInitialized",()=>{const y=new $aq(this.api,this.api.Kf());g.x(this,y)})}};var tCy={[0]:l=>tLQ(l,y=>y.a7?.id),
[2]:l=>ZV(l,y1),
[3]:l=>ZV(l,k_),
[4]:l=>ZV(l,rW),
[1]:l=>ZV(l,zu)},OiQ=class{constructor(l){this.Z={};
this.N={};this.d4={FmK:()=>this.Z};
this.videoData=l;const y=l.N?.N;y&&y.length>0?this.C=y:(l=l.getAvailableAudioTracks(),this.C=l.length>0?ZMz(l):[]);for(const k of UR)this.Z[k]=tCy[k](this.C);this.Zl()}O2(l){return this.N[l]}Zl(){let l=this.C;const y={};for(const k of UR)if(this.Z[k]){l=MF[k].Vp(l,this.videoData);for(const z of UR)y[z]!==void 0||Be(l,MF[z].fh)||(y[z]=MF[k].ZD);y[k]===void 0&&(y[k]=0)}else y[k]=1;this.N=y}},UR=[0,1,2,3,4],MF={[0]:{ZD:2,fh:Qi4,Vp:z3C},[2]:{ZD:4,fh:y1,Vp:rNQ},[3]:{ZD:5,fh:k_,Vp:e3q},[1]:{ZD:3,fh:zu,
Vp:ANC},[4]:{ZD:6,fh:rW,Vp:$HC}};var Ohq=class extends az{constructor(l){super(l);this.events=new g.cI(l);g.x(this,this.events);const y=this.api.X("html5_enable_audio_quality_setting_feature");B(this.api,"getUserAudioQualitySetting",()=>y?this.getUserAudioQualitySetting():2);
B(this.api,"setUserAudioQualitySetting",k=>{y&&this.setUserAudioQualitySetting(k)});
B(this.api,"hasHqaAudioTrack",()=>y?this.hasHqaAudioTrack():!1);
B(this.api,"getAudioQualitySettingState",()=>y?this.api.O2(4):1);
this.HB=D9T();this.updateEnvironmentData()}getUserAudioQualitySetting(){return this.HB}setUserAudioQualitySetting(l){this.api.Md("aqs_set",{setting:l});g.eY("yt-player-audio-quality-setting",l,3122064E3);l!==this.HB&&(this.HB=l,this.updateEnvironmentData(),this.hasHqaAudioTrack()&&this.api.x8(),this.api.Zl())}hasHqaAudioTrack(){const l=this.api.getVideoData()?.N?.C;return l?Be(l,y=>rW(y)):!1}updateEnvironmentData(){this.api.O().HB=this.HB}};var daC=class extends az{constructor(l){super(l);B(this.api,"getAudioTrackState",()=>this.api.O2(0))}};var wg_=class extends g.H{constructor(l){super({U:"button",L_:["ytp-button","ytp-autonav-toggle"],G:{title:l.X("player_tooltip_data_title_killswitch")?"{{title}}":"","data-tooltip-title":"{{data-tooltip-title}}","aria-label":"{{label}}","data-priority":"3","data-tooltip-target-id":"ytp-autonav-toggle-button"},W:[{U:"div",B:"ytp-autonav-toggle-button-container",W:[{U:"div",B:"ytp-autonav-toggle-button",G:{"aria-checked":"true"}}]}]});this.L=l;this.N=[];this.Z=!1;this.isChecked=!0;l.createClientVe(this.element,
this,113681);this.j(l,"presentingplayerstatechange",this.C);this.listen("click",this.onClick);this.N.push(this.j(this.L,"videodatachange",this.C));this.N.push(this.j(this.L,"videoplayerreset",this.C));this.N.push(this.j(this.L,"onPlaylistUpdate",this.C));this.N.push(this.j(this.L,"autonavchange",this.V));l.X("delhi_fast_follow_autonav_toggle")&&this.element.classList.add("delhi-fast-follow-autonav-toggle");q1(l,this.element,this);this.C()}C(){var l;if(l=this.L.getPresentingPlayerType()!==3&&g.Ki(this.L)&&
this.L.Yz().getPlayerSize().width>=400)l=this.hs(),l=this.L.O().X("client_respect_autoplay_switch_button_renderer")?!!l.autoplaySwitchButtonRenderer:!!l.getWatchNextResponse()?.contents?.twoColumnWatchNextResults?.autoplay?.autoplay!==!1;l?this.Z||(this.Z=!0,this.fP(this.Z),l=this.hs(),this.V(l.autonavState),this.L.logVisibility(this.element,this.Z)):(this.Z=!1,this.fP(this.Z))}V(l){OMz(this)?this.isChecked=l!==1:((l=l!==1)||(l=g.wz(),l=g.EJ("web_autonav_allow_off_by_default")&&!l.G7(141)&&g.Y("AUTONAV_OFF_BY_DEFAULT")?
!1:!l.G7(140)),this.isChecked=l);dHz(this)}onClick(){this.isChecked=!this.isChecked;this.L.Dn(this.isChecked?2:1);dHz(this);if(OMz(this)){const l=this.hs().autoplaySwitchButtonRenderer;this.isChecked&&l?.onEnabledCommand?g.G3(this.L,"innertubeCommand",l.onEnabledCommand):!this.isChecked&&l?.onDisabledCommand&&g.G3(this.L,"innertubeCommand",l.onDisabledCommand)}this.L.logClick(this.element)}getValue(){return this.isChecked}hs(){return this.L.getVideoData({playerType:1})}};var heC=class extends az{constructor(l){super(l);this.events=new g.cI(l);g.x(this,this.events);this.events.j(l,"standardControlsInitialized",()=>{const y=new wg_(l);g.x(this,y);l.cL(y,"RIGHT_CONTROLS_LEFT")})}};var wKz=class extends iz{constructor(l){super(l.X("web_player_use_cinematic_label_2")?"Ch\u1ebf \u0111\u1ed9 m\u00f4i tr\u01b0\u1eddng xung quanh":"\u00c1nh s\u00e1ng \u0111i\u1ec7n \u1ea3nh",g.Gl.md);this.L=l;this.C=!1;this.N=new g.B_(()=>{g.ZM(this.element,"ytp-menuitem-highlighted")},0);
this.eN=l.Kf();l=l.X("delhi_modern_web_player_icons")?{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M12 .5C11.73 .5 11.48 .60 11.29 .79C11.10 .98 11 1.23 11 1.5V3.5C11 3.76 11.10 4.01 11.29 4.20C11.48 4.39 11.73 4.5 12 4.5C12.26 4.5 12.51 4.39 12.70 4.20C12.89 4.01 13 3.76 13 3.5V1.5C13 1.23 12.89 .98 12.70 .79C12.51 .60 12.26 .5 12 .5ZM3.79 1.29C3.61 1.46 3.51 1.70 3.50 1.94C3.48 2.19 3.56 2.43 3.72 2.63L3.79 2.70L5.29 4.20L5.37 4.27C5.56 4.42 5.80 4.50 6.04 4.49C6.29 4.47 6.52 4.37 6.70 4.20C6.87 4.02 6.97 3.79 6.99 3.54C7.00 3.30 6.92 3.06 6.77 2.86L6.70 2.79L5.20 1.29L5.13 1.22C4.93 1.06 4.69 .98 4.44 1.00C4.20 1.01 3.96 1.11 3.79 1.29ZM18.86 1.22L18.79 1.29L17.29 2.79L17.22 2.86C17.07 3.06 16.99 3.30 17.00 3.54C17.01 3.79 17.12 4.02 17.29 4.20C17.47 4.37 17.70 4.48 17.95 4.49C18.19 4.50 18.43 4.42 18.63 4.27L18.70 4.20L20.20 2.70L20.27 2.63C20.42 2.43 20.50 2.19 20.49 1.95C20.48 1.70 20.37 1.47 20.20 1.29C20.02 1.12 19.79 1.01 19.54 1.00C19.30 .99 19.06 1.07 18.86 1.22ZM19.20 6.01L19 6H5L4.79 6.01C4.30 6.06 3.84 6.29 3.51 6.65C3.18 7.02 2.99 7.50 3 8V16L3.01 16.20C3.05 16.66 3.26 17.08 3.58 17.41C3.91 17.73 4.33 17.94 4.79 17.99L5 18H19L19.20 17.98C19.66 17.94 20.08 17.73 20.41 17.41C20.73 17.08 20.94 16.66 20.99 16.20L21 16V8C20.99 7.50 20.81 7.02 20.48 6.66C20.15 6.29 19.69 6.06 19.20 6.01ZM5 16V8H19V16H5ZM17.29 19.79C17.11 19.96 17.01 20.20 17.00 20.44C16.98 20.69 17.06 20.93 17.22 21.13L17.29 21.20L18.79 22.70L18.86 22.77C19.06 22.92 19.30 23.00 19.54 22.99C19.79 22.98 20.02 22.87 20.20 22.70C20.37 22.52 20.48 22.29 20.49 22.04C20.50 21.80 20.42 21.56 20.27 21.36L20.20 21.29L18.70 19.79L18.63 19.72C18.43 19.56 18.19 19.48 17.94 19.50C17.70 19.51 17.46 19.61 17.29 19.79ZM5.37 19.72L5.29 19.79L3.79 21.29L3.72 21.36C3.57 21.56 3.49 21.80 3.50 22.04C3.51 22.29 3.62 22.52 3.79 22.70C3.97 22.87 4.20 22.98 4.45 22.99C4.69 23.00 4.93 22.92 5.13 22.77L5.20 22.70L6.70 21.20L6.77 21.13C6.92 20.93 7.00 20.69 6.99 20.45C6.97 20.20 6.87 19.97 6.70 19.79C6.52 19.62 6.29 19.52 6.04 19.50C5.80 19.49 5.56 19.57 5.37 19.72ZM12 19.5C11.73 19.5 11.48 19.60 11.29 19.79C11.10 19.98 11 20.23 11 20.5V22.5C11 22.76 11.10 23.01 11.29 23.20C11.48 23.39 11.73 23.5 12 23.5C12.26 23.5 12.51 23.39 12.70 23.20C12.89 23.01 13 22.76 13 22.5V20.5C13 20.23 12.89 19.98 12.70 19.79C12.51 19.60 12.26 19.5 12 19.5Z",
fill:"white"}}]}:{U:"svg",G:{height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M21 7v10H3V7h18m1-1H2v12h20V6zM11.5 2v3h1V2h-1zm1 17h-1v3h1v-3zM3.79 3 6 5.21l.71-.71L4.5 2.29 3.79 3zm2.92 16.5L6 18.79 3.79 21l.71.71 2.21-2.21zM19.5 2.29 17.29 4.5l.71.71L20.21 3l-.71-.71zm0 19.42.71-.71L18 18.79l-.71.71 2.21 2.21z",fill:"white"}}]};this.setIcon(l);this.subscribe("select",this.V,this);this.listen(N_,this.J);g.x(this,this.N)}Aa(l){l?this.C||(this.eN.tv(this),this.C=!0):this.C&&(this.eN.Lg(this),
this.C=!1);this.C&&this.Z(JWt())}J(){g.ZM(this.element,"ytp-menuitem-highlight-transition-enabled")}V(l){var y=JWt();l!==y&&(y=g.wz(),GT(190,l),GT(192,!0),y.save(),g.G3(this.L,"cinematicSettingsToggleChange",l))}Vj(){this.C&&this.eN.Lg(this);super.Vj()}};var Gb5=class extends az{constructor(l){super(l);this.Z=!1;l.addEventListener("settingsMenuInitialized",()=>{h3z(this)});
l.addEventListener("highlightSettingsMenu",y=>{h3z(this);var k=this.menuItem;y==="menu_item_cinematic_lighting"&&(g.zi(k.element,"ytp-menuitem-highlighted"),g.zi(k.element,"ytp-menuitem-highlight-transition-enabled"),k.N.start())});
B(l,"updateCinematicSettings",y=>{this.updateCinematicSettings(y)})}updateCinematicSettings(l){this.Z=l;
this.menuItem?.Aa(l);this.api.publish("onCinematicSettingsVisibilityChange",l)}};var akq=class extends az{constructor(l){super(l);this.events=new g.cI(l);g.x(this,this.events);this.events.j(l,"applicationvideodatachange",(y,k)=>{k=k.clipConfig;y==="dataloaded"&&k&&k.startTimeMs!=null&&k.endTimeMs!=null&&this.api.setLoopRange({startTimeMs:Math.floor(Number(k.startTimeMs)),endTimeMs:Math.floor(Number(k.endTimeMs)),postId:k.postId,type:"clips"})})}};var ihC=class extends az{constructor(l){super(l);this.events=new g.cI(l);g.x(this,this.events);B(l,"setCreatorEndscreenVisibility",this.setCreatorEndscreenVisibility.bind(this));B(l,"setCreatorEndscreenHideButton",this.Z.bind(this));this.X("web_fix_annotations")&&this.events.j(l,"annotationvisibility",y=>{this.setCreatorEndscreenVisibility(!y);this.hideButton&&g.A2(this.hideButton,y)})}setCreatorEndscreenVisibility(l){NL(this.api.r4())?.fP(l)}Z(l){this.hideButton=l;
l=y=>{y==="creatorendscreen"&&(y=NL(this.api.r4()))&&y.Cz(this.hideButton)};
this.events.j(this.api,"modulecreated",l);l("creatorendscreen")}};var Uay=class extends az{constructor(l){super(l);this.events=new g.cI(l);g.x(this,this.events);this.events.j(l,"videodatachange",()=>{var y=this.api.getRootNode(),k=this.api.O();g.zi(y,"ytp-delhi-modern");k.X("delhi_modern_web_player_icons")&&g.zi(y,"ytp-delhi-modern-icons");k.X("delhi_modern_web_player_horizontal_volume_controls")&&g.zi(y,"ytp-delhi-horizontal-volume-controls");k.X("delhi_modern_web_player_compact_controls")&&g.zi(y,"ytp-delhi-modern-compact-controls");k.X("delhi_modern_web_player_big_mode_consistent_pill_height")&&
g.zi(y,"ytp-big-mode-consistent-pill-height");switch($f(k.experiments,"delhi_modern_web_player_blending_mode")){case "luminosity":g.zi(y,"ytp-delhi-modern-with-luminosity");break;case "difference":g.zi(y,"ytp-delhi-modern-with-difference");break;case "exclusion":g.zi(y,"ytp-delhi-modern-with-exclusion")}y=this.api.isHdr()||this.api.X("delhi_modern_web_player_disable_frosted_glass");k=g.i_(this.api.O().experiments,"web_player_frosted_glass_blur_radius_float",16);y=y?"none":`blur(${k}px)`;this.api.getRootNode().style.setProperty("--yt-frosted-glass-backdrop-filter-override",
y);GHC(this)});
this.events.j(l,"resize",()=>{GHC(this)})}};var MC5=class extends iz{constructor(l,y,k,z,r){const Z=l.X("html5_enable_new_audio_settings_menu");super("\u00c2m l\u01b0\u1ee3ng \u1ed5n \u0111\u1ecbnh",Z?AeC.k5:g.Gl.k5);this.L=l;this.J=y;this.N=k;this.hasDrcAudioTrack=z;this.getDrcState=r;this.V=this.enableNewAudioSettingsMenu=this.C=!1;g.zi(this.element,"ytp-drc-menu-item");this.eN=(this.enableNewAudioSettingsMenu=Z)?l.Kf().Wc:l.Kf();l.X("html5_enable_voice_boost")?(this.V=!0,this.j(l,"onFilterAudioFeatures",this.xK)):l.addEventListener("videodatachange",
this.xK.bind(this));l.X("mta_drc_mutual_exclusion_removal")&&this.j(l,"onPlaybackAudioChange",this.xK);l.createClientVe(this.element,this,273317);this.listen("click",this.K);y=this.N()===1&&this.hasDrcAudioTrack();this.enableNewAudioSettingsMenu||(l=l.X("delhi_modern_web_player_icons")?{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M12 .99C5.92 .99 1 5.92 1 11.99C1 18.07 5.92 22.99 12 22.99C18.07 22.99 23 18.07 23 11.99C23 5.92 18.07 .99 12 .99ZM12 2.99C14.38 2.99 16.67 3.94 18.36 5.63C20.05 7.32 21 9.61 21 11.99C21 14.38 20.05 16.67 18.36 18.36C16.67 20.05 14.38 20.99 12 20.99C9.61 20.99 7.32 20.05 5.63 18.36C3.94 16.67 3 14.38 3 11.99C3 9.61 3.94 7.32 5.63 5.63C7.32 3.94 9.61 2.99 12 2.99ZM14 6.00C13.73 6.00 13.48 6.10 13.29 6.29C13.10 6.48 13 6.73 13 7.00V17.00C13 17.26 13.10 17.52 13.29 17.70C13.48 17.89 13.73 18.00 14 18.00C14.26 18.00 14.51 17.89 14.70 17.70C14.89 17.52 15 17.26 15 17.00V7.00C15 6.73 14.89 6.48 14.70 6.29C14.51 6.10 14.26 6.00 14 6.00ZM10 8.00C9.73 8.00 9.48 8.10 9.29 8.29C9.10 8.48 9 8.73 9 9.00V15.00C9 15.26 9.10 15.52 9.29 15.70C9.48 15.89 9.73 16.00 10 16.00C10.26 16.00 10.51 15.89 10.70 15.70C10.89 15.52 11 15.26 11 15.00V9.00C11 8.73 10.89 8.48 10.70 8.29C10.51 8.10 10.26 8.00 10 8.00ZM18 9.00C17.73 9.00 17.48 9.10 17.29 9.29C17.10 9.48 17 9.73 17 10.00V14.00C17 14.26 17.10 14.52 17.29 14.70C17.48 14.89 17.73 15.00 18 15.00C18.26 15.00 18.51 14.89 18.70 14.70C18.89 14.52 19 14.26 19 14.00V10.00C19 9.73 18.89 9.48 18.70 9.29C18.51 9.10 18.26 9.00 18 9.00ZM6 10.00C5.73 10.00 5.48 10.10 5.29 10.29C5.10 10.48 5 10.73 5 11.00V13.00C5 13.26 5.10 13.52 5.29 13.70C5.48 13.89 5.73 14.00 6 14.00C6.26 14.00 6.51 13.89 6.70 13.70C6.89 13.52 7 13.26 7 13.00V11.00C7 10.73 6.89 10.48 6.70 10.29C6.51 10.10 6.26 10.00 6 10.00Z",
fill:"white"}}]}:{U:"svg",G:{height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M7 13H5v-2h2v2zm3-4H8v6h2V9zm3-3h-2v12h2V6zm3 2h-2v8h2V8zm3 2h-2v4h2v-4zm-7-7c-4.96 0-9 4.04-9 9s4.04 9 9 9 9-4.04 9-9-4.04-9-9-9m0-1c5.52 0 10 4.48 10 10s-4.48 10-10 10S2 17.52 2 12 6.48 2 12 2z",fill:"white"}}]},this.setIcon(l));this.subscribe("select",this.S,this);this.enableNewAudioSettingsMenu||this.V?this.xK():(this.setEnabled(this.hasDrcAudioTrack()),this.Z(y),this.eN.tv(this))}S(l){this.J(l?1:0)}xK(){if(this.enableNewAudioSettingsMenu||
this.V){var l=this.L.getPresentingPlayerType();l===2||l===3?this.C&&(this.C=!1,this.eN.Lg(this)):(l=this.getDrcState(),l!==1?(l===0?(this.Z(this.N()===1),this.setEnabled(!0)):(this.Z(!1),this.setEnabled(!1)),this.C||(this.eN.tv(this),this.C=!0)):this.C&&(this.eN.Lg(this),this.C=!1))}else{l=this.hasDrcAudioTrack();const y=this.N()===1&&l;this.Z(y);this.setEnabled(l)}}Vj(){this.eN.Lg(this);super.Vj()}K(){this.L.logClick(this.element)}};var Xgy=class extends az{constructor(l){super(l);this.events=new g.cI(l);g.x(this,this.events);l.X("html5_show_drc_toggle")&&l.addEventListener("settingsMenuInitialized",()=>{this.menuItem||(this.menuItem=new MC5(this.api,this.setDrcUserPreference.bind(this),this.getDrcUserPreference.bind(this),this.C.bind(this),this.getDrcState.bind(this)),g.x(this,this.menuItem))});
B(this.api,"setDrcUserPreference",y=>{this.setDrcUserPreference(y)});
B(this.api,"getDrcUserPreference",()=>this.getDrcUserPreference());
B(this.api,"hasDrcAudioTrack",()=>this.C());
B(this.api,"getDrcState",()=>this.getDrcState());
this.Z=g.Ay("yt-player-drc-pref")??1;this.updateEnvironmentData()}getDrcUserPreference(){return this.Z}setDrcUserPreference(l){this.api.Md("drc_set",{pref:l});g.eY("yt-player-drc-pref",l,31536E3);l!==this.Z&&(this.Z=l,this.updateEnvironmentData(),this.C()&&this.api.x8(),this.api.Zl())}updateEnvironmentData(){this.api.O().Fg=this.Z===1}C(){const l=this.api.getVideoData()?.N?.C;if(!l)return!1;if(this.api.getAvailableAudioTracks().length>1&&this.api.X("mta_drc_mutual_exclusion_removal")){const y=this.api.nY()?.a7?.id;
return Be(l,k=>k.audio.Z&&k.a7?.id===y)}return Be(l,y=>y.audio?.Z===!0)}getDrcState(){return this.api.O2(3)}};var ce5=class extends az{constructor(l){super(l);this.Z={};this.events=new g.cI(l);g.x(this,this.events);this.events.j(l,"videodatachange",()=>{this.onVideoDataChange()});
this.events.j(l,g.uR("embargo"),y=>{this.api.zc(!0);var k=this.Z[y.id]??[];for(const z of k)this.api.hideControls(),this.api.jI("auth",2,"This video isn't available in your current playback area",wd({embargoed:1,id:y.id,idx:y.C,start:y.start})),(k=z.embargo?.onTrigger)&&g.G3(this.api,"innertubeCommand",k)})}onVideoDataChange(){const l=this.api.getVideoData();
this.api.Ur("embargo",1);const y=l?.eE.get("PLAYER_CUE_RANGE_SET_IDENTIFIER_EMBARGO");y?.length?aT4(this,y.filter(k=>k.onEnter?.some(this.C))):l?.cueRanges&&aT4(this,l.cueRanges.filter(k=>k.onEnter?.some(this.C)))}C(l){return l.embargo!==void 0}Vj(){super.Vj();
this.Z={}}};var CFe=class extends az{constructor(l){super(l);this.Z=[];this.events=new g.cI(l);g.x(this,this.events);B(l,"addEmbedsConversionTrackingParams",y=>{this.addEmbedsConversionTrackingParams(y)});
this.events.j(l,"veClickLogged",y=>{this.api.hasVe(y)&&(y=y.visualElement.getAsJspb(),y=g.$h(y,2),this.Z.push(y))})}addEmbedsConversionTrackingParams(l){var y=this.api.O();
const k=y.widgetReferrer,z=y.Cp,r=this.Z;let Z="";const e=y.getWebPlayerContextConfig();e&&(Z=e.embedsIframeOriginParam||"");k.length>0&&(l.embeds_widget_referrer=k);z.length>0&&(l.embeds_referring_euri=z);y.V&&Z.length>0&&(l.embeds_referring_origin=Z);e&&e.embedsFeature&&(l.feature=e.embedsFeature);r.length>0&&(y.X("embeds_web_enable_lite_experiment_control_arm_logging")?r.unshift(28572):g.j_(g.CA(y))&&r.unshift(159628),y=r.join(","),y=g.is()?y:g.Kx(y,4),l.source_ve_path=y);this.Z.length=0}};var bhg=class extends az{constructor(l){super(l);B(l,"isEmbedsShortsMode",()=>l.isEmbedsShortsMode());
B(l,"getReelItemWatchResponse",()=>l.getVideoData({playerType:1})?.getReelItemWatchResponse()??null)}};var uMe=class extends az{constructor(l){super(l);this.events=new g.cI(l);g.x(this,this.events);this.events.j(l,"initialvideodatacreated",y=>{rQ(zk(),16623);this.Z=g.MM();var k=l.O().ji&&!y.BF;$k(y)&&k?(rQ(zk(),27240,void 0,{implicitGestureType:"INTERACTION_LOGGING_GESTURE_TYPE_AUTOMATED"}),y.getWatchNextResponse()&&(k=y.getWatchNextResponse()?.trackingParams)&&$M(k),y.getPlayerResponse()&&(y=y.getPlayerResponse()?.trackingParams)&&$M(y)):(rQ(zk(),32594,void 0,{implicitGestureType:"INTERACTION_LOGGING_GESTURE_TYPE_AUTOMATED"}),
y.getEmbeddedPlayerResponse()&&(y=y.getEmbeddedPlayerResponse()?.trackingParams)&&$M(y))});
this.events.j(l,"loadvideo",()=>{rQ(zk(),27240,void 0,{implicitGestureType:"INTERACTION_LOGGING_GESTURE_TYPE_AUTOMATED",parentCsn:this.Z})});
this.events.j(l,"cuevideo",y=>{y===1&&rQ(zk(),32594,void 0,{implicitGestureType:"INTERACTION_LOGGING_GESTURE_TYPE_AUTOMATED",parentCsn:this.Z})});
this.events.j(l,"largeplaybuttonclicked",y=>{rQ(zk(),27240,y.visualElement)});
this.events.j(l,"playlistnextbuttonclicked",y=>{rQ(zk(),27240,y.visualElement)});
this.events.j(l,"playlistprevbuttonclicked",y=>{rQ(zk(),27240,y.visualElement)});
this.events.j(l,"playlistautonextvideo",()=>{rQ(zk(),27240,void 0,{implicitGestureType:"INTERACTION_LOGGING_GESTURE_TYPE_AUTOMATED"})})}};var iMQ=class extends g.zP{constructor(l,y){super();this.Z=null;this.N=y;y=[];for(let k=0;k<=100;k++)y.push(k/100);y={threshold:y,trackVisibility:!0,delay:1E3};(this.C=window.IntersectionObserver?new IntersectionObserver(k=>{k=k[k.length-1];let z=null;typeof k.isVisible==="undefined"?document.visibilityState==="visible"&&k.isIntersecting&&k.intersectionRatio>0?z=k.intersectionRatio:document.visibilityState==="hidden"?z=0:z=null:z=k.isVisible?k.intersectionRatio:0;z!=null&&(z=Math.max(z,0),z=Math.min(z,
1));this.Z=z;typeof this.N==="function"&&this.N(this.Z)},y):null)&&this.C.observe(l)}Vj(){super.Vj();
this.Z=null;this.C&&this.C.disconnect()}};var xa5=class extends az{constructor(l){super(l);this.events=new g.cI(l);g.x(this,this.events);this.events.j(l,"applicationInitialized",()=>{UH_(this)})}};var mas=class extends az{constructor(l){super(l);B(this.api,"dismissFeaturedProductOverlay",()=>{this.dismissFeaturedProductOverlay()})}dismissFeaturedProductOverlay(){this.api.publish("featuredproductdismissed")}};var qhP=class extends g.H{constructor(l){super({U:"div",L_:["ytp-player-content","ytp-iv-player-content"],W:[{U:"div",B:"ytp-free-preview-countdown-timer",W:[{U:"span",Nd:"{{label}}"},{U:"span",B:"ytp-free-preview-countdown-timer-separator",Nd:"\u2022"},{U:"span",Nd:"{{duration}}"}]}]});this.api=l;this.Z=null;this.N=this.C=0;this.j(this.api,"videodatachange",this.onVideoDataChange);this.api.createClientVe(this.element,this,191284)}show(){super.show();this.api.logVisibility(this.element,!0)}stopTimer(){this.Z&&
(this.Z.dispose(),this.Z=null)}onVideoDataChange(l){var y=this.api.getVideoData()?.getPlayerResponse()?.playabilityStatus;y&&(y=ML5(y),this.api.getPlayerStateObject().Z(128)||l==="dataloaderror"||!y?(this.C=0,this.stopTimer(),this.hide()):(l=(y.remainingTimeSecs||0)*1E3,l>0&&(this.show(),this.updateValue("label",Rd(y.label)),cN5(this,l))))}Vj(){this.stopTimer();super.Vj()}};var WNs=class extends az{constructor(l){super(l);this.events=new g.cI(l);g.x(this,this.events);this.events.j(l,"basechromeinitialized",()=>{this.Z=new qhP(l);g.x(this,this.Z);g.pi(l,this.Z.element,4);this.Z.hide()})}};var Ik4=class extends g.H{constructor(l){super({U:"button",L_:["ytp-fullerscreen-edu-button","ytp-button"],W:[{U:"div",L_:["ytp-fullerscreen-edu-text"],Nd:"Cu\u1ed9n \u0111\u1ec3 bi\u1ebft th\u00eam chi ti\u1ebft"},{U:"div",L_:["ytp-fullerscreen-edu-chevron"],W:[mSt()]}],G:{"data-priority":"2"}});this.K_=l;this.fade=new g.oT(this,250,void 0,100);this.C=this.Z=!1;l.createClientVe(this.element,this,61214);g.x(this,this.fade);this.j(l,"fullscreentoggled",this.Aa);this.j(l,"presentingplayerstatechange",
this.Aa);this.listen("click",this.onClick);this.Aa()}V(l){g.I(this.element,"ytp-fullerscreen-edu-button-subtle",l);l&&!this.C&&(this.K_.X("player_tooltip_data_title_killswitch")?this.element.setAttribute("title","Cu\u1ed9n \u0111\u1ec3 bi\u1ebft th\u00eam chi ti\u1ebft"):this.element.setAttribute("data-tooltip-title","Cu\u1ed9n \u0111\u1ec3 bi\u1ebft th\u00eam chi ti\u1ebft"),q1(this.K_,this.element,this),this.C=!0)}onClick(){this.K_.logClick(this.element);g.G3(this.K_,"onFullerscreenEduClicked")}N(l){this.Z=
l;this.Aa()}Aa(){this.K_.isFullscreen()?this.Z?this.fade.hide():this.fade.show():this.hide();this.K_.logVisibility(this.element,this.K_.isFullscreen()&&!this.Z)}};var TTq=class extends az{constructor(l){super(l);this.events=new g.cI(l);g.x(this,this.events);B(this.api,"updateFullerscreenEduButtonSubtleModeState",k=>{this.updateFullerscreenEduButtonSubtleModeState(k)});
B(this.api,"updateFullerscreenEduButtonVisibility",k=>{this.updateFullerscreenEduButtonVisibility(k)});
const y=l.O();l.X("external_fullscreen_with_edu")&&y.externalFullscreen&&Wn(y)&&y.controlsType==="1"&&this.events.j(l,"standardControlsInitialized",()=>{this.Z=new Ik4(l);g.x(this,this.Z);l.cL(this.Z)})}updateFullerscreenEduButtonSubtleModeState(l){this.Z?.V(l)}updateFullerscreenEduButtonVisibility(l){this.Z?.N(l)}};var VC4=class extends g.H{constructor(l){super({U:"div",B:"ytp-gated-actions-overlay",W:[{U:"div",B:"ytp-gated-actions-overlay-background",W:[{U:"div",B:"ytp-gated-actions-overlay-background-overlay"}]},{U:"button",L_:["ytp-gated-actions-overlay-miniplayer-close-button","ytp-button"],G:{"aria-label":"\u0110o\u0301ng"},W:[g.wM()]},{U:"div",B:"ytp-gated-actions-overlay-bar",W:[{U:"div",B:"ytp-gated-actions-overlay-text-container",W:[{U:"div",B:"ytp-gated-actions-overlay-title",Nd:"{{title}}"},{U:"div",
B:"ytp-gated-actions-overlay-subtitle",Nd:"{{subtitle}}"}]},{U:"div",B:"ytp-gated-actions-overlay-button-container"}]}]});this.api=l;this.background=this.qd("ytp-gated-actions-overlay-background");this.C=this.qd("ytp-gated-actions-overlay-button-container");this.Z=[];this.j(this.qd("ytp-gated-actions-overlay-miniplayer-close-button"),"click",()=>{g.G3(this.api,"onCloseMiniplayer")});
this.hide()}};var PFy=class extends az{constructor(l){super(l);this.events=new g.cI(l);g.x(this,this.events);this.Z=new VC4(this.api);g.x(this,this.Z);this.events.j(l,"videodatachange",()=>{const y=this.api.getVideoData()?.tE;var k=this.Z;if(y){k.update({title:y.title?.content||"",subtitle:y.subtitle?.content||""});var z=y.thumbnail;let r="none";if(z?.sources){let Z=0;for(const e of z.sources)e.width&&e.url&&e.width>Z&&(Z=e.width,r=`url(${e.url})`)}k.background.style.backgroundImage=r;bMq(k,y.actionButtons||[]);
k.show()}else k.hide()});
g.pi(this.api,this.Z.element,4)}};var Jeg=class extends az{constructor(l){super(l);ia(this.api,"getSphericalProperties",()=>this.getSphericalProperties());
ia(this.api,"setSphericalProperties",(...y)=>{this.setSphericalProperties(...y)});
ao(this.api,"getSphericalProperties",()=>this.api.getPresentingPlayerType()===2?{}:this.getSphericalProperties());
ao(this.api,"setSphericalProperties",(...y)=>{this.api.getPresentingPlayerType()!==2&&this.setSphericalProperties(...y)})}getSphericalProperties(){const l=g.Yk(this.api.r4());
return l?l.getSphericalProperties():{}}setSphericalProperties(l){if(l){var y=g.Yk(this.api.r4());y&&y.setSphericalProperties(l,!0)}}};var Yht=class extends az{constructor(l){super(l);B(l,"createClientVe",this.createClientVe.bind(this));B(l,"createServerVe",this.createServerVe.bind(this));B(l,"destroyVe",this.destroyVe.bind(this));B(l,"hasVe",this.hasVe.bind(this));B(l,"logClick",this.logClick.bind(this));B(l,"logVisibility",this.logVisibility.bind(this));B(l,"setTrackingParams",this.setTrackingParams.bind(this))}createClientVe(l,y,k,z=!1){this.api.createClientVe(l,y,k,z)}createServerVe(l,y,k=!1){this.api.createServerVe(l,y,k)}setTrackingParams(l,
y){this.api.setTrackingParams(l,y)}logClick(l,y){this.api.logClick(l,y)}logVisibility(l,y,k){this.api.logVisibility(l,y,k)}hasVe(l){return this.api.hasVe(l)}destroyVe(l){this.api.destroyVe(l)}};var pgC=class{constructor(l,y){this.o7=l;this.policy=y;this.playbackRate=1}setPlaybackRate(l){this.playbackRate=Math.max(1,l)}getPlaybackRate(){return this.playbackRate}};var KNC=class{constructor(l,y,k,z){this.HG=l;this.Ej=y;this.policy=k;this.logger=z;this.vz=[];this.U1=[];this.C=-1;this.i5=null;this.A=this.timestampOffset=0;this.Z=10;this.J=new Set;this.d4={EQ:r=>this.EQ(r)};
this.V=y.UA?0:1;k.Gr>0&&(this.Z=k.Gr)}sj(l){this.J.add(l.info.n_);this.C=ITC(this,this.U1,this.vz,l,this.C);this.N=l;this.A=(0,g.f)()}D(l){TVy(this,this.U1,"og");VL_(this,l);TVy(this,this.U1,"trim");const {U1:y,vz:k}=PtP(this);l=[];for(let z=0;z<k.length;z++){const r=k[z],Z=this.policy.mK&&r.N!==-1?r.N:r.info.startTime,e={startTicks:(Z+this.timestampOffset)*1E3,rQ:(this.policy.mK&&r.V!==-1?r.V:r.info.duration)*1E3,timescale:1E3},A=this.i5?.Za();let Q;if(this.policy.TC&&A&&A.length>0){const t=Rh(A,
Z);t>=0&&(Q=(A.end(t)-Z+.1)*1E3)}l.push({formatId:g.Bt(r.info.oR.info,this.Ej.UA),WV:r.info.WV,sequenceNumber:r.info.n_+this.V,ZJ:e,GR:r.info.C,QX:Q})}return{U1:y,E6:l}}Y(l,y){y?.qQ||(this.vz=[]);this.policy.Tw?(l=g.cO(this.U1,{startTimeMs:l*1E3},(k,z)=>k.startTimeMs-z.startTimeMs),this.C!==l&&(this.C=-1,this.N=void 0)):(VL_(this,!0),this.C=q5g(this.U1,l*1E3))}b0(l){this.i5=l}Ja(){return this.N?.info}EQ(l){const y=g.Bt(l.info.oR.info,this.Ej.UA),k=l.info.n_+this.V;
var z=l.info.startTime*1E3;if(this.policy.mK)try{z=this.policy.mK?g.zQ(l)*1E3:l.info.startTime*1E3}catch(e){Math.random()>.99&&this.logger&&(z=Xf(l.C).slice(0,1E3),this.logger&&this.logger({parserErrorSliceInfo:l.info.rY(),encodedDataView:g.px(z,4)})),z=l.info.startTime*1E3}const r=l.info.clipId;let Z=this.policy.mK?g.swt(l)*1E3:l.info.duration*1E3;this.policy.mK&&(z<0||Z<0)&&(this.logger&&(this.logger({missingSegInfo:l.info.rY(),startTimeMs:z,durationMs:Z}),this.policy.V0||(z<0&&(z=l.info.startTime*
1E3),Z<0&&(Z=l.info.duration*1E3))),this.policy.V0&&(z<0&&(z=l.info.startTime*1E3),Z<0&&(Z=l.info.duration*1E3)));return{formatId:y,n_:k,startTimeMs:z,clipId:r,Ys:Z}}S(){this.U1=[];this.vz=[];this.J.clear();this.C=-1;this.N=void 0}K(){this.N=void 0}EG(l){this.timestampOffset=l}C_(l){return this.J.has(l)}};var gST=class{constructor(l,y,k,z,r){this.loader=l;this.Ej=y;this.videoTrack=k;this.audioTrack=z;this.policy=r;this.seekCount=this.targetTime=0;this.V=!1;this.N=null;this.C=0;this.Z=this.Ej.isManifestless&&!this.Ej.aj}seek(l,y){l!==this.targetTime&&(this.seekCount=0);this.targetTime=l;const k=this.videoTrack.Z,z=this.audioTrack.Z,r=this.audioTrack.i5,Z=pKq(this,this.videoTrack,l,this.videoTrack.i5,y);y=pKq(this,this.audioTrack,this.policy.WG?l:Z,r,y);l=Math.max(l,Z,y);this.V=!0;this.Ej.isManifestless&&
(KVz(this,this.videoTrack,k),KVz(this,this.audioTrack,z));return l}isSeeking(){return this.V}JE(l){this.C=l}},Y5e=2/24;var ESz=0;var XB,UM=class{constructor(){this.data=new Uint8Array(2048);this.pos=0;XB||(XB=W5("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_."))}add(l){if(this.pos+20>this.data.length){const y=new Uint8Array(this.data.length*2);y.set(this.data);this.data=y}for(;l>31;)this.data[this.pos++]=XB[(l&31)+32],l>>=5;this.data[this.pos++]=XB[l|0]}jb(){return g.xW(this.data.subarray(0,this.pos))}Z(){return this.pos>0}reset(){this.pos=0}};var fkT=class{constructor(l,y){this.BG=l;this.requestNumber=++ESz;this.Z=this.now();this.Y=this.b0=NaN;this.K=this.Z;this.N=this.S2=this.V=0;this.A=this.Z;this.hv=this.RR=this.Xr=this.O1=this.Cf=this.u0=this.C=this.J=0;this.sj=this.isActive=!1;this.jN=this.R7=0;this.d4={qmj:()=>this.Ae};
this.o7=y.o7;this.snapshot=hH(this.o7);this.policy=this.o7.C;this.eP=!!y.eP;this.XF=y.XF;this.SE=y.SE||0;this.rq=y.rq||0;y.Ad&&(this.PG=new UM);this.Ae=y.Ae??!1;this.eP||l0y(this.o7);this.UR=y.UR??!1}LX(){this.b0=this.now();S54(this.o7,this.b0);this.BG.LX()}Ns(l,y){const k=this.policy.C?(0,g.f)():0;bo(this,l,y);l-this.A<10&&this.C>0||this.HG(l,y);this.BG.Ns(l,y);this.policy.C&&(l=(0,g.f)()-k,this.jN+=l,this.R7=Math.max(l,this.R7))}HG(l,y){const k=(l-this.A)/1E3,z=y-this.N;this.eP||(GG(this.o7,k,z),
this.XF(k,z));this.A=l;this.N=y}UG(){this.u0&&nXC(this);this.BG.UG()}bR(l){this.u0||(this.u0=this.V-this.S2+l,this.Cf=this.V,this.O1=this.K)}Ja(l=this.K,y=this.V){this.C>0||(this.Y=l,this.C=y,this.sj=this.isActive=!0)}kz(){return this.rq||2}Xz(){}wV(){}yB(){}D(){const l={rn:this.requestNumber,rt:(this.K-this.Z).toFixed(),lb:this.V,stall:(1E3*this.J).toFixed(),ht:(this.b0-this.Z).toFixed(),elt:(this.Y-this.Z).toFixed(),elb:this.C,d:this.PG?.jb()};this.url&&usP(l,this.url);this.policy.C&&(l.mph=this.R7.toFixed(),
l.tph=this.jN.toFixed());l.ulb=this.Xr;l.ult=this.RR;return l}now(){return(0,g.f)()}deactivate(){this.isActive&&(this.isActive=!1)}};var cE=class extends fkT{constructor(l,y){super(l,y);this.SN=this.hj=!1;this.C_=this.S=Infinity;this.rb=NaN;this.BF=!1;this.T7=NaN;this.wY=this.mK=this.gb=0;this.aX=y.aX||1;this.VZ=y.VZ||this.aX;this.PZ=y.PZ;this.n_=y.n_;this.MV=y.MV;oXy(this);this.OA(this.Z);this.TJ=(this.T7-this.Z)/1E3}D(){const l=super.D();l.pb=this.aX;l.pt=(1E3*this.TJ).toFixed();l.se=this.wY;return l}Vb(){const l=this.BG;this.xz||(this.xz=l.Vb?l.Vb():1);return this.xz}AL(){return this.PZ?this.Vb()!==1:!1}PF(l,y,k){if(!this.hj){this.hj=
!0;if(!this.eP){bo(this,l,y);this.HG(l,y);var z=this.Vb();this.wY=k;if(!this.eP)if(z===2){z=l-this.Y<this.kz()*1E3+50;k=this.RR?this.Xr/(this.RR/1E3):k||this.hv;const r=this.SE*1.3;z&&k<r||(this.RR?uo(this.o7,this.RR/1E3,this.Xr,this.mK||this.policy.C_):uo(this.o7,y/k,y,.01));a$(this.o7,y,z?0:this.J)}else z===1&&(z=(l-this.Z)/1E3,!(z<=this.policy.V)&&this.policy.V||this.SN||this.policy.D||!(this.C>0)||x_(this,z,y),this.C>0&&a$(this.o7,y,this.J));l=(l-this.Z)/1E3||.01;this.policy.A&&!(this.C>0)||iS(this.o7,
l,this.N,NVg(this),this.Ae)}this.deactivate()}}Xu(l,y,k){k&&(this.xz=2);l<0&&this.rq&&(l=this.rq);y?this.gb+=l:this.mK+=l}kz(){return this.mK||this.gb||super.kz()}HG(l,y){const k=(l-this.A)/1E3,z=y-this.N,r=this.Vb();this.isActive?r===1&&((z>0||this.policy.J)&&(k>.2||z<1024)?(this.J+=k,z>0&&k>.2&&x_(this,this.SE?k:.05,z),this.SN=!0):z>0&&(x_(this,k,z),this.SN=!0)):y&&y>=this.policy.Z&&this.Ja(l,y);super.HG(l,y)}WG(l){if(!this.eP){bo(this,l,this.V);var y=(l-this.Z)/1E3;this.Vb()!==2&&this.C>0&&(this.J+=
(l-this.A)/1E3,a$(this.o7,this.N,this.J));iS(this.o7,y,this.N,NVg(this),this.Ae,!0);l=(l-this.A)/1E3;GG(this.o7,l,0);this.XF(l,0)}}Ja(l=this.K,y=this.V){if(!(this.C>0)&&(super.Ja(l,y),this.Vb()===1)){y=(this.b0-this.Z)/1E3;var k=(l-this.b0)/1E3;this.PZ&&mo(this,this.now());this.BF||this.eP||(this.rq&&(k=Math.max(0,k-this.rq)),l=this.o7,l.A.Tk(1,y),l.Ja.Tk(1,k))}}q_(){this.PZ&&mo(this,this.now());return this.rb}MQ(){var l;if(l=this.N>this.VZ)l=(l=this.N)?l>=this.policy.Z:!1;return l}MW(){return this.T7}OA(l=
this.now()){let y;if(this.PZ){mo(this,l);if(this.xz?this.AL():this.S!==this.C_){if(y=this.C_,l<y){this.T7=this.C_;return}}else y=this.S;y=Math.max(y,this.rb)}else y=this.rb;var k=this.aX-this.N;k<0&&(k=0);k=(k*this.snapshot.stall+k/this.snapshot.byterate)*1E3;this.T7=k=this.C>0?k+l:k+Math.max(l,y)}Oj(){return this.now()-this.Y}g4(){return(this.N-this.C)*1E3/this.Oj()||0}vn(){return this.Y}};var C1=class{constructor(l){this.BG=l;this.Z=new IG}feed(l){aG(this.Z,l);this.mI()}mI(){if(this.V){if(!this.Z.totalLength)return;const {Wm:y,iG:k}=this.Z.split(this.N-this.C);if(!this.BG.bR(this.V,y,this.C,this.N))return;this.C+=y.totalLength;this.Z=k;this.C===this.N&&(this.V=this.N=this.C=void 0)}for(;;){var l=0;let y,k;[y,l]=BVs(this.Z,l);[k,l]=BVs(this.Z,l);if(y<0||k<0)break;if(!(l+k<=this.Z.totalLength)){if(!(this.BG.bR&&l+1<=this.Z.totalLength))break;({iG:l}=this.Z.split(l));this.BG.bR(y,l,0,
k)&&(this.V=y,this.C=l.totalLength,this.N=k,this.Z=new IG([]));break}const {Wm:z,iG:r}=this.Z.split(l).iG.split(k);this.BG.xH(y,z);this.Z=r}}dispose(){this.Z=new IG}};var jJe=class{constructor(l,y){this.info=l;this.callback=y;this.state=1;this.jQ=this.eC=!1;this.N4=null}QV(){return 0}Pm(){return null}KW(){return null}Wo(){return this.state>=1}isComplete(){return this.state>=3}R2(){return this.state===5}onStateChange(){}IU(l){const y=this.state;this.state=l;this.onStateChange(y);this.callback&&this.callback(this,y)}E3(l){l&&this.state<l?this.IU(l):this.callback&&this.callback(this,this.state)}IR(){return this.state===-1}rY(){let l="";this.info.cF.forEach(y=>{l+=
`${y.rY()}.`});
return l.slice(0,-1)}dispose(){this.IR()||(this.info.cF[0].oR.C_=!1,this.IU(-1))}AG(){return 0}};var lhq=class{constructor(l,y,k,z={}){this.policy=y;this.BG=k;this.status=0;this.Z=new IG;this.C=0;this.IR=this.V=this.N=!1;this.xhr=new XMLHttpRequest;this.xhr.open(z.method||"GET",l);if(z.headers){l=z.headers;for(const r of Object.keys(l))this.xhr.setRequestHeader(r,l[r])}this.xhr.withCredentials=!0;this.xhr.onreadystatechange=()=>this.A8();
this.xhr.onload=()=>this.onDone();
this.xhr.onerror=()=>this.onError();
this.xhr.fetch(r=>{this.Z.append(r);this.C+=r.length;r=(0,g.f)();this.BG.Ns(r,this.C)},()=>{},z.body||null)}A8(){this.xhr.status&&(this.status=this.xhr.status);
this.xhr.readyState===this.xhr.HEADERS_RECEIVED&&this.BG.LX()}onError(){this.N=!0;this.onDone()}onDone(){this.IR||(this.V=!0,this.BG.UG())}lQ(){return this.xhr.readyState>=this.xhr.HEADERS_RECEIVED}getResponseHeader(l){try{return this.xhr.getResponseHeader(l)}catch{return""}}UQ(){return+this.getResponseHeader("content-length")}Mc(){return this.C}zS(){return this.status>=200&&this.status<300&&!!this.C}wg(){return this.Z.totalLength>0}oK(){const l=this.Z;this.Z=new IG;return l}r$(){return this.Z}abort(){this.IR=
!0;this.xhr.abort()}iA(){return!0}l2(){return this.N}hC(){return""}};var Shs=class{constructor(l,y){this.C=(new TextEncoder).encode(l);this.Z=(new TextEncoder).encode(y)}};var DHC=class{constructor(l,y){this.Z=l;this.BG=y;this.loaded=this.status=0;this.error="";l=Py(this.Z.get("range")||"");if(!l)throw Error("bad range");this.range=l;this.C=new IG;this.run().then(()=>{this.BG.UG()},k=>{this.error=`${k}`||"unknown_err";
this.BG.UG()})}async run(){this.status=200;
const l=this.Z.get("docid"),y=ii(this.Z.get("fmtid")||""),k=this.Z.get("lmt")||"0",z=+(this.Z.get("csz")||0);if(!l||!y||!z)throw Error("Invalid local URL");let r;this.Z.get("ck")&&this.Z.get("civ")&&(r=new Shs(this.Z.get("ck"),this.Z.get("civ")));const Z=this.range;var e=Math.floor(Z.start/z);const A=Math.floor(Z.end/z);for(;e<=A;e++){var Q=await rLT(l,y,k,e,r);if(Q===void 0)throw Error("invariant: data is undefined");var t=e*z;const O=Math.max(0,Z.start-t);t=Math.min(Z.end+1,(e+1)*z)-(O+t);Q=new Uint8Array(Q.buffer,
O,t);this.C.append(Q);this.loaded+=t;this.loaded<Z.length&&this.BG.Ns((0,g.f)(),this.loaded)}}getResponseHeader(l){return l==="content-type"?this.Z.get("type"):""}abort(){}lQ(){return!0}UQ(){return this.range.length}Mc(){return this.loaded}zS(){return!!this.loaded}wg(){return!!this.C.totalLength}oK(){const l=this.C;this.C=new IG;return l}r$(){return this.C}iA(){return!0}l2(){return!!this.error}hC(){return this.error}};var yCy=class{constructor(l,y,k,z={}){this.policy=y;this.BG=k;this.S=z;this.status=0;this.response=void 0;this.C=0;this.aborted=this.J=!1;this.errorMessage="";this.A=r=>{if(r)if(this.status=r.status,r.ok&&r.body&&this.status!==204)this.status=this.status||242,this.N=r.body.getReader(),this.IR()?this.N.cancel().catch(()=>{}):(this.responseHeaders=r.headers,this.BG.LX(),R35(this));
else this.onDone();else this.onError(Error("null_response"))};
this.K=r=>{const Z=(0,g.f)();this.IR()||(r.done?(this.N=void 0,this.onDone()):(r=r.value,this.C+=r.length,this.Z.append(r),R35(this),this.BG.Ns(Z,this.C)))};
this.onError=r=>{this.errorMessage=String(r);this.J=!0;this.onDone()};
this.Z=new IG;this.V=window.AbortController?new AbortController:void 0;this.start(l)}start(l){const y={credentials:"include",cache:"no-store"};Object.assign(y,this.S);this.V&&(y.signal=this.V.signal);l=new Request(l,y);fetch(l).then(this.A,this.onError).then(void 0,qM)}onDone(){this.IR()||this.BG.UG()}getResponseHeader(l){return this.responseHeaders?this.responseHeaders.get(l):null}lQ(){return!!this.responseHeaders}Mc(){return this.C}UQ(){return+this.getResponseHeader("content-length")}zS(){return this.status>=
200&&this.status<300&&!!this.C}wg(){return!!this.Z.totalLength}oK(){const l=this.Z;this.Z=new IG;return l}r$(){return this.Z}IR(){return this.aborted}abort(){this.N&&this.N.cancel().catch(()=>{});
this.V&&this.V.abort();this.aborted=!0}iA(){return!0}l2(){return this.J}hC(){return this.errorMessage}};var khP=class{constructor(l,y,k={}){this.BG=y;this.C=this.status=0;this.IR=this.Z=!1;this.xhr=new XMLHttpRequest;this.xhr.open(k.method||"GET",l);if(k.headers){l=k.headers;for(var z of Object.keys(l))this.xhr.setRequestHeader(z,l[z])}this.xhr.responseType="arraybuffer";this.xhr.withCredentials=!0;this.xhr.onreadystatechange=r=>{this.A8(r)};
z=Dq(r=>{this.onDone(r)});
this.xhr.addEventListener("load",z,!1);this.xhr.addEventListener("error",z,!1);k.body?this.xhr.send(k.body):this.xhr.send();this.xhr.addEventListener("progress",Dq(r=>{this.onProgress(r)}),!1)}onDone(){if(!this.IR){this.status=this.xhr.status;
try{this.response=this.xhr.response,this.C=this.response.byteLength}catch{}this.Z=!0;this.BG.UG()}}A8(){this.xhr.readyState===2&&this.BG.LX()}onProgress(l){this.IR||(this.status=this.xhr.status,this.Z||(this.C=l.loaded),this.BG.Ns((0,g.f)(),l.loaded))}lQ(){return this.xhr.readyState>=2}getResponseHeader(l){try{return this.xhr.getResponseHeader(l)}catch{return g.WH(Error(`Could not read XHR header ${l}`)),""}}UQ(){return+this.getResponseHeader("content-length")}Mc(){return this.C}zS(){return this.status>=
200&&this.status<300&&this.Z&&!!this.C}wg(){return this.Z&&!!this.response&&!!this.response.byteLength}oK(){const l=this.response;this.response=void 0;return new IG([new Uint8Array(l)])}r$(){return new IG([new Uint8Array(this.response)])}abort(){this.IR=!0;this.xhr.abort()}iA(){return!1}l2(){return!1}hC(){return""}};var nt4=class extends g.zP{constructor(l,y){super();this.policy=l;this.cF=y;this.C=0;this.Z=null;this.Af=[];this.N=null;this.d4={Yh:()=>this.cF};
this.cF.length===1||g.He(this.cF,k=>!!k.range)}AV(){if(!this.Af.length)return[];
const l=this.Af;this.Af=[];this.N=g.nC(l).info;return l}N3(){return this.Af}Vj(){super.Vj();this.Z=null;this.Af.length=0;this.cF.length=0;this.N=null}};var nSq=class extends g.zP{constructor(l,y,k,z,r,Z,e,A,Q=!1){super();this.BG=l;this.policy=y;this.gZ=k;this.pP=z;this.timing=r;this.logger=Z;this.V=e;this.i_=A;this.S=Q;this.lastError=null;this.Z=0;this.J=!1;this.N=0;this.C=new g.B_(this.K,this.policy.O1,this)}K(){if(!this.IR()){var l=(0,g.f)(),y=!1;if(this.policy.Cp){var k=this.timing.C>0?this.timing.Y:this.timing.Z;this.policy.K$&&this.N&&(k=this.N);l=l-k-(this.policy.MS?this.policy.kC:this.timing.kz()*1E3);k=bx(IM(this),!1);l>=2E3*k?y=!0:l>=this.policy.lR*
k&&(this.Z=this.policy.zZ)}else if(this.timing.C>0){if(this.S){this.policy.PF&&(this.Z=0);return}l=this.timing.MW();this.timing.OA();this.timing.MW()-l>=this.policy.O1*.8?(this.Z++,y=this.Z>=5):this.Z=0}else y=l-this.timing.q_(),this.policy.zZ&&y>0&&(this.Z+=1),l=bx(IM(this),!1)*this.policy.vM,y=y>l*1E3;this.Z>0&&this.BG.cP();y?this.GN():this.C.start()}}GN(){this.J=!0;this.BG.tU();this.lastError="net.timeout";Tu(this)}canRetry(l){const y=IM(this);l=l?this.policy.FD:this.policy.pS;return y.timedOut<
this.policy.zw&&y.Z<l}eV(){return this.lastError}X4(){return this.Z}dispose(){this.C.dispose();super.dispose()}};var X3P={["1h"]:8,["9h"]:4,["1"]:8,["9"]:4,["("]:4,h:2,H:2},cCP={o:3,O:3,so:3,a:1,ah:1,A:1,m:1,M:1,sa:1,mac3:7,MAC3:7,meac3:5,MEAC3:5},ude={o:0,O:0,a:0,ah:0,A:0,m:1,M:1,mac3:1,MAC3:1,meac3:1,MEAC3:1,so:4,sa:4};var W6C={WEB:1,MWEB:2,TVHTML5:7,TVHTML5_CAST:43,WEB_UNPLUGGED:41,WEB_EMBEDDED_PLAYER:56,TVHTML5_AUDIO:57,TV_UNPLUGGED_CAST:58,TVHTML5_KIDS:59,WEB_MUSIC:61,WEB_CREATOR:62,TVHTML5_UNPLUGGED:65,WEB_REMIX:67,TVHTML5_SIMPLY:75,WEB_KIDS:76,TVHTML5_SIMPLY_EMBEDDED_PLAYER:85,WEB_MUSIC_EMBEDDED_PLAYER:86,WEB_MUSIC_ANALYTICS:31,WEB_GAMING:32,WEB_EXPERIMENTS:42,WEB_HEROES:60,WEB_UNPLUGGED_ONBOARDING:69,WEB_UNPLUGGED_OPS:70,WEB_UNPLUGGED_PUBLIC:71,TVHTML5_VR:72,TVHTML5_FOR_KIDS:93};var pX,Y_,KX=[["337","336","335"],["702","701","700"],["315","308","303","302"],["299","298"],["787","788"]],hk4=[["571","401","400","399","398"],["313","271","248","247"],["137","136"]],Ght=["571 401 400 399 398 787 788 397 396".split(" "),"313 271 248 247 781 777 244 243".split(" "),["137","136","135"]],ah4=[["411","410","409"],["360","358","357","274"],["385","376","384"],["225","224","145"]],i05=["412","359"],Uez=[["141"],["774"],["380"],["328"]],O05={["398"]:"397 396 395 394 788 787".split(" "),
["247"]:["780","779","244","243","242"],["136"]:["135","134","133","160"],["141"]:["140"],["774"]:["251","250"]},deQ={["135"]:["134","133","160"],["243"]:["242"],["781"]:["780","779"],["777"]:["776","775"],["396"]:["395","394"],["141"]:["140"],["774"]:["251","250"]},w3t={["274"]:["317","273","318","280","279"],["145"]:["144","222","223","143","142"],["141"]:["149"],["140"]:["149"],["380"]:["381"],["328"]:["329"]},Q5q={["133"]:240,["134"]:360,["135"]:480,["136"]:720,["137"]:1080,["242"]:240,["243"]:360,
["244"]:480,["247"]:720,["248"]:1080,["298"]:720,["299"]:1080,["302"]:720,["303"]:1080,["395"]:240,["396"]:360,["397"]:480,["398"]:720,["399"]:1080};var xeq={unknown:0,other:0,bluetooth:117,wifi:116,cellular:120,ethernet:118,wimax:119,none:122};var hJ=class extends jJe{constructor(l,y,k,z,r,{H0:Z=[],KM:e=!1,M1:A=0,poToken:Q="",i_:t,xn:O="",zV:d=0,Oo:w=new Uint8Array(0),Dk:h=0,q3:U}={}){super(y,r);this.policy=l;this.logger=new g.R9("dash/request");this.oX=this.I9=0;this.OI=!1;this.Je=this.Rt=null;this.Ca=!1;this.Oo=this.zV=null;this.G0=this.d3=!1;this.e4=null;this.Dk=this.Rk=0;this.NQ=!1;this.d4={IU:u=>{this.IU(u)},
wsa:()=>this.N4,
UVR:u=>{this.N4=u},
R37:u=>{this.I9=u},
ph_:u=>{this.RU.lastError=u},
O4:()=>this.xhr};
this.timing=new cE(this,k);this.KM=e;this.zV=d;this.Oo=w;this.gZ=g.o9(this.info,this.policy,z);this.gZ.set("rn",this.y9().toString());this.gZ.set("rbuf",(A*1E3).toFixed().toString());this.KM&&this.gZ.set("smb","1");this.policy.JX&&Q&&this.gZ.set("pot",Q);O&&this.gZ.set("bbs",O);this.policy.useUmp&&!ux(3,5758,this.gZ.Ww)&&(this.jE=new C1(this),this.gZ.set("ump","1"),this.gZ.set("srfvp","1"));l=this.policy.hX?this.policy.jk&&!isNaN(this.info.MV)&&this.info.MV>this.policy.U9?!1:!0:!1;this.RU=new nSq(this,
this.policy,this.gZ,this.info.pP,this.timing,this.logger,z,t);this.H0=Z||null;this.jQ=IhP(this);zks(this.RU);z=void 0;if(this.policy.Qz||this.jE||this.policy.RR)z={method:"POST"},Z=(0,g.aZ)([120,0]),t={},U&&(U=gW(void 0,U),t.ph=U),this.policy.zD&&this.Oo&&(t.videoPlaybackUstreamerConfig=this.Oo),this.policy.RR&&(U=this.info.V)&&Object.assign(t,U),Object.keys(t).length>0?z.body=g.nG(t,g.V_):z.body=Z;this.zV&&this.Oo&&(this.gZ.set("iwts","1"),z={method:"POST"},U=g.nG({oH:{uX:this.zV*1E3},Ov:this.info.V?.Ov||
void 0,videoPlaybackUstreamerConfig:this.Oo},g.V_),z.body=U);try{this.xhr=qk(this.gZ,this.policy.K,this.timing,l,z),this.RU.C.start(),h&&(this.J$=new g.B_(this.JS,h,this),this.J$.start(h+(this.timing.o7.A.B1()||0)*1E3)),g.o4(()=>{})}catch(u){Ti4(this,u,!0)}}y9(){return this.timing.requestNumber}wZ(){return this.gZ.wZ()}qG(){const l=ekC(this.RU);
if(this.jE){var y=this.jE,k=y.Z.totalLength;l.ulen=k;k>0&&(y=c5(y.Z,0),l.ubyte=y,k===1&&y===0&&(l.b248180278=!0))}this.I9&&(l.rc=this.policy.Mg?this.I9:this.I9.toString());this.policy.BF&&this.Eg&&(l.tr=this.Eg);l.itag=this.info.cF[0].oR.info.itag;l.ml=`${+this.info.cF[0].oR.Z()}`;l.sq=`${this.info.cF[0].n_}`;this.gZ&&(l.ifi=`${+pR(33,4143,this.info.pP.V)}`);this.I9!==410&&this.I9!==500&&this.I9!==503||(l.fmt_unav="true");(k=this.errorMessage||this.xhr?.hC())&&(l.msg=k);this.KM&&(l.smb="1");this.info.isDecorated()&&
(l.sdai="1");return l}EV(){return siq(this.timing)}hC(){return this.xhr.hC()||""}MQ(){return this.isComplete()||this.timing.MQ()}Ns(){!this.IR()&&this.xhr&&(this.I9=this.xhr.status,this.policy.lr&&this.N4&&this.Nc(!1),this.LA()?this.E3(2):!this.Ca&&this.MQ()&&(this.E3(),this.Ca=!0))}LX(){if(!this.IR()&&this.xhr){if(!this.oX&&this.xhr.lQ()&&this.xhr.getResponseHeader("X-Walltime-Ms")){var l=Number(this.xhr.getResponseHeader("X-Walltime-Ms"));this.oX=((0,g.f)()-l)/1E3}this.xhr.lQ()&&this.xhr.getResponseHeader("X-Restrict-Formats-Hint")&&
this.policy.tP&&!HaQ()&&g.eY("yt-player-headers-readable",!0,2592E3);l=Number(this.xhr.getResponseHeader("X-Head-Seqnum"));var y=Number(this.xhr.getResponseHeader("X-Head-Time-Millis"));this.J$?.stop();this.Rt=l||this.Rt;this.Je=y||this.Je}}UG(){var l=this.xhr;!this.IR()&&l&&(this.I9=l.status,l=this.Ct(l),this.policy.BF&&this.J$?.stop(),l===5?Tu(this.RU):this.IU(l),this.RU.C.stop())}Ct(l){VaQ(this);if(V1(this.RU,this.xhr.status,this.Rk?this.timing.sj||this.G0:this.xhr.zS(),!1,this.NQ))return 5;var y=
"";Pw(this.RU,this.xhr)&&(y=Z0T(this.RU,this.xhr));if(y)return CV(IM(this.RU)),this.info.Vs(this.gZ,y),3;y=l.Mc();if(this.jE){this.Nc(!0);VaQ(this);if(V1(this.RU,this.xhr.status,this.timing.sj||this.G0,!1,this.NQ))return 5;if(!this.d3){if(this.G0)return CV(IM(this.RU)),3;this.RU.lastError="net.closed";return 5}}else{if(V1(this.RU,this.xhr.status,this.xhr.zS(),!1,this.NQ))return 5;var k=this.info.N;if(k&&k!==y||l.l2())return this.RU.lastError="net.closed",5;this.Nc(!0)}k=HMC(this)?l.getResponseHeader("X-Bandwidth-Est"):
0;if(l=HMC(this)?l.getResponseHeader("X-Bandwidth-Est3"):0)this.OI=!0,this.policy.Sk&&(k=l);rCP(this.RU,y,k?Number(k):0,this.info.cF[0].type===5);return 4}canRetry(){this.IR();const l=this.info.isDecorated();return this.RU.canRetry(l)}onStateChange(){this.isComplete()&&(this.policy.xC?this.tU():this.timing.deactivate())}GN(){this.RU.GN()}cP(){this.callback&&this.callback(this,this.state)}X4(){return this.RU.X4()}dispose(){super.dispose();this.RU.dispose();this.J$?.dispose();this.policy.xC||this.tU()}tU(){this.xhr&&
this.xhr.abort();this.timing.deactivate()}AV(){if(!this.N3().length)return[];this.eC=!0;return this.N4.AV()}LA(){return this.state<1?!1:this.N4&&this.N4.Af.length||this.xhr?.wg()?!0:!1}N3(){this.Nc(!1);return this.N4?this.N4.N3():[]}Nc(l){try{if(l||this.xhr.lQ()&&this.xhr.wg()&&!Pw(this.RU,this.xhr)&&!this.jQ)this.N4||(this.N4=new nt4(this.policy,this.info.cF)),this.xhr.wg()&&(this.jE?this.jE.feed(this.xhr.oK()):Ww(this.N4,this.xhr.oK(),l&&!this.xhr.wg()))}catch(y){this.jE?Ti4(this,y):g.WH(y)}}xH(l,
y){switch(l){case 21:({iG:l}=y.split(1));P$C(this,l);break;case 22:this.d3=!0;Ww(this.N4,new IG([]),!0);break;case 43:({redirectUrl:l}={redirectUrl:En(new TJ(y),1)});l&&(this.info.Vs(this.gZ,l),this.G0=!0);break;case 45:const {sK:k,YL:z}=J7(new TJ(y));k&&z&&(this.e4=k/z);break;case 44:this.Cn=p9Q(new TJ(y));!this.timing.sj&&this.Cn?.action===4&&this.Cn?.xm?.Rk&&(this.Rk=this.Cn.xm.Rk);break;case 53:this.policy.BF&&({Dk:l}=PuC(new TJ(y)),l&&(this.J$||(this.Dk=l,this.J$=new g.B_(this.JS,l,this)),this.J$.start()));
break;case 60:this.QB=Pt(new TJ(y));break;case 58:if(l=zf5(new TJ(y)))this.G6=l,l.G6===3&&(this.NQ=!0)}}bR(l,y,k,z){k||this.timing.bR(z);if(l!==21)return!1;if(l=this.policy.lr)if(l*=this.info.cF[0].oR.info.CP,y.totalLength+k!==z&&y.totalLength<l)return!1;if(!k){if(y.totalLength===1)return!0;y=y.split(1).iG}P$C(this,y);return!0}Mc(){return this.xhr.Mc()}QV(){return this.oX}Vb(){return this.AL()?2:1}AL(){if(!this.policy.K.C2||!isNaN(this.info.MV)&&this.info.MV>0)return!1;if(!this.xhr.lQ())return!0;
if(this.jE)var l=!this.info.N;else this.xhr.UQ()?l=!1:(l=this.xhr.getResponseHeader("content-type"),l=l==="audio/mp4"||l==="video/mp4"||l==="video/webm");if(!l)return!1;if(isNaN(this.info.MV)){l=this.xhr.getResponseHeader("x-head-seqnum");const y=this.timing.policy.K?1:0;if(l&&Number(l)>this.info.cF[0].n_+y)return!1}return!0}AG(){return+this.xhr.getResponseHeader("X-Segment-Lmt")||0}Pm(){this.xhr&&(this.Rt=Number(this.xhr.getResponseHeader("X-Head-Seqnum")));return this.Rt}KW(){this.xhr&&(this.Je=
Number(this.xhr.getResponseHeader("X-Head-Time-Millis")));return this.Je}eV(){return this.RU.eV()}JS(){if(!this.IR()&&this.xhr){this.Eg="heartbeat";var l=this.RU;l.Z+=2;this.cP()}}};var bz=class extends fkT{constructor(l,y){super(l,y);this.mK=!0;this.rb=!1;this.SN=this.xz=0;this.T7=this.gb=NaN;this.BF=0;this.UR&&(this.C_=new UM)}HG(l,y){const k=(l-this.A)/1E3,z=y-this.N;this.C>0?z>0&&(this.rb&&(k>.2||z<1024?(this.J+=k,k>.2&&JCy(this,.05,z)):JCy(this,k,z)),this.mK&&(this.xz+=z,this.SN+=k)):y>this.policy.Z&&this.Ja(l,y);super.HG(l,y)}PF(l,y){bo(this,l,y);this.HG(l,y);this.UR&&this.S&&(y-=this.S.aG,Y7t(this,0,l-this.S.localTimestampMs,l-this.S.localTimestampMs,y,this.S.oo>0?y/this.S.oo*
1E3:0));this.rb&&(y=this.N*this.snapshot.stall+this.N/this.snapshot.byterate,this.C>0&&a$(this.o7,this.xz,this.J),l=(l-this.Z)/1E3||.01,this.policy.A&&!(this.C>0)||iS(this.o7,l,this.N,y,!1))}WG(l){bo(this,l,this.V);var y=(l-this.A)/1E3;GG(this.o7,y,0);this.XF(y,0);!this.rb&&this.C>0||(y=this.N*this.snapshot.stall+this.N/this.snapshot.byterate,this.C>0&&(this.J+=(l-this.A)/1E3,a$(this.o7,this.xz,this.J)),iS(this.o7,(l-this.Z)/1E3||.01,this.N,y,!1,!0))}ZR(l){l=l.Vx||2147483647;(l&2)!==2&&(this.mK=!1);
(l&1)===1&&(this.rb=!0)}Gg(l){l=l.Vx||2147483647;(l&2)===2&&(this.mK=!1);(l&1)===1&&(this.rb=!1)}vn(){return this.Y}Oj(){const l=this.mK?this.now()-this.A:0;return Math.max(this.SN*1E3+l,1)}g4(){return this.xz*1E3/this.Oj()}Ja(l=this.K,y=this.V){this.C>0||(super.Ja(l,y),y=this.o7,l=(l-this.b0)/1E3,y.A.Tk(1,(this.b0-this.Z)/1E3),y.Ja.Tk(1,l))}Xz(l){this.gb=l}wV(l){l.timestampMs&&(this.gb=l.timestampMs);l.wG&&(this.T7=l.wG);isNaN(this.gb)||isNaN(this.T7)||(this.BF=this.now()-this.T7/2-this.gb)}yB(l){const y=
this.S?.oo,k=l.XX!==void 0?l.XX*1E3:0,z=this.now(),r=this.V;if(this.S){const Z=l.z8-this.S.z8,e=z-this.S.localTimestampMs,A=r-this.S.aG,Q=isNaN(this.S.localTimestampMs)||isNaN(this.K)?0:this.K-this.S.localTimestampMs;this.UR&&Y7t(this,Z,e,Q,A,y&&y>0?A/y*1E3:0)}this.S={z8:l.z8,localTimestampMs:z,aG:r,oo:k}}D(){const l=super.D();l.rbw=this.g4();l.rbe=+this.mK;l.gbe=+this.rb;l.ackt=(this.gb-this.Z).toFixed();this.C_?.Z()&&(l.nts=this.C_.jb());return l}OA(){}MW(){return NaN}q_(){return this.Z+this.snapshot.delay*
1E3}};var FNQ=class{constructor(l,y){this.BG=y;this.C={};this.logger=new g.R9(l)}xH(l,y){switch(l){case 20:l=new TJ(y);l={eZ:YW(l,1),videoId:En(l,2),itag:YW(l,3),lmt:YW(l,4),xtags:En(l,5),bY:YW(l,6),NH:KG(l,8),ke:YW(l,9),odG:YW(l,10),startMs:YW(l,11),durationMs:YW(l,12),uR:YW(l,14),timeRange:fG(l,15,Wt),WV:YW(l,16),f6:YW(l,17),ZZ:YW(l,20),SS:fG(l,21,MMq),clipId:En(l,1E3)};this.K(l);break;case 21:this.S(y,!1);break;case 22:this.nB(y);break;case 31:l=Vo(y,uAC);this.BG.z4(l);break;case 52:l=Vo(y,JBC);this.BG.kU(l);
break;case 69:l={Oy:SB(new TJ(y),1,aMs)};this.BG.CD(l);break;case 65:l=Vo(y,kiT);this.BG.WC(l);break;default:this.J(l,y)}}K(){}J(){}};var oSy=new Set([53,49,50]),NTC=class extends FNQ{constructor(l){super("sabr",l);this.BG=l;this.Z=[]}J(l,y){otC(this.BG)&&!oSy.has(l)?this.Z.push({id:l,data:y}):p3_(this,l,y)}yB(l){l=new TJ(l);l={z8:YW(l,1),XX:YW(l,2)};this.BG.yB(l)}wV(l){l=new TJ(l);l={timestampMs:YW(l,1),wG:YW(l,2)};this.BG.wV(l)}YS(l){l=new TJ(l);l={MVr:SB(l,1,qx),byG:SB(l,2,qx)};this.BG.YS(l)}Tg(l){var y=new TJ(l);l=jB(y,1);var k=jB(y,2);y=jB(y,3);this.BG.Tg(l,k,y)}gD(l){l=J7(new TJ(l));this.BG.gD(l)}Wt(l){l=Vo(l,quz);this.BG.Wt(l)}xI(l){l=
new TJ(l);l={videoId:En(l,1),formatId:fG(l,2,qx),endTimeMs:YW(l,3),vd7:YW(l,4),mimeType:En(l,5),RN:fG(l,6,iWP),indexRange:fG(l,7,iWP),s4:fG(l,8,Upe)};this.BG.xI(l)}wp(l){l=new TJ(l);l={type:YW(l,1),scope:YW(l,2),value:gR(l,3),sendByDefault:KG(l,4),writePolicy:YW(l,5)};this.BG.wp(l)}zg(){this.BG.zg()}XP(l){l=xpT(new TJ(l));this.BG.XP(l)}Df(l){l=PuC(new TJ(l));this.BG.Df(l)}tR(l){l=p9Q(new TJ(l));this.BG.tR(l)}cA(l){l={redirectUrl:En(new TJ(l),1)};this.BG.cA(l)}S(l){const y=c5(l,0);if(l.totalLength!==
1){({iG:l}=l.split(1));var k=this.C[y]||null;k&&this.BG.tf.Z(y,k,l)}}nB(l){l=c5(l,0);const y=this.C[l]||null;y&&this.BG.nB(l,y)}K(l){const y=l.eZ,k=l.NH,z=l.bY,r=l.f6,Z=l.WV,e=l.ke,A=l.startMs,Q=l.durationMs,t=l.timeRange,O=l.uR,d=l.ZZ,w=l.clipId,h=l.SS,U=I9(l);l=Mtg.has(i9[`${l.itag}`]);this.C[y]=U;let u=-1;A&&d&&t?.timescale&&(u=A/1E3+d/t.timescale);this.BG.Xu(U,l,u,{eZ:y,NH:!!k,bY:z??-1,ke:e??-1,startMs:A??-1,durationMs:Q??-1,uR:O,f6:r,WV:Z,clipId:w,timeRange:t,SS:h})}ZR(l){l={Vx:YW(new TJ(l),
1)};this.BG.ZR(l)}Gg(l){l={Vx:YW(new TJ(l),1)};this.BG.Gg(l)}RD(l){l=zf5(new TJ(l));this.BG.RD(l)}Ms(l){l={Mf:fG(new TJ(l),1,TxC)};this.BG.Ms(l)}onSnackbarMessage(l){l=YW(new TJ(l),1);this.BG.onSnackbarMessage(l)}kS(l){l=new TJ(l);l={reloadPlaybackParams:fG(l,1,yBz),Zw:KG(l,2)};this.BG.kS(l)}ao(){for(const {id:l,data:y}of this.Z)p3_(this,l,y);this.Z=[]}};var sJy=class extends g.zP{constructor(l){super();this.S=l;this.logger=new g.R9("onesie");this.lq=new Map;this.V=this.N=!1;this.rZ=this.Ej=null;this.J=!1}nx(){return Array.from(this.lq.keys())}gA(l){return this.lq.has(l)}Ts(l){this.lq.get(l).xW=!0}A(){let l=0;const y=this.nx();for(let k=0;k<y.length;k++)l+=this.lq.get(y[k])?.bytesReceived||0;return l}nD(l){l=this.lq.get(l);const y=l.Af;l.N1+=y.totalLength;l.Af=new IG;return y}AC(l){return this.lq.get(l).AC}cU(l){return this.lq.get(l).cU}Xu(l,y,k){this.lq.get(l)||
this.lq.set(l,{Af:new IG,N1:0,bytesReceived:0,HK:0,Io:!1,AC:!1,cU:!1,a9:y,hE:[],cF:[],Bt:[],xW:!1,fS:new Map,Nl:new Map,VW:new Map,u_:[]});y=this.lq.get(l);this.Ej?nX(this,l,k,y):(k.NH?y.HK=k.uR:y.Bt.push(k),y.hE.push(k))}Yh(l){return this.lq.get(l)?.cF||[]}Z(l,y,k){(y=this.lq.get(y))&&!y.AC&&(E2?(y.fS.has(l)||y.fS.set(l,{data:new IG,CL:0,bT:!1}),aG(y.fS.get(l).data,k)):aG(y.Af,k),y.bytesReceived+=k.totalLength,y.Io=!0)}E3(){for(const l of this.lq.values())if(l.Io){if(l.onProgress)l.onProgress();
l.Io=!1}}C(l){if((l=this.lq.get(l))&&!l.AC){l.AC=!0;if(l.onProgress)l.onProgress();a:{for(y of this.lq.values())if(!y.AC){var y=!1;break a}y=!0}y&&this.S.yH()}}nB(l,y){y=this.lq.get(y);E2?y&&!y.AC&&(y.fS.get(l)?y.fS.get(l).bT=!0:y.fS.set(l,{data:new IG,CL:0,bT:!0}),y.cU=!0):y&&!y.cU&&(y.cU=!0)}AV(l){if(E2){var y=this.lq.get(l);if(y)for(const [A,Q]of y.fS){const t=A,O=Q;var k=y.Nl.get(t),z=this.Ej?.V.get(l),r=z instanceof h6;if(this.rZ?.oY&&r){if(z?.Z()&&!k.length){k=t;z=l;var Z=y.VW.get(k);Z?(y.VW.delete(k),
k=nX(this,z,Z,y)):k=[]}if(!k.length)continue}if(!r&&KV(k[0])){if(!O.bT)continue;Z=k;r=O.data;k=0;z=[];for(const d of Z){Z=d.C;const w=il(r,k,Z);k+=Z;z.push(new kp(d,w))}y.u_.push(...z)}else if(O.data.totalLength>0||!k[0].range&&O.bT)r=void 0,k=k[0],z=O.CL,Z=O.data,k.range||(r=O.bT),r=new kp(CMQ(k,k.Z+z,Z.totalLength,r),Z),O.CL+=r.info.C,y.u_.push(r);y.fS.get(t).data=new IG;O.bT&&y.fS.delete(t)}l=this.lq.get(l);if(!l)return[];y=l.u_;l.u_=[];for(var e of y)l.N1+=e.info.C;return y||[]}e=this.lq.get(l)?.N4;
if(!e)return[];this.Nc(l,e);return e.AV()}LA(l){return E2?SV(this,l):!!this.lq.get(l)?.N4?.N3()?.length||SV(this,l)}Nc(l,y){for(;SV(this,l);){var k=this.nD(l);var z=l;z=this.lq.get(z).AC&&!jV(this,z);Ww(y,k,z&&j5t(this,l))}}K(){return this.J?!1:this.J=!0}D(){this.N=!0}Vj(){super.Vj();for(const l of this.lq.keys())this.C(l);if(this.rZ?.Wi)for(const l of this.lq.values())l.fS.clear(),l.Nl.clear(),l.VW.clear(),l.u_.length=0,l.cF.length=0,l.hE.length=0,l.Bt.length=0;this.lq.clear()}},E2=!1;var LNC=new Set([2]),oM=class extends g.zP{constructor(l,y,k,z,r,Z,e){super();this.policy=l;this.info=y;this.Ej=k;this.BG=r;this.logger=new g.R9("sabr");this.jE=new C1(this);this.D6=new NTC(this);this.tf=new sJy(this);this.state=1;this.gN=!1;this.f$=0;this.clipId="";this.segmentStartTimeMs=this.segmentNumber=-1;this.Iz=0;this.lx=-1;this.nt=this.sV=this.NQ=this.CC=!1;this.policy.Bc?this.Fz=new bz(this,Z):this.Fz=new cE(this,Z);this.gZ=this.policy.hv?y.JQ:oLC(y,this.policy,z);this.gZ.set("rn",`${this.y9()}`);
this.gZ.set("alr","yes");F6y(this.tf,k,l);this.RU=new nSq(this,this.policy,this.gZ,y.pP,this.Fz,this.logger,z,e,this.policy.enableServerDrivenRequestCancellation);zks(this.RU);this.policy?.Wi&&(g.x(this,this.tf),g.x(this,this.RU));l=y.C;y={method:"POST",body:l};l&&(this.Iz=l.length);try{this.xhr=qk(this.gZ,this.policy.K,this.Fz,MC,y),this.RU.C.start()}catch(A){g.WH(A)}}Ns(){!this.IR()&&this.xhr&&(this.Nc(!1),V5(this.BG,this))}LX(){}UG(){if(!this.IR()&&this.xhr){var l=this.Ct();l===5?(this.eV()===
"net.badstatus"&&this.BG.zI(),Tu(this.RU)):(this.BG.jB(),this.IU(l));this.RU.C.stop();this.w5?.stop()}}Ct(){let l="";Pw(this.RU,this.xhr)&&(l=Z0T(this.RU,this.xhr));if(l)return this.info.pP.Vs(this.gZ,l),3;this.Nc(!0);if(V1(this.RU,this.xhr.status,this.xhr.zS(),this.info.jr(),this.NQ))return 5;if(this.gN)return 3;rCP(this.RU,this.xhr.Mc(),0,this.jr());this.policy.SN&&EM_(this.BG);return 4}Nc(l){const y=this.xhr;!l&&Pw(this.RU,this.xhr)||!y.wg()||(l=y.oK(),this.jE.feed(l))}xH(l,y){this.xhr.iA()&&l===
21&&NiP(this);this.D6.xH(l,y)}bR(l,y,k,z){k||(this.Fz.bR(z),this.policy.XR&&l===21&&NiP(this));if(l!==21)return!1;this.Fz.sj=!0;l=y.totalLength;k||(this.lx=c5(y,0),y=y.split(1).iG);var r=this.policy.Lb;const Z=this.D6.C[this.lx],e=this.Ej.V.get(Z);if(r&&e&&(r*=e.info.CP,l+k!==z&&l<r))return!1;this.tf.Z(this.lx,Z,y);return!0}yB(l){this.policy.UR&&this.Fz.yB(l)}XP(l){this.BG.XP(l,this.y9())}Df(l){this.policy.enableServerDrivenRequestCancellation&&(this.w5?.dispose(),this.xL=l,l.oz&&(this.w5=new g.B_(this.VH,
l.oz,this)),this.VH())}VH(){if(this.xL?.items&&(this.w5?.start(),this.Fz.C>0)){this.policy.Cp&&this.RU.C.stop();var l=this.Fz.Oj(),y=this.Fz.g4(),k=s5s(this,l);y>k.If||k.vr>0&&this.info.U4()>k.vr||(this.f$=(0,g.f)(),this.w5?.stop(),this.policy.SN&&(k=this.BG,l={Rw:Math.round(y*l/1E3),RK:l},k.policy.SN&&(k.rb=l,k.wD++)),this.GN())}}GN(){this.RU.GN()}tR(l){this.BG.tR(l,this.y9())}cA(l){this.gN=!0;this.info.pP.Vs(this.gZ,l.redirectUrl)}ZR(l){this.Fz instanceof bz&&this.Fz.ZR(l)}Gg(l){this.Fz instanceof
bz&&this.Fz.Gg(l)}xI(l){var y=l.formatId;const k=new VC(l.RN?.first||0,l.RN?.Ka||0),z=new VC(l.indexRange?.first||0,l.indexRange?.Ka||0);if(!this.Ej.V.get(I9({itag:y.itag,lmt:y.lmt,xtags:y.xtags}))){var r=l.s4||{};r.mimeType=l.mimeType;r.itag=y.itag;r.lastModified=`${y.lmt||0}`;r.xtags=y.xtags;l=this.Ej;y=$E("");r=db(r,null);wb(l,new GQ(y,r,k,z))}}gD(l){this.BG.gD(l,this.y9())}onSnackbarMessage(l){if(this.policy.yP)this.BG.onSnackbarMessage(l)}CD(l){this.policy.J&&this.BG.CD(l,this.y9())}z4(l){this.eA=
l;this.RU.N=(0,g.f)();this.BG.z4(l)}xR(l){this.BG.xR(l)}Tg(l,y,k){this.BG.Tg(l,y,k)}wp(l){l.scope===2&&(this.WA=l);this.BG.wp(l)}zg(){this.CC=!0;this.BG.zg()}YS(l){this.policy.pf&&this.BG.YS(l)}Wt(l){this.BG.Wt(l,this.y9())}RD(l){l.G6===3&&(this.NQ=!0);this.BG.RD(l)}wV(l){this.policy.UR?this.Fz.wV(l):this.Fz.Xz((0,g.f)())}Ms(l){this.BG.Ms(l)}kS(l){this.BG.kS(l)}WC(l){this.BG.WC(l)}canRetry(){this.IR();return this.RU.canRetry(!1)}dispose(){this.IR()||(super.dispose(),this.RU.dispose(),this.w5?.dispose(),
this.IU(-1),this.tU())}IU(l){this.state=l;V5(this.BG,this)}jr(){return this.info.jr()}rE(){return this.CC}Bx(){return this.WA}Xu(l,y,k,z){k>=0&&this.BG.ul(k);z.clipId&&(this.clipId=z.clipId);this.policy.C&&!y&&(this.segmentNumber=z.ke,this.segmentStartTimeMs=z.startMs);this.info.isDecorated()&&(k=this.info,k=k.data?.Ov?.Ln?k.data.Ov.Ln:-1,k>=0&&k>z.ke&&this.BG.loader.Md("sdai",{skpsqmismatch:"1",stsq:k,rcvsq:z.ke,a:y}));this.tf.Xu(l,y,z);this.policy.DW&&this.eA&&this.Fz instanceof cE&&(k=this.eA.tB,
this.Fz.Xu(z.durationMs/1E3,y,k>0&&z.ke+1>=k));this.tf.Ts(l);this.BG.Xu(z)}nB(l,y){this.tf.nB(l,y)}kU(l){this.requestIdentifier=l}AV(l){return this.tf.AV(l)}Yh(l){return this.tf.Yh(l)}LA(l){return this.tf.LA(l)}nx(){return this.tf.nx()}Vb(){return 1}y9(){return this.Fz.requestNumber}E4(){return this.requestIdentifier}wZ(){return this.gZ.wZ()}yH(){this.tU()}tU(){this.Fz.deactivate();this.xhr?.abort()}isComplete(){return this.state>=3}BP(){return this.state===3}R2(){return this.state===5}g6(){return this.state===
4}by(){return this.isComplete()}Wo(){return this.state>=1}X4(){return this.policy.PF?this.RU.X4():0}cP(){this.policy.PF&&V5(this.BG,this)}l1(){return this.info.Z?.oH?.r5||0}ao(){this.Xj()&&!this.nt&&(this.nt=!0,this.D6.ao())}Xj(){const l=this.info.Z?.oH?.xr;return!!l&&LNC.has(l)}Kc(){return"SABR"}eV(){return this.RU.eV()}qG(){const l=ekC(this.RU);Object.assign(l,NXy(this.info));l.req="sabr";l.rn=this.y9();this.xhr?.status&&(l.rc=this.policy.Mg?this.xhr.status:this.xhr.status.toString());var y=this.xhr?.hC();
y&&(l.msg=y);this.f$&&(y=s5s(this,this.f$-this.Fz.vn()),l.letm=y.xQ,l.mrbps=y.If,l.mram=y.vr);return l}};var vSC=class{constructor(l){this.Z=l;this.D=this.rb=this.K=this.HG=this.V=this.J=this.C_=this.S=this.Ja=this.A=this.RR=this.b0=this.sj=this.Y=0;this.ticks={}}tick(l,y){this.ticks[l]=y?window.performance.timing.navigationStart+y:(0,g.f)()}};var BTC=class extends g.z1{constructor(l,y,k,z,r,Z){super();this.loader=l;this.Ej=y;this.policy=k;this.videoTrack=z;this.audioTrack=r;this.D=this.Z=null;this.J=this.S=NaN;this.K=0;this.A=NaN;this.m8=null;this.sj=this.b0=NaN;this.Ja=new Map;this.Y=this.N=this.V=NaN;this.d4={FIr:()=>this.C};
this.C=Z?1:0}T4(l,y,k,z){var r=!1;this.policy.C&&(r=k?this.sj===l.n_:this.b0===l.n_);if(this.m8&&z&&!r){z=[];r=[];let Z=[],e=void 0,A=0;y&&(z=y.Z,r=y.C,Z=y.V,e=y.N,A=y.vu,this.Md("sdai",{sq:l.n_,ssvicpns:z.join("."),ssvid:r.join(".")}));this.policy.C&&(k?this.sj=l.n_:this.b0=l.n_);this.m8.Z6(l.n_,l.startTime,z,r,Z,k,A,e)}this.policy.C?k&&(this.C===1&&Nk(this,5,"noad"),l.n_!==this.Z?.n_&&(Rke(this,l,y,k),isNaN(l.startTime)||ySy(this,l.n_,vw(this,l.startTime,l.n_),!!y,this.m8))):k&&Rke(this,l,y)}OL(l,
y,k){const z=this.videoTrack.oR.index.x3()<=y;this.Z={eI:l,n_:y,zQ:k};z&&s2(this,l,y)}zC(){this.m8&&this.m8.zC()}HG(l,y){if(this.C!==0&&y&&l.cF[0].q4()){var k=l.cF[0].n_,z=l.cF[0].V;l=l.isDecorated();ySy(this,k,z,l,y)}}C_(l,y){if(this.policy.sj?0:this.C===1||this.C===2)return!1;if(this.C!==0&&l===this.audioTrack){if(this.policy.C)return $vg(this.videoTrack,y)||$vg(this.videoTrack,y+1);l=Ky(this.videoTrack);if(y>(l?l.n_:-1))return!1}return!0}Md(l,y,k=!1){(l!=="sdai"||this.policy.bO||k)&&this.loader.Md(l,
y)}Pz(l,y){const k=this.videoTrack.oR.index.NL(l);if(k>=0){var z=y.iP(k,2)?.m5||"";if(this.policy.C||z)return y.A$(l,k),LX(this.loader,l,l,k),this.Md("sdai",{cmskpad:1,t:l.toFixed(3),sq:k}),!0}this.Md("sdai",{cmskpad:0,t:l.toFixed(3),sq:k});return!1}};var HhT=class{constructor(l,y,k,z){this.policy=l;this.Md=y;this.K=k;this.Z=z;this.V=void 0;this.C=new Set;this.S=-1;this.N=0;this.J=!1;this.d4={cfR:()=>this.C}}FP(l,y,k){let z=this.policy.Z$&&l.tileContext?`${l.Yq};${l.tileContext}`:l.Yq;
z||(z=Hw(this,this.V));this.Md("clsdai",{setadcfg:l.Yq||"misscid",cid:z,acpn:k,acfglen:y?.length||0});this.Z.has(z)||(this.Md("clsdai",{setadcfg:"noentry",cid:z}),this.Z.set(z,{event:"unknown",startTimeSecs:0,yK:0,GU:[],vv:Date.now(),Lm:-1,kF:6,jJ:l}));(l=this.Z.get(z))?y?(l.kF=6,l.GU.push(k),l.lz=y):l.kF=2:this.Md("clsdai",{setadcfg:"notfound",cid:z})}ED(l){const y=l||Hw(this,this.V);this.Md("clsdai",{rmvadcfg:l||"misscid",lastcid:Hw(this,this.V)});(l=this.Z.get(y))?(l.lz="",l.kF=4):this.Md("clsdai",
{rmadcfg:"notfound",cid:y})}CD(l,y,k,z,r){this.S=y;if(!((l.Oy?.length||0)<=0))if(z){if(this.N=z,this.Md("clsdai",{oncldisabled:z,rn:y}),this.N===3&&r)for(var Z of l.Oy)Z.eI&&Z.trackType===2&&jIz(r,z54(this,Z),Z.ke||0,!0)}else for(const A of l.Oy){if(l=A.eI)a:{let Q;l=z54(this,A);z=y;r=A.ke||0;Z=k;var e=this.policy.aI&&A.Q7?new AzP:void 0;if(!this.policy.Iv&&l.event==="prefetch"){l=!1;break a}const t=Hw(this,l);this.Z.has(t)?(Q=this.Z.get(t),r>Q.Lm&&(Q.startTimeSecs=l.startSecs,Q.yK=l.yK,Q.event===
"predictStart"&&Q.kF===5&&l.event!=="predictStart"&&(Q.vv=Date.now()),Q.event=l.event)):(Q={event:l.event,startTimeSecs:l.startSecs,yK:l.yK,GU:[],Lm:r,kF:0,jJ:{Yq:l.identifier,tileContext:l.tileContext}},this.Z.set(t,Q),this.policy.J&&this.Md("clsdai",{newcid:1,cid:l.identifier,tc:l.tileContext,evt:l.event,sn:r,rn:z,st:rSy(Q.kF)}));let O=!1;Q.kF===0&&(Z?.rN(l,e)?Q.kF=5:(Q.kF=Z?11:3,Q.lz="",O=!0),Q.vv=Date.now(),Q.Lm=r,this.policy.J&&this.Md("clsdai",{onqpnt:1,cid:l.identifier,tc:l.tileContext,evt:l.event,
sn:r,rn:z,st:rSy(Q.kF)}));r>Q.Lm&&(Z?.rN(l),Q.Lm=r);this.V=l;this.policy.J&&this.C.add(t);l=O}l&&(this.J=!0)}}C_(){this.C.clear();this.N=0;this.J=!1}A(){return this.J}D(l,y){if(this.N!==0){this.Md("clsdai",{gssinfodisabled:this.N});y=7;switch(this.N){case 1:y=7;break;case 2:y=9;break;case 3:y=10;break;default:this.Md("clsdai",{unknowndisr:this.N})}return[{kF:y}]}const k=[];if(!isNaN(l)){var z=Zw5(this,l),r=this.S+1;if(z.length>0){this.Md("clsdai",{updcids:1,mt:l.toFixed(3),cid:z.join(","),rn:r});
this.C.clear();for(const Z of z)this.C.add(Z)}else this.K&&(this.Md("clsdai",{updcids:0,mt:l.toFixed(3),rn:r}),this.C.clear())}for(const Z of this.C)r=Z,l=y,r?(z=this.Z.get(r),r={cuepointId:z?.jJ?.Yq||r.split(";")[0]},z?.lz&&(r.adsConfig=GC(z.lz)||void 0),z?.GU&&(r.GB=z.GU),z?.sf&&(r.Ln=z.sf),l&&(r.Mv=cZ(l.split(";")[0]),r.s5=l.split(";")[1]||""),r.kF=z?.kF||0,l=r):l=void 0,l&&k.push(l);return k}A$(l,y,k){var z=l;this.policy.J&&(z+=k);let r,Z="";z=Zw5(this,z);z.length>0&&(Z=z[0])&&(r=this.Z.get(Z));
if(!r||r.sf)return this.Md("clsdai",{skipadfail:1,cid:Z,sn:y,mt:l.toFixed(3),of:k.toFixed(3),skipsq:r?.sf||-1}),!1;this.Md("clsdai",{skipadsuc:1,cid:Z,sn:y,mt:l.toFixed(3),of:k.toFixed(3)});r.sf=y;this.C.clear();this.C.add(Z);return!0}OF(){this.Md("clsdai",{rstskipad:1});for(const l of this.Z.values())l.sf=NaN}Y(){let l=!1;for(const [,y]of this.Z.entries()){const k=y;k.event!=="predictStart"&&k.event!=="prefetch"&&k.kF===5&&(k?.vv&&Date.now()-k?.vv>1E4?k.kF=1:l=!0)}return l}};var za=class{constructor(l,y,k){this.audio=l;this.video=y;this.reason=k}},Z1=class{constructor(l,y,k,z){this.Z=l;this.reason=y;this.source=k;this.token=z}};var Rey=class extends g.zP{constructor(l,y,k){super();this.policy=l;this.C=y;this.Md=k;this.V=new Map;this.J=0;this.S=!1;this.Z="";this.N=!1}Ee(){return this.S&&RM(this).size>0}ww(l,y=!1,k={}){this.policy.IF=vV(l,k,this.C,y)}};var uz=class{constructor(l){this.Z=this.C=0;this.alpha=Math.exp(Math.log(.5)/l)}Tk(l,y){const k=this.alpha**l;this.Z=y*(1-k)+k*this.Z;this.C+=l}B1(){return this.Z/(1-this.alpha**this.C)}};var Daq=class{constructor(l,y,k,z,r,Z=[]){this.loader=l;this.b0=y;this.policy=k;this.Ej=z;this.S=r;this.RR=Z;this.logger=new g.R9("dash/abr");this.Z=Tj;this.N=this.K=null;this.D=-1;this.rb=!1;this.nextVideo=this.C=null;this.V=[];this.PG=new Set;this.HG={};this.gb=new uz(1);this.A=0;this.Xr=this.Y=this.C_=!1;this.sj=0;this.mK=!1;this.Ja=new Set;this.u0=!1;this.d4={iJ:()=>{lG(this)}};
this.J=new Rey(this.policy,r,(e,A)=>{this.loader.Md(e,A)})}G4(l){if(this.policy.KQ){var y=new Set(l);
y.size===this.Ja.size&&[...y].every(k=>this.Ja.has(k))||(this.loader.Md("lwnmow",{itagDenylist:[...l].join()}),this.loader.CR(!!y.size),this.D=-1,this.Ja=y,ki(this,this.Z),this.u0=!0)}}ww(l,y=!1,k={}){const z=this.policy.IF;
this.J.ww(l,y,k);z!==this.policy.IF&&(ki(this,this.Z),rE(this),z>this.policy.IF&&this.N?.info.Z()&&!this.nextVideo?.info.Z()&&(this.C_=!0))}};var xn={gH:-1,k0:!1,xr:0},lgx=class extends g.zP{constructor(l){super();this.bq=l;this.Z=null;this.C=xn;this.bq("ismp_i")}N(l=!0){l&&x$e(this);this.Z=null}Vj(){this.C=xn;this.N();super.Vj()}};var y5R=class{constructor(l){this.track=l;this.buffered=[];this.N=this.V=0;this.S={};this.J=0;this.Z=new UM}EG(l){this.timestampOffset=l;this.flush()}D(l,y){this.flush();this.C=y;$i(this,3,l)}A(l,y,k,z){!this.C||Mrt(this.C,l)&&this.C.n_===l.n_||this.flush();this.V+=k;this.N+=z;k=1;!this.C&&l.Z&&(k=2);$i(this,k,y);y=Math.ceil(l.Z/1024);k===2&&this.Z.add(y);this.Z.add(Math.ceil((l.Z+l.C)/1024)-y);this.C=l}C_(){$i(this,0)}K(){$i(this,4);this.flush()}flush(){if(this.Z.Z()){var l={a:this.track.a9(),u:this.Z.jb(),
pd:Math.round(this.V),ad:Math.round(this.N)},y=this.C;if(y){const k=y.oR.info;l.itag=k.itag;k.C&&(l.xtags=k.C);l.sq=y.n_;l.st=y.startTime;l.sd=y.duration;this.track.policy.Vl&&(l.si=y.rY());y.N&&(l.esl=y.Z+y.C);y.S()&&(l.eos=1)}isNaN(this.timestampOffset)||(l.to=this.timestampOffset);if(y=this.track.i5?.Dp({})){for(const k in y)this.S[k]!==y[k]&&(l["sb_"+k]=y[k]);this.S=y}this.track.Md("sbu",l);this.Z.reset();this.buffered=[];this.J=this.N=this.V=0;this.timestampOffset=this.C=void 0}}};var k5O=class{constructor(l,y,k){this.policy=l;this.Z=y;this.sj=k;this.V=this.C=0;this.Tv=null;this.C_=new Set;this.D=[];this.indexRange=this.initRange=null;this.A=new fA;this.Y=this.b0=!1;this.d4={gK_:()=>this.N,
tI_:()=>this.chunkSize,
ipb:()=>this.K,
fQr:()=>this.S};
(y=qNe(this))?(this.chunkSize=y.csz,this.N=Math.floor(y.clen/y.csz),this.K=y.ck,this.S=y.civ):(this.chunkSize=l.Ez,this.N=0,this.K=g.tW(16),this.S=g.tW(16));this.J=new Uint8Array(this.chunkSize);this.K&&this.S&&(this.crypto=new Shs(this.K,this.S))}dispose(){this.Y=!0}IR(){return this.Y}},Og=class extends Error{constructor(l){super(l)}};var ZEg=class{constructor(l,y,k,z,r,Z){this.ids=l;this.Z=y;this.C=k;this.V=z;this.N=r;this.vu=Z}};var X0=class{constructor(l,y,k){this.initData=l;this.contentType=y;this.isPrefetch=k;this.Z=this.cryptoPeriodIndex=NaN;this.N=[];this.Cg=!1;this.C=null;if(y?.toLowerCase()==="webm"||l.length===16)this.Cg=!0}};var Ec=class{constructor(l,y,{vY:k=!1,videoDuration:z=0,Ki:r,oW:Z=!1}={}){this.videoId=l;this.status=y;this.vY=k;this.videoDuration=z;this.Ki=r;this.oW=Z}},z_R=class{constructor(l,y,k,z,r){this.videoId=l;this.s4=y;this.C=k;this.bytesDownloaded=z;this.Z=r}};var fGP=class{constructor(l){this.C=l;this.offset=0}skip(l){this.offset+=l}Z(){return this.offset}};var r52=class{constructor(l,y,k){this.loader=l;this.policy=y;this.oR=k;this.logger=new g.R9("dash");this.C=[];this.Z=null;this.Y=-1;this.A=0;this.sj=NaN;this.D=0;this.N=NaN;this.K=this.HG=0;this.PG=-1;this.Ja=this.V=this.J=this.b0=null;this.Xr=this.u0=NaN;this.S=this.C_=this.rb=this.mK=null;this.gb=!1;this.RR=this.timestampOffset=0;this.d4={fW:()=>this.C};
if(this.policy.V){const z=this.oR,r=this.policy.V;this.policy.gb&&l.Md("atv",{ap:this.policy.gb});this.S=new k5O(this.policy,z,(Z,e,A)=>{l.Zr.AN(new Ec(this.policy.V,2,{Ki:new z_R(r,Z,z.info,e,A)}))});
this.S.A.promise.then(Z=>{this.S=null;Z===1?l.Zr.AN(new Ec(this.policy.V,Z)):this.loader.Md("offlineerr",{status:Z.toString()})},Z=>{const e=(Z.message||"none").replace(/[+]/g,"-").replace(/[^a-zA-Z0-9;.!_-]/g,"_");
Z instanceof Og?(this.loader.Md("offlinenwerr",{em:e}),ab(this),l.Zr.AN(new Ec(this.policy.V,4))):(this.loader.Md("dldbwerr",{em:e}),ab(this),l.Zr.AN(new Ec(this.policy.V,4,{oW:!0})))})}}fW(){return this.C}KB(){return this.C.length?this.C[this.C.length-1]:null}YF(){this.C=[];
Ug(this);ab(this)}nD(l){this.rb=this.C.shift().info;l.info.equals(this.rb)}Yh(){return g.sT(this.C,l=>l.info)}a9(){return!!this.oR.info.audio}isDrm(){return!!this.oR.info.contentProtection}getDuration(){return this.oR.index.nw()}};var wW=class extends jJe{constructor(l,y,k,z,r){super(k,r);this.policy=l;this.formatId=y;this.tf=z;this.lastError=null;this.onProgress=()=>{this.IR()||(this.tf.gA(this.formatId)?(this.isComplete()||this.Z.start(),SV(this.tf,this.formatId)&&this.E3(2),this.tf.AC(this.formatId)&&(j5t(this.tf,this.formatId)?this.IU(4):(this.lastError="net.closed",this.IU(5)))):(this.lastError="player.exception",this.IU(5)))};
this.Z=new g.B_(()=>{this.isComplete()||(this.lastError="net.timeout",this.IU(5))},1E3);
this.Z.start();gtz(this.tf,this.formatId,this.onProgress);g.o4(this.onProgress)}onStateChange(){this.IR()&&(fX(this.tf,this.formatId),this.Z.dispose())}qG(){return{expected:fhe(this.tf,this.formatId),received:this.tf.lq.get(this.formatId)?.bytesReceived||0,bytesShifted:this.tf.lq.get(this.formatId)?.N1||0,sliceLength:jV(this.tf,this.formatId),isAnyMediaEndReceived:this.tf.cU(this.formatId)}}EV(){return 0}MQ(){return!0}AV(){return this.tf.AV(this.formatId)}N3(){return[]}LA(){return this.tf.LA(this.formatId)}eV(){return this.lastError}X4(){return 0}};var ZCy=class extends g.zP{constructor(l,y,k,z){super();this.loader=l;this.policy=y;this.oR=k;this.timing=z;this.logger=new g.R9("dash");this.C=[];this.b0=[];this.Z=this.i5=null;this.rb=!1;this.HG=this.RR=0;this.J=-1;this.Y=!1;this.sj=-1;this.Ja=null;this.C_=NaN;this.D=[];this.d4={SU:()=>this.N,
nKd:()=>this.C,
GAK:()=>this.K};
this.N=new r52(l,y,k);this.policy.Z&&(this.K=new KNC(this.N,this.loader.getManifest(),this.policy,r=>{this.policy.jw&&this.Md("buftl",r)}));
this.policy.MW&&(this.A=new y5R(this));this.CP=k.info.CP;this.S=this.policy.b0?!1:k.sj();this.isManifestless=k.sj();this.V=this.S;g.x(this,this.Ja)}a9(){return!!this.oR.info.audio}KB(){return this.N.KB()}nD(l){this.N.nD(l);this.K?.sj(l);this.CP=Math.max(this.CP,l.info.oR.info.CP||0)}getDuration(){return this.oR.index.nw()}YF(){Gu(this);this.N.YF()}SU(){return this.N}i4(l){return this.i5?D4(this.i5.Za(),l):!0}isRequestPending(l){return this.C.length?l===this.C[this.C.length-1].info.cF[0].n_:!1}EG(l){this.K?.EG(l);
this.A?.EG(l)}Md(l,y){this.loader.Md(l,y)}o2(){return this.loader.o2()}dispose(){this.A?.flush();super.dispose()}};var C_g=class{constructor(){this.C2=!1}};g.MS_=class{constructor(l){this.Qj=l;this.K=new C_g;this.zr=this.kV=!1;this.xV=2;this.rb=20971520;this.Oj=8388608;this.Ja=120;this.ma=this.qg=this.Yl=2;this.Cp=this.Wb=!1;this.lR=1E3;this.T7=15;this.Ak=1;this.A=1.15;this.Y=1.05;this.Gz=1;this.LS=this.ji=!1;this.uW=6;this.N=!1;this.zw=100;this.pS=10;this.Xh=6;this.V9=!1;this.X_=1;this.iX=this.Cf=!1;this.zZ=2;this.OG=this.Wy=this.kK=!1;this.kz=!0;this.q_=this.Pd=this.f2=this.jN=!1;this.kE=!0;this.LZ=!1;this.V="";this.zA=[];this.dF=this.MW=!1;this.IF=
0;this.Q9="";this.Jp=this.On=this.jw=this.oy=this.I4=this.pf=this.S=this.Hu=this.RY=this.Z=this.gb=this.HG=this.IL=this.bG=this.D=this.Fg=this.bz=!1;this.TJ=!0;this.Qq=this.sS=this.e5=this.DY=this.d8=this.C=this.mK=!1;this.Xr=!0;this.MS=this.nj=this.vn=this.PF=this.pj=this.TC=this.Cd=this.DX=this.oY=this.hj=this.TD=this.b0=this.hk=this.xz=this.C_=!1;this.kC=0;this.Ky=this.J=this.hc=this.Xz=this.bO=this.sQ=!1;this.latencyClass="UNKNOWN";this.JI=!1;this.Uf=0;this.tA=this.Yr=!1;this.jW=g.i_(this.Qj.experiments,
"html5_min_readbehind_secs");this.uv=g.i_(this.Qj.experiments,"html5_min_readbehind_cap_secs");this.bI=this.Qj.X("html5_offline_reset_media_stream_on_unresumable_slices");this.CP=NaN;this.TZ=ny(this,"html5_request_size_min_kb",64)*1024;this.u0=2097152;this.vc=ny(this,"html5_bypass_contention_secs");this.Qk=1048576;this.O1=ny(this,"html5_repredict_interval_ms",1800);this.vM=ny(this,"html5_head_miss_secs",5);this.Ih=ny(this,"html5_min_upgrade_health_secs",10);this.PM=ny(this,"html5_min_seconds_between_format_selections",
8);this.qU=ny(this,"html5_max_buffer_health_for_downgrade_secs",15);this.hX=MC;this.PV=g.i_(this.Qj.experiments,"html5_min_startup_buffered_media_duration_secs");this.Tr=g.i_(this.Qj.experiments,"html5_post_interrupt_readahead");this.S$=this.Qj.X("html5_disable_classic_alr");this.rh=g.i_(this.Qj.experiments,"html5_probe_primary_delay_base_ms")||5E3;this.FD=ny(this,"html5_ssdai_failure_retry_limit",3);this.zz=this.Qj.experiments.z7("html5_clone_original_for_fallback_location");this.OA=g.i_(this.Qj.experiments,
"html5_subsegment_readahead_target_buffer_health_secs");this.eE=g.i_(this.Qj.experiments,"html5_subsegment_readahead_timeout_secs");this.yI=g.i_(this.Qj.experiments,"html5_subsegment_readahead_min_buffer_health_secs");this.CJ=g.i_(this.Qj.experiments,"html5_subsegment_readahead_min_buffer_health_secs_on_timeout");this.wL=g.i_(this.Qj.experiments,"html5_subsegment_readahead_min_load_speed");this.Gw=g.i_(this.Qj.experiments,"html5_subsegment_readahead_load_speed_check_interval");this.Iv=this.Qj.sA().Z.G7(i15);
this.lK=g.i_(this.Qj.experiments,"html5_subsegment_readahead_seek_latency_fudge");this.U7=ny(this,"html5_hopeless_secs",15);this.jk=this.Qj.X("html5_restrict_streaming_xhr_on_sqless_requests");this.U9=g.i_(this.Qj.experiments,"html5_max_headm_for_streaming_xhr");this.RI=this.Qj.X("html5_pipeline_manifestless_allow_nonstreaming");this.Sk=this.Qj.X("html5_prefer_server_bwe3");this.xu=this.Qj.X("html5_last_slice_transition");this.tP=this.Qj.X("html5_store_xhr_headers_readable");this.g8=g.i_(this.Qj.experiments,
"html5_max_drift_per_track_secs");this.F_=this.Qj.X("html5_no_placeholder_rollbacks");this.VI=this.Qj.X("html5_subsegment_readahead_enable_mffa");this.WG=this.Qj.X("html5_allow_video_keyframe_without_audio");this.OG=g.dU(this.Qj)&&!g.is()&&this.Qj.X("html5_adjust_media_time_for_non_cobalt_tv");this.NA=this.Qj.X("html5_enable_vp9_fairplay");this.Ez=1048576;this.gS=this.Qj.X("html5_woffle_resume");this.Ng=this.Qj.X("html5_abs_buffer_health");this.Y0=this.Qj.X("html5_interruption_resets_seeked_time");
this.KR=g.i_(this.Qj.experiments,"html5_max_live_dvr_window_plus_margin_secs")||46800;this.tE=this.Qj.X("html5_report_captions_ctmp_qoe");this.xC=this.Qj.X("html5_explicitly_dispose_xhr");this.Rv=!this.Qj.X("html5_encourage_array_coalescing");this.Qj.X("html5_limit_media_merge_size")?MC?hD()<21?this.wY=786432:this.wY=8388608:this.wY=262144:this.wY=0;this.e1=this.Qj.X("html5_filter_non_efficient_formats_for_safari");this.Qj.X("html5_format_hybridization");this.Hc=this.Qj.X("html5_abort_before_separate_init");
this.FB=bs();this.OE=this.Qj.X("html5_serialize_server_stitched_ad_request");this.JX=this.Qj.X("html5_attach_po_token_to_bandaid");this.fR=g.i_(this.Qj.experiments,"html5_max_redirect_response_length")||8192;this.tb=this.Qj.X("html5_rewrite_timestamps_for_webm");this.g4=this.Qj.X("html5_only_media_duration_for_discontinuities");this.f3=g.i_(this.Qj.experiments,"html5_resource_bad_status_delay_scaling")||1;this.Qj.X("html5_onesie_live");this.FM=g.i_(this.Qj.experiments,"html5_onesie_live_ttl_secs")||
8;this.Oi=g.i_(this.Qj.experiments,"html5_attach_num_random_bytes_to_bandaid");this.Vz=this.Qj.X("html5_update_container_type_on_codec_family_change");this.hv=this.Qj.X("html5_enable_sabr_host_fallback");this.DJ=this.Qj.supportsGaplessShorts();this.Gx=this.Qj.X("html5_shorts_stop_request_when_buffer_to_end");this.KN=this.Qj.X("html5_vod_stop_request_when_buffer_to_end");this.RR=this.Qj.X("html5_ssdai_use_post_for_media")&&this.Qj.X("gab_return_sabr_ssdai_config");this.Qz=this.Qj.X("html5_use_post_for_media");
this.BF=this.Qj.X("html5_use_live_ump_heartbeat");this.useUmp=this.Qj.X("html5_use_ump");this.qO=this.Qj.Fg;this.Aw=this.Qj.X("html5_reset_primary_stats_on_redirector_failure");this.Mg=this.Qj.X("html5_use_network_error_code_enums");this.enableServerDrivenRequestCancellation=this.Qj.X("html5_enable_server_driven_request_cancellation");this.Bc=this.Qj.X("html5_enable_sabr_request_timing");this.KQ=this.Qj.X("html5_enable_lawnmower");this.Um=this.Qj.yM()?g.i_(this.Qj.experiments,"html5_continuous_goodput_probe_interval_ms"):
0;this.V1=g.i_(this.Qj.experiments,"html5_jumbo_ull_nonstreaming_mffa_ms")||NaN;this.YM=g.i_(this.Qj.experiments,"html5_drm_byterate_soft_cap");this.Zs=g.i_(this.Qj.experiments,"html5_drm_live_byterate_soft_cap");this.S2=this.Qj.X("html5_sabr_log_request_creation");this.va=this.Qj.X("html5_use_buffer_timeline_for_sabr_request_creation");this.SN=this.Qj.X("html5_sabr_report_request_cancellation_info");this.j3=this.Qj.X("html5_spoof_4k");this.lr=ny(this,"html5_min_media_duration_for_cabr_slice");this.Lb=
ny(this,"html5_sabr_min_media_bytes_factor_to_append_for_stream")||.01;this.Uz=this.Qj.X("html5_consume_all_buffered_bytes_one_poll");this.X3=this.Qj.X("html5_disable_urgent_adaptation");this.pQ=this.Qj.X("html5_apply_constraints_in_client_for_sabr");this.zD=this.Qj.X("html5_send_video_playback_ustreamer_config");this.Ei=ny(this,"html5_max_discontinuity_rewrite_count");this.fD=ny(this,"html5_fixed_media_duration_for_request");this.V0=this.Qj.X("html5_apply_fix_for_missing_seg_info_without_logger");
this.Pd=this.Qj.X("html5_enable_audio_quality_setting");this.Qj.X("html5_enable_audio_quality_setting_feature");this.sR=ny(this,"html5_sabr_request_limit_per_period");this.Wi=this.Qj.X("html5_sabr_dispose_media_objects");this.vV=this.Qj.X("html5_fix_hbr_reselection_qoe_restart_for_sabr");this.Qj.X("html5_high_res_seek_logging");this.jD=this.Qj.X("html5_disable_chunk_synchronization_sabr_seek");this.Gr=g.i_(this.Qj.experiments,"html5_override_micro_discontinuities_threshold_ms");this.iR=this.Qj.X("html5_byterate_constraints");
this.yP=this.Qj.X("enable_sabr_snackbar_message");this.Qj.X("html5_reinit_source_buffer_by_new_element");this.Vl=this.Qj.X("html5_log_slice_info_in_sbu");this.R7=ny(this,"html5_paced_poll_ms");this.MA=ny(this,"html5_paced_poll_min_health_ms");this.nQ=this.Qj.X("html5_disable_sabr_fallback");this.Tw=this.Qj.X("html5_track_current_buffered_range_at_sync");this.vg=g.dU(this.Qj)?500:2E3;this.DW=this.Qj.X("html5_sabr_live_timing");this.LQ=this.Qj.X("html5_count_updating_slice_for_buffer_health");this.mN=
this.Qj.X("html5_report_max_buffer_bytes_limit_to_sabr");this.XR=this.Qj.X("html5_sabr_live_audio_early_return_fix");this.UE=g.i_(this.Qj.experiments,"html5_platform_max_buffer_health_oversend_duration_secs");this.Pc=this.Qj.X("html5_cuepoint_identifier_logging");this.NU=this.Qj.X("html5_sabr_log_server_xtag_selection_onesie_mismatch");this.qe=this.Qj.X("html5_skip_client_drm_license_constraint");this.bz=this.Qj.X("html5_pseudogapless_shorts_skip_abort_on_transition");this.Cd=this.Qj.X("html5_sabr_request_on_constraint");
this.K$=this.Qj.X("html5_live_metadata_resets_timeout");this.hc=this.Qj.X("html5_sabr_log_invalid_sabr_current_time");this.s6=this.Qj.X("html5_ssdai_new_decoration_logic");this.rS=this.Qj.X("html5_cuepoint_list_clear_on_seek");this.Wd=this.Qj.sA().Z.G7(ft);this.sj=this.Qj.sA().Z.G7(onq);this.G1=this.Qj.X("html5_ssdai_clear_backoff_on_cuepoint_list_resolved");this.Z$=this.Qj.sA().Z.G7(GUg);this.Uf=g.i_(this.Qj.experiments,"html5_sabr_unused_bloat_size_bytes");this.E9=this.Qj.sA().Z.G7(YRT);this.St=
this.Qj.X("html5_mta_initial_audio_prefer_drc");this.aI=this.Qj.sA().Z.G7(qRq);this.UR=this.Qj.X("html5_enable_sabr_network_timestamps_bwe");this.EE=this.Qj.X("html5_reinitialize_source_buffer_on_incompatible_codec_for_ssff")}PG(){return this.Z&&this.pf}};var V3z=class{constructor({iX:l,C2:y,rq:k,x3:z,lO:r}={}){this.iX=l;this.C2=y;this.rq=k;this.x3=z;this.lO=r}};var A52=class extends g.zP{constructor(l,y,k){super();this.loader=l;this.policy=y;this.o7=k;this.N=0;this.C=!1;this.delay=new g.B_(this.V,this.policy.Um,this);g.x(this,this.delay)}Z(l){ux(35,5726,l.Z)||(this.pP=l,this.N=0,this.delay.Kl())}V(){this.N++>15||(this.C=!this.C,new e_y(this.loader,this.policy,this.o7,this.pP,this.C),this.delay.start())}},e_y=class{constructor(l,y,k,z,r){this.loader=l;this.policy=y;this.o7=k;this.pP=z;this.ZW=r;this.done=!1;this.onTimeout=()=>{this.done||(this.done=!0,this.onError("net.timeout"))};
this.size=Math.ceil(Math.min(1E5,.1*AJ(this.o7)));this.timing=new cE(this,{o7:this.o7,aX:this.size,eP:!0,XF:()=>{},
Ad:this.policy.N});l=qO(this.pP,this.ZW,this.policy).Ww.clone();x2(62,6686,l);l["path"]!=="/videogoodput"&&(l["path"]="/videogoodput",l["url"]="");this.location=new ma(l);this.location.set("rn",`${this.timing.requestNumber}`);this.location.set("range",`0-${this.size-1}`);this.xhr=qk(this.location,this.policy.K,this.timing,this.policy.hX,{});setTimeout(this.onTimeout,1E4)}LX(){}Ns(){}UG(){if(!this.done)if(this.done=!0,this.xhr.status===200&&this.xhr.Mc()===this.size)this.loader.Md("rqs",this.getInfo());
else{var l="net.connect";this.xhr.status>200?l="net.badstatus":this.xhr.lQ()&&(l="net.closed");this.onError(l)}}onError(l){this.loader.handleError(l,this.getInfo());eV(`https://www.gstatic.com/ytlr/img/sign_in_avatar_default.png?rn=${this.timing.requestNumber}`,"gp",y=>{this.loader.Md("pathprobe",y)},y=>{this.loader.handleError(y.errorCode,y.details)})}getInfo(){const l=this.timing.D();
l.shost=wQ(1,4130,this.location.Ww);l.pb=this.size;return l}};var $t1=class extends g.zP{constructor(l,y,k,z,r,Z,e,A,Q,t,O,d,w=null){super();this.loader=l;this.policy=y;this.videoTrack=k;this.audioTrack=z;this.N=r;this.Z=Z;this.timing=e;this.V=A;this.schedule=Q;this.Ej=t;this.C=O;this.D=d;this.Oo=w;this.C_=!1;this.xn="";this.PZ=null;this.MV=NaN;this.Y=!1;this.m8=null;this.zV=this.A=NaN;this.Dk=this.J=0;this.logger=new g.R9("dash");this.d4={mU:(h,U)=>this.mU(h,U)};
this.policy.Oi>0&&(this.xn=g.tW(this.policy.Oi));this.policy.Um&&(this.K=new A52(this.loader,this.policy,this.schedule),g.x(this,this.K))}S(l,y){if(l.S){this.Ej.isLive?(l=this.Ej.Vi&&this.Ej.C?l.oR.J(this.Ej.Vi,!1):l.oR.S(Infinity),l.MV=this.MV):l=l.oR.J(0,!1);if(this.D){var k=this.D;l.MV===0&&(l.J=k.A)}else l.J=this.A;return l}var z=l.Z;if(!z.oR.Z())return z.oR.N()?(k=tJ(this.V,l.oR.info.CP,y.oR.info.CP,0),k=z.oR.Y(z,k)):k=z.oR.RR(z),k;var r=this.loader.getCurrentTime();r=isFinite(r)||!this.policy.Yr?
z.J-r:0;var Z=!z.range||z.C===0&&z.Z===0?0:z.range.length-(z.Z+z.C),e=z.oR;this.mU(l,r)&&Z===0&&(this.Ej.isManifestless?e=l.oR:(e=z.startTime+h3,z.C&&(e+=z.duration),U2(l,e),z=l.Z,e=z.oR));e.N()?(Z=this.C,y=tJ(this.V,e.info.CP,y.oR.info.CP,r,Z.V.length>0&&Z.A===0&&this.loader.F4),r=fy(l),l=z.oR.Y(z,y),(y=l.N)&&l.cF.length>1&&(r||l.pP.C||l.cF[0].oR!==z.oR?l=z.oR.Y(z,l.cF[0].C):(r=l.cF[l.cF.length-1],e=r.C/y,!r.N&&e<.4&&(l=z.oR.Y(z,y-r.C))))):(z.n_<0&&(y=fV(z),y.pr=`${l.C.length}`,this.loader.isSeeking()&&
(y.sk="1"),y.snss=z.K,this.loader.Md("nosq",y)),l=e.RR(z));if(this.policy.HG)for(k of l.cF)k.type=6;return l}mU(l,y){if(!fy(l)||!l.oR.Z())return!1;var k;(k=this.C.u0)||(k=fy(l)&&l.oR.Z()&&l.Z.oR.info.CP<l.oR.info.CP);return k||y<=this.policy.qU||this.C.C_}Vj(){super.Vj()}},h3=2/24;var QCR=class extends g.zP{constructor(l,y,k,z,r,Z,e,A){super();this.loader=l;this.rZ=y;this.videoTrack=k;this.audioTrack=z;this.Ej=r;this.C_=Z;this.isAudioOnly=e;this.A=A;this.C=Tj;this.sj=!1;this.logger=new g.R9("sabr");this.D=this.K=this.b0=this.Y=!1;this.videoInfos=this.S=this.C_.videoInfos;this.N=this.Ja=this.C_.C;this.Z=new Rey(y,Z,(Q,t)=>{this.loader.Md(Q,t)});
this.isAudioOnly&&Jsz(this,this.Ej.Z["0"])}OJ(l,y,k,z){this.loader.OJ(new Z1(l,this.C?.reason==="m"?"m":this.C?.reason==="s"?"s":this.C&&gLe(this,this.C)?this.C.reason:"a",k,z));Ly(this.loader,y,l,!0)}iJ(l,y){for(const k of this.Ja)if(k.id===l)return this.J=this.Ej.Z[l],this.rZ.PG()&&(this.Y=!0),l=new Z1(this.J,y?"t":"m"),y&&(this.K=!0),l;this.N=[];return null}ww(l,y=!1,k={}){this.Z.ww(l,y,k)}Ee(){return this.Z.Ee()}};var K8T=class{constructor(l,y,k){this.requestType=l;this.pP=y;this.BG=k;this.C=null;this.d4={xr:()=>this.data?.xr,
RL:()=>this.data?.RL,
uX:()=>this.data?.uX}}setData(l,y,k={}){y?.hv&&(this.JQ=oLC(this,y,k),l.Ld=this.pP.Ld());
if(this.jr())return!0;this.data=l;this.Z=nL5(l,(z,r)=>{this.BG?.vF(z,r)},y?.N,y?.J);
if(!this.Z)return!1;this.C=g.nG(this.Z,ef5);return!0}jr(){return this.requestType===1}U4(){return this.BG?.U4()||0}isDecorated(){return!(!this.data?.Ov&&!this.data?.KX?.length)}};var ts1=class{constructor(l){this.Z=l;this.iv=(0,g.aZ)(QD(16))}encrypt(l){(0,g.f)();return this.Z.Z?el(this,l,this.iv):(new Zd(this.Z.C)).encrypt(l,this.iv)}decrypt(l,y){(0,g.f)();return this.Z.Z?el(this,l,y):(new Zd(this.Z.C)).decrypt(l,y)}};var dtB=class extends g.zP{constructor(l){super();this.cG=l;this.Z=new Map;this.N=[];this.C=!O0();this.D=g.i_(this.cG.experiments,"html5_onesie_prewarm_interval_ms");this.A=new g.B_(this.K,this.D,this);this.S=-1;this.d4={Q4b:()=>this.Z,
UK0:()=>this.J,
rf0:()=>OC1};
g.x(this,this.A);y$z(this,g.Ay("yt-player-bandaid-host"));this.J=this.load();this.D&&this.J.then(()=>{this.K()})}C_(l){if(!((0,g.f)()<this.S+3E5||ux(5,5752,l))){var y=wQ(11,4136,l);
if(y&&r$Q(y)&&this.C===Q5(y)){var k;pR(32,4142,l)&&(k=wQ(34,4097,S3(l)));g.eY("yt-player-bandaid-host",{primary:y,secondary:k},864E3);this.S=(0,g.f)();y$z(this,{primary:y,secondary:k})}}}async load(){const l=this.Z.get(0);try{var y;if(!(y=!l||this.C)){var k=l.Z();y=this.C!==Q5(k)}if(y){const z=await t1(this,this.C?2:0);z&&(A1(this,0,z),pR(34,4140,z)&&A1(this,1,S3(z)))}}catch(z){if(g.WH(z),this.C){this.C=!1;await this.load();return}}if(this.cG.experiments.z7("html5_onesie_probe_ec_hosts"))try{A1(this,
3,await t1(this,1)),A1(this,4,await t1(this,2))}catch(z){g.WH(z)}}async K(){this.A.Kl();var l=g.i_(this.cG.experiments,"html5_onesie_prewarm_max_lact_ms");hW()>=l||(l=this.Z.get(0))&&Zby(this,l)}V(){const l=this.N;this.N=[];return l}},OC1={YB:0,O_b:1,Sje:2,G7e:3,pI:4,0:"PRIMARY",1:"SECONDARY",2:"RANDOM",3:"SENSITIVE_CONTENT",4:"C_YOUTUBE"},kkT=class{constructor(l,y){this.location=l;this.C=y}Z(){return wQ(2,4129,this.location)}};var wef=class{constructor(l){this.RZ=l;this.C=!1;this.Z=[]}async decrypt(l){if(!this.Z.length||this.Z[0].isEncrypted){this.C=!0;this.RZ.bq("omd_s");var y=new Uint8Array(16),k,z;for(O0()?k=new hA(l):z=new Zd(l);this.Z.length&&this.Z[0].isEncrypted;){var r=this.Z.shift(),Z=k?await k.decrypt(MB(r.buffer),y):z.decrypt(MB(r.buffer),y);for(l=0;l<y.length;l++)if(y[l]===255)y[l]=0;else{y[l]+=1;break}l=this.RZ;var e=r.videoId,A=r.eZ;r=r.formatId;Z=new IG([Z]);l.BG.kd?.get(e)?.Z(A,r,Z)}this.RZ.bq("omd_c");
dG(this);this.C=!1;this.RZ.Fa()}}enqueue(l,y,k,z,r){this.Z.push({videoId:l,eZ:y,formatId:k,buffer:z,isEncrypted:r});this.C||dG(this)}};var tv5,GZ,aF,eqg,UF,Mw,XQ,cY;tv5=!!Uint8Array.prototype.copyWithin;
g.ibs=class{constructor(l){this.data=l;this.Z=0;this.V=!1;this.N=0;this.error=!1;this.register=this.C=0;if(GZ.length===0){GZ.length=288;GZ.fill(8);for(l=144;l<280;l++)GZ[l]=l<=255?9:7;aF.length=32;aF.fill(5);Mw.length=286;Mw.fill(0);for(l=261;l<285;l++)Mw[l]=Math.floor((l-261)/4);UF[257]=3;for(l=258;l<285;l++){var y=UF[l-1];y+=1<<Mw[l-1];UF[l]=y}UF[285]=258;for(l=0;l<30;l++)cY[l]=l<=3?0:Math.floor((l-2)/2);XQ[0]=1;for(l=1;l<30;l++)y=XQ[l-1],y+=1<<cY[l-1],XQ[l]=y}l=100+7*this.data.length;this.data[0]===
31&&this.data[1]===139&&(l=(new DataView(this.data.buffer,this.data.byteOffset+this.data.length-4)).getUint32(0,!0),this.data=this.data.subarray(10,this.data.length-8));this.output=new Uint8Array(l)}};GZ=[];aF=[];eqg=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];UF=[];Mw=[];XQ=[];cY=[];var dNy=class{constructor(l,y,k){this.Z=l;this.context="oprgz2";this.Md=y;this.C=k}vF(l,y,k){this.Md("dcmprs",{i:this.Z,x:this.context,m:l,e:k?.toString(),t:y})}Al(l,y){PH(l,`${"dcmprs"}_${this.context}_${this.Z}_${y}`);g.WH(l)}};var bB="DecompressionStream"in window;var h_2=class extends FNQ{constructor(l){super("onesie",l);this.BG=l;this.Z={};this.V=!0;this.N=null;this.queue=new wef(this);this.A={}}Fa(){this.BG.Fa()}J(l,y){switch(l){case 10:var k=Vo(y,CuT);l=k.q9;let r=!1;switch(l){case 0:this.V=!k.sI.Su;this.iv=k.sI.iv;break;case 2:break;case 23:var z=this.BG;k=k.ej;z.bq("omp_r");k.videoId&&(z.uA=k.videoId);z.uA!==z.videoData.videoId&&(z.videoData.uv=z.uA,z.Md("ompp",`vid.${z.uA}`));z.qz=!0;break;case 24:z=this.BG;z.bq("omp_c");z.qz=!1;z.fZ=!1;k=z.kd?.get(z.uA);
z.notifySubscribers(z.uA);k?.D();xY(z);break;default:r=!0}this.BG.Pi&&this.BG.Md("ombup",`id.${10};pt.${l};len.${y.totalLength}${r?";ignored.1":""}`);this.N=l;break;case 11:UNy(this,y);break;case 12:this.S(y,!0);break;case 37:y=Vo(y,bWe);(y.VU||y.eh)&&y.videoId&&this.BG.Ig.set(y.videoId,y);break;case 60:this.lm(y);break;case 47:this.X("html5_server_playback_start_policy")&&(y=Vo(y,quz),this.BG.playbackStartPolicy=y);break;case 35:this.XP(y);break;case 45:this.gD(y);break;case 66:this.Ms(y);break;
default:this.BG.Pi&&this.BG.Md("ombup",`id.${l};len.${y.totalLength};ignored.1`)}}lm(l){l=Vo(l,Pt);this.BG.lm(l)}gD(l){l=Vo(l,J7);this.BG.gD(l)}K(l){const y=l.eZ,k=l.NH,z=l.bY,r=l.WV,Z=l.ke,e=l.startMs,A=l.durationMs,Q=l.timeRange,t=l.uR,O=l.SS,d=I9(l),w=Mtg.has(i9[`${l.itag}`]);k&&this.bq(w?"oais_r":"ovis_r");const h=this.Z[d]!==void 0;this.BG.Pi&&this.BG.Md("ombup",`id.${20};hid.${y};fid.${d}`);const U=l.videoId||"";this.C[y]=d;this.A[y]=U;h||(this.Z[d]={videoId:U,Di:!1,a9:w,headers:[]});this.Z[d].headers.push(l);
this.BG.Xu(U,d,w,{eZ:y,NH:!!k,bY:z??-1,ke:Z??-1,startMs:e??-1,durationMs:A??-1,uR:t??0,WV:r,timeRange:Q,SS:O})}S(l,y){const k=c5(l,0);this.BG.Pi&&this.BG.Md("ombup",`id.${y?12:21};len.${l.totalLength};hid.${k}`);if(l.totalLength!==1){({iG:l}=l.split(1));var z=this.C[k]||null,r=this.A[k]||"";z&&(this.GJ(this.Z[z].a9?"oafs_r":"ovfs_r"),this.queue.enqueue(r,k,z,l,y))}}nB(l){const y=c5(l,0);this.BG.Pi&&this.BG.Md("ombup",`id.${22};len.${l.totalLength};hid.${y}`);l=this.C[y]||null;const k=this.A[y]||"";
if(l)if(this.X("html5_use_ump_request_slicer")){var z=this.queue;z.Z.push({videoId:k,eZ:y,formatId:l,isEncrypted:!1,mH:!0});z.C||dG(z)}else this.BG.nB(k,y,l)}async tD(l,y){this.BG.tD();l=MB(l);y=y?await TQ_(this.BG,l,this.iv):l;this.BG.enableCompression&&(y=this.BG.O().sA().Z.G7(Jc5)?await $9z(MvP(this,y)):await X6_(this,y));try{var k=Vo(y,lMs)}catch(z){return k=z instanceof Error?{name:z.name,message:z.message}:{},k.webcrypto=`${+!!O0()}`,k.enc=`${+this.V}`,Promise.reject(new g.Gr("onesie.response.parse",
k))}y=k;if(y.tS!==1)throw new g.Gr("onesie.response.badproxystatus",{st:y.tS,webcrypto:!!O0(),textencoder:!!g.aC.TextEncoder});if(y.httpStatus!==200)throw new g.Gr("onesie.response.badstatus",{st:y.httpStatus});return g.xW(k.body)}XP(l){this.X("html5_consume_onesie_next_request_policy_for_sabr")&&(l=Vo(l,xpT),this.BG.XP(l))}Ms(l){l={Mf:fG(new TJ(l),1,TxC)};this.BG.Ms(l)}bq(l){this.BG.bq(l)}GJ(l){return this.BG.GJ(l)}X(l){return this.BG.X(l)}};var TZ=class extends g.zP{constructor(l,y,k){super();this.Zr=l;this.playerRequest=y;this.o7=k;this.logger=new g.R9("onesie");this.S4=[];this.JD=[];this.xhr=null;this.state=1;this.kN=new fA;this.Z9=!1;this.playerResponse="";this.jE=new C1(this);this.RZ=new h_2(this);this.uA="";this.dA=this.IN=!1;this.Mo="";this.enableCompression=this.qz=this.h8=!1;this.vy=[];this.segmentStartTimeMs=this.segmentNumber=-1;this.X$=0;this.cG=this.Zr.O();this.videoData=this.Zr.getVideoData();this.Pi=this.cG.yM();this.aO=
this.cG.PF;this.CZ=new ts1(this.aO.Z);this.yd=this.cG.X("html5_onesie_check_timeout");this.LO=new g.B_(this.LG,500,this);this.eK=new g.B_(this.Zo,1E4,this);this.eT=new g.B_(()=>{if(!this.isComplete()){const z=qw(this);this.fail(new g.Gr("net.timeout",z))}},1E3);
this.Tb=new g.B_(this.hm,2E3,this);this.dj=this.Zr.xO();this.fZ=this.X("html5_onesie_wait_for_media_availability");g.x(this.videoData,this);g.x(this,this.LO);g.x(this,this.eK);g.x(this,this.Tb);l=Q6();MC&&l&&(this.kd=new Map);this.Ig=new Map;this.Kr=new Map;this.SR=new Map;this.Mm=new Map}nx(l){return this.kd?.get(l)?.nx()||[]}LA(l,y){return!!this.kd?.get(y)?.LA(l)}AV(l,y){return this.kd?.get(y)?.AV(l)||[]}Yh(l,y){return this.kd?.get(y)?.Yh(l)||[]}jF(){return this.segmentStartTimeMs}IU(l){this.state=
l;this.notifySubscribers()}jr(){return!1}rE(){return!1}Bx(){}bq(l){this.Zr.bq(l)}GJ(l){return this.Zr.GJ(l)}bR(l,y,k,z){k||this.Fz.bR(z);return!1}xH(l,y){this.RZ.xH(l,y)}yY(){this.bq("orfb");this.dA=!0;if(VvC(this)&&this.xhr){var l={rc:this.xhr.status,lb:this.xhr.Mc(),rt:(1E3*siq(this.Fz)).toFixed(),shost:g.$7(this.Mo),trigger:"o1"};this.Md("pathprobe",wd(l))}}tD(){this.bq("opr_r");this.Z9=!0}Xu(l,y,k,z){this.JD.push(z);if(this.kd){if(!this.kd.has(l)){const r=new sJy(this);this.kd.set(l,r);g.x(this,
r)}this.kd.get(l)?.Xu(y,k,z);xY(this);k||(this.segmentNumber=z.ke,this.segmentStartTimeMs=z.startMs)}else xY(this)}f0(){return this.JD}K7(){this.JD=[]}z4(l){this.TR=l;l.J3!=null&&this.Zr.WU(l.J3)}lm(l){this.QB=l}XP(l){l.videoId&&this.Kr.set(l.videoId,l)}WC(l){if(l.url)for(const y of l.url)eV(y,"ump_prewarm")}Fa(){if(this.kd)for(const l of this.kd.keys())this.kd.get(l)?.E3()}gD(l){this.WQ=l}Ms(l){if(l?.Mf&&(l=l.Mf.ag))for(const y of l)y.videoId&&this.Mm.set(y.videoId,y)}CD(l){this.S4.push(l)}Md(l,
y,k=!1){this.Zr.Md(l,y,k)}nB(l,y,k){this.kd?.get(l)?.nB(y,k)}kU(l){this.SR.set(l.videoId,l)}async fetch(){this.yd?this.LO.start():this.eK.start();this.bq("or_i");const l=this.cG.experiments.z7("html5_onesie_verbose_timing")||this.cG.sA().Z.G7(Kd4)?this.bq.bind(this):()=>{};
l("oloc_ss");var y=CY5(this.videoData,this.dj);y||(l("oloc_sa"),y=g.i_(this.cG.experiments,"html5_onesie_redirector_timeout_ms"),y=await bbe(this.videoData,this.dj,y));if(!y)return this.fail(new g.Gr("onesie.unavailable.hotconfig",{url:"0"})),this.kN;this.JQ=wQ(8,4139,y);l("oloc_e");var k=g.jz(this.cG,this.videoData.S()),z=!!k.Z;k=z?await k.Z:k.getValue();this.X("html5_log_onesie_empty_oauth")&&!k&&this.Md("no_token",{async:z});z=xNC(this.playerRequest,this.cG,this.videoData,k,Q5(this.JQ));var r;
try{if(!this.cG.xz||this.cG.xz?.Z||z?.r8||(l("orqb_w"),(r=W8q(z,this.CZ,this.cG,this.Zr,this.o7,this.aO.onesieUstreamerConfig,this.videoData.b2?.lS,this.X("onesie_cdm_mosaic_send_audio_tracks_from_client")?this.playerRequest.playbackContext?.contentPlaybackContext?.compositeVideoContext?.defaultActiveSourceVideoId:void 0))&&this.Md("orpqenc",{i:"w"})),!r){var Z=I54(this,z),e=this.cG.sA().Z.G7(pEC);if(Z){l("orqb_a");let A=qas(z,this.CZ,this.cG,this.Zr,this.o7,this.aO.onesieUstreamerConfig,this.videoData.b2?.lS,
this.X("onesie_cdm_mosaic_send_audio_tracks_from_client")?this.playerRequest.playbackContext?.contentPlaybackContext?.compositeVideoContext?.defaultActiveSourceVideoId:void 0);if(e){const Q=new Promise((t,O)=>{setTimeout(()=>void O("timeout 10s"),1E4)});
A=Promise.race([A,Q]).catch(t=>{this.Md("orpqenc",{i:"a",e:`${t}`});l("orqb_f")})}r=await A;
!r&&e||this.Md("orpqenc",{i:"a"})}if(!Z||e&&!r)l("orqb_s"),r=mNq(z,this.CZ,this.cG,this.Zr,this.o7,this.aO.onesieUstreamerConfig,this.videoData.b2?.lS,this.X("onesie_cdm_mosaic_send_audio_tracks_from_client")?this.playerRequest.playbackContext?.contentPlaybackContext?.compositeVideoContext?.defaultActiveSourceVideoId:void 0),this.Md("orpqenc",{i:"j"})}}catch(A){return this.fail(A),this.kN}l("orqb_e");this.enableCompression=r.innertubeRequest.Zi;this.X$=r?.oH?.r5||0;this.bq("osor");Z=bEg();r={method:"POST",
body:g.nG(r,p_q),headers:{"Content-Type":"text/plain",Referer:location.origin}};e=this.X("html5_onesie_media_capabilities");umC(y,this.videoData,J$s(this),e);this.Pi&&this.Md("ombrs","1");this.Fz=new cE(this,{o7:this.o7,Ad:this.Pi,XF:(A,Q)=>{this.Zr.Eq(A,Q)},
Ae:!0});y.set("rn",`${this.Fz.requestNumber}`);this.Mo=y.wZ();FVs(this.Fz,this.Mo);this.bq("or_p");this.xhr=qk(new ma(y),Z,this.Fz,MC,r);this.Tb.start();this.Zr.onPlayerRequestSent(this.videoData.videoId);return this.kN}Vb(){return 2}LX(){this.bq("orh_r")}Ns(){!this.dA&&this.xhr.Mc()&&this.yY();this.h8&&!this.yd&&this.eT?.start();this.Nc()}UG(l=!1){this.Nc();if(!(this.IR()||this.state>=4)){var y=qw(this),k=this.xhr;y.rc=k.status;l&&(y.ab=!0);if(k.hC()){var z="onesie.net";y.msg=k.hC()}else k.status>=
400?z="onesie.net.badstatus":k.zS()?this.Z9||(z="onesie.response.noplayerresponse"):z=k.status===204?"onesie.net.nocontent":"onesie.net.connect";z?this.fail(new g.Gr(z,y)):(this.bq("or_fs"),this.Fz.PF((0,g.f)(),k.Mc(),0),this.IU(4),this.Pi&&this.Md("rqs",y));this.Pi&&this.Md("ombre",`ok.${+!z}`);this.fZ=!1;xY(this);uB(this.RZ);this.yd||(this.eK.stop(),this.eT?.stop());if(l=this.dj?.V())for(z=0;z<l.length;z++)this.Md("pathprobe",l[z])}}yH(){if(this.playerResponse&&this.xhr&&this.kd)for(const [,l]of this.kd.entries())if(l.V){this.xhr.abort();
this.UG(!0);break}}O(){return this.cG}X(l){return this.cG.X(l)}hm(){if(VvC(this)&&this.dj&&(!this.dA||this.X("html5_onesie_probe_ec_hosts"))){var l=this.dj;if(l.cG.experiments.z7("html5_onesie_probe_ec_hosts")){var y=l.Z.get(3)?.Z();y&&OF(l,y,"osc",this);(y=l.Z.get(4)?.Z())&&OF(l,y,"ocy",this)}else(y=l.Z.get(1)?.Z())&&OF(l,y,"o2",this),(y=l.Z.get(2)?.Z())&&OF(l,y,"o3",this)}}LG(){if(!this.IR()&&!this.isComplete()){if(this.h8){if((0,g.f)()-this.Fz.K>1E3){this.Fz?.WG((0,g.f)());const y=qw(this);if(this.Pi&&
this.xhr instanceof lhq){var l=this.xhr;y.xrs=l.xhr.readyState;y.xpb=l.Z.totalLength;y.xdc=l.V}this.fail(new g.Gr("net.timeout",y))}}else(this.Fz||!this.cG.sA().Z.G7(pEC))&&(0,g.f)()-this.Fz.Z>1E4&&(this.Fz?.WG((0,g.f)()),this.Zo());this.isComplete()||this.LO.start()}}Zo(){this.fZ=!1;if(!xY(this)){var l=qw(this);l.timeout="1";this.fail(new g.Gr("onesie.request",l))}}fail(l){l=ah(l);this.h8?this.Zr.ZQ(l):(this.kN.reject(l),this.h8=!0);uB(this.RZ);this.yd||this.eK.stop();this.bq("or_fe");this.dj?.V()?.forEach(y=>
{this.Md("pathprobe",y)});
this.IU(5);this.dispose()}isComplete(){return this.state>=3}g6(){return this.state===4}by(l){return this.isComplete()||!!this.kd?.get(l)?.N}BP(){return!1}R2(){return this.state===5}notifySubscribers(l){for(let y=0;y<this.vy.length;y++)l&&this.vy[y].Qi()!==l||V5(this.vy[y],this)}l1(){return this.X$}Vj(){this.playerResponse="";this.xhr?.abort();uB(this.RZ);this.jE.dispose();this.eT?.dispose();this.IU(-1);this.vy=[];this.K7();this.S4=[];super.Vj()}Nc(){try{const l=this.xhr;l.Mc()>102400&&!this.IN&&(this.bq("or100k"),
this.IN=!0);if(l.wg()){const y=l.oK(),k=y.totalLength;this.Pi&&this.Md("ombrss",`len.${k}`);this.jE.feed(y)}if(this.kd)for(const y of this.kd.keys())this.kd.get(y)?.E3(),this.notifySubscribers(y)}catch(l){this.fail(l)}}zx(l){return!!this.kd?.get(l)?.K()}y9(){return this.Fz.requestNumber}E4(l){return this.SR.get(l)}Xj(){return!1}Kc(){return"ONESIE"}};var G5w=class extends g.zP{constructor(l,y,k,z,r,Z,e,A,Q,t,O,d){super();this.Zr=l;this.loader=y;this.policy=k;this.audioTrack=z;this.videoTrack=r;this.Ej=Z;this.o7=e;this.WG=A;this.C=Q;this.timing=t;this.b0=O;this.A=d;this.Z=[];this.V={};this.PG=this.kz=!1;this.gb=this.wD=0;this.C9=!0;this.xz=this.gN=!1;this.C_=0;this.Y={jq:0,Ia:0};this.Oj={jq:0,Ia:0};this.m8=null;this.Ja={U1:[],E6:[]};this.HG={U1:[],E6:[]};this.S=null;this.J=[];this.RR=0;this.Xr=!1;this.d4={AfK:()=>this.Z,
hta:()=>this.V,
D_j:()=>{this.Z.length=0},
psb:()=>this.videoData.rb,
oKd:()=>this.C_,
rkj:w=>{this.C_=w},
LVr:w=>{this.Y.Ia=w},
Gy:w=>{this.S=w},
Mu:w=>{this.J=w},
qa:()=>this.qa()};
this.videoData=this.Zr.getVideoData();this.D=this.videoData.latencyClass==="LOW"?50:this.videoData.latencyClass==="ULTRALOW"?100:this.policy.sR;this.policy.Um&&(this.sj=new A52(this.loader,this.policy,this.o7),g.x(this,this.sj))}qa(l){var y=zj(this.loader)&&l&&l.gH!==void 0&&!l.k0?l.gH*1E3+(this.loader.w4()||0):J1(this);if(this.policy.va){var k=this.Ja;var z=this.HG}else k=p8(this,this.audioTrack),z=p8(this,this.videoTrack);var r=[...k.U1,...z.U1];gG(this)&&r.push(...this.J);var Z=[...k.E6,...z.E6];
const e=this.loader.RJ();if(this.policy.hc&&!this.videoData.isLivePlayback){var A=this.videoData.lengthSeconds*1E3;y>=A&&this.loader.Md("invalidSabrCmt",{cmt:y,vd:A})}A=this.o7;var Q=this.Zr,t=this.Ej,O=this.N,d=this.videoData.rb,w=this.policy,h=this.loader.WP,U=TX_(this.loader)*1E3,u=this.rb?.Rw,W=this.rb?.RK,V=this.wD,T=Number(this.C.V?.info.itag)||0,J=Number(this.C.J?.info.itag)||0,K=this.Zr.Hx();var Zg=l?.xr?l.xr:this.loader.isSuspended?4:void 0;y={o7:A,Zr:Q,Ej:t,U1:r,E6:Z,nL:y,nextRequestPolicy:O,
QC:d,rZ:w,bF:h,Is:U,Rw:u,RK:W,wD:V,MX:T,Zv:J,q3:e,yU:K,xr:Zg,C9:this.C9,IW:this.xz,gN:this.gN};r=this.loader.De();Z=GC(r);r&&(y.RL=Z);if(l=zj(this.loader)&&l?.k0?l.gH:this.Zr.gQ())y.uX=l*1E3;l=this.C;r=l.Y;if(l.rZ?.PG()&&!r)for(es of l.N)if(es.a7){r=!0;break}var es=l.rZ.PG()&&!r?[]:pmy(l,l.N);y.Oq=es;es=this.C;es.rZ.PG()&&!es.b0?es=[]:(l=Yxq(es),l.length===0&&(l=es.S),es=pmy(es,l));y.d5=es;y.G2=gG(this)?[this.S]:void 0;y.mR=Array.from(RM(this.C.Z).keys(),Number);y.Ee=this.C.Ee();this.policy.mN&&(y.XA=
HVQ(this.loader,this.audioTrack),y.ge=HVQ(this.loader,this.videoTrack));es=this.loader.getCurrentTime();k=YY(this,k.U1,es);z=YY(this,z.U1,es);this.RR=z=Math.min(k,z);this.policy.C&&(gG(this)&&(k=YY(this,this.J,es),this.Zr.yM()&&k<z&&this.loader.Md("sabrcfb",{met:z,cet:k,cbrl:this.J.length}),z=Math.min(z,k)),!this.policy.J&&(k=this.m8?.Fw(z)))&&(y.Ov=k);this.policy.J&&(k=this.videoData.zz[this.videoData.C?.containerType||0],z=this.loader.isSeeking()&&!this.loader.GO?z+this.loader.w4():NaN,y.KX=this.A?.D(z,
k),this.A?.C_());this.policy.D&&this.Z.length>0&&this.Z[0].rE()&&(y.lc=this.Z[0].Bx());return y}fB(l,y){this.K=void 0;EM_(this);vMP(this,l,y)}E8(l){if(this.Z.length===0)return!1;const y=this.Z[0];return y instanceof TZ?l===this.loader.getCurrentTime()*1E3:!(y instanceof oM&&y.info.Z?.oH?.uX)&&Math.abs(y.l1()-l)<50}XP(l,y){this.N=l;this.policy.C&&!l.playbackCookie&&this.loader.Md("sbrnocookie",{rn:y??-1});this.policy.G1&&this.A?.A()?this.loader.Md("clsdai",{ignbckoff:y??-1,backoff:l.backoffTimeMs??
-1}):this.K=(0,g.f)()+(l.backoffTimeMs||0)}tR(l,y){if(l.action===void 0)l=this.Zr.gQ(),l!==void 0&&this.loader.bA(l);else if(l.action!==0||!this.PG)if(l.action===0&&this.policy.nQ&&(l.action=2),l.Ao==="sabr.malformed_config"&&this.gb++<3)this.loader.handleError("sabr.malformed_config",{action:l.action,rn:y,retry:this.gb},0);else{var k={};k.reason=l.Ao;k.action=l.action;k.rn=y;switch(l.action){case 1:this.policy.C&&this.m8&&H4(this.m8,void 0,void 0,k);break;case 0:this.PG=!0;this.videoData.j2()&&this.policy.C&&
this.m8&&H4(this.m8,void 0,void 0,k,!1);this.loader.dE(k);break;case 2:eCs(l.Ao)!=="sabr.config"&&delete k.reason;this.loader.handleError(eCs(l.Ao),k,1);break;case 3:this.policy.hv&&(this.Ej.C_?.b0(),this.loader.handleError("sabr.hostfallback",k))}}}WC(l){if(l.url)for(const y of l.url)eV(y,"ump_prewarm")}wp(l){l&&(this.loader.Md("sabrctxt",{onsbrctxt:l.type,scp:l.scope,dflt:l.sendByDefault}),l.type&&l.sendByDefault&&this.videoData.rb.add(l.type),l.scope!==2&&(l.type&&this.videoData.sabrContextUpdates.set(l.type,
l),this.Zr.wp(l)))}zg(){}gD(l,y){if(this.loader.GO)this.loader.Md("sdai",{ignSabrSeek:1,smt:l?.sK,rn:y});else if(l.sK!==void 0&&l.YL){const k=l.sK/l.YL;this.audioTrack.S=!1;this.videoTrack.S=!1;if(this.policy.b0||this.policy.hk||this.policy.jD)this.loader.pE.Z=!1;this.Zr.getCurrentTime()!==k&&(y={gY:"sabr_seek",qQ:!0,c9:!0},l.seekSource&&(y.seekSource=l.seekSource),CX(this.loader,k+.1,y))}}onSnackbarMessage(l){this.Zr.publish("onSnackbarMessage",l)}CD(l,y){this.policy.J&&this.loader.CD(l,y)}z4(l){l.tB&&
l.Ox&&EE(this.Ej,l.tB,l.Ox);this.policy.d8&&(l.Re&&l.Uw&&(this.Ej.jK=l.Re/l.Uw),l.Cr&&l.M5&&(this.Ej.e3=l.Cr/l.M5));yi(this.videoData)&&!this.videoData.xa&&l.Ox&&this.loader.Q0(l.Ox,1E3);l.J3!=null&&this.Zr.WU(l.J3);l.MU&&(l=((0,g.f)()-l.MU)/1E3,this.loader.wh.Tk(1,l))}xR(l){this.loader.xR(l)}Xu(l){this.loader.Xu(l)}RD(l){this.loader.RD(l)}VB(l){return this.videoData.rb.has(l)}Tg(l,y,k){this.policy.N&&this.loader.Md("sabrctxtplc",{start:l?l.join("_"):"",stop:y?y.join("_"):"",discard:k?k.join("_"):
""});if(l)for(const z of l)this.videoData.rb.add(z);if(y)for(const z of y)this.videoData.rb.has(z)&&this.videoData.rb.delete(z);if(k)for(const z of k)if(this.videoData.sabrContextUpdates.has(z)&&this.videoData.sabrContextUpdates.delete(z),this.policy.D&&this.Z.length)for(const r of this.Z)r instanceof TZ||r.WA?.type!==z||(r.WA=void 0)}YS(){}Gy(l){this.S=l}Mu(l){this.J=l}Wt(l,y){F0(this.policy,l,4,y)}Ms(l){if(l?.Mf&&(l=l.Mf.ag))for(const y of l)y.formatId&&(l=this.Ej.V.get(I9(y.formatId)))&&l.info&&
(l.info.debugInfo=y.debugInfo)}kS(l){this.Xr=!0;this.Zr.publish("reloadplayer",l)}Qi(){return this.Zr.Qi()||""}U4(){const {Dm:l,Cb:y}=sEe(this);return Math.min(l,y)}vF(l,y){this.loader.Md(l,y)}GT(l){eg(this.loader,U$s(this.WG,l))}T7(){return{requestNumber:this.u0?.y9()||-1,isDecorated:this.u0?.info.isDecorated()}}ul(l){this.Zr.ul(l)}jB(){this.loader.jB()}zI(){this.loader.zI()}Vj(){super.Vj();this.N=void 0;vMP(this,!0,"i");this.Z=[]}};var ag2=class{constructor(l){this.Zr=l;this.Z=new Map;this.delay=null}getCurrentTime(){return this.Zr.getCurrentTime()-this.Zr.w4()}},iCo=class{constructor(l,y,k){this.V=l;this.cpn=y;this.Zr=k;this.Z=new Map;this.N=new Map;this.S=NaN;this.C=this.Ol="";this.isSeeking=!1;this.J=new ag2(k);this.Yw=k.Yw;this.Zr.subscribe("statechange",this.A,this);this.Zr.subscribe("SEEK_TO",()=>{this.DD()});
this.Zr.subscribe("SEEK_COMPLETE",()=>{yQg(this)});
this.Ol=this.C=this.cpn}A(l){ai(l.state)&&f8(this.J)}clear(){var l=this.J;l.delay?.dispose();l.Z.clear();this.N.clear();this.Z.clear();this.S=NaN}K(l,y,k=0){if(l!==this.S||this.Z.get(l)?.N!==y?.N)if(y?this.Z.set(l,y):this.Z.delete(l),!this.isSeeking){var z=this.V.getStartTime(l);this.S=l;zOT(this,l);if(y){let r=z;y.Z.forEach((Z,e)=>{r<z+k||(Z!==this.C&&rQs(this,l,Z,Z!==this.cpn?r-y.V[e]:r),r+=y.C[e])})}else this.C!==this.cpn&&rQs(this,l,this.cpn,z+k)}}DD(){this.isSeeking=!0;
var l=this.J;l.delay?.dispose();l.Z.clear();this.S=NaN;this.C=this.Ol}};var ZV5=class{constructor(l,y,k,z,r){this.loader=l;this.policy=y;this.schedule=k;this.oX=z;this.D=r;this.C_=NaN;this.C=this.K=this.V=null;this.Z=this.J=this.S=this.startTimeSecs=NaN;this.N=!1;this.A=NaN}mI(l,y){if(this.V)return tdz(this,y);if(y=Mk(l)){var k=y.Z;k&&k.V&&k.Z&&(l=l.C.length?l.C[0]:null)&&l.state>=2&&!l.R2()&&l.info.MV===0&&(this.V=l,this.K=k,this.C=y.info,this.S=this.startTimeSecs=Date.now()/1E3,this.J=this.C.startTime)}return NaN}clear(){this.C=this.K=this.V=null;this.Z=this.J=this.S=
this.startTimeSecs=NaN;this.N=!1}};var Ut1=class extends g.zP{constructor(){super();try{this.N=dOz(l=>{this.C=l.at(-1)}),this.J=this.N?.observe("cpu",{sampleInterval:2E3}).catch(l=>{l instanceof DOMException&&(this.Z=l)})}catch(l){l instanceof DOMException&&(this.Z=l)}}V(){const l={},y=window.h5vcc;
l.hwConcurrency=navigator.hardwareConcurrency;this.Z&&(l.cpe=this.Z.message);this.C&&(l.cpt=this.C.time,l.cps=this.C.state);y?.cVal&&(l.cb2s=y.cVal.getValue("CPU.Total.Usage.IntervalSeconds.2"),l.cb5s=y.cVal.getValue("CPU.Total.Usage.IntervalSeconds.5"),l.cb30s=y.cVal.getValue("CPU.Total.Usage.IntervalSeconds.30"));return l}Vj(){wyy(this);super.Vj()}};var hOC=/[?&]cpn=/;var Mse=class extends g.zP{constructor(){super();this.maxBufferSize=this.sampleInterval=100;this.J=iV4;this.Z=[];this.N=0;Mdz(this)}flush(){const l={};this.C&&(l.pe=this.C);this.Z.length>0&&(l.pt=this.Z.join("."));this.Z=[];return l}async stop(){try{const l=await this.V?.stop();l&&this.logTrace(l)}catch(l){this.C=UO5(l.message)}}logTrace(l){const y=[],k=[],z=[],r=[];let Z=0;for(const e of l.resources)y.push({id:Z,url:e}),Z++;Z=0;for(const {name:e,resourceId:A,line:Q,column:t}of l.frames)k.push({id:Z,
name:e,resourceId:A,line:Q,column:t}),Z++;Z=0;for(const {frameId:e,parentId:A}of l.stacks)r.push({id:Z,frameId:e,parentId:A}),Z++;Z=0;for(const {timestamp:e,stackId:A}of l.samples)z.push({id:Z,timestampMs:e,stackId:A}),Z++;l=g.px(g.nG({resources:y,frames:k,samples:z,stacks:r},Fws),4);this.N+=l.length;this.N<1E7&&this.Z.push(l)}Vj(){this.stop();super.Vj()}};var pyC=[2,5,30];g.lm=Pf(()=>{let l="";try{const y=g.Gf("CANVAS").getContext("webgl");y&&(y.getExtension("WEBGL_debug_renderer_info"),l=y.getParameter(37446),l=l.replace(/[ :]/g,"_"))}catch(y){}return l});g.md=class extends g.zP{constructor(l){super();this.provider=l;this.logger=new g.R9("qoe");this.Z=new Map;this.sequenceNumber=1;this.C_=NaN;this.fp="N";this.K=this.Tl=this.zl=this.D=this.N=0;this.hv=this.RR=this.HG=this.PF="";this.g4=this.rb=NaN;this.MW=0;this.SN=-1;this.R7=1;this.playTimeSecs=this.rebufferTimeSecs=0;this.xz=this.isEmbargoed=this.sj=this.isOffline=this.isBuffering=!1;this.BF=[];this.A=null;this.gb=this.J=this.b0=this.S=!1;this.V=-1;this.PG=!1;this.OA=new g.B_(this.vn,750,this);this.DI=
this.adCpn="";this.Pe=this.Uy=this.YV=this.W6=this.adFormat=void 0;this.Xz=0;this.q_=new Set("cl fexp drm drm_system drm_product ns adformat live cat shbpslc".split(" "));this.S2=new Set(["gd","pw","gp","gm","dd"]);this.serializedHouseBrandPlayerServiceLoggingContext="";this.Oj=!1;this.T7=NaN;this.Ja=0;this.kz=!1;this.remoteConnectedDevices=[];this.remoteControlMode=void 0;this.WG=!1;this.jN=new Set;this.mK=!1;this.d4={nZ:k=>{this.nZ(k)},
vK7:()=>this.C,
reportStats:()=>{this.reportStats()},
kAb:()=>this.Z.get("cat")||[],
p5:k=>this.Z.get(k)||[],
kv$:()=>this.Z,
Ase:()=>({adCpn:this.adCpn,DI:this.DI,adFormat:this.adFormat}),
ys0:()=>({W6:this.W6,YV:this.YV,Uy:this.Uy,Pe:this.Pe})};
this.Y=this.provider.cG.X("html5_qoe_relaxed_reporting");var y=g.i_(this.provider.cG.experiments,"html5_qoe_proto_mock_length");y&&!Dd.length&&(Dd=aP5(y));g.x(this,this.OA);try{navigator.getBattery?.().then(k=>{this.A=k})}catch{}g.Nw(this,0,"vps",["N"]);
l.cG.yM()&&(this.Ja=(0,g.f)(),this.T7=g.Yu(()=>{const k=(0,g.f)(),z=k-this.Ja;z>500&&this.Md("vmlock",{diff:z.toFixed()});this.Ja=k},250));
this.provider.videoData.N7&&(this.remoteControlMode=rzT[this.provider.videoData.N7]||0);this.provider.videoData.j5&&(y=evC(this.provider.videoData.j5),y?.length&&(this.remoteConnectedDevices=y));l.cG.yM()&&(this.Xr=new Ut1,g.x(this,this.Xr));l.cG.webPlayerContextConfig?.enableSelfProfilingLogging&&(this.u0=new Mse,g.x(this,this.u0))}vn(){const l=g.vY(this.provider);sF(this,l)}I8(){return this.q$}Bo(){return{zl:this.zl,Tl:this.Tl}}yr(l,y){this.zl=l;this.Tl=y}WU(l){if(!this.WG){this.WG=!0;var y="";
switch(l){case 1:y="proximaui";break;case 2:y=this.provider.videoData.Qj.getWebPlayerContextConfig()?.enableProximaLowLatency?"proximawpcc":this.provider.videoData.X("html5_enable_proxima")||this.provider.videoData.X("html5_sabr_force_proxima")?"proximaexp":"proximaclient";break;case 3:y="proximaauto"}y!==""&&RF(this,y)}}nX(l,y,k,z){if(!this.jN.has(l)){this.jN.add(l);var r=g.vY(this.provider);g.Nw(this,r,"lse",[l,y,k,z.toFixed(3)])}}Xp(l){oF(this,"lwc",[l.Vi?l.Vi.toFixed():"",l.wW?l.wW.toFixed():
"",l.iW?(l.iW*1E3).toFixed():"",l.Q4?(l.Q4*1E3).toFixed():"",l.Ob?(l.Ob*1E3).toFixed():""].join(":"))}reportStats(l=NaN){if(!this.IR()&&(l=l>=0?l:g.vY(this.provider),this.Y?XeL.has(this.fp)&&(this.Z.size||(this.fp==="PL"?l>=this.N+30:l<=this.D+30||l>=this.N+1200&&l<=this.D+86400))&&(g.Nw(this,l,"vps",[this.fp]),this.N=l):["PL","B","S"].indexOf(this.fp)>-1&&(this.Z.size||l>=this.N+30)&&(g.Nw(this,l,"vps",[this.fp]),this.N=l),this.Z.size)){this.sequenceNumber===7E3&&g.WH(Error("Sent over 7000 pings"));
if(!(this.sequenceNumber>=7E3)){BY(this,l);var y=this.provider.Zr.qm();for(const {key:Q,value:t}of y)this.Md(Q,t);y=l;var k=this.provider.Zr.j6(),z=k.droppedVideoFrames||0;const Z=k.totalVideoFrames||0,e=z-this.zl,A=Z&&!this.Tl;z>k.totalVideoFrames||e>5E3?SLz(this,"html5.badframedropcount",`df.${z};tf.${k.totalVideoFrames}`):(e>0||A)&&g.Nw(this,y,"df",[e]);this.zl=z;this.Tl=Z;this.K>0&&(g.Nw(this,l,"glf",[this.K]),this.K=0);$n.isActive()&&(l=$n.LW(),Object.keys(l).length>0&&this.Md("profile",l));
this.kz&&RF(this,"lwnmow");l={};this.provider.videoData.C&&(l.fmt=this.provider.videoData.C.itag,(y=this.provider.videoData.V)&&y.itag!==l.fmt&&(l.afmt=y.itag));l.cpn=this.provider.videoData.clientPlaybackNonce;this.W6?.length?l.adcpn=this.W6.join(","):this.adCpn&&(l.adcpn=this.adCpn);this.YV?.length?l.addocid=this.YV.join(","):this.DI.length&&(l.addocid=this.DI);k=this.provider.videoData;y=k.j2();k=k.latencyClass;(this.provider.cG.sA().Z.G7(cce)&&y&&k==="NORMAL"||this.provider.cG.sA().Z.G7(XE5)&&
y&&k==="LOW"||this.provider.cG.sA().Z.G7(MET)&&this.provider.videoData.isDaiEnabled()&&fN(this.provider.videoData))&&(l.adc=1);this.provider.videoData.cotn&&(l.cotn=this.provider.videoData.cotn);l.el=eS(this.provider.videoData);l.content_v=UK(this.provider.videoData);l.ns=this.provider.cG.C_;l.fexp=eyz(this.provider.cG.experiments).toString();l.cl=(880591072).toString();y=this.provider.videoData.adFormat||this.adFormat;this.Uy?.length?l.adformat=this.Uy.join(","):y&&(l.adformat=y);(y=RH(this.provider.videoData))&&
(l.live=y);this.provider.videoData.eb()&&(l.drm=1,this.provider.videoData.J&&(l.drm_system=w1P[this.provider.videoData.J.flavor]||0),this.provider.videoData.drmProduct&&(l.drm_product=this.provider.videoData.drmProduct));F8()&&this.provider.videoData.a4&&(l.ctt=this.provider.videoData.a4,l.cttype=this.provider.videoData.XT,this.provider.videoData.mdxEnvironment&&(l.mdx_environment=this.provider.videoData.mdxEnvironment));this.provider.videoData.isDaiEnabled()?(l.dai=this.provider.videoData.enableServerStitchedDai?
"ss":"cs",this.provider.videoData.fD&&(l.dai_fallback="1"),fN(this.provider.videoData)&&(l.dai="mv")):this.provider.videoData.Rj?l.dai="cs":this.provider.videoData.OW&&(l.dai="disabled");l.seq=this.sequenceNumber++;if(this.provider.videoData.Up){if(y=this.provider.videoData.Up,l&&y){y.ns==="3pp"&&(l.ns="3pp");this.S2.has(y.ns)&&RF(this,"hbps");y.shbpslc&&(this.serializedHouseBrandPlayerServiceLoggingContext=y.shbpslc);for(var r of Object.keys(y))this.q_.has(r)||(l[r]=y[r])}}else l.event="streamingstats",
l.docid=this.provider.videoData.videoId,l.ei=this.provider.videoData.eventId;this.isEmbargoed&&(l.embargoed="1");Object.assign(l,this.provider.cG.Z);(r=l.seq)&&!this.provider.cG.experiments.sA().Z.G7(IbC)&&(y=Fa_(this,+r),y=g.nG(y,hfC),y=g.px(y,4),this.Z.set("qclc",[y]));l=g.UI("//"+this.provider.cG.JX+"/api/stats/qoe",l);k=y="";for(const [Q,t]of this.Z.entries()){z=t;if(!z?.join)continue;z=`&${Q}=${z.join(",")}`;z.length>100?k+=z:y+=z}this.provider.cG.experiments.sA().Z.G7(IbC)&&(r=Fa_(this,+(r||
0)),r.qoePingUrl=l+y+k,g.wv("qoeClientLoggingContext",r),y+="&dl=1");o$s(this,l+y,k.replace(/ /g,"%20"))}this.Z.clear()}}CR(l){this.kz=l}hj(){if(this.provider.videoData.J){var l=this.provider.videoData.J;RF(this,`eme-${l.keySystemAccess?"final":R_(l)?"ms":y6(l)?"ytfp":lh(l)?"safarifp":"nonfinal"}`)}}zc(l){this.isEmbargoed=l}onPlaybackRateChange(l){const y=g.vY(this.provider);l&&l!==this.R7&&(g.Nw(this,y,"rate",[l]),this.R7=l);this.Y||this.reportStats(y)}getPlayerState(l){if(l.Z(128))return"ER";if(l.Z(2048))return"B";
if(l.Z(512))return"SU";if(l.Z(16)||l.Z(32))return"S";if(l.isOrWillBePlaying()&&l.Z(64))return"B";let y=c5O[xX(l)];g.dU(this.provider.cG)&&y==="B"&&this.provider.Zr.getVisibilityState()===3&&(y="SU");y==="B"&&l.Z(4)&&(y="PB");return y}Dy(l,y){const k=g.vY(this.provider);g.Nw(this,k,"vfi",[l==="A"?"":`${y??0}`,l])}Vj(){super.Vj();g.Kl(this.C_);g.Kl(this.T7)}nZ(l){this.isOffline=l;g.Nw(this,g.vY(this.provider),"is_offline",[this.isOffline?"1":"0"])}Md(l,y,k){const z=this.BF.indexOf(l)!==-1;z||this.BF.push(l);
if(!k||!z){y=typeof y!=="string"?wd(y):y;y=s9C(y);if(!k&&!/^t[.]/.test(y)){var r=g.vY(this.provider)*1E3;y=`t.${r.toFixed()};${y}`}oF(this,"ctmp",`${l}:${y}`);HY(this);return r}}S0(l,y,k){this.C={WY:Number(this.Md("glrem",{nst:l.toFixed(),rem:y.toFixed(),ca:+k})),mP:l,j_:y,isAd:k}}pD(l,y,k){g.Nw(this,g.vY(this.provider),"ad_playback",[l,y,k])}ID(l,y){const k=g.vY(this.provider)*1E3;oF(this,"daism",`t.${k.toFixed(0)};smw.${(l*1E3).toFixed(0)};smo.${(y*1E3).toFixed(0)}`)}resume(){isNaN(this.C_)?NFs(this):
this.C_=g.Yu(()=>{this.reportStats()},1E4)}};
g.md.prototype.nJ=yz(50);g.md.prototype.dT=yz(33);g.md.prototype.Rp=yz(27);g.md.prototype.Zh=yz(21);var c5O={[5]:"N",[-1]:"N",[3]:"B",[0]:"EN",[2]:"PA",[1]:"PL",[-1E3]:"ER",[1E3]:"N"},XeL=new Set(["PL","B","S"]),Dd=[];var Cas=class extends g.zP{constructor(l,y,k,z,r,Z,e,A=!1,Q,t){super();this.Zr=l;this.schedule=y;this.policy=k;this.Ej=z;this.C_=Q;this.Xz=t;this.bS=this.yj=null;this.rb=this.u0=this.RR=this.Y=0;this.F4=this.KL=this.isSuspended=!1;this.xz="";this.O1={};this.T7=NaN;this.WG=this.hv=this.xE=0;this.m8=null;this.MW=this.PG=!1;this.WP=0;this.Oj=!1;this.HG=this.kz=0;this.SN=null;this.PF=this.GO=!1;this.o2=()=>this.Zr.o2();
this.timing=new vSC(this.Xz);this.D=new pgC(this.schedule,this.policy);this.R7=new g.B_(this.mI,0,this);this.g4=new g.B_(this.mI,this.policy.R7,this);this.po=new g.B_(this.mI,1E3,this);this.q_=new g.B_(this.mI,void 0,this);this.gb=new g.B_(()=>{this.isSuspended||this.mI()},1E4,this);
this.jN=new g.B_(this.zA,250,this);this.K=this.currentTime=NaN;this.wh=new uz(5);this.Ja=this.timestampOffset=NaN;this.logger=new g.R9("dash");this.hj=Infinity;this.d4={TZj:()=>this.pE,
Yrb:()=>this.V,
getAudioTrack:()=>this.audioTrack,
tiK:()=>this.videoTrack,
Cae:()=>this.b0,
getManifest:()=>this.Ej,
ig_:()=>this.C,
mI:()=>{this.mI()},
dV:()=>{this.Y=0;this.dV()},
GJd:O=>A3(this,this.videoTrack,this.yj.C,O)};
l=Q&&Q.nx();Q&&(F6y(Q,this.Ej,this.policy),this.Ja=Date.now());this.Z=new Daq(this,this.D,k,this.Ej,r,l);k=GVt(this.Z,Z,e&&e.id);this.audioTrack=new ZCy(this,this.policy,k.audio,this.timing);this.videoTrack=new ZCy(this,this.policy,k.video,this.timing);this.videoTrack.N.b0=this.audioTrack.SU();this.mK={updateend:this.Cp,error:this.va};g.x(this,this.R7);g.x(this,this.g4);g.x(this,this.po);g.x(this,this.q_);g.x(this,this.gb);this.OA=m$P({C2:this.policy.K.C2,iX:this.policy.iX,hX:this.policy.hX});this.A=
eOq(this,this.policy,this.OA,this.schedule,this.wh,(O,d)=>ROg(this,O,d));
this.V=new BTC(this,this.Ej,this.policy,this.videoTrack,this.audioTrack,A);this.policy.J&&(A=this.Zr.getVideoData(),this.Md("clsdai",{initld:1,admapsz:A.bG?.size}),A.bG||(A.bG=new Map),this.b0=new HhT(this.policy,(O,d)=>{this.Md(O,d)},this.policy.rS,A.bG));
this.pE=new gST(this,this.Ej,this.videoTrack,this.audioTrack,this.policy);A=this.policy.zD?this.Zr.getVideoData().Oo:null;this.S=new $t1(this,this.policy,this.videoTrack,this.audioTrack,this.O1,this.V,this.timing,this.D,this.schedule,this.Ej,this.Z,this.A,A);g.x(this,this.S);this.J=new QCR(this,this.policy,this.videoTrack,this.audioTrack,this.Ej,r,gH(this.Zr.getVideoData()),e?.id);g.x(this,this.J);fqT(this.J,Z);this.C=new G5w(this.Zr,this,this.policy,this.audioTrack,this.videoTrack,this.Ej,this.schedule,
this.Z,this.J,this.timing,this.V,this.b0);g.x(this,this.C);this.N=this.Zr.E1.Ny.xj;this.policy.S||DOt(this);this.policy.Xz&&(this.vn=new iCo(this.videoTrack.oR.index,this.Zr.getVideoData().clientPlaybackNonce??"",this.Zr))}initialize(l,y,k){l=l||0;this.policy.Z||(y=Xv_(this.Z),rr(this.Zr,new Z1(y.video,y.reason)),this.Zr.yg(new Z1(y.audio,y.reason)));this.policy.Z&&y5(this);this.Ej.isManifestless&&P_5(this.S);this.A&&AQ5(this.A,this.videoTrack.oR);y=isNaN(this.getCurrentTime())?0:this.getCurrentTime();
let z=!this.Ej.isManifestless;this.policy.Qq&&(z=z||this.Ej.aj);if(!this.policy.C_||this.policy.xz)this.currentTime=z?l:y;this.policy.b0&&this.seek(this.getCurrentTime(),{}).Ya(()=>{});
this.policy.Z?this.N?.zx(this.Qi()||"")&&y6e(this)&&$I(this,this.videoTrack)&&$I(this,this.audioTrack)&&(BQT(this.C,this.N),this.policy.S&&DOt(this)):this.C_&&(kQT(this,this.videoTrack),kQT(this,this.audioTrack),Etz(this.C_),delete this.C_);k?(this.sj(!1),this.po.Kl()):(l=this.getCurrentTime()===0,sg(this.S,this.videoTrack,this.videoTrack.oR,l),sg(this.S,this.audioTrack,this.audioTrack.oR,l),this.policy.Z&&oMy(this.C,{xr:1}),this.policy.b0||this.seek(this.getCurrentTime(),{}).Ya(()=>{}),this.timing.tick("gv"));
(this.Ej.Vi||this.Ej.wW||this.Ej.iW||this.Ej.Q4||this.Ej.Ob)&&this.Zr.Xp(this.Ej)}sj(l){this.KL=l||this.Zr.O().X("html5_allow_multiview_tile_preload")&&this.Zr.getVideoData().SN;this.policy.HG||(this.isSuspended=!0,this.policy.On&&(this.po.stop(),this.g4.stop(),this.R7.stop()),this.gb.stop())}resume(){if(this.isSuspended||this.F4){this.KL=this.F4=this.isSuspended=!1;try{this.mI()}catch(l){g.n(l)}}}Zy(){return!this.policy.q_}Xr(l=!1){return Math.min(xi(this.audioTrack,l),xi(this.videoTrack,l))}Ux(l=
!1,y=!1){Z2T(this);this.Zr.Ly()&&(this.K=NaN);l?(this.policy.RR&&this.Md("loader",{setsmb:1}),this.policy.HG=!0,this.YF()):(this.sj(!1),y||this.YF())}setAudioTrack(l,y,k=!1){if(!this.IR()){var z=!isNaN(y);k&&z&&(this.audioTrack.C_=Date.now(),this.policy.TJ&&(this.Oj=!0));k=this.Zr.Ly()&&!this.Zr.getVideoData().A;if(this.policy.Z){var r=this.J.iJ(l.id,z);this.Zr.yg(r)}else r=this.Z,r.C=r.Ej.Z[l.id],r.K=r.C,r=new za(r.K,r.N,z?"t":"m"),this.Zr.yg(new Z1(r.audio,r.reason));z?(this.T7=Date.now(),z=this.audioTrack.oR.index.NL(y),
this.Md("setAudio",{id:l.id,cmt:y,sq:z}),z>=0&&(this.policy.Z&&this.fB(!0,"mosaic"),py(this.audioTrack,z,NaN,NaN),!this.policy.vn&&this.Ej.isLive&&gb(this.Ej,z,!1))):k||this.Zr.SZ()}}setPlaybackRate(l){l!==this.D.getPlaybackRate()&&this.D.setPlaybackRate(l)}rH(l){const y=this.C.S;this.C.Gy(l);this.Md("scfidc",{curr:I9(y),"new":I9(l)});l&&I9(l)!==I9(y)&&(this.fB(!0,"caption change"),this.LK())}Q_(l){this.C.Mu(l)}OJ(l){l.Z.info.a9()?this.Zr.yg(l):rr(this.Zr,l)}GT(l){gF(l.cF[l.cF.length-1])&&eg(this,
U$s(this.Z,l.cF[0].oR))}De(){return this.Zr.De()}RJ(){return this.Zr.RJ()}RD(l){this.Zr.O().yM()&&this.Md("sps",{status:l.G6||""});if(l.G6===1)this.xE=0;else if(l.G6===2||l.G6===3){let y=!1;l.G6===3&&(this.hj=l.lC??Infinity,this.xE+=1,(y=B4(this))&&this.U_(!0));this.Zr.C$(!0,y)}}xO(){return this.Zr.xO()}XJ(){return this.Zr.XJ()}bc(l){this.Zr.bc(l)}LK(){this.mI()}zA(){const l=this.Zr.fl()?.getCurrentTime();l?this.Zr.Md("rms",{cta:l}):this.jN.Kl()}mI(){t3(this);if(this.yj&&$X(this.yj)&&!this.yj.U6()&&
(!this.policy.C_||isFinite(this.getCurrentTime()))){var l=bG(this.videoTrack);l=this.policy.xu&&l&&l.S();this.Ej.isManifestless&&this.Ej.C&&PV(this.Ej)?(this.K=PV(this.Ej),this.yj.BZ(this.K)):f2(this.Ej)&&!l?(l=this.getCurrentTime(),this.policy.C_&&this.policy.xz&&this.Md("ssrDuration",{ld:this.A2(),lct:this.currentTime,vpd:this.getCurrentTime()},!0),isNaN(this.K)?(this.K=l+3600,this.yj.BZ(this.K)):this.K<=l+1800&&(this.K=Math.max(this.K+1800,l+3600),this.yj.BZ(this.K))):this.yj.isView||(l=Math.max(this.audioTrack.getDuration(),
this.videoTrack.getDuration()),(!isFinite(this.K)||this.K!==l)&&l>0&&(this.yj.BZ(l),this.K=l))}if(!this.IR())if(mE(this.Ej)&&this.Ej.R2()){var y=this.Ej;this.handleError("manifest.net.retryexhausted",y.WG?{rc:y.I9}:{rc:y.I9.toString()},1)}else if(this.policy.Z)a:{try{if(zj(this)&&this.bS){y=this.C;var k=this.bS;const U=k.Z;if(U){var z=y.Zr.gQ(),r=!0;z||(z=y.loader.getCurrentTime(),r=!1);{var Z=U,e=z;const u=r?y.Zr.Wz(e):e;if(y.loader.i4(u))var A=!1;else{var Q={t:e.toFixed(3),isUtc:r};c:{const W=y.Zr.Qi();
if(W){for(const V of[y.audioTrack,y.videoTrack]){const T=TI(V.oR,y.Ej.UA);z=Z?.Yh(T,W)||[];if(z.length===0||!qPt(new By(z),u)){var t=!1;break c}}t=!0}else t=!1}t?(y.loader.Md("prebuffer",Object.assign(Q,{inrange:1})),A=!0):(Z.info.Z?.oH?.uX?r&&(Z.info.Z?.oH?.uX||0)===e*1E3:!r&&(Z.info.Z?.oH?.r5||0)===e*1E3)?(y.loader.Md("prebuffer",Object.assign(Q,{match:1})),A=!0):A=!1}}A&&(y.Zr.bq("ismp_c"),y.Z.push(U),y.sj?.Z(U.info.pP),U.ao(),k.N(!1))}}IF(this.C);this.Ej.isManifestless&&this.policy.S&&cw(this.pE);
this.yj?.S()&&this.dV();oMy(this.C);if(zj(this)&&this.bS){var O=this.C,d=this.bS;const U=d.C.gH;if(U!==void 0&&U>=0){O.Zr.bq("ismp_a");var w=d.C;if(HbP(O,w)){var h=F8s(O,w);O.policy.sR>0&&O.Oj.Ia++;h&&(d.Z!==h&&(x$e(d),d.Z=h,d.C=xn),O.Zr.bq("ismp_rc"))}}}}catch(U){g.WH(U);if(U.message.includes("changeType")){this.Md("ctype",{exp:U.name,msg:U.message,s:U.stack});break a}this.handleError("fmt.unplayable",{exp:U.name,msg:U.message,s:U.stack,trg:"sabrslicerqt"},1)}Q_g(this);this.gb.Kl()}else if(!this.Ej.N||
!iEC(this.videoTrack)&&!iEC(this.audioTrack)||(this.videoTrack.V||this.audioTrack.V)&&this.policy.kz?y=!1:(this.YF(),this.Zr.seekTo(Infinity,{gY:"checkLoaderTracksSync",Q0:!0}),y=!0),!y){t3(this);this.Ej.isManifestless&&(Uv4(this.videoTrack),Uv4(this.audioTrack),cw(this.pE),(y=Mk(this.videoTrack))&&y.Z&&(y=y.Z.V&&!this.policy.iX,this.Md(y===this.policy.K.C2?"strm":"strmbug",{strm:y,sfmp4:this.policy.K.C2,dfs:this.policy.iX},!0)));if(this.yj)this.dV();else if(this.policy.V){y=!1;if(this.policy.Uz)for(r of[this.videoTrack,
this.audioTrack]){for(k=Mk(r);k&&r.KB()!==bG(r);k=Mk(r))r.nD(k);y=y||!!k}else(Z=Mk(this.videoTrack))&&this.videoTrack.nD(Z),(e=Mk(this.audioTrack))&&this.audioTrack.nD(e);Ib(this.videoTrack)&&Ib(this.audioTrack)||(Z||e||y)&&WY(this)}QB(this);sg(this.S,this.videoTrack,this.videoTrack.oR,!1);sg(this.S,this.audioTrack,this.audioTrack.oR,!1);if(!this.policy.X3&&(y=this.videoTrack,Q=this.audioTrack,(!this.yj||$X(this.yj)&&!this.policy.Wb)&&!this.pE.isSeeking()&&(this.policy.Z||fy(y)&&y.oR.Z()&&this.Z.C_)))a:{if(k=
this.getCurrentTime(),A=this.D,t=tJ(A,y.oR.info.CP,Q.oR.info.CP,0),Q=Q1(A.o7)+t/AJ(A.o7),k+=Math.max(Q,Q+A.policy.Ih-t/y.oR.info.CP),y.C.length){if(y.C[0].info.cF[0].startTime<=k)break a;Gu(y)}A=y.N;for(Q=A.C.length-1;Q>=0;Q--)A.C[Q].info.startTime>k&&A.C.pop();dvt(y);y.Z&&k<y.Z.startTime&&(y.HG=0,y.oR.Z()?y.Z=y.oR.S(k,!0).cF[0]:y.Z=null)}Iqz(this.S,this.videoTrack,this.audioTrack);Iqz(this.S,this.audioTrack,this.videoTrack);Q_g(this);this.A&&(y=this.A,y.V?(k=y.S+y.policy.Gw,y.N||(k=Math.min(k,y.startTimeSecs+
y.policy.eE)),y=Math.max(0,k*1E3-Date.now())):y=NaN,isNaN(y)||this.q_.Kl(y));this.gb.Kl()}}dE(l){this.Zr.dE(l)}dV(){if(this.yj){var l=this.yj.Z,y=this.yj.C;O2C(this,this.audioTrack);O2C(this,this.videoTrack);var k=d2y(this);if(k){if(this.policy.hX){if(!l.iO()){var z=Mk(this.audioTrack);if(z){if(!A3(this,this.audioTrack,l,z.info))return;wr(this,this.audioTrack,l,z)}}if(!y.iO()&&(l=Mk(this.videoTrack))){if(!A3(this,this.videoTrack,y,l.info))return;wr(this,this.videoTrack,y,l)}}this.Y||(this.Y=(0,g.f)(),
this.policy.N&&this.Md("apdps",{r:k}))}else{if(this.Y){k=this.Y;var r=(0,g.f)()-k;z=xi(this.audioTrack,!0)*1E3;const Z=xi(this.videoTrack,!0)*1E3;this.policy.N&&(this.Md("apdpe",{dur:r.toFixed(),abuf:z.toFixed(),vbuf:Z.toFixed()}),S$(this.policy)&&(r=O2(this.D),this.Md("sdps",{ct:k,ah:z.toFixed(),vh:Z.toFixed(),mr:dW(this.D,this.F4,r),bw:r.toFixed(),js:this.isSeeking(),re:+this.F4,ps:(this.policy.us||"").toString(),rn:(this.policy.L3||"").toString()})));this.Y=0}this.A&&(k=this.A.mI(this.audioTrack,
yS(this.yj.C.Za())))&&this.Zr.seekTo(k,{zf:!0,gY:"pollSubsegmentReadahead",Q0:!0});k=!1;aye(this,this.videoTrack,y)&&(k=!0,y=this.timing,y.J||(y.J=(0,g.f)(),g.TH("vda",y.J,y.Z),y.V&&(g.bw(),xF(4))),y=this.timing,y.rb||(y.rb=(0,g.f)(),g.TH("vrb_f",y.rb,y.Z)));if(this.yj&&!this.yj.AC()&&(aye(this,this.audioTrack,l)&&(k=!0,l=this.timing,l.V||(l.V=(0,g.f)(),g.TH("ada",l.V,l.Z),l.J&&(g.bw(),xF(4))),l=this.timing,l.D||(l.D=(0,g.f)(),g.TH("arb_f",l.D,l.Z))),!this.IR()&&this.yj)){!this.policy.q_&&Ib(this.videoTrack)&&
Ib(this.audioTrack)&&$X(this.yj)&&!this.yj.U6()&&(l=bG(this.audioTrack).oR,l===this.Ej.Z[l.info.id]&&(l=this.yj,$X(l)&&(l.yj?l.yj.endOfStream():l.py.webkitSourceEndOfStream(l.py.EOS_NO_ERROR)),l=this.schedule,o6T(hH(l)),l.Y=(0,g.f)(),l.C_=!0,this.nX("e")));if(l=k)l=this.yj,l=!(l.Z?l.Z.supports(0):AN());l&&WY(this)}}}}nX(l){if(this.Ej.isManifestless){var y=this.videoTrack.oR;if(y){var k=y.index.x3(),z=-1,r=-1;y.index instanceof OnC&&(z=y.index.Pm(),r=y.index.nw());this.Zr.nX(l,k,z,r)}}}BF(l){this.policy.C_&&
(this.K=l)}Cp(l){const y=l===this.yj?.Z?this.audioTrack:this.videoTrack;Mk(y)?.isLocked&&(this.Zr.O().yM()&&this.Md("eosl",{ounlock:Mk(y)?.info.rY()}),O_(this,l===this.yj?.Z));if(this.policy.TJ&&l===this.yj?.Z&&this.kz){const k=this.kz-this.getCurrentTime();this.Zr.Md("asl",{l:k,xtag:bG(this.audioTrack)?.oR.info.C});this.Oj=!1;this.kz=0}l.oZ()&&l.Za().length===0&&(l.J2(),this.yj&&!this.yj.oZ()&&(this.Zr.O().yM()&&this.Zr.Md("rms",{ld:"seek"}),this.yj.A=performance.now(),this.Zr.bU(),this.Zr.O().yM()&&
this.jN.Kl()));y.A?.C_();this.policy.R7?D9(this):this.mI()}va(l){if(this.yj){var y=bG(l===this.yj.Z?this.audioTrack:this.videoTrack);if(l=l.mL())for(let k=0;k<l.length;k++)this.Md("appendedbuffer",{i:k,b:g.px(l[k].subarray(0,4096),3)});l={};y&&(l=fV(y));l.trg="onappenderr";this.handleError("fmt.unplayable",l,1)}}Hd(l){this.Zr.Hd(l)}T4(l,y,k){k&&this.GO&&this.Md("sdai",{skipadsvi:1,rep:l.info.itag,sq:y.n_,acpn:k.Z.join("-"),avids:k.ids.join("-")});if(this.Ej.isManifestless){l=!!l.info.video;rsT(this,
y,k,l,!0);!this.policy.sj&&this.policy.Xz&&l&&this.vn?.K(y.n_,k);if(this.policy.C&&y.eI){const Z=y.eI||null;if(Z?.event!=="predictStart"){var {requestNumber:z,isDecorated:r}=this.C?.T7();l&&!r&&this.Md("sdai",{underdec:this.m8?.OC(Z),evt:Z?.event,id:Z?.identifier,sq:y.n_,mt:y.startTime.toFixed(3),stif:!!k,rn:z})}}this.policy.sj||(l=l?this.videoTrack:this.audioTrack,l.D.push({segmentNumber:y.n_,vX:k}),l.D.length>5&&l.D.shift(),y=y.n_,this.Zr.getVideoData()?.enableServerStitchedDai&&(k=csq(this.audioTrack,
y),l=csq(this.videoTrack,y),k!==0&&l!==0&&k!==l&&this.handleError("ssdai.avsync",{sq:y,a:k,v:l},0)))}}OL(l,y,k,z){l.info.video&&this.V.OL(y,k,z)}G4(l){this.Z.G4(l)}vI(){return this.m8}JR(){return this.videoTrack.S||this.audioTrack.S}seek(l,y){if(this.IR())return n6();if(this.JR())return n6("seeking to head");if(this.policy.b0&&!isFinite(l))return EXy(this.pE),g.SK(Infinity);t3(this);M15(this,l,!1,y.seekSource);y5(this);this.policy.Z||QB(this,l);this.yj&&this.yj.Z&&this.yj.C&&!this.Zr.getVideoData().pj&&
(this.yj.Z.isLocked()||this.yj.C.isLocked())&&this.Zr.SZ({reattachOnLockedBuffer:1,vsb:`${this.yj.C.isLocked()}`,asb:`${this.yj.Z.isLocked()}`});const k=this.getCurrentTime(),z=this.pE.seek(l,y);if(!this.policy.C_||this.policy.xz)this.currentTime=z;Bw(this.V,l,k,this.policy.TD&&!y.qQ);WY(this);return g.SK(z)}E8(l){return this.policy.Z&&this.C.E8(l)}VB(l){return this.C.VB(l)}fB(l,y){this.C.fB(l,y)}getCurrentTime(){if(this.policy.C_){const l=this.w4()||0;return this.Zr.getCurrentTime(!0)-l}return this.currentTime}A2(){return this.currentTime+
this.timestampOffset}RA(){return this.audioTrack.oR.info}Jr(){return this.videoTrack.oR.info}gj(){return this.audioTrack.oR.info.Dr}KY(){return this.videoTrack.oR.info.Dr}Vj(){try{this.Ux(),Gu(this.audioTrack),Gu(this.videoTrack),j$(this.audioTrack),j$(this.videoTrack),this.audioTrack.dispose(),this.videoTrack.dispose(),super.Vj()}catch(l){g.n(l)}}handleError(l,y,k=0){const z=h7(k);l==="fmt.unplayable"&&this.Ej.isLive&&(this.policy.hX=!1,K2(this.Ej));y=new g.Gr(l,y,k);g.mP(this);wd(y.details);this.Zr.handleError(y);
l!=="html5.invalidstate"&&y.errorCode!=="fmt.unplayable"&&l!=="fmt.unparseable"&&z&&this.dispose()}Dp(){var l=bG(this.audioTrack),y=bG(this.videoTrack);l={lct:this.getCurrentTime().toFixed(3),lsk:this.pE.isSeeking(),lmf:this.Z.Z.isLocked(),lbw:wN(this.schedule).toFixed(3),lhd:Q1(this.schedule).toFixed(3),lst:((this.schedule.K.B1()||0)*1E9).toFixed(3),laa:l?l.rY():"",lva:y?y.rY():"",lar:this.audioTrack.Z?this.audioTrack.Z.rY():"",lvr:this.videoTrack.Z?this.videoTrack.Z.rY():"",laq:`${Yi(this.audioTrack)}`,
lvq:`${Yi(this.videoTrack)}`};this.yj&&!this.yj.AC()&&this.yj.Z&&this.yj.C&&(l.lab=YR(this.yj.Z.Za()),l.lvb=YR(this.yj.C.Za()));this.Y&&(l.lapt=((0,g.f)()-this.Y).toFixed(0),l.lapr=d2y(this));this.RR&&(l.lapmabht=((0,g.f)()-this.RR).toFixed(0),l.lapmabh=io(this,this.audioTrack).toFixed(0));(y=this.C.mK)&&(l.reqBlocked=y);(y=this.C.hv)&&(l.lsrt=((0,g.f)()-y).toFixed(0));this.u0&&(l.lapmvbht=((0,g.f)()-this.u0).toFixed(0),l.lapmvbh=io(this,this.videoTrack).toFixed(0));this.rb&&(l.lapsdai=((0,g.f)()-
this.rb).toFixed(0));return l}wY(){return this.Z.Z}YF(){try{this.policy.Z&&this.C.fB(!1,"pending"),this.audioTrack.YF(),this.videoTrack.YF()}catch(l){g.n(l)}this.policy.V=""}i4(l){return this.videoTrack&&this.audioTrack?this.videoTrack.i4(l)&&this.audioTrack.i4(l):!0}oA(){return $_(this.D)}Md(l,y,k=!1){this.Zr.Md(l,y,k)}Qi(){return this.Zr.Qi()}Q0(l,y){l/=y;isNaN(this.timestampOffset)&&Gj(this,l-Math.min(l,this.policy.KR));let k=l-this.timestampOffset;k<0&&!this.PF&&(this.PF=!0,this.Md("neg_ts",{ts:k.toFixed(3),
offset:this.timestampOffset.toFixed(3),wnd:J6(this.Ej)||this.Ej.Vi?"1":"0"}),this.Zr.O().sA().Z.G7(dFz)&&(Gj(this,l-Math.min(l,this.policy.KR)),k=l-this.timestampOffset));return k*y}w4(){return this.timestampOffset}isSeeking(){return this.pE.isSeeking()}zC(){this.V.zC()}ww(l,y=!1,k={}){this.policy.Z?this.J.ww(l,y,k):this.Z.ww(l,y,k)}Fg(){this.policy.C&&this.GO&&(this.Md("sdai",{skipAdSked:"1"}),this.GO=!1)}Pz(l,y){if(this.policy.C&&(this.GO||this.isSeeking()))return this.Md("sdai",{ignoreSkip:"1",
isSkip:this.GO,isSeek:this.isSeeking(),t:l.toFixed(3)}),!1;const k=this.policy.C&&(this.policy.J||this.policy.s6),z=this.videoTrack.oR.index.NL(l);let r=!1;if(k){if(r=!!this.b0?.A$(l,z,this.timestampOffset))LX(this,l,l,z),this.m8&&this.m8?.A$(l,z)}else this.m8&&(r=!!this.V.Pz(l,this.m8));if(!r)return this.handleError("ad.skipfailed",{dec:!!this.m8,t:l.toFixed(3),sq:z}),!1;this.policy.C&&(this.Md("sdai",{skipAdStd:"1"}),this.GO=!0);this.policy.Xz&&this.vn?.clear();Gj(this,this.timestampOffset-y);WY(this);
this.policy.C&&(K2(this.Ej),j$(this.audioTrack),j$(this.videoTrack),this.YF());return!0}kK(){Gj(this,this.timestampOffset-1E3);var l=this.Ej;const y=new Set;for(const z in l.Z){const r=l.Z[z].index;var k=r.lO();k&&!y.has(k)&&(k.startTime+=1E3,k.endTime=k.startTime+k.duration,y.add(k));r.segments.length&&(k=r.segments[r.segments.length-1],r.segments=[],r.segments.push(k))}this.m8&&this.m8.OF();this.policy.s6&&this.policy.C&&this.b0?.OF();Bw(this.V,0,0,!0);this.GO=!1}getManifest(){return this.Ej}isOffline(){return!!this.Zr.getVideoData().cotn}Eq(l,
y){this.Zr.Eq(l,y)}RV(l,y){if(this.policy.Z)M15(this,l,!0,y),this.C.fB(!0,"utc"),this.LK();else if(y=this.Zr.getVideoData().Oo){var k=this.S;k.zV=l;k.Oo=y;Rb(this)}}bA(l){this.videoTrack.S=!1;this.audioTrack.S=!1;this.pE.Z=!1;this.Zr.bA(l)}JE(l){this.pE.JE(l-this.w4())}AI(){this.Zr.AI()}U_(l){l!==this.policy.I4&&((this.policy.I4=l)||this.mI())}SZ(l){this.Zr.SZ(l)}CR(l){this.Zr.CR(l)}FP(l,y,k){this.b0?.FP(l,y,k);this.policy.J&&(this.C.K=void 0,this.mI())}ED(l){this.b0?.ED(l)}Xu(l){this.policy.sj&&
this.Zr.getVideoData().UA()&&!l.SS&&(this.Md("liveUmpMissing",{segmentNum:l.ke,headerId:l.eZ,startMs:l.startMs,durationMs:l.durationMs}),this.policy.sj=!1)}CD(l,y){if(this.policy.J){const k=l.Oy?.[0],z=Xts(this.Zr.getVideoData());this.b0?.CD(l,y,this.m8||void 0,z,this.policy.Ky?this.Ej:void 0);this.Md("clidai",{onqlst:1,len:l.Oy?.length||0,rn:y,evt:kVy(k?.eI?.event),cid:k?.eI?.identifier||"null",sq:k?.ke||-1,trk:k?.trackType||"null",disr:z})}}xR(l){this.policy.sj&&this.m8?.xR(l)}prefetchKeyPlay(l,
y){zj(this)&&(this.bS||(this.bS=new lgx(k=>{this.Zr.bq(k)}),g.x(this,this.bS)),u2e(this.bS,{gH:l,
k0:y,xr:2}),this.mI())}zI(){this.hv++}jB(){this.hv=0}S2(){return this.Zr.getVideoData().A?(0,g.f)()-this.schedule.rb>3E5&&this.hv>=3:!this.schedule.rb}ji(){this.C.Y.Ia=0}I4(){this.C.K=void 0}};var CQe=class extends g.z1{};var bCR=class extends CQe{constructor(l,y,k,z){super();this.N=-1;this.Z={};this.V=new g.B_(this.J,0,this);g.x(this,this.V);this.C=new g.B_(()=>{this.IR()||(this.V.start(Math.random()*k),this.C.start(y))},l,this);
g.x(this,this.C);z.subscribe("fairplay_next_need_key_info",this.S,this)}S(l,y){if(l&&y){var k=Number(CY(l,"cpi"))*1+1;isNaN(k)||k<=0||k<this.N?(this.V.stop(),this.C.stop(),this.N=-1,this.Z={}):(k>this.N&&(this.N=k,g.DB(this.Z)||(this.Z={},this.V.stop(),this.C.stop())),this.Z[y]=l,this.C.Kl())}}J(){for(const r of Object.keys(this.Z)){var l=this.publish,y=this.N,k=g.ee(this.Z[r]),z=k[6];const Z=[];for(const e of z.split("&"))e.indexOf("cpi=")===0?Z.push("cpi="+y.toString()):e.indexOf("ek=")===0?Z.push("ek="+
g.am(r)):Z.push(e);k[6]="?"+Z.join("&");y="skd://"+k.slice(2).join("");z=y.length*2;k=new Uint8Array(z+4);k[0]=z%256;k[1]=(z-k[0])/256;for(z=0;z<y.length;++z)k[z*2+4]=y.charCodeAt(z);l.call(this,"rotated_need_key_info_ready",new X0(k,"fairplay",!0))}this.Z={}}Vj(){this.Z={};super.Vj()}};var uyR=class extends CQe{constructor(l,y){super();this.N=l;this.Z=[];this.C=new g.B_(()=>{this.publish("log_qoe",{wvagt:"timer",reqlen:this.Z?this.Z.length:-1});if(this.Z){if(this.Z.length>0){var k=this.Z.shift();b25(this,k.info)}this.Z.length>0&&(k=this.Z[0].time-(0,g.f)(),this.C.start(Math.max(0,k)))}},0);
g.x(this,this.C);y.subscribe("widevine_set_need_key_info",this.V,this)}V(l){var y;a:{if((y=l.cryptoPeriodIndex)&&this.Z.length>0)for(var k of this.Z)if(y===k.info.cryptoPeriodIndex){y=!0;break a}y=!1}if(!y){y=(0,g.f)();a:{k=l.cryptoPeriodIndex;if(!isNaN(k))for(z of this.N.values())if(Math.abs(z.cryptoPeriodIndex-k)<=1){var z=!0;break a}z=!1}z?(z=l.Z,z=Math.max(0,Math.random()*((isNaN(z)?120:z)-30))*1E3):z=0;this.publish("log_qoe",{wvagt:`delay.${z}`,cpi:l.cryptoPeriodIndex,reqlen:this.Z.length});
z<=0?b25(this,l):(this.Z.push({time:y+z,info:l}),this.C.Kl(z))}}Vj(){this.Z=[];super.Vj()}};var j_s=class{constructor(){({url:k,interval:y,retries:l}={});var l,y,k;this.url=k;this.interval=y;this.retries=l}};var x2T=class{constructor(l,y){this.statusCode=l;this.message=y;this.N=this.heartbeatParams=this.errorMessage=null;this.C=[];this.Z={};this.nextFairplayKeyId=null}},m2t={DRM_TRACK_TYPE_AUDIO:"AUDIO",DRM_TRACK_TYPE_SD:"SD",DRM_TRACK_TYPE_HD:"HD",DRM_TRACK_TYPE_UHD1:"UHD1"};var pV_=class extends g.zP{constructor(l,y,k="",z=!1){super();this.message=l;this.requestNumber=y;this.timer=k;this.C=z;this.onError=this.onSuccess=null;this.Z=new g.lD(5E3,2E4,.2)}};var xt1=class extends g.z1{constructor(l,y,k,z,r){super();this.videoData=l;this.cG=y;this.A=k;this.sessionId=z;this.u$=r;this.J={};this.cryptoPeriodIndex=NaN;this.url="";this.requestNumber=0;this.Y=this.b0=!1;this.V=null;this.sj=[];this.N=[];this.authorizedFormats=[];this.D=[];this.K=!1;this.Z={};this.status="";this.S=NaN;this.C=l.J;this.cryptoPeriodIndex=k.cryptoPeriodIndex;l={};Object.assign(l,this.cG.Z);l.cpn=this.videoData.clientPlaybackNonce;this.videoData.b0&&(l.vvt=this.videoData.b0,this.videoData.mdxEnvironment&&
(l.mdx_environment=this.videoData.mdxEnvironment));this.cG.sj&&(l.authuser=this.cG.sj);this.cG.pageId&&(l.pageid=this.cG.pageId);isNaN(this.cryptoPeriodIndex)||(l.cpi=this.cryptoPeriodIndex.toString());r=(r=/_(TV|STB|GAME|OTT|ATV|BDP)_/.exec(g.Xv()))?r[1]:"";r==="ATV"&&(l.cdt=r);this.J=l;this.J.session_id=z;this.C_=!0;this.C.flavor==="widevine"&&(this.J.hdr="1");this.C.flavor==="playready"&&(y=Number($f(y.experiments,"playready_first_play_expiration")),!isNaN(y)&&y>=0&&(this.J.mfpe=`${y}`),this.C_=
!1);y="";g.kf(this.C)?this.C.Z()?(z=k.C)&&(y="https://www.youtube.com/api/drm/fps?ek="+dRz(z)):(y=k.initData.subarray(4),y=new Uint16Array(y.buffer,y.byteOffset,y.byteLength/2),y=String.fromCharCode.apply(null,y).replace("skd://","https://")):y=this.C.N;this.baseUrl=y;this.fairplayKeyId=CY(this.baseUrl,"ek")||"";if(y=CY(this.baseUrl,"cpi")||"")this.cryptoPeriodIndex=Number(y);this.sj=k.Cg?[g.px(k.initData,4)]:k.N;im(this,{sessioninit:k.cryptoPeriodIndex});this.status="in"}SP(l){if(!(this.IR()||l.size<=
0)){var y={};l.forEach((k,z)=>{const r=Dy(this.C)?z:k;z=new Uint8Array(Dy(this.C)?k:z);Dy(this.C)&&vpz(z);k=g.px(z,4);vpz(z);z=g.px(z,4);this.Z[k]?this.Z[k].status=r:this.Z[z]?this.Z[z].status=r:this.Z[k]={type:"",status:r};Nb5(this,this.Z[k].type,y)});
s_4(this,",");im(this,{onkeystatuschange:1});this.status="kc";this.publish("keystatuseschange",this)}}error(l,y,k,z){this.IR()||(this.publish("licenseerror",l,y,k,z),l==="drm.provision"&&(l=(Date.now()-this.S)/1E3,this.S=NaN,this.publish("ctmp","provf",{et:l.toFixed(3)})));h7(y)&&this.dispose();this.u$&&(this.u$.dispose(),this.u$=void 0)}shouldRetry(l,y){return!l&&this.requestNumber===y.requestNumber}Vj(){this.Z={};super.Vj()}Dp(){const l={ctype:this.A.contentType||"",length:this.A.initData.length,
requestedKeyIds:this.sj,cryptoPeriodIndex:this.cryptoPeriodIndex};this.V&&(l.keyStatuses=this.Z);return l}getInfo(){let l=this.N.join();if(Xi(this)){const y=new Set;for(const k in this.Z)this.Z[k].status!=="usable"&&y.add(this.Z[k].type);l+=`/UKS.${Array.from(y)}`}return l+=`/${this.cryptoPeriodIndex}`}wZ(){return this.url}};var bm=class extends g.zP{constructor(l,y,k,z,r,Z=!1){super();this.element=l;this.A=y;this.initData=k;this.Z=z;this.C=r;this.b0=Z;this.sessionId="";this.K=this.S=this.N=this.J=null;this.V=new g.cI(this);g.x(this,this.V);Bby(this)}sj(l){if(this.J){var y=l.messageType||"license-request";this.J(new Uint8Array(l.message),y)}}SP(){this.K&&this.K(this.Z.keyStatuses)}onClosed(){this.IR()||g.G6("xboxone")&&this.N&&this.N("closedShouldNotRetry")}Y(l){this.J&&this.J(l.message,"license-request")}C_(l){if(this.N){if(this.C){var y=
this.C.error.code;l=this.C.error.systemCode}else y=l.errorCode,l=l.systemCode;this.N(`t.prefixedKeyError;c.${y};sc.${l}`,y,l)}}D(){this.S&&this.S()}update(l){if(this.Z)return this.Z.update(l).then(null,Dq(y=>{H2q(this,"t.update",y)}));
this.C?this.C.update(l):this.element.addKey?this.element.addKey(this.A.keySystem,l,this.initData,this.sessionId):this.element.webkitAddKey&&this.element.webkitAddKey(this.A.keySystem,l,this.initData,this.sessionId);return k9()}Vj(){this.Z&&(this.b0?this.Z.close().catch(g.WH):this.Z.close());this.element=null;super.Vj()}};var qF=class extends g.zP{constructor(l,y,k=!1){super();this.element=l;this.Z=y;this.S=k;this.J={};this.N=null;this.V=new g.cI(this);this.C=this.mediaKeys=null;this.K=Promise.resolve();g.x(this,this.V)}setServerCertificate(){return this.mediaKeys.setServerCertificate?this.Z.flavor==="widevine"&&this.Z.fn?this.mediaKeys.setServerCertificate(this.Z.fn):this.Z.Z()&&this.Z.Ze?this.mediaKeys.setServerCertificate(this.Z.Ze):null:null}createSession(l,y){let k=l.initData;if(this.Z.keySystemAccess){y&&y("createsession");
const z=this.mediaKeys.createSession();y6(this.Z)?k=yAg(k,this.Z.Ze):this.Z.Z()&&(k=C9Q(k)||new Uint8Array(0));y&&y("genreq");l=z.generateRequest(l.contentType,k);const r=new bm(null,null,null,z,null,this.S);l.then(()=>{y&&y("genreqsuccess")},Dq(Z=>{H2q(r,"t.generateRequest",Z)}));
return r}if(R_(this.Z))return lwe(this,k);if(lh(this.Z))return kCQ(this,k);this.element?.generateKeyRequest?this.element.generateKeyRequest(this.Z.keySystem,k):this.element?.webkitGenerateKeyRequest(this.Z.keySystem,k);return this.N=new bm(this.element,this.Z,k,null,null,this.S)}C_(l){const y=um(this,l);y&&y.Y(l)}D(l){const y=um(this,l);y&&y.C_(l)}A(l){const y=um(this,l);y&&y.D(l)}getMetrics(){let l=null;if(this.mediaKeys&&this.mediaKeys.getMetrics)try{l=this.mediaKeys.getMetrics()}catch{}return l}Vj(){this.C=
this.mediaKeys=null;this.N?.dispose();for(const l of Object.values(this.J))l.dispose();this.J={};super.Vj();delete this.element}};var WE=class{constructor(){this.keys=[];this.values=[]}get(l){l=this.findIndex(l);return l!==-1?this.values[l]:null}remove(l){l=this.findIndex(l);l!==-1&&(this.keys.splice(l,1),this.values.splice(l,1))}removeAll(){this.keys=[];this.values=[]}set(l,y){const k=this.findIndex(l);k!==-1?this.values[k]=y:(this.keys.push(l),this.values.push(y))}findIndex(l){return g.yL(this.keys,y=>g.u2(l,y))}};var U1t=class extends g.z1{constructor(l,y,k,z=null,r){super();this.element=l;this.videoData=y;this.cG=k;this.mediaElement=z;this.u$=r;this.V=[];this.u0=2;this.Oj=this.RR=!1;this.heartbeatParams=null;this.sj=this.C_=!1;this.J=null;this.rb=!1;this.Z=this.videoData.J;this.drmSessionId=this.videoData.drmSessionId||g.CU4();this.N=new Map;this.S=new WE;this.A=new WE;this.b0=new g.cI(this);this.D=this.cG.X("html5_eme_ignore_teardown_errors");(l=this.element)&&(l.addKey||l.webkitAddKey)||BV()||HV(k.experiments);
this.cG.X("html5_enable_vp9_fairplay")&&this.Z.Z()?k=kn:(k=this.videoData.Ac,k=this.Z.flavor==="fairplay"||k?Tj:kn);this.K=k;this.cG.sA().Z.G7(ho5)&&this.u$?(this.u$.mediaKeys||(this.u$.mediaKeys=new qF(this.element,this.Z,this.D)),this.mediaKeys=this.u$.mediaKeys):(this.mediaKeys=new qF(this.element,this.Z,this.D),g.x(this,this.mediaKeys));R_(this.Z)&&(this.Y=new qF(this.element,this.Z,this.D),g.x(this,this.Y));g.x(this,this.b0);k=this.element;this.Z.keySystemAccess?this.b0.j(k,"encrypted",this.WG):
rz(this.b0,k,R_(this.Z)?["msneedkey"]:["needkey","webkitneedkey"],this.T7);rA5(this);a:switch(l=this.Z,k=this.N,l.flavor){case "fairplay":hD()>19.2999?(k=l.cI,l=l.Yf,l>=k&&(l=k*.75),y=(k-l)*.5,k=new bCR(y,k,k-y-l,this)):k=null;break a;case "widevine":k=new uyR(k,this);break a;default:k=null}if(this.J=k)g.x(this,this.J),this.J.subscribe("rotated_need_key_info_ready",this.HG,this),this.J.subscribe("log_qoe",this.C,this);HV(this.cG.experiments);this.C({cks:this.Z.getInfo()})}WG(l){this.C({onecpt:1});
l.initData&&ecz(this,new Uint8Array(l.initData),l.initDataType)}T7(l){this.C({onndky:1});ecz(this,l.initData,l.contentType)}Hd(l){this.C({onneedkeyinfo:1});this.cG.X("html5_eme_loader_sync")&&(this.A.get(l.initData)||this.A.set(l.initData,l));ZAy(this,l)}HG(l){this.V.push(l);mD(this)}createSession(l){var y=AAP(this)?KZT(l):g.px(l.initData);this.N.get(y);this.sj=!0;l=new xt1(this.videoData,this.cG,l,this.drmSessionId,this.u$);this.N.set(y,l);l.subscribe("ctmp",this.PG,this);l.subscribe("keystatuseschange",
this.SP,this);l.subscribe("licenseerror",this.df,this);l.subscribe("newlicense",this.mK,this);l.subscribe("newsession",this.gb,this);l.subscribe("sessionready",this.xz,this);l.subscribe("fairplay_next_need_key_info",this.Xr,this);this.cG.X("html5_enable_vp9_fairplay")&&l.subscribe("qualitychange",this.Ja,this);l.subscribe("sabrlicenseconstraint",this.hv,this);y=this.mediaKeys;im(l,{createkeysession:1});l.status="gr";Jt("drm_gk_s",void 0,l.videoData.C_);l.url=Tbt(l);l.cG.sA().Z.G7(SET)&&l.u$?.Z&&l.u$?.licenseRequest?
(l.V=l.u$.Z,P9s(l,l.u$.Z,l.u$,l.u$.certificate),MI(l,l.u$.licenseRequest,"license-request")):(l.V=fys(l,y,l.u$?.certificate),g.x(l,l.V))}mK(l){this.IR()||(this.C({onnelcswhb:1}),l&&!this.heartbeatParams&&(this.heartbeatParams=l,this.publish("heartbeatparams",l)))}gb(){this.IR()||(this.C({newlcssn:1}),this.V.shift(),this.sj=!1,mD(this))}xz(){if(R_(this.Z)&&(this.C({onsnrdy:1}),this.u0--,this.u0===0)){var l=this.Y;l.element?.msSetMediaKeys?.(l.C)}}SP(l){if(!this.IR()){this.rb||(this.rb=!0,this.cG.yM()&&
$V_(this));this.C({onksch:1});var y=this.Ja;if(!Xi(l)&&g.eG&&l.C.keySystem==="com.microsoft.playready"&&navigator.requestMediaKeySystemAccess)var k="large";else{k=[];var z=!0;if(Xi(l))for(const Z of Object.keys(l.Z))l.Z[Z].status==="usable"&&k.push(l.Z[Z].type),l.Z[Z].status!=="unknown"&&(z=!1);if(!Xi(l)||z)k=l.N;k=np4(k);l.cG.sA().Z.G7(U_)&&l.u$?.certificate&&k<="large"&&l.N.length===0&&im(l,{best_qual:k},!0)}y.call(this,k);if(l.cG.X("html5_enable_vp9_fairplay")&&l.C.Z())var r=l.D;else{if(!Xi(l)){y=
{};for(r of l.N)Nb5(l,r,y)}r=l.authorizedFormats}this.videoData.authorizedFormats=r;this.publish("keystatuseschange",l)}}PG(l,y){this.IR()||this.publish("ctmp",l,y)}Xr(l,y){this.IR()||this.publish("fairplay_next_need_key_info",l,y)}df(l,y,k,z){this.IR()||(this.videoData.X("html5_log_drm_metrics_on_error")&&$V_(this),this.publish("licenseerror",l,y,k,z))}jp(){this.cG.sA().Z.G7(U_)&&this.u$?.certificate&&this.C({lic_qual_cap:this.K.Z},!0);return this.K}Ja(l){const y=g.m8("auto",l,!1,"l");if(this.videoData.Ac){if(this.K.equals(y))return}else if(Aiq(this.K,
l))return;this.K=y;this.publish("qualitychange");this.C({updtlq:l})}hv(l){this.videoData.sabrLicenseConstraint=l}Vj(){this.Z.keySystemAccess&&this.element&&!this.mediaElement?.BG?.Ly()&&(this.D?this.element.setMediaKeys(null).catch(g.WH):this.element.setMediaKeys(null));this.element=null;this.V=[];for(const l of this.N.values())l.unsubscribe("ctmp",this.PG,this),l.unsubscribe("keystatuseschange",this.SP,this),l.unsubscribe("licenseerror",this.df,this),l.unsubscribe("newlicense",this.mK,this),l.unsubscribe("newsession",
this.gb,this),l.unsubscribe("sessionready",this.xz,this),l.unsubscribe("fairplay_next_need_key_info",this.Xr,this),this.cG.X("html5_enable_vp9_fairplay")&&l.unsubscribe("qualitychange",this.Ja,this),l.dispose();this.N.clear();this.S.removeAll();this.A.removeAll();this.heartbeatParams=null;super.Vj()}Dp(){const l={systemInfo:this.Z.Dp(),sessions:[]};for(const y of this.N.values())l.sessions.push(y.Dp());return l}getInfo(){return this.N.size<=0?"no session":`${this.N.values().next().value.getInfo()}${this.J?
"/KR":""}`}C(l,y=!1){this.IR()||(wd(l),(this.cG.yM()||y)&&this.publish("ctmp","drmlog",l))}kz(){let l=void 0,y=void 0;for(const k of this.N.values())l||(l=LEq(k,"SD")),y||(y=LEq(k,"AUDIO"));this.C({sd:l,audio:y});return l==="output-restricted"||y==="output-restricted"}};var mt2=class extends g.zP{constructor(l){super();this.Zr=l;this.vt=0;this.C=this.J=!1;this.V=0;this.Qj=this.Zr.O();this.videoData=this.Zr.getVideoData();this.N=g.i_(this.Qj.experiments,"html5_delayed_retry_count");this.Z=new g.B_(()=>{this.Zr.Ed()},g.i_(this.Qj.experiments,"html5_delayed_retry_delay_ms"));
g.x(this,this.Z)}xf(){return!!this.vt}JN(){return this.C}handleError(l){hc5(this,l);if((l.errorCode!=="html5.invalidstate"&&l.errorCode!=="fmt.unplayable"&&l.errorCode!=="fmt.unparseable"||!qI(this,l.errorCode,l.details))&&!iAT(this,l)&&!UVC(this)){if(this.Qj.C_!=="yt"&&awP(this,l)&&this.videoData.wY&&(0,g.f)()/1E3>this.videoData.wY&&Y5(this.videoData)){var y=Object.assign({e:l.errorCode},l.details);y.stalesigexp="1";y.expire=Math.round(this.videoData.wY*1E3);y.init=Math.round(this.videoData.Lb);
y.now=Math.round((0,g.f)());l=new g.Gr(l.errorCode,y,2);this.Zr.jI(l.errorCode,2,"SIGNATURE_EXPIRED",wd(l.details))}if(h7(l.severity)){y=this.Zr.loader?.wY();let z;if(this.Qj.X("html5_use_network_error_code_enums"))if(GC4(l)&&y&&y.isLocked())var k="FORMAT_UNAVAILABLE";else this.Qj.S||l.errorCode!=="auth"||l.details.rc!==429?l.errorCode==="ump.spsrejectfailure"&&(k="HTML5_SPS_UMP_STATUS_REJECTED"):(k="TOO_MANY_REQUESTS",z="6");else GC4(l)&&y&&y.isLocked()?k="FORMAT_UNAVAILABLE":this.Qj.S||l.errorCode!==
"auth"||l.details.rc!=="429"?l.errorCode==="ump.spsrejectfailure"&&(k="HTML5_SPS_UMP_STATUS_REJECTED"):(k="TOO_MANY_REQUESTS",z="6");this.Zr.jI(l.errorCode,l.severity,k,wd(l.details),z)}else this.Zr.publish("nonfatalerror",l),k=/^pp/.test(this.videoData.clientPlaybackNonce),this.ZQ(l.errorCode,l.details),k&&l.errorCode==="manifest.net.connect"&&(l=`https://www.youtube.com/generate_204?cpn=${this.videoData.clientPlaybackNonce}&t=${(0,g.f)()}`,eV(l,"manifest",z=>{this.Md("pathprobe",z)},z=>{this.ZQ(z.errorCode,
z.details)}))}}Md(l,y){this.Zr.l5.Md(l,y)}ZQ(l,y){y=wd(y);
this.Zr.l5.ZQ(l,y)}};var bis=class{constructor(l,y,k,z,r){this.Z=l;this.reason=y;this.C=k;this.source=z;this.token=r}};var qTv=class{constructor(l,y,k,z){this.cG=l;this.Un=y;this.Zr=k;this.o7=z;this.A=this.S=this.Z=this.V=this.K=this.C=0;this.J=!1;this.D=g.i_(this.cG.experiments,"html5_displayed_frame_rate_downgrade_threshold")||45;this.N=new Map}JG(l){const y=Mz5(this);if(!l)return{C7:Tj,tJ:Tj,ZB:Tj,VA:Tj,NF:Tj,bB:Tj,ox:y};let k=Tj;if(W6(y)||this.X("html5_perf_cap_override_sticky"))k=J3(this,l);return{C7:k,tJ:Chg(this,l),ZB:XnC(this,l),VA:VB(this,l.videoData),NF:P7(this,l.videoData,l),bB:p5(this,l),ox:y}}F1(l){if(g.dU(this.cG)&&
fb(this.cG.J,vt.HEIGHT))var y=l.Z.videoInfos[0].video.qualityOrdinal;else{var k=this.sW(l.Z.Z());gH(l.videoData)||Qi(l.videoData);l=l.Z.videoInfos;if(l.length){var z=.85,r=l[0].video;r.projectionType!=="MESH"&&r.projectionType!=="EQUIRECTANGULAR"&&r.projectionType!=="EQUIRECTANGULAR_THREED_TOP_BOTTOM"||KA||(z=.45);r=g.i_(this.cG.experiments,"html5_viewport_undersend_maximum");for(let Z=0;Z<l.length;Z++){y=l[Z];const e=y.video;if(k===null||e.width*z<k.width&&e.height*z<k.height){r&&Z&&e.width<k.width*
r&&e.height<k.height*r&&(y=l[Z-1]);break}}k=y.video;y=new xM(0,y.itag==="93"?g.pk[Kk(k.width,k.height)]:k.qualityOrdinal,!1,"r")}else y=Tj;y=y.Z}y&&(y=Math.max(y,360));return new xM(0,y,!1,"r")}sW(l){let y;g.ih(this.cG)&&(y=window.screen&&window.screen.width?new g.Fn(window.screen.width,window.screen.height):null);y||(y=this.cG.V0?this.cG.V0.clone():this.Un.uI());(us||e$||l)&&y.scale(g.gU());return y}X(l){return this.cG.X(l)}};var IgB=class extends g.zP{constructor(l){super();this.provider=l;this.Z=-1;this.J=!1;this.C=-1;this.playerState=new g.U5;this.networkErrorCount=this.rebufferTimeSecs=this.playTimeSecs=this.V=0;this.encounteredSabrFallback=!1;this.seekCount=this.nonNetworkErrorCount=0;this.delay=new g.B_(this.send,6E4,this);this.N=!1;this.jsErrorCount=0;this.d4={mO:()=>{this.mO()}};
this.mO=()=>{this.jsErrorCount++};
g.x(this,this.delay);window.addEventListener("error",this.mO);window.addEventListener("unhandledrejection",this.mO)}Eb(){const l=g.vY(this.provider);this.Z<0&&(this.Z=l,this.delay.start());this.V=this.C=l}onError(l){if(l!=="player.fatalexception"||this.provider.X("html5_exception_to_health"))l==="sabr.fallback"&&(this.encounteredSabrFallback=!0),l.match(WPe)?this.networkErrorCount++:this.nonNetworkErrorCount++}send(){if(!(this.N||this.Z<0)){VzP(this);var l=g.vY(this.provider)-this.Z,y="PLAYER_PLAYBACK_STATE_UNKNOWN",
k=this.playerState.Ip;this.playerState.isError()?y=k&&k.errorCode==="auth"?"PLAYER_PLAYBACK_STATE_UNKNOWN":"PLAYER_PLAYBACK_STATE_ERROR":this.playerState.Z(2)?y="PLAYER_PLAYBACK_STATE_ENDED":this.playerState.Z(64)?y="PLAYER_PLAYBACK_STATE_UNSTARTED":this.playerState.Z(16)||this.playerState.Z(32)?y="PLAYER_PLAYBACK_STATE_SEEKING":this.playerState.Z(1)&&this.playerState.Z(4)?y="PLAYER_PLAYBACK_STATE_PAUSED_BUFFERING":this.playerState.Z(1)?y="PLAYER_PLAYBACK_STATE_BUFFERING":this.playerState.Z(4)?y=
"PLAYER_PLAYBACK_STATE_PAUSED":this.playerState.Z(8)&&(y="PLAYER_PLAYBACK_STATE_PLAYING");k=h8_[RH(this.provider.videoData)];a:switch(this.provider.cG.playerCanaryState){case "canary":var z="HTML5_PLAYER_CANARY_TYPE_EXPERIMENT";break a;case "holdback":z="HTML5_PLAYER_CANARY_TYPE_CONTROL";break a;default:z="HTML5_PLAYER_CANARY_TYPE_UNSPECIFIED"}var r=IwQ(this.provider),Z=this.C<0?l:this.C-this.Z;l=this.provider.cG.va+36E5<(0,g.f)();y={started:this.C>=0,stateAtSend:y,joinLatencySecs:Z,jsErrorCount:this.jsErrorCount,
playTimeSecs:this.playTimeSecs,rebufferTimeSecs:this.rebufferTimeSecs,seekCount:this.seekCount,networkErrorCount:this.networkErrorCount,nonNetworkErrorCount:this.nonNetworkErrorCount,playerCanaryType:z,playerCanaryStage:r,isAd:this.provider.videoData.isAd(),liveMode:k,hasDrm:!!g.BF(this.provider.videoData),isGapless:this.provider.videoData.K,isServerStitchedDai:this.provider.videoData.enableServerStitchedDai,encounteredSabrFallback:this.encounteredSabrFallback,isSabr:Kc(this.provider.videoData)};
l||g.wv("html5PlayerHealthEvent",y);this.N=!0;this.dispose()}}Vj(){this.N||this.send();window.removeEventListener("error",this.mO);window.removeEventListener("unhandledrejection",this.mO);super.Vj()}},WPe=/\bnet\b/;var TqO=class{constructor(l){this.provider=l;this.A=!1;this.C=0;this.V=-1;this.LB=NaN;this.N=0;this.segments=[];this.K=this.S=0;this.previouslyEnded=!1;this.J=0;this.mW=this.J6=void 0;this.d4={laK:()=>this.J6,
j4G:()=>this.mW};
this.C_=this.provider.Zr.getVolume();this.D=this.provider.Zr.isMuted()?1:0;this.Z=gr(this.provider)}update(){if(this.A){var l=this.YK()||0,y=g.vY(this.provider);l>=this.provider.Zr.getDuration()-.1&&(this.previouslyEnded=!0);if(l!==this.C||pnQ(this,l,y)){var k;if(!(k=l<this.C||l-this.C>y-this.LB+2||pnQ(this,l,y))){{k=this.provider.Zr.getVolume();const z=k!==this.C_,r=this.provider.Zr.isMuted()?1:0;r!==this.D?(this.D=r,k=!0):(!z||this.V>=0||(this.C_=k,this.V=y),k=y-this.V,this.V>=0&&k>2?(this.V=-1,
k=!0):k=!1)}}k&&(E_(this),this.N=l);this.LB=y;this.C=l}}}YK(){const l=this.provider.Zr.YK();return fN(this.provider.videoData)?l+this.provider.Zr.w4():l}};var S95=class{constructor(l,y,k,z){this.cG=y;this.g4=k;this.segments=[];this.experimentIds=[];this.Xr=this.MW=this.isFinal=this.delayThresholdMet=this.WG=this.OA=this.autoplay=this.autonav=!1;this.R7="yt";this.S=[];this.K=this.D=null;this.hv=this.sendVisitorIdHeader=this.mK=!1;this.A=this.pageId="";this.jN=!1;this.J=k==="watchtime";this.N=k==="playback";this.sj=k==="atr";this.O1=k==="engage";this.sendVisitorIdHeader=!1;this.uri=this.sj?`/api/stats/${k}`:"//"+y.JX+"/api/stats/"+k;z&&(this.MW=z.fs,
z.rtn&&(this.K=z.rtn),this.J?(this.playerState=z.state,z.rti>0&&(this.D=z.rti)):(this.Cp=z.mos,this.I4=z.volume,z.at&&(this.adType=z.at)),z.autonav&&(this.autonav=z.autonav),z.inview!=null&&(this.SN=z.inview),z.size&&(this.PF=z.size),z.playerwidth&&(this.wY=z.playerwidth),z.playerheight&&(this.Xz=z.playerheight));this.vn=g.r4(y.Z);this.A=$f(y.experiments,"html5_log_vss_extra_lr_cparams_freq");if(this.A==="all"||this.A==="once")this.T7=g.r4(y.hv);this.Cf=y.Cp;this.experimentIds=eyz(y.experiments);
this.PG=y.hj;this.R7=y.C_;this.region=y.region;this.userAge=y.userAge;this.xz=y.Ky;this.hj=hW();this.sendVisitorIdHeader=y.sendVisitorIdHeader;this.Ja=y.X("vss_pings_using_networkless")||y.X("kevlar_woffle");this.va=y.X("vss_final_ping_send_and_write");this.HG=y.X("vss_use_send_and_write");this.pageId=y.pageId;this.Fg=y.X("vss_playback_use_send_and_write");y.livingRoomAppMode&&(this.livingRoomAppMode=y.livingRoomAppMode);g.u9(y)&&(this.rb=y.Ja);g.j_(g.CA(y))&&this.S.push(1);this.accessToken=l.S();
l.JO[this.g4]?this.V=l.JO[this.g4]:l.JO.playback&&(this.V=l.JO.playback);this.adFormat=l.adFormat;this.adQueryId=l.adQueryId;this.autoplay=CHy(l);this.N&&(this.OA=l.X6&&eS(l)==="adunit"?!0:!1);this.autonav=l.isAutonav||this.autonav;this.contentVideoId=UK(l);this.clientPlaybackNonce=l.clientPlaybackNonce;this.WG=l.Wn;l.a4&&(this.Y=l.a4,this.kz=l.XT);l.mdxEnvironment&&(this.mdxEnvironment=l.mdxEnvironment);this.Z=l.g4;this.CB=l.CB;l.C&&(this.q_=l.C.itag,l.V&&l.V.itag!==this.q_&&(this.Oj=l.V.itag));
l.Z&&Va(l.Z)&&(this.offlineDownloadUserChoice="1");this.eventLabel=eS(l);this.Xr=l.BF?!1:l.jN;this.TJ=l.Ng;if(y=RH(l))this.zA=y;this.S2=l.V0;this.partnerId=l.partnerId;this.eventId=l.eventId;this.playlistId=l.DJ||l.playlistId;this.d$=l.d$;this.N7=l.N7;this.j5=l.j5;this.Zq=l.Zq;this.subscribed=l.subscribed;this.videoId=l.videoId;this.videoMetadata=l.videoMetadata;this.visitorData=l.visitorData;this.osid=l.osid;this.qo=l.qo;this.referrer=l.referrer;this.KZ=l.X3||l.KZ;this.gb=l.qg;this.k$=l.k$;this.userGenderAge=
l.userGenderAge;this.wS=l.wS;this.embedsRct=l.embedsRct;this.embedsRctn=l.embedsRctn;g.u9(this.cG)&&l.mutedAutoplay&&(l.mutedAutoplayDurationMode===2&&l.limitedPlaybackDurationInSeconds===0&&l.endSeconds===0?this.S.push(7):this.S.push(2));l.isEmbedsShortsMode(new g.Fn(this.wY,this.Xz),!!this.playlistId)&&this.S.push(3);g.du(l)&&this.S.push(4);this.u0=l.qO;l.compositeLiveIngestionOffsetToken&&(this.compositeLiveIngestionOffsetToken=l.compositeLiveIngestionOffsetToken);this.heartbeatLoggingToken=l.heartbeatLoggingToken;
l=l.getPlayerResponse();this.jN=this.cG.X("html5_switch_vss_to_post")||!!l?.playerConfig?.vssClientConfig?.vssUsePostRequest}send(l){if(!this.mK){var y=ou(this),k=g.UI(this.uri,y);this.cG.X("vss_through_gel_double")&&Kcy(k);this.sj&&!this.cG.X("html5_simplify_pings")?gfe(this,k):f5(this,l).then(z=>{if(this.jN){z=z||{};z.method="POST";const r=EfT(this);r&&(z.postParams={form_data:r})}this.sj&&(z=z||{},z.method="POST",z.postParams={atr:this.attestationResponse});n8(k,z,{token:this.Y,i7:this.kz,mdxEnvironment:this.mdxEnvironment},
this.cG,l,this.Ja,this.isFinal&&this.va||this.HG||this.N&&this.Fg)});
this.mK=!0}}C(l){l===void 0&&(l=NaN);return Number(l.toFixed(3)).toString()}},Mft={LIVING_ROOM_APP_MODE_UNSPECIFIED:0,LIVING_ROOM_APP_MODE_MAIN:1,LIVING_ROOM_APP_MODE_KIDS:2,LIVING_ROOM_APP_MODE_MUSIC:3,LIVING_ROOM_APP_MODE_UNPLUGGED:4,LIVING_ROOM_APP_MODE_GAMING:5},URe={EMBEDDED_PLAYER_MODE_UNKNOWN:0,EMBEDDED_PLAYER_MODE_DEFAULT:1,EMBEDDED_PLAYER_MODE_PFP:2,EMBEDDED_PLAYER_MODE_PFL:3};var Rc5=class extends g.zP{constructor(l){super();this.provider=l;this.D="paused";this.J=NaN;this.sj=[10,10,10,40];this.Ja=this.C_=0;this.RR=this.u0=this.rb=this.HG=this.V=!1;this.N=this.C=NaN;this.logger=new g.R9("vss");this.d4={EKR:()=>this.Z};
this.Z=new TqO(l)}Eb(){if(!this.V){this.provider.videoData.lV===16623&&g.WH(Error("Playback for EmbedPage"));var l=jg(this,"playback");this.sj=nfQ(this);Y9P(this.Z);l.K=Sg(this);this.N>0&&(l.Z-=this.N);l.send();if(this.provider.videoData.qE){l=this.provider.cG;var y=this.provider.videoData;const k={html5:"1",video_id:y.videoId,cpn:y.clientPlaybackNonce,ei:y.eventId,ptk:y.qE,oid:y.h0,ptchn:y.c$,pltype:y.ZE,content_v:UK(y)};y.fL&&Object.assign(k,{m:y.fL});l=g.UI(l.nS+"ptracking",k);n5(this,l)}this.provider.videoData.CB||
(NkP(this),sqs(this));this.V=!0;l=this.Z;l.C=l.YK();l.LB=g.vY(l.provider);!(l.N===0&&l.C<5)&&l.C-l.N>2&&(l.N=l.C);l.A=!0}}S(){g.pl(this.J);this.J=NaN}K(){E_(this.Z)}Y(){this.Z.update();var l=this.Z;l.segments.length&&l.C===l.N||E_(l);const y=l.segments;l.segments=[];l.J=0;return y}mK(l){var y=this.Z,k=l.mW;y.J6=l.J6;y.mW=k}A(l,y=!1){const k=Fc5(this,this.Y());!isNaN(this.C)&&l&&(k.D=this.C);y&&(k.hv=!0);return k}onProgress(){this.Z.update();ofP(this)&&(NkP(this),sqs(this))}b0(l){if(!this.IR())if(l.state.Z(2)||
l.state.Z(512)){if(this.D="paused",l.tj(2)||l.tj(512))l.tj(2)&&(this.Z.previouslyEnded=!0),this.V&&(this.S(),Fi(this).send(),this.C=NaN)}else if(l.state.Z(8)){this.D="playing";const y=this.V&&isNaN(this.J)?Sg(this):NaN;if(!isNaN(y)&&(fe(l,64)<0||fe(l,512)<0)){const k=this.A(!1);k.K=y;k.send()}l.tj(16)&&l.state.seekSource===58&&(this.Z.previouslyEnded=!0)}else this.D="paused"}Vj(){super.Vj();this.S();JAT(this.Z)}Dp(){return ou(jg(this,"playback"))}bH(l){const y=jg(this,"engage");y.b0=l;return fwz(y,
vfC(this.provider))}PG(){const l=this.Z.J,y=this.provider.cG.sA().Z.G7(PzP)||4E3;l>y&&this.A(!isNaN(this.C)).send()}Xr(){this.C_=0}};var HAC=class{constructor(){this.endTime=this.startTime=-1;this.N="-";this.playbackRate=1;this.visibilityState=0;this.audioId="";this.volume=this.connectionType=this.C=0;this.muted=!1;this.Z=this.clipId="-";this.previouslyEnded=!1}isEmpty(){return this.endTime===this.startTime}};var DVt=class{constructor(l,y,k){this.videoData=l;this.cG=y;this.Zr=k;this.Z=void 0}X(l){return this.cG.X(l)}getCurrentTime(){return this.Zr.getCurrentTime()}YK(){return this.Zr.YK()}},BkT={other:1,none:2,wifi:3,cellular:7,ethernet:30};g.Iz=class extends g.zP{constructor(l){super();this.provider=l;this.N=new Map;this.fp=new g.U5;this.d4={KIr:()=>this.qoe,
WI$:()=>this.Z,
qlr:()=>this.C};
this.provider.videoData.Ij()&&!this.provider.videoData.kK&&(this.Z=new Rc5(this.provider),this.Z.N=0,g.x(this,this.Z),this.qoe=new g.md(this.provider),g.x(this,this.qoe),this.provider.videoData.enableServerStitchedDai&&(this.Ol=this.provider.videoData.clientPlaybackNonce)&&this.N.set(this.Ol,this.Z));if(l.cG.playerCanaryState==="canary"||l.cG.playerCanaryState==="holdback")this.C=new IgB(this.provider),g.x(this,this.C)}Eb(){this.Z&&this.Z.Eb();this.C&&this.C.Eb()}onProgress(){if(this.provider.videoData.enableServerStitchedDai&&
this.Ol)this.N.get(this.Ol)?.onProgress();else if(this.Z)this.Z.onProgress()}zc(l){this.qoe&&this.qoe.zc(l)}ID(l,y){this.qoe&&this.qoe.ID(l,y)}Kd(){this.provider.videoData.enableServerStitchedDai&&this.Ol?this.N.get(this.Ol)?.K():this.Z&&this.Z.K()}ZQ(l,y){this.qoe&&SLz(this.qoe,l,y);if(this.C)this.C.onError(l)}Dy(l,y){switch(l){case "M":this.qoe?.Dy(l,y);break;case "A":this.qoe?.Dy(l)}}onPlaybackRateChange(l){if(this.qoe)this.qoe.onPlaybackRateChange(l);this.Z&&this.Z.K()}Md(l,y,k){this.qoe&&this.qoe.Md(l,
y,k)}S0(l,y,k){this.qoe&&this.qoe.S0(l,y,k)}WU(l){this.qoe?.WU(l)}Xp(l){this.qoe?.Xp(l)}nX(l,y,k,z){this.qoe?.nX(l,y,k,z)}CR(l){this.qoe&&this.qoe.CR(l)}pD(l,y,k){this.qoe&&this.qoe.pD(l,y,k)}I8(){if(this.qoe)return this.qoe.I8()}Dp(){return this.provider.videoData.enableServerStitchedDai&&this.Ol?this.N.get(this.Ol)?.Dp()??{}:this.Z?this.Z.Dp():{}}Bo(){return this.qoe?.Bo()}yr(l,y){this.qoe?.yr(l,y)}bH(l){return this.Z?this.Z.bH(l):()=>{}}getVideoData(){return this.provider.videoData}resume(){this.qoe&&
this.qoe.resume()}};
g.Iz.prototype.nJ=yz(49);g.Iz.prototype.dT=yz(32);g.Iz.prototype.Rp=yz(26);g.Iz.prototype.Zh=yz(20);var Vse=class{constructor(){this.M1=0;this.V=this.N=this.FF=this.Ai=this.C=NaN;this.Z={};this.bandwidthEstimate=NaN}};var PQo=class{constructor(){this.Z=g.bR;this.array=[]}};g.Tl=class extends g.zP{constructor(l,y){super();this.Zr=l;this.K=y;this.N=NaN;this.J=this.S=this.started=!1;this.C=[];this.A=new g.B_(this.sync,250,this);g.x(this,this.A);this.V=new g.B_(this.sync,0,this);g.x(this,this.V);this.Z=new PQo}Wa(l,y){this.sync();y&&this.Z.array.length>=2E3&&this.sb("captions",1E4);y=this.Z;if(l.length>1&&l.length>y.array.length)y.array=y.array.concat(l),y.array.sort(y.Z);else for(const k of l)!y.array.length||y.Z(k,y.array[y.array.length-1])>0?y.array.push(k):g.KR(y.array,
k,y.Z);this.N=NaN;this.sync()}t6(l){l.length>1E4&&g.WH(new g.WO("Over 10k cueRanges removal occurs with a sample: ",l[0]));if(!this.IR()){var y=new Set(l);this.C=this.C.filter(k=>!y.has(k));
$C5(this.Z,y);this.sync()}}uJ(l){if(!this.IR()){var y=this.XJ().find(k=>k.id===void 0&&k.namespace===l);
y&&this.t6([y])}}sb(l,y){const k=(isNaN(this.N)?QHy(this):this.N)-y;y=this.XJ().filter(z=>z.namespace===l&&z.end<k);
this.t6(y);return y}XJ(){return this.IR()?[]:this.Z.array}reset(){this.started=!1;this.V.stop();this.Z.array=[];this.C=[];this.sync()}Ur(l){const y=this.XJ().filter(k=>k.namespace===l);
this.t6(y);return y}OD(l){let y=[];var k=s_(this.Z,0x7ffffffffffff);const z=[];for(const r of k)r.active&&l===r.associatedClipId&&z.push(r);y=y.concat(L5(this,z));v7(this,y);y=[];k=[];for(const r of this.C)r.active&&r.associatedClipId===l&&r.start===0x7ffffffffffff&&k.push(r);y=y.concat(B7(this,k));v7(this,y);return z.length}Be(l){const y=s_(this.Z,0x7ffffffffffff),k=[];for(const z of y)z.active&&l===z.associatedClipId&&k.push(z);this.t6(k)}sync(){this.J=!0;if(!this.S){for(var l=3;this.J&&l;)this.J=
!1,this.S=!0,t2y(this),this.S=!1,l--;this.Zr.getPlayerState().isPlaying()&&(l=AP4(this.Z,this.N),!isNaN(l)&&l<0x7ffffffffffff&&(l=(l-this.N)/this.Zr.getPlaybackRate(),this.V.start(l)))}}isEnded(l,y){y=this.Zr.L2()*1E3-y;y=this.Zr.l4()&&l.Z(1)&&y<500;return l.Z(2)||this.Zr.O().X("html5_pseudogapless_shorts")&&y}Vj(){this.C=[];this.Z.array=[];super.Vj()}};g.Tl.prototype.pB=yz(38);var J5x=class{constructor(l){this.cG=l;this.N=this.C=this.mediaTime=NaN;this.V=this.Z=!1;this.J=.001;g.dU(l)&&(this.J=.01)}};var ONs=class{constructor(l,y){this.videoData=l;this.Z=y}};var YTf=class{constructor(l){this.data=window.Float32Array?new Float32Array(l):Array(l);this.C=this.Z=l-1}add(l){this.Z=(this.Z+1)%this.data.length;this.data[this.Z]=l}N(){return this.data[this.Z]||0}forEach(l){for(var y=this.Z+1;y<this.data.length;y++)l(this.data[y]||0);for(y=0;y<=this.Z;y++)l(this.data[y]||0)}V(){const l=[];for(;this.C!==this.Z;)this.C=(this.C+1)%this.data.length,l.push(this.data[this.C]);return l}clear(){const l=this.data.length;for(let y=0;y<l;y++)this.data[y]=0;this.C=this.Z=
this.data.length-1}};var ujQ=class{constructor(l){this.J=l;this.N=this.C=0;this.V=new YTf(50)}};var xCQ=class extends g.z1{constructor(l,y,k){super();this.videoData=l;this.experiments=y;this.J=k;this.C=[];this.sx=0;this.N=!0;this.V=!1;this.S=0;k=new pef;l.latencyClass==="ULTRALOW"&&(k.A=!1);l.vZ?k.N=3:g.la(l)&&(k.N=2);l.latencyClass==="NORMAL"&&(k.J=!0);k.C_=Kc(l);if(l.latencyClass==="LOW"||l.latencyClass==="ULTRALOW")k.J=!0;var z=g.i_(y,"html5_liveness_drift_proxima_override");sK(l)!==0&&z&&(k.Z=z,l.Z?.mK()&&k.Z--);Kc(l)&&y.z7("html5_sabr_parse_live_metadata_playback_boundaries")&&(k.Y=!0);
if(g.G6("trident/")||g.G6("edge/"))z=g.i_(y,"html5_platform_minimum_readahead_seconds")||3,k.V=Math.max(k.V,z);g.i_(y,"html5_minimum_readahead_seconds")&&(k.V=g.i_(y,"html5_minimum_readahead_seconds"));g.i_(y,"html5_maximum_readahead_seconds")&&(k.D=g.i_(y,"html5_maximum_readahead_seconds"));if(y=g.i_(y,"html5_liveness_drift_chunk_override"))k.Z=y;NC(l)&&(k.Z=(k.Z+1)/5,l.latencyClass==="LOW"&&(k.Z*=2));!Kc(l)||l.latencyClass!=="ULTRALOW"&&l.latencyClass!=="LOW"||(k.K=3,k.S=25);this.policy=k;this.K=
this.policy.N!==1;this.Z=D1(this,wFe(this,isNaN(l.liveChunkReadahead)?3:l.liveChunkReadahead,l))}Ub(){return this.K}mf(){return this.policy.Y&&this.videoData.Z?this.videoData.Z.e3:Math.max(this.J()-RZ(this)*this.Z,this.videoData.dY())}},pef=class{constructor(){this.V=0;this.D=Infinity;this.A=!0;this.C=this.Z=2;this.N=1;this.J=!1;this.S=10;this.Y=!1;this.K=1;this.C_=!1}};var KPy=class extends g.zP{constructor(l){super();this.Zr=l;this.Z=0;this.C=null;this.S=this.V=0;this.N={};this.cG=this.Zr.O();this.J=new g.B_(this.mI,1E3,this);this.Xr=zy(this,"html5_seek_timeout_delay_ms");this.b0=zy(this,"html5_long_rebuffer_threshold_ms");this.mK=zy(this,"html5_seek_set_cmt_delay_ms","html5_seek_set_cmt_cfl");this.HG=zy(this,"html5_seek_jiggle_cmt_delay_ms","html5_seek_jiggle_cmt_cfl");this.rb=zy(this,"html5_seek_new_elem_delay_ms","html5_seek_new_elem_cfl");this.T7=zy(this,"html5_unreported_seek_reseek_delay_ms",
"html5_unreported_seek_reseek_cfl");this.C_=zy(this,"html5_long_rebuffer_jiggle_cmt_delay_ms","html5_long_rebuffer_jiggle_cmt_cfl");this.Y=new kZ(2E4);this.RR=zy(this,"html5_seek_new_elem_shorts_delay_ms","html5_seek_new_elem_shorts_cfl");this.PG=zy(this,"html5_seek_new_media_source_shorts_reuse_delay_ms","html5_seek_new_media_source_shorts_reuse_cfl");this.u0=zy(this,"html5_seek_new_media_element_shorts_reuse_delay_ms","html5_seek_new_media_element_shorts_reuse_cfl");this.Ja=zy(this,"html5_reseek_after_time_jump_delay_ms",
"html5_reseek_after_time_jump_cfl");this.A=zy(this,"html5_gapless_handoff_close_end_long_rebuffer_delay_ms","html5_gapless_handoff_close_end_long_rebuffer_cfl");this.D=zy(this,"html5_gapless_slow_seek_delay_ms","html5_gapless_slow_seek_cfl");this.gb=zy(this,"html5_shorts_gapless_ad_slow_start_delay_ms","html5_shorts_gapless_ad_slow_start_cfl");this.xz=zy(this,"html5_shorts_gapless_slow_start_delay_ms","html5_shorts_gapless_slow_start_cfl");this.K=zy(this,"html5_ads_preroll_lock_timeout_delay_ms",
"html5_ads_preroll_lock_timeout_cfl");this.Oj=new kZ(g.i_(this.cG.experiments,"html5_skip_slow_ad_delay_ms")||5E3,!this.cG.X("html5_report_slow_ads_as_error"));this.kz=new kZ(g.i_(this.cG.experiments,"html5_skip_slow_ad_delay_ms")||5E3,!this.cG.X("html5_skip_slow_buffering_ad"));this.WG=zy(this,"html5_slow_start_timeout_delay_ms");this.sj=zy(this,"html5_slow_start_no_media_source_delay_ms","html5_slow_start_no_media_source_cfl");g.x(this,this.J)}mI(){const l=this.Zr.fl();var y=this.Zr.getPlayerState();
if(l&&!y.isError()){var k=l.getCurrentTime(),z=y.C()&&k>this.Z,r=y.Z(8)&&y.Z(16),Z=this.Zr.gT().isBackground()||y.isSuspended();rw(this,this.Xr,r&&!Z,z,"qoe.slowseek",()=>{},"timeout");
var e=isFinite(this.Z);e=r&&e&&uN5(l,this.Z);var A=!k||Math.abs(k-this.Z)>10,Q=this.cG.X("html5_exclude_initial_sabr_live_dvr_seek_in_watchdog"),t=k===0&&this.C&&[11,10].includes(this.C);rw(this,this.mK,e&&A&&!Z&&(!Q||!t),z,"qoe.slowseek",()=>{l.seekTo(this.Z)},"set_cmt");
A=e&&D4(l.Cy(),this.Z);var O=this.Zr.loader;e=!O||O.Zy();var d=()=>{l.seekTo(this.Z+.001)};
rw(this,this.HG,A&&e&&!Z,z,"qoe.slowseek",d,"jiggle_cmt");e=()=>this.Zr.Ed();
rw(this,this.rb,A&&!Z,z,"qoe.slowseek",e,"new_elem");var w=ai(y);t=y.isBuffering();var h=l.Cy(),U=Rh(h,k),u=U>=0&&h.end(U)>k+5;A=w&&t&&u;Q=this.Zr.getVideoData();rw(this,this.RR,k<.002&&this.Z<.002&&r&&g.dU(this.cG)&&g.AI(Q)&&!Z,z,"qoe.slowseek",e,"slow_seek_shorts");rw(this,this.D,Q.yf()&&r&&!Z&&!Q.A,z,"qoe.slowseek",e,"slow_seek_gapless_shorts");rw(this,this.C_,A&&!Z,w&&!t,"qoe.longrebuffer",d,"jiggle_cmt");rw(this,this.Y,A&&!Z,w&&!t,"qoe.longrebuffer",e,"new_elem_nnr");if(O){const T=O.getCurrentTime();
r=l.J();r=Dp5(r,T);r=!O.isSeeking()&&k===r;rw(this,this.T7,w&&t&&r&&!Z,w&&!t&&!r,"qoe.longrebuffer",()=>{l.seekTo(T)},"seek_to_loader")}r={};
d=Rh(h,Math.max(k-3.5,0));var W=d>=0&&k>h.end(d)-1.1,V=d>=0&&d+1<h.length?h.start(d+1)-h.end(d):9999;r.mindex=U;r.disIndex=d;r.isdisc=d>=0&&W&&V<11;r.close2edge=W;r.gapsize=V;r.buflen=h.length;this.C&&(r.seekSour=this.C);rw(this,this.b0,w&&t&&!Z,w&&!t,"qoe.longrebuffer",()=>{},"timeout",r);
r=y.isSuspended();r=this.Zr.sG()&&!r;rw(this,this.K,r,!r,"qoe.start15s",()=>{this.Zr.ud("ad")},"ads_preroll_timeout");
r=this.cG.experiments.z7("html5_use_playback_rate_in_skip_slow_ad")?this.Zr.getPlaybackRate()*1E3:1E3;U=k-this.V<r/1E3/2;W=(d=Q.isAd())&&w&&!t&&U;r=()=>{var T=this.Zr;const J=T.E1.getVideoData();(!J||!T.videoData.isAd()||J.Rj!==T.getVideoData().Rj)&&T.videoData.CE||T.jI("ad.rebuftimeout",2,"RETRYABLE_ERROR",`skipslad.vid.${T.videoData.videoId}`)};
rw(this,this.Oj,W,!W,"ad.rebuftimeout",r,"skip_slow_ad");U=d&&t&&D4(l.Cy(),k+5)&&U;rw(this,this.kz,U&&!Z,!U,"ad.rebuftimeout",r,"skip_slow_ad_buf");r=y.isOrWillBePlaying()&&y.Z(64)&&!Z;rw(this,this.WG,r,z,"qoe.start15s",()=>{},"timeout");
O=!!O&&!O.yj&&y.isOrWillBePlaying();rw(this,this.sj,O,z,"qoe.start15s",e,"newElemMse");O=zH(h,0);h=y.Z(16)||y.Z(32);O=!Z&&y.isOrWillBePlaying()&&t&&!h&&(y.Z(64)||k===0)&&O>5;rw(this,this.PG,O,w&&!t,"qoe.longrebuffer",()=>{this.Zr.SZ()},"reset_media_source");
rw(this,this.u0,O,w&&!t,"qoe.longrebuffer",e,"reset_media_element");this.V===0&&(this.S=k);O=t&&this.Z===0&&k>1&&k===this.S;rw(this,this.Ja,g.AI(Q)&&O,w&&!t,"qoe.slowseek",()=>{l.seekTo(0)},"reseek_after_time_jump");
Z=y.isOrWillBePlaying()&&!Z;u=this.Zr.L2()-k<6&&!u&&this.Zr.l4();rw(this,this.A,Q.yf()&&Z&&t&&u,w&&!t,"qoe.longrebuffer",()=>{this.Zr.Ed(!1,!0)},"handoff_end_long_buffer_reload");
Z=this.C===104||this.Zr.JZ;y=jn(Q)&&Q.isAd()&&!Q.A&&Z&&(t||y.Z(8)&&y.Z(16));rw(this,this.gb,y,z,"qoe.start15s",e,"gapless_ad_slow_start");y=jn(Q)&&!Q.A&&Z&&A;rw(this,this.xz,y,z,"qoe.longrebuffer",e,"gapless_slow_start");this.V=k;this.J.start()}}ZQ(l,y,k){y=this.Dp(y);y.wn=k;y.wdup=this.N[l]?"1":"0";this.Zr.ZQ(new g.Gr(l,y));this.N[l]=!0}Dp(l){l=Object.assign(this.Zr.Dp(!0),l.Dp());this.Z&&(l.stt=this.Z.toFixed(3));this.Zr.getVideoData().isLivePlayback&&(l.ct=this.Zr.getCurrentTime().toFixed(3),l.to=
this.Zr.w4().toFixed(3));delete l.uga;delete l.euri;delete l.referrer;delete l.fexp;delete l.vm;return l}},kZ=class{constructor(l,y=!1){this.S=y;this.Z=this.C=this.N=this.startTimestamp=0;this.V=!1;this.J=Math.ceil(l/1E3)}reset(){this.Z=this.C=this.N=this.startTimestamp=0;this.V=!1}test(l){if(!this.J||this.C)return!1;if(!l)return this.reset(),!1;l=(0,g.f)();if(!this.startTimestamp)this.startTimestamp=l,this.N=0;else if(this.N>=this.J)return this.C=l,!0;this.N+=1;return!1}Dp(){const l={},y=(0,g.f)();
this.startTimestamp&&(l.wsd=(y-this.startTimestamp).toFixed());this.C&&(l.wtd=(y-this.C).toFixed());this.Z&&(l.wssd=(y-this.Z).toFixed());return l}};var E4x=class extends g.zP{constructor(l){super();this.Zr=l;this.A=this.Z=this.loader=this.mediaElement=this.playbackData=null;this.N=0;this.J=this.b0=this.V=null;this.Ja=!1;this.T7=0;this.Y=!1;this.timestampOffset=0;this.D=!0;this.PG=0;this.mK=this.MW=!1;this.K=0;this.xz=!1;this.rb=this.sj=0;this.cG=this.Zr.O();this.videoData=this.Zr.getVideoData();this.policy=new g4L;this.C_=new KPy(this.Zr);this.kz=this.u0=this.RR=this.S=this.C=NaN;this.HG=new g.B_(()=>{UCC(this,!1)},2E3);
this.hv=new g.B_(()=>{eQ(this)});
this.Xr=new g.B_(()=>{CgC(this,{})});
this.WG=NaN;this.Oj=new g.B_(()=>{var y=this.cG.DW;y.Z+=1E4/36E5;y.Z-y.N>1/6&&(qn5(y),y.N=y.Z);this.Oj.start()},1E4);
g.x(this,this.C_);g.x(this,this.HG);g.x(this,this.Xr);g.x(this,this.hv);g.x(this,this.Oj)}setMediaElement(l){(this.mediaElement=l)?(this.mediaElement&&(this.J||this.N||!this.mediaElement.MW()||this.seekTo(.01,{gY:"seektimeline_setupMediaElement"})),eQ(this)):tj(this)}getCurrentTime(l=!1){if($Z(this.Zr)){if(this.X("html5_use_centralized_player_time")&&!l&&!isNaN(this.S))return this.S;if(!isNaN(this.C))return this.C}else{if(this.X("html5_use_centralized_player_time")&&!l&&!isNaN(this.S)&&isFinite(this.S))return this.S;
l=this.X("html5_seek_refactor_bh_fix");if(!isNaN(this.C)&&(l||isFinite(this.C)))return this.C}return this.mediaElement&&M2P(this)?this.mediaElement.getCurrentTime()+this.timestampOffset:this.N||0}gQ(){return this.gb}YK(){return this.getCurrentTime()-this.w4()}mf(){return this.Z?this.Z.mf():Infinity}isAtLiveHead(l){if(!this.Z)return!1;l===void 0&&(l=this.getCurrentTime());return yJ(this.Z,l)}Ub(){return!!this.Z&&this.Z.Ub()}seekTo(l,{Ef:y=!1,G3:k=0,zf:z=!1,B9:r=0,gY:Z="",seekSource:e,Q0:A=!1,qQ:Q=
!1,c9:t=!1}={}){A&&(l+=this.w4());Kc(this.videoData)&&e===29&&(this.gb=void 0);A=l<this.RR&&!!this.loader;var O=Kc(this.videoData)&&Q;A&&!O&&(this.Zr.Md("sdai",{sk2bk:l.toFixed(3),mt:(l-this.timestampOffset).toFixed(3),lstadj:this.RR.toFixed(3)}),this.RR=NaN,this.timestampOffset-=1E3,this.loader?.kK());{O=l;const w=Kc(this.videoData);if(w&&Q)O=!0;else{var d=this.X("html5_always_allow_sqless_sync")&&this.videoData.UA();(w||d)&&Z==="chunkSelectorSynchronize"?O=!0:(d=!isFinite(O)||(this.Z?yJ(this.Z,
O):O>=this.TM())||!g.la(this.videoData),d||(O={st:O,mst:this.TM()},this.Z&&this.X("html5_high_res_seek_logging")&&(O.ht=this.Z.mf(),O.adft=le(this.Z)),this.Zr.Md("seeknotallowed",O)),O=d)}}if(!O)return this.V&&(this.V=null,ww(this)),g.SK(this.getCurrentTime());O=.005;Q&&this.X("html5_sabr_seek_no_shift_tolerance")&&(O=0);if(Math.abs(l-this.C)<=O&&this.Ja)return this.J;this.X("html5_reset_rate_limiter_on_user_seek")&&this.loader?.ji();this.X("html5_reset_backoff_on_user_seek")&&this.loader?.I4();Z&&
(O=l,this.cG.yM()&&(Z={reason:Z,tgt:O},this.X("html5_sabr_csdai_seek_log")&&(Z.source=e),this.Zr.Md("seekreason",Z)));e&&(this.C_.C=e);this.Ja&&tj(this);this.J||(this.J=new fA);l&&!isFinite(l)&&QJ(this,!1);(t=t||A)||(t=l,t=!(this.videoData.isLivePlayback&&this.videoData.N&&!this.videoData.N.Z()&&!(this.mediaElement&&this.mediaElement.N()>0&&dV(this.mediaElement)>0)||fc(this.videoData)&&this.dY()===this.TM(!1)?0:isFinite(t)||!fc(this.videoData)));t||(l=Z8(this,l,z));l&&!isFinite(l)&&QJ(this,!1);this.X("html5_use_centralized_player_time")?
this.S=l:this.C=this.N=l;this.PG=r;this.K=0;this.Z&&apQ(this.Z,l,!1);z=this.Zr;r=l;t={Ef:y,seekSource:e};z.Hn.N=r;Z=z.Ey;Z.mediaTime=r;Z.Z=!0;t.Ef&&z.In(t);t=r>z.videoData.endSeconds&&r>z.videoData.limitedPlaybackDurationInSeconds;z.Lw&&t&&isFinite(r)&&ue(z);r<z.TM()-.01&&(t=CM(z.playerState,2),t.Z(8)&&(t=CM(t,4)),z.e2(t));z.publish("SEEK_TO",r);this.rb>0&&l<this.rb&&(this.rb=0,this.Zr.Ed());this.J&&(y?k&&this.Xr.start(k):CgC(this,{qQ:Q,seekSource:e}));(y=this.Zr.Lw)&&l>y.start&&ue(this.Zr);return this.J}TM(l){return this.videoData.isLivePlayback?
this.videoData.Ja()&&this.mediaElement?.isPaused()&&this.videoData.Z?(l=this.getCurrentTime(),Grg(this.QK(l)*1E3)+l):this.X("html5_sabr_parse_live_metadata_playback_boundaries")&&Kc(this.videoData)&&this.videoData.Z?l?this.videoData.Z.sj||0:this.videoData.Z.e3||0:fc(this.videoData)&&this.videoData.xa&&this.videoData.Z?this.videoData.Z.TM()+this.timestampOffset:this.videoData.N&&this.videoData.N.Z()?!l&&this.Z?this.Z.mf():this.Zr.videoData.TM()+this.timestampOffset:this.mediaElement?Uw()?Grg(this.mediaElement.rb().getTime()):
dV(this.mediaElement)+this.timestampOffset||this.timestampOffset:this.timestampOffset:this.Zr.videoData.TM()}dY(){if(this.X("html5_sabr_parse_live_metadata_playback_boundaries")&&Kc(this.videoData))return this.videoData.Z?.jK||0;const l=this.videoData?this.videoData.dY()+this.timestampOffset:this.timestampOffset;if(this.videoData.Ja()&&this.videoData.Z){var y=Number(this.videoData.progressBarStartPosition?.utcTimeMillis)/1E3;if(!isNaN(y)&&(y=this.Wz(y),!isNaN(y)))return Math.max(l,y)}return l}bU(){this.J||
this.seekTo(this.N,{gY:"seektimeline_forceResumeTime_singleMediaSourceTransition",seekSource:15})}JR(){return this.Ja&&!isFinite(this.C)}Vj(){Oc(this,null);this.C_.dispose();super.Vj()}Dp(){const l={};this.loader&&Object.assign(l,this.loader.Dp());this.mediaElement&&Object.assign(l,this.mediaElement.Dp());return l}eB(l){this.timestampOffset=l}getStreamTimeOffset(){return fc(this.videoData)?0:this.videoData.Z?this.videoData.Z.getStreamTimeOffset():0}w4(){return this.timestampOffset}QK(l){return this.videoData&&
this.videoData.Z?this.videoData.Z.QK(l-this.timestampOffset):NaN}FO(){if(!this.mediaElement)return 0;if(yi(this.videoData)){var l=this.mediaElement,y=l.Cy();l=(kX(y)&&l.getDuration()?y.end(y.length-1):0)+this.timestampOffset-this.dY();y=this.TM()-this.dY();return Math.max(0,Math.min(1,l/y))}return this.mediaElement.FO()}yg(l){this.A&&(this.A.Z=l)}RV(l,y,k){this.Zr.Md("requestUtcSeek",{time:l});Kc(this.videoData)&&(this.gb=l);this.loader?.RV(l,k);y&&(this.sj=y)}bA(l){Kc(this.videoData)&&(this.gb=void 0);
this.sj?(this.Zr.Md("utcSeekingFallback",{source:"streamTime",timeSeconds:this.sj}),this.Zr.seekTo(this.sj,{gY:"utcSeekingFallback_streamTime"}),this.sj=0):(l=this.Wz(l),isNaN(l)||(this.Zr.Md("utcSeekingFallback",{source:"estimate",timeSeconds:l}),this.Zr.seekTo(l,{gY:"utcSeekingFallback_estimate"})))}AI(){this.sj=0}ul(l){this.rb=l}Wz(l){const y=this.getCurrentTime();if(isNaN(y))return NaN;const k=this.QK(y);return isNaN(k)?NaN:l-(k-y)}X(l){return this.cG&&this.cG.X(l)}},g4L=class{};var STo=class extends g.zP{constructor(l){super();this.N=l;this.Z=new Map;this.C=new g.B_(this.sample,250,this);g.x(this,this.C);this.start()}start(){this.C.start()}stop(){this.C.stop()}clear(){for(const l of this.Z.values())l.clear()}sample(){for(const [l,y]of this.N){const k=l,z=y;this.Z.has(k)||this.Z.set(k,new fgO(jCw.has(k)));this.Z.get(k).update(z())}this.C.start()}},jCw=new Set(["networkactivity"]),fgO=class{constructor(l){this.C=l;this.Z=NaN;this.buffer=new YTf(100)}update(l){this.C?(this.buffer.add(l-
this.Z||0),this.Z=l):this.buffer.add(l)}clear(){this.buffer.clear();this.Z=0}};var n4R=class{constructor(){this.finished=this.started=!1}Wo(){return this.started}start(){this.started=!0}reset(){this.finished=this.started=!1}};var SKC=!1;var zuQ=!1,cr=!1;g.x8=class extends g.z1{constructor(l,y,k,z,r,Z,e,A,Q,t=new g.YK(l),O=!0,d,w){super();this.cG=l;this.playerType=y;this.QM=k;this.Un=z;this.getVisibilityState=Z;this.visibility=e;this.E1=A;this.o7=Q;this.videoData=t;this.pG=O;this.u$=d;this.oL=w;this.logger=new g.R9("VideoPlayer");this.GA=null;this.F5=new WE;this.Lw=null;this.tF=!0;this.yj=this.loader=null;this.Ji=[];this.qs=new n4R;this.Jf=this.M3=null;this.oV=new n4R;this.R1=null;this.ey=this.TX=!1;this.v0=NaN;this.bJ=!1;this.playerState=new g.U5;
this.Li=[];this.FR=new g.cI;this.mediaElement=null;this.cJ=this.BC=!1;this.kR=NaN;this.TU=!1;this.bx=0;this.Fl=!1;this.h3=NaN;this.vt=0;this.loop=!1;this.playbackRate=1;this.Tm=0;this.HH=!1;this.UX=[];this.k7=this.M0=0;this.kL=this.W9=!1;this.FF=this.Ai=0;this.JZ=!1;this.Pu=this.m8=null;this.Ul=()=>{var h=this.l5;h.provider.cG.wY||h.provider.Zr.getVisibilityState()===3||(h.provider.cG.wY=!0);h.Kd();if(h.C){var U=h.C;U.J&&U.Z<0&&U.provider.Zr.getVisibilityState()!==3&&TkT(U)}h.qoe&&(h=h.qoe,h.PG&&
h.V<0&&h.provider.cG.wY&&LaQ(h),h.J&&BY(h));this.loader&&qn(this);In(this)};
this.d4={SP:h=>{this.SP(h)},
Qpe:h=>{this.GA=h},
LIR:()=>this.l5,
bX:()=>this.yj,
lQr:()=>this.Ma,
jj0:()=>this.sU,
K$j:()=>{},
O:()=>this.cG,
fl:()=>this.mediaElement,
m4G:h=>{this.zb(h)},
Ogz:()=>this.Un};
this.JV=new mt2(this);this.Rs=new g.B_(this.wk,15E3,this);this.X0=new STo(new Map([["bufferhealth",()=>dw(this.Hn)],
["bandwidth",()=>this.oA()],
["networkactivity",()=>this.o7.b0],
["livelatency",()=>this.isAtLiveHead()&&this.isPlaying()?Ty(this):NaN],
["rawlivelatency",()=>Ty(this)]]));
this.Hn=new E4x(this);this.tT=new g.B_(this.Yi,0,this);this.Ru=[this.FR,this.tT,this.Rs,this.X0];this.Ey=new J5x(this.cG);this.bW=new qTv(this.cG,this.Un,this,this.o7);this.Yw=new g.Tl(this,(h,U)=>{h!==g.uR("endcr")||this.playerState.Z(32)||this.m4();r(h,U,this.playerType)});
g.x(this,this.Yw);g.x(this,this.Hn);$1C(this,t);this.videoData.subscribe("dataupdated",this.M9,this);this.videoData.subscribe("dataloaded",this.ux,this);this.videoData.subscribe("dataloaderror",this.handleError,this);this.videoData.subscribe("ctmp",this.Md,this);this.videoData.subscribe("ctmpstr",this.yZ,this);!this.l5||this.l5.IR();this.l5=new g.Iz(new DVt(this.videoData,this.cG,this));yIq(this.Ul);this.visibility.subscribe("visibilitystatechange",this.Ul);this.Ma=new g.B_(this.qk,g.i_(this.cG.experiments,
"html5_player_att_initial_delay_ms")||4500,this);this.sU=new g.B_(this.qk,g.i_(this.cG.experiments,"html5_player_att_retry_delay_ms")||4500,this);this.Ow=new g.iv(this.gi,350,this);g.x(this,this.Ow)}Vj(){g.Kl(this.v0);k3q(this.Ul);this.visibility.unsubscribe("visibilitystatechange",this.Ul);yPz(this.l5);g.yb(this.l5);VJ(this);g.fF.qJ(this.kR);this.Uo();this.Jf=null;g.yb(this.videoData);g.yb(this.JV);g.yb(this.Ma);g.yb(this.sU);g.kj(this.Ru);this.Lw=null;super.Vj()}pD(l,y,k,z,r){if(this.cG.X("html5_log_ad_playback_docid")){var Z=
this.l5;if(Z.qoe){Z=Z.qoe;var e=this.cG.C_||"yt";g.Nw(Z,g.vY(Z.provider),"ad_playback",[l,y,k,r,e])}}else this.l5.pD(l,y,k);this.X("html5_log_media_perf_info")&&this.Md("adloudness",{ld:z.toFixed(3),cpn:l})}gj(){return this.loader?.gj()}KY(){return this.loader?.KY()}Jr(){return this.loader?.Jr()}RA(){return this.loader?.RA()}eb(){return this.videoData.eb()}Ly(){return this.X("html5_not_reset_media_source")&&this.videoData.isLivePlayback||this.X("html5_not_reset_media_source_non_drm_vod")&&!this.videoData.isLivePlayback&&
!this.videoData.eb()&&!this.videoData.yf()}pn(){!this.videoData.K||this.X("html5_disable_target_codec_family_for_gapless")&&jn(this.videoData)||(this.videoData.uW=this.videoData.uW||this.E1.je().gj(),this.videoData.PV=this.videoData.PV||this.E1.je().KY());if(XJ5(this.videoData)||!OB(this.videoData)){var l=this.videoData.errorDetail;this.jI(this.videoData.errorCode||"auth",2,unescape(this.videoData.errorReason),l,l,this.videoData.FT||void 0)}this.X("html5_generate_content_po_token")&&this.P6();this.Kh();
if(this.cG.experiments.sA().Z.G7(VE4)){l=this.Md;var y=this.cG;y.RY===null&&(y.RY=window.MediaSource&&window.MediaSource.isTypeSupported?window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42001E"; decode-to-texture=true'):!1);l.call(this,"dttg",{dtt:y.RY,gl:this.cG.supportsGaplessShorts()})}}getVideoData(){return this.videoData}O(){return this.cG}JG(){return this.bW.JG(this.Jf)}gT(){return this.visibility}Ap(){return this.mediaElement&&this.mediaElement.S()?this.mediaElement.Jv():null}fl(){return this.mediaElement}PO(){if(this.videoData.errorCode)return!1;
this.O().S&&this.O().houseBrandUserStatus&&this.Md("hbut",{status:this.O().houseBrandUserStatus},!0);if(this.videoData.Ij())return!0;this.jI("api.invalidparam",2,void 0,"invalidVideodata.1");return!1}KD(l=!1){l||NI(this.l5);this.TX=l;!this.PO()||this.qs.Wo()?pt(this)&&this.qs.Wo()&&!this.qs.finished&&!this.TX&&this.ux():(this.qs.start(),l=this.l5,g.vY(l.provider),l.qoe&&NFs(l.qoe),l.provider.cG.sA().Z.G7(TaQ)&&g.G6("cobalt")&&g.G6("android")&&(l=l.provider.videoData.clientPlaybackNonce)&&E$_(l),this.ux())}ux(){if(this.videoData.isLoaded()){var l=
this.JV;g.i_(l.Qj.experiments,"html5_player_min_build_cl")>0&&g.i_(l.Qj.experiments,"html5_player_min_build_cl")>880591072&&W7(l,"oldplayer",!0);d14(this)}else this.videoData.q_||this.videoData.V9?this.TX&&pt(this)||(this.videoData.q_?l4z(this.videoData):(l=this.l5,l.qoe&&(l=l.qoe,RF(l,"protected"),l.provider.videoData.J?l.hj():l.provider.videoData.subscribe("dataloaded",l.hj,l)),L_t(this.videoData))):!this.videoData.loading&&this.pG&&wl_(this)}UK(l){this.m8=l;this.loader&&(i2y(this.loader,l),this.Md("sdai",
{sdsstm:1}))}FP(l,y,k){this.loader?.FP(l,y,k)}ED(l){this.loader?.ED(l)}OS(){return this.loader?.vI()||null}isFullscreen(){return this.visibility.isFullscreen()}isBackground(){return this.visibility.isBackground()}x8(){Pr(this).then(()=>Wr(this));
this.playerState.isOrWillBePlaying()&&this.playVideo()}PT(){this.mediaElement&&this.mediaElement.activate();this.KD();this.PO()&&!this.playerState.Z(128)&&(this.oV.Wo()||(this.oV.start(),this.videoData.kz?this.e2(cK(this.playerState,4)):this.e2(cK(cK(this.playerState,8),1))),YZ(this))}M$(){return this.qs.finished}sendAbandonmentPing(){this.getPlayerState().Z(128)||(this.publish("internalAbandon"),this.qk(!0),yPz(this.l5),g.yb(this.l5),g.fF.qJ(this.kR))}m4(l=!0,y=!0,k){y&&this.mediaElement&&this.mediaElement.pause();
l&&k&&this.loader&&fc(this.videoData)&&this.loader.nX(k);this.e2(l?new g.U5(14):new g.U5)}wF(){this.l5.Kd()}jI(l,y,k,z,r,Z){let e,A;g.BO($Yz,k)?e=k:k?A=k:e="GENERIC_WITHOUT_LINK";z=(z||"")+`;a6s.${$W()}`;if(l==="auth"||l==="drm.auth"||l==="heartbeat.stop")k&&(z+=`;r.${k.replaceAll(" ","_")}`),Z&&(z+=`sr.${Z.replaceAll(" ","_")}`);y={errorCode:l,errorDetail:r,errorMessage:A||g.r6[e]||"",W_:e,FT:Z||"",w$:z,kf:y,cpn:this.videoData.clientPlaybackNonce};this.videoData.errorCode=l;Jj(this,"dataloaderror");
this.e2(MH(this.playerState,128,y));g.fF.qJ(this.kR);VJ(this);this.lI()}ud(l){this.Ji=this.Ji.filter(y=>l!==y);
this.oV.Wo()&&YZ(this)}pJ(){var l;(l=!!this.Ji.length)||(l=this.Yw.Z.array[0],l=!!l&&l.start<=-0x8000000000000);return l}Ub(){return this.Hn.Ub()}isPlaying(){return this.playerState.isPlaying()}zX(){return this.playerState.zX()&&this.videoData.kz}getPlayerState(){return this.playerState}rH(l){this.loader?.rH(l)}Q_(l){this.loader?.Q_(l)}getPlayerType(){return this.playerType}getPreferredQuality(){if(this.Jf){var l=this.Jf;l=l.videoData.s6.compose(l.videoData.TC);l=Tk(l)}else l="auto";return l}isGapless(){return!!this.mediaElement&&
this.mediaElement.isView()}wP(){return this.E1.wP()}setMediaElement(l){if(this.mediaElement&&l.Jv()===this.mediaElement.Jv()&&(l.isView()||this.mediaElement.isView())){if(l.isView()||!this.mediaElement.isView())this.Du(),this.mediaElement=l,this.mediaElement.BG=this,u5C(this),this.Hn.setMediaElement(this.mediaElement)}else{this.mediaElement&&this.Uo();if(!this.playerState.isError()){let y=CM(this.playerState,512);y.Z(8)&&!y.Z(2)&&(y=cK(y,1));l.isView()&&(y=CM(y,64));this.e2(y)}this.mediaElement=l;
this.mediaElement.BG=this;!g.dU(this.cG)&&this.mediaElement.setLoop(this.loop);this.mediaElement.setPlaybackRate(this.playbackRate);u5C(this);this.Hn.setMediaElement(this.mediaElement);this.X("html5_prewarm_media_source")&&!this.JV.xf()&&cR5(this.mediaElement)}}Uo(l=!1,y=!1,k=!1){if(this.mediaElement){var z=this.getCurrentTime();z>0&&(this.Hn.N=z);this.Hn.setMediaElement(null);!l&&this.Ly()?Qo_(this):this.yb(k);this.loader&&(WY(this.loader),this.loader?.sj(y));this.Rs.stop();if(this.mediaElement&&
(!this.oV.Wo()&&!this.sG()||this.playerState.isError()||this.playerState.Z(2)||this.e2(cK(this.playerState,512)),this.mediaElement)){this.Du();if(l||!this.mediaElement.isView())this.QM.j0("mesv_s"),this.mediaElement.stopVideo(),be(this);this.mediaElement=this.mediaElement.BG=null}}}async playVideo(l=!1,y=!1){var k=window.google_image_requests;k&&k.length>10&&(window.google_image_requests=k.slice(-10));if(!this.playerState.Z(128))if(this.JV.JN())this.publish("signatureexpired");else if(this.mediaElement&&
NI(this.l5),this.PT(),(this.playerState.Z(64)||l)&&this.e2(cK(this.playerState,8)),this.oV.finished&&this.mediaElement){if(!this.Jf&&this.M3&&(await this.M3,this.playerState.Z(128)))return;if(this.videoData.N){if(this.Jk()&&this.videoData.N.Z())return Pr(this);if($Z(this))l=this.Hn,nN(l.videoData)&&!l.isAtLiveHead(l.getCurrentTime())&&l.Ub()&&l.Zr.seekTo(Infinity,{gY:"seektimeline_peggedToLive",seekSource:34});else if(nN(this.videoData)){l=this.getCurrentTime()<this.dY()-15;const z=g.la(this.videoData)&&
this.playerState.isPaused(),r=this.playerState.Z(1024);k=this.Hn;k.videoData.UA()&&Xj(k.videoData)||r||!l&&!z||(z?this.seekTo(Infinity,{gY:"videoplayer_unpauseLiveOnly",seekSource:102}):this.seekTo(this.dY(),{gY:"videoplayer_outOfWindow",seekSource:102}));!this.isAtLiveHead(void 0,!0)&&this.Ub()&&this.seekTo(Infinity,{gY:"videoplayer_peggedToLive",seekSource:34});if(this.playerState.Z(256)&&this.videoData.A&&this.Hn.JR()){this.e2(bt(this.playerState,8,4));return}}this.playerState.Z(4)&&this.playerState.Z(16)&&
this.e2(bt(this.playerState,9,4));Wr(this,y)?m1s(this):SQ(this)}else this.videoData.isLivePlayback&&!g.tA(this.cG.J,!0)?(y="html5.unsupportedlive",l=2):(y=this.videoData.eb()?"fmt.unplayable":"fmt.noneavailable",l=1),g.WH(Error("selectableFormats")),this.jI(y,l,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK","trg.selectableFormats")}}SZ(l){l&&this.ZQ(new g.Gr("qoe.restart",l));this.e2(cK(this.playerState,2048));this.yb();l=this.videoData.Z&&this.videoData.Z.J();const y=this.mediaElement&&this.mediaElement.isView();
l||y?(this.loader&&r6T(this.loader),this.Ed()):(Wr(this),this.playerState.isOrWillBePlaying()&&this.playVideo());this.playerState.isOrWillBePlaying()||this.e2(CM(this.playerState,2048))}Gi(){if(!this.Jf)return[];const l=K5(this.bW,this.Jf,this.jp());return this.Jf.Z.Gi(l)}Id(){if(!this.Jf)return[];const l=K5(this.bW,this.Jf,this.jp());return this.Jf.Z.Id(l)}sW(){return this.bW.sW(!!this.Jf?.Z?.Z())}F1(){return this.Jf?this.bW.F1(this.Jf):Tj}jp(){let l;l=this.GA?this.GA.jp():KN(this.videoData)&&this.videoData.Z&&
this.videoData.Z.J()?this.videoData.Ac?Tj:kn:Tj;this.kL&&(l=l.compose(Znt));return l}L5(){return this.Jf?K5(this.bW,this.Jf,this.jp()):Tj}JK(){const l=this.Qi(),y=this.E1.hs().videoId;return this.E1.Ny.JK(l)||this.E1.Ny.JK(y)}Dy(l){if(l.Z===Tj.Z)this.l5.Dy("A");else{var y=this.Jf?.Z?.Id(l)?.map(k=>k.video)?.sort((k,z)=>(z.N??0)-(k.N??0));
this.l5.Dy("M",y?.[0]?.N??(NxQ(l.Z)?l.Z:0))}}DR(l,y,k){this.Dy(l);this.videoData.s6=l;if(this.Jf&&y){y=this.bW;var z=this.Jf;if(z.Z.Z()){var r=g.i_(y.cG.experiments,"html5_max_quality_sel_upgrade"),Z=r?l.Z:g.pk[Tk(l)],e=z.Z.videoInfos[0].video.qualityOrdinal,A=e!==0&&l.Z===e;e=aE()>e;A&&e||(r&&A&&(Z=Math.max(Z,r)),r=YI(y,z.Z?.videoInfos),A=y.Zr.getPlaybackRate(),A>1&&r&&(r=QGe(y.cG.J,z.Z.videoInfos,A),l.Z!==0&&r<l.Z&&y.Zr.setPlaybackRate(1)),g.eY("yt-player-quality",{quality:Z,previousQuality:z.videoData.C?.video?.qualityOrdinal||
0},31104E3),y.o7.policy.C=aE()>=480,y.X("html5_perf_cap_override_sticky")&&FmP(y.N,y.X("html5_perserve_av1_perf_cap")))}}this.loader&&(l=this.loader,k=k||"",l.policy.Z?DV(l.J.Z,k):DV(l.Z.J,k));this.D0()}getUserPlaybackQualityPreference(){return this.videoData.N&&!this.videoData.N.Z()?Tk(this.videoData.s6):IE[aE()]}hasSupportedAudio51Tracks(){return this.videoData.hasSupportedAudio51Tracks()}setUserAudio51Preference(l,y){this.getUserAudio51Preference()!==l&&(this.Md("toggle51",{pref:l}),g.eY("yt-player-audio51",
l,y?31536E3:2592E3),this.x8())}getUserAudio51Preference(){return this.videoData.getUserAudio51Preference()}setProximaLatencyPreference(l){const y=this.getProximaLatencyPreference();this.Md("proxima",{pref:l});g.eY("yt-player-proxima-pref",l,31536E3);y!==l&&(l=this.Hn,l.xz=!0,l.Zr.seekTo(Infinity,{gY:"seektimeline_proximaSeekToHead",seekSource:34}))}getProximaLatencyPreference(){return iY()??0}isProximaLatencyEligible(){return this.videoData.isProximaLatencyEligible}P6(){this.videoData.videoId?this.E1.P6(this.videoData):
this.Md("povid",{})}Kh(){this.videoData.videoId?this.E1.Kh(this.videoData):this.Md("piavid",{})}D0(){if(!this.IR()&&!this.playerState.Z(128)&&this.videoData.N){if(this.videoData.N.Z())qn(this);else{const z=mk(this);var l=this.videoData;a:{var y=z;var k=this.videoData.WG;if(y.Z){for(const r of k){const Z=r.getInfo(),e=g.pk[Z.video.quality];if((!y.N||Z.video.quality!=="auto")&&e<=y.Z){y=r;break a}}y=k[k.length-1]}else y=k[0]}l.HG=y;Ct(this,z.reason,WnT(this,this.videoData.HG))}if(this.X("html5_check_unstarted")?
this.playerState.isOrWillBePlaying():this.isPlaying())this.Hn.D=!1,this.playVideo()}}LR(l,y){if(this.IR()||this.playerState.Z(128))return!1;var k=!!this.videoData.N?.Z(),z=k&&y?this.getCurrentTime()-this.w4():NaN;if(l.a7&&l.a7.id){var r=this.l5;if(r.qoe){r=r.qoe;const e=[l.a7.id,isNaN(z)?"m":"t"];g.Nw(r,g.vY(r.provider),"afi",e)}}if(k){if(y){var Z=dw(this.Hn);this.Md("aswh",{id:l.id,xtags:l.xtags,bh:Z.toFixed(3)})}this.loader.setAudioTrack(l,z,y);return!0}if(Tug(this)){a:{Z=this.mediaElement.audioTracks();
y=!1;for(z=0;z<Z.length;++z)if(k=Z[z],(nt[k.label]||k.label)===l.a7.getName()){if(k.enabled){Z=!1;break a}y=k.enabled=!0}else k.enabled&&(k.enabled=!1);Z=y?!0:void 0}Z&&this.Md("hlsaudio",{id:l.id})}else{a:if(y=this.videoData,y.V&&!y.V.N()||l===y.U7||!y.WG||y.WG.length<=0)Z=!1;else{for(Z of y.WG){if(!(Z instanceof lQy)){Z=!1;break a}z=Z;k=l.a7.getId();z.N&&(F1T(z.N,k),z.pP=null)}y.U7=l;Z=!0}Z&&Wr(this)&&(this.publish("internalaudioformatchange",this.videoData,!0),this.Md("hlsaudio",{id:l.id}))}return!0}getAvailableAudioTracks(){return this.videoData.getAvailableAudioTracks()}getAudioTrack(){if(Tug(this)){const l=
PaQ(this);if(l)return l}return this.videoData.getAudioTrack()}nY(){return this.videoData.V}O2(l){return this.Pu?this.Pu.O2(l):1}Zl(){this.Pu&&this.Pu.Zl()}oD(){this.videoData.X("html5_trigger_loader_when_idle_network")&&!this.videoData.UA()&&Kc(this.videoData)&&this.loader?.LK()}A3(){jn(this.videoData)&&this.loader?.LK()}onPlayerRequestSent(l){this.E1.onPlayerRequestSent(l)}Ux(l=!1){if(this.loader){var y=this.loader,k=y.Ux;var z=this.videoData;z=z.X("html5_ssdai_use_post_for_media")&&z.enableServerStitchedDai?
!1:fc(z)&&z.CE&&!z.isAd();k.call(y,z,l)}}yb(l=!1){this.yj&&(this.yj.C_(),this.Ux(l),this.yj.dispose(),this.yj=null)}bX(){return this.yj}V_(l,y=!1,k=!1,z=!1){plt(this,z);this.yj=l;l=r=>{try{KnC(this,r,y,k)}catch(Z){g.WH(Z),this.handleError(new g.Gr("fmt.unplayable",{msi:"1",ename:Z&&typeof Z==="object"&&"name"in Z?String(Z.name):void 0,trg:"setmediasrc"},1))}};
this.Ly()&&this.yj.N()==="open"?l(this.yj):hYe(this.yj,l)}Hd(l){this.F5.set(l.initData,l);this.GA&&(this.GA.Hd(l),this.X("html5_eme_loader_sync")||this.F5.remove(l.initData))}bc(l){this.videoData.OG=g.m8("auto",l,!1,"u");qn(this)}yg(l){var y=l.reason,k=l.Z.info,z=l.source,r=l.token,Z=this.l5;const e=this.videoData;if(k!==e.V){var A=!e.V;e.V=k;var Q=y==="m"||y==="t";Q||(y=A?"i":"a");y=new bis(k,y,"",z,r);if(Z.qoe){Z=Z.qoe;k=g.vY(Z.provider);const d=Z.provider.cG.sA(),w=[];if(y.Z.id!==Z.HG){z=[y.Z.id,
Z.HG,y.reason];r=w;var t=r.push;const h=[];var O=y.Z.audio;if(O){const U=O?.V;U!==void 0&&h.push(`${"fl"}.${U}`);O=O?.N;O!==void 0&&(O=Math.min(-O,0),h.push(`${"vg"}.${O}`),h.push("nm.4"))}t.call(r,...h);d.Z.G7(ft)&&y.reason==="i"&&w.push(v$y(Z,y));w.length>0&&z.push(w.join(";"));y.token&&z.push(y.token);g.Nw(Z,k,"afs",z);Z.HG=y.Z.id}}this.publish("internalaudioformatchange",e,!A&&Q)}this.Zl();this.Hn.yg(l.Z.index)}AN(l){this.publish("localmediachange",l)}ww(l={}){this.loader?.ww(this.cG,EK(this.videoData),
l)}JN(){return this.JV.JN()}G8(l){this.ZQ(new g.Gr("staleconfig",{reason:l}))}handleError(l){this.JV.handleError(l)}xf(){return this.JV.xf()}bA(l){this.Hn.bA(l)}async Ed(l=!1,y=!1){this.loader&&this.loader.zC();this.loader&&this.loader.IR()&&VJ(this);this.X("html5_enable_vp9_fairplay")&&this.eb()&&this.videoData.Z?.hv();this.e2(cK(this.playerState,2048));this.publish("newelementrequired");l&&await Pr(this);this.videoData.UA()&&this.loader?.Ja&&!$Z(this)&&(this.isAtLiveHead()&&nN(this.videoData)?this.seekTo(Infinity,
{gY:"videoPlayer_getNewElement"}):this.videoData.aj&&this.loader&&(l=this.loader,l.Ej.UA&&(l.Ej.aj||l.Ej.C||l.Ej.isPremiere?(l.seek(0,{gY:"loader_resetSqless"}),l.videoTrack.S=!0,l.audioTrack.S=!0,l.videoTrack.V=!0,l.audioTrack.V=!0):f2(l.Ej)&&Rb(l))));y&&this.seekTo(0,{seekSource:105});this.playerState.Z(8)&&this.playVideo()}GQ(l){this.Md("hgte",{ne:+l});this.videoData.K=!1;l&&this.Ed();this.loader&&r6T(this.loader)}Xl(l){this.Md("newelem",{r:l});this.Ed()}pauseVideo(l=!1){if((this.playerState.Z(64)||
this.playerState.Z(2))&&!l)if(this.playerState.Z(8))this.e2(bt(this.playerState,4,8));else if(this.zX())Wr(this);else return;this.playerState.Z(128)||(l?this.e2(cK(this.playerState,256)):this.e2(bt(this.playerState,4,8)));this.mediaElement&&this.mediaElement.pause();g.la(this.videoData)&&this.loader&&this.loader?.sj(!1)}stopVideo(){this.pauseVideo();this.loader&&(this.loader?.sj(!1),this.loader.YF())}lI(l=!1,y=!1){this.Ly()&&y?this.mediaElement?.lI():this.mediaElement?.stopVideo();be(this);VJ(this);
this.playerState.Z(128)||(l?this.e2(CM(CM(cK(this.playerState,4),8),16)):this.e2(MH(this.playerState)));this.videoData.videoId&&this.cG.RR.remove(this.videoData.videoId)}seekTo(l,y={}){this.playerState.Z(2)&&Wr(this);y.U40&&this.e2(cK(this.playerState,2048));if((y.seekSource===58||y.seekSource===60)&&this.X("html5_update_vss_during_gapless_seeking")){var k=this.l5;k.Z&&(k=k.Z,y.seekSource===58?k.Z.update():k.V&&(k.S(),Fi(k).send(),k.C=NaN))}this.Hn.seekTo(l,y);this.Yw.sync()}In(l){this.QM.V.C=(0,g.f)();
this.playerState.Z(32)||(this.e2(cK(this.playerState,32,l?.seekSource)),this.playerState.Z(8)&&this.pauseVideo(!0),this.publish("beginseeking"));this.Pn()}SX(l){l=l?.seekSource;this.playerState.Z(32)?(this.e2(bt(this.playerState,16,32,l)),this.publish("endseeking")):this.playerState.Z(2)||this.e2(cK(this.playerState,16,l));l=this.QM.V;var y=this.videoData,k=this.playerState.isPaused();if(y.clientPlaybackNonce&&!isNaN(l.Z)){if(Math.random()<.01){k=k?"pbp":"pbs";const z={startTime:l.Z};y.a4&&(z.cttAuthInfo=
{token:y.a4,videoId:y.videoId});p4("seek",z);g.YV({clientPlaybackNonce:y.clientPlaybackNonce},"seek");isNaN(l.C)||Jt("pl_ss",l.C,"seek");Jt(k,(0,g.f)(),"seek")}l.reset()}}DD(l){this.SX(l)}h9(){this.publish("SEEK_COMPLETE")}wp(l){var y=this.E1,k=this.videoData.clientPlaybackNonce,z=this.playerType;if(l.scope===4){var r=l.type;if(r){var Z=y.b5(),e=Z.getVideoData().clientPlaybackNonce;z===1&&(e=k);if(z=fnz(y,e)){if(k=z.getVideoData())l.writePolicy===2&&k.sabrContextUpdates.has(r)||(l.sendByDefault&&
k.rb.add(r),k.sabrContextUpdates.set(r,l)),y.X("html5_enable_t1_enf_on_sabr")&&(l=r===5,r=Yb4(k.playerResponse),l?(l=r?1:0,gM(l,"m.p_",{}),AK("MBSTAT",l)):l=1,l===0&&g.G3(y.K_,"onAbnormalityDetected"))}else Z.Md("scuset",{ncpf:"1",ccpn:e,crcpn:k})}else g.WH(Error("b/380308491: contextUpdateType is undefined"))}}Hx(){if(this.playerType===2)return this.E1.Hx("")}getCurrentTime(l=!1){return this.Hn.getCurrentTime(l)}gQ(){return this.Hn.gQ()}YK(){return this.Hn.YK()}vx(){return this.YK()}mf(){return this.Hn.mf()}getPlaylistSequenceForTime(l){return this.videoData.getPlaylistSequenceForTime(l-
this.w4())}qS(){let l=NaN;this.mediaElement&&(l=this.mediaElement.qS());return l>=0?l:this.getCurrentTime()}QK(){if(this.videoData.Z?.QK)return this.videoData.Z.QK(this.getCurrentTime()-this.w4());if(this.mediaElement){var l=this.mediaElement.rb();if(l&&(l=l.getTime(),!isNaN(l)))return l/1E3+this.getCurrentTime()}return NaN}getDuration(){return this.videoData.lengthSeconds?this.videoData.lengthSeconds+this.w4():this.TM()?this.TM():0}AB(){const l=new Vse;if(this.loader){y8T(this.o7,l,this.cG.yM());
var y=this.loader;if(y.yj&&y.yj.J&&!y.yj.AC()&&(l.M1=xi(y.videoTrack),l.C=xi(y.audioTrack),y.policy.N)){const k=Yi(y.videoTrack),z=Yi(y.audioTrack),r=YR(y.yj.C.Za(),"_",5),Z=YR(y.yj.Z.Za(),"_",5);Object.assign(l.Z,{lvq:k,laq:z,lvb:r,lab:Z})}l.bandwidthEstimate=$_(y.D);y.audioTrack.A?.flush();y.videoTrack.A?.flush()}else this.mediaElement&&(l.M1=wV(this.mediaElement));l.Ai=this.Ai;l.FF=this.FF;l.N=this.isAtLiveHead()&&this.isPlaying()?Ty(this):NaN;y=this.Hn;y=y.Z?le(y.Z):0;l.V=y;return l}Eq(l,y){this.FF+=
l;this.Ai+=y}FO(){return this.mediaElement?g.la(this.videoData)?1:yi(this.videoData)?this.isAtLiveHead()||this.Ub()?1:this.Hn.FO():this.mediaElement.FO():0}lP(){var l=this.X0;const y=an(l,"bandwidth"),k=an(l,"bufferhealth"),z=an(l,"livelatency"),r=an(l,"networkactivity"),Z=Gy(l,"bandwidth"),e=Gy(l,"bufferhealth"),A=Gy(l,"livelatency");l=Gy(l,"networkactivity");var Q=this.j6();const t=Q.droppedVideoFrames;Q=Q.totalVideoFrames;var O=this.getCurrentTime();if(this.GA){var d="IT/"+(this.GA.Z.getInfo()+
"/"+Tk(this.jp()));d+="/"+this.GA.getInfo()}else d="";var w=this.isGapless(),h=this.wP(),U=this.Bh(),u=this.I8(),W=g.jQ(this),V=this.getPlayerState().state.toString(16),T=this.getPlaylistSequenceForTime(this.getCurrentTime());a:{var J=0;var K="";if(this.m8){if(this.m8.lX){K="D,";break a}J=this.m8.ES;K=this.m8.ML.substring(0,4)}J>0?(J=`AD${J}, `,K&&(J+=`${K}, `),K=J):K=""}return{vH:Z,sx:e,currentTime:O,YJ:d,droppedVideoFrames:t,isGapless:w,wP:h,Bh:U,q$:u,iy:y,ly:k,Fx:z,OP:r,zR:A,Ew:l,DT:W,N0:V,J0:T,
Xq:K,totalVideoFrames:Q}}Dp(l=!1){const y={};if(l){Object.assign(y,this.l5.Dp());this.mediaElement&&(Object.assign(y,this.mediaElement.Dp()),l=this.j6(),y.dvf=l.droppedVideoFrames,y.tvf=l.totalVideoFrames);this.loader&&Object.assign(y,this.loader.Dp());this.GA&&(y.drm=JSON.stringify(this.GA.Dp()));y.state=this.playerState.state.toString(16);this.playerState.Z(128)&&(y.debug_error=JSON.stringify(this.playerState.Ip));this.pJ()&&(y.prerolls=this.Ji.join(","));this.videoData.y0&&(y.ismb=this.videoData.y0);
this.videoData.latencyClass!=="UNKNOWN"&&(y.latency_class=this.videoData.latencyClass);this.videoData.isLowLatencyLiveStream&&(y.lowlatency="1");if(this.videoData.defaultActiveSourceVideoId||this.videoData.compositeLiveStatusToken||this.videoData.compositeLiveIngestionOffsetToken)y.is_mosaic=1;this.videoData.cotn&&(y.is_offline=1,y.cotn=this.videoData.cotn);this.videoData.playerResponseCpn&&(y.playerResponseCpn=this.videoData.playerResponseCpn);this.E1.isOrchestrationLeader()&&(y.leader=1);this.videoData.isLivePlayback&&
(this.videoData.Z&&Yp(this.videoData.Z)&&(y.segduration=Yp(this.videoData.Z)),l=this.Hn,y.lat=l.A?l.A.V.N():0,y.liveutcstart=this.videoData.liveUtcStartSeconds);y.relative_loudness=this.videoData.YR.toFixed(3);if(l=g.jQ(this))y.optimal_format=l.video.qualityLabel;y.user_qual=aE();y.release_version="youtube.player.web_20260308_08_RC00"}y.debug_videoId=this.videoData.videoId;return y}addCueRange(l){this.hp([l])}removeCueRange(l){this.Yw.t6([l])}OH(){var l=this.Yw;if(l.Zr.O().X("html5_sort_cueranges_on_update")&&
!(l.XJ().length<=0||l.IR())){var y=l.Z;y.array.sort(y.Z)}l.sync()}sb(l,y){return this.Yw.sb(l,y)}hp(l,y){this.Yw.Wa(l,y)}ZI(l){this.Yw.t6(l)}XJ(){return this.Yw.XJ()||[]}q8(){return this.Fl}Jk(){return this.visibility.Jk()}gw(){this.mediaElement&&this.mediaElement.gw()}M9(){Jj(this)}togglePictureInPicture(){this.mediaElement&&this.mediaElement.togglePictureInPicture()}Du(){this.FR.C()}gi(){this.Pn();this.publish("onLoadProgress",this.FO())}zb(l){var y=l.target.VR();if(this.mediaElement&&this.mediaElement.VR()&&
this.mediaElement.VR()===y){gk_(this,l.type);switch(l.type){case "error":var k=GH(this.mediaElement)||"",z=this.mediaElement.hC();if(k==="capability.changed"){this.X("html5_restart_on_capability_change")?(this.Md("capchg",{msg:z}),this.Ed(!0)):Pr(this);return}if(this.mediaElement.hasError()&&qI(this.JV,k,{msg:z,trg:"elementevt"}))return;if(this.isBackground()&&this.mediaElement.eV()===4){this.lI();Kt(this,"unplayable");return}break;case "durationchange":k=this.mediaElement.getDuration();isFinite(k)&&
(!this.yj||k>0)&&k!==1&&this.BZ(k);break;case "ratechange":this.loader&&this.loader.setPlaybackRate(this.mediaElement.getPlaybackRate());k=this.Yw;k.started=!0;k.sync();this.l5.onPlaybackRateChange(this.getPlaybackRate());break;case "loadedmetadata":In(this,!1);EkC(this);this.publish("onLoadedMetadata");fKt(this);k=this.QK();this.videoData.Mq&&(this.videoData.Mq=k);break;case "loadstart":fKt(this);break;case "progress":case "suspend":this.Ow.V();break;case "seeked":this.loader?.Fg();break;case "playing":In(this,
!1);this.QM.j0("plev");this.cJ&&!$Z(this)&&(this.cJ=!1,this.isAtLiveHead()||this.seekTo(Infinity,{gY:"videoplayer_onPlaying"}));break;case "timeupdate":In(this,!1);k=this.mediaElement&&!this.mediaElement.getCurrentTime();z=this.mediaElement&&this.mediaElement.N()===0;if(k&&(!this.BC||z))return;this.BC=this.BC||!!this.mediaElement.getCurrentTime();FR(this);this.Pn();if(!this.mediaElement||this.mediaElement.VR()!==y)return;this.publish("onVideoProgress",this.getCurrentTime());break;case "waiting":if(this.mediaElement.J().length>
0&&this.mediaElement.Cy().length===0&&this.mediaElement.getCurrentTime()>0&&this.mediaElement.getCurrentTime()<5&&this.loader)return;break;case "resize":EkC(this);this.videoData.C&&this.videoData.C.video.quality==="auto"&&this.publish("internalvideoformatchange",this.videoData,!1);break;case "pause":if(this.HH&&this.playerState.Z(8)&&!this.playerState.Z(1024)&&this.getCurrentTime()===0&&g.Km){Kt(this,"safari_autoplay_disabled");return}}if(this.mediaElement&&this.mediaElement.VR()===y){YKz(this.Hn,
l);this.publish("videoelementevent",l);y=this.playerState;z=this.Ey;var r=this.mediaElement;k=this.videoData.clientPlaybackNonce;if(!y.Z(128)){var Z=y.state;r=r?r:l.target;var e=r.getCurrentTime();if(!y.Z(64)||l.type!=="ended"&&l.type!=="pause"){var A=r.getDuration();A=r.isEnded()||e>1&&Math.abs(e-A)<1.1;var Q=l.type==="pause"&&r.isEnded();e=l.type==="ended"||l.type==="waiting"||l.type==="timeupdate"&&!y.Z(4)&&!H7(z,e);if(Q||A&&e)r.PG()>0&&r.VR()&&(Z=14);else switch(l.type){case "error":GH(r)&&(Z|=
128);break;case "pause":y.Z(256)?(Z^=256)||(Z=64):y.Z(32)||y.Z(2)||y.Z(4)||(Z=4,y.Z(1)&&y.Z(8)&&(Z|=1));break;case "playing":A=Z;Z=(Z|8)&-1093;A&4?(Z|=1,Xs(z,r,!0)):H7(z,r.getCurrentTime())&&(Z&=-2);y.Z(1)&&Xs(z,r)&&(Z|=1);break;case "seeking":Z|=16;y.Z(8)&&(Z|=1);Z&=-3;break;case "seeked":Z&=-17;Xs(z,r,!0);break;case "waiting":y.Z(2)||(Z|=1);Xs(z,r);break;case "timeupdate":A=y.Z(16),Q=y.Z(4),(y.Z(8)||A)&&!Q&&H7(z,r.getCurrentTime())&&(Z=8),Xs(z,r)&&(Z|=1)}}z=Z;Z=null;z&128&&(Z=l.target,Q=GH(Z),e=
1,Q?(Q==="capability.changed"&&(e=2),r="GENERIC_WITHOUT_LINK",A=Z.Dp(),A.mediaElem="1",A.trg="melem",/AUDIO_RENDERER/.test(Z.hC())&&(r="HTML5_AUDIO_RENDERER_ERROR"),Z={errorCode:Q,errorMessage:g.r6[r]||"",W_:r,w$:wd(A),kf:e,cpn:y.Ip?y.Ip.cpn:""}):Z=null,Z&&(Z.cpn=k));y=MH(y,z,Z)}!this.playerState.Z(1)&&y.Z(1)&&on(this,"evt"+l.type);this.e2(y)}}}v3(l){l=l.Z.availability==="available";l!==this.Fl&&(this.Fl=l,this.publish("airplayavailabilitychange"))}UO(){var l=(0,g.f)();const y=this.mediaElement.Jk();
this.Md("airplay",{ia:y});!y&&!isNaN(this.h3)&&l-this.h3<2E3||(this.h3=l,y!==this.Jk()&&(l=this.visibility,l.Z!==y&&(l.Z=y,l.Ul()),this.Md("airplay",{rbld:y}),this.x8()),this.publish("airplayactivechange"))}wQ(l){if(this.loader){var y=this.loader,k=y.V,z=y.getCurrentTime();const r=Date.now()-k.A;k.A=NaN;k.Md("sdai",{adfetchdone:l,d:r});l&&!isNaN(k.S)&&k.C!==3&&LX(k.loader,z,k.S,k.J);k.policy.C?k.N=NaN:k.V=NaN;Nk(k,4,k.C===3?"adfps":"adf");WY(y)}}jS(){g.Kl(this.v0);this.Rs.stop();this.videoData.A=
!0;this.cG.Gz=!0;this.cG.WG=0;var l=this.JV;if(l.videoData.C){var y=l.Qj.J,k=l.videoData.C.Dr;y.N.has(k)&&(y.N.delete(k),y.Z=!0)}l.Z.stop();l.Qj.pf=0;this.mG();this.playerState.Z(8)&&this.e2(CM(this.playerState,65));this.TX=!1;this.l5.Eb();this.Ma.Kl();this.publish("playbackstarted");(l=g.UT("yt.scheduler.instance.clearPriorityThreshold"))?l():xF(0)}mG(){var l=this.E1.hs(),y={};const k={};!K4("pbs",this.QM.timerName)&&M5.measure&&M5.getEntriesByName&&(M5.getEntriesByName("mark_nr")[0]?YQz("mark_nr"):
YQz());l.videoId&&(y.videoId=l.videoId);l.clientPlaybackNonce&&!this.X("web_player_early_cpn")&&(y.clientPlaybackNonce=l.clientPlaybackNonce);this.mediaElement&&this.mediaElement.isPaused()&&(k.isPausedOnLoad=!0);k.itag=l.C?Number(l.C.itag):-1;l.S2&&(k.preloadType=String(this.ey?2:1));y.liveStreamMode=h8_[RH(l)];y.playerInfo=k;this.QM.infoGel(y);if(this.loader){l=this.loader.timing;window&&window.performance&&window.performance.getEntriesByName&&(l.N&&(y=window.performance.getEntriesByName(l.N),y.length&&
(y=y[0],l.tick("vri",y.fetchStart),l.tick("vdns",y.domainLookupEnd),l.tick("vreq",y.requestStart),l.tick("vrc",y.responseEnd))),l.C&&(y=window.performance.getEntriesByName(l.C),y.length&&(y=y[0],l.tick("ari",y.fetchStart),l.tick("adns",y.domainLookupEnd),l.tick("areq",y.requestStart),l.tick("arc",y.responseEnd))));l=l.ticks;for(const z in l)l.hasOwnProperty(z)&&this.QM.tick(z,l[z])}}Pn(l=!1){if(this.mediaElement&&this.videoData){qKT(this.Hn,this.isPlaying());var y=this.getCurrentTime();this.loader&&
(this.playerState.Z(4)&&g.la(this.videoData)||this.playerState.Z(32)&&Kc(this.videoData)||U2t(this.loader,y),this.X("html5_log_centralized_player_time")&&Math.abs(this.getCurrentTime()-this.loader.A2())>10&&this.Md("sabrSeekRefactorCmt",{cmt:this.getCurrentTime(),loaderCmt:this.loader?.A2(),bh:this.loader?.Xr()},!0));y>5&&(this.Hn.N=y);var k=g.uw();k?g.fF.qJ(this.kR):g.pl(this.kR);var z=this.mediaElement.isPaused();if((this.playerState.isBuffering()||!z||this.videoData.Ja())&&!this.playerState.Z(128)){const r=
()=>{if(this.mediaElement&&!this.playerState.Z(128)){this.cG.yM()&&gk_(this,"pfx");var Z=this.getCurrentTime();this.X("html5_buffer_underrun_transition_fix")&&(Z-=this.w4());var e=wV(this.mediaElement),A=this.playerState.Z(8),Q=H7(this.Ey,Z),t=m4e(this.Ey,Z,(0,g.f)(),e);A&&Q?this.e2(CM(this.playerState,1)):A&&t?(this.cG.yM()&&this.X("html5_log_centralized_player_time")&&!isFinite(Z)&&t&&this.Md("sabrSeekRefactorCmtBhFix",{cmt:Z,loaderCmt:this.loader?.A2(),bh:this.loader?.Xr()}),A=this.getDuration(),
Q=nN(this.videoData),A&&Math.abs(A-Z)<1.1?(this.Md("setended",{ct:Z,bh:e,dur:A,live:Q}),this.mediaElement.Ti()?this.seekTo(0,{gY:"videoplayer_loop",seekSource:37}):this.m4()):(this.playerState.isBuffering()||on(this,"progress_fix"),this.e2(cK(this.playerState,1)))):(A&&!Q&&!t&&Z>0&&(A=(Date.now()-this.vt)/1E3,Q=this.getDuration(),Z>Q-1&&this.Md("misspg",{t:Z.toFixed(2),d:Q.toFixed(2),r:A.toFixed(2),bh:e.toFixed(2)})),this.playerState.isPaused()&&this.playerState.isBuffering()&&wV(this.mediaElement)>
5&&this.e2(CM(this.playerState,1)));this.Pn()}};
this.mediaElement.J().length===0?this.kR=k?g.fF.zk(r,100):g.JK(r,100):this.kR=k?g.fF.zk(r,500):g.JK(r,500)}this.videoData.g4=y;!l&&this.isPlaying()&&jo5(this);q9g(this.bW,this.Jf,this.fl(),this.isBackground())&&qn(this);this.publish("progresssync",l);z&&this.videoData.Ja()&&this.publish("onVideoProgress",this.getCurrentTime())}}Yi(){this.jI("ad.rebuftimeout",2,"RETRYABLE_ERROR",`vps.${this.playerState.state.toString(16)}`)}I8(){return this.l5.I8()}oA(){return this.loader?this.loader.oA():AJ(this.o7,
!0)}e2(l){if(!g.ut(this.playerState,l)){var y=new g.WK(l,this.playerState);this.playerState=l;SB4(this);var k=!this.Li.length;this.Li.push(y);var z=this.mediaElement&&this.mediaElement.isSeeking();y.tj(1)&&this.loader&&BFC(this.loader);z=y.oldState.C()&&!z;if(y.tj(1)&&z&&this.playerState.Z(8)&&!this.playerState.Z(64)&&this.loader&&(z=this.loader,z.F4=!0,z.policy.MW&&z.yj&&z.Md("lr_rb",{c:z.getCurrentTime(),s:z.isSeeking(),ab:YR(z.yj.Z.Za()),ala:bG(z.audioTrack)?.rY(),alr:z.audioTrack.Z?.rY(),vb:YR(z.yj.C.Za()),
vla:bG(z.videoTrack)?.rY(),vlr:z.videoTrack.Z?.rY()}),z.xE!==0&&z.Md("sps_rebuffer",{c:z.getCurrentTime()}),this.mediaElement&&wV(this.mediaElement)>=5)){z=this.bW;var r=this.Jf;!r.videoData.C||z.X("html5_disable_performance_downgrade")?z=!1:(Date.now()-z.K>6E4&&(z.C=0),z.C++,z.K=Date.now(),z.C!==4?z=!1:(xV5(z,r.videoData.C),z=!0));z&&qn(this)}(z=g.i_(this.cG.experiments,"html5_ad_timeout_ms"))&&this.videoData.isAd()&&l.Z(1)&&(l.Z(8)||l.Z(16))?this.tT.start(z):this.tT.stop();(fe(y,8)<0||y.tj(1024))&&
this.Rs.stop();!y.tj(8)||this.videoData.A||y.state.Z(1024)||this.Rs.start();y.state.Z(8)&&fe(y,16)<0&&!y.state.Z(32)&&!y.state.Z(2)&&this.playVideo();y.state.Z(2)&&yi(this.videoData)&&(this.BZ(this.getCurrentTime()),this.Pn(!0));y.tj(2)&&(this.qk(!0),this.cG.yM()&&this.X("html5_sabr_parse_live_metadata_playback_boundaries")&&Kc(this.videoData)&&this.videoData.Z&&(l={minst:`${this.videoData.Z.jK}`,cminst:`${this.videoData.Z.dY()+this.w4()}`,maxst:`${this.videoData.Z.e3}`,hts:`${this.videoData.Z.sj}`,
cmaxst:`${this.videoData.Z.TM()+this.w4()}`},this.Md("sabrSeekableBoundaries",l)));y.tj(128)&&this.lI();this.videoData.Z&&this.videoData.isLivePlayback&&!this.W9&&(fe(y,8)<0?(l=this.videoData.Z,l.S&&l.S.stop()):y.tj(8)&&this.videoData.Z.resume());l=this.Hn;l.C_.J.Kl();if(l.mediaElement)if(y.oldState.C()&&ai(y.state)&&y.state.isBuffering()){z=l.mediaElement.getCurrentTime();r=l.mediaElement.Cy();var Z=l.X("manifestless_post_live_ufph")||l.X("manifestless_post_live")?Rh(r,Math.max(z-3.5,0)):Rh(r,z-
3.5);Z>=0&&z>r.end(Z)-1.1&&Z+1<r.length&&r.start(Z+1)-r.end(Z)<11&&(Z=r.start(Z+1)+.2+l.w4(),Math.abs(l.WG-Z)<.2||(l.Zr.Md("seekover",{b:YR(r,"_"),cmt:z}),l.WG=Z,l.seekTo(Z,{zf:!0,gY:"seektimeline_postLiveDisc"})))}else y.state?.C()&&!l.mK&&(l.videoData.limitedPlaybackDurationInSeconds>0?(xZ(l.Zr,l.getCurrentTime()+l.videoData.limitedPlaybackDurationInSeconds),l.mK=!0):l.videoData.isLivePlayback&&l.videoData.endSeconds>0&&(xZ(l.Zr,l.getCurrentTime()+l.videoData.endSeconds),l.mK=!0));l=this.l5;if(y.tj(1024)||
y.tj(512)||y.tj(4))l.C&&(z=l.C,z.C>=0||(z.Z=-1,z.delay.stop())),l.qoe&&(z=l.qoe,z.S||(z.V=-1));l.provider.videoData.enableServerStitchedDai&&l.Ol?l.N.get(l.Ol)?.b0(y):l.Z&&l.Z.b0(y);if(l.qoe){z=l.qoe;r=y.state;Z=g.vY(z.provider);var e=z.getPlayerState(r),A=Z,Q=r.seekSource||void 0;if(e!==z.fp){z.Y||A<z.N||(z.fp==="PL"?z.playTimeSecs+=A-z.N:z.fp==="B"&&z.isBuffering&&(z.isBuffering=!1,z.rebufferTimeSecs+=A-z.D,!z.xz&&z.rebufferTimeSecs>=10&&z.playTimeSecs<=180&&(z.Z.set("qoealert",["1"]),z.xz=!0)),
e!=="B"||z.fp!=="PL"&&z.fp!=="PB"||(z.isBuffering=!0),z.N=A);z.fp==="PL"&&(e==="B"||e==="S")||z.provider.cG.yM()?BY(z,A):(z.Oj||e!=="PL"||(z.Oj=!0,L8(z,A,z.provider.Zr.AB())),sF(z,A));e==="PL"&&z.OA.Kl();var t=[e];e==="S"&&Q&&t.push(`${"ss"}.${Q}`);g.Nw(z,A,"vps",t);z.fp=e;z.D=A;z.N=A;z.J=!0}A=r.Ip;r.Z(128)&&A&&(A.w$=A.w$||"",j9C(z,Z,A.errorCode,A.kf,A.w$));(r.Z(2)||r.Z(128))&&z.reportStats(Z);r.isPlaying()&&!z.S&&(z.V>=0&&z.Z.set("user_intent",[z.V.toString()]),z.S=!0);HY(z)}l.C&&(l=l.C,VzP(l),l.playerState=
y.state,l.C>=0&&y.tj(16)&&l.seekCount++,y.state.isError()&&l.send());if(k&&!this.IR())try{for(const d of this.Li){var O=this.Yw;if(O.started&&(O.sync(),d.oldState.Z(16))){y=O;const w=AP4(y.Z,Math.max(y.N-2E3,0));!isNaN(w)&&w<0x7ffffffffffff&&y.V.start()}this.publish("statechange",d)}}finally{this.Li.length=0}}}YI(){this.QM.tick("qoes")}bU(){this.Hn.bU()}df(l,y,k,z="LICENSE"){a:{var r=this.JV;k=k.substring(0,256);let Z=h7(y);l==="drm.keyerror"&&this.GA&&this.GA.N.keys.length>1&&r.V<96&&(l="drm.sessionlimitexhausted",
Z=!1);const e=r.Qj.experiments.z7("html5_retry_on_drm_unavailable"),A=r.Qj.experiments.z7("html5_retry_on_drm_key_error"),Q=/^(closedShouldNotRetry|t\.prefixedKeyError)(.*)/;if(e&&l==="drm.unavailable"||A&&l==="drm.keyerror"&&!k.match(Q))r.ZQ("qoe.restart",{retryOnDrmError:1,e:l,detail:k}),r.Zr.Ed(!0);else{if(Z)if(r.videoData.C&&r.videoData.C.video.isHdr())IZ(r,l);else{if(r.Zr.jI(l,y,z,k),Qq_(r,{detail:k}))break a}else r.ZQ(l,{detail:k});l==="drm.sessionlimitexhausted"&&(r.Md("retrydrm",{sessionLimitExhausted:1}),
r.V++,AI_(r.Zr))}}}Am(){var l=g.i_(this.cG.experiments,"html5_license_constraint_delay");const y=T6();l&&y?(l=new g.B_(()=>{this.D0();Jj(this)},l),g.x(this,l),l.start()):(this.D0(),Jj(this))}fv(l){this.publish("heartbeatparams",l)}SP(l){this.Md("keystatuses",C5(l));
var y="auto",k=!1;this.videoData.C&&(y=this.videoData.C.video.quality,k=this.videoData.C.video.isHdr());a:{switch(y){case "highres":case "hd2880":y="UHD2";break;case "hd2160":case "hd1440":y="UHD1";break;case "hd1080":case "hd720":y="HD";break;case "large":case "medium":case "small":case "light":case "tiny":y="SD";break;default:y="";break a}k&&(y+="HDR")}y=Xi(l)?c7(l,y):l.N.includes(y);if(this.X("html5_enable_vp9_fairplay")){if(k){if(!l.K){this.videoData.YM||(this.videoData.YM=!0,this.Md("drm",{dphdr:1}),
this.Ed(!0));return}if(this.GA?.Z.Z()?this.GA?.kz():!y){this.Md("drm",{dshdr:1});IZ(this.JV);return}}if(this.GA?.Z.Z())return}else{const z=l.K&&y;if(k&&!z){IZ(this.JV);return}}if(k=!y)k=!(c7(l,"AUDIO")&&c7(l,"SD"));k&&(l=C5(l),this.kL?(this.publish("drmoutputrestricted"),this.X("html5_report_fatal_drm_restricted_error_killswitch")||this.jI("drm.keyerror",2,void 0,`info.${l}`)):(this.kL=!0,this.ZQ(new g.Gr("qoe.restart",{retrydrm:1,...l})),qn(this),AI_(this)))}wk(){if(!this.videoData.A&&this.mediaElement&&
!this.isBackground()){var l="0";this.mediaElement.N()>0&&wV(this.mediaElement)>=5&&this.videoData.N&&this.videoData.N.Z()&&(this.e2(cK(this.playerState,1)),on(this,"load_soft_timeout"),this.publish("playbackstalledatstart"),l="1");SB4(this);var y=this.videoData.N;l={restartmsg:l,mfmt:!KN(this.videoData),mdrm:!(!(y&&y.videoInfos&&y.videoInfos.length&&y.videoInfos[0].contentProtection)||this.GA),mfmtinfo:!this.videoData.C,prerolls:this.pJ()?this.Ji.join(","):"0"};if(this.GA){y=this.GA;if(y.N.size<=
0){let k="ns;";y.C_||(k+="nr;");y=k+=`ql.${y.V.length}`}else y=C5(y.N.values().next().value),y=wd(y);l.drmp=y}Object.assign(l,this.loader?.Dp()||{});Object.assign(l,this.mediaElement?.Dp()||{});this.l5.ZQ("qoe.start15s",wd(l));this.publish("loadsofttimeout")}}BZ(l){this.videoData.lengthSeconds!==l&&(this.videoData.lengthSeconds=l,Jj(this))}qk(l=!1,y){if(!this.TU)if(K4("att_s","player_att")||Eo("att_s",void 0,"player_att"),this.X("use_rta_for_player"))(async()=>{if(!l||await g.JM4())try{const z=zK5(this.l5);
if(!z)throw Error();const r=await g.PDt({cpn:this.videoData.clientPlaybackNonce,encryptedVideoId:this.videoData.videoId||""},g.i_(this.cG.experiments,"html5_att_playback_timeout_ms")||3E4);if(this.TU)throw Error();if(!r.challenge)throw g.WH(Error(`Not sending atr ping; missing challenge string${r.error?`; error: ${r.error}`:""}`)),Error();this.TU=!0;const Z=[r.challenge];if(r.error){const e=tNz(),A=mb_(e).get(r.error)||0;Z.push(`${"r1c"}=${A}`)}else r.webResponse&&Z.push(`${"r1a"}=${r.webResponse}`);
r.adblockReporting?.reportingStatus!==void 0&&Z.push(`${"r6a"}=${r.adblockReporting.reportingStatus}`);r.adblockReporting?.broadSpectrumDetectionResult!==void 0&&Z.push(`${"r6b"}=${r.adblockReporting.broadSpectrumDetectionResult}`);z(Z.join("&"));Eo("att_f",void 0,"player_att")}catch(z){Eo("att_e",void 0,"player_att")}})().then(()=>{y?.()});
else{var k=new g.kts(this.videoData);if("c1a"in k.ys&&!g.Oa.isInitialized()){Eo("att_wb",void 0,"player_att");this.bx===2&&Math.random()<.01&&g.WH(Error("Botguard not available after 2 attempts"));if(l)return;if(this.bx<5){this.sU.Kl();this.bx++;return}}(k=g.jWP(k))?(Eo("att_f",void 0,"player_att"),kE5(this.l5,k),this.TU=!0):Eo("att_e",void 0,"player_att")}}L2(l=!1){return nN(this.videoData)&&(this.isAtLiveHead()&&!this.playerState.isPaused()||this.Ub()||g.la(this.videoData))?this.getCurrentTime():
this.TM(l)}ET(){return this.dY()}TM(l=!1){return this.Hn.TM(l)}dY(){return this.Hn.dY()}w4(){return this.Hn?this.Hn.w4():0}getStreamTimeOffset(){return this.Hn?this.Hn.getStreamTimeOffset():0}rD(){return this.getStreamTimeOffset()===0?this.w4():this.getStreamTimeOffset()}setPlaybackRate(l){this.playbackRate!==l&&YI(this.bW,this.videoData.N?.videoInfos)&&(this.playbackRate=l,qn(this));this.playbackRate=l;this.mediaElement&&this.mediaElement.setPlaybackRate(l)}getPlaybackRate(){return this.playbackRate}getPlaybackQuality(){let l=
"unknown";if(this.videoData.C&&(l=this.videoData.C.video.quality,l==="auto"&&this.mediaElement)){const y=this.Ap();y&&y.videoHeight>0&&(l=Kk(y.videoWidth,y.videoHeight))}return l}isHdr(){return!!(this.videoData.C&&this.videoData.C.video&&this.videoData.C.video.isHdr())}sendVideoStatsEngageEvent(l,y){var k=this.l5;k.Z?(k=jg(k.Z,"engage"),k.b0=l,k.send(y)):y&&y()}bH(l){return this.l5.bH(l)}isAtLiveHead(l,y=!1){return nN(this.videoData)&&(this.tF||y)?this.Hn.isAtLiveHead(l):!1}ot(){const l=this.TM(),
y=this.getCurrentTime();var k;(k=!nN(this.videoData))||(k=this.Hn,k=!(k.Z&&k.Z.N));return k||this.Ub()||isNaN(l)||isNaN(y)?0:Math.max(0,l-y)}tQ(l){(this.tF=l)||this.Rs.stop();if(this.videoData.Z)if(l)this.videoData.Z.resume();else{var y=this.videoData.Z;y.S&&y.S.stop()}this.loader&&(y=this.videoData.X("html5_disable_preload_for_ssdai_with_preroll")&&this.sG()&&this.videoData.isLivePlayback,l&&!y?this.loader.resume():this.loader?.sj(!0));this.playerState.Z(2)||l?this.playerState.Z(512)&&l&&this.e2(CM(this.playerState,
512)):this.e2(cK(this.playerState,512));y=this.l5;y.qoe&&(y=y.qoe,g.Nw(y,g.vY(y.provider),"stream",[l?"A":"I"]))}jd(l){this.l5.ZQ("player.exception",wd({n:l.name,m:l.message}))}zc(l){this.l5.zc(l)}WU(l){this.l5.WU(l)}CR(l){this.l5.CR(l)}Xp(l){this.l5.Xp(l)}nX(l,y,k,z){this.l5.nX(l,y,k,z)}Q1(){this.Md("hidden",{},!0)}j6(){return this.mediaElement?this.mediaElement.getVideoPlaybackQuality():{}}Zy(){return this.loader?this.loader.Zy():!0}setLoop(l){this.loop=l;this.mediaElement&&!g.dU(this.cG)&&this.mediaElement.setLoop(l)}Ti(){return this.mediaElement&&
!g.dU(this.cG)?this.mediaElement.Ti():this.loop}eB(l){this.Md("timestamp",{o:l.toString()});this.Hn.eB(l)}bq(l){this.QM.tick(l)}GJ(l){return this.QM.GJ(l)}j0(l){this.QM.j0(l)}Md(l,y,k=!1){this.l5.Md(l,y,k)}yZ(l,y,k=!1){this.l5.Md(l,y,k)}ZQ(l){this.l5.ZQ(l.errorCode,wd(l.details));l=l.errorCode;if(this.videoData.isLivePlayback&&(l==="qoe.longrebuffer"||l==="qoe.slowseek")||l==="qoe.restart")l=this.loader?QdP(this.loader.videoTrack):{},this.Md("lasoe",Object.assign(this.loader?QdP(this.loader.audioTrack):
{},this.yj?.Z?.Qt())),this.Md("lvsoe",Object.assign(l,this.yj?.C?.Qt()));this.X("html5_log_centralized_player_time")&&this.Md("sabrSeekRefactorCmt",{cmt:this.getCurrentTime(),loaderCmt:this.loader?.A2(),bh:this.loader?.Xr()})}S0(l,y,k){this.l5.S0(l,y,k)}g5(l,y,k,z,r,Z,e,A){if(this.videoData.Z?.isLive){var Q=y.playerType===2?y:l,t=l.videoData.videoId,O=y.videoData.videoId;if(t&&O){var d=this.l5;if(A?.Rz){if(d.qoe){t=d.qoe;O=A.Rz;t.reportStats();var w=t.provider.videoData.clientPlaybackNonce,h=t.provider.videoData.videoId||
"",U=t.W6?.join(".")||w,u=t.YV?.join(".")||h;kI(t,Z?4:r?2:0,O.GB.join(".")||w,O.YX.join(".")||h,z);t.reportStats();t.W6=O.GB;t.YV=O.YX;t.Uy=O.adFormats;t.Pe=O.serializedQoeContextData;kI(t,Z?5:r?3:1,U,u,k);t.reportStats()}}else if(d.qoe){w=d.qoe;h=l.cpn;U=y.cpn;u=Q.videoData.T7;var W=w.provider.videoData.clientPlaybackNonce;const V=w.provider.videoData.videoId,T=U!==W&&O!==V;W=h!==W&&t!==V;w.reportStats();w.adCpn&&w.adCpn!==h||(w.adCpn=W?h:"",w.DI=W?t:"",w.adFormat=W?u:void 0,kI(w,Z?4:r?2:0,U,O,z),
w.reportStats(),w.adCpn=T?U:"",w.DI=T?O:"",w.adFormat=T?u:void 0,kI(w,Z?5:r?3:1,h,t,k),w.reportStats())}A?.J5?(d.Z?.PG(),d.Z?.K(),d.Z?.mK(A.J5),d.Z?.K(),d.Z?.A(!0,!0).send(),d.Z?.Xr()):(k=d,r=l.cpn,k.N.has(r)?(Z=k.N.get(r),Fi(Z,!0).send(),Z.S(),r!==k.provider.videoData.clientPlaybackNonce&&(oZ(Z),k.Z?.Y(),k.N.delete(r))):(k.Ol=k.provider.videoData.clientPlaybackNonce,k.Ol&&k.Z&&(k.N.set(k.Ol,k.Z),Fi(k.Z).send(),k.Z.S())),k=y.cpn,Q=Q.videoData,z-=this.rD(),d.N.has(k)?(Q=d.N.get(k),z=Q.V&&isNaN(Q.J)?
Sg(Q):NaN,Q=Q.A(!1),isNaN(z)||(Q.K=z),Q.send()):(z=lp4(d,d.provider,Q,z),d.N.set(k,z),z.b0(new g.WK(cK(new g.U5,8),new g.U5)),z.Eb(),d.Z?.S()),d.Ol=k);this.X("html5_unify_csi_server_stitched_transition_logging")?(z=this.QM,d=l.cpn,l=y.cpn,k=this.videoData.clientPlaybackNonce,Q=y.videoData,y=(0,g.f)(),k=`${d===k?"video":"ad"}_to_${l===k?"video":"ad"}`,k!=="video_to_ad"&&(r=k==="ad_to_video"?void 0:Q,d=r?.FM,Z={},Q?.a4&&(Z.cttAuthInfo={token:Q.a4,videoId:Q.videoId}),e&&(Z.startTime=e),p4(k,Z),e={targetVideoId:Q?.videoId??
"empty_video",targetCpn:l,adVideoId:r?.videoId??"empty_video",adClientPlaybackNonce:d?.cpn??r?.clientPlaybackNonce},d&&(e.adBreakType=d.adBreakType,e.adType=d.adType),g.YV(e,k),VM(z,y,k))):(z=this.QM,k=this.videoData.clientPlaybackNonce,Q=(0,g.f)(),d=y.videoData,l=`${l.cpn===k?"video":"ad"}_to_${y.cpn===k?"video":"ad"}`,k={},d.a4&&(k.cttAuthInfo={token:d.a4,videoId:d.videoId}),e&&(k.startTime=e),p4(l,k),g.YV({targetVideoId:d.videoId,targetCpn:y.cpn,isSsdai:!0},l),e||VM(z,Q,l))}}else g.DP(this.logger,
360717806,"SSTEvent for nonSS")}qm(){var l=this.E1;const y=l.Cs;l.Cs=[];return y}dE(l){this.videoData.XR=!0;this.ZQ(new g.Gr("sabr.fallback",l));this.Ed(!0)}mX(l,y=!0){this.videoData.fD=!0;y&&(this.ZQ(new g.Gr("qoe.restart",l)),this.Ed(!0))}Fn(l){this.Md("sdai",{aftimeout:l});this.ZQ(new g.Gr("ad.fetchtimeout",{timeout:l}))}OX(l,y){this.Md("timelineerror",l);l=new g.Gr("dai.timelineerror",l);y?this.jI("dai.timelineerror",1,"RETRYABLE_ERROR",wd(l.details)):this.ZQ(l)}o2(){return g.vY(this.l5.provider)}getPlayerSize(){return this.Un.getPlayerSize()}uI(){return this.Un.uI()}SV(){return this.QM}ER(){return this.E1.ER()}getVolume(){return this.E1.getVolume()}vj(){return this.E1.vj()}isMuted(){return this.E1.isMuted()}Ex(){return this.E1.Ex()}pM(){this.W9=
!0}X(l){return this.cG.X(l)}sA(){return this.cG.sA()}SK(l,y,k,z,r){this.Md("xvt",{m:l,g:y?1:0,tt:k?1:0,np:z?1:0,c:r})}ZO(){this.loader?.resume()}sG(){return g.ro(this.Ji,"ad")}Pz(){const l=this.getCurrentTime(),y=l-this.w4();var k=this.mediaElement?yS(this.mediaElement.Cy()):0;k=Math.floor(Math.max(k-y,0))+100;return this.loader?.Pz(y,k)?(this.Md("sdai",{skipad:1,ct:y.toFixed(3),adj:k.toFixed(3)}),Kc(this.videoData)&&this.loader.seek(y+k,{seekSource:89,gY:"videoplayer_skipServerStitchedAd"}),pF5(this.Hn,
l),!0):!1}yM(){return this.cG.yM()}De(){if(this.X("html5_generate_content_po_token"))return this.videoData.Qk||"";this.E1.ZH();return this.cG.zA||""}RJ(){if(this.videoData.videoId)return this.videoData.Wb}Qi(){return this.videoData.videoId}xO(){return this.E1.i_}s3(){return this.TX}l4(){return this.E1.l4()}RV(l,y,k){this.e2(cK(this.playerState,16,k));this.Hn.RV(l,y,k)}prefetchKeyPlay(l,y){this.loader?.prefetchKeyPlay(l,y)}Wz(l){return this.Hn.Wz(l)}AI(){this.Hn.AI()}C$(l,y){const k=this.X("html5_generate_content_po_token")?
this.videoData:void 0;this.E1.C$(l,y,k)}NC(){return this.X("html5_remove_ios_7_hack_force_play")}yr(l,y){this.l5.yr(l,y)}Bo(){return this.l5.Bo()}Bh(){return this.E1.Bh()}Kt(){return this.E1.Kt(this)}Zn(){this.JZ=!0}U_(l){this.loader?.U_(l)}ul(l){this.Hn.ul(l)}};g.b=g.x8.prototype;g.b.nJ=yz(48);g.b.dT=yz(31);g.b.Rp=yz(25);g.b.Zh=yz(19);g.b.Qb=yz(13);var nt={primary:"Primary",secondary:"Secondary"};var FPO=class extends az{constructor(l){super(l);this.events=new g.cI(l);g.x(this,this.events);B(this.api,"isLifaAdPlaying",()=>this.api.isLifaAdPlaying());
this.events.j(l,W_(l.O().sA())?"playbackChange":"serverstitchedvideochange",()=>{this.api.getVideoData()?.j2()&&(this.api.isLifaAdPlaying()?(this.playbackRate=this.api.getPlaybackRate(),this.api.setPlaybackRate(1)):this.api.setPlaybackRate(this.playbackRate))});
this.playbackRate=1}};var o4v=class extends iz{constructor(l){super("V\u00f2ng l\u1eb7p",g.Gl.sE);this.L=l;const y=l.X("delhi_modern_web_player_icons")?{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M17.29 1.29C17.11 1.46 17.01 1.70 17.00 1.94C16.98 2.19 17.06 2.43 17.22 2.63L17.29 2.70L18.58 4H7C5.67 4 4.40 4.52 3.46 5.46C2.52 6.40 2 7.67 2 9V13C2 13.26 2.10 13.51 2.29 13.70C2.48 13.89 2.73 14 3 14C3.26 14 3.51 13.89 3.70 13.70C3.89 13.51 4 13.26 4 13V9C4 8.20 4.31 7.44 4.87 6.87C5.44 6.31 6.20 6 7 6H18.58L17.29 7.29C17.11 7.48 17.01 7.73 17.01 7.99C17.01 8.25 17.11 8.50 17.30 8.69C17.49 8.88 17.74 8.98 18.00 8.98C18.26 8.98 18.51 8.88 18.70 8.70L22.41 5L18.70 1.29L18.63 1.22C18.43 1.06 18.19 .98 17.94 1.00C17.70 1.01 17.46 1.11 17.29 1.29ZM21 10C20.73 10 20.48 10.10 20.29 10.29C20.10 10.48 20 10.73 20 11V15C20 15.79 19.68 16.55 19.12 17.12C18.55 17.68 17.79 18 17 18H5.41L6.70 16.70C6.80 16.61 6.87 16.50 6.93 16.38C6.98 16.26 7.01 16.12 7.01 15.99C7.01 15.86 6.98 15.73 6.93 15.60C6.88 15.48 6.81 15.37 6.71 15.28C6.62 15.18 6.51 15.11 6.39 15.06C6.26 15.01 6.13 14.98 6.00 14.98C5.87 14.98 5.73 15.01 5.61 15.06C5.49 15.12 5.38 15.19 5.29 15.29L1.58 19L5.29 22.70L5.36 22.77C5.56 22.92 5.80 23.00 6.04 22.99C6.29 22.98 6.52 22.87 6.70 22.70C6.87 22.52 6.98 22.29 6.99 22.04C7.00 21.80 6.92 21.56 6.77 21.36L6.70 21.29L5.41 20H17C18.32 20 19.59 19.47 20.53 18.53C21.47 17.59 22 16.32 22 15V11C22 10.73 21.89 10.48 21.70 10.29C21.51 10.10 21.26 10 21 10Z",
fill:"white"}}]}:Lug();this.setIcon(y);this.subscribe("select",this.N,this);l.createClientVe(this.element,this,28661);this.j(l,"settingsMenuVisibilityChanged",this.C);this.listen("click",this.logClick);this.j(l,"onLoopChange",this.onLoopChange);this.Z(l.getLoopVideo());l.Kf().tv(this)}C(l){l&&this.Z(this.L.getLoopVideo());this.L.logVisibility(this.element,l)}logClick(){this.L.logClick(this.element)}onLoopChange(l){this.Z(l)}N(l){this.L.setLoopVideo(l)}};var Nqe=class extends az{constructor(l){super(l);l.addEventListener("settingsMenuInitialized",()=>{this.menuItem||(this.menuItem=new o4v(this.api),g.x(this,this.menuItem))});
l.addEventListener("videodatachange",(y,k)=>{y=this.api.getPresentingPlayerType()===2;this.menuItem?.fP(!k.isLivePlayback&&!y)})}};var sCw=class extends az{constructor(l){super(l);this.events=new g.cI(l);g.x(this,this.events);B(this.api,"seekToChapterWithAnimation",y=>{this.seekToChapterWithAnimation(y)});
B(this.api,"seekToTimeWithAnimation",(y,k)=>{this.seekToTimeWithAnimation(y,k)});
B(this.api,"renderChapterSeekingAnimation",(y,k,z)=>{this.api.renderChapterSeekingAnimation(y,k,z)});
B(this.api,"setMacroMarkers",y=>{this.setMacroMarkers(l,y)});
B(this.api,"changeMarkerVisibility",(y,k,z)=>{this.changeMarkerVisibility(y,k,z)});
B(this.api,"isSameMarkerTypeVisible",y=>this.isSameMarkerTypeVisible(y))}seekToChapterWithAnimation(l){if(g.Ci(this.api)&&!(l<0)){var y=this.api.getVideoData(),k=y.hj;
if(k&&l<k.length)for(const z of k)if(z.index===l){Nn(this,z.startTime,z.title);return}this.X("web_key_moments_markers")&&(y=y.rh)&&l<y.length&&y.forEach((z,r)=>{r===l&&Nn(this,z.timeRangeStartMillis,z.title)})}}seekToTimeWithAnimation(l,y){g.Ci(this.api)&&Nn(this,l,y)}setMacroMarkers(l,y){y={playerOverlays:{playerOverlayRenderer:{decoratedPlayerBarRenderer:{decoratedPlayerBarRenderer:{playerBar:{multiMarkersPlayerBarRenderer:y}}}}}};
l=l.getVideoData();l.getWatchNextResponse();l&&l.getWatchNextResponse()==null&&(TE(l,{raw_watch_next_response:y}),l.publish("dataupdated"))}changeMarkerVisibility(l,y,k){const z=this.api.getVideoData();if(z){var r=!1;if(l)for(const Z of y){if((l=z.RR)&&!l.includes(Z))switch(k){case "CHANGE_MARKERS_VISIBILITY_RESTRICTION_MODE_NOT_OVERWRITE_SAME_TYPE":nkq(Z,z)||(r=!0,z.RR?.push(Z));break;case "CHANGE_MARKERS_VISIBILITY_RESTRICTION_MODE_NOT_OVERWRITE_ANY_TYPE":l.length===0&&(r=!0,z.RR?.push(Z));break;
default:r=!0,z.RR?.push(Z)}}else for(const Z of y)z.visibleOnLoadKeys.includes(Z)||g.Ap(z.RR,Z)&&(r=!0);r&&this.api.publish("updatemarkervisibility")}}isSameMarkerTypeVisible(l){const y=this.api.getVideoData();return y?nkq(l,y):!1}};var LPO=class extends az{constructor(l){super(l);this.events=new g.cI(l);g.x(this,this.events);this.events.j(l,"videodatachange",()=>{this.updateMetadata()});
this.events.j(l,"presentingplayerstatechange",()=>{Fne(this)});
this.events.j(l,"SEEK_COMPLETE",()=>{ok4(this)})}updateMetadata(){var l=this.api.getVideoData();
if(l?.Ij()){var y=this.api.O(),k=[],z="";if(!y.Y){const r=this.api.getVideoData().getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.browserMediaSession?.browserMediaSessionRenderer;g.ow(y)&&r?(k=NuC(r.thumbnailDetails),r.album&&(z=Rd(r.album))):k=[{src:l.uE("mqdefault.jpg")||"",sizes:"320x180",type:"image/jpeg"}]}this.api.getVideoData()?.gS()&&ok4(this);Fne(this);so5(this);navigator.mediaSession.metadata=new MediaMetadata({title:l.title,artist:l.author,artwork:k,album:z});y=l=null;g.Pl(this.api)&&
(l=()=>{this.api.nextVideo()},y=()=>{this.api.previousVideo()});
sc("nexttrack",l);sc("previoustrack",y)}}Vj(){navigator.mediaSession.playbackState="none";navigator.mediaSession.metadata=null;const l="nexttrack previoustrack play pause seekbackward seekforward seekto".split(" ");for(const y of l)sc(y,null);this.api.getVideoData()?.gS()&&navigator.mediaSession.setPositionState&&navigator.mediaSession.setPositionState({});super.Vj()}};var v42=class extends az{constructor(l){super(l);this.C=new Map;this.J=this.Z=void 0;this.compositeVideoState=null;this.N=void 0;this.events=new g.cI(l);g.x(this,this.events);this.events.j(l,"modulecreated",y=>{a:{var k=this.api.getVideoData()?.getPlayerResponse()?.overlay?.playerControlsOverlayRenderer;if(k&&(k=g.E(k.compositeVideoOverlay,PyC),k?.sources?.length))for(z of k?.sources)if(z.isActive)break a;var z=void 0}y==="captions"&&z?.topLeftCornerX!==void 0&&z?.topLeftCornerY!==void 0&&z?.width!==
void 0&&z?.height!==void 0&&this.api.z0({top:z.topLeftCornerY,right:1-z.topLeftCornerX-z.width,bottom:1-z.topLeftCornerY-z.height,left:z.topLeftCornerX})});
this.events.j(l,"videodatachange",y=>{const k=this.api.getVideoData();this.Z=void 0;this.C.clear();this.api.Ur("compositeembargo",1);const z=k?.eE.get("PLAYER_CUE_RANGE_SET_IDENTIFIER_EMBARGO");z?.length?Lnt(this,z.filter(r=>r.onEnter?.some(this.V))):k?.cueRanges&&Lnt(this,k.cueRanges.filter(r=>r.onEnter?.some(this.V)));
y==="dataupdated"&&k?.compositeLiveStatusToken!==this.J&&(this.J=k?.compositeLiveStatusToken,this.api.wF())});
this.events.j(l,g.uR("compositeembargo"),y=>{if(this.Z?.id!==y.id&&(this.api.zc(!0),this.C.has(y.id))){var k=this.C.get(y.id),z=this.api.getVideoData();for(const r of k)k=r.compositeEmbargo?.embargoStatusToken,z.sR!==k&&(z.sR=k,this.api.wF()),vkT(this,y)}});
this.events.j(l,g.xR("compositeembargo"),y=>{if(this.Z?.id===y.id&&(this.api.zc(!1),this.C.has(y.id))){if(y=this.api.getVideoData())y.sR=void 0;this.api.wF();vkT(this)}});
this.events.j(l,"heartbeatRequest",y=>{this.compositeVideoState!==null&&(y.playbackState||(y.playbackState={}),y.playbackState.compositeVideoState=this.compositeVideoState)});
this.events.j(l,"internalaudioformatchange",(y,k)=>{const z=this.api.getVideoData({D5:!1});z?.Md("atrkchg",{id:y,m:k});if(z&&!z.lR()){k=this.api.getAvailableAudioTracks();for(const r of k)if(r.getLanguageInfo().getId()===y){this.api.O().mK=y;break}}});
this.events.j(l,"onPlaybackAudioChange",()=>{this.api.wF();if(l.getVideoData()?.O().X("html5_preload_on_mosaic_audio_track_change")){const y=this.api.getSourceConfigForActiveAudioTrack();y&&l.preloadVideoByPlayerVars({videoId:y.videoId,live_preload:!0},1)}});
B(l,"setCompositeParam",y=>{this.compositeVideoState=y});
this.api.X("web_watch_enable_multiview_manager")&&B(l,"setCompositeVideoOverlayRendererComponent",y=>{this.setCompositeVideoOverlayRendererComponent(y)})}setCompositeVideoOverlayRendererComponent(l){this.N&&(this.N.remove(),g.ZM(this.N,"ytp-composite-video-overlay-renderer"),this.N=void 0);
l&&(g.zi(l,"ytp-composite-video-overlay-renderer"),g.pi(this.api,l,4),this.N=l)}V(l){return l.compositeEmbargo!==void 0}Vj(){super.Vj();this.C.clear()}};var Bqo=class extends az{constructor(l){super(l);this.events=new g.cI;g.x(this,this.events);this.events.j(l,"applicationInitialized",()=>{({handleError:y=qM,logEvent:k=g.wv}={});var y;for(Ia=new RM5(y,k);TT.length>0;){var k=TT.shift();switch(k.type){case "ERROR":Ia.Al(k.payload);break;case "EVENT":Ia.logEvent(k.eventType,k.payload)}}});
B(this.api,"queueOfflineAction",this.queueOfflineAction.bind(this));B(this.api,"updateDownloadState",this.updateDownloadState.bind(this));B(this.api,"pauseVideoDownload",this.pauseVideoDownload.bind(this));B(this.api,"resumeVideoDownload",this.resumeVideoDownload.bind(this));B(this.api,"isOrchestrationLeader",this.isOrchestrationLeader.bind(this));B(this.api,"refreshAllStaleEntities",this.refreshAllStaleEntities.bind(this));B(this.api,"setUpPositionSyncInterval",this.setUpPositionSyncInterval.bind(this))}async queueOfflineAction(l,
y,k,z){const r=LJ(this.api.r4());return r&&(l=await r.v$([l],y,k,z),l.length)?l[0]:Promise.reject()}updateDownloadState(l,y){const k=LJ(this.api.r4());return k?k.updateDownloadState(l,y):Promise.reject()}pauseVideoDownload(l){const y=LJ(this.api.r4());y&&y.HA(l)}async resumeVideoDownload(l){const y=LJ(this.api.r4());return y?y.iV(l):Promise.reject()}isOrchestrationLeader(){return this.api.isOrchestrationLeader()}refreshAllStaleEntities(l){l===void 0&&(l=14400);const y=LJ(this.api.r4());return y?y.refreshAllStaleEntities(l):
Promise.reject()}setUpPositionSyncInterval(l){const y=LJ(this.api.r4());y&&y.setUpPositionSyncInterval(l)}};var HC2=class extends az{constructor(l){super(l);this.loaded=!1;this.overlay=null;this.events=new g.cI(l);g.x(this,this.events);this.Z=new g.cI(l);g.x(this,this.Z);this.events.j(l,"modulesCreated",()=>{this.wz()&&this.load()});
this.events.j(l,"modulesDestroyed",y=>{let k=!0;switch(y){case 2:case 3:k=!1;break;case 4:k=this.api.getPresentingPlayerType()===1}k&&this.unload()})}wz(){var l=this.api.getVideoData();
return l.MI&&!l.bz}load(){this.loaded||g.aq(this.api.O())||(this.overlay=new g.H({U:"div",L_:["ytp-ypc-clickwrap-overlay","ytp-player-content"],W:[{U:"h2",B:"ytp-ypc-clickwrap-header",Nd:"B\u1ea1n c\u00f3 mu\u1ed1n ch\u1ea1y video cho thu\u00ea n\u00e0y kh\u00f4ng?"},{U:"div",B:"ytp-ypc-clickwrap-description",Nd:this.api.getVideoData().Dq},{U:"button",L_:["ytp-ypc-clickwrap-confirm","ytp-button"],Nd:"B\u1eaft \u0111\u1ea7u giai \u0111o\u1ea1n cho thu\u00ea"}]}),g.x(this,this.overlay),g.pi(this.api,
this.overlay.element,4),this.overlay.j(this.overlay.qd("ytp-ypc-clickwrap-confirm"),"click",()=>{this.onConfirm()}),this.loaded=!0)}onConfirm(){this.overlay&&this.overlay.hide();
this.Z.j(this.api,"videodatachange",()=>{this.api.ud("ypcRentalActivation")});
this.api.ud("ypcRentalActivation")}unload(){this.loaded&&(this.overlay&&(this.overlay.dispose(),this.overlay=null),this.Z.C(),this.loaded=!1)}Vj(){this.unload();super.Vj()}};var R_1=class extends az{constructor(l){super(l);B(l,"getAvailableQualityData",()=>this.getAvailableQualityData());
B(l,"getAvailableQualityDataAndMessaging",()=>this.getAvailableQualityDataAndMessaging());
B(l,"getPaygatedAudioQualityData",()=>this.getPaygatedAudioQualityData())}getAvailableQualityDataAndMessaging(){return{qualityData:this.getAvailableQualityData(),
qualityMessagingFormattedString:void 0}}getAvailableQualityData(){var l=this.api.getVideoData();if(!l)return[];var y=[],k=l.getPlayerResponse()?.playabilityStatus?.paygatedQualitiesMetadata,z=Buz(k),r=k?.restrictedAdaptiveFormats;if(r){k=[];for(var Z of r){if(Z.mimeType?.includes("audio")&&this.api.X("enable_lr_upsell_for_premium_high_quality_audio"))continue;r=oh(Z.mimeType,Z.quality,Z.itag.toString(),Z.width.toString(),Z.height.toString(),Z.qualityLabel,Z.qualityOrdinal&&$5q[Z.qualityOrdinal]);
k.push(r)}l=g.j2(l);Kb(k);Z=[];for(var e of k)J$(l,e,this.api.O().J)===!0&&Z.push(e);y=y.concat(HiT(Z,!1,z))}e=this.api.Id();y=y.concat(HiT(e,!0,z));z=[];if(this.api.X("web_player_enable_premium_hbr_in_h5_api")){e=y;y=new Set;z=new Map;var A={};for(var Q of e)e=Q.quality,k=Q.isPlayable,(l=Q.qualityLabel)&&e&&(k&&z.has(e)&&z.get(e)!==l?y.add(e):k&&z.set(e,l),A[l]||(A[l]=Q));Q=[];for(var t of Object.values(A))A=t.quality,z=t,A&&!y.has(A)&&(z.formatId=void 0),Q.push(z);t=y=Q;Q=0;for(A=0;A<t.length;A++)t[A].paygatedQualityDetails&&
(z=t[A],t.splice(A,1),t.splice(Q,0,z),Q++);return y}t={};for(A of y)Q=A.quality,t[Q]||(A.formatId=void 0,z.push(A),t[Q]=!0);return z}getPaygatedAudioQualityData(){var l=this.api.getVideoData();if(!l)return[];l=l.getPlayerResponse()?.playabilityStatus?.paygatedQualitiesMetadata;var y=l?.restrictedAdaptiveFormats;if(!y)return[];l=Buz(l);const k=[];for(const z of y){if(!z.mimeType?.includes("audio"))continue;y={formatId:z.itag?.toString(),audioQuality:z.audioQuality};const r=z.itag?l[z.itag.toString()]:
void 0;r&&(y.paygatedQualityDetails={paygatedIndicatorText:r.paygatedIndicatorText,endpoint:r.endpoint,trackingParams:r.trackingParams});k.push(y)}return k}};var Dte={["internal-error"]:-1,["non-recoverable-error"]:-2,["api-disabled-by-application"]:-3,["invalid-argument"]:-4,["token-provider-invalid"]:-5},lBo=class extends az{constructor(l){super(l);this.N=1;this.QM=null;this.d4={Xsd:()=>this.N};
this.events=new g.cI(l);g.x(this,this.events);this.events.j(l,"d6de4videobindingchange",y=>{this.Kh(y)});
this.events.j(l,"csiinitialized",()=>{D1C(this)})}Kh(l){if(vr())if(!this.C&&this.Z){l.Wb={coldStartInfo:{clientState:this.N}};
try{this.Z.then(()=>{lVT(this,l)},y=>{Br(y,"player_update");
this.handleError(y,l)})}catch(y){Br(y,"player_update_catch"),this.handleError(y,l)}}else this.C?lVT(this,l):this.api.Md("pf",{m:this.C?1:0,
p:this.Z?1:0})}handleError(l,y){g.WH(l);let k=0;l.mediaIntegrityErrorName?k||(k=Dte[l.mediaIntegrityErrorName]):l.code&&(k=l.code());y.Wb={Qo:{code:k}}}};var ypx=class extends g.H{constructor(l){super({U:"button",L_:["ytp-pip-button","ytp-button"],G:{title:l.X("player_tooltip_data_title_killswitch")?"{{title}}":"","data-tooltip-title":"{{data-tooltip-title}}","data-priority":"8","data-title-no-tooltip":"{{data-title-no-tooltip}}","data-tooltip-target-id":"ytp-pip-button"},W:[Mf()]});this.api=l;this.listen("click",this.onClick);const y=this.api.gT(),k=y.subscribe("visibilitystatechange",()=>{this.Aa(y.Bw())});
this.addOnDisposeCallback(()=>{y.Dl(k)});
q1(l,this.element,this);this.Aa(y.Bw())}Aa(l){l=l?"Tho\u00e1t ch\u1ebf \u0111\u1ed9 h\u00ecnh trong h\u00ecnh":"H\u00ecnh trong h\u00ecnh";this.api.O().X("player_tooltip_data_title_killswitch")?this.update({title:l,"data-title-no-tooltip":l}):this.update({"data-tooltip-title":l,"data-title-no-tooltip":l});this.api.W1()}onClick(){this.api.togglePictureInPicture()}};var kxw=class extends az{constructor(l){super(l);this.events=new g.cI(l);g.x(this,this.events);this.events.j(l,"standardControlsInitialized",()=>{this.createButton()});
g.xp(this.api.O())&&(this.X("web_watch_pip")||this.X("web_shorts_pip"))&&B(this.api,"setDocumentPictureInPicture",y=>{this.setDocumentPictureInPicture(y)})}createButton(){this.button=new ypx(this.api);
g.x(this,this.button);this.api.cL(this.button);this.events.j(this.api,"videodatachange",()=>{yJP(this)});
yJP(this)}setDocumentPictureInPicture(l){this.api.gT().Bd(l);l=this.api.Bw();const y=p45(this.api.r4());y&&(l?y.load():y.unload());this.api.publish("documentpictureinpicturechange")}};var z1R=class extends az{constructor(l){super(l);this.loaded=!1;this.A=0;this.Z=!1;this.K={};this.N=[];this.V=0;this.S=!1;this.events=new g.cI(l);g.x(this,this.events);this.C=new g.cI(l);g.x(this,this.C);this.events.j(l,"modulesCreated",()=>{this.wz()&&this.load()});
this.events.j(l,"modulesDestroyed",y=>{const k=this.api.getPresentingPlayerType();switch(y){case 2:case 3:y=k!==1&&!(k===5||k===6||k===7);break;case 4:y=!this.Z;break;default:y=!0}y&&this.unload()})}wz(){return this.api.getVideoData().dP.includes("playableSequences")}load(){if(!this.loaded){this.J||(this.J=new g.H({U:"div",
L_:["ytp-player-content","ytp-yto-overlay"],W:[{U:"div",L_:["ytp-yto-preroll-message"],Nd:"Video s\u1ebd s\u1edbm b\u1eaft \u0111\u1ea7u"}]}),g.x(this,this.J),kuQ(this,!1),g.pi(this.api,this.J.element,4));var l=this.api.getPresentingPlayerType();this.C.j(this.api,"playbackChange",()=>{var y=this.api.getPresentingPlayerType()===5;g.I(this.api.getRootNode(),"ytp-yto-preroll",y);kuQ(this,y)});
this.C.j(this.api,"presentingplayerstatechange",y=>{this.onStateChange(y)});
this.C.j(this.api,g.uR("yto"),(y,k)=>{this.onCueRangeEnter(y,k)});
this.C.j(this.api,"ytoprerollinternstitialnext",()=>{rJ5(this)});
ZXy(this);this.loaded=!0;this.api.ud("playableSequences",l)}}onCueRangeEnter(l){l=l.getId();if(!this.Z){if(this.api.getPlayerStateObject(1).Z(2)){if(this.S)return}else this.S=!1;this.N.includes(l)||this.N.push(l);this.api.getPresentingPlayerType()===1&&zS4(this)}}onStateChange(l){var y=this.api.getPresentingPlayerType();l=l.state;this.Z||y!==5&&y!==6&&y!==7||l.Z(1)||l.Z(16)||l.Z(32)||(y=l.Z(128),(l.Z(2)||y)&&rJ5(this))}unload(){this.loaded&&(this.A=0,this.S=this.Z=!1,this.K={},this.V=0,this.N.length=
0,this.C.C(),this.loaded=!1)}Vj(){this.unload();super.Vj()}};var rpR=class{constructor(l=200){this.N=l;this.C=this.Z=void 0}async delete(l){await eSz(this);if(this.Z)try{const y=g.RG(l,"videoPlaybackPositionEntity");await g.xm(this.Z,y);this.C===l&&(this.C=void 0)}catch(y){throw Error("Failed to delete playback position",{cause:y});}}};var ZR2=class extends az{constructor(l){super(l);l=l.O().sA().Z.G7(Fde);const y=new rpR(Number(l)||void 0);B(this.api,"addOrUpdateOnlinePlaybackPosition",(k,z,r)=>$k5(y,k,z,r));
B(this.api,"deleteOnlinePlaybackPosition",k=>y.delete(k))}};var e1e=class extends az{constructor(l){super(l);this.events=new g.cI(l);g.x(this,this.events);B(this.api,"musicDisableUi",()=>{g.zi(this.api.getRootNode(),"ytp-player-in-bar-disable-ui")});
B(this.api,"musicEnableUi",()=>{g.ZM(this.api.getRootNode(),"ytp-player-in-bar-disable-ui")})}};var VH=class extends g.H{constructor(l,y=!0,k=!1){super({U:"div",B:"ytp-suggested-action"});this.L=l;this.vn=this.HG=this.RR=this.Ja=this.N=this.b0=this.expanded=this.enabled=this.R7=!1;this.BF=new g.B_(()=>{this.badge.element.style.width=""},200,this);
this.WG=new g.B_(()=>{Hr(this);Rn(this)},200,this);
this.T7=this.L.X("delhi_modern_web_player")?40:34;this.dismissButton=new g.H({U:"button",L_:["ytp-suggested-action-badge-dismiss-button-icon","ytp-button"]});g.x(this,this.dismissButton);this.J=new g.H({U:"div",B:"ytp-suggested-action-badge-expanded-content-container",W:[{U:"label",B:"ytp-suggested-action-badge-title",Nd:"{{badgeLabel}}"},this.dismissButton]});g.x(this,this.J);this.xz=new g.H({U:"div",B:"ytp-suggested-action-badge-icon-container",W:[y?{U:"div",B:"ytp-suggested-action-badge-icon"}:
""]});g.x(this,this.xz);this.badge=new g.H({U:k?"div":"button",L_:["ytp-button","ytp-suggested-action-badge","ytp-suggested-action-badge-with-controls"],W:[this.xz,this.J]});g.x(this,this.badge);this.badge.Uj(this.element);this.sj=new g.oT(this.badge,250,!1,100,()=>{this.L.X("web_player_overlay_positioned_layout")&&this.hide()});
g.x(this,this.sj);l.X("web_player_overlay_positioned_layout")&&this.hide();this.OA=new g.oT(this.J,250,!1,100);g.x(this,this.OA);this.jN=new g.sj(this.I4,null,this);g.x(this,this.jN);this.SN=new g.sj(this.Cp,null,this);g.x(this,this.SN);g.x(this,this.BF);g.x(this,this.WG);this.L.createServerVe(this.badge.element,this.badge,!0);this.L.createServerVe(this.dismissButton.element,this.dismissButton,!0);this.j(this.L,"onHideControls",()=>{this.mK(!1)});
this.j(this.L,"onShowControls",()=>{this.mK(!0)});
this.j(this.badge.element,"click",this.rb);this.j(this.dismissButton.element,"click",this.K);this.j(this.L,"pageTransition",this.q_);this.j(this.L,"appresize",this.C);this.j(this.L,"fullscreentoggled",this.Fg);this.j(this.L,"cardstatechange",this.va);this.j(this.L,"annotationvisibility",this.kK,this);this.j(this.L,"offlineslatestatechange",this.Um,this)}rb(){}K(){}A(){return!0}I4(){let l;this.expanded?(this.OA.show(),l=this.J.element.scrollWidth):(l=this.J.element.scrollWidth,this.OA.hide());this.Xz=
this.T7+l;g.I(this.badge.element,"ytp-suggested-action-badge-expanded",this.expanded);this.badge.element.style.width=`${this.expanded?this.T7:this.Xz}px`;this.SN.start()}Cp(){this.badge.element.style.width=`${this.expanded?this.Xz:this.T7}px`;this.BF.start()}Xr(){this.N&&this.L.logVisibility(this.badge.element,this.A());this.Ja&&this.L.logVisibility(this.dismissButton.element,this.A()&&this.Oj())}mK(l){this.RR=l;Rn(this);Hr(this);this.C()}Um(){g.I(this.badge.element,"ytp-suggested-action-badge-with-offline-slate",
!0)}Oj(){return this.HG||this.RR||!this.b0}C(){this.A()?(this.show(),this.sj.show()):this.sj.hide();this.Xr()}q_(){this.enabled=!1;this.C()}S(l){l?this.Ja&&this.L.logClick(this.dismissButton.element):this.N&&this.L.logClick(this.badge.element)}kK(){this.C()}va(l){this.vn=l===1;this.C();g.I(this.badge.element,"ytp-suggested-action-badge-with-offline-slate",!1)}Fg(){g.I(this.badge.element,"ytp-suggested-action-badge-fullscreen",this.L.isFullscreen());this.C()}};var PE=class extends g.kD{constructor(l,y,k,z,r,Z){const e={U:"div",B:"ytp-panel"};let A,Q,t;if(k){A="ytp-panel-back-button";Q="ytp-panel-title";const O={U:"div",B:"ytp-panel-header",W:[{U:"div",L_:["ytp-panel-back-button-container"],W:[{G:{"aria-label":"Quay l\u1ea1i tr\u00ecnh \u0111\u01a1n tr\u01b0\u1edbc"},U:"button",L_:["ytp-button",A]}]},{U:"span",L_:[Q],G:{role:"heading","aria-level":"2"},W:[k]}]};r&&(t="ytp-panel-options",O.W.push({U:"button",L_:["ytp-button",t],W:[z]}));e.W=[O]}z=!1;Z&&(Z=
{U:"div",B:"ytp-panel-footer",W:[Z]},z=!0,e.W?e.W.push(Z):e.W=[Z]);super(e);this.content=y;z&&e.W?y.Uj(this.element,e.W.length-1):y.Uj(this.element);this.cK=!1;this.Yv=z;k&&(this.backButton=this.qd(A),k=this.qd(Q),this.j(this.backButton,"click",this.AS),this.j(k,"click",this.AS),this.cK=!0,r&&this.j(this.qd(t),"click",r));y.subscribe("size-change",this.wR,this);this.j(l,"fullscreentoggled",this.wR);this.L=l}wR(){this.publish("size-change")}u1(){return lc(this)}PS(){return lc(this)}focus(){this.content.focus()}AS(){this.publish("back")}};g.Jc=class extends PE{constructor(l,y=null,k,z,r,Z){const e={role:"menu"};y&&(e.id=y);y=new g.kD({U:"div",B:"ytp-panel-menu",G:e});super(l,y,k,z,r,Z);this.menuItems=y;this.items=[];g.x(this,this.menuItems)}tv(l,y=!1){if(y)this.items.push(l),this.menuItems.element.appendChild(l.element);else{y=g.cO(this.items,l,tV_);if(y>=0)return;y=~y;g.i2(this.items,y,0,l);Mj(this.menuItems.element,l.element,y)}l.subscribe("size-change",this.GI,this);this.menuItems.publish("size-change")}u1(){lc(this)||this.items[0].focus();
return!0}PS(){this.items[this.items.length-1].focus();return!0}Lg(l){l.unsubscribe("size-change",this.GI,this);this.IR()||(g.Ap(this.items,l),this.menuItems.element.removeChild(l.element),this.menuItems.publish("size-change"))}GI(){this.menuItems.publish("size-change")}focus(){let l=0;for(let y=0;y<this.items.length;y++){const k=this.items[y].element;if(k.getAttribute("role")==="menuitemradio"){if(k.getAttribute("aria-checked")==="true"){l=y;break}}else break}this.items[l].focus()}CA(){return this.items.length}};g.Yn=class extends sD{constructor(l,y){super(l,{U:"div",L_:["ytp-popup",y||""],W:[{U:"div",B:"ytp-focus-trap-before",G:{tabindex:"0"}},{U:"div",B:"ytp-popup-content"},{U:"div",B:"ytp-focus-trap-after",G:{tabindex:"0"}}]},100,!0);this.Z=[];this.V=this.N=null;this.maxHeight=this.maxWidth=0;this.size=new g.Fn(0,0);this.content=this.qd("ytp-popup-content");this.listen("keydown",this.xF);this.j(this.qd("ytp-focus-trap-before"),"focus",this.PG);this.j(this.qd("ytp-focus-trap-after"),"focus",this.u0)}PG(l){this.Z[this.Z.length-
1].PS()||l.preventDefault()}u0(l){this.Z[this.Z.length-1].u1()||l.preventDefault()}show(){super.show();this.BT()}hide(){super.hide();this.Z.length>1&&g.zN(this)}BT(){dkC(this);this.VM&&(OX4(this),g.r7(this.element,this.size))}M7(){const l=this.Z.pop();kK(this,l,this.Z[this.Z.length-1],!0)}xF(l){if(!l.defaultPrevented)switch(l.keyCode){case 27:this.Xv();l.preventDefault();break;case 37:this.Z.length>1&&this.M7();l.preventDefault();break;case 39:l.preventDefault()}}focus(){this.Z.length&&this.Z[this.Z.length-
1].focus()}Vj(){super.Vj();this.N&&this.N.dispose();this.V&&this.V.dispose()}};var ApL=class extends g.Yn{constructor(l){super(l,"ytp-shopping-product-menu");this.DQ=new g.Jc(this.L);g.x(this,this.DQ);this.hide();g.rK(this,this.DQ);g.pi(this.L,this.element,4)}open(l,y){this.initialize(l.items)&&this.Bn(y,!!y)}initialize(l){g.yM(this.DQ);if(l===void 0||l.length===0)return!1;let y=l.length;for(const k of l)this.tv(k,y--);return!0}tv(l,y){l.menuNavigationItemRenderer?Gue(this,l.menuNavigationItemRenderer,y):l.menuServiceItemRenderer&&aV_(this,l.menuServiceItemRenderer,y)}};var $Rp=class extends VH{constructor(l){super(l,!1,!0);this.isCounterfactual=this.V=this.isVisible=this.isInitialized=this.shouldShowOverflowButton=this.shouldHideDismissButton=!1;this.b0=!0;this.overflowButton=new g.H({U:"button",L_:["ytp-featured-product-overflow-icon","ytp-button"],G:{"aria-haspopup":"true"}});this.overflowButton.hide();g.x(this,this.overflowButton);this.badge.element.classList.add("ytp-suggested-action");this.thumbnailImage=new g.H({U:"img",B:"ytp-suggested-action-badge-img",
G:{src:"{{url}}"}});this.thumbnailImage.hide();g.x(this,this.thumbnailImage);this.thumbnailIcon=new g.H({U:"div",B:"ytp-suggested-action-badge-icon"});this.thumbnailIcon.hide();g.x(this,this.thumbnailIcon);this.banner=new g.H({U:"a",B:"ytp-suggested-action-container",W:[this.thumbnailImage,this.thumbnailIcon,{U:"div",B:"ytp-suggested-action-details",W:[{U:"text",B:"ytp-suggested-action-title",Nd:"{{title}}"},{U:"text",B:"ytp-suggested-action-subtitle",Nd:"{{subtitle}}"},{U:"text",B:"ytp-suggested-action-metadata-text",
Nd:"{{metadata}}"}]},this.dismissButton,this.overflowButton]});g.x(this,this.banner);this.banner.Uj(this.J.element);this.j(this.L,"videodatachange",this.onVideoDataChange);this.j(this.L,g.uR("suggested_action_view_model"),this.kz);this.j(this.L,g.xR("suggested_action_view_model"),this.hv);this.j(this.overflowButton.element,"click",this.gb);this.j(l,"featuredproductdismissed",this.K);this.L.createServerVe(this.banner.element,this.banner,!0)}rb(l){l.target!==this.dismissButton.element&&l.target!==this.overflowButton.element&&
(this.S(),this.onClickCommand&&g.G3(this.L,"innertubeCommand",this.onClickCommand))}K(){this.enabled=!1;this.sj.hide()}A(){return!!this.Z&&this.enabled}onVideoDataChange(l,y){this.u0(y);if(this.Z){this.PG();a:if(!this.isCounterfactual){this.banner.update({title:this.Z?.title,subtitle:this.Z?.subtitle,metadata:this.Z?.metadataText});this.onClickCommand=g.E(this.Z?.onTap,Ji);if(l=g.E(this.Z?.onOverflow,Ji))this.Y=g.E(l,hwT);if(this.Z?.thumbnailImage){l=this.Z?.thumbnailImage?.sources||[];if(l.length===
0)break a;this.thumbnailImage.update({url:l[0].url})}else this.Z?.thumbnailIconName&&this.thumbnailIcon.update({icon:this.Z?.thumbnailIconName});this.shouldShowOverflowButton=!!this.Z?.shouldShowOverflowButton;this.shouldHideDismissButton=!!this.Z?.shouldHideDismissButton}this.banner.element.setAttribute("aria-label",this.Z?.a11yLabel||"");this.MW=this.Z?.dismissButtonA11yLabel;this.dismissButton.hide();this.overflowButton.hide();this.isInitialized=!0;eX(this)}}kz(){this.isVisible=!0;eX(this)}hv(){this.isVisible=
!1;eX(this)}Xr(){super.Xr();this.V&&this.L.logVisibility(this.banner.element,this.isVisible)}S(){super.S(!1);this.V&&this.L.logClick(this.banner.element)}gb(l){this.D||(this.D=new ApL(this.L),g.x(this,this.D));this.Y?.menu?.menuRenderer&&(this.D.open(this.Y.menu.menuRenderer,l.target),l.preventDefault())}u0(){}PG(){}Vj(){this.L.Ur("suggested_action_view_model");super.Vj()}};var QeR=class extends $Rp{u0(l){this.productUpsellSuggestedActionViewModel=g.E(l.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.suggestedActionViewModel,ybT);this.productUpsellSuggestedActionViewModel?.content&&(this.Z=g.E(this.productUpsellSuggestedActionViewModel?.content,SkC));(this.V=!!this.productUpsellSuggestedActionViewModel?.loggingDirectives?.trackingParams)&&this.L.setTrackingParams(this.banner.element,this.productUpsellSuggestedActionViewModel?.loggingDirectives?.trackingParams||
null);this.isCounterfactual=!!this.productUpsellSuggestedActionViewModel?.isCounterfactualServing}PG(){const l=[];for(const y of this.productUpsellSuggestedActionViewModel?.ranges||[]){if(!y)continue;const k=Number(y.startTimeMilliseconds),z=Number(y.endTimeMilliseconds);isNaN(k)||isNaN(z)||l.push(new g.N1(k,z,{id:"product_upsell",namespace:"suggested_action_view_model"}))}this.L.Wa(l)}};var tfR=class extends az{constructor(l){super(l);this.Z=new QeR(this.api);g.x(this,this.Z);g.pi(this.api,this.Z.element,4)}};var ORf=class extends az{constructor(l){super(l);this.Z=!0;const y=new g.cI(l);g.x(this,y);y.j(l,"internalaudioformatchange",(k,z)=>{Co5(this,k,z)});
y.j(l,"annotationvisibility",k=>{this.api.X("web_fix_annotations")&&cJe(this,(294).toString(),{boolValue:k})});
y.j(l,"videoplayerreset",()=>{$K(this)});
y.j(l,"videodatachange",(k,z)=>{this.onVideoDataChange(k,z)})}onVideoDataChange(l,y){y.lR()&&(l==="newdata"&&$K(this),this.Z&&l==="dataloaded"&&(this.Z=!1,Nv(FX(Sz(this.api.O(),this.api.getVideoData()?.S()),k=>{ueC(this,k)}),()=>{this.Z=!0})))}gW(){if(g.dU(this.api.O())){const l=g.jz(this.api.O(),this.api.getVideoData()?.S());
return FX(fE(l),y=>{const k=EB();fi(k,y);return this.api.gW(k)})}return fE(this.api.gW())}};var mky=class{constructor(){this.label="B\u1ea3n l\u1ed3ng ti\u1ebfng t\u1ef1 \u0111\u1ed9ng"}};g.p1=class extends g.ZE{constructor(l,y,k,z,r,Z,e){super(g.ni({"aria-haspopup":"true"}),y,l);this.eN=z;this.HG=!1;this.A=null;this.options={};this.aU=new g.Jc(k,void 0,l,r,Z,e);g.x(this,this.aU);this.listen("keydown",this.xF);this.listen("click",this.open)}open(){g.rK(this.eN,this.aU)}C(l){xkC(this);const y=this.options[l];y&&(y.element.setAttribute("aria-checked","true"),this.setContent(this.N(l)),this.A=l)}V(l){g.yM(this.aU);const y={};let k=!1;for(let z=0;z<l.length;z++){const r=l[z];let Z=this.options[r];
const e=r===this.A;e&&(k=!0);Z&&Z.priority===-z?(g.F5(this.options[r],this.N(r,!0)),delete this.options[r]):Z=this.D(r,-z,e);y[r]=Z;this.aU.tv(Z,!0)}k||(this.A=null);for(const z of Object.keys(this.options))this.options[z].dispose();this.options=y}D(l,y,k,z){k={U:"div",L_:["ytp-menuitem",z?"ytp-menuitem-with-footer":""],G:{tabindex:"0",role:"menuitemradio","aria-checked":k?"true":"false"},W:[{U:"div",L_:["ytp-menuitem-label"],Nd:"{{label}}"}]};z&&(z={U:"div",B:"ytp-menuitem-footer",W:[z]},k.W?k.W.push(z):
k.W=[z]);y=new g.ZE(k,y,this.N(l,!0));y.listen("click",()=>{this.RR(l)});
return y}enable(l){this.HG?l||(this.HG=!1,this.K(!1)):l&&(this.HG=!0,this.K(!0))}K(l){l?this.eN.tv(this):this.eN.Lg(this)}Z(l){this.publish("select",l)}RR(l){this.Z(l)}N(l){return l.toString()}xF(l){l.defaultPrevented||l.keyCode!==39||(this.open(),l.preventDefault())}Vj(){this.HG&&this.eN.Lg(this);super.Vj();for(const l of Object.keys(this.options))this.options[l].dispose()}};var dRL=class extends g.p1{constructor(l,y){super("H\u1eb9n gi\u1edd ng\u1ee7",g.Gl.SLEEP_TIMER,l,y);this.L=l;this.rb={};this.b0=this.J("Off");this.sj=this.S="";l.X("web_settings_menu_icons")&&(y=l.X("delhi_modern_web_player_icons")?{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M12.33 1.00C12.22 1.00 12.11 1.00 12 1C5.92 1 1 5.92 1 12C1 18.07 5.92 23 12 23C13.90 23.00 15.78 22.50 17.44 21.55C19.10 20.61 20.48 19.25 21.46 17.61L21.64 17.29C22.06 16.52 21.21 15.73 20.35 15.88C18.76 16.15 17.12 15.94 15.66 15.27C14.19 14.59 12.97 13.49 12.14 12.11C11.31 10.73 10.91 9.13 11.01 7.52C11.11 5.91 11.69 4.37 12.67 3.09L12.89 2.83C13.45 2.16 13.20 1.03 12.33 1.00ZM15.56 2.60C15.45 2.84 15.43 3.11 15.51 3.36C15.59 3.61 15.77 3.82 16.01 3.94C16.91 4.39 17.73 4.99 18.44 5.71L18.73 6.03L18.80 6.10C18.99 6.27 19.22 6.36 19.47 6.37C19.72 6.37 19.96 6.28 20.15 6.12C20.33 5.95 20.45 5.72 20.48 5.48C20.51 5.23 20.44 4.98 20.29 4.78L20.23 4.70L19.87 4.31C19.01 3.43 18.01 2.70 16.90 2.15C16.67 2.03 16.39 2.01 16.14 2.10C15.89 2.18 15.68 2.36 15.56 2.60M10.24 3.17C9.42 4.64 8.99 6.31 9 8C9 13.42 13.32 17.84 18.71 17.99C17.86 18.93 16.83 19.69 15.67 20.21C14.52 20.73 13.26 21.00 12 21C9.76 21.00 7.60 20.17 5.95 18.67C4.29 17.17 3.25 15.10 3.03 12.88C2.81 10.65 3.43 8.43 4.76 6.63C6.09 4.84 8.05 3.60 10.24 3.17M21.16 7.88C20.93 7.96 20.73 8.12 20.61 8.34C20.49 8.55 20.45 8.81 20.50 9.05L20.53 9.15L20.66 9.56C20.93 10.53 21.04 11.54 20.98 12.55C20.97 12.81 21.06 13.06 21.23 13.26C21.41 13.45 21.65 13.57 21.92 13.59C22.18 13.60 22.44 13.52 22.63 13.34C22.83 13.17 22.95 12.93 22.97 12.67C23.05 11.44 22.92 10.20 22.58 9.02L22.43 8.51L22.39 8.42C22.29 8.19 22.11 8.01 21.88 7.91C21.65 7.81 21.40 7.80 21.16 7.88Z",
fill:"white"}}]}:{U:"svg",G:{height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M16.67,4.31C19.3,5.92,21,8.83,21,12c0,4.96-4.04,9-9,9c-2.61,0-5.04-1.12-6.72-3.02C5.52,17.99,5.76,18,6,18 c6.07,0,11-4.93,11-11C17,6.08,16.89,5.18,16.67,4.31 M14.89,2.43C15.59,3.8,16,5.35,16,7c0,5.52-4.48,10-10,10 c-1,0-1.97-0.15-2.89-0.43C4.77,19.79,8.13,22,12,22c5.52,0,10-4.48,10-10C22,7.48,19,3.67,14.89,2.43L14.89,2.43z M12,6H6v1h4.5 L6,10.99v0.05V12h6v-1H7.5L12,7.01V6.98V6L12,6z",fill:"#fff"}}]},this.setIcon(y));
this.Y=new g.H({U:"div",L_:["ytp-menuitem-label-wrapper"],W:[{U:"div",Nd:"Khi h\u1ebft video"},{U:"div",L_:["ytp-menuitem-sublabel"],Nd:"{{content}}"}]});g.x(this,this.Y);this.listen("click",this.onClick);this.j(l,"videodatachange",this.onVideoDataChange);this.j(l,"presentingplayerstatechange",this.Aa);this.j(l,"settingsMenuVisibilityChanged",this.u0);l.createClientVe(this.element,this,218889);this.Aa();g.G3(this.L,"onSleepTimerFeatureAvailable")}Aa(){const l=this.J("Off");this.L.getPresentingPlayerType()!==
2?(IVT(this),this.C(this.b0),this.S&&(this.b0===l?this.S="":this.setSleepTimerTimeLeft(this.S)),this.sj&&this.setVideoTimeLeft(this.sj),this.enable(!0)):(this.V([]),this.enable(!1))}Z(l){this.Ja(l);this.eN.M7()}J(l){switch(l){case "Off":return"T\u1eaft";case "End of video":return"Khi h\u1ebft video";case "End of playlist":return"Khi h\u1ebft danh s\u00e1ch ph\u00e1t";default:return`${l.toString()} ${"Ph\u00fat"}`.toLowerCase()}}Ja(l){const y=this.rb[l],k=y==="End of video"||y==="End of playlist";
y==="Off"&&(this.S="");this.L.getPlayerState()!==0&&this.L.getPlayerState()!==5||!k?(this.b0=l,super.Z(l),this.C(l),g.G3(this.L,"onSleepTimerSettingsChanged",y)):g.G3(this.L,"innertubeCommand",{openPopupAction:{popupType:"TOAST",popup:{notificationActionRenderer:{responseText:{simpleText:"Video \u0111\u00e3 k\u1ebft th\u00fac"}}}}})}onVideoDataChange(l){l==="dataloaded"&&IVT(this)}u0(l){this.L.logVisibility(this.element,l)}onClick(){this.L.logClick(this.element)}resetSleepTimerMenuSettings(){this.Ja(this.J("Off"))}setSleepTimerTimeLeft(l){this.S=
l;this.setContent(l)}setVideoTimeLeft(l){this.sj=l;this.Y.setContent(l)}};var wOO=class extends az{constructor(l){super(l);l.addEventListener("settingsMenuInitialized",()=>{this.menuItem||(this.menuItem=new dRL(this.api,this.api.Kf()),g.x(this,this.menuItem))});
l.addEventListener("openSettingsMenuItem",y=>{y==="menu_item_sleep_timer"&&(this.menuItem||this.api.Kf()?.Bn(),this.menuItem.open())});
B(l,"resetSleepTimerMenuSettings",()=>{this.resetSleepTimerMenuSettings()});
B(l,"setSleepTimerTimeLeft",y=>{this.setSleepTimerTimeLeft(y)});
B(l,"setVideoTimeLeft",y=>{this.setVideoTimeLeft(y)})}resetSleepTimerMenuSettings(){this.menuItem&&this.menuItem.resetSleepTimerMenuSettings()}setSleepTimerTimeLeft(l){this.menuItem&&this.menuItem.setSleepTimerTimeLeft(l)}setVideoTimeLeft(l){this.menuItem&&this.menuItem.setVideoTimeLeft(l)}};var h12=class extends az{constructor(l){super(l);this.events=new g.cI(l);g.x(this,this.events);this.events.j(l,"onSnackbarMessage",y=>{switch(y){case 1:this.api.getPlayerStateObject().isBuffering()&&g.G3(this.api,"innertubeCommand",{openPopupAction:{popup:{notificationActionRenderer:{responseText:{runs:[{text:"B\u1ea1n \u0111ang g\u1eb7p s\u1ef1 c\u1ed1 g\u00e2y gi\u00e1n \u0111o\u1ea1n?"}]},actionButton:{buttonRenderer:{style:"STYLE_OVERLAY",size:"SIZE_DEFAULT",text:{runs:[{text:"H\u00e3y t\u00ecm hi\u1ec3u l\u00fd do"}]},
navigationEndpoint:{commandMetadata:{webCommandMetadata:{url:"https://support.google.com/youtube/answer/3037019#check_ad_blockers&zippy=%2Ccheck-your-extensions-including-ad-blockers",webPageType:"WEB_PAGE_TYPE_UNKNOWN"}},urlEndpoint:{url:"https://support.google.com/youtube/answer/3037019#check_ad_blockers&zippy=%2Ccheck-your-extensions-including-ad-blockers",target:"TARGET_NEW_WINDOW"}},loggingDirectives:{clientVeSpec:{uiType:232471}}}},loggingDirectives:{clientVeSpec:{uiType:232470}}}},durationHintMs:5E3,
popupType:"TOAST"}})}})}};var TW4;
g.cu=class extends g.z1{constructor(l,y=!1,k,z=!1,r=!1){super();this.Ja=r;this.Y=!1;this.V=new IT(this);this.J=this.K=null;this.N=this.C=!1;g.x(this,this.V);this.target=l;this.Z=y;this.b0=k||l;this.Y=z;y&&(g.tV&&this.target.setAttribute("draggable","true"),r||(this.target.style.touchAction="none"));ta(this)}j(l,y){this.V.j(this.b0,l,y,void 0,!this.Z)}cancel(){this.N&&(this.N=!1,this.publish("dragend",0,0,null));this.C&&(this.C=!1,this.publish("hoverend",0,0,null),OZ(this),ta(this))}uT(l){OZ(this);this.j(QM("move"),
this.D);this.j(QM("out"),this.IC);this.j("touchstart",this.A);this.Z&&this.j(QM("down"),this.S);const y=l.target;l=new g.jD(l.pageX,l.pageY);this.C=!0;this.publish("hoverstart",l.x,l.y,y);this.publish("hovermove",l.x,l.y,y)}D(l){const y=l.target;l=new g.jD(l.pageX,l.pageY);if(this.J){const k=this.J;this.J=null;if(k.relatedTarget===y&&nK(new g.jD(k.pageX,k.pageY),l))return}this.publish("hovermove",l.x,l.y,y)}IC(l){const y=new g.jD(l.pageX,l.pageY),k=l.relatedTarget;try{if(k&&g.cf(this.target,k)){this.J=
l;this.publish("hovermove",y.x,y.y,k);return}}catch(z){}OZ(this);ta(this);this.C=!1;this.publish("hoverend",y.x,y.y,k)}rb(l){this.uT(l);this.S(l)}S(l){if(typeof l.button!=="number"||l.button===0){OZ(this);this.V.j(dK(l.target),QM("move"),this.RR);this.V.j(dK(l.target),QM("up"),this.sj);var y=l.target;if(g.tV)this.j("dragstart",this.HG);else if(l.preventDefault(),(g.pA||Nj)&&y)a:{let k=y;for(;k;){if(u4(k)||k.getAttribute("tabindex")==="-1"){k.focus();break a}k=k.parentElement}dK(y).activeElement.blur()}this.N=
!0;l=new g.jD(l.pageX,l.pageY);this.publish("dragstart",l.x,l.y,y);this.publish("dragmove",l.x,l.y,y)}}HG(l){l.preventDefault()}RR(l){let y=l.target;y===dK(l.target)&&(y=null);l=new g.jD(l.pageX,l.pageY);this.publish("hovermove",l.x,l.y,y);this.publish("dragmove",l.x,l.y,y)}sj(l){OZ(this);this.N=!1;const y=kF(l),k=l.target;l=new g.jD(l.pageX,l.pageY);y&&g.cf(this.target,y)?(this.j(QM("move"),this.D),this.j(QM("out"),this.IC),this.j(QM("down"),this.S),this.j("touchstart",this.A),this.publish("dragend",
l.x,l.y,k)):(ta(this),this.C=!1,this.publish("dragend",l.x,l.y,k),this.publish("hoverend",l.x,l.y,k))}A(l){const y=l.changedTouches[0];y&&(OZ(this),this.Ja||(this.j("touchmove",this.u0),this.j("touchend",this.C_),this.j("touchcancel",this.C_),this.K=y.identifier,l=l.target,this.C||(this.C=!0,this.publish("hoverstart",y.pageX,y.pageY,l)),this.publish("hovermove",y.pageX,y.pageY,l),this.Z&&(this.N=!0,this.publish("dragstart",y.pageX,y.pageY,l),this.publish("dragmove",y.pageX,y.pageY,l))))}u0(l){const y=
VVy(this,l);y&&(this.Z&&l.preventDefault(),l=l.target,this.publish("hovermove",y.pageX,y.pageY,l),this.Z&&this.publish("dragmove",y.pageX,y.pageY,l))}C_(l){const y=VVy(this,l);if(y){OZ(this);ta(this);this.C=!1;const k=l.target;this.Z&&(this.Y||l.preventDefault(),this.N=!1,this.publish("dragend",y.pageX,y.pageY,k));this.publish("hoverend",y.pageX,y.pageY,k)}}Vj(){this.Z&&(g.tV&&this.target.removeAttribute("draggable"),this.target.style.touchAction="");OZ(this);super.Vj()}};TW4=!1;var GxR=class extends g.H{constructor(l,y){super({U:"div",L_:["ytp-overlay","ytp-speedmaster-overlay"],W:[{U:"div",B:"ytp-speedmaster-user-edu",W:[{U:"div",B:"ytp-speedmaster-label",Nd:y},{U:"div",B:"ytp-speedmaster-icon",Nd:"{{icon}}"}]}]});this.L=l;this.Z=this.qd("ytp-speedmaster-user-edu");this.updateValue("icon",PLq());g.zi(this.Z,"ytp-speedmaster-has-icon");this.L.createClientVe(this.Z,this,173040,!0);this.J()}J(){g.n9(this.element,"display","none");this.L.logVisibility(this.Z,!1)}};var aBv=class extends az{constructor(l){super(l);this.V=this.N=!1;this.C=new g.cI(l);g.x(this,this.C);this.D="2x";this.speedmasterUserEdu=new GxR(l,this.D);g.x(this,this.speedmasterUserEdu);g.pi(this.api,this.speedmasterUserEdu.element,4);this.Z=new g.cu(this.api.Yz().Sp,!0,null,!1,!0);g.x(this,this.Z);this.delay=new g.B_(this.sj,500,this);g.x(this,this.delay);this.C.j(l,"videodatachange",()=>{ha(this)},this);
this.C.j(l,"presentingplayerstatechange",()=>{ha(this)},this);
this.C.j(l,"autonavvisibility",()=>{ha(this)},this);
this.api.gT().subscribe("visibilitystatechange",()=>{ha(this)});
this.C.j(l,"rootnodemousedown",y=>{this.K=y});
this.X("web_speedmaster_spacebar_control")&&(this.C.j(l,"keyboardserviceglobalkeydown",(y,k)=>{this.C_=k;Y2P(this,y,k.O8,!0)},this),this.C.j(l,"keyboardserviceglobalkeyup",y=>{Y2P(this,y,!1,!1)},this))}Y(l,y){this.IR()||(this.A=[l,
y],this.Z.subscribe("dragmove",this.S,this),this.Z.subscribe("dragend",this.J,this),this.N||this.delay.Kl())}sj(){if(this.V){this.N=!0;this.b0=this.api.getPlaybackRate();this.Ja=this.api.getPlayerStateObject().isPaused();var l=this.speedmasterUserEdu;g.n9(l.element,"display","");l.L.logVisibility(l.Z,!0);this.api.setPlaybackRate(2);this.api.hideControls();this.api.playVideo();this.K&&(this.K.kO=!0);this.C_&&(this.C_.Y1=!0);this.X("enable_smart_skip_speedmaster_on_web")&&this.api.publish("speedmasterchanged",
!0)}}S(l,y){if(!this.N){l=[l,y];var k=this.A;k&&l&&k.length===2&&l.length===2?(y=Math.abs(k[0]-l[0]),k=Math.abs(k[1]-l[1]),y=Math.sqrt(y*y+k*k)):y=-1;y<10?this.A=l:wK(this)}}J(){wK(this)}};var iRO=class extends az{constructor(l){super(l);this.C=new Set;this.Z={};this.events=new g.cI(l);g.x(this,this.events);this.events.j(l,"videodatachange",y=>{y==="newdata"&&(this.api.Ur("stationsEmbargo"),this.api.Ur("stationsMetadataUpdate"),this.Z={},this.C.clear());y=this.api.getVideoData().eE;const k=y.get("PLAYER_CUE_RANGE_SET_IDENTIFIER_STATION_AIRING_EMBARGO");k&&pwC(this,k,"stationsEmbargo");(y=y.get("PLAYER_CUE_RANGE_SET_IDENTIFIER_STATION_METADATA_UPDATE"))&&pwC(this,y,"stationsMetadataUpdate")});
this.events.j(l,g.uR("stationsEmbargo"),y=>{this.api.zc(!0);var k=this.Z[y.id]??[];for(const z of k){k=z.embargo;if(!k)continue;this.api.hideControls();this.api.jI("auth",2,Rd(k.errorRenderer.reason),wd({embargoed:1,id:y.id,idx:y.C,start:y.start}));(k=k.onTrigger)&&g.G3(this.api,"innertubeCommand",k)}});
this.events.j(l,g.uR("stationsMetadataUpdate"),y=>{y=this.Z[y.id]??[];for(const k of y)(y=k.command)&&g.G3(this.api,"innertubeCommand",y)})}};var URO=class extends g.$c{constructor(l,y,k){super(y,l);this.Z=k}preventDefault(){super.preventDefault();this.Z&&this.Z.preventDefault()}stopPropagation(){super.stopPropagation();this.Z&&this.Z.stopPropagation()}};g.Hu=class extends cdQ{constructor(l){super();this.Z=l;this.Xr={};this.listener=y=>{this.dispatchEvent(new URO(this,y.type,y))}}S(){return!0}isView(){return!1}MW(){return!1}Jv(){return this.Z}VR(){return this.Z.src}gb(l){const y=this.getPlaybackRate();
this.Z.src=l;this.setPlaybackRate(y)}mK(){this.Z.removeAttribute("src")}getPlaybackRate(){try{return this.Z.playbackRate>=0?this.Z.playbackRate:1}catch{return 1}}setPlaybackRate(l){this.getPlaybackRate()!==l&&(this.Z.playbackRate=l);return l}Ti(){return this.Z.loop}setLoop(l){this.Z.loop=l}canPlayType(l,y){return this.Z.canPlayType(l,y)}isPaused(){return this.Z.paused}isSeeking(){return this.Z.seeking}isEnded(){return this.Z.ended}u0(){return this.Z.muted}D(l){Ck();this.Z.muted=l}J(){return this.Z.played||
Ht([],[])}Cy(){let l;try{l=this.Z.buffered}catch{}return l||Ht([],[])}A(){return this.Z.seekable||Ht([],[])}rb(){const l=this.Z;return l.getStartDate?l.getStartDate():null}getCurrentTime(){return this.Z.currentTime}setCurrentTime(l){this.Z.currentTime=l}getDuration(){return this.Z.duration}load(){const l=this.Z.playbackRate;try{this.Z.load()}catch{}this.Z.playbackRate=l}pause(){this.Z.pause()}play(){const l=this.Z.play();if(!l||!l.then)return null;l.then(void 0,()=>{});
return l}N(){return this.Z.readyState}PG(){return this.Z.networkState}eV(){return this.Z.error?this.Z.error.code:null}hC(){return this.Z.error?this.Z.error.message:""}getVideoPlaybackQuality(){if(window.HTMLVideoElement&&this.Z instanceof window.HTMLVideoElement&&this.Z.getVideoPlaybackQuality)return this.Z.getVideoPlaybackQuality();if(this.Z){var l=this.Z;const y=l.webkitDroppedFrameCount;if(l=l.webkitDecodedFrameCount)return{droppedVideoFrames:y||0,totalVideoFrames:l}}return{}}Jk(){return!!this.Z.webkitCurrentPlaybackTargetIsWireless}gw(){return!!this.Z.webkitShowPlaybackTargetPicker()}togglePictureInPicture(){const l=
this.Z,y=window.document;window.document.pictureInPictureEnabled?this.Z!==y.pictureInPictureElement?l.requestPictureInPicture():y.exitPictureInPicture():ct()&&l.webkitSetPresentationMode(l.webkitPresentationMode==="picture-in-picture"?"inline":"picture-in-picture")}Kx(){var l=this.Z;return new g.jD(l.offsetLeft,l.offsetTop)}getSize(){return g.Zo(this.Z)}setSize(l){g.r7(this.Z,l)}getVolume(){return this.Z.volume}setVolume(l){Ck();this.Z.volume=l}WG(l){this.Xr[l]||(this.Z.addEventListener(l,this.listener),
this.Xr[l]=this.listener)}setAttribute(l,y){this.Z.setAttribute(l,y)}removeAttribute(l){this.Z.removeAttribute(l)}hasAttribute(l){return this.Z.hasAttribute(l)}Y(){return HD(this.Z)}YC(l){g.zi(this.Z,l)}b0(l){return g.sq(this.Z,l)}T7(){return g.cf(document.body,this.Z)}audioTracks(){const l=this.Z;if("audioTracks"in l)return l.audioTracks}Vj(){for(const l of Object.keys(this.Xr))this.Z.removeEventListener(l,this.Xr[l]);super.Vj()}g4(l){this.Z.disableRemotePlayback=l}};g.Hu.prototype.K=yz(59);
g.Hu.prototype.Ja=yz(57);g.Hu.prototype.sj=yz(55);g.Hu.prototype.C_=yz(53);var K1=class extends g.H{constructor(l,y){super({U:"div",B:"ytp-horizonchart"});this.sampleCount=150;this.V=l;this.J=y;this.index=0;this.heightPx=-1;this.N=this.C=null;this.Z=2;this.element.style.width=`${this.Z*this.sampleCount}px`;this.element.style.height="1em"}};var Kos=class extends g.H{constructor(l){var y=null;y={U:"button",L_:["ytp-sfn-close","html5-video-info-panel-close","ytp-button"],G:{title:"close"},Nd:"[X]"};super({U:"div",L_:["html5-video-info-panel","ytp-sfn"],W:[y,{U:"div",L_:["html5-video-info-panel-content","ytp-sfn-content"],W:[{U:"div",W:[{U:"div",Nd:"Video ID / sCPN"},{U:"span",Nd:"{{video_id_and_cpn}}",B:"ytp-sfn-cpn"}]},{U:"div",W:[{U:"div",Nd:"Viewport / Frames"},{U:"span",Nd:"{{dims_and_frames}}"}]},{U:"div",W:[{U:"div",Nd:"Current / Optimal Res"},
{U:"span",Nd:"{{resolution}}"}]},{U:"div",W:[{U:"div",Nd:"Volume / Normalized"},{U:"span",Nd:"{{volume}}"}]},{U:"div",W:[{U:"div",Nd:"Codecs"},{U:"span",Nd:"{{codecs}}"}]},{U:"div",G:{style:"{{shader_info_style}}"},W:[{U:"div",Nd:"Shader Info"},{U:"span",Nd:"{{shader_info}}"}]},{U:"div",G:{style:"{{color_style}}"},W:[{U:"div",Nd:"Color"},{U:"span",Nd:"{{color}}"}]},{U:"div",G:{style:"{{drm_style}}"},W:[{U:"div",Nd:"Protected"},{U:"span",Nd:"{{drm}}"}]},{U:"div",G:{style:"{{bandwidth_style}}"},W:[{U:"div",
Nd:"Connection Speed"},{U:"span",W:[{U:"span",Nd:"{{bandwidth_chart}}"},{U:"span",Nd:"{{bandwidth_kbps}}"}]}]},{U:"div",G:{style:"{{network_activity_style}}"},W:[{U:"div",Nd:"Network Activity"},{U:"span",W:[{U:"span",Nd:"{{network_activity_chart}}"},{U:"span",Nd:"{{network_activity_bytes}}"}]}]},{U:"div",W:[{U:"div",Nd:"Buffer Health"},{U:"span",W:[{U:"span",Nd:"{{buffer_health_chart}}"},{U:"span",Nd:"{{buffer_health_seconds}}"}]}]},{U:"div",G:{style:"{{live_latency_style}}"},W:[{U:"div",Nd:"Live Latency"},
{U:"span",W:[{U:"span",Nd:"{{live_latency_chart}}"},{U:"span",Nd:"{{live_latency_secs}}"}]}]},{U:"div",G:{style:"{{live_mode_style}}"},W:[{U:"div",Nd:"Live Mode"},{U:"span",Nd:"{{live_mode}}"}]},{U:"div",G:{style:"{{playback_categories_style}}"},W:[{U:"div",Nd:"Playback Categories"},{U:"span",Nd:"{{playback_categories}}"}]},{U:"div",G:{style:"{{fmt_debug_info_style}}"},W:[{U:"div",Nd:"Format Debug Info"},{U:"span",Nd:"{{fmt_debug_info}}"}]},{U:"div",W:[{U:"div",Nd:"Mystery Text"},{U:"span",Nd:"{{debug_info}}"}]},
{U:"div",G:{style:"{{extra_debug_info_style}}"},W:[{U:"div",Nd:""},{U:"span",W:[{U:"span",Nd:"{{extra_debug_info}}"}]}]},{U:"div",W:[{U:"div",Nd:"Date"},{U:"span",Nd:"{{date}}"}]},{U:"div",G:{style:"{{cotn_and_local_media_style}}"},W:[{U:"div",Nd:"COTN / Local Media"},{U:"span",Nd:"{{cotn_and_local_media}}"}]},{U:"div",G:{style:"{{release_style}}"},W:[{U:"div",Nd:"Player Release"},{U:"span",Nd:"{{release_name}}"}]}]}]});this.K_=l;this.position=0;this.J=!0;y?this.j(this.qd("ytp-sfn-close"),"click",
this.hide):this.j(this.element,"click",this.hide);l=[0,18750,37500,81250,128E3,256E3,512E3,2048E3,8192E3,32768E3,131072E3];y="#000 #d53e4f #f46d43 #fdae61 #fee08b #e6f598 #abdda4 #66c2a5 #3288bd #124588 #fff".split(" ");const k=l.map(z=>z/4);
this.K={};this.Z=new K1(l,y);g.x(this,this.Z);this.updateValue("bandwidth_chart",this.Z);this.N=new K1([0,3,10,15,30,60,90],"#000 #66c2a5 #abdda4 #e6f598 #fdae61 #f46d43 #a8330f".split(" "));g.x(this,this.N);this.updateValue("live_latency_chart",this.N);this.C=new K1([0,15,30,60,90,120],"#000 #fdae61 #e6f598 #66c2a5 #3288bd #fff".split(" "));g.x(this,this.C);this.updateValue("buffer_health_chart",this.C);this.S=new K1(k,y);g.x(this,this.S);this.updateValue("network_activity_chart",this.S);this.delay=
new g.B_(this.Aa,500,this);g.x(this,this.delay);this.V=new g.B_(this.A,2E4,this);g.x(this,this.V)}show(){super.show();this.Aa()}hide(){super.hide();this.delay.stop();this.V.stop()}Aa(){var l=(0,g.f)(),y=rgs(this.K_);GN(this.Z,y.bandwidth_samples);GN(this.S,y.network_activity_samples);GN(this.N,y.live_latency_samples);GN(this.C,y.buffer_health_samples);const k={};for(const [z,r]of Object.entries(y)){y=z;const Z=r;this.K[y]!==Z&&(k[y]=" "+String(Z));this.K[y]=Z}this.update(k);l=(0,g.f)()-l>25?5E3:500;
this.delay.start(l)}A(){this.J?(this.position+=1,this.position>15&&(this.J=!1)):(--this.position,this.position<=0&&(this.J=!0));this.element.style.left=`${this.position}%`;this.element.style.top=`${this.position}%`;this.V.start(2E4)}};var MfR=class extends az{constructor(l){super(l);B(l,"getStatsForNerds",()=>rgs(this.api));
ao(l,"showVideoInfo",()=>{g_y(this,!0)});
ao(l,"hideVideoInfo",()=>{g_y(this,!1)});
ao(l,"isVideoInfoVisible",()=>!!this.aU?.Q9())}};var ER=class extends g.zP{constructor(){super();this.C=null;this.startTime=this.duration=0;this.delay=new g.sj(this.Z,null,this);g.x(this,this.delay)}Z(){var l=(0,g.f)()-this.startTime;l=l<this.duration?l/this.duration:1;this.C(CW(XOx,l));l<1&&this.delay.start()}},XOx=new c9(0,0,.4,0,.2,1,1,1),E_s=/[0-9.-]+|[^0-9.-]+/g;var cpR=class extends g.H{constructor(l){super({U:"button",L_:["ytp-size-button","ytp-button"],G:{title:l.X("player_tooltip_data_title_killswitch")?"{{title}}":"","data-tooltip-title":"{{tooltip-title}}","aria-keyshortcuts":"t","data-priority":"9","data-title-no-tooltip":"{{data-title-no-tooltip}}"},Nd:"{{icon}}"});this.api=l;this.yR=null;this.transition=new ER;g.x(this,this.transition);this.j(l,"sizestylechange",this.Aa);this.j(l,"fullscreentoggled",this.Aa);this.j(l,"presentingplayerstatechange",
this.Aa);l.createClientVe(this.element,this,139116);this.Aa();this.listen("click",this.onClick);q1(l,this.element,this)}onClick(){var l=this.api.app;let y;y=l.X("web_log_theater_mode_visibility")?!l.yR():!l.x7;g.G3(l.K_,"SIZE_CLICKED",y);this.api.logClick(this.element)}Aa(){this.fP(this.api.yC()&&!this.api.isFullscreen()&&this.api.getPresentingPlayerType()!==3);if(this.VM){const l=this.api.yR();this.yR!==l&&this.HT(l)}this.api.logVisibility(this.element,this.VM)}HT(l){var y=this.api.X("delhi_modern_web_player_icons")?
this.api.X("web_player_imax_theater_mode")?l?{U:"svg",G:{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M3 19h11v2H3l-.20-.01a2 2 0 0 1-1.78-1.78L1 19v-7h2v7Zm19.00-5a1 1 0 1 1 0 2h-4v4a1 1 0 1 1-2 0v-6h6ZM21 3a2 2 0 0 1 2 2v7h-2V5H10V3h11ZM7.00 3a1 1 0 0 1 1 1v6h-6a1 1 0 0 1 0-2h4V4a1 1 0 0 1 1-1Z"}}]}:{U:"svg",G:{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M21 3a2 2 0 0 1 2 2v14a2 2 0 0 1-1.79 1.99L21 21H3l-.20-.01a2 2 0 0 1-1.78-1.78L1 19V5a2 2 0 0 1 2-2h18ZM3 19h18V5H3v14Zm15-8a1 1 0 0 1 1 1v5h-5a1 1 0 1 1 0-2h3v-3a1 1 0 0 1 1-1Zm-8-4a1 1 0 1 1 0 2H7v3a1 1 0 1 1-2 0V7h5Z"}}]}:
l?{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M21.20 3.01L21 3H3L2.79 3.01C2.30 3.06 1.84 3.29 1.51 3.65C1.18 4.02 .99 4.50 1 5V19L1.01 19.20C1.05 19.66 1.26 20.08 1.58 20.41C1.91 20.73 2.33 20.94 2.79 20.99L3 21H21L21.20 20.98C21.66 20.94 22.08 20.73 22.41 20.41C22.73 20.08 22.94 19.66 22.99 19.20L23 19V5C23.00 4.50 22.81 4.02 22.48 3.65C22.15 3.29 21.69 3.06 21.20 3.01ZM3 15V5H21V15H3ZM16.87 6.72H16.86L16.79 6.79L13.58 10L16.79 13.20C16.88 13.30 16.99 13.37 17.11 13.43C17.23 13.48 17.37 13.51 17.50 13.51C17.63 13.51 17.76 13.48 17.89 13.43C18.01 13.38 18.12 13.31 18.21 13.21C18.31 13.12 18.38 13.01 18.43 12.89C18.48 12.76 18.51 12.63 18.51 12.50C18.51 12.37 18.48 12.23 18.43 12.11C18.37 11.99 18.30 11.88 18.20 11.79L16.41 10L18.20 8.20L18.27 8.13C18.42 7.93 18.50 7.69 18.49 7.45C18.47 7.20 18.37 6.97 18.20 6.79C18.02 6.62 17.79 6.52 17.55 6.50C17.30 6.49 17.06 6.57 16.87 6.72ZM5.79 6.79C5.60 6.98 5.50 7.23 5.50 7.5C5.50 7.76 5.60 8.01 5.79 8.20L7.58 10L5.79 11.79L5.72 11.86C5.57 12.06 5.49 12.30 5.50 12.54C5.51 12.79 5.62 13.02 5.79 13.20C5.97 13.37 6.20 13.48 6.45 13.49C6.69 13.50 6.93 13.42 7.13 13.27L7.20 13.20L10.41 10L7.20 6.79C7.01 6.60 6.76 6.50 6.5 6.50C6.23 6.50 5.98 6.60 5.79 6.79ZM3 19V17H21V19H3Z",
fill:"white"}}]}:{U:"svg",G:{height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M21.20 3.01L21 3H3L2.79 3.01C2.30 3.06 1.84 3.29 1.51 3.65C1.18 4.02 .99 4.50 1 5V19L1.01 19.20C1.05 19.66 1.26 20.08 1.58 20.41C1.91 20.73 2.33 20.94 2.79 20.99L3 21H21L21.20 20.98C21.66 20.94 22.08 20.73 22.41 20.41C22.73 20.08 22.94 19.66 22.99 19.20L23 19V5C23.00 4.50 22.81 4.02 22.48 3.65C22.15 3.29 21.69 3.06 21.20 3.01ZM3 15V5H21V15H3ZM7.87 6.72L7.79 6.79L4.58 10L7.79 13.20C7.88 13.30 7.99 13.37 8.11 13.43C8.23 13.48 8.37 13.51 8.50 13.51C8.63 13.51 8.76 13.48 8.89 13.43C9.01 13.38 9.12 13.31 9.21 13.21C9.31 13.12 9.38 13.01 9.43 12.89C9.48 12.76 9.51 12.63 9.51 12.50C9.51 12.37 9.48 12.23 9.43 12.11C9.37 11.99 9.30 11.88 9.20 11.79L7.41 10L9.20 8.20L9.27 8.13C9.42 7.93 9.50 7.69 9.48 7.45C9.47 7.20 9.36 6.97 9.19 6.80C9.02 6.63 8.79 6.52 8.54 6.51C8.30 6.49 8.06 6.57 7.87 6.72ZM14.79 6.79C14.60 6.98 14.50 7.23 14.50 7.5C14.50 7.76 14.60 8.01 14.79 8.20L16.58 10L14.79 11.79L14.72 11.86C14.57 12.06 14.49 12.30 14.50 12.54C14.51 12.79 14.62 13.02 14.79 13.20C14.97 13.37 15.20 13.48 15.45 13.49C15.69 13.50 15.93 13.42 16.13 13.27L16.20 13.20L19.41 10L16.20 6.79C16.01 6.60 15.76 6.50 15.5 6.50C15.23 6.50 14.98 6.60 14.79 6.79ZM3 19V17H21V19H3Z",
fill:"white"}}]}:l?{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,G:{d:"m 26,13 0,10 -16,0 0,-10 z m -14,2 12,0 0,6 -12,0 0,-6 z",fill:"#fff","fill-rule":"evenodd"}}]}:{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,G:{d:"m 28,11 0,14 -20,0 0,-14 z m -18,2 16,0 0,10 -16,0 0,-10 z",fill:"#fff","fill-rule":"evenodd"}}]};this.yR==null||this.api.X("delhi_modern_web_player_icons")?this.updateValue("icon",y):n_z(this.transition,
this.element,y);l=(this.yR=l)?"Ch\u1ebf \u0111\u1ed9 xem m\u1eb7c \u0111\u1ecbnh":"Ch\u1ebf \u0111\u1ed9 r\u1ea1p chi\u1ebfu phim";this.api.X("player_tooltip_data_title_killswitch")?this.update({title:g.Wl(this.api,l,"t"),"data-title-no-tooltip":l}):this.update({"tooltip-title":g.Wl(this.api,l,"t"),"data-title-no-tooltip":l});this.api.W1()}};var C2B=class extends az{constructor(l){super(l);this.events=new g.cI(l);g.x(this,this.events);this.events.j(l,"standardControlsInitialized",()=>{this.button=new cpR(l);g.x(this,this.button);l.cL(this.button,"RIGHT_CONTROLS_RIGHT")})}};var bRy=class extends az{constructor(l){super(l);this.Ja={TIMELY_ACTION_TRIGGER_TYPE_UNSPECIFIED:()=>!1,
TIMELY_ACTION_TRIGGER_TYPE_KEYBOARD_SEEK:y=>FoQ(this,y),
TIMELY_ACTION_TRIGGER_TYPE_PROGRESS_BAR_SEEK:y=>FoQ(this,y),
TIMELY_ACTION_TRIGGER_TYPE_PLAYER_CONTROLS_SHOWN:()=>this.api.O().experiments.z7("enable_smart_skip_player_controls_shown_on_web_increased_triggering_sensitivity")?this.S&&this.D:this.S&&this.A,
TIMELY_ACTION_TRIGGER_TYPE_SPEEDMASTER:()=>this.sj};
this.sj=this.D=this.A=this.S=!1;this.J={};this.events=new g.cI(l);g.x(this,this.events);this.K=new g.cu(this.api.Yz().Sp);g.x(this,this.K);if(this.api.X("enable_smart_skip_web_player_bar_hover_length_threshold")&&g.i_(this.api.O().experiments,"smart_skip_web_player_bar_min_hover_length_milliseconds")){const y=g.i_(this.api.O().experiments,"smart_skip_web_player_bar_min_hover_length_milliseconds");this.Y=new g.B_(this.V,y,this);g.x(this,this.Y)}this.events.j(l,"videodatachange",(y,k)=>{if(y!=="dataupdated"||
k.videoId!==this.videoId||!z_(this.timelyActions,BWz(k)))this.onVideoDataChange(k)});
this.events.j(l,"presentingplayerstatechange",y=>{this.ea(y)});
l.X("enable_smart_skip_player_controls_shown_on_web")&&(this.events.j(l,"onShowControls",()=>{this.S=!0;this.V()}),this.events.j(l,"onHideControls",()=>{this.S=!1}),this.K.subscribe("hoverstart",()=>{this.A=!0;
this.V()},this),this.K.subscribe("hoverend",()=>{this.A=!1},this),l.X("enable_smart_skip_player_controls_shown_on_web_increased_triggering_sensitivity")&&(this.events.j(l,"progressBarHoverStart",()=>{this.D=!0;
this.api.X("enable_smart_skip_web_player_bar_hover_length_threshold")?this.Y?.Kl():this.V()}),this.events.j(l,"progressBarHoverEnd",()=>{this.D=!1;
this.api.X("enable_smart_skip_web_player_bar_hover_length_threshold")&&this.Y?.stop()})));
l.X("enable_smart_skip_speedmaster_on_web")&&this.events.j(l,"speedmasterchanged",y=>{(this.sj=y)&&this.V()});
this.events.j(l,g.uR("timelyAction"),y=>{this.onCueRangeEnter(y.getId())});
this.events.j(l,g.xR("timelyAction"),y=>{this.onCueRangeExit(y.getId())});
l.X("web_enable_keyboard_shortcut_for_timely_actions")&&this.events.j(l,"keyboardserviceglobalkeydown",(y,k)=>{(e$?y.altKey:y.ctrlKey)&&y.keyCode===39&&this.C_&&this.Z&&(y=g.E(UZ(this,this.Z)?.rendererContext,Yzt),y=pz(y?.onTap))&&(g.G3(this.api,"innertubeCommand",y),k&&(k.Y1=!0),k=zk(),(y=u1q(k))&&x9z(k,y))},this);
this.C=new g.H({U:"div",L_:["ytp-player-content","ytp-timely-actions-content"]});this.C.hide();B(l,"insertTimelyActionUi",y=>{this.C.element.children.length>0&&g.Uq(this.C.element);y.classList.add("ytp-timely-actions-overlay");this.C.element.appendChild(y)});
g.x(this,this.C);this.X("web_player_overlay_positioned_layout")?this.events.j(l,"basechromeinitialized",()=>{this.api.Sf(this.C.element,4,!0);this.C.element.setAttribute("data-overlay-order","10")}):g.pi(this.api,this.C.element,4)}onVideoDataChange(l){this.t6();
this.videoId=l.videoId;this.N=this.Z=void 0;this.timelyActions=BWz(l);o_y(this);ic(this);this.Wa()}ea(l){const y=l.oldState,k=l.state,z=k.seekSource;!y.Z(16)&&k.Z(16)?this.DD(z??void 0):y.Z(16)&&!k.Z(16)&&this.h9();l=l.state;l=!l.isCued()&&!l.Z(1024);this.C.fP(l)}Wa(){const l=this.XJ();l&&this.api.Wa(l)}t6(){this.api.Ur("timelyAction",1);if(this.Z!==void 0)this.onCueRangeExit(this.Z)}XJ(){if(this.timelyActions){var l=[];for(const k of this.timelyActions){var y=k.startTimeMilliseconds!=null&&k.endTimeMilliseconds!=
null&&k.cueRangeId!=null?new g.N1(Number(k.startTimeMilliseconds),Number(k.endTimeMilliseconds),{id:k.cueRangeId,namespace:"timelyAction"}):void 0;y&&l.push(y)}return l}}onCueRangeEnter(l){const y=UZ(this,l);y&&this.J[l]!==void 0&&(y.maxShowCount===void 0||y?.maxShowCount>this.J[l])&&(this.Z=l,this.V())}onCueRangeExit(l){const y=NWy(this,l);y&&this.Z===l&&g.G3(this.api,"innertubeCommand",y);ic(this);this.Z=void 0}DD(l){this.N=l}h9(){this.V();this.N=void 0}V(){if(this.Z!==void 0){var l=(l=UZ(this,
this.Z))&&l.onCueRangeEnter?pz(l.onCueRangeEnter):void 0;var y=UZ(this,this.Z);a:if(y&&y.additionalTrigger){for(k of y.additionalTrigger)if(k.type&&(0,this.Ja[k.type])?.(k.args??{})){var k=!0;break a}k=!1}else k=!0;l&&k&&(g.G3(this.api,"innertubeCommand",l),sM4(this,y),this.J[this.Z]!==void 0&&this.J[this.Z]++,this.C_=!0)}}Vj(){this.timelyActions=this.N=this.Z=this.videoId=void 0;this.J={};this.t6();ic(this);super.Vj()}};var uw1=class extends az{constructor(l){super(l);l=window;var y=this.api.O().sA();y.Z.G7(fbT)?(y=[],l.ytPlayerArraySizeExperimentLength=y.length,l.ytPlayerArraySizeExperimentValue=y[0]):y.Z.G7(En4)?(y="6LPTkck/iK3Q7HMwz7Zyg71LBC0 buD oK+f O5w1 a ns4dbB O sCTaU5B4GI / ebOXx/5DGOwDMt1CEaJxccW+OaQtE zYkklE D4Kspm WDky G s0Vj4uvrd eLSfss l B1D/tiB9kUaZ+S SUWnD oGfGji rRpkB Jg O1 czi9 R Wl4 D94+hDF KOX stfyToM l8v9IJ KZi G A/2wZ 0Qfq 3kv3QDUZOWRK erN3h3b i j tdYdy kl u FBFdIp72yKKL/T rO ym cJYXYi8 yz+ ycc6jftJvwlWp ac s7m+LzqFtVOrgm7z0Z5Q/8Npyo19C B MFZkvXTvZR59/ IKgbLr56eq4Gs JiTE6RRv2HmCWEy Jb+OG u7Ui9+Uy 2FhggtkS7H+rbrOWFb565UNsslsXF i 1CLXS6 bW 6wRdeNJzE gvPRbDS3yqGyk+DHWJU+8pCy8FiGbRXFr2m 3 5GOYU7DuLxi5tbaWKEUSnPYd0ZdsaJY 5 wy9W8enoXtF70HcJfDja0FFaVcIlv Krj7JRMtiVWxQiqDYJqQf8d+Yhvqo WX eAqMs9UttnWTxsaY gcOb/6JXqGHdb5A7TVlpS9kTPq prg 3nD M7c rxwkg2JVkNqS4PtC2P+YzOfoYOdLc i gHNfRWcg3TaR CEKsZBM VfI V1VupF9DkyxK/ k7iWF+tWtW+RaVdPk6H3X 0GcnAiuJXyd7nC/ORmzb/HGrnvBms 6k NmQ2 aGB3blYR9pxhHrY Sk0Y/7tBGJ9EaTbTwoJGWt6 ijhACaixJX vh kwC00l 5QSqhiYiieEvBUYd7S SSRtsEjUFle/8v os".split(" "),
l.ytPlayerArraySizeExperimentLength=y.length,l.ytPlayerArraySizeExperimentValue=y[Math.floor(Math.random()*y.length)]):y.Z.G7(gne)&&(y="a Y1bKqzJ s0Vj4uvrd x+ G stfyToM 7W xsHJ KZi 5 H2+ buD / 3 15 76VyLn4q6B SUWnD XF Ml D9/q oK+f K+ eLSfss B rlJLVN wy9W8enoXtF70HcJfDja0FFaVcIlv yLwl WDky asfV3x j KOX /I M FL czi9 b qfSz0ipS DQ m68 u7Ui9+Uy 61 K5xdXVLZb 1e sm BzwWNM gjQS0e hJ l3 zUJAT rRpkB I0j5 DPZ/ gcOb/6JXqGHdb5A7TVlpS9kTPq Hn 7m WwesQPUzST n51 B1D/tiB9kUaZ+S TKXw0mTsQ imMcmOcJbtBm2iiT gvPRbDS3yqGyk+DHWJU+8pCy8FiGbRXFr2m V2 ac s7 D4Kspm j 7I Z4U+fzdVIKP99m 8l 72 Nh5 ab XgH8Lzvf/8e92nICvOm8 gZ O OVRfzTvv99f6a Ng G oGfGji Xr O0 +y uM a6 mb ImnAv LKuVPy OlPbi N483sfs uP A7 71DqBndyU3GS6bIzA zS fts2 ky A/2wZ 0Qfq Zfvd5Pn4776zeP5oPc aI vTeKTkO bhbbE sd os zYkklE CEKsZBM V1VupF9DkyxK/ ebOXx/5DGOwDMt1CEaJxccW+OaQtE tdYdy rO iy34HMOZpoG 2P Jb+OG 7V6 U6 D94+hDF RN RjTb6s9dI1z3sbX2Z n5Jc3 u8 sCTaU5B4GI kEvjgcbIMe a be5m6OlQPwiJOhQ t5 SKU/ XKCZgrGIc3wy+ RX JgMLCGK hTtIGwjH1fcQWLu 30 Pt Mk8cYLj6WiDpDJN zO0ox JD ygD8z hp TtR HX+B89Khozs4 G MxY0 CdMDbBR bQ47h 7N i B90/Ls3uwfIR+zJE pM iAtM6ngY20Xjova0ANGS+MWXtw WF JMLr8w 8W 07 Lq9jaVTdvqKUcBE+lcgF7T3+rj8eLe/W9Gx6pMjv+q Av l lEIzH+OY FqDusHkb z7 pr8bo8c/VS pMPt A6 rxwkg2JVkNqS4PtC2P+YzOfoYOdLc Ca cX Iw2D fp5 erN3h3b FOM 6k 6W/+L21S0BgHkyXSeXgiZEFNnD bW UNvcj1zvh8 I3TZF5 Jg xw vG Ia9v 5QSqhiYiieEvBUYd7S tA nY LJ ym Krj7JRMtiVWxQiqDYJqQf8d+Yhvqo LQhs6cZhK2 0wDpZFkrDy K9nzX D99+akDyTHqVZ5oc vh o+H0k SG s7m+LzqFtVOrgm7z0Z5Q/8Npyo19C XT Ba R Q4 X k7iWF+tWtW+RaVdPk6H3X kwC00l R+km6jn4lEte 6c O/E2WbIgQZp1fX6M15U6V4Cn2VEhA/o1gqaZrT W35r8t FM Sk0Y/7tBGJ9EaTbTwoJGWt6 59N5n p2 dc/6x6Ue8NTkG8Eq 3kv3QDUZOWRK bEp8Cdrszr5 7/ YF 0EGSTB RQ MFZkvXTvZR59/ sU aQ ++ kl u FM8tJsLmwDZGwNxLT3UB8U+Oqq M7c cJYXYi8 Joavny ul O1 Yo PzjTAnVHpDMOOfHYH7PRH5cM ns4dbB jz 0MqMKs EC 5i /PSB9 FSr5qF2R kXioSwTShtq5feiVSbNLRWdm8JtU ses mL J84d RA eAqMs9UttnWTxsaY YqL+09b l8v9IJ VfI Un5oe aghMX806dvo tfkKluaA tWZ0RiNdY ha /++SfI 78y wMv/BMy w4igDN5fJhU/ ijhACaixJX 9s+4w/ i f7 g33AqPrwozIBbUR 2W I5xT3pY5tk3rrjxU4XaqE3JsSS1Y+LA0zCg IKgbLr56eq4Gs WX 2U 3EX5fOxmA pD V8eT3N6k ShiYcW72d5b NmQ2 Mx yz+ ycc6jftJvwlWp aGB3blYR9pxhHrY bWti1J FBFdIp72yKKL/T 2FhggtkS7H+rbrOWFb565UNsslsXF ePmsAY5V ca rZ prg 5 5GOYU7DuLxi5tbaWKEUSnPYd0ZdsaJY ec8TP 6wRdeNJzE BV NrX25+/J8LYtUk O5w1 0GcnAiuJXyd7nC/ORmzb/HGrnvBms hGs6kinOmHXn QoQ Wl4 +S1B mv Jo 671 QGZ 5ru JiTE6RRv2HmCWEy v5vpHQ5jXX5RZgSVfA7P9Keq/9 ngi k3cqFr12egl66d89FwnoKFk dF+d5SEX0slenHxkb+cmSyeQohfO i R gHNfRWcg3TaR EwPA 5banN SSRtsEjUFle/8v szO04kG7irS7lBIpOjUf 51 8Vh6p 3nD ii6 QDM3wl8PVhEf5fF".split(" "),
l.ytPlayerArraySizeExperimentLength=y.length,l.ytPlayerArraySizeExperimentValue=y[Math.floor(Math.random()*y.length)])}};var xRv=class extends az{constructor(l){super(l);ao(this.api,"getPlaybackRate",()=>this.api.getPlaybackRate());
ao(this.api,"setPlaybackRate",y=>{typeof y==="number"&&this.api.setPlaybackRate(y)})}};var HX4=class extends iz{constructor(l,y,k,z){super("T\u0103ng c\u01b0\u1eddng gi\u1ecdng n\u00f3i",g.Gl.Gs);this.L=l;this.V=y;this.N=k;this.getVoiceBoostState=z;this.C=!1;this.eN=this.L.X("html5_enable_new_audio_settings_menu")?l.Kf().Wc:l.Kf();this.j(l,"onFilterAudioFeatures",this.xK);this.setIcon({U:"svg",G:{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M11.48 2.14 3.91 6.68A6 6 0 0 0 1 11.83v.33a6 6 0 0 0 2.91 5.14l7.57 4.54A1 1 0 0 0 13 21V3a1.00 1.00 0 0 0-1.51-.85Zm6.88 2.07a1 1 0 0 0-.00 1.41 9 9 0 0 1 0 12.72 1 1 0 0 0 1.41 1.41 11 11 0 0 0 0-15.55 1 1 0 0 0-1.41 0ZM4.94 8.40l.00-.00L11 4.76v14.46l-6.05-3.63A4 4 0 0 1 3 12.16v-.33a4 4 0 0 1 1.94-3.42ZM15.53 7.05a1 1 0 0 0 0 1.41 5 5 0 0 1 0 7.07 1 1 0 0 0 1.41 1.41 6.99 6.99 0 0 0 0-9.9 1 1 0 0 0-1.41 0Z"}}]});
this.subscribe("select",this.J,this);this.xK()}J(l){this.V(l?2:1)}xK(){var l=this.L.getPresentingPlayerType();l===2||l===3?this.C&&(this.C=!1,this.eN.Lg(this)):(l=this.getVoiceBoostState(),l!==1?(l===0?(this.Z(this.N()===2),this.setEnabled(!0)):(this.Z(!1),this.setEnabled(!1)),this.C||(this.eN.tv(this),this.C=!0)):this.C&&(this.eN.Lg(this),this.C=!1))}Vj(){this.eN.Lg(this);super.Vj()}};var mRo=class extends az{constructor(l){super(l);this.events=new g.cI(l);g.x(this,this.events);const y=this.api.X("html5_enable_voice_boost");y&&this.events.j(l,"settingsMenuInitialized",()=>{RSC(this)});
B(this.api,"getVoiceBoostUserPreference",()=>y?this.getVoiceBoostUserPreference():0);
B(this.api,"setVoiceBoostUserPreference",k=>{y&&this.setVoiceBoostUserPreference(k)});
B(this.api,"getVoiceBoostState",()=>y?this.getVoiceBoostState():1);
this.Z=R7s()??0;this.updateEnvironmentData()}getVoiceBoostUserPreference(){return this.Z}setVoiceBoostUserPreference(l){this.api.Md("vb_set",{pref:l});g.eY("yt-player-voice-boost",l,31536E4);l!==this.Z&&(this.Z=l,this.updateEnvironmentData(),this.getVoiceBoostState()!==1&&this.api.x8(),this.api.Zl())}getVoiceBoostState(){return this.api.O2(1)}updateEnvironmentData(){this.api.O().qg=this.Z}};var qyL=class extends az{constructor(l){super(l);this.useLivingRoomPoToken=!1;this.J=new g.OX;this.Z=!1;this.QM=null;this.K=!1;this.V=null;this.S=!1;const y=l.O().getWebPlayerContextConfig();this.events=new g.cI(l);g.x(this,this.events);this.events.j(l,"spsumpreject",(k,z,r)=>{this.S=z;k&&this.K&&!this.V&&(this.X("html5_generate_content_po_token")&&r?this.P6(r):this.X("html5_generate_session_po_token")&&ZyP(this));this.V||this.api.Md("stp",{s:+this.K,b:+this.S})});
this.events.j(l,"poTokenVideoBindingChange",k=>{this.P6(k)});
if(this.X("html5_web_po_on_demand_init")){const k=this.events.j(l,"videodatachange",(z,r)=>{r.V1&&!this.K&&($qs(this),this.events.uq(k))})
}this.useLivingRoomPoToken=!!y?.useLivingRoomPoToken;l.addEventListener("csiinitialized",()=>{this.QM=l.SV();this.X("html5_web_po_on_demand_init")?this.N=Jn():$qs(this)});
l.addEventListener("trackListLoaded",this.rW.bind(this));l.Vh(this)}Vj(){this.A&&(g.Kl(this.A),this.A=void 0);super.Vj()}ZH(){(this.C?!this.Z:this.N)&&XY(this)}rW(l,y,k){if(l9t(l)){var z=k||"";if(this.Z)y=uc(this,z),yU5(l,y);else{var r=new g.OX;y.push(r.promise);this.J.promise.then(()=>{const Z=uc(this,z);yU5(l,Z);r.resolve()})}}}P6(l){if(this.C||this.N)l.Qk=uc(this,l.videoId),this.Z||(this.V=new fA,this.J.promise.then(()=>{this.QM.GJ("pot_if");
l.Qk=uc(this,l.videoId)}))}};var X4e=class extends g.H{constructor(l){super({U:"div",L_:["ytp-more-videos-button","ytp-button"],G:{title:"{{title}}",role:"button",tabindex:"0","aria-hidden":"true"},W:[{U:"div",B:"ytp-more-videos-button-thumbnail"},{U:"span",B:"ytp-more-videos-button-title",Nd:"{{title}}"}]});this.L=l;this.N=this.qd("ytp-more-videos-button-thumbnail");this.V=this.qd("ytp-more-videos-button-title");this.C=new g.cI(this);g.x(this,this.C);this.C.j(this.L,"videodatachange",this.Z);this.Z();this.listen("click",this.onClick);
h0e(this,0);this.hide()}Z(){var l=this.L.getVideoData({playerType:1});l=(l?.suggestions?.length?l.suggestions:l?.D()?[l.D()]:[])[0]?.uE("mqdefault.jpg");this.N&&l&&g.n9(this.N,"background-image",l?`url("${l}")`:"")}onClick(){this.L.logClick(this.element)}IU(l){this.fP([1,2].includes(l));h0e(this,l)}fP(l){super.fP(l);this.element.setAttribute("aria-hidden",String(!l));l&&this.Z()}Vj(){super.Vj()}};g.Wvo=class extends g.H{constructor(l){const y=l.O(),k=g.Mx||g.Yf?{style:"will-change: opacity"}:void 0,z=y.V,r=["ytp-modern-videowall-still"];y.C&&r.push("ytp-videowall-show-text");super({U:"a",L_:r,G:{href:"{{url}}",target:z?y.D:"","aria-label":"{{aria_label}}","data-is-live":"{{is_live}}","data-is-list":"{{is_list}}","data-is-mix":"{{is_mix}}"},W:[{U:"div",B:"ytp-modern-videowall-still-image",G:{style:"{{background}}"},W:[{U:"span",B:"ytp-modern-videowall-still-info-duration",Nd:"{{duration}}"}]},
{U:"span",B:"ytp-modern-videowall-still-info",G:{"aria-hidden":"true"},W:[{U:"span",B:"ytp-modern-videowall-still-info-bg",W:[{U:"span",B:"ytp-modern-videowall-still-info-content",G:k,W:[{U:"span",B:"ytp-modern-videowall-still-info-title",Nd:"{{title}}"},{U:"span",B:"ytp-modern-videowall-still-info-author",Nd:"{{author}}"},{U:"span",B:"ytp-modern-videowall-still-view-count-and-date-info",Nd:"{{views_and_publish_time}}"},{U:"span",B:"ytp-modern-videowall-still-info-live",Nd:"Tr\u1ef1c ti\u1ebfp"}]}]}]},
{U:"span",L_:["ytp-modern-videowall-still-listlabel-regular","ytp-modern-videowall-still-listlabel"],G:{"aria-hidden":"true"},W:[{U:"span",B:"ytp-modern-videowall-still-listlabel-icon"},"Danh s\u00e1ch ph\u00e1t",{U:"span",B:"ytp-modern-videowall-still-listlabel-length",W:[" (",{U:"span",Nd:"{{playlist_length}}"},")"]}]},{U:"span",L_:["ytp-modern-videowall-still-listlabel-mix","ytp-modern-videowall-still-listlabel"],G:{"aria-hidden":"true"},W:[{U:"span",B:"ytp-modern-videowall-still-listlabel-mix-icon"},
"Tuy\u1ec3n t\u1eadp",{U:"span",B:"ytp-modern-videowall-still-listlabel-length",Nd:" (50+)"}]}]});this.suggestion=null;this.C=z;this.api=l;this.Z=new g.cI(this);g.x(this,this.Z);this.listen("click",this.onClick);this.listen("keypress",this.onKeyPress);this.Z.j(l,"videodatachange",this.onVideoDataChange);l.createServerVe(this.element,this);this.onVideoDataChange()}select(){this.api.E2(this.suggestion.videoId,this.suggestion.sessionData,this.suggestion.playlistId,void 0,void 0,this.suggestion.PL||void 0)&&
this.api.logClick(this.element)}onClick(l){if(g.u9(this.api.O())&&this.api.X("web_player_log_click_before_generating_ve_conversion_params")){this.api.logClick(this.element);let y=this.suggestion.A6();const k={};g.JI(this.api,k);y=g.UI(y,k);g.Hl(y,this.api,l)}else g.Bl(l,this.api,this.C,this.suggestion.sessionData||void 0)&&this.select()}onKeyPress(l){switch(l.keyCode){case 13:case 32:l.defaultPrevented||(this.select(),l.preventDefault())}}onVideoDataChange(){const l=this.api.getVideoData(),y=this.api.O();
this.C=l.Wn?!1:y.V}};var M$e=class extends g.H{constructor(l,y){const k=l.X("web_player_use_more_videos_button");super({U:"div",L_:["ytp-fullscreen-grid"],W:[{U:"div",B:"ytp-fullscreen-grid-hover-overlay",G:{"aria-keyshortcuts":"v","data-title-no-tooltip":"{{data-title-no-tooltip}}","data-tooltip-target-id":"ytp-fullscreen-grid-expand-button","data-tooltip-offset-y":"-70"}},{U:"div",B:"ytp-fullscreen-grid-buttons-container",W:k?[]:[{U:"button",L_:["ytp-fullscreen-grid-expand-button","ytp-button"],G:{"aria-keyshortcuts":"v",
"data-title-no-tooltip":"{{data-title-no-tooltip}}","data-tooltip-target-id":"ytp-fullscreen-grid-expand-button","data-tooltip-offset-y":"-10"},W:["{{icon}}"]}]},{U:"div",B:"ytp-fullscreen-grid-main-content",W:[{U:"div",B:"ytp-fullscreen-grid-stills-container"}]}]});this.player=l;this.stills=[];this.videoData=null;this.currentState=0;this.S=k;this.b0=this.player.X("web_player_use_external_grid_component");(this.Ja=this.player.X("web_player_enable_horizontal_endscreen_shelf"))&&g.zi(this.player.getRootNode(),
"ytp-enable-horizontal-endscreen-shelf");this.V=this.qd("ytp-fullscreen-grid-main-content");this.Y=this.qd("ytp-fullscreen-grid-stills-container");this.A=this.qd("ytp-fullscreen-grid-buttons-container");this.S&&(this.J=new X4e(this.player),this.A.appendChild(this.J.element),g.x(this,this.J),this.j(this.J.element,"click",this.D));this.b0&&(this.Y.style.display="none");this.K=new g.cI(this);g.x(this,this.K);this.sj=y;if(this.V&&this.Y){if(l=this.qd("ytp-fullscreen-grid-hover-overlay"))this.j(l,"click",
this.D),q1(this.player,l,this);!this.S&&(l=this.qd("ytp-fullscreen-grid-expand-button"))&&(this.j(l,"click",this.D),q1(this.player,l,this));if(l=this.player.getVideoData({playerType:1}))this.videoData=l;this.player.createClientVe(this.V,this,223051);this.K.j(this.player,"videodatachange",this.onVideoDataChange)}}Vj(){this.hide();this.K.C();g.kj(this.stills);this.stills.length=0;this.N&&(this.N.remove(),this.N=void 0);this.Z&&(this.Z.remove(),this.Z=void 0);this.C&&(this.C.remove(),this.C=void 0);
super.Vj()}setCommentsButton(l){l!==this.Z&&(this.Z&&this.Z.remove(),this.Z=l)&&(g.zi(this.Z,"ytp-fullscreen-grid-action-button"),this.A.appendChild(this.Z))}setDescriptionButton(l){l!==this.C&&(this.C&&this.C.remove(),this.C=l)&&(g.zi(this.C,"ytp-fullscreen-grid-action-button"),Mj(this.A,this.C,0))}D(l){this.sj&&this.sj(l)}onVideoDataChange(){if(!this.b0){this.videoData=this.player.getVideoData({playerType:1});var l=(this.videoData?.suggestions?.length?this.videoData?.suggestions:this.videoData?.D()?
[this.videoData?.D()]:[]).slice(0,18),y=this.Y;if(y&&this.V)if(g.Uq(y),l.length){this.stills.length>l.length&&g.kj(this.stills.splice(l.length));this.stills.length=l.length;for(let k=0;k<l.length;k++){const z=l[k];if(!z)continue;let r=this.stills[k];r||(r=new g.Wvo(this.player),this.stills[k]=r);g.Gas(r,z);y&&y.appendChild(r.element)}}else g.kj(this.stills),this.stills.length=0}}IU(l,y="INTERACTION_LOGGING_GESTURE_TYPE_GENERIC_CLICK"){if(this.currentState!==l){this.currentState=l;this.S&&this.J?this.J.IU(l):
this.update({icon:l===2?mSt():{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"g",G:{filter:"url(#filter0_d_3104_799356)"},W:[{U:"path",G:{d:"M5.29 15.20C4.92 14.84 4.90 14.26 5.22 13.86L5.29 13.79L11.99 7.08L18.70 13.79C19.09 14.18 19.09 14.81 18.70 15.20C18.31 15.59 17.68 15.59 17.29 15.20L11.99 9.91L6.70 15.20L6.63 15.27C6.23 15.59 5.65 15.57 5.29 15.20Z",fill:"white"}}]},{U:"defs",W:[{U:"filter",G:{"color-interpolation-filters":"sRGB",filterUnits:"userSpaceOnUse",height:"26",
width:"26",x:"-1",y:"-1"},W:[{U:"feFlood",G:{"flood-opacity":"0",result:"BackgroundImageFix"}},{U:"feColorMatrix",G:{"in":"SourceAlpha",result:"hardAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}},{U:"feOffset"},{U:"feGaussianBlur",G:{stdDeviation:"0.5"}},{U:"feComposite",G:{in2:"hardAlpha",operator:"out"}},{U:"feColorMatrix",G:{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.8 0"}},{U:"feBlend",G:{in2:"BackgroundImageFix",mode:"normal",result:"effect1_dropShadow_3104_799356"}},
{U:"feBlend",G:{"in":"SourceGraphic",in2:"effect1_dropShadow_3104_799356",mode:"normal",result:"shape"}}]}]}]}});this.V.scrollTop=0;this.fP(this.currentState!==0);if(l===2){const k=g.MM(),z=this.V.visualElement;k&&z&&yk(k,z,y)}if(l!==0)this.element.setAttribute("tabindex","0"),a9q(this,l);else if(this.element.setAttribute("tabindex","-1"),a9q(this,l),!this.S&&(l=this.qd("ytp-fullscreen-grid-expand-button"))&&(l.removeAttribute("title"),l.removeAttribute("data-title-no-tooltip"),l.removeAttribute("aria-label")),
l=this.qd("ytp-fullscreen-grid-hover-overlay"))l.removeAttribute("title"),l.removeAttribute("data-title-no-tooltip"),l.removeAttribute("aria-label");this.player.W1()}}};var IBR=class extends az{constructor(l){super(l);this.S=this.Z=this.N=0;this.A=null;this.K=this.J=0;this.isEnded=!1;this.C_=null;const y=new g.cI(l);g.x(this,y);this.sj=g.i_(this.api.O().experiments,"web_player_default_peeking_px");this.RR=this.api.X("delhi_modern_player_enable_pause_peeking");this.rb=g.i_(this.api.O().experiments,"delhi_modern_player_pause_thumbnail_percentage");this.PG=this.api.X("web_player_imax_theater_mode");this.V=this.api.X("web_player_enable_fullscreen_grid_components");this.HG=
this.api.X("web_player_enable_more_videos_button");this.Ja=this.api.X("web_player_use_external_grid_component");g.zi(this.api.getRootNode(),"ytp-grid-scrollable");y.j(l,"fullscreentoggled",()=>{WB(this)});
y.j(l,"videodatachange",()=>{if(this.V){var k=this.api.getVideoData({playerType:1});this.videoData!==k&&this.N===2&&(g.ZM(this.api.getRootNode(),"ytp-grid-scrolling"),TN(this,1,"INTERACTION_LOGGING_GESTURE_TYPE_AUTOMATED"));this.videoData=k}},this);
y.j(l,"sizestylechange",()=>{this.V&&WB(this)});
B(this.api,"setFullscreenQuickActions",k=>{this.setFullscreenQuickActions(k)});
B(this.api,"setPlayerOverlayVideoDetailsRenderer",k=>{this.setPlayerOverlayVideoDetailsRenderer(k)});
this.Ja&&B(this.api,"setFullscreenGrid",k=>{this.setFullscreenGrid(k)});
B(this.api,"setCommentsButton",k=>{this.setCommentsButton(k)});
B(this.api,"setDescriptionButton",k=>{this.setDescriptionButton(k)});
this.V&&CG5(this,y,l)}u0(){this.V&&this.N!==0&&this.Y("INTERACTION_LOGGING_GESTURE_TYPE_GENERIC_CLICK")}Y(l){this.V&&(l==="INTERACTION_LOGGING_GESTURE_TYPE_SCROLL_BEGAN_DRAGGING"&&(this.C_&&clearTimeout(this.C_),this.C_=window.setTimeout(()=>{this.C_=null},1E3)),this.N===1?TN(this,2,l):TN(this,1,l))}setFullscreenGrid(l){if(this.Ja&&this.C){var y=this.C;
y.b0&&l!==y.N&&(y.N&&y.N.remove(),y.N=l,y.N&&y.V.appendChild(y.N))}}setCommentsButton(l){this.C&&this.C.setCommentsButton(l)}setDescriptionButton(l){this.C&&this.C.setDescriptionButton(l)}setFullscreenQuickActions(l){this.b0&&this.b0.remove();l?(g.zi(l,"ytp-fullscreen-quick-actions"),this.X("web_player_overlay_positioned_layout")?(l.setAttribute("data-overlay-order","13"),this.api.Sf(l,4)):(g.zi(this.api.getRootNode(),"ytp-has-fullscreen-quick-actions"),g.pi(this.api,l,4))):g.ZM(this.api.getRootNode(),
"ytp-has-fullscreen-quick-actions");this.b0=l;WB(this)}setPlayerOverlayVideoDetailsRenderer(l){this.playerOverlayVideoDetailsRenderer&&this.playerOverlayVideoDetailsRenderer.remove();if(l){g.zi(l,"ytp-fullscreen-metadata");g.zi(this.api.getRootNode(),"ytp-hide-fullscreen-title");l.setAttribute("data-overlay-order","1");var y=this.api.X("delhi_modern_web_player_fullscreen_metadata_bottom");const k=y?3:1;y=y?"ytp-fullscreen-metadata-bottom":"ytp-fullscreen-metadata-top";g.zi(this.api.getRootNode(),
y);this.X("web_player_overlay_positioned_layout")?this.api.Sf(l,k):g.pi(this.api,l,4)}else g.ZM(this.api.getRootNode(),"ytp-hide-fullscreen-title"),g.ZM(this.api.getRootNode(),"ytp-fullscreen-metadata-bottom"),g.ZM(this.api.getRootNode(),"ytp-fullscreen-metadata-top");this.playerOverlayVideoDetailsRenderer=l;WB(this)}};var Top=class extends az{constructor(l){super(l);this.freePreviewWatchedDuration=null;this.freePreviewUsageDetails=[];this.events=new g.cI(l);g.x(this,this.events);this.events.j(l,"heartbeatRequest",y=>{if(this.freePreviewUsageDetails.length||this.freePreviewWatchedDuration!==null)y.heartbeatRequestParams||(y.heartbeatRequestParams={}),y.heartbeatRequestParams.unpluggedParams||(y.heartbeatRequestParams.unpluggedParams={}),this.freePreviewUsageDetails.length>0?y.heartbeatRequestParams.unpluggedParams.freePreviewUsageDetails=
this.freePreviewUsageDetails:y.heartbeatRequestParams.unpluggedParams.freePreviewWatchedDuration={seconds:`${this.freePreviewWatchedDuration}`}});
B(l,"setFreePreviewWatchedDuration",y=>{this.freePreviewWatchedDuration=y});
B(l,"setFreePreviewUsageDetails",y=>{this.freePreviewUsageDetails=y})}};var Vfp=class extends g.zP{constructor(l){super();this.features=[];var y=new Yht(l),k=new ye5(l),z=new R_1(l),r=new qyL(l);var Z=g.tL(l.O())?void 0:new ce5(l);var e=new v42(l),A=new MfR(l),Q=new xRv(l),t=new Jeg(l);var O=g.tL(l.O())?new Top(l):void 0;var d=l.O().getWebPlayerContextConfig()?.cinematicSettingsAvailable?new Gb5(l):void 0;var w=new TTq(l);var h=l.X("enable_courses_player_overlay_purchase")?new PFy(l):void 0;var U=g.xp(l.O())?new WNs(l):void 0;var u=new CFe(l);var W=l.O().V?new uMe(l):
void 0;var V=g.u9(l.O())?new bhg(l):void 0;var T=l.X("web_player_move_autonav_toggle")&&l.O().q_?new heC(l):void 0;var J=g.xp(l.O())?new sCw(l):void 0;var K=l.X("web_enable_speedmaster")&&g.xp(l.O())?new aBv(l):void 0;var Zg=l.O().pS?void 0:new C2B(l);var es=l.X("report_pml_debug_signal")?new ZhC(l):void 0;var fC=new Bqo(l),bQ=new kxw(l);var js=g.ow(l.O())?new e1e(l):void 0;var Nt=navigator.mediaSession&&window.MediaMetadata&&l.O().Wb?new LPO(l):void 0;var Ig=l.X("html5_enable_drc")&&!l.O().S?new Xgy(l):
void 0;var Ss=new reP(l);var bi=g.xp(l.O())?new tfR(l):void 0;var SD=new lBo(l);var X8=g.xp(l.O())&&l.X("web_sleep_timer")?new wOO(l):void 0;var Bc=g.u9(l.O())?new xa5(l):void 0;l.X("mweb_debug_sticky_settings");var wJ=new ORf(l);var Zy=new akq(l),e1=new FPO(l);var A6=l.X("enable_sabr_snackbar_message")?new h12(l):void 0;var C=l.X("web_enable_timely_actions")?new bRy(l):void 0;var wo=new ihC(l);var q5=l.O()?.getWebPlayerContextConfig()?.enableFullscreenComponentsFeature?new IBR(l):void 0;var bW=new mRo(l);
var R=l.X("web_player_loop_settings_menu")&&l.O().PV?new Nqe(l):void 0;var g5=g.tL(l.O())?void 0:new kbC(l);var M=new z1R(l),S=new Ohq(l),Wo=new HC2(l),II=new daC(l);var VZ=g.xp(l.O())&&l.O().X("delhi_modern_web_player")?new Uay(l):void 0;var pZ=l.O().N?void 0:new QJT(l);var ym=new iRO(l),PD=new mas(l);var IY=l.O().sA();IY=IY.Z.G7(fbT)||IY.Z.G7(En4)||IY.Z.G7(gne)?new uw1(l):void 0;var X=l.O().sA().Z.G7(g.Na5)?new ZR2(l):void 0;l=l.O().experiments.sA().Z.G7(szP)?new eeC(l):void 0;y=[y,k,z,r,Z,e,A,
Q,t,O,d,w,h,U,u,W,V,T,J,K,Zg,es,fC,bQ,js,void 0,Nt,Ig,Ss,void 0,bi,SD,X8,Bc,void 0,wJ,Zy,e1,void 0,A6,C,wo,q5,bW,void 0,R,void 0,g5,M,S,Wo,II,VZ,pZ,ym,PD,IY,void 0,X,l];for(const a of y)a&&this.features.push(a)}Vj(){for(let l=this.features.length-1;l>=0;l--)this.features[l].dispose();this.features.length=0;super.Vj()}};var P2R=class{constructor(){this.C=this.Z=NaN}reset(){this.Z=this.C=NaN}};var qGs=class{constructor(l,y){this.cG=l;this.timerName="";this.N=!1;this.C=NaN;this.V=new P2R;this.Z=y||null;this.N=!1}reset(){TX(this.timerName)}tick(l,y){Jt(l,y,this.timerName)}GJ(l){return gl(l,void 0,this.timerName)}j0(l){g.TH(l,void 0,this.timerName)}infoGel(l){g.YV(l,this.timerName)}};var O7g=class extends g.z1{constructor(l,y){super();this.Qj=l;this.startSeconds=0;this.shuffle=!1;this.index=0;this.title="";this.length=0;this.items=[];this.loaded=!1;this.sessionData=this.Z=null;this.dislikes=this.likes=this.views=0;this.order=[];this.author="";this.TV={};this.C=0;if(l=y.session_data)this.sessionData=Gp(l,"&");this.index=Math.max(0,Number(y.index)||0);this.loop=!!y.loop;this.startSeconds=Number(y.startSeconds)||0;this.title=y.playlist_title||"";this.description=y.playlist_description||
"";this.author=y.author||y.playlist_author||"";y.video_id&&(this.items[this.index]=y);if(l=y.api)typeof l==="string"&&l.length===16?y.list="PL"+l:y.playlist=l;if(l=y.list)switch(y.listType){case "user_uploads":this.listId=new zE("UU",`PLAYER_${l}`);break;default:var k=y.playlist_length;k&&(this.length=Number(k)||0);this.listId=rH(l);if(k=y.video)this.items=k.slice(0),this.loaded=!0}else if(y.playlist){l=y.playlist.toString().split(",");this.index>0&&(this.items=[]);for(k of l)k&&this.items.push({video_id:k});
this.length=this.items.length;if(k=y.video)this.items=k.slice(0),this.loaded=!0}this.setShuffle(!!y.shuffle);if(k=y.suggestedQuality)this.quality=k;this.TV=Bn(y,"playlist_");this.N=(y=y.thumbnail_ids)?y.split(","):[]}hasNext(l){return this.loop||!!l||this.index+1<this.length}hasPrevious(l){return this.loop||!!l||this.index-1>=0}setShuffle(l){this.shuffle=l;l=this.order&&this.order[this.index]!=null?this.order[this.index]:this.index;this.order=[];for(var y=0;y<this.items.length;y++)this.order.push(y);
this.index=l;this.C++;if(this.shuffle){l=this.order[this.index];for(y=1;y<this.order.length;y++){const k=Math.floor(Math.random()*(y+1)),z=this.order[y];this.order[y]=this.order[k];this.order[k]=z}for(y=0;y<this.order.length;y++)this.order[y]===l&&(this.index=y);this.C++}this.publish("shuffle")}uE(l){l=l||"hqdefault.jpg";const y=this.TV[l];if(y||this.Qj.Y||l==="sddefault.jpg"||l==="hq720.jpg"||l==="maxresdefault.jpg")return y;if(this.N.length)return qV(this.Qj,this.N[0],l)}findIndex(l){if(l&&(l=l.videoId,
!this.items[this.index]||this.items[this.index].video_id!==l))for(let y=0;y<this.items.length;y++)if(this.items[y].video_id===l){this.index=y;break}}onReady(l){this.Z=l;this.loaded&&g.JK(this.Z,0)}getPlaylistId(){return this.listId?this.listId.toString():null}A6(){return this.Qj.getVideoUrl(g.pJ(this).videoId,this.getPlaylistId())}Vj(){this.Z=null;g.kj(this.items);super.Vj()}};var gK=new Map;g.f1=class extends g.z1{constructor(l){super();this.loaded=!1;this.player=l}create(){}load(){this.loaded=!0}unload(){this.loaded=!1}ef(){}Xf(){return!0}Vj(){this.loaded&&this.unload();super.Vj()}Dp(){return{}}getOptions(){return[]}};var Jpf=class{constructor(){this.C=[];this.Z=[]}};g.jE=class extends g.zP{constructor(l){super();this.K_=l;this.Z=new Jpf;this.Ja=new Jpf;this.K=null;this.D=[];this.sj=[]}J(){}N(){}S(){return""}rW(l,y){if(this.K_.O().X("html5_dispatch_tracklist_loaded_event")){this.K&&(this.K.reject(),this.K=null);var k=[];this.K_.publish("trackListLoaded",this.Z,k,y);this.K_.O().X("enable_po_decoration_of_forced_tracks")&&this.K_.publish("trackListLoaded",this.Ja,k,y);k.length?(y=new g.OX,y.promise.then(l.rW,()=>{}),this.K=y,Promise.all(k).then(y.resolve,y.reject).finally(()=>
{this.K=null})):l.rW()}else l.rW()}Vj(){this.K&&(this.K.reject(),this.K=null);
this.N();super.Vj()}};g.jE.prototype.Y=yz(63);g.jE.prototype.V=yz(62);g.SE=class extends g.jE{constructor(l,y,k){super(l);this.videoData=y;this.audioTrack=k;this.C=null;this.A=!1;this.D=y.qn;this.sj=y.RQ;this.A=g.AI(y)}J(l){if(this.audioTrack){for(const y of this.audioTrack.captionTracks)g.fJ(this.Z,y);this.audioTrack.Z&&g.fJ(this.Ja,this.audioTrack.Z)}this.rW(l,this.videoData.videoId)}S(l,y){const k=l.wZ(),z={fmt:y};if(y==="srv3"||y==="3"||y==="json3")g.is()?Object.assign(z,{xorb:2,xobt:1,xovt:1}):Object.assign(z,{xorb:2,xobt:3,xovt:3});l.translationLanguage&&(z.tlang=
g.vn(l));this.A&&(z.xosf="1");Object.assign(z,this.K_.O().Z);return cq(k,z)}N(){this.C&&this.C.abort()}};g.SE.prototype.V=yz(61);g.YyR=new Map;g.n1=class extends g.jE{constructor(l,y,k,z,r,Z){super(l);this.videoId=k;this.r6=r;this.eventId=Z;this.C_={};this.C=null;l=z||g.MK(y).hl||"";l=l.split("_").join("-");this.A=cq(y,{hl:l})}J(l){let y=this.A;const k={type:"list",tlangs:1,v:this.videoId,vssids:1};this.r6&&(k.asrs=1);y=cq(y,k);this.N();this.C=g.o3(y,{format:"RAW",onSuccess:z=>{this.C=null;if((z=z.responseXML)&&z.firstChild){var r=z.getElementsByTagName("track");for(var Z=0;Z<r.length;Z++){var e=r[Z],A=e.getAttribute("lang_code");const Q=
e.getAttribute("lang_translated"),t=e.getAttribute("name"),O=e.getAttribute("kind"),d=e.getAttribute("id"),w=e.getAttribute("lang_default")==="true",h=e.getAttribute("cantran")==="true";e=e.getAttribute("vss_id");g.fJ(this.Z,new g.lg({languageCode:A,languageName:Q,name:t,kind:O,id:d,is_servable:!0,is_translateable:h,vss_id:e,is_default:w}))}z=z.getElementsByTagName("target");r=z.length;for(Z=0;Z<r;Z++)A={languageCode:z[Z].getAttribute("lang_code"),languageName:z[Z].getAttribute("lang_translated"),
languageOriginal:z[Z].getAttribute("lang_original"),id:z[Z].getAttribute("id"),isDefault:z[Z].getAttribute("lang_default")==="true"},this.C_[A.languageCode]=A.languageName,this.D.push(A)}this.rW(l,this.videoId)},
withCredentials:!0})}S(l,y){let k=this.A;y={v:this.videoId,type:"track",lang:l.languageCode,name:l.getName(),kind:l.kind,fmt:y};const z=this.K_.O();z.X("captions_url_add_ei")&&(y.ei=this.eventId);l.translationLanguage&&(y.tlang=g.vn(l));Object.assign(y,z.Z);return k=cq(k,y)}N(){this.C&&this.C.abort()}};g.n1.prototype.V=yz(60);var wuQ=class extends g.zP{constructor(l,y,k=""){super();this.L=l;this.K=y;this.V=k;this.Pv={};this.C={};this.N=null;this.S=new Set;this.A=new g.cI(this);this.d4={faa:()=>this.K,
dxd:()=>this.V};
this.C_=this.L.X("web_player_defer_modules");this.R4=new Map;g.x(this,this.A);this.A.j(l,"videodatachange",this.onVideoDataChange)}createSubtitlesModuleIfNeeded(){giC(this)&&vB(this,"captions");return!!g.FY(this)}hg(){return this.L.getVideoData().hg()}fR(){return this.L.getVideoData().fR()}D(){const l=this.R4.get("heartbeat");vB(this,"heartbeat",!1,!0,this.D);!l&&this.R4.has("heartbeat")&&this.L.publish("offlineslatestatechange")}Z(){vB(this,"annotations_module",!0,void 0,this.Z);const l=this.R4.get("annotations_module");
if(l)for(const y in this.N){if(!this.N.hasOwnProperty(y))continue;const k=y;l.subscribe(k,this.N[k])}}J(){if(!this.R4.get("ad"))try{HB(this)?vB(this,"ad",!1,!0,this.J):BB(this,"ad")}catch(l){BB(this,"ad"),g.n(l)}}SV(){return this.C}ER(){const l={},y=g.FY(this);y&&Object.assign(l,y.ER());return l}HE(l,y){Object.assign(this.C,l||null);Object.assign(this.Pv,y||null)}IJ(){if(g.aq(this.L.O()))return this.R4.get("unplugged")}onVideoDataChange(){const l=this.L.getVideoData();this.L.X("enable_wn_infocards")&&
l.pf()&&!g.ol(this)&&this.Z()}Vj(){super.Vj();yQ(this,1,!0);for(const [l,y]of Object.entries(sbq)){const k=l;this.S.has(y)&&gK.delete(k)}this.S.clear()}},sbq={ad:"ad.js",annotations_module:"annotations_module.js",asmjs:"asmjs.js",creatorendscreen:"annotations_module.js",embed:"embed.js",endscreen:"endscreen.js",heartbeat:"heartbeat.js",kids:"kids.js",remote:"remote.js",miniplayer:"miniplayer.js",offline:"offline.js",captions:"captions.js",unplugged:"unplugged.js",ux:"ux.js",webgl:"webgl.js",ypc:"ypc.js"},
oiQ={ad:["ad"],annotations_module:[],asmjs:[],creatorendscreen:[],embed:[],endscreen:[],heartbeat:["heartbeat"],kids:[],remote:["mdx"],miniplayer:[],offline:[],captions:[],unplugged:[],ux:[],webgl:["webgl"],ypc:[]},R0t="ad annotations_module asmjs creatorendscreen embed endscreen heartbeat kids remote miniplayer offline captions webgl ypc unplugged ux".split(" ");var pOR=class extends g.z1{constructor(l,y,k,z){super();this.target=l;this.api=y;this.Vy=k;this.C=0;this.S=!1;this.V=new g.jD(NaN,NaN);this.Z=new g.cI(this);this.Ja=this.N=this.K=null;g.x(this,this.Z);y=z?g.i_(this.api.O().experiments,"web_player_touch_idle_wait_time_ms",4E3):g.i_(this.api.O().experiments,"web_player_mouse_idle_wait_time_ms",3E3);this.D=new g.B_(()=>{zU(this,1,!1)},y,this);
g.x(this,this.D);this.C_=new g.B_(()=>{zU(this,2,!1)},y,this);
g.x(this,this.C_);this.Y=new g.B_(()=>{zU(this,2048,!1)},y,this);
g.x(this,this.Y);this.b0=new g.B_(()=>{zU(this,512,!1)},y,this);
g.x(this,this.b0);this.RR=3E3;z||(this.N=this.Z.j(l,"mouseover",this.uT),this.Z.j(l,"mousemove",this.rb),this.Z.j(l,"mouseleave",this.gb));this.api.X("web_player_enable_fullscreen_grid_components")&&this.Z.j(l,"wheel",this.xz,this,!0);Nj?this.Z.j(l,"keypress",this.mK):this.Z.j(l,"focusin",this.Xr);this.J=this.Z.j(l,"mousedown",this.sj);this.A=this.Z.j(l,"touchstart",this.HG,void 0,!0);zU(this,640,!0)}rb(l){l=new g.jD(l.pageX,l.pageY);if(!nK(l,this.V)){let y=2;this.S&&(y|=8);this.V=l;zU(this,y,!0)}}xz(){zU(this,
2048,!0)}gb(l){this.S&&zU(this,8,!0);if(this.api.X("allow_autohide_on_paused_videos")){l=l.relatedTarget;var y=this.target instanceof HTMLElement?this.target:this.target.element;if(l instanceof Element&&(y=y.getBoundingClientRect(),l=l.getBoundingClientRect(),l.top>=y.top&&l.right<=y.right&&l.bottom<=y.bottom&&l.left>=y.left))return}zU(this,2,!1)}uT(l){const y=new g.jD(l.pageX,l.pageY);nK(y,this.V)||(this.V=y,(l=l.target)&&this.Vy(l)&&(zU(this,4,!0),this.Z.uq(this.N),this.N=this.Z.j(this.target,"mouseover",
this.IC),this.K=this.Z.j(this.target,"mouseout",this.IC)))}IC(l){l=l.relatedTarget;l&&this.Vy(l)||(this.V=new g.jD(NaN,NaN),ld5(this))}mK(){zU(this,1,!0)}Xr(l){l=l.target;l instanceof Element&&!(l.tabIndex>0)||zU(this,1,!0)}sj(){this.S=!0;this.Z.uq(this.J);this.J=this.Z.j(document,"mouseup",this.u0)}u0(){this.S=!1;zU(this,8,!1);this.Z.uq(this.J);this.J=this.Z.j(this.target,"mousedown",this.sj)}HG(l){if(l=(l=l.changedTouches)&&l[0])this.Ja=l.identifier,this.Z.uq(this.A),this.A=this.Z.j(this.target,
"touchend",this.PG,void 0,!0),zU(this,1024,!0)}PG(l){let y;if(l=l.changedTouches)for(let k=0;k<l.length;k++){const z=l[k];if(z.identifier===this.Ja){y=z;break}}y&&(this.Z.uq(this.A),this.A=this.Z.j(this.target,"touchstart",this.HG,void 0,!0),zU(this,1024,!1))}T6(){zU(this,2,!0)}resize(){g.Mx&&ld5(this)}toString(){return super.toString()}};g.Kv2=class extends g.H{constructor(l){super({U:"button",L_:["ytp-large-play-button","ytp-button"],G:{"aria-label":"Ph\u00e1t",title:"Ph\u00e1t"},W:["{{largePlayButtonChildren}}"]});this.api=l;this.j(l,"videodatachange",this.Aa);this.j(l,"basechromeinitialized",this.N);l=this.api.O();l.K&&$1&&(this.listen("click",this.Z,this),this.listen("touchstart",this.C,this));g.U9(l)&&g.zi(this.element,"ytp-large-play-button-red-bg");this.api.createClientVe(this.element,this,28572);this.Aa()}N(){this.Aa()}Aa(){const l=
this.api.getVideoData();var y=this.api.O();const k=!!this.api.isEmbedsShortsMode();g.I(this.element,"ytp-shorts-mode",k);k?y=[{U:"svg",G:{fill:"none",height:"100%",viewBox:"0 0 87 115",width:"100%"},W:[{U:"path",G:{"clip-rule":"evenodd",d:"M83.99 10.81C90.08 21.24 86.62 34.66 76.26 40.79L69.05 45.06L74.17 47.38C81.58 50.74 86.52 57.99 86.96 66.17C87.40 74.34 83.27 82.09 76.26 86.24L32.76 111.97C22.41 118.10 9.08 114.61 3.00 104.18C-3.08 93.75 .37 80.33 10.73 74.20L17.94 69.93L12.82 67.61C5.41 64.25 .47 57.00 .03 48.82C-0.40 40.65 3.72 32.90 10.73 28.75L54.23 3.02C64.58 -3.10 77.91 .38 83.99 10.81Z",
fill:"#f00","fill-rule":"evenodd"}},{U:"path",G:{"clip-rule":"evenodd",d:"M33 74L33 41L61 57.5L33 74Z",fill:"white","fill-rule":"evenodd"}}]}]:l.Wn?y=[{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 60 60",width:"100%"},W:[{U:"path",B:"ytp-dni-large-play-button-bg",G:{d:"M30,0A30,30,0,1,0,60,30,30,30,0,0,0,30,0Z",fill:"#1f1f1f"}},{U:"path",G:{d:"M21,41.65V18L43.7,29.85Z",fill:"#fff"}}]}]:l.Wn&&l.bN?y=[{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 68 48",width:"100%"},W:[{U:"path",B:"ytp-dni-large-play-button-bg",
G:{d:"M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z",fill:"#212121","fill-opacity":"0.8"}},{U:"path",G:{d:"M 45,24 27,14 27,34",fill:"#fff"}}]}]:y.S?(g.I(this.element,"ytp-touch-device",y.C),y=[y.S?{U:"svg",G:{height:"100%",version:"1.1",
viewBox:"0 0 60 60",width:"100%"},W:[{U:"path",B:"ytp-large-play-button-bg",G:{d:"M30,0A30,30,0,1,0,60,30,30,30,0,0,0,30,0Z",fill:"#1f1f1f"}},{U:"path",G:{d:"M21,41.65V18L43.7,29.85Z",fill:"#fff"}}]}:{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 68 48",width:"100%"},W:[{U:"path",B:"ytp-large-play-button-bg",G:{d:"M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z",
fill:"#212121","fill-opacity":"0.8"}},{U:"path",G:{d:"M 45,24 27,14 27,34",fill:"#fff"}}]}]):y=[{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 68 48",width:"100%"},W:[{U:"path",B:"ytp-large-play-button-bg",G:{d:"M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z",
fill:"#f03"}},{U:"path",G:{d:"M 45,24 27,14 27,34",fill:"#fff"}}]}];this.updateValue("largePlayButtonChildren",y);l.Wn&&l.bN&&this.qd("ytp-dni-large-play-button-bg").setAttribute("fill",l.bN?l.bN:"#1f1f1f")}show(){super.show();this.api.O().X("embeds_web_enable_lite_experiment_control_arm_logging")&&this.api.logVisibility(this.element,!0)}Z(){this.api.getVideoData().mutedAutoplay||(this.api.RC(),this.api.playVideo())}C(l){this.api.getVideoData().mutedAutoplay||l.preventDefault()}};g.g2L=class extends g.H{constructor(l){var y=["ytp-cued-thumbnail-overlay"];l.O().S&&y.push("ytp-exp-contain-thumbnail");super({U:"div",L_:y,W:[{U:"div",B:"ytp-cued-thumbnail-overlay-image"}]});y=this.qd("ytp-cued-thumbnail-overlay");const k=new g.Kv2(l);g.x(this,k);k.Uj(y);this.C=new g.cI(this);g.x(this,this.C);this.api=l;this.J=this.qd("ytp-cued-thumbnail-overlay-image");this.N=k;this.fade=new g.oT(this,250);g.x(this,this.fade);this.Z=new g.B_(this.Aa,0,this);g.x(this,this.Z);this.Aa();this.j(l,
"appresize",this.TE);this.j(l,"presentingplayerstatechange",this.onStateChange);this.j(l,"ypcStateChanged",this.V);XC(l.O())&&this.j(l,"videoplayerreset",this.onReset)}show(){this.VM||(this.C.j(this.api,"videodatachange",()=>{this.Z.Kl()}),this.C.j(this.api,"videoplayerreset",()=>{this.Z.Kl()}));
super.show()}hide(){this.C&&this.C.C();super.hide()}TE(){this.Z.Kl()}onStateChange(){this.Z.Kl()}V(){this.Z.Kl()}onReset(){this.fade.stop();this.hide();this.Z.Kl()}Aa(){const l=this.api.getPlayerStateObject();if(this.api.getPresentingPlayerType()===3&&(l.isPlaying()||l.isPaused()))var y=!0;else(y=this.api.r4().R4.get("ypc"))&&y.NE?y=!0:(y=this.api.O(),y=l.Z(2)&&g.T3(this.api)&&y.I4?!0:!1);y?(y=!0,this.N.hide()):(this.N.show(),y=l.isCued()&&this.api.getPresentingPlayerType()!==2||l.Z(2)&&!g.T3(this.api)&&
!this.api.pU()||l.Z(1024)?!0:!1);const k=this.api.getVideoData();y&&!k.Qq?(this.fade.show(),y1y(this,this.api.getPlaylist(),k)):(this.fade.hide(),l.Z(1)||this.fade.stop())}};var zsg;
g.E2f=class extends g.H{constructor(l){super({U:"div",L_:["ytp-error"],G:{role:"alert"},W:[{U:"div",B:"ytp-error-content",W:[{U:"div",B:"ytp-error-icon-container",W:[{U:"svg",G:{fill:"#fff",viewBox:"0 0 48 48"},W:[{U:"path",G:{d:"M0 0h48v48H0V0z",fill:"none"}},{U:"path",G:{d:"M22 30h4v4h-4zm0-16h4v12h-4zm1.99-10C12.94 4 4 12.95 4 24s8.94 20 19.99 20S44 35.05 44 24 35.04 4 23.99 4zM24 40c-8.84 0-16-7.16-16-16S15.16 8 24 8s16 7.16 16 16-7.16 16-16 16z","fill-opacity":"0.7"}}]}]},{U:"div",B:"ytp-error-content-wrap",W:[{U:"div",
B:"ytp-error-content-wrap-reason",Nd:"{{content}}"},{U:"div",B:"ytp-error-content-wrap-subreason",Nd:"{{subreason}}"}]}]}]});this.api=l;this.keys=[];this.N=!1;l.createClientVe(this.element,this,216103);this.api.logVisibility(this.element,this.VM)}resize(){}C(l){this.N=!1;kZz(this);var y=l.W_,k=this.api.O();y!=="GENERIC_WITHOUT_LINK"||k.S?y==="TOO_MANY_REQUESTS"?(k=this.api.getVideoData(),this.setContent(Z0(this,"TOO_MANY_REQUESTS_WITH_LINK",k.A6(),void 0,void 0,void 0,!1))):y!=="HTML5_NO_AVAILABLE_FORMATS_FALLBACK"||
k.S?this.api.O().X("html5_enable_bandaid_error_screen")&&y==="HTML5_SPS_UMP_STATUS_REJECTED"&&!k.S?(k=k.hostLanguage,l="//support.google.com/youtube?p=videoError",k&&(l=g.UI(l,{hl:k})),this.setContent(Z0(this,"HTML5_SPS_UMP_STATUS_REJECTED",l))):this.api.O().X("enable_adb_handling_in_sabr")&&y==="BROWSER_OR_EXTENSION_ERROR"&&!k.S?(k=k.hostLanguage,l="//support.google.com/youtube/answer/3037019#zippy=%2Cupdate-your-browser-and-check-your-extensions",k&&(l=g.UI(l,{hl:k})),this.setContent(Z0(this,"BROWSER_OR_EXTENSION_ERROR",
l))):this.setContent(g.ep(l.errorMessage)):this.setContent(Z0(this,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK_WITH_LINK_SHORT","//www.youtube.com/supported_browsers")):(l=k.hostLanguage,y="//support.google.com/youtube/?p=player_error1",l&&(y=g.UI(y,{hl:l})),this.setContent(Z0(this,"GENERIC_WITH_LINK_AND_CPN",y,!0)),k.g4&&!k.V&&r1q(this,z=>{if(g.Bl(z,this.api,!Wn(this.api.O()))){const r={as3:!1,html5:!0,player:!0,cpn:this.api.getVideoData().clientPlaybackNonce};z=this.api;g.M1(z,"onFeedbackArticleRequest",
{articleId:3037019,helpContext:"player_error",productData:r});z.isFullscreen()&&z.toggleFullscreen()}}));
if(this.N){const z=this.qd("ytp-error-link");z&&(this.api.createClientVe(z,this,216104),this.api.logVisibility(z,!0),r1q(this,()=>{this.api.logClick(z)}))}}};
zsg=/<a\s+href=["']([^"']+)["'](?:\s+target=["']([^"']+)["'])?>([^<>]+)<\/a>/;var fBf=class extends g.H{constructor(l){super({U:"div",L_:["ytp-overlays-container"],W:[{U:"div",B:"ytp-overlay-top-left"},{U:"div",B:"ytp-overlay-top-right"},{U:"div",B:"ytp-overlay-bottom-left"},{U:"div",B:"ytp-overlay-bottom-right"}]});this.N=this.qd("ytp-overlay-top-left");this.V=this.qd("ytp-overlay-top-right");this.Z=this.qd("ytp-overlay-bottom-left");this.C=this.qd("ytp-overlay-bottom-right");g.pi(l,this.element,4)}Sf(l,y,k=!1){switch(y){case 1:A8(this,l,this.N,k);break;case 2:A8(this,l,this.V,
k);break;case 3:A8(this,l,this.Z,k);break;case 4:A8(this,l,this.C,k)}}};var je2=class extends g.H{constructor(l){super({U:"div",B:"ytp-paid-content-overlay",G:{"aria-live":"assertive","aria-atomic":"true",["data-overlay-order"]:"5"}});this.L=l;this.videoId=null;this.V=!1;this.innertubeCommand=this.fp=this.Z=null;const y=l.O();y.experiments.sA().Z.G7(UFy)?(this.C=new g.B_(()=>{this.Bn()},5E3,this),g.x(this,this.C)):this.C=null;
l.X("enable_new_paid_product_placement")&&!g.JA(y)?(this.N=new g.H({U:"a",B:"ytp-paid-content-overlay-link",G:{href:"{{href}}",target:"_blank"},W:[{U:"div",B:"ytp-paid-content-overlay-indicator"},{U:"div",B:"ytp-paid-content-overlay-icon",Nd:"{{icon}}"},{U:"div",B:"ytp-paid-content-overlay-text",Nd:"{{text}}"},{U:"div",B:"ytp-paid-content-overlay-chevron",Nd:"{{chevron}}"}]}),this.j(this.N.element,"click",this.onClick)):this.N=new g.H({U:"div",L_:["ytp-button","ytp-paid-content-overlay-text"],Nd:"{{text}}"});
this.fade=new g.oT(this.N,250,!1,100);g.x(this,this.N);this.N.Uj(this.element);g.x(this,this.fade);this.L.createServerVe(this.element,this);this.j(l,"videodatachange",this.onVideoDataChange);this.j(l,"presentingplayerstatechange",this.J)}onClick(l){this.innertubeCommand?(g.G3(this.L,"innertubeCommand",this.innertubeCommand),l.preventDefault()):g.Bl(l,this.L,!0);this.L.logClick(this.element)}onVideoDataChange(l,y){this.C&&l==="newdata"&&this.C.stop();esz(this,y);this.fp&&A1g(this,this.fp)}J(l){const y=
this.L.getVideoData();this.videoId!==y.videoId&&esz(this,y);this.Z&&A1g(this,l.state);this.fp=l.state}Bn(){this.fade.show();this.Z?.start();this.L.publish("paidcontentoverlayvisibilitychange",!0);this.L.logVisibility(this.element,!0)}Xv(){this.fade.hide();this.L.publish("paidcontentoverlayvisibilitychange",!1);this.L.logVisibility(this.element,!1)}};var Syo=class extends g.H{constructor(l){super({U:"div",B:"ytp-spinner",W:[DK(),{U:"div",B:"ytp-spinner-message",Nd:"N\u1ebfu ph\u00e1t l\u1ea1i kh\u00f4ng b\u1eaft \u0111\u1ea7u ngay, h\u00e3y th\u1eed kh\u1edfi \u0111\u1ed9ng l\u1ea1i thi\u1ebft b\u1ecb c\u1ee7a b\u1ea1n."}]});this.api=l;this.message=this.qd("ytp-spinner-message");this.Z=new g.B_(this.show,500,this);g.x(this,this.Z);this.j(l,"presentingplayerstatechange",this.onStateChange);this.j(l,"playbackstalledatstart",this.C);this.IU(l.getPlayerStateObject())}hide(){this.Z.stop();
this.message.style.display="none";super.hide()}onStateChange(l){this.IU(l.state)}IU(l){(l.Z(128)||this.api.s3()||this.api.X("web_watch_enable_multiview_manager")&&this.api.getVideoData()?.RY()?0:l.Z(16)||l.Z(1))?this.Z.start():this.hide()}C(){this.message.style.display="block"}};var n2y=class extends sD{constructor(l){const y=[{U:"div",L_:["ytp-unmute-icon"],W:[l.O().experiments.z7("delhi_modern_web_player_icons")?{U:"svg",G:{height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",B:"ytp-svg-fill",G:{d:"M11.60 2.08L11.48 2.14L3.91 6.68C3.02 7.21 2.28 7.97 1.77 8.87C1.26 9.77 1.00 10.79 1 11.83V12.16L1.01 12.56C1.07 13.52 1.37 14.46 1.87 15.29C2.38 16.12 3.08 16.81 3.91 17.31L11.48 21.85C11.63 21.94 11.80 21.99 11.98 21.99C12.16 22.00 12.33 21.95 12.49 21.87C12.64 21.78 12.77 21.65 12.86 21.50C12.95 21.35 13 21.17 13 21V3C12.99 2.83 12.95 2.67 12.87 2.52C12.80 2.37 12.68 2.25 12.54 2.16C12.41 2.07 12.25 2.01 12.08 2.00C11.92 1.98 11.75 2.01 11.60 2.08ZM4.94 8.4V8.40L11 4.76V19.23L4.94 15.6C4.38 15.26 3.92 14.80 3.58 14.25C3.24 13.70 3.05 13.07 3.00 12.43L3 12.17V11.83C2.99 11.14 3.17 10.46 3.51 9.86C3.85 9.25 4.34 8.75 4.94 8.4ZM21.29 8.29L19 10.58L16.70 8.29L16.63 8.22C16.43 8.07 16.19 7.99 15.95 8.00C15.70 8.01 15.47 8.12 15.29 8.29C15.12 8.47 15.01 8.70 15.00 8.95C14.99 9.19 15.07 9.43 15.22 9.63L15.29 9.70L17.58 12L15.29 14.29C15.19 14.38 15.12 14.49 15.06 14.61C15.01 14.73 14.98 14.87 14.98 15.00C14.98 15.13 15.01 15.26 15.06 15.39C15.11 15.51 15.18 15.62 15.28 15.71C15.37 15.81 15.48 15.88 15.60 15.93C15.73 15.98 15.86 16.01 15.99 16.01C16.12 16.01 16.26 15.98 16.38 15.93C16.50 15.87 16.61 15.80 16.70 15.70L19 13.41L21.29 15.70L21.36 15.77C21.56 15.93 21.80 16.01 22.05 15.99C22.29 15.98 22.53 15.88 22.70 15.70C22.88 15.53 22.98 15.29 22.99 15.05C23.00 14.80 22.93 14.56 22.77 14.36L22.70 14.29L20.41 12L22.70 9.70C22.80 9.61 22.87 9.50 22.93 9.38C22.98 9.26 23.01 9.12 23.01 8.99C23.01 8.86 22.98 8.73 22.93 8.60C22.88 8.48 22.81 8.37 22.71 8.28C22.62 8.18 22.51 8.11 22.39 8.06C22.26 8.01 22.13 7.98 22.00 7.98C21.87 7.98 21.73 8.01 21.61 8.06C21.49 8.12 21.38 8.19 21.29 8.29Z"}}]}:
{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"m 21.48,17.98 c 0,-1.77 -1.02,-3.29 -2.5,-4.03 v 2.21 l 2.45,2.45 c .03,-0.2 .05,-0.41 .05,-0.63 z m 2.5,0 c 0,.94 -0.2,1.82 -0.54,2.64 l 1.51,1.51 c .66,-1.24 1.03,-2.65 1.03,-4.15 0,-4.28 -2.99,-7.86 -7,-8.76 v 2.05 c 2.89,.86 5,3.54 5,6.71 z M 9.25,8.98 l -1.27,1.26 4.72,4.73 H 7.98 v 6 H 11.98 l 5,5 v -6.73 l 4.25,4.25 c -0.67,.52 -1.42,.93 -2.25,1.18 v 2.06 c 1.38,-0.31 2.63,-0.95 3.69,-1.81 l 2.04,2.05 1.27,-1.27 -9,-9 -7.72,-7.72 z m 7.72,.99 -2.09,2.08 2.09,2.09 V 9.98 z"}}]}]},
{U:"div",L_:["ytp-unmute-text"],Nd:"Nh\u1ea5n \u0111\u1ec3 b\u1eadt ti\u1ebfng"}];y.push({U:"div",L_:["ytp-unmute-box"],W:[]});super(l,{U:"button",L_:["ytp-unmute","ytp-popup","ytp-button","ytp-unmute-animated","ytp-unmute-shrink"],W:[{U:"div",B:"ytp-unmute-inner",W:y}]},100);this.Z=this.clicked=!1;this.api=l;this.api.createClientVe(this.element,this,51663);this.j(l,"onMutedAutoplayChange",this.onMutedAutoplayChange,this);this.j(l,"presentingplayerstatechange",this.ea);this.listen("click",this.onClick,
this);l=l.isMutedByMutedAutoplay()&&!g.u9(this.api.O());this.fP(l);l&&$wz(this);this.C=l}onMutedAutoplayChange(l){this.C&&(l?($wz(this),this.Bn()):(this.Z&&this.logClick(),this.Xv()))}ea(l){this.api.isMutedByMutedAutoplay()&&l.tj(2)&&this.Xv()}onClick(){this.api.unMute();this.logClick()}logClick(){this.clicked||(this.clicked=!0,this.api.logClick(this.element))}};g.TF=class extends g.cI{constructor(l){super();this.api=l;this.o3=!1;this.MH=null;this.mD=!1;this.v1=null;this.B_=this.jA=!1;this.GH=this.d7=null;this.A_=NaN;this.OB=this.Dz=!1;this.FA=0;this.T5=[];this.J9=!1;this.f5={height:0,width:0};this.hZ=480;this.rd=["ytp-player-content","html5-endscreen","ytp-overlay"];this.XV={kO:!1};this.Gc=null;const y=l.O(),k=l.Yz();this.f5=l.getPlayerSize();this.oG=new g.B_(this.EL,0,this);g.x(this,this.oG);y.disableOrganicUi||(this.wM=new g.g2L(l),g.x(this,this.wM),g.pi(l,
this.wM.element,4));this.api.X("web_player_overlay_positioned_layout")&&(this.Gc=new fBf(this.api),g.x(this,this.Gc));if(QFT(this)){var z=new Syo(l);g.x(this,z);z=z.element;g.pi(l,z,4)}var r=l.getVideoData();this.fg=new pOR(k,l,Z=>this.Vy(Z),y.hk);
g.x(this,this.fg);this.fg.subscribe("autohideupdate",this.Ko,this);this.api.X("web_player_default_autohide")||k1(this.fg);if(!y.disablePaidContentOverlay){const Z=new je2(l);g.x(this,Z);this.Gc?this.Gc.Sf(Z.element,g.JA(y)?3:1):g.pi(l,Z.element,4)}this.WJ=new n2y(l);g.x(this,this.WJ);g.pi(this.api,this.WJ.element,2);this.s8=this.api.isMutedByMutedAutoplay();this.j(l,"onMutedAutoplayChange",this.onMutedAutoplayChange);this.x$=new g.B_(this.yc,200,this);g.x(this,this.x$);this.Ry=r.videoId;this.m3=new g.B_(()=>
{this.FA=0},350);
g.x(this,this.m3);this.Bv=new g.B_(()=>{this.OB||t8(this)},350,this);
g.x(this,this.Bv);r=l.getRootNode();r.setAttribute("aria-label","Tr\u00ecnh ph\u00e1t video YouTube");switch(y.color){case "white":g.zi(r,"ytp-color-white")}this.j(l,"appresize",this.TE);this.j(l,"presentingplayerstatechange",this.ea);this.j(l,"videodatachange",this.onVideoDataChange);this.j(l,"videoplayerreset",this.k9);this.j(l,"autonavvisibility",()=>{this.YN()});
this.j(l,"sizestylechange",()=>{this.YN()});
this.j(k,"click",this.jH,this);this.j(k,"dblclick",this.Fi,this);this.j(k,"mousedown",this.di,this);y.Oj&&(this.j(k,"gesturechange",this.Ot,this),this.j(k,"gestureend",this.GF,this));this.ib=[k.Sp];this.wM&&this.ib.push(this.wM.element);z&&this.ib.push(z);this.api.X("web_player_fullscreen_double_click_ve")&&(this.api.createClientVe(k.element,this,247482),this.api.logVisibility(k.element,!0))}init(){const l=this.api,y=l.getPlayerStateObject();this.f5=l.getPlayerSize();this.e2(y);this.YN();this.TE();
this.api.publish("basechromeinitialized",this);this.iU()&&this.api.publish("standardControlsInitialized")}onVideoDataChange(l,y){var k=this.Ry!==y.videoId;if(k||l==="newdata")l=this.api,l.isFullscreen()||(this.f5=l.getPlayerSize());k&&(this.Ry=y.videoId,k=this.fg,k.RR=3E3,zU(k,512,!0),this.YN());this.api.X("web_render_jump_buttons")&&y.showSeekingControls&&(this.hZ=572)}k9(){this.onVideoDataChange("newdata",this.api.getVideoData())}Rn(){const l=this.api.Jb()&&this.api.TB(),y=this.api.Td();return this.mD||
l||this.s8||y}TN(){const l=!this.Rn();g.I(this.api.getRootNode(),"ytp-menu-shown",!l)}Vy(l){try{if(!g.cf(this.api.getRootNode(),l))return!1}catch(y){return!1}for(;l&&!u4(l);)l=l===this.api.getRootNode()?null:l.parentElement||null;return!!l}Ko(l){const y=this.api.getRootNode();g.I(y,"ytp-autohide",l);g.I(y,"ytp-autohide-active",!0);this.oG.start(l?250:100);l&&(this.jA=!1,g.ZM(y,"ytp-touch-mode"));this.B_=!l;this.api.Hk(!l);this.api.X("web_player_enable_fullscreen_grid_components")&&this.api.publish("autohideupdate",
l)}EL(){const l=this.api.getRootNode();g.I(l,"ytp-autohide-active",!1)}zF(){this.OB=!0}kc(l){if(this.api.O().X("player_doubletap_to_seek")||this.api.O().K)this.OB=!1,this.GH&&this.uq(this.GH),this.FA===0&&OD(this,l)?(this.NR(),this.Bv.start(),this.GH=this.j(this.api.Yz(),"touchmove",this.zF,void 0,!0)):this.Bv.stop();O8_(this)&&OD(this,l)&&!this.api.O().K&&t8(this,l);var y=this.WJ.aH();if(!g.u9(this.api.O())&&vu&&d6(this,l))y&&l.preventDefault();else if(this.jA=!0,g.zi(this.api.getRootNode(),"ytp-touch-mode"),
this.fg.T6(),this.api.O().X("player_doubletap_to_seek")||this.api.O().K)if(y=this.api.getPlayerStateObject(),!(!this.api.wq()||y.Z(2)&&g.T3(this.api)||y.Z(64))){y=Date.now()-this.A_;this.FA+=1;if(y<=350){if(QQ(this,l))return;this.Dz=!0;y=this.api.getPlayerSize().width/3;var k=this.api.getRootNode().getBoundingClientRect();const z=l.targetTouches[0].clientX-k.left;k=l.targetTouches[0].clientY-k.top;const r=(this.FA-1)*10;z>0&&z<y?(this.YH(-1,z,k,r),this.api.seekBy(-10*this.api.getPlaybackRate())):
z>y*2&&z<y*3&&(this.YH(1,z,k,r),this.api.seekBy(10*this.api.getPlaybackRate()));l.preventDefault()}else $1&&this.api.O().K&&OD(this,l)&&l.preventDefault();this.A_=Date.now();this.m3.start()}}di(){this.XV.kO=!1;this.api.publish("rootnodemousedown",this.XV)}jH(l){if(this.api.O().X("web_fix_fine_scrubbing_false_play")){if(d6(this,l)||this.XV.kO)return}else if(this.XV.kO||d6(this,l))return;O8_(this)||!OD(this,l)||this.Bv.isActive()||(t8(this,l),l.preventDefault());this.Dz&&(this.Dz=!1)}NR(){}Ch(){}YH(){}renderChapterSeekingAnimation(){}yc(){const l=
this.api.getPlayerStateObject();l.Z(2)&&g.T3(this.api)||(l.isOrWillBePlaying()?this.api.pauseVideo():(this.wM&&(l.isCued()||l.Z(1024))&&this.api.publish("largeplaybuttonclicked",this.wM.N.element),this.api.RC(),this.api.playVideo(),this.wM&&document.activeElement===this.wM.N.element&&(this.iU()?.R7()||this.api.getRootNode().focus())))}Fi(l){QQ(this,l)||!l.target||tlg(this,kF(l))||((this.api.O().X("player_doubletap_to_seek")||this.api.O().K)&&this.Dz?this.Dz=!1:dwC(this))}dc(l){String(l).includes("fullscreen error")?
g.WH(l):g.n(l)}Ot(l){wYe(this,.3,l.scale);l.preventDefault()}GF(l){wYe(this,.1,l.scale)}TE(){const l=this.api.Yz().getPlayerSize(),y=this.api.getRootNode(),k=l.width>=650,z=l.width<528;this.fg.resize();if(this.api.X("web_player_use_screen_width_for_big_mode")){const r=l.width>=(g.i_(this.api.O().experiments,"web_player_big_mode_screen_width_cutoff")??2E3);g.I(y,"ytp-big-mode",r)}g.I(y,"ytp-fullscreen",this.api.isFullscreen());g.I(y,"ytp-large-width-mode",k);this.api.X("delhi_modern_web_player")?g.I(y,
"ytp-xsmall-width-mode",z):g.I(y,"ytp-small-mode",this.xw());g.I(y,"ytp-tiny-mode",this.tK());g.I(y,"ytp-big-mode",this.qV());this.v1&&this.v1.resize(l)}ea(l){this.e2(l.state);this.YN()}IA(){var l=!!this.Ry&&!this.api.pg()&&!this.J9,y=this.api.getPresentingPlayerType()===2,k=this.api.O();if(y)return k=nJ(this.api.r4()),l&&(k&&k.player?l=(l=k.player.getVideoData({playerType:2}))?l.isListed&&!g.tL(k.player.O()):!1:(EP("showInfoBarDuringAd: this is null"),l=!1)),l;y=k.X("web_player_imax_theater_mode")&&
this.api.yR()&&!this.api.isInline();return l&&(k.Mg||y||this.api.isFullscreen()||k.pS)}YN(){const l=this.IA();this.MH!==l&&(this.MH=l,g.I(this.api.getRootNode(),"ytp-hide-info-bar",!l))}e2(l){const y=l.isCued()||this.api.pJ()&&this.api.getPresentingPlayerType()!==3;y!==this.isCued&&(this.isCued=y,this.d7&&this.uq(this.d7),this.d7=this.j(this.api.Yz(),"touchstart",this.kc,void 0,y));var k=this.fg,z=l.isPlaying()&&!l.Z(32)||this.api.Vk();zU(k,128,!z);k=this.fg;z=this.api.getPresentingPlayerType()===
3;zU(k,256,z);k=this.api.getRootNode();l.Z(2)?z=[bb.ENDED]:(z=[],l.Z(8)?z.push(bb.PLAYING):l.Z(4)&&z.push(bb.PAUSED),l.Z(1)&&!l.Z(32)&&z.push(bb.BUFFERING),l.Z(32)&&z.push(bb.SEEKING),l.Z(64)&&z.push(bb.UNSTARTED));g.u2(this.T5,z)||(g.eM(k,this.T5),this.T5=z,g.rx(k,z));z=this.api.O();const r=l.Z(2);a:{var Z=this.api.O();const e=Z.controlsType;switch(e){case "2":case "0":Z=!1;break a}Z=e==="3"&&!l.Z(2)||this.isCued||(this.api.getPresentingPlayerType()!==2?0:MZ(nJ(this.api.r4())))||this.api.Td()||g.u9(Z)&&
this.api.getPresentingPlayerType()===2?!1:!0}g.I(k,"ytp-hide-controls",!Z);g.I(k,"ytp-native-controls",z.controlsType==="3"&&!y&&!r&&!this.s8);l.Z(128)&&!g.u9(z)?(this.v1||(this.v1=new g.E2f(this.api),g.x(this,this.v1),g.pi(this.api,this.v1.element,4)),this.v1.C(l.Ip),this.v1.show()):this.v1&&(this.v1.dispose(),this.v1=null)}u4(){return this.api.Jb()&&this.api.TB()?(this.api.Ni(!1,!1),!0):this.api.pg()?(g.Io(this.api,!0),!0):!1}onMutedAutoplayChange(l){this.s8=l;this.TN()}qV(){return!1}xw(){return!this.qV()&&
(this.api.getPlayerSize().width<this.hZ||this.api.getPlayerSize().height<290)}tK(){return this.xw()&&(this.api.getPlayerSize().width<240||this.api.getPlayerSize().height<140)}IH(){return this.jA}Kf(){return null}XG(){return null}rz(){const l=this.api.Yz().getPlayerSize();return new g.f9(0,0,l.width,l.height)}handleGlobalKeyDown(){return!1}handleGlobalKeyUp(){return!1}O_(){}showControls(l){l!==void 0&&this.api.Yz().Hk(l)}T6(){}iU(){return null}};g.TF.prototype.JA=yz(6);g.Fv2=class extends g.H{constructor(l){super({U:"div",W:[{U:"div",B:"ytp-bezel-text-wrapper",W:[{U:"div",B:"ytp-bezel-text",Nd:"{{title}}"}]},{U:"div",B:"ytp-bezel",G:{role:"status","aria-label":"{{label}}"},W:[{U:"div",B:"ytp-bezel-icon",Nd:"{{icon}}"}]}]});this.L=l;this.C=new g.B_(this.show,10,this);l=this.L.X("delhi_modern_web_player")?1E3:500;this.Z=new g.B_(this.hide,l,this);g.x(this,this.C);g.x(this,this.Z);this.hide()}show(){super.show();this.Z.Kl()}hide(){this.C.stop();super.hide()}Ch(l){var y=
this.L.X("delhi_modern_web_player_icons");l?this.L.getPlayerStateObject().Z(64)||(y=y?cW():Xh(),w6(this,y,"Ph\u00e1t")):(l=this.L.getVideoData(),l.isLivePlayback&&!l.allowLiveDvr?(y=y?Bhy():vjT(),w6(this,y,"D\u1eebng ph\u00e1t")):(y=y?njg():Sse(),w6(this,y,"T\u1ea1m d\u1eebng")))}};var o2L=class extends g.H{constructor(l,y){super({U:"button",L_:["ytp-button","ytp-cards-button"],G:{"aria-label":"Hi\u1ec3n th\u1ecb th\u1ebb","aria-owns":"iv-drawer","aria-haspopup":"true","data-tooltip-opaque":String(g.u9(l.O()))},W:[{U:"span",B:"ytp-cards-button-icon-default",W:[{U:"div",B:"ytp-cards-button-icon",W:[l.O().X("player_new_info_card_format")?Ys_():{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"M18,8 C12.47,8 8,12.47 8,18 C8,23.52 12.47,28 18,28 C23.52,28 28,23.52 28,18 C28,12.47 23.52,8 18,8 L18,8 Z M17,16 L19,16 L19,24 L17,24 L17,16 Z M17,12 L19,12 L19,14 L17,14 L17,12 Z"}}]}]},
{U:"div",B:"ytp-cards-button-title",Nd:"Th\u00f4ng tin"}]},{U:"span",B:"ytp-cards-button-icon-shopping",W:[{U:"div",B:"ytp-cards-button-icon",W:[{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",B:"ytp-svg-shadow",G:{d:"M 27.99,18 A 9.99,9.99 0 1 1 8.00,18 9.99,9.99 0 1 1 27.99,18 z"}},{U:"path",B:"ytp-svg-fill",G:{d:"M 18,8 C 12.47,8 8,12.47 8,18 8,23.52 12.47,28 18,28 23.52,28 28,23.52 28,18 28,12.47 23.52,8 18,8 z m -4.68,4 4.53,0 c .35,0 .70,.14 .93,.37 l 5.84,5.84 c .23,.23 .37,.58 .37,.93 0,.35 -0.13,.67 -0.37,.90 L 20.06,24.62 C 19.82,24.86 19.51,25 19.15,25 c -0.35,0 -0.70,-0.14 -0.93,-0.37 L 12.37,18.78 C 12.13,18.54 12,18.20 12,17.84 L 12,13.31 C 12,12.59 12.59,12 13.31,12 z m .96,1.31 c -0.53,0 -0.96,.42 -0.96,.96 0,.53 .42,.96 .96,.96 .53,0 .96,-0.42 .96,-0.96 0,-0.53 -0.42,-0.96 -0.96,-0.96 z",
"fill-opacity":"1"}},{U:"path",B:"ytp-svg-shadow-fill",G:{d:"M 24.61,18.22 18.76,12.37 C 18.53,12.14 18.20,12 17.85,12 H 13.30 C 12.58,12 12,12.58 12,13.30 V 17.85 c 0,.35 .14,.68 .38,.92 l 5.84,5.85 c .23,.23 .55,.37 .91,.37 .35,0 .68,-0.14 .91,-0.38 L 24.61,20.06 C 24.85,19.83 25,19.50 25,19.15 25,18.79 24.85,18.46 24.61,18.22 z M 14.27,15.25 c -0.53,0 -0.97,-0.43 -0.97,-0.97 0,-0.53 .43,-0.97 .97,-0.97 .53,0 .97,.43 .97,.97 0,.53 -0.43,.97 -0.97,.97 z",fill:"#000","fill-opacity":"0.15"}}]}]},{U:"div",
B:"ytp-cards-button-title",Nd:"Mua s\u1eafm"}]}]});this.L=l;this.C=y;this.Z=null;this.fade=new g.oT(this,250,!0,100);g.x(this,this.fade);g.I(this.C,"ytp-show-cards-title",g.u9(l.O()));this.hide();this.listen("click",this.onClicked);this.listen("mouseover",this.onHover);this.We(!0)}We(l){l?this.Z=q1(this.L,this.element,null):(this.Z=this.Z,this.Z(),this.Z=null)}Bn(){this.L.O().X("player_new_info_card_format")&&g.ka(this.L.getRootNode(),"ytp-cards-teaser-shown")&&!g.u9(this.L.O())||(this.fade.show(),
g.yD("iv-button-shown"))}Xv(){g.yD("iv-button-hidden");this.fade.hide()}aH(){return this.VM&&this.fade.state!==4}Vj(){this.Z&&this.Z();super.Vj()}onHover(){g.yD("iv-button-mouseover")}onClicked(l){this.L.Jb();const y=g.ka(this.L.getRootNode(),"ytp-cards-teaser-shown");g.yD("iv-teaser-clicked",y);this.L.getVideoData()?.I4()?(l=this.L.getVideoData()?.pf(),l?.onIconTapCommand&&g.G3(this.L,"innertubeCommand",l.onIconTapCommand)):(l=l.screenX===0&&l.screenY===0,this.L.Ni(!this.L.TB(),l,"YOUTUBE_DRAWER_MANUAL_OPEN"))}};var Noe=class extends g.H{constructor(l,y){super({U:"div",B:"ytp-cards-teaser",W:[{U:"div",B:"ytp-cards-teaser-box"},{U:"div",B:"ytp-cards-teaser-text",W:l.O().X("player_new_info_card_format")?[{U:"button",B:"ytp-cards-teaser-info-icon",G:{"aria-label":"Hi\u1ec3n th\u1ecb th\u1ebb","aria-haspopup":"true"},W:[Ys_()]},{U:"img",B:"ytp-cards-teaser-channel-avatar",G:{alt:"","aria-hidden":"true"}},{U:"span",B:"ytp-cards-teaser-label",Nd:"{{text}}"},{U:"button",B:"ytp-cards-teaser-close-button",G:{"aria-label":"\u0110o\u0301ng"},
W:[g.wM()]}]:[{U:"span",B:"ytp-cards-teaser-label",Nd:"{{text}}"}]}]});this.L=l;this.m$=y;this.fade=new g.oT(this,250,!1,250);this.Z=null;this.K=new g.B_(this.u0,300,this);this.S=new g.B_(this.rb,2E3,this);this.V=[];this.N=null;this.b0=new g.B_(()=>{this.element.style.margin="0"},250);
this.onClickCommand=this.C=null;g.x(this,this.fade);g.x(this,this.K);g.x(this,this.S);g.x(this,this.b0);l.O().X("player_new_info_card_format")?(g.zi(l.getRootNode(),"ytp-cards-teaser-dismissible"),this.j(this.qd("ytp-cards-teaser-close-button"),"click",this.Ja),this.j(this.qd("ytp-cards-teaser-info-icon"),"click",this.A),this.j(this.qd("ytp-cards-teaser-label"),"click",this.A)):this.listen("click",this.A);this.j(y.element,"mouseover",this.Y);this.j(y.element,"mouseout",this.D);this.j(l,"cardsteasershow",
this.PG);this.j(l,"cardsteaserhide",this.Xv);this.j(l,"cardstatechange",this.sj);this.j(l,"presentingplayerstatechange",this.sj);this.j(l,"appresize",this.J);this.j(l,"onShowControls",this.J);this.j(l,"onHideControls",this.RR);this.listen("mouseenter",this.HG)}sj(){this.L.Jb()&&this.L.TB()&&this.aH()&&this.Xv()}A(){this.Xv();!this.L.Jb()&&this.L.O().X("enable_error_corrections_infocards_icon_web")&&this.m$.Xv();g.yD("iv-teaser-clicked",this.Z!=null);this.onClickCommand?g.G3(this.L,"innertubeCommand",
this.onClickCommand):this.L.getVideoData()?.I4()||this.L.Ni(!0,!1,"YOUTUBE_DRAWER_MANUAL_OPEN")}HG(){g.yD("iv-teaser-mouseover");this.Z&&this.Z.stop()}PG(l){this.L.O().X("player_new_info_card_format")&&!g.u9(this.L.O())?this.m$.Xv():this.L.O().X("enable_error_corrections_infocards_icon_web")&&this.m$.Bn();this.Z||!l||this.L.TB()||this.N&&this.N.isActive()||(this.Bn(l),g.yD("iv-teaser-shown"))}Bn(l){this.onClickCommand=l.onClickCommand;this.updateValue("text",l.teaserText);this.element.setAttribute("dir",
g.aS(l.teaserText));this.fade.show();if(this.L.O().X("player_new_info_card_format")){const y=this.qd("ytp-cards-teaser-info-icon"),k=this.qd("ytp-cards-teaser-channel-avatar");k&&l.Lh&&g.cJ(l.Lh)&&(k.src=l.Lh,k.style.display="block",y.style.display="none")}this.N=new g.B_(function(){g.zi(this.L.getRootNode(),"ytp-cards-teaser-shown");this.L.X("player_new_info_card_format")&&!g.u9(this.L.O())&&this.m$.Xv();this.J()},0,this);
this.N.start();this.m$.We(!1);this.Z=new g.B_(this.Xv,580+l.durationMs,this);this.Z.start();this.V.push(this.listen("mouseover",this.Y,this));this.V.push(this.listen("mouseout",this.D,this))}J(){if(!this.L.O().X("player_new_info_card_format")&&g.u9(this.L.O())&&this.VM){const l=this.m$.element.offsetLeft,y=g.rt("ytp-cards-button-icon"),k=this.L.isFullscreen()?54:36;if(y){const z=l+y.offsetLeft;this.element.style.marginRight=this.m$.element.offsetParent.offsetWidth-l-y.offsetLeft-k+"px";this.element.style.marginLeft=
z+"px"}}}RR(){g.u9(this.L.O())&&this.L.xw()&&this.VM&&this.b0.start()}Y(){this.S.stop();this.Z&&this.Z.isActive()&&this.K.start()}D(){this.K.stop();this.Z&&!this.Z.isActive()&&this.S.start()}u0(){this.Z&&this.Z.stop()}rb(){this.Xv()}Ja(){this.Xv()}Xv(){!this.Z||this.C&&this.C.isActive()||(g.yD("iv-teaser-hidden"),this.fade.hide(),g.ZM(this.L.getRootNode(),"ytp-cards-teaser-shown"),this.C=new g.B_(function(){for(const l of this.V)this.uq(l);this.V=[];this.Z&&(this.Z.dispose(),this.Z=null);this.m$.We(!0);
!this.L.Jb()&&this.L.O().X("enable_error_corrections_infocards_icon_web")&&this.m$.Xv()},330,this),this.C.start())}aH(){return this.VM&&this.fade.state!==4}Vj(){const l=this.L.getRootNode();
l&&g.ZM(l,"ytp-cards-teaser-shown");g.kj(this.N,this.C,this.Z);super.Vj()}};var GU={BUTTON:"ytp-button",TITLE_NOTIFICATIONS:"ytp-title-notifications",TITLE_NOTIFICATIONS_ON:"ytp-title-notifications-on",TITLE_NOTIFICATIONS_OFF:"ytp-title-notifications-off",NOTIFICATIONS_ENABLED:"ytp-notifications-enabled"},b85=class extends g.H{constructor(l){super({U:"button",L_:[GU.BUTTON,GU.TITLE_NOTIFICATIONS],G:{"aria-pressed":"{{pressed}}","aria-label":"{{label}}"},W:[{U:"div",B:GU.TITLE_NOTIFICATIONS_ON,G:{title:"D\u1eebng nh\u1eadn th\u00f4ng b\u00e1o v\u1ec1 m\u1ed7i video m\u1edbi",
"aria-label":"Th\u00f4ng b\u00e1o v\u1ec1 c\u00e1c k\u00eanh \u0111\u00e3 \u0111\u0103ng k\u00fd"},W:[g.fcC()]},{U:"div",B:GU.TITLE_NOTIFICATIONS_OFF,G:{title:"Nh\u1eadn th\u00f4ng b\u00e1o v\u1ec1 m\u1ed7i video m\u1edbi","aria-label":"Th\u00f4ng b\u00e1o v\u1ec1 c\u00e1c k\u00eanh \u0111\u00e3 \u0111\u0103ng k\u00fd"},W:[{U:"svg",G:{fill:"#fff",height:"24px",viewBox:"0 0 24 24",width:"24px"},W:[{U:"path",G:{d:"M18 11c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2v-5zm-6 11c.14 0 .27-.01.4-.04.65-.14 1.18-.58 1.44-1.18.1-.24.15-.5.15-.78h-4c.01 1.1.9 2 2.01 2z"}}]}]}]});
this.api=l;this.Z=!1;l.createClientVe(this.element,this,36927);this.listen("click",this.onClick,this);this.updateValue("pressed",!1);this.updateValue("label","Nh\u1eadn th\u00f4ng b\u00e1o v\u1ec1 m\u1ed7i video m\u1edbi")}onClick(){this.api.logClick(this.element);const l=!this.Z;this.updateValue("label",l?"D\u1eebng nh\u1eadn th\u00f4ng b\u00e1o v\u1ec1 m\u1ed7i video m\u1edbi":"Nh\u1eadn th\u00f4ng b\u00e1o v\u1ec1 m\u1ed7i video m\u1edbi");this.updateValue("pressed",l);adg(this,l)}};g.iQ("yt.pubsub.publish",g.yD);g.UD=class extends g.H{constructor(l,y,k,z,r,Z,e,A,Q,t,O,d){l=l.charAt(0)+l.substring(1).toLowerCase();k=k.charAt(0)+k.substring(1).toLowerCase();if(y==="0"||y==="-1")y=null;if(z==="0"||z==="-1")z=null;const w=O.O(),h=w.userDisplayName&&g.U9(w);super({U:"div",L_:["ytp-button","ytp-sb"],W:[{U:"div",B:"ytp-sb-subscribe",G:h?{title:O.O().X("player_tooltip_data_title_killswitch")?g.Ts("\u0110\u0103ng k\u00fd v\u1edbi t\u00ean $USER_NAME",{USER_NAME:w.userDisplayName}):"","data-tooltip-title":g.Ts("\u0110\u0103ng k\u00fd v\u1edbi t\u00ean $USER_NAME",
{USER_NAME:w.userDisplayName}),"aria-label":"\u0110\u0103ng k\u00fd k\u00eanh","data-tooltip-image":gk(w),"data-tooltip-opaque":String(g.u9(w)),tabindex:"0",role:"button"}:{"aria-label":"\u0110\u0103ng k\u00fd k\u00eanh"},W:[{U:"div",B:"ytp-sb-text",W:[{U:"div",B:"ytp-sb-icon"},l]},y?{U:"div",B:"ytp-sb-count",Nd:y}:""]},{U:"div",B:"ytp-sb-unsubscribe",G:h?{title:O.X("player_tooltip_data_title_killswitch")?g.Ts("\u0110\u00e3 \u0111\u0103ng k\u00fd l\u00e0 $USER_NAME",{USER_NAME:w.userDisplayName}):
"","data-tooltip-title":g.Ts("\u0110\u00e3 \u0111\u0103ng k\u00fd l\u00e0 $USER_NAME",{USER_NAME:w.userDisplayName}),"aria-label":"H\u1ee7y \u0111\u0103ng k\u00fd k\u00eanh","data-tooltip-image":gk(w),"data-tooltip-opaque":String(g.u9(w)),tabindex:"0",role:"button"}:{"aria-label":"H\u1ee7y \u0111\u0103ng k\u00fd k\u00eanh"},W:[{U:"div",B:"ytp-sb-text",W:[{U:"div",B:"ytp-sb-icon"},k]},z?{U:"div",B:"ytp-sb-count",Nd:z}:""]}],G:{"aria-live":"polite"}});this.channelId=e;this.L=O;this.N=d;const U=this.qd("ytp-sb-subscribe"),
u=this.qd("ytp-sb-unsubscribe");Z&&g.zi(this.element,"ytp-sb-classic");if(r){A?this.Z():this.C();var W=()=>{if(w.sj){var T=this.channelId;if(Q||t){var J={c:T};var K;g.Oa.isInitialized()&&(K=KRC(J));J=K||"";if(K=O.getVideoData())if(K=K.subscribeCommand){var Zg=O.gW();Zg?(ji(Zg,K,{botguardResponse:J,feature:Q}),g.G3(O,"SUBSCRIBE",T)):g.n(Error("No innertube service available when updating subscriptions."))}else g.n(Error("No subscribe command in videoData."));else g.n(Error("No video data available when updating subscription."))}u.focus();
u.removeAttribute("aria-hidden");U.setAttribute("aria-hidden","true")}else aX(g.mc(this.L.O()),"sb_button",this.V)},V=()=>{var T=this.channelId;
if(Q||t){var J=O.getVideoData();ji(O.gW(),J.unsubscribeCommand,{feature:Q});g.G3(O,"UNSUBSCRIBE",T)}U.focus();U.removeAttribute("aria-hidden");u.setAttribute("aria-hidden","true")};
this.j(U,"click",W);this.j(u,"click",V);this.j(U,"keypress",T=>{T.keyCode===13&&W(T)});
this.j(u,"keypress",T=>{T.keyCode===13&&V(T)});
this.j(O,"SUBSCRIBE",this.Z);this.j(O,"UNSUBSCRIBE",this.C);this.N&&h&&(n0Q(O),q1(O,U,this),q1(O,u,this))}else g.zi(U,"ytp-sb-disabled"),g.zi(u,"ytp-sb-disabled")}V(){window.location.reload()}Z(){g.zi(this.element,"ytp-sb-subscribed")}C(){g.ZM(this.element,"ytp-sb-subscribed")}};var seB=class extends g.H{constructor(l){super({U:"div",B:"ytp-title-channel",W:[{U:"div",B:"ytp-title-beacon"},{U:"a",B:"ytp-title-channel-logo",G:{href:"{{channelLink}}",target:l.O().D,role:"link","aria-label":"{{channelLogoLabel}}",tabIndex:"0"}},{U:"div",B:"ytp-title-expanded-overlay",G:{"aria-hidden":"{{flyoutUnfocusable}}"},W:[{U:"div",B:"ytp-title-expanded-heading",W:[{U:"div",B:"ytp-title-expanded-title",W:[{U:"a",Nd:"{{expandedTitle}}",G:{href:"{{channelTitleLink}}",target:l.O().D,"aria-hidden":"{{shouldHideExpandedTitleForA11y}}",
tabIndex:"{{channelTitleFocusable}}"}}]},{U:"div",B:"ytp-title-expanded-subtitle",Nd:"{{expandedSubtitle}}",G:{"aria-hidden":"{{shouldHideExpandedSubtitleForA11y}}"}}]}]}]});this.api=l;this.channel=this.qd("ytp-title-channel");this.C=this.qd("ytp-title-channel-logo");this.channelName=this.qd("ytp-title-expanded-title");this.A=this.qd("ytp-title-expanded-overlay");this.N=this.Z=this.subscribeButton=null;this.V=!1;l.createClientVe(this.C,this,36925);l.createClientVe(this.channelName,this,37220);g.u9(this.api.O())&&
c1C(this);this.j(l,"videodatachange",this.Aa);this.j(l,"videoplayerreset",this.Aa);this.j(this.channelName,"click",y=>{this.api.logClick(this.channelName);g.kv(window,iC(this));y.preventDefault()});
this.j(this.C,"click",this.Y);this.Aa()}Y(l){this.api.logClick(this.C);const y=this.api.O();y.C||y.u0?CBP(this)&&(this.isExpanded()?this.J():this.S()):g.kv(window,iC(this));l.preventDefault()}K(){XYy(this);this.channel.classList.remove("ytp-title-expanded")}isExpanded(){return this.channel.classList.contains("ytp-title-expanded")}S(){if(CBP(this)&&!this.isExpanded()){this.updateValue("flyoutUnfocusable","false");this.updateValue("channelTitleFocusable","0");this.updateValue("shouldHideExpandedTitleForA11y",
"false");this.updateValue("shouldHideExpandedSubtitleForA11y","false");this.N&&this.N.stop();this.api.logVisibility(this.channelName,!0);this.subscribeButton&&(this.subscribeButton.show(),this.api.logVisibility(this.subscribeButton.element,!0));const l=this.api.getVideoData();this.Z&&l.ji&&l.subscribed&&(this.Z.show(),this.api.logVisibility(this.Z.element,!0));this.channel.classList.add("ytp-title-expanded");this.channel.classList.add("ytp-title-show-expanded")}}J(){this.updateValue("flyoutUnfocusable",
"true");this.updateValue("channelTitleFocusable","-1");this.updateValue("shouldHideExpandedTitleForA11y","true");this.updateValue("shouldHideExpandedSubtitleForA11y","true");this.N&&this.N.start()}Aa(){const l=this.api.O();this.fP(!this.api.isEmbedsShortsMode());const y=this.api.getVideoData(),k=this.api.O(),z=this.api.getVideoData();this.V=!1;const r=!!z.videoId&&!!z.u0&&!!z.profilePicture;this.api.getPresentingPlayerType()===2?this.V=r&&!!z.isListed&&!!z.author:g.u9(k)&&(this.V=r&&!z.Wn&&!k.N&&
!(k.K&&this.api.getPlayerSize().width<200));uQy(this,y.profilePicture,g.u9(l)?y.expandedTitle:y.author);this.subscribeButton&&(this.subscribeButton.channelId=y.Fu);this.updateValue("expandedTitle",y.expandedTitle);this.updateValue("expandedSubtitle",y.expandedSubtitle)}Cl(l){super.Cl(l);this.api.logVisibility(this.C,this.V&&l)}};var FB=class extends g.ZE{constructor(l){super(g.ni({"aria-haspopup":"true"}),l);this.listen("keydown",this.xF)}xF(l){l.defaultPrevented||l.keyCode!==39||(this.element.click(),l.preventDefault())}};var Lv1=class extends g.H{show(){super.show();this.element.tabIndex=0;this.element.focus();this.updateValue("userInfoFocusable","0");this.updateValue("userInfoFocusable2","0")}hide(){super.hide();this.updateValue("userInfoFocusable","-1");this.updateValue("userInfoFocusable2","-1")}constructor(l,y){super({U:"div",B:"ytp-user-info-panel",G:{"aria-label":"Th\u00f4ng tin c\u1ee7a ng\u01b0\u1eddi d\u00f9ng"},W:l.O().sj?[{U:"div",B:"ytp-user-info-panel-icon",Nd:"{{icon}}"},{U:"div",B:"ytp-user-info-panel-content",
W:[{U:"div",B:"ytp-user-info-panel-info",G:{tabIndex:"{{userInfoFocusable}}",role:"text"},Nd:"{{watchingAsUsername}}"},{U:"div",B:"ytp-user-info-panel-info",G:{tabIndex:"{{userInfoFocusable2}}",role:"text"},Nd:"{{watchingAsEmail}}"}]}]:[{U:"div",B:"ytp-user-info-panel-icon",Nd:"{{icon}}"},{U:"div",B:"ytp-user-info-panel-content",W:[{U:"div",W:[{U:"text",G:{tabIndex:"{{userInfoFocusable}}"},Nd:"\u0110\u00e3 \u0111\u0103ng xu\u1ea5t"}]},{U:"div",B:"ytp-user-info-panel-login",W:[{U:"a",G:{tabIndex:"{{userInfoFocusable2}}",
role:"button"},Nd:l.O().MW?"":"\u0110\u0103ng nh\u1eadp tr\u00ean YouTube"}]}]}]});this.K_=l;this.sourceElement=y;l.O().sj||l.O().MW||this.j(this.qd("ytp-user-info-panel-login"),"click",this.C);this.closeButton=new g.H({U:"button",L_:["ytp-collapse","ytp-button"],G:{title:"\u0110o\u0301ng"},W:[g.uM()]});this.closeButton.Uj(this.element);g.x(this,this.closeButton);this.j(window,"blur",this.hide);this.j(document,"click",this.Z);this.Aa()}Z(l){const y=kF(l),k=g.cf(this.closeButton.element,y),z=g.cf(this.element,
y);l=this.sourceElement&&g.cf(this.sourceElement,y)&&g.ne(l);y&&(z||l)&&!k||this.hide()}C(){aX(g.mc(this.K_.O()),"user_info_panel",()=>{window.location.reload()})}Aa(){const l=this.K_.O(),y={USER_NAME:l.userDisplayName,
USER_EMAIL:l.Um};this.updateValue("icon",Fu_());this.updateValue("watchingAsUsername",g.Ts("Xem v\u1edbi t\u00ean l\u00e0 $USER_NAME",y));l.Um?this.updateValue("watchingAsEmail",g.Ts("($USER_EMAIL)",y)):this.updateValue("watchingAsEmail","")}};var v2e=class extends g.Jc{constructor(l,y,k){super(l);this.eN=y;this.Lp=k;this.getVideoUrl=new FB(6);this.c7=new FB(5);this.kh=new FB(4);this.Dp=new FB(3);this.AO=new g.ZE(g.ni({href:"{{href}}",target:this.L.O().D},void 0,!0),2,"Kh\u1eafc ph\u1ee5c s\u1ef1 c\u1ed1 ph\u00e1t l\u1ea1i");this.showVideoInfo=new g.ZE(g.ni(),1,"Th\u1ed1ng k\u00ea chi ti\u1ebft");this.RX=new g.kD({U:"div",L_:["ytp-copytext","ytp-no-contextmenu"],G:{draggable:"false",tabindex:"1"},Nd:"{{text}}"});this.iL=new PE(this.L,this.RX);
this.xY=this.OT=null;g.u9(this.L.O())&&(this.closeButton=new g.H({U:"button",L_:["ytp-collapse","ytp-button"],G:{title:"\u0110o\u0301ng"},W:[g.uM()]}),g.x(this,this.closeButton),this.closeButton.Uj(this.element),this.closeButton.listen("click",this.IS,this));g.u9(this.L.O())&&(this.xq=new g.ZE(g.ni(),10,"T\u00e0i kho\u1ea3n"),g.x(this,this.xq),this.tv(this.xq,!0),this.xq.listen("click",this.Yc,this),l.createClientVe(this.xq.element,this.xq,137682));this.L.O().PV&&(this.uG=new iz("V\u00f2ng l\u1eb7p",
9),g.x(this,this.uG),this.tv(this.uG,!0),this.uG.listen("click",this.x9,this),l.createClientVe(this.uG.element,this.uG,28661));this.L.X("web_player_miniplayer_in_context_menu")&&(this.WB=new g.ZE(g.ni(),8,"Tr\u00ecnh ph\u00e1t thu nh\u1ecf"),g.x(this,this.WB),this.tv(this.WB,!0),this.WB.listen("click",this.Fs,this),l.createClientVe(this.WB.element,this.WB,62946));this.L.X("web_watch_pip_context_menu_button")&&this.L.O().showMiniplayerButton&&(this.lT=new g.ZE(g.ni(),7,"H\u00ecnh trong h\u00ecnh"),
g.x(this,this.lT),this.tv(this.lT,!0),this.lT.listen("click",this.GL,this),l.createClientVe(this.lT.element,this.lT,194442));g.x(this,this.getVideoUrl);this.tv(this.getVideoUrl,!0);this.getVideoUrl.listen("click",this.B3,this);l.createClientVe(this.getVideoUrl.element,this.getVideoUrl,28659);g.x(this,this.c7);this.tv(this.c7,!0);this.c7.listen("click",this.yz,this);l.createClientVe(this.c7.element,this.c7,28660);g.x(this,this.kh);this.tv(this.kh,!0);this.kh.listen("click",this.mB,this);l.createClientVe(this.kh.element,
this.kh,28658);g.x(this,this.Dp);this.tv(this.Dp,!0);this.Dp.listen("click",this.KH,this);g.x(this,this.AO);this.tv(this.AO,!0);this.AO.listen("click",this.xc,this);g.x(this,this.showVideoInfo);this.tv(this.showVideoInfo,!0);this.showVideoInfo.listen("click",this.cY,this);g.x(this,this.RX);this.RX.listen("click",this.EO,this);g.x(this,this.iL);xw4()&&(this.OT=new g.H({U:"textarea",B:"ytp-html5-clipboard",G:{readonly:"",tabindex:"-1"}}),g.x(this,this.OT),this.OT.Uj(this.element));this.xq?.setIcon(Fu_());
this.uG?.setIcon(Lug());this.WB?.setIcon(this.L.X("delhi_modern_web_player_icons")?gjg():Mf());this.lT?.setIcon(Mf());this.Dp.setIcon({U:"svg",G:{height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{"clip-rule":"evenodd",d:"M20 10V8H17.19C16.74 7.22 16.12 6.54 15.37 6.04L17 4.41L15.59 3L13.42 5.17C13.39 5.16 13.37 5.16 13.34 5.16C13.18 5.12 13.02 5.1 12.85 5.07C12.79 5.06 12.74 5.05 12.68 5.04C12.46 5.02 12.23 5 12 5C11.51 5 11.03 5.07 10.58 5.18L10.6 5.17L8.41 3L7 4.41L8.62 6.04H8.63C7.88 6.54 7.26 7.22 6.81 8H4V10H6.09C6.03 10.33 6 10.66 6 11V12H4V14H6V15C6 15.34 6.04 15.67 6.09 16H4V18H6.81C7.85 19.79 9.78 21 12 21C14.22 21 16.15 19.79 17.19 18H20V16H17.91C17.96 15.67 18 15.34 18 15V14H20V12H18V11C18 10.66 17.96 10.33 17.91 10H20ZM16 15C16 17.21 14.21 19 12 19C9.79 19 8 17.21 8 15V11C8 8.79 9.79 7 12 7C14.21 7 16 8.79 16 11V15ZM10 14H14V16H10V14ZM10 10H14V12H10V10Z",
fill:"white","fill-rule":"evenodd"}}]});this.AO.setIcon(G1());this.showVideoInfo.setIcon(Jqe());this.j(l,"onLoopChange",this.onLoopChange);this.j(l,"videodatachange",this.onVideoDataChange);this.j(l,"fullscreentoggled",()=>{XG(this)});
this.j(l,"minimized",()=>{XG(this);this.lT?.fP(!this.L.isMinimized()&&this.L.O().showMiniplayerButton)});
mwq(this);qFt(this,this.L.getVideoData())}IS(){this.eN.Xv()}EO(){lo(this.RX.element)}KH(){cA(this,this.L.getDebugText(!0))&&w6(this.Lp,t4())}mB(){cA(this,this.L.getVideoEmbedCode())&&w6(this.Lp,Th5());this.L.logClick(this.kh.element)}B3(){cA(this,this.L.getVideoUrl(!0,!0))&&w6(this.Lp,aw());this.L.logClick(this.getVideoUrl.element)}yz(){cA(this,this.L.getVideoUrl(!1,!0))&&w6(this.Lp,aw());this.L.logClick(this.c7.element)}onLoopChange(l){this.uG?.Z(l)}x9(){this.L.setLoopVideo(this.uG.getValue());this.eN.Xv();
this.L.logClick(this.uG.element)}Fs(){g.G3(this.L,"onCollapseMiniplayer");this.eN.Xv()}GL(){g.G3(this.L,"onCollapseMiniplayer",!0);this.eN.Xv()}xc(l){this.L.reportPlaybackIssue();if(g.Bl(l,this.L,!Wn(this.L.O()))){l=this.L;const y=l.app.getFeedbackProductData();g.M1(l,"onFeedbackStartRequest",y);l.isFullscreen()&&l.toggleFullscreen()}this.eN.Xv()}cY(){g.UB(this.L,"isVideoInfoVisible",[])?g.UB(this.L,"hideVideoInfo",[]):g.UB(this.L,"showVideoInfo",[]);this.eN.Xv()}Yc(){this.xq&&(this.xY||(this.xY=
new Lv1(this.L,this.xq.element),g.x(this,this.xY),g.pi(this.L,this.xY.element,4)),this.xY.show(),this.eN.Xv(),this.L.logClick(this.xq.element))}onVideoDataChange(l,y){qFt(this,y)}Cl(l){super.Cl(l);this.L.logVisibility(this.kh.element,l);this.L.logVisibility(this.getVideoUrl.element,l);this.L.logVisibility(this.c7.element,l);this.uG&&this.L.logVisibility(this.uG.element,l);this.xq&&this.L.logVisibility(this.xq.element,l);this.WB&&this.L.logVisibility(this.WB.element,l)}};var BoR=class extends g.Yn{constructor(l,y){super(l);this.Lp=y;this.C=new g.cI(this);this.K=new g.B_(this.Xr,1E3,this);this.b0=this.aU=null;g.x(this,this.C);g.x(this,this.K);y=this.L.O();l.createClientVe(this.element,this,28656);g.zi(this.element,"ytp-contextmenu");this.L.O().experiments.z7("delhi_modern_web_player")&&g.xp(y)&&g.zi(this.element,"ytp-delhi-modern-contextmenu");Id4(this);this.hide()}onTouchStart(l){const y=kF(l);y&&(mM(y,"a")||mM(y,null,"ytp-no-contextmenu"))||this.VM||(this.b0=(l=
l.touches?.item(0))?new g.jD(l.clientX,l.clientY):new g.jD(0,0),this.K.start())}Y(){this.K.stop()}Xr(){this.open(this.b0)}D(){if(this.aU&&WsP(this.aU)){const l=WsP(this.aU).element;l.tabIndex=-1;l.focus()}else this.element.tabIndex=-1,this.element.focus()}show(){this.aU||(this.aU=new v2e(this.L,this,this.Lp),g.x(this,this.aU),g.rK(this,this.aU));this.aU.onLoopChange(this.L.getLoopVideo());super.show();this.L.logVisibility(this.element,!0);this.aU.Cl(!0)}hide(){Id4(this);super.hide();this.L.logVisibility(this.element,
!1);this.aU&&this.aU.Cl(!1)}RR(l){const y=kF(l);this.VM||y&&(mM(y,"a")||mM(y,null,"ytp-no-contextmenu"))||(l.preventDefault(),this.open(new g.jD(l.pageX,l.pageY)))}Bn(l){if(l){const y=l.getBoundingClientRect();this.open(new g.jD(y.x,y.y))}super.Bn(l)}open(l){TGy(this);var y=this.L.getVideoData();g.I(this.element,"ytp-dni",y.Wn);this.element.style.left="";this.element.style.top="";l.x++;l.y++;super.Bn();var k=jS(this).body;y=new p9(0,Infinity,Infinity,0);var z=Dl(k);for(var r=z.Z.body,Z=z.Z.documentElement,
e=$g(z.Z);k=Bqq(k);)if((!g.tV||k.clientHeight!=0||k!=r)&&k!=r&&k!=Z&&vf(k,"overflow")!="visible"){const A=g.Dj(k),Q=new g.jD(k.clientLeft,k.clientTop);A.x+=Q.x;A.y+=Q.y;y.top=Math.max(y.top,A.y);y.right=Math.min(y.right,A.x+k.clientWidth);y.bottom=Math.min(y.bottom,A.y+k.clientHeight);y.left=Math.max(y.left,A.x)}r=e.scrollLeft;e=e.scrollTop;y.left=Math.max(y.left,r);y.top=Math.max(y.top,e);z=AV(z.Z.defaultView||window);y.right=Math.min(y.right,r+z.width);y.bottom=Math.min(y.bottom,e+z.height);z=y.top>=
0&&y.left>=0&&y.bottom>y.top&&y.right>y.left?y:null;y=this.size;l=l.clone();y=y.clone();z&&(e=y,r=5,(r&65)==65&&(l.x<z.left||l.x>=z.right)&&(r&=-2),(r&132)==132&&(l.y<z.top||l.y>=z.bottom)&&(r&=-5),l.x<z.left&&r&1&&(l.x=z.left),r&16&&(Z=l.x,l.x<z.left&&(l.x=z.left),l.x+e.width>z.right&&(e.width=Math.min(z.right-l.x,Z+e.width-z.left),e.width=Math.max(e.width,0))),l.x+e.width>z.right&&r&1&&(l.x=Math.max(z.right-e.width,z.left)),l.y<z.top&&r&4&&(l.y=z.top),r&32&&(Z=l.y,l.y<z.top&&(l.y=z.top),l.y+e.height>
z.bottom&&(e.height=Math.min(z.bottom-l.y,Z+e.height-z.top),e.height=Math.max(e.height,0))),l.y+e.height>z.bottom&&r&4&&(l.y=Math.max(z.bottom-e.height,z.top)));z=new g.f9(0,0,0,0);z.left=l.x;z.top=l.y;z.width=y.width;z.height=y.height;g.Hf(this.element,new g.jD(z.left,z.top));this.C.C();this.C.j(jS(this),"contextmenu",this.rb);this.C.j(this.L,"fullscreentoggled",this.onFullscreenToggled);this.C.j(this.L,"pageTransition",this.sj)}rb(l){if(!l.defaultPrevented){const y=kF(l);g.cf(this.element,y)||this.Xv();
this.L.O().disableNativeContextMenu&&l.preventDefault()}}onFullscreenToggled(){this.Xv();TGy(this)}sj(){this.Xv()}};var HRo=class extends g.H{constructor(l,y){super({U:"button",L_:["ytp-button","ytp-copylink-button"],G:{title:l.X("player_tooltip_data_title_killswitch")?"{{title-attr}}":"","data-tooltip-title":"{{tooltip-title}}","data-tooltip-opaque":String(g.u9(l.O()))},W:[{U:"div",B:"ytp-copylink-icon",Nd:"{{icon}}"},{U:"div",B:"ytp-copylink-title",Nd:"Sao ch\u00e9p \u0111\u01b0\u1eddng li\u00ean k\u1ebft",G:{"aria-hidden":"true"}}]});this.api=l;this.Z=y;this.visible=!1;this.tooltip=this.Z.As();y=l.O();this.tooltip.element.setAttribute("aria-live",
"polite");g.I(this.element,"ytp-show-copylink-title",g.u9(y));l.createClientVe(this.element,this,86570);this.listen("click",this.onClick);this.j(l,"videodatachange",this.Aa);this.j(l,"videoplayerreset",this.Aa);this.j(l,"appresize",this.Aa);this.Aa();this.addOnDisposeCallback(g.mn(this.tooltip,this.element))}async onClick(){var l=this.api.O();const y=this.api.getVideoData(),k=this.api.getPlaylistId();l=l.getVideoUrl(y.videoId,k,void 0,!0);await Vls(this,l)&&PBP(this);this.api.logClick(this.element)}Aa(){this.updateValue("icon",
{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"M21.9,8.3H11.3c-0.9,0-1.7,.8-1.7,1.7v12.3h1.7V10h10.6V8.3z M24.6,11.8h-9.7c-1,0-1.8,.8-1.8,1.8v12.3  c0,1,.8,1.8,1.8,1.8h9.7c1,0,1.8-0.8,1.8-1.8V13.5C26.3,12.6,25.5,11.8,24.6,11.8z M24.6,25.9h-9.7V13.5h9.7V25.9z"}}]});this.updateValue("title-attr","Sao ch\u00e9p \u0111\u01b0\u1eddng li\u00ean k\u1ebft");this.updateValue("tooltip-title","Sao ch\u00e9p \u0111\u01b0\u1eddng li\u00ean k\u1ebft");
this.visible=J1e(this);g.I(this.element,"ytp-copylink-button-visible",this.visible);this.fP(this.visible);this.tooltip.W1();this.api.logVisibility(this.element,this.visible&&this.C_)}Cl(l){super.Cl(l);this.api.logVisibility(this.element,this.visible&&l)}Vj(){super.Vj();g.ZM(this.element,"ytp-copylink-button-visible")}};var R1O=class extends g.H{constructor(l){super({U:"div",B:"ytp-doubletap-ui-legacy",W:[{U:"div",B:"ytp-doubletap-fast-forward-ve"},{U:"div",B:"ytp-doubletap-rewind-ve"},{U:"div",B:"ytp-doubletap-static-circle",W:[{U:"div",B:"ytp-doubletap-ripple"}]},{U:"div",B:"ytp-doubletap-overlay-a11y"},{U:"div",B:"ytp-doubletap-seek-info-container",W:[{U:"div",B:"ytp-doubletap-arrows-container",W:[{U:"span",B:"ytp-doubletap-base-arrow"},{U:"span",B:"ytp-doubletap-base-arrow"},{U:"span",B:"ytp-doubletap-base-arrow"}]},
{U:"div",B:"ytp-doubletap-tooltip",W:[{U:"div",B:"ytp-seek-icon-text-container",W:[{U:"div",B:"ytp-seek-icon",Nd:"{{seekIcon}}"},{U:"div",B:"ytp-chapter-seek-text-legacy",Nd:"{{seekText}}"}]},{U:"div",B:"ytp-doubletap-tooltip-label",Nd:"{{seekTime}}"}]}]}]});this.L=l;this.V=new g.B_(this.show,10,this);this.C=new g.B_(this.hide,700,this);this.S=this.N=0;this.D=this.J=!1;this.Z=this.qd("ytp-doubletap-static-circle");g.x(this,this.V);g.x(this,this.C);this.hide();this.K=this.qd("ytp-doubletap-fast-forward-ve");
this.A=this.qd("ytp-doubletap-rewind-ve");this.L.createClientVe(this.K,this,28240);this.L.createClientVe(this.A,this,28239);this.L.logVisibility(this.K,!0);this.L.logVisibility(this.A,!0);this.J=l.X("web_show_cumulative_seek_time");this.D=l.X("web_center_static_circles")}show(){super.show();this.C.Kl()}hide(){this.V.stop();this.N=0;this.qd("ytp-seek-icon").style.display="none";this.updateValue("seekIcon","");g.ZM(this.element,"ytp-chapter-seek");g.ZM(this.element,"ytp-time-seeking");super.hide()}YH(l,
y,k,z){this.N=l===this.S?this.N+z:z;this.S=l;var r=l===-1?this.A:this.K;r&&this.L.logClick(r);this.J?this.C.stop():this.C.hV();this.V.start();this.element.setAttribute("data-side",l===-1?"back":"forward");var Z=3*this.L.Yz().getPlayerSize().height;r=this.L.Yz().getPlayerSize();r=r.width/3-3*r.height;this.Z.style.width=`${Z}px`;this.Z.style.height=`${Z}px`;l===1?(this.Z.style.left="",this.Z.style.right=`${r}px`):l===-1&&(this.Z.style.right="",this.Z.style.left=`${r}px`);const e=Z*2.5;Z=e/2;const A=
this.qd("ytp-doubletap-ripple");A.style.width=`${e}px`;A.style.height=`${e}px`;l===1?(l=this.L.Yz().getPlayerSize().width-y+Math.abs(r),A.style.left="",A.style.right=`${l-Z}px`):l===-1&&(l=Math.abs(r)+y,A.style.right="",A.style.left=`${l-Z}px`);A.style.top=`calc((33% + ${Math.round(k)}px) - ${Z}px)`;if(k=this.qd("ytp-doubletap-ripple"))k.classList.remove("ytp-doubletap-ripple"),k.classList.add("ytp-doubletap-ripple");YFs(this,this.J?this.N:z)}Ar(l,y,k=null){if(k){var z=l===-1?this.A.visualElement:
this.K.visualElement;k={seekData:k};const r=g.MM();r&&yk(r,z,"INTERACTION_LOGGING_GESTURE_TYPE_KEY_PRESS",k)}this.N=l===this.S?this.N+y:y;this.S=l;z=this.L.Yz().getPlayerSize();this.J?this.C.stop():this.C.hV();this.V.start();this.element.setAttribute("data-side",l===-1?"back":"forward");g.zi(this.element,"ytp-time-seeking");this.Z.style.width="110px";this.Z.style.height="110px";k=z.width*.1-15;l===1?this.D?(this.Z.style.right=`${k}px`,this.Z.style.left=""):(this.Z.style.right="",this.Z.style.left=
`${z.width*.8-30}px`):l===-1&&(this.D?(this.Z.style.right="",this.Z.style.left=`${k}px`):(this.Z.style.right="",this.Z.style.left=`${z.width*.1-15}px`));this.Z.style.top=`${z.height*.5+15}px`;YFs(this,this.J?this.N:y)}y6(l,y,k=null){this.C.hV();this.V.start();switch(l){case -1:l="back";break;case 1:l="forward";break;default:l=""}this.element.setAttribute("data-side",l);this.Z.style.width="0";this.Z.style.height="0";g.zi(this.element,"ytp-chapter-seek");this.updateValue("seekText",y);this.updateValue("seekTime",
"");y=this.qd("ytp-seek-icon");if(k){a:if(k){switch(k){case "PREMIUM_STANDALONE":k=ojT();break a;case "PREMIUM_STANDALONE_CAIRO":k=Nhg();break a}k=void 0}else k=null;this.updateValue("seekIcon",k);y.style.display="inline-block"}else y.style.display="none"}};var DRO=class extends VH{constructor(l){super(l,!1,!0);this.PG=[];this.PF=[];this.element.setAttribute("data-overlay-order","9");pYe(this,this.L.getVideoData());this.b0=!0;this.badge.element.classList.add("ytp-featured-product");this.gb=new g.H({U:"div",B:"ytp-featured-product-open-in-new"});g.x(this,this.gb);this.countdownTimer=new g.H({U:"text",B:"ytp-featured-product-countdown",Nd:"{{content}}"});this.countdownTimer.hide();g.x(this,this.countdownTimer);this.V=new g.H({U:"div",B:"ytp-featured-product-trending",
W:[{U:"div",B:"ytp-featured-product-trending-icon"},{U:"text",B:"ytp-featured-product-trending-text",Nd:"{{trendingOffer}}"}]});this.V.hide();g.x(this,this.V);this.overflowButton=new g.H({U:"button",L_:["ytp-featured-product-overflow-icon","ytp-button"],G:{"aria-haspopup":"true"}});this.overflowButton.hide();g.x(this,this.overflowButton);this.Y=new g.H({U:"text",B:"ytp-featured-product-exclusive-countdown",Nd:"{{content}}",G:{id:"exclusiveCountdown","aria-hidden":"true"}});this.Y.hide();g.x(this,
this.Y);this.D=new g.H({U:"div",B:"ytp-featured-product-exclusive-container",G:{"aria-labelledby":"exclusiveBadge exclusiveCountdown"},W:[{U:"div",B:"ytp-featured-product-exclusive-badge-container",W:[{U:"div",B:"ytp-featured-product-exclusive-badge",W:[{U:"text",B:"ytp-featured-product-exclusive-badge-text",Nd:"{{exclusive}}",G:{id:"exclusiveBadge","aria-hidden":"true"}}]}]},this.Y]});this.D.hide();g.x(this,this.D);this.banner=new g.H({U:"a",B:"ytp-featured-product-container",W:[{U:"div",B:"ytp-featured-product-thumbnail",
W:[{U:"img",G:{src:"{{thumbnail}}"}},this.gb]},{U:"div",B:"ytp-featured-product-details",W:[{U:"text",B:"ytp-featured-product-title",Nd:"{{title}}"},this.L.X("web_player_enable_featured_product_banner_promotion_text_on_desktop")?{U:"div",B:"ytp-featured-product-price-container",G:{"aria-label":"{{priceA11yText}}"},W:[{U:"text",B:"ytp-featured-product-price-when-promotion-text-enabled",Nd:"{{price}}",G:{"aria-hidden":"true"}},{U:"text",B:"ytp-featured-product-promotion-text",Nd:"{{promotionText}}",
G:{"aria-hidden":"true"}}]}:{U:"div",G:{"aria-label":"{{priceA11yText}}"},W:[{U:"text",B:"ytp-featured-product-price",Nd:"{{price}}",G:{"aria-hidden":"true"}},{U:"text",B:"ytp-featured-product-sales-original-price",Nd:"{{salesOriginalPrice}}",G:{"aria-hidden":"true"}},{U:"text",B:"ytp-featured-product-price-drop-reference-price",Nd:"{{priceDropReferencePrice}}",G:{"aria-hidden":"true"}}]},this.L.X("web_player_enable_featured_product_banner_promotion_text_on_desktop")?{U:"div",B:"ytp-featured-product-when-promotion-text-enabled",
W:[{U:"text",B:"ytp-featured-product-affiliate-disclaimer-when-promotion-text-enabled",Nd:"{{affiliateDisclaimer}}"},this.V,{U:"text",B:"ytp-featured-product-vendor-when-promotion-text-enabled",Nd:"{{vendor}}"}]}:{U:"div",W:[{U:"text",B:"ytp-featured-product-affiliate-disclaimer",Nd:"{{affiliateDisclaimer}}"},this.L.X("web_player_enable_featured_product_banner_exclusives_on_desktop")?this.D:null,this.V,{U:"text",B:"ytp-featured-product-vendor",Nd:"{{vendor}}"},this.countdownTimer]}]},this.overflowButton]});
g.x(this,this.banner);this.banner.Uj(this.J.element);this.j(this.L,g.uR("featured_product"),this.zA);this.j(this.L,g.xR("featured_product"),this.u0);this.j(this.L,"videodatachange",this.onVideoDataChange);this.j(this.overflowButton.element,"click",this.O1);this.j(l,"featuredproductdismissed",this.K)}O1(l){this.kz||(this.kz=new ApL(this.L),g.x(this,this.kz));this.hj?.menu?.menuRenderer&&(this.kz.open(this.hj.menu.menuRenderer,l.target),l.preventDefault())}A(){return!!this.Z}Oj(){return!!this.Z}rb(l){l.target===
this.overflowButton.element?l.preventDefault():(this.wY&&g.G3(this.L,"innertubeCommand",this.wY),this.S(!1))}K(){this.S(!0);if(this.Z?.bannerData?.dismissedStatusKey){if(this.PF.includes(this.Z.bannerData.dismissedStatusKey))return;this.PF.push(this.Z.bannerData.dismissedStatusKey)}this.u0();if(this.L.X("web_enable_shopping_timely_shelf_client")){const l={};g.Kz(l,tjs,{overlayId:"player_overlay_timely_shelf"});g.G3(this.L,"innertubeCommand",l)}}q_(){this.u0();CP(this)}zA(l){if(l.id!==this.Z?.identifier){this.u0();
for(const y of this.PG){const k=y?.bannerData?.itemData;if(!k||y.identifier!==l.id)continue;if(this.PF.includes(y?.bannerData?.dismissedStatusKey||""))return;this.Z=y;this.banner.element.setAttribute("aria-label",k.accessibilityLabel||"");k.trackingParams&&(this.N=!0,this.L.setTrackingParams(this.badge.element,k.trackingParams));this.show();this.sj.show();Rn(this);this.gb.fP(!k.stayInApp);this.hv?.stop();this.countdownTimer.hide();uC(this);bC(this);this.wY=g.E(k.onTapCommand,Ji);const z=g.E(k.menuOnTap,
Ji);z&&(this.hj=g.E(z,hwT));this.banner.update({thumbnail:(k.thumbnailSources||[])[0]?.url,title:k.productTitle,price:k.priceReplacementText?k.priceReplacementText:k.price,salesOriginalPrice:Ks5(this),priceDropReferencePrice:gYe(this),promotionText:EYg(this),priceA11yText:fd5(this),affiliateDisclaimer:k.affiliateDisclaimer,vendor:mG(this)});k?.hiddenProductOptions?.showDropCountdown&&k?.hiddenProductOptions?.dropTimestampMs&&(this.hv=new g.B_(()=>{jF_(this)},1E3),this.gb.hide(),this.countdownTimer.show(),
jF_(this));
this.L.X("web_player_enable_featured_product_banner_exclusives_on_desktop")&&SFg(this)&&(this.S2=new g.B_(()=>{nYC(this)},1E3),nYC(this))}this.L.getRootNode()&&g.zi(this.L.getRootNode(),"ytp-featured-product-shown")}}u0(){this.Z&&(this.Z=void 0,this.C(),this.L.getRootNode()&&g.ZM(this.L.getRootNode(),"ytp-featured-product-shown"))}onVideoDataChange(l,y){pYe(this,y);
l==="dataloaded"&&CP(this);l=g.E(y.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.productsInVideoOverlayRenderer,NS_);this.overflowButton.show();this.dismissButton.hide();const k=l?.featuredProductsEntityKey;this.trendingOfferEntityKey=l?.trendingOfferEntityKey;this.PG.length||(oY_(this,k),bC(this));this.ji?.();this.ji=g.IH.subscribe(()=>{oY_(this,k);bC(this)})}Vj(){CP(this);
this.hv?.stop();this.countdownTimer.hide();uC(this);super.Vj()}};var lev=class extends g.H{constructor(l,y,k){super({U:"div",L_:["ytp-info-panel-action-item"],W:[{U:"div",B:"ytp-info-panel-action-item-disclaimer",Nd:"{{disclaimer}}"},{U:"a",L_:["ytp-info-panel-action-item-button","ytp-button"],G:{role:"button",href:"{{url}}",target:"_blank",rel:"noopener"},W:[{U:"div",B:"ytp-info-panel-action-item-icon",Nd:"{{icon}}"},{U:"div",B:"ytp-info-panel-action-item-label",Nd:"{{label}}"}]}]});this.L=l;this.C=k;this.disclaimer=this.qd("ytp-info-panel-action-item-disclaimer");
this.button=this.qd("ytp-info-panel-action-item-button");this.Ij=!1;this.L.createServerVe(this.element,this,!0);this.listen("click",this.onClick);l="";var z=g.E(y?.onTap,Ji);k=g.E(z,g.Iw);this.Ij=!1;k?(l=k.url||"",l.startsWith("//")&&(l="https:"+l),this.Ij=!0,g.HC(this.button,g.L3(l))):(k=g.E(z,ai_))&&!this.C?((l=k.phoneNumbers)&&l.length>0?(l="sms:"+l[0],k.messageText&&(l+="?&body="+encodeURI(k.messageText))):l="",this.Ij=!0,g.HC(this.button,g.L3(l,[dZg]))):(k=g.E(z,G2g))&&!this.C&&(l=k.phoneNumber?
"tel:"+k.phoneNumber:"",this.Ij=!0,g.HC(this.button,g.L3(l,[OQC])));!l&&(k=g.E(y?.onTap,Ji),z=g.E(k,xr))&&(this.Ij=!0,this.Z=k,this.feedbackToken=z.feedbackToken);(k=y.disclaimerText?.content)?(this.button.style.borderBottom="1px solid white",this.button.style.paddingBottom="16px",this.update({label:y.bodyText?.content,icon:NGT(y.icon?.iconType),disclaimer:k})):(this.disclaimer.style.display="none",this.update({label:y.bodyText?.content,icon:NGT(y.icon?.iconType)}));this.L.setTrackingParams(this.element,
y.trackingParams||null);this.Ij&&(this.N={externalLinkData:{url:l}})}onClick(){this.L.logClick(this.element,this.N);if(this.Z&&this.feedbackToken){const l=this.L.gW();l?.MP(this.Z)&&(ji(l,this.Z,{feedbackTokens:[this.feedbackToken]}),this.L.publish("infopaneldetaildismissed"))}}};var ymR=class extends sD{constructor(l,y){const k=rM();super(l,{U:"div",B:"ytp-info-panel-detail-skrim",W:[{U:"div",B:"ytp-info-panel-detail",G:{role:"dialog",id:k},W:[{U:"div",B:"ytp-info-panel-detail-header",W:[{U:"div",B:"ytp-info-panel-detail-title",Nd:"{{title}}"},{U:"button",L_:["ytp-info-panel-detail-close","ytp-button"],G:{"aria-label":"\u0110o\u0301ng"},W:[g.wM()]}]},{U:"div",B:"ytp-info-panel-detail-body",Nd:"{{body}}"},{U:"div",B:"ytp-info-panel-detail-items"}]}]},250);this.Z=y;this.items=
this.qd("ytp-info-panel-detail-items");this.C=new g.cI(this);this.itemData=[];this.N=k;this.j(this.qd("ytp-info-panel-detail-close"),"click",this.Xv);this.j(this.qd("ytp-info-panel-detail-skrim"),"click",this.Xv);this.j(this.qd("ytp-info-panel-detail"),"click",z=>{z.stopPropagation()});
this.j(this.L,"infopaneldetaildismissed",()=>{this.Xv()});
g.x(this,this.C);this.L.createServerVe(this.element,this,!0);this.j(l,"videodatachange",this.onVideoDataChange);this.onVideoDataChange("newdata",l.getVideoData());this.hide()}show(){super.show();this.L.publish("infopaneldetailvisibilitychange",!0);this.L.logVisibility(this.element,!0);for(const l of this.itemData)l.L.logVisibility(l.element,!0)}hide(){super.hide();this.L.publish("infopaneldetailvisibilitychange",!1);this.L.logVisibility(this.element,!1);for(const l of this.itemData)l.L.logVisibility(l.element,
!1)}getId(){return this.N}CA(){return this.itemData.length}onVideoDataChange(l,y){if(y){this.update({title:y.Fg?.title?.content||"",body:y.Fg?.bodyText?.content||""});this.L.setTrackingParams(this.element,y.Fg?.trackingParams||null);for(const k of this.itemData)k.dispose();this.itemData=[];if(y.Fg?.ctaButtons)for(const k of y.Fg.ctaButtons)if(l=g.E(k,za5))l=new lev(this.L,l,this.Z),l.Ij&&(this.itemData.push(l),l.Uj(this.items))}}Vj(){this.hide();super.Vj()}};var k0L=class extends g.H{constructor(l,y){super({U:"button",B:"ytp-info-panel-preview",G:{"aria-live":"assertive","aria-atomic":"true","aria-owns":y.getId(),"aria-haspopup":"true","data-tooltip-opaque":String(g.u9(l.O()))},W:[{U:"div",B:"ytp-info-panel-preview-text",Nd:"{{text}}"},{U:"div",B:"ytp-info-panel-preview-chevron",Nd:"{{chevron}}"}]});this.L=l;this.fp=this.Z=this.videoId=null;this.isDismissed=this.N=this.showControls=this.C=!1;this.j(this.element,"click",()=>{l.logClick(this.element);l.u4();
SS(y)});
this.fade=new g.oT(this,250,!1,100);g.x(this,this.fade);this.L.createServerVe(this.element,this,!0);this.j(l,"videodatachange",this.onVideoDataChange);this.j(l,"presentingplayerstatechange",this.K);this.j(this.L,"paidcontentoverlayvisibilitychange",this.V);this.j(this.L,"infopaneldetailvisibilitychange",this.V);const k=l.getVideoData()||{};(k.PG?.title?.content||k.PG?.bodyText?.content)&&q7(this,k);this.j(l,"onShowControls",this.S);this.j(l,"onHideControls",this.J);this.j(this.L,"infopaneldetaildismissed",
()=>{this.isDismissed=!0;this.hide()})}onVideoDataChange(l,y){q7(this,y);
this.fp&&Lsy(this,this.fp)}K(l){const y=this.L.getVideoData();this.videoId!==y.videoId&&q7(this,y);Lsy(this,l.state);this.fp=l.state}V(l){(this.N=l)?this.hide():this.Z&&!this.isDismissed&&this.show()}S(){this.C||this.Bn();this.showControls=!0}J(){this.C||this.Xv();this.showControls=!1}Bn(){if(!this.isDismissed){var l=this.L?.getPlayerSize(),y=l.width<380;l=l.height<(this.L?.isEmbedsShortsMode()?400:280);(this.L?.getPlayerStateObject().isCued()||this.L?.getPlayerStateObject().Z(1024))&&y&&l||!this.Z||
this.N||(this.fade.show(),this.L.publish("infopanelpreviewvisibilitychange",!0),this.L.logVisibility(this.element,!0))}}Xv(){this.Z&&!this.N&&(this.fade.hide(),this.L.publish("infopanelpreviewvisibilitychange",!1),this.L.logVisibility(this.element,!1))}A(){this.C=!1;this.showControls||this.Xv()}};var z6y={"default":0,monoSerif:1,propSerif:2,monoSans:3,propSans:4,casual:5,cursive:6,smallCaps:7};Object.keys(z6y).reduce((l,y)=>{l[z6y[y]]=y;return l},{});
var rm1={none:0,raised:1,depressed:2,uniform:3,dropShadow:4};Object.keys(rm1).reduce((l,y)=>{l[rm1[y]]=y;return l},{});
var Z3p={normal:0,bold:1,italic:2,bold_italic:3};Object.keys(Z3p).reduce((l,y)=>{l[Z3p[y]]=y;return l},{});var oz,e6R;oz=[{option:"#fff",text:"Tr\u1eafng"},{option:"#ff0",text:"Va\u0300ng"},{option:"#0f0",text:"Xanh l\u1ee5c"},{option:"#0ff",text:"Xanh l\u01a1"},{option:"#00f",text:"M\u00e0u lam"},{option:"#f0f",text:"\u0110\u1ecf t\u00eda"},{option:"#f00",text:"\u0110\u1ecf"},{option:"#080808",text:"\u0110en"}];e6R=[{option:0,text:WA(0)},{option:.25,text:WA(.25)},{option:.5,text:WA(.5)},{option:.75,text:WA(.75)},{option:1,text:WA(1)}];
g.PA=[{option:"fontFamily",text:"H\u1ecd ph\u00f4ng ch\u1eef",options:[{option:1,text:"Serif kh\u00f4ng c\u00e2n x\u1ee9ng"},{option:2,text:"Serif c\u00e2n x\u1ee9ng"},{option:3,text:"Sans-Serif kh\u00f4ng c\u00e2n x\u1ee9ng"},{option:4,text:"Sans-Serif c\u00e2n x\u1ee9ng"},{option:5,text:"Th\u00f4ng th\u01b0\u1eddng"},{option:6,text:"Ch\u1eef th\u1ea3o"},{option:7,text:"Ch\u1eef vi\u1ebft hoa nh\u1ecf"}]},{option:"color",text:"M\u00e0u ph\u00f4ng ch\u1eef",options:oz},{option:"fontSizeIncrement",
text:"C\u1ee1 ch\u1eef",options:[{option:-2,text:WA(.5)},{option:-1,text:WA(.75)},{option:0,text:WA(1)},{option:1,text:WA(1.5)},{option:2,text:WA(2)},{option:3,text:WA(3)},{option:4,text:WA(4)}]},{option:"background",text:"M\u00e0u n\u1ec1n",options:oz},{option:"backgroundOpacity",text:"\u0110\u1ed9 m\u1edd c\u1ee7a n\u1ec1n",options:e6R},{option:"windowColor",text:"M\u00e0u c\u1eeda s\u1ed5",options:oz},{option:"windowOpacity",text:"\u0110\u1ed9 m\u1edd c\u1ee7a c\u1eeda s\u1ed5",options:e6R},{option:"charEdgeStyle",
text:"Ki\u1ec3u vi\u1ec1n k\u00fd t\u1ef1",options:[{option:0,text:"Kh\u00f4ng c\u00f3"},{option:4,text:"B\u00f3ng \u0111\u1ed5"},{option:1,text:"T\u0103ng"},{option:2,text:"Ch\u00ecm"},{option:3,text:"\u0110\u01b0\u1eddng vi\u1ec1n"}]},{option:"textOpacity",text:"\u0110\u1ed9 m\u1edd ph\u00f4ng ch\u1eef",options:[{option:.25,text:WA(.25)},{option:.5,text:WA(.5)},{option:.75,text:WA(.75)},{option:1,text:WA(1)}]}];var AmR=[27,9,33,34,13,32,187,61,43,189,173,95,79,87,67,80,78,75,70,65,68,87,83,107,221,109,219],$ge=class extends g.cI{constructor(l,y,k,z,r,Z,e,A){super();this.api=l;this.D=y;this.contextMenu=k;this.fg=z;this.Lp=r;this.Z=Z;this.C_=e;this.progressBar=A;this.J=new g.B_(()=>{Dws(this,!1)},1E3);
this.N="";this.V={Y1:!1,O8:!1,l7:!1};g.x(this,this.J);this.j(y,"mousedown",()=>{TU(this,!1)});
this.j(k.element,"mousedown",()=>{TU(this,!1)});
this.j(y,"keydown",this.S);this.j(k.element,"keydown",this.S);this.j(y,"keyup",this.A);this.j(k.element,"keyup",this.A)}S(l){l.repeat||(this.V.Y1=!1);let y=!1;const k=l.keyCode;var z=kF(l);let r=!l.altKey&&!l.ctrlKey&&!l.metaKey&&(!this.api.isMutedByEmbedsMutedAutoplay()||AmR.includes(k));var Z=!1;let e=!1;const A=this.api.O();l.defaultPrevented?(r=!1,e=!0):A.T7&&!this.api.isMutedByEmbedsMutedAutoplay()&&(r=!1);if(k===9)y=!0;else{if(z)switch(k){case 32:case 13:if(z.tagName==="BUTTON"||z.tagName===
"A"||z.tagName==="INPUT")y=!0,r=!1;else if(r){var Q=z.getAttribute("role");!Q||Q!=="option"&&Q!=="button"&&Q.indexOf("menuitem")!==0||(y=!0,z.click(),Z=!0)}break;case 37:case 39:case 36:case 35:y=z.getAttribute("role")==="slider";break;case 38:case 40:Q=z.getAttribute("role"),z=k===38?z.previousSibling:z.nextSibling,Q==="slider"?y=!0:r&&(Q==="option"?(z&&z.getAttribute("role")==="option"&&z.focus(),Z=y=!0):Q&&Q.indexOf("menuitem")===0&&(z&&z.hasAttribute("role")&&z.getAttribute("role").indexOf("menuitem")===
0&&z.focus(),Z=y=!0))}if(r&&!Z)switch(k){case 38:Z=Math.min(this.api.getVolume()+5,100);h8(this.Lp,Z,!1);this.api.setVolume(Z);e=Z=!0;break;case 40:Z=Math.max(this.api.getVolume()-5,0);h8(this.Lp,Z,!0);this.api.setVolume(Z);e=Z=!0;break;case 36:this.api.wq()&&(this.api.startSeekCsiAction(),this.api.seekTo(0,void 0,void 0,void 0,79),e=Z=!0);break;case 35:this.api.wq()&&(this.api.startSeekCsiAction(),this.api.seekTo(Infinity,void 0,void 0,void 0,80),e=Z=!0)}}y&&TU(this,!0);(y||e)&&this.fg.T6();(Z||
r&&this.handleGlobalKeyDown(k,l.shiftKey,l.ctrlKey,l.altKey,l.metaKey,l.key,l.code,l.repeat))&&l.preventDefault();A.A&&(l={keyCode:l.keyCode,altKey:l.altKey,ctrlKey:l.ctrlKey,metaKey:l.metaKey,shiftKey:l.shiftKey,handled:l.defaultPrevented,fullscreen:this.api.isFullscreen()},g.X5(this.api,"onKeyPress",l))}A(l){const y=l.keyCode;!this.V.O8&&this.handleGlobalKeyUp(y,l.shiftKey,l.ctrlKey,l.altKey,l.metaKey,l.key,l.code)&&l.preventDefault()}handleGlobalKeyUp(l,y,k,z,r,Z,e){this.api.publish("keyboardserviceglobalkeyup",
{keyCode:l,shiftKey:y,ctrlKey:k,altKey:z,metaKey:r,key:Z,code:e});y=!1;if(this.V.Y1)return y;(Z=g.Yk(this.api.r4()))&&(Z=Z.gF)&&Z.VM&&(Z.zT(l),y=!0);switch(l){case 9:TU(this,!0);y=!0;break;case 32:this.api.X("web_speedmaster_spacebar_control")&&(this.api.O().T7||(y=this.yc(this.progressBar?.RY()?.isEnabled)));break;case 39:(this.api.X("web_player_chapter_seeking_keyboard_shortcut_killswitch")||!(r||k&&z))&&(e$?z:k)&&this.api.wq()&&this.api.X("web_enable_keyboard_shortcut_for_timely_actions")&&(this.api.startSeekCsiAction(),
l=(l=this.api.getVideoData())?l.hj:[],k=BG_(l,this.api.getCurrentTime()*1E3),k!==-1&&this.Z!=null&&(this.Z.y6(1,l[k].title),this.api.seekTo(l[k].startTime/1E3,void 0,void 0,void 0,52),y=!0))}return y}handleGlobalKeyDown(l,y,k,z,r,Z,e,A){A||(this.V.Y1=!1);var Q=!1,t=this.api.O();if(t.T7&&!this.api.isMutedByEmbedsMutedAutoplay())return Q;var O=g.Yk(this.api.r4());if(O&&(O=O.gF)&&O.VM)switch(l){case 65:case 68:case 87:case 83:case 107:case 221:case 109:case 219:Q=O.d1(l)}t.S||Q||(Q=Z||String.fromCharCode(l).toLowerCase(),
this.N+=Q,"awesome".indexOf(this.N)===0||this.api.X("web_player_rtr_ctrls")&&"bday".indexOf(this.N)===0?(Q=!0,4===this.N.length&&this.N==="bday"&&this.api.X("web_player_rtr_ctrls")&&(v1P(this.D),this.fg.T6()),7===this.N.length&&this.N==="awesome"&&AB(this.api.getRootNode(),"ytp-color-party")):(this.N=Q,Q="awesome".indexOf(this.N)===0||"bday".indexOf(this.N)===0));if(!Q&&(!this.api.isMutedByEmbedsMutedAutoplay()||AmR.includes(l))){O=this.api.getVideoData();var d=this.progressBar?.RY()?.isEnabled;O=
O?O.hj:[];const w=e$?z:k;switch(l){case 80:y&&!t.rb&&(w6(this.Lp,s1q(),"Tr\u01b0\u1edbc"),this.api.previousVideo(),Q=!0);break;case 78:y&&!t.rb&&(w6(this.Lp,iM(),"Ti\u1ebfp theo"),this.api.nextVideo(),Q=!0);break;case 74:this.api.wq()&&(this.api.startSeekCsiAction(),this.Z?this.api.X("enable_key_press_seek_logging")?(Q=VQ(this,-10*this.api.getPlaybackRate(),"SEEK_SOURCE_SEEK_BACKWARD_10S"),this.Z.Ar(-1,10,Q)):this.Z.Ar(-1,10):w6(this.Lp,{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",
width:"100%"},W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"M 18,11 V 7 l -5,5 5,5 v -4 c 3.3,0 6,2.7 6,6 0,3.3 -2.7,6 -6,6 -3.3,0 -6,-2.7 -6,-6 h -2 c 0,4.4 3.6,8 8,8 4.4,0 8,-3.6 8,-8 0,-4.4 -3.6,-8 -8,-8 z M 16.9,22 H 16 V 18.7 L 15,19 v -0.7 l 1.8,-0.6 h .1 V 22 z m 4.3,-1.8 c 0,.3 0,.6 -0.1,.8 l -0.3,.6 c 0,0 -0.3,.3 -0.5,.3 -0.2,0 -0.4,.1 -0.6,.1 -0.2,0 -0.4,0 -0.6,-0.1 -0.2,-0.1 -0.3,-0.2 -0.5,-0.3 -0.2,-0.1 -0.2,-0.3 -0.3,-0.6 -0.1,-0.3 -0.1,-0.5 -0.1,-0.8 v -0.7 c 0,-0.3 0,-0.6 .1,-0.8 l .3,-0.6 c 0,0 .3,-0.3 .5,-0.3 .2,0 .4,-0.1 .6,-0.1 .2,0 .4,0 .6,.1 .2,.1 .3,.2 .5,.3 .2,.1 .2,.3 .3,.6 .1,.3 .1,.5 .1,.8 v .7 z m -0.9,-0.8 v -0.5 c 0,0 -0.1,-0.2 -0.1,-0.3 0,-0.1 -0.1,-0.1 -0.2,-0.2 -0.1,-0.1 -0.2,-0.1 -0.3,-0.1 -0.1,0 -0.2,0 -0.3,.1 l -0.2,.2 c 0,0 -0.1,.2 -0.1,.3 v 2 c 0,0 .1,.2 .1,.3 0,.1 .1,.1 .2,.2 .1,.1 .2,.1 .3,.1 .1,0 .2,0 .3,-0.1 l .2,-0.2 c 0,0 .1,-0.2 .1,-0.3 v -1.5 z"}}]}),
this.api.seekBy(-10*this.api.getPlaybackRate(),void 0,void 0,73),Q=!0);break;case 76:this.api.wq()&&(this.api.startSeekCsiAction(),this.Z?this.api.X("enable_key_press_seek_logging")?(Q=VQ(this,10*this.api.getPlaybackRate(),"SEEK_SOURCE_SEEK_FORWARD_10S"),this.Z.Ar(1,10,Q)):this.Z.Ar(1,10):w6(this.Lp,{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"m 10,19 c 0,4.4 3.6,8 8,8 4.4,0 8,-3.6 8,-8 h -2 c 0,3.3 -2.7,6 -6,6 -3.3,0 -6,-2.7 -6,-6 0,-3.3 2.7,-6 6,-6 v 4 l 5,-5 -5,-5 v 4 c -4.4,0 -8,3.6 -8,8 z m 6.8,3 H 16 V 18.7 L 15,19 v -0.7 l 1.8,-0.6 h .1 V 22 z m 4.3,-1.8 c 0,.3 0,.6 -0.1,.8 l -0.3,.6 c 0,0 -0.3,.3 -0.5,.3 C 20,21.9 19.8,22 19.6,22 19.4,22 19.2,22 19,21.9 18.8,21.8 18.7,21.7 18.5,21.6 18.3,21.5 18.3,21.3 18.2,21 18.1,20.7 18.1,20.5 18.1,20.2 v -0.7 c 0,-0.3 0,-0.6 .1,-0.8 l .3,-0.6 c 0,0 .3,-0.3 .5,-0.3 .2,0 .4,-0.1 .6,-0.1 .2,0 .4,0 .6,.1 .2,.1 .3,.2 .5,.3 .2,.1 .2,.3 .3,.6 .1,.3 .1,.5 .1,.8 v .7 z m -0.8,-0.8 v -0.5 c 0,0 -0.1,-0.2 -0.1,-0.3 0,-0.1 -0.1,-0.1 -0.2,-0.2 -0.1,-0.1 -0.2,-0.1 -0.3,-0.1 -0.1,0 -0.2,0 -0.3,.1 l -0.2,.2 c 0,0 -0.1,.2 -0.1,.3 v 2 c 0,0 .1,.2 .1,.3 0,.1 .1,.1 .2,.2 .1,.1 .2,.1 .3,.1 .1,0 .2,0 .3,-0.1 l .2,-0.2 c 0,0 .1,-0.2 .1,-0.3 v -1.5 z"}}]}),
this.api.seekBy(10*this.api.getPlaybackRate(),void 0,void 0,74),Q=!0);break;case 37:if(this.api.wq())if(this.api.startSeekCsiAction(),w){if(this.api.X("web_player_chapter_seeking_keyboard_shortcut_killswitch")||!(r||k&&z))d=H8q(O,this.api.getCurrentTime()*1E3),d!==-1&&this.Z!=null&&(this.Z.y6(-1,O[d].title),this.api.seekTo(O[d].startTime/1E3,void 0,void 0,void 0,53),Q=!0)}else this.Z?this.api.X("enable_key_press_seek_logging")?(Q=VQ(this,-5*this.api.getPlaybackRate(),"SEEK_SOURCE_SEEK_BACKWARD_5S"),
this.Z.Ar(-1,5,Q)):this.Z.Ar(-1,5):w6(this.Lp,{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"M 18,11 V 7 l -5,5 5,5 v -4 c 3.3,0 6,2.7 6,6 0,3.3 -2.7,6 -6,6 -3.3,0 -6,-2.7 -6,-6 h -2 c 0,4.4 3.6,8 8,8 4.4,0 8,-3.6 8,-8 0,-4.4 -3.6,-8 -8,-8 z m -1.3,8.9 .2,-2.2 h 2.4 v .7 h -1.7 l -0.1,.9 c 0,0 .1,0 .1,-0.1 0,-0.1 .1,0 .1,-0.1 0,-0.1 .1,0 .2,0 h .2 c .2,0 .4,0 .5,.1 .1,.1 .3,.2 .4,.3 .1,.1 .2,.3 .3,.5 .1,.2 .1,.4 .1,.6 0,.2 0,.4 -0.1,.5 -0.1,.1 -0.1,.3 -0.3,.5 -0.2,.2 -0.3,.2 -0.4,.3 C 18.5,22 18.2,22 18,22 17.8,22 17.6,22 17.5,21.9 17.4,21.8 17.2,21.8 17,21.7 16.8,21.6 16.8,21.5 16.7,21.3 16.6,21.1 16.6,21 16.6,20.8 h .8 c 0,.2 .1,.3 .2,.4 .1,.1 .2,.1 .4,.1 .1,0 .2,0 .3,-0.1 L 18.5,21 c 0,0 .1,-0.2 .1,-0.3 v -0.6 l -0.1,-0.2 -0.2,-0.2 c 0,0 -0.2,-0.1 -0.3,-0.1 h -0.2 c 0,0 -0.1,0 -0.2,.1 -0.1,.1 -0.1,0 -0.1,.1 0,.1 -0.1,.1 -0.1,.1 h -0.7 z"}}]}),
this.api.seekBy(-5*this.api.getPlaybackRate(),void 0,void 0,71),Q=!0;break;case 39:this.api.wq()&&(this.api.startSeekCsiAction(),w?this.api.X("web_enable_keyboard_shortcut_for_timely_actions")||!this.api.X("web_player_chapter_seeking_keyboard_shortcut_killswitch")&&(r||k&&z)||(d=BG_(O,this.api.getCurrentTime()*1E3),d!==-1&&this.Z!=null&&(this.Z.y6(1,O[d].title),this.api.seekTo(O[d].startTime/1E3,void 0,void 0,void 0,52),Q=!0)):(this.Z!=null?this.api.X("enable_key_press_seek_logging")?(Q=VQ(this,5*
this.api.getPlaybackRate(),"SEEK_SOURCE_SEEK_FORWARD_5S"),this.Z.Ar(1,5,Q)):this.Z.Ar(1,5):w6(this.Lp,{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"m 10,19 c 0,4.4 3.6,8 8,8 4.4,0 8,-3.6 8,-8 h -2 c 0,3.3 -2.7,6 -6,6 -3.3,0 -6,-2.7 -6,-6 0,-3.3 2.7,-6 6,-6 v 4 l 5,-5 -5,-5 v 4 c -4.4,0 -8,3.6 -8,8 z m 6.7,.9 .2,-2.2 h 2.4 v .7 h -1.7 l -0.1,.9 c 0,0 .1,0 .1,-0.1 0,-0.1 .1,0 .1,-0.1 0,-0.1 .1,0 .2,0 h .2 c .2,0 .4,0 .5,.1 .1,.1 .3,.2 .4,.3 .1,.1 .2,.3 .3,.5 .1,.2 .1,.4 .1,.6 0,.2 0,.4 -0.1,.5 -0.1,.1 -0.1,.3 -0.3,.5 -0.2,.2 -0.3,.2 -0.5,.3 C 18.3,22 18.1,22 17.9,22 17.7,22 17.5,22 17.4,21.9 17.3,21.8 17.1,21.8 16.9,21.7 16.7,21.6 16.7,21.5 16.6,21.3 16.5,21.1 16.5,21 16.5,20.8 h .8 c 0,.2 .1,.3 .2,.4 .1,.1 .2,.1 .4,.1 .1,0 .2,0 .3,-0.1 L 18.4,21 c 0,0 .1,-0.2 .1,-0.3 v -0.6 l -0.1,-0.2 -0.2,-0.2 c 0,0 -0.2,-0.1 -0.3,-0.1 h -0.2 c 0,0 -0.1,0 -0.2,.1 -0.1,.1 -0.1,0 -0.1,.1 0,.1 -0.1,.1 -0.1,.1 h -0.6 z"}}]}),
this.api.seekBy(5*this.api.getPlaybackRate(),void 0,void 0,72),Q=!0));break;case 77:this.api.isMuted()?(this.api.unMute(),h8(this.Lp,this.api.getVolume(),!1)):(this.api.mute(),h8(this.Lp,0,!0));Q=!0;break;case 32:Q=this.api.X("web_speedmaster_spacebar_control")?!this.api.O().rb:this.yc(d);break;case 75:Q=this.yc(d);break;case 190:y?t.enableSpeedOptions&&y3q(this)&&(Q=this.api.getPlaybackRate(),this.api.setPlaybackRate(Q+.25,!0),hsT(this.Lp,!1),Q=!0):this.api.wq()&&(this.step(1),Q=!0);break;case 188:y?
t.enableSpeedOptions&&y3q(this)&&(Q=this.api.getPlaybackRate(),this.api.setPlaybackRate(Q-.25,!0),hsT(this.Lp,!0),Q=!0):this.api.wq()&&(this.step(-1),Q=!0);break;case 70:lTz(this.api)&&(this.api.toggleFullscreen().catch(()=>{}),Q=!0);
break;case 27:d?(this.progressBar.fd(),Q=!0):this.C_()&&(Q=!0)}if(t.controlsType!=="3")switch(l){case 67:g.FY(this.api.r4())&&(t=this.api.getOption("captions","track"),this.api.toggleSubtitles(!0),GZQ(this.Lp,!t||t&&!t.displayName),Q=!0);break;case 79:J8(this,"textOpacity");break;case 87:J8(this,"windowOpacity");break;case 187:case 61:J8(this,"fontSizeIncrement",!1,!0);break;case 189:case 173:J8(this,"fontSizeIncrement",!0,!0)}let h;y||k||z||(l>=48&&l<=57?h=l-48:l>=96&&l<=105&&(h=l-96));h!=null&&
this.api.wq()&&!this.api.X("web_player_disable_keyboard_seek_percent")&&(this.api.startSeekCsiAction(),t=this.api.getProgressState(),this.api.seekTo(h/10*(t.seekableEnd-t.seekableStart)+t.seekableStart,void 0,void 0,void 0,81),Q=!0);Q&&this.fg.T6()}this.V.l7=!1;this.api.publish("keyboardserviceglobalkeydown",{keyCode:l,shiftKey:y,ctrlKey:k,altKey:z,metaKey:r,key:Z,code:e,repeat:A},this.V);this.V.l7&&(Q=!0,this.fg.T6());return Q}step(l){this.api.wq();if(this.api.getPlayerStateObject().isPaused()){var y=
this.api.getVideoData().C;y&&(y=y.video)&&this.api.seekBy(l/(y.fps||30),void 0,void 0,l>0?77:78)}}yc(l){if(!this.api.O().rb){const y=this.api.getVideoData()?.getPlayerResponse()?.playabilityStatus;y&&g.E(y.miniplayer,JkC)?.playbackMode==="PLAYBACK_MODE_PAUSED_ONLY"&&g.G3(this.api,"onExpandMiniplayer");l?this.progressBar.O1():(l=!this.api.getPlayerStateObject().isOrWillBePlaying(),this.Lp.Ch(l),l?this.api.playVideo():this.api.pauseVideo());return!0}return!1}Vj(){this.J.hV();super.Vj()}};var QgR=class extends g.H{constructor(l,y){super({U:"button",L_:["ytp-button","ytp-overflow-button"],G:{title:l.X("player_tooltip_data_title_killswitch")?"Hi\u1ec7n th\u00eam":"","data-tooltip-title":"Hi\u1ec7n th\u00eam","aria-haspopup":"true","aria-owns":y.element.id},W:[{U:"div",B:"ytp-overflow-icon",W:[{U:"svg",G:{height:"100%",viewBox:"-5 -5 36 36",width:"100%"},W:[{U:"path",G:{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z",
fill:"#fff"}}]}]}]});this.L=l;this.Hw=y;this.visible=!1;l.createClientVe(this.element,this,16499);this.j(l,"videoplayerreset",this.Aa);this.j(l,"appresize",this.Aa);this.j(l,"fullscreentoggled",this.Aa);this.j(l,"presentingplayerstatechange",this.Aa);this.Aa();q1(l,this.element,this);this.listen("click",()=>{l.logClick(this.element);SS(y,this.element,!1)});
this.j(y.closeButton,"click",()=>{this.focus()})}Aa(){var l=this.L.O();
const y=l.N||this.L.X("web_player_hide_overflow_button_if_empty_menu")&&this.Hw.isEmpty();l=g.u9(l)&&g.Pl(this.L)&&this.L.getPlayerStateObject().Z(128);const k=this.L.getPlayerSize();this.visible=this.L.xw()&&!l&&k.width>=240&&!this.L.getVideoData().Wn&&!y&&!this.L.isEmbedsShortsMode();g.I(this.element,"ytp-overflow-button-visible",this.visible);this.fP(this.visible);this.visible&&this.L.W1();this.L.logVisibility(this.element,this.visible&&this.C_)}Cl(l){super.Cl(l);this.L.logVisibility(this.element,
this.visible&&l)}Vj(){super.Vj();g.ZM(this.element,"ytp-overflow-button-visible")}};var tRx=class extends sD{constructor(l){super(l,{U:"div",B:"ytp-overflow-panel",G:{id:rM(),role:"dialog"},W:[{U:"div",B:"ytp-overflow-panel-content",W:[{U:"div",B:"ytp-overflow-panel-action-buttons",Nd:"{{buttons}}"}]},{U:"button",L_:["ytp-overflow-panel-close","ytp-button"],G:{"data-tooltip-title":"\u0110o\u0301ng",title:l.O().X("player_tooltip_data_title_killswitch")?"\u0110o\u0301ng":""},W:[g.wM()]}]},250);this.actionButtons=[];this.Z=this.qd("ytp-overflow-panel-content");this.closeButton=this.qd("ytp-overflow-panel-close");
this.j(this.closeButton,"click",this.Xv);q1(l,this.closeButton,this);this.listen("click",this.C);this.j(l,"videoplayerreset",this.hide);this.j(l,"fullscreentoggled",this.onFullscreenToggled);this.hide()}C(l){l=kF(l);g.cf(this.element,l)&&(g.cf(this.Z,l)||g.cf(this.closeButton,l)||SS(this))}Xv(){super.Xv();this.L.WZ(this.element)}show(){this.VM&&this.L.publish("OVERFLOW_PANEL_OPENED");super.show();this.element.setAttribute("aria-modal","true");for(const l of this.actionButtons)l.Cl(!0)}hide(){super.hide();
this.element.removeAttribute("aria-modal");for(const l of this.actionButtons)l.Cl(!1)}onFullscreenToggled(l){!l&&this.aH()&&SS(this)}isEmpty(){return this.actionButtons.length===0}focus(){for(const l of this.actionButtons)if(l.VM){l.focus();break}}};var O31=class extends g.H{constructor(l,y,k){const z=g.pJ(y,k),r=z.uE("default.jpg");super({U:"a",L_:["ytp-video-menu-item","ytp-button"],G:{role:"menuitemradio","aria-label":z.title,href:l.O().getVideoUrl(z.videoId,y.listId?y.listId.toString():null)},W:[{U:"div",B:"ytp-video-menu-item-index",Nd:String(k+1)},{U:"div",B:"ytp-video-menu-item-now-playing",Nd:"\u25b6"},{U:"div",B:"ytp-video-menu-item-thumbnail",G:{style:r?`background-image: url(${r});`:void 0}},{U:"div",B:"ytp-video-menu-item-title",
Nd:z.title},{U:"div",B:"ytp-video-menu-item-author",Nd:z.author}]});this.api=l;this.index=k;this.listen("click",this.onClick)}onClick(l){g.Bl(l,this.api)&&this.api.playVideoAt(this.index)}};var dgy=class extends sD{constructor(l){super(l,{U:"div",B:"ytp-playlist-menu",G:{role:"dialog",id:rM()},W:[{U:"div",B:"ytp-playlist-menu-header",W:[{U:"div",B:"ytp-playlist-menu-title",W:[l.O().N?{U:"span",B:"ytp-playlist-menu-title-name",Nd:"{{title}}"}:{U:"a",B:"ytp-playlist-menu-title-name",G:{href:"{{playlisturl}}"},Nd:"{{title}}"},{U:"button",L_:["ytp-playlist-menu-close","ytp-button"],G:{"aria-label":"\u0110o\u0301ng"},W:[g.wM()]}]},{U:"div",B:"ytp-playlist-menu-subtitle",Nd:"{{subtitle}}"}]},
{U:"div",B:"ytp-playlist-menu-items",G:{role:"menu"}}]},250);this.api=l;this.N=this.selected=this.K=this.playlist=null;this.items=this.qd("ytp-playlist-menu-items");this.Z=new g.cI(this);this.playlistData=[];this.j(this.qd("ytp-playlist-menu-close"),"click",this.Xv);const y=this.qd("ytp-playlist-menu-title-name");l.O().N||(this.N=this.j(y,"click",this.Y));g.x(this,this.Z);this.hide()}show(){super.show();this.Z.j(this.api,"videodatachange",this.V);this.Z.j(this.api,"onPlaylistUpdate",this.V);this.V()}hide(){super.hide();
this.Z.C();this.updatePlaylist(null)}V(){this.updatePlaylist(this.api.getPlaylist());this.api.O().N&&(this.qd("ytp-playlist-menu-title-name").removeAttribute("href"),this.N&&(this.uq(this.N),this.N=null))}C(){const l=this.playlist;var y=l.author,k=y?"c\u1ee7a $AUTHOR \u2022 $CURRENT_POSITION/$PLAYLIST_LENGTH":"$CURRENT_POSITION/$PLAYLIST_LENGTH",z={CURRENT_POSITION:String(l.index+1),PLAYLIST_LENGTH:String(l.length)};y&&(z.AUTHOR=y);this.update({title:l.title,subtitle:g.Ts(k,z),playlisturl:this.api.getVideoUrl(!0)});
y=l.C;if(y===this.K)this.selected.element.setAttribute("aria-checked","false"),this.selected=this.playlistData[l.index];else{for(var r of this.playlistData)r.dispose();r=l.length;this.playlistData=[];for(k=0;k<r;k++)z=new O31(this.api,l,k),this.playlistData.push(z),z.Uj(this.items);this.selected=this.playlistData[l.index];this.K=y}this.selected&&this.selected.element.setAttribute("aria-checked","true")}Y(l){const y=this.api.getVideoUrl(!0);g.Hl(y,this.api,l)}updatePlaylist(l){this.playlist!==l?(this.playlist&&
this.playlist.unsubscribe("shuffle",this.C,this),this.playlist=l,this.K=null,l?(l.subscribe("shuffle",this.C,this),this.C()):this.VM&&this.hide()):this.playlist&&this.C()}focus(){this.selected.focus()}Vj(){this.hide();super.Vj()}};var wCp=class extends g.H{constructor(l,y){super({U:"button",L_:["ytp-playlist-menu-button","ytp-button"],G:{title:l.X("player_tooltip_data_title_killswitch")?"{{title}}":"","data-tooltip-title":"{{tooltip-title}}","aria-owns":String(y.element.id),"aria-haspopup":"true","aria-label":"Danh s\u00e1ch ph\u00e1t",["data-overlay-order"]:"3"},W:[{U:"div",B:"ytp-playlist-menu-button-icon",W:[{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,G:{d:"m 22.53,21.42 0,6.85 5.66,-3.42 -5.66,-3.42 0,0 z m -11.33,0 9.06,0 0,2.28 -9.06,0 0,-2.28 0,0 z m 0,-9.14 13.6,0 0,2.28 -13.6,0 0,-2.28 0,0 z m 0,4.57 13.6,0 0,2.28 -13.6,0 0,-2.28 0,0 z",
fill:"#fff"}}]}]},{U:"div",B:"ytp-playlist-menu-button-title",Nd:"{{playlistTitle}}"},{U:"div",B:"ytp-playlist-menu-button-text",Nd:"{{text}}"}]});this.api=l;this.playlist=null;this.visible=!1;l.createClientVe(this.element,this,70344);this.j(l,"videodatachange",this.Z);this.j(l,"videoplayerreset",this.Z);this.j(l,"onPlaylistUpdate",this.Z);this.j(l,"presentingplayerstatechange",this.Aa);this.j(l,"appresize",this.Aa);this.hide();this.Z();q1(l,this.element,this);this.listen("click",()=>{l.logClick(this.element);
l.X("delhi_web_player_use_external_playlist_panel")?g.G3(l,"onToggleExternalPlaylistPanel"):SS(y,this.element,!1)})}hide(){super.hide();
this.Cl(!1);this.api.W1()}Aa(){const l=g.u9(this.api.O());g.I(this.element,"ytp-playlist-menu-button-tiny",this.api.Yz().getPlayerSize().width<400&&!l);this.api.isEmbedsShortsMode()?this.hide():this.playlist&&this.api.getPresentingPlayerType()!==2?(this.update({text:g.Ts("$CURRENT_POSITION/$PLAYLIST_LENGTH",{CURRENT_POSITION:String(this.playlist.index+1),PLAYLIST_LENGTH:String(this.playlist.length)}),title:g.Ts("Danh s\u00e1ch ph\u00e1t: $PLAYLIST_NAME",{PLAYLIST_NAME:this.playlist.title}),"tooltip-title":g.Ts("Danh s\u00e1ch ph\u00e1t: $PLAYLIST_NAME",
{PLAYLIST_NAME:this.playlist.title})}),this.api.X("delhi_modern_web_player")&&this.update({playlistTitle:g.Ts("Danh s\u00e1ch ph\u00e1t: $PLAYLIST_NAME",{PLAYLIST_NAME:this.playlist.title})}),this.VM||(this.show(),this.api.W1()),this.visible=!0,this.Cl(!0)):this.VM&&this.hide()}Cl(l){super.Cl(l);this.api.logVisibility(this.element,this.visible&&l)}Z(){this.playlist&&this.playlist.unsubscribe("shuffle",this.Aa,this);(this.playlist=this.api.getPlaylist())&&this.playlist.subscribe("shuffle",this.Aa,
this);this.Aa()}};var wBQ=class extends g.H{constructor(l,y){super({U:"div",B:"ytp-promotooltip-wrapper",W:[{U:"div",B:"ytp-promotooltip-container",W:[{U:"div",B:"ytp-promotooltip-content",W:[{U:"div",B:"ytp-promotooltip-title",Nd:"{{title}}"},{U:"div",B:"ytp-promotooltip-details",Nd:"{{details}}"}]},{U:"div",B:"ytp-promotooltip-buttons",W:[{U:"div",B:"ytp-promotooltip-dismiss-button",Nd:"{{dismissButtonText}}",G:{tabindex:"0"}},{U:"div",B:"ytp-promotooltip-accept-button",Nd:"{{acceptButtonText}}",G:{tabindex:"0",
"aria-haspopup":"true"}}]}]},{U:"div",B:"ytp-promotooltip-pointer"}]});this.tooltipRenderer=l;this.L=y;this.Z=this.sourceElement=null;this.title=this.qd("ytp-promotooltip-title");this.details=this.qd("ytp-promotooltip-details");this.acceptButton=this.qd("ytp-promotooltip-accept-button");this.dismissButton=this.qd("ytp-promotooltip-dismiss-button");this.C=this.V=!1;this.N=!0;this.D=this.S=this.A=this.K=!1;this.d4={z2:k=>{this.z2(k)}};
this.fP(!1);l=this.tooltipRenderer.trackingParams||null;if(this.C=!!l)this.L.createServerVe(this.element,this,!0),this.L.setTrackingParams(this.element,l);this.j(y,"onShowControls",this.b0);this.j(y,"onHideControls",this.Y);this.j(y,"resize",this.TE);this.j(this.acceptButton,"click",this.Ja);this.j(this.dismissButton,"click",this.HG);this.j(document,"click",this.sj)}J(l,y){if(!this.V){if(l){this.tooltipRenderer=l;l=this.tooltipRenderer.text;var k=!1;l?.runs?.length&&l.runs[0].text&&(this.update({title:l.runs[0].text.toString()}),
k=!0);g.A2(this.title,k);k=this.tooltipRenderer.detailsText;l=!1;if(k?.runs?.length&&k.runs[0].text){{var z=k.runs[0].text.toString();const Q=z.indexOf("$TARGET_ICON");if(Q>-1)if(this.tooltipRenderer.targetId){k=[];z=z.split("$TARGET_ICON");var r=new g.Ev({U:"span",B:"ytp-promotooltip-details-icon",W:[h62[this.tooltipRenderer.targetId]]});g.x(this,r);var Z=[];for(e of z){const t=new g.Ev({U:"span",B:"ytp-promotooltip-details-component",Nd:e});g.x(this,t);Z.push(t)}z.length===2?(k.push(Z[0].element),
k.push(r.element),k.push(Z[1].element)):z.length===1&&(Q===0?(k.push(r.element),k.push(Z[0].element)):(k.push(Z[0].element),k.push(r.element)));var e=k.length?k:null}else e=null;else e=z}if(e){if(typeof e!=="string"){g.Uq(this.details);for(var A of e)this.details.appendChild(A)}else this.update({details:e});l=!0}}g.A2(this.details,l);A=this.tooltipRenderer.acceptButton;e=!1;g.E(A,$L)?.text?.runs?.length&&g.E(A,$L).text.runs[0].text&&(this.update({acceptButtonText:g.E(A,$L).text.runs[0].text.toString()}),
e=!0);g.A2(this.acceptButton,e);A=this.tooltipRenderer.dismissButton;e=!1;g.E(A,$L)?.text?.runs?.length&&g.E(A,$L).text.runs[0].text&&(this.update({dismissButtonText:g.E(A,$L).text.runs[0].text.toString()}),e=!0);g.A2(this.dismissButton,e)}y&&(this.sourceElement=y);this.Z=kj_(this);this.S=!1;this.L.O().X("web_player_hide_nitrate_promo_tooltip")||this.fP(!0);pP(this);this.VM&&!this.D&&(this.D=!0,this.d4.z2(0));this.C&&this.L.logVisibility(this.element,this.VM)}}b0(){this.N?this.J():pP(this)}Y(){this.N?
(KP(this),this.S=!0):pP(this)}Ja(){this.V=!0;this.z2(1);this.L.publish("promotooltipacceptbuttonclicked",this.acceptButton);KP(this);this.C&&this.L.logClick(this.acceptButton)}HG(){this.V=!0;this.z2(2);KP(this);this.C&&this.L.logClick(this.dismissButton)}sj(l){if(this.L.getPresentingPlayerType()===1||this.L.getPresentingPlayerType()===2&&this.K){var y=!0,k=g.rt("ytp-ad-overlay-ad-info-dialog-container"),z=g.rt("ytp-ad-player-overlay-layout"),r=kF(l);if(this.sourceElement&&r&&g.cf(this.sourceElement,
r))this.sourceElement=null;else{this.L.getPresentingPlayerType()===1&&r&&Array.from(r.classList).forEach(e=>{if(e.startsWith("ytp-ad")||e.startsWith("ytp-skip-ad"))y=!1});
var Z=z2_(this.tooltipRenderer);this.tooltipRenderer.dismissStrategy?.type==="TOOLTIP_DISMISS_TYPE_TAP_ANYWHERE"?Z&&(y=y&&!g.cf(this.element,r)):this.tooltipRenderer.dismissStrategy?.type==="TOOLTIP_DISMISS_TYPE_TAP_INTERNAL"&&(y=Z?!1:y&&g.cf(this.element,r));this.Z&&this.VM&&!k&&!z&&(!r||y&&g.ne(l))&&(this.V=!0,KP(this))}}}z2(l){var y=this.tooltipRenderer.promoConfig;if(y){let k;switch(l){case 0:y.impressionEndpoints?.length&&(k=y.impressionEndpoints[0]);break;case 1:k=y.acceptCommand;break;case 2:k=
y.dismissCommand}l=g.E(k,xr)?.feedbackToken;k&&l&&(l={feedbackTokens:[l]},y=this.L.gW(),y?.MP(k)&&ji(y,k,l))}}TE(){this.S||(this.Z||(this.Z=kj_(this)),this.J())}},h62={"ytp-settings-button":g.bM()};var G0L=class extends g.H{constructor(l){super({U:"button",L_:["ytp-replay-button","ytp-button"],G:{title:l.X("player_tooltip_data_title_killswitch")?"Ph\u00e1t l\u1ea1i":"","data-tooltip-title":"Ph\u00e1t l\u1ea1i"},W:[g.Ce()]});this.L=l;this.j(l,"presentingplayerstatechange",this.onStateChange);this.listen("click",this.onClick,this);this.IU(l.getPlayerStateObject());q1(this.L,this.element,this)}onStateChange(l){this.IU(l.state)}IU(l){this.fP(l.Z(2))}onClick(){this.L.getPlayerStateObject().isOrWillBePlaying();
this.L.playVideo()}};var aew=class extends g.H{constructor(l){super({U:"button",L_:["ytp-button","ytp-search-button"],G:{title:l.X("player_tooltip_data_title_killswitch")?"T\u00ecm ki\u1ebfm":"","data-tooltip-title":"T\u00ecm ki\u1ebfm","data-tooltip-opaque":String(g.u9(l.O()))},W:[{U:"div",B:"ytp-search-icon",Nd:"{{icon}}"},{U:"div",B:"ytp-search-title",Nd:"T\u00ecm ki\u1ebfm"}]});this.api=l;this.visible=!1;this.updateValue("icon",{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 24 24",width:"100%"},W:[{U:"path",
B:"ytp-svg-fill",G:{d:"M21.24,19.83l-5.64-5.64C16.48,13.02,17,11.57,17,10c0-3.87-3.13-7-7-7s-7,3.13-7,7c0,3.87,3.13,7,7,7 c1.57,0,3.02-0.52,4.19-1.4l5.64,5.64L21.24,19.83z M5,10c0-2.76,2.24-5,5-5s5,2.24,5,5c0,2.76-2.24,5-5,5S5,12.76,5,10z"}}]});l.createClientVe(this.element,this,184945);this.listen("click",this.onClick);this.Z();this.j(l,"appresize",this.Z);this.j(l,"videodatachange",this.Z);q1(l,this.element,this)}onClick(l){this.api.logClick(this.element);var y=g.UI(this.api.O().nS,{focusSearch:"true"}),
k={};g.UB(this.api,"addEmbedsConversionTrackingParams",[k]);y=g.UI(y,k);(k=this.api.getVideoData().Ih?.params)&&(y=g.UI(y,{bp:k}));g.kv(window,y);l.preventDefault()}Z(){if(this.api.X("embeds_web_enable_search_button")){var l=this.api.O();var y=this.api.getVideoData(),k=this.api.Yz().getPlayerSize().width;l=g.u9(l)&&k>=240&&!l.N&&!y.isAd()&&!this.api.isEmbedsShortsMode()}else l=!1;this.visible=l;this.fP(this.visible);g.I(this.element,"ytp-search-button-visible",this.visible);g.I(this.element,"ytp-show-search-title",
!this.api.xw());this.api.logVisibility(this.element,this.visible&&this.C_)}Cl(l){super.Cl(l);this.api.logVisibility(this.element,this.visible&&l)}};var i3O=class extends g.H{constructor(l){super({U:"div",B:"ytp-seek-overlay",W:[{U:"div",L_:["ytp-seek-overlay-animation","ytp-seek-overlay-animation-back"],W:[{U:"div",L_:["ytp-seek-overlay-arrow","ytp-seek-overlay-arrow-persistent"],W:[{U:"svg",G:{viewBox:"0 0 22 32",width:"22",height:"24"},W:[{U:"path",G:{d:"M 18 4 L 6 16 L 18 28",stroke:"white","stroke-width":"4","stroke-linecap":"round",fill:"none"}}]}]},{U:"div",B:"ytp-seek-overlay-duration",Nd:"{{durationBack}}"}]},{U:"div",L_:["ytp-seek-overlay-animation",
"ytp-seek-overlay-animation-forward"],W:[{U:"div",B:"ytp-seek-overlay-duration",Nd:"{{durationForward}}"},{U:"div",L_:["ytp-seek-overlay-arrow","ytp-seek-overlay-arrow-persistent"],W:[{U:"svg",G:{viewBox:"0 0 22 32",width:"22",height:"24"},W:[{U:"path",G:{d:"M 4 4 L 16 16 L 4 28",stroke:"white","stroke-width":"4","stroke-linecap":"round",fill:"none"}}]}]}]},{U:"div",B:"ytp-seek-overlay-message",W:[{U:"div",B:"ytp-seek-overlay-message-icon",Nd:"{{icon}}"},{U:"div",B:"ytp-seek-overlay-message-text",
Nd:"{{text}}"}]}]});this.L=l;this.J=0;this.Z="hidden";this.K=this.qd("ytp-seek-overlay-animation-back");this.A=this.qd("ytp-seek-overlay-animation-forward");this.D=this.qd("ytp-seek-overlay-message");this.S=new g.B_(()=>{Z5C(this)},g.i_(this.L.O().experiments,"web_player_seek_overlay_linger_duration")||1E3);
g.x(this,this.S);this.L.createClientVe(this.A,this,28240);this.L.createClientVe(this.K,this,28239);this.L.logVisibility(this.A,!0);this.L.logVisibility(this.K,!0);this.hide()}trigger(l,y,k,z){this.show();if(this.C&&l!==this.C){let r=1;this.N&&(r=QZy(this));Z5C(this,r,!1);r3e(this)}this.C=l;this.V=this.C===-1?this.K:this.A;l="";y?(this.C===-1&&this.L.getCurrentTime()<=y?this.J=y:this.J+=y,l=`${this.C===-1?"\u2212":"+"} ${this.J}`):this.J=0;this.updateValue(this.C===-1?"durationBack":"durationForward",
l);if(this.Z==="hidden"||this.Z==="fading-out")y=0,this.Z==="fading-out"&&(y=QZy(this),$I_(this)),e2Q(this,y),this.Z!=="fading-out"&&A3z(this,this.V.querySelector(".ytp-seek-overlay-arrow-persistent")),this.Z="fading-in";else if(this.Z==="fading-in"||this.Z==="lingering")y=this.V.querySelector(".ytp-seek-overlay-duration"),l=g.i_(this.L.O().experiments,"web_player_seek_overlay_duration_bump_scale")||.9,y.animate([{offset:0,easing:"cubic-bezier(0.20, 0.00, 0.60, 1.00)",transform:"scale(1)"},{offset:.64,
easing:"cubic-bezier(0.20, 0.00, 0.60, 1.00)",transform:`scale(${l})`},{offset:1,transform:"scale(1)"}],{duration:184}),$I_(this),this.Z==="lingering"&&(this.S.stop(),this.S.start());k&&tgy(this,k,z)}YH(l,y,k,z){this.trigger(l,z)}Ar(l,y,k){this.trigger(l,y);k&&(l=l===-1?this.A.visualElement:this.K.visualElement,k={seekData:k},(y=g.MM())&&yk(y,l,"INTERACTION_LOGGING_GESTURE_TYPE_KEY_PRESS",k))}y6(l,y,k){this.trigger(l,void 0,y,k)}};var Ug2=class extends g.H{constructor(l,y,k){super({U:"button",L_:["ytp-button","ytp-share-button"],G:{title:l.X("player_tooltip_data_title_killswitch")?"Chia s\u1ebb":"","data-tooltip-title":"Chia s\u1ebb","aria-haspopup":"true","aria-owns":k.element.id,"data-tooltip-opaque":String(g.u9(l.O()))},W:[{U:"div",B:"ytp-share-icon",Nd:"{{icon}}"},{U:"div",B:"ytp-share-title",Nd:"Chia s\u1ebb"}]});this.api=l;this.Z=y;this.C=k;this.visible=!1;this.tooltip=this.Z.As();l.createClientVe(this.element,this,28664);
this.listen("click",this.onClick);this.j(l,"videodatachange",this.Aa);this.j(l,"videoplayerreset",this.Aa);this.j(l,"appresize",this.Aa);this.j(l,"presentingplayerstatechange",this.Aa);this.Aa();this.addOnDisposeCallback(g.mn(this.tooltip,this.element))}onClick(){var l=this.api.O();const y=this.api.getVideoData({playerType:this.api.getPresentingPlayerType()}),k=this.api.getPlaylistId();l=this.api.X("enable_share_button_url_fix")?this.api.getVideoUrl(!0,!0,!0):l.getVideoUrl(y.videoId,k,void 0,!0);
if(navigator.share)try{const z=navigator.share({title:y.title,url:l});z instanceof Promise&&z.catch(r=>{O5C(this,r)})}catch(z){z instanceof Error&&O5C(this,z)}else this.Z.u4(),SS(this.C,this.element,!1);
this.api.logClick(this.element)}Aa(){var l=this.api.O();const y=this.api.isEmbedsShortsMode();g.I(this.element,"ytp-show-share-title",g.u9(l)&&!y);this.Z.qV()&&y?(l=(this.api.Yz().getPlayerSize().width-this.api.getVideoContentRect().width)/2,g.n9(this.element,"right",`${l}px`)):y&&g.n9(this.element,"right","0px");this.updateValue("icon",{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"m 20.20,14.19 0,-4.45 7.79,7.79 -7.79,7.79 0,-4.56 C 16.27,20.69 12.10,21.81 9.34,24.76 8.80,25.13 7.60,27.29 8.12,25.65 9.08,21.32 11.80,17.18 15.98,15.38 c 1.33,-0.60 2.76,-0.98 4.21,-1.19 z"}}]});
this.visible=g6(this);g.I(this.element,"ytp-share-button-visible",this.visible);this.fP(this.visible);this.tooltip.W1();this.api.logVisibility(this.element,g6(this)&&this.C_)}Cl(l){super.Cl(l);this.api.logVisibility(this.element,this.visible&&l)}Vj(){super.Vj();g.ZM(this.element,"ytp-share-button-visible")}};var MRR=class extends sD{constructor(l,y){var k=rM();const z=l.O();k={U:"div",B:"ytp-share-panel",G:{id:rM(),role:"dialog","aria-labelledby":k},W:[{U:"div",B:"ytp-share-panel-inner-content",W:[{U:"div",B:"ytp-share-panel-title",G:{id:k},Nd:"Chia s\u1ebb"},{U:"a",L_:["ytp-share-panel-link","ytp-no-contextmenu"],G:{href:"{{link}}",target:z.D,title:"Chi\u0309a se\u0309 li\u00ean k\u00ea\u0301t","aria-label":"{{shareLinkWithUrl}}"},Nd:"{{linkText}}"},{U:"label",B:"ytp-share-panel-include-playlist",W:[{U:"input",
B:"ytp-share-panel-include-playlist-checkbox",G:{type:"checkbox",checked:"true"}},"Bao g\u1ed3m danh s\u00e1ch ph\u00e1t"]},{U:"div",B:"ytp-share-panel-loading-spinner",W:[DK()]},{U:"div",B:"ytp-share-panel-service-buttons",Nd:"{{buttons}}"},{U:"div",B:"ytp-share-panel-error",Nd:"\u0110\u00e3 x\u1ea3y ra l\u1ed7i trong khi truy xu\u1ea5t th\u00f4ng tin chia s\u1ebb. Vui l\u00f2ng th\u1eed l\u1ea1i sau."}]},{U:"button",L_:["ytp-share-panel-close","ytp-button"],G:{title:"\u0110o\u0301ng"},W:[g.wM()]}]};
super(l,k,250);this.moreButton=null;this.api=l;this.tooltip=y.As();this.C=[];this.V=this.qd("ytp-share-panel-inner-content");this.closeButton=this.qd("ytp-share-panel-close");this.j(this.closeButton,"click",this.Xv);this.addOnDisposeCallback(g.mn(this.tooltip,this.closeButton));this.N=this.qd("ytp-share-panel-include-playlist-checkbox");this.j(this.N,"click",this.Aa);this.Z=this.qd("ytp-share-panel-link");this.addOnDisposeCallback(g.mn(this.tooltip,this.Z));this.api.createClientVe(this.Z,this,164503);
this.j(this.Z,"click",r=>{r.preventDefault();this.api.logClick(this.Z);var Z=this.api.getVideoUrl(!0,!0,!1,!1);Z=h2P(this,Z);g.Hl(Z,this.api,r)&&g.G3(this.api,"SHARE_CLICKED")});
this.listen("click",this.K);this.j(l,"videoplayerreset",this.hide);this.j(l,"fullscreentoggled",this.onFullscreenToggled);this.j(l,"onLoopRangeChange",this.Y);this.hide()}K(l){l=kF(l);g.cf(this.V,l)||g.cf(this.closeButton,l)||SS(this)}Xv(){super.Xv();this.tooltip.WZ(this.element);this.api.logVisibility(this.Z,!1);for(const l of this.C)this.api.hasVe(l.element)&&this.api.logVisibility(l.element,!1)}show(){const l=this.VM;super.show();this.Aa();l||g.G3(this.api,"onSharePanelOpened")}Y(){this.VM&&this.Aa()}Aa(){g.zi(this.element,
"ytp-share-panel-loading");g.ZM(this.element,"ytp-share-panel-fail");var l=this.api.getVideoData();const y=this.api.getPlaylistId()&&this.N.checked;l.getSharePanelCommand&&ji(this.api.gW(),l.getSharePanelCommand,{includeListId:y}).then(k=>{this.IR()||(g.ZM(this.element,"ytp-share-panel-loading"),Gjg(this,k))});
l=this.api.getVideoUrl(!0,!0,!1,!1);this.updateValue("link",l);this.updateValue("linkText",l);this.updateValue("shareLinkWithUrl",g.Ts("Chia s\u1ebb \u0111\u01b0\u1eddng li\u00ean k\u1ebft $URL",{URL:l}));lo(this.Z);this.api.logVisibility(this.Z,!0)}onFullscreenToggled(l){!l&&this.aH()&&SS(this)}focus(){this.Z.focus()}Vj(){super.Vj();dIQ(this)}};var XCv=class extends VH{constructor(l){super(l);this.V=this.Z=this.isContentForward=this.Y=!1;this.element.setAttribute("data-overlay-order","8");X7P(this);this.j(this.L,"changeProductsInVideoVisibility",this.u0);this.j(this.L,"videodatachange",this.onVideoDataChange)}Vj(){jp(this);super.Vj()}rb(l){l.target!==this.dismissButton.element&&(this.S(!1),g.G3(this.L,"innertubeCommand",this.onClickCommand))}K(){this.R7=!0;this.S(!0);this.C()}u0(l){this.Y=l;this.C()}onVideoDataChange(l,y){if(l=!!y.videoId&&
this.videoId!==y.videoId)this.videoId=y.videoId,this.R7=!1,this.RR=!0,this.b0=this.HG=!1,jp(this),a1s(this,!1),this.V=this.Z=!1,Sp(this),i5y(this);if(l||!y.videoId)this.Ja=this.N=!1;if(y?.getPlayerResponse()?.videoDetails?.isLiveContent)this.Ul(!1);else{y=g.E(y.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.productsInVideoOverlayRenderer,NS_);this.Y=this.enabled=!1;if(y){if(l=y?.featuredProductsEntityKey){var k=g.IH.getState().entities;if(yX(k,"featuredProductsEntity",l)?.productsData){this.Ul(!1);
return}}if(!y.text||!y.onClickCommand||!y.timing){this.Ul(!1);return}this.enabled=!0;this.N||(l=y.badgeInteractionLogging?.trackingParams,(this.N=!!l)&&this.L.setTrackingParams(this.badge.element,l||null));this.Ja||(this.Ja=!!y.dismissButton?.trackingParams)&&this.L.setTrackingParams(this.dismissButton.element,y.dismissButton?.trackingParams||null);if(y.isContentForward){l=y.productsData;a1s(this,!0);i5y(this);l=Mg_(this,l);k=[];l.length>0&&k.push(l[0]);if(l.length>1){const z=new g.H({U:"div",B:"ytp-suggested-action-more-products-icon"});
g.x(this,z);k.push(z);k.push(...l.slice(1))}this.D=new g.H({U:"div",W:k,B:"ytp-suggested-action-content-forward-container"});g.x(this,this.D);this.xz.element.append(this.D.element)}this.text=g.$b(y.text);if(l=y.dismissButton?.a11yLabel)this.MW=g.$b(l);this.onClickCommand=y.onClickCommand;this.timing=y.timing;this.Wa()}D8(this);Rn(this);this.C()}}A(){return!this.Y&&this.enabled&&!this.R7&&!this.L.xw()&&!this.vn&&(this.b0||this.RR)}mK(l){super.mK(l);if(this.Z||this.V)this.timing&&ED(this.timing.preview)&&
(this.Z=!1,Sp(this),this.V=!1,Sp(this),this.L.Ur("shopping_overlay_preview_collapsed"),this.L.Ur("shopping_overlay_preview_expanded"),l=nP(this.timing.preview.startSec,this.timing.preview.endSec,"shopping_overlay_expanded"),ED(this.timing.expanded)&&this.timing.preview.endSec===this.timing.expanded.startSec&&(this.L.Ur("shopping_overlay_expanded"),l.end=this.timing.expanded.endSec*1E3),this.L.Wa([l])),this.HG=!0,Rn(this);Sp(this)}Ul(l){(this.b0=l)?(Hr(this),Rn(this,!1)):(jp(this),this.WG.start());
this.C()}Wa(l=0){var y=this.timing;l+=this.L.getCurrentTime();const k=[];var z=y.visible;const r=y.preview;y=y.expanded;ED(z)&&(fP(z,l),k.push(nP(z.startSec,z.endSec,"shopping_overlay_visible")));ED(r)&&(fP(r,l),z=r.startSec+1,k.push(nP(r.startSec,z,"shopping_overlay_preview_collapsed")),k.push(nP(z,r.endSec,"shopping_overlay_preview_expanded")));ED(y)&&(fP(y,l),k.push(nP(y.startSec,y.endSec,"shopping_overlay_expanded")));this.L.Wa(k)}C(){super.C();this.L.getRootNode()&&g.I(this.L.getRootNode(),"ytp-shopping-pill-shown",
this.A())}};var cmx=class extends g.H{constructor(l){super({U:"div",B:"ytp-shorts-title-channel",W:[{U:"a",B:"ytp-shorts-title-channel-logo",G:{href:"{{channelLink}}",target:l.O().D,"aria-label":"{{channelLogoLabel}}"}},{U:"div",B:"ytp-shorts-title-expanded-heading",W:[{U:"div",B:"ytp-shorts-title-expanded-title",W:[{U:"a",Nd:"{{expandedTitle}}",G:{href:"{{channelTitleLink}}",target:l.O().D,tabIndex:"0"}}]}]}]});this.api=l;this.Z=this.qd("ytp-shorts-title-channel-logo");this.channelName=this.qd("ytp-shorts-title-expanded-title");
this.subscribeButton=null;l.createClientVe(this.Z,this,36925);this.j(this.Z,"click",y=>{this.api.logClick(this.Z);g.kv(window,c3y(this));y.preventDefault()});
l.createClientVe(this.channelName,this,37220);this.j(this.channelName,"click",y=>{this.api.logClick(this.channelName);g.kv(window,c3y(this));y.preventDefault()});
Cmt(this);this.j(l,"videodatachange",this.Aa);this.j(l,"videoplayerreset",this.Aa);this.Aa()}Aa(){const l=this.api.O();this.fP(g.u9(l)&&this.api.isEmbedsShortsMode());this.subscribeButton&&this.api.logVisibility(this.subscribeButton.element,this.VM);const y=this.api.getVideoData();let k=!1;this.api.getPresentingPlayerType()===2?k=!!y.videoId&&!!y.isListed&&!!y.author&&!!y.u0&&!!y.profilePicture:g.u9(l)&&(k=!!y.videoId&&!!y.u0&&!!y.profilePicture&&!y.Wn&&!l.N&&!(l.K&&this.api.getPlayerSize().width<
200));b5C(this,k,y.profilePicture,g.u9(l)?y.expandedTitle:y.author);this.subscribeButton&&(this.subscribeButton.channelId=y.Fu);this.updateValue("expandedTitle",y.expandedTitle)}};var Crx=class extends sD{constructor(l){super(l,{U:"button",L_:["ytp-skip-intro-button","ytp-popup","ytp-button"],W:[{U:"div",B:"ytp-skip-intro-button-text",Nd:"B\u1ecf qua \u0111o\u1ea1n gi\u1edbi thi\u1ec7u"}]},100);this.C=!1;this.Z=new g.B_(()=>{this.hide()},5E3);
this.dQ=this.Yj=NaN;g.x(this,this.Z);this.K=()=>{this.show()};
this.V=()=>{this.hide()};
this.N=()=>{const y=this.L.getCurrentTime();y>this.Yj/1E3&&y<this.dQ/1E3&&this.show()};
this.j(this.L,"videodatachange",(y,k)=>{this.HZ(y,k)});
this.j(this.element,"click",()=>{this.L.seekTo(this.dQ/1E3)});
this.hide()}show(){super.show();this.Z.start()}hide(){super.hide();this.Z.stop()}HZ(l,y){l==="dataloaded"&&((this.Yj=y.Yj,this.dQ=y.dQ,isNaN(this.Yj)||isNaN(this.dQ))?this.C&&(this.L.Ur("intro"),this.L.removeEventListener(g.uR("intro"),this.K),this.L.removeEventListener(g.xR("intro"),this.V),this.L.removeEventListener("onShowControls",this.N),this.hide(),this.C=!1):(this.L.addEventListener(g.uR("intro"),this.K),this.L.addEventListener(g.xR("intro"),this.V),this.L.addEventListener("onShowControls",
this.N),l=new g.N1(this.Yj,this.dQ,{priority:9,namespace:"intro"}),this.L.Wa([l]),this.C=!0))}};var b31=class extends g.H{constructor(l){super({U:"button",L_:["ytp-airplay-button","ytp-button"],G:{title:l.X("player_tooltip_data_title_killswitch")?"AirPlay":"","data-tooltip-title":"AirPlay","data-priority":"11"},Nd:"{{icon}}"});this.L=l;this.listen("click",this.onClick);this.j(l,"airplayactivechange",this.Aa);this.j(l,"airplayavailabilitychange",this.Aa);this.Aa();q1(l,this.element,this)}onClick(){this.L.gw()}Aa(){var l=!0;g.u9(this.L.O())&&(l=l&&this.L.Yz().getPlayerSize().width>=480);this.fP(l);
l=this.updateValue;var y=this.L.X("delhi_modern_web_player_icons");const k=y?{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M23 17V5C23.00 4.50 22.81 4.02 22.48 3.65C22.15 3.29 21.69 3.06 21.20 3.01L21 3H3L2.79 3.01C2.30 3.06 1.84 3.29 1.51 3.65C1.18 4.02 .99 4.50 1 5V17C0.99 17.49 1.18 17.97 1.51 18.34C1.84 18.70 2.30 18.93 2.79 18.99L3 19H5.93L7.65 17H3V5H21V17H16.35L18.06 19H21L21.20 18.99C21.69 18.93 22.15 18.70 22.48 18.34C22.81 17.97 23.00 17.49 23 17ZM17.29 21.17L12 15L6.70 21.17C6.64 21.24 6.60 21.33 6.59 21.43C6.57 21.52 6.59 21.62 6.63 21.70C6.67 21.79 6.73 21.86 6.81 21.92C6.89 21.97 6.99 22 7.08 22H16.91C17.00 22 17.10 21.97 17.18 21.92C17.26 21.86 17.32 21.79 17.36 21.70C17.40 21.62 17.42 21.52 17.40 21.43C17.39 21.33 17.35 21.24 17.29 21.17Z",
fill:"white"}}]}:{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,G:{d:"M11,13 L25,13 L25,21 L11,21 L11,13 Z M12,28 L24,28 L18,22 L12,28 Z M27,9 L9,9 C7.9,9 7,9.9 7,11 L7,23 C7,24.1 7.9,25 9,25 L13,25 L13,23 L9,23 L9,11 L27,11 L27,23 L23,23 L23,25 L27,25 C28.1,25 29,24.1 29,23 L29,11 C29,9.9 28.1,9 27,9 L27,9 Z",fill:"#fff"}}]};y=y?{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M23 17V5C23.00 4.50 22.81 4.02 22.48 3.65C22.15 3.29 21.69 3.06 21.20 3.01L21 3H3L2.79 3.01C2.30 3.06 1.84 3.29 1.51 3.65C1.18 4.02 .99 4.50 1 5V17C0.99 17.49 1.18 17.97 1.51 18.34C1.84 18.70 2.30 18.93 2.79 18.99L3 19H5.93L7.65 17H3V5H21V17H16.35L18.06 19H21L21.20 18.99C21.69 18.93 22.15 18.70 22.48 18.34C22.81 17.97 23.00 17.49 23 17ZM17.29 21.17L12 15L6.70 21.17C6.64 21.24 6.60 21.33 6.59 21.43C6.57 21.52 6.59 21.62 6.63 21.70C6.67 21.79 6.73 21.86 6.81 21.92C6.89 21.97 6.99 22 7.08 22H16.91C17.00 22 17.10 21.97 17.18 21.92C17.26 21.86 17.32 21.79 17.36 21.70C17.40 21.62 17.42 21.52 17.40 21.43C17.39 21.33 17.35 21.24 17.29 21.17Z",
fill:"white"}}]}:{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"M12,28 L24,28 L18,22 L12,28 Z M27,9 L9,9 C7.9,9 7,9.9 7,11 L7,23 C7,24.1 7.9,25 9,25 L13,25 L13,23 L9,23 L9,11 L27,11 L27,23 L23,23 L23,25 L27,25 C28.1,25 29,24.1 29,23 L29,11 C29,9.9 28.1,9 27,9 L27,9 Z"}}]};l.call(this,"icon",this.L.Jk()?k:y)}};var uv1=class extends g.H{constructor(l){super({U:"div",B:"ytp-gradient-bottom"});this.C=g.Gf("CANVAS");this.Z=this.C.getContext("2d",{willReadFrequently:!0});this.N=NaN;this.C.width=1;uiz(this,l.Yz().getPlayerSize().height)}Vj(){this.Z=null;super.Vj()}};var xgO=class extends g.H{constructor(l,y,k,z){super({U:"div",B:"ytp-chapter-container",W:[{U:"button",L_:["ytp-chapter-title","ytp-button"],W:[{U:"span",G:{"aria-hidden":"true"},B:"ytp-chapter-title-prefix",Nd:"\u2022"},{U:"div",B:"ytp-chapter-title-content",Nd:"{{chapterTitle}}",G:{"aria-label":"{{ariaLabel}}","aria-live":"polite",title:l.X("player_tooltip_data_title_killswitch")?z:"","data-tooltip-title":z}},{U:"div",B:"ytp-chapter-title-chevron",W:[{U:"svg",G:{height:"100%",viewBox:"0 0 24 24",
width:"100%"},W:[{U:"path",G:{d:"M9.71 18.71l-1.42-1.42 5.3-5.29-5.3-5.29 1.42-1.42 6.7 6.71z",fill:"#fff"}}]}]}]}]});this.L=l;this.V=y;this.S="";this.currentIndex=0;this.C=void 0;this.N=!0;this.D=this.qd("ytp-chapter-container");this.Z=this.qd("ytp-chapter-title");this.J=this.qd("ytp-chapter-title-content");this.A();this.updateVideoData("newdata",this.L.getVideoData());this.j(l,"videodatachange",this.updateVideoData);this.j(l,"resize",this.A);this.j(this.D,"click",this.onClick);this.j(l,g.uR(k),
this.Pn);this.j(l,"onLoopRangeChange",this.Pn);this.j(l,"innertubeCommand",this.onClickCommand);(l=g.cn(this.L.O()))&&g.I(this.Z,"ytp-profile-page",!0);g.u9(this.L.O())||l||q1(this.L,this.J,this)}onClick(){g.G3(this.L,"innertubeCommand",this.C)}A(){if(this.L.X("delhi_modern_web_player")){var l=this.L.getPlayerSize();l.width&&(this.element.style.maxWidth=`${l.width*.25}px`)}}};var mgw=class extends xgO{constructor(l,y){super(l,y,"chapterCueRange","Xem ch\u01b0\u01a1ng");this.K=""}onClickCommand(l){g.E(l,WF)&&this.Pn()}updateVideoData(l,y){l=g.E(y.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.decoratedPlayerBarRenderer,e2);l=g.E(l?.playerBarActionButton,$L);this.L.X("web_player_updated_entrypoint")&&(this.K=Rd(l?.text),this.J.setAttribute("title",l?.tooltip??"Xem ch\u01b0\u01a1ng"));this.C=l?.command;mI5(this)}Pn(){var l=this.K;const y=this.V.Z;var k=this.L.getLoopRange()?.type===
"clips";if(y.length>1&&!k){l=this.L.getProgressState().current*1E3;k=IX(y,l);l=y[k].title||"Ph\u00e2n c\u1ea3nh";if(k!==this.currentIndex||this.N)g.G3(this.L,"innertubeCommand",y[k].onActiveCommand),this.currentIndex=k;this.N=!1}else this.N=!0;xIe(this,l)}};var qlw=class extends g.kD{constructor(l){super({U:"button",L_:["ytp-expand-right-bottom-section-button","ytp-button"],G:{title:"{{title}}","aria-pressed":"{{pressed}}","data-priority":"1","data-title-no-tooltip":"{{data-title-no-tooltip}}"},W:[g.dM()]});this.Z=!1;this.listen("click",this.C);l.createClientVe(this.element,this,276954)}C(){this.element.parentElement?.classList.contains("ytp-right-controls-left");(this.Z=!this.Z)?this.publish("small-mode-expand-right-bottom-controls"):this.publish("small-mode-collapse-right-bottom-controls")}isExpanded(){return this.Z}};var WiO=class extends g.H{constructor(l,y){super({U:"div",B:"ytp-storyboard-framepreview",W:[{U:"div",B:"ytp-storyboard-framepreview-timestamp",Nd:"{{timestamp}}"},{U:"div",B:"ytp-storyboard-framepreview-img"}]});this.api=l;this.C=this.qd("ytp-storyboard-framepreview-img");this.Z=null;this.frameIndex=NaN;this.events=new g.cI(this);this.fade=new g.oT(this,100);g.x(this,this.events);g.x(this,this.fade);this.j(this.api,"presentingplayerstatechange",this.N);y&&this.j(this.element,"click",()=>{y.fd()})}N(l){l.state.Z(32)?
FG(this,this.api.mS()):this.VM&&(l.state.Z(16)||l.state.Z(1))||this.fade.hide()}onProgress(){const l=this.api.getPlayerStateObject();
(l.Z(32)||l.Z(16))&&oX(this)}V(){this.frameIndex=NaN;oX(this)}hide(){this.Z&&FG(this,null);super.hide()}};var Iey=class extends g.H{constructor(l,y){super({U:"button",L_:["ytp-fullscreen-button","ytp-button"],G:{title:l.X("player_tooltip_data_title_killswitch")?"{{title}}":"","data-tooltip-title":"{{tooltip-title}}","aria-label":"{{aria-label}}","aria-keyshortcuts":"f","data-priority":"12","data-title-no-tooltip":"{{data-title-no-tooltip}}"},Nd:"{{icon}}"});this.L=l;this.C=y;this.message=null;this.Z=g.mn(this.C.As(),this.element);this.N=new g.B_(this.J,2E3,this);g.x(this,this.N);this.j(l,"fullscreentoggled",
this.yG);this.j(l,"presentingplayerstatechange",this.Aa);this.j(l,"resize",this.Aa);this.listen("click",this.onClick);g.LL()&&(y=this.L.Yz(),this.j(y,SCs(),this.V),this.j(y,juP(document),this.BU));l.O().Oj||l.O().K||this.disable();l.createClientVe(this.element,this,139117);this.Aa();this.yG(l.isFullscreen())}onClick(){if(this.L.O().Oj||this.L.O().K){this.L.logClick(this.element);try{this.L.toggleFullscreen().catch(l=>{this.dc(l)})}catch(l){this.dc(l)}}else SS(this.message,this.element,!0)}dc(l){String(l).includes("fullscreen error")?
g.WH(l):g.n(l);
this.V()}V(){this.disable();this.message.Bn(this.element,!0)}BU(){vD()===this.L.getRootNode()?this.N.start():(this.N.stop(),this.message&&this.message.hide())}J(){if(window.screen&&window.outerWidth&&window.outerHeight){const l=window.screen.width*.9,y=window.screen.height*.9;let k=Math.max(window.outerWidth,window.innerWidth),z=Math.max(window.outerHeight,window.innerHeight);if(k>z!==l>y){const r=k;k=z;z=r}l>k&&y>z&&this.V()}}disable(){if(!this.message){var l=(of(["requestFullscreen","webkitRequestFullscreen",
"mozRequestFullScreen","msRequestFullscreen"],document.body)!=null?"Ch\u1ebf \u0111\u1ed9 to\u00e0n m\u00e0n h\u00ecnh kh\u00f4ng kh\u1ea3 d\u1ee5ng. $BEGIN_LINKT\u00ecm hi\u1ec3u th\u00eam$END_LINK":"Tr\u00ecnh duy\u1ec7t c\u1ee7a b\u1ea1n kh\u00f4ng h\u1ed7 tr\u1ee3 ch\u1ebf \u0111\u1ed9 to\u00e0n m\u00e0n h\u00ecnh. $BEGIN_LINKT\u00ecm hi\u1ec3u th\u00eam$END_LINK").split(/\$(BEGIN|END)_LINK/);this.message=new sD(this.L,{U:"div",L_:["ytp-popup","ytp-generic-popup"],G:{role:"alert",tabindex:"0"},
W:[l[0],{U:"a",G:{href:"https://support.google.com/youtube/answer/6276924",target:this.L.O().D},Nd:l[2]},l[4]]},100,!0);this.message.hide();g.x(this,this.message);this.message.subscribe("show",y=>{this.C.CU(this.message,y)});
g.pi(this.L,this.message.element,4);this.element.setAttribute("aria-disabled","true");this.element.setAttribute("aria-haspopup","true");(0,this.Z)();this.Z=null}}Aa(){const l=lTz(this.L),y=this.L.O().K&&this.L.getPlayerSize().width<250;this.fP(l&&!y);this.L.logVisibility(this.element,this.VM)}yG(l){let y;l?(y=g.Wl(this.L,"Tho\u00e1t kh\u1ecfi ch\u1ebf \u0111\u1ed9 to\u00e0n m\u00e0n h\u00ecnh","f"),this.update({"data-title-no-tooltip":"Tho\u00e1t kh\u1ecfi ch\u1ebf \u0111\u1ed9 to\u00e0n m\u00e0n h\u00ecnh"}),
document.activeElement===this.element&&this.L.getRootNode().focus(),document.pictureInPictureElement&&document.exitPictureInPicture().catch(k=>{g.WH(k)})):(y=g.Wl(this.L,"To\u00e0n m\u00e0n h\u00ecnh","f"),this.update({"data-title-no-tooltip":"To\u00e0n m\u00e0n h\u00ecnh"}));
l=WDC(this,l);y=this.message?null:y;this.L.O().X("player_tooltip_data_title_killswitch")?this.update({title:y,icon:l}):this.update({"tooltip-title":y,"aria-label":y,icon:l});this.C.As().W1()}Vj(){this.message||((0,this.Z)(),this.Z=null);super.Vj()}Cl(l){super.Cl(l)}};var T42=class extends g.H{constructor(l,y){super({U:"button",L_:["ytp-button","ytp-jump-button"],G:{title:l.X("player_tooltip_data_title_killswitch")?"{{title}}":"","data-tooltip-title":"{{tooltip-title}}","aria-keyshortcuts":"{{aria-keyshortcuts}}","data-title-no-tooltip":"{{data-title-no-tooltip}}"},W:[y>0?{U:"svg",G:{height:"100%",mlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"100%"},W:[{U:"path",L_:["ytp-circle-arrow","ytp-svg-fill"],G:{d:"m19,12c0,2.1 -0.93,4.07 -2.55,5.4c-1.62,1.34 -3.76,1.87 -5.86,1.46c-2.73,-0.53 -4.92,-2.72 -5.45,-5.45c-0.41,-2.1 .12,-4.24 1.46,-5.86c1.33,-1.62 3.3,-2.55 5.4,-2.55l1.27,0l-0.85,.85l1.41,1.41l3.35,-3.35l-3.35,-3.35l-1.41,1.41l1.01,1.03l-1.43,0c-2.7,0 -5.23,1.19 -6.95,3.28c-1.72,2.08 -2.4,4.82 -1.88,7.52c0.68,3.52 3.51,6.35 7.03,7.03c0.6,.11 1.19,.17 1.78,.17c2.09,0 4.11,-0.71 5.74,-2.05c2.09,-1.72 3.28,-4.25 3.28,-6.95l-2,0z"}},
{U:"text",L_:["ytp-jump-button-text","ytp-svg-fill"],G:{x:"7.05",y:"15.05"}}]}:{U:"svg",G:{height:"100%",mlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"100%"},W:[{U:"path",L_:["ytp-circle-arrow","ytp-svg-fill"],G:{d:"m18.95,6.28c-1.72,-2.09 -4.25,-3.28 -6.95,-3.28l-1.43,0l1.02,-1.02l-1.41,-1.41l-3.36,3.35l3.35,3.35l1.41,-1.41l-0.85,-0.86l1.27,0c2.1,0 4.07,.93 5.4,2.55c1.34,1.62 1.87,3.76 1.46,5.86c-0.53,2.73 -2.72,4.92 -5.45,5.45c-2.11,.41 -4.24,-0.12 -5.86,-1.46c-1.62,-1.33 -2.55,-3.3 -2.55,-5.4l-2,0c0,2.7 1.19,5.23 3.28,6.95c1.62,1.34 3.65,2.05 5.74,2.05c0.59,0 1.19,-0.06 1.78,-0.17c3.52,-0.68 6.35,-3.51 7.03,-7.03c0.52,-2.7 -0.17,-5.44 -1.88,-7.52z"}},
{U:"text",L_:["ytp-jump-button-text","ytp-svg-fill"],G:{x:"6.5",y:"15"}}]}]});this.L=l;this.Z=y;this.C=new g.B_(()=>{this.N?(this.N=!1,this.C.start()):this.element.classList.remove("ytp-jump-spin","backwards")},250);
this.N=!1;(y=y>0)?this.L.createClientVe(this.element,this,36843):this.L.createClientVe(this.element,this,36844);const k=g.Ts(y?"Tua t\u1edbi $SECONDS gi\u00e2y. (\u2192)":"Tua lui $SECONDS gi\u00e2y. (\u2190)",{SECONDS:Math.abs(this.Z).toString()});this.L.X("player_tooltip_data_title_killswitch")?this.update({title:k,"data-title-no-tooltip":k,"aria-keyshortcuts":y?"\u2192":"\u2190"}):this.update({"tooltip-title":k,"data-title-no-tooltip":k,"aria-keyshortcuts":y?"\u2192":"\u2190"});this.V=this.element.querySelector(".ytp-jump-button-text");
this.V.textContent=Math.abs(this.Z).toString();this.listen("click",this.onClick,this);q1(l,this.element,this)}onClick(){this.L.logClick(this.element);this.L.seekBy(this.Z,!0);var l=this.Z>0?1:-1,y=Math.abs(this.Z);const k=this.L.KS().qB;k&&k.Ar(l,y);this.C.isActive()?this.N=!0:(l=["ytp-jump-spin"],this.Z<0&&l.push("backwards"),this.element.classList.add(...l),this.C.Kl())}};var VRL=class extends xgO{constructor(l,y){super(l,y,"timedMarkerCueRange","Xem kho\u1ea3nh kh\u1eafc quan tr\u1ecdng");this.j(l,g.xR("timedMarkerCueRange"),this.Pn);this.j(l,"updatemarkervisibility",this.updateVideoData)}onClickCommand(l){g.E(l,jO5)&&this.Pn()}updateVideoData(){this.C=TrT(this)?.onTap?.innertubeCommand;mI5(this)}Pn(){var l="";const y=this.V.A;var k=TrT(this)?.headerTitle;k=k?g.$b(k):"";var z=this.L.getLoopRange()?.type==="clips";y.length>1&&!z&&(l=this.L.getProgressState().current*
1E3,z=vYz(y,l),l=z!=null?y[z].title:k,z!=null&&z!==this.currentIndex&&(g.G3(this.L,"innertubeCommand",y[z].onActiveCommand),this.currentIndex=z));xIe(this,l)}};var Prp=class extends g.H{constructor(l){super({U:"button",L_:["ytp-miniplayer-button","ytp-button"],G:{title:l.X("player_tooltip_data_title_killswitch")?"{{title}}":"","data-tooltip-title":"{{tooltip-title}}","aria-keyshortcuts":"i","data-priority":"7","data-title-no-tooltip":"{{data-title-no-tooltip}}","data-tooltip-target-id":"ytp-miniplayer-button"},W:["{{icon}}"]});this.L=l;this.visible=!1;this.listen("click",this.onClick);this.j(l,"fullscreentoggled",this.Aa);this.L.X("player_tooltip_data_title_killswitch")?
this.update({title:g.Wl(l,"Tr\u00ecnh ph\u00e1t thu nh\u1ecf","i"),"data-title-no-tooltip":"Tr\u00ecnh ph\u00e1t thu nh\u1ecf",icon:Vgt(this)}):this.update({"tooltip-title":g.Wl(l,"Tr\u00ecnh ph\u00e1t thu nh\u1ecf","i"),"data-title-no-tooltip":"Tr\u00ecnh ph\u00e1t thu nh\u1ecf",icon:Vgt(this)});q1(l,this.element,this);l.createClientVe(this.element,this,62946);this.Aa()}onClick(){g.G3(this.L,"onCollapseMiniplayer");this.L.logClick(this.element)}Aa(){this.visible=!this.L.isFullscreen();this.fP(this.visible);
this.L.logVisibility(this.element,this.visible&&this.C_)}Cl(l){super.Cl(l);this.L.logVisibility(this.element,this.visible&&l)}};var p74=new c9(0,0,.05,0,0,1,1,1),Jm2=class extends g.H{constructor(l,y,k,z,r,Z=!1){const e={U:"div",L_:["ytp-input-slider-section"],W:[{U:"input",B:"ytp-input-slider",G:{role:"slider",tabindex:"0",type:"range",min:"{{minvalue}}",max:"{{maxvalue}}","aria-valuemin":"{{ariaMinValue}}","aria-valuemax":"{{ariaMaxValue}}","aria-valuenow":"{{ariaValueNow}}","aria-valuetext":"{{ariaValueText}}",step:"{{stepvalue}}",value:"{{slidervalue}}"}}]};r&&e.W.unshift(r);Z&&e.L_.push("ytp-vertical-slider");super(e);
this.N=l;this.S=y;this.A=k;this.initialValue=z;this.header=r;this.V=0;this.C=this.qd("ytp-input-slider");this.Z=z?z:l;this.init();this.j(this.C,"input",this.J);this.j(this.C,"keydown",this.K)}init(){this.update({minvalue:this.N,maxvalue:this.S,stepvalue:this.A,slidervalue:this.Z,ariaValueNow:this.Z,ariaMinValue:this.N,ariaMaxValue:this.S,ariaValueText:`${this.Z.toFixed(2)}`});Pms(this,this.Z)}J(){N7(this,Number(this.C.value));this.C.focus()}K(l){if(!l.defaultPrevented){switch(l.code){case "ArrowDown":l=
-this.A;break;case "ArrowUp":l=this.A;break;default:return}N7(this,Math.min(this.S,Math.max(Number((this.Z+l).toFixed(2)),this.N)))}}};var Yly=class extends Jm2{constructor(l){super(0,100,1,l.isMuted()?0:l.getVolume(),void 0,!0);this.L=l;this.Y=Yg(this.sj,10,this);this.D=!1;this.j(l,"onVolumeChange",this.onVolumeChange);this.j(this.element,"wheel",this.b0)}onVolumeChange(l){if(this.D)this.D=!1;else{var y=l.volume;y===0||l.muted?N7(this,0):N7(this,y)}}J(){super.J();this.Y(this.Z)}b0(l){var y=-l.deltaY;y=l.deltaMode===WheelEvent.DOM_DELTA_LINE||l.deltaMode===WheelEvent.DOM_DELTA_PAGE?g.gf(this.Z+y,0,100):g.gf(this.Z+g.gf(y/10,-10,
10),0,100);y===0?N7(this,0):N7(this,y);this.Y(y);l.preventDefault();l.stopPropagation()}sj(l,y){this.D=!0;l===0||y?this.L.mute():(this.L.isMuted()&&this.L.unMute(),this.L.setVolume(l))}};var pCx=class extends g.H{constructor(l,y){super({U:"div",G:{tabindex:"0",title:l.X("player_tooltip_data_title_killswitch")?"\u00c2m l\u01b0\u1ee3ng":"","data-tooltip-title":"\u00c2m l\u01b0\u1ee3ng","data-tooltip-offset-y":"-120"},L_:["ytp-volume-popover"]});this.isVisible=!1;this.tooltip=y.As();this.V=new Yly(l);g.x(this,this.V);this.V.Uj(this.element);this.Z=new g.B_(()=>{KDg(this,!1)},300);
this.listen("mouseenter",()=>{this.Z.stop()});
this.listen("mouseleave",()=>{this.N()});
this.listen("focus",()=>{this.Z.stop()});
this.j(this.V.C,"focus",()=>{this.Z.stop()});
this.listen("focusout",()=>{this.N();this.element.dispatchEvent(new Event("blur"))});
this.addOnDisposeCallback(g.mn(y.As(),this.element));g.x(this,this.Z)}C(){KDg(this,!0)}N(){this.Z.start()}S(){this.Z.stop()}J(){return this.isVisible}};var NF=class extends g.H{constructor(l,y){var k=l.O().HG?{"aria-keyshortcuts":"m","aria-label":"{{aria-label}}","data-title-no-tooltip":"{{data-title-no-tooltip}}","data-priority":"{{dataPriority}}","data-tooltip-offset-y":"{{dataTooltipOffsetY}}","data-tooltip-title":"{{tooltip-title}}",title:l.X("player_tooltip_data_title_killswitch")?"{{title}}":""}:{"aria-disabled":"true","aria-haspopup":"true"};super(l.X("delhi_modern_web_player")?{U:"div",B:"ytp-mute-button",W:[{U:"button",G:k,L_:["ytp-volume-icon",
"ytp-button"],Nd:"{{icon}}"}]}:{U:"button",L_:["ytp-mute-button","ytp-button"],G:k,W:[{U:"div",B:"ytp-volume-icon",Nd:"{{icon}}"}]});this.L=l;this.C=null;this.S=this.RR=this.D=this.A=NaN;this.u0=this.Y=null;this.J=[];this.V=[];this.visible=!1;this.N=this.Z=this.b0=null;l.X("delhi_modern_web_player")&&this.update({"data-priority":4});k=this.L.O();this.updateValue("icon",xb());this.tooltip=y.As();this.updateValue("dataTooltipOffsetY",0);this.N=g.rt("ytp-volume-icon",this.element);const z=this.L.X("delhi_modern_web_player_icons")?
{U:"svg",G:{height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",L_:["ytp-svg-fill","ytp-svg-volume-animation-speaker"],G:{d:"M 11.60 2.08 L 11.48 2.14 L 3.91 6.68 C 3.02 7.21 2.28 7.97 1.77 8.87 C 1.26 9.77 1.00 10.79 1 11.83 V 12.16 L 1.01 12.56 C 1.07 13.52 1.37 14.46 1.87 15.29 C 2.38 16.12 3.08 16.81 3.91 17.31 L 11.48 21.85 C 11.63 21.94 11.80 21.99 11.98 21.99 C 12.16 22.00 12.33 21.95 12.49 21.87 C 12.64 21.78 12.77 21.65 12.86 21.50 C 12.95 21.35 13 21.17 13 21 V 3 C 12.99 2.83 12.95 2.67 12.87 2.52 C 12.80 2.37 12.68 2.25 12.54 2.16 C 12.41 2.07 12.25 2.01 12.08 2.00 C 11.92 1.98 11.75 2.01 11.60 2.08 Z",
fill:"#fff"}},{U:"path",B:"ytp-svg-volume-animation-small-ripple",G:{d:" M 15.53 7.05 C 15.35 7.22 15.25 7.45 15.24 7.70 C 15.23 7.95 15.31 8.19 15.46 8.38 L 15.53 8.46 L 15.70 8.64 C 16.09 9.06 16.39 9.55 16.61 10.08 L 16.70 10.31 C 16.90 10.85 17 11.42 17 12 L 16.99 12.24 C 16.96 12.73 16.87 13.22 16.70 13.68 L 16.61 13.91 C 16.36 14.51 15.99 15.07 15.53 15.53 C 15.35 15.72 15.25 15.97 15.26 16.23 C 15.26 16.49 15.37 16.74 15.55 16.92 C 15.73 17.11 15.98 17.21 16.24 17.22 C 16.50 17.22 16.76 17.12 16.95 16.95 C 17.6 16.29 18.11 15.52 18.46 14.67 L 18.59 14.35 C 18.82 13.71 18.95 13.03 18.99 12.34 L 19 12 C 18.99 11.19 18.86 10.39 18.59 9.64 L 18.46 9.32 C 18.15 8.57 17.72 7.89 17.18 7.3 L 16.95 7.05 L 16.87 6.98 C 16.68 6.82 16.43 6.74 16.19 6.75 C 15.94 6.77 15.71 6.87 15.53 7.05",
fill:"#fff"}},{U:"path",B:"ytp-svg-volume-animation-big-ripple",G:{d:"M18.36 4.22C18.18 4.39 18.08 4.62 18.07 4.87C18.05 5.12 18.13 5.36 18.29 5.56L18.36 5.63L18.66 5.95C19.36 6.72 19.91 7.60 20.31 8.55L20.47 8.96C20.82 9.94 21 10.96 21 11.99L20.98 12.44C20.94 13.32 20.77 14.19 20.47 15.03L20.31 15.44C19.86 16.53 19.19 17.52 18.36 18.36C18.17 18.55 18.07 18.80 18.07 19.07C18.07 19.33 18.17 19.59 18.36 19.77C18.55 19.96 18.80 20.07 19.07 20.07C19.33 20.07 19.59 19.96 19.77 19.77C20.79 18.75 21.61 17.54 22.16 16.20L22.35 15.70C22.72 14.68 22.93 13.62 22.98 12.54L23 12C22.99 10.73 22.78 9.48 22.35 8.29L22.16 7.79C21.67 6.62 20.99 5.54 20.15 4.61L19.77 4.22L19.70 4.15C19.51 3.99 19.26 3.91 19.02 3.93C18.77 3.94 18.53 4.04 18.36 4.22 Z",
fill:"#fff"}}]}:{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"defs",W:[{U:"clipPath",G:{id:"ytp-svg-volume-animation-mask"},W:[{U:"path",G:{d:"m 14.35,-0.14 -5.86,5.86 20.73,20.78 5.86,-5.91 z"}},{U:"path",G:{d:"M 7.07,6.87 -1.11,15.33 19.61,36.11 27.80,27.60 z"}},{U:"path",B:"ytp-svg-volume-animation-mover",G:{d:"M 9.09,5.20 6.47,7.88 26.82,28.77 29.66,25.99 z"}}]},{U:"clipPath",G:{id:"ytp-svg-volume-animation-slash-mask"},W:[{U:"path",B:"ytp-svg-volume-animation-mover",
G:{d:"m -11.45,-15.55 -4.44,4.51 20.45,20.94 4.55,-4.66 z"}}]}]},{U:"path",N_:!0,L_:["ytp-svg-fill","ytp-svg-volume-animation-speaker"],G:{"clip-path":"url(#ytp-svg-volume-animation-mask)",d:"M8,21 L12,21 L17,26 L17,10 L12,15 L8,15 L8,21 Z M19,14 L19,22 C20.48,21.32 21.5,19.77 21.5,18 C21.5,16.26 20.48,14.74 19,14 Z",fill:"#fff"}},{U:"path",N_:!0,L_:["ytp-svg-fill","ytp-svg-volume-animation-hider"],G:{"clip-path":"url(#ytp-svg-volume-animation-slash-mask)",d:"M 9.25,9 7.98,10.27 24.71,27 l 1.27,-1.27 Z",
fill:"#fff"}}]};this.C=new g.Ev(z);g.x(this,this.C);this.Y=this.C.qd("ytp-svg-volume-animation-speaker");this.u0=this.Y.getAttribute("d");this.J=g.kg("ytp-svg-volume-animation-mover",this.C.element);this.L.X("delhi_modern_web_player_icons");this.V=g.kg("ytp-svg-volume-animation-hider",this.C.element);this.L.X("delhi_modern_web_player_icons");this.PG=new ER;g.x(this,this.PG);this.rb=new ER;g.x(this,this.rb);this.j(l,"appresize",this.Ja);this.j(l,"onVolumeChange",this.onVolumeChange);l.X("delhi_modern_web_player")?
this.listen("click",this.Xr):this.listen("click",this.K);k.HG?(l.X("delhi_modern_web_player")&&!l.X("delhi_modern_web_player_horizontal_volume_controls")&&(this.Z=new pCx(l,y),this.Z.Uj(this.element),g.x(this,this.Z),this.j(this.N,"mouseover",this.sj),this.j(this.N,"focus",this.sj),this.j(this.N,"mouseout",this.HG),this.j(this.N,"blur",this.HG)),k=l.X("delhi_modern_web_player")?this.N:this.element,this.addOnDisposeCallback(g.mn(y.As(),k))):gI4(this);this.message=null;l.createClientVe(this.element,
this,28662);this.Ja(l.Yz().getPlayerSize());this.setVolume(l.getVolume(),l.isMuted())}sj(){this.L.IH()||(this.updateValue("dataTooltipOffsetY",-120),this.Z?.C(),this.Z?.S())}HG(){this.Z?.N()}Ja(l){this.visible=l.width>=300||!1;this.fP(this.visible);this.L.logVisibility(this.element,this.visible&&this.C_)}K(){this.L.O().HG?this.L.isMuted()?this.L.unMute():this.L.mute():SS(this.message,this.element,!0);this.L.logClick(this.element)}Xr(l){this.L.O().HG&&this.Z?l.target===this.N?this.L.IH()&&!this.Z?.J()?
this.Z?.C():this.K():this.Z?.C():this.K()}onVolumeChange(l){this.setVolume(l.volume,l.muted)}setVolume(l,y){var k=y?0:l/100;l=k===0?1:l>50?1:0;if(this.D!==l){const z=this.A;isNaN(z)?jZz(this,l):al(this.PG,r=>{jZz(this,z+(this.D-z)*r)},250);
this.D=l}k=k===0?1:0;if(this.S!==k){const z=this.RR;isNaN(z)?FD5(this,k):al(this.rb,r=>{FD5(this,z+(this.S-z)*r)},250);
this.S=k}oIQ(this,y)}Cl(l){super.Cl(l);this.L.logVisibility(this.element,this.visible&&l)}},EIT=["M",19,",",11.29," C",21.89,",",12.15," ",24,",",14.83," ",24,",",18," C",24,",",21.17," ",21.89,",",23.85," ",19,",",24.71," L",19,",",24.77," C",21.89,",",23.85," ",24,",",21.17," ",24,",",18," C",24,",",14.83," ",21.89,",",12.15," ",19,",",11.29," L",19,",",11.29," Z"],f1P=["M",19,",",11.29," C",21.89,",",12.15," ",24,",",14.83," ",24,",",18," C",24,",",21.17," ",21.89,",",23.85," ",19,",",24.71," L",
19,",",26.77," C",23.01,",",25.86," ",26,",",22.28," ",26,",",18," C",26,",",13.72," ",23.01,",",10.14," ",19,",",9.23," L",19,",",11.29," Z"],S_e=18,nIs=12,LP=22,vA=12;g.KiL=class extends g.H{constructor(l,y){super({U:"button",L_:["ytp-play-button","ytp-button"],G:{title:l.X("player_tooltip_data_title_killswitch")?"{{title}}":"","data-tooltip-title":"{{tooltip-title}}","aria-keyshortcuts":"k","data-title-no-tooltip":"{{data-title-no-tooltip}}"},Nd:"{{icon}}"});this.L=l;this.Z=null;this.transition=new ER;this.tooltip=y.As();g.x(this,this.transition);l.createClientVe(this.element,this,36842);l.logVisibility(this.element,!0);this.j(l,"fullscreentoggled",this.onVideoDataChange);
this.j(l,"presentingplayerstatechange",this.onStateChange);this.j(l,"videodatachange",this.onVideoDataChange);this.IU(l.getPlayerStateObject());this.listen("click",this.yc,this);this.addOnDisposeCallback(g.mn(y.As(),this.element))}onStateChange(l){this.IU(l.state)}IU(l){var y=g.la(this.L.getVideoData());let k=!1;l.isOrWillBePlaying()?l=y?4:2:l.Z(2)?(l=3,k=y):l=1;this.element.disabled=k;if(this.Z!==l){y=null;switch(l){case 2:y=g.Wl(this.L,"T\u1ea1m d\u1eebng","k");this.update({"data-title-no-tooltip":"T\u1ea1m d\u1eebng"});
break;case 3:y="Ph\u00e1t l\u1ea1i";this.update({"data-title-no-tooltip":"Ph\u00e1t l\u1ea1i"});break;case 1:y=g.Wl(this.L,"Ph\u00e1t","k");this.update({"data-title-no-tooltip":"Ph\u00e1t"});break;case 4:y="D\u1eebng ph\u00e1t",this.update({"data-title-no-tooltip":"D\u1eebng ph\u00e1t"})}l===3?this.L.O().X("player_tooltip_data_title_killswitch")?this.update({title:y,icon:BA(this,l)}):this.update({"tooltip-title":y,icon:BA(this,l)}):(this.L.X("player_tooltip_data_title_killswitch")?this.update({title:y}):
this.update({"tooltip-title":y}),(y=BA(this,l))&&this.Z&&this.Z!==3?n_z(this.transition,this.element,y):this.updateValue("icon",y));this.tooltip.W1();this.Z=l}}onVideoDataChange(){g.I(this.element,"ytp-play-button-playlist",g.Pl(this.L))}yc(l){this.L.logClick(this.element);if(this.L.getPlayerStateObject().isOrWillBePlaying())this.L.pauseVideo();else{if(this.L.isMinimized()&&this.L.getPlayerStateObject().isCued()){const y={};this.L.getVideoData()?.a4&&(y.cttAuthInfo={token:this.L.getVideoData().a4,
videoId:this.L.getVideoData().videoId});p4("direct_playback",y);this.L.SV().timerName="direct_playback"}this.L.playVideo()}this.L.isMinimized()&&l?.type==="click"&&this.element.blur()}Cl(l){super.Cl(l)}};g.sR=class extends g.H{constructor(l,y,k){super({U:"a",L_:[k?"ytp-next-button":"ytp-prev-button","ytp-button"],G:{role:"button",title:"{{title}}","data-tooltip-title":"{{tooltip-title}}",href:"{{url}}","data-preview":"{{preview}}","data-tooltip-text":"{{text}}","data-duration":"{{duration}}","aria-disabled":"{{disabled}}","data-next":"{{next}}","data-prev":"{{prev}}","data-title-no-tooltip":"{{data-title-no-tooltip}}","aria-keyshortcuts":"{{aria-keyshortcuts}}",tabindex:"0"},W:[vI5(k,l.X("delhi_modern_web_player_icons"))]});
this.L=l;this.Z=k;this.playlist=this.videoData=null;this.K=!1;this.V=this.J=this.C=null;this.N=!1;this.tooltip=y.As();k?l.createClientVe(this.element,this,6193):l.createClientVe(this.element,this,6194);this.j(l,"fullscreentoggled",this.onVideoDataChange);this.j(l,"videodatachange",this.onVideoDataChange);this.j(l,"onPlaylistUpdate",this.onVideoDataChange);this.j(l,"onLoopRangeChange",this.onVideoDataChange);this.Z||this.j(l,"appresize",this.S);this.j(l,"mdxpreviousnextchange",()=>{HA(this);this.S()});
this.onVideoDataChange()}onVideoDataChange(){sZQ(this);this.V&&(this.uq(this.V),this.V=null);this.videoData=this.L.getVideoData({playerType:1});if(this.playlist=this.L.getPlaylist())this.playlist.subscribe("shuffle",this.onVideoDataChange,this),this.V=this.j(this.L,"progresssync",this.A);this.N=LDe(this);HA(this);this.S(this.L.Yz().getPlayerSize())}S(l=this.L.Yz().getPlayerSize()){var y=this.L.getLoopRange()?.type==="clips";const k=g.Pl(this.L)||this.Z&&g.Ki(this.L)&&!this.L.X("web_hide_next_button")||
Nry(this),z=!this.Z&&l.width<400;l=this.L.X("delhi_modern_web_player_horizontal_volume_controls")&&l.width<640;y=k&&!y&&!z&&!l;this.fP(y);this.L.logVisibility(this.element,y)}onClick(l){this.L.logClick(this.element);let y=!0;this.K?y=g.Bl(l,this.L):l.preventDefault();y&&(this.Z&&this.L.getPresentingPlayerType()===5?this.L.publish("ytoprerollinternstitialnext"):this.Z?(PB(this.L.SV()),this.L.publish("playlistnextbuttonclicked",this.element),this.L.nextVideo(!0)):this.N?this.L.seekTo(0):(PB(this.L.SV()),
this.L.publish("playlistprevbuttonclicked",this.element),this.L.previousVideo(!0)))}A(){const l=LDe(this);l!==this.N&&(this.N=l,HA(this))}Vj(){this.C&&(this.C(),this.C=null);sZQ(this);super.Vj()}};var gow=class extends g.H{constructor(l,y){super({U:"div",B:"ytp-fine-scrubbing",W:[{U:"div",B:"ytp-fine-scrubbing-draggable",W:[{U:"div",B:"ytp-fine-scrubbing-thumbnails",G:{tabindex:"0",role:"slider",type:"range","aria-label":"Nh\u1ea5p v\u00e0o ho\u1eb7c cu\u1ed9n b\u1ea3ng \u0111i\u1ec1u khi\u1ec3n \u0111\u1ec3 tua ch\u00ednh x\u00e1c","aria-valuemin":"{{ariamin}}","aria-valuemax":"{{ariamax}}","aria-valuenow":"{{arianow}}","aria-valuetext":"{{arianowtext}}"}}]},{U:"div",G:{"aria-hidden":"true"},
B:"ytp-fine-scrubbing-cursor"},{U:"div",B:"ytp-fine-scrubbing-seek-time",G:{"aria-hidden":"true"},Nd:"{{seekTime}}"},{U:"div",B:"ytp-fine-scrubbing-play",W:[l.X("delhi_modern_web_player_icons")?cW():Xh()],G:{title:"Ph\u00e1t t\u1eeb th\u1eddi \u0111i\u1ec3m n\u00e0y",role:"button"}},{U:"div",B:"ytp-fine-scrubbing-dismiss",W:[g.wM()],G:{title:"Tho\u00e1t kh\u1ecfi ch\u1ebf \u0111\u1ed9 tua ch\u00ednh x\u00e1c",role:"button"}}]});this.api=l;this.J=this.qd("ytp-fine-scrubbing-thumbnails");this.dismissButton=
this.qd("ytp-fine-scrubbing-dismiss");this.b0=this.qd("ytp-fine-scrubbing-draggable");this.playButton=this.qd("ytp-fine-scrubbing-play");this.thumbnails=[];this.C=[];this.u0=this.Z=0;this.HG=void 0;this.D=NaN;this.PG=this.A=this.N=this.K=0;this.V=[];this.interval=this.frameCount=0;this.S=160;this.scale=1;this.Xr=0;this.isEnabled=this.Ja=!1;RX(this,this.api.getCurrentTime());this.addOnDisposeCallback(g.mn(y,this.dismissButton));this.addOnDisposeCallback(g.mn(y,this.playButton));this.sj=new g.cu(this.b0,
!0);this.sj.subscribe("dragstart",this.rb,this);this.sj.subscribe("dragmove",this.RR,this);this.sj.subscribe("dragend",this.mK,this);this.j(l,"SEEK_COMPLETE",this.xz);l.X("web_fix_fine_scrubbing_false_play")&&this.j(l,"rootnodemousedown",k=>{this.Y=k});
this.J.addEventListener("keydown",()=>{});
g.x(this,this.sj);this.api.createClientVe(this.element,this,153154);this.api.createClientVe(this.J,this,152789);this.api.createClientVe(this.dismissButton,this,153156);this.api.createClientVe(this.playButton,this,153155)}gb(l){this.rb(l.pageX);this.RR(l.pageX+l.deltaX);D0(this)}rb(l){this.D=l-this.u0}RR(l){l-=this.u0;!isNaN(this.D)&&this.thumbnails.length>0&&(this.A=l-this.D,this.thumbnails.length>0&&this.A!==0&&(this.N=this.K+this.A,l=H5Q(this,this.N),this.N<=this.Z/2&&this.N>=Bry(this)?(this.api.seekTo(l,
!1,void 0,void 0,25),g.n9(this.b0,"transform",`translateX(${this.N-this.Z/2}px)`),RX(this,l)):this.N=this.K))}mK(){this.Y&&(this.Y.kO=!0);var l=(0,g.f)()-this.Xr<300;if(Math.abs(this.A)<5&&!l){this.Xr=(0,g.f)();l=this.D+this.A;const y=this.Z/2-l;this.rb(l);this.RR(l+y);D0(this);this.api.logClick(this.J)}D0(this)}xz(){l6(this,this.api.getCurrentTime())}play(l){this.api.seekTo(H5Q(this,this.N),void 0,void 0,void 0,26);this.api.playVideo();l&&this.api.logClick(this.playButton)}onExit(l){this.api.seekTo(this.PG,
void 0,void 0,void 0,63);this.api.playVideo();l&&this.api.logClick(this.dismissButton)}TE(l,y){this.u0=l;this.Z=y;l6(this,this.api.getCurrentTime())}Oj(l){this.scale=l?1.5:1}enable(){this.isEnabled||(this.isEnabled=!0,this.PG=this.api.getCurrentTime(),RX(this,this.PG),g.I(this.api.getRootNode(),"ytp-fine-scrubbing-enable",this.isEnabled),this.HG=this.j(this.element,"wheel",this.gb),this.logVisibility(this.isEnabled))}disable(){this.isEnabled=!1;this.hide();g.I(this.api.getRootNode(),"ytp-fine-scrubbing-enable",
this.isEnabled);this.HG&&this.uq(this.HG);this.logVisibility(this.isEnabled)}reset(){this.disable();this.V=[];this.Ja=!1}logVisibility(l){this.api.logVisibility(this.element,l);this.api.logVisibility(this.J,l);this.api.logVisibility(this.dismissButton,l);this.api.logVisibility(this.playButton,l)}Vj(){for(;this.C.length;)this.C.pop()?.dispose();super.Vj()}},R2T=class extends g.H{constructor(){super({U:"div",B:"ytp-fine-scrubbing-thumbnail"})}},DIg=class extends g.H{constructor(){super({U:"div",B:"ytp-fine-scrubbing-chapter-title",
W:[{U:"div",B:"ytp-fine-scrubbing-chapter-title-content",Nd:"{{chapterTitle}}"}]})}};var en5=class extends g.H{constructor(l){super({U:"div",B:"ytp-heat-map-chapter",W:[{U:"svg",B:"ytp-heat-map-svg",G:{height:"100%",preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 1000 100",width:"100%"},W:[{U:"defs",W:[{U:"clipPath",G:{id:"{{id}}"},W:[{U:"path",B:"ytp-heat-map-path",G:{d:"",fill:"white"}}]},{U:"linearGradient",G:{gradientUnits:"userSpaceOnUse",id:"ytp-heat-map-gradient-def",x1:"0%",x2:"0%",y1:"0%",y2:"100%"},W:[{U:"stop",G:{offset:"0%","stop-color":"white","stop-opacity":"1"}},
{U:"stop",G:{offset:"100%","stop-color":"white","stop-opacity":"0"}}]}]},{U:"rect",B:"ytp-heat-map-graph",G:{"clip-path":"url(#hm_1)",fill:"white","fill-opacity":"0.4",height:"100%",width:"100%",x:"0",y:"0"}},{U:"rect",B:"ytp-heat-map-hover",G:{"clip-path":"url(#hm_1)",fill:"white","fill-opacity":"0.7",height:"100%",width:"100%",x:"0",y:"0"}},{U:"rect",B:"ytp-heat-map-play",G:{"clip-path":"url(#hm_1)",height:"100%",x:"0",y:"0"}},{U:"path",B:"ytp-modern-heat-map",G:{d:"",fill:"url(#ytp-heat-map-gradient-def)",
height:"100%",stroke:"white","stroke-opacity":"1","stroke-width":"2px",width:"100%",x:"0",y:"0"}}]}]});this.api=l;this.K=this.qd("ytp-heat-map-svg");this.J=this.qd("ytp-heat-map-path");this.V=this.qd("ytp-heat-map-graph");this.S=this.qd("ytp-heat-map-play");this.Z=this.qd("ytp-heat-map-hover");this.N=this.qd("ytp-modern-heat-map");this.Ij=!1;this.C=60;l=`${g.mP(this)}`;this.update({id:l});l=`url(#${l})`;this.V.setAttribute("clip-path",l);this.S.setAttribute("clip-path",l);this.Z.setAttribute("clip-path",
l)}D(l){this.S.setAttribute("width",`${(l*100).toFixed(2)}%`)}A(l){this.Z.setAttribute("width",`${(l*100).toFixed(2)}%`)}};var rjz=class extends g.H{constructor(){super({U:"div",B:"ytp-chapter-hover-container",W:[{U:"div",B:"ytp-progress-bar-padding"},{U:"div",B:"ytp-progress-list",W:[{U:"div",L_:["ytp-play-progress","ytp-swatch-background-color"]},{U:"div",B:"ytp-progress-linear-live-buffer"},{U:"div",B:"ytp-load-progress"},{U:"div",B:"ytp-hover-progress"},{U:"div",B:"ytp-ad-progress-list"}]}]});this.startTime=NaN;this.title="";this.index=NaN;this.width=0;this.C=this.qd("ytp-progress-list");this.J=this.qd("ytp-progress-linear-live-buffer");
this.V=this.qd("ytp-ad-progress-list");this.S=this.qd("ytp-load-progress");this.K=this.qd("ytp-play-progress");this.N=this.qd("ytp-hover-progress");this.Z=this.qd("ytp-chapter-hover-container")}Jv(l){return l==="PLAY_PROGRESS"?this.K:l==="LOAD_PROGRESS"?this.S:l==="LIVE_BUFFER"?this.J:this.N}};var EoR=class{constructor(){this.C=this.position=this.N=this.Z=this.V=this.width=NaN}update(l,y,k=0,z=0){this.width=y;this.V=k;this.Z=y-k-z;this.position=g.gf(l,k,k+this.Z);this.N=this.position-k;this.C=this.N/this.Z}};var wrP=class extends g.H{constructor(){super({U:"div",B:"ytp-timed-marker"});this.Z=this.timeRangeStartMillis=NaN;this.title="";this.onActiveCommand=void 0}};g.fex=class extends g.kD{constructor(l,y){super({U:"div",B:"ytp-progress-bar-container",G:{"aria-disabled":"true"},W:[{U:"div",L_:["ytp-heat-map-container"],W:[{U:"div",B:"ytp-heat-map-edu"}]},{U:"div",L_:["ytp-progress-bar"],G:{tabindex:"0",role:"slider","aria-label":"Thanh tr\u01b0\u1ee3t t\u00ecm ki\u1ebfm","aria-valuemin":"{{ariamin}}","aria-valuemax":"{{ariamax}}","aria-valuenow":"{{arianow}}","aria-valuetext":"{{arianowtext}}"},W:[{U:"div",B:"ytp-chapters-container"},{U:"div",B:"ytp-timed-markers-container"},
{U:"div",B:"ytp-clip-start-exclude"},{U:"div",B:"ytp-clip-end-exclude"},{U:"div",B:"ytp-scrubber-container",W:[{U:"div",L_:["ytp-scrubber-button","ytp-swatch-background-color"],W:[{U:"div",B:"ytp-scrubber-pull-indicator"},{U:"img",L_:["ytp-decorated-scrubber-button"]}]}]}]},{U:"div",L_:["ytp-fine-scrubbing-container"],W:[{U:"div",B:"ytp-fine-scrubbing-edu"}]},{U:"div",B:"ytp-bound-time-left",Nd:"{{boundTimeLeft}}"},{U:"div",B:"ytp-bound-time-right",Nd:"{{boundTimeRight}}"},{U:"div",B:"ytp-clip-start",
G:{title:"{{clipstarttitle}}"},Nd:"{{clipstarticon}}"},{U:"div",B:"ytp-clip-end",G:{title:"{{clipendtitle}}"},Nd:"{{clipendicon}}"}]});this.api=l;this.Ak=!1;this.I4=this.uW=this.gb=this.sj=this.K=this.e5=0;this.ji=null;this.zA=!1;this.Xr={};this.SN={};this.clipEnd=Infinity;this.R7=this.qd("ytp-clip-end");this.vn=new g.cu(this.R7,!0);this.q_=this.qd("ytp-clip-end-exclude");this.S2=this.qd("ytp-clip-start-exclude");this.clipStart=0;this.PF=this.qd("ytp-clip-start");this.Xz=new g.cu(this.PF,!0);this.Y=
this.WG=0;this.progressBar=this.qd("ytp-progress-bar");this.hv={};this.mK={};this.xz=this.qd("ytp-chapters-container");this.vV=this.qd("ytp-timed-markers-container");this.Z=[];this.A=[];this.Um={};this.pf=null;this.RR=-1;this.T7=this.rb=0;this.va=this.D=null;this.kK=this.qd("ytp-scrubber-button");this.Ja=this.qd("ytp-decorated-scrubber-button");this.PV=this.qd("ytp-scrubber-container");this.kz=new g.jD;this.hj=0;this.V9=new EoR;this.N=new GD(0,0);this.HF=null;this.S=this.Ky=!1;this.pS=null;this.b0=
this.qd("ytp-heat-map-container");this.Cp=this.qd("ytp-heat-map-edu");this.V=[];this.heatMarkersDecorations=[];this.Oj=this.qd("ytp-fine-scrubbing-container");this.wY=this.qd("ytp-fine-scrubbing-edu");this.C=void 0;this.u0=this.Fg=this.PG=!1;this.tooltip=y.As();this.addOnDisposeCallback(g.mn(this.tooltip,this.R7));g.x(this,this.vn);this.vn.subscribe("hoverstart",this.LS,this);this.vn.subscribe("hoverend",this.U7,this);this.j(this.R7,"click",this.jN);this.addOnDisposeCallback(g.mn(this.tooltip,this.PF));
g.x(this,this.Xz);this.Xz.subscribe("hoverstart",this.LS,this);this.Xz.subscribe("hoverend",this.U7,this);this.j(this.PF,"click",this.jN);Zte(this);this.j(l,"resize",this.TE);this.j(l,"presentingplayerstatechange",this.Yg);this.j(l,"videodatachange",this.HZ);this.j(l,"videoplayerreset",this.zZ);this.j(l,"cuerangesadded",this.MS);this.j(l,"cuerangesremoved",this.bG);this.j(l,"onLoopRangeChange",this.oY);this.j(l,"innertubeCommand",this.onClickCommand);this.j(l,"onRetroModeChanged",this.CJ);this.j(l,
g.uR("timedMarkerCueRange"),this.eE);this.j(l,"updatemarkervisibility",this.bI);this.j(l,W_(l.O().sA())?"playbackChange":"serverstitchedvideochange",this.s6);this.updateVideoData(l.getVideoData(),!0);this.oY(l.getLoopRange());zD(this)&&!this.C&&(this.C=new gow(this.api,this.tooltip),l=g.Dj(this.element).x||0,this.C.TE(l,this.K),this.C.Uj(this.Oj),g.x(this,this.C),this.j(this.C.dismissButton,"click",this.fd),this.j(this.C.playButton,"click",this.O1),this.j(this.C.element,"dblclick",this.O1));this.api.createClientVe(this.b0,
this,139609,!0);this.api.createClientVe(this.Cp,this,140127,!0);this.api.createClientVe(this.wY,this,151179,!0);this.api.createClientVe(this.progressBar,this,38856,!0)}bI(){var l=!1;const y=this.api.getVideoData();if(!y)return l;this.api.Ur("timedMarkerCueRange");rO(this);for(const t of y.RR){var k=this.mK[t]?.markerType,z=this.mK[t]?.markers;if(!z)break;if(k==="MARKER_TYPE_TIMESTAMPS"){for(const O of z)l=new wrP,k=O,l.title=k.title?.simpleText||"",l.timeRangeStartMillis=Number(k.startMillis),l.Z=
Number(k.durationMillis),l.onActiveCommand=k.onActive?.innertubeCommand??void 0,GyC(this,l);Ax(this,this.A);l=this.A;k=this.Um;var r=[],Z=null;for(var e=0;e<l.length;e++){var A=l[e].timeRangeStartMillis;if(!isNaN(A)&&l[e].onActiveCommand){var Q=l[e].Z??1E4;Z&&Z.end>A&&(Z.end=A);A=RsQ(A,A+Q);r.push(A);Z=A;k[A.id]=l[e].onActiveCommand}}this.api.Wa(r);a:{for(const O of z)if(O.sourceType==="SOURCE_TYPE_SMART_SKIP"){l=!1;break a}l=!0}l&&(this.pf=this.mK[t]);l=!0}else if(k==="MARKER_TYPE_HEATMAP"){if((z=
this.mK[t])&&z.markers){k=z.markersMetadata?.heatmapMetadata?.minHeightDp??0;r=z.markersMetadata?.heatmapMetadata?.maxHeightDp??60;Z=this.Z.length;e=null;for(A=0;A<Z;A++){Q=this.Z[A].startTime;const O=A===Z-1?Infinity:this.Z[A+1].startTime;A===this.V.length&&Aj_(this);const d=[];e&&d.push(e);for(const w of z.markers){const h=Number(w.startMillis);h>=Q&&h<=O&&d.push(w)}r>0&&(this.b0.style.height=`${r}px`);znC(this.V[A],d,k,r,A===0);d.length>0&&(e=d[d.length-1])}g.Zn(this)}k=[];if(z=z.markersDecoration?.timedMarkerDecorations)for(const O of z)k.push({visibleTimeRangeStartMillis:O.visibleTimeRangeStartMillis??
-1,visibleTimeRangeEndMillis:O.visibleTimeRangeEndMillis??-1,decorationTimeMillis:O.decorationTimeMillis??NaN,label:O.label?g.$b(O.label):""});z=k;this.heatMarkersDecorations=z}}y.rh=this.A;g.I(this.element,"ytp-timed-markers-enabled",l);return l}TE(){g.Zn(this);eP(this);Ax(this,this.A);if(this.C){const l=g.Dj(this.element).x||0;this.C.TE(l,this.K)}}CJ(){const l=this.api.getVideoData();l&&Ces(this,l)}onClickCommand(l){if(l=g.E(l,WF)){const y=l.key;l.isVisible&&y&&$l(this,y)}}eE(l){g.G3(this.api,"innertubeCommand",
this.Um[l.id])}Pn(){eP(this);const l=this.api.getCurrentTime();(l<this.clipStart||l>this.clipEnd)&&this.jN()}xF(l){if(!l.defaultPrevented){let y=!1;switch(l.keyCode){case 36:this.api.seekTo(0,void 0,void 0,void 0,79);y=!0;break;case 35:this.api.seekTo(Infinity,void 0,void 0,void 0,80);y=!0;break;case 34:this.api.seekBy(-60,void 0,void 0,76);y=!0;break;case 33:this.api.seekBy(60,void 0,void 0,75);y=!0;break;case 38:this.api.X("enable_key_press_seek_logging")&&XE(this,this.api.getCurrentTime(),this.api.getCurrentTime()+
5,"SEEK_SOURCE_SEEK_FORWARD_5S","INTERACTION_LOGGING_GESTURE_TYPE_KEY_PRESS");this.api.seekBy(5,void 0,void 0,72);y=!0;break;case 40:this.api.X("enable_key_press_seek_logging")&&XE(this,this.api.getCurrentTime(),this.api.getCurrentTime()-5,"SEEK_SOURCE_SEEK_BACKWARD_5S","INTERACTION_LOGGING_GESTURE_TYPE_KEY_PRESS"),this.api.seekBy(-5,void 0,void 0,71),y=!0}y&&l.preventDefault()}}HZ(l,y){this.updateVideoData(y,l==="newdata")}zZ(){this.HZ("newdata",this.api.getVideoData())}updateVideoData(l,y=!1){var k=
!!l&&l.Ij();k&&(l.Ja()||hx(this)?this.Ky=!1:this.Ky=l.allowLiveDvr,g.I(this.api.getRootNode(),"ytp-enable-live-buffer",!!l?.Ja()),Ces(this,l));C7(this,this.api.wq());if(y){if(k){y=l.clipEnd;this.clipStart=l.clipStart;this.clipEnd=y;UG(this);for(OG(this,this.Y,this.WG);this.V.length>0;)this.V.pop().dispose();this.heatMarkersDecorations=[];this.hv={};this.C?.reset();b6(this);g.I(this.api.getRootNode(),"ytp-fine-scrubbing-exp",zD(this))}else this.jN();this.J()}if(l){y=this.HF?.type==="clips";if(k=!l.isLivePlayback){k=
this.api.getVideoData();var z=g.AP(k);const e=Qny(k);k=z!=null||e!=null&&e.length>0||k.Yr?.length>0}if(k&&!y){y=this.api.getVideoData();z=g.AP(y);k=!1;if(z?.markersMap){k=this.api.getVideoData();k.jD=z.visibleOnLoad?.key||k.jD;z=z.markersMap;for(var r of z)r.key&&r.value&&(this.hv[r.key]=r.value,r.value.onChapterRepeat&&(k.PM=r.value.onChapterRepeat));k.jD!=null&&$l(this,k.jD);k=!0}if(y.Yr?.length>0){r=g.IH.getState().entities;for(var Z of y.Yr)if(z=Zp(r,Z)?.markersList,z?.markerType==="MARKER_TYPE_TIMESTAMPS"||
z?.markerType==="MARKER_TYPE_HEATMAP")this.mK[Z]=z;k=this.bI()||k}!k&&(Z=Qny(y))&&(Ott(this,Z),y.hj=this.Z,dnP(this));xnz(this,null);l.zw&&this.V.length===0&&(l=l.zw,Z=l.key,l.isVisible&&Z&&$l(this,Z))}else Zte(this),rO(this)}eP(this)}Yg(l){this.D&&!l.state.Z(32)&&this.api.getPresentingPlayerType()!==3&&this.D.cancel();this.C?.isEnabled&&l.state.Z(8)&&this.api.pauseVideo();l=this.api.getPresentingPlayerType()===2||!this.api.wq()||this.api.getPlayerState()===-1&&this.api.getCurrentTime()===0;g.I(this.kK,
"ytp-hide-scrubber-button",l)}oY(l){const y=!!this.HF!==!!l,k=this.HF;this.HF=l;xnz(this,k);l?.type!=="clips"&&l||(l?(this.updateValue("clipstarticon",Kuz()),this.updateValue("clipendicon",Kuz()),this.updateValue("clipstarttitle",null),this.updateValue("clipendtitle",null)):(this.updateValue("clipstarticon",Ic5()),this.updateValue("clipendicon",Wue()),this.updateValue("clipstarttitle","Xem to\u00e0n b\u1ed9 video"),this.updateValue("clipendtitle","Xem to\u00e0n b\u1ed9 video")),y&&(this.updateVideoData(this.api.getVideoData(),
!0),g.Zn(this)),UG(this));OG(this,this.Y,this.WG)}tb(){this.api.publish("progressBarHoverStart")}DW(l,y,k){var z=g.Dj(this.element),r=wO(this).Z;const Z=k?k.getAttribute("data-tooltip"):void 0;var e=k?k.getAttribute("data-position"):void 0,A=k?k.getAttribute("data-offset-y"):void 0;A=A?Number(A):0;e&&(l=Fh(this.N,Number(k.getAttribute("data-position")),0)*r+g.Dj(this.progressBar).x);this.kz.x=l-z.x;this.kz.y=y-z.y;l=wO(this);z=u6(this,l);y=0;this.api.getVideoData()?.Ja()&&((y=this.api.getProgressState().seekableEnd)&&
z>y&&(z=y,l.position=Fh(this.N,y)*wO(this).Z),y=this.N.C);hx(this)&&(y=this.N.C);y=Z||g.Sr(this.Ky?z-this.N.Z:z-y);k=l.position+this.e5;z-=this.api.w4();if(!this.C?.isEnabled)if(this.api.mS()){if(this.Z.length>1){r=MW(this,this.kz.x,!0);if(!this.HF)for(e=0;e<this.Z.length;)g.I(this.Z[e].Z,"ytp-exp-chapter-hover-effect",e===r),e++;if(this.V.length>1)for(e=0;e<this.Z.length;e++)g.I(this.V[e].element,"ytp-heatmap-hover",e===r)}if(this.A.length>0){r=this.kz.x;for(var Q of this.A)e=dO(this,Q.timeRangeStartMillis/
(this.N.Z*1E3),wO(this)),g.I(Q.element,"ytp-timed-marker-hover",e<=r&&e+6>=r)}r=this.tooltip.scale;Q=this.api.X("delhi_modern_web_player")?67:45;A=(isNaN(A)?0:A)-Q*r;this.api.X("web_key_moments_markers")?this.pf?(Q=vYz(this.A,z*1E3),Q=Q!=null?this.A[Q].title:""):(Q=IX(this.Z,z*1E3),Q=this.Z[Q].title):(Q=IX(this.Z,z*1E3),Q=this.Z[Q].title);Q||(A+=16*r);this.tooltip.scale===.6&&(g.xp(this.api.O())?(A=this.api.Yz().getPlayerSize().height-225,r=this.api.X("delhi_modern_web_player")?70:110,A=Q?A+r:A+r+
16):A=Q?110:126);r=IX(this.Z,z*1E3);this.RR=WkC(this,z,r)?r:WkC(this,z,r+1)?r+1:-1;g.I(this.api.getRootNode(),"ytp-progress-bar-snap",this.RR!==-1&&this.Z.length>1);r=!1;for(var t of this.heatMarkersDecorations)e=z*1E3,e>=t.visibleTimeRangeStartMillis&&e<=t.visibleTimeRangeEndMillis&&(Q=t.label,y=g.Sr(u6(this,l)),r=!0);this.Fg!==r&&(this.Fg=r,this.api.logVisibility(this.Cp,this.Fg));g.I(this.api.getRootNode(),"ytp-progress-bar-decoration",r);t=160*this.tooltip.scale*2;r=Q.length*(this.S?8.55:5.7);
r=r<=t?r:t;e=r<160*this.tooltip.scale;t=3;!e&&r/2>l.position&&(t=1);!e&&r/2>this.K-l.position&&(t=2);this.api.O().K&&(A-=10);this.V.length&&this.V[0].Ij&&(A-=14*(this.S?2:1),this.PG||(this.PG=!0,this.api.logVisibility(this.b0,this.PG)));zD(this)&&(this.C?.isEnabled||this.gb>0)&&(A-=this.C?.isEnabled?(this.S?135:90)-this.sj:this.gb);l=void 0;zD(this)&&!this.api.X("web_player_hide_fine_scrubbing_edu")&&(l="K\u00e9o l\u00ean \u0111\u1ec3 tua ch\u00ednh x\u00e1c",this.u0||(this.u0=!0,this.api.logVisibility(this.wY,
this.u0)));this.tooltip.X2(k,z,y,!!Z,A,Q,t,l)}else this.tooltip.X2(k,z,y,!!Z,A);g.zi(this.api.getRootNode(),"ytp-progress-bar-hover");XrC(this)}Wi(){this.J();g.ZM(this.api.getRootNode(),"ytp-progress-bar-hover");this.PG&&(this.PG=!1,this.api.logVisibility(this.b0,this.PG));this.u0&&(this.u0=!1,this.api.logVisibility(this.wY,this.u0));this.api.X("enable_smart_skip_player_controls_shown_on_web_increased_triggering_sensitivity")&&this.api.publish("progressBarHoverEnd")}TZ(l,y){const k=g.Dj(this.element);
this.hj=l-k.x;zD(this)&&this.C&&(this.C.Ja?l6(this.C,this.api.getCurrentTime()):l8C(this.C),this.C.show(),g.I(this.api.getRootNode(),"ytp-fine-scrubbing-enable",this.C.isEnabled));this.ji&&(this.ji.dispose(),this.ji=null);this.uW=y;this.I4=this.api.getCurrentTime();this.Z.length>1&&this.RR!==-1?this.api.seekTo(this.Z[this.RR].startTime/1E3,!1,void 0,void 0,7):this.api.seekTo(u6(this,wO(this)),!1,void 0,void 0,7);g.zi(this.element,"ytp-drag");(this.Ak=this.api.getPlayerStateObject().isOrWillBePlaying())&&
this.api.pauseVideo()}Yr(){if(zD(this)&&this.C){var l=(this.S?135:90)-this.sj;this.gb>=l*.5?(this.C.enable(),l6(this.C,this.api.getCurrentTime()),qcs(this,l)):b6(this)}if(this.api.getPlayerStateObject().Z(32)||this.api.getPresentingPlayerType()===3)if(this.C?.isEnabled)this.api.pauseVideo();else{this.api.startSeekCsiAction();if(this.Z.length>1&&this.RR!==-1)this.api.X("html5_enable_progress_bar_slide_seek_logging")&&XE(this,this.I4,this.Z[this.RR].startTime/1E3,"SEEK_SOURCE_SLIDE_ON_SCRUBBER_BAR_CHAPTER",
"INTERACTION_LOGGING_GESTURE_TYPE_GENERIC_CLICK"),this.api.seekTo(this.Z[this.RR].startTime/1E3,void 0,void 0,void 0,7);else{l=u6(this,wO(this));this.api.X("html5_enable_progress_bar_slide_seek_logging")&&XE(this,this.I4,l,"SEEK_SOURCE_SLIDE_ON_SCRUBBER_BAR","INTERACTION_LOGGING_GESTURE_TYPE_GENERIC_CLICK");this.api.seekTo(l,void 0,void 0,void 0,7);for(const y of this.heatMarkersDecorations)l*1E3>=y.visibleTimeRangeStartMillis&&l*1E3<=y.visibleTimeRangeEndMillis&&this.api.logClick(this.Cp)}g.ZM(this.element,
"ytp-drag");this.HG&&(this.Ja.src=this.HG);this.Ak&&!this.api.getPlayerStateObject().Z(2)&&this.api.playVideo()}}Z$(l,y){const k=wO(this),z=u6(this,k);this.api.Yz().nK||(k.position>this.hj+2?this.OA&&(this.Ja.src=this.OA):k.position<this.hj-2?this.BF&&(this.Ja.src=this.BF):this.HG&&(this.Ja.src=this.HG),setTimeout(()=>{const r=g.Dj(this.element).x||0;this.hj=l-r},150));
this.api.seekTo(z,!1,void 0,void 0,7);zD(this)&&this.C?.Ja&&(l6(this.C,z),this.C.isEnabled||(this.gb=g.gf(this.uW-y-10,0,(this.S?135:90)-this.sj),qcs(this,this.gb)))}J(){this.tooltip.VC()}LS(){this.HF||(this.updateValue("clipstarticon",qss()),this.updateValue("clipendicon",qss()),g.zi(this.element,"ytp-clip-hover"))}U7(){this.HF||(this.updateValue("clipstarticon",Ic5()),this.updateValue("clipendicon",Wue()),g.ZM(this.element,"ytp-clip-hover"))}jN(){this.clipStart=0;this.clipEnd=Infinity;UG(this);
OG(this,this.Y,this.WG)}MS(l){for(const y of l)if(y.visible){if(l=y.getId(),!this.Xr[l]){const k=g.Gf("DIV");y.tooltip&&k.setAttribute("data-tooltip",y.tooltip);this.Xr[l]=y;this.SN[l]=k;g.yp(k,y.style);btP(this,l);this.api.O().X("disable_ad_markers_on_content_progress_bar")||this.Z[0].V.appendChild(k)}}else Ycg(this,y)}bG(l){for(const y of l)Ycg(this,y)}fd(l){this.C&&(this.C.onExit(l!=null),b6(this))}O1(l){this.C&&(this.C.play(l!=null),b6(this))}s6(){C7(this,this.api.wq())}Vj(){C7(this,!1);super.Vj()}RY(){return this.C}};var jgw=class extends g.H{constructor(l,y){super({U:"button",L_:["ytp-remote-button","ytp-button"],G:{title:l.X("player_tooltip_data_title_killswitch")?"Ph\u00e1t tr\u00ean TV":"","data-tooltip-title":"Ph\u00e1t tr\u00ean TV","aria-haspopup":"true","data-priority":"10"},Nd:"{{icon}}"});this.L=l;this.eN=y;this.Z=null;this.j(l,"onMdxReceiversChange",this.Aa);this.j(l,"presentingplayerstatechange",this.Aa);this.j(l,"appresize",this.Aa);l.createClientVe(this.element,this,139118);this.Aa();this.listen("click",
this.C,this);q1(l,this.element,this)}isActive(){return!!this.L.getOption("remote","casting")}Aa(){var l=!1;this.L.getOptions().includes("remote")&&(l=this.L.getOption("remote","receivers").length>1);this.fP(l&&this.L.Yz().getPlayerSize().width>=400);this.L.logVisibility(this.element,this.VM);let y=1;l&&this.isActive()&&(y=2);if(this.Z!==y){this.Z=y;l=this.L.X("delhi_modern_web_player_icons");switch(y){case 1:this.updateValue("icon",l?{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},
W:[{U:"path",G:{d:"M21 3H3C2.46 3 1.96 3.21 1.58 3.58C1.21 3.96 1 4.46 1 5V8C1.68 8.00 2.34 8.05 3 8.15V5H21V19H13.84C13.94 19.65 13.99 20.31 14 21H21C21.53 21 22.03 20.78 22.41 20.41C22.78 20.03 23 19.53 23 19V5C23 4.46 22.78 3.96 22.41 3.58C22.03 3.21 21.53 3 21 3ZM1 10V12C2.18 12 3.35 12.23 4.44 12.68C5.53 13.13 6.52 13.80 7.36 14.63C8.19 15.47 8.86 16.46 9.31 17.55C9.76 18.64 10 19.81 10 21H12C12 18.08 10.84 15.28 8.77 13.22C6.71 11.15 3.91 10 1 10ZM1 14V16C1.65 16 2.30 16.12 2.91 16.38C3.52 16.63 4.07 17.00 4.53 17.46C4.99 17.92 5.36 18.48 5.61 19.08C5.87 19.69 6 20.34 6 21H8C8 19.14 7.26 17.36 5.94 16.05C4.63 14.73 2.85 14 1 14ZM1 18V21H4C3.99 20.20 3.68 19.44 3.12 18.87C2.55 18.31 1.79 18.00 1 18Z",
fill:"white"}}]}:{U:"svg",G:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",N_:!0,G:{d:"M27,9 L9,9 C7.9,9 7,9.9 7,11 L7,14 L9,14 L9,11 L27,11 L27,25 L20,25 L20,27 L27,27 C28.1,27 29,26.1 29,25 L29,11 C29,9.9 28.1,9 27,9 L27,9 Z M7,24 L7,27 L10,27 C10,25.34 8.66,24 7,24 L7,24 Z M7,20 L7,22 C9.76,22 12,24.24 12,27 L14,27 C14,23.13 10.87,20 7,20 L7,20 Z M7,16 L7,18 C11.97,18 16,22.03 16,27 L18,27 C18,20.92 13.07,16 7,16 L7,16 Z",fill:"#fff"}}]});break;case 2:this.updateValue("icon",
l?{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M21.20 3.01C21.69 3.06 22.15 3.29 22.48 3.65C22.81 4.02 23.00 4.50 23 5V19L22.99 19.20C22.94 19.66 22.73 20.08 22.41 20.41C22.08 20.73 21.66 20.94 21.20 20.98L21 21H14C13.99 20.31 13.94 19.65 13.84 19H21V5H3V8.15C2.34 8.05 1.68 8.00 1 8V5C0.99 4.50 1.18 4.02 1.51 3.65C1.84 3.29 2.30 3.06 2.79 3.01L3 3H21L21.20 3.01ZM19 17V7H5V8.62C6.95 9.26 8.73 10.35 10.19 11.80C11.64 13.26 12.73 15.04 13.37 17H19ZM1 10V12C2.18 12 3.35 12.23 4.44 12.68C5.53 13.13 6.52 13.80 7.36 14.63C8.19 15.47 8.86 16.46 9.31 17.55C9.76 18.64 10 19.81 10 21H12C12 18.08 10.84 15.28 8.77 13.22C6.71 11.15 3.91 10 1 10ZM1 14V16C1.65 16 2.30 16.12 2.91 16.38C3.52 16.63 4.07 17.00 4.53 17.46C4.99 17.92 5.36 18.48 5.61 19.08C5.87 19.69 6 20.34 6 21H8C8 19.14 7.26 17.36 5.94 16.05C4.63 14.73 2.85 14 1 14ZM1 18V21H4C3.99 20.20 3.68 19.44 3.12 18.87C2.55 18.31 1.79 18.00 1 18Z",
fill:"white"}}]}:g.xSs())}g.I(this.element,"ytp-remote-button-active",this.isActive())}}C(){if(this.L.getOption("remote","quickCast"))this.L.setOption("remote","quickCast",!0);else{var l=this.eN,y=this.element;if(l.aH())l.Xv();else{l.initialize();a:{for(k of l.DQ.items)if(k.priority===1)break a;var k=null}k&&(k.open(),l.Bn(y));l.Bn(y)}}this.L.logClick(this.element)}};var Sl1=class extends g.H{constructor(l,y){super({U:"button",L_:["ytp-button","ytp-settings-button"],G:{"aria-expanded":"false","aria-haspopup":"true","aria-controls":rM(),title:l.X("player_tooltip_data_title_killswitch")?"C\u00e0i \u0111\u1eb7t":"","data-tooltip-title":"C\u00e0i \u0111\u1eb7t","data-tooltip-target-id":"ytp-settings-button"},W:[l.X("delhi_modern_web_player_icons")?{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M12.84 1H11.15C10.72 .99 10.30 1.14 9.95 1.40C9.60 1.66 9.35 2.02 9.23 2.44L9.19 2.61C9.11 3.00 8.96 3.38 8.73 3.71C8.51 4.04 8.22 4.33 7.89 4.55L7.75 4.64C7.37 4.85 6.96 4.98 6.53 5.02C6.11 5.06 5.68 5.01 5.27 4.87C4.86 4.73 4.42 4.73 4.00 4.86C3.59 5.00 3.23 5.26 2.99 5.62L2.89 5.77L2.05 7.23C1.82 7.63 1.73 8.10 1.81 8.55C1.88 9.01 2.12 9.43 2.47 9.73L2.58 9.84C3.15 10.39 3.50 11.15 3.50 12L3.49 12.16C3.47 12.56 3.37 12.95 3.19 13.31C3.01 13.67 2.77 13.99 2.47 14.26C2.12 14.56 1.88 14.98 1.81 15.43C1.73 15.89 1.82 16.36 2.05 16.76L2.89 18.22L2.99 18.37C3.24 18.73 3.59 18.99 4.01 19.13C4.42 19.26 4.86 19.26 5.27 19.12L5.42 19.07C5.81 18.96 6.21 18.93 6.61 18.98C7.01 19.03 7.40 19.15 7.75 19.36L7.89 19.44C8.22 19.66 8.51 19.95 8.73 20.28C8.96 20.61 9.11 20.99 9.19 21.38C9.28 21.84 9.52 22.24 9.88 22.54C10.24 22.83 10.69 23.00 11.15 23H12.84C13.30 23.00 13.75 22.83 14.11 22.54C14.47 22.24 14.71 21.84 14.80 21.38C14.89 20.96 15.06 20.56 15.31 20.21C15.55 19.86 15.88 19.57 16.25 19.36L16.39 19.28C16.75 19.10 17.14 18.99 17.54 18.96C17.94 18.94 18.34 18.99 18.72 19.12L18.89 19.17C19.31 19.27 19.75 19.24 20.15 19.07C20.55 18.90 20.88 18.60 21.10 18.23L21.95 16.76C22.18 16.36 22.26 15.89 22.19 15.43C22.11 14.98 21.88 14.56 21.53 14.26C21.23 13.99 20.98 13.67 20.80 13.31C20.63 12.95 20.52 12.56 20.50 12.16L20.50 12C20.50 11.57 20.59 11.14 20.77 10.75C20.94 10.36 21.20 10.01 21.53 9.73C21.88 9.43 22.11 9.01 22.19 8.55C22.26 8.10 22.18 7.63 21.95 7.23L21.10 5.76C20.88 5.39 20.55 5.09 20.15 4.92C19.76 4.75 19.31 4.72 18.89 4.82L18.72 4.87C18.34 5.00 17.94 5.05 17.54 5.03C17.14 5.00 16.75 4.89 16.4 4.71L16.25 4.63C15.88 4.42 15.56 4.13 15.31 3.78C15.06 3.43 14.89 3.03 14.80 2.61C14.71 2.15 14.47 1.74 14.11 1.45C13.75 1.16 13.30 .99 12.84 1ZM11.15 3H12.84C12.98 3.70 13.26 4.36 13.68 4.94C14.09 5.52 14.63 6.01 15.25 6.37C15.87 6.72 16.55 6.94 17.26 7.01C17.97 7.08 18.69 6.99 19.37 6.76L20.21 8.23C19.67 8.69 19.24 9.27 18.94 9.92C18.65 10.57 18.50 11.28 18.5 12C18.50 12.71 18.65 13.42 18.95 14.07C19.24 14.72 19.67 15.29 20.21 15.76L19.37 17.23C18.69 16.99 17.97 16.91 17.26 16.98C16.55 17.05 15.86 17.27 15.25 17.63C14.63 17.98 14.09 18.47 13.68 19.05C13.26 19.63 12.98 20.29 12.84 21H11.15C11.01 20.29 10.73 19.63 10.31 19.05C9.90 18.47 9.36 17.98 8.75 17.62C8.13 17.27 7.44 17.05 6.73 16.98C6.02 16.91 5.30 16.99 4.62 17.23L3.78 15.76C4.32 15.29 4.75 14.71 5.05 14.06C5.34 13.41 5.49 12.71 5.5 12C5.50 11.28 5.34 10.57 5.05 9.92C4.75 9.27 4.32 8.69 3.78 8.23L4.62 6.76C5.30 7.00 6.02 7.08 6.73 7.01C7.44 6.94 8.13 6.72 8.75 6.37C9.36 6.01 9.90 5.52 10.31 4.94C10.73 4.36 11.01 3.70 11.15 3ZM12.00 8C10.94 8 9.92 8.42 9.17 9.17C8.42 9.92 8.00 10.93 8.00 12C8.00 13.06 8.42 14.07 9.17 14.82C9.92 15.57 10.94 16 12.00 16C13.06 16 14.08 15.57 14.83 14.82C15.58 14.07 16.00 13.06 16.00 12C16.00 10.93 15.58 9.92 14.83 9.17C14.08 8.42 13.06 8 12.00 8ZM12.00 10H12L12.20 10.01C12.69 10.06 13.15 10.29 13.48 10.65C13.81 11.02 14.00 11.50 14 12L13.99 12.20C13.95 12.58 13.80 12.95 13.55 13.25C13.31 13.55 12.98 13.78 12.62 13.90C12.25 14.02 11.85 14.03 11.48 13.93C11.11 13.83 10.77 13.62 10.51 13.34C10.25 13.05 10.08 12.69 10.02 12.31C9.96 11.93 10.01 11.54 10.17 11.18C10.32 10.83 10.58 10.53 10.91 10.32C11.23 10.11 11.61 10.00 12 10",
fill:"white"}}]}:g.bM()]});this.L=l;this.eN=y;this.C=!0;this.listen("click",this.N);this.j(l,"onPlaybackQualityChange",this.updateBadge);this.j(l,"videodatachange",this.updateBadge);this.j(l,"webglsettingschanged",this.updateBadge);this.j(l,"appresize",this.Z);q1(l,this.element,this);this.L.createClientVe(this.element,this,28663);this.updateBadge();this.Z(l.Yz().getPlayerSize())}Z(l){const y=this.L.O();let k=400;y.S?k=300:y.K&&(k=200);l=this.C&&l.width>=k;this.fP(l);this.L.logVisibility(this.element,
l)}N(){if(this.eN.VM)this.eN.Xv();else{const l=g.FY(this.L.r4());l&&!l.loaded&&(l.ef("tracklist",{includeAsr:!0}).length||l.load());this.L.logClick(this.element);this.eN.Bn(this.element)}}updateBadge(){const l=this.L.isHdr();var y=this.L.getPresentingPlayerType(),k=y!==2&&y!==3,z=g.EH(this.L),r=k&&!!g.Yk(this.L.r4());y=r&&z.displayMode===1;z=r&&z.displayMode===2;k=(r=y||z)||!k?null:this.L.getPlaybackQuality();g.I(this.element,"ytp-hdr-quality-badge",l);g.I(this.element,"ytp-hd-quality-badge",!l&&
(k==="hd1080"||k==="hd1440"));g.I(this.element,"ytp-4k-quality-badge",!l&&k==="hd2160");g.I(this.element,"ytp-5k-quality-badge",!l&&k==="hd2880");g.I(this.element,"ytp-8k-quality-badge",!l&&k==="highres");g.I(this.element,"ytp-3d-badge-grey",!l&&r&&y);g.I(this.element,"ytp-3d-badge",!l&&r&&z)}};var noo=class extends g.p1{constructor(l,y,k){if(l.X("web_add_footer_template_to_audio_track")){var z="Ch\u1ec9nh s\u1eeda $BEGIN_LINKng\u00f4n ng\u1eef \u01b0u ti\u00ean$END_LINK trong ph\u1ea7n c\u00e0i \u0111\u1eb7t".split(/\$(BEGIN|END)_LINK/);z={U:"div",B:"ytp-panel-footer-content",W:[z[0],{U:"a",B:"ytp-panel-footer-content-link",G:{href:"/account_playback"},Nd:z[2]},z[4]]}}super("B\u1ea3n \u00e2m thanh",g.Gl.AUDIO,l,y,void 0,void 0,z);this.L=l;this.J=k;this.tracks={};g.zi(this.element,"ytp-audio-menu-item");
this.countLabel=new g.H({U:"div",W:[{U:"span",Nd:"B\u1ea3n \u00e2m thanh"},{U:"span",B:"ytp-menuitem-label-count",Nd:"{{content}}"}]});l.X("web_settings_menu_icons")&&!this.L.X("html5_enable_new_audio_settings_menu")&&(y=l.X("delhi_modern_web_player_icons")?{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M19.4 .2C19.29 .27 19.20 .37 19.13 .49C19.07 .60 19.02 .72 19.01 .85C18.99 .98 18.99 1.12 19.03 1.24C19.06 1.37 19.12 1.49 19.2 1.6L20.8 .4C20.64 .18 20.40 .04 20.14 .01C19.87 -0.02 19.61 .04 19.4 .2ZM20.8 .4L20 1L19.2 1.59C20.37 3.16 21.00 5.06 21.00 7.01C20.99 8.97 20.35 10.87 19.17 12.42C19.01 12.64 18.94 12.90 18.98 13.16C19.02 13.43 19.16 13.66 19.37 13.83C19.58 13.99 19.84 14.05 20.11 14.02C20.37 13.98 20.61 13.84 20.77 13.63C22.21 11.73 22.99 9.41 23 7.02C23.00 4.63 22.23 2.31 20.8 .4ZM10 2C8.67 2 7.40 2.52 6.46 3.46C5.52 4.40 5 5.67 5 7C5 8.32 5.52 9.59 6.46 10.53C7.40 11.47 8.67 12 10 12C11.32 12 12.59 11.47 13.53 10.53C14.47 9.59 15 8.32 15 7C15 5.67 14.47 4.40 13.53 3.46C12.59 2.52 11.32 2 10 2ZM16.17 2.29C15.97 2.48 15.86 2.73 15.86 2.99C15.85 3.26 15.95 3.51 16.14 3.71C16.98 4.58 17.44 5.68 17.49 6.80L17.5 7.02C17.49 8.22 17.01 9.40 16.10 10.32C15.92 10.51 15.83 10.77 15.83 11.03C15.84 11.29 15.95 11.53 16.13 11.71C16.32 11.90 16.57 12.00 16.83 12.00C17.09 12.00 17.34 11.90 17.53 11.72C18.78 10.44 19.49 8.77 19.5 7.03L19.49 6.71C19.42 5.09 18.74 3.53 17.58 2.32C17.49 2.23 17.38 2.15 17.26 2.10C17.14 2.05 17.01 2.02 16.88 2.01C16.75 2.01 16.62 2.03 16.49 2.08C16.37 2.13 16.26 2.20 16.17 2.29ZM10 4C10.39 4 10.78 4.07 11.14 4.22C11.51 4.37 11.84 4.60 12.12 4.87C12.39 5.15 12.62 5.48 12.77 5.85C12.92 6.21 13 6.60 13 7C13 7.39 12.92 7.78 12.77 8.14C12.62 8.51 12.39 8.84 12.12 9.12C11.84 9.39 11.51 9.62 11.14 9.77C10.78 9.92 10.39 10 10 10C9.20 10 8.44 9.68 7.87 9.12C7.31 8.55 7 7.79 7 7C7 6.20 7.31 5.44 7.87 4.87C8.44 4.31 9.20 4 10 4ZM10.39 13.01L10 13C8.01 12.99 6.10 13.73 4.63 15.06L4.34 15.34C3.60 16.08 3.01 16.96 2.60 17.93C2.20 18.90 1.99 19.94 2 21C2 21.26 2.10 21.51 2.29 21.70C2.48 21.89 2.73 22 3 22C3.26 22 3.51 21.89 3.70 21.70C3.89 21.51 4 21.26 4 21C4.00 19.40 4.63 17.88 5.75 16.75L5.97 16.55C7.07 15.55 8.51 15 10 15L10.29 15.00C11.78 15.08 13.18 15.70 14.24 16.75L14.44 16.97C15.44 18.07 16 19.51 16 21C16 21.26 16.10 21.51 16.29 21.70C16.48 21.89 16.73 22 17 22C17.26 22 17.51 21.89 17.70 21.70C17.89 21.51 18 21.26 18 21C18.00 19.01 17.26 17.10 15.93 15.63L15.65 15.34C14.25 13.93 12.37 13.10 10.39 13.01Z",
fill:"white"}}]}:{U:"svg",G:{height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M11.72,11.93C13.58,11.59,15,9.96,15,8c0-2.21-1.79-4-4-4C8.79,4,7,5.79,7,8c0,1.96,1.42,3.59,3.28,3.93 C4.77,12.21,2,15.76,2,20h18C20,15.76,17.23,12.21,11.72,11.93z            M8,8c0-1.65,1.35-3,3-3s3,1.35,3,3s-1.35,3-3,3S8,9.65,8,8z            M11,12.9c5.33,0,7.56,2.99,7.94,6.1H3.06C3.44,15.89,5.67,12.9,11,12.9z            M16.68,11.44l-0.48-0.88C17.31,9.95,18,8.77,18,7.5 c0-1.27-0.69-2.45-1.81-3.06l0.49-0.88C18.11,4.36,19,5.87,19,7.5C19,9.14,18.11,10.64,16.68,11.44z            M18.75,13.13l-0.5-0.87 C19.95,11.28,21,9.46,21,7.5s-1.05-3.78-2.75-4.76l0.5-0.87C20.75,3.03,22,5.19,22,7.5S20.76,11.97,18.75,13.13z",
fill:"white"}}]},this.setIcon(y));g.x(this,this.countLabel);g.F5(this,this.countLabel);l.createClientVe(this.element,this,273318);this.listen("click",this.onClick);this.j(l,"videodatachange",this.Aa);this.j(l,"onPlaybackAudioChange",this.Aa);this.Aa()}Aa(){var l=this.L.getAvailableAudioTracks();if(l.length>1){const y=l.filter(z=>z.isAutoDubbed()),k=l.filter(z=>!z.isAutoDubbed()).map(this.S);
y.length>0&&(this.L.Md("ad_grp",{ad_c:y.length,t_c:l.length}),k.push(new mky),k.push(...y.map(this.S)));q2C(this,k);this.tracks=g.Ey(l,this.S,this);this.countLabel.setContent(l.length?` (${l.length})`:"");this.publish("size-change");l=this.S(this.L.getAudioTrack());this.C(l);this.L.X("html5_enable_new_audio_settings_menu")&&this.J?.zy(l.toString());this.enable(!0)}else this.L.X("html5_enable_new_audio_settings_menu")&&this.J?.zy(""),this.enable(!1)}Z(l){super.Z(l);l=this.tracks[l];this.L.setAudioTrack(l);
this.eN.M7();this.L.Md("ad_sel",{lang:l.a7.id})}S(l){return l.toString()}K(l){this.L.X("html5_enable_new_audio_settings_menu")?this.J&&(l?this.J.tv(this):this.J.Lg(this)):super.K(l)}onClick(){this.L.logClick(this.element)}};var FiL=class extends g.ZE{constructor(l,y){super(g.ni({"aria-haspopup":"true"},["ytp-audio-settings-menu-item"]),g.Gl.ac);this.L=l;this.eN=y;g.zi(this.element,"ytp-audio-settings-menu-item");this.aU=new g.Jc(l,void 0,"\u00c2m thanh");this.countLabel=new g.H({U:"div",W:[{U:"span",Nd:"\u00c2m thanh"},{U:"span",B:"ytp-menuitem-label-count",Nd:"{{content}}"}]});l.X("web_settings_menu_icons")&&this.setIcon({U:"svg",G:{height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M17.5,12c0,2.14-1.5,3.92-3.5,4.38v-1.04c1.44-0.43,2.5-1.76,2.5-3.34c0-1.58-1.06-2.9-2.5-3.34V7.62 C16,8.08,17.5,9.86,17.5,12z M12,4.07v15.86L6.16,15H3V9h3.16L12,4.07z M11,6.22L6.52,10H4v4h2.52L11,17.78V6.22z M21,12 c0,4.08-3.05,7.44-7,7.93v-1.01c3.39-0.49,6-3.4,6-6.92s-2.61-6.43-6-6.92V4.07C17.95,4.56,21,7.92,21,12z",
fill:"white"}}]});this.Ne=new noo(l,this.eN,this);g.x(this,this.Ne);this.j(l,"settingsMenuInitialized",this.xK.bind(this));this.j(l,"videodatachange",this.xK.bind(this));g.x(this,this.countLabel);g.F5(this,this.countLabel);this.eN.tv(this);this.j(l,"onPlaybackAudioChange",this.Zl);this.listen("keydown",this.xF);this.listen("click",this.open)}Zl(){this.L.Zl()}open(){this.aU.CA()>0&&g.rK(this.eN,this.aU)}xK(){this.aU.CA()>0&&this.L.getPresentingPlayerType()!==2&&this.L.getPresentingPlayerType()!==3?
this.element.removeAttribute("aria-disabled"):this.element.setAttribute("aria-disabled","true")}xF(l){l.defaultPrevented||(this.open(),l.preventDefault())}tv(l){this.aU.tv(l)}Lg(l){this.aU.Lg(l)}zy(l){this.setContent(l)}};var oo2=class extends iz{constructor(l,y){super("T\u1ef1 \u0111\u1ed9ng ph\u00e1t",g.Gl.SL);this.L=l;this.eN=y;this.C=!1;this.N=[];this.j(l,"presentingplayerstatechange",this.xK);this.subscribe("select",this.onSelect,this);l.createClientVe(this.element,this,113682);this.xK()}xK(){var l=this.L.getPresentingPlayerType();if(l!==2&&l!==3&&g.Ki(this.L))this.C||(this.eN.tv(this),this.C=!0,this.N.push(this.j(this.L,"videodatachange",this.xK)),this.N.push(this.j(this.L,"videoplayerreset",this.xK)),this.N.push(this.j(this.L,
"onPlaylistUpdate",this.xK)),this.N.push(this.j(this.L,"autonavchange",this.V)),l=this.L.getVideoData(),this.V(l.autonavState),this.L.logVisibility(this.element,this.C));else if(this.C){this.eN.Lg(this);this.C=!1;for(const y of this.N)this.uq(y)}}V(l){this.Z(l!==1)}onSelect(l){this.L.Dn(l?2:1);this.C&&(this.L.logVisibility(this.element,this.C),this.L.logClick(this.element))}Vj(){this.C&&this.eN.Lg(this);super.Vj()}};var N4w=class extends g.ZE{constructor(l,y){super(g.ni({"aria-haspopup":"false"}),0,"Tu\u1ef3 ch\u1ecdn kh\u00e1c");this.L=l;this.eN=y;this.j(this.element,"click",this.onClick);this.eN.tv(this)}onClick(l){l.preventDefault();g.Ci(this.L)?.Kf()?.Xv();g.Ci(this.L)?.XG()?.Bn(l.target)}};var sgy=class extends g.p1{constructor(l,y){let k;g.xp(l.O())&&(k={U:"div",B:"ytp-panel-footer-content",W:[{U:"span",Nd:"\u0110i\u1ec1u ch\u1ec9nh ch\u1ea5t l\u01b0\u1ee3ng c\u1ee7a t\u1ec7p t\u1ea3i xu\u1ed1ng trong ph\u1ea7n "},{U:"a",B:"ytp-panel-footer-content-link",Nd:"C\u00e0i \u0111\u1eb7t",G:{href:"/account_downloads"}}]});super("Ch\u1ea5t l\u01b0\u1ee3ng",g.Gl.PN,l,y,void 0,void 0,k);this.L=l;this.PG={};this.sj={};this.S={};this.Xr=new Set;this.J=this.Y=!1;this.b0="unknown";this.Ja="";this.rb=
new g.VG;g.x(this,this.rb);this.Y=this.L.X("web_player_use_new_api_for_quality_pullback");this.J=this.L.X("web_player_enable_premium_hbr_playback_cap");l.X("web_settings_menu_icons")&&(y=l.X("delhi_modern_web_player_icons")?{U:"svg",G:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M9 3C8.11 2.99 7.25 3.29 6.54 3.83C5.84 4.38 5.34 5.14 5.12 6H3C2.73 6 2.48 6.10 2.29 6.29C2.10 6.48 2 6.73 2 7C2 7.26 2.10 7.51 2.29 7.70C2.48 7.89 2.73 8 3 8H5.12C5.34 8.85 5.84 9.61 6.55 10.16C7.25 10.70 8.11 10.99 9 10.99C9.88 10.99 10.74 10.70 11.44 10.16C12.15 9.61 12.65 8.85 12.87 8H21C21.26 8 21.51 7.89 21.70 7.70C21.89 7.51 22 7.26 22 7C22 6.73 21.89 6.48 21.70 6.29C21.51 6.10 21.26 6 21 6H12.87C12.65 5.14 12.15 4.38 11.45 3.83C10.74 3.29 9.88 2.99 9 3ZM9 5C9.53 5 10.03 5.21 10.41 5.58C10.78 5.96 11 6.46 11 7C11 7.53 10.78 8.03 10.41 8.41C10.03 8.78 9.53 9 9 9C8.46 9 7.96 8.78 7.58 8.41C7.21 8.03 7 7.53 7 7C7 6.46 7.21 5.96 7.58 5.58C7.96 5.21 8.46 5 9 5ZM15 13C14.11 12.99 13.25 13.29 12.54 13.83C11.84 14.38 11.34 15.14 11.12 16H3C2.73 16 2.48 16.10 2.29 16.29C2.10 16.48 2 16.73 2 17C2 17.26 2.10 17.51 2.29 17.70C2.48 17.89 2.73 18 3 18H11.12C11.34 18.85 11.84 19.61 12.55 20.16C13.25 20.70 14.11 20.99 15 20.99C15.88 20.99 16.74 20.70 17.44 20.16C18.15 19.61 18.65 18.85 18.87 18H21C21.26 18 21.51 17.89 21.70 17.70C21.89 17.51 22 17.26 22 17C22 16.73 21.89 16.48 21.70 16.29C21.51 16.10 21.26 16 21 16H18.87C18.65 15.14 18.15 14.38 17.45 13.83C16.74 13.29 15.88 12.99 15 13ZM15 15C15.53 15 16.03 15.21 16.41 15.58C16.78 15.96 17 16.46 17 17C17 17.53 16.78 18.03 16.41 18.41C16.03 18.78 15.53 19 15 19C14.46 19 13.96 18.78 13.58 18.41C13.21 18.03 13 17.53 13 17C13 16.46 13.21 15.96 13.58 15.58C13.96 15.21 14.46 15 15 15Z",
fill:"white"}}]}:{U:"svg",G:{height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M15,17h6v1h-6V17z M11,17H3v1h8v2h1v-2v-1v-2h-1V17z M14,8h1V6V5V3h-1v2H3v1h11V8z            M18,5v1h3V5H18z M6,14h1v-2v-1V9H6v2H3v1 h3V14z M10,12h11v-1H10V12z",fill:"white"}}]},this.setIcon(y));g.zi(this.aU.element,"ytp-quality-menu");this.j(l,"videodatachange",this.xK);this.j(l,"videoplayerreset",this.xK);this.j(l,"onPlaybackQualityChange",this.u0);this.xK();l.createClientVe(this.element,this,137721)}xK(){var l=
this.L.getPresentingPlayerType();if(l!==2&&l!==3){this.PG=this.L.Gi();l=this.L.getAvailableQualityLevels();if(this.J){this.S={};var y=g.UB(this.L,"getAvailableQualityData",[]);for(var k of y)this.S[k.qualityLabel]=k;y=Object.keys(this.S);l[l.length-1]==="auto"&&y.push("auto");this.Xr=new Set(l)}else if(this.Y){k=g.UB(this.L,"getAvailableQualityData",[]);var z=[];for(y of k)this.sj[y.quality]=y,y.quality&&z.push(y.quality);l[l.length-1]==="auto"&&z.push("auto");y=z}else y=l;g.Fq_(this.L)&&this.L.dJ()&&
y.unshift("missing-qualities");{z=this.L.app.je();const r=z.getVideoData();!r.C||!r.C.video||r.C.video.qualityOrdinal<1080||r.Wy?l=!1:(l=/^qsa/.test(r.clientPlaybackNonce),k="r",r.C.id.indexOf(";")>=0&&(l=/^[a-p]/.test(r.clientPlaybackNonce),k="x"),l?(z.Md("iqss",{trigger:k},!0),l=!0):l=!1)}l&&y.unshift("inline-survey");this.V(y);l=this.L.getVideoData().cotn?!0:!1;k=this.rb.Qf();Woy(this,Pl5(this.L.O(),l,k));if(y.length){this.u0();this.enable(!0);return}}this.enable(!1)}u0(){if(this.J){var l=this.L.getPreferredQuality();
this.Xr.has(l)&&(this.b0=this.L.getPlaybackQuality(),this.Ja=this.L.getPlaybackQualityLabel(),l==="auto"?(this.C(l),this.setContent(this.N(l))):this.C(this.Ja))}else l=this.L.getPreferredQuality(),this.options[l]&&(this.b0=this.L.getPlaybackQuality(),this.C(l),l==="auto"&&this.setContent(this.N(l)))}Z(l){if(l!=="missing-qualities"){super.Z(l);var y=this.J?this.S[l]:this.sj[l];var k=y?.quality,z=y?.formatId;y=y?.paygatedQualityDetails;var r=y?.endpoint;y&&this.L.logClick(this.options[l]?.element);
if(this.J){if(g.E(r,nN4)?.popup?.notificationActionRenderer)g.G3(this.L,"innertubeCommand",r);else if(r){g.G3(this.L,"innertubeCommand",r);return}z?this.L.setPlaybackQuality(k,z):this.L.setPlaybackQuality(k)}else{if(this.Y)if(g.E(r,nN4)?.popup?.notificationActionRenderer)g.G3(this.L,"innertubeCommand",r);else if(r){g.G3(this.L,"innertubeCommand",r);return}this.L.setPlaybackQuality(l)}this.eN.Xv();this.xK()}}open(){for(const l of Object.values(this.options))this.L.hasVe(l?.element)&&this.L.logVisibility(l?.element,
!0);super.open();this.L.logClick(this.element)}D(l,y,k){if(l==="missing-qualities")return new g.ZE({U:"a",L_:["ytp-menuitem"],G:{href:"https://support.google.com/youtube/?p=missing_quality",target:this.L.O().D,tabindex:"0",role:"menuitemradio"},W:[{U:"div",L_:["ytp-menuitem-label"],Nd:"{{label}}"}]},y,this.N(l));if(l!=="inline-survey"){var z=(this.J?this.S[l]:this.sj[l])?.paygatedQualityDetails,r=z?.veType;z=z?.trackingParams;y=super.D(l,y,k);z?(this.L.createServerVe(y.element,this,!0),this.L.setTrackingParams(y.element,
z)):r&&this.L.createClientVe(y.element,this,r,!0);return y}r=[{U:"span",Nd:"Ch\u1ea5t l\u01b0\u1ee3ng t\u1ed1t?"}];for(const Z of[!0,!1])l=new g.H({U:"span",B:"ytp-menuitem-inline-survey-response",W:[Z?ppP():VAP()],G:{tabindex:"0",role:"button"}}),l.listen("click",()=>{const e=this.L.app.je();e.Md("iqsr",{tu:Z});e.getVideoData().Wy=!0;this.eN.Xv();this.xK()}),r.push(l);
return new g.ZE({U:"div",B:"ytp-menuitem",G:{"aria-disabled":"true"},W:[{U:"div",L_:["ytp-menuitem-label"],W:r}]},y)}N(l,y=!1){if(l==="missing-qualities")return{U:"div",Nd:"Thi\u1ebfu t\u00f9y ch\u1ecdn?"};if(l==="inline-survey")return"";this.J||g.BO(g.X84,l);let k;k=this.Y||this.J?[qW(this,l,y,!1)]:[Kk5(this,l)];const z=this.L.getPreferredQuality();y||z!=="auto"||l!=="auto"||(k.push(" "),this.J?k.push(qW(this,this.Ja,y,!0,["ytp-menu-label-secondary"])):this.Y?k.push(qW(this,this.b0,y,!0,["ytp-menu-label-secondary"])):
k.push(Kk5(this,this.b0,["ytp-menu-label-secondary"])));return{U:"div",W:k}}};var L1=class extends Jm2{constructor(l){super(l.getAvailablePlaybackRates()[0],l.getAvailablePlaybackRates()[l.getAvailablePlaybackRates().length-1],.05,l.getPlaybackRate(),{U:"div",B:"ytp-speedslider-indicator-container",W:[{U:"div",B:"ytp-speedslider-badge"},{U:"p",B:"ytp-speedslider-text"}]});this.L=l;this.Y=Yg(this.sj,50,this);g.zi(this.C,"ytp-speedslider");this.D=this.qd("ytp-speedslider-text");this.b0=this.qd("ytp-speedslider-badge");this.L.X("web_enable_varispeed_panel")&&g.zi(this.C,"ytp-varispeed-input-slider");
this.cB();this.j(this.C,"change",this.Ja)}J(){super.J();this.D&&this.cB()}Ja(){this.L.X("enable_web_premium_varispeed")&&N7(this,Math.round(this.Z/.05)*.05);this.Y()}sj(){this.L.setPlaybackRate(this.Z,!0)}cB(){this.D.textContent=`${this.Z.toFixed(2)}x`;const l=this.Z>2&&this.L.X("enable_web_premium_varispeed");this.b0.classList.toggle("ytp-speedslider-premium-badge",l);this.b0.setAttribute("aria-label",l?"Premium":"")}K(l){super.K(l);this.Y();this.cB();this.L.X("web_enable_varispeed_panel")?(l.code===
"ArrowUp"||l.code==="ArrowDown")&&l.preventDefault():l.preventDefault()}};var Lif=class extends g.H{constructor(l,y,k){super({U:"div",B:"ytp-slider-section",G:{role:"slider","aria-valuemin":"{{minvalue}}","aria-valuemax":"{{maxvalue}}","aria-valuenow":"{{valuenow}}","aria-valuetext":"{{valuetext}}",tabindex:"0"},W:[{U:"div",B:"ytp-slider",W:[{U:"div",B:"ytp-slider-handle"}]}]});this.A=.05;this.N=l;this.V=y;this.range=this.V-this.N;this.RR=this.qd("ytp-slider-section");this.J=this.qd("ytp-slider");this.sj=this.qd("ytp-slider-handle");this.K=new g.cu(this.J,!0);this.C=k?
k:l;g.x(this,this.K);this.K.subscribe("dragmove",this.Y,this);this.j(this.element,"keydown",this.b0);this.j(this.element,"wheel",this.D);this.init()}init(){this.Z(this.C);this.updateValue("minvalue",this.N);this.updateValue("maxvalue",this.V)}b0(l){if(!l.defaultPrevented){switch(l.keyCode){case 37:case 40:var y=-this.A;break;case 39:case 38:y=this.A;break;default:return}this.Z(this.C+y);l.preventDefault()}}D(l){let y=this.C;y+=(l.deltaX||-l.deltaY)<0?-.05:.05;this.Z(y);l.preventDefault()}Y(l){l=(l-
g.Dj(this.J).x)/150*this.range+this.N;this.Z(l)}Z(l,y=""){l=g.gf(l,this.N,this.V);y===""&&(y=l.toString());this.updateValue("valuenow",l);this.updateValue("valuetext",y);this.sj.style.left=`${(l-this.N)/this.range*130}px`;this.C=l}focus(){this.RR.focus()}};var voL=class extends Lif{constructor(l){super(l.getAvailablePlaybackRates()[0],l.getAvailablePlaybackRates()[l.getAvailablePlaybackRates().length-1],l.getPlaybackRate());this.L=l;this.S=g.Gf("P");this.HG=Yg(this.Ja,50,this);g.zi(this.J,"ytp-speedslider");g.zi(this.S,"ytp-speedslider-text");l=this.S;var y=this.J;y.parentNode&&y.parentNode.insertBefore(l,y.nextSibling);this.cB();this.j(this.L,"onPlaybackRateChange",this.updateValues)}Ja(){this.L.setPlaybackRate(this.C,!0)}cB(){this.S.textContent=`${Wu(this,
this.C)}x`}Z(l){super.Z(l,Wu(this,l).toString());this.S&&(this.cB(),this.HG())}updateValues(){const l=this.L.getPlaybackRate();Wu(this,this.C)!==l&&(this.Z(l),this.cB())}};var B4f=class extends g.kD{constructor(l){super({U:"div",B:"ytp-speedslider-component"});l.X("web_settings_use_input_slider")?this.Z=new L1(l):this.Z=new voL(l);g.x(this,this.Z);this.element.appendChild(this.Z.element)}focus(){this.Z.focus()}};var H3e=class extends PE{constructor(l){const y=new B4f(l);super(l,y,"T\u00f9y ch\u1ec9nh");g.x(this,y)}};var R62=class extends g.p1{constructor(l,y){const k=new H3e(l);super("T\u1ed1c \u0111\u1ed9 ph\u00e1t",g.Gl.OM,l,y,TD(l)?void 0:"T\u00f9y ch\u1ec9nh",TD(l)?void 0:()=>{g.rK(y,k)});
this.Ja=new g.H({U:"div",B:"ytp-menuitem-premium-badge",G:{"aria-label":"Premium"}});this.b0=!1;this.d4={zt0:()=>this.Y};
g.x(this,k);this.aZ=new L1(l);g.x(this,this.aZ);if(l.X("web_settings_menu_icons")){const z=l.X("delhi_modern_web_player_icons")?j15():{U:"svg",G:{height:"24",viewBox:"0 0 24 24",width:"24"},W:[{U:"path",G:{d:"M10,8v8l6-4L10,8L10,8z M6.3,5L5.7,4.2C7.2,3,9,2.2,11,2l0.1,1C9.3,3.2,7.7,3.9,6.3,5z            M5,6.3L4.2,5.7C3,7.2,2.2,9,2,11 l1,.1C3.2,9.3,3.9,7.7,5,6.3z            M5,17.7c-1.1-1.4-1.8-3.1-2-4.8L2,13c0.2,2,1,3.8,2.2,5.4L5,17.7z            M11.1,21c-1.8-0.2-3.4-0.9-4.8-2 l-0.6,.8C7.2,21,9,21.8,11,22L11.1,21z            M22,12c0-5.2-3.9-9.4-9-10l-0.1,1c4.6,.5,8.1,4.3,8.1,9s-3.5,8.5-8.1,9l0.1,1 C18.2,21.5,22,17.2,22,12z",
fill:"white"}}]};this.setIcon(z)}this.L=l;this.b0=!1;this.rb=null;TD(l)?(this.J=g.Ts("T\u00f9y ch\u1ec9nh ($CURRENT_CUSTOM_SPEED)",{CURRENT_CUSTOM_SPEED:this.L.getPlaybackRate().toString()}),this.sj=this.L.getPlaybackRate()):this.sj=this.J=null;g.x(this,this.Ja);this.u0=this.L.getVideoData()?.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.showPlaybackRateUpsellPanelCommand;ScC(l,this.u0)?(this.S=IQ(4),this.L.createClientVe(this.Ja.element,this,273508)):this.S=null;this.L.X("enable_web_premium_varispeed_upsell")&&
this.L.createClientVe(this.element,this,278479);this.Y=this.L.getAvailablePlaybackRates();this.j(l,"presentingplayerstatechange",this.Aa);this.L.getVideoData()?.j2()&&this.j(l,W_(l.O().sA())?"playbackChange":"serverstitchedvideochange",this.Aa);this.j(l,"videodatachange",this.onVideoDataChange);this.j(this.aZ.C,"change",()=>{this.b0=!0;this.Aa()});
this.Aa()}onVideoDataChange(l){l==="dataloaded"&&(l=this.L.getAvailablePlaybackRates(),g.u2(this.Y,l)||(this.Y=l,this.aZ.dispose(),this.aZ=new L1(this.L)),this.Aa())}N(l){return l==="1"?"Chu\u1ea9n":l.toLocaleString()}Aa(){var l=this.L.getVideoData()?.j2();l=this.L.getPresentingPlayerType(l);this.enable(l!==2&&l!==3);f8C(this)}V(l){super.V(l);this.aZ&&this.aZ.C.focus()}K(l){super.K(l);l?(this.rb=this.j(this.L,"onPlaybackRateChange",this.onPlaybackRateChange),f8C(this),gZq(this,this.L.getPlaybackRate()),
this.L.X("enable_web_premium_varispeed_upsell")&&(this.L.logVisibility(this.element,!0),this.S&&this.L.logVisibility(this.Ja.element,!0))):(this.uq(this.rb),this.rb=null)}onPlaybackRateChange(l){const y=this.L.getPlaybackRate();!this.b0&&this.Y.includes(y)||EZz(this,y);gZq(this,l)}D(l,y,k){return l===this.J&&VU(this.L)?super.D(l,y,k,{U:"div",B:"ytp-speed-slider-menu-footer",W:[this.aZ]}):l===this.S&&ScC(this.L,this.u0)?jnq(this,l,y,k):super.D(l,y,k)}Z(l){super.Z(l);l===this.S?(this.L.logClick(this.Ja.element),
g.G3(this.L,"innertubeCommand",this.u0)):l===this.J?this.L.setPlaybackRate(this.sj,!0):this.L.setPlaybackRate(Number(l),!0);(!VU(this.L)||l!==this.J&&l!==this.S)&&this.eN.M7()}RR(l){const y=l===this.J;this.b0=!1;y&&TD(this.L)&&!VU(this.L)?(l=new H3e(this.L),g.rK(this.eN,l)):(this.L.logClick(this.element),super.RR(l))}};var Dge=class extends g.p1{constructor(l,y,k,z){const r=new g.Jc(y,void 0,"Ghi \u0111\u00e8 video");super(z.text||"",l,y,k,"Ghi \u0111\u00e8 video",()=>{g.rK(k,r)});
g.zi(this.element,"ytp-subtitles-options-menu-item");this.setting=z.option.toString();l=z.options;this.settings=g.Ey(l,this.b0,this);this.Y=r;g.x(this,this.Y);y=new g.ZE({U:"div",B:"ytp-menuitemtitle",Nd:"Cho ph\u00e9p ki\u1ec3u ph\u1ee5 \u0111\u1ec1 kh\u00e1c n\u1ebfu theo ch\u1ec9 \u0111\u1ecbnh c\u1ee7a video."},0);g.x(this,y);this.Y.tv(y,!0);this.S=new g.ZE({U:"div",B:"ytp-menuitem",G:{role:"menuitemradio",tabindex:"0"},W:[{U:"div",B:"ytp-menuitem-label",Nd:"B\u1eadt"}]},-1);g.x(this,this.S);
this.Y.tv(this.S,!0);this.j(this.S.element,"click",()=>{nZy(this,!0)});
this.J=new g.ZE({U:"div",B:"ytp-menuitem",G:{role:"menuitemradio",tabindex:"0"},W:[{U:"div",B:"ytp-menuitem-label",Nd:"T\u1eaft"}]},-2);g.x(this,this.J);this.Y.tv(this.J,!0);this.j(this.J.element,"click",()=>{nZy(this,!1)});
this.V(g.sT(l,this.b0))}C(l){super.C(l)}b0(l){return l.option.toString()}getOption(l){return this.settings[l]}N(l){return this.getOption(l).text||""}Z(l){super.Z(l);this.publish("settingChange",this.setting,this.settings[l].option)}};var llo=class extends g.Jc{constructor(l,y){super(l,void 0,"T\u00f9y ch\u1ecdn");this.Vr={};for(let k=0;k<g.PA.length;k++){const z=g.PA[k],r=new Dge(-k,l,y,z);g.x(this,r);r.subscribe("settingChange",this.gK,this);this.Vr[z.option.toString()]=r;this.tv(r,!0)}l=new g.ZE(g.ni(),-g.PA.length,"\u0110\u1eb7t l\u1ea1i");g.x(this,l);l.listen("click",()=>{this.gK("reset",!0)});
this.tv(l,!0)}Pw(l){for(const y of Object.keys(l)){const k=this.Vr[y];if(k){const z=l[y].toString(),r=!!l[`${y}Override`];k.options[z]&&(k.C(z),k.S.element.setAttribute("aria-checked",String(!r)),k.J.element.setAttribute("aria-checked",String(r)))}}}gK(l,y){this.publish("settingChange",l,y)}};var yYB=class extends g.p1{constructor(l,y){super("D\u1ecbch t\u1ef1 \u0111\u1ed9ng",0,l,y);this.L=l;this.languages={};l.createClientVe(this.element,this,127301);l.logVisibility(this.element,!0)}J(l){return l.languageCode}N(l){return this.languages[l].languageName||""}Z(l){this.publish("select",l);this.L.logClick(this.element);g.zN(this.eN)}};var ke2=class extends g.p1{constructor(l,y){const k=new llo(l,y),z=["T\u00f9y ch\u1ecdn c\u00e0i \u0111\u1eb7t n\u00e0y ch\u1ec9 \u00e1p d\u1ee5ng cho video b\u1ea1n \u0111ang xem. \u0110\u1ec3 \u0111i\u1ec1u ch\u1ec9nh ch\u1ebf \u0111\u1ed9 hi\u1ec3n th\u1ecb c\u1ee7a ph\u1ee5 \u0111\u1ec1 tr\u00ean t\u1ea5t c\u1ea3 video, h\u00e3y chuy\u1ec3n \u0111\u1ebfn ph\u1ea7n ","."];let r;g.xp(l.O())&&!l.X("web_deprecate_always_on_captions_settings")&&(r={U:"div",B:"ytp-panel-footer-content",W:[{U:"span",
Nd:z[0]},{U:"a",B:"ytp-panel-footer-content-link",Nd:"C\u00e0i \u0111\u1eb7t",G:{href:"/account_playback"}},{U:"span",Nd:z[1]}]});super("Ph\u1ee5 \u0111\u1ec1",g.Gl.SUBTITLES,l,y,"T\u00f9y ch\u1ecdn",()=>{g.rK(y,k)},r);
this.countLabel=void 0;this.L=l;this.eN=y;this.tracks={};this.sj=new g.B_(()=>{oZy(this,!1)},3E3);
g.x(this,this.sj);l.X("deprecate_captions_track_count_display")||(this.countLabel=new g.H({U:"div",W:[{U:"span",Nd:"Ph\u1ee5 \u0111\u1ec1"},{U:"span",B:"ytp-menuitem-label-count",Nd:"{{content}}"}]}),g.x(this,this.countLabel),g.F5(this,this.countLabel));l.X("web_settings_menu_icons")&&this.setIcon(kHq(l.X("delhi_modern_web_player_icons")));this.J=new yYB(l,y);g.x(this,this.J);this.J.subscribe("select",this.Ja,this);this.b0=k;g.x(this,this.b0);this.b0.subscribe("settingChange",this.gK,this);y.subscribe("show",
this.rb,this);this.j(l,"videodatachange",this.Aa);this.j(l,"onApiChange",this.Aa);this.j(l,"onCaptionsTrackListChanged",this.Aa);this.j(l,"captionschanged",this.Aa);l.createClientVe(this.element,this,127300);this.Aa()}S(l){return g.DB(l)?"__off__":l.displayName}N(l){return l==="__off__"?"T\u1eaft":l==="__translate__"?"D\u1ecbch t\u1ef1 \u0111\u1ed9ng":l==="__contribute__"?"Th\u00eam ph\u1ee5 \u0111\u1ec1":l==="__correction__"?"\u0110\u1ec1 xu\u1ea5t b\u1ea3n s\u1eeda ph\u1ee5 \u0111\u1ec1":(l==="__off__"?
{}:this.tracks[l]).displayName}Z(l){l==="__translate__"?this.J.open():l==="__contribute__"?(this.L.pauseVideo(),this.L.isFullscreen()&&this.L.toggleFullscreen(),l=g.h$(this.L.O(),this.L.getVideoData()),g.HW(l)):l==="__correction__"?(this.L.pauseVideo(),this.L.isFullscreen()&&this.L.toggleFullscreen(),l=Pu(this),Jx(this,l),super.Z(this.S(l)),l=this.L.getVideoData().getPlayerResponse()?.captions?.playerCaptionsTracklistRenderer?.openTranscriptCommand,g.G3(this.L,"innertubeCommand",l),this.eN.M7(),this.Y&&
this.L.logClick(this.Y)):(l==="__correction__"?(this.L.pauseVideo(),this.L.isFullscreen()&&this.L.toggleFullscreen(),l=Pu(this),Jx(this,l),super.Z(this.S(l)),l=this.L.getVideoData().getPlayerResponse()?.captions?.playerCaptionsTracklistRenderer?.openTranscriptCommand,g.G3(this.L,"innertubeCommand",l)):(this.L.logClick(this.element),Jx(this,l==="__off__"?{}:this.tracks[l]),super.Z(l)),this.eN.M7())}Aa(){var l=this.L.getOptions();l=l&&l.indexOf("captions")!==-1;var y=this.L.getVideoData();const k=y&&
y.Jd;var z=!!this.L.getVideoData()?.PF();let r,Z={};if(l||k){if(l){r=this.L.getOption("captions","track");Z=this.L.getOption("captions","tracklist",{includeAsr:!0});var e=z?[]:this.L.getOption("captions","translationLanguages");this.tracks=g.Ey(Z,this.S,this);z=g.sT(Z,this.S);Pu(this)&&y.getPlayerResponse()?.captions?.playerCaptionsTracklistRenderer?.openTranscriptCommand&&z.push("__correction__");if(e.length&&!g.DB(r)){if((y=r.translationLanguage)&&y.languageName){const A=y.languageName;y=e.findIndex(Q=>
Q.languageName===A);
h_Q(e,y)}Fkz(this.J,e);z.push("__translate__")}e=this.S(r)}else this.tracks={},z=[],e="__off__";z.unshift("__off__");this.tracks.__off__={};k&&z.unshift("__contribute__");this.tracks[e]||(this.tracks[e]=r,z.push(e));this.V(z);this.C(e);r&&r.translationLanguage?this.J.C(this.J.J(r.translationLanguage)):xkC(this.J);l&&this.b0.Pw(this.L.getSubtitlesUserSettings());this.L.X("deprecate_captions_track_count_display")||this.countLabel?.setContent(Z&&Z.length?` (${Z.length})`:"");this.publish("size-change");
this.L.logVisibility(this.element,!0);this.enable(!0)}else this.enable(!1)}Ja(l){var y=this.L.getOption("captions","track");y=g.r4(y);y.translationLanguage=this.J.languages[l];Jx(this,y)}gK(l,y){if(l==="reset")this.L.resetSubtitlesUserSettings();else{const k={};k[l]=y;this.L.updateSubtitlesUserSettings(k)}oZy(this,!0);this.sj.start();this.b0.Pw(this.L.getSubtitlesUserSettings())}rb(l){l||this.sj.hV()}Vj(){this.sj.hV();super.Vj()}open(){super.open();this.options.__correction__&&!this.Y&&(this.Y=this.options.__correction__.element,
this.L.createClientVe(this.Y,this,167341),this.L.logVisibility(this.Y,!0))}};var zJx=class extends PE{constructor(l){const y=new L1(l),k=new g.H({U:"div",B:"ytp-variable-speed-panel-chips"}),z=new g.H({U:"button",L_:["ytp-button","ytp-variable-speed-panel-button","ytp-variable-speed-panel-increment-button"],G:{"aria-label":"Gi\u1ea3m t\u1ed1c \u0111\u1ed9 ph\u00e1t 0.05"},W:[{U:"span",Nd:"-"}]});z.listen("click",()=>{this.L.setPlaybackRate(Number((this.L.getPlaybackRate()-.05).toFixed(2)));l.logClick(z.element)});
const r=new g.H({U:"button",L_:["ytp-button","ytp-variable-speed-panel-button","ytp-variable-speed-panel-increment-button"],G:{"aria-label":"T\u0103ng t\u1ed1c \u0111\u1ed9 ph\u00e1t 0.05"},W:[{U:"span",Nd:"+"}]});r.listen("click",()=>{this.L.setPlaybackRate(Number((this.L.getPlaybackRate()+.05).toFixed(2)));l.logClick(r.element)});
var Z=new g.H({U:"div",B:"ytp-variable-speed-panel-slider-container",W:[z,y,r]}),e=new g.H({U:"div",B:"ytp-variable-speed-panel-premium-badge",G:{tabindex:"-1"},W:[{U:"div",B:"ytp-variable-speed-panel-badge"}]}),A=new g.H({U:"span"});const Q=new g.H({U:"div",B:"ytp-variable-speed-panel-display",W:[e,A],G:{"aria-live":"polite"}}),t=new g.H({U:"div",B:"ytp-speed-display-container",W:[Q]}),O=new g.kD({U:"div",B:"ytp-variable-speed-panel-content",G:{tabindex:"0"},W:[t,Z,k]});super(l,O,"T\u1ed1c \u0111\u1ed9 ph\u00e1t");
y.listen("click",()=>{l.logClick(y.C)});
this.L.createClientVe(z.element,this,258237);this.L.logVisibility(z.element,!0);this.L.createClientVe(r.element,this,258236);this.L.logVisibility(r.element,!0);this.L.createClientVe(O.element,this,225845);this.L.logVisibility(O.element,!0);this.L.createClientVe(y.C,this,258235);this.L.logVisibility(y.C,!0);this.L.createClientVe(k.element,this,258234);this.L.logVisibility(k.element,!0);g.x(this,Q);this.MN=A;g.x(this,this.MN);this.QQ=e;g.x(this,this.QQ);this.aZ=y;g.x(this,this.aZ);g.x(this,z);g.x(this,
r);g.x(this,k);g.x(this,Z);g.x(this,t);g.x(this,O);Z=Yg(this.DB,50,this);e=l.getVideoData();const d=e?.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.showPlaybackRateUpsellPanelCommand;if((e=e?.getPlayerResponse()?.playerConfig?.granularVariableSpeedConfig?.defaultPlaybackRateOptions)&&e.length>0)for(const w of e){const h=d&&w.isPremiumUpsell,U=new g.H({U:"button",L_:["ytp-button","ytp-variable-speed-panel-preset-button","ytp-variable-speed-panel-button"],W:h?[{U:"div",B:"ytp-variable-speed-panel-premium-upsell-icon"},
{U:"span",Nd:`${w.label}`}]:[{U:"span",Nd:`${w.label}`}]});h&&(this.L.createClientVe(U.element,this,273508),this.L.logVisibility(U.element,!0));g.x(this,U);k.element.appendChild(U.element);U.listen("click",()=>{h?(g.G3(this.L,"innertubeCommand",d),l.logClick(U.element)):w.value&&this.L.setPlaybackRate(w.value/100);l.logClick(k.element)});
e=new g.H({U:"div",B:"ytp-variable-speed-panel-preset-button-wrapper",G:{"data-priority":`${w.priority??0}`},W:[U]});g.x(this,e);w.value===100&&(A=new g.H({U:"div",B:"ytp-variable-speed-panel-preset-button-label-text",Nd:"Chu\u1ea9n"}),g.x(this,A),e.element.appendChild(A.element));k.element.appendChild(e.element)}this.j(this.aZ.C,"input",()=>{this.cB(this.aZ.Z)});
this.j(l,"onPlaybackRateChange",this.onPlaybackRateChange);this.j(l,"resize",Z);this.onPlaybackRateChange(l.getPlaybackRate());this.DB()}onPlaybackRateChange(l){N7(this.aZ,l,!0);this.cB(l)}cB(l){l=Math.round(l*20)/20;this.MN.element.textContent=`${l.toFixed(2)}x`;this.QQ.element.classList.toggle("ytp-variable-speed-panel-premium-badge-visible",l>2)}DB(){const l=this.L.getPlayerSize().width;var y=this.element.getElementsByClassName("ytp-variable-speed-panel-preset-button-wrapper");for(const k of y){y=
k;const z=Number(y.dataset.priority??0);let r=!0;l<680?r=z>1:l<1900&&(r=z>0);g.A2(y,r);y.setAttribute("aria-hidden",r?"false":"true")}}};var rYo=class extends g.p1{constructor(l,y){super("T\u1ed1c \u0111\u1ed9 ph\u00e1t",g.Gl.OM,l,y);this.L=l;l.X("web_settings_menu_icons")&&this.setIcon(j15());this.S(l.getPlaybackRate());this.j(l,"onPlaybackRateChange",this.S);this.j(l,"presentingplayerstatechange",this.J);this.L.getVideoData()?.j2()&&this.j(l,W_(l.O().sA())?"playbackChange":"serverstitchedvideochange",this.J);this.J()}J(){var l=this.L.getVideoData()?.j2();l=this.L.getPresentingPlayerType(l);this.enable(l!==2&&l!==3)}S(l){this.setContent(l===
1?"Chu\u1ea9n":l.toString())}open(){g.rK(this.eN,new zJx(this.L))}};var ZKO=class extends g.Yn{constructor(l){super(l,"ytp-settings-menu");this.DQ=new g.Jc(this.L);this.Wc=this.m9=this.settingsButton=null;this.isInitialized=this.VS=!1;g.x(this,this.DQ);this.hide();g.rK(this,this.DQ);l.createClientVe(this.element,this,108341,!0);this.subscribe("show",y=>{this.Ul(y)});
this.j(l,"highlightSettingsMenu",()=>{this.VS=!0;this.Bn()});
this.j(l,"openSettingsMenuItem",y=>{y&&(this.VS=!0,this.Bn(),y==="menu_item_video_quality_advanced"&&this.m9?.open())});
l.X("html5_enable_voice_boost")&&(this.j(l,"onPlaybackAudioChange",this.Zl),this.j(l,"videodatachange",this.Zl));this.L.O()?.getWebPlayerContextConfig()?.enableFullscreenComponentsFeature&&this.j(this.element,"wheel",y=>{y.stopPropagation()})}initialize(){if(!this.isInitialized){var l=this.L.O();
this.isInitialized=!0;try{this.m9=new sgy(this.L,this)}catch(k){g.WH(Error("QualityMenuItem creation failed"))}g.x(this,this.m9);var y=new ke2(this.L,this);g.x(this,y);l.enableSpeedOptions&&(l.X("web_enable_varispeed_panel")?(y=new rYo(this.L,this),g.x(this,y)):(y=new R62(this.L,this),g.x(this,y)));(g.u9(l)||l.S)&&(l.C||l.u0)&&(y=new N4w(this.L,this),g.x(this,y));l.q_&&!l.X("web_player_move_autonav_toggle")&&(y=new oo2(this.L,this),g.x(this,y));l.X("html5_enable_new_audio_settings_menu")?(this.Wc=
new FiL(this.L,this),g.x(this,this.Wc)):(l=new noo(this.L,this),g.x(this,l));this.L.publish("settingsMenuInitialized");m$(this.settingsButton,this.DQ.CA())}}tv(l){this.initialize();this.DQ.tv(l);m$(this.settingsButton,this.DQ.CA())}Lg(l){this.IR()||(this.VM&&this.DQ.CA()<=1&&this.hide(),this.DQ.Lg(l),m$(this.settingsButton,this.DQ.CA()))}Bn(l){this.initialize();this.DQ.CA()>0&&super.Bn(l)}Xv(){this.VS?this.VS=!1:super.Xv()}show(){super.show();g.zi(this.L.getRootNode(),"ytp-settings-shown")}hide(){super.hide();
g.ZM(this.L.getRootNode(),"ytp-settings-shown")}Ul(l){this.L.logVisibility(this.element,l);this.L.publish("settingsMenuVisibilityChanged",l)}Zl(){this.L.Zl()}};var eJw=class extends g.H{constructor(l,y){super({U:"button",L_:["ytp-subtitles-button","ytp-button"],G:{"aria-keyshortcuts":"c","aria-pressed":"{{pressed}}","data-priority":"5","data-tooltip-title":"{{tooltip-title}}",title:l.X("player_tooltip_data_title_killswitch")?"{{title}}":"","data-title-no-tooltip":"{{data-title-no-tooltip}}"},W:[l.X("delhi_modern_web_player_icons")?{U:"div",B:"ytp-subtitles-button-icon",Nd:"{{icon}}"}:yNs(l)]});this.L=l;this.tooltip=y.As();l.X("delhi_modern_web_player_icons")&&
this.updateValue("icon",snC(this));this.j(l,"videodatachange",this.Aa);this.j(l,"appresize",this.Aa);this.j(l,"promotooltipacceptbuttonclicked",this.Z);this.j(l,"onApiChange",this.Aa);this.j(l,"onCaptionsTrackListChanged",this.Aa);this.j(l,"captionschanged",this.Aa);this.L.createClientVe(this.element,this,127299);this.Aa();this.listen("click",this.onClick);this.addOnDisposeCallback(g.mn(y.As(),this.element))}onClick(){if(Yl(this)&&(this.L.toggleSubtitles(!0),this.L.logClick(this.element),!this.isEnabled())){let l=
!1;const y=g.wz().G7(65);g.xp(this.L.O())&&y!=null&&(l=!y);l&&this.L.O().X("web_player_nitrate_promo_tooltip")&&this.L.publish("showpromotooltip",this.element)}}Z(l){g.Ci(this.L)?.Kf()?.Bn(l)}isEnabled(){const l=this.L.getOption("captions","track");return!(!l||!l.displayName)}Aa(){const l=Yl(this);let y=300;this.L.O().K&&(y=480);this.L.X("delhi_modern_web_player_icons")&&this.updateValue("icon",snC(this));var k=this.L.O();(k.X("html5_hide_unavailable_subtitles_button")?0:!k.S)?(l?(this.qd("ytp-subtitles-button-icon")?.setAttribute("fill-opacity",
"1"),this.L.O().X("player_tooltip_data_title_killswitch")?this.updateValue("title",g.Wl(this.L,"Ph\u1ee5 \u0111\u1ec1","c")):this.update({"tooltip-title":g.Wl(this.L,"Ph\u1ee5 \u0111\u1ec1","c")}),this.update({"data-title-no-tooltip":"Ph\u1ee5 \u0111\u1ec1"})):(this.L.X("delhi_modern_web_player_icons")?this.qd("ytp-subtitles-button-icon")?.getElementsByTagName("svg")[0].setAttribute("fill-opacity","0.3"):this.qd("ytp-subtitles-button-icon")?.setAttribute("fill-opacity","0.3"),this.updateValue("title",
"Kh\u00f4ng c\u00f3 ph\u1ee5 \u0111\u1ec1"),this.update({"tooltip-title":"Kh\u00f4ng c\u00f3 ph\u1ee5 \u0111\u1ec1"}),this.update({"data-title-no-tooltip":"Kh\u00f4ng c\u00f3 ph\u1ee5 \u0111\u1ec1"})),k=this.L.X("player_disable_caption_button_if_captions_not_available")&&this.L.X("delhi_modern_web_player")?l:!0):(this.updateValue("title",g.Wl(this.L,"Ph\u1ee5 \u0111\u1ec1","c")),this.update({"tooltip-title":g.Wl(this.L,"Ph\u1ee5 \u0111\u1ec1","c")}),this.update({"data-title-no-tooltip":"Ph\u1ee5 \u0111\u1ec1"}),
k=l);this.tooltip.W1();k=k&&this.L.Yz().getPlayerSize().width>=y;this.fP(k);this.L.logVisibility(this.element,k);l?this.updateValue("pressed",this.isEnabled()):this.updateValue("pressed",!1)}Cl(l){super.Cl(l)}};g.AY2=class extends g.H{constructor(l,y,k=350){super({U:"div",L_:["ytp-time-display","notranslate"],W:[{U:"div",B:"ytp-time-wrapper",W:[{U:"div",B:"ytp-time-contents",G:l.X("delhi_modern_web_player")?{"aria-label":"{{timeDisplayAriaLabel}}",role:"button",tabindex:"0"}:{"aria-label":"{{timeDisplayAriaLabel}}"},W:[{U:"span",B:"ytp-time-clip-icon",Nd:"{{clipicon}}",G:{"aria-label":"T\u1ea1o \u0111o\u1ea1n tr\u00edch video"}},{U:"span",B:"ytp-time-current",Nd:"{{currenttime}}"},{U:"span",B:"ytp-time-separator",
Nd:" / "},{U:"span",B:"ytp-time-duration",Nd:"{{duration}}"}]}]},{U:"span",B:"ytp-clip-watch-full-video-button-separator",Nd:"\u2022"},{U:"span",B:"ytp-clip-watch-full-video-button",Nd:"{{watchfullvideo}}"}]});this.api=l;this.D=k;this.liveBadge=new g.H({U:"button",L_:["ytp-live-badge","ytp-button"],G:{disabled:"true"},Nd:"{{content}}"});this.Z=null;this.Nf=this.C=!1;this.A=this.K=this.S=null;this.isPremiere=!1;this.J=this.V=null;this.N=!1;this.HF=this.liveIndicatorText=null;this.sj=this.qd("ytp-clip-watch-full-video-button");
this.liveBadge.setContent("Tr\u1ef1c ti\u1ebfp");g.x(this,this.liveBadge);this.api.X("web_player_updated_entrypoint")||this.api.X("delhi_modern_web_player")?this.liveBadge.Uj(this.qd("ytp-time-wrapper")):this.liveBadge.Uj(this.element);this.tooltip=y.As();this.liveBadge.listen("click",this.onClick.bind(this));this.api.X("delhi_modern_web_player")&&(y=this.qd("ytp-time-wrapper"),this.j(y,"click",this.Y),y.classList.toggle("ytp-time-wrapper-delhi",this.canShowCountdown()));this.j(this.sj,"click",this.b0);
this.j(this.api,W_(this.api.O().sA())?"playbackChange":"serverstitchedvideochange",()=>{LkC(this,this.api.getProgressState().isAtLiveHead)});
this.j(l,"presentingplayerstatechange",this.Pn);this.j(l,"appresize",this.Pn);this.j(l,"onLoopRangeChange",this.onLoopRangeChange);this.j(l,"videodatachange",this.onVideoDataChange);(y=l.getVideoData())&&this.updateVideoData(y);this.Pn();vZ_(this,l.getLoopRange())}canShowCountdown(){return!gO(this)&&!p7(this)}Pn(){var l=this.api.Yz().getPlayerSize().width,y=this.D;this.api.O().K&&(y=400);y=l>=y&&(!p7(this)||!this.api.getPlayerStateObject().Z(64));this.fP(y);g.I(this.element,"ytp-time-display-allow-autohide",
y&&l<400);l=this.api.getProgressState();if(y){var k=this.api.getPresentingPlayerType();y=this.api.getCurrentTime({playerType:k,D5:!1});this.C&&k!==2&&(y-=l.airingStart);gO(this)&&(y-=this.HF.startTimeMs/1E3);this.canShowCountdown()&&this.N&&(y-=this.api.getDuration({playerType:k,D5:!1}));var z=g.Sr(y);this.V!==z&&(this.updateValue("currenttime",z),this.V=z);k=gO(this)?(this.HF.endTimeMs-this.HF.startTimeMs)/1E3:this.api.getDuration({playerType:k,D5:!1});z=g.Sr(k);this.J!==z&&(this.updateValue("duration",
z),this.J=z);y=g.Ts("$PLAY_PROGRESS / $DURATION",{PLAY_PROGRESS:g.Sr(y,!0),DURATION:g.Sr(k,!0)});this.updateValue("timeDisplayAriaLabel",y)}LkC(this,l.isAtLiveHead);vZ_(this,this.api.getLoopRange())}onLoopRangeChange(l){const y=this.HF!==l;this.HF=l;y&&(this.Pn(),K7(this))}b0(){this.api.setLoopRange(null)}Y(){this.N=!this.N;this.Pn()}onVideoDataChange(l,y,k){this.updateVideoData((this.api.O().X("enable_topsoil_wta_for_halftime")||this.api.O().X("enable_topsoil_wta_for_halftime_live_infra"))&&k===
2?this.api.getVideoData({playerType:1}):y);this.Pn();K7(this)}updateVideoData(l){this.Nf=l.isLivePlayback&&!l.vZ;this.C=l.Ja();this.isPremiere=l.isPremiere;this.liveIndicatorText=(l=l.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.liveIndicatorText)?Rd(l):null;g.I(this.element,"ytp-live",p7(this));this.api.X("delhi_modern_web_player")&&this.qd("ytp-time-wrapper").classList.toggle("ytp-time-wrapper-delhi",this.canShowCountdown())}onClick(l){l.target===this.liveBadge.element&&(this.api.seekTo(Infinity,
void 0,void 0,void 0,33),this.api.playVideo())}Vj(){this.Z&&this.Z();super.Vj()}};var $yv=class extends g.H{constructor(l,y){super({U:"div",B:"ytp-volume-panel",G:{title:l.X("player_tooltip_data_title_killswitch")?"\u00c2m l\u01b0\u1ee3ng":"","data-tooltip-title":"\u00c2m l\u01b0\u1ee3ng",role:"slider","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":"{{valuenow}}","aria-valuetext":"{{valuetext}}",tabindex:"0"},W:[{U:"div",B:"ytp-volume-slider",W:[{U:"div",B:"ytp-volume-slider-handle"}]}]});this.api=l;this.S=y;this.IH=!1;this.b0=this.volume=0;this.J=null;this.C=this.Z=
this.isDragging=!1;this.S=y;this.N=l.qV();this.Y=l.X("web_player_use_screen_width_for_big_mode");this.A=this.qd("ytp-volume-slider");this.RR=this.qd("ytp-volume-slider-handle");this.V=new g.cu(this.A,!0);g.x(this,this.V);this.V.subscribe("dragstart",this.PG,this);this.V.subscribe("dragmove",this.Ja,this);this.V.subscribe("dragend",this.u0,this);this.j(l,"onVolumeChange",this.onVolumeChange);this.j(l,"appresize",this.rb);this.j(l,"fullscreentoggled",this.BU);this.j(l,"onShowControls",this.D);this.j(l,
"onHideControls",this.D);this.j(this.element,"keydown",this.HG);this.j(this.element,"focus",()=>{f7(this,this.Z,this.isDragging,!0,this.api.IH())});
this.j(this.element,"blur",()=>{f7(this,this.Z,this.isDragging,!1,this.api.IH())});
BwC(this,l.Yz().getPlayerSize());EG(this,l.getVolume(),l.isMuted());q1(l,this.element,this)}BU(){Hts(this)}rb(l){BwC(this,l);this.Y&&Hts(this)}HG(l){if(!l.defaultPrevented){const y=l.keyCode;let k=null;y===37?k=this.volume-5:y===39?k=this.volume+5:y===36?k=0:y===35&&(k=100);k!==null&&(k=g.gf(k,0,100),k===0?this.api.mute():(this.api.isMuted()&&this.api.unMute(),this.api.setVolume(k)),l.preventDefault())}}sj(l){const y=l.deltaX||-l.deltaY;l.deltaMode?this.api.setVolume(this.volume+(y<0?-10:10)):this.api.setVolume(this.volume+
g.gf(y/10,-10,10));l.preventDefault();this.api.O()?.getWebPlayerContextConfig()?.enableFullscreenComponentsFeature&&l.stopPropagation()}PG(){f7(this,this.Z,!0,this.C,this.api.IH());this.b0=this.volume;this.api.isMuted()&&this.api.unMute()}Ja(l){var y=this.N?78:52,k=this.N?18:12;l-=g.Dj(this.A).x;k=g.gf((l-k/2)/(y-k),0,1);this.Y&&(k=g.gf(l/y,0,1));y=k;y=this.api.X("web_player_non_linear_volume_controls")?y<=.25?y/.25*.1:.1+(y-.25)/.75*.9:y;this.api.setVolume(y*100)}u0(){f7(this,this.Z,!1,this.C,this.api.IH());
this.volume===0&&(this.api.mute(),this.api.setVolume(this.b0))}onVolumeChange(l){EG(this,l.volume,l.muted)}D(){f7(this,this.Z,this.isDragging,this.C,this.api.IH())}K(l){g.I(this.element,"ytp-volume-control-hover",l);f7(this,l,this.isDragging,this.C,this.api.IH())}Vj(){super.Vj();g.ZM(this.S,"ytp-volume-slider-active")}};var Qm1=class extends g.H{constructor(l,y){const k=l.O(),z=["ytp-youtube-button","ytp-button","yt-uix-sessionlink"];k.N&&z.push("no-link");const r={title:l.X("player_tooltip_data_title_killswitch")?"{{title}}":"","data-tooltip-title":"{{tooltip-title}}",target:k.D,"data-priority":"6","data-sessionlink":"feature=player-button"};k.N||(r.href="{{url}}");super({U:"a",L_:z,G:r,Nd:"{{logoSvg}}"});this.Z=null;this.api=l;this.visible=!1;k.N||(this.Z=this.listen("click",this.onClick));this.j(l,"videodatachange",
this.onVideoDataChange);this.j(l,"videoplayerreset",this.onVideoDataChange);this.j(l,"onLoopRangeChange",this.onVideoDataChange);this.j(l,"appresize",this.TE);this.onVideoDataChange();k.N||this.addOnDisposeCallback(g.mn(y.As(),this.element));this.TE()}onVideoDataChange(){var l=this.api.O();this.TE();this.visible=!!this.api.getVideoData().videoId&&!this.api.getVideoData({playerType:1}).Wn;this.fP(this.visible);this.api.logVisibility(this.element,this.visible&&this.C_);if(this.visible){var y=this.api.getVideoUrl(!0,
!1,!1,!0);this.updateValue("url",y)}l.N&&(this.Z&&(this.uq(this.Z),this.Z=null),this.element.removeAttribute("href"),this.element.removeAttribute("title"),this.element.removeAttribute("aria-label"),g.zi(this.element,"no-link"));y=this.api.O();l=this.api.getVideoData();let k="";y.N||(y=g.mc(y),y.indexOf("www.")===0&&(y=y.substring(4)),k=g.du(l)?"Xem tr\u00ean YouTube Music":y==="youtube.com"?"Xem tr\u00ean YouTube":g.Ts("Xem tr\u00ean $WEBSITE",{WEBSITE:y}));this.api.X("player_tooltip_data_title_killswitch")?
this.updateValue("title",k):this.updateValue("tooltip-title",k)}onClick(l){this.api.X("web_player_log_click_before_generating_ve_conversion_params")&&this.api.logClick(this.element);const y=this.api.O();let k=this.api.getVideoUrl(!g.ne(l),!1,!0,!0);if(g.u9(y)){const z={};g.u9(y)&&g.UB(this.api,"addEmbedsConversionTrackingParams",[z]);k=g.UI(k,z)}g.Hl(k,this.api,l);this.api.X("web_player_log_click_before_generating_ve_conversion_params")||this.api.logClick(this.element)}TE(){let l={U:"svg",G:{height:"100%",
version:"1.1",viewBox:"0 0 67 36",width:"100%"},W:[{U:"path",N_:!0,B:"ytp-svg-fill",G:{d:"M 45.09 10 L 45.09 25.82 L 47.16 25.82 L 47.41 24.76 L 47.47 24.76 C 47.66 25.14 47.94 25.44 48.33 25.66 C 48.72 25.88 49.16 25.99 49.63 25.99 C 50.48 25.99 51.1 25.60 51.5 24.82 C 51.9 24.04 52.09 22.82 52.09 21.16 L 52.09 19.40 C 52.12 18.13 52.05 17.15 51.90 16.44 C 51.75 15.74 51.50 15.23 51.16 14.91 C 50.82 14.59 50.34 14.44 49.75 14.44 C 49.29 14.44 48.87 14.57 48.47 14.83 C 48.27 14.96 48.09 15.11 47.93 15.29 C 47.78 15.46 47.64 15.65 47.53 15.86 L 47.51 15.86 L 47.51 10 L 45.09 10 z M 8.10 10.56 L 10.96 20.86 L 10.96 25.82 L 13.42 25.82 L 13.42 20.86 L 16.32 10.56 L 13.83 10.56 L 12.78 15.25 C 12.49 16.62 12.31 17.59 12.23 18.17 L 12.16 18.17 C 12.04 17.35 11.84 16.38 11.59 15.23 L 10.59 10.56 L 8.10 10.56 z M 30.10 10.56 L 30.10 12.58 L 32.59 12.58 L 32.59 25.82 L 35.06 25.82 L 35.06 12.58 L 37.55 12.58 L 37.55 10.56 L 30.10 10.56 z M 19.21 14.46 C 18.37 14.46 17.69 14.63 17.17 14.96 C 16.65 15.29 16.27 15.82 16.03 16.55 C 15.79 17.28 15.67 18.23 15.67 19.43 L 15.67 21.06 C 15.67 22.24 15.79 23.19 16 23.91 C 16.21 24.62 16.57 25.15 17.07 25.49 C 17.58 25.83 18.27 26 19.15 26 C 20.02 26 20.69 25.83 21.19 25.5 C 21.69 25.17 22.06 24.63 22.28 23.91 C 22.51 23.19 22.63 22.25 22.63 21.06 L 22.63 19.43 C 22.63 18.23 22.50 17.28 22.27 16.56 C 22.04 15.84 21.68 15.31 21.18 14.97 C 20.68 14.63 20.03 14.46 19.21 14.46 z M 56.64 14.47 C 55.39 14.47 54.51 14.84 53.99 15.61 C 53.48 16.38 53.22 17.60 53.22 19.27 L 53.22 21.23 C 53.22 22.85 53.47 24.05 53.97 24.83 C 54.34 25.40 54.92 25.77 55.71 25.91 C 55.97 25.96 56.26 25.99 56.57 25.99 C 57.60 25.99 58.40 25.74 58.96 25.23 C 59.53 24.72 59.81 23.94 59.81 22.91 C 59.81 22.74 59.79 22.61 59.78 22.51 L 57.63 22.39 C 57.62 23.06 57.54 23.54 57.40 23.83 C 57.26 24.12 57.01 24.27 56.63 24.27 C 56.35 24.27 56.13 24.18 56.00 24.02 C 55.87 23.86 55.79 23.61 55.75 23.25 C 55.71 22.89 55.68 22.36 55.68 21.64 L 55.68 21.08 L 59.86 21.08 L 59.86 19.16 C 59.86 17.99 59.77 17.08 59.58 16.41 C 59.39 15.75 59.07 15.25 58.61 14.93 C 58.15 14.62 57.50 14.47 56.64 14.47 z M 23.92 14.67 L 23.92 23.00 C 23.92 24.03 24.11 24.79 24.46 25.27 C 24.82 25.76 25.35 26.00 26.09 26.00 C 27.16 26.00 27.97 25.49 28.5 24.46 L 28.55 24.46 L 28.76 25.82 L 30.73 25.82 L 30.73 14.67 L 28.23 14.67 L 28.23 23.52 C 28.13 23.73 27.97 23.90 27.77 24.03 C 27.57 24.16 27.37 24.24 27.15 24.24 C 26.89 24.24 26.70 24.12 26.59 23.91 C 26.48 23.70 26.43 23.35 26.43 22.85 L 26.43 14.67 L 23.92 14.67 z M 36.80 14.67 L 36.80 23.00 C 36.80 24.03 36.98 24.79 37.33 25.27 C 37.60 25.64 37.97 25.87 38.45 25.96 C 38.61 25.99 38.78 26.00 38.97 26.00 C 40.04 26.00 40.83 25.49 41.36 24.46 L 41.41 24.46 L 41.64 25.82 L 43.59 25.82 L 43.59 14.67 L 41.09 14.67 L 41.09 23.52 C 40.99 23.73 40.85 23.90 40.65 24.03 C 40.45 24.16 40.23 24.24 40.01 24.24 C 39.75 24.24 39.58 24.12 39.47 23.91 C 39.36 23.70 39.31 23.35 39.31 22.85 L 39.31 14.67 L 36.80 14.67 z M 56.61 16.15 C 56.88 16.15 57.08 16.23 57.21 16.38 C 57.33 16.53 57.42 16.79 57.47 17.16 C 57.52 17.53 57.53 18.06 57.53 18.78 L 57.53 19.58 L 55.69 19.58 L 55.69 18.78 C 55.69 18.05 55.71 17.52 55.75 17.16 C 55.79 16.81 55.87 16.55 56.00 16.39 C 56.13 16.23 56.32 16.15 56.61 16.15 z M 19.15 16.19 C 19.50 16.19 19.75 16.38 19.89 16.75 C 20.03 17.12 20.09 17.7 20.09 18.5 L 20.09 21.97 C 20.09 22.79 20.03 23.39 19.89 23.75 C 19.75 24.11 19.51 24.29 19.15 24.30 C 18.80 24.30 18.54 24.11 18.41 23.75 C 18.28 23.39 18.22 22.79 18.22 21.97 L 18.22 18.5 C 18.22 17.7 18.28 17.12 18.42 16.75 C 18.56 16.38 18.81 16.19 19.15 16.19 z M 48.63 16.22 C 48.88 16.22 49.08 16.31 49.22 16.51 C 49.36 16.71 49.45 17.05 49.50 17.52 C 49.55 17.99 49.58 18.68 49.58 19.55 L 49.58 21 L 49.59 21 C 49.59 21.81 49.57 22.45 49.5 22.91 C 49.43 23.37 49.32 23.70 49.16 23.89 C 49.00 24.08 48.78 24.17 48.51 24.17 C 48.30 24.17 48.11 24.12 47.94 24.02 C 47.76 23.92 47.62 23.78 47.51 23.58 L 47.51 17.25 C 47.59 16.95 47.75 16.70 47.96 16.50 C 48.17 16.31 48.39 16.22 48.63 16.22 z "}}]},
y=28666;const k=this.api.getVideoData();this.api.isEmbedsShortsMode()?l={U:"svg",G:{fill:"none",height:"100%",viewBox:"-10 -8 67 36",width:"100%"},W:[{U:"path",G:{d:"m.73 13.78 2.57-.05c-.05 2.31.36 3.04 1.34 3.04.95 0 1.34-.61 1.34-1.88 0-1.88-.97-2.83-2.37-4.04C1.47 8.99.55 7.96.55 5.23c0-2.60 1.15-4.14 4.17-4.14 2.91 0 4.12 1.70 3.71 5.20l-2.57.15c.05-2.39-.20-3.22-1.26-3.22-.97 0-1.31.64-1.31 1.82 0 1.77.74 2.31 2.34 3.84 1.98 1.88 3.09 2.98 3.09 5.54 0 3.24-1.26 4.48-4.20 4.48-3.06.02-4.30-1.62-3.78-5.12ZM9.67.74h2.83V4.58c0 1.15-.05 1.95-.15 2.93h.05c.54-1.15 1.44-1.75 2.60-1.75 1.75 0 2.5 1.23 2.5 3.35v9.53h-2.83V9.32c0-1.03-.25-1.54-.90-1.54-.48 0-.92.28-1.23.79V18.65H9.70V.74h-.02ZM18.67 13.27v-1.82c0-4.07 1.18-5.64 3.99-5.64 2.80 0 3.86 1.62 3.86 5.64v1.82c0 3.96-1.00 5.59-3.94 5.59-2.98 0-3.91-1.67-3.91-5.59Zm5 1.03v-3.94c0-1.72-.25-2.60-1.08-2.60-.79 0-1.05.87-1.05 2.60v3.94c0 1.80.25 2.62 1.05 2.62.82 0 1.08-.82 1.08-2.62ZM27.66 6.03h2.19l.25 2.73h.10c.28-2.01 1.21-3.01 2.39-3.01.15 0 .30.02.51.05l-.15 3.27c-1.18-.25-2.13-.05-2.57.72V18.63h-2.73V6.03ZM34.80 15.67V8.27h-1.03V6.05h1.15l.36-3.73h2.11V6.05h1.93v2.21h-1.80v6.98c0 1.18.15 1.44.61 1.44.41 0 .77-.05 1.10-.18l.36 1.80c-.85.41-1.93.54-2.60.54-1.82-.02-2.21-.97-2.21-3.19ZM40.26 14.81l2.39-.05c-.12 1.39.36 2.19 1.21 2.19.72 0 1.13-.46 1.13-1.10 0-.87-.79-1.46-2.16-2.5-1.62-1.23-2.60-2.16-2.60-4.20 0-2.24 1.18-3.32 3.63-3.32 2.60 0 3.63 1.28 3.42 4.35l-2.39.10c-.02-1.90-.28-2.44-1.08-2.44-.77 0-1.10.38-1.10 1.08 0 .97.56 1.44 1.49 2.11 2.21 1.64 3.24 2.47 3.24 4.53 0 2.26-1.28 3.40-3.73 3.40-2.78-.02-3.81-1.54-3.45-4.14Z",
fill:"#fff"}}]}:g.du(k)&&(l={U:"svg",G:{fill:"none",height:"25",viewBox:"0 0 140 25",width:"140"},W:[{U:"path",G:{d:"M33.96 20.91V15.45L37.43 4.11H34.84L33.52 9.26C33.22 10.44 32.95 11.67 32.75 12.81H32.59C32.48 11.81 32.16 10.50 31.84 9.24L30.56 4.11H27.97L31.39 15.45V20.91H33.96Z",fill:"white"}},{U:"path",G:{d:"M40.92 8.31C37.89 8.31 36.85 10.06 36.85 13.83V15.62C36.85 19.00 37.50 21.12 40.86 21.12C44.17 21.12 44.88 19.10 44.88 15.62V13.83C44.88 10.46 44.20 8.31 40.92 8.31ZM42.21 16.73C42.21 18.37 41.92 19.40 40.87 19.40C39.84 19.40 39.55 18.36 39.55 16.73V12.69C39.55 11.29 39.75 10.04 40.87 10.04C42.05 10.04 42.21 11.36 42.21 12.69V16.73Z",
fill:"white"}},{U:"path",G:{d:"M49.09 21.10C50.55 21.10 51.46 20.49 52.21 19.39H52.32L52.43 20.91H54.42V8.55H51.78V18.48C51.50 18.97 50.85 19.33 50.24 19.33C49.47 19.33 49.23 18.72 49.23 17.70V8.55H46.60V17.82C46.60 19.83 47.18 21.10 49.09 21.10Z",fill:"white"}},{U:"path",G:{d:"M59.64 20.91V6.16H62.68V4.11H53.99V6.16H57.03V20.91H59.64Z",fill:"white"}},{U:"path",G:{d:"M64.69 21.10C66.15 21.10 67.06 20.49 67.81 19.39H67.92L68.03 20.91H70.02V8.55H67.38V18.48C67.10 18.97 66.45 19.33 65.84 19.33C65.07 19.33 64.83 18.72 64.83 17.70V8.55H62.20V17.82C62.20 19.83 62.78 21.10 64.69 21.10Z",
fill:"white"}},{U:"path",G:{d:"M77.49 8.28C76.21 8.28 75.29 8.84 74.68 9.75H74.55C74.63 8.55 74.69 7.53 74.69 6.72V3.45H72.14L72.13 14.19L72.14 20.91H74.36L74.55 19.71H74.62C75.21 20.52 76.12 21.03 77.33 21.03C79.34 21.03 80.20 19.30 80.20 15.62V13.71C80.20 10.27 79.81 8.28 77.49 8.28ZM77.58 15.62C77.58 17.92 77.24 19.29 76.17 19.29C75.67 19.29 74.98 19.05 74.67 18.60V11.25C74.94 10.55 75.54 10.04 76.21 10.04C77.29 10.04 77.58 11.35 77.58 13.74V15.62Z",fill:"white"}},{U:"path",G:{d:"M89.47 13.51C89.47 10.53 89.17 8.32 85.74 8.32C82.51 8.32 81.79 10.47 81.79 13.63V15.80C81.79 18.88 82.45 21.12 85.66 21.12C88.20 21.12 89.51 19.85 89.36 17.39L87.11 17.27C87.08 18.79 86.73 19.41 85.72 19.41C84.45 19.41 84.39 18.20 84.39 16.40V15.56H89.47V13.51ZM85.68 9.98C86.90 9.98 86.99 11.13 86.99 13.08V14.09H84.39V13.08C84.39 11.15 84.47 9.98 85.68 9.98Z",
fill:"white"}},{U:"path",G:{d:"M93.18 20.86H95.50V13.57C95.50 11.53 95.46 9.36 95.30 6.46H95.56L95.99 8.24L98.73 20.86H101.09L103.78 8.24L104.25 6.46H104.49C104.37 9.03 104.30 11.35 104.30 13.57V20.86H106.63V4.06H102.67L101.25 10.27C100.65 12.85 100.22 16.05 99.97 17.68H99.78C99.60 16.02 99.15 12.83 98.56 10.29L97.10 4.06H93.18V20.86Z",fill:"white"}},{U:"path",G:{d:"M111.27 21.05C112.73 21.05 113.64 20.44 114.39 19.34H114.50L114.61 20.86H116.60V8.50H113.96V18.43C113.68 18.92 113.03 19.28 112.42 19.28C111.65 19.28 111.41 18.67 111.41 17.65V8.50H108.78V17.77C108.78 19.78 109.36 21.05 111.27 21.05Z",
fill:"white"}},{U:"path",G:{d:"M121.82 21.12C124.24 21.12 125.59 20.05 125.59 17.86C125.59 15.87 124.59 15.06 122.21 13.44C121.12 12.72 120.53 12.27 120.53 11.21C120.53 10.42 121.02 10.00 121.91 10.00C122.88 10.00 123.21 10.64 123.25 12.46L125.41 12.34C125.59 9.49 124.57 8.27 121.95 8.27C119.47 8.27 118.28 9.34 118.28 11.46C118.28 13.42 119.21 14.31 120.96 15.53C122.51 16.60 123.36 17.27 123.36 18.16C123.36 18.89 122.85 19.42 121.96 19.42C120.94 19.42 120.36 18.54 120.46 17.21L118.27 17.25C117.93 19.81 119.13 21.12 121.82 21.12Z",
fill:"white"}},{U:"path",G:{d:"M128.45 6.93C129.35 6.93 129.77 6.63 129.77 5.39C129.77 4.23 129.32 3.87 128.45 3.87C127.57 3.87 127.14 4.19 127.14 5.39C127.14 6.63 127.55 6.93 128.45 6.93ZM127.23 20.86H129.76V8.50H127.23V20.86Z",fill:"white"}},{U:"path",G:{d:"M135.41 21.06C136.67 21.06 137.38 20.91 137.95 20.37C138.80 19.63 139.15 18.48 139.09 16.54L136.78 16.42C136.78 18.54 136.44 19.34 135.45 19.34C134.36 19.34 134.18 18.15 134.18 15.99V13.43C134.18 11.07 134.41 9.95 135.47 9.95C136.35 9.95 136.70 10.69 136.70 13.05L138.99 12.89C139.15 11.20 138.98 9.82 138.18 9.05C137.58 8.49 136.69 8.27 135.51 8.27C132.48 8.27 131.54 10.19 131.54 13.84V15.53C131.54 19.18 132.25 21.06 135.41 21.06Z",
fill:"white"}}]},y=216163);g.du(k)?g.zi(this.element,"ytp-youtube-music-button"):g.ZM(this.element,"ytp-youtube-music-button");l.G={...l.G,"aria-hidden":"true"};this.updateValue("logoSvg",l);this.api.hasVe(this.element)&&this.api.destroyVe(this.element);this.api.createClientVe(this.element,this,y,!0)}Cl(l){super.Cl(l);this.api.logVisibility(this.element,this.visible&&l)}};var tD1=class extends g.cI{constructor(l,y,k){super();this.L=l;this.sj=y;this.fg=k;this.kz=NaN;this.b0=this.Xr=this.playButton=this.J=this.S=this.u0=this.RR=this.Y=this.C_=this.muteButton=this.A=this.mK=this.UH=this.Oj=null;this.N=new ZKO(this.L);this.progressBar=new g.fex(this.L,this.sj);this.Bb=new g.AY2(this.L,this.sj);this.gb=new Iey(this.L,this.sj);this.D=new g.sj(this.hv,null,this);k=l.O();this.fg.subscribe("autohideupdate",this.Ko,this);var z=!l.getPlayerStateObject().isCued(),r;(this.T7=!l.X("delhi_modern_web_player")&&
l.O().X("html5_player_dynamic_bottom_gradient"))?this.mK=r=new uv1(l):r=new g.H({U:"div",B:"ytp-gradient-bottom"});g.x(this,r);g.pi(l,r.element,9);this.HG=new g.oT(r,250,z,100);g.x(this,this.HG);this.Z=new g.H({U:"div",B:"ytp-chrome-bottom",W:[{U:"div",B:"ytp-chrome-controls"}]});g.x(this,this.Z);g.pi(l,this.Z.element,9);l.X("frosted_glass_controls_opacity_animation")&&this.Z.element.classList.add("ytp-frosted-glass-opacity-animation");this.Ja=new g.oT(this.Z,250,z,100);g.x(this,this.Ja);this.rb=
this.Z.element.children[0];g.x(this,this.N);g.pi(l,this.N.element,6);this.N.subscribe("show",Z=>{this.L.We(!Z);l.Nu(this.N,Z)});
g.x(this,this.progressBar);jP(this,this.progressBar,this.Z.element,void 0,0);z=new WiO(l,y);g.x(this,z);g.pi(l,z.element,4);z=new g.Ev({U:"div",B:"ytp-left-controls"});g.x(this,z);z.Uj(this.rb);l.X("delhi_modern_web_player")||(r=new g.sR(l,y,!1),g.x(this,r),jP(this,r,z.element));l.X("web_render_jump_buttons")&&(this.C_=new T42(l,-10),g.x(this,this.C_),jP(this,this.C_,z.element));k.rb||(this.playButton=new g.KiL(l,y),g.x(this,this.playButton),jP(this,this.playButton,z.element));l.X("web_render_jump_buttons")&&
(this.Y=new T42(l,10),g.x(this,this.Y),jP(this,this.Y,z.element));l.X("delhi_modern_web_player")&&(r=new g.sR(l,y,!1),g.x(this,r),jP(this,r,z.element));r=new g.sR(l,y,!0);g.x(this,r);jP(this,r,z.element);if(!l.X("delhi_modern_web_player")||l.X("delhi_modern_web_player_horizontal_volume_controls"))if(r=new g.H({U:"span",B:"ytp-volume-area"}),g.x(this,r),jP(this,r,z.element),!k.SN&&(this.muteButton=new NF(l,y),g.x(this,this.muteButton),this.muteButton.Uj(r.element),k.HG&&!k.K)){const Z=new $yv(l,this.Z.element);
this.Xr=Z;g.x(this,Z);Z.Uj(r.element);r=new g.cu(r.element);g.x(this,r);r.subscribe("hoverstart",()=>{this.Xr?.K(!0)});
r=new g.cu(z.element);g.x(this,r);r.subscribe("hoverend",()=>{this.Xr?.K(!1)})}l.X("delhi_modern_web_player_lhs_volume_controls")&&!l.X("delhi_modern_web_player_horizontal_volume_controls")&&(z.element.classList.add("ytp-left-controls-with-volume"),this.muteButton=new NF(l,y),g.x(this,this.muteButton),this.muteButton.Uj(z.element),this.muteButton.element.classList.add("ytp-standalone-mute-button"));
g.x(this,this.Bb);jP(this,this.Bb,z.element,"ytp-time-wrapper");this.RR=new mgw(l,this.progressBar);g.x(this,this.RR);jP(this,this.RR,z.element,"ytp-chapter-title");k.X("web_key_moments_markers")&&(this.u0=new VRL(l,this.progressBar),g.x(this,this.u0),jP(this,this.u0,z.element,"ytp-chapter-title"));l.X("delhi_modern_web_player")?this.V=new g.Ev({U:"div",B:"ytp-right-controls",W:[{U:"div",B:SP.RIGHT_CONTROLS_LEFT},{U:"div",B:SP.RIGHT_CONTROLS_RIGHT}]}):this.V=new g.Ev({U:"div",B:"ytp-right-controls"});
g.x(this,this.V);jP(this,this.V,this.rb);l.X("delhi_modern_web_player")&&(this.A=new qlw(l),g.x(this,this.A),this.A.Uj(this.V.qd(SP.RIGHT_CONTROLS_LEFT)),l.X("delhi_modern_web_player_lhs_volume_controls")||l.X("delhi_modern_web_player_horizontal_volume_controls")||(this.muteButton=new NF(l,y),g.x(this,this.muteButton),this.muteButton.Uj(this.V.qd(SP.RIGHT_CONTROLS_LEFT))));this.WG=new eJw(l,y);g.x(this,this.WG);n7(this,this.WG,"RIGHT_CONTROLS_LEFT");this.settingsButton=new Sl1(l,this.N);g.x(this,
this.settingsButton);Nwz(this.N,this.settingsButton);n7(this,this.settingsButton,"RIGHT_CONTROLS_LEFT");z=l.getVideoData();if(k.sR||z.Wn&&k.controlsType==="1")this.S=new Qm1(l,y),g.x(this,this.S),this.S.Uj(this.V.element);k.showMiniplayerButton&&!l.X("web_player_miniplayer_in_context_menu")&&(this.J=new Prp(l),g.x(this,this.J),n7(this,this.J,"RIGHT_CONTROLS_RIGHT"));k.showMiniplayerButton&&this.j(l,"minimized",()=>{this.N.hide()});
k.V9&&(y=new jgw(l,this.N),g.x(this,y),n7(this,y,"RIGHT_CONTROLS_RIGHT"));k.OG&&(y=new b31(l),g.x(this,y),n7(this,y,"RIGHT_CONTROLS_RIGHT"));g.x(this,this.gb);n7(this,this.gb,"RIGHT_CONTROLS_RIGHT");g.x(this,this.D);this.j(l,"appresize",this.TE);this.j(l,"fullscreentoggled",this.TE);this.A?.subscribe("small-mode-expand-right-bottom-controls",()=>{Rn5(this)});
this.A?.subscribe("small-mode-collapse-right-bottom-controls",()=>{Rn5(this)});
this.j(l,"presentingplayerstatechange",this.PG);this.j(l,"videodatachange",this.onVideoDataChange);this.TE()}onProgress(){if(this.L.X("web_player_max_seekable_on_ended")||!this.L.getPlayerStateObject().Z(2))k1(this.fg),this.progressBar.Pn(),this.Bb.Pn()}Ko(){this.PG();if(k1(this.fg))this.progressBar.J();else this.onProgress()}hv(){this.onProgress();this.D.start()}PG(){var l;if(l=!this.L.O().C){l=this.progressBar;const k=2*g.gU()*l.K;var y=l.N;l=(y.Z-y.C)*1E3/l.api.getPlaybackRate()/k<300}l=l&&this.L.getPlayerStateObject().isPlaying()&&
!!window.requestAnimationFrame;y=!l;k1(this.fg)&&(l=y=!1);y?this.b0||(this.b0=this.j(this.L,"progresssync",this.onProgress)):this.b0&&(this.uq(this.b0),this.b0=null);l?this.D.isActive()||this.D.start():this.D.stop()}R7(){return this.playButton?(this.playButton.focus(),!0):!1}TE(){var l=this.L.qV();const y=this.L.Yz().getPlayerSize();var k=this.L.Yz().nK;const z=FE(this),r=lE5(this);var Z=Math.max(y.width-z*2,100);if(this.kz!==y.width||this.Oj!==l||this.L.X("web_player_rtr_ctrls")&&this.UH!==k)this.kz=
y.width,this.Oj=l,this.UH=k,this.Z.element.style.width=`${r}px`,this.Z.element.style.left=`${z}px`,g.Jj4(this.progressBar,z,r,l),this.L.As().o0=r;k=this.N;Z=Math.min(570*(l?1.5:1),Z);l=Math.min(413*(l?1.5:1),Math.round((y.height-oQ(this))*.82));k.maxWidth=Z;k.maxHeight=l;k.BT();this.PG();this.T7&&uiz(this.mK,y.height)}onVideoDataChange(){const l=this.L.getVideoData();this.rb.style.background=l.Wn?l.bN:"";this.Y&&I15(this.Y,l.showSeekingControls);this.C_&&I15(this.C_,l.showSeekingControls)}Jv(){return this.Z.element}xz(){return this.progressBar}g4(l,
y){const k=Number(l.element.getAttribute("data-priority"))||0;let z=0,r=this.V.element;y&&this.L.X("delhi_modern_web_player")&&(r=this.V.qd(SP[y]));for(const Z of r.children){if(k<(Number(Z.getAttribute("data-priority"))||0))break;z++}l.Uj(r,z)}};var OKR=class extends VH{constructor(l){super(l,!1);this.suggestedActions={};this.Z=null;this.V=!1;this.element.setAttribute("data-overlay-order","7");this.j(this.L,"videodatachange",this.onVideoDataChange);this.j(this.L,g.uR("suggested_action_button_visible"),y=>{this.text=y=y.id;D8(this);this.onClickCommand=this.suggestedActions[y]?.tapCommand;this.enabled=!0;this.Ul()});
this.j(this.L,g.xR("suggested_action_button_visible"),y=>{this.enabled=!1;this.Ul();this.L.removeCueRange(y.id)});
this.j(l,"presentingplayerstatechange",this.onStateChange)}rb(l){l.target===this.dismissButton.element?this.Z&&x9z(zk(),this.Z):(this.onClickCommand&&(this.S(!1),g.G3(this.L,"innertubeCommand",this.onClickCommand)),this.K())}K(){this.enabled=!1;this.sj.hide()}onVideoDataChange(l,y){l==="dataloaded"&&yaz(this);l=[];if(y=g.E(y.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.suggestedActionsRenderer,kcy)?.suggestedActions)for(var k of y)(y=g.E(k,zry))&&g.E(y.trigger,qs)&&l.push(y);if(l.length!==
0){k=[];for(const z of l){l=g.E(z.trigger,qs);if(!l)continue;y=(y=z.title)?g.$b(y):"View Chapters";const r=l.timeRangeStartMillis,Z=l.timeRangeEndMillis;l=l.onlyTriggersOnPlayerPause;z.tapCommand&&(r!=null&&Z!=null&&k.push(new g.N1(r,Z,{priority:9,namespace:"suggested_action_button_visible",id:y})),r!=null&&Z!=null||l)&&(this.suggestedActions[y]=z,z.rendererContext&&!this.N&&(l=g.E(z.rendererContext,QOQ))&&(l=l.loggingDirectives?.trackingParams)&&(this.L.setTrackingParams(this.badge.element,l),this.N=
!0),z.dismissButtonClientVeSpec?.uiType&&!this.Z&&(this.Z=aN(z.dismissButtonClientVeSpec.uiType),Z5(zk(),this.Z)))}this.L.Wa(k)}}A(){return this.enabled}Ul(){this.enabled?this.WG.start():Hr(this);this.C()}onStateChange(l){for(const y of Object.keys(this.suggestedActions))if(g.E(this.suggestedActions[y].trigger,qs)?.onlyTriggersOnPlayerPause){l.state.isPaused()&&!this.V?(this.text=y,D8(this),this.onClickCommand=this.suggestedActions[y]?.tapCommand,this.enabled=!0,this.Ul(),this.V=!0):l.oldState.isPaused()&&
(this.enabled=!1,this.Ul());break}}Vj(){yaz(this);super.Vj()}};var vE={CHANNEL_NAME:"ytp-title-channel-name",FULLERSCREEN_LINK:"ytp-title-fullerscreen-link",LINK:"ytp-title-link",SESSIONLINK:"yt-uix-sessionlink",SUBTEXT:"ytp-title-subtext",TEXT:"ytp-title-text",TITLE:"ytp-title"},dyR=class extends g.H{constructor(l){super({U:"div",B:vE.TITLE,W:[{U:"div",L_:[vE.TEXT,l.X("enable_larger_title_line_height")?"ytp-title-text-larger-line-height":""],W:[{U:"a",L_:[vE.LINK,vE.SESSIONLINK],G:{target:l.O().D,href:"{{url}}","data-sessionlink":"feature=player-title",tabIndex:"{{channelTitleFocusable}}"},
Nd:"{{title}}"},{U:"div",B:vE.SUBTEXT,W:["{{subtextElement}}"]}]}]});this.api=l;this.Z=null;this.link=this.qd(vE.LINK);l.createClientVe(this.element,this,23851);this.j(l,"videodatachange",this.Aa);this.j(l,"videoplayerreset",this.Aa);this.Aa()}onClick(l){this.api.logClick(this.element);var y=this.api.O();let k=this.api.getVideoUrl(!g.ne(l),!1,!0);g.u9(y)&&(y={},g.UB(this.api,"addEmbedsConversionTrackingParams",[y]),k=g.UI(k,y));g.Hl(k,this.api,l)}Aa(){const l=this.api.getVideoData(),y=this.api.O();
this.updateValue("title",l.title);var k={U:"a",B:vE.CHANNEL_NAME,G:{href:"{{channelLink}}",target:"_blank"},Nd:"{{channelName}}"};this.api.O().N?k={U:"span",B:vE.CHANNEL_NAME,Nd:"{{channelName}}",G:{tabIndex:"{{channelSubtextFocusable}}"}}:l.jW&&(k={U:"span",B:vE.SUBTEXT,Nd:l.jW});this.updateValue("subtextElement",k);kNz(this);this.api.getPresentingPlayerType()===2&&(k=this.api.getVideoData(),k.videoId&&k.isListed&&k.author&&k.u0&&k.profilePicture?(this.updateValue("channelLink",k.u0),this.updateValue("channelName",
k.author),this.updateValue("channelTitleFocusable","0")):kNz(this));k=y.externalFullscreen||!this.api.isFullscreen()&&y.pS;g.I(this.link,vE.FULLERSCREEN_LINK,k);y.Y||!l.videoId||k||l.Wn||y.N?this.Z&&(this.updateValue("url",null),this.uq(this.Z),this.Z=null):(this.updateValue("url",this.api.getVideoUrl(!0)),this.Z||(this.Z=this.j(this.link,"click",this.onClick)));y.N&&(this.element.classList.add("ytp-no-link"),this.updateValue("channelName",g.u9(y)?l.expandedTitle:l.author),this.updateValue("channelTitleFocusable",
"0"),this.updateValue("channelSubtextFocusable","0"))}};g.wZe=class extends g.H{constructor(l,y){const k={U:"div",B:"ytp-tooltip-progress-bar-pill",W:[{U:"div",B:"ytp-tooltip-progress-bar-pill-time-stamp",Nd:"{{pillTimeStamp}}"},{U:"div",B:"ytp-tooltip-progress-bar-pill-title",Nd:"{{pillTitle}}"}]};super({U:"div",W:[{U:"div",B:"ytp-tooltip-text-wrapper",G:{"aria-hidden":"{{ariaHidden}}"},W:[{U:"div",B:"ytp-tooltip-edu",W:[{U:"svg",G:{height:"100%",viewBox:"0 0 36 36",width:"100%"},W:[{U:"path",G:{d:"M14.1 36.75 12 34.65 24 22.65 36 34.65 33.9 36.75 24 26.85ZM14.1 24.1 12 22 24 10 36 22 33.9 24.1 24 14.2Z"}}]},
{U:"span",Nd:"{{eduText}}"}]},{U:"div",B:"ytp-tooltip-image"},{U:"div",B:"ytp-tooltip-title",W:[{U:"span",Nd:"{{title}}"},{U:"div",B:"ytp-tooltip-keyboard-shortcut",Nd:"{{keyBoardShortcutTitle}}"}]},{U:"div",B:"ytp-tooltip-bottom-text",W:[{U:"span",B:"ytp-tooltip-text",Nd:"{{text}}"},{U:"div",B:"ytp-tooltip-keyboard-shortcut",Nd:"{{keyBoardShortcut}}"}]},l.X("frosted_glass_controls_opacity_animation")?null:k]},{U:"div",B:"ytp-tooltip-bg",W:[{U:"div",B:"ytp-tooltip-duration",Nd:"{{duration}}"}]},l.X("frosted_glass_controls_opacity_animation")?
k:null]});this.api=l;this.u0=y;this.D=z=>{(z=z.relatedTarget)&&g.cf(this.Z,z)||this.J()};
this.S=z=>{this.type===3&&this.J();(z=z.currentTarget)&&z.nodeType===1&&!this.type&&(z.removeEventListener("mouseover",this.S),z.addEventListener("mouseout",this.D),z.removeEventListener("focus",this.S),z.addEventListener("blur",this.D),eIC(this,z,2))};
this.Y=()=>{this.J()};
this.type=this.Z=null;this.A=!1;this.C=null;this.N="";this.K=!0;this.scale=1;this.env=this.api.O();this.Ja=this.env.C;this.wrapper=this.qd("ytp-tooltip-text-wrapper");this.bg=this.qd("ytp-tooltip-bg");this.HG=this.qd("ytp-tooltip-edu");this.image=this.qd("ytp-tooltip-image");this.text=this.qd("ytp-tooltip-text");this.bottomText=this.qd("ytp-tooltip-bottom-text");this.title=this.qd("ytp-tooltip-title");this.fade=new g.oT(this,100);this.V=NaN;this.o0=this.api.Yz().getPlayerSize().width;this.b0=new g.B_(this.rb,
250,this);this.sj=new g.B_(this.J,5E3,this);g.x(this,this.fade);g.x(this,this.b0);g.x(this,this.sj);vu&&(l=this.qd("ytp-tooltip-text"),l.setAttribute("role","text"),l.setAttribute("aria-live","polite"));if(this.api.X("frosted_glass_controls_opacity_animation"))for(const z of this.element.children)g.zi(z,"ytp-frosted-glass-fade-transition")}setEnabled(l){if(this.type!=null)if(l)switch(this.type){case 3:case 2:NW(this);this.fade.show();break;default:this.fade.show()}else this.fade.hide();this.K=l}X2(l,
y,k,z,r,Z,e,A){if(!this.Ja||this.env.K){this.type===3&&this.J();this.type!==1&&(g.yp(this.element,"ytp-tooltip ytp-bottom"),this.api.X("frosted_glass_controls_opacity_animation")&&g.zi(this.element,"ytp-frosted-glass-fade-transition"),this.type=1,this.K&&this.fade.show(),this.C&&this.C.dispose(),(this.C=this.api.mS())&&this.C.subscribe("l",this.RR,this));if(A){const Q=g.Zo(this.bg).height||141;this.HG.style.bottom=`${Q+2}px`}else this.HG.style.display="none";this.env.X("delhi_modern_web_player")?
(this.update({pillTimeStamp:k,pillTitle:Z??"",eduText:A??""}),g.zi(this.element,"ytp-tooltip-progress-bar-style")):(this.update({text:k,title:Z??"",eduText:A??""}),g.I(this.bottomText,"ytp-tooltip-text-no-title",this.type===1&&!Z));this.api.isInline()&&g.zi(this.bottomText,"ytp-modern-tooltip-text");g.I(this.element,"ytp-text-detail",!!z);k=-1;this.C&&(k=GE(this.C,243*this.scale),this.env.X("web_l3_storyboard")&&this.C.levels.length===4&&(k=this.C.levels.length-1),k=Oc5(this.C,k,y));ZJt(this,k);if(e)switch(y=
g.Zo(this.element).width,e){case 1:this.title.style.right="0";this.title.style.textAlign="left";break;case 2:this.title.style.right=`${y}px`;this.title.style.textAlign="right";break;case 3:this.title.style.right=`${y/2}px`,this.title.style.textAlign="center"}ras(this,!!z,l,r)}}VC(){this.type===1&&this.J()}Ml(l,y){if(this.type)if(this.type===3)this.J();else return;eIC(this,l,3,y)}W1(){this.Z&&!this.A&&(this.env.X("player_tooltip_data_title_killswitch")?this.Z.hasAttribute("title")&&(this.N=this.Z.getAttribute("title")||
"",this.Z.removeAttribute("title"),this.K&&NW(this)):this.Z.hasAttribute("data-tooltip-title")&&(this.N=this.Z.getAttribute("data-tooltip-title")||"",this.Z.removeAttribute("data-tooltip-title"),this.K&&NW(this)))}RR(l,y){l<=this.V&&this.V<=y&&(l=this.V,this.V=NaN,ZJt(this,l))}rb(){tnq(this.C,this.V,243*this.scale)}J(){switch(this.type){case 2:const l=this.Z;l.removeEventListener("mouseout",this.D);l.addEventListener("mouseover",this.S);l.removeEventListener("blur",this.D);l.addEventListener("focus",
this.S);Aa4(this);break;case 3:Aa4(this);break;case 1:this.C&&(this.C.unsubscribe("l",this.RR,this),this.C=null),this.api.removeEventListener("videoready",this.Y),this.b0.stop()}this.type=null;this.K&&this.fade.hide()}WZ(...l){if(this.Z)for(l=0;l<arguments.length;l++)g.cf(arguments[l],this.Z)&&this.J()}Vj(){this.type!=null&&this.J();this.C&&this.C.dispose();super.Vj()}};var hJR=class extends g.H{constructor(l){super({U:"button",L_:["ytp-watch-later-button","ytp-button"],G:{title:l.X("player_tooltip_data_title_killswitch")?"{{title}}":"","data-tooltip-title":"{{tooltip-title}}","data-tooltip-image":"{{image}}","data-tooltip-opaque":String(g.u9(l.O()))},W:[{U:"div",B:"ytp-watch-later-icon",Nd:"{{icon}}"},{U:"div",B:"ytp-watch-later-title",Nd:"Xem sau"}]});this.L=l;this.icon=null;this.visible=this.isRequestPending=this.Z=!1;n0Q(l);l.createClientVe(this.element,this,
28665);this.listen("click",this.onClick,this);this.j(l,"videoplayerreset",this.onReset);this.j(l,"appresize",this.C);this.j(l,"videodatachange",this.C);this.j(l,"presentingplayerstatechange",this.C);this.C();l=this.L.O();const y=g.Ay("yt-player-watch-later-pending");l.V&&y?(BCg(),$LC(this)):this.Aa(2);g.I(this.element,"ytp-show-watch-later-title",g.u9(l));q1(this.L,this.element,this)}C(){this.visible=QlT(this);this.fP(this.visible);this.icon&&tXs(this,this.icon);this.L.logVisibility(this.element,
this.visible&&this.C_)}Qi(){return this.L.getVideoData().videoId}onClick(){this.L.logClick(this.element);const l=this.L.O(),y=this.Qi();l.sj?$LC(this):OJ4(this,y)}onReset(){this.isRequestPending=this.Z=!1;this.Aa(2);this.C()}Aa(l,y){const k=this.L.O();tXs(this,l);y?this.L.X("player_tooltip_data_title_killswitch")?this.update({title:y,image:null}):this.update({"tooltip-title":y,image:null}):k.userDisplayName?(l={USER_NAME:k.userDisplayName},this.L.X("player_tooltip_data_title_killswitch")?this.update({title:this.Z?
g.Ts("\u0110\u01b0\u1ee3c th\u00eam v\u1edbi t\u01b0 c\u00e1ch $USER_NAME",l):g.Ts("Xem sau b\u1eb1ng t\u00ean $USER_NAME",l),image:gk(k)}):this.update({"tooltip-title":this.Z?g.Ts("\u0110\u01b0\u1ee3c th\u00eam v\u1edbi t\u01b0 c\u00e1ch $USER_NAME",l):g.Ts("Xem sau b\u1eb1ng t\u00ean $USER_NAME",l),image:gk(k)})):this.L.X("player_tooltip_data_title_killswitch")?this.update({title:"Xem sau",image:null}):this.update({"tooltip-title":"Xem sau",image:null});this.L.W1()}Cl(l){super.Cl(l);this.L.logVisibility(this.element,
this.visible&&l)}};var Ge2=class extends g.TF{constructor(){super(...arguments);this.Gd=(this.x_=g.u9(this.api.O()))&&(this.api.O().C||If()||qP());this.P_=48;this.aQ=69;this.GK=this.Eo=null;this.qy=[];this.fM=this.IY=this.ip=this.qB=this.Lp=null;this.nh=[];this.contextMenu=this.nE=this.overflowButton=this.Hw=this.m$=this.searchButton=this.copyLinkButton=this.shareButton=this.jZ=this.H1=this.title=this.channelAvatar=this.FZ=this.tooltip=null;this.Na=!1;this.pZ=this.Qg=this.qh=this.o8=null;this.N9=this.o3=this.mD=!1}init(){this.Lp=
new g.Fv2(this.api);this.api.X("web_player_delhi_dtts")?this.qB=new i3O(this.api):this.qB=new R1O(this.api);this.IY=new g.H({U:"div",B:"ytp-chrome-top"});this.tooltip=new g.wZe(this.api,this);this.channelAvatar=new seB(this.api);this.title=new dyR(this.api);this.H1=new g.Ev({U:"div",B:"ytp-chrome-top-buttons"});this.m$=new o2L(this.api,this.IY.element);this.nE=this.api.O().controlsType==="1"?new tD1(this.api,this,this.fg):null;this.contextMenu=new BoR(this.api,this.Lp);this.o8=new g.H({U:"div",G:{tabindex:"0"}});
this.qh=new g.H({U:"div",G:{tabindex:"0"}});var l=this.api.Yz();const y=this.api.O();var k=this.api.getVideoData();this.x_&&(g.zi(this.api.getRootNode(),"ytp-embed"),g.zi(this.api.getRootNode(),"ytp-embed-playlist"),this.Gd&&(g.zi(this.api.getRootNode(),"ytp-embed-overlays-autohide"),g.zi(this.contextMenu.element,"ytp-embed-overlays-autohide")),this.P_=60,this.aQ=89);this.api.O().N&&g.zi(this.api.getRootNode(),"ytp-embed-pfl");this.api.O().C&&(g.zi(this.api.getRootNode(),"ytp-mobile"),this.api.O().K&&
g.zi(this.api.getRootNode(),"ytp-embed-mobile"));k&&k.videoId&&(this.Eo=k&&k.getEmbeddedPlayerResponse());g.x(this,this.Lp);g.pi(this.api,this.Lp.element,4);g.x(this,this.qB);g.pi(this.api,this.qB.element,4);k=new g.H({U:"div",B:"ytp-gradient-top"});g.x(this,k);g.pi(this.api,k.element,1);this.ip=new g.oT(k,250,!0,100);g.x(this,this.ip);g.x(this,this.IY);g.pi(this.api,this.IY.element,1);this.fM=new g.oT(this.IY,250,!0,100);g.x(this,this.fM);g.x(this,this.tooltip);g.pi(this.api,this.tooltip.element,
4);const z=new dgy(this.api);g.x(this,z);g.pi(this.api,z.element,5);z.subscribe("show",Z=>{this.uP(z,Z)});
this.nh.push(z);this.FZ=new wCp(this.api,z);g.x(this,this.FZ);!this.x_&&(this.Gc&&this.api.X("delhi_modern_web_player")?this.Gc.Sf(this.FZ.element,2):this.FZ.Uj(this.IY.element));g.x(this,this.channelAvatar);this.channelAvatar.Uj(this.IY.element);g.x(this,this.title);this.title.Uj(this.IY.element);this.x_&&(k=new cmx(this.api),g.x(this,k),k.Uj(this.IY.element));g.x(this,this.H1);this.Gc?(this.H1.element.setAttribute("data-overlay-order","2"),this.Gc.Sf(this.H1.element,2)):this.H1.Uj(this.IY.element);
const r=new MRR(this.api,this);g.x(this,r);g.pi(this.api,r.element,5);r.subscribe("show",Z=>{this.uP(r,Z)});
this.nh.push(r);this.searchButton=new aew(this.api);g.x(this,this.searchButton);this.searchButton.Uj(this.H1.element);k=this.api.O().getWebPlayerContextConfig();this.jZ=new hJR(this.api);g.x(this,this.jZ);k?.hideTopWatchNextButton||this.jZ.Uj(this.H1.element);this.shareButton=new Ug2(this.api,this,r);g.x(this,this.shareButton);k?.hideTopShareButton||this.shareButton.Uj(this.H1.element);this.copyLinkButton=new HRo(this.api,this);g.x(this,this.copyLinkButton);this.copyLinkButton.Uj(this.H1.element);
this.x_&&this.FZ.Uj(this.H1.element);g.x(this,this.m$);this.m$.Uj(this.H1.element);y.jD&&(k=new Crx(this.api),g.x(this,k),g.pi(this.api,k.element,4));y.N||(k=new Noe(this.api,this.m$),g.x(this,k),k.Uj(this.H1.element));this.Hw=new tRx(this.api);g.x(this,this.Hw);g.pi(this.api,this.Hw.element,5);this.Hw.subscribe("show",()=>{this.uP(this.Hw,this.Hw.aH())});
this.nh.push(this.Hw);this.overflowButton=new QgR(this.api,this.Hw);g.x(this,this.overflowButton);this.overflowButton.Uj(this.H1.element);this.nE&&g.x(this,this.nE);y.controlsType==="3"&&(k=new G0L(this.api),g.x(this,k),g.pi(this.api,k.element,9));g.x(this,this.contextMenu);this.contextMenu.subscribe("show",this.h5,this);this.o8.listen("focus",this.gO,this);g.x(this,this.o8);this.qh.listen("focus",this.K0,this);g.x(this,this.qh);(this.Qg=y.hk?null:new $ge(this.api,l,this.contextMenu,this.fg,this.Lp,
this.qB,()=>this.u4(),this.nE?.xz()))&&g.x(this,this.Qg);
this.x_||(this.YZ=new DRO(this.api),g.x(this,this.YZ),this.Gc?this.Gc.Sf(this.YZ.element,3):g.pi(this.api,this.YZ.element,4),this.Qh=new XCv(this.api),g.x(this,this.Qh),this.Gc?this.Gc.Sf(this.Qh.element,3):g.pi(this.api,this.Qh.element,4));this.yh=new OKR(this.api);g.x(this,this.yh);this.Gc?this.Gc.Sf(this.yh.element,3):g.pi(this.api,this.yh.element,4);if(this.x_){const Z=new ymR(this.api,this.api.O().u0);g.x(this,Z);g.pi(this.api,Z.element,5);Z.subscribe("show",e=>{this.uP(Z,e)});
l=new k0L(this.api,Z);g.x(this,l);g.pi(this.api,l.element,4)}this.ib.push(this.Lp.element);this.j(this.api,"fullscreentoggled",this.BU);this.j(this.api,"offlineslatestatechange",()=>{this.api.Vk()&&zU(this.fg,128,!1)});
this.j(this.api,"cardstatechange",()=>{this.TN()});
this.j(this.api,"resize",this.Xs);this.j(this.api,"videoplayerreset",this.onReset);this.j(this.api,"showpromotooltip",this.fH);super.init()}As(){return this.tooltip}iU(){return this.nE}uP(l,y){y?this.GK=l:this.GK=null;this.TN()}CU(l,y){if(y)this.qy.push(l);else for(y=this.qy.length;y>=0;y--)if(this.qy[y]===l){this.qy.splice(y,1);break}zU(this.fg,64,this.qy.length>0)}Rn(){this.api.Jb()&&this.api.TB();return!!this.GK||dL5(this)||super.Rn()}TN(){const l=!this.Rn(),y=l&&this.api.Jb()&&!this.api.getPlayerStateObject().Z(2)&&
!this.api.getVideoData().Wn&&!this.api.O().N&&!this.api.isEmbedsShortsMode(),k=this.x_&&g.Pl(this.api)&&this.api.getPlayerStateObject().Z(128);l||k?(this.fM.show(),this.ip.show()):(this.fM.hide(),this.ip.hide(),this.api.WZ(this.IY.element));y?this.m$.Bn():this.m$.Xv();this.nE&&Dn_(this.nE,this.N9||!l);this.api.X("web_player_hide_overflow_button_if_empty_menu")&&sG(this);super.TN()}O_(l,y,k,z,r){l.style.left="";l.style.top="";l.style.bottom="";var Z=g.Zo(l),e=z||this.nE&&g.cf(this.nE.Jv(),y),A=z=null;
k!=null&&e||(z=g.Zo(y),A=g.zn(y,this.api.getRootNode()),k==null&&(k=A.x+z.width/2));k-=Z.width/2;e?(y=this.nE,z=FE(y),A=lE5(y),e=this.api.Yz().getPlayerSize().height,k=g.gf(k,z,z+A-Z.width),Z=e-oQ(y)-Z.height):g.cf(this.IY.element,y)?(y=this.api.Yz().getPlayerSize().width,k=g.gf(k,12,y-Z.width-12),Z=this.qV()?this.aQ:this.P_,this.api.O().playerStyle==="gvn"&&(Z+=20),this.x_&&(Z-=this.qV()?26:18)):(y=this.api.Yz().getPlayerSize(),k=g.gf(k,12,y.width-Z.width-12),Z=A.y>(y.height-z.height)/2?A.y-Z.height-
12:A.y+z.height+12);l.style.top=`${Z+(r||0)}px`;l.style.left=`${k}px`}Ko(l){l&&(this.api.WZ(this.IY.element),this.nE&&this.api.WZ(this.nE.Jv()));this.Gd&&(g.I(this.contextMenu.element,"ytp-autohide",l),g.I(this.contextMenu.element,"ytp-autohide-active",!0));super.Ko(l)}EL(){super.EL();this.Gd&&(g.I(this.contextMenu.element,"ytp-autohide-active",!1),this.Gd&&(this.contextMenu.hide(),this.Hw&&this.Hw.hide()))}rz(l,y){var k=this.api.Yz().getPlayerSize();k=new g.f9(0,0,k.width,k.height);if(l||!k1(this.fg)&&
!this.Rn()){if(this.api.O().Mg||y)l=this.qV()?this.aQ:this.P_,k.top+=l,k.height-=l;this.nE&&(k.height-=oQ(this.nE))}return k}BU(l){const y=this.api.getRootNode();l?y.parentElement?(y.setAttribute("aria-label","Tr\u00ecnh ph\u00e1t video YouTube \u1edf ch\u1ebf \u0111\u1ed9 to\u00e0n m\u00e0n h\u00ecnh"),this.api.O().externalFullscreen||(y.parentElement.insertBefore(this.o8.element,y),y.parentElement.insertBefore(this.qh.element,y.nextSibling))):g.n(Error("Player not in DOM.")):(y.setAttribute("aria-label",
"Tr\u00ecnh ph\u00e1t video YouTube"),this.o8.detach(),this.qh.detach());this.TE();this.YN()}qV(){if(this.api.X("web_player_use_screen_width_for_big_mode"))return this.api.Yz().getPlayerSize().width>=(g.i_(this.api.O().experiments,"web_player_big_mode_screen_width_cutoff")??2E3);const l=this.api.O();return this.api.isFullscreen()&&!l.K||!1}showControls(l){this.mD=!l;this.TN()}TE(){var l=this.qV();this.tooltip.scale=l?1.5:1;this.contextMenu&&g.I(this.contextMenu.element,"ytp-big-mode",l);this.TN();
this.api.X("web_player_hide_overflow_button_if_empty_menu")||sG(this);this.YN();const y=this.api.isEmbedsShortsMode();y&&l?(l=(this.api.Yz().getPlayerSize().width-this.api.getVideoContentRect().width)/2,g.n9(this.IY.element,"padding-left",`${l}px`),g.n9(this.IY.element,"padding-right",`${l}px`)):y&&(g.n9(this.IY.element,"padding-left",""),g.n9(this.IY.element,"padding-right",""));super.TE()}IA(){if(dL5(this)&&!g.Pl(this.api))return!1;var l=this.api.getVideoData();return!g.u9(this.api.O())||this.api.getPresentingPlayerType()===
2||!this.Eo||((l=this.Eo||l.Eo)?(l=l.embedPreview)?(l=l.thumbnailPreviewRenderer,l=l.videoDetails&&g.E(l.videoDetails,hPz)||null):l=null:l=null,l&&l.collapsedRenderer&&l.expandedRenderer)?super.IA():!1}YN(){super.YN();this.api.logVisibility(this.title.element,!!this.MH);this.FZ&&this.FZ.Cl(!!this.MH);this.channelAvatar.Cl(!!this.MH);this.overflowButton&&this.overflowButton.Cl(this.xw()&&!!this.MH);this.shareButton&&this.shareButton.Cl(!this.xw()&&!!this.MH);this.jZ&&this.jZ.Cl(!this.xw()&&!!this.MH);
this.searchButton&&this.searchButton.Cl(!this.xw()&&!!this.MH);this.copyLinkButton&&this.copyLinkButton.Cl(!this.xw()&&!!this.MH);if(!this.MH){this.api.WZ(this.IY.element);for(let l=0;l<this.nh.length;l++){const y=this.nh[l];y.aH()&&y.Xv()}}}e2(l){this.nE&&Dn_(this.nE,this.Rn());this.TN();super.e2(l)}handleGlobalKeyDown(l,y,k,z,r,Z,e,A){return this.Qg?this.Qg.handleGlobalKeyDown(l,y,k,z,r,Z,e,A):!1}handleGlobalKeyUp(l,y,k,z,r,Z,e){return this.Qg?this.Qg.handleGlobalKeyUp(l,y,k,z,r,Z,e):!1}u4(){if(this.contextMenu.VM)return this.contextMenu.Xv(),
!0;if(this.qy.length)return this.qy[this.qy.length-1].Xv(),!0;if(this.GK)return this.GK.Xv(),!0;this.nE&&this.api.WZ(this.nE.Jv());this.H1&&this.api.WZ(this.H1.element);return super.u4()}Nu(l,y){this.o3=y;this.CU(l,y);this.h5()}h5(){const l=this.o3||this.contextMenu.aH();this.Na!==l&&(this.Na=l,g.G3(this.api,"onAutonavPauseRequest",this.Na))}gO(){L7(this,this.api.getRootNode(),!0).focus()}K0(){L7(this,this.api.getRootNode(),!1).focus()}Kf(){return this.nE&&this.nE.N}T6(){this.fg.T6()}NR(){this.Lp.hide()}Ch(l){this.Lp.Ch(!l.isOrWillBePlaying())}YH(l,
y,k,z){this.qB.YH(l,y,k,z)}renderChapterSeekingAnimation(l,y,k){this.qB.y6(l,y,k)}Xs(){hIQ(this,!0)}onReset(){sG(this)}fH(l){hIQ(this,!1,l)}XG(){return this.contextMenu}cL(l,y){this.nE?.g4(l,y)}fd(){const l=this.nE?.xz();l&&l.C?.isEnabled&&l.fd()}Sf(l,y,k){this.Gc?.Sf(l,y,k)}};g.al2=class extends g.f1{constructor(l){super(l);this.chrome=null;this.load()}Xf(){return!1}create(){const l=this.player.O();g.ow(l)&&l.C||l.disableOrganicUi?this.chrome=new g.TF(this.player):this.chrome=new Ge2(this.player);g.x(this,this.chrome);this.chrome.init()}KS(){return this.chrome}};var Bu=[],GNy=!1;var iKf=class extends g.zP{constructor(l){super();this.app=l;this.J=this.V=this.C=this.Z=null;this.N=1;this.events=new g.cI(this);this.events.j(this.app.K_,g.xR("gaplessshortslooprange"),this.A);g.x(this,this.events)}K(){this.Z!=null&&this.app.getVideoData()!==this.Z&&CN(this.Z)&&tl(this.app,this.Z,void 0,void 0,this.N)}S(){if(this.Z!=null&&this.app.getVideoData()!==this.Z&&this.C!=null&&this.V!=null&&this.J!=null&&CN(this.Z)){const l=iJC(this.C,this.V,this.J);l==null?tl(this.app,this.Z,void 0,void 0,
this.N):(this.C.Md("sgap",l),this.C.getVideoData().K&&this.C.GQ(!1),this.app.O().X("html5_remove_loop_range_on_gapless_fallback")&&(Al(this.app,"gaplessshortslooprange"),this.app.setLoopRange(null)))}}A(l){const y=this.app.je();if(y){const k=this.app.getCurrentTime();Math.abs(k-l.end/1E3)>5&&y.Md("glrs",{cmt:k});y.seekTo(0,{seekSource:58});y.Md("glrre",{cmt:k})}}Vj(){this.Z=null;super.Vj()}};var UL4=class{constructor(){this.Z=this.K=this.N=this.C=this.D=this.S=this.C_=this.A=this.J=this.V=!1}};g.lS=class extends cdQ{constructor(l,y,k,z=!1){super();this.mediaElement=l;this.start=y;this.end=k;this.Z=z}isView(){return!0}MW(){const l=this.mediaElement.getCurrentTime();if(l<this.start)try{const y=this.mediaElement.Cy(),k=lt(y,l);return!(this.start<k)}catch(y){}return!1}J(){return rV(this.mediaElement.J(),this.start,this.end)}Cy(){return rV(this.mediaElement.Cy(),this.start,this.end)}A(){return rV(this.mediaElement.A(),this.start,this.end)}getCurrentTime(){return this.mediaElement.getCurrentTime()-
this.start}setCurrentTime(l){this.mediaElement.setCurrentTime(l+this.start)}getDuration(){return isFinite(this.end)&&!this.Z?this.end-this.start:this.mediaElement.getDuration()-this.start}play(){if(this.MW()){this.mediaElement.getCurrentTime();try{this.mediaElement.setCurrentTime(this.start)}catch(l){}}return this.mediaElement.play()}Dp(){const l=super.Dp();l.view=`${this.start}-${this.end}`;return l}addEventListener(l,y){this.mediaElement.addEventListener(l,y)}removeEventListener(l,y){this.mediaElement.removeEventListener(l,
y)}RR(){return this.mediaElement.RR()}activate(l){this.mediaElement.activate(l)}bX(){return this.mediaElement.bX()}playVideo(){return this.mediaElement.playVideo()}kz(){this.mediaElement.kz()}Oj(){this.mediaElement.Oj()}S(){return this.mediaElement.S()}Jv(){return this.mediaElement.Jv()}VR(){return this.mediaElement.VR()}gb(l){this.mediaElement.gb(l)}mK(){this.mediaElement.mK()}getPlaybackRate(){return this.mediaElement.getPlaybackRate()}setPlaybackRate(l){return this.mediaElement.setPlaybackRate(l)}Ti(){return this.mediaElement.Ti()}setLoop(l){this.mediaElement.setLoop(l)}canPlayType(l,
y){return this.mediaElement.canPlayType(l,y)}isPaused(){return this.mediaElement.isPaused()}isSeeking(){return this.mediaElement.isSeeking()}isEnded(){return this.mediaElement.isEnded()}u0(){return this.mediaElement.u0()}D(l){this.mediaElement.D(l)}rb(){return this.mediaElement.rb()}load(){this.mediaElement.load()}pause(){this.mediaElement.pause()}N(){return this.mediaElement.N()}PG(){return this.mediaElement.PG()}eV(){return this.mediaElement.eV()}hC(){return this.mediaElement.hC()}getVideoPlaybackQuality(){return this.mediaElement.getVideoPlaybackQuality()}Jk(){return this.mediaElement.Jk()}gw(){return this.mediaElement.gw()}togglePictureInPicture(){this.mediaElement.togglePictureInPicture()}Kx(){return this.mediaElement.Kx()}getSize(){return this.mediaElement.getSize()}setSize(l){this.mediaElement.setSize(l)}getVolume(){return this.mediaElement.getVolume()}setVolume(l){this.mediaElement.setVolume(l)}setAttribute(l,
y){this.mediaElement.setAttribute(l,y)}removeAttribute(l){this.mediaElement.removeAttribute(l)}hasAttribute(l){return this.mediaElement.hasAttribute(l)}Y(){return this.mediaElement.Y()}YC(l){this.mediaElement.YC(l)}b0(l){return this.mediaElement.b0(l)}T7(){return this.mediaElement.T7()}stopVideo(){this.mediaElement.stopVideo()}WG(l){this.mediaElement.WG(l)}audioTracks(){return this.mediaElement.audioTracks()}g4(l){this.mediaElement.g4(l)}};g.lS.prototype.K=yz(58);g.lS.prototype.Ja=yz(56);
g.lS.prototype.sj=yz(54);g.lS.prototype.C_=yz(52);var qZC=class extends g.zP{constructor(l,y,k,z,r,Z=0){super();this.policy=l;this.Z=y;this.C=k;this.E1=r;this.S=Z;this.J=this.V=null;this.currentVideoDuration=this.D=-1;this.b0=!1;this.kN=new fA;this.S8=z-y.w4()*1E3;this.kN.then(void 0,()=>{});
this.timeout=new g.B_(()=>{this.FS("timeout")},1E4);
g.x(this,this.timeout);this.Ja=isFinite(z)||this.E1.O().experiments.z7("html5_pseudogapless_shorts")&&jn(y.getVideoData());this.status={status:0,error:null}}wP(){return this.status.status===5}getStatus(){return this.status}N(){var l=this.Z.getVideoData(),y=this.C.getVideoData(),k;if((k=l.N)&&!(k=!l.Z)){k=l.Z;var z=!1;let t=!1;for(var r of Object.values(k.Z))r.info.audio&&r.index.isLoaded()&&(z=!0),r.info.video&&r.index.isLoaded()&&(t=!0);k.Z["0"]&&(t=!0);k=z&&t}if(k)if(this.Z.fl()){r=RQ(this.policy,
this.Z,this.C,this.S8);var {Gt:Z,mM:e,Op:A,gR:Q}=this.A();this.b0||(k=this.C.YK()*1E3,z=this.Z.YK(),z=(A-Z-z)*1E3,r&&r.msg==="in-the-past"&&(z=0),l=l.isAd(),this.C.S0(k,z,l),this.b0=!0);r?(y=`cannot_apply${r.msg}`,delete r.msg,this.FS(y,r)):this.status.status===2?bJz(this):(l=this.Z.bX())&&l.S()&&(!$X(l)&&g.is()?this.FS("mse_closed"):y.Z&&y.Z.J()&&l.C&&!l.C.oJ()?this.FS("encr_upgrade"):(y=this.Z.fl(),y.isEnded()?this.FS("elem_ended"):e<0?this.FS("next_player_future"):(this.D=A,this.currentVideoDuration=
A-Z,this.V=MWT(l,Z,A,!0),this.J=MWT(l,e,Q,!1),l=this.C.getVideoData().clientPlaybackNonce,this.Z.Md("gaplessPrep",{cpn:l}),this.Z.V_(this.V,!1,this.S===1&&Kc(this.Z.getVideoData()),this.E1.O().X("html5_shorts_gapless_keep_pending_requests")&&jn(this.Z.getVideoData())),this.Z.setMediaElement(XBT(y,Z,A,!this.Z.getVideoData().isAd())),Dn(this,2),bJz(this))))}else this.FS("no-elem")}K(l){var {o$:y}=y9(this),k=l===y;y=k?this.V.Z:this.V.C;k=k?this.J.Z:this.J.C;if(y.isActive&&!k.isActive){var z=this.D,r=
this.E1.O().X("html5_gapless_disable_on_discontinuous_buffer")&&this.S!==0&&y.Za().length>1;D4(l.Za(),z-.01)&&!r&&(Dn(this,4),y.isActive=!1,y.kY=y.kY||y.isActive,(this.S===1?this.Z:this.C).Md("sbh",{}),k.isActive=!0,k.kY=k.kY||k.isActive,this.S!==0&&(this.Z.getVideoData().pj=!0));l=this.J.C;this.J.Z.isActive&&l.isActive&&(Dn(this,5),this.S!==0&&(l=this.C.Jr(),y=this.Z.Jr(),this.Z.Md("sbs",{citag:y?.itag,nitag:l?.itag}),this.C.Md("gitags",{pitag:y?.itag,citag:l?.itag}),this.C?.A3()))}}sj(){this.l4()&&
this.FS("player-reload-after-handoff")}FS(l,y={}){if(!this.IR()&&this.status.status!==6){var k=this.status.status>=4&&l!=="player-reload-after-handoff";this.status={status:Infinity,error:l};if(this.Z&&this.C){const z=this.C.getVideoData().clientPlaybackNonce;this.Z.ZQ(new g.Gr("dai.transitionfailure",Object.assign(y,{cpn:z,transitionTimeMs:this.S8,msg:l})));this.Z.GQ(k)}this.kN.reject(l);this.dispose()}}HG(){if(this.getStatus().status!==5)return"niss";if(RQ(this.policy,this.Z,this.C,this.S8)!=null)return"pge";
const {o$:l,Ty:y}=y9(this),k=g.i_(this.E1.O().experiments,"html5_shorts_gapless_next_buffer_in_seconds");var z=this.D+k;this.E1.O().experiments.z7("html5_pseudogapless_shorts")&&(z=this.A().mM+k);const r=D4(y.Za(),z);z=D4(l.Za(),z);return!(k>0)||r&&z?null:"neb"}C_(){return this.currentVideoDuration}l4(){return this.status.status>=4&&this.status.status<6}Vj(){Ccy(this);this.Z.unsubscribe("newelementrequired",this.sj,this);if(this.V){const l=this.V.C;this.V.Z.Y3.unsubscribe("updateend",this.K,this);
l.Y3.unsubscribe("updateend",this.K,this)}super.Vj()}A(){var l=this.Z.fl();l=l.isView()?l.start:0;var y=this.Z.getVideoData().isLivePlayback?Infinity:this.Z.L2(!0);y=Math.min(this.S8/1E3,y)+l;var k=this.Ja?100:0;k=y-this.C.YK()+k;return{Gt:l,mM:k,Op:y,gR:Infinity}}Y(l){l.tj(128)&&this.FS("player-error-event")}};var Uyx=class extends g.zP{constructor(l){super();this.app=l;this.K=this.C=this.Z=null;this.C_=!1;this.D=this.S=this.N=this.V=null;this.J=MXP(this.app.O());this.A=()=>{g.o4(()=>{xLC(this)})}}clearQueue(l=!1,y=!1){zG(this);
this.V&&this.V.reject("Queue cleared");this.app.O().X("html5_gapless_fallback_on_qoe_restart_v2")||y&&this.C&&this.C.GQ(!1);kP(this,l)}Bh(){return!this.Z}l4(){return this.N?.l4()||!1}wP(){return this.N?.wP()||!1}Vj(){zG(this);kP(this);super.Vj()}};var MDL=class extends g.z1{constructor(){super();this.fullscreen=0;this.V=this.N=this.pictureInPicture=this.Z=this.C=this.inline=!1;this.J=()=>{this.Ul()};
yIq(this.J);this.S=this.getVisibilityState(this.Jk(),this.isFullscreen(),this.isMinimized(),this.isInline(),this.Bw(),this.Co(),this.J8(),this.yR())}getVisibilityState(l,y,k,z,r,Z,e,A){return l?4:r&&cr?7:zuQ&&!(Mn()||document.hasFocus&&document.hasFocus())||Mn()?3:y?2:k?1:z?5:r&&!cr?7:Z?8:e?9:A?10:0}yG(l){this.fullscreen!==l&&(this.fullscreen=l,this.Ul())}setMinimized(l){this.C!==l&&(this.C=l,this.Ul())}setInline(l){this.inline!==l&&(this.inline=l,this.Ul())}Bd(l){this.pictureInPicture!==l&&(this.pictureInPicture=
l,this.Ul())}setSqueezeback(l){this.N!==l&&(this.N=l,this.Ul())}HT(l){this.V!==l&&(this.V=l,this.Ul())}Jk(){return this.Z}vj(){return this.fullscreen!==0}isFullscreen(){return this.fullscreen!==0&&this.fullscreen!==4}ut(){return this.fullscreen}isMinimized(){return this.C}isInline(){return this.inline}isBackground(){return Mn()}Bw(){return this.pictureInPicture}Co(){return!1}J8(){return this.N}yR(){return this.V}Ul(){this.publish("visibilitychange");const l=this.getVisibilityState(this.Jk(),this.isFullscreen(),
this.isMinimized(),this.isInline(),this.Bw(),this.Co(),this.J8(),this.yR());l!==this.S&&this.publish("visibilitystatechange");this.S=l}Vj(){k3q(this.J);super.Vj()}};g.BE=class extends g.zP{constructor(l){super();this.cG=l;this.videoData=this.playerState=null}Vj(){this.videoData=this.playerState=null;super.Vj()}addCueRange(){}hp(){}mG(){}PO(){return!1}fC(){return!1}Kd(){}mX(){}sb(){return[]}Zl(){}SX(){}O2(){return 1}getAudioTrack(){return this.getVideoData().Ak}nY(){return null}getAvailableAudioTracks(){return[]}Gi(){return[]}Id(){return[]}dZ(){return this.cG.X("web_player_misc_bugfix_b")?this.getVideoData().clientPlaybackNonce:""}XJ(){return[]}gj(){}YK(){return 0}getCurrentTime(){return 0}KY(){}Jr(){}Dp(){return{}}getDuration(){return 0}mf(){return 0}QK(){return 0}q8(){return!1}ot(){return 0}qS(){return 0}OS(){return null}o2(){return 0}Ti(){return!1}L2(){return 0}fl(){return null}bX(){return null}dY(){return 0}ET(){return 0}async Ed(){}getPlaybackQuality(){return"auto"}getPlaybackRate(){return 1}getPlayerState(){this.playerState||
(this.playerState=new g.U5);return this.playerState}getPlayerType(){return 0}getPlaylistSequenceForTime(){return null}bH(){return()=>{}}De(){return""}getPreferredQuality(){return"unknown"}Bo(){}getProximaLatencyPreference(){return 0}L5(){return Tj}getStartTime(){return NaN}mS(){return null}getStoryboardFormat(){return null}getStreamTimeOffset(){return 0}rD(){return 0}w4(){return 0}lP(){return{vH:[],
sx:[],currentTime:0,YJ:"",droppedVideoFrames:0,isGapless:!1,wP:!1,Bh:!0,q$:0,iy:0,ly:0,Fx:0,OP:0,zR:[],Ew:[],DT:null,N0:"0",J0:null,Xq:"",totalVideoFrames:0}}getUserAudio51Preference(){return 0}getUserPlaybackQualityPreference(){return""}getVideoData(){this.videoData||(this.videoData=new g.YK(this.cG),g.x(this,this.videoData));return this.videoData}FU(){return null}Ap(){return null}Qi(){}getVideoLoadedFraction(){return 0}wQ(){}handleError(){}GQ(){}Xl(){}pJ(){return!1}hasSupportedAudio51Tracks(){return!1}isAd(){return!1}sG(){return!1}Jk(){return!1}isAtLiveHead(){return!1}Zy(){return!0}isGapless(){return!1}wP(){return!1}isHdr(){return!1}zX(){return!1}M$(){return!1}s3(){return!1}isProximaLatencyEligible(){return!1}Bh(){return!0}VB(){return!1}JN(){return!1}Q1(){}U_(){}A3(){}oD(){}jS(){}OH(){}jd(){}Zn(){}pauseVideo(){}prefetchKeyPlay(){}async playVideo(){}pD(){}SK(){}Md(){}zc(){}ID(){}S0(){}ZQ(){}Fn(){}OX(){}g5(){}L7(){}G8(){}lI(){}removeCueRange(){}ZI(){}Ur(){return[]}yb(){}Uo(){}Du(){}ED(){}gG(){}ZO(){}RV(){}seekTo(){}sendAbandonmentPing(){}sendVideoStatsEngageEvent(){}m4(){}setLoop(){}pM(){}setMediaElement(){}V_(){}setPlaybackRate(){}jI(){}yr(){}ud(){}setProximaLatencyPreference(){}Q_(){}rH(){}FP(){}pn(){}UK(){}setUserAudio51Preference(){}DR(){}Ly(){return!1}gw(){}Pz(){return!1}KD(){}PT(){}In(){}stopVideo(){}subscribe(){return NaN}IZ(){}togglePictureInPicture(){}OD(){return 0}Be(){}unsubscribe(){return!1}zN(){}LR(){return!1}D0(){}tQ(){}x8(){}};
g.b=g.BE.prototype;g.b.nJ=yz(47);g.b.pB=yz(37);g.b.dT=yz(30);g.b.Rp=yz(24);g.b.Zh=yz(18);g.b.Qb=yz(12);var HE=class extends g.zP{constructor(l,y){super();this.data=[];this.N=l||NaN;this.C=y||null;this.Z=new g.B_(()=>{Z7(this);ex(this)});
g.x(this,this.Z)}get(l){Z7(this);const y=this.data.find(k=>k.key===l);
return y?y.value:null}set(l,y,k){this.remove(l,!0);Z7(this);l={key:l,value:y,expire:Infinity};k&&isFinite(k)&&(k*=1E3,l.expire=(0,g.f)()+k);for(this.data.push(l);this.data.length>this.N;)(k=this.data.shift())&&rN(this,k,!0);ex(this)}remove(l,y=!1){const k=this.data.find(z=>z.key===l);
k&&(rN(this,k,y),g.$2(this.data,z=>z.key===l),ex(this))}removeAll(l=!1){if(l)for(const y of this.data)rN(this,y,l);
this.data=[];ex(this)}Vj(){super.Vj();this.data.forEach(l=>{rN(this,l,!0)});
this.data=[]}};g.Rz=class extends g.zP{constructor(l,y){super();this.api=l;this.N={};this.J={};this.xe=null;this.V={};this.Z=null;this.A=new Map;this.K=null;y=new HE(y,k=>{k!==this.u5({playerType:k.getPlayerType()})&&k.dispose()});
g.x(this,y);this.C=this.C_=this.D=new g.BE(l.O());this.S=y}Vj(){for(const l of Object.values(this.N))l.dispose();Ja5(this);this.D.dispose();super.Vj()}u5(l){var y=l.cpn;const k=l.rL;l=l.playerType;if(y)a:if(W_(this.api.O().sA()))y=this.J[y]||null;else{for(const z of Object.values(this.N))if(z.dZ()===y){y=z;break a}y=this.V[y]||null}else y=k&&this.xe?this.xe:l?l?l===1?this.C_:this.C.getVideoData().enableServerStitchedDai&&l===2?this.C.getVideoData().wu?this.N[2]||this.C:this.C:this.N[l]||null:this.C:
this.C;return y}b5(){return this.C_}QW(l){this.C_=l}je(){return this.C}Sw(l){const y=[l],k=[this.C];this.C=l;AH(this,y,k)}};g.Rz.prototype.mC=yz(45);g.Rz.prototype.tO=yz(43);var XZ2=class{constructor(){this.values=new Float64Array(176);this.Z=new Float64Array(11);this.C=new Float64Array(16)}Tk(l,y){for(var k=0;k<10;k++){var z=this.Z[k],r=z+(k===0?l:0),Z=1*Math.pow(2,k);if(r<=Z)break;z=Math.min(1,(r-Z*.5)/z);for(r=0;r<16;r++)Z=this.values[k*16+r]*z,this.values[(k+1)*16+r]+=Z,this.Z[k+1]+=Z,this.values[k*16+r]-=Z,this.Z[k]-=Z}z=k=0;r=8192;y>8192&&(k=Math.ceil(Math.log(y/8192)/Math.log(2)),z=8192*Math.pow(2,k-1),r=z*2);k+2>16?this.values[15]+=l:(y=(y-z)/(r-z),this.values[k]+=
l*(1-y),this.values[k+1]+=l*y);this.Z[0]+=l}B1(){const l=this.C;for(var y=0;y<16;y++)l[y]=this.values[y];y=this.Z[0];for(var k=1;k<11;k++){var z=this.Z[k];if(z===0)break;var r=Math.min(1,(17-y)/z);for(var Z=0;Z<16;Z++)l[Z]+=this.values[k*16+Z]*r;y+=z*r;if(r<1)break}k=r=0;for(z=0;z<16;z++){Z=r+l[z]/y;k+=Math.max(0,Math.min(Z,.98)-Math.max(r,.02))*(z>0?8192*Math.pow(2,z-1):0);if(Z>.98)break;r=Z}return k/.96}};var Db=class{constructor(l,y,k=.5,z=0){this.resolution=y;this.C=0;this.J=!1;this.LY=!0;this.Z=Math.round(l*this.resolution);this.values=Array(this.Z);for(l=0;l<this.Z;l++)this.values[l]=Infinity;l=Array(this.Z);for(y=0;y<this.Z;y++)l[y]=y;this.S=l;this.N=k;this.V=z}Tk(l,y){l=Math.min(this.Z,Math.max(1,Math.round(l*this.resolution)));l+this.C>=this.Z&&(this.J=!0);for(;l--;)this.values[this.C]=y,this.C=(this.C+1)%this.Z;this.LY=!0}percentile(l){if(!this.J&&this.C===0)return 0;this.LY&&(g.b2(this.S,
(y,k)=>this.values[y]-this.values[k]),this.LY=!1);
return this.values[this.S[Math.round(l*((this.J?this.Z:this.C)-1))]]||0}B1(){return this.V?(this.percentile(this.N-this.V)+this.percentile(this.N)+this.percentile(this.N+this.V))/3:this.percentile(this.N)}};var cYR=class extends g.zP{constructor(l,y,k){super();this.policy=l;this.C=y;this.mK=k;this.b0=this.PG=0;this.Y=-1;this.sj=this.J=0;this.C_=!1;this.interruptions=[];this.N=[{stamp:0,net:0,max:0}];this.rb=0;this.RR=this.S=(0,g.f)();this.A=new Db(4,1,.6,.4);this.Ja=new Db(4,1,.6,.4);this.K=new Db(20,1,.5,.4);l.C_?this.V=new XZ2:l.N?this.V=new uz(17):this.V=new Db(17,20,.5,.4);this.HG=new Db(5,1,.25);this.D=new Db(30,1,.5);l=g.Ay("yt-player-bandwidth")||{};y=this.policy.Z;l.byterate>0?(y=l.byterate,
this.C_=!0):(k=(navigator.connection?.downlink||0)*64*1024,k>0&&(y=k,this.C_=!0));this.V.Tk(this.policy.J,y);l.delay>0&&this.A.Tk(1,Math.min(l.delay,2));l.stall>0&&this.K.Tk(1,l.stall);l.init>0&&(this.RR=Math.min(l.init,this.RR));l.interruptions&&(this.N=this.N.concat(l.interruptions),this.N.length>16&&this.N.pop());this.Y=(0,g.f)();this.policy.S>0&&(this.u0=new g.B_(this.Xr,this.policy.S,this),g.x(this,this.u0),this.u0.start())}Xr(){this.u0?.start();ob(this)&&this.policy.K&&this.mK()}};var kU5=class{constructor(l){this.experiments=l;this.Z=13E4;this.J=.5;this.C=this.N=!1;this.C_=this.X("html5_use_histogram_for_bandwidth");this.V=g.i_(this.experiments,"html5_auxiliary_estimate_weight");this.D=g.i_(this.experiments,"html5_stall_factor")||1;this.S=g.i_(this.experiments,"html5_check_for_idle_network_interval_ms");this.K=this.experiments.z7("html5_trigger_loader_when_idle_network");this.A=this.experiments.z7("html5_sabr_fetch_on_idle_network_preloaded_players")}X(l){return this.experiments.z7(l)}};var iPP=class extends g.U6{constructor(l,y,k=0){super(y.FU());this.videoData=l;this.duration=k;this.Z=this.startTimeSecs=0;this.C=this.N=!0}V(){}dZ(){return this.videoData.clientPlaybackNonce}getVideoData(){return this.videoData}getCurrentTime(l){let y=super.getCurrentTime();this.Z===0?l||(y-=this.startTimeSecs,super.getVideoData().X("html5_ssdai_log_missed_ad_impressions")&&this.C&&this.N&&y>1&&this.Md("sdai-admiss",{cpn:this.dZ(),ct:y.toFixed(3),pfs:this.N}),this.C=!1):l&&(y=this.Z);return y}getDuration(){return this.duration}getPlayerType(){return 2}getStartTime(){return this.startTimeSecs}BZ(l){this.duration=
l}};var qDP,Cix;qDP=class{constructor(l){this.end=this.start=l}};g.lE=class{constructor(){this.Z=new Map;this.N=new Map;this.C=new Map}iP(l,y){if(y===1)return this.Z.get(l);if(y===2)return this.N.get(l);if(y===3)return this.C.get(l)}Z6(l,y,k,z){k={m5:z,vu:k};y?this.N.set(l,k):this.Z.set(l,k)}clearAll(){this.Z.clear();this.N.clear();this.C.clear()}};g.lE.prototype.gX=yz(65);Cix=class{constructor(l){this.cG=l;this.C=[];this.N=new Map;this.V=new Map;this.Z=new Map;this.d4={nW:()=>this.N,
xxj:()=>this.V,
Sm:()=>this.C}}clear(){this.C=[];
this.N.clear();this.V.clear();this.Z.clear()}u5(l){return this.N.get(l)}};g.y$=class extends g.zP{constructor(l,y,k,z){super();this.api=l;this.cG=y;this.playback=k;this.app=z;this.C_=new g.lE;this.C=new Map;this.R7=new Map;this.b0=new Map;this.HG=null;this.MW=NaN;this.kz=this.hv=null;this.WG=new g.B_(()=>{wAt(this,this.MW,this.hv||void 0)});
this.events=new g.cI(this);this.gb=15E3;this.S=new g.B_(()=>{this.K=!0;this.playback.Fn(this.gb);xP(this);this.playback.getVideoData().j2()&&this.vF({togab:this.J?.identifier});this.wQ(!1)},this.gb);
this.K=!1;this.fA=new Map;this.Xr=[];this.J=null;this.S2=new Set;this.A=[];this.rb=[];this.hj=[];this.BF=[];this.u0=new Set;this.sj=0;this.D=!1;this.jN=new Set;this.vn=new Set;this.q_=new Set;this.Oj=new Set;this.OA=this.ES=0;this.lX=this.SN=!1;this.ML=this.N="";this.Y=null;this.logger=new g.R9("dai");this.Cp="";this.PG=!0;this.RR=new Map;this.g4=new Map;this.d4={BZr:()=>this.C,
nW:()=>this.Z.d4.nW(),
dK7:()=>this.N,
Lm$:r=>{this.onCueRangeEnter(this.C.get(r))},
nd$:r=>{this.onCueRangeExit(this.C.get(r))},
NT_:(r,Z)=>{this.C.set(r,Z)},
JkR:r=>{this.ML=r},
dM:()=>this.dM(),
waK:r=>this.Z.Z.get(r),
Gve:()=>this.Y,
Sm:()=>this.Z.d4.Sm(),
Eb:(r,Z)=>{this.Eb(r,Z)},
DxK:()=>this.R7,
zU:r=>{this.zU(r)}};
this.playback.getPlayerType();this.Z=new Cix(this.cG);this.playback.UK(this);this.mK=this.cG.yM();g.x(this,this.WG);g.x(this,this.events);g.x(this,this.S);this.va=this.cG.X("html5_use_new_ssdai_transition_detector");this.xz=this.cG.sA().Z.G7(Phz);l=this.playback.getVideoData();l.j2()&&l.latencyClass==="NORMAL"&&(this.xz=this.cG.sA().Z.G7(abP));this.PF=this.cG.sA().Z.G7(GlC);this.O1=this.playback.getVideoData().uY;this.va?this.playback.subscribe("playbackstarted",this.Eb,this):(this.events.j(this.api,
g.uR("serverstitchedcuerange"),this.onCueRangeEnter),this.events.j(this.api,g.xR("serverstitchedcuerange"),this.onCueRangeExit));this.Xz=this.cG.X("html5_ssdai_report_stitch_error_after_skip_ad");$P(this.app.yu(),this.playback,!1)}wY(l,y,k,z,r,Z,e,A){var Q=hbz(this,r,r+z);this.K&&this.vF({adaftto:1});y||this.vF({missadcon:1,enter:r,len:z,aid:e});this.V&&!this.V.fQ&&(this.V.fQ=e);this.lX&&this.vF({adfbk:1,enter:r,len:z,aid:e});var t=this.playback;r>Z&&mU(this,{reason:"enterTime_greater_than_return",
Jj:r,Ha:Z});var O=t.dY()*1E3;r<O&&mU(this,{reason:"enterTime_less_than_minSeekableTime",enterMs:r,minSkMs:O},!1);t=t.getDuration()*1E3;Z>t&&mU(this,{reason:"parent_return_greater_than_content_duration",Ha:Z,x4j:t});(t=QXP(this.Z,r))&&t.Ha>r&&mU(this,{reason:"overlapping_playbacks",Ew7:l.video_id||"",Jj:r,Ha:Z,ug$:t.cpn,SrK:t.videoData?.videoId||"",P$R:t.durationMs,aQK:t.Jj,IQr:t.Ha});if(Q&&t)for(O=0;O<this.A.length;O++){if(this.A[O].identifier===Q.identifier){this.A.splice(O,1);break}}else if(Q){this.vF({rejectAttl:1});
e&&!Be(this.BF,d=>d===e)&&(this.vF({rejectAdBreakAttl:e},!0),this.BF.push(e));
M_(this);return}l.cpn||(l.cpn=g.tW(16));Q=l.cpn;l=new g.YK(this.cG,l);l.j3=!0;l.Rj=l.clientPlaybackNonce;t=e?e:t?t.MJ:Q;y={playerType:k,durationMs:z,Jj:r,Ha:Z,cpn:Q,videoData:l,errorCount:0,ssdaiAdsConfig:y,MJ:t};k=l.getPlayerResponse()?.playbackTracking;this.PF&&(y.serializedQoeContextData=k?.serializedQoeContextData);this.xz&&(k=GC(k?.serializedPlaybackPingContextData??"")??void 0,y.J6=g.nG({clientPlaybackNonce:Q,serializedPlaybackPingContextData:k},$pQ));A8s(this.Z,y);(A=a0T(this,A))&&this.O1&&
this.R7.set(t,A);U7P(this,l,z);this.vF({attlDone:Z-r,acpn:Q,et:r,prt:Z});this.S.isActive()&&(this.K=!1,this.S.stop(),xP(this),this.wQ(!0));e&&this.va&&(this.RR.has(e)?this.RR.get(e).add(Q):this.RR.set(e,new Set([Q])),this.g4.set(Q,e));return l}sb(){const l=this.playback.sb("serverstitchedcuerange",36E5);for(const y of l)this.C.delete(y.getId())}onCueRangeEnter(l){const y=l.getId();this.vF({oncueEnter:1,cpn:y,start:l.start,end:l.end,ct:(this.playback.getCurrentTime()||0).toFixed(3),cmt:(this.playback.YK()||
0).toFixed(3)});var k=this.Z.u5(y);this.vF({enterAdCueRange:1});var z=this.ML||this.dM().cpn;const r=this.Z.u5(z)??this.dM();k&&(z=this.playback.getCurrentTime(),k.startTimeSecs=l.start/1E3,k={td:r,Ga:k,du:z},WM(this,y,l.start/1E3,z),TG(this,k));this.PG=!1}Eb(l,y,k){if(l&&y&&l!==this.app.yu().Z?.dZ())if((this.app.yu().V[l]||null)===null)this.vF({nocpn:l,active:this.app.yu().Z?.dZ()});else{this.PG=k??!1;k=this.app.yu().Z?.dZ()||this.playback.dZ();var z=this.Z.u5(k)??this.dM(),r=this.Z.u5(l)??this.dM();
r.startTimeSecs=y;r.playerType===2&&(r.z$=r.z$!=null?Math.min(r.z$,y):y);var Z=this.playback.getCurrentTime();WM(this,k,y,Z);TG(this,{td:z,Ga:r,du:Z});if(this.playback.getVideoData().j2()&&l===this.playback.dZ())if(y=this.g4.get(k)){for(const e of this.RR.get(y)??[]){l=this.app.yu();if(k=l.V[e])l.Z===k&&(l.Z=null),l.K===k&&(l.K=null),e===l.A.get("")?.dZ()&&l.A.delete(""),delete l.V[e],delete l.J[e];this.b0.delete(e);this.g4.delete(e)}this.RR.delete(y)}else this.vF({no_abid:l})}}iQ(l,y){if(l===this.playback.dZ())$P(this.app.yu(),
this.playback,!1);else{const k=this.b0.get(l);k?(r8C(k,y,!this.PG),$P(this.app.yu(),k,!0)):this.vF({nop_s:l})}}onCueRangeExit(l){var y=this.playback.getCurrentTime()*1E3,k=l.getId();this.vF({oncueExit:1,cpn:k,start:l.start,end:l.end,ct:(this.playback.getCurrentTime()||0).toFixed(3),cmt:(this.playback.YK()||0).toFixed(3)});for(var z of this.C.values())if(z.getId()!==k&&y>=z.start&&y<=z.end)return;if(y=this.Z.u5(k))k=this.playback.getPlayerState(),this.playback.getVideoData().j2()&&k.Z(2)||(k=this.playback.getCurrentTime(),
z=this.dM(),z.startTimeSecs=l.end/1E3,y={td:y,Ga:z,du:k},WM(this,this.playback.dZ(),l.end/1E3,k),TG(this,y))}dM(){return{cpn:this.playback.dZ(),durationMs:0,Jj:0,playerType:1,Ha:0,videoData:this.playback.getVideoData(),errorCount:0,MJ:""}}T7(){if(this.lX)return!1;let l=void 0;this.ML&&(l=this.Z.u5(this.ML));return this.playback.getVideoData().j2()?!!l&&!l.EP:!!l}seekTo(l=0,y={},k=!1,z=null){I$(this,this.ML);if(this.playback.getVideoData().j2()&&l<=this.sj)this.playback.pauseVideo(),this.sj=0,uG5(this,
l);else if(this.PG=this.D=!0,k)wAt(this,l,y);else{k=this.app.je();const r=k===this.HG?this.kz:null;uS(this,!1);this.MW=l;this.hv=y;z!=null&&this.WG.start(z);k&&(this.kz=r||k.getPlayerState(),k.In(y),this.HG=k)}}Vj(){uS(this,!1);JH(this);m7C(this);super.Vj()}Vs(l,y,k){if(k&&y){var z=this.fA.get(l);if(z){z.locations||(z.locations=new Map);var r=Number(y.split(";")[0]);k=new g.zq(k);this.vF({hdlredir:1,itag:y,seg:l,hostport:wQ(32,4099,k)});z.locations.set(r,k)}}}Fw(l){a:{if(!this.lX){var y=YP(this,l);
if(!this.playback.getVideoData().j2()||!y?.EP)break a}y=void 0}var k=y;if(!k)return this.vF({gvprp:"ncp",mt:l}),null;y=k.MJ;var z=d7Q(this,k.ssdaiAdsConfig);k=k.KK&&k.a$&&l>=k.a$?k.KK:void 0;z={GB:y?C_(this,y):[],adsConfig:z,Ln:k};this.vF({gvprpro:"v",mt:l.toFixed(3),acpns:z.GB?.join("_")||"none",abid:y});return z}N8(l,y,k,z,r,Z){const e=Number(k.split(";")[0]);var A=z===3;l=OP4(this,l,y,z,k,Z);this.vF({gdu:1,seg:y,itag:e,pb:`${!!l}`});if(!l)return Xx(this,y,A),null;l.locations||(l.locations=new Map);
if(!l.locations.has(e)){Z=l.videoData.getPlayerResponse()?.streamingData?.adaptiveFormats;if(!Z)return this.vF({gdu:"noadpfmts",seg:y,itag:e}),Xx(this,y,A),null;var Q=Z.find(O=>O.itag===e);
if(!Q||!Q.url){l=l.videoData.videoId;z=[];for(var t of Z)z.push(t.itag);this.vF({gdu:"nofmt",seg:y,vid:l,itag:e,fullitag:k,itags:z.join(",")});Xx(this,y,A);return null}l.locations.set(e,new g.zq(Q.url,!0))}t=l.locations.get(e);if(!t)return this.vF({gdu:"nourl",seg:y,itag:e}),Xx(this,y,A),null;t=new ma(t);this.SN&&(t.get("dvc")?this.vF({dvc:t.get("dvc")||""}):t.set("dvc","webm"));(z=this.iP(y-1,z,r)?.m5)&&t.set("daistate",z);l.KK&&y>=l.KK&&t.set("skipsq",`${l.KK}`);(z=this.playback.getVideoData().clientPlaybackNonce)&&
t.set("cpn",z);z=[];l.MJ&&(z=C_(this,l.MJ),z.length>0&&t.set("acpns",z.join(",")));A||this.fA.set(y,l);A=null;A=t.get("aids");r=t.wZ();r?.length>2048&&this.vF({urltoolong:1,sq:y,itag:e,len:r.length});this.mK&&(r&&(Z=l.cpn,t=l.MJ,WG5(this,Z,t),t&&!this.q_.has(t)&&(Z=I0s(this,Z,t),Q=T6g(this,t),this.vF({iofa:Z}),this.vF({noawnzd:Q-Z}),this.vF({acpns:z.join("."),aids:A?.replace(/,/g,".")}),this.q_.add(t))),this.vF({gdu:"v",seg:y,itag:k,ast:l.Jj.toFixed(3),alen:l.durationMs.toFixed(3),acpn:l.cpn,avid:l.videoData.videoId}));
return r}A$(l,y,k=!1){const z=bS(this,l,y);if(z){this.Xz&&(this.Ja=z);var r=void 0,Z=z.MJ;if(Z){this.vF({skipadonsq:y,sts:k,abid:Z,acpn:z.cpn,avid:z.videoData.videoId});k=this.Z.Z.get(Z);if(!k)return;for(const e of k)e.KK=y,e.a$=l,e.Jj>z.Jj&&(r=e)}I$(this,this.ML);this.N=z.cpn;VpC(this);this.api.X("html5_ssdai_enable_media_end_cue_range")&&this.playback.Be(this.N);l=this.playback.getCurrentTime();XA_(this,z,r,l,l,!1,!0);bPP(this)}}OF(){var l=this.Z;for(const y of l.C)y.KK=NaN,y.a$=NaN;VpC(this);this.vF({rsac:"resetSkipAd",
sac:this.N});this.Oj.delete(this.N);this.N="";this.Xz&&(this.Ja=void 0)}iP(l,y,k){return this.C_.iP(l,y,k)}xR(l){const y=l.trackType;for(const A of l.metadata??[])for(const Q of A.uC??[]){var k=Q.EZ,z=Q.aS;l=Q.cpn;var r=Q.loggingMetadata,Z=Q.RB,e=Q.Xw;if(!l||l===this.playback.getVideoData().clientPlaybackNonce)continue;const t=this.Z.u5(l);if(y===2){if(k&&k.startTicks!==void 0&&k.rQ!==void 0&&k.timescale!==void 0&&z&&z.startTicks!==void 0&&z.rQ!==void 0&&z.timescale!==void 0&&Z!==void 0){const O=
k.startTicks/k.timescale,d=z.startTicks/z.timescale;k=(O-d)*1E3;z=(d+z.rQ/z.timescale)*1E3;e=e?z:Math.max(z+1E3,Z);Z=k+e;t&&(PM(this,t,e,Z),t.z$=t.z$!==void 0?Math.min(t.z$,O):O,r&&(t.F$=r));(r=this.C.get(l))?(r.start=k,r.end=Z,this.playback.OH()):(r=MpC(k,Z,l),this.C.set(l,r),this.playback.addCueRange(r))}this.sb()}else y===1&&t&&r&&(t.jR=r)}}Z6(l,y,k,z,r,Z,e,A){k.length>0&&this.vF({onssinfo:1,sq:l,start:y.toFixed(3),cpns:k.join(","),ds:z.join(","),isVideo:Z?1:0});if(this.Xz&&this.Ja&&this.Ja.KK&&
k.length>0)for(var Q of k)if(Q===this.Ja.cpn){this.Cp!==Q&&(this.vF({skiperror:1,sq:l,acpn:this.Ja.cpn,skipsq:this.Ja.KK||0}),this.Cp=Q);break}A&&this.C_.Z6(l,Z,e,A);if(Z){if(k.length&&z.length)for(this.Oj.has(k[0])&&this.vF({skipfail:1,sq:l,acpn:k[0]}),l=y+this.rD(),Z=0;Z<k.length;Z++)if(Q=k[Z],A=l,l=A+z[Z],Q=this.Z.u5(Q))A-=r[Z],Q.z$=Q.z$!=null?Math.min(Q.z$,A):A;if(k.length&&z.length)for(y=(y+this.rD())*1E3,l=0;l<k.length;l++){Z=k[l];A=z[l]*1E3;if(Z===this.playback.getVideoData().clientPlaybackNonce){y+=
A;continue}this.jN.has(Z)||(this.vF({adCpnFromEmsg:1}),this.jN.add(Z));Q=0;l<r.length&&(Q=r[l]*1E3);let t=this.C.get(Z);t?(t.start=y-Q,t.end=y+A,l===k.length-1&&(t.end+=PC4(this,Z,e)),this.playback.OH()):(t=MpC(y-Q,y+A,Z),this.C.set(Z,t),this.vF({newAdCR:1,cpn:Z,startTime:t.start,endTime:t.end}),l===k.length-1&&(t.end+=PC4(this,Z,e)),this.playback.addCueRange(t),this.sb());y=t.end}}}rD(){return this.playback.rD()}Al(l){this.playback.Md("timelineerror",{e:l})}wQ(l){this.K&&this.J&&this.A.push(this.J);
l&&this.J&&this.rb.push(this.J);this.J=null;this.playback.wQ(l)}zC(){this.vF({rstdaist:1});this.C_.clearAll()}pX(l){l!==this.J?.identifier?this.vF({ignorenoad:l}):(this.S2.add(l),this.vF({noadrcv:l}),this.J?.identifier===l&&M_(this))}rN(l,y){if(this.lX)return this.vF({dai_disabled:l.event}),!1;if(!this.cG.X("html5_lifa_move_gab_on_continue_or_stop_restriction")&&this.playback.getVideoData().j2()&&(l.event==="continue"||l.event==="stop"))return!1;var k=nJ(this.api.r4());y=k?k.rN(l,y):!1;if(l.event===
"prefetch")return y;if(y)this.V={wE:l.identifier,iz:l.startSecs};else if(this.V&&this.V.wE===l.identifier&&l.startSecs>this.V.iz+1){this.vF({cueStChg:l.identifier,oldSt:this.V.iz.toFixed(3),newSt:l.startSecs.toFixed(3),abid:this.V.fQ});if(this.V.fQ){k=l.startSecs-this.V.iz;const z=this.Z.Z.get(this.V.fQ);if(z)for(const r of z)r.Jj>=0&&(r.Jj+=k*1E3,this.vF({newApEt:r.Jj,newApPrt:r.Ha,acpn:r.cpn}))}this.V.iz=l.startSecs}y?this.u0.add(l.identifier):this.u0.has(l.identifier)&&this.u0.delete(l.identifier);
return y}OC(l){let y="";l?l.event==="unknown"?y="unknown":this.u0.has(l.identifier)?this.V&&this.V.wE===l.identifier?this.V.wE===l.identifier?y=Be(this.rb,k=>k.identifier===l.identifier)?"shortad":"pending":Be(this.rb,k=>k.identifier===l.identifier)||(y="noAdsAdded"):y="wrongAdBreakInfo":y="unscheduled":y="noCuepoint";
return y}T1(l){return this.lX?!1:!!YP(this,l)}PJ(l){if(this.cG.X("html5_lifa_ignore_multiple_skips")&&this.Y)return this.vF({ufs_ad:this.N,ufs_cur:this.ML,ufs_cont:this.dM().cpn}),!1;I$(this,this.ML);this.playback.pauseVideo();const y=this.playback.getCurrentTime(),k=this.Z.u5(this.ML);if(!k)return this.vF({skipFail:y}),!1;this.N=this.ML;this.D=!1;this.api.X("html5_ssdai_enable_media_end_cue_range")&&this.playback.Be(this.N);this.zU(k.MJ);J8z(this,k,this.dM(),l);uG5(this,y,{seekSource:89,gY:"lifa_skip"});
this.Y||(this.Y=this.events.j(this.api,"progresssync",()=>{VM(this.api.SV(),(0,g.f)(),"ad_to_video");this.Y&&(this.events.uq(this.Y),this.Y=null)}));
return!0}zU(l){if(this.playback.getVideoData().j2()){var y=this.Z.Z.get(l);if(y){for(var k of y)y=this.C.get(k.cpn),this.C.delete(k.cpn),y&&this.playback.removeCueRange(y),tp5(this.Z,k);this.fA.clear();k=this.Z;y=k.Z.get(l)??[];for(const z of y)tp5(k,z);k.Z.delete(l);(l=this.R7.get(l))&&this.O1&&this.playback.ED(l)}}}vF(l,y=!1){(y||this.mK)&&this.playback.Md("sdai",l)}};g.y$.prototype.gX=yz(64);var bKO=class extends g.zP{constructor(l,y,k,z){super();this.api=l;this.cG=y;this.Z=k;this.app=z;this.J=new Map;this.C=[];this.N=this.K=null;this.C_=NaN;this.S=this.V=this.D=null;this.A=new g.B_(()=>{pAC(this,this.C_,this.D||void 0)});
this.Y=[];this.b0=new g.B_(()=>{var r=this.Y.pop();if(r){const Z=r.Rj,e=r.playerVars;r=r.playerType;e&&(e.prefer_gapless=!0,this.api.preloadVideoByPlayerVars(e,r,NaN,"",Z),this.Y.length&&this.b0.Kl(4500))}});
this.events=new g.cI(this);this.d4={z8z:()=>this.C};
this.Z.getPlayerType();g.x(this,this.A);g.x(this,this.b0);g.x(this,this.events);this.events.j(this.api,g.uR("childplayback"),this.onCueRangeEnter);this.events.j(this.api,"onQueuedVideoLoaded",this.onQueuedVideoLoaded);this.events.j(this.api,"presentingplayerstatechange",this.ea)}onCueRangeEnter(l){if(this.Z===this.app.je()){var y=this.J.get(l);y?jXC(this,y.target,y.S8,l):this.ZQ("dai.transitionfailure",{e:"unexpectedCueRangeTriggered",cr:l.toString()})}else if(y=this.C.find(z=>z.UT.cV===l)){var k=
y.UT;
const z=k.target;k=k.S8;z?jXC(this,z,k,l):SDP(this,y.Ha,k,l)}}onQueuedVideoLoaded(){const l=this.K;EM(this);l&&(gN(this,l)||this.ZQ("dai.transitionfailure",{e:"unexpectedPresentingPlayer",pcpn:this.app.je()?.getVideoData().clientPlaybackNonce,ccpn:`${l.playerVars.cpn}`}),this.app.je().addCueRange(l.UT.cV))}seekTo(l=0,y={},k=!1,z=null){if(k)pAC(this,l,y);else{k=this.app.je()||null;const r=k===this.V?this.S:null;p_(this,!1);this.C_=l;this.D=y;z!=null&&this.A.start(z);k&&(this.S=r||k.getPlayerState(),
k.In(),this.V=k)}}ea(l){l.tj(128)&&FGQ(this)}isManifestless(){return fc(this.Z.getVideoData())}Vj(){p_(this,!1);n_(this);super.Vj()}ZQ(l,y){this.Z.ZQ(new g.Gr(l,y))}},E1z=0;var N6T="MWEB TVHTML5 TVHTML5_AUDIO TVHTML5_CAST TVHTML5_KIDS TVHTML5_FOR_KIDS TVHTML5_SIMPLY TVHTML5_SIMPLY_EMBEDDED_PLAYER TVHTML5_UNPLUGGED TVHTML5_VR TV_UNPLUGGED_CAST WEB WEB_CREATOR WEB_EMBEDDED_PLAYER WEB_EXPERIMENTS WEB_GAMING WEB_HEROES WEB_KIDS WEB_LIVE_APPS WEB_LIVE_STREAMING WEB_MUSIC WEB_MUSIC_ANALYTICS WEB_MUSIC_INTEGRATIONS WEB_REMIX WEB_UNPLUGGED WEB_UNPLUGGED_ONBOARDING WEB_UNPLUGGED_OPS WEB_UNPLUGGED_PUBLIC".split(" ");var unf=class extends g.zP{constructor(){super();this.Z=new HE(5,null);g.x(this,this.Z);this.C=new HE(15,null);g.x(this,this.C)}JK(l){if(l)return this.C.get(l)}Vj(){this.Z.removeAll();this.C.removeAll();super.Vj()}};var xye=class extends g.zP{constructor(l){super();this.cache=new HE(l,null);g.x(this,this.cache)}get(l){l=this.cache.get(l);return l===null?void 0:l}put(l,y,k){this.cache.set(l,y,k||3600)}};g.my1=Pf(()=>{const l=window.AudioContext||window.webkitAudioContext;try{return new l}catch(y){return y.name}});var qmL=class extends g.H{constructor(l){super({U:"div",L_:["html5-video-player"],G:{tabindex:l.O().disableOrganicUi?"":"-1",id:l.webPlayerContextConfig.rootElementId},W:[{U:"div",B:g.Cb.VIDEO_CONTAINER,G:{"data-layer":"0"}}]});this.app=l;this.Sp=this.qd(g.Cb.VIDEO_CONTAINER);this.kH=new g.f9(0,0,0,0);this.cn=null;this.Xn=new g.f9(0,0,0,0);this.Ge=this.pv=this.Hr=NaN;this.AK=this.u2=this.uc=this.gs=!1;this.gE=NaN;this.lw=!1;this.nm=null;this.eJ=new g.B_(()=>{this.app.O().X("web_enable_smart_zoom")&&
this.app.K_.getInternalApi().isAutocropEnabled()||this.resize()},100);
this.AD=()=>{this.element.focus({preventScroll:!0})};
this.Ci=()=>{this.app.K_.publish("playerUnderlayVisibilityChange","visible");this.cn.classList.remove(g.Cb.VIDEO_CONTAINER_TRANSITIONING);this.cn.removeEventListener(N_,this.Ci);this.cn.removeEventListener("transitioncancel",this.Ci)};
this.GY=this.nK=!1;const y=this.element.addEventListener,k=this.element.removeEventListener;this.addEventListener=(r,Z,e)=>{y.apply(this.element,[r,Z,e])};
this.removeEventListener=(r,Z,e)=>{k.apply(this.element,[r,Z,e])};
const z=l.O();z.transparentBackground&&this.YC("ytp-transparent");z.controlsType==="0"&&this.YC("ytp-hide-controls");g.zi(this.element,"ytp-exp-bottom-control-flexbox");g.zi(this.element,"ytp-modern-caption");z.X("enable_new_paid_product_placement")&&!g.JA(z)&&g.zi(this.element,"ytp-exp-ppp-update");g.zi(this.element,"ytp-livebadge-color");z.X("web_player_default_autohide")&&g.zi(this.element,"ytp-autohide");LGg(this.element,dW_(l));this.t0=!1;this.JB=new g.Fn(NaN,NaN);B6y(this);this.j(l.K_,"onMutedAutoplayChange",
this.onMutedAutoplayChange);g.x(this,this.eJ)}YC(...l){g.rx(this.element,l)}Uo(){this.cn&&(this.cn.removeEventListener("focus",this.AD),g.XI(this.cn),this.cn=null)}OU(){this.IR();const l=this.app.O();l.Ng||this.YC("tag-pool-enabled");l.S&&this.YC(g.Cb.HOUSE_BRAND);l.playerStyle==="gvn"&&(this.YC("ytp-gvn"),this.element.style.backgroundColor="transparent");l.g4&&(this.gE=g.Du("yt-dom-content-change",this.resize,this));this.j(window,"orientationchange",this.resize,this);this.j(window,"resize",this.resize,
this)}Hk(l){g.ih(this.app.O());this.AK=!l;Fx(this)}resize(){if(this.cn){var l=this.uI();if(!l.isEmpty()){this.app.K_.isFullscreen()&&af()&&this.eJ.start();var y=!g.om(l,this.kH.getSize()),k=D7t(this);y&&(this.kH.width=l.width,this.kH.height=l.height);l=this.app.O();(k||y||this.GY||l.g4)&&this.app.K_.publish("resize",this.getPlayerSize())}}}HZ(l,y){this.updateVideoData(y)}updateVideoData(l){if(this.cn){var y=this.app.O();Zu&&(this.cn.setAttribute("x-webkit-airplay","allow"),l.title?this.cn.setAttribute("title",
l.title):this.cn.removeAttribute("title"));this.cn.setAttribute("controlslist","nodownload");y.jw&&l.videoId?this.cn.poster=l.uE("default.jpg"):If()&&(yH??0)>=10&&(this.cn.poster="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}y=g.Dp(l,"yt:bgcolor");this.Sp.style.backgroundColor=y?y:"";this.Hr=g8(g.Dp(l,"yt:stretch"));this.pv=g8(g.Dp(l,"yt:crop"),!0);g.I(this.element,"ytp-dni",l.Wn);this.resize()}setGlobalCrop(l){this.Ge=g8(l,!0);this.resize()}setCenterCrop(l){this.gs=
l;this.resize()}yG(){}getPlayerSize(){var l=this.app.O();const y=this.app.K_.isFullscreen();var k=l.externalFullscreen&&g.u9(l);if(y&&af()&&!k)return new g.Fn(window.outerWidth,window.outerHeight);k=!isNaN(this.JB.width)&&!isNaN(this.JB.height);const z=this.app.O().X("kevlar_player_enable_squeezeback_fullscreen_sizing")||this.app.O().X("web_watch_enable_fs_squeezeback_panels");if(y&&!k&&z)return new g.Fn(this.element.clientWidth,this.element.clientHeight);if(y||l.DY){let r;window.matchMedia&&(l="(width: "+
window.innerWidth+"px) and (height: "+window.innerHeight+"px)",this.nm&&this.nm.media===l||(this.nm=window.matchMedia(l)),r=this.nm&&this.nm.matches);if(r)return new g.Fn(window.innerWidth,window.innerHeight)}else if(k)return this.JB.clone();return new g.Fn(this.element.clientWidth,this.element.clientHeight)}uI(){var l=this.app.O().X("enable_desktop_player_underlay");const y=this.getPlayerSize(),k=g.i_(this.app.O().experiments,"player_underlay_min_player_width");return l&&this.uc&&y.width>k?(l=g.i_(this.app.O().experiments,
"player_underlay_video_width_fraction"),new g.Fn(Math.min(y.height*this.getVideoAspectRatio(),y.width*l),Math.min(y.height,y.width*l/this.getVideoAspectRatio()))):y}getVideoAspectRatio(){return isNaN(this.Hr)?RbQ(this):this.Hr}getVideoContentRect(l){const y=this.uI();l=HP5(this,y,this.getVideoAspectRatio(),l);return new g.f9((y.width-l.width)/2,(y.height-l.height)/2,l.width,l.height)}lN(l){this.uc=l;this.resize()}N$(){return this.u2}onMutedAutoplayChange(){Fx(this)}setInternalSize(l){g.om(this.JB,
l)||(this.JB=l,this.resize())}Vj(){this.gE&&g.lP(this.gE);this.Uo();super.Vj()}};var W4f=class{constructor(){this.csn=g.MM();this.clientPlaybackNonce=null;this.elements=new Set;this.N=new Set;this.Z=new Set;this.C=new Set}click(l,y){this.elements.has(l);this.Z.has(l);const k=g.MM();k&&l.visualElement&&g.lM(k,l.visualElement,y)}createClientVe(l,y,k,z=!1){this.elements.has(l);this.elements.add(l);k=aN(k);l.visualElement=k;const r=g.MM(),Z=g.Ur();r&&Z&&(g.EJ("combine_ve_grafts")?Z5(zk(),k,Z):g.OJ(g.nz)(void 0,r,Z,k));y.addOnDisposeCallback(()=>{this.elements.has(l)&&this.destroyVe(l)});
z&&this.C.add(l)}createServerVe(l,y,k=!1){this.elements.has(l);this.elements.add(l);y.addOnDisposeCallback(()=>{this.destroyVe(l)});
k&&this.C.add(l)}destroyVe(l){this.elements.has(l);this.elements.delete(l);this.N.delete(l);this.Z.delete(l);this.C.delete(l)}b0(l,y){this.clientPlaybackNonce!==y&&(this.clientPlaybackNonce=y,rQ(zk(),l),lnC(this))}setTrackingParams(l,y){this.elements.has(l);y&&(l.visualElement=g.Gd(y))}fP(l,y,k){this.elements.has(l);y?this.Z.add(l):this.Z.delete(l);const z=g.MM(),r=l.visualElement;this.C.has(l)?z&&r&&(y?g.RN(z,[r]):g.Dx(z,[r])):y&&!this.N.has(l)&&(z&&r&&g.HH(z,r,void 0,k),this.N.add(l))}hasVe(l){return this.elements.has(l)}};var IlL=class extends g.zP{constructor(l,y,k,z,r,Z,e){super();this.Y=l;this.Md=y;this.D=k;this.S=z;this.A=r;this.intervalMs=Z;this.J=e;this.b0=Ge;this.K=0;this.V=this.N=!1;this.C_=Math.floor(Math.random()*256)}sendRequest(){var l=[0,1,2,3];this.J&&(l.push(4),this.V&&l.push(5));switch(l[Math.floor(Math.random()*l.length)]){case 0:zR4(this,this.S);break;case 1:this.gq&&(l={[0]:1,[1]:performance.now()},this.request(l));break;case 2:l=this.A;this.gq&&(l={[0]:2,[1]:performance.now(),[3]:l},this.request(l));
break;case 3:this.gq&&(l={[0]:3,[1]:performance.now()},this.request(l));break;case 4:this.J&&(l={[0]:4,[1]:performance.now(),[4]:this.J},this.request(l));break;case 5:var y=this.S;l=this.C_;this.gq&&(y=kDt(this,y),l={[0]:5,[1]:performance.now(),[2]:y,[5]:l},this.request(l))}}request(l){this.gq&&this.gq.postMessage(l)}receive(l){if(!(this.K>=5E3)){var y=l.timeStamp,k=performance.now();l=l.data;l[0]===5&&(this.V=!0);var z=l[1];this.Md("worker",{type:l[0],t1:(l[2]-performance.timeOrigin-z).toFixed(3),
t2:(l[3]-performance.timeOrigin-z).toFixed(3),t3:(y-z).toFixed(3),t4:(k-z).toFixed(3)});this.K++}}Vj(){this.C!==void 0&&(clearInterval(this.C),this.C=void 0);this.gq?.terminate();this.Z=this.gq=void 0;this.V=!1;this.Md("workerDtor",{});super.Vj()}};g.zY=class extends g.zP{constructor(l,y,k,z){super();this.logger=new g.R9("App");this.SQ=this.gP=!1;this.g$={};this.ZX=[];this.vK=!1;this.uw=null;this.intentionalPlayback=!1;this.s_=!0;this.r7=!1;this.UH=this.w6=this.tL=null;this.D9=!0;this.mediaElement=this.HF=null;this.um=NaN;this.bV=!1;this.Kp=this.xl=this.l$=this.screenLayer=this.playlist=null;this.Cs=[];this.sL=0;this.u$=new R8C;this.mp=[];this.d4={yu:()=>this.D3,
vI:()=>this.l$};
if(!k)throw Error("b/179532961");this.lf=y?.args||{};this.webPlayerContextConfig=k;y=this.lf;this.cG=new jxP(y,k,k.canaryState,z);g.x(this,this.cG);Kh4(this.cG);z=DL5(this.cG);this.cG.yM()&&FX(z,e=>{this.A9("h5vcc",e)});
this.cG.experiments.z7("jspb_serialize_with_worker")&&oqg();this.cG.C&&aET();this.X("html5_onesie")&&(this.i_=new dtB(this.cG),g.x(this,this.i_));this.o7=new cYR(zbq(g.dU(this.cG),this.cG.y0,this.cG.experiments),new Hnq(this.cG.experiments),()=>void this.oD());
g.x(this,this.o7);this.Ym=JD(XC(this.cG)&&!0,y.enablesizebutton);this.x7=JD(!1,y.player_wide);this.visibility=new MDL;g.x(this,this.visibility);this.X("web_log_theater_mode_visibility")&&this.HT(JD(!1,y.player_wide));this.gP=JD(!1,y.external_list);this.events=new g.cI(this);g.x(this,this.events);this.X("start_client_gcf")&&(iP(ck(),{jf:wc,Ag:yFe()}),this.Sg=ck().resolve(wc),AFe(this.Sg));this.XC=new da;g.x(this,this.XC);this.AX=new W4f;z=new Ljs;this.K_=new g.hc(this,z);g.x(this,this.K_);this.template=
new qmL(this);g.x(this,this.template);this.appState=1;this.Gk=$Wg(this);g.x(this,z);this.eq={internalvideodatachange:this.Xa,playbackready:this.P3,playbackstarted:this.au,statechange:this.Iu};this.IB=new Vfp(this.K_);this.i$=hRz(this);z=this.cG.S;!1!==z&&this.A9("badps",{hbp:z,hostname:window.location.hostname,ps:this.cG.playerStyle});this.QM=new qGs(this.cG,this.i$);this.K_.publish("csiinitialized");(this.webPlayerContextConfig.wasmModuleUrl||Rl(this.i$))&&GD5(this);z=10;g.dU(this.cG)&&(z=3);V6(this.cG)&&
(z=g.i_(this.cG.experiments,"tvhtml5_unplugged_preload_cache_size"));this.D3=new g.Rz(this.K_,z);z=this.cG.experiments.sA().Z.G7(jze)||z;this.oL=new xye(z);g.x(this,this.oL);z=ant(this);this.D3.QW(z);UWy(this);this.rG={airplayactivechange:this.TL,airplayavailabilitychange:this.W3,beginseeking:this.hH,sabrCaptionsDataLoaded:this.RT,endseeking:this.C4,internalAbandon:this.bk,internalaudioformatchange:this.DF,internalvideodatachange:this.IT,internalvideoformatchange:this.n4,liveviewshift:this.NT,playbackstalledatstart:this.aT,
progresssync:this.ri,onAbnormalityDetected:this.zL,onSnackbarMessage:this.Pl,onLoadProgress:this.V3,SEEK_COMPLETE:this.vl,SEEK_TO:this.Ut,onVideoProgress:this.Xi,onLoadedMetadata:this.JH,onAutoplayBlocked:this.Y9,onPlaybackPauseAtStart:this.oT,playbackready:this.Q3,statechange:this.FX,newelementrequired:this.le,heartbeatparams:this.eH,videoelementevent:this.SH,drmoutputrestricted:this.Zj,signatureexpired:this.L4,nonfatalerror:this.qT,reloadplayer:this.Hl};this.sD=new g.cI(this);g.x(this,this.sD);
this.Ny=new unf;g.x(this,this.Ny);this.DN=this.Dx=-1;this.hQ=new g.B_(this.template.resize,16,this.template);g.x(this,this.hQ);this.m8=new bKO(this.K_,this.cG,this.b5(),this);this.Ye=new Uyx(this);g.x(this,this.Ye);this.ZL=new iKf(this);g.x(this,this.ZL);sXT(this.cG.Z.c);this.events.j(this.K_,g.uR("appapi"),this.LH);this.events.j(this.K_,g.xR("appapi"),this.uo);this.events.j(this.K_,g.uR("appprogressboundary"),this.Et);this.events.j(this.K_,g.xR("applooprange"),this.Nk);this.events.j(this.K_,"presentingplayerstatechange",
this.ea);this.events.j(this.K_,"resize",this.f4);this.template.Uj(l4(document,l));this.events.j(this.K_,"offlineslatestatechange",this.OO);this.events.j(this.K_,"sabrCaptionsTrackChanged",this.tH);this.events.j(this.K_,"sabrCaptionsBufferedRangesUpdated",this.TF);this.i$.L.O().Ak&&vB(this.i$,"offline");this.cG.Xr&&g.EZ("ux",g.al2);l=g.i_(this.cG.experiments,"html5_defer_fetch_att_ms");this.MY=new g.B_(this.xT,l,this);g.x(this,this.MY);this.hs().Ij()&&(g.QE()&&this.hs().dP.push("mdx"),Xa(this));this.QM.tick("fs");
Xuz(this);this.cG.Xr&&vB(this.i$,"ux",!0);g.u9(this.i$.L.O())&&vB(this.i$,"embed");this.X("web_player_sentinel_is_uniplayer")||g.WH(new g.WO("Player experiment flags missing","web_player_sentinel_is_uniplayer"));l=this.X("web_player_sentinel_yt_experiments_sync");z=g.EJ("web_player_sentinel_yt_experiments_sync");l!==z&&g.WH(new g.WO("b/195699950",{yt:l,player:z}));this.z3=cx_(this);if(l=g.i_(this.cG.experiments,"html5_block_pip_safari_delay"))this.Nm=new g.B_(this.IG,l,this),g.x(this,this.Nm);k=lO(k?.trustedEchoWorkerUrl??
null);l=this.cG.sA().Z.G7(xFQ);z=this.cG.sA().Z.G7(mFq);y=this.cG.sA().Z.G7(uB5);const r=this.cG.sA().Z.G7(b15),Z=this.webPlayerContextConfig.echoWorkerWasmModuleUrl??"";k&&l>0&&z>0&&y>0&&r>0&&(this.hF=new IlL(k,(e,A)=>{this.b5().Md(e,A)},y,z,r,l,Z),g.x(this,this.hF),rx4(this.hF));
g.x(this,this.u$);z6=this.cG.R7;this.K_.publish("applicationInitialized")}static create(l,y,k,z){try{const r=typeof l==="string"?l:`player${g.mP(l)}`,Z=kN[r];if(Z){try{Z.dispose()}catch(A){g.n(A)}kN[r]=null}const e=new g.zY(l,y,k,z);e.addOnDisposeCallback(()=>{kN[r]=null;e.z3&&e.z3()});
return kN[r]=e}catch(r){throw g.n(r),(r&&r instanceof Error?r:Error(String(r))).stack;}}gT(){return this.visibility}QW(l){const y=this.b5();if(l!==y){l.getVideoData().autonavState=y.getVideoData().autonavState;y.zN(this.eq,this);var k=y.getPlaybackRate();y.dispose();this.D3.QW(l);l.setPlaybackRate(k);l.IZ(this.eq,this);Xa(this)}}gW(){this.uw||(this.uw=g.zJ(EB(),qYP(),{MG:this.cG.MG(),clientInterface:AA(this.cG)}));return this.uw}Uo(l){if(this.mediaElement){this.xl&&(this.events.uq(this.xl),this.xl=
null);this.sD.C();this.je().Uo(!0,!1,l);this.template.Uo();try{this.X("html5_use_async_stopVideo")?this.mediaElement.dispose():this.mediaElement.mK()}catch(y){g.WH(y)}this.mediaElement=null}}Sw(l,y,k=!1){if(l!==this.je()){var z=null;k||(k=this.je(),z=k.getPlayerState(),yQ(this.i$,3),ec(this,"cuerangesremoved",k.XJ()),this.Ye&&!l.isGapless()&&k.isGapless()&&this.mediaElement&&this.mediaElement.stopVideo(),k=l.Ly()&&k.Ly(),this.QM.j0("iv_s"),uET(this,k));l.getPlayerType()===1&&this.QW(l);k=l.getPlayerType();
var r=this.D3.N[k]||null;l!==this.b5()&&l!==r&&(r?.dispose(),r=this.D3,r.N[k]=l,r.J[l.dZ()]=l);this.D3.Sw(l);this.mediaElement&&l.setMediaElement(this.mediaElement);l.IZ(this.rG,this);l.JN()?Cg(this,"setPresenting",!1):(this.HZ("newdata",l,l.getVideoData()),z&&!g.ut(z,l.getPlayerState())&&this.FX(new g.WK(l.getPlayerState(),z)),y=y&&l.getPlayerType()===1,l.M$()&&!y&&this.HZ("dataloaded",l,l.getVideoData()),(y=(y=l.getVideoData().C)&&y.video)&&g.X5(this.K_,"onPlaybackQualityChange",y.quality),ec(this,
"cuerangesadded",l.XJ()),y=l.getPlayerState(),y.Z(2)?mWz(this):y.Z(8)?l.playVideo():l.zX()&&l.pauseVideo(),y=this.b5(),l.getPlayerType()===2&&(l.getVideoData().qO=y.getVideoData().clientPlaybackNonce),l.getPlayerType()!==2||this.CE()||(l=l.getVideoData(),y.pD(l.clientPlaybackNonce,l.T7||"",l.breakType||0,l.YR,l.videoId||"")))}}hU(){this.b5()!==this.je()&&this.Sw(this.b5())}yu(){return this.D3}u5(l){return this.D3.u5(l)||this.D3.D}b5(){return this.D3.b5()}je(){return this.D3.je()}P3(){qX(this)||this.iN(5)}Q3(){if(!qX(this)){k8(this);
var l=this.je(),y=l.getVideoData();this.cG.X("html5_allow_multiview_tile_preload")&&y.SN&&l.seekTo(Infinity);y=l.getPlayerState();l.zX()?this.pauseVideo():y.isOrWillBePlaying()&&this.playVideo()}}canPlayType(l){return U1(l)}O(){return this.cG}getVideoData(){return this.je().getVideoData()}vI(){return this.je().OS()}hs(){return this.b5().getVideoData()}getVideoLoadedFraction(l){return this.u5({playerType:l}).getVideoLoadedFraction()}Yz(){return this.template}r4(){return this.i$}SV(){return this.QM}on(l,
y=1,k){this.u5({playerType:y}).m4(l,void 0,k)}ER(){const l=this.i$.ER();this.K_.publish("videoStatsPingCreated",l);return l}getVolume(){return Math.round(this.K_.getVolume())}isMuted(){return this.K_.isMuted()}Ex(){if(this.b5()===this.je()&&this.HF)return this.HF.postId}xT(){this.X("use_rta_for_player")||(g.dU(this.cG)?g.jz(this.cG,this.getVideoData().S()).then(l=>{fi(EB(),l);mxz(this.getVideoData(),this.cG,this.gW())}):mxz(this.getVideoData(),this.cG,this.gW()))}P6(l){this.K_.publish("poTokenVideoBindingChange",
l)}Kh(l){this.K_.publish("d6de4videobindingchange",l)}ZH(){this.q0&&this.q0.ZH()}Vh(l){this.q0=l}Uq(l){if(l===1){this.QM.tick("vr");
var y=this.je();y.mG();u0C(this.QM,y.getVideoData(),TOT(this));lC(this.i$)}y=this.cG;(Iq(y)&&y.A||g.aq(y))&&(this.je().getVideoData()?.enableServerStitchedDai||!this.CE())&&g.X5(this.K_,"onAdStateChange",l)}setLoopVideo(l){const y=this.je();y===this.b5()&&y.Ti()!==l&&(y.setLoop(l),g.G3(this.K_,"onLoopChange",l))}getLoopVideo(){return this.je().Ti()}setLoopRange(l){var y=!1;!!this.HF!==!!l?y=!0:this.HF&&l&&(y=this.HF.startTimeMs!==l.startTimeMs||this.HF.endTimeMs!==l.endTimeMs||this.HF.postId!==l.postId||
this.HF.type!==l.type);if(y){y=this.je();jn(y.getVideoData())&&y.Md("slr",{et:l?.endTimeMs||-1});y=this.b5();y.Ur("applooprange");if(l){var k=new g.N1(l.startTimeMs,l.endTimeMs,{id:"looprange",namespace:"applooprange"});y.addCueRange(k)}else this.hs().clipConfig=void 0,this.HF?.type!=="repeatChapter"||isNaN(Number(this.HF?.loopCount))||(k={loopCount:String(this.HF.loopCount),cpn:this.getVideoData().clientPlaybackNonce},g.wv("repeatChapterLoopEvent",k));this.HF=l;g.G3(this.K_,"onLoopRangeChange",l||
void 0);this.b5()===this.je()&&(this.Nk(),y.Kd())}}getLoopRange(){return this.HF}Nk(){let l="";const y=this.b5();this.HF?y!==this.je()?l="pnea":eRe(this,y.getCurrentTime())&&(this.HF.loopCount=0,l="ilr"):l="nlr";const k=this.je();jn(k.getVideoData())&&(this.X("html5_gapless_log_loop_range_info")?k.Md("slrre",{rej:l,ct:y.getCurrentTime(),lst:this.HF?.startTimeMs,let:this.HF?.endTimeMs}):k.Md("slrre",{}));l||P6P(this)}setPlaybackRate(l,y){if(!isNaN(l)){l=i7C(this,l);var k=this.b5();k.getPlaybackRate()!==
l&&(k.setPlaybackRate(l),y&&!this.cG.V&&g.eY("yt-player-playback-rate",l),g.X5(this.K_,"onPlaybackRateChange",l))}}getCurrentTime(l={}){const {playerType:y,D5:k=!0}=l;var z=this.D3.xe;if(z)return z.getCurrentTime();l=(z=y===2&&this.getVideoData().enableServerStitchedDai)?this.je():this.u5(l);return z&&this.l$?(z=this.D3.K)?z.getCurrentTime(k):l.getCurrentTime():k?(l=mf(this,l),D7(this,l.getCurrentTime(),l)):l.getCurrentTime()}qS(){var l=this.u5({playerType:void 0});l=mf(this,l);return D7(this,l.qS(),
l)}getDuration(l={}){const {playerType:y,D5:k=!0}=l;if(l=this.D3.xe)return l.getDuration();l=this.getVideoData();const z=y===2&&l.enableServerStitchedDai;let r;r=z?this.je():this.u5({playerType:y});if(l.hasProgressBarBoundaries()&&!z){const Z=Number(l.progressBarStartPosition?.utcTimeMillis),e=Number(l.progressBarEndPosition?.utcTimeMillis);if(!isNaN(Z)&&!isNaN(e))return(e-Z)/1E3}if(jn(l)&&!l.isLivePlayback)return lf(this,y);if(k)return l=R$(this,r),D7(this,l.getDuration(),l);z&&this.l$?(l=this.D3,
l=l.Z===l.K?l.Z:null,l=(l==null?void 0:l.getDuration())||0):l=r.getDuration();return l}QK(l){var y=this.u5({playerType:l});return this.CE(y)?(y=R$(this,y),y.QK()-y.getCurrentTime()+this.getCurrentTime({playerType:l})):y.QK()}finishSegmentByCpn(){return[]}OU(){this.template.OU();var l=this.K_;l.state.element=this.template.element;const y=l.state.element;let k;for(k in l.state.Z)l.state.Z.hasOwnProperty(k)&&(y[k]=l.state.Z[k]);(l=juP(this.template.element))&&this.events.j(this.template,l,this.onFullscreenChange)}getDebugText(l){var y=
this.b5().Dp(l),k=this.je();if(k!==this.b5()){k=k.Dp(l);for(var z of Object.keys(k))y["ad"+z]=k[z];if(l){z=y;k={};var r=l4(document,"movie_player");r&&(k.bounds=r.getBoundingClientRect(),k["class"]=r.className);r={};var Z=g.rt("video-ads");Z?(El5(Z,r),r.html=Z.outerHTML):r.missing=1;Z={};const e=g.rt("videoAdUiSkipContainer"),A=g.rt("ytp-ad-skip-button-container"),Q=g.rt("ytp-skip-ad-button"),t=e||A||Q;t?(El5(t,Z),Z.ima=e?1:0,Z.bulleit=A?1:0,Z.component=Q?1:0):Z.missing=1;k=JSON.stringify({player:k,
videoAds:r,skipButton:Z});z.ad_skipBtnDbgInfo=k}}l&&this.mediaElement&&(y["0sz"]=`${+Ny(this.mediaElement.getSize())===0}`,y.op=this.mediaElement.b0("opacity"),z=this.mediaElement.Kx().y+this.mediaElement.getSize().height,y.yof=`${+z<=0}`,y.dis=this.mediaElement.b0("display"));l&&((l=(0,g.lm)())&&(y.gpu=l),(l=this.cG.playerStyle)&&(y.ps=l),this.cG.u0&&(y.webview=1),(l=this.webPlayerContextConfig.jsUrl)&&(y.js=l));y.debug_playbackQuality=this.K_.getPlaybackQuality(1);y.debug_date=(new Date).toString();
y.origin=window.origin;y.timestamp=Date.now();delete y.uga;delete y.q;return JSON.stringify(y,null,2)}getFeedbackProductData(){const l={player_debug_info:this.getDebugText(!0),player_experiment_ids:this.O().experiments.experimentIds.join(", "),player_release:"youtube.player.web_20260308_08_RC00"},y=this.getPlayerStateObject().Ip;y&&(l.player_error_code=y.errorCode,l.player_error_details=JSON.stringify(y.errorDetail));return l}getPresentingPlayerType(l){return this.appState===1?1:qX(this)?3:(l&&this.cG.sA().Z.G7(vM)?
this.D3.Z?.isAd()??!1:this.l$?.T7(this.getCurrentTime()))?2:this.je().getPlayerType()}Td(){return!1}getPlayerStateObject(l){return this.u5({rL:!0,playerType:l}).getPlayerState()}getAppState(){return this.appState}SH(l){switch(l.type){case "loadedmetadata":this.hQ.start();for(var y of this.ZX)QQ5(this,y.id,y.ez,y.Ck,void 0,!1);this.ZX=[];break;case "loadstart":this.QM.j0("gv");break;case "progress":case "timeupdate":yS(l.target.Cy())>=2&&this.QM.j0("l2s");break;case "playing":g.pA&&this.hQ.start();
if(g.dU(this.cG))l=!1;else{y=g.Yk(this.r4());l=this.mediaElement.b0("display")==="none"||Ny(this.mediaElement.getSize())===0;var k=o$(this.template),z=this.je().getVideoData(),r=g.ow(this.cG);z=gH(z);y=!k||y||r||z||this.cG.gb;l=l&&!y}l&&(l=this.je(),l.Q1(),this.getVideoData().mK||(this.getVideoData().mK=1,this.le(),l.playVideo()))}}V3(l){g.M1(this.K_,"onLoadProgress",l)}aT(){this.K_.publish("playbackstalledatstart")}RT(l,y){this.K_.publish("sabrCaptionsDataLoaded",l,y)}tH(l){this.je().rH(l)}TF(l){this.je().Q_(l)}Xi(l){l=
mf(this,this.je());l=D7(this,l.getCurrentTime(),l);g.X5(this.K_,"onVideoProgress",l);this.cG.bG&&this.visibility.Bw()&&this.cG.S2&&!this.getVideoData()?.backgroundable&&this.pauseVideo()}Y9(){g.X5(this.K_,"onAutoplayBlocked");var l=this.je().getVideoData();l&&(l.nj=!0);g.u9(this.cG)&&(l={autoplayBrowserPolicy:bY(),autoplayIntended:uY(this.getVideoData()),autoplayStatus:"AUTOPLAY_STATUS_BLOCKED",cpn:this.getVideoData().clientPlaybackNonce,intentionalPlayback:this.intentionalPlayback},g.wv("embedsAutoplayStatusChanged",
l))}ri(){this.K_.publish("progresssync")}oT(){g.M1(this.K_,"onPlaybackPauseAtStart")}Iu(l){if(this.getPresentingPlayerType()===1){l.tj(1)&&!l.state.Z(64)&&this.hs().isLivePlayback&&this.b5().isAtLiveHead()&&this.K_.getPlaybackRate()>1&&this.setPlaybackRate(1,!0);if(l.tj(2)){if(this.HF&&this.HF.endTimeMs>=(this.getDuration()-1)*1E3){P6P(this);return}mWz(this)}if(l.state.Z(128)){var y=l.state;this.cancelPlayback(5);y=y.Ip;JSON.stringify({errorData:y,debugInfo:this.getDebugText(!0)});g.X5(this.K_,"onError",
jh_(y.errorCode));g.M1(this.K_,"onDetailedError",{errorCode:y.errorCode,errorDetail:y.errorDetail,message:y.errorMessage,messageKey:y.W_,cpn:y.cpn});(0,g.f)()-this.cG.va>6048E5&&g.M1(this.K_,"onReloadRequired")}y={};if(l.state.isPlaying()&&!l.state.isBuffering()&&!K4("pbresume","ad_to_video")&&K4("_start","ad_to_video")){const k=this.getVideoData();y.clientPlaybackNonce=k.clientPlaybackNonce;k.videoId&&(y.videoId=k.videoId);g.YV(y,"ad_to_video");Jt("pbresume",void 0,"ad_to_video");lC(this.i$)}this.K_.publish("applicationplayerstatechange",
l)}}FX(l){this.D3.xe||this.K_.publish("presentingplayerstatechange",l)}ea(l){bf(this,xX(l.state));l.state.Z(1024)&&this.K_.isMutedByMutedAutoplay()&&(zF(this,{muted:!1,volume:this.Gk.volume},!1),ys(this,!1))}onPlayerRequestSent(l){g.G3(this.K_,"onPlayerRequestSent",l)}Xa(l,y){l==="newdata"&&Xa(this);this.K_.publish("applicationvideodatachange",l,y)}DF(l,y){k8(this);g.M1(this.K_,"onPlaybackAudioChange",this.K_.getAudioTrack().a7.name);this.K_.publish("internalaudioformatchange",this.K_.getAudioTrack().a7.id,
y)}n4(l){const y=this.je().getVideoData();l===y&&g.X5(this.K_,"onPlaybackQualityChange",l.C.video.quality)}Hv(){var l=this.D3.N[2]||null;if(l){l=l.getVideoData();this.je().Md("ssdai",{cleanaply:1,acpn:l?.clientPlaybackNonce,avid:l.videoId,isDai:this.hs().enableServerStitchedDai?1:0});l=this.D3;const y=l.N[2];y&&(delete l.J[y.dZ()],delete l.N[2])}}IT(l,y){this.HZ(l,this.je(),y)}HZ(l,y,k){this.cG.yM()&&y.Md("vdc",{type:l,vid:k.videoId||"",cpn:k.clientPlaybackNonce||""});y===this.b5()&&(this.cG.oY=k.oauthToken);
y===this.b5()&&(this.getVideoData().enableServerStitchedDai&&!this.l$?(this.b5().Md("sdai",{initSstm:1}),this.l$=new g.y$(this.K_,this.cG,this.b5(),this)):!this.getVideoData().enableServerStitchedDai&&this.l$&&(this.l$.dispose(),this.l$=null));if(l==="newdata")yQ(this.i$,2),this.K_.publish("videoplayerreset",y);else{if(!this.mediaElement)return;if(l==="dataloaded")if(this.b5()===this.je()){if(bh(k.Qj,k.Yl),!this.b5().getPlayerState().isError()){var z=qX(this);this.hs().isLoaded();z&&this.iN(6);InC(this);
DE(this.i$)||cN(this)}}else InC(this);if(y.getPlayerType()===1&&(this.cG.HG&&Jx5(this),this.getVideoData().isLivePlayback&&!this.cG.fD&&this.FS("html5.unsupportedlive",2,"DEVICE_FALLBACK"),k.isLoaded()&&((NUs(k)||this.getVideoData().bI)&&this.K_.publish("legacyadtrackingpingchange",this.getVideoData()),k.hasProgressBarBoundaries()&&(z=Number(this.getVideoData().progressBarEndPosition?.utcTimeMillis)/1E3,!isNaN(z))))){var r=this.QK();r&&(r-=this.getCurrentTime(),z=(z-r)*1E3,r=this.g$.progressEndBoundary,
r?.start!==z&&(r&&this.ZI([r]),z=new g.N1(z,0x7ffffffffffff,{id:"progressEndBoundary",namespace:"appprogressboundary"}),this.b5().addCueRange(z),this.g$.progressEndBoundary=z))}this.K_.publish("videodatachange",l,k,y.getPlayerType())}g.X5(this.K_,"onVideoDataChange",{type:l,playertype:y.getPlayerType()});this.Nk();(l=k.lV)?this.AX.b0(l,k.clientPlaybackNonce):lnC(this.AX)}IQ(){ZU(this,null);g.M1(this.K_,"onPlaylistUpdate")}Et(l){delete this.g$[l.getId()];this.b5().removeCueRange(l);a:{l=this.getVideoData();
var y=l.sj?.contents?.singleColumnWatchNextResults?.autoplay?.autoplay?.sets||l.sj?.contents?.twoColumnWatchNextResults?.autoplay?.autoplay?.sets;if(y)for(k of y){y=k.autoplayVideo||k.autoplayVideoRenderer?.autoplayEndpointRenderer?.endpoint;const z=g.E(y,g.ug);if(y!=null&&z?.videoId===l.videoId&&z?.continuePlayback){var k=y;break a}}k=null}(l=g.E(k,g.ug))&&g.G3(this.K_,"onPlayVideo",{sessionData:{autonav:"1",itct:k?.clickTrackingParams},videoId:l.videoId,watchEndpoint:l})}iN(l){l!==this.appState&&
(l===2&&this.getPresentingPlayerType()===1&&(bf(this,-1),bf(this,5)),this.appState=l,this.K_.publish("appstatechange",l))}FS(l,y,k,z,r){this.b5().jI(l,y,k,z,r)}isAtLiveHead(l,y=!1){var k=this.u5({playerType:l});l=R$(this,k);k=mf(this,k);return l!==k?l.isAtLiveHead(D7(this,k.getCurrentTime(),k),!0):l.isAtLiveHead(void 0,y)}ot(){const l=this.u5({playerType:void 0});return R$(this,l).ot()}seekTo(l,y,k,z,r,Z){y=y!==!1;z=this.u5({playerType:z});this.appState===2&&GF(this);this.CE(z)?Vs(this)?this.l$.seekTo(l,
{seekSource:r},y,k):this.m8.seekTo(l,{seekSource:r},y,k):(this.X("html5_sabr_csdai_seek_log")||(Z=""),z.seekTo(l,{Ef:!y,G3:k,gY:"application"+(Z??""),seekSource:r}))}seekBy(l,y,k,z){this.seekTo(this.getCurrentTime()+l,y,k,z,void 0,"_by")}vl(){g.X5(this.K_,"SEEK_COMPLETE")}zL(){g.G3(this.K_,"onAbnormalityDetected")}Pl(l){g.G3(this.K_,"onSnackbarMessage",l)}Ut(l){const y=this.je(),k=y.getVideoData();if(this.appState===1||this.appState===2)k.startSeconds=l;this.appState===2?y.getPlayerState().Z(512)||
GF(this):g.X5(this.K_,"SEEK_TO",l)}TL(){this.K_.publish("airplayactivechange")}W3(){this.K_.publish("airplayavailabilitychange")}showAirplayPicker(){this.je().gw()}hH(){this.K_.publish("beginseeking")}C4(){this.K_.publish("endseeking")}getStoryboardFormat(l){l=this.u5({playerType:l});return R$(this,l).getStoryboardFormat()}mS(l){l=this.u5({playerType:l});return R$(this,l).getVideoData().mS()}CE(l){l=(l||this.je()).getVideoData();if(Vs(this))var y=l===this.l$.playback.getVideoData();else a:{var k=
this.m8;if(l===k.Z.getVideoData()&&k.C.length)y=!0;else{for(y of k.C)if(l.Rj===y.Rj){y=!0;break a}y=!1}}return y}Lj(l,y,k,z,r,Z,e,A){const Q=Vs(this);this.je().Md("appattl",{sstm:this.l$?1:0,ssenable:this.getVideoData().enableServerStitchedDai,susstm:Q});Q?(k=this.l$.wY(l,y,k,z,r,Z,e,A),l=k?.clientPlaybackNonce||"",(this.X("html5_ssdai_new_decoration_logic")||this.b5().getVideoData().uY)&&this.b5().FP(A||{Yq:""},y,k?.clientPlaybackNonce||"")):l=f0_(this.m8,l,k,z,r,Z);return l}Cm(l,y,k,z,r,Z,e,A){Vs(this)&&
(l=this.l$?.wY(l,y,k,z,r,Z,e,A),this.b5().getVideoData().uY&&this.b5().FP(A||{Yq:""},y,l?.clientPlaybackNonce||""))}pX(l){(this.X("html5_ssdai_new_decoration_logic")||this.b5().getVideoData().uY)&&this.b5().FP(l,"","");this.l$?.pX(l.Yq||"")}VJ(l=-1,y=Infinity){Vs(this)||n_(this.m8,l,y)}By(l,y,k){if(Vs(this)){var z=this.l$,r=k;(k=z.Z.u5(l))?(r===void 0&&(r=k.Ha),PM(z,k,y,r)):z.Al(`Invalid_cpn_${l}_specified`)}else{z=this.m8;let Z=null;for(r of z.C)if(r.Rj===l){Z=r;break}Z?(k===void 0&&(k=Z.Ha),o1z(z,
Z,y,k)):jx(z,"InvalidTimelinePlaybackId timelinePlaybackId="+l)}}enqueueVideoByPlayerVars(l,y,k=Infinity,z=""){this.CE();l=new g.YK(this.cG,l);z&&(l.Rj=z);tl(this,l,y,k)}queueNextVideo(l,y=1,k=NaN,z="",r=""){l=this.preloadVideoByPlayerVars(l,y,k,z,r);y=this.je();l&&(this.X("html5_check_queue_on_data_loaded")?this.O().supportsGaplessShorts()&&y.getVideoData().K&&(k=this.ZL,z=this.Ye.J,k.V!==l&&(k.C=y,k.V=l,k.N=1,k.Z=l.getVideoData(),k.J=z,k.Z.isLoaded()?k.S():k.Z.subscribe("dataloaded",k.S,k))):(k=
iJC(y,l,this.Ye.J),k!=null?(y.Md("sgap",k),y.getVideoData().K&&y.GQ(!1)):(l=l.getVideoData(),y=this.ZL,y.Z!==l&&(y.Z=l,y.N=1,l.isLoaded()?y.K():y.Z.subscribe("dataloaded",y.K,y)))))}Fo(l,y,k=0,z=0){R$(this,this.je()).pM();Whe(this.Ye,l,y,k,z).then(()=>{g.M1(this.K_,"onQueuedVideoLoaded")},()=>{})}Bh(){return this.Ye.Bh()}Kt(l){const y=this.Ye.Z;
return y?y.fC(l):!1}clearQueue(l=!1,y=!1){this.Ye.clearQueue(l,y)}loadVideoByPlayerVars(l,y=1,k,z,r,Z){var e=this.b5();if(y===2&&this.hs().enableServerStitchedDai&&e&&!e.sG())return e.Md("lvonss",{vid:l?.videoId||"",ptype:y}),!1;var A=!1;e=new g.YK(this.cG,l);e.vV=Z;g.JA(this.cG)&&!e.lE&&PB(this.QM);this.QM.timerName=e.C_??"";this.QM.GJ("pl_i");this.X("web_player_early_cpn")&&e.clientPlaybackNonce&&this.QM.infoGel({clientPlaybackNonce:e.clientPlaybackNonce});qo4(e).supportsVp9Encoding===!1&&this.je().Md("noVp9enc",
{});if(this.O().supportsGaplessShorts()){Z=Pcq(this.Ye,e,y);if(Z==null){bf(this,-1);this.Ye.Z?.getVideoData().isAd()||MX(this);l=this.Ye;l.app.O().X("html5_gapless_new_slr")?Al(l.app,"gaplessshortslooprange"):l.app.setLoopRange(null);l.app.getVideoData().Zs=!0;l.Z?.ZO();l.Z?.L7();k={gY:"gapless_to_next_video",seekSource:60,c9:l.J.Z};z=l.N?.C_()||-1;if(l.J.Z){const {Gt:O,mM:d}=l.N?.A()||{};d!=null&&O!=null&&(z=d-O+.001)}l.app.je()?.seekTo(z,k);l.app.getPlayerStateObject(y).isPlaying()||l.app.je()?.playVideo(!0);
VX4(l,z);l.app.je()?.Du();l.A();return!0}const Q=this.X("html5_shorts_gapless_preload_fallback"),t=this.Ye.Z;if(Q&&t&&!t.IR()){const O=t.getVideoData();this.D3.S.set(I6(y,O),t,3600)}this.Ye.clearQueue(Q);this.je().Md("sgap",{f:Z})}if(r){for(;e.rM.length&&e.rM[0].isExpired();)e.rM.shift();A=e.rM.length-1;A=A>0&&r.C(e.rM[A])&&r.C(e.rM[A-1]);e.rM.push(r)}k||(l&&Ja(l)?(Wn(this.cG)&&!this.gP&&(l.fetch=0),ZU(this,l)):this.playlist&&ZU(this,null),l&&(this.gP=JD(!1,l.external_list)));this.K_.publish("loadvideo");
y=this.CX(e,y,z);A&&this.FS("player.fatalexception",1,"GENERIC_WITH_LINK_AND_CPN",`loadvideo.1;emsg.${e.rM.join()}`.replace(/[;:,]/g,"_"));return y}preloadVideoByPlayerVars(l,y=1,k=NaN,z,r=""){z=Ew(l);if(z=this.D3.S.get(`${y}_${z}_${r}_${+(l.autonav==="1"||l.autonav===!0)}${+(l.autoplay==="1"||l.autoplay===!0||l.autoplay===1)}`)||null)return z;l=new g.YK(this.cG,l);r&&(l.Rj=r);{r=I6(y,l);z=this.je();const Z=I6(z.getPlayerType(),z.getVideoData());r===Z?(z.KD(!0),l.dispose(),y=null):(l.S2=!0,z=Qs(this,
y,l,!0),(y!==1||!V6(this.cG)||this.cG.X("html5_allow_multiview_tile_preload")&&l.SN)&&z.KD(!0),this.D3.S.set(r,z,k||3600),y=z)}return y}setMinimized(l){this.visibility.setMinimized(l);(l=p45(this.i$))&&(this.isMinimized()?l.load():l.unload());this.K_.publish("minimized")}setInline(l){this.visibility.setInline(l)}setInlinePreview(l){this.visibility.setInline(l)}Bd(l){YG4(this,l)||this.visibility.Bd(l)}setSqueezeback(l){this.visibility.setSqueezeback(l)}IG(){const l=this.mediaElement?.Jv();l&&(this.cG.hc&&
Nv(nE(()=>document.exitFullscreen()),()=>{}),Nv(nE(()=>HD(l)),()=>{}))}Wl(){this.mediaElement.Jv();
this.mediaElement.Jv().webkitPresentationMode==="picture-in-picture"?this.Bd(!0):this.Bd(!1)}togglePictureInPicture(){this.je().togglePictureInPicture()}CX(l,y=1,k){K4("_start",this.QM.timerName)||g.OJ(xV)(void 0,this.QM.timerName);let z=!1,r=$8(this,y,l,!1);r?(z=!0,l.dispose(),r.getVideoData().SN&&r.Md("app_lv",{pdl:r.M$()}),this.sA().Z.G7(SRC)&&(r.getVideoData().kz=l.kz,r.Md("cpvd",{pas:l.kz}))):(r=Qs(this,y,l,!0,k),(this.X("html5_onesie")||this.X("html5_load_before_stop"))&&r.PO()&&r.KD(),this.hQ.stop(),
y===1&&y!==this.getPresentingPlayerType()&&this.cancelPlayback(4),this.cancelPlayback(4,y),this.Sw(r));l.videoId&&this.mp.includes(l.videoId)&&r.Md("mvt",{});r===this.b5()&&(this.cG.oY=l.oauthToken);if(!r.PO())return!1;if(r===this.b5())return this.iN(1),l=GF(this),z&&r.getPlayerType()===1&&r.M$()&&this.HZ("dataloaded",r,r.getVideoData()),l;r.PT();return!0}cueVideoByPlayerVars(l,y=1){var k=this.b5();if(this.hs().enableServerStitchedDai&&k&&!k.sG()&&l&&Object.keys(l).length>0)k.Md("qvonss",{vid:l?.videoId||
"",ptype:y});else if(l&&Ja(l))if(this.s_=!0,ZU(this,l),(l=g.pJ(this.playlist))&&l.Ij())WN(this,l,y);else this.playlist.onReady(()=>{wy(this)});
else{y||(y=this.getPresentingPlayerType());y===1&&this.IQ();k=new g.YK(this.cG,l);const z=g.u9(this.cG)&&!this.cG.Y&&y===1&&!k.isAd()&&!k.T7;this.K_.publish("cuevideo",y);z?(this.je().getVideoData().loading=!0,V$z(k,l?l:{}).then(r=>{WN(this,r,y)}),k.dispose()):WN(this,k,y)}}E2(l,y,k,z,r,Z,e){if(!l&&!k)throw Error("Playback source is invalid");
if(XC(this.cG)||g.tL(this.cG))return y=y||{},y.lact=hW(),y.vis=this.K_.getVisibilityState(),g.G3(this.K_,"onPlayVideo",{videoId:l,watchEndpoint:Z,sessionData:y,listId:k}),!1;xq5(this.QM);this.QM.reset();l={video_id:l};z&&(l.autoplay="1");z&&(l.autonav="1");Z&&(l.player_params=Z.playerParams);e&&(l.oauth_token=e);k?(l.list=k,this.loadPlaylist(l)):this.loadVideoByPlayerVars(l,1);return!0}cuePlaylist(l,y,k,z){this.s_=!0;puz(this,l,y,k,z)}loadPlaylist(l,y,k,z){this.s_=!1;puz(this,l,y,k,z)}pU(){return this.K_.isMutedByMutedAutoplay()?
!1:this.D3.xe?!0:!(!this.playlist||!this.playlist.hasNext())}nextVideo(l,y){var k=this.b5().getVideoData().D();g.Ki(this.K_)&&k?this.E2(k.videoId,y?k.Mh:k.sessionData,k.playlistId,y,void 0,k.Qm||void 0):this.gP?g.M1(this.K_,"onPlaylistNext"):this.getPresentingPlayerType()===3?Vi(this.i$).nextVideo():!this.playlist||Wn(this.cG)&&!this.K_.isFullscreen()||(this.playlist.hasNext(l)&&KJ(this.playlist,qgT(this.playlist)),this.playlist.loaded?(l=y&&this.cG.X("html5_player_autonav_logging"),y&&this.K_.publish("playlistautonextvideo"),
this.CX(g.pJ(this.playlist,void 0,y,l),1)):this.s_=!1)}previousVideo(l){this.gP?g.M1(this.K_,"onPlaylistPrevious"):this.getPresentingPlayerType()===3?Vi(this.i$).ST():!this.playlist||Wn(this.cG)&&!this.K_.isFullscreen()||(this.playlist.hasPrevious(l)&&KJ(this.playlist,WWq(this.playlist)),this.playlist.loaded?this.CX(g.pJ(this.playlist),1):this.s_=!1)}playVideoAt(l){this.gP?g.M1(this.K_,"onPlaylistIndex",l):this.playlist&&(this.playlist.loaded?this.CX(g.pJ(this.playlist,l),1):this.s_=!1,KJ(this.playlist,
l))}getPlaylist(){return this.playlist}uJ(l){this.ZX=g.oC(this.ZX,z=>z.id!==l);
const y=this.b5(),k=y.XJ();for(let z=0;z<k.length;z++){const r=k[z];if(r.getId()===l)return y.removeCueRange(r),ec(this,"cuerangesremoved",[r]),!0}return!1}LH(l){g.X5(this.K_,"onCueRangeEnter",l.getId())}uo(l){g.X5(this.K_,"onCueRangeExit",l.getId())}hp(l,y,k){let z=this.u5({playerType:y});if(this.X("html5_ssdai_enable_media_end_cue_range")&&this.l$){if(z.getPlayerType()===2&&this.cG.sA().Z.G7(vM)?this.D3.Z?.isAd()??!1:this.l$?.T7(this.getCurrentTime()))z=this.b5();for(const r of l)r.associatedClipId=
this.l$.ML}z.hp(l,k);y&&this.getPresentingPlayerType()!==y||ec(this,"cuerangesadded",l)}ZI(l,y){this.u5({playerType:y}).ZI(l);y&&this.getPresentingPlayerType()!==y||ec(this,"cuerangesremoved",l)}OD(l){return this.je().OD(l)}au(l){if(!l||l===this.b5().dZ()||!this.cG.X("html5_use_new_ssdai_transition_detector")){l=this.je();this.getPresentingPlayerType();u0C(this.QM,l.getVideoData(),TOT(this));hl(this)&&this.cG.V&&eS(this.hs())==="embedded"&&this.D9&&Math.random()<.01&&g.wv("autoplayTriggered",{intentional:this.intentionalPlayback});
this.D9=!1;lC(this.i$);this.X("web_player_defer_ad")&&cN(this);g.M1(this.K_,"onPlaybackStartExternal");this.cG.sA().Z.G7(nng)||this.Mz(this.getVideoData().clientPlaybackNonce);l={};this.getVideoData().a4&&(l.cttAuthInfo={token:this.getVideoData().a4,videoId:this.getVideoData().videoId});l.sampleRate=20;p4("player_att",l);if(this.getVideoData().botguardData||this.X("fetch_att_independently"))g.xp(this.cG)||AA(this.cG)==="MWEB"?g.cs(g.bw(),()=>{a6(this)}):a6(this);
this.Nk();VPs(this);g.u9(this.cG)&&(l={autoplayBrowserPolicy:bY(),autoplayIntended:uY(this.getVideoData()),autoplayStatus:yiC(this.getVideoData(),1),cpn:this.getVideoData().clientPlaybackNonce,intentionalPlayback:this.intentionalPlayback},g.wv("embedsAutoplayStatusChanged",l))}}Mz(l){if(this.cG.X("mweb_client_log_screen_associated"),!uh(this.cG)){var y=this.screenLayer||(this.isMinimized()?3:0);if((y=g.MM(y))&&y!=="UNDEFINED_CSN"){var k=this.cG.X("web_player_attach_player_response_ve");const z=this.cG.X("web_playback_associated_ve");
l={cpn:l,csn:y};this.getVideoData().Y&&(k||z)&&(k=g.Gd(this.getVideoData().Y),g.HH(y,k),z&&(l.playbackVe=k.getAsJson()));this.getVideoData().queueInfo&&(l.queueInfo=this.getVideoData().queueInfo);y={};this.getVideoData().a4&&(y.cttAuthInfo={token:this.getVideoData().a4,videoId:this.getVideoData().videoId});g.wv("playbackAssociated",l,y)}else g.WH(new g.WO("CSN Missing or undefined during playback association"))}}bk(){this.K_.publish("internalAbandon");MX(this)}onApiChange(){const l=this.je();this.cG.A?
g.X5(this.K_,"onApiChange",l.getPlayerType()):g.X5(this.K_,"onApiChange")}jj(){var l=this.mediaElement;l={volume:g.gf(Math.floor(l.getVolume()*100),0,100),muted:l.u0()};l.muted||ys(this,!1);this.Gk=g.r4(l);g.X5(this.K_,"onVolumeChange",l)}mutedAutoplay(l){isNaN(this.um)&&(this.um=this.getVideoData().startSeconds);const y=this.getVideoData(),k=y.videoId,z={video_id:l?.videoId?l?.videoId:k,playmuted:!0,start:this.um,muted_autoplay_duration_mode:l?.durationMode};this.X("embeds_enable_embed_config_for_muted_autoplay")&&
(l?.embedConfig?z.embed_config=I4P(l.embedConfig):y.va&&(z.embed_config=y.va));if(l?.videoId||k)this.loadVideoByPlayerVars(z),g.M1(this.K_,"onMutedAutoplayStarts")}onFullscreenChange(){const l=PN(this);this.yG(l?1:0);gly(this,!!l)}yG(l){var y=!!l;const k=!!this.ut()!==y;this.visibility.yG(l);this.template.yG(y);this.X("html5_media_fullscreen")&&!y&&this.mediaElement&&PN(this)===this.mediaElement.Jv()&&this.mediaElement.Y();this.template.resize();k&&this.QM.tick("fsc");k&&(this.K_.publish("fullscreentoggled",
y),l=this.hs(),y={fullscreen:y,videoId:l.Tr||l.videoId,time:this.getCurrentTime()},this.K_.getPlaylistId()&&(y.listId=this.K_.getPlaylistId()),g.X5(this.K_,"onFullscreenChange",y))}vj(){return this.visibility.vj()}isFullscreen(){return this.visibility.isFullscreen()}ut(){return this.visibility.ut()}lk(){var l=this.ut();l!==0&&l!==1||this.yG(PN(this)?1:0);l=window.screen.width*window.screen.height;const y=window.outerHeight*window.outerWidth;this.cG.Cd?(this.sL=Math.max(this.sL,l,y),l=y/this.sL<this.cG.bO,
this.visibility.Bd(l),this.cG.eE&&YG4(this,l)):this.mediaElement&&y/l<.33&&this.cG.S2&&!this.getVideoData()?.backgroundable&&this.mediaElement.Y()}NT(l){this.D3.xe||this.K_.publish("liveviewshift",l)}playVideo(l,y){l=this.u5({playerType:l});this.appState===2?(g.JA(this.cG)&&PB(this.QM),GF(this)):l.getPlayerState().Z(2)?(y=36,this.getVideoData().yf()&&(y=37),this.seekTo(0,void 0,void 0,void 0,y,"_play")):l.playVideo(!1,y)}pauseVideo(l,y){this.u5({playerType:l}).pauseVideo(y)}stopVideo(l=!1){const y=
this.b5().getVideoData(),k=new g.YK(this.cG,{video_id:y.Tr||y.videoId,oauth_token:y.oauthToken});k.TV=g.r4(y.TV);l&&!this.webPlayerContextConfig.disableStaleness&&(k.Qq=!0);this.cancelPlayback(6);WN(this,k,1)}cancelPlayback(l,y){const k=this.u5({playerType:y});y===2&&k.getPlayerType()===1&&tI(this.hs())?k.Md("canclpb",{r:"no_adpb_ssdai"}):(this.cG.yM()&&k.Md("canclpb",{r:l}),this.appState!==1&&this.appState!==2&&(k===this.je()&&yQ(this.i$,l),y===1&&(k.stopVideo(),MX(this)),k.lI(void 0,!0),ec(this,
"cuerangesremoved",k.XJ()),k.gG(),this.Ye&&k.isGapless()&&(k.Uo(!0),k.setMediaElement(this.mediaElement)),this.mp=k.getVideoData().zD().map(z=>z.videoId??"").filter(z=>!!z)))}sendVideoStatsEngageEvent(l,y,k){y=this.u5({playerType:y});
Yn_(this.cG,l)?y.sendVideoStatsEngageEvent(l,k):k&&k()}bH(l){const y=this.u5({playerType:void 0});return Yn_(this.cG,l)?y.bH(l):null}updatePlaylist(){!Wn(this.cG)&&g.u9(this.cG)&&dy(this);g.M1(this.K_,"onPlaylistUpdate")}setSizeStyle(l,y){this.Ym=l;this.X("web_log_theater_mode_visibility")?this.HT(y):this.x7=y;this.K_.publish("sizestylechange",l,y);this.template.resize()}HT(l){this.visibility.HT(l)}yR(){return this.X("web_log_theater_mode_visibility")?this.visibility.yR():this.x7}isMinimized(){return this.visibility.isMinimized()}isInline(){return this.visibility.isInline()}Bw(){return this.visibility.Bw()}Co(){return this.visibility.Co()}J8(){return this.visibility.J8()}yC(){return this.Ym}getAdState(){if(this.getPresentingPlayerType()===
3)return Vi(this.i$).getAdState();if(!this.CE()){const l=nJ(this.r4());if(l)return l.getAdState()}return-1}f4(l){var y=this.template.getVideoContentRect();jU(this.w6,y)||(this.w6=y,this.je().D0(),(y=this.b5())&&y===this.je()&&y.D0(),this.ut()===1&&this.bV&&gly(this,!0));y=this.Yz().nK!==this.UH;this.UH=this.Yz().nK;this.tL&&g.om(this.tL,l)&&!y||(this.K_.publish("appresize",l),this.tL=l)}wq(){return this.K_.wq()}L4(){this.getPresentingPlayerType()===2&&this.m8.isManifestless()?FGQ(this.m8):(this.l$&&
(JH(this.l$),MX(this)),this.o7.rb=(0,g.f)(),Cg(this,"signature"))}Hl(l){l&&Cg(this,"reloadPlayerEvent",void 0,l)}le(l){this.Uo(l);O6(this)}qT(l){if(l.errorCode==="manifest.net.badstatus"){const y=this.cG.experiments.z7("html5_use_network_error_code_enums")?401:"401";l.details.rc===y&&g.G3(this.K_,"onPlayerRequestAuthFailed")}}eH(l){this.K_.publish("heartbeatparams",l)}Dn(l){g.G3(this.K_,"onAutonavChangeRequest",l!==1)}fl(){return this.mediaElement}setBlackout(l){if(this.cG.gb!==l){this.cG.gb=l;var y=
this.je();y.Kd();this.cG.HG&&Jx5(this);y.zc(l)}}OO(){const l=this.je(),y=!this.K_.Vk();l.tQ(y)}JH(){g.M1(this.K_,"onLoadedMetadata")}Zj(){g.M1(this.K_,"onDrmOutputRestricted")}RC(){this.intentionalPlayback=!0}Vj(){this.i$.dispose();this.IB.dispose();this.m8.dispose();this.l$&&this.l$.dispose();this.b5().dispose();this.Uo();this.D3.dispose();g.kj(this.playlist);super.Vj()}X(l){return this.cG.X(l)}sA(){return this.cG.sA()}mZ(){return this.cG.mZ()}setScreenLayer(l){this.screenLayer=l}getInternalApi(){return this.K_.getInternalApi()}createSubtitlesModuleIfNeeded(){return this.i$.createSubtitlesModuleIfNeeded()}isOrchestrationLeader(){const l=
LJ(this.i$);return l?l.isOrchestrationLeader():!1}getVideoUrl(l,y,k,z,r){if(this.HF&&this.HF.postId)return l=this.cG.getVideoUrl(l),l=bI(l,"v"),l.replace("/watch",`/clip/${this.HF.postId}`);const Z=this.K_.isEmbedsShortsMode()||this.cG.b0==="shortspage",e=g.du(this.getVideoData());return this.cG.getVideoUrl(l,y,k,z,r,Z,e)}l4(){return this.Ye.l4()}wP(l){return l?this.Ye.wP()&&this.Ye.Z?.Qi()===l:this.Ye.wP()}C$(l,y,k){this.K_.publish("spsumpreject",l,y,k)}oD(){try{for(const l of Object.values(this.D3.N))l.IR()||
l.oD();if(this.X("html5_sabr_fetch_on_idle_network_preloaded_players"))for(const l of o05(this.D3.S))l.IR()||l.oD();this.b5().oD()}catch(l){g.WH(l)}}PJ(){if(this.l$){const l=(0,g.f)();return this.l$.PJ(l)}return!1}Hx(l){let y=this.b5();l&&(y=fnz(this,l));if(y){var k=y.getVideoData();l=new Map;for(const [z,r]of k.sabrContextUpdates){k=z;const Z=r;Z.scope===4&&y?.VB(k)&&l.set(k,Z)}return l}this.b5().Md("scuget",{ncpf:"1",ccpn:l})}A9(l,y){this.Cs.push({key:l,value:y})}};g.zY.prototype.FQ=yz(41);
g.zY.prototype.KU=yz(16);g.zY.prototype.jP=yz(10);g.zY.prototype.SD=yz(8);var kN={};var Tfe={TO:[{Pj:/Unable to load player module/,weight:20},{Pj:/Failed to fetch/,weight:500},{Pj:/XHR API fetch failed/,weight:10},{Pj:/JSON parsing failed after XHR fetch/,weight:10},{Pj:/Retrying OnePlatform request/,weight:10},{Pj:/CSN Missing or undefined during playback association/,weight:100},{Pj:/Non-recoverable error. Do not retry./,weight:0},{Pj:/Internal Error. Retry with an exponential backoff./,weight:0},{Pj:/API disabled by application./,weight:0},{Pj:/Unexpected end of JSON input/,
weight:0}],Rd:[{callback:jQ5,weight:500}]};var yRg=/[&\?]action_proxy=1/,lJ4=/[&\?]token=([\w-]*)/,kRP=/[&\?]video_id=([\w-]*)/,zY5=/[&\?]index=([\d-]*)/,rR5=/[&\?]m_pos_ms=([\d-]*)/,tWT=/[&\?]vvt=([\w-]*)/,NO4="ca_type dt el flash u_tz u_his u_h u_w u_ah u_aw u_cd u_nplug u_nmime frm u_java bc bih biw brdim vis wgl".split(" "),$4t="www.youtube-nocookie.com youtube-nocookie.com www.youtube-nocookie.com:443 youtube.googleapis.com www.youtubeedu.com www.youtubeeducation.com video.google.com redirector.gvt1.com".split(" "),sQ_={android:"ANDROID",
"android.k":"ANDROID_KIDS","android.m":"ANDROID_MUSIC","android.up":"ANDROID_UNPLUGGED",youtube:"WEB","youtube.m":"WEB_REMIX","youtube.up":"WEB_UNPLUGGED",ytios:"IOS","ytios.k":"IOS_KIDS","ytios.m":"IOS_MUSIC","ytios.up":"IOS_UNPLUGGED"},L$4={desktop:"DESKTOP",phone:"MOBILE",tablet:"TABLET"},Qv5={FLAG_AUTO_CAPTIONS_DEFAULT_ON:66,FLAG_AUTOPLAY_DISABLED:140,FLAG_AUTOPLAY_EXPLICITLY_SET:141},VD1=class{constructor(l){this.player=l;this.C=this.Z=1}HE(l){this.player.SV().tick(l)}fetch(l,y){if(!l.match(/\[BISCOTTI_ID\]/g))return Jl(this,
l,y);const k=this.Z===1;k&&this.HE("a_bid_s");var z=nlg();if(z!==null)return k&&this.HE("a_bid_f"),Jl(this,l,y,z);z=F$Q();k&&g.vd(z,()=>{this.HE("a_bid_f")});
return z.then(r=>Jl(this,l,y,r))}reset(){this.C=this.Z=1}};var PiB={KK_:"replaceUrlMacros",XW:"onAboutThisAdPopupClosed",Tj:"executeCommand"};var BOq=class{constructor(l){this.Se=l}Sr(){return"adPingingEndpoint"}xM(l,y,k){Vx5(this.Se.get(),l,y,k)}};var H7z=class{constructor(l){this.L=l}Sr(){return"changeEngagementPanelVisibilityAction"}xM(l){g.G3(this.L,"changeEngagementPanelVisibility",{changeEngagementPanelVisibilityAction:l})}};var RRq=class{constructor(l){this.Se=l}Sr(){return"loggingUrls"}xM(l,y,k){for(const z of l)Vx5(this.Se.get(),z.baseUrl,y,k,z.attributionSrcMode)}};var JYx=class extends g.zP{constructor(l){super();this.Z=l;this.C=rH5(this)}};var Z_C=class{constructor(l,y){this.gz=l;this.p_=y}vF(l,y){y={...y,cc:this.gz.ra()};this.gz.L.Md(l,y)}};var r1=class extends g.zP{constructor(l,y,k,z,r){super();this.C=y;this.vG=k;this.wb=z;this.Ba=r;this.listeners=[];const Z=new IT(this);g.x(this,Z);Z.j(l,"internalAbandon",this.N);this.addOnDisposeCallback(()=>{Z.C()})}addListener(l){this.listeners.push(l)}removeListener(l){this.listeners=this.listeners.filter(y=>y!==l)}Ft(l,y,k,z,r,Z,e,A){if(l==="")EP("Received empty content video CPN in DefaultContentPlaybackLifecycleApi");
else if(l!==this.Z||k){this.Z=l;this.vG.get().Ft(l,y,k,z,r,Z,e,A);this.wb.get().Ft(l,y,k,z,r,Z,e,A);this.Ba?.get().Ft(l,y,k,z,r,Z,e,A);this.C.Ft(l,y,k,z,r,Z,e,A);for(const Q of this.listeners)Q.Ft(l,y,k,z,r,Z,e,A)}else EP("Duplicate content video loaded signal")}N(){this.Z&&this.pA(this.Z)}pA(l){this.Z=void 0;for(const y of this.listeners)y.pA(l)}};var ZF=class{constructor(l){this.L=l;this.adVideoId=this.Z=this.videoId=this.adCpn=this.contentCpn=null;this.J=!0;this.C=this.N=!1;this.adFormat=null;this.V="AD_PLACEMENT_KIND_UNKNOWN";this.actionType="unknown_type";this.videoStreamType="VIDEO_STREAM_TYPE_VOD"}YW(l,y,k,z,r){txz(this);this.J=!y&&k===0;const Z=this.L.getVideoData({playerType:1}),e=this.L.getVideoData({playerType:2});Z&&(this.contentCpn=Z.clientPlaybackNonce,this.videoId=Z.videoId,this.Z=Z.a4);e&&(this.adCpn=e.clientPlaybackNonce,this.adVideoId=
e.videoId,this.adFormat=e.adFormat);this.V=l;z<=0?(txz(this),this.J=!y&&k===0):(this.actionType=this.J?y?"unknown_type":"video_to_ad":y?"ad_to_video":"ad_to_ad",this.videoStreamType=r?"VIDEO_STREAM_TYPE_LIVE":"VIDEO_STREAM_TYPE_VOD",this.actionType!=="unknown_type"&&(this.N=!0,K4("_start",this.actionType)&&AHP(this)))}reset(){return new ZF(this.L)}};var eN=class extends g.zP{constructor(l){super();this.L=l;this.Z=new Map;this.C=new IT(this);g.x(this,this.C);this.C.j(this.L,g.uR("ad"),this.onCueRangeEnter,this);this.C.j(this.L,g.xR("ad"),this.onCueRangeExit,this)}addCueRange(l,y,k,z,r,Z=3,e=1,A,Q){this.Z.has(l)?EP("Tried to register duplicate cue range",void 0,void 0,{CueRangeID:l}):(l=new Yme(l,y,k,z,Z,A,Q),this.Z.set(l.id,{cV:l,listener:r,iS:e}),this.L.Wa([l],e))}removeCueRange(l){const y=this.Z.get(l);y?(this.L.t6([y.cV],y.iS),this.Z.delete(y.cV.id)):
EP("Requested to remove unknown cue range",void 0,void 0,{CueRangeID:l})}onCueRangeEnter(l){if(this.Z.has(l.id))this.Z.get(l.id).listener.onCueRangeEnter(l.id)}onCueRangeExit(l){if(this.Z.has(l.id))this.Z.get(l.id).listener.onCueRangeExit(l.id)}},Yme=class extends g.N1{constructor(l,y,k,z,r,Z,e){super(y,k,{id:l,namespace:"ad",priority:r,visible:z,associatedClipId:Z,markerPositionMs:e})}};var Ar=class{constructor(l){this.L=l}addPlayerResponseForAssociation(l){this.L.addPlayerResponseForAssociation(l)}};var $N=class{constructor(l){this.L=l}Uq(l){this.L.Uq(l)}};var Q$=class{constructor(l){this.L=l}};var E6=null,U_Q=class extends g.z1{constructor(){super();this.Z={};this.addOnDisposeCallback(()=>{for(const l of Object.keys(this.Z))delete this.Z[l]})}Px(l){return this.Z.hasOwnProperty(l)?this.Z[l].Px():{}}};
g.iQ("ytads.bulleit.getVideoMetadata",function(l){return fg().Px(l)});
g.iQ("ytads.bulleit.triggerExternalActivityEvent",function(l,y,k){var z=fg();k=i_5(k);k!==null&&z.publish(k,{queryId:l,viewabilityString:y})});var tr=class{constructor(l,y,k){this.vG=l;this.L=y;this.p_=k;this.C=new Set;this.Z=new Map;fg().subscribe("adactiveviewmeasurable",this.gp,this);fg().subscribe("adfullyviewableaudiblehalfdurationimpression",this.E_,this);fg().subscribe("adviewableimpression",this.K9,this);fg().subscribe("adaudioaudible",this.n9,this);fg().subscribe("adaudiomeasurable",this.XZ,this)}Wh(l,y){if(!this.Z.has(l))return{};if(y==="seek")return(l=qb(tT).D(l,{}))&&Jq(l),{};y=cHz(y);if(y===null)return{};var k=this.L.Ap();if(!k)return{};
const z=this.L.getPresentingPlayerType(!0);if(!this.L.getVideoData({playerType:z})?.isAd())return{};k={opt_adElement:k,opt_fullscreen:this.vG.get().isFullscreen()};return OQ(y,l,k)}K(l,y,k,z,r){this.Z.has(l)&&(z<=0||r<=0||qb(tT).K(l,y,k,z,r))}gp({queryId:l}){this.Z.get(l)?.gp()}E_({queryId:l}){this.Z.get(l)?.E_()}K9({queryId:l}){this.Z.get(l)?.K9()}n9({queryId:l}){this.Z.get(l)?.n9()}XZ({queryId:l}){this.Z.get(l)?.XZ()}};var pZy=class{send(l,y,k,z=!1){try{I74(this,l,y,k,z)}catch(r){}}};var K4p=class extends pZy{constructor(l,y,k,z,r){super();this.V=l;this.J=y;this.Z=k;this.C=z;this.N=r}};var gvy=class{constructor(l,y){this.Z=l;this.p_=y}send(l,y,k,z){let r=!1;try{if(z==="ATTRIBUTION_SRC_MODE_LABEL_CHROME"||z==="ATTRIBUTION_SRC_MODE_XHR_OPTION")r=!0,l=rEP(l);z=r;var Z=g.ee(l);if(Z[1]==="https")var e=l;else Z[1]="https",e=Z3("https",Z[2],Z[3],Z[4],Z[5],Z[6],Z[7]);const A=XGs(e);Z=[];const Q=mK(e)&&this.p_.get().L.O().experiments.z7("add_auth_headers_to_remarketing_google_dot_com_ping");if(xu(e)||Q)Z.push({headerType:"USER_AUTH"}),Z.push({headerType:"PLUS_PAGE_ID"}),Z.push({headerType:"VISITOR_ID"}),
Z.push({headerType:"EOM_VISITOR_ID"}),Z.push({headerType:"AUTH_USER"}),Z.push({headerType:"DATASYNC_ID"});this.Z.send({baseUrl:e,scrubReferrer:A,headers:Z},y,k,z)}catch(A){}}};var Oz=class{constructor(l,y,k,z,r,Z,e=new K4p(()=>{const A=l.O(),Q=l.getVideoData({playerType:1});return g.jz(A,Q?Q.S():"")},()=>l.O().pageId,()=>l.O().sj,()=>l.O().datasyncId??"",()=>l.O().experiments)){this.L=l;
this.C=y;this.EA=k;this.wb=z;this.Av=r;this.p_=Z;this.V=e;this.mQ=null;this.Z=new Map;this.N=new gvy(e,this.p_)}bH(){return this.L.bH(1)}};var d1=class extends g.zP{constructor(l,y,k){super();this.L=l;this.B7=y;this.p_=k;this.listeners=[];this.sJ=null;this.Oz=new Map;y=new g.cI(this);g.x(this,y);y.j(l,"videodatachange",this.bC);W_(l.O().sA())?y.j(l,"playbackChange",this.dk):y.j(l,"serverstitchedvideochange",this.Dj);this.gJ=O1(this)}getAccumulatedWatchTime(){return this.L.getInternalApi().getAccumulatedWatchTime()}ra(){return this.L.getVideoData({playerType:1}).clientPlaybackNonce}addListener(l){this.listeners.push(l)}removeListener(l){this.listeners=
this.listeners.filter(y=>y!==l)}Ft(){this.Oz.clear();
this.sJ=null;this.B7.get().clear()}pA(){}bC(l,y,k){y.videoId==="nPpU29QrbiU"&&this.L.Md("ads_ssm_vdc_s",{pt:k,dvt:l});ad(this.p_.get())&&l!=="dataloaded"||Lg(this,y,k)}dk(l){if(this.L.getVideoData({playerType:1}).enableServerStitchedDai)for(const y of l.started){l=this.L.getStartTime({cpn:y.cpn});const k=this.L.getVideoData({cpn:y.cpn}),z=this.L.getPlayerType(y.cpn);let r=null;z===2&&(this.sJ=y.cpn,l===void 0?EP("Expected ad video start time on SS video changed"):this.Oz.set(y.cpn,l),r=KE(this.B7.get(),
y.cpn));this.L.getVideoData({playerType:1}).Md("ads_ssvc",{pt:z,cpn:k?.clientPlaybackNonce,crtt:this.L.getCurrentTime({playerType:z,D5:!1}),atlh:this.L.isAtLiveHead(),adstt:l,pid:y.cpn,slid:r?.layoutId});k&&z?Lg(this,k,z):EP("Expected video data on server stitched video changed",void 0,void 0,{cpn:this.L.getVideoData({playerType:1}).clientPlaybackNonce,timelinePlaybackId:y.cpn})}}Dj(l,y){l!==void 0&&(this.sJ=l,y===void 0||isNaN(y)?EP("Expected ad video start time on SS video changed"):this.Oz.set(l,
y));const k=this.L.getPresentingPlayerType(!0),z=this.L.getVideoData({playerType:k}),r=l===void 0?null:KE(this.B7.get(),l);this.L.getVideoData({playerType:1}).Md("ads_ssvc",{pt:k,cpn:z?.clientPlaybackNonce,crtt:this.L.getCurrentTime({playerType:1,D5:!1}),atlh:this.L.isAtLiveHead(),adstt:y,pid:l,slid:r?.layoutId});z?Lg(this,z,k):EP("Expected video data on server stitched video changed",void 0,void 0,{cpn:this.L.getVideoData({playerType:1}).clientPlaybackNonce,timelinePlaybackId:l})}hd(l,y){const k=
l.author,z=l.clientPlaybackNonce,r=l.isListed;var Z=l.Rj;const e=l.title,A=l.N7,Q=l.j5,t=l.isMdxPlayback,O=l.XT,d=l.mdxEnvironment,w=l.isAutonav,h=l.X6,U=l.lE,u=l.vO,W=l.videoId||"",V=l.profilePicture||"",T=l.Fu||"",J=l.yf()||!1,K=l.j2()||!1;l=l.xJ||void 0;Z=KE(this.B7.get(),Z)||{layoutId:null,slotId:null};var Zg=this.L.getVideoData({playerType:1});const es=Zg.UA();Zg=Zg.getPlayerResponse();y=1E3*this.L.getDuration({playerType:y});const fC=1E3*this.L.getDuration({playerType:1});return{...Z,videoId:W,
author:k,clientPlaybackNonce:z,eR:y,XK:fC,daiEnabled:Zg?.playerConfig?.daiConfig?.enableDai||!1,zt:Zg?.playerConfig?.daiConfig?.enablePreroll||!1,isListed:r,UA:es,profilePicture:V,title:e,Fu:T,N7:A,j5:Q,xJ:l,isMdxPlayback:t,XT:O,mdxEnvironment:d,isAutonav:w,X6:h,lE:U,vO:u,yf:J,j2:K}}Vj(){this.listeners.length=0;this.gJ=null;super.Vj()}};var w1=class extends g.zP{constructor(l,y){super();this.L=l;this.wb=y;this.listeners=[];this.jc=[];this.Wu=()=>{EP("Called 'doUnlockPreroll' before it's initialized.")};
y=new IT(this);const k=new g.cI(this);g.x(this,k);g.x(this,y);y.j(l,"progresssync",this.C);y.j(l,"presentingplayerstatechange",this.Z);y.j(l,"fullscreentoggled",this.onFullscreenToggled);y.j(l,"onVolumeChange",this.onVolumeChange);y.j(l,"minimized",this.QR);y.j(l,"overlayvisibilitychange",this.Ev);y.j(l,"shortsadswipe",this.K2);y.j(l,"resize",this.TE);k.j(l,g.uR("appad"),this.Xk)}Ft(){this.Wu=JV(()=>{this.L.IR()||this.L.ud("ad",1)})}pA(){}addListener(l){this.listeners.push(l)}removeListener(l){this.listeners=
this.listeners.filter(y=>y!==l)}Kv(){}playVideo(){this.L.playVideo()}pauseVideo(){this.L.pauseVideo()}resumeVideo(l){this.V4(l)&&this.L.playVideo()}V4(l){return this.L.getPlayerState(l)===2}getCurrentTimeSec(l,y){const k=this.wb.get().sJ;
return l!==2||y||k===null?this.L.getCurrentTime({playerType:l,D5:y}):DU(this,k)}getVolume(){return this.L.getVolume()}isMuted(){return this.L.isMuted()}getPresentingPlayerType(){return this.L.getPresentingPlayerType(!0)}getPlayerState(l){return this.L.getPlayerState(l)}getGetAdBreakContext(){return this.L.getGetAdBreakContext()}isFullscreen(){return this.L.isFullscreen()}isAtLiveHead(){return this.L.isAtLiveHead()}lN(l){this.L.lN(l)}C(){const l=this.L.getPresentingPlayerType(!0),y=this.getCurrentTimeSec(l,
!1);if(l===2)for(const k of this.listeners)k.lW(y);else if(l===1)for(const k of this.jc)k.Kv(y)}Z(l){for(const y of this.listeners)y.CS(l,this.getPresentingPlayerType())}onFullscreenToggled(l){for(const y of this.listeners)y.onFullscreenToggled(l)}onVolumeChange(){for(const l of this.listeners)l.onVolumeChange()}QR(){const l=this.L.isMinimized();for(const y of this.listeners)y.QR(l)}Ev(l){for(const y of this.listeners)y.Ev(l)}TE(){const l=this.L.Yz().uI();for(const y of this.listeners)y.n2(l)}Xk(l){for(const y of this.listeners)y.Xk(l)}K2(){for(const l of this.listeners)l.K2()}};var D_T=class extends g.zP{constructor(l,y,k,z){super();const r=v(()=>new LD(this.p_));
g.x(this,r);const Z=v(()=>new vI(r));
g.x(this,Z);const e=v(()=>new KD);
g.x(this,e);const A=v(()=>new JG(l));
g.x(this,A);const Q=v(()=>new BI(r,Z,this.p_));
g.x(this,Q);const t=v(()=>new HI);
g.x(this,t);this.LP=v(()=>new tG(z));
g.x(this,this.LP);this.Ll=v(()=>new ZF(y));
g.x(this,this.Ll);this.VE=v(()=>new eN(y));
g.x(this,this.VE);this.mw=v(()=>new Ar(y));
g.x(this,this.mw);this.GM=v(()=>new $N(y));
g.x(this,this.GM);this.p_=v(()=>new Q$(y));
g.x(this,this.p_);const O=v(()=>new QZ(this.p_));
g.x(this,O);const d=v(()=>new WI(r,Q,Z,this.p_,O,null,null,null,null));
g.x(this,d);this.wb=v(()=>new d1(y,t,this.p_));
g.x(this,this.wb);const {Av:w,context:h}=Y8({wb:this.wb,p_:this.p_,TA:O});this.Av=w;this.vG=v(()=>new w1(y,this.wb));
g.x(this,this.vG);this.EA=v(()=>new tr(this.vG,y,this.p_));
g.x(this,this.EA);this.Se=v(()=>new Oz(y,e,this.EA,this.wb,this.Av,this.p_));
g.x(this,this.Se);this.Nx=new PI(A,d,k,l,this.wb,this.vG,this.Ll);g.x(this,this.Nx);const U=new r1(y,this.Nx,this.vG,this.wb);this.R9=v(()=>U);
this.mu=U;this.XS=new pD(A,Q,this.VE,this.R9,h);g.x(this,this.XS);this.VK=new me(this.p_,A,d,this.wb,this.XS,k,this.mw);g.x(this,this.VK);this.Ud={l_:new Map,Ik:new Map,nA:new Map,wN:new Map,h$:new Map};this.listeners=[];this.rV={VK:this.VK,E7:this.p_.get(),l0:this.LP.get(),Gl:this.vG.get(),Nx:this.Nx,TQ:r.get(),ub:null,pK:{Dc(){}},LJ:e.get(),gz:this.wb.get()}}};var Eve=class extends g.zP{constructor(l){super();this.oa=l;this.oa.get().addListener(this)}Vj(){this.oa.IR()||this.oa.get().removeListener(this);super.Vj()}};var hr=class{constructor(l){this.Z=l}fetch(l){const {Cq:y,fO:k,xZ:z,cueProcessedMs:r=0}=l;return this.Z.fetch(y,{xZ:z,cV:k,cueProcessedMs:r}).then(Z=>f7Q(Z,k))}};var GY=class extends g.zP{constructor(l){super();this.L=l;this.listeners=[];this.Z=new IT(this);g.x(this,this.Z);this.Z.j(this.L,"aduxclicked",this.onAdUxClicked);this.Z.j(this.L,"aduxmouseover",this.SM);this.Z.j(this.L,"aduxmouseout",this.I3);this.Z.j(this.L,"muteadaccepted",this.C)}addListener(l){this.listeners.push(l)}removeListener(l){this.listeners=this.listeners.filter(y=>y!==l)}nM(l){SMP(this,l,1)}onAdUxClicked(l,y){l3(this,k=>{k.Z5(l,y)})}SM(l){l3(this,y=>{y.tG(l)})}I3(l){l3(this,y=>{y.Te(l)})}C(l){l3(this,
y=>{y.n5(l)})}};var flL=class{constructor(l,y=!1){this.C=l;this.N=y;this.Z={}}reduce(l){switch(l.event){case "unknown":return}var y=l.identifier;var k=this.Z[y];k?y=k:(k={dh:null,jy:-Infinity},y=this.Z[y]=k);k=l.startSecs+l.Z/1E3;if(!(k<y.jy))if(y.jy=k,y.dh){if(k<y.dh.end){a:{k=y.dh;switch(l.event){case "start":case "continue":case "stop":break;default:l=null;break a}l=k.start+l.yK;l=k.end<=l?null:l}if(l!==null){y.dh.end=l;y=this.C;g.KR(y.N.Z,l*1E3);for(var z of y.listeners)z.m7(l)}}}else if(z=nPs(l,this.N))l=z.L8,
y.dh=z.wB,FUz(this.C,l)}updateTime(){}};var jmw=class{constructor(){this.Z=[]}};var a2=class extends g.zP{constructor(l,y,k){super();this.L=l;this.p_=y;this.Se=k;this.listeners=[];this.V=!1;this.Kn=[];this.Z=null;this.J=new flL(this,GGQ(y.get()));this.N=new jmw;this.C=null}Ft(){this.J=new flL(this,GGQ(this.p_.get()));this.N=new jmw;const l=this.L.getVideoData({playerType:1});if(!l.enableServerStitchedDai){var y=this.L.getVideoData({playerType:1});this.C?.clientPlaybackNonce!==y.clientPlaybackNonce&&(this.C!=null&&this.C.unsubscribe("cuepointupdated",this.S,this),y.subscribe("cuepointupdated",
this.S,this),this.C=y)}this.Kn.length=0;y=l.Z?.Xr(0)||[];for(const k of y)this.rN(k)&&(Ux(this.p_.get())&&Fs(this.Se.get(),"ocvl",`cpi.${k.identifier};cpe.${k.event};cps.${k.startSecs}`),EP("Unexpected a GetAdBreak to go out without player waiting",void 0,void 0,{cuePointId:k.identifier,cuePointEvent:k.event,contentCpn:l.clientPlaybackNonce}))}pA(){}addListener(l){this.listeners.push(l)}removeListener(l){this.listeners=this.listeners.filter(y=>y!==l)}rN(l){NNT(this,l);
if(this.p_.get().L.O().X("html5_lifa_move_gab_on_continue_or_stop_restriction")&&this.L.getVideoData({playerType:1})?.j2()&&(l.event==="continue"||l.event==="stop")||a7C(this.p_.get())&&this.L.getCurrentTime({playerType:1})===0&&this.L.getVideoData({playerType:1}).j2())return!1;this.J.reduce(l);l=this.V;this.V=!1;return l}S(l){const y=this.L.getVideoData({playerType:1}).isDaiEnabled();if(y||!g.tL(this.L.O()))for(const k of l)NNT(this,k),Ux(this.p_.get())&&this.L.getCurrentTime({playerType:1})===0&&
k.event==="start"&&Fs(this.Se.get(),"ocuz",`cpi.${k.identifier};cpe.${k.event};cps.${k.startSecs};cpd.${k.yK}`),y?a7C(this.p_.get())&&this.L.getCurrentTime({playerType:1})===0&&this.L.getVideoData({playerType:1}).j2()||this.J.reduce(k):this.L.getCurrentTime({playerType:1})!==0&&k.event==="start"&&(this.p_.get().L.O().experiments.z7("ignore_overlapping_cue_points_on_endemic_live_html5")&&(this.Z==null||this.p_.get().L.O().experiments.z7("enable_only_drop_overlapping_cuepoints_with_same_identifier")&&
this.Z.identifier!==k.identifier?0:k.startSecs+k.yK>=this.Z.startSecs&&k.startSecs<=this.Z.startSecs+this.Z.yK)?(Ux(this.p_.get())&&k.identifier!==this.Z?.identifier&&Fs(this.Se.get(),"ocud",`ccpi.${k.identifier};ccpe.${k.event};ccps.${k.startSecs};
               ccpd.${k.yK};pcpi.${this.Z?.identifier};pcpe.${this.Z?.event};
               pcps.${this.Z?.startSecs};pcpd.${this.Z?.yK};`),k.identifier!==this.Z?.identifier&&EP("Latest Endemic Live Web cue point overlaps with previous cue point")):(this.Z=k,FUz(this,k)))}Vj(){this.C!=null&&(this.C.unsubscribe("cuepointupdated",this.S,this),this.C=null);this.listeners.length=0;this.Kn.length=0;super.Vj()}};var iE=class{constructor(l){this.L=l}};var Uz=class{constructor(l){this.L=l}Lj(l,y,k,z,r,Z,e,A){return this.L.Lj(l,y,k,z,r,Z,e,A!==void 0?{Yq:A}:void 0)}VJ(l,y){this.L.VJ(l,y)}By(l,y,k){this.L.By(l,y,k)}pX(l){this.L.pX({Yq:l})}Cm(l,y,k,z,r,Z,e,A){this.L.Cm(l,y,k,z,r,Z,e,A!==void 0?{Yq:A}:void 0)}Pz(l){return this.L.Pz(l)}finishSegmentByCpn(l,y,k){k=s$4(k);this.L.finishSegmentByCpn(l,y,k)}};var Mz=class extends g.zP{constructor(){super(...arguments);this.R_=new Map}};var Sm1=class{constructor(l){this.L=l}};var LUq=class extends g.zP{constructor(l,y,k,z,r){super();const Z=v(()=>new LD(this.p_));
g.x(this,Z);const e=v(()=>new vI(Z));
g.x(this,e);const A=v(()=>new KD);
g.x(this,A);const Q=v(()=>new JG(l));
g.x(this,Q);const t=v(()=>new BI(Z,e,this.p_));
g.x(this,t);const O=v(()=>new HI);
g.x(this,O);this.M_=v(()=>new GY(y));
g.x(this,this.M_);this.LP=v(()=>new tG(r));
g.x(this,this.LP);this.Ll=v(()=>new ZF(y));
g.x(this,this.Ll);this.VE=v(()=>new eN(y));
g.x(this,this.VE);this.mw=v(()=>new Ar(y));
g.x(this,this.mw);this.GM=v(()=>new $N(y));
g.x(this,this.GM);this.p_=v(()=>new Q$(y));
g.x(this,this.p_);const d=v(()=>new hr(z));
g.x(this,d);const w=v(()=>new QZ(this.p_));
g.x(this,w);this.Sb=v(()=>new iE(y));
g.x(this,this.Sb);this.oa=v(()=>new ch5);
g.x(this,this.oa);this.wb=v(()=>new d1(y,O,this.p_));
g.x(this,this.wb);const {Av:h,context:U}=Y8({wb:this.wb,p_:this.p_,TA:w});this.Av=h;this.Ba=v(()=>new a2(y,this.p_,this.Se));
g.x(this,this.Ba);this.yE=v(()=>new Uz(y));
g.x(this,this.yE);this.vG=v(()=>new w1(y,this.wb));
g.x(this,this.vG);this.Qu=v(()=>new Mz);
g.x(this,this.Qu);const u=v(()=>new WI(Z,t,e,this.p_,w,"SLOT_TYPE_ABOVE_FEED",this.vG,this.Ph,this.Bs));
g.x(this,u);this.wy=v(()=>new Oe(this.p_));
this.EA=v(()=>new tr(this.vG,y,this.p_));
g.x(this,this.EA);this.Se=v(()=>new Oz(y,A,this.EA,this.wb,this.Av,this.p_));
g.x(this,this.Se);this.Ab=new Tv(XX,(V,T,J,K)=>Ys(e.get(),V,T,J,K),Q,t,e,w,this.p_,this.wb);
g.x(this,this.Ab);this.Nx=new PI(Q,u,k,l,this.wb,this.vG,this.Ll);g.x(this,this.Nx);const W=new r1(y,this.Nx,this.vG,this.wb,this.Ba);this.R9=v(()=>W);
this.mu=W;this.Ph=new IB(Q,t,this.R9,this.Ba,this.vG,this.p_,this.Se,this.yE);g.x(this,this.Ph);this.XS=new pD(Q,t,this.VE,this.R9,U);g.x(this,this.XS);this.VK=new me(this.p_,Q,u,this.wb,this.XS,k,this.mw);g.x(this,this.VK);this.V5=v(()=>new dj(d,e,w,this.p_,this.Se,this.vG,this.yE));
g.x(this,this.V5);this.o4=v(()=>new wj);
g.x(this,this.o4);this.tC=new fD(l,this.M_,this.p_);g.x(this,this.tC);this.GE=new jF(l);g.x(this,this.GE);this.Iw=new Lzt(l);g.x(this,this.Iw);this.uH=new SF(l,this.R9,U);g.x(this,this.uH);this.Fm=new nD(l,this.VE,this.vG,this.wb);g.x(this,this.Fm);this.p9=new vxQ(l,this.wb);g.x(this,this.p9);this.Bs=new Nr(l,this.Ba,this.vG,this.Se,this.R9,this.Ph);g.x(this,this.Bs);this.bE=new Fo(l);g.x(this,this.bE);this.Ps=new se;g.x(this,this.Ps);this.Bi=new oB(l);g.x(this,this.Bi);this.v6=new BAs(l);g.x(this,
this.v6);this.Ps=new se;g.x(this,this.Ps);this.hf=v(()=>new gj);
g.x(this,this.hf);this.wK=v(()=>new Ee(this.vG));
g.x(this,this.wK);this.zs=v(()=>new DT4(this.M_,this.Se,l,A,this.EA));
g.x(this,this.zs);this.NJ=v(()=>new ib(this.VK,Q,Z));
g.x(this,this.NJ);this.RH=v(()=>new Ue(this.p_,this.Se,this.bE,this.EA));
g.x(this,this.RH);this.y5=v(()=>new qdC(l,this.Ps,this.bE,this.wb,this.yE,this.vG,this.Qu,this.Se,O,this.Ba,this.EA,this.wy,this.mw,this.VE,this.Ll,this.GM,this.LP,this.Sb,this.p_,A,U));
g.x(this,this.y5);this.vA=v(()=>new Ads(this.vG,this.Se,this.LP,this.p_,this.EA,this.wb));
g.x(this,this.vA);this.GX=v(()=>new p8T(this.M_,this.vG,this.Se,A,this.EA,this.Iw,this.v6,this.LP,this.p_,k));
g.x(this,this.GX);this.T3=v(()=>new lRC(this.M_,this.Se,A));
g.x(this,this.T3);this.WM=new Eve(this.oa);g.x(this,this.WM);this.Ud={l_:new Map([["OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",this.VK],["OPPORTUNITY_TYPE_LIVE_STREAM_BREAK_SIGNAL",this.Ph],["OPPORTUNITY_TYPE_PLAYER_BYTES_MEDIA_LAYOUT_ENTERED",this.Ab],["OPPORTUNITY_TYPE_PLAYER_RESPONSE_RECEIVED",this.Nx],["OPPORTUNITY_TYPE_THROTTLED_AD_BREAK_REQUEST_SLOT_REENTRY",this.XS]]),Ik:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.V5],["SLOT_TYPE_ABOVE_FEED",this.o4],["SLOT_TYPE_FORECASTING",this.o4],
["SLOT_TYPE_IN_PLAYER",this.o4],["SLOT_TYPE_PLAYER_BYTES",this.o4],["SLOT_TYPE_PLAYER_UNDERLAY",this.o4],["SLOT_TYPE_PLAYBACK_TRACKING",this.o4],["SLOT_TYPE_PLAYER_BYTES_SEQUENCE_ITEM",this.o4]]),nA:new Map([["TRIGGER_TYPE_SKIP_REQUESTED",this.tC],["TRIGGER_TYPE_SURVEY_SUBMITTED",this.tC],["TRIGGER_TYPE_LAYOUT_ID_ENTERED",this.GE],["TRIGGER_TYPE_LAYOUT_ID_EXITED",this.GE],["TRIGGER_TYPE_LAYOUT_EXITED_FOR_REASON",this.GE],["TRIGGER_TYPE_ON_DIFFERENT_LAYOUT_ID_ENTERED",this.GE],["TRIGGER_TYPE_SLOT_ID_ENTERED",
this.GE],["TRIGGER_TYPE_SLOT_ID_EXITED",this.GE],["TRIGGER_TYPE_SLOT_ID_FULFILLED_EMPTY",this.GE],["TRIGGER_TYPE_SLOT_ID_FULFILLED_NON_EMPTY",this.GE],["TRIGGER_TYPE_SLOT_ID_SCHEDULED",this.GE],["TRIGGER_TYPE_SLOT_ID_UNSCHEDULED",this.GE],["TRIGGER_TYPE_ON_DIFFERENT_SLOT_ID_ENTER_REQUESTED",this.GE],["TRIGGER_TYPE_CLOSE_REQUESTED",this.Iw],["TRIGGER_TYPE_BEFORE_CONTENT_VIDEO_ID_STARTED",this.uH],["TRIGGER_TYPE_PROGRESS_PAST_MEDIA_TIME_WITH_OFFSET_RELATIVE_TO_LAYOUT_ENTER",this.Fm],["TRIGGER_TYPE_SEEK_FORWARD_PAST_MEDIA_TIME_WITH_OFFSET_RELATIVE_TO_LAYOUT_ENTER",
this.Fm],["TRIGGER_TYPE_SEEK_BACKWARD_BEFORE_LAYOUT_ENTER_TIME",this.Fm],["TRIGGER_TYPE_CONTENT_VIDEO_ID_ENDED",this.Fm],["TRIGGER_TYPE_MEDIA_TIME_RANGE",this.Fm],["TRIGGER_TYPE_MEDIA_TIME_RANGE_ALLOW_REACTIVATION_ON_USER_CANCELLED",this.Fm],["TRIGGER_TYPE_NOT_IN_MEDIA_TIME_RANGE",this.Fm],["TRIGGER_TYPE_LIVE_STREAM_BREAK_STARTED",this.p9],["TRIGGER_TYPE_LIVE_STREAM_BREAK_ENDED",this.p9],["TRIGGER_TYPE_ON_LAYOUT_SELF_EXIT_REQUESTED",this.bE],["TRIGGER_TYPE_ON_NEW_PLAYBACK_AFTER_CONTENT_VIDEO_ID",
this.uH],["TRIGGER_TYPE_ON_OPPORTUNITY_TYPE_RECEIVED",this.Bi],["TRIGGER_TYPE_TIME_RELATIVE_TO_LAYOUT_ENTER",this.v6],["TRIGGER_TYPE_AD_BREAK_STARTED",this.Ps],["TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_MATCHED",this.Bs],["TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_NOT_MATCHED",this.Bs],["TRIGGER_TYPE_NEW_SLOT_SCHEDULED_WITH_BREAK_DURATION",this.Bs],["TRIGGER_TYPE_PREFETCH_CACHE_EXPIRED",this.Bs],["TRIGGER_TYPE_CUE_BREAK_IDENTIFIED",this.Bs]]),wN:new Map([["SLOT_TYPE_ABOVE_FEED",this.hf],
["SLOT_TYPE_AD_BREAK_REQUEST",this.hf],["SLOT_TYPE_FORECASTING",this.hf],["SLOT_TYPE_IN_PLAYER",this.hf],["SLOT_TYPE_PLAYER_BYTES",this.wK],["SLOT_TYPE_PLAYER_UNDERLAY",this.hf],["SLOT_TYPE_PLAYBACK_TRACKING",this.hf],["SLOT_TYPE_PLAYER_BYTES_SEQUENCE_ITEM",this.hf]]),h$:new Map([["SLOT_TYPE_ABOVE_FEED",this.zs],["SLOT_TYPE_AD_BREAK_REQUEST",this.NJ],["SLOT_TYPE_FORECASTING",this.RH],["SLOT_TYPE_PLAYER_BYTES",this.y5],["SLOT_TYPE_PLAYBACK_TRACKING",this.vA],["SLOT_TYPE_PLAYER_BYTES_SEQUENCE_ITEM",
this.vA],["SLOT_TYPE_IN_PLAYER",this.GX],["SLOT_TYPE_PLAYER_UNDERLAY",this.T3]])};this.listeners=[A.get()];this.rV={VK:this.VK,E7:this.p_.get(),l0:this.LP.get(),Gl:this.vG.get(),Nx:this.Nx,TQ:Z.get(),ub:this.oa.get(),pK:this.tC,LJ:A.get(),gz:this.wb.get()}}};var vPz=class extends g.zP{constructor(l,y,k,z,r){super();const Z=v(()=>new LD(this.p_));
g.x(this,Z);const e=v(()=>new vI(Z));
g.x(this,e);const A=v(()=>new KD);
g.x(this,A);const Q=v(()=>new JG(l));
g.x(this,Q);const t=v(()=>new BI(Z,e,this.p_));
g.x(this,t);const O=v(()=>new HI);
g.x(this,O);this.M_=v(()=>new GY(y));
g.x(this,this.M_);this.LP=v(()=>new tG(r));
g.x(this,this.LP);this.Ll=v(()=>new ZF(y));
g.x(this,this.Ll);this.VE=v(()=>new eN(y));
g.x(this,this.VE);this.mw=v(()=>new Ar(y));
g.x(this,this.mw);this.GM=v(()=>new $N(y));
g.x(this,this.GM);this.p_=v(()=>new Q$(y));
g.x(this,this.p_);const d=v(()=>new hr(z));
g.x(this,d);const w=v(()=>new QZ(this.p_));
g.x(this,w);const h=v(()=>new WI(Z,t,e,this.p_,w,null,null,this.Ph,this.Bs));
g.x(this,h);this.Sb=v(()=>new iE(y));
g.x(this,this.Sb);this.oa=v(()=>new ch5);
g.x(this,this.oa);this.wb=v(()=>new d1(y,O,this.p_));
g.x(this,this.wb);const {Av:U,context:u}=Y8({wb:this.wb,p_:this.p_,TA:w});this.Av=U;this.Ba=v(()=>new a2(y,this.p_,this.Se));
this.vG=v(()=>new w1(y,this.wb));
g.x(this,this.vG);this.Qu=v(()=>new Mz);
g.x(this,this.Qu);this.EA=v(()=>new tr(this.vG,y,this.p_));
g.x(this,this.EA);this.Se=v(()=>new Oz(y,A,this.EA,this.wb,this.Av,this.p_));
g.x(this,this.Se);this.wy=v(()=>new Oe(this.p_));
g.x(this,this.wy);this.Ab=new Tv(XX,(V,T,J,K)=>Ys(e.get(),V,T,J,K),Q,t,e,w,this.p_,this.wb);
g.x(this,this.Ab);this.Nx=new PI(Q,h,k,l,this.wb,this.vG,this.Ll);g.x(this,this.Nx);const W=new r1(y,this.Nx,this.vG,this.wb,this.Ba);this.R9=v(()=>W);
this.mu=W;this.Ph=new IB(Q,t,this.R9,this.Ba,this.vG,this.p_,this.Se);g.x(this,this.Ph);this.XS=new pD(Q,t,this.VE,this.R9,u);g.x(this,this.XS);this.VK=new me(this.p_,Q,h,this.wb,this.XS,k,this.mw);g.x(this,this.VK);this.V5=v(()=>new dj(d,e,w,this.p_,this.Se,this.vG));
g.x(this,this.V5);this.o4=v(()=>new wj);
g.x(this,this.o4);this.tC=new fD(l,this.M_,this.p_);g.x(this,this.tC);this.GE=new jF(l);g.x(this,this.GE);this.Iw=new Lzt(l);g.x(this,this.Iw);this.uH=new SF(l,this.R9,u);g.x(this,this.uH);this.Fm=new nD(l,this.VE,this.vG,this.wb);g.x(this,this.Fm);this.bE=new Fo(l);g.x(this,this.bE);this.Bi=new oB(l);g.x(this,this.Bi);this.v6=new BAs(l);g.x(this,this.v6);this.yE=v(()=>new Uz(y));
g.x(this,this.yE);this.Ps=new se;g.x(this,this.Ps);this.Bs=new Nr(l,this.Ba,this.vG,this.Se,this.R9,this.Ph);g.x(this,this.Bs);this.hf=v(()=>new gj);
g.x(this,this.hf);this.wK=v(()=>new Ee(this.vG));
g.x(this,this.wK);this.NJ=v(()=>new ib(this.VK,Q,Z));
g.x(this,this.NJ);this.RH=v(()=>new Ue(this.p_,this.Se,this.bE,this.EA));
g.x(this,this.RH);this.GX=v(()=>new KzC(this.M_,this.vG,this.Se,A,this.EA,this.Iw,this.v6,this.LP,this.p_,k));
g.x(this,this.GX);this.y5=v(()=>new ub(l,this.Ps,this.bE,this.Se,this.EA,this.wy,this.mw,this.wb,this.vG,this.Qu,this.VE,this.Ll,this.GM,this.LP,this.Sb,this.p_,this.yE,u));
g.x(this,this.y5);this.WM=new Eve(this.oa);g.x(this,this.WM);this.Ud={l_:new Map([["OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",this.VK],["OPPORTUNITY_TYPE_LIVE_STREAM_BREAK_SIGNAL",this.Ph],["OPPORTUNITY_TYPE_PLAYER_BYTES_MEDIA_LAYOUT_ENTERED",this.Ab],["OPPORTUNITY_TYPE_PLAYER_RESPONSE_RECEIVED",this.Nx],["OPPORTUNITY_TYPE_THROTTLED_AD_BREAK_REQUEST_SLOT_REENTRY",this.XS]]),Ik:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.V5],["SLOT_TYPE_FORECASTING",this.o4],["SLOT_TYPE_IN_PLAYER",this.o4],
["SLOT_TYPE_PLAYER_BYTES",this.o4]]),nA:new Map([["TRIGGER_TYPE_SKIP_REQUESTED",this.tC],["TRIGGER_TYPE_LAYOUT_ID_ENTERED",this.GE],["TRIGGER_TYPE_LAYOUT_ID_EXITED",this.GE],["TRIGGER_TYPE_LAYOUT_EXITED_FOR_REASON",this.GE],["TRIGGER_TYPE_ON_DIFFERENT_LAYOUT_ID_ENTERED",this.GE],["TRIGGER_TYPE_SLOT_ID_ENTERED",this.GE],["TRIGGER_TYPE_SLOT_ID_EXITED",this.GE],["TRIGGER_TYPE_SLOT_ID_FULFILLED_EMPTY",this.GE],["TRIGGER_TYPE_SLOT_ID_FULFILLED_NON_EMPTY",this.GE],["TRIGGER_TYPE_SLOT_ID_SCHEDULED",this.GE],
["TRIGGER_TYPE_ON_DIFFERENT_SLOT_ID_ENTER_REQUESTED",this.GE],["TRIGGER_TYPE_CLOSE_REQUESTED",this.Iw],["TRIGGER_TYPE_BEFORE_CONTENT_VIDEO_ID_STARTED",this.uH],["TRIGGER_TYPE_CONTENT_VIDEO_ID_ENDED",this.Fm],["TRIGGER_TYPE_MEDIA_TIME_RANGE",this.Fm],["TRIGGER_TYPE_NOT_IN_MEDIA_TIME_RANGE",this.Fm],["TRIGGER_TYPE_ON_LAYOUT_SELF_EXIT_REQUESTED",this.bE],["TRIGGER_TYPE_ON_NEW_PLAYBACK_AFTER_CONTENT_VIDEO_ID",this.uH],["TRIGGER_TYPE_ON_OPPORTUNITY_TYPE_RECEIVED",this.Bi],["TRIGGER_TYPE_TIME_RELATIVE_TO_LAYOUT_ENTER",
this.v6],["TRIGGER_TYPE_AD_BREAK_STARTED",this.Ps],["TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_MATCHED",this.Bs],["TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_NOT_MATCHED",this.Bs],["TRIGGER_TYPE_NEW_SLOT_SCHEDULED_WITH_BREAK_DURATION",this.Bs],["TRIGGER_TYPE_PREFETCH_CACHE_EXPIRED",this.Bs],["TRIGGER_TYPE_CUE_BREAK_IDENTIFIED",this.Bs]]),wN:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.hf],["SLOT_TYPE_FORECASTING",this.hf],["SLOT_TYPE_IN_PLAYER",this.hf],["SLOT_TYPE_PLAYER_BYTES",this.wK]]),
h$:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.NJ],["SLOT_TYPE_FORECASTING",this.RH],["SLOT_TYPE_IN_PLAYER",this.GX],["SLOT_TYPE_PLAYER_BYTES",this.y5]])};this.listeners=[A.get()];this.rV={VK:this.VK,E7:this.p_.get(),l0:this.LP.get(),Gl:this.vG.get(),Nx:this.Nx,TQ:Z.get(),ub:this.oa.get(),pK:this.tC,LJ:A.get(),gz:this.wb.get()}}};var BN5=class extends g.zP{constructor(l,y,k,z,r){super();const Z=v(()=>new LD(this.p_));
g.x(this,Z);const e=v(()=>new vI(Z));
g.x(this,e);const A=v(()=>new KD);
g.x(this,A);const Q=v(()=>new JG(l));
g.x(this,Q);const t=v(()=>new BI(Z,e,this.p_));
g.x(this,t);const O=v(()=>new HI);
g.x(this,O);this.M_=v(()=>new GY(y));
g.x(this,this.M_);this.LP=v(()=>new tG(r));
g.x(this,this.LP);this.Ll=v(()=>new ZF(y));
g.x(this,this.Ll);this.VE=v(()=>new eN(y));
g.x(this,this.VE);this.mw=v(()=>new Ar(y));
g.x(this,this.mw);this.GM=v(()=>new $N(y));
g.x(this,this.GM);this.p_=v(()=>new Q$(y));
g.x(this,this.p_);const d=v(()=>new hr(z));
g.x(this,d);const w=v(()=>new QZ(this.p_));
g.x(this,w);const h=v(()=>new WI(Z,t,e,this.p_,w,null,null,null,null));
g.x(this,h);this.Sb=v(()=>new iE(y));
g.x(this,this.Sb);this.wb=v(()=>new d1(y,O,this.p_));
g.x(this,this.wb);const {Av:U,context:u}=Y8({wb:this.wb,p_:this.p_,TA:w});this.Av=U;this.vG=v(()=>new w1(y,this.wb));
g.x(this,this.vG);this.Qu=v(()=>new Mz);
g.x(this,this.Qu);this.EA=v(()=>new tr(this.vG,y,this.p_));
g.x(this,this.EA);this.Se=v(()=>new Oz(y,A,this.EA,this.wb,this.Av,this.p_));
g.x(this,this.Se);this.wy=v(()=>new Oe(this.p_));
g.x(this,this.wy);this.Ab=new Tv(XX,(V,T,J,K)=>Ys(e.get(),V,T,J,K),Q,t,e,w,this.p_,this.wb);
g.x(this,this.Ab);this.Nx=new PI(Q,h,k,l,this.wb,this.vG,this.Ll);g.x(this,this.Nx);const W=new r1(y,this.Nx,this.vG,this.wb);this.R9=v(()=>W);
this.mu=W;this.XS=new pD(Q,t,this.VE,this.R9,u);g.x(this,this.XS);this.VK=new me(this.p_,Q,h,this.wb,this.XS,k,this.mw);g.x(this,this.VK);this.V5=v(()=>new dj(d,e,w,this.p_,this.Se,this.vG));
g.x(this,this.V5);this.o4=v(()=>new wj);
g.x(this,this.o4);this.tC=new fD(l,this.M_,this.p_);g.x(this,this.tC);this.GE=new jF(l);g.x(this,this.GE);this.uH=new SF(l,this.R9,u);g.x(this,this.uH);this.Fm=new nD(l,this.VE,this.vG,this.wb);g.x(this,this.Fm);this.bE=new Fo(l);g.x(this,this.bE);this.Bi=new oB(l);g.x(this,this.Bi);this.yE=v(()=>new Uz(y));
g.x(this,this.yE);this.Ps=new se;g.x(this,this.Ps);this.hf=v(()=>new gj);
g.x(this,this.hf);this.wK=v(()=>new Ee(this.vG));
g.x(this,this.wK);this.NJ=v(()=>new ib(this.VK,Q,Z));
g.x(this,this.NJ);this.RH=v(()=>new Ue(this.p_,this.Se,this.bE,this.EA));
g.x(this,this.RH);this.YU=v(()=>new ZH5(this.M_,this.vG,this.Se,A,k,this.p_));
g.x(this,this.YU);this.y5=v(()=>new ub(l,this.Ps,this.bE,this.Se,this.EA,this.wy,this.mw,this.wb,this.vG,this.Qu,this.VE,this.Ll,this.GM,this.LP,this.Sb,this.p_,this.yE,u));
g.x(this,this.y5);this.Ud={l_:new Map([["OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",this.VK],["OPPORTUNITY_TYPE_PLAYER_BYTES_MEDIA_LAYOUT_ENTERED",this.Ab],["OPPORTUNITY_TYPE_PLAYER_RESPONSE_RECEIVED",this.Nx],["OPPORTUNITY_TYPE_THROTTLED_AD_BREAK_REQUEST_SLOT_REENTRY",this.XS]]),Ik:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.V5],["SLOT_TYPE_FORECASTING",this.o4],["SLOT_TYPE_IN_PLAYER",this.o4],["SLOT_TYPE_PLAYER_BYTES",this.o4]]),nA:new Map([["TRIGGER_TYPE_SKIP_REQUESTED",this.tC],["TRIGGER_TYPE_LAYOUT_ID_ENTERED",
this.GE],["TRIGGER_TYPE_LAYOUT_ID_EXITED",this.GE],["TRIGGER_TYPE_LAYOUT_EXITED_FOR_REASON",this.GE],["TRIGGER_TYPE_ON_DIFFERENT_LAYOUT_ID_ENTERED",this.GE],["TRIGGER_TYPE_SLOT_ID_ENTERED",this.GE],["TRIGGER_TYPE_SLOT_ID_EXITED",this.GE],["TRIGGER_TYPE_SLOT_ID_FULFILLED_EMPTY",this.GE],["TRIGGER_TYPE_SLOT_ID_FULFILLED_NON_EMPTY",this.GE],["TRIGGER_TYPE_SLOT_ID_SCHEDULED",this.GE],["TRIGGER_TYPE_BEFORE_CONTENT_VIDEO_ID_STARTED",this.uH],["TRIGGER_TYPE_CONTENT_VIDEO_ID_ENDED",this.Fm],["TRIGGER_TYPE_MEDIA_TIME_RANGE",
this.Fm],["TRIGGER_TYPE_ON_LAYOUT_SELF_EXIT_REQUESTED",this.bE],["TRIGGER_TYPE_ON_NEW_PLAYBACK_AFTER_CONTENT_VIDEO_ID",this.uH],["TRIGGER_TYPE_ON_OPPORTUNITY_TYPE_RECEIVED",this.Bi],["TRIGGER_TYPE_AD_BREAK_STARTED",this.Ps]]),wN:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.hf],["SLOT_TYPE_ABOVE_FEED",this.hf],["SLOT_TYPE_FORECASTING",this.hf],["SLOT_TYPE_IN_PLAYER",this.hf],["SLOT_TYPE_PLAYER_BYTES",this.wK]]),h$:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.NJ],["SLOT_TYPE_FORECASTING",this.RH],["SLOT_TYPE_IN_PLAYER",
this.YU],["SLOT_TYPE_PLAYER_BYTES",this.y5]])};this.listeners=[A.get()];this.rV={VK:this.VK,E7:this.p_.get(),l0:this.LP.get(),Gl:this.vG.get(),Nx:this.Nx,TQ:Z.get(),ub:null,pK:this.tC,LJ:A.get(),gz:this.wb.get()}}};var H_s=class extends g.zP{constructor(l,y,k,z,r){super();const Z=v(()=>new LD(this.p_));
g.x(this,Z);const e=v(()=>new vI(Z));
g.x(this,e);const A=v(()=>new KD);
g.x(this,A);const Q=v(()=>new JG(l));
g.x(this,Q);const t=v(()=>new BI(Z,e,this.p_));
g.x(this,t);const O=v(()=>new HI);
g.x(this,O);this.gM=v(()=>new Sm1(y));
g.x(this,this.gM);this.M_=v(()=>new GY(y));
g.x(this,this.M_);this.LP=v(()=>new tG(r));
g.x(this,this.LP);this.Ll=v(()=>new ZF(y));
g.x(this,this.Ll);this.VE=v(()=>new eN(y));
g.x(this,this.VE);this.mw=v(()=>new Ar(y));
g.x(this,this.mw);this.GM=v(()=>new $N(y));
g.x(this,this.GM);this.p_=v(()=>new Q$(y));
g.x(this,this.p_);const d=v(()=>new hr(z));
g.x(this,d);const w=v(()=>new QZ(this.p_));
g.x(this,w);const h=v(()=>new WI(Z,t,e,this.p_,w,null,null,null,null));
g.x(this,h);this.Sb=v(()=>new iE(y));
g.x(this,this.Sb);this.wb=v(()=>new d1(y,O,this.p_));
g.x(this,this.wb);const {Av:U,context:u}=Y8({wb:this.wb,p_:this.p_,TA:w});this.Av=U;this.vG=v(()=>new w1(y,this.wb));
g.x(this,this.vG);this.Qu=v(()=>new Mz);
g.x(this,this.Qu);this.EA=v(()=>new tr(this.vG,y,this.p_));
g.x(this,this.EA);this.Se=v(()=>new Oz(y,A,this.EA,this.wb,this.Av,this.p_));
g.x(this,this.Se);this.wy=v(()=>new Oe(this.p_));
g.x(this,this.wy);this.Ab=new Tv(U8e,(V,T,J,K)=>nO_(e.get(),V,T,J,K),Q,t,e,w,this.p_,this.wb);
g.x(this,this.Ab);this.Nx=new PI(Q,h,k,l,this.wb,this.vG,this.Ll);g.x(this,this.Nx);const W=new r1(y,this.Nx,this.vG,this.wb);this.R9=v(()=>W);
this.mu=W;this.XS=new pD(Q,t,this.VE,this.R9,u);g.x(this,this.XS);this.VK=new me(this.p_,Q,h,this.wb,this.XS,k,this.mw);g.x(this,this.VK);this.V5=v(()=>new dj(d,e,w,this.p_,this.Se,this.vG));
g.x(this,this.V5);this.o4=v(()=>new wj);
g.x(this,this.o4);this.tC=new fD(l,this.M_,this.p_);g.x(this,this.tC);this.GE=new jF(l);g.x(this,this.GE);this.uH=new SF(l,this.R9,u);g.x(this,this.uH);this.Fm=new nD(l,this.VE,this.vG,this.wb);g.x(this,this.Fm);this.bE=new Fo(l);g.x(this,this.bE);this.Bi=new oB(l);g.x(this,this.Bi);this.yE=v(()=>new Uz(y));
g.x(this,this.yE);this.Ps=new se;g.x(this,this.Ps);this.hf=v(()=>new gj);
g.x(this,this.hf);this.wK=v(()=>new Ee(this.vG));
g.x(this,this.wK);this.NJ=v(()=>new ib(this.VK,Q,Z));
g.x(this,this.NJ);this.RH=v(()=>new Ue(this.p_,this.Se,this.bE,this.EA));
g.x(this,this.RH);this.y5=v(()=>new ub(l,this.Ps,this.bE,this.Se,this.EA,this.wy,this.mw,this.wb,this.vG,this.Qu,this.VE,this.Ll,this.GM,this.LP,this.Sb,this.p_,this.yE,u));
g.x(this,this.y5);this.QA=v(()=>new Ex5(this.M_,this.vG,this.Se,A,this.gM,k,this.wb));
g.x(this,this.QA);this.Ud={l_:new Map([["OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",this.VK],["OPPORTUNITY_TYPE_PLAYER_BYTES_MEDIA_LAYOUT_ENTERED",this.Ab],["OPPORTUNITY_TYPE_PLAYER_RESPONSE_RECEIVED",this.Nx],["OPPORTUNITY_TYPE_THROTTLED_AD_BREAK_REQUEST_SLOT_REENTRY",this.XS]]),Ik:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.V5],["SLOT_TYPE_FORECASTING",this.o4],["SLOT_TYPE_IN_PLAYER",this.o4],["SLOT_TYPE_PLAYER_BYTES",this.o4]]),nA:new Map([["TRIGGER_TYPE_SKIP_REQUESTED",this.tC],["TRIGGER_TYPE_LAYOUT_ID_ENTERED",
this.GE],["TRIGGER_TYPE_LAYOUT_ID_EXITED",this.GE],["TRIGGER_TYPE_LAYOUT_EXITED_FOR_REASON",this.GE],["TRIGGER_TYPE_ON_DIFFERENT_LAYOUT_ID_ENTERED",this.GE],["TRIGGER_TYPE_SLOT_ID_ENTERED",this.GE],["TRIGGER_TYPE_SLOT_ID_EXITED",this.GE],["TRIGGER_TYPE_SLOT_ID_FULFILLED_EMPTY",this.GE],["TRIGGER_TYPE_SLOT_ID_FULFILLED_NON_EMPTY",this.GE],["TRIGGER_TYPE_SLOT_ID_SCHEDULED",this.GE],["TRIGGER_TYPE_BEFORE_CONTENT_VIDEO_ID_STARTED",this.uH],["TRIGGER_TYPE_CONTENT_VIDEO_ID_ENDED",this.Fm],["TRIGGER_TYPE_MEDIA_TIME_RANGE",
this.Fm],["TRIGGER_TYPE_ON_LAYOUT_SELF_EXIT_REQUESTED",this.bE],["TRIGGER_TYPE_ON_NEW_PLAYBACK_AFTER_CONTENT_VIDEO_ID",this.uH],["TRIGGER_TYPE_ON_OPPORTUNITY_TYPE_RECEIVED",this.Bi],["TRIGGER_TYPE_AD_BREAK_STARTED",this.Ps]]),wN:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.hf],["SLOT_TYPE_FORECASTING",this.hf],["SLOT_TYPE_IN_PLAYER",this.hf],["SLOT_TYPE_PLAYER_BYTES",this.wK]]),h$:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.NJ],["SLOT_TYPE_FORECASTING",this.RH],["SLOT_TYPE_IN_PLAYER",this.QA],["SLOT_TYPE_PLAYER_BYTES",
this.y5]])};this.listeners=[A.get()];this.rV={VK:this.VK,E7:this.p_.get(),l0:this.LP.get(),Gl:this.vG.get(),Nx:this.Nx,TQ:Z.get(),ub:null,pK:this.tC,LJ:A.get(),gz:this.wb.get()}}};var RH5=class extends g.zP{constructor(l,y,k,z,r){super();const Z=v(()=>new LD(this.p_));
g.x(this,Z);const e=v(()=>new vI(Z));
g.x(this,e);const A=v(()=>new KD);
g.x(this,A);const Q=v(()=>new JG(l));
g.x(this,Q);const t=v(()=>new BI(Z,e,this.p_));
g.x(this,t);const O=v(()=>new HI);
g.x(this,O);this.gM=v(()=>new Sm1(y));
g.x(this,this.gM);this.M_=v(()=>new GY(y));
g.x(this,this.M_);this.LP=v(()=>new tG(r));
g.x(this,this.LP);this.Ll=v(()=>new ZF(y));
g.x(this,this.Ll);this.VE=v(()=>new eN(y));
g.x(this,this.VE);this.mw=v(()=>new Ar(y));
g.x(this,this.mw);this.GM=v(()=>new $N(y));
g.x(this,this.GM);this.p_=v(()=>new Q$(y));
g.x(this,this.p_);const d=v(()=>new hr(z));
g.x(this,d);const w=v(()=>new QZ(this.p_));
g.x(this,w);this.Sb=v(()=>new iE(y));
g.x(this,this.Sb);this.wb=v(()=>new d1(y,O,this.p_));
g.x(this,this.wb);const {Av:h,context:U}=Y8({wb:this.wb,p_:this.p_,TA:w});this.Av=h;this.Ba=v(()=>new a2(y,this.p_,this.Se));
g.x(this,this.Ba);this.yE=v(()=>new Uz(y));
g.x(this,this.yE);this.vG=v(()=>new w1(y,this.wb));
g.x(this,this.vG);this.Qu=v(()=>new Mz);
g.x(this,this.Qu);const u=v(()=>new WI(Z,t,e,this.p_,w,null,this.vG,this.Ph,this.Bs,3));
g.x(this,u);this.wy=v(()=>new Oe(this.p_));
this.EA=v(()=>new tr(this.vG,y,this.p_));
g.x(this,this.EA);this.Se=v(()=>new Oz(y,A,this.EA,this.wb,this.Av,this.p_));
g.x(this,this.Se);this.Nx=new PI(Q,u,k,l,this.wb,this.vG,this.Ll);g.x(this,this.Nx);const W=new r1(y,this.Nx,this.vG,this.wb,this.Ba);this.R9=v(()=>W);
this.mu=W;this.Ab=new Tv(MGP,(V,T,J,K)=>nO_(e.get(),V,T,J,K),Q,t,e,w,this.p_,this.wb);
g.x(this,this.Ab);this.Ph=new IB(Q,t,this.R9,this.Ba,this.vG,this.p_,this.Se,this.yE);g.x(this,this.Ph);this.XS=new pD(Q,t,this.VE,this.R9,U);g.x(this,this.XS);this.VK=new me(this.p_,Q,u,this.wb,this.XS,k,this.mw);g.x(this,this.VK);this.V5=v(()=>new dj(d,e,w,this.p_,this.Se,this.vG,this.yE));
g.x(this,this.V5);this.o4=v(()=>new wj);
g.x(this,this.o4);this.tC=new fD(l,this.M_,this.p_);g.x(this,this.tC);this.GE=new jF(l);g.x(this,this.GE);this.uH=new SF(l,this.R9,U);g.x(this,this.uH);this.Fm=new nD(l,this.VE,this.vG,this.wb);g.x(this,this.Fm);this.p9=new vxQ(l,this.wb);g.x(this,this.p9);this.Bs=new Nr(l,this.Ba,this.vG,this.Se,this.R9,this.Ph);g.x(this,this.Bs);this.bE=new Fo(l);g.x(this,this.bE);this.Bi=new oB(l);g.x(this,this.Bi);this.Ps=new se;g.x(this,this.Ps);this.hf=v(()=>new gj);
g.x(this,this.hf);this.wK=v(()=>new Ee(this.vG));
g.x(this,this.wK);this.NJ=v(()=>new ib(this.VK,Q,Z));
g.x(this,this.NJ);this.RH=v(()=>new Ue(this.p_,this.Se,this.bE,this.EA));
g.x(this,this.RH);this.y5=v(()=>new qdC(l,this.Ps,this.bE,this.wb,this.yE,this.vG,this.Qu,this.Se,O,this.Ba,this.EA,this.wy,this.mw,this.VE,this.Ll,this.GM,this.LP,this.Sb,this.p_,A,U));
g.x(this,this.y5);this.GX=v(()=>new fR4(this.M_,this.vG,this.Se,A,this.gM,k,this.p_,this.wb));
g.x(this,this.GX);this.Ud={l_:new Map([["OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",this.VK],["OPPORTUNITY_TYPE_LIVE_STREAM_BREAK_SIGNAL",this.Ph],["OPPORTUNITY_TYPE_PLAYER_BYTES_MEDIA_LAYOUT_ENTERED",this.Ab],["OPPORTUNITY_TYPE_PLAYER_RESPONSE_RECEIVED",this.Nx],["OPPORTUNITY_TYPE_THROTTLED_AD_BREAK_REQUEST_SLOT_REENTRY",this.XS]]),Ik:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.V5],["SLOT_TYPE_FORECASTING",this.o4],["SLOT_TYPE_IN_PLAYER",this.o4],["SLOT_TYPE_PLAYER_BYTES",this.o4]]),nA:new Map([["TRIGGER_TYPE_SKIP_REQUESTED",
this.tC],["TRIGGER_TYPE_LAYOUT_ID_ENTERED",this.GE],["TRIGGER_TYPE_LAYOUT_ID_EXITED",this.GE],["TRIGGER_TYPE_LAYOUT_EXITED_FOR_REASON",this.GE],["TRIGGER_TYPE_ON_DIFFERENT_LAYOUT_ID_ENTERED",this.GE],["TRIGGER_TYPE_SLOT_ID_ENTERED",this.GE],["TRIGGER_TYPE_SLOT_ID_EXITED",this.GE],["TRIGGER_TYPE_SLOT_ID_FULFILLED_EMPTY",this.GE],["TRIGGER_TYPE_SLOT_ID_FULFILLED_NON_EMPTY",this.GE],["TRIGGER_TYPE_SLOT_ID_SCHEDULED",this.GE],["TRIGGER_TYPE_BEFORE_CONTENT_VIDEO_ID_STARTED",this.uH],["TRIGGER_TYPE_CONTENT_VIDEO_ID_ENDED",
this.Fm],["TRIGGER_TYPE_MEDIA_TIME_RANGE",this.Fm],["TRIGGER_TYPE_LIVE_STREAM_BREAK_STARTED",this.p9],["TRIGGER_TYPE_LIVE_STREAM_BREAK_ENDED",this.p9],["TRIGGER_TYPE_ON_LAYOUT_SELF_EXIT_REQUESTED",this.bE],["TRIGGER_TYPE_ON_NEW_PLAYBACK_AFTER_CONTENT_VIDEO_ID",this.uH],["TRIGGER_TYPE_ON_OPPORTUNITY_TYPE_RECEIVED",this.Bi],["TRIGGER_TYPE_AD_BREAK_STARTED",this.Ps],["TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_MATCHED",this.Bs],["TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_NOT_MATCHED",
this.Bs],["TRIGGER_TYPE_NEW_SLOT_SCHEDULED_WITH_BREAK_DURATION",this.Bs],["TRIGGER_TYPE_PREFETCH_CACHE_EXPIRED",this.Bs],["TRIGGER_TYPE_CUE_BREAK_IDENTIFIED",this.Bs]]),wN:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.hf],["SLOT_TYPE_FORECASTING",this.hf],["SLOT_TYPE_IN_PLAYER",this.hf],["SLOT_TYPE_PLAYER_BYTES",this.wK]]),h$:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.NJ],["SLOT_TYPE_FORECASTING",this.RH],["SLOT_TYPE_PLAYER_BYTES",this.y5],["SLOT_TYPE_IN_PLAYER",this.GX]])};this.listeners=[A.get()];
this.rV={VK:this.VK,E7:this.p_.get(),l0:this.LP.get(),Gl:this.vG.get(),Nx:this.Nx,TQ:Z.get(),ub:null,pK:this.tC,LJ:A.get(),gz:this.wb.get()}}};var nv2=class extends g.zP{constructor(l,y,k,z){super();const r=()=>this.C;
l.O().experiments.z7("html5_dispose_of_manager_before_dependency")?(this.Z=lUq(r,l,y,k,z),this.C=(new XP5(this.Z)).N(),g.x(this,this.C),g.x(this,this.Z)):(this.Z=lUq(r,l,y,k,z),g.x(this,this.Z),this.C=(new XP5(this.Z)).N(),g.x(this,this.C))}N(){return this.C}};var F4x=class extends NgT{V(l){var y=l.content;if(y.componentType==="shopping-companion")switch(l.actionType){case 1:case 2:l=this.Z.getVideoData({playerType:1});g.G3(this.Z,"updateKevlarOrC3Companion",{contentVideoId:l&&l.videoId,shoppingCompanionCarouselRenderer:y.renderer,layoutId:y.layoutId,macros:y.macros,onLayoutVisibleCallback:y.Z,interactionLoggingClientData:y.interactionLoggingClientData});break;case 3:g.G3(this.Z,"updateKevlarOrC3Companion",{})}else if(y.componentType==="action-companion")switch(l.actionType){case 1:case 2:l=
this.Z.getVideoData({playerType:1});g.G3(this.Z,"updateKevlarOrC3Companion",{contentVideoId:l&&l.videoId,actionCompanionAdRenderer:y.renderer,layoutId:y.layoutId,macros:y.macros,onLayoutVisibleCallback:y.Z,interactionLoggingClientData:y.interactionLoggingClientData});break;case 3:y.renderer&&(y=this.Z.getVideoData({playerType:1}),g.G3(this.Z,"updateKevlarOrC3Companion",{contentVideoId:y&&y.videoId})),g.G3(this.Z,"updateKevlarOrC3Companion",{})}else if(y.componentType==="image-companion")switch(l.actionType){case 1:case 2:l=
this.Z.getVideoData({playerType:1});g.G3(this.Z,"updateKevlarOrC3Companion",{contentVideoId:l&&l.videoId,imageCompanionAdRenderer:y.renderer,layoutId:y.layoutId,macros:y.macros,onLayoutVisibleCallback:y.Z,interactionLoggingClientData:y.interactionLoggingClientData});break;case 3:y=this.Z.getVideoData({playerType:1}),g.G3(this.Z,"updateKevlarOrC3Companion",{contentVideoId:y&&y.videoId}),g.G3(this.Z,"updateKevlarOrC3Companion",{})}else if(y.componentType==="top-banner-image-text-icon-buttoned")switch(l.actionType){case 1:case 2:l=
this.Z.getVideoData({playerType:1});g.G3(this.Z,"updateKevlarOrC3Companion",{contentVideoId:l&&l.videoId,topBannerImageTextIconButtonedLayoutViewModel:y.renderer,layoutId:y.layoutId,macros:y.macros,onLayoutVisibleCallback:y.Z,interactionLoggingClientData:y.interactionLoggingClientData});break;case 3:y.renderer&&(y=this.Z.getVideoData({playerType:1}),g.G3(this.Z,"updateKevlarOrC3Companion",{contentVideoId:y&&y.videoId})),g.G3(this.Z,"updateKevlarOrC3Companion",{})}else if(y.componentType==="banner-image")switch(l.actionType){case 1:case 2:l=
this.Z.getVideoData({playerType:1});g.G3(this.Z,"updateKevlarOrC3Companion",{contentVideoId:l&&l.videoId,bannerImageLayoutViewModel:y.renderer,layoutId:y.layoutId,macros:y.macros,onLayoutVisibleCallback:y.Z,interactionLoggingClientData:y.interactionLoggingClientData});break;case 3:y=this.Z.getVideoData({playerType:1}),g.G3(this.Z,"updateKevlarOrC3Companion",{contentVideoId:y&&y.videoId}),g.G3(this.Z,"updateKevlarOrC3Companion",{})}else if(y.componentType==="ads-engagement-panel")switch(y=y.renderer,
l.actionType){case 1:case 2:g.G3(this.Z,"updateEngagementPanelAction",y.addAction);g.G3(this.Z,"changeEngagementPanelVisibility",y.expandAction);break;case 3:g.G3(this.Z,"changeEngagementPanelVisibility",y.hideAction),g.G3(this.Z,"updateEngagementPanelAction",y.removeAction)}else if(y.componentType==="ads-engagement-panel-layout"){const k=y.renderer;switch(l.actionType){case 1:case 2:g.G3(this.Z,"updateEngagementPanelAction",{action:pz(k.addAction),layoutId:y.layoutId,onLayoutVisibleCallback:y.Z,
interactionLoggingClientData:y.interactionLoggingClientData});g.G3(this.Z,"changeEngagementPanelVisibility",pz(k.expandAction));break;case 3:g.G3(this.Z,"changeEngagementPanelVisibility",pz(k.hideAction)),g.G3(this.Z,"updateEngagementPanelAction",{action:pz(k.removeAction)})}}}};var ovR=class extends Fr{constructor(l,y,k,z,r){super(l,{U:"div",B:"ytp-ad-timed-pie-countdown-container",W:[{U:"svg",B:"ytp-ad-timed-pie-countdown",G:{viewBox:"0 0 20 20"},W:[{U:"circle",B:"ytp-ad-timed-pie-countdown-background",G:{r:"10",cx:"10",cy:"10"}},{U:"circle",B:"ytp-ad-timed-pie-countdown-inner",G:{r:"5",cx:"10",cy:"10"}},{U:"circle",B:"ytp-ad-timed-pie-countdown-outer",G:{r:"10",cx:"10",cy:"10"}}]}]},"timed-pie-countdown",y,k,z,r);this.S=this.qd("ytp-ad-timed-pie-countdown-container");
this.V=this.qd("ytp-ad-timed-pie-countdown-inner");this.K=this.qd("ytp-ad-timed-pie-countdown-outer");this.C=Math.ceil(2*Math.PI*5);this.hide()}init(l,y,k){super.init(l,y,k);g.n9(this.V,"stroke-dasharray",`0 ${this.C}`);this.V.classList.add("ytp-ad-timed-pie-countdown-inner-light");this.K.classList.add("ytp-ad-timed-pie-countdown-outer-light");this.S.classList.add("ytp-ad-timed-pie-countdown-container-upper-right");this.show()}clear(){this.hide()}hide(){pe(this);super.hide()}show(){Yb(this);super.show()}J(){this.hide()}N(){if(this.Z){var l=
this.Z.getProgressState();l!=null&&l.current!=null&&g.n9(this.V,"stroke-dasharray",`${l.current/l.seekableEnd*this.C} ${this.C}`)}}};var E85=class extends fj{constructor(l,y,k,z,r,Z){super(l,{U:"div",B:"ytp-ad-action-interstitial",G:{tabindex:"0"},W:[{U:"div",B:"ytp-ad-action-interstitial-background-container"},{U:"div",B:"ytp-ad-action-interstitial-slot",W:[{U:"div",B:"ytp-ad-action-interstitial-instream-info"},{U:"div",B:"ytp-ad-action-interstitial-card",W:[{U:"div",B:"ytp-ad-action-interstitial-image-container"},{U:"div",B:"ytp-ad-action-interstitial-headline-container"},{U:"div",B:"ytp-ad-action-interstitial-description-container"},
{U:"div",B:"ytp-ad-action-interstitial-action-button-container"}]}]}]},"ad-action-interstitial",y,k,z);this.R$=r;this.Ib=Z;this.navigationEndpoint=this.Z=this.skipButton=this.C=this.actionButton=null;this.rb=this.qd("ytp-ad-action-interstitial-instream-info");this.sj=this.qd("ytp-ad-action-interstitial-image-container");this.S=new j8(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,"ytp-ad-action-interstitial-image");g.x(this,this.S);this.S.Uj(this.sj);this.Y=this.qd("ytp-ad-action-interstitial-headline-container");
this.J=new nj(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,"ytp-ad-action-interstitial-headline");g.x(this,this.J);this.J.Uj(this.Y);this.K=this.qd("ytp-ad-action-interstitial-description-container");this.N=new nj(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,"ytp-ad-action-interstitial-description");g.x(this,this.N);this.N.Uj(this.K);this.xz=this.qd("ytp-ad-action-interstitial-background-container");this.PG=new j8(this.api,this.layoutId,this.interactionLoggingClientData,
this.l0,"ytp-ad-action-interstitial-background",!0);g.x(this,this.PG);this.PG.Uj(this.xz);this.gb=this.qd("ytp-ad-action-interstitial-action-button-container");this.slot=this.qd("ytp-ad-action-interstitial-slot");this.El=this.qd("ytp-ad-action-interstitial-card");this.V=new IT;g.x(this,this.V);this.hide()}init(l,y,k){super.init(l,y,k);if(y.image&&y.image.thumbnail)if(y.headline)if(y.description)if(y.backgroundImage&&y.backgroundImage.thumbnail)if(y.actionButton&&g.E(y.actionButton,$L))if(l=y.durationMilliseconds||
0,typeof l!=="number"||l<=0)g.n(Error("durationMilliseconds was specified incorrectly in "+`AdActionInterstitialRenderer with a value of: ${l}`));else if(y.navigationEndpoint){var z=this.api.getVideoData({playerType:2});if(z!=null){var r=y.image.thumbnail.thumbnails;r!=null&&r.length>0&&g.G0(g.My(r[0].url))&&(r[0].url=z.profilePicture,g.G0(g.My(z.profilePicture))&&Eb4(6,"VideoPlayer",239976093,"Expected non-empty profile picture."));r=y.backgroundImage.thumbnail.thumbnails;r!=null&&r.length>0&&g.G0(g.My(r[0].url))&&
(r[0].url=z.uE());r=y.headline;r!=null&&g.G0(g.My(r.text))&&(r.text=z.author)}this.S.init(kb("ad-image"),y.image,k);this.J.init(kb("ad-text"),y.headline,k);this.N.init(kb("ad-text"),y.description,k);this.PG.init(kb("ad-image"),y.backgroundImage,k);z=["ytp-ad-action-interstitial-action-button","ytp-ad-action-interstitial-action-button-rounded"];this.slot.classList.add("ytp-ad-action-interstitial-slot-dark-background");this.J.element.classList.add("ytp-ad-action-interstitial-headline-light");this.N.element.classList.add("ytp-ad-action-interstitial-description-light");
this.api.O().X("enable_default_mono_cta_migration_web_client")?z.push("ytp-ad-action-interstitial-action-button-mono-dark"):z.push("ytp-ad-action-interstitial-action-button-dark");this.api.O().C&&(z.push("ytp-ad-action-interstitial-action-button-mobile-companion-size"),this.api.O().X("enable_default_mono_cta_migration_web_client")?z.push("ytp-ad-action-interstitial-action-button-mono-dark"):z.push("ytp-ad-action-interstitial-action-button-dark"));this.api.O().X("enable_unified_action_endcap_on_web")&&
!this.api.O().C&&(this.api.O().X("enable_default_mono_cta_migration_web_client")?z.push("ytp-ad-action-interstitial-action-button-unified-mono"):z.push("ytp-ad-action-interstitial-action-button-unified"),this.gb.classList.add("ytp-ad-action-interstitial-action-button-container-unified"),this.S.element.classList.add("ytp-ad-action-interstitial-image-unified"),this.xz.classList.add("ytp-ad-action-interstitial-background-container-unified"),this.El.classList.add("ytp-ad-action-interstitial-card-unified"),
this.K.classList.add("ytp-ad-action-interstitial-description-container-unified"),this.N.element.classList.add("ytp-ad-action-interstitial-description-unified"),this.Y.classList.add("ytp-ad-action-interstitial-headline-container-unified"),this.J.element.classList.add("ytp-ad-action-interstitial-headline-unified"),this.sj.classList.add("ytp-ad-action-interstitial-image-container-unified"),this.rb.classList.add("ytp-ad-action-interstitial-instream-info-unified"),this.slot.classList.add("ytp-ad-action-interstitial-slot-unified"));
this.actionButton=new PW(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,z);g.x(this,this.actionButton);this.actionButton.Uj(this.gb);this.actionButton.init(kb("button"),g.E(y.actionButton,$L),k);nF(this.actionButton.element);z=N3(this.actionButton.element);ot(this.actionButton.element,z+" This link opens in new tab");this.navigationEndpoint=y.navigationEndpoint;this.V.j(this.sj,"click",this.Xr,this);this.V.j(this.K,"click",this.Xr,this);this.api.O().C||this.V.j(this.Y,"click",this.Xr,
this);this.Z=this.R$?new O3(this.api,l):new RT(l);g.x(this,this.Z);if(y.skipButton){(l=g.E(y.skipButton,UzQ))&&this.Z&&(this.skipButton=new Bgq(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,this.Z,this.Ib),g.x(this,this.skipButton),this.skipButton.Uj(this.element),this.skipButton.init(kb("skip-button"),l,k));if(k=y.adBadgeRenderer)if(k=g.E(k,iOg))l=new Bx(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,!0),l.Uj(this.rb),l.init(kb("simple-ad-badge"),k,this.macros),
g.x(this,l);if(k=y.adInfoRenderer)if(k=g.E(k,I5))l=new Z$(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,this.element,void 0,!0),l.Uj(this.rb),l.init(kb("ad-info-hover-text-button"),k,this.macros),g.x(this,l)}else y.nonskippableOverlayRenderer&&(l=g.E(y.nonskippableOverlayRenderer,Th))&&this.Z&&(this.C=new Ns(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,this.Z,!1),g.x(this,this.C),this.C.Uj(this.element),this.C.init(kb("ad-preview"),l,k));y.countdownRenderer&&
(y=y.countdownRenderer,g.E(y,MNt)&&this.Z&&(k=new ovR(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,this.Z),g.x(this,k),k.Uj(this.element),k.init(kb("timed-pie-countdown"),g.E(y,MNt),this.macros)));this.show();this.element.focus()}else g.n(Error("AdActionInterstitialRenderer has no navigation endpoint."));else g.n(Error("AdActionInterstitialRenderer has no button."));else g.n(Error("AdActionInterstitialRenderer has no background AdImage."));else g.n(Error("AdActionInterstitialRenderer has no description AdText."));
else g.n(Error("AdActionInterstitialRenderer has no headline AdText."));else g.n(Error("AdActionInterstitialRenderer has no image."))}clear(){this.V.C();this.hide()}show(){kFT(!0);this.actionButton&&this.actionButton.show();this.skipButton&&this.skipButton.show();this.C&&this.C.show();super.show()}hide(){kFT(!1);this.actionButton&&this.actionButton.hide();this.skipButton&&this.skipButton.hide();this.C&&this.C.hide();super.hide()}Xr(){this.navigationEndpoint&&(this.layoutId?this.l0.executeCommand(this.navigationEndpoint,
this.layoutId):g.n(Error("Missing layoutId for ad action interstitial.")))}};var zL={iconType:"CLOSE"},$D=new g.Fn(320,63),Y64=class extends fj{constructor(l,y,k,z){super(l,{U:"div",B:"ytp-ad-overlay-slot",W:[{U:"div",B:"ytp-ad-overlay-container"}]},"invideo-overlay",y,k,z);this.S=[];this.xz=this.Y=this.V=this.gb=this.PG=null;this.Xr=!1;this.J=null;this.K=0;l=this.qd("ytp-ad-overlay-container");this.sj=new Lj(l,45E3,6E3,.3,.4);g.x(this,this.sj);this.N=zxP(this);g.x(this,this.N);this.N.Uj(l);this.C=rl4(this);g.x(this,this.C);this.C.Uj(l);this.Z=Zg_(this);g.x(this,this.Z);this.Z.Uj(l);
this.hide()}init(l,y,k){super.init(l,y,k);this.V=y;this.S=g.tp(this.V.onClickCommands||[]);this.PG=this.V.onErrorCommand||null;if(l=this.V.contentSupportedRenderer)l=this.V.contentSupportedRenderer,y=this.V.adInfoRenderer||null,g.E(l,hdg)?(this.J=g.rt("ytp-ad-overlay-ad-info-button-container",this.N.element),ey(this,y),l=Ale(this,g.E(l,hdg))):g.E(l,GYg)?(this.J=g.rt("ytp-ad-overlay-ad-info-button-container",this.C.element),ey(this,y),l=$Xg(this,g.E(l,GYg))):g.E(l,aF5)?(this.J=g.rt("ytp-ad-overlay-ad-info-button-container",
this.Z.element),ey(this,y),l=Q6P(this,g.E(l,aF5))):(g.n(Error("InvideoOverlayAdRenderer content could not be initialized.")),l=!1);l&&(this.show(),exQ(this,!0))}clear(){exQ(this,!1);this.sj.reset();this.K=0;this.N.hide();this.logVisibility(this.N.element,!1);this.C.hide();this.logVisibility(this.C.element,!1);this.Z.hide();this.logVisibility(this.Z.element,!1);this.hide();this.dispose()}PF(){this.gb&&(this.layoutId?this.l0.executeCommand(this.gb,this.layoutId):g.n(Error("Missing layoutId for invideo_overlay_ad.")));
this.api.pauseVideo()}rb(){for(const l of tc5(this))this.layoutId?this.l0.executeCommand(l,this.layoutId):g.n(Error("Missing layoutId for invideo_overlay_ad."));this.api.onAdUxClicked("in_video_overlay_close_button",this.layoutId)}T7(){this.Xr||this.api.getPlayerState(1)!==2||this.api.playVideo()}kI(){this.Xr||this.api.getPlayerState(1)!==2||this.api.playVideo();this.api.kI("invideo-overlay")}R7(l){l.target===this.J&&g.rt("ytp-ad-button",this.xz.element).click()}};var S6s=class extends Fr{constructor(l,y,k,z,r){super(l,{U:"div",B:"ytp-ad-message-overlay",W:[{U:"div",B:"ytp-ad-message-slot"}]},"ad-message",y,k,z,r);this.K=-1;this.V=0;this.sj=!1;this.rb=this.qd("ytp-ad-message-slot");this.C=new g.kD({U:"span",B:"ytp-ad-message-container"});this.C.Uj(this.rb);g.x(this,this.C);this.messageText=new nj(this.api,this.layoutId,this.interactionLoggingClientData,z,"ytp-ad-message-text");g.x(this,this.messageText);this.messageText.Uj(this.C.element);this.S=new g.oT(this.C,
400,!1,100,()=>{this.hide()});
g.x(this,this.S);this.hide()}init(l,y,k){super.init(l,y,k);l=y.durationMs;this.V=l==null||l===0?0:l+this.Z.getProgressState().current*1E3;let z;y.text?z=y.text.templatedAdText:y.staticMessage&&(z=y.staticMessage);this.messageText.init(kb("ad-text"),z,k);this.messageText.Uj(this.C.element);this.S.show(100);this.show()}clear(){this.hide()}hide(){Og4(this,!1);super.hide();this.C.hide();this.messageText.hide();pe(this)}show(){Og4(this,!0);super.show();Yb(this);this.C.show();this.messageText.show()}J(){this.hide()}N(){if(this.Z!=
null){var l=this.Z.getProgressState();l!=null&&l.current!=null&&(l=1E3*l.current,!this.sj&&l>=this.V?(this.S.hide(),this.sj=!0):this.messageText&&this.messageText.isTemplated()&&(l=Math.max(0,Math.ceil((this.V-l)/1E3)),l!==this.K&&(J4(this.messageText,{TIME_REMAINING:String(l)}),this.K=l)))}}};var n84=class extends fj{constructor(l,y,k,z){super(l,{U:"div",B:"ytp-ad-underlay-companion",W:[{U:"div",B:"ytp-ad-underlay-side-container",W:[{U:"div",B:"ytp-ad-underlay-image-container"},{U:"div",B:"ytp-ad-underlay-description-container"},{U:"div",B:"ytp-ad-underlay-headline-container"},{U:"div",B:"ytp-ad-underlay-action-button-container"}]}]},"player-underlay",y,k,z);this.actionButton=null;this.rb=this.qd("ytp-ad-underlay-image-container");this.N=new j8(this.api,this.layoutId,this.interactionLoggingClientData,
this.l0,"ytp-ad-underlay-image");g.x(this,this.N);this.N.Uj(this.rb);this.sj=this.qd("ytp-ad-underlay-headline-container");this.C=new nj(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,"ytp-ad-underlay-headline");g.x(this,this.C);this.C.Uj(this.sj);this.Y=this.qd("ytp-ad-underlay-description-container");this.V=new nj(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,"ytp-ad-underlay-description");g.x(this,this.V);this.V.Uj(this.Y);this.K=this.qd("ytp-ad-underlay-action-button-container");
this.Z=this.qd("ytp-ad-underlay-side-container");this.hide()}init(l,y,k){super.init(l,y,{});y.image&&y.image.thumbnail?y.headline?y.description?y.actionButton&&g.E(y.actionButton,$L)?(this.N.init(kb("ad-image"),y.image,k),this.C.init(kb("ad-text"),y.headline,k),this.V.init(kb("ad-text"),y.description,k),this.actionButton=new PW(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,["ytp-ad-underlay-action-button"]),y.backgroundColor&&g.n9(this.element,"background-color",T5z(y.backgroundColor)),
g.x(this,this.actionButton),this.actionButton.Uj(this.K),this.actionButton.init(kb("button"),g.E(y.actionButton,$L),k),l=g.i_(this.api.O().experiments,"player_underlay_video_width_fraction"),this.api.O().X("place_shrunken_video_on_left_of_player")?(y=this.Z,g.ZM(y,"ytp-ad-underlay-left-container"),g.zi(y,"ytp-ad-underlay-right-container"),g.n9(this.Z,"margin-left",`${Math.round((l+.02)*100)}%`)):(y=this.Z,g.ZM(y,"ytp-ad-underlay-right-container"),g.zi(y,"ytp-ad-underlay-left-container")),g.n9(this.Z,
"width",`${Math.round((1-l-.04)*100)}%`),this.api.N$()&&this.show(),this.api.addEventListener("playerUnderlayVisibilityChange",this.S.bind(this)),this.api.addEventListener("resize",this.J.bind(this))):g.n(Error("InstreamAdPlayerUnderlayRenderer has no button.")):g.n(Error("InstreamAdPlayerUnderlayRenderer has no description AdText.")):g.n(Error("InstreamAdPlayerUnderlayRenderer has no headline AdText.")):g.n(Error("InstreamAdPlayerUnderlayRenderer has no image."))}show(){dX_(!0);this.actionButton&&
this.actionButton.show();super.show()}hide(){dX_(!1);this.actionButton&&this.actionButton.hide();super.hide()}clear(){this.api.removeEventListener("playerUnderlayVisibilityChange",this.S.bind(this));this.api.removeEventListener("resize",this.J.bind(this));this.hide()}onClick(l){super.onClick(l);this.actionButton&&g.cf(this.actionButton.element,l.target)&&this.api.pauseVideo()}S(l){l==="transitioning"?(this.Z.classList.remove("ytp-ad-underlay-clickable"),this.show()):l==="visible"?this.Z.classList.add("ytp-ad-underlay-clickable"):
l==="hidden"&&(this.hide(),this.Z.classList.remove("ytp-ad-underlay-clickable"))}J(l){l.width>1200?(this.actionButton.element.classList.add("ytp-ad-underlay-action-button-large"),this.actionButton.element.classList.remove("ytp-ad-underlay-action-button-medium")):l.width>875?(this.actionButton.element.classList.add("ytp-ad-underlay-action-button-medium"),this.actionButton.element.classList.remove("ytp-ad-underlay-action-button-large")):(this.actionButton.element.classList.remove("ytp-ad-underlay-action-button-large"),
this.actionButton.element.classList.remove("ytp-ad-underlay-action-button-medium"));g.n9(this.C.element,"font-size",`${l.width/40}px`)}};var GFC=class extends fj{constructor(l,y,k,z,r,Z=()=>{}){super(l,{U:"div",
B:"ytp-ad-survey-answer"},"survey-answer",y,k,z);this.index=r;this.onSelected=Z;this.Z=null;this.toggledLoggingParams="";this.answer=this.qd("ytp-ad-survey-answer");this.hide()}init(l,y,k){super.init(l,y,k);y.toggledLoggingParams&&(this.toggledLoggingParams=y.toggledLoggingParams);y.answer&&g.E(y.answer,$L)?(l=new PW(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,["ytp-ad-survey-answer-button"],"survey-single-select-answer-button"),l.Uj(this.answer),l.init(kb("ytp-ad-survey-answer-button"),
g.E(y.answer,$L),k),l.show()):y.answer&&g.E(y.answer,mC)&&(this.Z=new S8(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,["ytp-ad-survey-answer-toggle-button"]),this.Z.Uj(this.answer),g.x(this,this.Z),this.Z.init(kb("survey-answer-button"),g.E(y.answer,mC),k));this.show()}Ja(l){this.layoutId?a0(this.l0,l,this.layoutId,this.macros):(l=new g.WO("There is undefined layoutId when calling the runCommand method.",{componentType:this.componentType}),g.n(l))}onClick(l){super.onClick(l);if(this.api.O().X("supports_multi_step_on_desktop")&&
this.index!==null)this.onSelected(this.index)}clear(){this.hide()}};var XN5=class extends fj{constructor(l,y,k,z){super(l,{U:"div",B:"ytp-ad-survey-none-of-the-above"},"survey-none-of-the-above",y,k,z);this.button=null;this.Z=this.qd("ytp-ad-survey-none-of-the-above");this.hide()}init(l,y,k){super.init(l,y,k);y.answer&&g.E(y.answer,mC)&&(this.button=new S8(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,["ytp-ad-survey-answer-toggle-button","ytp-ad-survey-none-of-the-above-button"]),this.button.Uj(this.Z),this.button.init(kb("survey-none-of-the-above-button"),
g.E(y.answer,mC),k));this.show()}};var Nfp=class extends PW{constructor(l,y,k,z){const r=["ytp-ad-survey-submit-button"];r.push("ytp-ad-survey-submit-button-rounded");super(l,y,k,z,r,"survey-submit")}init(l,y,k){super.init(l,y,k);l=!1;y.text&&(y=g.$b(y.text),l=!g.G0(y));l||g.WH(Error("No submit text was present in the renderer."))}onClick(l){this.publish("l");super.onClick(l)}};var UXe=class extends fj{constructor(l,y,k,z,r){super(l,{U:"div",B:"ytp-ad-survey-player-overlay",W:[{U:"div",B:"ytp-ad-survey-player-overlay-instream-info"},{U:"div",B:"ytp-ad-survey-player-overlay-skip-preview-submit",W:[{U:"div",B:"ytp-ad-survey-player-overlay-skip-or-preview"},{U:"div",B:"ytp-ad-survey-player-overlay-submit"}]},{U:"div",B:"ytp-ad-survey-player-overlay-instream-user-sentiment"}]},"survey-player-overlay",y,k,z);this.V=r;this.C=this.Z=null;this.N=this.qd("ytp-ad-survey-player-overlay-instream-info");
this.skipOrPreview=this.qd("ytp-ad-survey-player-overlay-skip-or-preview");this.submitButton=this.qd("ytp-ad-survey-player-overlay-submit");g.x(this,this.V);this.hide()}init(l,y,k){super.init(l,y,k);if(l=y.skipOrPreviewRenderer)g.E(l,LM)?(l=g.E(l,LM),k=new QP(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,this.V,!0),k.Uj(this.skipOrPreview),k.init(kb("skip-button"),l,this.macros),g.x(this,k),this.Z=k):g.E(l,Th)&&(l=g.E(l,Th),k=new Ns(this.api,this.layoutId,this.interactionLoggingClientData,
this.l0,this.V,!1),k.Uj(this.skipOrPreview),k.init(kb("ad-preview"),l,this.macros),k.sj.show(100),k.show(),g.x(this,k),this.Z=k);this.Z==null&&(l=Error("ISAPOR.skipOrPreviewRenderer was not initialized properly."+`ISAPOR: ${JSON.stringify(y)}`),g.n(l));y.submitButton&&(l=y.submitButton,g.E(l,$L)&&(l=g.E(l,$L),k=new Nfp(this.api,this.layoutId,this.interactionLoggingClientData,this.l0),k.Uj(this.submitButton),k.init(kb("survey-submit"),l,this.macros),g.x(this,k),this.C=k));if(l=y.adBadgeRenderer)l=
g.E(l,iOg),k=new Bx(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,!0,!0),k.Uj(this.N),k.init(kb("simple-ad-badge"),l,this.macros),this.adBadge=k.element,g.x(this,k);if(l=y.adDurationRemaining)l=g.E(l,OOC),k=new Da(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,this.V,void 0,!0),k.Uj(this.N),k.init(kb("ad-duration-remaining"),l,this.macros),g.x(this,k);(y=y.adInfoRenderer)&&g.E(y,I5)&&(l=new Z$(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,this.element,
void 0,!0),g.x(this,l),this.adBadge!==void 0?this.N.insertBefore(l.element,this.adBadge.nextSibling):l.Uj(this.N),l.init(kb("ad-info-hover-text-button"),g.E(y,I5),this.macros));this.show()}clear(){this.hide()}};var sm2=class extends fj{constructor(l,y,k,z,r,Z=()=>{}){super(l,{U:"div",
B:"ytp-ad-survey-question",W:[{U:"div",L_:["ytp-ad-survey-question-text","ytp-ad-survey-question-foreground"]},{U:"div",L_:["ytp-ad-survey-answers","ytp-ad-survey-question-foreground"]},{U:"div",L_:["ytp-ad-survey-question-player-overlay","ytp-ad-survey-question-foreground"]},{U:"div",B:"ytp-ad-survey-question-background"}]},r,y,k,z);this.sj=Z;this.N=null;this.C=[];this.Z=null;this.S=this.api.O().experiments.z7("a11y_h5_associate_survey_question");this.question=this.qd("ytp-ad-survey-question");this.PG=
this.qd("ytp-ad-survey-question-background");this.questionText=this.qd("ytp-ad-survey-question-text");this.answers=this.qd("ytp-ad-survey-answers");this.playerOverlay=this.qd("ytp-ad-survey-question-player-overlay");this.V=Date.now()}init(l,y,k){super.init(l,y,k);wN4(this)}show(){this.V=Date.now();super.show()}K(){}};var q6Q=class extends sm2{constructor(l,y,k,z,r){super(l,y,k,z,"survey-question-multi-select");this.Y=r;this.noneOfTheAbove=null;this.submitEndpoints=[];this.J=null;this.hide()}init(l,y,k){super.init(l,y,k);y.questionText&&hxT(this,y.questionText);y.answers&&y.answers.forEach((z,r)=>{g.E(z,cx)&&aU_(this,g.E(z,cx),k,r)});
this.J=new Set(this.C.map(z=>z.Z.Z));
(l=y.noneOfTheAbove)&&(l=g.E(l,wj_))&&clz(this,l,k);y.surveyAdQuestionCommon&&McC(this,y.surveyAdQuestionCommon);y.submitEndpoints&&(this.submitEndpoints=y.submitEndpoints);this.j(this.element,"change",this.onChange);this.show()}K(){tf(this.N,w$(this),!1);this.N.C.subscribe("l",this.rb,this)}onChange(l){l.target===this.noneOfTheAbove.button.Z?Cfg(this):this.J.has(l.target)&&(this.noneOfTheAbove.button.toggleButton(!1),tf(this.N,w$(this),!0))}rb(){const l=[],y=this.C.reduce((z,r,Z)=>{const e=r.toggledLoggingParams;
r.Z&&r.Z.isToggled()&&e&&(z.push(e),l.push(Z));return z},[]).join("&"),k=this.submitEndpoints.map(z=>{if(!z.loggingUrls)return z;
z=g.Ze(z);z.loggingUrls=z.loggingUrls.map(r=>{r.baseUrl&&(r.baseUrl=MA(r.baseUrl,y));return r});
return z});
if(k)for(const z of k)this.layoutId?a0(this.l0,z,this.layoutId,this.macros):g.n(Error("Missing layoutId for multi_select_question."));this.api.O().X("supports_multi_step_on_desktop")&&this.Y(l)}clear(){this.api.O().X("enable_hide_on_clear_in_survey_question_bulleit")?this.hide():this.dispose()}};var mX5=class extends sm2{constructor(l,y,k,z,r){super(l,y,k,z,"survey-question-single-select",Z=>{this.api.O().X("supports_multi_step_on_desktop")&&r([Z])});
this.hide()}init(l,y,k){super.init(l,y,k);y.questionText&&hxT(this,y.questionText);y.answers&&y.answers.forEach((z,r)=>{g.E(z,cx)&&aU_(this,g.E(z,cx),k,r)});
y.surveyAdQuestionCommon?McC(this,y.surveyAdQuestionCommon):qM(Error("SurveyAdQuestionCommon was not sent."+`SingleSelectQuestionRenderer: ${JSON.stringify(y)}`));this.show()}clear(){this.api.O().X("enable_hide_on_clear_in_survey_question_bulleit")?this.hide():this.dispose()}};var g8s=class extends fj{constructor(l,y,k,z){super(l,{U:"div",B:"ytp-ad-survey",W:[{U:"div",B:"ytp-ad-survey-questions"}]},"survey",y,k,z);this.questions=[];this.C=[];this.conditioningRules=[];this.Z=0;this.J=this.qd("ytp-ad-survey-questions");this.api.O().X("fix_survey_color_contrast_on_destop")&&this.qd("ytp-ad-survey").classList.add("color-contrast-fix");this.api.O().X("web_enable_speedmaster")&&this.qd("ytp-ad-survey").classList.add("relative-positioning-survey");this.hide()}init(l,y,k){super.init(l,
y,k);this.api.O().X("supports_multi_step_on_desktop")?(this.conditioningRules=y.conditioningRules??[],this.C=y.questions??[],y.questions?.length&&xXC(this,0)):(y.questions||[]).forEach(z=>{g.E(z,qe)?bgt(this,g.E(z,qe),k):g.E(z,m6)&&uas(this,g.E(z,m6),k)});
this.show()}clear(){this.api.O().X("enable_hide_on_clear_in_survey_question_bulleit")?this.hide():(this.hide(),this.dispose())}V(l){if(this.api.O().X("supports_multi_step_on_desktop"))if(this.conditioningRules?.length){let y;if(l.length===0)this.api.onAdUxClicked("ad-action-submit-survey",this.layoutId);else if(this.conditioningRules.find(k=>k.questionIndex===this.Z)==null)g.n(Error("Expected conditioning rule(s) for survey question.")),this.api.onAdUxClicked("ad-action-submit-survey",this.layoutId);
else if(this.conditioningRules.forEach(k=>{if(k.questionIndex===this.Z)switch(k.condition){case "CONDITION_ALL_OF":k.answerIndices?.every(z=>l.includes(z))&&(y=k.nextQuestionIndex);
break;case "CONDITION_ANY_OF":k.answerIndices?.some(z=>l.includes(z))&&(y=k.nextQuestionIndex);
break;default:g.n(Error("Expected specified condition in survey conditioning rules."))}}),y!=null)xXC(this,y);
else this.api.onAdUxClicked("ad-action-submit-survey",this.layoutId)}else this.questions.length>1&&g.n(Error("No conditioning rules, yet survey is multi step. Expected questions.length to be 1.")),this.api.onAdUxClicked("ad-action-submit-survey",this.layoutId)}};var j6Q=class extends fj{constructor(l,y,k,z){super(l,{U:"div",B:"ytp-ad-survey-interstitial",W:[{U:"div",B:"ytp-ad-survey-interstitial-contents",W:[{U:"div",B:"ytp-ad-survey-interstitial-logo",W:[{U:"div",B:"ytp-ad-survey-interstitial-logo-image"}]},{U:"div",B:"ytp-ad-survey-interstitial-text"}]}]},"survey-interstitial",y,k,z);this.Z=this.actionButton=null;this.interstitial=this.qd("ytp-ad-survey-interstitial");this.C=this.qd("ytp-ad-survey-interstitial-contents");this.text=this.qd("ytp-ad-survey-interstitial-text");
this.logoImage=this.qd("ytp-ad-survey-interstitial-logo-image");this.transition=new g.oT(this,500,!1,300);g.x(this,this.transition)}init(l,y,k){super.init(l,y,k);l=y.timeoutSeconds||0;if(typeof l!=="number"||l<0)g.n(Error("timeoutSeconds was specified incorrectly in "+`SurveyTextInterstitialRenderer with a value of: ${l}`));else if(y.timeoutCommands)if(y.text)if(y.ctaButton&&g.E(y.ctaButton,$L))if(y.brandImage)if(y.backgroundImage&&g.E(y.backgroundImage,QV)&&g.E(y.backgroundImage,QV).landscape){this.layoutId||
g.n(Error("Missing layoutId for survey interstitial."));WfP(this.interstitial,g.E(y.backgroundImage,QV).landscape);WfP(this.logoImage,y.brandImage);g.C9(this.text,g.$b(y.text));var z=["ytp-ad-survey-interstitial-action-button"];z.push("ytp-ad-survey-interstitial-action-button-rounded");this.actionButton=new PW(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,z);g.x(this,this.actionButton);this.actionButton.Uj(this.C);this.actionButton.init(kb("button"),g.E(y.ctaButton,$L),k);this.actionButton.show();
this.Z=new O3(this.api,l*1E3);this.Z.subscribe("g",()=>{this.transition.hide()});
g.x(this,this.Z);this.j(this.element,"click",r=>{const Z=r.target===this.interstitial;r=this.actionButton.element.contains(r.target);if(Z||r)if(this.transition.hide(),Z)this.api.onAdUxClicked(this.componentType,this.layoutId)});
this.transition.show(100)}else g.n(Error("SurveyTextInterstitialRenderer has no landscape background image."));else g.n(Error("SurveyTextInterstitialRenderer has no brandImage."));else g.n(Error("SurveyTextInterstitialRenderer has no button."));else g.n(Error("SurveyTextInterstitialRenderer has no text."));else g.n(Error("timeoutSeconds was specified yet no timeoutCommands where specified"))}clear(){this.hide()}show(){IUT(!0);super.show()}hide(){IUT(!1);super.hide()}};var L4O=class extends Fr{constructor(l,y,k,z,r,Z=0){super(l,{U:"div",B:"ytp-preview-ad",W:[{U:"div",B:"ytp-preview-ad__text"}]},"preview-ad",y,k,z,r);this.PG=Z;this.C=0;this.sj=-1;this.V=this.qd("ytp-preview-ad__text");switch(this.PG){case 1:this.V.classList.add("ytp-preview-ad__text--font--small")}this.transition=new g.oT(this,400,!1,100,()=>{this.hide()});
g.x(this,this.transition);this.hide()}init(l,y){super.init(l,y,{});if(y.durationMilliseconds){if(y.durationMilliseconds<0){g.n(Error("DurationMilliseconds was specified incorrectly in "+`AdPreview with a value of: ${y.durationMilliseconds}`));return}this.C=y.durationMilliseconds}else this.C=this.Z.Vt();!y.previewText?.text||g.G0(y.previewText.text)?g.n(Error("No text is returned for AdPreview.")):(this.rb=y.previewText,y.previewText.isTemplated||g.C9(this.V,y.previewText.text),this.api.getVideoData({playerType:1})?.vT&&
y.previewImage?(l=IA(y.previewImage?.sources||[],52,!1)?.url||"")&&l.length?(this.previewImage=new g.kD({U:"img",B:"ytp-preview-ad__image",G:{src:"{{imageUrl}}"}}),this.previewImage.updateValue("imageUrl",l),g.x(this,this.previewImage),this.previewImage.Uj(this.element)):g.n(Error("Failed to get imageUrl in AdPreview.")):this.V.classList.add("ytp-preview-ad__text--padding--wide"))}clear(){this.hide()}hide(){pe(this);super.hide()}show(){Yb(this);super.show()}J(){this.hide()}N(){if(this.Z){var l=this.Z.getProgressState();
if(l?.current)if(l=1E3*l.current,l>=this.C)this.S();else if(this.rb?.isTemplated&&(l=Math.max(0,Math.ceil((this.C-l)/1E3)),l!==this.sj)){const y=this.rb?.text?.replace("{TIME_REMAINING}",String(l));y&&g.C9(this.V,y);this.sj=l}}}S(){this.transition.hide()}K(){this.transition.show(100);this.show()}};var XO=class extends fj{constructor(l,y,k,z){super(l,{U:"img",B:"ytp-ad-avatar"},"ad-avatar",y,k,z);this.hide()}init(l,y){super.init(l,y,{});var k=IA(y.image?.sources||[],TyT(y),!0)?.url||"";if(k&&k.length){l=this.qd("ytp-ad-avatar");l.src=k;if(k=y.interaction?.accessibility?.label)l.alt=k;switch(y.size){case "AD_AVATAR_SIZE_XXS":this.element.classList.add("ytp-ad-avatar--size-xxs");break;case "AD_AVATAR_SIZE_XS":this.element.classList.add("ytp-ad-avatar--size-xs");break;case "AD_AVATAR_SIZE_S":this.element.classList.add("ytp-ad-avatar--size-s");
break;case "AD_AVATAR_SIZE_M":this.element.classList.add("ytp-ad-avatar--size-m");break;case "AD_AVATAR_SIZE_L":this.element.classList.add("ytp-ad-avatar--size-l");break;case "AD_AVATAR_SIZE_XL":this.element.classList.add("ytp-ad-avatar--size-xl");break;case "AD_AVATAR_SIZE_RESPONSIVE":this.element.classList.add("ytp-ad-avatar--size-responsive");break;default:this.element.classList.add("ytp-ad-avatar--size-m")}switch(y.style){case "AD_AVATAR_STYLE_ROUNDED_CORNER":this.element.classList.add("ytp-ad-avatar--rounded-corner");
break;default:this.element.classList.add("ytp-ad-avatar--circular")}}else g.n(Error("Failed to get imageUrl in AdAvatar."))}clear(){this.hide()}onClick(l){super.onClick(l)}};var cj=class extends fj{constructor(l,y,k,z,r=!1){super(l,{U:"button",B:"ytp-ad-button-vm"},"ad-button",y,k,z);this.buttonText=this.buttonIcon=null;this.hide();this.forceDarkTheme=r}init(l,y){super.init(l,y,{});var k=y.label?.content;if((l=k!=null&&!g.G0(k))||y.iconImage){l&&(this.buttonText=new g.kD({U:"span",B:"ytp-ad-button-vm__text",Nd:k}),g.x(this,this.buttonText),this.buttonText.Uj(this.element));(k=y.interaction?.accessibility?.label||l?k:"")&&ot(this.element,`${k} ${"This link opens in new tab"}`);
nF(this.element);if(y.iconImage){k=void 0;if(y.iconImage){a:{var z=y.iconImage;if(z.sources)for(r of z.sources)if(r.clientResource?.imageName||r.customImageSource&&g.E(r.customImageSource,kz5)?.clientResource?.icon)break a;var r=void 0}r&&(k={iconType:r.clientResource?.imageName})}r=m7(k,!1,!1);r!=null&&(this.buttonIcon=new g.kD({U:"span",B:"ytp-ad-button-vm__icon",W:[r]}),g.x(this,this.buttonIcon),y.iconLeading?(Mj(this.element,this.buttonIcon.element,0),this.buttonIcon.element.classList.add("ytp-ad-button-vm__icon--leading")):
l?(this.buttonIcon.Uj(this.element),this.buttonIcon.element.classList.add("ytp-ad-button-vm__icon--trailing")):(this.buttonIcon.Uj(this.element),this.element.classList.add("ytp-ad-button-vm--icon-only")))}switch(y.style){case "AD_BUTTON_STYLE_TRANSPARENT":this.element.classList.add("ytp-ad-button-vm--style-transparent");break;case "AD_BUTTON_STYLE_FILLED_WHITE":this.element.classList.add("ytp-ad-button-vm--style-filled-white");break;case "AD_BUTTON_STYLE_MONO_FILLED":this.element.classList.add("ytp-ad-button-vm--style-mono-filled");
break;case "AD_BUTTON_STYLE_FILLED":this.api.X("delhi_modern_web_player")?this.element.classList.add("ytp-ad-button-vm--style-filled-white"):this.element.classList.add(this.forceDarkTheme?"ytp-ad-button-vm--style-filled-dark":"ytp-ad-button-vm--style-filled");break;default:this.element.classList.add("ytp-ad-button-vm--style-filled")}switch(y.size){case "AD_BUTTON_SIZE_COMPACT":this.element.classList.add("ytp-ad-button-vm--size-compact");break;case "AD_BUTTON_SIZE_LARGE":this.element.classList.add("ytp-ad-button-vm--size-large");
break;default:this.element.classList.add("ytp-ad-button-vm--size-default")}}else g.WH(Error("AdButton does not have label or an icon."))}clear(){this.hide()}onClick(l){super.onClick(l)}};var vvp=class extends Fr{constructor(l,y,k,z,r){super(l,{U:"div",L_:["ytp-ad-avatar-lockup-card--inactive","ytp-ad-avatar-lockup-card"],W:[{U:"div",B:"ytp-ad-avatar-lockup-card__avatar_and_text_container",W:[{U:"div",B:"ytp-ad-avatar-lockup-card__text_container"}]}]},"ad-avatar-lockup-card",y,k,z,r);this.startMilliseconds=0;this.adAvatar=new XO(this.api,this.layoutId,this.interactionLoggingClientData,this.l0);g.x(this,this.adAvatar);Mj(this.element,this.adAvatar.element,0);this.headline=new yZ(this.api,
this.layoutId,this.interactionLoggingClientData,this.l0);g.x(this,this.headline);this.headline.Uj(this.qd("ytp-ad-avatar-lockup-card__text_container"));this.headline.element.classList.add("ytp-ad-avatar-lockup-card__headline");this.description=new yZ(this.api,this.layoutId,this.interactionLoggingClientData,this.l0);g.x(this,this.description);this.description.Uj(this.qd("ytp-ad-avatar-lockup-card__text_container"));this.description.element.classList.add("ytp-ad-avatar-lockup-card__description");this.adButton=
new cj(this.api,this.layoutId,this.interactionLoggingClientData,this.l0);g.x(this,this.adButton);this.adButton.Uj(this.element);this.hide()}init(l,y){super.init(l,y,{});if(l=g.E(y.avatar,hf)){var k=y.headline;if(k){var z=y.description;if(z){var r=g.E(y.button,a8);r?(this.adAvatar.init(kb("ad-avatar"),l),this.headline.init(kb("ad-simple-attributed-string"),new lb(k)),this.description.init(kb("ad-simple-attributed-string"),new lb(z)),k.content&&k.content.length>20&&this.description.element.classList.add("ytp-ad-avatar-lockup-card__description--hidden--in--small--player"),
this.adButton.init(kb("ad-button"),r),this.startMilliseconds=y.startMs||0,this.api.N$()||this.show(),this.api.addEventListener("playerUnderlayVisibilityChange",this.C.bind(this)),Yb(this)):g.n(Error("No AdButtonViewModel is returned in PlayerAdAvatarLockupCardButtonedViewModel."))}else g.n(Error("No description is returned in PlayerAdAvatarLockupCardButtonedViewModel."))}else g.n(Error("No headline is returned in PlayerAdAvatarLockupCardButtonedViewModel."))}else g.n(Error("No AdAvatarViewModel is returned in PlayerAdAvatarLockupCardButtonedViewModel."))}N(){if(this.Z){var l=
this.Z.getProgressState();l&&l.current&&1E3*l.current>=this.startMilliseconds&&(pe(this),this.element.classList.remove("ytp-ad-avatar-lockup-card--inactive"))}}J(){this.clear()}onClick(l){this.api.pauseVideo();super.onClick(l)}clear(){this.hide();this.api.removeEventListener("playerUnderlayVisibilityChange",this.C.bind(this))}show(){this.adAvatar.show();this.headline.show();this.description.show();this.adButton.show();super.show()}hide(){this.adAvatar.hide();this.headline.hide();this.description.hide();
this.adButton.hide();super.hide()}C(l){l==="hidden"?this.show():this.hide()}};var Bf2=class extends fj{constructor(l,y,k,z){super(l,{U:"button",B:"ytp-skip-ad-button",W:[{U:"div",B:"ytp-skip-ad-button__text"}]},"skip-button",y,k,z);this.C=!1;this.J=this.qd("ytp-skip-ad-button__text");this.transition=new g.oT(this,500,!1,100,()=>{this.hide()});
g.x(this,this.transition);this.Z=new Lj(this.element,15E3,5E3,.5,.5,!0);g.x(this,this.Z);this.hide()}init(l,y){super.init(l,y,{});if(!y.label||g.G0(y.label))g.n(Error("No label is returned for SkipAdButton."));else if(g.C9(this.J,y.label),l=m7({iconType:"SKIP_NEXT_NEW"},!1,!1,this.api.X("delhi_modern_web_player_icons")),l==null)g.n(Error("Unable to retrieve icon for SkipAdButton"));else if(this.N=new g.kD({U:"span",B:"ytp-skip-ad-button__icon",W:[l]}),g.x(this,this.N),this.N.Uj(this.element),this.api.O().experiments.z7("enable_skip_to_next_messaging")&&
(y=g.My(y.targetId)))this.C=!0,this.element.setAttribute("data-tooltip-target-id",y),this.element.setAttribute("data-tooltip-target-fixed","")}onClick(l){l&&l.preventDefault();Cp_(l,{contentCpn:this.api.getVideoData({playerType:1})?.clientPlaybackNonce??""})===0?g.G3(this.api,"onAbnormalityDetected"):(super.onClick(l),g.G3(this.api,"onAdSkip"),this.api.onAdUxClicked(this.componentType,this.layoutId))}clear(){this.Z.reset();this.hide()}hide(){super.hide()}show(){this.Z.start();super.show();this.C&&
this.api.O().experiments.z7("enable_skip_to_next_messaging")&&this.api.publish("showpromotooltip",this.element)}V(){this.transition.show();this.show()}};var HKp=class extends Fr{constructor(l,y,k,z,r){super(l,{U:"div",B:"ytp-skip-ad"},"skip-ad",y,k,z,r);this.skipOffsetMilliseconds=0;this.isSkippable=!1;this.V=new Bf2(this.api,this.layoutId,this.interactionLoggingClientData,this.l0);g.x(this,this.V);this.V.Uj(this.element);this.hide()}init(l,y){super.init(l,y,{});l=g.E(y.preskipState,mz5);if(this.api.getVideoData()?.isDaiEnabled()){if(!l){g.n(Error("No AdPreviewViewModel is returned in SkipAdViewModel."));return}this.C=new L4O(this.api,this.layoutId,
this.interactionLoggingClientData,this.l0,this.Z);g.x(this,this.C);this.C.Uj(this.element);this.C?.init(kb("preview-ad"),l);this.C?.K()}(l=g.E(y.skippableState,WQg))?(y.skipOffsetMilliseconds!=null?this.skipOffsetMilliseconds=y.skipOffsetMilliseconds:(g.WH(Error("No skipOffsetMilliseconds is returned in SkipAdViewModel.")),this.skipOffsetMilliseconds=5E3),this.V.init(kb("skip-button"),l),this.show()):g.n(Error("No SkipAdButtonViewModel is returned in SkipAdViewModel."))}show(){Yb(this);super.show()}hide(){!this.isSkippable&&
this.C?this.C.hide():this.V&&this.V.hide();pe(this);super.hide()}clear(){this.C?.clear();this.V&&this.V.clear();pe(this);super.hide()}J(){this.hide()}N(){1E3*this.Z.getProgressState().current>=this.skipOffsetMilliseconds&&!this.isSkippable&&(this.isSkippable=!0,this.C?.S(),this.V?.V())}};var RJe=class extends fj{constructor(l,y,k,z){super(l,{U:"div",B:"ytp-visit-advertiser-link"},"visit-advertiser-link",y,k,z);this.hide()}init(l,y){super.init(l,y,{});y.label?(y.label?.content&&!g.G0(y.label.content)&&(this.linkText=new g.kD({U:"span",B:"ytp-visit-advertiser-link__text",Nd:y.label.content}),g.x(this,this.linkText),this.linkText.Uj(this.element)),y.interaction?.accessibility?.label?ot(this.element,`${y.interaction.accessibility.label} ${"This link opens in new tab"}`):y.label?.content&&
!g.G0(y.label.content)&&ot(this.element,`${y.label.content} ${"This link opens in new tab"}`),nF(this.element),this.element.setAttribute("tabindex","0"),this.show()):g.n(Error("No label found in VisitAdvertiserLink."))}onClick(l){super.onClick(l);this.api.onAdUxClicked(this.componentType,this.layoutId)}clear(){this.hide()}};var Kf_=class extends fj{constructor(l,y,k,z,r){super(l,{U:"div",B:"ytp-ad-player-overlay-layout",W:[{U:"div",B:"ytp-ad-player-overlay-layout__player-card-container"},{U:"div",B:"ytp-ad-player-overlay-layout__ad-info-container"},{U:"div",B:"ytp-ad-player-overlay-layout__skip-or-preview-container"},{U:"div",B:"ytp-ad-player-overlay-layout__ad-disclosure-banner-container"}]},"player-overlay-layout",y,k,z);this.C=r;this.Y=this.qd("ytp-ad-player-overlay-layout__player-card-container");this.Z=this.qd("ytp-ad-player-overlay-layout__ad-info-container");
this.S=this.qd("ytp-ad-player-overlay-layout__skip-or-preview-container");this.K=this.qd("ytp-ad-player-overlay-layout__ad-disclosure-banner-container");this.hide()}init(l,y,k,z){super.init(l,y,{});let r;y.skipOrPreview&&(k=y.skipOrPreview,l=g.E(k,IFT),k=g.E(k,mz5),l?(this.A$=new HKp(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,this.C),g.x(this,this.A$),this.A$.Uj(this.S),this.A$.init(kb("skip-ad"),l)):k&&this.api.getVideoData()?.isDaiEnabled()&&(this.V=new L4O(this.api,this.layoutId,
this.interactionLoggingClientData,this.l0,this.C,1),g.x(this,this.V),this.V.Uj(this.S),this.V.init(kb("ad-preview"),k),this.V.K()),l=g.E(y.skipOrPreview,IFT))&&(r=l.skipOffsetMilliseconds);y.playerAdCard&&(l=g.E(y.playerAdCard,qzy))&&(this.playerAdCard=new vvp(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,this.C),g.x(this,this.playerAdCard),this.playerAdCard.Uj(this.Y),this.playerAdCard.init(kb("ad-avatar-lockup-card"),l));y.adBadgeRenderer&&((l=g.E(y.adBadgeRenderer,GL))?(this.N=
new kT(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,!0),g.x(this,this.N),this.N.Uj(this.Z),this.N.init(kb("ad-badge"),l)):g.n(Error("AdBadgeViewModel is not found in player overlay layout.")));y.adPodIndex&&(l=g.E(y.adPodIndex,CE_))&&(this.adPodIndex=new DU5(this.api,this.layoutId,this.interactionLoggingClientData,this.l0),g.x(this,this.adPodIndex),this.adPodIndex.Uj(this.Z),this.adPodIndex.init(kb("ad-pod-index"),l));y.adInfoRenderer&&((l=g.E(y.adInfoRenderer,I5))?(this.adInfoButton=
new Z$(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,this.element,void 0,!0),g.x(this,this.adInfoButton),this.N!==void 0?this.Z.insertBefore(this.adInfoButton.element,this.N.element.nextSibling):this.adInfoButton.Uj(this.Z),this.adInfoButton.init(kb("ad-info-hover-text-button"),l,this.macros)):g.WH(Error("AdInfoRenderer is not found in player overlay layout.")));l=this.api.getVideoData()?.isDaiEnabled();y.adDurationRemaining&&l&&(l=g.E(y.adDurationRemaining,OOC))&&(this.adDurationRemaining=
new Da(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,this.C,z.videoAdDurationSeconds,!0),g.x(this,this.adDurationRemaining),this.adPodIndex!==void 0?this.Z.insertBefore(this.adDurationRemaining.element,this.adPodIndex.element.nextSibling):this.adDurationRemaining.Uj(this.Z),this.adDurationRemaining.init(kb("ad-duration-remaining"),l,this.macros),this.adDurationRemaining.element.classList.add("ytp-ad-duration-remaining-autohide"));y.visitAdvertiserLink&&(z=g.E(y.visitAdvertiserLink,
VNe))&&(this.visitAdvertiserLink=new RJe(this.api,this.layoutId,this.interactionLoggingClientData,this.l0),g.x(this,this.visitAdvertiserLink),this.visitAdvertiserLink.Uj(this.Z),this.visitAdvertiserLink.init(kb("visit-advertiser-link"),z));y.adDisclosureBanner&&(y=g.E(y.adDisclosureBanner,cry))&&(this.adDisclosureBanner=new lI5(this.api,this.layoutId,this.interactionLoggingClientData,this.l0),g.x(this,this.adDisclosureBanner),this.adDisclosureBanner.Uj(this.K),this.adDisclosureBanner.init(kb("ad-disclosure-banner"),
y));this.J=new d$(this.api,this.C,r,!0);g.x(this,this.J);g.pi(this.api,this.J.element,4);this.show()}clear(){this.hide()}};var Dyp=class extends fj{constructor(l,y,k,z){super(l,{U:"div",B:"ytp-ad-grid-card-text",W:[{U:"div",B:"ytp-ad-grid-card-text__metadata",W:[{U:"div",B:"ytp-ad-grid-card-text__metadata__headline"},{U:"div",B:"ytp-ad-grid-card-text__metadata__description",W:[{U:"div",B:"ytp-ad-grid-card-text__metadata__description__line"},{U:"div",B:"ytp-ad-grid-card-text__metadata__description__line"}]}]},{U:"div",B:"ytp-ad-grid-card-text__button"}]},"ad-grid-card-text",y,k,z);this.headline=new yZ(this.api,this.layoutId,
this.interactionLoggingClientData,this.l0);g.x(this,this.headline);this.headline.Uj(this.qd("ytp-ad-grid-card-text__metadata__headline"));this.moreInfoButton=new cj(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,!0);g.x(this,this.moreInfoButton);this.moreInfoButton.Uj(this.qd("ytp-ad-grid-card-text__button"))}init(l,y){super.init(l,y,{});if(y?.title)if(l=y.title)if(this.headline.init(kb("ad-simple-attributed-string"),new lb(l)),l=g.E(y.moreInfoButton,a8)){if(this.moreInfoButton.init(kb("ad-button"),
l),y.descriptions)y.descriptions.length>0&&(l=y.descriptions[0])&&(this.Z=new yZ(this.api,this.layoutId,this.interactionLoggingClientData,this.l0),g.x(this,this.Z),this.Z.Uj(this.element.getElementsByClassName("ytp-ad-grid-card-text__metadata__description__line")[0]),this.Z.init(kb("ad-simple-attributed-string"),new lb(l))),y.descriptions.length>1&&(y=y.descriptions[1])&&(this.C=new yZ(this.api,this.layoutId,this.interactionLoggingClientData,this.l0),g.x(this,this.C),this.C.Uj(this.element.getElementsByClassName("ytp-ad-grid-card-text__metadata__description__line")[1]),
this.C.init(kb("ad-simple-attributed-string"),new lb(y)))}else g.n(Error("No AdButtonViewModel is returned in AdGridCardText."));else g.n(Error("No headline found in AdGridCardText."));else g.n(Error("No headline found in AdGridCardText."))}onClick(l){super.onClick(l);this.api.pauseVideo();this.api.onAdUxClicked(this.componentType,this.layoutId)}clear(){this.hide();this.headline.clear();this.moreInfoButton.clear();this.Z?.clear();this.C?.clear()}hide(){this.headline.hide();this.moreInfoButton.hide();
this.Z?.hide();this.C?.hide();super.hide()}show(){super.show();this.headline.show();this.moreInfoButton.show();this.Z?.show();this.C?.show()}};var ljw=class extends fj{constructor(l,y,k,z){super(l,{U:"div",B:"ytp-ad-grid-card-collection"},"ad-grid-card-collection",y,k,z);this.Z=[]}init(l,y){super.init(l,y,{});if(y?.gridCards)if(y.style!=="AD_GRID_CARD_COLLECTION_STYLE_FIXED_ONE_COLUMN")g.n(Error("Only single column style is currently supported in AdGridCardCollection."));else for(const k of y.gridCards){if(y=g.E(k,xzq))l=new Dyp(this.api,this.layoutId,this.interactionLoggingClientData,this.l0),g.x(this,l),l.Uj(this.element),l.init(kb("ad-grid-card-text"),
y),this.Z.push(l)}else g.n(Error("No grid cards found in AdGridCardCollection."))}show(){for(const l of this.Z)l.show();super.show()}clear(){this.hide();for(const l of this.Z)l.clear()}hide(){for(const l of this.Z)l.hide();super.hide()}};var yVR=class extends Fr{constructor(l,y,k,z,r){super(l,{U:"div",B:"ytp-display-underlay-text-grid-cards",W:[{U:"div",B:"ytp-display-underlay-text-grid-cards__content_container",W:[{U:"div",B:"ytp-display-underlay-text-grid-cards__content_container__header",W:[{U:"div",B:"ytp-display-underlay-text-grid-cards__content_container__header__ad_avatar"},{U:"div",B:"ytp-display-underlay-text-grid-cards__content_container__header__headline"}]},{U:"div",B:"ytp-display-underlay-text-grid-cards__content_container__ad_grid_card_collection"},
{U:"div",B:"ytp-display-underlay-text-grid-cards__content_container__ad_button"}]}]},"display-underlay-text-grid-cards",y,k,z,r);this.playerProgressOffsetMs=0;this.C=!1}init(l,y,k,z,r=0){super.init(l,y,k,z);this.playerProgressOffsetMs=r;Yb(this);this.api.addEventListener("playerUnderlayVisibilityChange",this.K.bind(this));this.api.addEventListener("resize",this.S.bind(this));this.api.N$()?(this.C=!0,this.api.lN(!0),this.show()):this.hide()}N(){if(this.Z){var l=this.Z.getProgressState();l&&l.current&&
!this.C&&1E3*l.current>=this.playerProgressOffsetMs&&(this.C=!0,this.api.lN(!0),this.show())}}J(){this.C&&this.api.lN(!1);this.hide()}clear(){this.api.lN(!1);this.api.removeEventListener("playerUnderlayVisibilityChange",this.K.bind(this));this.api.removeEventListener("resize",this.S.bind(this));pe(this);this.hide()}hide(){Vcg(!1);super.hide()}show(){Vcg(!0);super.show()}};var FfC=class extends yVR{constructor(l,y,k,z,r){super(l,y,k,z,r);this.adGridCardCollection=new ljw(this.api,this.layoutId,this.interactionLoggingClientData,this.l0);g.x(this,this.adGridCardCollection);this.adGridCardCollection.Uj(this.qd("ytp-display-underlay-text-grid-cards__content_container__ad_grid_card_collection"));this.adButton=new cj(this.api,this.layoutId,this.interactionLoggingClientData,this.l0);g.x(this,this.adButton);this.adButton.Uj(this.qd("ytp-display-underlay-text-grid-cards__content_container__ad_button"));
this.V=this.qd("ytp-display-underlay-text-grid-cards__content_container");this.sj=this.qd("ytp-display-underlay-text-grid-cards__content_container__header")}init(l,y,k,z){if(y?.adGridCardCollection)if(y?.adButton){var r=Number(y.playerProgressOffsetMs||"0");isNaN(r)?super.init(l,y,k,z):super.init(l,y,k,z,r);l=y.headline;k=g.E(y.adAvatar,hf);l&&k?(this.headline=new yZ(this.api,this.layoutId,this.interactionLoggingClientData,this.l0),g.x(this,this.headline),this.headline.Uj(this.qd("ytp-display-underlay-text-grid-cards__content_container__header__headline")),
this.headline.init(kb("ad-simple-attributed-string"),new lb(l)),this.adAvatar=new XO(this.api,this.layoutId,this.interactionLoggingClientData,this.l0),g.x(this,this.adAvatar),this.adAvatar.Uj(this.qd("ytp-display-underlay-text-grid-cards__content_container__header__ad_avatar")),this.adAvatar.init(kb("ad-avatar"),k)):this.sj.classList.remove("ytp-display-underlay-text-grid-cards__content_container__header");l=g.E(y.adGridCardCollection,uO4);this.adGridCardCollection.init(kb("ad-grid-card-collection"),
l);y=g.E(y.adButton,a8);this.adButton.init(kb("ad-button"),y);this.hide()}else g.n(Error("No button found in DisplayUnderlayTextGridCardsLayout."));else g.n(Error("No grid cards found in DisplayUnderlayTextGridCardsLayout."))}onClick(l){(this.adButton&&g.cf(this.adButton.element,l.target)||this.adAvatar&&g.cf(this.adAvatar.element,l.target))&&this.api.pauseVideo();super.onClick(l);this.api.onAdUxClicked(this.componentType,this.layoutId)}S(){}clear(){this.hide();this.headline?.clear();this.adAvatar?.clear();
this.adGridCardCollection.clear();this.adButton.clear();super.clear()}show(){this.headline?.show();this.adAvatar?.show();this.adGridCardCollection.show();this.adButton.show();super.show()}hide(){this.headline?.hide();this.adAvatar?.hide();this.adGridCardCollection.hide();this.adButton.hide();super.hide()}K(l){l==="transitioning"?(this.V.classList.remove("ytp-ad-underlay-clickable"),this.show()):l==="visible"?this.V.classList.add("ytp-ad-underlay-clickable"):l==="hidden"&&(this.hide(),this.V.classList.remove("ytp-ad-underlay-clickable"))}};var kfy=class extends fj{constructor(l,y,k,z){super(l,{U:"div",B:"ytp-ad-details-line"},"ad-details-line",y,k,z);this.Z=[];this.hide()}init(l,y){super.init(l,y,{});if(y.attributes===void 0)g.n(Error("No attributes found in AdDetailsLineViewModel."));else if(y.style===void 0)g.n(Error("No style found in AdDetailsLineViewModel."));else{for(const z of y.attributes)if(z.text!==void 0){l=z.text;var k=y.style;const r=new yZ(this.api,this.layoutId,this.interactionLoggingClientData,this.l0);g.x(this,r);r.Uj(this.element);
a:switch(k){case "AD_DETAILS_LINE_STYLE_RESPONSIVE":k="ytp-ad-details-line__text--style-responsive";break a;default:k="ytp-ad-details-line__text--style-standard"}r.element.classList.add(k);r.init(kb("ad-simple-attributed-string"),new lb(l));this.Z.push(r)}this.show()}}show(){this.Z.forEach(l=>{l.show()});
super.show()}clear(){this.hide()}hide(){this.Z.forEach(l=>{l.hide()});
super.hide()}};var zA2=class extends fj{constructor(l,y,k,z){super(l,{U:"div",B:"ytp-image-background",W:[{U:"img",B:"ytp-image-background-image"}]},"image-background",y,k,z);this.hide()}init(l,y){super.init(l,y,{});if((l=IA(y.image?.sources||[])?.url||"")&&l.length){var k=this.qd("ytp-image-background-image");g.n9(k,"backgroundImage",`url(${l})`);y.blurLevel!==void 0&&g.n9(k,"filter",`blur(${y.blurLevel}px)`);y.gradient!==void 0&&(y=new g.H({U:"div",L_:["ytp-image-background--gradient-vertical"]}),g.x(this,y),
y.Uj(this.element));this.show()}else g.n(Error("Failed to get imageUrl in ImageBackground."))}clear(){this.hide()}};var rVy=class extends Fr{constructor(l,y,k,z,r){super(l,{U:"svg",B:"ytp-timed-pie-countdown",G:{viewBox:"0 0 20 20"},W:[{U:"circle",B:"ytp-timed-pie-countdown__background",G:{r:"10",cx:"10",cy:"10"}},{U:"circle",B:"ytp-timed-pie-countdown__inner",G:{r:"5",cx:"10",cy:"10"}},{U:"circle",B:"ytp-timed-pie-countdown__outer",G:{r:"10",cx:"10",cy:"10"}}]},"timed-pie-countdown",y,k,z,r);this.V=this.qd("ytp-timed-pie-countdown__inner");this.C=Math.ceil(2*Math.PI*5);this.hide()}init(l,y){super.init(l,y,{});
g.n9(this.V,"stroke-dasharray",`0 ${this.C}`);this.show()}clear(){this.hide()}hide(){pe(this);super.hide()}show(){Yb(this);super.show()}J(){this.hide()}N(){if(this.Z){var l=this.Z.getProgressState();l!=null&&l.current!=null&&g.n9(this.V,"stroke-dasharray",`${l.current/l.seekableEnd*this.C} ${this.C}`)}}};var fU5=class extends fj{constructor(l,y,k,z){super(l,{U:"div",B:"ytp-video-interstitial-buttoned-centered-layout",G:{tabindex:"0"},W:[{U:"div",B:"ytp-video-interstitial-buttoned-centered-layout__content",W:[{U:"div",B:"ytp-video-interstitial-buttoned-centered-layout__content__instream-info-container"},{U:"div",B:"ytp-video-interstitial-buttoned-centered-layout__content__lockup",W:[{U:"div",B:"ytp-video-interstitial-buttoned-centered-layout__content__lockup__ad-avatar-container"},{U:"div",B:"ytp-video-interstitial-buttoned-centered-layout__content__lockup__headline-container"},
{U:"div",B:"ytp-video-interstitial-buttoned-centered-layout__content__lockup__details-line-container"},{U:"div",B:"ytp-video-interstitial-buttoned-centered-layout__content__lockup__ad-button-container"}]}]},{U:"div",B:"ytp-video-interstitial-buttoned-centered-layout__timed-pie-countdown-container"}]},"video-interstitial-buttoned-centered",y,k,z);this.C=null;this.V=this.qd("ytp-video-interstitial-buttoned-centered-layout__content__instream-info-container");this.N=new IT;g.x(this,this.N);this.hide()}init(l,
y){super.init(l,y,{});if(JlC(y)){this.adAvatar=new XO(this.api,this.layoutId,this.interactionLoggingClientData,this.l0);g.x(this,this.adAvatar);this.adAvatar.Uj(this.qd("ytp-video-interstitial-buttoned-centered-layout__content__lockup__ad-avatar-container"));this.adAvatar.init(kb("ad-avatar"),g.E(y.adAvatar,hf));this.headline=new yZ(this.api,this.layoutId,this.interactionLoggingClientData,this.l0);g.x(this,this.headline);this.headline.Uj(this.qd("ytp-video-interstitial-buttoned-centered-layout__content__lockup__headline-container"));
this.headline.element.classList.add("ytp-video-interstitial-buttoned-centered-layout__content__lockup__headline");this.headline.init(kb("ad-simple-attributed-string"),new lb(y.headline));if(l=g.E(y.adDetailsLine,XjQ))this.detailsLine=new kfy(this.api,this.layoutId,this.interactionLoggingClientData,this.l0),g.x(this,this.detailsLine),this.detailsLine.Uj(this.qd("ytp-video-interstitial-buttoned-centered-layout__content__lockup__details-line-container")),this.detailsLine.init(kb("ad-details-line"),l);
this.adButton=new cj(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,!0);g.x(this,this.adButton);this.adButton.Uj(this.qd("ytp-video-interstitial-buttoned-centered-layout__content__lockup__ad-button-container"));this.adButton.init(kb("ad-button"),g.E(y.adButton,a8));this.adBadge=new kT(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,!0);g.x(this,this.adBadge);this.adBadge.Uj(this.V);this.adBadge.init(kb("ad-badge"),g.E(y.adBadge,GL));this.adInfoButton=new Z$(this.api,
this.layoutId,this.interactionLoggingClientData,this.l0,this.element,void 0,!0);g.x(this,this.adInfoButton);this.adInfoButton.Uj(this.V);this.adInfoButton.init(kb("ad-info-hover-text-button"),g.E(y.adInfoRenderer,I5),this.macros);if(l=g.E(y.skipAdButton,WQg))this.skipAdButton=new Bf2(this.api,this.layoutId,this.interactionLoggingClientData,this.l0),g.x(this,this.skipAdButton),this.skipAdButton.Uj(this.element),this.skipAdButton.init(kb("skip-button"),l);this.C=new RT(y.durationMilliseconds);g.x(this,
this.C);if(l=g.E(y.countdownViewModel,T1e))this.Z=new rVy(this.api,this.layoutId,this.interactionLoggingClientData,this.l0,this.C),g.x(this,this.Z),this.Z.Uj(this.qd("ytp-video-interstitial-buttoned-centered-layout__timed-pie-countdown-container")),this.Z.init(kb("timed-pie-countdown"),l);if(y=g.E(y.imageBackground,bOC))this.imageBackground=new zA2(this.api,this.layoutId,this.interactionLoggingClientData,this.l0),g.x(this,this.imageBackground),this.imageBackground.Uj(this.element),this.imageBackground.element.classList.add("ytp-video-interstitial-buttoned-centered-layout__background-image-container"),
this.imageBackground.init(kb("image-background"),y);this.show();this.element.focus()}}clear(){this.N.C();this.hide()}show(){Pf4(!0);this.adAvatar&&this.adAvatar.show();this.headline&&this.headline.show();this.adButton&&this.adButton.show();this.skipAdButton&&this.skipAdButton.show();super.show()}hide(){Pf4(!1);this.adAvatar&&this.adAvatar.hide();this.headline&&this.headline.hide();this.adButton&&this.adButton.hide();this.detailsLine&&this.detailsLine.hide();this.adBadge&&this.adBadge.hide();this.adInfoButton&&
this.adInfoButton.hide();this.skipAdButton&&this.skipAdButton.hide();this.Z&&this.Z.hide();this.imageBackground&&this.imageBackground.hide();super.hide()}};var i3=class extends g.z1{constructor(l,y=2){super();this.api=l;this.Z=null;this.handler=new IT(this);g.x(this,this.handler);this.C=syq;this.handler.j(this.api,"presentingplayerstatechange",this.N);this.Z=this.handler.j(this.api,"progresssync",this.Pn);this.iS=y;this.iS===1&&this.Pn()}Vt(){return 1E3*this.api.getDuration({playerType:this.iS,D5:!1})}stop(){this.Z&&this.handler.uq(this.Z)}Pn(){const l=this.api.getProgressState(this.iS);this.C={seekableStart:l.seekableStart,seekableEnd:l.seekableEnd,
current:this.api.getCurrentTime({playerType:this.iS,D5:!1})};this.publish("h")}getProgressState(){return this.C}N(l){l.tj(2)&&this.publish("g")}};var Z9v="ad-attribution-bar ad-channel-thumbnail advertiser-name ad-preview ad-title skip-button visit-advertiser".split(" ").concat("shopping-companion action-companion image-companion ads-engagement-panel ads-engagement-panel-layout banner-image top-banner-image-text-icon-buttoned".split(" ")),eAO=class extends NgT{constructor(l,y,k){super(l);this.api=l;this.l0=y;this.components={};l=new g.H({U:"div",L_:["video-ads","ytp-ad-module"]});g.x(this,l);L2&&g.zi(l.element,"ytp-ads-tiny-mode");this.J=new Ju(l.element);
g.x(this,this.J);g.pi(this.api,l.element,4);pw(k)&&(k=new g.H({U:"div",L_:["ytp-ad-underlay"]}),g.x(this,k),this.N=new Ju(k.element),g.x(this,this.N),g.pi(this.api,k.element,0));g.x(this,l2z())}V(l){var y=l.id,k=l.content;const z=k.componentType;if(!Z9v.includes(z))switch(l.actionType){case 1:l=o8Q(z,this.api,this.l0,k.layoutId,k.interactionLoggingClientData,k instanceof aB?k.R$:!1,k instanceof aB||k instanceof Hx?k.Ib:!1);if(!l){g.WH(Error("No UI component returned from ComponentFactory for type: "+
z));break}g.vO(this.components,y)?g.WH(Error("Ad UI component already registered: "+y)):this.components[y]=l;l.bind(k);k instanceof Ly5?this.N?this.N.append(l.TY):g.WH(Error("Underlay view was not created but UnderlayRenderer was created")):this.J.append(l.TY);break;case 2:y=Nyg(this,l);if(y==null)break;y.bind(k);break;case 3:k=Nyg(this,l),k!=null&&(g.yb(k),g.vO(this.components,y)?(k=this.components,y in k&&delete k[y]):g.WH(Error("Ad UI component does not exist: "+y)))}}Vj(){g.kj(Object.values(this.components));
this.components={};super.Vj()}};var AVx=class extends g.f1{constructor(l){super(l);this.C=null;this.created=!1;this.N=new VD1(this.player);this.V=()=>this.C!=null?this.C:this.C=(new JYx({pK:yP(this.Z).pK,gz:yP(this.Z).gz,L:this.player,E7:yP(this.Z).E7,Se:this.Z.Z.Se,LJ:yP(this.Z).LJ,GM:this.Z.Z.GM})).C;
this.Z=new nv2(this.player,this,this.N,this.V);g.x(this,this.Z);const y=l.O();!OH(y)||g.aq(y)||uh(y)||(g.x(this,new eAO(l,yP(this.Z).l0,yP(this.Z).E7)),g.x(this,new F4x(l)))}create(){try{By5(this),this.load(),this.created=!0,By5(this)}catch(l){EP(l instanceof Error?l:String(l))}}load(){this.J()}J(){super.load();var l=yP(this.Z).E7;try{this.player.getRootNode().classList.add("ad-created")}catch(e){EP(e instanceof Error?e:String(e))}var y=this.player.getVideoData({playerType:1});const k=y&&y.videoId||
"";var z=y&&y.getPlayerResponse()||{},r=(z&&z.adPlacements||[]).map(e=>e.adPlacementRenderer),Z=(z?.adSlots||[]).map(e=>g.E(e,xt));
z=z.playerConfig&&z.playerConfig.daiConfig&&z.playerConfig.daiConfig.enableDai||!1;y&&y.UA();l=s64(r,Z,l,yP(this.Z).TQ);r=y&&y.clientPlaybackNonce||"";y=y&&y.vO||!1;Z=1E3*this.player.getDuration({playerType:1});this.player.getVideoData({playerType:1})?.vO||yl5(this.player)&&jRe(this.player.getInternalApi());this.Z.Z.mu.Ft(r,Z,y,l.Jo,l.ZA,l.Jo,z,k)}destroy(){const l=this.player.getVideoData({playerType:1});this.Z.Z.mu.pA(l&&l.clientPlaybackNonce||"");this.unload();this.created=!1}unload(){super.unload();
try{this.player.getRootNode().classList.remove("ad-created")}catch(l){EP(l instanceof Error?l:String(l))}if(this.C!=null){const l=this.C;this.C=null;l.dispose()}this.N.reset()}Xf(){return!1}getAdState(){return-1}getOptions(){return Object.values(PiB)}ef(l,y={}){switch(l){case "replaceUrlMacros":return y.url?(l=x_C(this.player),Object.assign(l,y.Ol$),y=g.TB(y.url,l)):y=null,y;case "onAboutThisAdPopupClosed":this.It(y);break;case "executeCommand":y.command&&y.layoutId&&this.executeCommand(y);break;
default:return null}}rN(l,y){return!!this.Z.Z.Ba?.get().rN(l,y)}It(l){l.isMuted&&L5P(yP(this.Z).LJ,yP(this.Z).pK,l.layoutId);this.Tz&&this.Tz.It()}executeCommand(l){yP(this.Z).l0.executeCommand(l.command,l.layoutId)}};g.iQ("yt.player.Application.create",g.zY.create);g.iQ("yt.player.Application.createAlternate",g.zY.create);LIC(bq(),Tfe);var $jO=g.UT("ytcsi.tick");$jO&&$jO("pe");g.EZ("ad",AVx);g.Qpf=class extends g.zP{constructor(l){super();this.callback=l;this.Z=new c9(0,0,.4,0,.2,1,1,1);this.delay=new g.sj(this.next,window,this);g.x(this,this.delay)}start(l,y,k){this.config={from:l,to:y,duration:k,startTime:(0,g.f)()};this.next()}stop(){this.delay.stop();this.config=void 0}next(){if(this.config){var l=this.config.from,y=this.config.to,k=this.config.duration,z=this.config.startTime;z=(0,g.f)()-z;var r=this.Z;k=g.gf(bu(r,uu(r,z/k)),0,1);this.callback(l+(y-l)*k);k<1&&this.delay.start()}}};g.tUw=class extends g.H{constructor(l){super({U:"div",B:"ytp-more-videos-view",G:{tabIndex:"-1"}});this.api=l;this.C=!0;this.N=new g.cI(this);this.Z=[];this.suggestionData=[];this.columns=this.containerWidth=this.K=this.V=this.scrollPosition=0;this.title=new g.H({U:"h2",B:"ytp-related-title",Nd:"{{title}}"});this.previous=new g.H({U:"button",L_:["ytp-button","ytp-previous"],G:{"aria-label":"Hi\u1ec3n th\u1ecb c\u00e1c video \u0111\u1ec1 xu\u1ea5t tr\u01b0\u1edbc \u0111\u00f3"},W:[g.OP()]});this.S=
new g.Qpf(y=>{this.suggestions.element.scrollLeft=-y});
this.next=new g.H({U:"button",L_:["ytp-button","ytp-next"],G:{"aria-label":"Hi\u1ec7n th\u00eam video \u0111\u1ec1 xu\u1ea5t"},W:[g.dM()]});g.x(this,this.N);this.J=l.O().V;g.x(this,this.title);this.title.Uj(this.element);this.suggestions=new g.H({U:"div",B:"ytp-suggestions"});g.x(this,this.suggestions);this.suggestions.Uj(this.element);g.x(this,this.previous);this.previous.Uj(this.element);this.previous.listen("click",this.D,this);g.x(this,this.S);Rxz(this);g.x(this,this.next);this.next.Uj(this.element);
this.next.listen("click",this.A,this);this.N.j(this.api,"appresize",this.TE);this.N.j(this.api,"fullscreentoggled",this.BU);this.N.j(this.api,"videodatachange",this.onVideoDataChange);this.TE(this.api.Yz().getPlayerSize());this.onVideoDataChange()}hasSuggestions(){return this.suggestionData.length>0}A(){this.C&&this.scrollTo(this.scrollPosition-this.containerWidth)}show(){super.show();DX4(this)}D(){this.C&&this.scrollTo(this.scrollPosition+this.containerWidth)}BU(){this.TE(this.api.Yz().getPlayerSize())}TE(l){var y=
this.api.isEmbedsShortsMode()?.5625:16/9,k=this.api.qV();l=l.width-(k?112:58);k=Math.ceil(l/(k?320:192));const z=(l-k*8)/k;y=Math.floor(z/y);for(const r of this.Z){const Z=r.qd("ytp-suggestion-image");Z.style.width=`${z}px`;Z.style.height=`${y}px`}this.suggestions.element.style.height=`${y}px`;this.V=z;this.K=y;this.containerWidth=l;this.columns=k;this.scrollPosition=0;this.suggestions.element.scrollLeft=-0;g.cb(this)}onVideoDataChange(){const l=this.api.O(),y=this.api.getVideoData();this.J=y.Wn?
!1:l.V;this.suggestionData=y.suggestions?g.oC(y.suggestions,k=>k&&!k.playlistId):[];
yfC(this);y.Wn?this.title.update({title:g.Ts("Video kh\u00e1c t\u1eeb $DNI_RELATED_CHANNEL",{DNI_RELATED_CHANNEL:y.author})}):this.title.update({title:this.api.isEmbedsShortsMode()?"Video ng\u1eafn kh\u00e1c":"Video kh\u00e1c"})}scrollTo(l){l=g.gf(l,this.containerWidth-this.suggestionData.length*(this.V+8),0);this.S.start(this.scrollPosition,l,1E3);this.scrollPosition=l;g.cb(this);DX4(this)}};})(_yt_player);
