(function(g){var window=this;'use strict';var MbI=function(X){if(X instanceof g.ON)return X;if(typeof X.lW=="function")return X.lW(!1);if(g.i8(X)){var J=0,L=new g.ON;L.next=function(){for(;;){if(J>=X.length)return g.yJ;if(J in X)return g.aM(X[J++]);J++}}; return L}throw Error("Not implemented");},yI3=function(X,J,L){if(g.i8(X))g.mF(X,J,L); else for(X=MbI(X);;){var x=X.next();if(x.done)break;J.call(L,x.value,void 0,X)}},Ac=function(X){g.$v(X,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.$u()).toString(36)); return X},XK=function(X,J,L){Array.isArray(L)||(L=[String(L)]); g.fQY(X.T,J,L)},nPI=function(X,J){var L=[]; yI3(J,function(x){try{var Q=g.Pp.prototype.K.call(this,x,!0)}catch(K){if(K=="Storage: Invalid value was encountered")return;throw K;}Q===void 0?L.push(x):g.UYY(Q)&&L.push(x)},X); return L},Vbv=function(X,J){nPI(X,J).forEach(function(L){g.Pp.prototype.remove.call(this,L)},X)},HpS=function(X){if(X.ek){if(X.ek.locationOverrideToken)return{locationOverrideToken:X.ek.locationOverrideToken}; if(X.ek.latitudeE7!=null&&X.ek.longitudeE7!=null)return{latitudeE7:X.ek.latitudeE7,longitudeE7:X.ek.longitudeE7}}return null},OpC=function(X,J){g.tS(X,J)||X.push(J)},aBF=function(X){var J=0,L; for(L in X)J++;return J},wu8=function(X,J){return g.$S(X,J)},tbV=function(X){try{return g.Ao.JSON.parse(X)}catch(J){}X=String(X); if(/^\s*$/.test(X)?0:/^[\],:{}\s\u2028\u2029]*$/.test(X.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+X+")")}catch(J){}throw Error("Invalid JSON string: "+X);},J7=function(X){if(g.Ao.JSON)try{return g.Ao.JSON.parse(X)}catch(J){}return tbV(X)},dD0=function(){var X=Lx(); this.L=X;X.AK("/client_streamz/youtube/living_room/mdx/channel/opened",g.i6("channel_type"))},u$3=function(){var X=Lx(); this.L=X;X.AK("/client_streamz/youtube/living_room/mdx/channel/closed",g.i6("channel_type"))},oP0=function(){var X=Lx(); this.L=X;X.AK("/client_streamz/youtube/living_room/mdx/channel/message_received",g.i6("channel_type"))},bpe=function(){var X=Lx(); this.L=X;X.AK("/client_streamz/youtube/living_room/mdx/channel/success")},SIV=function(){var X=Lx(); this.L=X;X.AK("/client_streamz/youtube/living_room/mdx/channel/error",g.i6("channel_type"),g.i6("error_type"))},PyH=function(){var X=Lx(); this.L=X;X.AK("/client_streamz/youtube/living_room/mdx/browser_channel/pending_maps")},cI0=function(){var X=Lx(); this.L=X;X.AK("/client_streamz/youtube/living_room/mdx/browser_channel/undelivered_maps")},EPH=function(X,J,L,x){var Q=new g.xv(null); X&&g.iW(Q,X);J&&g.Qj(Q,J);L&&g.KT(Q,L);x&&(Q.K=x);return Q},YIH=function(X,J){return new g.AA(X,J)},xM=function(X,J){return Object.prototype.hasOwnProperty.call(X,J)},hR0=function(X,J){return X===J},ij=function(X,J){this.K={}; this.L=[];this.w6=this.size=0;var L=arguments.length;if(L>1){if(L%2)throw Error("Uneven number of arguments");for(var x=0;x5&&(X=X.slice(X.length-5)); var J=g.H5(nb8(),function(x){return x.loungeToken}),L=g.H5(X,function(x){return x.loungeToken}); g.Ot(L,function(x){return!g.tS(J,x)})&&V7F(); g.El("yt-remote-local-screens",X,31536E3)},Mj=function(X){X||(g.h3("yt-remote-session-screen-id"),g.h3("yt-remote-session-video-id")); M7d();X=$M();g.u8(X,Cx());$Ve(X)},OUv=function(){if(!yE){var X=g.Wp(); X&&(yE=new g.of(X))}},aEu=function(){OUv(); return yE?!!yE.get("yt-remote-use-staging-server"):!1},nx=function(X,J){g.Ua[X]=!0; var L=g.sa();L&&L.publish.apply(L,arguments);g.Ua[X]=!1},w6d=function(){},Lx=function(){if(!VE){VE=new g.TL(new w6d); var X=g.H6("client_streamz_web_flush_count",-1);X!==-1&&(VE.N=X)}return VE},t7F=function(){var X=window.navigator.userAgent.match(/Chrome\/([0-9]+)/); return X?parseInt(X[1],10):0},dVF=function(X){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+X)!=-1||document.currentScript.src.indexOf("&"+X)!=-1)},uUC=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},HD=function(X){X.length?ob8(X.shift(),function(){HD(X)}):bUI()},SvV=function(X){return"chrome-extension://"+X+"/cast_sender.js"},ob8=function(X,J,L){var x=document.createElement("script"); x.onerror=J;L&&(x.onload=L);g.wZ(x,g.tI(X));(document.head||document.documentElement).appendChild(x)},PZv=function(){var X=t7F(),J=[]; if(X>1){var L=X-1;J.push("//www.gstatic.com/eureka/clank/"+X+"/cast_sender.js");J.push("//www.gstatic.com/eureka/clank/"+L+"/cast_sender.js")}return J},bUI=function(){var X=uUC(); X&&X(!1,"No cast extension found")},Ebu=function(){if(c8F){var X=2,J=uUC(),L=function(){X--; X==0&&J&&J(!0)}; window.__onGCastApiAvailable=L;ob8("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",bUI,L)}},Yvd=function(){Ebu(); var X=PZv();X.push("//www.gstatic.com/eureka/clank/cast_sender.js");HD(X)},z0C=function(){Ebu(); var X=PZv();X.push.apply(X,g.nR(h0V.map(SvV)));X.push("//www.gstatic.com/eureka/clank/cast_sender.js");HD(X)},OP=function(X,J,L){g.G.call(this); this.B=L!=null?(0,g.IH)(X,L):X;this.MP=J;this.j=(0,g.IH)(this.Yb,this);this.L=!1;this.K=0;this.N=this.bH=null;this.T=[]},aP=function(){},WHF=function(){g.BI.call(this,"p")},p6e=function(){g.BI.call(this,"o")},vbS=function(){return r8d=r8d||new g.$W},jhe=function(X){g.BI.call(this,"serverreachability",X)},wH=function(X){var J=vbS(); J.dispatchEvent(new jhe(J,X))},TPI=function(X){g.BI.call(this,"statevent",X)},t7=function(X){var J=vbS(); J.dispatchEvent(new TPI(J,X))},Goe=function(X,J,L,x){g.BI.call(this,"timingevent",X); this.size=J;this.rtt=L;this.retries=x},dH=function(X,J){if(typeof X!=="function")throw Error("Fn must not be null and must be a function"); return g.Ao.setTimeout(function(){X()},J)},uj=function(){},oP=function(X,J,L,x){this.N=X; this.T=J;this.If=L;this.H4=x||1;this.A0=new g.Vj(this);this.O6=45E3;this.vl=null;this.B=!1;this.D=this.SC=this.S=this.jC=this.Pl=this.Cm=this.Km=null;this.aB=[];this.L=null;this.W=0;this.j=this.FE=null;this.Lp=-1;this.Bl=!1;this.J0=0;this.bB=null;this.z6=this.Hl=this.Nx=this.gI=!1;this.K=new fEF},fEF=function(){this.N=null; this.L="";this.K=!1},FHu=function(X,J,L){X.jC=1; X.S=Ac(J.clone());X.D=L;X.gI=!0;e0H(X,null)},e0H=function(X,J){X.Pl=Date.now(); bj(X);X.SC=X.S.clone();XK(X.SC,"t",X.H4);X.W=0;var L=X.N.jC;X.K=new fEF;X.L=lE0(X.N,L?J:null,!X.D);X.J0>0&&(X.bB=new g.kv((0,g.IH)(X.s$,X,X.L),X.J0));X.A0.listen(X.L,"readystatechange",X.HU);J=X.vl?g.Vf(X.vl):{};X.D?(X.FE||(X.FE="POST"),J["Content-Type"]="application/x-www-form-urlencoded",X.L.send(X.SC,X.FE,X.D,J)):(X.FE="GET",X.L.send(X.SC,X.FE,null,J));wH(1)},BPF=function(X){if(!R0C(X))return g.UQ(X.L); var J=g.m5(X.L);if(J==="")return"";var L="",x=J.length,Q=g.sQ(X.L)==4;if(!X.K.N){if(typeof TextDecoder==="undefined")return SW(X),PD(X),"";X.K.N=new g.Ao.TextDecoder}for(var K=0;KJ.length)return shV;J=J.slice(x,x+L);X.W=x+L;return J},bj=function(X){X.Cm=Date.now()+X.O6; mVF(X,X.O6)},mVF=function(X,J){if(X.Km!=null)throw Error("WatchDog timer not null"); X.Km=dH((0,g.IH)(X.IM,X),J)},ko3=function(X){X.Km&&(g.Ao.clearTimeout(X.Km),X.Km=null)},PD=function(X){X.N.eW()||X.Bl||ZU3(X.N,X)},SW=function(X){ko3(X); g.Lq(X.bB);X.bB=null;X.A0.removeAll();if(X.L){var J=X.L;X.L=null;J.abort();J.dispose()}},Knd=function(X,J){try{var L=X.N; if(L.t2!=0&&(L.L==X||A8I(L.K,X)))if(!X.Hl&&A8I(L.K,X)&&L.t2==3){try{var x=L.fY.L.parse(J)}catch(u){x=null}if(Array.isArray(x)&&x.length==3){var Q=x;if(Q[0]==0)a:{if(!L.S){if(L.L)if(L.L.Pl+3E30&&(L.J0=1.5*D);x=L;var C=X.jS();if(C){var M=g.kW(C,"X-Client-Wire-Protocol");if(M){var y=x.K;!y.L&&(g.hn(M,"spdy")||g.hn(M,"quic")||g.hn(M,"h2"))&&(y.T=y.j,y.L=new Set,y.K&&(LnC(y,y.K),y.K=null))}if(x.gI){var n=g.kW(C,"X-HTTP-Session-Id");n&&(x.ek=n,g.$v(x.vl,x.gI,n))}}L.t2=3;L.j&&L.j.Xd();L.t_&&(L.H9=Date.now()-X.Pl);x=L;var V=X;x.pO=xkd(x,x.jC?x.H4:null,x.If);if(V.Hl){ilS(x.K, V);var H=V,O=x.J0;O&&H.setTimeout(O);H.Km&&(ko3(H),bj(H));x.L=V}else Q2S(x);L.N.length>0&&h7(L)}else K[0]!="stop"&&K[0]!="close"||YM(L,7);else L.t2==3&&(K[0]=="stop"||K[0]=="close"?K[0]=="stop"?YM(L,7):L.disconnect():K[0]!="noop"&&L.j&&L.j.cG(K),L.aB=0)}wH(4)}catch(u){}},qlv=function(X,J){this.L=X; this.map=J;this.context=null},Il0=function(X){this.j=X||10; g.Ao.PerformanceNavigationTiming?(X=g.Ao.performance.getEntriesByType("navigation"),X=X.length>0&&(X[0].nextHopProtocol=="hq"||X[0].nextHopProtocol=="h2")):X=!!(g.Ao.chrome&&g.Ao.chrome.loadTimes&&g.Ao.chrome.loadTimes()&&g.Ao.chrome.loadTimes().wasFetchedViaSpdy);this.T=X?this.j:1;this.L=null;this.T>1&&(this.L=new Set);this.K=null;this.N=[]},g1H=function(X){return X.K?!0:X.L?X.L.size>=X.T:!1},J3S=function(X){return X.K?1:X.L?X.L.size:0},A8I=function(X,J){return X.K?X.K==J:X.L?X.L.has(J):!1},LnC= function(X,J){X.L?X.L.add(J):X.K=J},ilS=function(X,J){X.K&&X.K==J?X.K=null:X.L&&X.L.has(J)&&X.L.delete(J)},DkV=function(X){if(X.K!=null)return X.N.concat(X.K.aB); if(X.L!=null&&X.L.size!==0){var J=X.N;X=g.d(X.L.values());for(var L=X.next();!L.done;L=X.next())J=J.concat(L.value.aB);return J}return g.Yu(X.N)},$k0=function(X,J){var L=new uj; if(g.Ao.Image){var x=new Image;x.onload=g.g3(zJ,L,"TestLoadImage: loaded",!0,J,x);x.onerror=g.g3(zJ,L,"TestLoadImage: error",!1,J,x);x.onabort=g.g3(zJ,L,"TestLoadImage: abort",!1,J,x);x.ontimeout=g.g3(zJ,L,"TestLoadImage: timeout",!1,J,x);g.Ao.setTimeout(function(){if(x.ontimeout)x.ontimeout()},1E4); x.src=X}else J(!1)},Cuu=function(X,J){var L=new uj,x=new AbortController,Q=setTimeout(function(){x.abort(); zJ(L,"TestPingServer: timeout",!1,J)},1E4); fetch(X,{signal:x.signal}).then(function(K){clearTimeout(Q);K.ok?zJ(L,"TestPingServer: ok",!0,J):zJ(L,"TestPingServer: server error",!1,J)}).catch(function(){clearTimeout(Q); zJ(L,"TestPingServer: error",!1,J)})},zJ=function(X,J,L,x,Q){try{Q&&(Q.onload=null,Q.onerror=null,Q.onabort=null,Q.ontimeout=null),x(L)}catch(K){}},MfC=function(){this.L=new aP},y33=function(X,J,L){var x=L||""; try{g.LT(X,function(Q,K){var q=Q;g.Q0(Q)&&(q=g.fA(Q));J.push(x+K+"="+encodeURIComponent(q))})}catch(Q){throw J.push(x+"type="+encodeURIComponent("_badmap")),Q; }},WD=function(X,J,L){return L&&L.F0?L.F0[X]||J:J},n1V=function(X){this.N=[]; this.H4=this.pO=this.vl=this.If=this.L=this.ek=this.gI=this.Bl=this.W=this.Lp=this.D=null;this.o2=this.SC=0;this.jT=WD("failFast",!1,X);this.Hl=this.Km=this.S=this.B=this.j=null;this.sH=!0;this.RT=this.bB=-1;this.z6=this.aB=this.Pl=0;this.BO=WD("baseRetryDelayMs",5E3,X);this.YU=WD("retryDelaySeedMs",1E4,X);this.qQ=WD("forwardChannelMaxRetries",2,X);this.oT=WD("forwardChannelRequestTimeoutMs",2E4,X);this.jk=X&&X.jUC||void 0;this.HO=X&&X.kw6||void 0;this.r0=X&&X.QUl||!1;this.J0=void 0;this.jC=X&&X.Fkl|| !1;this.T="";this.K=new Il0(X&&X.bqC);this.fY=new MfC;this.A0=X&&X.fk6||!1;this.Cm=X&&X.yRY||!1;this.A0&&this.Cm&&(this.Cm=!1);this.In=X&&X.ICE||!1;X&&X.wkm&&(this.sH=!1);this.t_=!this.A0&&this.sH&&X&&X.OqB||!1;this.YF=void 0;X&&X.gD&&X.gD>0&&(this.YF=X.gD);this.XX=void 0;this.H9=0;this.O6=!1;this.Nx=this.FE=null},EP=function(X){X.L&&(VfS(X),X.L.cancel(),X.L=null)},HlH=function(X){EP(X); X.S&&(g.Ao.clearTimeout(X.S),X.S=null);cD(X);X.K.cancel();X.B&&(typeof X.B==="number"&&g.Ao.clearTimeout(X.B),X.B=null)},h7=function(X){g1H(X.K)||X.B||(X.B=!0,g.dJ(X.MV,X),X.Pl=0)},al8=function(X,J){if(J3S(X.K)>=X.K.T-(X.B?1:0))return!1; if(X.B)return X.N=J.aB.concat(X.N),!0;if(X.t2==1||X.t2==2||X.Pl>=(X.jT?0:X.qQ))return!1;X.B=dH((0,g.IH)(X.MV,X,J),Ole(X,X.Pl));X.Pl++;return!0},tfC=function(X,J){var L; J?L=J.If:L=X.SC++;var x=X.vl.clone();g.$v(x,"SID",X.T);g.$v(x,"RID",L);g.$v(x,"AID",X.bB);px(X,x);X.W&&X.D&&g.nT(x,X.W,X.D);L=new oP(X,X.T,L,X.Pl+1);X.W===null&&(L.vl=X.D);J&&(X.N=J.aB.concat(X.N));J=w2u(X,L,1E3);L.setTimeout(Math.round(X.oT*.5)+Math.round(X.oT*.5*Math.random()));LnC(X.K,L);FHu(L,x,J)},px=function(X,J){X.Bl&&g.XX(X.Bl,function(L,x){g.$v(J,x,L)}); X.j&&g.LT({},function(L,x){g.$v(J,x,L)})},w2u=function(X,J,L){L=Math.min(X.N.length,L); var x=X.j?(0,g.IH)(X.j.xb,X.j,X):null;a:{for(var Q=X.N,K=-1;;){var q=["count="+L];K==-1?L>0?(K=Q[0].L,q.push("ofs="+K)):K=0:q.push("ofs="+K);for(var D=!0,C=0;C=3)return!1; X.z6++;X.S=dH((0,g.IH)(X.G5,X),Ole(X,X.aB));X.aB++;return!0},VfS=function(X){X.FE!=null&&(g.Ao.clearTimeout(X.FE),X.FE=null)},dkd=function(X){X.L=new oP(X,X.T,"rpc",X.z6); X.W===null&&(X.L.vl=X.D);X.L.J0=0;var J=X.pO.clone();g.$v(J,"RID","rpc");g.$v(J,"SID",X.T);g.$v(J,"AID",X.bB);g.$v(J,"CI",X.Hl?"0":"1");!X.Hl&&X.YF&&g.$v(J,"TO",X.YF);g.$v(J,"TYPE","xmlhttp");px(X,J);X.W&&X.D&&g.nT(J,X.W,X.D);X.J0&&X.L.setTimeout(X.J0);var L=X.L;X=X.H4;L.jC=1;L.S=Ac(J.clone());L.D=null;L.gI=!0;e0H(L,X)},cD=function(X){X.Km!=null&&(g.Ao.clearTimeout(X.Km),X.Km=null)},ZU3=function(X,J){var L=null; if(X.L==J){cD(X);VfS(X);X.L=null;var x=2}else if(A8I(X.K,J))L=J.aB,ilS(X.K,J),x=1;else return;if(X.t2!=0)if(J.B)if(x==1){L=J.D?J.D.length:0;J=Date.now()-J.Pl;var Q=X.Pl;x=vbS();x.dispatchEvent(new Goe(x,L,J,Q));h7(X)}else Q2S(X);else{var K=J.Lp;Q=J.getLastError();if(Q==3||Q==0&&K>0||!(x==1&&al8(X,J)||x==2&&X23(X)))switch(L&&L.length>0&&(J=X.K,J.N=J.N.concat(L)),Q){case 1:YM(X,5);break;case 4:YM(X,10);break;case 3:YM(X,6);break;default:YM(X,2)}}},Ole=function(X,J){var L=X.BO+Math.floor(Math.random()* X.YU); X.isActive()||(L*=2);return L*J},YM=function(X,J){if(J==2){var L=(0,g.IH)(X.EMM,X),x=X.HO,Q=!x; x=new g.xv(x||"//www.google.com/images/cleardot.gif");g.Ao.location&&g.Ao.location.protocol=="http"||g.iW(x,"https");Ac(x);Q?$k0(x.toString(),L):Cuu(x.toString(),L)}else t7(2);X.t2=0;X.j&&X.j.tA(J);umd(X);HlH(X)},umd=function(X){X.t2=0; X.Nx=[];if(X.j){var J=DkV(X.K);if(J.length!=0||X.N.length!=0)g.pd(X.Nx,J),g.pd(X.Nx,X.N),X.K.N.length=0,g.Yu(X.N),X.N.length=0;X.j.O$()}},o10=function(X){if(X.t2==0)return X.Nx; var J=[];g.pd(J,DkV(X.K));g.pd(J,X.N);return J},xkd=function(X,J,L){var x=g.CT(L); x.L!=""?(J&&g.Qj(x,J+"."+x.L),g.KT(x,x.N)):(x=g.Ao.location,x=EPH(x.protocol,J?J+"."+x.hostname:x.hostname,+x.port,L));J=X.gI;L=X.ek;J&&L&&g.$v(x,J,L);g.$v(x,"VER",X.St);px(X,x);return x},lE0=function(X,J,L){if(J&&!X.jC)throw Error("Can't create secondary domain capable XhrIo object."); J=X.r0&&!X.jk?new g.lq(new g.ZC({KX:L})):new g.lq(X.jk);J.W=X.jC;return J},blV=function(){},Sle=function(){},vD=function(X,J){g.$W.call(this); this.L=new n1V(J);this.j=X;this.K=J&&J.uE6||null;X=J&&J.imI||null;J&&J.odl&&(X?X["X-Client-Protocol"]="webchannel":X={"X-Client-Protocol":"webchannel"});this.L.D=X;X=J&&J.UnE||null;J&&J.jJ&&(X?X["X-WebChannel-Content-Type"]=J.jJ:X={"X-WebChannel-Content-Type":J.jJ});J&&J.wE&&(X?X["X-WebChannel-Client-Profile"]=J.wE:X={"X-WebChannel-Client-Profile":J.wE});this.L.Lp=X;(X=J&&J.pNm)&&!g.YS(X)&&(this.L.W=X);this.B=J&&J.Fkl||!1;this.T=J&&J.Scm||!1;(J=J&&J.h$)&&!g.YS(J)&&(this.L.gI=J,g.DR(this.K,J)&&(X= this.K,J in X&&delete X[J]));this.N=new rH(this)},PuH=function(X){WHF.call(this); X.__headers__&&(this.headers=X.__headers__,this.statusCode=X.__status__,delete X.__headers__,delete X.__status__);var J=X.__sm__;J?this.data=(this.L=g.KJ(J))?g.yf(J,this.L):J:this.data=X},c3v=function(X){p6e.call(this); this.status=1;this.errorCode=X},rH=function(X){this.L=X},E10=function(X,J){this.K=X; this.L=J},Ylu=function(X){return o10(X.L).map(function(J){var L=X.K; J=J.map;"__data__"in J?(J=J.__data__,L=L.T?tbV(J):J):L=J;return L})},jW=function(X,J){if(typeof X!=="function")throw Error("Fn must not be null and must be a function"); return g.Ao.setTimeout(function(){X()},J)},GJ=function(X){TJ.dispatchEvent(new hau(TJ,X))},hau=function(X){g.BI.call(this,"statevent",X)},fx=function(X,J,L,x){this.L=X; this.T=J;this.W=L;this.B=x||1;this.K=45E3;this.N=new g.Vj(this);this.j=new g.rJ;this.j.setInterval(250)},Wnu=function(X,J,L){X.DM=1; X.HI=Ac(J.clone());X.B2=L;X.gI=!0;zaS(X,null)},p20=function(X,J,L,x,Q){X.DM=1; X.HI=Ac(J.clone());X.B2=null;X.gI=L;Q&&(X.B7=!1);zaS(X,x)},zaS=function(X,J){X.pQ=Date.now(); r3V(X);X.lF=X.HI.clone();XK(X.lF,"t",X.B);X.rj=0;X.Ns=X.L.Z_(X.L.UZ()?J:null);X.vT>0&&(X.CR=new g.kv((0,g.IH)(X.CU,X,X.Ns),X.vT));X.N.listen(X.Ns,"readystatechange",X.Jr);J=X.ZQ?g.Vf(X.ZQ):{};X.B2?(X.AY="POST",J["Content-Type"]="application/x-www-form-urlencoded",X.Ns.send(X.lF,X.AY,X.B2,J)):(X.AY="GET",X.B7&&!g.g0&&(J.Connection="close"),X.Ns.send(X.lF,X.AY,null,J));X.L.rU(1)},TEu=function(X,J){var L=X.rj,x=J.indexOf("\n",L); if(x==-1)return v1F;L=Number(J.substring(L,x));if(isNaN(L))return j2V;x+=1;if(x+L>J.length)return v1F;J=J.slice(x,x+L);X.rj=x+L;return J},r3V=function(X){X.Vu=Date.now()+X.K; GbS(X,X.K)},GbS=function(X,J){if(X.Jq!=null)throw Error("WatchDog timer not null"); X.Jq=jW((0,g.IH)(X.UT,X),J)},fl0=function(X){X.Jq&&(g.Ao.clearTimeout(X.Jq),X.Jq=null)},eaI=function(X){X.L.eW()||X.WI||X.L.BT(X)},eW=function(X){fl0(X); g.Lq(X.CR);X.CR=null;X.j.stop();X.N.removeAll();if(X.Ns){var J=X.Ns;X.Ns=null;J.abort();J.dispose()}X.Ia&&(X.Ia=null)},FnV=function(X,J){try{X.L.Dv(X,J),X.L.rU(4)}catch(L){}},RaF=function(X,J,L,x,Q){if(x==0)L(!1); else{var K=Q||0;x--;ll3(X,J,function(q){q?L(!0):g.Ao.setTimeout(function(){RaF(X,J,L,x,K)},K)})}},ll3=function(X,J,L){var x=new Image; x.onload=function(){try{FK(x),L(!0)}catch(Q){}}; x.onerror=function(){try{FK(x),L(!1)}catch(Q){}}; x.onabort=function(){try{FK(x),L(!1)}catch(Q){}}; x.ontimeout=function(){try{FK(x),L(!1)}catch(Q){}}; g.Ao.setTimeout(function(){if(x.ontimeout)x.ontimeout()},J); x.src=X},FK=function(X){X.onload=null; X.onerror=null;X.onabort=null;X.ontimeout=null},BE0=function(X){this.L=X; this.K=new aP},s2u=function(X){var J=lj(X.L,X.jb,"/mail/images/cleardot.gif"); Ac(J);RaF(J.toString(),5E3,(0,g.IH)(X.F8,X),3,2E3);X.rU(1)},NE3=function(X){var J=X.L.B; J!=null?(GJ(5),J?(GJ(11),RP(X.L,X,!1)):(GJ(12),RP(X.L,X,!0))):(X.DI=new fx(X),X.DI.ZQ=X.Ej,J=X.L,J=lj(J,J.UZ()?X.Rt:null,X.jq),GJ(5),XK(J,"TYPE","xmlhttp"),p20(X.DI,J,!1,X.Rt,!1))},Uk3=function(X,J,L){this.L=1; this.K=[];this.N=[];this.j=new aP;this.D=X||null;this.B=J!=null?J:null;this.S=L||!1},mkv=function(X,J){this.L=X; this.map=J;this.context=null},kbd=function(X,J,L,x){g.BI.call(this,"timingevent",X); this.size=J;this.rtt=L;this.retries=x},ZlS=function(X){g.BI.call(this,"serverreachability",X)},XRF=function(X){X.oM(1,0); X.ym=lj(X,null,X.Y9);A30(X)},JOu=function(X){X.kh&&(X.kh.abort(),X.kh=null); X.mX&&(X.mX.cancel(),X.mX=null);X.FK&&(g.Ao.clearTimeout(X.FK),X.FK=null);BD(X);X.uv&&(X.uv.cancel(),X.uv=null);X.Oc&&(g.Ao.clearTimeout(X.Oc),X.Oc=null)},L4V=function(X,J){if(X.L==0)throw Error("Invalid operation: sending map when state is closed"); X.K.push(new mkv(X.nf++,J));X.L!=2&&X.L!=3||A30(X)},xAS=function(X){var J=0; X.mX&&J++;X.uv&&J++;return J},A30=function(X){X.uv||X.Oc||(X.Oc=jW((0,g.IH)(X.y4,X),0),X.nS=0)},K4S=function(X,J){if(X.L==1){if(!J){X.oE=Math.floor(Math.random()*1E5); J=X.oE++;var L=new fx(X,"",J);L.ZQ=X.tK;var x=i98(X),Q=X.ym.clone();g.$v(Q,"RID",J);g.$v(Q,"CVER","1");sP(X,Q);Wnu(L,Q,x);X.uv=L;X.L=2}}else X.L==3&&(J?QZv(X,J):X.K.length==0||X.uv||QZv(X))},QZv=function(X,J){if(J)if(X.jI>6){X.K=X.N.concat(X.K); X.N.length=0;var L=X.oE-1;J=i98(X)}else L=J.W,J=J.B2;else L=X.oE++,J=i98(X);var x=X.ym.clone();g.$v(x,"SID",X.T);g.$v(x,"RID",L);g.$v(x,"AID",X.Ss);sP(X,x);L=new fx(X,X.T,L,X.nS+1);L.ZQ=X.tK;L.setTimeout(1E4+Math.round(1E4*Math.random()));X.uv=L;Wnu(L,x,J)},sP=function(X,J){X.c5&&(X=X.c5.i4())&&g.XX(X,function(L,x){g.$v(J,x,L)})},i98=function(X){var J=Math.min(X.K.length,1E3),L=["count="+J]; if(X.jI>6&&J>0){var x=X.K[0].L;L.push("ofs="+x)}else x=0;for(var Q={},K=0;K=3)return!1; X.W++;X.FK=jW((0,g.IH)(X.Rm,X),IcS(X,X.oQ));X.oQ++;return!0},RP=function(X,J,L){X.AQ=X.B==null?L:!X.B; X.zm=J.gU;X.S||XRF(X)},BD=function(X){X.qm!=null&&(g.Ao.clearTimeout(X.qm),X.qm=null)},IcS=function(X,J){var L=5E3+Math.floor(Math.random()*1E4); X.isActive()||(L*=2);return L*J},Nj=function(X,J){if(J==2||J==9){var L=null; X.c5&&(L=null);var x=(0,g.IH)(X.ZW9,X);L||(L=new g.xv("//www.google.com/images/cleardot.gif"),Ac(L));ll3(L.toString(),1E4,x)}else GJ(2);DAH(X,J)},DAH=function(X,J){X.L=0; X.c5&&X.c5.mp(J);$Ad(X);JOu(X)},$Ad=function(X){X.L=0; X.zm=-1;if(X.c5)if(X.N.length==0&&X.K.length==0)X.c5.dn();else{var J=g.Yu(X.N),L=g.Yu(X.K);X.N.length=0;X.K.length=0;X.c5.dn(J,L)}},lj=function(X,J,L){var x=g.CT(L); if(x.L!="")J&&g.Qj(x,J+"."+x.L),g.KT(x,x.N);else{var Q=window.location;x=EPH(Q.protocol,J?J+"."+Q.hostname:Q.hostname,+Q.port,L)}X.Jg&&g.XX(X.Jg,function(K,q){g.$v(x,q,K)}); g.$v(x,"VER",X.jI);sP(X,x);return x},CTu=function(){},Mke=function(){this.L=[]; this.K=[]},yOV=function(X){g.BI.call(this,"channelMessage"); this.message=X},nGF=function(X){g.BI.call(this,"channelError"); this.error=X},Vku=function(X,J){this.action=X; this.params=J||{}},UP=function(X,J){g.G.call(this); this.L=new g.sn(this.ucB,0,this);g.f(this,this.L);this.MP=5E3;this.K=0;if(typeof X==="function")J&&(X=(0,g.IH)(X,J));else if(X&&typeof X.handleEvent==="function")X=(0,g.IH)(X.handleEvent,X);else throw Error("Invalid listener argument");this.N=X},H9H=function(X,J,L,x,Q,K,q,D,C,M,y,n,V,H){L=L===void 0?!1:L; x=x===void 0?function(){return""}:x; Q=Q===void 0?!1:Q;K=K===void 0?!1:K;q=q===void 0?!1:q;D=D===void 0?function(){return g.YW({})}:D; C=C===void 0?!1:C;y=y===void 0?!1:y;n=n===void 0?!1:n;V=V===void 0?!1:V;H=H===void 0?!1:H;this.jC=X;this.Km=J;this.B=new g.uc;this.K=new UP(this.qMM,this);this.L=null;this.W=!1;this.D=null;this.Pl="";this.aB=this.S=0;this.N=[];this.z6=L;this.gI=x;this.j=K;this.vl=D;this.Bl=M;this.H4=q;this.FE=null;this.T=g.YW();this.If=Q;this.Nx=C;this.A0=y;this.Cm=n;this.sH=V;this.Lp=H;this.J0=new dD0;this.Hl=new u$3;this.O6=new bpe;this.SC=new oP0;this.bB=new SIV;this.t_=new PyH;this.XX=new cI0},wRe=function(X, J,L,x,Q){O90(X); if(X.L){var K=g.ly("ID_TOKEN"),q=X.L.tK||{};K?q["x-youtube-identity-token"]=K:delete q["x-youtube-identity-token"];X.L.tK=q}acH(X);x?(x.getState()!=3&&xAS(x)==0||x.getState(),X.L.connect(J,L,X.Km,x.T,x.Ss)):Q?X.L.connect(J,L,X.Km,Q.sessionId,Q.arrayId):X.L.connect(J,L,X.Km)},oGu=function(X,J){return X.sH?!0:X.Cm?Object.values(tkH).includes(J):X.A0?!Object.values(dAv).includes(J):X.Lp?Object.values(uhv).includes(J):!1},PT8=function(X){var J,L; g.p(function(x){if(x.K==1)return g.bv(x,2),g.z(x,b9u(X),2);g.WW(x);J=X.N;X.N=[];L=J.length;SVH(X,J,L);me(X);return g.pR(x,0)})},SVH=function(X,J,L){for(var x=0;x0?L=Object.assign({},L,J):delete L.Authorization;X.L.tK=L}},acH=function(X){X.Bl&&!X.j&&EGH(X,X.Bl())},kM=function(X){this.scheme="https"; this.port=this.domain="";this.L="/api/lounge";this.K=!0;X=X||document.location.href;var J=Number(g.gA(X)[4]||null)||"";J&&(this.port=":"+J);this.domain=g.Dk(X)||"";X=g.vc();X.search("MSIE")>=0&&(X=X.match(/MSIE ([\d.]+)/)[1],g.r6(X,"10.0")<0&&(this.K=!1))},ZT=function(X,J){var L=X.L; X.K&&(L=X.scheme+"://"+X.domain+X.port+X.L);return g.Hw(L+J,{})},YVF=function(X,J){g.$W.call(this); var L=this;this.Dh=X();this.Dh.subscribe("handlerOpened",this.sT,this);this.Dh.subscribe("handlerClosed",this.onClosed,this);this.Dh.subscribe("handlerError",function(x,Q){L.onError(Q)}); this.Dh.subscribe("handlerMessage",this.onMessage,this);this.L=J},hP0=function(X,J,L){var x=this; L=L===void 0?function(){return""}:L; var Q=Q===void 0?new Sle:Q;var K=K===void 0?new g.uc:K;this.pathPrefix=X;this.L=J;this.Pl=L;this.j=K;this.S=null;this.D=this.W=0;this.channel=null;this.B=0;this.N=new UP(function(){x.N.isActive();var q;((q=x.channel)==null?void 0:J3S((new E10(q,q.L)).L.K))===0&&x.connect(x.S,x.W)}); this.T={};this.K={};this.Km=!1;this.logger=null;this.aB=[];this.q2=void 0;this.vl=new dD0;this.FE=new u$3;this.Bl=new oP0;this.gI=new SIV},zPI=function(X){g.X1(X.channel,"m",function(){X.B=3; X.N.reset();X.S=null;X.W=0;for(var J=g.d(X.aB),L=J.next();!L.done;L=J.next())L=L.value,X.channel&&X.channel.send(L);X.aB=[];X.publish("webChannelOpened");X.vl.pY("WEB_CHANNEL")}); g.X1(X.channel,"n",function(){X.B=0;X.N.isActive()||X.publish("webChannelClosed");var J,L=(J=X.channel)==null?void 0:Ylu(new E10(J,J.L));L&&(X.aB=[].concat(g.nR(L)));X.FE.pY("WEB_CHANNEL")}); g.X1(X.channel,"p",function(J){var L=J.data;L[0]==="gracefulReconnect"?(X.N.start(),X.channel&&X.channel.close()):X.publish("webChannelMessage",new Vku(L[0],L[1]));X.q2=J.statusCode;X.Bl.pY("WEB_CHANNEL")}); g.X1(X.channel,"o",function(){X.q2===401||X.N.start();X.publish("webChannelError");X.gI.pY("WEB_CHANNEL","")})},W4I=function(X){var J=X.Pl(); J?X.T["x-youtube-lounge-xsrf-token"]=J:delete X.T["x-youtube-lounge-xsrf-token"]},pRd=function(X){g.$W.call(this); this.L=X();this.L.subscribe("webChannelOpened",this.SO,this);this.L.subscribe("webChannelClosed",this.onClosed,this);this.L.subscribe("webChannelError",this.onError,this);this.L.subscribe("webChannelMessage",this.onMessage,this)},rOv=function(X,J,L,x,Q){function K(){return new H9H(ZT(X,"/bc"),J,!1,L,x)} L=L===void 0?function(){return""}:L; return g.VQ("enable_mdx_web_channel_desktop")?new pRd(function(){return new hP0(ZT(X,"/wc"),J,L)}):new YVF(K,Q)},GdV=function(){var X=vGI; jZ0();A7.push(X);T_H()},XG=function(X,J){jZ0(); var L=fcd(X,String(J));A7.length==0?ePC(L):(T_H(),g.mF(A7,function(x){x(L)}))},J4=function(X){XG("CP",X)},jZ0=function(){A7||(A7=g.Ld("yt.mdx.remote.debug.handlers_")||[],g.JS("yt.mdx.remote.debug.handlers_",A7))},ePC=function(X){var J=(L6+1)%50; L6=J;xT[J]=X;iH||(iH=J==49)},T_H=function(){var X=A7; if(xT[0]){var J=iH?L6:-1,L={};do L={rV:void 0},J=(J+1)%50,L.rV=xT[J],g.mF(X,function(x){return function(Q){Q(x.rV)}}(L)); while(J!=L6);xT=Array(50);L6=-1;iH=!1}},fcd=function(X,J){var L=(Date.now()-F40)/1E3; L.toFixed&&(L=L.toFixed(3));var x=[];x.push("[",L+"s","] ");x.push("[","yt.mdx.remote","] ");x.push(X+": "+J,"\n");return x.join("")},Q5=function(X){g.Ly.call(this); this.B=X;this.screens=[]},lc3=function(X,J){var L=X.get(J.uuid)||X.get(J.id); if(L)return X=L.name,L.id=J.id||L.id,L.name=J.name,L.token=J.token,L.uuid=J.uuid||L.uuid,L.name!=X;X.screens.push(J);return!0},RPS=function(X,J){var L=X.screens.length!=J.length; X.screens=g.SP(X.screens,function(K){return!!IEe(J,K)}); for(var x=J.length,Q=0;Q0&&X.T0&&a$(X,L)},function(J){X.j=function(){}; X.I_(J)})},wPH=function(X){var J={}; J.pairingCode=X.FE;J.theme=X.jC;aEu()&&(J.env_useStageMdx=1);return g.Vs(J)},tE8=function(X){return new Promise(function(J){X.FE=KHF(); if(X.vl){var L=new chrome.cast.DialLaunchResponse(!0,wPH(X));J(L);aF0(X)}else X.Km=function(){g.MV(X.D);X.Km=function(){}; X.D=NaN;var x=new chrome.cast.DialLaunchResponse(!0,wPH(X));J(x);aF0(X)},X.D=g.$b(function(){X.Km()},100)})},uN0=function(X,J,L){X.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(J)); var x=new qj(J);return(new Promise(function(Q){dF0(X,x,function(K){K?(X.aB=!0,C6(X.T,x),y5(X,x),a$(X,L)):g.sI(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(J)+" is not online."));Q(K)},5)})).then(function(Q){return Q?new chrome.cast.DialLaunchResponse(!1):tE8(X)})},otd=function(X,J){var L=X.S.receiver.label,x=X.K.friendlyName; return(new Promise(function(Q){xF8(X.T,L,J,x,function(K){K&&K.token&&y5(X,K);Q(K)},function(K){n6(X,"Failed to get DIAL screen: "+K); Q(null)})})).then(function(Q){return Q&&Q.token?new chrome.cast.DialLaunchResponse(!1):tE8(X)})},dF0=function(X,J,L,x){g.MV(X.B); X.B=0;QvS(X.T,J,function(Q){Q||x<0?L(Q):X.B=g.$b(function(){dF0(X,J,L,x-1)},300)})},a$=function(X,J){X.info("getDialAppInfoWithTimeout_ "+J); O7(X)&&(g.MV(X.W),X.W=0,J==0?bPF(X):X.W=g.$b(function(){bPF(X)},J))},bPF=function(X){O7(X)&&X.N.getDialAppInfo(function(J){X.info("getDialAppInfo dialLaunchData: "+JSON.stringify(J)); J=J.extraData||{};var L=null;if(J.loungeToken){var x;((x=X.L)==null?void 0:x.token)==J.loungeToken&&(L="staleLoungeToken")}else L="missingLoungeToken";L?(X.Pl=L,a$(X,3E4)):(X.aB=!1,X.Pl="unknown",gt0(X,J.loungeToken),a$(X,J.loungeTokenRefreshIntervalMs))},function(J){X.info("getDialAppInfo error: "+J); X.Pl="noLoungeTokenResponse";a$(X,3E4)})},Sae=function(X){g.MV(X.B); X.B=0;g.MV(X.W);X.W=0;X.j();X.j=function(){}; g.MV(X.D)},wc=function(X,J){Mq.call(this,X,J,"ManualSession"); this.N=g.$b((0,g.IH)(this.B$,this,null),150)},t4=function(X,J){g.Ly.call(this); this.config_=J;this.K=X;this.S=J.appId||"233637DE";this.T=J.theme||"cl";this.D=J.disableCastApi||!1;this.B=J.forceMirroring||!1;this.L=null;this.W=!1;this.N=[];this.j=(0,g.IH)(this.jT9,this)},P7u=function(X,J){return J?g.Ou(X.N,function(L){return IP(J,L.label)},X):null},dc=function(X){XG("Controller",X)},vGI=function(X){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(X)},uH=function(X){return X.W||!!X.N.length||!!X.L},o$=function(X,J,L){J!=X.L&&(g.Lq(X.L),(X.L=J)?(L?X.publish("yt-remote-cast2-receiver-resumed", J.K):X.publish("yt-remote-cast2-receiver-selected",J.K),J.subscribe("sessionScreen",(0,g.IH)(X.VB,X,J)),J.subscribe("sessionFailed",function(){return cP0(X,J)}),J.L?X.publish("yt-remote-cast2-session-change",J.L):L&&X.L.B$(null)):X.publish("yt-remote-cast2-session-change",null))},cP0=function(X,J){X.L==J&&X.publish("yt-remote-cast2-session-failed")},Et0=function(X){var J=X.K.u4(),L=X.L&&X.L.K; X=g.H5(J,function(x){L&&IP(x,L.label)&&(L=null);var Q=x.uuid?x.uuid:x.id,K=P7u(this,x);K?(K.label=Q,K.friendlyName=x.name):(K=new chrome.cast.Receiver(Q,x.name),K.receiverType=chrome.cast.ReceiverType.CUSTOM);return K},X); L&&(L.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(L=new chrome.cast.Receiver(L.label,L.friendlyName),L.receiverType=chrome.cast.ReceiverType.CUSTOM),X.push(L));return X},vtH=function(X,J,L,x){x.disableCastApi?bH("Cannot initialize because disabled by Mdx config."):YaI()?hUC(J,x)&&(zUv(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?W2u(X,L):(window.__onGCastApiAvailable=function(Q,K){Q?W2u(X,L):(Ss("Failed to load cast API: "+K),pP0(!1),zUv(!1),g.h3("yt-remote-cast-available"),g.h3("yt-remote-cast-receiver"), rPv(),L(!1))},x.loadCastApiSetupScript?g.Xy("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"):window.navigator.userAgent.indexOf("Android")>=0&&window.navigator.userAgent.indexOf("Chrome/")>=0&&window.navigator.presentation?t7F()>=60&&Yvd():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?bUI():t7F()>=89?z0C():(Ebu(),HD(h0V.map(SvV))))):bH("Cannot initialize because not running Chrome")},rPv=function(){bH("dispose"); var X=P3();X&&X.dispose();g.JS("yt.mdx.remote.cloudview.instance_",null);jve(!1);g.ZF(TbC);TbC.length=0},c3=function(){return!!g.Y1("yt-remote-cast-installed")},Gp0=function(){var X=g.Y1("yt-remote-cast-receiver"); return X?X.friendlyName:null},fFC=function(){bH("clearCurrentReceiver"); g.h3("yt-remote-cast-receiver")},eUI=function(){return c3()?P3()?P3().getCastSession():(Ss("getCastSelector: Cast is not initialized."),null):(Ss("getCastSelector: Cast API is not installed!"),null)},F2V=function(){c3()?P3()?E7()?(bH("Requesting cast selector."),P3().requestSession()):(bH("Wait for cast API to be ready to request the session."),TbC.push(g.kt("yt-remote-cast2-api-ready",F2V))):Ss("requestCastSelector: Cast is not initialized."):Ss("requestCastSelector: Cast API is not installed!")}, h4=function(X,J){E7()?P3().setConnectedScreenStatus(X,J):Ss("setConnectedScreenStatus called before ready.")},YaI=function(){var X=g.vc().search(/ (CrMo|Chrome|CriOS)\//)>=0; return g.Oc||X},lF0=function(X,J){P3().init(X,J)},hUC=function(X,J){var L=!1; P3()||(X=new t4(X,J),X.subscribe("yt-remote-cast2-availability-change",function(x){g.El("yt-remote-cast-available",x);nx("yt-remote-cast2-availability-change",x)}),X.subscribe("yt-remote-cast2-receiver-selected",function(x){bH("onReceiverSelected: "+x.friendlyName); g.El("yt-remote-cast-receiver",x);nx("yt-remote-cast2-receiver-selected",x)}),X.subscribe("yt-remote-cast2-receiver-resumed",function(x){bH("onReceiverResumed: "+x.friendlyName); g.El("yt-remote-cast-receiver",x);nx("yt-remote-cast2-receiver-resumed",x)}),X.subscribe("yt-remote-cast2-session-change",function(x){bH("onSessionChange: "+gH(x)); x||g.h3("yt-remote-cast-receiver");nx("yt-remote-cast2-session-change",x)}),g.JS("yt.mdx.remote.cloudview.instance_",X),L=!0); bH("cloudview.createSingleton_: "+L);return L},P3=function(){return g.Ld("yt.mdx.remote.cloudview.instance_")},W2u=function(X,J){pP0(!0); zUv(!1);lF0(X,function(L){L?(jve(!0),g.AP("yt-remote-cast2-api-ready")):(Ss("Failed to initialize cast API."),pP0(!1),g.h3("yt-remote-cast-available"),g.h3("yt-remote-cast-receiver"),rPv());J(L)})},bH=function(X){XG("cloudview",X)},Ss=function(X){XG("cloudview",X)},pP0=function(X){bH("setCastInstalled_ "+X); g.El("yt-remote-cast-installed",X)},E7=function(){return!!g.Ld("yt.mdx.remote.cloudview.apiReady_")},jve=function(X){bH("setApiReady_ "+X); g.JS("yt.mdx.remote.cloudview.apiReady_",X)},zUv=function(X){g.JS("yt.mdx.remote.cloudview.initializing_",X)},zf=function(X){this.index=-1; this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.j=this.B=0;this.trackData=null;this.VQ=this.XD=!1;this.S=this.N=this.W=this.K=0;this.L=NaN;this.T=!1;this.reset(X)},RUS=function(X){X.audioTrackId=null; X.trackData=null;X.playerState=-1;X.XD=!1;X.VQ=!1;X.B=0;X.j=g.$u();X.K=0;X.W=0;X.N=0;X.S=0;X.L=NaN;X.T=!1},W3=function(X){return X.isPlaying()?(g.$u()-X.j)/1E3:0},p6=function(X,J){X.B=J; X.j=g.$u()},rc=function(X){switch(X.playerState){case 1:case 1081:return(g.$u()-X.j)/1E3+X.B; case -1E3:return 0}return X.B},Bbv=function(X){return X.T?X.W+W3(X):X.W},v3=function(X,J,L){var x=X.videoId; X.videoId=J;X.index=L;J!=x&&RUS(X)},svu=function(X){var J={}; J.index=X.index;J.listId=X.listId;J.videoId=X.videoId;J.playerState=X.playerState;J.volume=X.volume;J.muted=X.muted;J.audioTrackId=X.audioTrackId;J.trackData=g.Hc(X.trackData);J.hasPrevious=X.XD;J.hasNext=X.VQ;J.playerTime=X.B;J.playerTimeAt=X.j;J.seekableStart=X.K;J.seekableEnd=X.W;J.duration=X.N;J.loadedTime=X.S;J.liveIngestionTime=X.L;return J},Tf=function(X,J){g.Ly.call(this); var L=this;this.N=0;this.T=X;this.B=[];this.j=new Mke;this.K=this.L=null;this.D=(0,g.IH)(this.S6C,this);this.W=(0,g.IH)(this.GL,this);this.S=(0,g.IH)(this.sBB,this);this.Km=(0,g.IH)(this.MCH,this);var x=0;X?(x=X.getProxyState(),x!=3&&(X.subscribe("proxyStateChange",this.XP,this),Nb0(this))):x=3;x!=0&&(J?this.XP(x):g.$b(function(){L.XP(x)},0)); (X=eUI())&&js(this,X);this.subscribe("yt-remote-cast2-session-change",this.Km)},Gf=function(X){return new zf(X.T.getPlayerContextData())},Nb0=function(X){g.mF("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(J){this.B.push(this.T.subscribe(J,g.g3(this.ZOY,J),this))},X)},UFv=function(X){g.mF(X.B,function(J){this.T.unsubscribeByKey(J)},X); X.B.length=0},f6=function(X){return X.getState()==1},es=function(X,J){var L=X.j; L.L.length+L.K.length<50&&X.j.enqueue(J)},mF3=function(X,J,L){var x=Gf(X); p6(x,L);x.playerState!=-1E3&&(x.playerState=J);FG(X,x)},lH=function(X,J,L){X.T.sendMessage(J,L)},FG=function(X,J){UFv(X); X.T.setPlayerContextData(svu(J));Nb0(X)},js=function(X,J){X.K&&(X.K.removeUpdateListener(X.D),X.K.removeMediaListener(X.W),X.GL(null)); X.K=J;X.K&&(J4("Setting cast session: "+X.K.sessionId),X.K.addUpdateListener(X.D),X.K.addMediaListener(X.W),X.K.media.length&&X.GL(X.K.media[0]))},kpC=function(X){var J=X.L.media,L=X.L.customData; if(J&&L){var x=Gf(X);J.contentId!=x.videoId&&J4("Cast changing video to: "+J.contentId);x.videoId=J.contentId;x.playerState=L.playerState;p6(x,X.L.getEstimatedTime());FG(X,x)}else J4("No cast media video. Ignoring state update.")},R$=function(X,J,L){return(0,g.IH)(function(x){this.Tc("Failed to "+J+" with cast v2 channel. Error code: "+x.code); x.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.Tc("Retrying "+J+" using MDx browser channel."),lH(this,J,L))},X)},Nq=function(X,J,L,x){x=x===void 0?!1:x; g.Ly.call(this);var Q=this;this.B=NaN;this.FE=!1;this.D=this.S=this.aB=this.Pl=NaN;this.Km=[];this.j=this.W=this.T=this.L=this.K=null;this.vl=X;this.Bl=x;this.Km.push(g.a2(window,"beforeunload",function(){Q.v8(2)})); this.N=[];this.L=new zf;this.jC=J.id;this.gI=J.idType;this.K=rOv(this.vl,L,this.gA,this.gI=="shortLived",this.jC);this.K.listen("channelOpened",function(){ZP0(Q)}); this.K.listen("channelClosed",function(){B3("Channel closed");isNaN(Q.B)?Mj(!0):Mj();Q.dispose()}); this.K.listen("channelError",function(K){Mj();isNaN(Q.WH())?(K==1&&Q.gI=="shortLived"&&Q.publish("browserChannelAuthError",K),B3("Channel error: "+K+" without reconnection"),Q.dispose()):(Q.FE=!0,B3("Channel error: "+K+" with reconnection in "+Q.WH()+" ms"),s7(Q,2))}); this.K.listen("channelMessage",function(K){APu(Q,K)}); this.K.Bh(J.token);this.subscribe("remoteQueueChange",function(){var K=Q.L.videoId;g.zb()&&g.El("yt-remote-session-video-id",K)})},XXv=function(X){return g.Ou(X.N,function(J){return J.type=="LOUNGE_SCREEN"})},B3=function(X){XG("conn",X)},s7=function(X,J){X.publish("proxyStateChange",J)},JkH=function(X){X.B=g.$b(function(){B3("Connecting timeout"); X.v8(1)},2E4)},LU3=function(X){g.MV(X.B); X.B=NaN},xZ0=function(X){g.MV(X.Pl); X.Pl=NaN},Q43=function(X){iL8(X); X.aB=g.$b(function(){U7(X,"getNowPlaying")},2E4)},iL8=function(X){g.MV(X.aB); X.aB=NaN},ZP0=function(X){B3("Channel opened"); X.FE&&(X.FE=!1,xZ0(X),X.Pl=g.$b(function(){B3("Timing out waiting for a screen.");X.v8(1)},15E3))},qU8=function(X,J){var L=null; if(J){var x=XXv(X);x&&(L={clientName:x.clientName,deviceMake:x.brand,deviceModel:x.model,osVersion:x.osVersion})}g.JS("yt.mdx.remote.remoteClient_",L);J&&(LU3(X),xZ0(X));L=X.K.Ge()&&isNaN(X.B);J==L?J&&(s7(X,1),U7(X,"getSubtitlesTrack")):J?(X.dP()&&X.L.reset(),s7(X,1),U7(X,"getNowPlaying"),KUH(X)):X.v8(1)},Ii0=function(X,J){var L=J.params.videoId; delete J.params.videoId;L==X.L.videoId&&(g.Mx(J.params)?X.L.trackData=null:X.L.trackData=J.params,X.publish("remotePlayerChange"))},gmu=function(X,J,L){var x=J.params.videoId||J.params.video_id,Q=parseInt(J.params.currentIndex,10); X.L.listId=J.params.listId||X.L.listId;v3(X.L,x,Q);X.publish("remoteQueueChange",L)},$Ze=function(X,J){J.params=J.params||{}; gmu(X,J,"NOW_PLAYING_MAY_CHANGE");DZH(X,J);X.publish("autoplayDismissed")},DZH=function(X,J){var L=parseInt(J.params.currentTime||J.params.current_time,10); p6(X.L,isNaN(L)?0:L);L=parseInt(J.params.state,10);L=isNaN(L)?-1:L;L==-1&&X.L.playerState==-1E3&&(L=-1E3);X.L.playerState=L;L=Number(J.params.loadedTime);X.L.S=isNaN(L)?0:L;X.L.Wq(Number(J.params.duration));L=X.L;var x=Number(J.params.liveIngestionTime);L.L=x;L.T=isNaN(x)?!1:!0;L=X.L;x=Number(J.params.seekableStartTime);J=Number(J.params.seekableEndTime);L.K=isNaN(x)?0:x;L.W=isNaN(J)?0:J;X.L.playerState==1?Q43(X):iL8(X);X.publish("remotePlayerChange")},Cr0=function(X,J){if(X.L.playerState!=-1E3){var L= 1085; switch(parseInt(J.params.adState,10)){case 1:L=1081;break;case 2:L=1084;break;case 0:L=1083}X.L.playerState=L;J=parseInt(J.params.currentTime,10);p6(X.L,isNaN(J)?0:J);X.publish("remotePlayerChange")}},MeI=function(X,J){var L=J.params.muted=="true"; X.L.volume=parseInt(J.params.volume,10);X.L.muted=L;X.publish("remotePlayerChange")},yk3=function(X,J){X.W=J.params.videoId; X.publish("nowAutoplaying",parseInt(J.params.timeout,10))},nmv=function(X,J){X.W=J.params.videoId||null; X.publish("autoplayUpNext",X.W)},Veu=function(X,J){X.j=J.params.autoplayMode; X.publish("autoplayModeChange",X.j);X.j=="DISABLED"&&X.publish("autoplayDismissed")},HLu=function(X,J){var L=J.params.hasNext=="true"; X.L.XD=J.params.hasPrevious=="true";X.L.VQ=L;X.publish("previousNextChange")},APu=function(X,J){J=J.message; J.params?B3("Received: action="+J.action+", params="+g.fA(J.params)):B3("Received: action="+J.action+" {}");switch(J.action){case "loungeStatus":J=J7(J.params.devices);X.N=g.H5(J,function(x){return new Kx(x)}); J=!!g.Ou(X.N,function(x){return x.type=="LOUNGE_SCREEN"}); qU8(X,J);J=X.UB("mlm");X.publish("multiStateLoopEnabled",J);break;case "loungeScreenDisconnected":g.PV(X.N,function(x){return x.type=="LOUNGE_SCREEN"}); qU8(X,!1);break;case "remoteConnected":var L=new Kx(J7(J.params.device));g.Ou(X.N,function(x){return x.equals(L)})||OpC(X.N,L); break;case "remoteDisconnected":L=new Kx(J7(J.params.device));g.PV(X.N,function(x){return x.equals(L)}); break;case "gracefulDisconnect":break;case "playlistModified":gmu(X,J,"QUEUE_MODIFIED");break;case "nowPlaying":$Ze(X,J);break;case "onStateChange":DZH(X,J);break;case "onAdStateChange":Cr0(X,J);break;case "onVolumeChanged":MeI(X,J);break;case "onSubtitlesTrackChanged":Ii0(X,J);break;case "nowAutoplaying":yk3(X,J);break;case "autoplayDismissed":X.publish("autoplayDismissed");break;case "autoplayUpNext":nmv(X,J);break;case "onAutoplayModeChanged":Veu(X,J);break;case "onHasPreviousNextChanged":HLu(X, J);break;case "requestAssistedSignIn":X.publish("assistedSignInRequested",J.params.authCode);break;case "onLoopModeChanged":X.publish("loopModeChange",J.params.loopMode);break;default:B3("Unrecognized action: "+J.action)}},KUH=function(X){g.MV(X.D); X.D=g.$b(function(){X.v8(1)},864E5)},U7=function(X,J,L){L?B3("Sending: action="+J+", params="+g.fA(L)):B3("Sending: action="+J); X.K.sendMessage(J,L)},OLd=function(X){Q5.call(this,"ScreenServiceProxy"); this.g5=X;this.L=[];this.L.push(this.g5.$_s("screenChange",(0,g.IH)(this.Ar,this)));this.L.push(this.g5.$_s("onlineScreenChange",(0,g.IH)(this.Hp0,this)))},uyC=function(X,J){OUv(); if(!yE||!yE.get("yt-remote-disable-remote-module-for-dev")){J=g.ly("MDX_CONFIG")||J;gbI();M7d();mq||(mq=new kM(J?J.loungeApiHost:void 0),aEu()&&(mq.L="/api/loungedev"));kT||(kT=g.Ld("yt.mdx.remote.deferredProxies_")||[],g.JS("yt.mdx.remote.deferredProxies_",kT));aie();var L=Zw();if(!L){var x=new $T(mq,J?J.disableAutomaticScreenCache||!1:!1);g.JS("yt.mdx.remote.screenService_",x);L=Zw();var Q={};J&&(Q={appId:J.appId,disableDial:J.disableDial,theme:J.theme,loadCastApiSetupScript:J.loadCastApiSetupScript, disableCastApi:J.disableCastApi,enableDialLoungeToken:J.enableDialLoungeToken,enableCastLoungeToken:J.enableCastLoungeToken,forceMirroring:J.forceMirroring});g.JS("yt.mdx.remote.enableConnectWithInitialState_",J?J.enableConnectWithInitialState||!1:!1);vtH(X,x,function(K){K?A4()&&h4(A4(),"YouTube TV"):x.subscribe("onlineScreenChange",function(){nx("yt-remote-receiver-availability-change")})},Q)}J&&!g.Ld("yt.mdx.remote.initialized_")&&(g.JS("yt.mdx.remote.initialized_",!0),X8("Initializing: "+g.fA(J)), J0.push(g.kt("yt-remote-cast2-api-ready",function(){nx("yt-remote-api-ready")})),J0.push(g.kt("yt-remote-cast2-availability-change",function(){nx("yt-remote-receiver-availability-change")})),J0.push(g.kt("yt-remote-cast2-receiver-selected",function(){Lo(null); nx("yt-remote-auto-connect","cast-selector-receiver")})),J0.push(g.kt("yt-remote-cast2-receiver-resumed",function(){nx("yt-remote-receiver-resumed","cast-selector-receiver")})),J0.push(g.kt("yt-remote-cast2-session-change",wXe)),J0.push(g.kt("yt-remote-connection-change",function(K){K?h4(A4(),"YouTube TV"):xp()||(h4(null,null),fFC())})),J0.push(g.kt("yt-remote-cast2-session-failed",function(){nx("yt-remote-connection-failed")})),X=teV(),J.isAuto&&(X.id+="#dial"),Q=J.capabilities||[],Q.length>0&&(X.capabilities= Q),X.name=J.device,X.app=J.app,(J=J.theme)&&(X.theme=J),X8(" -- with channel params: "+g.fA(X)),X?(g.El("yt-remote-session-app",X.app),g.El("yt-remote-session-name",X.name)):(g.h3("yt-remote-session-app"),g.h3("yt-remote-session-name")),g.JS("yt.mdx.remote.channelParams_",X),L.start(),A4()||dZH())}},ome=function(){var X=Zw().g5.$_gos(); var J=iU();J&&QS()&&(IEe(X,J)||X.push(J));return qvH(X)},SUH=function(){var X=bLF(); !X&&c3()&&Gp0()&&(X={key:"cast-selector-receiver",name:Gp0()});return X},bLF=function(){var X=ome(),J=iU(); J||(J=xp());return g.Ou(X,function(L){return J&&IP(J,L.key)?!0:!1})},iU=function(){var X=A4(); if(!X)return null;var J=Zw().zD();return DT(J,X)},wXe=function(X){X8("remote.onCastSessionChange_: "+gH(X)); if(X){var J=iU();if(J&&J.id==X.id){if(h4(J.id,"YouTube TV"),X.idType=="shortLived"&&(X=X.token))Ko&&(Ko.token=X),(J=QS())&&J.Bh(X)}else J&&q$(),I7(X,1)}else QS()&&q$()},q$=function(){E7()?P3().stopSession():Ss("stopSession called before API ready."); var X=QS();X&&(X.disconnect(1),PrS(null))},ck0=function(){var X=QS(); return!!X&&X.getProxyState()!=3},X8=function(X){XG("remote",X)},Zw=function(){if(!Em8){var X=g.Ld("yt.mdx.remote.screenService_"); Em8=X?new OLd(X):null}return Em8},A4=function(){return g.Ld("yt.mdx.remote.currentScreenId_")},YU0=function(X){g.JS("yt.mdx.remote.currentScreenId_",X)},hYV=function(){return g.Ld("yt.mdx.remote.connectData_")},Lo=function(X){g.JS("yt.mdx.remote.connectData_",X)},QS=function(){return g.Ld("yt.mdx.remote.connection_")},PrS=function(X){var J=QS(); Lo(null);X||YU0("");g.JS("yt.mdx.remote.connection_",X);kT&&(g.mF(kT,function(L){L(X)}),kT.length=0); J&&!X?nx("yt-remote-connection-change",!1):!J&&X&&nx("yt-remote-connection-change",!0)},xp=function(){var X=g.zb(); if(!X)return null;var J=Zw();if(!J)return null;J=J.zD();return DT(J,X)},I7=function(X,J){A4(); iU()&&iU();if(gp)Ko=X;else{YU0(X.id);var L=g.Ld("yt.mdx.remote.enableConnectWithInitialState_")||!1;X=new Nq(mq,X,teV(),L);X.connect(J,hYV());X.subscribe("beforeDisconnect",function(x){nx("yt-remote-before-disconnect",x)}); X.subscribe("beforeDispose",function(){QS()&&(QS(),PrS(null))}); X.subscribe("browserChannelAuthError",function(){var x=iU();x&&x.idType=="shortLived"&&(E7()?P3().handleBrowserChannelAuthError():Ss("refreshLoungeToken called before API ready."))}); PrS(X)}},dZH=function(){var X=xp(); X?(X8("Resume connection to: "+gH(X)),I7(X,0)):(Mj(),fFC(),X8("Skipping connecting because no session screen found."))},aie=function(){var X=teV(); if(g.Mx(X)){X=Cx();var J=g.Y1("yt-remote-session-name")||"",L=g.Y1("yt-remote-session-app")||"";X={device:"REMOTE_CONTROL",id:X,name:J,app:L,mdxVersion:3};X.authuser=String(g.ly("SESSION_INDEX","0"));(J=g.ly("DELEGATED_SESSION_ID"))&&(X.pageId=String(J));g.JS("yt.mdx.remote.channelParams_",X)}},teV=function(){return g.Ld("yt.mdx.remote.channelParams_")||{}},pX3=function(X,J,L){g.G.call(this); var x=this;this.L=X;this.Z=J;this.mZ=L;this.events=new g.dS(this);this.j=!1;this.B=new g.ds(64);this.K=new g.sn(this.X3,500,this);this.N=new g.sn(this.C2,1E3,this);this.S=new OP(this.tW6,0,this);this.T={};this.D=new g.sn(this.rq,1E3,this);this.W=new g.kv(this.seekTo,1E3,this);this.Km=this.events.J(this.Z,"onVolumeChange",function(Q){zYS(x,Q)}); g.f(this,this.events);this.events.J(J,"onCaptionsTrackListChanged",this.zC6);this.events.J(J,"captionschanged",this.nqM);this.events.J(J,"captionssettingschanged",this.kD);this.events.J(J,"videoplayerreset",this.u$);this.events.J(J,"mdxautoplaycancel",function(){x.mZ.sE()}); J.Y("enable_mdx_video_play_directly")&&this.events.J(J,"videodatachange",function(){WUV(x.L)||Df(x)||$p(x,0)}); X=this.mZ;X.E6();X.subscribe("proxyStateChange",this.zt,this);X.subscribe("remotePlayerChange",this.Cz,this);X.subscribe("remoteQueueChange",this.u$,this);X.subscribe("previousNextChange",this.Tt,this);X.subscribe("nowAutoplaying",this.Kk,this);X.subscribe("autoplayDismissed",this.Mk,this);g.f(this,this.K);g.f(this,this.N);g.f(this,this.S);g.f(this,this.D);g.f(this,this.W);this.kD();this.u$();this.Cz()},zYS=function(X,J){if(Df(X)){X.mZ.unsubscribe("remotePlayerChange",X.Cz,X); var L=Math.round(J.volume);J=!!J.muted;var x=Gf(X.mZ);if(L!==x.volume||J!==x.muted)X.mZ.setVolume(L,J),X.D.start();X.mZ.subscribe("remotePlayerChange",X.Cz,X)}},rk0=function(X){X.qd(0); X.K.stop();X.iH(new g.ds(64))},vmS=function(X,J){if(Df(X)&&!X.j){var L=null; J&&(L={style:X.Z.getSubtitlesUserSettings()},Object.assign(L,J));X.mZ.Tj(X.Z.getVideoData(1).videoId,L);X.T=Gf(X.mZ).trackData}},$p=function(X,J){var L=X.Z.getPlaylist(); if(L==null?0:L.listId){var x=L.index;var Q=L.listId.toString()}L=X.Z.getVideoData(1);X.mZ.playVideo(L.videoId,J,x,Q,L.playerParams,L.vl,HpS(L));X.iH(new g.ds(1))},j4V=function(X,J){if(J){var L=X.Z.getOption("captions","tracklist",{v6:1}); L&&L.length?(X.Z.setOption("captions","track",J),X.j=!1):(X.Z.loadModule("captions"),X.j=!0)}else X.Z.setOption("captions","track",{})},Df=function(X){return Gf(X.mZ).videoId===X.Z.getVideoData(1).videoId},TtS=function(X,J){g.Rn.call(this,X); this.L=J},Co=function(){g.R.call(this,{V:"div", U:"ytp-mdx-popup-dialog",X:{role:"dialog"},C:[{V:"div",U:"ytp-mdx-popup-dialog-inner-content",C:[{V:"div",U:"ytp-mdx-popup-title",iB:"Saliste de tu cuenta"},{V:"div",U:"ytp-mdx-popup-description",iB:"Es posible que los videos que mires se agreguen al historial de reproducciones de la TV, lo que puede influir en las recomendaciones. Para que esto no suceda, presiona \u201cCancelar\u201d y accede a YouTube desde tu computadora."},{V:"div",U:"ytp-mdx-privacy-popup-buttons",C:[{V:"button",Ql:["ytp-button", "ytp-mdx-privacy-popup-cancel"],iB:"Cancelar"},{V:"button",Ql:["ytp-button","ytp-mdx-privacy-popup-confirm"],iB:"Confirmar"}]}]}]});this.fade=new g.kE(this,250);this.cancelButton=this.kq("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.kq("ytp-mdx-privacy-popup-confirm");g.f(this,this.fade);this.J(this.cancelButton,"click",this.L);this.J(this.confirmButton,"click",this.K)},M$=function(X){g.R.call(this,{V:"div", U:"ytp-remote",C:[{V:"div",U:"ytp-remote-display-status",C:[{V:"div",U:"ytp-remote-display-status-icon",C:[g.$km()]},{V:"div",U:"ytp-remote-display-status-text",iB:"{{statustext}}"}]}]});this.api=X;this.fade=new g.kE(this,250);g.f(this,this.fade);this.J(X,"presentingplayerstatechange",this.onStateChange);this.UA(X.getPlayerStateObject())},yS=function(X,J){g.Tz.call(this,"Reproducir en",1,X,J); this.Z=X;this.S4={};this.J(X,"onMdxReceiversChange",this.T);this.J(X,"presentingplayerstatechange",this.T);this.T()},GMd=function(X){g.bf.call(this,X); this.ip={key:KHF(),name:"Esta computadora"};this.DK=null;this.subscriptions=[];this.lS=this.mZ=null;this.S4=[this.ip];this.FM=this.ip;this.Sk=new g.ds(64);this.c6=0;this.uJ=-1;this.Tk=!1;this.kW=this.k8=this.hm=null;if(!g.kH(this.player.G())&&!g.ze(this.player.G())){X=this.player;var J=g.b0(X);J&&(J=J.TB())&&(J=new yS(X,J),g.f(this,J));J=new M$(X);g.f(this,J);g.l0(X,J.element,4);this.hm=new Co;g.f(this,this.hm);g.l0(X,this.hm.element,4);this.Tk=!!xp()}},no=function(X){X.k8&&(X.player.removeEventListener("presentingplayerstatechange", X.k8),X.k8=null)},fi8=function(X,J,L){X.Sk=L; X.player.publish("presentingplayerstatechange",new g.IF(L,J))},VS=function(X,J){if(J.key!==X.FM.key)if(J.key===X.ip.key)q$(); else if(WUV(X)&&eYC(X),X.FM=J,!X.player.G().Y("disable_mdx_connection_in_mdx_module_for_music_web")||!g.ze(X.player.G())){var L=X.player.getPlaylistId();var x=X.player.getVideoData(1);var Q=x.videoId;if(!L&&!Q||(X.player.getAppState()===2||X.player.getAppState()===1)&&X.player.G().Y("should_clear_video_data_on_player_cued_unstarted"))x=null;else{var K=X.player.getPlaylist();if(K){var q=[];for(var D=0;D2*this.size&&QE(this),!0):!1}; g.a.get=function(X,J){return xM(this.K,X)?this.K[X]:J}; g.a.set=function(X,J){xM(this.K,X)||(this.size+=1,this.L.push(X),this.w6++);this.K[X]=J}; g.a.forEach=function(X,J){for(var L=this.bT(),x=0;x=x.L.length)return g.yJ;var K=x.L[J++];return g.aM(X?K:x.K[K])}; return Q}; var rIH={PJM:"atp",G7C:"ska",i$9:"que",QSB:"mus",sVl:"sus",C6C:"dsp",BFm:"seq",uLq:"mic",iJB:"dpa",z8q:"mlm",aeE:"dsdtr",YYI:"ntb",dXM:"vsp",V1C:"scn",hiI:"rpe",yzH:"dcn",msl:"dcp",MRm:"pas",KUB:"drq",xlM:"opf",v7C:"els",Q_Y:"isg",IpB:"svq",wKl:"mvp",fxE:"ads",lpq:"stcp",x9l:"sads",LUI:"dloc",h1B:"dcw",FXq:"asw",gjY:"apw"},vP0={qg6:"u",HvY:"cl",sk6:"k",kBE:"i",czB:"cr",vc9:"m",JBm:"g",Ht:"up"},tkH={wY:"adPlaying",QE:"onAdStateChange"},dAv={IKq:"nowPlaying",UlB:"onStateChange",wY:"adPlaying",QE:"onAdStateChange", zz:"nowPlayingShorts",vt:"onShortsStateChange"},uhv={zz:"nowPlayingShorts",vt:"onShortsStateChange"};Kx.prototype.equals=function(X){return X?this.id==X.id:!1}; var CZv="",yE=null;g.w(w6d,g.pX);var VE,c8F=dVF("loadCastFramework")||dVF("loadCastApplicationFramework"),h0V=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.MC(OP,g.G);g.a=OP.prototype;g.a.qM=function(X){this.T=arguments;this.L=!1;this.bH?this.N=g.$u()+this.MP:this.bH=g.v4(this.j,this.MP)}; g.a.stop=function(){this.bH&&(g.Ao.clearTimeout(this.bH),this.bH=null);this.N=null;this.L=!1;this.T=[]}; g.a.pause=function(){++this.K}; g.a.resume=function(){this.K&&(--this.K,!this.K&&this.L&&(this.L=!1,this.B.apply(null,this.T)))}; g.a.uB=function(){this.stop();OP.yD.uB.call(this)}; g.a.Yb=function(){this.bH&&(g.Ao.clearTimeout(this.bH),this.bH=null);this.N?(this.bH=g.v4(this.j,this.N-g.$u()),this.N=null):this.K?this.L=!0:(this.L=!1,this.B.apply(null,this.T))};aP.prototype.stringify=function(X){return g.Ao.JSON.stringify(X,void 0)}; aP.prototype.parse=function(X){return g.Ao.JSON.parse(X,void 0)};g.MC(WHF,g.BI);g.MC(p6e,g.BI);var r8d=null;g.MC(jhe,g.BI);g.MC(TPI,g.BI);g.MC(Goe,g.BI);uj.prototype.debug=function(){}; uj.prototype.info=function(){}; uj.prototype.warning=function(){};var NPu={},shV={};g.a=oP.prototype;g.a.setTimeout=function(X){this.O6=X}; g.a.HU=function(X){X=X.target;var J=this.bB;J&&g.sQ(X)==3?J.KB():this.s$(X)}; g.a.s$=function(X){try{if(X==this.L)a:{var J=g.sQ(this.L),L=this.L.K,x=this.L.getStatus();if(!(J<3)&&(J!=3||this.L&&(this.K.K||g.UQ(this.L)||g.m5(this.L)))){this.Bl||J!=4||L==7||(L==8||x<=0?wH(3):wH(2));ko3(this);var Q=this.L.getStatus();this.Lp=Q;var K=BPF(this);if(this.B=Q==200){if(this.Nx&&!this.Hl){b:{if(this.L){var q=g.kW(this.L,"X-HTTP-Initial-Response");if(q&&!g.YS(q)){var D=q;break b}}D=null}if(X=D)this.Hl=!0,Knd(this,X);else{this.B=!1;this.j=3;t7(12);SW(this);PD(this);break a}}if(this.gI){X= !0;for(var C;!this.Bl&&this.W0&&!this.z6&&(this.z6=!0,this.N.NT(this)):(SW(this),PD(this))}else Knd(this,K);J==4&&SW(this);this.B&&!this.Bl&&(J==4?ZU3(this.N,this):(this.B=!1,bj(this)))}else g.tP8(this.L),Q==400&&K.indexOf("Unknown SID")> 0?(this.j=3,t7(12)):(this.j=0,t7(13)),SW(this),PD(this)}}}catch(M){}finally{}}; g.a.cancel=function(){this.Bl=!0;SW(this)}; g.a.IM=function(){this.Km=null;var X=Date.now();X-this.Cm>=0?(this.jC!=2&&(wH(3),t7(17)),SW(this),this.j=2,PD(this)):mVF(this,this.Cm-X)}; g.a.getLastError=function(){return this.j}; g.a.jS=function(){return this.L};Il0.prototype.cancel=function(){this.N=DkV(this);if(this.K)this.K.cancel(),this.K=null;else if(this.L&&this.L.size!==0){for(var X=g.d(this.L.values()),J=X.next();!J.done;J=X.next())J.value.cancel();this.L.clear()}};g.a=n1V.prototype;g.a.St=8;g.a.t2=1;g.a.connect=function(X,J,L,x){t7(0);this.If=X;this.Bl=J||{};L&&x!==void 0&&(this.Bl.OSID=L,this.Bl.OAID=x);this.Hl=this.sH;this.vl=xkd(this,null,this.If);h7(this)}; g.a.disconnect=function(){HlH(this);if(this.t2==3){var X=this.SC++,J=this.vl.clone();g.$v(J,"SID",this.T);g.$v(J,"RID",X);g.$v(J,"TYPE","terminate");px(this,J);X=new oP(this,this.T,X);X.jC=2;X.S=Ac(J.clone());J=!1;if(g.Ao.navigator&&g.Ao.navigator.sendBeacon)try{J=g.Ao.navigator.sendBeacon(X.S.toString(),"")}catch(L){}!J&&g.Ao.Image&&((new Image).src=X.S,J=!0);J||(X.L=lE0(X.N,null),X.L.send(X.S));X.Pl=Date.now();bj(X)}umd(this)}; g.a.eW=function(){return this.t2==0}; g.a.getState=function(){return this.t2}; g.a.MV=function(X){if(this.B)if(this.B=null,this.t2==1){if(!X){this.SC=Math.floor(Math.random()*1E5);X=this.SC++;var J=new oP(this,"",X),L=this.D;this.Lp&&(L?(L=g.Vf(L),g.O1(L,this.Lp)):L=this.Lp);this.W!==null||this.Cm||(J.vl=L,L=null);var x;if(this.A0)a:{for(var Q=x=0;Q4096){x=Q;break a}if(x===4096||Q===this.N.length-1){x=Q+1;break a}}x= 1E3}else x=1E3;x=w2u(this,J,x);Q=this.vl.clone();g.$v(Q,"RID",X);g.$v(Q,"CVER",22);this.gI&&g.$v(Q,"X-HTTP-Session-Id",this.gI);px(this,Q);L&&(this.Cm?x="headers="+g.P_(g.eNR(L))+"&"+x:this.W&&g.nT(Q,this.W,L));LnC(this.K,J);this.In&&g.$v(Q,"TYPE","init");this.A0?(g.$v(Q,"$req",x),g.$v(Q,"SID","null"),J.Nx=!0,FHu(J,Q,null)):FHu(J,Q,x);this.t2=2}}else this.t2==3&&(X?tfC(this,X):this.N.length==0||g1H(this.K)||tfC(this))}; g.a.G5=function(){this.S=null;dkd(this);if(this.t_&&!(this.O6||this.L==null||this.H9<=0)){var X=2*this.H9;this.FE=dH((0,g.IH)(this.oqY,this),X)}}; g.a.oqY=function(){this.FE&&(this.FE=null,this.Hl=!1,this.O6=!0,t7(10),EP(this),dkd(this))}; g.a.NT=function(X){this.L==X&&this.t_&&!this.O6&&(VfS(this),this.O6=!0,t7(11))}; g.a.WU=function(){this.Km!=null&&(this.Km=null,EP(this),X23(this),t7(19))}; g.a.EMM=function(X){X?t7(2):t7(1)}; g.a.isActive=function(){return!!this.j&&this.j.isActive(this)}; g.a=blV.prototype;g.a.Xd=function(){}; g.a.cG=function(){}; g.a.tA=function(){}; g.a.O$=function(){}; g.a.isActive=function(){return!0}; g.a.xb=function(){};g.MC(vD,g.$W);vD.prototype.open=function(){this.L.j=this.N;this.B&&(this.L.jC=!0);this.L.connect(this.j,this.K||void 0)}; vD.prototype.close=function(){this.L.disconnect()}; vD.prototype.send=function(X){var J=this.L;if(typeof X==="string"){var L={};L.__data__=X;X=L}else this.T&&(L={},L.__data__=g.fA(X),X=L);J.N.push(new qlv(J.o2++,X));J.t2==3&&h7(J)}; vD.prototype.uB=function(){this.L.j=null;delete this.N;this.L.disconnect();delete this.L;vD.yD.uB.call(this)}; g.MC(PuH,WHF);g.MC(c3v,p6e);g.MC(rH,blV);rH.prototype.Xd=function(){this.L.dispatchEvent("m")}; rH.prototype.cG=function(X){this.L.dispatchEvent(new PuH(X))}; rH.prototype.tA=function(X){this.L.dispatchEvent(new c3v(X))}; rH.prototype.O$=function(){this.L.dispatchEvent("n")};var TJ=new g.$W;g.w(hau,g.BI);g.a=fx.prototype;g.a.ZQ=null;g.a.Mf=!1;g.a.Jq=null;g.a.Vu=null;g.a.pQ=null;g.a.DM=null;g.a.HI=null;g.a.lF=null;g.a.B2=null;g.a.Ns=null;g.a.rj=0;g.a.Ia=null;g.a.AY=null;g.a.Eq=null;g.a.xP=-1;g.a.B7=!0;g.a.WI=!1;g.a.vT=0;g.a.CR=null;var j2V={},v1F={};g.a=fx.prototype;g.a.setTimeout=function(X){this.K=X}; g.a.Jr=function(X){X=X.target;var J=this.CR;J&&g.sQ(X)==3?J.KB():this.CU(X)}; g.a.CU=function(X){try{if(X==this.Ns)a:{var J=g.sQ(this.Ns),L=this.Ns.K,x=this.Ns.getStatus();if(g.g0&&!g.Gu("420+")){if(J<4)break a}else if(J<3||J==3&&!g.UQ(this.Ns))break a;this.WI||J!=4||L==7||(L==8||x<=0?this.L.rU(3):this.L.rU(2));fl0(this);var Q=this.Ns.getStatus();this.xP=Q;var K=g.UQ(this.Ns);if(this.Mf=Q==200){J==4&&eW(this);if(this.gI){for(X=!0;!this.WI&&this.rj0?(this.Eq=3,GJ(13)):(this.Eq=0,GJ(14)),eW(this),eaI(this)}}catch(D){}finally{}}; g.a.cancel=function(){this.WI=!0;eW(this)}; g.a.UT=function(){this.Jq=null;var X=Date.now();X-this.Vu>=0?(this.DM!=2&&this.L.rU(3),eW(this),this.Eq=2,GJ(18),eaI(this)):GbS(this,this.Vu-X)}; g.a.getLastError=function(){return this.Eq};g.a=BE0.prototype;g.a.Ej=null;g.a.DI=null;g.a.ov=!1;g.a.jq=null;g.a.eR=null;g.a.gU=-1;g.a.Rt=null;g.a.jb=null;g.a.connect=function(X){this.jq=X;X=lj(this.L,null,this.jq);GJ(3);Date.now();var J=this.L.D;J!=null?(this.Rt=J[0],(this.jb=J[1])?(this.eR=1,s2u(this)):(this.eR=2,NE3(this))):(XK(X,"MODE","init"),this.DI=new fx(this),this.DI.ZQ=this.Ej,p20(this.DI,X,!1,null,!0),this.eR=0)}; g.a.F8=function(X){if(X)this.eR=2,NE3(this);else{GJ(4);var J=this.L;J.zm=J.kh.gU;Nj(J,9)}X&&this.rU(2)}; g.a.Z_=function(X){return this.L.Z_(X)}; g.a.abort=function(){this.DI&&(this.DI.cancel(),this.DI=null);this.gU=-1}; g.a.eW=function(){return!1}; g.a.Dv=function(X,J){this.gU=X.xP;if(this.eR==0)if(J){try{var L=this.K.parse(J)}catch(x){X=this.L;X.zm=this.gU;Nj(X,2);return}this.Rt=L[0];this.jb=L[1]}else X=this.L,X.zm=this.gU,Nj(X,2);else this.eR==2&&(this.ov?(GJ(7),Date.now()):J=="11111"?(GJ(6),this.ov=!0,Date.now(),this.gU=200,this.DI.cancel(),GJ(12),RP(this.L,this,!0)):(GJ(8),Date.now(),this.ov=!1))}; g.a.BT=function(){this.gU=this.DI.xP;if(this.DI.Mf)this.eR==0?this.jb?(this.eR=1,s2u(this)):(this.eR=2,NE3(this)):this.eR==2&&(this.ov?(GJ(12),RP(this.L,this,!0)):(GJ(11),RP(this.L,this,!1)));else{this.eR==0?GJ(9):this.eR==2&&GJ(10);var X=this.L;this.DI.getLastError();X.zm=this.gU;Nj(X,2)}}; g.a.UZ=function(){return this.L.UZ()}; g.a.isActive=function(){return this.L.isActive()}; g.a.rU=function(X){this.L.rU(X)};g.a=Uk3.prototype;g.a.tK=null;g.a.Jg=null;g.a.uv=null;g.a.mX=null;g.a.Y9=null;g.a.ym=null;g.a.AA=null;g.a.qc=null;g.a.oE=0;g.a.nf=0;g.a.c5=null;g.a.Oc=null;g.a.FK=null;g.a.qm=null;g.a.kh=null;g.a.AQ=null;g.a.Ss=-1;g.a.rf=-1;g.a.zm=-1;g.a.nS=0;g.a.oQ=0;g.a.jI=8;var FU0={OK:0,gZI:2,yb6:4,HI9:5,jW9:6,STOP:7,Fr:8,gWm:9,k_0:10,f36:11,zq6:12};g.MC(kbd,g.BI);g.MC(ZlS,g.BI);g.a=Uk3.prototype; g.a.connect=function(X,J,L,x,Q){GJ(0);this.Y9=J;this.Jg=L||{};x&&Q!==void 0&&(this.Jg.OSID=x,this.Jg.OAID=Q);this.S?(jW((0,g.IH)(this.vy,this,X),100),XRF(this)):this.vy(X)}; g.a.disconnect=function(){JOu(this);if(this.L==3){var X=this.oE++,J=this.ym.clone();g.$v(J,"SID",this.T);g.$v(J,"RID",X);g.$v(J,"TYPE","terminate");sP(this,J);X=new fx(this,this.T,X);X.DM=2;X.HI=Ac(J.clone());(new Image).src=X.HI.toString();X.pQ=Date.now();r3V(X)}$Ad(this)}; g.a.vy=function(X){this.kh=new BE0(this);this.kh.Ej=this.tK;this.kh.K=this.j;this.kh.connect(X)}; g.a.eW=function(){return this.L==0}; g.a.getState=function(){return this.L}; g.a.y4=function(X){this.Oc=null;K4S(this,X)}; g.a.Rm=function(){this.FK=null;this.mX=new fx(this,this.T,"rpc",this.W);this.mX.ZQ=this.tK;this.mX.vT=0;var X=this.AA.clone();g.$v(X,"RID","rpc");g.$v(X,"SID",this.T);g.$v(X,"CI",this.AQ?"0":"1");g.$v(X,"AID",this.Ss);sP(this,X);g.$v(X,"TYPE","xmlhttp");p20(this.mX,X,!0,this.qc,!1)}; g.a.Dv=function(X,J){if(this.L!=0&&(this.mX==X||this.uv==X))if(this.zm=X.xP,this.uv==X&&this.L==3)if(this.jI>7){try{var L=this.j.parse(J)}catch(x){L=null}if(Array.isArray(L)&&L.length==3)if(X=L,X[0]==0)a:{if(!this.FK){if(this.mX)if(this.mX.pQ+3E30)){if(x=J==1)this.uv||this.Oc||this.L==1||this.nS>=2?x=!1:(this.Oc=jW((0,g.IH)(this.y4,this,X),IcS(this,this.nS)),this.nS++, x=!0);x=!(x||J==2&&gG3(this))}if(x)switch(L){case 1:Nj(this,5);break;case 4:Nj(this,10);break;case 3:Nj(this,6);break;case 7:Nj(this,12);break;default:Nj(this,2)}}}; g.a.oM=function(X){if(!g.tS(arguments,this.L))throw Error("Unexpected channel state: "+this.L);}; g.a.ZW9=function(X){X?GJ(2):(GJ(1),DAH(this,8))}; g.a.Z_=function(X){if(X)throw Error("Can't create secondary domain capable XhrIo object.");X=new g.lq;X.W=!1;return X}; g.a.isActive=function(){return!!this.c5&&this.c5.isActive(this)}; g.a.rU=function(X){var J=TJ;J.dispatchEvent(new ZlS(J,X))}; g.a.UZ=function(){return!1}; g.a=CTu.prototype;g.a.Ky=function(){}; g.a.Ly=function(){}; g.a.Ng=function(){}; g.a.mp=function(){}; g.a.dn=function(){}; g.a.i4=function(){return{}}; g.a.isActive=function(){return!0};g.a=Mke.prototype;g.a.enqueue=function(X){this.K.push(X)}; g.a.isEmpty=function(){return this.L.length===0&&this.K.length===0}; g.a.clear=function(){this.L=[];this.K=[]}; g.a.contains=function(X){return g.tS(this.L,X)||g.tS(this.K,X)}; g.a.remove=function(X){var J=this.L;var L=(0,g.mSC)(J,X);L>=0?(g.d3(J,L),J=!0):J=!1;return J||g.u8(this.K,X)}; g.a.Pq=function(){for(var X=[],J=this.L.length-1;J>=0;--J)X.push(this.L[J]);J=this.K.length;for(var L=0;L=liV.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(X=liV[this.K],this.bH=g.$b((0,g.IH)(this.M1,this),X),this.K++):this.publish("pairingFailed",Error("Server error "+X.status))}; g.a.OT=function(){this.L=null;this.publish("pairingFailed",Error("Server not responding"))}; var liV=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.MC(qq,Q5);g.a=qq.prototype;g.a.start=function(){K6(this)&&this.publish("screenChange");!g.Y1("yt-remote-lounge-token-expiration")&&N_v(this);g.MV(this.L);this.L=g.$b((0,g.IH)(this.start,this),1E4)}; g.a.add=function(X,J){K6(this);lc3(this,X);I$(this,!1);this.publish("screenChange");J(X);X.token||N_v(this)}; g.a.remove=function(X,J){var L=K6(this);B_H(this,X)&&(I$(this,!1),L=!0);J(X);L&&this.publish("screenChange")}; g.a.CC=function(X,J,L,x){var Q=K6(this),K=this.get(X.id);K?(K.name!=J&&(K.name=J,I$(this,!1),Q=!0),L(X)):x(Error("no such local screen."));Q&&this.publish("screenChange")}; g.a.uB=function(){g.MV(this.L);qq.yD.uB.call(this)}; g.a.Ui=function(X){K6(this);var J=this.screens.length;X=X&&X.screens||[];for(var L=X.length,x=0;x20)break a;D=J(K,q)}K=D}Q.name=K}L(C6(this,Q))},this), onError:(0,g.IH)(function(Q){x(Error("pairing request failed: "+Q.status))},this), onTimeout:(0,g.IH)(function(){x(Error("pairing request timed out."))},this)})}; g.a.uB=function(){g.Lq(this.K);g.Lq(this.L);$T.yD.uB.call(this)}; g.a.cF=function(){K2I(this);this.publish("screenChange");this.L.update()}; $T.prototype.dispose=$T.prototype.dispose;g.MC(Mq,g.Ly);g.a=Mq.prototype;g.a.I_=function(X){this.E6()||(X&&(n6(this,""+X),this.publish("sessionFailed")),this.L=null,this.publish("sessionScreen",null))}; g.a.info=function(X){XG(this.gI,X)}; g.a.PR=function(){return null}; g.a.GT=function(X){var J=this.K;X?(J.displayStatus=new chrome.cast.ReceiverDisplayStatus(X,[]),J.displayStatus.showStop=!0):J.displayStatus=null;chrome.cast.setReceiverDisplayStatus(J,(0,g.IH)(function(){this.info("Updated receiver status for "+J.friendlyName+": "+X)},this),(0,g.IH)(function(){n6(this,"Failed to update receiver status for: "+J.friendlyName)},this))}; g.a.uB=function(){this.GT("");Mq.yD.uB.call(this)};g.w(V5,Mq);g.a=V5.prototype;g.a.bP=function(X){if(this.N){if(this.N==X)return;n6(this,"Overriding cast session with new session object");OPu(this);this.Pl=!1;this.D="unknown";this.N.removeUpdateListener(this.aB);this.N.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.FE)}this.N=X;this.N.addUpdateListener(this.aB);this.N.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.FE);MEu(this,"getMdxSessionStatus")}; g.a.B$=function(X){this.info("launchWithParams no-op for Cast: "+g.fA(X))}; g.a.stop=function(){this.N?this.N.stop((0,g.IH)(function(){this.I_()},this),(0,g.IH)(function(){this.I_(Error("Failed to stop receiver app."))},this)):this.I_(Error("Stopping cast device without session."))}; g.a.GT=function(){}; g.a.uB=function(){this.info("disposeInternal");OPu(this);this.N&&(this.N.removeUpdateListener(this.aB),this.N.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.FE));this.N=null;Mq.prototype.uB.call(this)}; g.a.Z30=function(X,J){if(!this.E6())if(J)if(J=J7(J),g.Q0(J))switch(X=""+J.type,J=J.data||{},this.info("onYoutubeMessage_: "+X+" "+g.fA(J)),X){case "mdxSessionStatus":DF8(this,J);break;case "loungeToken":yP0(this,J);break;default:n6(this,"Unknown youtube message: "+X)}else n6(this,"Unable to parse message.");else n6(this,"No data in message.")}; g.a.JW=function(X,J,L,x){g.MV(this.S);this.S=0;xF8(this.T,this.K.label,X,this.K.friendlyName,(0,g.IH)(function(Q){Q?J(Q):x>=0?(n6(this,"Screen "+X+" appears to be offline. "+x+" retries left."),this.S=g.$b((0,g.IH)(this.JW,this,X,J,L,x-1),300)):L(Error("Unable to fetch screen."))},this),L)}; g.a.PR=function(){return this.N}; g.a.cU=function(X){this.E6()||X||(n6(this,"Cast session died."),this.I_())};g.w(H3,Mq);g.a=H3.prototype;g.a.bP=function(X){this.N=X;this.N.addUpdateListener(this.Bl)}; g.a.B$=function(X){this.vl=X;this.Km()}; g.a.stop=function(){Sae(this);this.N?this.N.stop((0,g.IH)(this.I_,this,null),(0,g.IH)(this.I_,this,"Failed to stop DIAL device.")):this.I_()}; g.a.uB=function(){Sae(this);this.N&&this.N.removeUpdateListener(this.Bl);this.N=null;Mq.prototype.uB.call(this)}; g.a.Xz=function(X){this.E6()||X||(n6(this,"DIAL session died."),this.j(),this.j=function(){},this.I_())};g.w(wc,Mq);wc.prototype.stop=function(){this.I_()}; wc.prototype.bP=function(){}; wc.prototype.B$=function(){g.MV(this.N);this.N=NaN;var X=DT(this.T.zD(),this.K.label);X?y5(this,X):this.I_(Error("No such screen"))}; wc.prototype.uB=function(){g.MV(this.N);this.N=NaN;Mq.prototype.uB.call(this)};g.w(t4,g.Ly);g.a=t4.prototype; g.a.init=function(X,J){chrome.cast.timeout.requestSession=3E4;var L=new chrome.cast.SessionRequest(this.S,[chrome.cast.Capability.AUDIO_OUT]);g.VQ("desktop_enable_cast_connect")&&(L.androidReceiverCompatible=!0);this.D||(L.dialRequest=new chrome.cast.DialRequest("YouTube"));var x=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;X=X||this.B?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var Q=(0,g.IH)(this.dd9,this);L=new chrome.cast.ApiConfig(L,(0,g.IH)(this.QB, this),Q,x,X);L.customDialLaunchCallback=(0,g.IH)(this.DiB,this);chrome.cast.initialize(L,(0,g.IH)(function(){this.E6()||(chrome.cast.addReceiverActionListener(this.j),GdV(),this.K.subscribe("onlineScreenChange",(0,g.IH)(this.kf,this)),this.N=Et0(this),chrome.cast.setCustomReceivers(this.N,function(){},(0,g.IH)(function(K){this.Tc("Failed to set initial custom receivers: "+g.fA(K))},this)),this.publish("yt-remote-cast2-availability-change",uH(this)),J(!0))},this),(0,g.IH)(function(K){this.Tc("Failed to initialize API: "+ g.fA(K)); J(!1)},this))}; g.a.bYI=function(X,J){dc("Setting connected screen ID: "+X+" -> "+J);if(this.L){var L=this.L.L;if(!X||L&&L.id!=X)dc("Unsetting old screen status: "+this.L.K.friendlyName),o$(this,null)}if(X&&J){if(!this.L){X=DT(this.K.zD(),X);if(!X){dc("setConnectedScreenStatus: Unknown screen.");return}if(X.idType=="shortLived"){dc("setConnectedScreenStatus: Screen with id type to be short lived.");return}L=P7u(this,X);L||(dc("setConnectedScreenStatus: Connected receiver not custom..."),L=new chrome.cast.Receiver(X.uuid? X.uuid:X.id,X.name),L.receiverType=chrome.cast.ReceiverType.CUSTOM,this.N.push(L),chrome.cast.setCustomReceivers(this.N,function(){},(0,g.IH)(function(x){this.Tc("Failed to set initial custom receivers: "+g.fA(x))},this))); dc("setConnectedScreenStatus: new active receiver: "+L.friendlyName);o$(this,new wc(this.K,L),!0)}this.L.GT(J)}else dc("setConnectedScreenStatus: no screen.")}; g.a.MTB=function(X){this.E6()?this.Tc("Setting connection data on disposed cast v2"):this.L?this.L.B$(X):this.Tc("Setting connection data without a session")}; g.a.l9=function(){this.E6()?this.Tc("Stopping session on disposed cast v2"):this.L?(this.L.stop(),o$(this,null)):dc("Stopping non-existing session")}; g.a.requestSession=function(){chrome.cast.requestSession((0,g.IH)(this.QB,this),(0,g.IH)(this.lhI,this))}; g.a.uB=function(){this.K.unsubscribe("onlineScreenChange",(0,g.IH)(this.kf,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.j);var X=vGI,J=g.Ld("yt.mdx.remote.debug.handlers_");g.u8(J||[],X);g.Lq(this.L);g.Ly.prototype.uB.call(this)}; g.a.Tc=function(X){XG("Controller",X)}; g.a.VB=function(X,J){this.L==X&&(J||o$(this,null),this.publish("yt-remote-cast2-session-change",J))}; g.a.jT9=function(X,J){if(!this.E6())if(X)switch(X.friendlyName=chrome.cast.unescape(X.friendlyName),dc("onReceiverAction_ "+X.label+" / "+X.friendlyName+"-- "+J),J){case chrome.cast.ReceiverAction.CAST:if(this.L)if(this.L.K.label!=X.label)dc("onReceiverAction_: Stopping active receiver: "+this.L.K.friendlyName),this.L.stop();else{dc("onReceiverAction_: Casting to active receiver.");this.L.L&&this.publish("yt-remote-cast2-session-change",this.L.L);break}switch(X.receiverType){case chrome.cast.ReceiverType.CUSTOM:o$(this, new wc(this.K,X));break;case chrome.cast.ReceiverType.DIAL:o$(this,new H3(this.K,X,this.T,this.config_));break;case chrome.cast.ReceiverType.CAST:o$(this,new V5(this.K,X,this.config_));break;default:this.Tc("Unknown receiver type: "+X.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.L&&this.L.K.label==X.label?this.L.stop():this.Tc("Stopping receiver w/o session: "+X.friendlyName)}else this.Tc("onReceiverAction_ called without receiver.")}; g.a.DiB=function(X){if(this.E6())return Promise.reject(Error("disposed"));var J=X.receiver;J.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.Tc("Not DIAL receiver: "+J.friendlyName),J.receiverType=chrome.cast.ReceiverType.DIAL);var L=this.L?this.L.K:null;if(!L||L.label!=J.label)return this.Tc("Receiving DIAL launch request for non-clicked DIAL receiver: "+J.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(L&&L.label==J.label&&L.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.L.L)return dc("Reselecting dial screen."), this.publish("yt-remote-cast2-session-change",this.L.L),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.Tc('Changing CAST intent from "'+L.receiverType+'" to "dial" for '+J.friendlyName);o$(this,new H3(this.K,J,this.T,this.config_))}J=this.L;J.S=X;J.S.appState==chrome.cast.DialAppState.RUNNING?(X=J.S.extraData||{},L=X.screenId||null,O7(J)&&X.loungeToken?X.loungeTokenRefreshIntervalMs?X=uN0(J,{name:J.K.friendlyName,screenId:X.screenId,loungeToken:X.loungeToken,dialId:J.S.receiver.label, screenIdType:"shortLived"},X.loungeTokenRefreshIntervalMs):(g.sI(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(X)+".")),X=otd(J,L)):X=otd(J,L)):X=tE8(J);return X}; g.a.QB=function(X){var J=this;if(!this.E6()&&!this.B){dc("New cast session ID: "+X.sessionId);var L=X.receiver;if(L.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.L)if(L.receiverType==chrome.cast.ReceiverType.CAST)dc("Got resumed cast session before resumed mdx connection."),L.friendlyName=chrome.cast.unescape(L.friendlyName),o$(this,new V5(this.K,L,this.config_),!0);else{this.Tc("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var x=this.L.K,Q=DT(this.K.zD(), x.label);Q&&IP(Q,L.label)&&x.receiverType!=chrome.cast.ReceiverType.CAST&&L.receiverType==chrome.cast.ReceiverType.CAST&&(dc("onSessionEstablished_: manual to cast session change "+L.friendlyName),g.Lq(this.L),this.L=new V5(this.K,L,this.config_),this.L.subscribe("sessionScreen",(0,g.IH)(this.VB,this,this.L)),this.L.subscribe("sessionFailed",function(){return cP0(J,J.L)}),this.L.B$(null)); this.L.bP(X)}}}; g.a.Cf=function(){return this.L?this.L.PR():null}; g.a.lhI=function(X){this.E6()||(this.Tc("Failed to estabilish a session: "+g.fA(X)),X.code!=chrome.cast.ErrorCode.CANCEL&&o$(this,null),this.publish("yt-remote-cast2-session-failed"))}; g.a.dd9=function(X){dc("Receiver availability updated: "+X);if(!this.E6()){var J=uH(this);this.W=X==chrome.cast.ReceiverAvailability.AVAILABLE;uH(this)!=J&&this.publish("yt-remote-cast2-availability-change",uH(this))}}; g.a.kf=function(){this.E6()||(this.N=Et0(this),dc("Updating custom receivers: "+g.fA(this.N)),chrome.cast.setCustomReceivers(this.N,function(){},(0,g.IH)(function(){this.Tc("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",uH(this)))}; t4.prototype.setLaunchParams=t4.prototype.MTB;t4.prototype.setConnectedScreenStatus=t4.prototype.bYI;t4.prototype.stopSession=t4.prototype.l9;t4.prototype.getCastSession=t4.prototype.Cf;t4.prototype.requestSession=t4.prototype.requestSession;t4.prototype.init=t4.prototype.init;t4.prototype.dispose=t4.prototype.dispose;var TbC=[];g.a=zf.prototype; g.a.reset=function(X){this.listId="";this.index=-1;this.videoId="";RUS(this);this.volume=-1;this.muted=!1;X&&(this.index=X.index,this.listId=X.listId,this.videoId=X.videoId,this.playerState=X.playerState,this.volume=X.volume,this.muted=X.muted,this.audioTrackId=X.audioTrackId,this.trackData=X.trackData,this.XD=X.hasPrevious,this.VQ=X.hasNext,this.B=X.playerTime,this.j=X.playerTimeAt,this.K=X.seekableStart,this.W=X.seekableEnd,this.N=X.duration,this.S=X.loadedTime,this.L=X.liveIngestionTime,this.T= !isNaN(this.L))}; g.a.isPlaying=function(){return this.playerState==1}; g.a.isBuffering=function(){return this.playerState==3}; g.a.hE=function(){return this.playerState==1081}; g.a.Wq=function(X){this.N=isNaN(X)?0:X}; g.a.getDuration=function(){return this.T?this.N+W3(this):this.N}; g.a.clone=function(){return new zf(svu(this))};g.w(Tf,g.Ly);g.a=Tf.prototype;g.a.getState=function(){return this.N}; g.a.Je=function(){return this.T.getReconnectTimeout()}; g.a.XA=function(){this.T.reconnect()}; g.a.play=function(){f6(this)?(this.L?this.L.play(null,g.z1,R$(this,"play")):lH(this,"play"),mF3(this,1,rc(Gf(this))),this.publish("remotePlayerChange")):es(this,this.play)}; g.a.pause=function(){f6(this)?(this.L?this.L.pause(null,g.z1,R$(this,"pause")):lH(this,"pause"),mF3(this,2,rc(Gf(this))),this.publish("remotePlayerChange")):es(this,this.pause)}; g.a.seekTo=function(X){if(f6(this)){if(this.L){var J=Gf(this),L=new chrome.cast.media.SeekRequest;L.currentTime=X;J.isPlaying()||J.isBuffering()?L.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:L.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.L.seek(L,g.z1,R$(this,"seekTo",{newTime:X}))}else lH(this,"seekTo",{newTime:X});mF3(this,3,X);this.publish("remotePlayerChange")}else es(this,g.g3(this.seekTo,X))}; g.a.stop=function(){if(f6(this)){this.L?this.L.stop(null,g.z1,R$(this,"stopVideo")):lH(this,"stopVideo");var X=Gf(this);X.index=-1;X.videoId="";RUS(X);FG(this,X);this.publish("remotePlayerChange")}else es(this,this.stop)}; g.a.setVolume=function(X,J){if(f6(this)){var L=Gf(this);if(this.K){if(L.volume!=X){var x=Math.round(X)/100;this.K.setReceiverVolumeLevel(x,(0,g.IH)(function(){J4("set receiver volume: "+x)},this),(0,g.IH)(function(){this.Tc("failed to set receiver volume.")},this))}L.muted!=J&&this.K.setReceiverMuted(J,(0,g.IH)(function(){J4("set receiver muted: "+J)},this),(0,g.IH)(function(){this.Tc("failed to set receiver muted.")},this))}else{var Q={volume:X, muted:J};L.volume!=-1&&(Q.delta=X-L.volume);lH(this,"setVolume",Q)}L.muted=J;L.volume=X;FG(this,L)}else es(this,g.g3(this.setVolume,X,J))}; g.a.Tj=function(X,J){if(f6(this)){var L=Gf(this);X={videoId:X};J&&(L.trackData={trackName:J.name,languageCode:J.languageCode,sourceLanguageCode:J.translationLanguage?J.translationLanguage.languageCode:"",languageName:J.languageName,kind:J.kind},X.style=g.fA(J.style),g.O1(X,L.trackData));lH(this,"setSubtitlesTrack",X);FG(this,L)}else es(this,g.g3(this.Tj,X,J))}; g.a.setAudioTrack=function(X,J){f6(this)?(J=J.getLanguageInfo().getId(),lH(this,"setAudioTrack",{videoId:X,audioTrackId:J}),X=Gf(this),X.audioTrackId=J,FG(this,X)):es(this,g.g3(this.setAudioTrack,X,J))}; g.a.playVideo=function(X,J,L,x,Q,K,q){x=x===void 0?null:x;Q=Q===void 0?null:Q;K=K===void 0?null:K;q=q===void 0?null:q;var D=Gf(this),C={videoId:X};L!==void 0&&(C.currentIndex=L);v3(D,X,L||0);J!==void 0&&(p6(D,J),C.currentTime=J);x&&(C.listId=x);Q&&(C.playerParams=Q);K&&(C.clickTrackingParams=K);q&&(C.locationInfo=g.fA(q));lH(this,"setPlaylist",C);x||FG(this,D)}; g.a.dO=function(X,J){if(f6(this)){if(X&&J){var L=Gf(this);v3(L,X,J);FG(this,L)}lH(this,"previous")}else es(this,g.g3(this.dO,X,J))}; g.a.nextVideo=function(X,J){if(f6(this)){if(X&&J){var L=Gf(this);v3(L,X,J);FG(this,L)}lH(this,"next")}else es(this,g.g3(this.nextVideo,X,J))}; g.a.GS=function(){if(f6(this)){lH(this,"clearPlaylist");var X=Gf(this);X.reset();FG(this,X);this.publish("remotePlayerChange")}else es(this,this.GS)}; g.a.sE=function(){f6(this)?lH(this,"dismissAutoplay"):es(this,this.sE)}; g.a.dispose=function(){if(this.N!=3){var X=this.N;this.N=3;this.publish("proxyStateChange",X,this.N)}g.Ly.prototype.dispose.call(this)}; g.a.uB=function(){UFv(this);this.T=null;this.j.clear();js(this,null);g.Ly.prototype.uB.call(this)}; g.a.XP=function(X){if((X!=this.N||X==2)&&this.N!=3&&X!=0){var J=this.N;this.N=X;this.publish("proxyStateChange",J,X);if(X==1)for(;!this.j.isEmpty();)J=X=this.j,J.L.length===0&&(J.L=J.K,J.L.reverse(),J.K=[]),X.L.pop().apply(this);else X==3&&this.dispose()}}; g.a.ZOY=function(X,J){this.publish(X,J)}; g.a.S6C=function(X){if(!X)this.GL(null),js(this,null);else if(this.K.receiver.volume){X=this.K.receiver.volume;var J=Gf(this),L=Math.round(100*X.level||0);if(J.volume!=L||J.muted!=X.muted)J4("Cast volume update: "+X.level+(X.muted?" muted":"")),J.volume=L,J.muted=!!X.muted,FG(this,J)}}; g.a.GL=function(X){J4("Cast media: "+!!X);this.L&&this.L.removeUpdateListener(this.S);if(this.L=X)this.L.addUpdateListener(this.S),kpC(this),this.publish("remotePlayerChange")}; g.a.sBB=function(X){X?(kpC(this),this.publish("remotePlayerChange")):this.GL(null)}; g.a.Yy=function(){lH(this,"sendDebugCommand",{debugCommand:"stats4nerds "})}; g.a.MCH=function(){var X=eUI();X&&js(this,X)}; g.a.Tc=function(X){XG("CP",X)};g.w(Nq,g.Ly);g.a=Nq.prototype; g.a.connect=function(X,J){if(J){var L=J.listId,x=J.videoId,Q=J.videoIds,K=J.playerParams,q=J.clickTrackingParams,D=J.index,C={videoId:x},M=J.currentTime,y=J.locationInfo;J=J.loopMode;M!==void 0&&(C.currentTime=M<=5?0:M);K&&(C.playerParams=K);y&&(C.locationInfo=y);q&&(C.clickTrackingParams=q);L&&(C.listId=L);Q&&Q.length>0&&(C.videoIds=Q.join(","));D!==void 0&&(C.currentIndex=D);this.Bl&&(C.loopMode=J||"LOOP_MODE_OFF");L&&(this.L.listId=L);this.L.videoId=x;this.L.index=D||0;this.L.state=3;p6(this.L, M);this.j="UNSUPPORTED";L=this.Bl?"setInitialState":"setPlaylist";B3("Connecting with "+L+" and params: "+g.fA(C));this.K.connect({method:L,params:g.fA(C)},X,y8u())}else B3("Connecting without params"),this.K.connect({},X,y8u());JkH(this)}; g.a.Bh=function(X){this.K.Bh(X)}; g.a.dispose=function(){this.E6()||(g.JS("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),s7(this,3));g.Ly.prototype.dispose.call(this)}; g.a.uB=function(){LU3(this);iL8(this);xZ0(this);g.MV(this.S);this.S=NaN;g.MV(this.D);this.D=NaN;this.T=null;g.wE(this.Km);this.Km.length=0;this.K.dispose();g.Ly.prototype.uB.call(this);this.j=this.W=this.N=this.L=this.K=null}; g.a.UB=function(X){if(!this.N||this.N.length===0)return!1;for(var J=g.d(this.N),L=J.next();!L.done;L=J.next())if(!L.value.capabilities.has(X))return!1;return!0}; g.a.fh=function(){var X=3;this.E6()||(X=0,isNaN(this.WH())?this.K.Ge()&&isNaN(this.B)&&(X=1):X=2);return X}; g.a.v8=function(X){B3("Disconnecting with "+X);g.JS("yt.mdx.remote.remoteClient_",null);LU3(this);this.publish("beforeDisconnect",X);X==1&&Mj();this.K.disconnect(X);this.dispose()}; g.a.N6=function(){var X=this.L;this.T&&(X=this.L.clone(),v3(X,this.T,X.index));return svu(X)}; g.a.tT6=function(X){var J=this,L=new zf(X);L.videoId&&L.videoId!=this.L.videoId&&(this.T=L.videoId,g.MV(this.S),this.S=g.$b(function(){if(J.T){var Q=J.T;J.T=null;J.L.videoId!=Q&&U7(J,"getNowPlaying")}},5E3)); var x=[];this.L.listId==L.listId&&this.L.videoId==L.videoId&&this.L.index==L.index||x.push("remoteQueueChange");this.L.playerState==L.playerState&&this.L.volume==L.volume&&this.L.muted==L.muted&&rc(this.L)==rc(L)&&g.fA(this.L.trackData)==g.fA(L.trackData)||x.push("remotePlayerChange");this.L.reset(X);g.mF(x,function(Q){this.publish(Q)},this)}; g.a.dP=function(){var X=this.K.getDeviceId(),J=g.Ou(this.N,function(L){return L.type=="REMOTE_CONTROL"&&L.id!=X}); return J?J.id:""}; g.a.WH=function(){return this.K.Je()}; g.a.M4=function(){return this.j||"UNSUPPORTED"}; g.a.O4=function(){return this.W||""}; g.a.DW=function(){!isNaN(this.WH())&&this.K.XA()}; g.a.UQi=function(X,J){U7(this,X,J);KUH(this)}; g.a.gA=function(){var X=g.zo("SAPISID","")||g.zo("__Secure-1PAPISID")||"",J=g.zo("__Secure-3PAPISID","")||"";if(!X&&!J)return"";X=g.S3(g.bS(X),2);J=g.S3(g.bS(J),2);return g.S3(g.bS(","+X+","+J),2)}; Nq.prototype.subscribe=Nq.prototype.subscribe;Nq.prototype.unsubscribeByKey=Nq.prototype.ez;Nq.prototype.getProxyState=Nq.prototype.fh;Nq.prototype.disconnect=Nq.prototype.v8;Nq.prototype.getPlayerContextData=Nq.prototype.N6;Nq.prototype.setPlayerContextData=Nq.prototype.tT6;Nq.prototype.getOtherConnectedRemoteId=Nq.prototype.dP;Nq.prototype.getReconnectTimeout=Nq.prototype.WH;Nq.prototype.getAutoplayMode=Nq.prototype.M4;Nq.prototype.getAutoplayVideoId=Nq.prototype.O4;Nq.prototype.reconnect=Nq.prototype.DW; Nq.prototype.sendMessage=Nq.prototype.UQi;Nq.prototype.getXsrfToken=Nq.prototype.gA;Nq.prototype.isCapabilitySupportedOnConnectedDevices=Nq.prototype.UB;g.w(OLd,Q5);g.a=OLd.prototype;g.a.zD=function(X){return this.g5.$_gs(X)}; g.a.contains=function(X){return!!this.g5.$_c(X)}; g.a.get=function(X){return this.g5.$_g(X)}; g.a.start=function(){this.g5.$_st()}; g.a.add=function(X,J,L){this.g5.$_a(X,J,L)}; g.a.remove=function(X,J,L){this.g5.$_r(X,J,L)}; g.a.CC=function(X,J,L,x){this.g5.$_un(X,J,L,x)}; g.a.uB=function(){for(var X=this.L.length,J=0;J1&&!this.Z.getOption("remote","quickCast")?(this.S4=g.ku(X,this.L,this),this.Rk(g.H5(X,this.L)),X=this.Z.getOption("remote","currentReceiver"),X=this.L(X),this.options[X]&&this.Cn(X),this.enable(!0)):this.enable(!1)}; yS.prototype.L=function(X){return X.key}; yS.prototype.rz=function(X){return X==="cast-selector-receiver"?"Transmitir\u2026":this.S4[X].name}; yS.prototype.Ln=function(X){g.Tz.prototype.Ln.call(this,X);this.Z.setOption("remote","currentReceiver",this.S4[X]);this.uh.Vr()};g.w(GMd,g.bf);g.a=GMd.prototype; g.a.create=function(){var X=this.player.G(),J=g.mB(X);X={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:X.Y("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:X.Y("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:X.Y("enable_cast_short_lived_lounge_token")};uyC(J,X);this.subscriptions.push(g.kt("yt-remote-before-disconnect",this.J0B,this));this.subscriptions.push(g.kt("yt-remote-connection-change",this.Ih9,this));this.subscriptions.push(g.kt("yt-remote-receiver-availability-change",this.Ff, this));this.subscriptions.push(g.kt("yt-remote-auto-connect",this.YAY,this));this.subscriptions.push(g.kt("yt-remote-receiver-resumed",this.qAm,this));this.subscriptions.push(g.kt("mdx-privacy-popup-confirm",this.l2l,this));this.subscriptions.push(g.kt("mdx-privacy-popup-cancel",this.ClY,this));this.Ff()}; g.a.load=function(){this.player.cancelPlayback();g.bf.prototype.load.call(this);this.kW=new TtS(this.player.G(),this);this.player.AD(this.kW);this.DK=new pX3(this,this.player,this.mZ);var X=(X=hYV())?X.currentTime:0;var J=ck0()?new Tf(QS(),void 0):null;X==0&&J&&(X=rc(Gf(J)));X!==0&&this.qd(X);fi8(this,this.Sk,this.Sk);this.player.Wk(6)}; g.a.unload=function(){this.player.publish("mdxautoplaycanceled");this.player.Hj();this.FM=this.ip;g.xN(this.DK,this.mZ);this.mZ=this.kW=this.DK=null;g.bf.prototype.unload.call(this);this.player.Wk(5);no(this)}; g.a.uB=function(){g.ZF(this.subscriptions);g.bf.prototype.uB.call(this)}; g.a.Me=function(X){var J=g.fR.apply(1,arguments);this.loaded&&this.DK.fA.apply(this.DK,[X].concat(g.nR(J)))}; g.a.getAdState=function(){return this.uJ}; g.a.XD=function(){return this.mZ?Gf(this.mZ).XD:!1}; g.a.VQ=function(){return this.mZ?Gf(this.mZ).VQ:!1}; g.a.qd=function(X,J){this.c6=X||0;this.player.publish("progresssync",X,J);this.player.Xv("onVideoProgress",X||0)}; g.a.getCurrentTime=function(){return this.c6}; g.a.getDuration=function(){return Gf(this.mZ).getDuration()||0}; g.a.L3=function(){var X=Gf(this.mZ);return X.T?X.L+W3(X):X.L}; g.a.k6=function(){return Gf(this.mZ).S}; g.a.z4=function(){return Bbv(Gf(this.mZ))}; g.a.Ig=function(){var X=Gf(this.mZ);return X.K>0?X.K+W3(X):X.K}; g.a.getProgressState=function(){var X=Gf(this.mZ),J=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:!X.hE()&&this.player.tJ(),clipEnd:J.clipEnd,clipStart:J.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:this.getDuration(),ingestionTime:this.L3(),isAtLiveHead:this.isAtLiveHead(),loaded:this.k6(),seekableEnd:this.z4(),seekableStart:this.Ig(),offset:0,viewerLivestreamJoinMediaTime:0}}; g.a.isAtLiveHead=function(){return Bbv(Gf(this.mZ))-this.getCurrentTime()<=1}; g.a.nextVideo=function(){this.mZ&&this.mZ.nextVideo()}; g.a.dO=function(){this.mZ&&this.mZ.dO()}; g.a.J0B=function(X){X===1&&(this.lS=this.mZ?Gf(this.mZ):null)}; g.a.Ih9=function(){var X=ck0()?new Tf(QS(),void 0):null;if(X){var J=this.FM;this.loaded&&this.unload();this.mZ=X;this.lS=null;J.key!==this.ip.key&&(this.FM=J,this.load())}else g.Lq(this.mZ),this.mZ=null,this.loaded&&(this.unload(),(X=this.lS)&&X.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(X.videoId,rc(X)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)}; g.a.Ff=function(){var X=[this.ip],J=X.concat,L=ome();c3()&&g.Y1("yt-remote-cast-available")&&L.push({key:"cast-selector-receiver",name:"Cast..."});this.S4=J.call(X,L);X=SUH()||this.ip;VS(this,X);this.player.Xv("onMdxReceiversChange")}; g.a.YAY=function(){var X=SUH();VS(this,X)}; g.a.qAm=function(){this.FM=SUH()}; g.a.l2l=function(){this.Tk=!0;no(this);gp=!1;Ko&&I7(Ko,1);Ko=null}; g.a.ClY=function(){this.Tk=!1;no(this);VS(this,this.ip);this.FM=this.ip;gp=!1;Ko=null;this.player.playVideo()}; g.a.Dx=function(X,J){switch(X){case "casting":return this.loaded;case "receivers":return this.S4;case "currentReceiver":return J&&(J.key==="cast-selector-receiver"?F2V():VS(this,J)),this.loaded?this.FM:this.ip;case "quickCast":return this.S4.length===2&&this.S4[1].key==="cast-selector-receiver"?(J&&F2V(),!0):!1}}; g.a.Yy=function(){this.mZ.Yy()}; g.a.xZ=function(){return!1}; g.a.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]}; g.a.isLoggedIn=function(){var X,J;return((X=g.ly("PLAYER_CONFIG"))==null?void 0:(J=X.args)==null?void 0:J.authuser)!==void 0?!0:!(!g.ly("SESSION_INDEX")&&!g.ly("LOGGED_IN"))};g.oE("remote",GMd);})(_yt_player);