(function(g){var window=this;'use strict';var cRc=function(w){if(w instanceof g.Vl)return w;if(typeof w.Sx=="function")return w.Sx(!1);if(g.uh(w)){var M=0,P=new g.Vl;P.next=function(){for(;;){if(M>=w.length)return g.S4;if(M in w)return g.m8(w[M++]);M++}};
return P}throw Error("Not implemented");},ZRh=function(w,M,P){if(g.uh(w))g.tx(w,M,P);
else for(w=cRc(w);;){var u=w.next();if(u.done)break;M.call(P,u.value,void 0,w)}},i4=function(w){g.WG(w,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.ca()).toString(36));
return w},My=function(w,M,P){Array.isArray(P)||(P=[String(P)]);
g.KQM(w.X,M,P)},SK$=function(w,M){var P=[];
ZRh(M,function(u){try{var X=g.qB.prototype.L.call(this,u,!0)}catch(U){if(U=="Storage: Invalid value was encountered")return;throw U;}X===void 0?P.push(u):g.CYH(X)&&P.push(u)},w);
return P},HR3=function(w,M){SK$(w,M).forEach(function(P){g.qB.prototype.remove.call(this,P)},w)},pia=function(w){if(w.DO){if(w.DO.locationOverrideToken)return{locationOverrideToken:w.DO.locationOverrideToken};
if(w.DO.latitudeE7!=null&&w.DO.longitudeE7!=null)return{latitudeE7:w.DO.latitudeE7,longitudeE7:w.DO.longitudeE7}}return null},Fbc=function(w,M){g.o$(w,M)||w.push(M)},EhA=function(w){var M=0,P;
for(P in w)M++;return M},No$=function(w,M){return g.cT(w,M)},V2h=function(w){try{return g.aF.JSON.parse(w)}catch(M){}w=String(w);
if(/^\s*$/.test(w)?0:/^[\],:{}\s\u2028\u2029]*$/.test(w.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("("+w+")")}catch(M){}throw Error("Invalid JSON string: "+w);},Pr=function(w){if(g.aF.JSON)try{return g.aF.JSON.parse(w)}catch(M){}return V2h(w)},mT$=function(){var w=u4();
this.B=w;w.fX("/client_streamz/youtube/living_room/mdx/channel/opened",g.iY("channel_type"))},ohc=function(){var w=u4();
this.B=w;w.fX("/client_streamz/youtube/living_room/mdx/channel/closed",g.iY("channel_type"))},GXp=function(){var w=u4();
this.B=w;w.fX("/client_streamz/youtube/living_room/mdx/channel/message_received",g.iY("channel_type"))},yR4=function(){var w=u4();
this.B=w;w.fX("/client_streamz/youtube/living_room/mdx/channel/success")},DTV=function(){var w=u4();
this.B=w;w.fX("/client_streamz/youtube/living_room/mdx/channel/error",g.iY("channel_type"),g.iY("error_type"))},qKE=function(){var w=u4();
this.B=w;w.fX("/client_streamz/youtube/living_room/mdx/browser_channel/pending_maps")},YKt=function(){var w=u4();
this.B=w;w.fX("/client_streamz/youtube/living_room/mdx/browser_channel/undelivered_maps")},z$U=function(w,M,P,u){var X=new g.ic(null);
w&&g.Mb(X,w);M&&g.PG(X,M);P&&g.uc(X,P);u&&(X.L=u);return X},Tox=function(w,M){return new g.xO(w,M)},XA=function(w,M){return Object.prototype.hasOwnProperty.call(w,M)},dTh=function(w,M){return w===M},$b=function(w,M){this.L={};
this.B=[];this.LK=this.size=0;var P=arguments.length;if(P>1){if(P%2)throw Error("Uneven number of arguments");for(var u=0;u
5&&(w=w.slice(w.length-5));
var M=g.EV(SLt(),function(u){return u.loungeToken}),P=g.EV(w,function(u){return u.loungeToken});
g.Nq(P,function(u){return!g.o$(M,u)})&&HBE();
g.Tg("yt-remote-local-screens",w,31536E3)},pg=function(w){w||(g.lK("yt-remote-session-screen-id"),g.lK("yt-remote-session-video-id"));
cDE();w=Sz();g.D4(w,Hr());W54(w)},F5x=function(){if(!FA){var w=g.L_();
w&&(FA=new g.Gy(w))}},ESt=function(){F5x();
return FA?!!FA.get("yt-remote-use-staging-server"):!1},Ej=function(w,M){g.jU[w]=!0;
var P=g.Ji();P&&P.publish.apply(P,arguments);g.jU[w]=!1},N$E=function(){},u4=function(){if(!Ny){Ny=new g.kv(new N$E);
var w=g.EL("client_streamz_web_flush_count",-1);w!==-1&&(Ny.C=w)}return Ny},V9x=function(){var w=window.navigator.userAgent.match(/Chrome\/([0-9]+)/);
return w?parseInt(w[1],10):0},mxt=function(w){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+w)!=-1||document.currentScript.src.indexOf("&"+w)!=-1)},oSE=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},Vv=function(w){w.length?GZh(w.shift(),function(){Vv(w)}):yDC()},DxU=function(w){return"chrome-extension://"+w+"/cast_sender.js"},GZh=function(w,M,P){var u=document.createElement("script");
u.onerror=M;P&&(u.onload=P);g.o7(u,g.Vb(w));(document.head||document.documentElement).appendChild(u)},qLE=function(){var w=V9x(),M=[];
if(w>1){var P=w-1;M.push("//www.gstatic.com/eureka/clank/"+w+"/cast_sender.js");M.push("//www.gstatic.com/eureka/clank/"+P+"/cast_sender.js")}return M},yDC=function(){var w=oSE();
w&&w(!1,"No cast extension found")},zW4=function(){if(YLt){var w=2,M=oSE(),P=function(){w--;
w==0&&M&&M(!0)};
window.__onGCastApiAvailable=P;GZh("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",yDC,P)}},T$c=function(){zW4();
var w=qLE();w.push("//www.gstatic.com/eureka/clank/cast_sender.js");Vv(w)},lK3=function(){zW4();
var w=qLE();w.push.apply(w,g.L(dxj.map(DxU)));w.push("//www.gstatic.com/eureka/clank/cast_sender.js");Vv(w)},mN=function(w,M,P){g.v.call(this);
this.K=P!=null?(0,g.fC)(w,P):w;this.Hb=M;this.G=(0,g.fC)(this.vE,this);this.B=!1;this.L=0;this.C=this.jZ=null;this.X=[]},oM=function(){},L5U=function(){g.Iu.call(this,"p")},eWE=function(){g.Iu.call(this,"o")},Q1E=function(){return B$h=B$h||new g.WX},kZt=function(w){g.Iu.call(this,"serverreachability",w)},GA=function(w){var M=Q1E();
M.dispatchEvent(new kZt(M,w))},RW3=function(w){g.Iu.call(this,"statevent",w)},yv=function(w){var M=Q1E();
M.dispatchEvent(new RW3(M,w))},nS3=function(w,M,P,u){g.Iu.call(this,"timingevent",w);
this.size=M;this.rtt=P;this.retries=u},DJ=function(w,M){if(typeof w!=="function")throw Error("Fn must not be null and must be a function");
return g.aF.setTimeout(function(){w()},M)},qy=function(){},Yb=function(w,M,P,u){this.C=w;
this.X=M;this.GE=P;this.hD=u||1;this.bW=new g.HG(this);this.iW=45E3;this.UO=null;this.K=!1;this.S=this.Yu=this.V=this.eL=this.mN=this.Z3=this.B3=null;this.Lu=[];this.B=null;this.j=0;this.G=this.ys=null;this.cj=-1;this.xu=!1;this.jL=0;this.t9=null;this.M7=this.OO=this.fg=this.Cu=!1;this.L=new vSC},vSC=function(){this.C=null;
this.B="";this.L=!1},K5p=function(w,M,P){w.eL=1;
w.V=i4(M.clone());w.S=P;w.Cu=!0;s13(w,null)},s13=function(w,M){w.mN=Date.now();
zA(w);w.Yu=w.V.clone();My(w.Yu,"t",w.hD);w.j=0;var P=w.C.eL;w.L=new vSC;w.B=bBh(w.C,P?M:null,!w.S);w.jL>0&&(w.t9=new g.Cb((0,g.fC)(w.O4,w,w.B),w.jL));w.bW.listen(w.B,"readystatechange",w.m1);M=w.UO?g.Fm(w.UO):{};w.S?(w.ys||(w.ys="POST"),M["Content-Type"]="application/x-www-form-urlencoded",w.B.send(w.Yu,w.ys,w.S,M)):(w.ys="GET",w.B.send(w.Yu,w.ys,null,M));GA(1)},AD$=function(w){if(!IKV(w))return g.Jn(w.B);
var M=g.rb(w.B);if(M==="")return"";var P="",u=M.length,X=g.An(w.B)==4;if(!w.L.C){if(typeof TextDecoder==="undefined")return TA(w),dF(w),"";w.L.C=new g.aF.TextDecoder}for(var U=0;UM.length)return gSE;M=M.slice(u,u+P);w.j=u+P;return M},zA=function(w){w.Z3=Date.now()+w.iW;
j1x(w,w.iW)},j1x=function(w,M){if(w.B3!=null)throw Error("WatchDog timer not null");
w.B3=DJ((0,g.fC)(w.Ei,w),M)},CLj=function(w){w.B3&&(g.aF.clearTimeout(w.B3),w.B3=null)},dF=function(w){w.C.bF()||w.xu||t9E(w.C,w)},TA=function(w){CLj(w);
g.wR(w.t9);w.t9=null;w.bW.removeAll();if(w.B){var M=w.B;w.B=null;M.abort();M.dispose()}},urt=function(w,M){try{var P=w.C;
if(P.AV!=0&&(P.B==w||xxt(P.L,w)))if(!w.OO&&xxt(P.L,w)&&P.AV==3){try{var u=P.Kx.B.parse(M)}catch(y){u=null}if(Array.isArray(u)&&u.length==3){var X=u;if(X[0]==0)a:{if(!P.V){if(P.B)if(P.B.mN+3E30&&(P.jL=1.5*h);u=P;var c=w.ma();if(c){var Z=g.j7(c,"X-Client-Wire-Protocol");if(Z){var S=u.L;!S.B&&(g.LE(Z,"spdy")||g.LE(Z,"quic")||g.LE(Z,"h2"))&&(S.X=S.G,S.B=new Set,S.L&&(wnV(S,S.L),S.L=null))}if(u.Cu){var H=g.j7(c,"X-HTTP-Session-Id");H&&(u.DO=H,g.WG(u.UO,u.Cu,H))}}P.AV=3;P.G&&P.G.uj();P.TE&&(P.sb=Date.now()-w.mN);u=P;var p=w;u.DX=i0c(u,u.eL?u.hD:null,u.GE);if(p.OO){Mh$(u.L,
p);var F=p,E=u.jL;E&&F.setTimeout(E);F.B3&&(CLj(F),zA(F));u.B=p}else PKV(u);P.C.length>0&&Br(P)}else U[0]!="stop"&&U[0]!="close"||ez(P,7);else P.AV==3&&(U[0]=="stop"||U[0]=="close"?U[0]=="stop"?ez(P,7):P.disconnect():U[0]!="noop"&&P.G&&P.G.TB(U),P.Lu=0)}GA(4)}catch(y){}},Xn$=function(w,M){this.B=w;
this.map=M;this.context=null},$ih=function(w){this.G=w||10;
g.aF.PerformanceNavigationTiming?(w=g.aF.performance.getEntriesByType("navigation"),w=w.length>0&&(w[0].nextHopProtocol=="hq"||w[0].nextHopProtocol=="h2")):w=!!(g.aF.chrome&&g.aF.chrome.loadTimes&&g.aF.chrome.loadTimes()&&g.aF.chrome.loadTimes().wasFetchedViaSpdy);this.X=w?this.G:1;this.B=null;this.X>1&&(this.B=new Set);this.L=null;this.C=[]},UiE=function(w){return w.L?!0:w.B?w.B.size>=w.X:!1},aKp=function(w){return w.L?1:w.B?w.B.size:0},xxt=function(w,M){return w.L?w.L==M:w.B?w.B.has(M):!1},wnV=
function(w,M){w.B?w.B.add(M):w.L=M},Mh$=function(w,M){w.L&&w.L==M?w.L=null:w.B&&w.B.has(M)&&w.B.delete(M)},fqE=function(w){if(w.L!=null)return w.C.concat(w.L.Lu);
if(w.B!=null&&w.B.size!==0){var M=w.C;w=g.G(w.B.values());for(var P=w.next();!P.done;P=w.next())M=M.concat(P.value.Lu);return M}return g.LC(w.C)},Wua=function(w,M){var P=new qy;
if(g.aF.Image){var u=new Image;u.onload=g.Wa(Qv,P,"TestLoadImage: loaded",!0,M,u);u.onerror=g.Wa(Qv,P,"TestLoadImage: error",!1,M,u);u.onabort=g.Wa(Qv,P,"TestLoadImage: abort",!1,M,u);u.ontimeout=g.Wa(Qv,P,"TestLoadImage: timeout",!1,M,u);g.aF.setTimeout(function(){if(u.ontimeout)u.ontimeout()},1E4);
u.src=w}else M(!1)},hD4=function(w,M){var P=new qy,u=new AbortController,X=setTimeout(function(){u.abort();
Qv(P,"TestPingServer: timeout",!1,M)},1E4);
fetch(w,{signal:u.signal}).then(function(U){clearTimeout(X);U.ok?Qv(P,"TestPingServer: ok",!0,M):Qv(P,"TestPingServer: server error",!1,M)}).catch(function(){clearTimeout(X);
Qv(P,"TestPingServer: error",!1,M)})},Qv=function(w,M,P,u,X){try{X&&(X.onload=null,X.onerror=null,X.onabort=null,X.ontimeout=null),u(P)}catch(U){}},cSV=function(){this.B=new oM},Z0E=function(w,M,P){var u=P||"";
try{g.wV(w,function(X,U){var f=X;g.XE(X)&&(f=g.ny(X));M.push(u+U+"="+encodeURIComponent(f))})}catch(X){throw M.push(u+"type="+encodeURIComponent("_badmap")),X;
}},kb=function(w,M,P){return P&&P.vz?P.vz[w]||M:M},SmA=function(w){this.C=[];
this.hD=this.DX=this.UO=this.GE=this.B=this.DO=this.Cu=this.xu=this.j=this.cj=this.S=null;this.nV=this.Yu=0;this.a7=kb("failFast",!1,w);this.OO=this.B3=this.V=this.K=this.G=null;this.QE=!0;this.SZ=this.t9=-1;this.M7=this.Lu=this.mN=0;this.gb=kb("baseRetryDelayMs",5E3,w);this.wb=kb("retryDelaySeedMs",1E4,w);this.QL=kb("forwardChannelMaxRetries",2,w);this.Ob=kb("forwardChannelRequestTimeoutMs",2E4,w);this.rB=w&&w.F3k||void 0;this.TD=w&&w.Ep$||void 0;this.Lx=w&&w.yPs||!1;this.jL=void 0;this.eL=w&&w.rxu||
!1;this.X="";this.L=new $ih(w&&w.jNs);this.Kx=new cSV;this.bW=w&&w.mxs||!1;this.Z3=w&&w.qe0||!1;this.bW&&this.Z3&&(this.Z3=!1);this.jU=w&&w.eUL||!1;w&&w.Mz9&&(this.QE=!1);this.TE=!this.bW&&this.QE&&w&&w.Ye9||!1;this.KT=void 0;w&&w.uM&&w.uM>0&&(this.KT=w.uM);this.VE=void 0;this.sb=0;this.iW=!1;this.fg=this.ys=null},Lg=function(w){w.B&&(H0x(w),w.B.cancel(),w.B=null)},pnh=function(w){Lg(w);
w.V&&(g.aF.clearTimeout(w.V),w.V=null);l4(w);w.L.cancel();w.K&&(typeof w.K==="number"&&g.aF.clearTimeout(w.K),w.K=null)},Br=function(w){UiE(w.L)||w.K||(w.K=!0,g.Vk(w.Q4,w),w.mN=0)},EFc=function(w,M){if(aKp(w.L)>=w.L.X-(w.K?1:0))return!1;
if(w.K)return w.C=M.Lu.concat(w.C),!0;if(w.AV==1||w.AV==2||w.mN>=(w.a7?0:w.QL))return!1;w.K=DJ((0,g.fC)(w.Q4,w,M),FuA(w,w.mN));w.mN++;return!0},Vhp=function(w,M){var P;
M?P=M.GE:P=w.Yu++;var u=w.UO.clone();g.WG(u,"SID",w.X);g.WG(u,"RID",P);g.WG(u,"AID",w.t9);RM(w,u);w.j&&w.S&&g.Sr(u,w.j,w.S);P=new Yb(w,w.X,P,w.mN+1);w.j===null&&(P.UO=w.S);M&&(w.C=M.Lu.concat(w.C));M=NH$(w,P,1E3);P.setTimeout(Math.round(w.Ob*.5)+Math.round(w.Ob*.5*Math.random()));wnV(w.L,P);K5p(P,u,M)},RM=function(w,M){w.xu&&g.wd(w.xu,function(P,u){g.WG(M,u,P)});
w.G&&g.wV({},function(P,u){g.WG(M,u,P)})},NH$=function(w,M,P){P=Math.min(w.C.length,P);
var u=w.G?(0,g.fC)(w.G.rP,w.G,w):null;a:{for(var X=w.C,U=-1;;){var f=["count="+P];U==-1?P>0?(U=X[0].B,f.push("ofs="+U)):U=0:f.push("ofs="+U);for(var h=!0,c=0;c=3)return!1;
w.M7++;w.V=DJ((0,g.fC)(w.aS,w),FuA(w,w.Lu));w.Lu++;return!0},H0x=function(w){w.ys!=null&&(g.aF.clearTimeout(w.ys),w.ys=null)},mi4=function(w){w.B=new Yb(w,w.X,"rpc",w.M7);
w.j===null&&(w.B.UO=w.S);w.B.jL=0;var M=w.DX.clone();g.WG(M,"RID","rpc");g.WG(M,"SID",w.X);g.WG(M,"AID",w.t9);g.WG(M,"CI",w.OO?"0":"1");!w.OO&&w.KT&&g.WG(M,"TO",w.KT);g.WG(M,"TYPE","xmlhttp");RM(w,M);w.j&&w.S&&g.Sr(M,w.j,w.S);w.jL&&w.B.setTimeout(w.jL);var P=w.B;w=w.hD;P.eL=1;P.V=i4(M.clone());P.S=null;P.Cu=!0;s13(P,w)},l4=function(w){w.B3!=null&&(g.aF.clearTimeout(w.B3),w.B3=null)},t9E=function(w,M){var P=null;
if(w.B==M){l4(w);H0x(w);w.B=null;var u=2}else if(xxt(w.L,M))P=M.Lu,Mh$(w.L,M),u=1;else return;if(w.AV!=0)if(M.K)if(u==1){P=M.S?M.S.length:0;M=Date.now()-M.mN;var X=w.mN;u=Q1E();u.dispatchEvent(new nS3(u,P,M,X));Br(w)}else PKV(w);else{var U=M.cj;X=M.getLastError();if(X==3||X==0&&U>0||!(u==1&&EFc(w,M)||u==2&&OBA(w)))switch(P&&P.length>0&&(M=w.L,M.C=M.C.concat(P)),X){case 1:ez(w,5);break;case 4:ez(w,10);break;case 3:ez(w,6);break;default:ez(w,2)}}},FuA=function(w,M){var P=w.gb+Math.floor(Math.random()*
w.wb);
w.isActive()||(P*=2);return P*M},ez=function(w,M){if(M==2){var P=(0,g.fC)(w.U83,w),u=w.TD,X=!u;
u=new g.ic(u||"//www.google.com/images/cleardot.gif");g.aF.location&&g.aF.location.protocol=="http"||g.Mb(u,"https");i4(u);X?Wua(u.toString(),P):hD4(u.toString(),P)}else yv(2);w.AV=0;w.G&&w.G.jJ(M);oFa(w);pnh(w)},oFa=function(w){w.AV=0;
w.fg=[];if(w.G){var M=fqE(w.L);if(M.length!=0||w.C.length!=0)g.kV(w.fg,M),g.kV(w.fg,w.C),w.L.C.length=0,g.LC(w.C),w.C.length=0;w.G.w_()}},GgA=function(w){if(w.AV==0)return w.fg;
var M=[];g.kV(M,fqE(w.L));g.kV(M,w.C);return M},i0c=function(w,M,P){var u=g.hK(P);
u.B!=""?(M&&g.PG(u,M+"."+u.B),g.uc(u,u.C)):(u=g.aF.location,u=z$U(u.protocol,M?M+"."+u.hostname:u.hostname,+u.port,P));M=w.Cu;P=w.DO;M&&P&&g.WG(u,M,P);g.WG(u,"VER",w.g_);RM(w,u);return u},bBh=function(w,M,P){if(M&&!w.eL)throw Error("Can't create secondary domain capable XhrIo object.");
M=w.Lx&&!w.rB?new g.Ky(new g.tC({Q6:P})):new g.Ky(w.rB);M.j=w.eL;return M},ySE=function(){},Dih=function(){},vr=function(w,M){g.WX.call(this);
this.B=new SmA(M);this.G=w;this.L=M&&M.f3O||null;w=M&&M.PW3||null;M&&M.QNI&&(w?w["X-Client-Protocol"]="webchannel":w={"X-Client-Protocol":"webchannel"});this.B.S=w;w=M&&M.a$0||null;M&&M.HJ&&(w?w["X-WebChannel-Content-Type"]=M.HJ:w={"X-WebChannel-Content-Type":M.HJ});M&&M.qJ&&(w?w["X-WebChannel-Client-Profile"]=M.qJ:w={"X-WebChannel-Client-Profile":M.qJ});this.B.cj=w;(w=M&&M.gXL)&&!g.lA(w)&&(this.B.j=w);this.K=M&&M.rxu||!1;this.X=M&&M.tB$||!1;(M=M&&M.Pz)&&!g.lA(M)&&(this.B.Cu=M,g.h5(this.L,M)&&(w=
this.L,M in w&&delete w[M]));this.C=new ng(this)},qmt=function(w){L5U.call(this);
w.__headers__&&(this.headers=w.__headers__,this.statusCode=w.__status__,delete w.__headers__,delete w.__status__);var M=w.__sm__;M?this.data=(this.B=g.$s(M))?g.HT(M,this.B):M:this.data=w},Ym$=function(w){eWE.call(this);
this.status=1;this.errorCode=w},ng=function(w){this.B=w},zDa=function(w,M){this.L=w;
this.B=M},TH4=function(w){return GgA(w.B).map(function(M){var P=w.L;
M=M.map;"__data__"in M?(M=M.__data__,P=P.X?V2h(M):M):P=M;return P})},sj=function(w,M){if(typeof w!=="function")throw Error("Fn must not be null and must be a function");
return g.aF.setTimeout(function(){w()},M)},b4=function(w){Kg.dispatchEvent(new dip(Kg,w))},dip=function(w){g.Iu.call(this,"statevent",w)},IM=function(w,M,P,u){this.B=w;
this.X=M;this.j=P;this.K=u||1;this.L=45E3;this.C=new g.HG(this);this.G=new g.e7;this.G.setInterval(250)},Lu4=function(w,M,P){w.r3=1;
w.Qd=i4(M.clone());w.Rj=P;w.Cu=!0;lqC(w,null)},eDc=function(w,M,P,u,X){w.r3=1;
w.Qd=i4(M.clone());w.Rj=null;w.Cu=P;X&&(w.P5=!1);lqC(w,u)},lqC=function(w,M){w.Tp=Date.now();
BHE(w);w.RT=w.Qd.clone();My(w.RT,"t",w.K);w.My=0;w.RY=w.B.Ro(w.B.uG()?M:null);w.E0>0&&(w.Ep=new g.Cb((0,g.fC)(w.tO,w,w.RY),w.E0));w.C.listen(w.RY,"readystatechange",w.MU);M=w.E7?g.Fm(w.E7):{};w.Rj?(w.C2="POST",M["Content-Type"]="application/x-www-form-urlencoded",w.RY.send(w.RT,w.C2,w.Rj,M)):(w.C2="GET",w.P5&&!g.h1&&(M.Connection="close"),w.RY.send(w.RT,w.C2,null,M));w.B.C1(1)},RDt=function(w,M){var P=w.My,u=M.indexOf("\n",P);
if(u==-1)return QSh;P=Number(M.substring(P,u));if(isNaN(P))return kgc;u+=1;if(u+P>M.length)return QSh;M=M.slice(u,u+P);w.My=u+P;return M},BHE=function(w){w.m2=Date.now()+w.L;
nFU(w,w.L)},nFU=function(w,M){if(w.ge!=null)throw Error("WatchDog timer not null");
w.ge=sj((0,g.fC)(w.Cv,w),M)},vFA=function(w){w.ge&&(g.aF.clearTimeout(w.ge),w.ge=null)},sSE=function(w){w.B.bF()||w.wu||w.B.Cw(w)},A6=function(w){vFA(w);
g.wR(w.Ep);w.Ep=null;w.G.stop();w.C.removeAll();if(w.RY){var M=w.RY;w.RY=null;M.abort();M.dispose()}w.c6&&(w.c6=null)},Kut=function(w,M){try{w.B.lj(w,M),w.B.C1(4)}catch(P){}},Iqt=function(w,M,P,u,X){if(u==0)P(!1);
else{var U=X||0;u--;b0h(w,M,function(f){f?P(!0):g.aF.setTimeout(function(){Iqt(w,M,P,u,U)},U)})}},b0h=function(w,M,P){var u=new Image;
u.onload=function(){try{gF(u),P(!0)}catch(X){}};
u.onerror=function(){try{gF(u),P(!1)}catch(X){}};
u.onabort=function(){try{gF(u),P(!1)}catch(X){}};
u.ontimeout=function(){try{gF(u),P(!1)}catch(X){}};
g.aF.setTimeout(function(){if(u.ontimeout)u.ontimeout()},M);
u.src=w},gF=function(w){w.onload=null;
w.onerror=null;w.onabort=null;w.ontimeout=null},ASh=function(w){this.B=w;
this.L=new oM},gF4=function(w){var M=J6(w.B,w.h4,"/mail/images/cleardot.gif");
i4(M);Iqt(M.toString(),5E3,(0,g.fC)(w.bH,w),3,2E3);w.C1(1)},JS3=function(w){var M=w.B.K;
M!=null?(b4(5),M?(b4(11),rF(w.B,w,!1)):(b4(12),rF(w.B,w,!0))):(w.qE=new IM(w),w.qE.E7=w.rT,M=w.B,M=J6(M,M.uG()?w.yQ:null,w.M_),b4(5),My(M,"TYPE","xmlhttp"),eDc(w.qE,M,!1,w.yQ,!1))},rSE=function(w,M,P){this.B=1;
this.L=[];this.C=[];this.G=new oM;this.S=w||null;this.K=M!=null?M:null;this.V=P||!1},jSa=function(w,M){this.B=w;
this.map=M;this.context=null},CKp=function(w,M,P,u){g.Iu.call(this,"timingevent",w);
this.size=M;this.rtt=P;this.retries=u},thA=function(w){g.Iu.call(this,"serverreachability",w)},O0x=function(w){w.yR(1,0);
w.X3=J6(w,null,w.XQ);xiA(w)},aqV=function(w){w.dw&&(w.dw.abort(),w.dw=null);
w.Id&&(w.Id.cancel(),w.Id=null);w.kX&&(g.aF.clearTimeout(w.kX),w.kX=null);jz(w);w.m8&&(w.m8.cancel(),w.m8=null);w.cW&&(g.aF.clearTimeout(w.cW),w.cW=null)},wNV=function(w,M){if(w.B==0)throw Error("Invalid operation: sending map when state is closed");
w.L.push(new jSa(w.Xj++,M));w.B!=2&&w.B!=3||xiA(w)},iAE=function(w){var M=0;
w.Id&&M++;w.m8&&M++;return M},xiA=function(w){w.m8||w.cW||(w.cW=sj((0,g.fC)(w.ij,w),0),w.j8=0)},u7C=function(w,M){if(w.B==1){if(!M){w.lG=Math.floor(Math.random()*1E5);
M=w.lG++;var P=new IM(w,"",M);P.E7=w.Ay;var u=MPE(w),X=w.X3.clone();g.WG(X,"RID",M);g.WG(X,"CVER","1");Cg(w,X);Lu4(P,X,u);w.m8=P;w.B=2}}else w.B==3&&(M?Pbp(w,M):w.L.length==0||w.m8||Pbp(w))},Pbp=function(w,M){if(M)if(w.rz>6){w.L=w.C.concat(w.L);
w.C.length=0;var P=w.lG-1;M=MPE(w)}else P=M.j,M=M.Rj;else P=w.lG++,M=MPE(w);var u=w.X3.clone();g.WG(u,"SID",w.X);g.WG(u,"RID",P);g.WG(u,"AID",w.T_);Cg(w,u);P=new IM(w,w.X,P,w.j8+1);P.E7=w.Ay;P.setTimeout(1E4+Math.round(1E4*Math.random()));w.m8=P;Lu4(P,u,M)},Cg=function(w,M){w.bX&&(w=w.bX.Hd())&&g.wd(w,function(P,u){g.WG(M,u,P)})},MPE=function(w){var M=Math.min(w.L.length,1E3),P=["count="+M];
if(w.rz>6&&M>0){var u=w.L[0].B;P.push("ofs="+u)}else u=0;for(var X={},U=0;U=3)return!1;
w.j++;w.kX=sj((0,g.fC)(w.n_,w),$ZA(w,w.Q5));w.Q5++;return!0},rF=function(w,M,P){w.iV=w.K==null?P:!w.K;
w.K0=M.Fk;w.V||O0x(w)},jz=function(w){w.CK!=null&&(g.aF.clearTimeout(w.CK),w.CK=null)},$ZA=function(w,M){var P=5E3+Math.floor(Math.random()*1E4);
w.isActive()||(P*=2);return P*M},t6=function(w,M){if(M==2||M==9){var P=null;
w.bX&&(P=null);var u=(0,g.fC)(w.d89,w);P||(P=new g.ic("//www.google.com/images/cleardot.gif"),i4(P));b0h(P.toString(),1E4,u)}else b4(2);flt(w,M)},flt=function(w,M){w.B=0;
w.bX&&w.bX.NH(M);WmU(w);aqV(w)},WmU=function(w){w.B=0;
w.K0=-1;if(w.bX)if(w.C.length==0&&w.L.length==0)w.bX.WU();else{var M=g.LC(w.C),P=g.LC(w.L);w.C.length=0;w.L.length=0;w.bX.WU(M,P)}},J6=function(w,M,P){var u=g.hK(P);
if(u.B!="")M&&g.PG(u,M+"."+u.B),g.uc(u,u.C);else{var X=window.location;u=z$U(X.protocol,M?M+"."+X.hostname:X.hostname,+X.port,P)}w.t_&&g.wd(w.t_,function(U,f){g.WG(u,f,U)});
g.WG(u,"VER",w.rz);Cg(w,u);return u},hNC=function(){},chx=function(){this.B=[];
this.L=[]},ZAE=function(w){g.Iu.call(this,"channelMessage");
this.message=w},SU$=function(w){g.Iu.call(this,"channelError");
this.error=w},HAC=function(w,M){this.action=w;
this.params=M||{}},xb=function(w,M){g.v.call(this);
this.B=new g.gV(this.fOu,0,this);g.b(this,this.B);this.Hb=5E3;this.L=0;if(typeof w==="function")M&&(w=(0,g.fC)(w,M));else if(w&&typeof w.handleEvent==="function")w=(0,g.fC)(w.handleEvent,w);else throw Error("Invalid listener argument");this.C=w},pNC=function(w,M,P,u,X,U,f,h,c,Z,S,H,p,F){P=P===void 0?!1:P;
u=u===void 0?function(){return""}:u;
X=X===void 0?!1:X;U=U===void 0?!1:U;f=f===void 0?!1:f;h=h===void 0?function(){return g.zS({})}:h;
c=c===void 0?!1:c;S=S===void 0?!1:S;H=H===void 0?!1:H;p=p===void 0?!1:p;F=F===void 0?!1:F;this.eL=w;this.B3=M;this.K=new g.oC;this.L=new xb(this.kD0,this);this.B=null;this.j=!1;this.S=null;this.mN="";this.Lu=this.V=0;this.C=[];this.M7=P;this.Cu=u;this.G=U;this.UO=h;this.xu=Z;this.hD=f;this.ys=null;this.X=g.zS();this.GE=X;this.fg=c;this.bW=S;this.Z3=H;this.QE=p;this.cj=F;this.jL=new mT$;this.OO=new ohc;this.iW=new yR4;this.Yu=new GXp;this.t9=new DTV;this.TE=new qKE;this.VE=new YKt},NKh=function(w,
M,P,u,X){FmU(w);
if(w.B){var U=g.AR("ID_TOKEN"),f=w.B.Ay||{};U?f["x-youtube-identity-token"]=U:delete f["x-youtube-identity-token"];w.B.Ay=f}E1t(w);u?(u.getState()!=3&&iAE(u)==0||u.getState(),w.B.connect(M,P,w.B3,u.X,u.T_)):X?w.B.connect(M,P,w.B3,X.sessionId,X.arrayId):w.B.connect(M,P,w.B3)},G$t=function(w,M){return w.QE?!0:w.Z3?Object.values(VPp).includes(M):w.bW?!Object.values(mZc).includes(M):w.cj?Object.values(o1t).includes(M):!1},qUh=function(w){var M,P;
g.n(function(u){if(u.L==1)return g.q_(u,2),g.B(u,yhx(w),2);g.B5(u);M=w.C;w.C=[];P=M.length;DZ$(w,M,P);Oj(w);return g.Qx(u,0)})},DZ$=function(w,M,P){for(var u=0;u0?P=Object.assign({},P,M):delete P.Authorization;w.B.Ay=P}},E1t=function(w){w.xu&&!w.G&&zNc(w,w.xu())},aM=function(w){this.scheme="https";
this.port=this.domain="";this.B="/api/lounge";this.L=!0;w=w||document.location.href;var M=Number(g.UQ(w)[4]||null)||"";M&&(this.port=":"+M);this.domain=g.f5(w)||"";w=g.RK();w.search("MSIE")>=0&&(w=w.match(/MSIE ([\d.]+)/)[1],g.ks(w,"10.0")<0&&(this.L=!1))},wX=function(w,M){var P=w.B;
w.L&&(P=w.scheme+"://"+w.domain+w.port+w.B);return g.p5(P+M,{})},TKE=function(w,M){g.WX.call(this);
var P=this;this.bB=w();this.bB.subscribe("handlerOpened",this.dP,this);this.bB.subscribe("handlerClosed",this.onClosed,this);this.bB.subscribe("handlerError",function(u,X){P.onError(X)});
this.bB.subscribe("handlerMessage",this.onMessage,this);this.B=M},dZ4=function(w,M,P){var u=this;
P=P===void 0?function(){return""}:P;
var X=X===void 0?new Dih:X;var U=U===void 0?new g.oC:U;this.pathPrefix=w;this.B=M;this.mN=P;this.G=U;this.V=null;this.S=this.j=0;this.channel=null;this.K=0;this.C=new xb(function(){u.C.isActive();var f;((f=u.channel)==null?void 0:aKp((new zDa(f,f.B)).B.L))===0&&u.connect(u.V,u.j)});
this.X={};this.L={};this.B3=!1;this.logger=null;this.Lu=[];this.Oq=void 0;this.UO=new mT$;this.ys=new ohc;this.xu=new GXp;this.Cu=new DTV},ll3=function(w){g.x4(w.channel,"m",function(){w.K=3;
w.C.reset();w.V=null;w.j=0;for(var M=g.G(w.Lu),P=M.next();!P.done;P=M.next())P=P.value,w.channel&&w.channel.send(P);w.Lu=[];w.publish("webChannelOpened");w.UO.lC("WEB_CHANNEL")});
g.x4(w.channel,"n",function(){w.K=0;w.C.isActive()||w.publish("webChannelClosed");var M,P=(M=w.channel)==null?void 0:TH4(new zDa(M,M.B));P&&(w.Lu=[].concat(g.L(P)));w.ys.lC("WEB_CHANNEL")});
g.x4(w.channel,"p",function(M){var P=M.data;P[0]==="gracefulReconnect"?(w.C.start(),w.channel&&w.channel.close()):w.publish("webChannelMessage",new HAC(P[0],P[1]));w.Oq=M.statusCode;w.xu.lC("WEB_CHANNEL")});
g.x4(w.channel,"o",function(){w.Oq===401||w.C.start();w.publish("webChannelError");w.Cu.lC("WEB_CHANNEL","")})},LmA=function(w){var M=w.mN();
M?w.X["x-youtube-lounge-xsrf-token"]=M:delete w.X["x-youtube-lounge-xsrf-token"]},eNC=function(w){g.WX.call(this);
this.B=w();this.B.subscribe("webChannelOpened",this.Ui,this);this.B.subscribe("webChannelClosed",this.onClosed,this);this.B.subscribe("webChannelError",this.onError,this);this.B.subscribe("webChannelMessage",this.onMessage,this)},BK$=function(w,M,P,u,X){function U(){return new pNC(wX(w,"/bc"),M,!1,P,u)}
P=P===void 0?function(){return""}:P;
return g.FW("enable_mdx_web_channel_desktop")?new eNC(function(){return new dZ4(wX(w,"/wc"),M,P)}):new TKE(U,X)},n1a=function(){var w=QmA;
k$c();i7.push(w);RNc()},MA=function(w,M){k$c();
var P=v1U(w,String(M));i7.length==0?smh(P):(RNc(),g.tx(i7,function(u){u(P)}))},Pd=function(w){MA("CP",w)},k$c=function(){i7||(i7=g.Mj("yt.mdx.remote.debug.handlers_")||[],g.ih("yt.mdx.remote.debug.handlers_",i7))},smh=function(w){var M=(u7+1)%50;
u7=M;X9[M]=w;$_||($_=M==49)},RNc=function(){var w=i7;
if(X9[0]){var M=$_?u7:-1,P={};do P={hh:void 0},M=(M+1)%50,P.hh=X9[M],g.tx(w,function(u){return function(X){X(u.hh)}}(P));
while(M!=u7);X9=Array(50);u7=-1;$_=!1}},v1U=function(w,M){var P=(Date.now()-Km4)/1E3;
P.toFixed&&(P=P.toFixed(3));var u=[];u.push("[",P+"s","] ");u.push("[","yt.mdx.remote","] ");u.push(w+": "+M,"\n");return u.join("")},U9=function(w){g.wC.call(this);
this.K=w;this.screens=[]},bA$=function(w,M){var P=w.get(M.uuid)||w.get(M.id);
if(P)return w=P.name,P.id=M.id||P.id,P.name=M.name,P.token=M.token,P.uuid=M.uuid||P.uuid,P.name!=w;w.screens.push(M);return!0},Ilt=function(w,M){var P=w.screens.length!=M.length;
w.screens=g.DP(w.screens,function(U){return!!$xE(M,U)});
for(var u=M.length,X=0;X0&&w.X0&&mT(w,P)},function(M){w.G=function(){};
w.wg(M)})},N9$=function(w){var M={};
M.pairingCode=w.ys;M.theme=w.eL;ESt()&&(M.env_useStageMdx=1);return g.HY(M)},VUU=function(w){return new Promise(function(M){w.ys=uW3();
if(w.UO){var P=new chrome.cast.DialLaunchResponse(!0,N9$(w));M(P);EQA(w)}else w.B3=function(){g.S9(w.S);w.B3=function(){};
w.S=NaN;var u=new chrome.cast.DialLaunchResponse(!0,N9$(w));M(u);EQA(w)},w.S=g.cF(function(){w.B3()},100)})},oQV=function(w,M,P){w.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(M));
var u=new Wr(M);return(new Promise(function(X){m6E(w,u,function(U){U?(w.Lu=!0,S_(w.X,u),pu(w,u),mT(w,P)):g.ro(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(M)+" is not online."));X(U)},5)})).then(function(X){return X?new chrome.cast.DialLaunchResponse(!1):VUU(w)})},Gsp=function(w,M){var P=w.V.receiver.label,u=w.L.friendlyName;
return(new Promise(function(X){idC(w.X,P,M,u,function(U){U&&U.token&&pu(w,U);X(U)},function(U){F9(w,"Failed to get DIAL screen: "+U);
X(null)})})).then(function(X){return X&&X.token?new chrome.cast.DialLaunchResponse(!1):VUU(w)})},m6E=function(w,M,P,u){g.S9(w.K);
w.K=0;PvA(w.X,M,function(X){X||u<0?P(X):w.K=g.cF(function(){m6E(w,M,P,u-1)},300)})},mT=function(w,M){w.info("getDialAppInfoWithTimeout_ "+M);
V9(w)&&(g.S9(w.j),w.j=0,M==0?yiC(w):w.j=g.cF(function(){yiC(w)},M))},yiC=function(w){V9(w)&&w.C.getDialAppInfo(function(M){w.info("getDialAppInfo dialLaunchData: "+JSON.stringify(M));
M=M.extraData||{};var P=null;if(M.loungeToken){var u;((u=w.B)==null?void 0:u.token)==M.loungeToken&&(P="staleLoungeToken")}else P="missingLoungeToken";P?(w.mN=P,mT(w,3E4)):(w.Lu=!1,w.mN="unknown",U6$(w,M.loungeToken),mT(w,M.loungeTokenRefreshIntervalMs))},function(M){w.info("getDialAppInfo error: "+M);
w.mN="noLoungeTokenResponse";mT(w,3E4)})},D6h=function(w){g.S9(w.K);
w.K=0;g.S9(w.j);w.j=0;w.G();w.G=function(){};
g.S9(w.S)},oc=function(w,M){Hd.call(this,w,M,"ManualSession");
this.C=g.cF((0,g.fC)(this.eN,this,null),150)},G7=function(w,M){g.wC.call(this);
this.config_=M;this.L=w;this.V=M.appId||"233637DE";this.X=M.theme||"cl";this.S=M.disableCastApi||!1;this.K=M.forceMirroring||!1;this.B=null;this.j=!1;this.C=[];this.G=(0,g.fC)(this.Ut$,this)},qYU=function(w,M){return M?g.Nj(w.C,function(P){return h6(M,P.label)},w):null},y9=function(w){MA("Controller",w)},QmA=function(w){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(w)},Du=function(w){return w.j||!!w.C.length||!!w.B},qA=function(w,M,P){M!=w.B&&(g.wR(w.B),(w.B=M)?(P?w.publish("yt-remote-cast2-receiver-resumed",
M.L):w.publish("yt-remote-cast2-receiver-selected",M.L),M.subscribe("sessionScreen",(0,g.fC)(w.H2,w,M)),M.subscribe("sessionFailed",function(){return YY3(w,M)}),M.B?w.publish("yt-remote-cast2-session-change",M.B):P&&w.B.eN(null)):w.publish("yt-remote-cast2-session-change",null))},YY3=function(w,M){w.B==M&&w.publish("yt-remote-cast2-session-failed")},zzx=function(w){var M=w.L.AO(),P=w.B&&w.B.L;
w=g.EV(M,function(u){P&&h6(u,P.label)&&(P=null);var X=u.uuid?u.uuid:u.id,U=qYU(this,u);U?(U.label=X,U.friendlyName=u.name):(U=new chrome.cast.Receiver(X,u.name),U.receiverType=chrome.cast.ReceiverType.CUSTOM);return U},w);
P&&(P.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(P=new chrome.cast.Receiver(P.label,P.friendlyName),P.receiverType=chrome.cast.ReceiverType.CUSTOM),w.push(P));return w},QXU=function(w,M,P,u){u.disableCastApi?Y_("Cannot initialize because disabled by Mdx config."):T9E()?d63(M,u)&&(l8C(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?LhC(w,P):(window.__onGCastApiAvailable=function(X,U){X?LhC(w,P):(z7("Failed to load cast API: "+U),ezE(!1),l8C(!1),g.lK("yt-remote-cast-available"),g.lK("yt-remote-cast-receiver"),
B9c(),P(!1))},u.loadCastApiSetupScript?g.aX("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?V9x()>=60&&T$c():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?yDC():V9x()>=89?lK3():(zW4(),Vv(dxj.map(DxU))))):Y_("Cannot initialize because not running Chrome")},B9c=function(){Y_("dispose");
var w=T7();w&&w.dispose();g.ih("yt.mdx.remote.cloudview.instance_",null);ksj(!1);g.xQ(RzE);RzE.length=0},dX=function(){return!!g.dH("yt-remote-cast-installed")},nQE=function(){var w=g.dH("yt-remote-cast-receiver");
return w?w.friendlyName:null},vQ$=function(){Y_("clearCurrentReceiver");
g.lK("yt-remote-cast-receiver")},sXE=function(){return dX()?T7()?T7().getCastSession():(z7("getCastSelector: Cast is not initialized."),null):(z7("getCastSelector: Cast API is not installed!"),null)},KhV=function(){dX()?T7()?l7()?(Y_("Requesting cast selector."),T7().requestSession()):(Y_("Wait for cast API to be ready to request the session."),RzE.push(g.ti("yt-remote-cast2-api-ready",KhV))):z7("requestCastSelector: Cast is not initialized."):z7("requestCastSelector: Cast API is not installed!")},
Lu=function(w,M){l7()?T7().setConnectedScreenStatus(w,M):z7("setConnectedScreenStatus called before ready.")},T9E=function(){var w=g.RK().search(/ (CrMo|Chrome|CriOS)\//)>=0;
return g.p3||w},bdt=function(w,M){T7().init(w,M)},d63=function(w,M){var P=!1;
T7()||(w=new G7(w,M),w.subscribe("yt-remote-cast2-availability-change",function(u){g.Tg("yt-remote-cast-available",u);Ej("yt-remote-cast2-availability-change",u)}),w.subscribe("yt-remote-cast2-receiver-selected",function(u){Y_("onReceiverSelected: "+u.friendlyName);
g.Tg("yt-remote-cast-receiver",u);Ej("yt-remote-cast2-receiver-selected",u)}),w.subscribe("yt-remote-cast2-receiver-resumed",function(u){Y_("onReceiverResumed: "+u.friendlyName);
g.Tg("yt-remote-cast-receiver",u);Ej("yt-remote-cast2-receiver-resumed",u)}),w.subscribe("yt-remote-cast2-session-change",function(u){Y_("onSessionChange: "+cr(u));
u||g.lK("yt-remote-cast-receiver");Ej("yt-remote-cast2-session-change",u)}),g.ih("yt.mdx.remote.cloudview.instance_",w),P=!0);
Y_("cloudview.createSingleton_: "+P);return P},T7=function(){return g.Mj("yt.mdx.remote.cloudview.instance_")},LhC=function(w,M){ezE(!0);
l8C(!1);bdt(w,function(P){P?(ksj(!0),g.OY("yt-remote-cast2-api-ready")):(z7("Failed to initialize cast API."),ezE(!1),g.lK("yt-remote-cast-available"),g.lK("yt-remote-cast-receiver"),B9c());M(P)})},Y_=function(w){MA("cloudview",w)},z7=function(w){MA("cloudview",w)},ezE=function(w){Y_("setCastInstalled_ "+w);
g.Tg("yt-remote-cast-installed",w)},l7=function(){return!!g.Mj("yt.mdx.remote.cloudview.apiReady_")},ksj=function(w){Y_("setApiReady_ "+w);
g.ih("yt.mdx.remote.cloudview.apiReady_",w)},l8C=function(w){g.ih("yt.mdx.remote.cloudview.initializing_",w)},e_=function(w){this.index=-1;
this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.G=this.K=0;this.trackData=null;this.kH=this.ST=!1;this.V=this.C=this.j=this.L=0;this.B=NaN;this.X=!1;this.reset(w)},I8t=function(w){w.audioTrackId=null;
w.trackData=null;w.playerState=-1;w.ST=!1;w.kH=!1;w.K=0;w.G=g.ca();w.L=0;w.j=0;w.C=0;w.V=0;w.B=NaN;w.X=!1},Bd=function(w){return w.isPlaying()?(g.ca()-w.G)/1E3:0},Q9=function(w,M){w.K=M;
w.G=g.ca()},k_=function(w){switch(w.playerState){case 1:case 1081:return(g.ca()-w.G)/1E3+w.K;
case -1E3:return 0}return w.K},Ai3=function(w){return w.X?w.j+Bd(w):w.j},Rc=function(w,M,P){var u=w.videoId;
w.videoId=M;w.index=P;M!=u&&I8t(w)},gQE=function(w){var M={};
M.index=w.index;M.listId=w.listId;M.videoId=w.videoId;M.playerState=w.playerState;M.volume=w.volume;M.muted=w.muted;M.audioTrackId=w.audioTrackId;M.trackData=g.Eu(w.trackData);M.hasPrevious=w.ST;M.hasNext=w.kH;M.playerTime=w.K;M.playerTimeAt=w.G;M.seekableStart=w.L;M.seekableEnd=w.j;M.duration=w.C;M.loadedTime=w.V;M.liveIngestionTime=w.B;return M},vd=function(w,M){g.wC.call(this);
var P=this;this.C=0;this.X=w;this.K=[];this.G=new chx;this.L=this.B=null;this.S=(0,g.fC)(this.jIs,this);this.j=(0,g.fC)(this.AL,this);this.V=(0,g.fC)(this.w30,this);this.B3=(0,g.fC)(this.uK9,this);var u=0;w?(u=w.getProxyState(),u!=3&&(w.subscribe("proxyStateChange",this.NN,this),Jia(this))):u=3;u!=0&&(M?this.NN(u):g.cF(function(){P.NN(u)},0));
(w=sXE())&&nu(this,w);this.subscribe("yt-remote-cast2-session-change",this.B3)},s9=function(w){return new e_(w.X.getPlayerContextData())},Jia=function(w){g.tx("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(M){this.K.push(this.X.subscribe(M,g.Wa(this.Xkk,M),this))},w)},ric=function(w){g.tx(w.K,function(M){this.X.unsubscribeByKey(M)},w);
w.K.length=0},Ku=function(w){return w.getState()==1},b7=function(w,M){var P=w.G;
P.B.length+P.L.length<50&&w.G.enqueue(M)},jX$=function(w,M,P){var u=s9(w);
Q9(u,P);u.playerState!=-1E3&&(u.playerState=M);Ic(w,u)},Ao=function(w,M,P){w.X.sendMessage(M,P)},Ic=function(w,M){ric(w);
w.X.setPlayerContextData(gQE(M));Jia(w)},nu=function(w,M){w.L&&(w.L.removeUpdateListener(w.S),w.L.removeMediaListener(w.j),w.AL(null));
w.L=M;w.L&&(Pd("Setting cast session: "+w.L.sessionId),w.L.addUpdateListener(w.S),w.L.addMediaListener(w.j),w.L.media.length&&w.AL(w.L.media[0]))},Cvh=function(w){var M=w.B.media,P=w.B.customData;
if(M&&P){var u=s9(w);M.contentId!=u.videoId&&Pd("Cast changing video to: "+M.contentId);u.videoId=M.contentId;u.playerState=P.playerState;Q9(u,w.B.getEstimatedTime());Ic(w,u)}else Pd("No cast media video. Ignoring state update.")},gX=function(w,M,P){return(0,g.fC)(function(u){this.y0("Failed to "+M+" with cast v2 channel. Error code: "+u.code);
u.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.y0("Retrying "+M+" using MDx browser channel."),Ao(this,M,P))},w)},j_=function(w,M,P,u){u=u===void 0?!1:u;
g.wC.call(this);var X=this;this.K=NaN;this.ys=!1;this.S=this.V=this.Lu=this.mN=NaN;this.B3=[];this.G=this.j=this.X=this.B=this.L=null;this.UO=w;this.xu=u;this.B3.push(g.Ni(window,"beforeunload",function(){X.FT(2)}));
this.C=[];this.B=new e_;this.eL=M.id;this.Cu=M.idType;this.L=BK$(this.UO,P,this.c7,this.Cu=="shortLived",this.eL);this.L.listen("channelOpened",function(){tUE(X)});
this.L.listen("channelClosed",function(){Jo("Channel closed");isNaN(X.K)?pg(!0):pg();X.dispose()});
this.L.listen("channelError",function(U){pg();isNaN(X.QF())?(U==1&&X.Cu=="shortLived"&&X.publish("browserChannelAuthError",U),Jo("Channel error: "+U+" without reconnection"),X.dispose()):(X.ys=!0,Jo("Channel error: "+U+" with reconnection in "+X.QF()+" ms"),rX(X,2))});
this.L.listen("channelMessage",function(U){x6E(X,U)});
this.L.T2(M.token);this.subscribe("remoteQueueChange",function(){var U=X.B.videoId;g.L0()&&g.Tg("yt-remote-session-video-id",U)})},Od4=function(w){return g.Nj(w.C,function(M){return M.type=="LOUNGE_SCREEN"})},Jo=function(w){MA("conn",w)},rX=function(w,M){w.publish("proxyStateChange",M)},a8V=function(w){w.K=g.cF(function(){Jo("Connecting timeout");
w.FT(1)},2E4)},wlA=function(w){g.S9(w.K);
w.K=NaN},ix3=function(w){g.S9(w.mN);
w.mN=NaN},P5h=function(w){MWE(w);
w.Lu=g.cF(function(){Cu(w,"getNowPlaying")},2E4)},MWE=function(w){g.S9(w.Lu);
w.Lu=NaN},tUE=function(w){Jo("Channel opened");
w.ys&&(w.ys=!1,ix3(w),w.mN=g.cF(function(){Jo("Timing out waiting for a screen.");w.FT(1)},15E3))},XlE=function(w,M){var P=null;
if(M){var u=Od4(w);u&&(P={clientName:u.clientName,deviceMake:u.brand,deviceModel:u.model,osVersion:u.osVersion})}g.ih("yt.mdx.remote.remoteClient_",P);M&&(wlA(w),ix3(w));P=w.L.gC()&&isNaN(w.K);M==P?M&&(rX(w,1),Cu(w,"getSubtitlesTrack")):M?(w.rX()&&w.B.reset(),rX(w,1),Cu(w,"getNowPlaying"),ubx(w)):w.FT(1)},$W4=function(w,M){var P=M.params.videoId;
delete M.params.videoId;P==w.B.videoId&&(g.SF(M.params)?w.B.trackData=null:w.B.trackData=M.params,w.publish("remotePlayerChange"))},UWE=function(w,M,P){var u=M.params.videoId||M.params.video_id,X=parseInt(M.params.currentIndex,10);
w.B.listId=M.params.listId||w.B.listId;Rc(w.B,u,X);w.publish("remoteQueueChange",P)},WS$=function(w,M){M.params=M.params||{};
UWE(w,M,"NOW_PLAYING_MAY_CHANGE");f2t(w,M);w.publish("autoplayDismissed")},f2t=function(w,M){var P=parseInt(M.params.currentTime||M.params.current_time,10);
Q9(w.B,isNaN(P)?0:P);P=parseInt(M.params.state,10);P=isNaN(P)?-1:P;P==-1&&w.B.playerState==-1E3&&(P=-1E3);w.B.playerState=P;P=Number(M.params.loadedTime);w.B.V=isNaN(P)?0:P;w.B.l4(Number(M.params.duration));P=w.B;var u=Number(M.params.liveIngestionTime);P.B=u;P.X=isNaN(u)?!1:!0;P=w.B;u=Number(M.params.seekableStartTime);M=Number(M.params.seekableEndTime);P.L=isNaN(u)?0:u;P.j=isNaN(M)?0:M;w.B.playerState==1?P5h(w):MWE(w);w.publish("remotePlayerChange")},h1h=function(w,M){if(w.B.playerState!=-1E3){var P=
1085;
switch(parseInt(M.params.adState,10)){case 1:P=1081;break;case 2:P=1084;break;case 0:P=1083}w.B.playerState=P;M=parseInt(M.params.currentTime,10);Q9(w.B,isNaN(M)?0:M);w.publish("remotePlayerChange")}},crE=function(w,M){var P=M.params.muted=="true";
w.B.volume=parseInt(M.params.volume,10);w.B.muted=P;w.publish("remotePlayerChange")},Zxt=function(w,M){w.j=M.params.videoId;
w.publish("nowAutoplaying",parseInt(M.params.timeout,10))},SXE=function(w,M){w.j=M.params.videoId||null;
w.publish("autoplayUpNext",w.j)},Hx3=function(w,M){w.G=M.params.autoplayMode;
w.publish("autoplayModeChange",w.G);w.G=="DISABLED"&&w.publish("autoplayDismissed")},plj=function(w,M){var P=M.params.hasNext=="true";
w.B.ST=M.params.hasPrevious=="true";w.B.kH=P;w.publish("previousNextChange")},x6E=function(w,M){M=M.message;
M.params?Jo("Received: action="+M.action+", params="+g.ny(M.params)):Jo("Received: action="+M.action+" {}");switch(M.action){case "loungeStatus":M=Pr(M.params.devices);w.C=g.EV(M,function(u){return new fg(u)});
M=!!g.Nj(w.C,function(u){return u.type=="LOUNGE_SCREEN"});
XlE(w,M);M=w.If("mlm");w.publish("multiStateLoopEnabled",M);break;case "loungeScreenDisconnected":g.Tc(w.C,function(u){return u.type=="LOUNGE_SCREEN"});
XlE(w,!1);break;case "remoteConnected":var P=new fg(Pr(M.params.device));g.Nj(w.C,function(u){return u.equals(P)})||Fbc(w.C,P);
break;case "remoteDisconnected":P=new fg(Pr(M.params.device));g.Tc(w.C,function(u){return u.equals(P)});
break;case "gracefulDisconnect":break;case "playlistModified":UWE(w,M,"QUEUE_MODIFIED");break;case "nowPlaying":WS$(w,M);break;case "onStateChange":f2t(w,M);break;case "onAdStateChange":h1h(w,M);break;case "onVolumeChanged":crE(w,M);break;case "onSubtitlesTrackChanged":$W4(w,M);break;case "nowAutoplaying":Zxt(w,M);break;case "autoplayDismissed":w.publish("autoplayDismissed");break;case "autoplayUpNext":SXE(w,M);break;case "onAutoplayModeChanged":Hx3(w,M);break;case "onHasPreviousNextChanged":plj(w,
M);break;case "requestAssistedSignIn":w.publish("assistedSignInRequested",M.params.authCode);break;case "onLoopModeChanged":w.publish("loopModeChange",M.params.loopMode);break;default:Jo("Unrecognized action: "+M.action)}},ubx=function(w){g.S9(w.S);
w.S=g.cF(function(){w.FT(1)},864E5)},Cu=function(w,M,P){P?Jo("Sending: action="+M+", params="+g.ny(P)):Jo("Sending: action="+M);
w.L.sendMessage(M,P)},FSV=function(w){U9.call(this,"ScreenServiceProxy");
this.XJ=w;this.B=[];this.B.push(this.XJ.$_s("screenChange",(0,g.fC)(this.QR,this)));this.B.push(this.XJ.$_s("onlineScreenChange",(0,g.fC)(this.x7u,this)))},oB3=function(w,M){F5x();
if(!FA||!FA.get("yt-remote-disable-remote-module-for-dev")){M=g.AR("MDX_CONFIG")||M;Uxt();cDE();to||(to=new aM(M?M.loungeApiHost:void 0),ESt()&&(to.B="/api/loungedev"));x_||(x_=g.Mj("yt.mdx.remote.deferredProxies_")||[],g.ih("yt.mdx.remote.deferredProxies_",x_));EB$();var P=O9();if(!P){var u=new Zu(to,M?M.disableAutomaticScreenCache||!1:!1);g.ih("yt.mdx.remote.screenService_",u);P=O9();var X={};M&&(X={appId:M.appId,disableDial:M.disableDial,theme:M.theme,loadCastApiSetupScript:M.loadCastApiSetupScript,
disableCastApi:M.disableCastApi,enableDialLoungeToken:M.enableDialLoungeToken,enableCastLoungeToken:M.enableCastLoungeToken,forceMirroring:M.forceMirroring});g.ih("yt.mdx.remote.enableConnectWithInitialState_",M?M.enableConnectWithInitialState||!1:!1);QXU(w,u,function(U){U?ac()&&Lu(ac(),"YouTube TV"):u.subscribe("onlineScreenChange",function(){Ej("yt-remote-receiver-availability-change")})},X)}M&&!g.Mj("yt.mdx.remote.initialized_")&&(g.ih("yt.mdx.remote.initialized_",!0),wJ("Initializing: "+g.ny(M)),
iS.push(g.ti("yt-remote-cast2-api-ready",function(){Ej("yt-remote-api-ready")})),iS.push(g.ti("yt-remote-cast2-availability-change",function(){Ej("yt-remote-receiver-availability-change")})),iS.push(g.ti("yt-remote-cast2-receiver-selected",function(){Mw(null);
Ej("yt-remote-auto-connect","cast-selector-receiver")})),iS.push(g.ti("yt-remote-cast2-receiver-resumed",function(){Ej("yt-remote-receiver-resumed","cast-selector-receiver")})),iS.push(g.ti("yt-remote-cast2-session-change",NGE)),iS.push(g.ti("yt-remote-connection-change",function(U){U?Lu(ac(),"YouTube TV"):PB()||(Lu(null,null),vQ$())})),iS.push(g.ti("yt-remote-cast2-session-failed",function(){Ej("yt-remote-connection-failed")})),w=VWh(),M.isAuto&&(w.id+="#dial"),X=M.capabilities||[],X.length>0&&(w.capabilities=
X),w.name=M.device,w.app=M.app,(M=M.theme)&&(w.theme=M),wJ(" -- with channel params: "+g.ny(w)),w?(g.Tg("yt-remote-session-app",w.app),g.Tg("yt-remote-session-name",w.name)):(g.lK("yt-remote-session-app"),g.lK("yt-remote-session-name")),g.ih("yt.mdx.remote.channelParams_",w),P.start(),ac()||mWt())}},GJj=function(){var w=O9().XJ.$_gos();
var M=uS();M&&XC()&&($xE(w,M)||w.push(M));return XFC(w)},DWc=function(){var w=yrE();
!w&&dX()&&nQE()&&(w={key:"cast-selector-receiver",name:nQE()});return w},yrE=function(){var w=GJj(),M=uS();
M||(M=PB());return g.Nj(w,function(P){return M&&h6(M,P.key)?!0:!1})},uS=function(){var w=ac();
if(!w)return null;var M=O9().dG();return ZJ(M,w)},NGE=function(w){wJ("remote.onCastSessionChange_: "+cr(w));
if(w){var M=uS();if(M&&M.id==w.id){if(Lu(M.id,"YouTube TV"),w.idType=="shortLived"&&(w=w.token))$o&&($o.token=w),(M=XC())&&M.T2(w)}else M&&Ul(),f1(w,1)}else XC()&&Ul()},Ul=function(){l7()?T7().stopSession():z7("stopSession called before API ready.");
var w=XC();w&&(w.disconnect(1),qXU(null))},YXA=function(){var w=XC();
return!!w&&w.getProxyState()!=3},wJ=function(w){MA("remote",w)},O9=function(){if(!z1C){var w=g.Mj("yt.mdx.remote.screenService_");
z1C=w?new FSV(w):null}return z1C},ac=function(){return g.Mj("yt.mdx.remote.currentScreenId_")},TGE=function(w){g.ih("yt.mdx.remote.currentScreenId_",w)},dWA=function(){return g.Mj("yt.mdx.remote.connectData_")},Mw=function(w){g.ih("yt.mdx.remote.connectData_",w)},XC=function(){return g.Mj("yt.mdx.remote.connection_")},qXU=function(w){var M=XC();
Mw(null);w||TGE("");g.ih("yt.mdx.remote.connection_",w);x_&&(g.tx(x_,function(P){P(w)}),x_.length=0);
M&&!w?Ej("yt-remote-connection-change",!1):!M&&w&&Ej("yt-remote-connection-change",!0)},PB=function(){var w=g.L0();
if(!w)return null;var M=O9();if(!M)return null;M=M.dG();return ZJ(M,w)},f1=function(w,M){ac();
uS()&&uS();if(WB)$o=w;else{TGE(w.id);var P=g.Mj("yt.mdx.remote.enableConnectWithInitialState_")||!1;w=new j_(to,w,VWh(),P);w.connect(M,dWA());w.subscribe("beforeDisconnect",function(u){Ej("yt-remote-before-disconnect",u)});
w.subscribe("beforeDispose",function(){XC()&&(XC(),qXU(null))});
w.subscribe("browserChannelAuthError",function(){var u=uS();u&&u.idType=="shortLived"&&(l7()?T7().handleBrowserChannelAuthError():z7("refreshLoungeToken called before API ready."))});
qXU(w)}},mWt=function(){var w=PB();
w?(wJ("Resume connection to: "+cr(w)),f1(w,0)):(pg(),vQ$(),wJ("Skipping connecting because no session screen found."))},EB$=function(){var w=VWh();
if(g.SF(w)){w=Hr();var M=g.dH("yt-remote-session-name")||"",P=g.dH("yt-remote-session-app")||"";w={device:"REMOTE_CONTROL",id:w,name:M,app:P,mdxVersion:3};w.authuser=String(g.AR("SESSION_INDEX","0"));(M=g.AR("DELEGATED_SESSION_ID"))&&(w.pageId=String(M));g.ih("yt.mdx.remote.channelParams_",w)}},VWh=function(){return g.Mj("yt.mdx.remote.channelParams_")||{}},e1$=function(w,M,P){g.v.call(this);
var u=this;this.B=w;this.U=M;this.Hj=P;this.events=new g.V2(this);this.G=!1;this.K=new g.EH(64);this.L=new g.gV(this.eC,500,this);this.C=new g.gV(this.GM,1E3,this);this.V=new mN(this.nDs,0,this);this.X={};this.S=new g.gV(this.Dd,1E3,this);this.j=new g.Cb(this.seekTo,1E3,this);this.B3=this.events.Y(this.U,"onVolumeChange",function(X){l2t(u,X)});
g.b(this,this.events);this.events.Y(M,"onCaptionsTrackListChanged",this.RiL);this.events.Y(M,"captionschanged",this.a3O);this.events.Y(M,"captionssettingschanged",this.t8);this.events.Y(M,"videoplayerreset",this.LY);this.events.Y(M,"mdxautoplaycancel",function(){u.Hj.Ux()});
M.D("enable_mdx_video_play_directly")&&this.events.Y(M,"videodatachange",function(){LS4(u.B)||hj(u)||cB(u,0)});
w=this.Hj;w.sO();w.subscribe("proxyStateChange",this.iL,this);w.subscribe("remotePlayerChange",this.fC,this);w.subscribe("remoteQueueChange",this.LY,this);w.subscribe("previousNextChange",this.td,this);w.subscribe("nowAutoplaying",this.gQ,this);w.subscribe("autoplayDismissed",this.yf,this);g.b(this,this.L);g.b(this,this.C);g.b(this,this.V);g.b(this,this.S);g.b(this,this.j);this.t8();this.LY();this.fC()},l2t=function(w,M){if(hj(w)){w.Hj.unsubscribe("remotePlayerChange",w.fC,w);
var P=Math.round(M.volume);M=!!M.muted;var u=s9(w.Hj);if(P!==u.volume||M!==u.muted)w.Hj.setVolume(P,M),w.S.start();w.Hj.subscribe("remotePlayerChange",w.fC,w)}},BGA=function(w){w.Ub(0);
w.L.stop();w.Pk(new g.EH(64))},QEE=function(w,M){if(hj(w)&&!w.G){var P=null;
M&&(P={style:w.U.getSubtitlesUserSettings()},Object.assign(P,M));w.Hj.SJ(w.U.getVideoData(1).videoId,P);w.X=s9(w.Hj).trackData}},cB=function(w,M){var P=w.U.getPlaylist();
if(P==null?0:P.listId){var u=P.index;var X=P.listId.toString()}P=w.U.getVideoData(1);w.Hj.playVideo(P.videoId,M,u,X,P.playerParams,P.UO,pia(P));w.Pk(new g.EH(1))},kJj=function(w,M){if(M){var P=w.U.getOption("captions","tracklist",{bS:1});
P&&P.length?(w.U.setOption("captions","track",M),w.G=!1):(w.U.loadModule("captions"),w.G=!0)}else w.U.setOption("captions","track",{})},hj=function(w){return s9(w.Hj).videoId===w.U.getVideoData(1).videoId},R1a=function(w,M){g.Al.call(this,w);
this.B=M},ZL=function(){g.r.call(this,{W:"div",
T:"ytp-mdx-popup-dialog",Z:{role:"dialog"},J:[{W:"div",T:"ytp-mdx-popup-dialog-inner-content",J:[{W:"div",T:"ytp-mdx-popup-title",pu:"Saliste de tu cuenta"},{W:"div",T:"ytp-mdx-popup-description",pu:"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."},{W:"div",T:"ytp-mdx-privacy-popup-buttons",J:[{W:"button",d$:["ytp-button",
"ytp-mdx-privacy-popup-cancel"],pu:"Cancelar"},{W:"button",d$:["ytp-button","ytp-mdx-privacy-popup-confirm"],pu:"Confirmar"}]}]}]});this.fade=new g.Cf(this,250);this.cancelButton=this.RI("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.RI("ytp-mdx-privacy-popup-confirm");g.b(this,this.fade);this.Y(this.cancelButton,"click",this.B);this.Y(this.confirmButton,"click",this.L)},S$=function(w){g.r.call(this,{W:"div",
T:"ytp-remote",J:[{W:"div",T:"ytp-remote-display-status",J:[{W:"div",T:"ytp-remote-display-status-icon",J:[g.cSM()]},{W:"div",T:"ytp-remote-display-status-text",pu:"{{statustext}}"}]}]});this.api=w;this.fade=new g.Cf(this,250);g.b(this,this.fade);this.Y(w,"presentingplayerstatechange",this.onStateChange);this.g7(w.getPlayerStateObject())},HB=function(w,M){g.v6.call(this,"Reproducir en",1,w,M);
this.U=w;this.g0={};this.Y(w,"onMdxReceiversChange",this.X);this.Y(w,"presentingplayerstatechange",this.X);this.X()},nB$=function(w){g.D0.call(this,w);
this.yJ={key:uW3(),name:"Esta computadora"};this.Px=null;this.subscriptions=[];this.A$=this.Hj=null;this.g0=[this.yJ];this.KH=this.yJ;this.zt=new g.EH(64);this.yM=0;this.yO=-1;this.Fn=!1;this.Wb=this.KC=this.RL=null;if(!g.jY(this.player.N())&&!g.LW(this.player.N())){w=this.player;var M=g.y1(w);M&&(M=M.CN())&&(M=new HB(w,M),g.b(this,M));M=new S$(w);g.b(this,M);g.bD(w,M.element,4);this.RL=new ZL;g.b(this,this.RL);g.bD(w,this.RL.element,4);this.Fn=!!PB()}},p1=function(w){w.KC&&(w.player.removeEventListener("presentingplayerstatechange",
w.KC),w.KC=null)},vBV=function(w,M,P){w.zt=P;
w.player.publish("presentingplayerstatechange",new g.$9(P,M))},FC=function(w,M){if(M.key!==w.KH.key)if(M.key===w.yJ.key)Ul();
else if(LS4(w)&&sEa(w),w.KH=M,!w.player.N().D("disable_mdx_connection_in_mdx_module_for_music_web")||!g.LW(w.player.N())){var P=w.player.getPlaylistId();var u=w.player.getVideoData(1);var X=u.videoId;if(!P&&!X||(w.player.getAppState()===2||w.player.getAppState()===1)&&w.player.N().D("should_clear_video_data_on_player_cued_unstarted"))u=null;else{var U=w.player.getPlaylist();if(U){var f=[];for(var h=0;h2*this.size&&Uj(this),!0):!1};
g.N.get=function(w,M){return XA(this.L,w)?this.L[w]:M};
g.N.set=function(w,M){XA(this.L,w)||(this.size+=1,this.B.push(w),this.LK++);this.L[w]=M};
g.N.forEach=function(w,M){for(var P=this.oN(),u=0;u=u.B.length)return g.S4;var U=u.B[M++];return g.m8(w?U:u.L[U])};
return X};
var BoC={pb$:"atp",u_u:"ska",f8I:"que",MxN:"mus",jB9:"sus",o6O:"dsp",Ugu:"seq",LA3:"mic",Bg$:"dpa",ryI:"mlm",PII:"dsdtr",k19:"ntb",xru:"vsp",WQ3:"scn",LP3:"rpe",qzK:"dcn",J5k:"dcp",txs:"pas",cF3:"drq",Dz3:"opf",X_N:"els",yF3:"isg",xg3:"svq",CTO:"mvp",Rh$:"ads",ooW:"stcp",DgI:"sads",Sz$:"dloc",IvK:"dcw",CXK:"asw",rVO:"apw"},Qgj={kLI:"u",GJ0:"cl",TkO:"k",ve0:"i",iiW:"cr",yyW:"m",av3:"g",MF:"up"},VPp={Ja:"adPlaying",c$:"onAdStateChange"},mZc={xz$:"nowPlaying",O$0:"onStateChange",Ja:"adPlaying",c$:"onAdStateChange",
JT:"nowPlayingShorts",P$:"onShortsStateChange"},o1t={JT:"nowPlayingShorts",P$:"onShortsStateChange"};fg.prototype.equals=function(w){return w?this.id==w.id:!1};
var hWc="",FA=null;g.V(N$E,g.Bj);var Ny,YLt=mxt("loadCastFramework")||mxt("loadCastApplicationFramework"),dxj=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.Sp(mN,g.v);g.N=mN.prototype;g.N.Ih=function(w){this.X=arguments;this.B=!1;this.jZ?this.C=g.ca()+this.Hb:this.jZ=g.BX(this.G,this.Hb)};
g.N.stop=function(){this.jZ&&(g.aF.clearTimeout(this.jZ),this.jZ=null);this.C=null;this.B=!1;this.X=[]};
g.N.pause=function(){++this.L};
g.N.resume=function(){this.L&&(--this.L,!this.L&&this.B&&(this.B=!1,this.K.apply(null,this.X)))};
g.N.v3=function(){this.stop();mN.Ik.v3.call(this)};
g.N.vE=function(){this.jZ&&(g.aF.clearTimeout(this.jZ),this.jZ=null);this.C?(this.jZ=g.BX(this.G,this.C-g.ca()),this.C=null):this.L?this.B=!0:(this.B=!1,this.K.apply(null,this.X))};oM.prototype.stringify=function(w){return g.aF.JSON.stringify(w,void 0)};
oM.prototype.parse=function(w){return g.aF.JSON.parse(w,void 0)};g.Sp(L5U,g.Iu);g.Sp(eWE,g.Iu);var B$h=null;g.Sp(kZt,g.Iu);g.Sp(RW3,g.Iu);g.Sp(nS3,g.Iu);qy.prototype.debug=function(){};
qy.prototype.info=function(){};
qy.prototype.warning=function(){};var JDp={},gSE={};g.N=Yb.prototype;g.N.setTimeout=function(w){this.iW=w};
g.N.m1=function(w){w=w.target;var M=this.t9;M&&g.An(w)==3?M.Up():this.O4(w)};
g.N.O4=function(w){try{if(w==this.B)a:{var M=g.An(this.B),P=this.B.L,u=this.B.getStatus();if(!(M<3)&&(M!=3||this.B&&(this.L.L||g.Jn(this.B)||g.rb(this.B)))){this.xu||M!=4||P==7||(P==8||u<=0?GA(3):GA(2));CLj(this);var X=this.B.getStatus();this.cj=X;var U=AD$(this);if(this.K=X==200){if(this.fg&&!this.OO){b:{if(this.B){var f=g.j7(this.B,"X-HTTP-Initial-Response");if(f&&!g.lA(f)){var h=f;break b}}h=null}if(w=h)this.OO=!0,urt(this,w);else{this.K=!1;this.G=3;yv(12);TA(this);dF(this);break a}}if(this.Cu){w=
!0;for(var c;!this.xu&&this.j0&&!this.M7&&(this.M7=!0,this.C.fF(this)):(TA(this),dF(this))}else urt(this,U);M==4&&TA(this);this.K&&!this.xu&&(M==4?t9E(this.C,this):(this.K=!1,zA(this)))}else g.o61(this.B),X==400&&U.indexOf("Unknown SID")>
0?(this.G=3,yv(12)):(this.G=0,yv(13)),TA(this),dF(this)}}}catch(Z){}finally{}};
g.N.cancel=function(){this.xu=!0;TA(this)};
g.N.Ei=function(){this.B3=null;var w=Date.now();w-this.Z3>=0?(this.eL!=2&&(GA(3),yv(17)),TA(this),this.G=2,dF(this)):j1x(this,this.Z3-w)};
g.N.getLastError=function(){return this.G};
g.N.ma=function(){return this.B};$ih.prototype.cancel=function(){this.C=fqE(this);if(this.L)this.L.cancel(),this.L=null;else if(this.B&&this.B.size!==0){for(var w=g.G(this.B.values()),M=w.next();!M.done;M=w.next())M.value.cancel();this.B.clear()}};g.N=SmA.prototype;g.N.g_=8;g.N.AV=1;g.N.connect=function(w,M,P,u){yv(0);this.GE=w;this.xu=M||{};P&&u!==void 0&&(this.xu.OSID=P,this.xu.OAID=u);this.OO=this.QE;this.UO=i0c(this,null,this.GE);Br(this)};
g.N.disconnect=function(){pnh(this);if(this.AV==3){var w=this.Yu++,M=this.UO.clone();g.WG(M,"SID",this.X);g.WG(M,"RID",w);g.WG(M,"TYPE","terminate");RM(this,M);w=new Yb(this,this.X,w);w.eL=2;w.V=i4(M.clone());M=!1;if(g.aF.navigator&&g.aF.navigator.sendBeacon)try{M=g.aF.navigator.sendBeacon(w.V.toString(),"")}catch(P){}!M&&g.aF.Image&&((new Image).src=w.V,M=!0);M||(w.B=bBh(w.C,null),w.B.send(w.V));w.mN=Date.now();zA(w)}oFa(this)};
g.N.bF=function(){return this.AV==0};
g.N.getState=function(){return this.AV};
g.N.Q4=function(w){if(this.K)if(this.K=null,this.AV==1){if(!w){this.Yu=Math.floor(Math.random()*1E5);w=this.Yu++;var M=new Yb(this,"",w),P=this.S;this.cj&&(P?(P=g.Fm(P),g.NK(P,this.cj)):P=this.cj);this.j!==null||this.Z3||(M.UO=P,P=null);var u;if(this.bW)a:{for(var X=u=0;X4096){u=X;break a}if(u===4096||X===this.C.length-1){u=X+1;break a}}u=
1E3}else u=1E3;u=NH$(this,M,u);X=this.UO.clone();g.WG(X,"RID",w);g.WG(X,"CVER",22);this.Cu&&g.WG(X,"X-HTTP-Session-Id",this.Cu);RM(this,X);P&&(this.Z3?u="headers="+g.TL(g.bhU(P))+"&"+u:this.j&&g.Sr(X,this.j,P));wnV(this.L,M);this.jU&&g.WG(X,"TYPE","init");this.bW?(g.WG(X,"$req",u),g.WG(X,"SID","null"),M.fg=!0,K5p(M,X,null)):K5p(M,X,u);this.AV=2}}else this.AV==3&&(w?Vhp(this,w):this.C.length==0||UiE(this.L)||Vhp(this))};
g.N.aS=function(){this.V=null;mi4(this);if(this.TE&&!(this.iW||this.B==null||this.sb<=0)){var w=2*this.sb;this.ys=DJ((0,g.fC)(this.guI,this),w)}};
g.N.guI=function(){this.ys&&(this.ys=null,this.OO=!1,this.iW=!0,yv(10),Lg(this),mi4(this))};
g.N.fF=function(w){this.B==w&&this.TE&&!this.iW&&(H0x(this),this.iW=!0,yv(11))};
g.N.Rh=function(){this.B3!=null&&(this.B3=null,Lg(this),OBA(this),yv(19))};
g.N.U83=function(w){w?yv(2):yv(1)};
g.N.isActive=function(){return!!this.G&&this.G.isActive(this)};
g.N=ySE.prototype;g.N.uj=function(){};
g.N.TB=function(){};
g.N.jJ=function(){};
g.N.w_=function(){};
g.N.isActive=function(){return!0};
g.N.rP=function(){};g.Sp(vr,g.WX);vr.prototype.open=function(){this.B.G=this.C;this.K&&(this.B.eL=!0);this.B.connect(this.G,this.L||void 0)};
vr.prototype.close=function(){this.B.disconnect()};
vr.prototype.send=function(w){var M=this.B;if(typeof w==="string"){var P={};P.__data__=w;w=P}else this.X&&(P={},P.__data__=g.ny(w),w=P);M.C.push(new Xn$(M.nV++,w));M.AV==3&&Br(M)};
vr.prototype.v3=function(){this.B.G=null;delete this.C;this.B.disconnect();delete this.B;vr.Ik.v3.call(this)};
g.Sp(qmt,L5U);g.Sp(Ym$,eWE);g.Sp(ng,ySE);ng.prototype.uj=function(){this.B.dispatchEvent("m")};
ng.prototype.TB=function(w){this.B.dispatchEvent(new qmt(w))};
ng.prototype.jJ=function(w){this.B.dispatchEvent(new Ym$(w))};
ng.prototype.w_=function(){this.B.dispatchEvent("n")};var Kg=new g.WX;g.V(dip,g.Iu);g.N=IM.prototype;g.N.E7=null;g.N.SB=!1;g.N.ge=null;g.N.m2=null;g.N.Tp=null;g.N.r3=null;g.N.Qd=null;g.N.RT=null;g.N.Rj=null;g.N.RY=null;g.N.My=0;g.N.c6=null;g.N.C2=null;g.N.mJ=null;g.N.jR=-1;g.N.P5=!0;g.N.wu=!1;g.N.E0=0;g.N.Ep=null;var kgc={},QSh={};g.N=IM.prototype;g.N.setTimeout=function(w){this.L=w};
g.N.MU=function(w){w=w.target;var M=this.Ep;M&&g.An(w)==3?M.Up():this.tO(w)};
g.N.tO=function(w){try{if(w==this.RY)a:{var M=g.An(this.RY),P=this.RY.L,u=this.RY.getStatus();if(g.h1&&!g.KQ("420+")){if(M<4)break a}else if(M<3||M==3&&!g.Jn(this.RY))break a;this.wu||M!=4||P==7||(P==8||u<=0?this.B.C1(3):this.B.C1(2));vFA(this);var X=this.RY.getStatus();this.jR=X;var U=g.Jn(this.RY);if(this.SB=X==200){M==4&&A6(this);if(this.Cu){for(w=!0;!this.wu&&this.My0?(this.mJ=3,b4(13)):(this.mJ=0,b4(14)),A6(this),sSE(this)}}catch(h){}finally{}};
g.N.cancel=function(){this.wu=!0;A6(this)};
g.N.Cv=function(){this.ge=null;var w=Date.now();w-this.m2>=0?(this.r3!=2&&this.B.C1(3),A6(this),this.mJ=2,b4(18),sSE(this)):nFU(this,this.m2-w)};
g.N.getLastError=function(){return this.mJ};g.N=ASh.prototype;g.N.rT=null;g.N.qE=null;g.N.aM=!1;g.N.M_=null;g.N.HI=null;g.N.Fk=-1;g.N.yQ=null;g.N.h4=null;g.N.connect=function(w){this.M_=w;w=J6(this.B,null,this.M_);b4(3);Date.now();var M=this.B.S;M!=null?(this.yQ=M[0],(this.h4=M[1])?(this.HI=1,gF4(this)):(this.HI=2,JS3(this))):(My(w,"MODE","init"),this.qE=new IM(this),this.qE.E7=this.rT,eDc(this.qE,w,!1,null,!0),this.HI=0)};
g.N.bH=function(w){if(w)this.HI=2,JS3(this);else{b4(4);var M=this.B;M.K0=M.dw.Fk;t6(M,9)}w&&this.C1(2)};
g.N.Ro=function(w){return this.B.Ro(w)};
g.N.abort=function(){this.qE&&(this.qE.cancel(),this.qE=null);this.Fk=-1};
g.N.bF=function(){return!1};
g.N.lj=function(w,M){this.Fk=w.jR;if(this.HI==0)if(M){try{var P=this.L.parse(M)}catch(u){w=this.B;w.K0=this.Fk;t6(w,2);return}this.yQ=P[0];this.h4=P[1]}else w=this.B,w.K0=this.Fk,t6(w,2);else this.HI==2&&(this.aM?(b4(7),Date.now()):M=="11111"?(b4(6),this.aM=!0,Date.now(),this.Fk=200,this.qE.cancel(),b4(12),rF(this.B,this,!0)):(b4(8),Date.now(),this.aM=!1))};
g.N.Cw=function(){this.Fk=this.qE.jR;if(this.qE.SB)this.HI==0?this.h4?(this.HI=1,gF4(this)):(this.HI=2,JS3(this)):this.HI==2&&(this.aM?(b4(12),rF(this.B,this,!0)):(b4(11),rF(this.B,this,!1)));else{this.HI==0?b4(9):this.HI==2&&b4(10);var w=this.B;this.qE.getLastError();w.K0=this.Fk;t6(w,2)}};
g.N.uG=function(){return this.B.uG()};
g.N.isActive=function(){return this.B.isActive()};
g.N.C1=function(w){this.B.C1(w)};g.N=rSE.prototype;g.N.Ay=null;g.N.t_=null;g.N.m8=null;g.N.Id=null;g.N.XQ=null;g.N.X3=null;g.N.Yk=null;g.N.yZ=null;g.N.lG=0;g.N.Xj=0;g.N.bX=null;g.N.cW=null;g.N.kX=null;g.N.CK=null;g.N.dw=null;g.N.iV=null;g.N.T_=-1;g.N.V4=-1;g.N.K0=-1;g.N.j8=0;g.N.Q5=0;g.N.rz=8;var KS4={OK:0,mgK:2,qQs:4,e1I:5,FtK:6,STOP:7,qD:8,Rqu:9,vQI:10,mvs:11,M03:12};g.Sp(CKp,g.Iu);g.Sp(thA,g.Iu);g.N=rSE.prototype;
g.N.connect=function(w,M,P,u,X){b4(0);this.XQ=M;this.t_=P||{};u&&X!==void 0&&(this.t_.OSID=u,this.t_.OAID=X);this.V?(sj((0,g.fC)(this.Sn,this,w),100),O0x(this)):this.Sn(w)};
g.N.disconnect=function(){aqV(this);if(this.B==3){var w=this.lG++,M=this.X3.clone();g.WG(M,"SID",this.X);g.WG(M,"RID",w);g.WG(M,"TYPE","terminate");Cg(this,M);w=new IM(this,this.X,w);w.r3=2;w.Qd=i4(M.clone());(new Image).src=w.Qd.toString();w.Tp=Date.now();BHE(w)}WmU(this)};
g.N.Sn=function(w){this.dw=new ASh(this);this.dw.rT=this.Ay;this.dw.L=this.G;this.dw.connect(w)};
g.N.bF=function(){return this.B==0};
g.N.getState=function(){return this.B};
g.N.ij=function(w){this.cW=null;u7C(this,w)};
g.N.n_=function(){this.kX=null;this.Id=new IM(this,this.X,"rpc",this.j);this.Id.E7=this.Ay;this.Id.E0=0;var w=this.Yk.clone();g.WG(w,"RID","rpc");g.WG(w,"SID",this.X);g.WG(w,"CI",this.iV?"0":"1");g.WG(w,"AID",this.T_);Cg(this,w);g.WG(w,"TYPE","xmlhttp");eDc(this.Id,w,!0,this.yZ,!1)};
g.N.lj=function(w,M){if(this.B!=0&&(this.Id==w||this.m8==w))if(this.K0=w.jR,this.m8==w&&this.B==3)if(this.rz>7){try{var P=this.G.parse(M)}catch(u){P=null}if(Array.isArray(P)&&P.length==3)if(w=P,w[0]==0)a:{if(!this.kX){if(this.Id)if(this.Id.Tp+3E30)){if(u=M==1)this.m8||this.cW||this.B==1||this.j8>=2?u=!1:(this.cW=sj((0,g.fC)(this.ij,this,w),$ZA(this,this.j8)),this.j8++,
u=!0);u=!(u||M==2&&UZ$(this))}if(u)switch(P){case 1:t6(this,5);break;case 4:t6(this,10);break;case 3:t6(this,6);break;case 7:t6(this,12);break;default:t6(this,2)}}};
g.N.yR=function(w){if(!g.o$(arguments,this.B))throw Error("Unexpected channel state: "+this.B);};
g.N.d89=function(w){w?b4(2):(b4(1),flt(this,8))};
g.N.Ro=function(w){if(w)throw Error("Can't create secondary domain capable XhrIo object.");w=new g.Ky;w.j=!1;return w};
g.N.isActive=function(){return!!this.bX&&this.bX.isActive(this)};
g.N.C1=function(w){var M=Kg;M.dispatchEvent(new thA(M,w))};
g.N.uG=function(){return!1};
g.N=hNC.prototype;g.N.zB=function(){};
g.N.oS=function(){};
g.N.ZA=function(){};
g.N.NH=function(){};
g.N.WU=function(){};
g.N.Hd=function(){return{}};
g.N.isActive=function(){return!0};g.N=chx.prototype;g.N.enqueue=function(w){this.L.push(w)};
g.N.isEmpty=function(){return this.B.length===0&&this.L.length===0};
g.N.clear=function(){this.B=[];this.L=[]};
g.N.contains=function(w){return g.o$(this.B,w)||g.o$(this.L,w)};
g.N.remove=function(w){var M=this.B;var P=(0,g.rHx)(M,w);P>=0?(g.Gc(M,P),M=!0):M=!1;return M||g.D4(this.L,w)};
g.N.yX=function(){for(var w=[],M=this.B.length-1;M>=0;--M)w.push(this.B[M]);M=this.L.length;for(var P=0;P=bxU.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(w=bxU[this.L],this.jZ=g.cF((0,g.fC)(this.UC,this),w),this.L++):this.publish("pairingFailed",Error("Server error "+w.status))};
g.N.kL=function(){this.B=null;this.publish("pairingFailed",Error("Server not responding"))};
var bxU=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.Sp(Wd,U9);g.N=Wd.prototype;g.N.start=function(){fu(this)&&this.publish("screenChange");!g.dH("yt-remote-lounge-token-expiration")&&Jh3(this);g.S9(this.B);this.B=g.cF((0,g.fC)(this.start,this),1E4)};
g.N.add=function(w,M){fu(this);bA$(this,w);ho(this,!1);this.publish("screenChange");M(w);w.token||Jh3(this)};
g.N.remove=function(w,M){var P=fu(this);Aht(this,w)&&(ho(this,!1),P=!0);M(w);P&&this.publish("screenChange")};
g.N.VD=function(w,M,P,u){var X=fu(this),U=this.get(w.id);U?(U.name!=M&&(U.name=M,ho(this,!1),X=!0),P(w)):u(Error("no such local screen."));X&&this.publish("screenChange")};
g.N.v3=function(){g.S9(this.B);Wd.Ik.v3.call(this)};
g.N.DB=function(w){fu(this);var M=this.screens.length;w=w&&w.screens||[];for(var P=w.length,u=0;u20)break a;h=M(U,f)}U=h}X.name=U}P(S_(this,X))},this),
onError:(0,g.fC)(function(X){u(Error("pairing request failed: "+X.status))},this),
onTimeout:(0,g.fC)(function(){u(Error("pairing request timed out."))},this)})};
g.N.v3=function(){g.wR(this.L);g.wR(this.B);Zu.Ik.v3.call(this)};
g.N.lA=function(){uXc(this);this.publish("screenChange");this.B.update()};
Zu.prototype.dispose=Zu.prototype.dispose;g.Sp(Hd,g.wC);g.N=Hd.prototype;g.N.wg=function(w){this.sO()||(w&&(F9(this,""+w),this.publish("sessionFailed")),this.B=null,this.publish("sessionScreen",null))};
g.N.info=function(w){MA(this.Cu,w)};
g.N.qH=function(){return null};
g.N.YU=function(w){var M=this.L;w?(M.displayStatus=new chrome.cast.ReceiverDisplayStatus(w,[]),M.displayStatus.showStop=!0):M.displayStatus=null;chrome.cast.setReceiverDisplayStatus(M,(0,g.fC)(function(){this.info("Updated receiver status for "+M.friendlyName+": "+w)},this),(0,g.fC)(function(){F9(this,"Failed to update receiver status for: "+M.friendlyName)},this))};
g.N.v3=function(){this.YU("");Hd.Ik.v3.call(this)};g.V(E9,Hd);g.N=E9.prototype;g.N.uQ=function(w){if(this.C){if(this.C==w)return;F9(this,"Overriding cast session with new session object");Fhj(this);this.mN=!1;this.S="unknown";this.C.removeUpdateListener(this.Lu);this.C.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.ys)}this.C=w;this.C.addUpdateListener(this.Lu);this.C.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.ys);cip(this,"getMdxSessionStatus")};
g.N.eN=function(w){this.info("launchWithParams no-op for Cast: "+g.ny(w))};
g.N.stop=function(){this.C?this.C.stop((0,g.fC)(function(){this.wg()},this),(0,g.fC)(function(){this.wg(Error("Failed to stop receiver app."))},this)):this.wg(Error("Stopping cast device without session."))};
g.N.YU=function(){};
g.N.v3=function(){this.info("disposeInternal");Fhj(this);this.C&&(this.C.removeUpdateListener(this.Lu),this.C.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.ys));this.C=null;Hd.prototype.v3.call(this)};
g.N.XlO=function(w,M){if(!this.sO())if(M)if(M=Pr(M),g.XE(M))switch(w=""+M.type,M=M.data||{},this.info("onYoutubeMessage_: "+w+" "+g.ny(M)),w){case "mdxSessionStatus":f8$(this,M);break;case "loungeToken":Zd3(this,M);break;default:F9(this,"Unknown youtube message: "+w)}else F9(this,"Unable to parse message.");else F9(this,"No data in message.")};
g.N.dX=function(w,M,P,u){g.S9(this.V);this.V=0;idC(this.X,this.L.label,w,this.L.friendlyName,(0,g.fC)(function(X){X?M(X):u>=0?(F9(this,"Screen "+w+" appears to be offline. "+u+" retries left."),this.V=g.cF((0,g.fC)(this.dX,this,w,M,P,u-1),300)):P(Error("Unable to fetch screen."))},this),P)};
g.N.qH=function(){return this.C};
g.N.Gs=function(w){this.sO()||w||(F9(this,"Cast session died."),this.wg())};g.V(NA,Hd);g.N=NA.prototype;g.N.uQ=function(w){this.C=w;this.C.addUpdateListener(this.xu)};
g.N.eN=function(w){this.UO=w;this.B3()};
g.N.stop=function(){D6h(this);this.C?this.C.stop((0,g.fC)(this.wg,this,null),(0,g.fC)(this.wg,this,"Failed to stop DIAL device.")):this.wg()};
g.N.v3=function(){D6h(this);this.C&&this.C.removeUpdateListener(this.xu);this.C=null;Hd.prototype.v3.call(this)};
g.N.Dj=function(w){this.sO()||w||(F9(this,"DIAL session died."),this.G(),this.G=function(){},this.wg())};g.V(oc,Hd);oc.prototype.stop=function(){this.wg()};
oc.prototype.uQ=function(){};
oc.prototype.eN=function(){g.S9(this.C);this.C=NaN;var w=ZJ(this.X.dG(),this.L.label);w?pu(this,w):this.wg(Error("No such screen"))};
oc.prototype.v3=function(){g.S9(this.C);this.C=NaN;Hd.prototype.v3.call(this)};g.V(G7,g.wC);g.N=G7.prototype;
g.N.init=function(w,M){chrome.cast.timeout.requestSession=3E4;var P=new chrome.cast.SessionRequest(this.V,[chrome.cast.Capability.AUDIO_OUT]);g.FW("desktop_enable_cast_connect")&&(P.androidReceiverCompatible=!0);this.S||(P.dialRequest=new chrome.cast.DialRequest("YouTube"));var u=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;w=w||this.K?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var X=(0,g.fC)(this.k53,this);P=new chrome.cast.ApiConfig(P,(0,g.fC)(this.o1,
this),X,u,w);P.customDialLaunchCallback=(0,g.fC)(this.ouu,this);chrome.cast.initialize(P,(0,g.fC)(function(){this.sO()||(chrome.cast.addReceiverActionListener(this.G),n1a(),this.L.subscribe("onlineScreenChange",(0,g.fC)(this.JO,this)),this.C=zzx(this),chrome.cast.setCustomReceivers(this.C,function(){},(0,g.fC)(function(U){this.y0("Failed to set initial custom receivers: "+g.ny(U))},this)),this.publish("yt-remote-cast2-availability-change",Du(this)),M(!0))},this),(0,g.fC)(function(U){this.y0("Failed to initialize API: "+
g.ny(U));
M(!1)},this))};
g.N.j7s=function(w,M){y9("Setting connected screen ID: "+w+" -> "+M);if(this.B){var P=this.B.B;if(!w||P&&P.id!=w)y9("Unsetting old screen status: "+this.B.L.friendlyName),qA(this,null)}if(w&&M){if(!this.B){w=ZJ(this.L.dG(),w);if(!w){y9("setConnectedScreenStatus: Unknown screen.");return}if(w.idType=="shortLived"){y9("setConnectedScreenStatus: Screen with id type to be short lived.");return}P=qYU(this,w);P||(y9("setConnectedScreenStatus: Connected receiver not custom..."),P=new chrome.cast.Receiver(w.uuid?
w.uuid:w.id,w.name),P.receiverType=chrome.cast.ReceiverType.CUSTOM,this.C.push(P),chrome.cast.setCustomReceivers(this.C,function(){},(0,g.fC)(function(u){this.y0("Failed to set initial custom receivers: "+g.ny(u))},this)));
y9("setConnectedScreenStatus: new active receiver: "+P.friendlyName);qA(this,new oc(this.L,P),!0)}this.B.YU(M)}else y9("setConnectedScreenStatus: no screen.")};
g.N.lCL=function(w){this.sO()?this.y0("Setting connection data on disposed cast v2"):this.B?this.B.eN(w):this.y0("Setting connection data without a session")};
g.N.Oi=function(){this.sO()?this.y0("Stopping session on disposed cast v2"):this.B?(this.B.stop(),qA(this,null)):y9("Stopping non-existing session")};
g.N.requestSession=function(){chrome.cast.requestSession((0,g.fC)(this.o1,this),(0,g.fC)(this.N7N,this))};
g.N.v3=function(){this.L.unsubscribe("onlineScreenChange",(0,g.fC)(this.JO,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.G);var w=QmA,M=g.Mj("yt.mdx.remote.debug.handlers_");g.D4(M||[],w);g.wR(this.B);g.wC.prototype.v3.call(this)};
g.N.y0=function(w){MA("Controller",w)};
g.N.H2=function(w,M){this.B==w&&(M||qA(this,null),this.publish("yt-remote-cast2-session-change",M))};
g.N.Ut$=function(w,M){if(!this.sO())if(w)switch(w.friendlyName=chrome.cast.unescape(w.friendlyName),y9("onReceiverAction_ "+w.label+" / "+w.friendlyName+"-- "+M),M){case chrome.cast.ReceiverAction.CAST:if(this.B)if(this.B.L.label!=w.label)y9("onReceiverAction_: Stopping active receiver: "+this.B.L.friendlyName),this.B.stop();else{y9("onReceiverAction_: Casting to active receiver.");this.B.B&&this.publish("yt-remote-cast2-session-change",this.B.B);break}switch(w.receiverType){case chrome.cast.ReceiverType.CUSTOM:qA(this,
new oc(this.L,w));break;case chrome.cast.ReceiverType.DIAL:qA(this,new NA(this.L,w,this.X,this.config_));break;case chrome.cast.ReceiverType.CAST:qA(this,new E9(this.L,w,this.config_));break;default:this.y0("Unknown receiver type: "+w.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.B&&this.B.L.label==w.label?this.B.stop():this.y0("Stopping receiver w/o session: "+w.friendlyName)}else this.y0("onReceiverAction_ called without receiver.")};
g.N.ouu=function(w){if(this.sO())return Promise.reject(Error("disposed"));var M=w.receiver;M.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.y0("Not DIAL receiver: "+M.friendlyName),M.receiverType=chrome.cast.ReceiverType.DIAL);var P=this.B?this.B.L:null;if(!P||P.label!=M.label)return this.y0("Receiving DIAL launch request for non-clicked DIAL receiver: "+M.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(P&&P.label==M.label&&P.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.B.B)return y9("Reselecting dial screen."),
this.publish("yt-remote-cast2-session-change",this.B.B),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.y0('Changing CAST intent from "'+P.receiverType+'" to "dial" for '+M.friendlyName);qA(this,new NA(this.L,M,this.X,this.config_))}M=this.B;M.V=w;M.V.appState==chrome.cast.DialAppState.RUNNING?(w=M.V.extraData||{},P=w.screenId||null,V9(M)&&w.loungeToken?w.loungeTokenRefreshIntervalMs?w=oQV(M,{name:M.L.friendlyName,screenId:w.screenId,loungeToken:w.loungeToken,dialId:M.V.receiver.label,
screenIdType:"shortLived"},w.loungeTokenRefreshIntervalMs):(g.ro(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(w)+".")),w=Gsp(M,P)):w=Gsp(M,P)):w=VUU(M);return w};
g.N.o1=function(w){var M=this;if(!this.sO()&&!this.K){y9("New cast session ID: "+w.sessionId);var P=w.receiver;if(P.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.B)if(P.receiverType==chrome.cast.ReceiverType.CAST)y9("Got resumed cast session before resumed mdx connection."),P.friendlyName=chrome.cast.unescape(P.friendlyName),qA(this,new E9(this.L,P,this.config_),!0);else{this.y0("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var u=this.B.L,X=ZJ(this.L.dG(),
u.label);X&&h6(X,P.label)&&u.receiverType!=chrome.cast.ReceiverType.CAST&&P.receiverType==chrome.cast.ReceiverType.CAST&&(y9("onSessionEstablished_: manual to cast session change "+P.friendlyName),g.wR(this.B),this.B=new E9(this.L,P,this.config_),this.B.subscribe("sessionScreen",(0,g.fC)(this.H2,this,this.B)),this.B.subscribe("sessionFailed",function(){return YY3(M,M.B)}),this.B.eN(null));
this.B.uQ(w)}}};
g.N.hm=function(){return this.B?this.B.qH():null};
g.N.N7N=function(w){this.sO()||(this.y0("Failed to estabilish a session: "+g.ny(w)),w.code!=chrome.cast.ErrorCode.CANCEL&&qA(this,null),this.publish("yt-remote-cast2-session-failed"))};
g.N.k53=function(w){y9("Receiver availability updated: "+w);if(!this.sO()){var M=Du(this);this.j=w==chrome.cast.ReceiverAvailability.AVAILABLE;Du(this)!=M&&this.publish("yt-remote-cast2-availability-change",Du(this))}};
g.N.JO=function(){this.sO()||(this.C=zzx(this),y9("Updating custom receivers: "+g.ny(this.C)),chrome.cast.setCustomReceivers(this.C,function(){},(0,g.fC)(function(){this.y0("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",Du(this)))};
G7.prototype.setLaunchParams=G7.prototype.lCL;G7.prototype.setConnectedScreenStatus=G7.prototype.j7s;G7.prototype.stopSession=G7.prototype.Oi;G7.prototype.getCastSession=G7.prototype.hm;G7.prototype.requestSession=G7.prototype.requestSession;G7.prototype.init=G7.prototype.init;G7.prototype.dispose=G7.prototype.dispose;var RzE=[];g.N=e_.prototype;
g.N.reset=function(w){this.listId="";this.index=-1;this.videoId="";I8t(this);this.volume=-1;this.muted=!1;w&&(this.index=w.index,this.listId=w.listId,this.videoId=w.videoId,this.playerState=w.playerState,this.volume=w.volume,this.muted=w.muted,this.audioTrackId=w.audioTrackId,this.trackData=w.trackData,this.ST=w.hasPrevious,this.kH=w.hasNext,this.K=w.playerTime,this.G=w.playerTimeAt,this.L=w.seekableStart,this.j=w.seekableEnd,this.C=w.duration,this.V=w.loadedTime,this.B=w.liveIngestionTime,this.X=
!isNaN(this.B))};
g.N.isPlaying=function(){return this.playerState==1};
g.N.isBuffering=function(){return this.playerState==3};
g.N.rj=function(){return this.playerState==1081};
g.N.l4=function(w){this.C=isNaN(w)?0:w};
g.N.getDuration=function(){return this.X?this.C+Bd(this):this.C};
g.N.clone=function(){return new e_(gQE(this))};g.V(vd,g.wC);g.N=vd.prototype;g.N.getState=function(){return this.C};
g.N.uJ=function(){return this.X.getReconnectTimeout()};
g.N.nE=function(){this.X.reconnect()};
g.N.play=function(){Ku(this)?(this.B?this.B.play(null,g.e0,gX(this,"play")):Ao(this,"play"),jX$(this,1,k_(s9(this))),this.publish("remotePlayerChange")):b7(this,this.play)};
g.N.pause=function(){Ku(this)?(this.B?this.B.pause(null,g.e0,gX(this,"pause")):Ao(this,"pause"),jX$(this,2,k_(s9(this))),this.publish("remotePlayerChange")):b7(this,this.pause)};
g.N.seekTo=function(w){if(Ku(this)){if(this.B){var M=s9(this),P=new chrome.cast.media.SeekRequest;P.currentTime=w;M.isPlaying()||M.isBuffering()?P.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:P.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.B.seek(P,g.e0,gX(this,"seekTo",{newTime:w}))}else Ao(this,"seekTo",{newTime:w});jX$(this,3,w);this.publish("remotePlayerChange")}else b7(this,g.Wa(this.seekTo,w))};
g.N.stop=function(){if(Ku(this)){this.B?this.B.stop(null,g.e0,gX(this,"stopVideo")):Ao(this,"stopVideo");var w=s9(this);w.index=-1;w.videoId="";I8t(w);Ic(this,w);this.publish("remotePlayerChange")}else b7(this,this.stop)};
g.N.setVolume=function(w,M){if(Ku(this)){var P=s9(this);if(this.L){if(P.volume!=w){var u=Math.round(w)/100;this.L.setReceiverVolumeLevel(u,(0,g.fC)(function(){Pd("set receiver volume: "+u)},this),(0,g.fC)(function(){this.y0("failed to set receiver volume.")},this))}P.muted!=M&&this.L.setReceiverMuted(M,(0,g.fC)(function(){Pd("set receiver muted: "+M)},this),(0,g.fC)(function(){this.y0("failed to set receiver muted.")},this))}else{var X={volume:w,
muted:M};P.volume!=-1&&(X.delta=w-P.volume);Ao(this,"setVolume",X)}P.muted=M;P.volume=w;Ic(this,P)}else b7(this,g.Wa(this.setVolume,w,M))};
g.N.SJ=function(w,M){if(Ku(this)){var P=s9(this);w={videoId:w};M&&(P.trackData={trackName:M.name,languageCode:M.languageCode,sourceLanguageCode:M.translationLanguage?M.translationLanguage.languageCode:"",languageName:M.languageName,kind:M.kind},w.style=g.ny(M.style),g.NK(w,P.trackData));Ao(this,"setSubtitlesTrack",w);Ic(this,P)}else b7(this,g.Wa(this.SJ,w,M))};
g.N.setAudioTrack=function(w,M){Ku(this)?(M=M.getLanguageInfo().getId(),Ao(this,"setAudioTrack",{videoId:w,audioTrackId:M}),w=s9(this),w.audioTrackId=M,Ic(this,w)):b7(this,g.Wa(this.setAudioTrack,w,M))};
g.N.playVideo=function(w,M,P,u,X,U,f){u=u===void 0?null:u;X=X===void 0?null:X;U=U===void 0?null:U;f=f===void 0?null:f;var h=s9(this),c={videoId:w};P!==void 0&&(c.currentIndex=P);Rc(h,w,P||0);M!==void 0&&(Q9(h,M),c.currentTime=M);u&&(c.listId=u);X&&(c.playerParams=X);U&&(c.clickTrackingParams=U);f&&(c.locationInfo=g.ny(f));Ao(this,"setPlaylist",c);u||Ic(this,h)};
g.N.xi=function(w,M){if(Ku(this)){if(w&&M){var P=s9(this);Rc(P,w,M);Ic(this,P)}Ao(this,"previous")}else b7(this,g.Wa(this.xi,w,M))};
g.N.nextVideo=function(w,M){if(Ku(this)){if(w&&M){var P=s9(this);Rc(P,w,M);Ic(this,P)}Ao(this,"next")}else b7(this,g.Wa(this.nextVideo,w,M))};
g.N.eh=function(){if(Ku(this)){Ao(this,"clearPlaylist");var w=s9(this);w.reset();Ic(this,w);this.publish("remotePlayerChange")}else b7(this,this.eh)};
g.N.Ux=function(){Ku(this)?Ao(this,"dismissAutoplay"):b7(this,this.Ux)};
g.N.dispose=function(){if(this.C!=3){var w=this.C;this.C=3;this.publish("proxyStateChange",w,this.C)}g.wC.prototype.dispose.call(this)};
g.N.v3=function(){ric(this);this.X=null;this.G.clear();nu(this,null);g.wC.prototype.v3.call(this)};
g.N.NN=function(w){if((w!=this.C||w==2)&&this.C!=3&&w!=0){var M=this.C;this.C=w;this.publish("proxyStateChange",M,w);if(w==1)for(;!this.G.isEmpty();)M=w=this.G,M.B.length===0&&(M.B=M.L,M.B.reverse(),M.L=[]),w.B.pop().apply(this);else w==3&&this.dispose()}};
g.N.Xkk=function(w,M){this.publish(w,M)};
g.N.jIs=function(w){if(!w)this.AL(null),nu(this,null);else if(this.L.receiver.volume){w=this.L.receiver.volume;var M=s9(this),P=Math.round(100*w.level||0);if(M.volume!=P||M.muted!=w.muted)Pd("Cast volume update: "+w.level+(w.muted?" muted":"")),M.volume=P,M.muted=!!w.muted,Ic(this,M)}};
g.N.AL=function(w){Pd("Cast media: "+!!w);this.B&&this.B.removeUpdateListener(this.V);if(this.B=w)this.B.addUpdateListener(this.V),Cvh(this),this.publish("remotePlayerChange")};
g.N.w30=function(w){w?(Cvh(this),this.publish("remotePlayerChange")):this.AL(null)};
g.N.kI=function(){Ao(this,"sendDebugCommand",{debugCommand:"stats4nerds "})};
g.N.uK9=function(){var w=sXE();w&&nu(this,w)};
g.N.y0=function(w){MA("CP",w)};g.V(j_,g.wC);g.N=j_.prototype;
g.N.connect=function(w,M){if(M){var P=M.listId,u=M.videoId,X=M.videoIds,U=M.playerParams,f=M.clickTrackingParams,h=M.index,c={videoId:u},Z=M.currentTime,S=M.locationInfo;M=M.loopMode;Z!==void 0&&(c.currentTime=Z<=5?0:Z);U&&(c.playerParams=U);S&&(c.locationInfo=S);f&&(c.clickTrackingParams=f);P&&(c.listId=P);X&&X.length>0&&(c.videoIds=X.join(","));h!==void 0&&(c.currentIndex=h);this.xu&&(c.loopMode=M||"LOOP_MODE_OFF");P&&(this.B.listId=P);this.B.videoId=u;this.B.index=h||0;this.B.state=3;Q9(this.B,
Z);this.G="UNSUPPORTED";P=this.xu?"setInitialState":"setPlaylist";Jo("Connecting with "+P+" and params: "+g.ny(c));this.L.connect({method:P,params:g.ny(c)},w,ZBt())}else Jo("Connecting without params"),this.L.connect({},w,ZBt());a8V(this)};
g.N.T2=function(w){this.L.T2(w)};
g.N.dispose=function(){this.sO()||(g.ih("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),rX(this,3));g.wC.prototype.dispose.call(this)};
g.N.v3=function(){wlA(this);MWE(this);ix3(this);g.S9(this.V);this.V=NaN;g.S9(this.S);this.S=NaN;this.X=null;g.Vh(this.B3);this.B3.length=0;this.L.dispose();g.wC.prototype.v3.call(this);this.G=this.j=this.C=this.B=this.L=null};
g.N.If=function(w){if(!this.C||this.C.length===0)return!1;for(var M=g.G(this.C),P=M.next();!P.done;P=M.next())if(!P.value.capabilities.has(w))return!1;return!0};
g.N.B4=function(){var w=3;this.sO()||(w=0,isNaN(this.QF())?this.L.gC()&&isNaN(this.K)&&(w=1):w=2);return w};
g.N.FT=function(w){Jo("Disconnecting with "+w);g.ih("yt.mdx.remote.remoteClient_",null);wlA(this);this.publish("beforeDisconnect",w);w==1&&pg();this.L.disconnect(w);this.dispose()};
g.N.b$=function(){var w=this.B;this.X&&(w=this.B.clone(),Rc(w,this.X,w.index));return gQE(w)};
g.N.nmK=function(w){var M=this,P=new e_(w);P.videoId&&P.videoId!=this.B.videoId&&(this.X=P.videoId,g.S9(this.V),this.V=g.cF(function(){if(M.X){var X=M.X;M.X=null;M.B.videoId!=X&&Cu(M,"getNowPlaying")}},5E3));
var u=[];this.B.listId==P.listId&&this.B.videoId==P.videoId&&this.B.index==P.index||u.push("remoteQueueChange");this.B.playerState==P.playerState&&this.B.volume==P.volume&&this.B.muted==P.muted&&k_(this.B)==k_(P)&&g.ny(this.B.trackData)==g.ny(P.trackData)||u.push("remotePlayerChange");this.B.reset(w);g.tx(u,function(X){this.publish(X)},this)};
g.N.rX=function(){var w=this.L.getDeviceId(),M=g.Nj(this.C,function(P){return P.type=="REMOTE_CONTROL"&&P.id!=w});
return M?M.id:""};
g.N.QF=function(){return this.L.uJ()};
g.N.al=function(){return this.G||"UNSUPPORTED"};
g.N.QV=function(){return this.j||""};
g.N.gP=function(){!isNaN(this.QF())&&this.L.nE()};
g.N.gmu=function(w,M){Cu(this,w,M);ubx(this)};
g.N.c7=function(){var w=g.e9("SAPISID","")||g.e9("__Secure-1PAPISID")||"",M=g.e9("__Secure-3PAPISID","")||"";if(!w&&!M)return"";w=g.Yw(g.qq(w),2);M=g.Yw(g.qq(M),2);return g.Yw(g.qq(","+w+","+M),2)};
j_.prototype.subscribe=j_.prototype.subscribe;j_.prototype.unsubscribeByKey=j_.prototype.HZ;j_.prototype.getProxyState=j_.prototype.B4;j_.prototype.disconnect=j_.prototype.FT;j_.prototype.getPlayerContextData=j_.prototype.b$;j_.prototype.setPlayerContextData=j_.prototype.nmK;j_.prototype.getOtherConnectedRemoteId=j_.prototype.rX;j_.prototype.getReconnectTimeout=j_.prototype.QF;j_.prototype.getAutoplayMode=j_.prototype.al;j_.prototype.getAutoplayVideoId=j_.prototype.QV;j_.prototype.reconnect=j_.prototype.gP;
j_.prototype.sendMessage=j_.prototype.gmu;j_.prototype.getXsrfToken=j_.prototype.c7;j_.prototype.isCapabilitySupportedOnConnectedDevices=j_.prototype.If;g.V(FSV,U9);g.N=FSV.prototype;g.N.dG=function(w){return this.XJ.$_gs(w)};
g.N.contains=function(w){return!!this.XJ.$_c(w)};
g.N.get=function(w){return this.XJ.$_g(w)};
g.N.start=function(){this.XJ.$_st()};
g.N.add=function(w,M,P){this.XJ.$_a(w,M,P)};
g.N.remove=function(w,M,P){this.XJ.$_r(w,M,P)};
g.N.VD=function(w,M,P,u){this.XJ.$_un(w,M,P,u)};
g.N.v3=function(){for(var w=this.B.length,M=0;M1&&!this.U.getOption("remote","quickCast")?(this.g0=g.xV(w,this.B,this),this.cI(g.EV(w,this.B)),w=this.U.getOption("remote","currentReceiver"),w=this.B(w),this.options[w]&&this.JV(w),this.enable(!0)):this.enable(!1)};
HB.prototype.B=function(w){return w.key};
HB.prototype.SH=function(w){return w==="cast-selector-receiver"?"Transmitir\u2026":this.g0[w].name};
HB.prototype.p9=function(w){g.v6.prototype.p9.call(this,w);this.U.setOption("remote","currentReceiver",this.g0[w]);this.Lg.Wj()};g.V(nB$,g.D0);g.N=nB$.prototype;
g.N.create=function(){var w=this.player.N(),M=g.r8(w);w={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:w.D("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:w.D("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:w.D("enable_cast_short_lived_lounge_token")};oB3(M,w);this.subscriptions.push(g.ti("yt-remote-before-disconnect",this.Ou$,this));this.subscriptions.push(g.ti("yt-remote-connection-change",this.svu,this));this.subscriptions.push(g.ti("yt-remote-receiver-availability-change",this.Vf,
this));this.subscriptions.push(g.ti("yt-remote-auto-connect",this.FTu,this));this.subscriptions.push(g.ti("yt-remote-receiver-resumed",this.KT0,this));this.subscriptions.push(g.ti("mdx-privacy-popup-confirm",this.oau,this));this.subscriptions.push(g.ti("mdx-privacy-popup-cancel",this.NBK,this));this.Vf()};
g.N.load=function(){this.player.cancelPlayback();g.D0.prototype.load.call(this);this.Wb=new R1a(this.player.N(),this);this.player.mY(this.Wb);this.Px=new e1$(this,this.player,this.Hj);var w=(w=dWA())?w.currentTime:0;var M=YXA()?new vd(XC(),void 0):null;w==0&&M&&(w=k_(s9(M)));w!==0&&this.Ub(w);vBV(this,this.zt,this.zt);this.player.Nx(6)};
g.N.unload=function(){this.player.publish("mdxautoplaycanceled");this.player.Y5();this.KH=this.yJ;g.iZ(this.Px,this.Hj);this.Hj=this.Wb=this.Px=null;g.D0.prototype.unload.call(this);this.player.Nx(5);p1(this)};
g.N.v3=function(){g.xQ(this.subscriptions);g.D0.prototype.v3.call(this)};
g.N.iD=function(w){var M=g.Kz.apply(1,arguments);this.loaded&&this.Px.ME.apply(this.Px,[w].concat(g.L(M)))};
g.N.getAdState=function(){return this.yO};
g.N.ST=function(){return this.Hj?s9(this.Hj).ST:!1};
g.N.kH=function(){return this.Hj?s9(this.Hj).kH:!1};
g.N.Ub=function(w,M){this.yM=w||0;this.player.publish("progresssync",w,M);this.player.z5("onVideoProgress",w||0)};
g.N.getCurrentTime=function(){return this.yM};
g.N.getDuration=function(){return s9(this.Hj).getDuration()||0};
g.N.Ls=function(){var w=s9(this.Hj);return w.X?w.B+Bd(w):w.B};
g.N.rk=function(){return s9(this.Hj).V};
g.N.Ft=function(){return Ai3(s9(this.Hj))};
g.N.l6=function(){var w=s9(this.Hj);return w.L>0?w.L+Bd(w):w.L};
g.N.getProgressState=function(){var w=s9(this.Hj),M=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:!w.rj()&&this.player.q8(),clipEnd:M.clipEnd,clipStart:M.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:this.getDuration(),ingestionTime:this.Ls(),isAtLiveHead:this.isAtLiveHead(),loaded:this.rk(),seekableEnd:this.Ft(),seekableStart:this.l6(),offset:0,viewerLivestreamJoinMediaTime:0}};
g.N.isAtLiveHead=function(){return Ai3(s9(this.Hj))-this.getCurrentTime()<=1};
g.N.nextVideo=function(){this.Hj&&this.Hj.nextVideo()};
g.N.xi=function(){this.Hj&&this.Hj.xi()};
g.N.Ou$=function(w){w===1&&(this.A$=this.Hj?s9(this.Hj):null)};
g.N.svu=function(){var w=YXA()?new vd(XC(),void 0):null;if(w){var M=this.KH;this.loaded&&this.unload();this.Hj=w;this.A$=null;M.key!==this.yJ.key&&(this.KH=M,this.load())}else g.wR(this.Hj),this.Hj=null,this.loaded&&(this.unload(),(w=this.A$)&&w.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(w.videoId,k_(w)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)};
g.N.Vf=function(){var w=[this.yJ],M=w.concat,P=GJj();dX()&&g.dH("yt-remote-cast-available")&&P.push({key:"cast-selector-receiver",name:"Cast..."});this.g0=M.call(w,P);w=DWc()||this.yJ;FC(this,w);this.player.z5("onMdxReceiversChange")};
g.N.FTu=function(){var w=DWc();FC(this,w)};
g.N.KT0=function(){this.KH=DWc()};
g.N.oau=function(){this.Fn=!0;p1(this);WB=!1;$o&&f1($o,1);$o=null};
g.N.NBK=function(){this.Fn=!1;p1(this);FC(this,this.yJ);this.KH=this.yJ;WB=!1;$o=null;this.player.playVideo()};
g.N.S0=function(w,M){switch(w){case "casting":return this.loaded;case "receivers":return this.g0;case "currentReceiver":return M&&(M.key==="cast-selector-receiver"?KhV():FC(this,M)),this.loaded?this.KH:this.yJ;case "quickCast":return this.g0.length===2&&this.g0[1].key==="cast-selector-receiver"?(M&&KhV(),!0):!1}};
g.N.kI=function(){this.Hj.kI()};
g.N.Yo=function(){return!1};
g.N.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]};
g.N.isLoggedIn=function(){var w,M;return((w=g.AR("PLAYER_CONFIG"))==null?void 0:(M=w.args)==null?void 0:M.authuser)!==void 0?!0:!(!g.AR("SESSION_INDEX")&&!g.AR("LOGGED_IN"))};g.yT("remote",nB$);})(_yt_player);