(function(g){var window=this;'use strict';var F3=function(F){g.cD(F,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.op()).toString(36));return F},ku=function(F,k,z){Array.isArray(z)||(z=[String(z)]); g.ysD(F.j,k,z)},UJ$=function(F){if(F instanceof g.$m)return F; if(typeof F.Va=="function")return F.Va(!1);if(g.nk(F)){var k=0,z=new g.$m;z.next=function(){for(;;){if(k>=F.length)return g.$L;if(k in F)return g.jr(F[k++]);k++}}; return z}throw Error("Not implemented");},tgY=function(F,k,z){if(g.nk(F))g.XN(F,k,z); else for(F=UJ$(F);;){var x=F.next();if(x.done)break;k.call(z,x.value,void 0,F)}},ZXY=function(F,k){var z=[]; tgY(k,function(x){try{var D=g.OW.prototype.L.call(this,x,!0)}catch(e){if(e=="Storage: Invalid value was encountered")return;throw e;}D===void 0?z.push(x):g.Y0H(D)&&z.push(x)},F); return z},vcA=function(F,k){ZXY(F,k).forEach(function(z){g.OW.prototype.remove.call(this,z)},F)},cUt=function(F){if(F.Qh){if(F.Qh.locationOverrideToken)return{locationOverrideToken:F.Qh.locationOverrideToken}; if(F.Qh.latitudeE7!=null&&F.Qh.longitudeE7!=null)return{latitudeE7:F.Qh.latitudeE7,longitudeE7:F.Qh.longitudeE7}}return null},P17=function(F,k){g.fC(F,k)||F.push(k)},OXG=function(F){var k=0,z; for(z in F)k++;return k},Vg$=function(F,k){return g.HB(F,k)},I39=function(F){try{return g.bD.JSON.parse(F)}catch(k){}F=String(F); if(/^\s*$/.test(F)?0:/^[\],:{}\s\u2028\u2029]*$/.test(F.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("("+F+")")}catch(k){}throw Error("Invalid JSON string: "+F);},o$=function(F){if(g.bD.JSON)try{return g.bD.JSON.parse(F)}catch(k){}return I39(F)},HXG=function(F){if(F.OS&&typeof F.OS=="function")return F.OS(); if(typeof Map!=="undefined"&&F instanceof Map||typeof Set!=="undefined"&&F instanceof Set)return Array.from(F.values());if(typeof F==="string")return F.split("");if(g.nk(F)){for(var k=[],z=F.length,x=0;x1){if(z%2)throw Error("Uneven number of arguments");for(var x=0;x5&&(F=F.slice(F.length-5)); var k=g.tW(PPH(),function(x){return x.loungeToken}),z=g.tW(F,function(x){return x.loungeToken}); g.ZO(z,function(x){return!g.fC(k,x)})&&OgG(); g.SZ("yt-remote-local-screens",F,31536E3)},X3=function(F){F||(g.da("yt-remote-session-screen-id"),g.da("yt-remote-session-video-id")); vTl();F=pH();g.FN(F,Es());tlH(F)},ICY=function(){if(!q0){var F=g.bT(); F&&(q0=new g.vj(F))}},Hgl=function(){ICY(); return q0?!!q0.get("yt-remote-use-staging-server"):!1},N0=function(F,k){g.AP[F]=!0; var z=g.eF();z&&z.publish.apply(z,arguments);g.AP[F]=!1},aCn=function(){},z3=function(){if(!ub){ub=new g.bh(new aCn); var F=g.rz("client_streamz_web_flush_count",-1);F!==-1&&(ub.U=F)}return ub},SY$=function(){var F=window.navigator.userAgent.match(/Chrome\/([0-9]+)/); return F?parseInt(F[1],10):0},bg$=function(F){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+F)!=-1||document.currentScript.src.indexOf("&"+F)!=-1)},dzD=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},wq=function(F){F.length?JBC(F.shift(),function(){wq(F)}):yBn()},RcD=function(F){return"chrome-extension://"+F+"/cast_sender.js"},JBC=function(F,k,z){var x=document.createElement("script"); x.onerror=k;z&&(x.onload=z);g.F7(x,g.Ur(F));(document.head||document.documentElement).appendChild(x)},gTp=function(){var F=SY$(),k=[]; if(F>1){var z=F-1;k.push("//www.gstatic.com/eureka/clank/"+F+"/cast_sender.js");k.push("//www.gstatic.com/eureka/clank/"+z+"/cast_sender.js")}return k},yBn=function(){var F=dzD(); F&&F(!1,"No cast extension found")},nT$=function(){if(YY9){var F=2,k=dzD(),z=function(){F--; F==0&&k&&k(!0)}; window.__onGCastApiAvailable=z;JBC("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",yBn,z)}},MlY=function(){nT$(); var F=gTp();F.push("//www.gstatic.com/eureka/clank/cast_sender.js");wq(F)},fC$=function(){nT$(); var F=gTp();F.push.apply(F,g.r(Lz$.map(RcD)));F.push("//www.gstatic.com/eureka/clank/cast_sender.js");wq(F)},mw=function(F,k,z){g.S.call(this); this.S=z!=null?(0,g.W6)(F,z):F;this.UF=k;this.W=(0,g.W6)(this.mI,this);this.Y=!1;this.L=0;this.U=this.Be=null;this.j=[]},T3=function(){},Kzp=function(){g.gd.call(this,"p")},Wzt=function(){g.gd.call(this,"o")},k_D=function(){return F9C=F9C||new g.A1},on9=function(F){g.gd.call(this,"serverreachability",F)},lb=function(F){var k=k_D(); k.dispatchEvent(new on9(k,F))},zpD=function(F){g.gd.call(this,"statevent",F)},Qb=function(F){var k=k_D(); k.dispatchEvent(new zpD(k,F))},x59=function(F,k,z,x){g.gd.call(this,"timingevent",F); this.size=k;this.rtt=z;this.retries=x},hf=function(F,k){if(typeof F!=="function")throw Error("Fn must not be null and must be a function"); return g.bD.setTimeout(function(){F()},k)},rq=function(){},BT=function(F,k,z,x){this.U=F; this.j=k;this.RS=z;this.qD=x||1;this.dH=new g.HD(this);this.kG=45E3;this.cR=null;this.S=!1;this.K=this.u$=this.B=this.l$=this.t4=this.vR=this.Qh=null;this.PR=[];this.Y=null;this.G=0;this.W=this.mp=null;this.UH=-1;this.yh=!1;this.NJ=0;this.RU=null;this.Xm=this.J4=this.mY=this.Xf=!1;this.L=new iut},iut=function(){this.U=null; this.Y="";this.L=!1},$59=function(F,k,z){F.l$=1; F.B=F3(k.clone());F.K=z;F.Xf=!0;D5C(F,null)},D5C=function(F,k){F.t4=Date.now(); G3(F);F.u$=F.B.clone();ku(F.u$,"t",F.qD);F.G=0;var z=F.U.l$;F.L=new iut;F.Y=jxA(F.U,z?k:null,!F.K);F.NJ>0&&(F.RU=new g.oR((0,g.W6)(F.Pa,F,F.Y),F.NJ));F.dH.listen(F.Y,"readystatechange",F.Te);k=F.cR?g.Jg(F.cR):{};F.K?(F.mp||(F.mp="POST"),k["Content-Type"]="application/x-www-form-urlencoded",F.Y.send(F.u$,F.mp,F.K,k)):(F.mp="GET",F.Y.send(F.u$,F.mp,null,k));lb(1)},Cn$=function(F){if(!epl(F))return g.p7(F.Y); var k=g.E2(F.Y);if(k==="")return"";var z="",x=k.length,D=g.C7(F.Y)==4;if(!F.L.U){if(typeof TextDecoder==="undefined")return Us(F),tf(F),"";F.L.U=new g.bD.TextDecoder}for(var e=0;ek.length)return AxC;k=k.slice(x,x+z);F.G=x+z;return k},G3=function(F){F.vR=Date.now()+F.kG; XWn(F,F.kG)},XWn=function(F,k){if(F.Qh!=null)throw Error("WatchDog timer not null"); F.Qh=hf((0,g.W6)(F.XM,F),k)},qNl=function(F){F.Qh&&(g.bD.clearTimeout(F.Qh),F.Qh=null)},tf=function(F){F.U.j5()||F.yh||Nat(F.U,F)},Us=function(F){qNl(F); g.CC(F.RU);F.RU=null;F.dH.removeAll();if(F.Y){var k=F.Y;F.Y=null;k.abort();k.dispose()}},sx9=function(F,k){try{var z=F.U; if(z.Pl!=0&&(z.Y==F||uGt(z.L,F)))if(!F.J4&&uGt(z.L,F)&&z.Pl==3){try{var x=z.xY.Y.parse(k)}catch(h){x=null}if(Array.isArray(x)&&x.length==3){var D=x;if(D[0]==0)a:{if(!z.B){if(z.Y)if(z.Y.t4+3E30&&(z.NJ=1.5*p);x=z;var E=F.PK();if(E){var X=g.Xb(E,"X-Client-Wire-Protocol");if(X){var q=x.L;!q.Y&&(g.r9(X,"spdy")||g.r9(X,"quic")||g.r9(X,"h2"))&&(q.j=q.W,q.Y=new Set,q.L&&(Ta7(q,q.L),q.L=null))}if(x.Xf){var N=g.Xb(E,"X-HTTP-Session-Id");N&&(x.m_=N,g.cD(x.cR,x.Xf,N))}}z.Pl=3;z.W&&z.W.mR();z.MD&&(z.We=Date.now()-F.t4);x=z;var u=F;x.fJ=luH(x,x.l$?x.qD:null,x.RS);if(u.J4){QxV(x.L, u);var w=u,m=x.NJ;m&&w.setTimeout(m);w.Qh&&(qNl(w),G3(w));x.Y=u}else hpA(x);z.U.length>0&&PT(z)}else e[0]!="stop"&&e[0]!="close"||cT(z,7);else z.Pl==3&&(e[0]=="stop"||e[0]=="close"?e[0]=="stop"?cT(z,7):z.disconnect():e[0]!="noop"&&z.W&&z.W.E8(e),z.PR=0)}lb(4)}catch(h){}},rxG=function(F,k){this.Y=F; this.map=k;this.context=null},Ba$=function(F){this.W=F||10; g.bD.PerformanceNavigationTiming?(F=g.bD.performance.getEntriesByType("navigation"),F=F.length>0&&(F[0].nextHopProtocol=="hq"||F[0].nextHopProtocol=="h2")):F=!!(g.bD.chrome&&g.bD.chrome.loadTimes&&g.bD.chrome.loadTimes()&&g.bD.chrome.loadTimes().wasFetchedViaSpdy);this.j=F?this.W:1;this.Y=null;this.j>1&&(this.Y=new Set);this.L=null;this.U=[]},G_9=function(F){return F.L?!0:F.Y?F.Y.size>=F.j:!1},m5n=function(F){return F.L?1:F.Y?F.Y.size:0},uGt=function(F,k){return F.L?F.L==k:F.Y?F.Y.has(k):!1},Ta7= function(F,k){F.Y?F.Y.add(k):F.L=k},QxV=function(F,k){F.L&&F.L==k?F.L=null:F.Y&&F.Y.has(k)&&F.Y.delete(k)},U5l=function(F){if(F.L!=null)return F.U.concat(F.L.PR); if(F.Y!=null&&F.Y.size!==0){var k=F.U;F=g.l(F.Y.values());for(var z=F.next();!z.done;z=F.next())k=k.concat(z.value.PR);return k}return g.z8(F.U)},tZV=function(F,k){var z=new rq; if(g.bD.Image){var x=new Image;x.onload=g.FY(Os,z,"TestLoadImage: loaded",!0,k,x);x.onerror=g.FY(Os,z,"TestLoadImage: error",!1,k,x);x.onabort=g.FY(Os,z,"TestLoadImage: abort",!1,k,x);x.ontimeout=g.FY(Os,z,"TestLoadImage: timeout",!1,k,x);g.bD.setTimeout(function(){if(x.ontimeout)x.ontimeout()},1E4); x.src=F}else k(!1)},ZuC=function(F,k){var z=new rq,x=new AbortController,D=setTimeout(function(){x.abort(); Os(z,"TestPingServer: timeout",!1,k)},1E4); fetch(F,{signal:x.signal}).then(function(e){clearTimeout(D);e.ok?Os(z,"TestPingServer: ok",!0,k):Os(z,"TestPingServer: server error",!1,k)}).catch(function(){clearTimeout(D); Os(z,"TestPingServer: error",!1,k)})},Os=function(F,k,z,x,D){try{D&&(D.onload=null,D.onerror=null,D.onabort=null,D.ontimeout=null),x(z)}catch(e){}},vnV=function(){this.Y=new T3},cxV=function(F,k,z){var x=z||""; try{SrA(F,function(D,e){var C=D;g.M9(D)&&(C=g.J1(D));k.push(x+e+"="+encodeURIComponent(C))})}catch(D){throw k.push(x+"type="+encodeURIComponent("_badmap")),D; }},Vb=function(F,k,z){return z&&z.Zat?z.Zat[F]||k:k},PnH=function(F){this.U=[]; this.qD=this.fJ=this.cR=this.RS=this.Y=this.m_=this.Xf=this.yh=this.G=this.UH=this.K=null;this.H8=this.u$=0;this.zM=Vb("failFast",!1,F);this.J4=this.Qh=this.B=this.S=this.W=null;this.uL=!0;this.ZR=this.RU=-1;this.Xm=this.PR=this.t4=0;this.y6=Vb("baseRetryDelayMs",5E3,F);this.Nk=Vb("retryDelaySeedMs",1E4,F);this.Av=Vb("forwardChannelMaxRetries",2,F);this.yf=Vb("forwardChannelRequestTimeoutMs",2E4,F);this.P7=F&&F.InU||void 0;this.Ki=F&&F.yfa||void 0;this.YP=F&&F.bwU||!1;this.NJ=void 0;this.l$=F&&F.ZnJ|| !1;this.j="";this.L=new Ba$(F&&F.PVK);this.xY=new vnV;this.dH=F&&F.Ivf||!1;this.vR=F&&F.WG4||!1;this.dH&&this.vR&&(this.vR=!1);this.Om=F&&F.KhG||!1;F&&F.J34&&(this.uL=!1);this.MD=!this.dH&&this.uL&&F&&F.tw_||!1;this.Vz=void 0;F&&F.Rm&&F.Rm>0&&(this.Vz=F.Rm);this.vj=void 0;this.We=0;this.kG=!1;this.mY=this.mp=null},vT=function(F){F.Y&&(Ou9(F),F.Y.cancel(),F.Y=null)},VZD=function(F){vT(F); F.B&&(g.bD.clearTimeout(F.B),F.B=null);ZK(F);F.L.cancel();F.S&&(typeof F.S==="number"&&g.bD.clearTimeout(F.S),F.S=null)},PT=function(F){G_9(F.L)||F.S||(F.S=!0,g.lh(F.hs,F),F.t4=0)},Hut=function(F,k){if(m5n(F.L)>=F.L.j-(F.S?1:0))return!1; if(F.S)return F.U=k.PR.concat(F.U),!0;if(F.Pl==1||F.Pl==2||F.t4>=(F.zM?0:F.Av))return!1;F.S=hf((0,g.W6)(F.hs,F,k),Iup(F,F.t4));F.t4++;return!0},SN7=function(F,k){var z; k?z=k.RS:z=F.u$++;var x=F.cR.clone();g.cD(x,"SID",F.j);g.cD(x,"RID",z);g.cD(x,"AID",F.RU);I$(F,x);F.G&&F.K&&g.I4(x,F.G,F.K);z=new BT(F,F.j,z,F.t4+1);F.G===null&&(z.cR=F.K);k&&(F.U=k.PR.concat(F.U));k=auC(F,z,1E3);z.setTimeout(Math.round(F.yf*.5)+Math.round(F.yf*.5*Math.random()));Ta7(F.L,z);$59(z,x,k)},I$=function(F,k){F.yh&&g.tg(F.yh,function(z,x){g.cD(k,x,z)}); F.W&&SrA({},function(z,x){g.cD(k,x,z)})},auC=function(F,k,z){z=Math.min(F.U.length,z); var x=F.W?(0,g.W6)(F.W.e2,F.W,F):null;a:{for(var D=F.U,e=-1;;){var C=["count="+z];e==-1?z>0?(e=D[0].Y,C.push("ofs="+e)):e=0:C.push("ofs="+e);for(var p=!0,E=0;E=3)return!1; F.Xm++;F.B=hf((0,g.W6)(F.jX,F),Iup(F,F.PR));F.PR++;return!0},Ou9=function(F){F.mp!=null&&(g.bD.clearTimeout(F.mp),F.mp=null)},bun=function(F){F.Y=new BT(F,F.j,"rpc",F.Xm); F.G===null&&(F.Y.cR=F.K);F.Y.NJ=0;var k=F.fJ.clone();g.cD(k,"RID","rpc");g.cD(k,"SID",F.j);g.cD(k,"AID",F.RU);g.cD(k,"CI",F.J4?"0":"1");!F.J4&&F.Vz&&g.cD(k,"TO",F.Vz);g.cD(k,"TYPE","xmlhttp");I$(F,k);F.G&&F.K&&g.I4(k,F.G,F.K);F.NJ&&F.Y.setTimeout(F.NJ);var z=F.Y;F=F.qD;z.l$=1;z.B=F3(k.clone());z.K=null;z.Xf=!0;D5C(z,F)},ZK=function(F){F.Qh!=null&&(g.bD.clearTimeout(F.Qh),F.Qh=null)},Nat=function(F,k){var z=null; if(F.Y==k){ZK(F);Ou9(F);F.Y=null;var x=2}else if(uGt(F.L,k))z=k.PR,QxV(F.L,k),x=1;else return;if(F.Pl!=0)if(k.S)if(x==1){z=k.K?k.K.length:0;k=Date.now()-k.t4;var D=F.t4;x=k_D();x.dispatchEvent(new x59(x,z,k,D));PT(F)}else hpA(F);else{var e=k.UH;D=k.getLastError();if(D==3||D==0&&e>0||!(x==1&&Hut(F,k)||x==2&&wWn(F)))switch(z&&z.length>0&&(k=F.L,k.U=k.U.concat(z)),D){case 1:cT(F,5);break;case 4:cT(F,10);break;case 3:cT(F,6);break;default:cT(F,2)}}},Iup=function(F,k){var z=F.y6+Math.floor(Math.random()* F.Nk); F.isActive()||(z*=2);return z*k},cT=function(F,k){if(k==2){var z=(0,g.W6)(F.d4f,F),x=F.Ki,D=!x; x=new g.sF(x||"//www.google.com/images/cleardot.gif");g.bD.location&&g.bD.location.protocol=="http"||g.rl(x,"https");F3(x);D?tZV(x.toString(),z):ZuC(x.toString(),z)}else Qb(2);F.Pl=0;F.W&&F.W.i5(k);d5$(F);VZD(F)},d5$=function(F){F.Pl=0; F.mY=[];if(F.W){var k=U5l(F.L);if(k.length!=0||F.U.length!=0)g.xr(F.mY,k),g.xr(F.mY,F.U),F.L.U.length=0,g.z8(F.U),F.U.length=0;F.W.FL()}},Jxt=function(F){if(F.Pl==0)return F.mY; var k=[];g.xr(k,U5l(F.L));g.xr(k,F.U);return k},luH=function(F,k,z){var x=g.PD(z); x.Y!=""?(k&&g.BD(x,k+"."+x.Y),g.Gi(x,x.U)):(x=g.bD.location,x=bXC(x.protocol,k?k+"."+x.hostname:x.hostname,+x.port,z));k=F.Xf;z=F.m_;k&&z&&g.cD(x,k,z);g.cD(x,"VER",F.a$);I$(F,x);return x},jxA=function(F,k,z){if(k&&!F.l$)throw Error("Can't create secondary domain capable XhrIo object."); k=F.YP&&!F.P7?new g.$y(new g.Ti({My:z})):new g.$y(F.P7);k.G=F.l$;return k},yxY=function(){},RpC=function(){},a$=function(F,k){g.A1.call(this); this.Y=new PnH(k);this.W=F;this.L=k&&k.fDK||null;F=k&&k.Aph||null;k&&k.QVf&&(F?F["X-Client-Protocol"]="webchannel":F={"X-Client-Protocol":"webchannel"});this.Y.K=F;F=k&&k.Kt$||null;k&&k.pL&&(F?F["X-WebChannel-Content-Type"]=k.pL:F={"X-WebChannel-Content-Type":k.pL});k&&k.Vk&&(F?F["X-WebChannel-Client-Profile"]=k.Vk:F={"X-WebChannel-Client-Profile":k.Vk});this.Y.UH=F;(F=k&&k.O04)&&!g.hD(F)&&(this.Y.G=F);this.S=k&&k.ZnJ||!1;this.j=k&&k.Zct||!1;(k=k&&k.uf_)&&!g.hD(k)&&(this.Y.Xf=k,g.IM(this.L,k)&&(F= this.L,k in F&&delete F[k]));this.U=new HT(this)},gnl=function(F){Kzp.call(this); F.__headers__&&(this.headers=F.__headers__,this.statusCode=F.__status__,delete F.__headers__,delete F.__status__);var k=F.__sm__;k?this.data=(this.Y=g.PB(k))?g.b3(k,this.Y):k:this.data=F},YNl=function(F){Wzt.call(this); this.status=1;this.errorCode=F},HT=function(F){this.Y=F},nnH=function(F,k){this.L=F; this.Y=k},MZH=function(F){return Jxt(F.Y).map(function(k){var z=F.L; k=k.map;"__data__"in k?(k=k.__data__,z=z.j?I39(k):k):z=k;return z})},S$=function(F,k){if(typeof F!=="function")throw Error("Fn must not be null and must be a function"); return g.bD.setTimeout(function(){F()},k)},dq=function(F){bb.dispatchEvent(new L97(bb,F))},L97=function(F){g.gd.call(this,"statevent",F)},Jf=function(F,k,z,x){this.Y=F; this.j=k;this.G=z;this.S=x||1;this.L=45E3;this.U=new g.HD(this);this.W=new g.H4;this.W.setInterval(250)},K99=function(F,k,z){F.kt=1; F.DS=F3(k.clone());F.jI=z;F.Xf=!0;fuG(F,null)},W9l=function(F,k,z,x,D){F.kt=1; F.DS=F3(k.clone());F.jI=null;F.Xf=z;D&&(F.Ft=!1);fuG(F,x)},fuG=function(F,k){F.dB=Date.now(); Fgt(F);F.C8=F.DS.clone();ku(F.C8,"t",F.S);F.DB=0;F.gI=F.Y.UO(F.Y.YV()?k:null);F.Y$>0&&(F.p8=new g.oR((0,g.W6)(F.XL,F,F.gI),F.Y$));F.U.listen(F.gI,"readystatechange",F.gS);k=F.Pi?g.Jg(F.Pi):{};F.jI?(F.ZB="POST",k["Content-Type"]="application/x-www-form-urlencoded",F.gI.send(F.C8,F.ZB,F.jI,k)):(F.ZB="GET",F.Ft&&!g.DA&&(k.Connection="close"),F.gI.send(F.C8,F.ZB,null,k));F.Y.M6(1)},zPC=function(F,k){var z=F.DB,x=k.indexOf("\n",z); if(x==-1)return kXl;z=Number(k.substring(z,x));if(isNaN(z))return oK$;x+=1;if(x+z>k.length)return kXl;k=k.slice(x,x+z);F.DB=x+z;return k},Fgt=function(F){F.Lm=Date.now()+F.L; xAD(F,F.L)},xAD=function(F,k){if(F.Mn!=null)throw Error("WatchDog timer not null"); F.Mn=S$((0,g.W6)(F.W0,F),k)},iM7=function(F){F.Mn&&(g.bD.clearTimeout(F.Mn),F.Mn=null)},DAH=function(F){F.Y.j5()||F.Oa||F.Y.Pw(F)},yb=function(F){iM7(F); g.CC(F.p8);F.p8=null;F.W.stop();F.U.removeAll();if(F.gI){var k=F.gI;F.gI=null;k.abort();k.dispose()}F.tN&&(F.tN=null)},$AC=function(F,k){try{F.Y.TL(F,k),F.Y.M6(4)}catch(z){}},eP$=function(F,k,z,x,D){if(x==0)z(!1); else{var e=D||0;x--;jwn(F,k,function(C){C?z(!0):g.bD.setTimeout(function(){eP$(F,k,z,x,e)},e)})}},jwn=function(F,k,z){var x=new Image; x.onload=function(){try{R$(x),z(!0)}catch(D){}}; x.onerror=function(){try{R$(x),z(!1)}catch(D){}}; x.onabort=function(){try{R$(x),z(!1)}catch(D){}}; x.ontimeout=function(){try{R$(x),z(!1)}catch(D){}}; g.bD.setTimeout(function(){if(x.ontimeout)x.ontimeout()},k); x.src=F},R$=function(F){F.onload=null; F.onerror=null;F.onabort=null;F.ontimeout=null},CM7=function(F){this.Y=F; this.L=new T3},A6n=function(F){var k=gq(F.Y,F.iH,"/mail/images/cleardot.gif"); F3(k);eP$(k.toString(),5E3,(0,g.W6)(F.rL,F),3,2E3);F.M6(1)},pAC=function(F){var k=F.Y.S; k!=null?(dq(5),k?(dq(11),Yu(F.Y,F,!1)):(dq(12),Yu(F.Y,F,!0))):(F.cO=new Jf(F),F.cO.Pi=F.Qy,k=F.Y,k=gq(k,k.YV()?F.sD:null,F.jG),dq(5),ku(k,"TYPE","xmlhttp"),W9l(F.cO,k,!1,F.sD,!1))},EKp=function(F,k,z){this.Y=1; this.L=[];this.U=[];this.W=new T3;this.K=F||null;this.S=k!=null?k:null;this.B=z||!1},XAV=function(F,k){this.Y=F; this.map=k;this.context=null},qtt=function(F,k,z,x){g.gd.call(this,"timingevent",F); this.size=k;this.rtt=z;this.retries=x},N3p=function(F){g.gd.call(this,"serverreachability",F)},wA$=function(F){F.yj(1,0); F.OD=gq(F,null,F.FO);uaC(F)},mAA=function(F){F.kK&&(F.kK.abort(),F.kK=null); F.mB&&(F.mB.cancel(),F.mB=null);F.vC&&(g.bD.clearTimeout(F.vC),F.vC=null);nH(F);F.R6&&(F.R6.cancel(),F.R6=null);F.Gl&&(g.bD.clearTimeout(F.Gl),F.Gl=null)},T3Y=function(F,k){if(F.Y==0)throw Error("Invalid operation: sending map when state is closed"); F.L.push(new XAV(F.ze++,k));F.Y!=2&&F.Y!=3||uaC(F)},l0Y=function(F){var k=0; F.mB&&k++;F.R6&&k++;return k},uaC=function(F){F.R6||F.Gl||(F.Gl=S$((0,g.W6)(F.gZ,F),0),F.kQ=0)},sw$=function(F,k){if(F.Y==1){if(!k){F.UW=Math.floor(Math.random()*1E5); k=F.UW++;var z=new Jf(F,"",k);z.Pi=F.ya;var x=Qw$(F),D=F.OD.clone();g.cD(D,"RID",k);g.cD(D,"CVER","1");M0(F,D);K99(z,D,x);F.R6=z;F.Y=2}}else F.Y==3&&(k?hPn(F,k):F.L.length==0||F.R6||hPn(F))},hPn=function(F,k){if(k)if(F.hA>6){F.L=F.U.concat(F.L); F.U.length=0;var z=F.UW-1;k=Qw$(F)}else z=k.G,k=k.jI;else z=F.UW++,k=Qw$(F);var x=F.OD.clone();g.cD(x,"SID",F.j);g.cD(x,"RID",z);g.cD(x,"AID",F.Zw);M0(F,x);z=new Jf(F,F.j,z,F.kQ+1);z.Pi=F.ya;z.setTimeout(1E4+Math.round(1E4*Math.random()));F.R6=z;K99(z,x,k)},M0=function(F,k){F.ao&&(F=F.ao.b5())&&g.tg(F,function(z,x){g.cD(k,x,z)})},Qw$=function(F){var k=Math.min(F.L.length,1E3),z=["count="+k]; if(F.hA>6&&k>0){var x=F.L[0].Y;z.push("ofs="+x)}else x=0;for(var D={},e=0;e=3)return!1; F.G++;F.vC=S$((0,g.W6)(F.Wa,F),B37(F,F.C1));F.C1++;return!0},Yu=function(F,k,z){F.IG=F.S==null?z:!F.S; F.ji=k.Ky;F.B||wA$(F)},nH=function(F){F.Fq!=null&&(g.bD.clearTimeout(F.Fq),F.Fq=null)},B37=function(F,k){var z=5E3+Math.floor(Math.random()*1E4); F.isActive()||(z*=2);return z*k},LH=function(F,k){if(k==2||k==9){var z=null; F.ao&&(z=null);var x=(0,g.W6)(F.vAh,F);z||(z=new g.sF("//www.google.com/images/cleardot.gif"),F3(z));jwn(z.toString(),1E4,x)}else dq(2);UAY(F,k)},UAY=function(F,k){F.Y=0; F.ao&&F.ao.yU(k);tB9(F);mAA(F)},tB9=function(F){F.Y=0; F.ji=-1;if(F.ao)if(F.U.length==0&&F.L.length==0)F.ao.EO();else{var k=g.z8(F.U),z=g.z8(F.L);F.U.length=0;F.L.length=0;F.ao.EO(k,z)}},gq=function(F,k,z){var x=g.PD(z); if(x.Y!="")k&&g.BD(x,k+"."+x.Y),g.Gi(x,x.U);else{var D=window.location;x=bXC(D.protocol,k?k+"."+D.hostname:D.hostname,+D.port,z)}F.Lf&&g.tg(F.Lf,function(e,C){g.cD(x,C,e)}); g.cD(x,"VER",F.hA);M0(F,x);return x},ZMn=function(){},vKt=function(){this.Y=[]; this.L=[]},c6l=function(F){g.gd.call(this,"channelMessage"); this.message=F},PMn=function(F){g.gd.call(this,"channelError"); this.error=F},OMn=function(F,k){this.action=F; this.params=k||{}},fH=function(F,k){g.S.call(this); this.Y=new g.KS(this.Avh,0,this);g.b(this,this.Y);this.UF=5E3;this.L=0;if(typeof F==="function")k&&(F=(0,g.W6)(F,k));else if(F&&typeof F.handleEvent==="function")F=(0,g.W6)(F.handleEvent,F);else throw Error("Invalid listener argument");this.U=F},VBn=function(F,k,z,x,D,e,C,p,E,X,q,N,u,w){z=z===void 0?!1:z; x=x===void 0?function(){return""}:x; D=D===void 0?!1:D;e=e===void 0?!1:e;C=C===void 0?!1:C;p=p===void 0?function(){return g.ZJ({})}:p; E=E===void 0?!1:E;q=q===void 0?!1:q;N=N===void 0?!1:N;u=u===void 0?!1:u;w=w===void 0?!1:w;this.l$=F;this.Qh=k;this.S=new g.Ze;this.L=new fH(this.vYh,this);this.Y=null;this.G=!1;this.K=null;this.t4="";this.PR=this.B=0;this.U=[];this.Xm=z;this.Xf=x;this.W=e;this.cR=p;this.yh=X;this.qD=C;this.mp=null;this.j=g.ZJ();this.RS=D;this.mY=E;this.dH=q;this.vR=N;this.uL=u;this.UH=w;this.NJ=new dJC;this.J4=new JUV;this.kG=new RJp;this.u$=new yUt;this.RU=new gcC;this.MD=new Yr9;this.vj=new ncn},a0$=function(F, k,z,x,D){I0C(F); if(F.Y){var e=g.LX("ID_TOKEN"),C=F.Y.ya||{};e?C["x-youtube-identity-token"]=e:delete C["x-youtube-identity-token"];F.Y.ya=C}HMC(F);x?(x.getState()!=3&&l0Y(x)==0||x.getState(),F.Y.connect(k,z,F.Qh,x.j,x.Zw)):D?F.Y.connect(k,z,F.Qh,D.sessionId,D.arrayId):F.Y.connect(k,z,F.Qh)},J69=function(F,k){return F.uL?!0:F.vR?Object.values(StV).includes(k):F.dH?!Object.values(bM9).includes(k):F.UH?Object.values(dAY).includes(k):!1},gKC=function(F){var k,z; g.O(function(x){if(x.Y==1)return g.hn(x,2),g.c(x,y6l(F),2);g.B6(x);k=F.U;F.U=[];z=k.length;RPD(F,k,z);KH(F);return g.UC(x,0)})},RPD=function(F,k,z){for(var x=0;x0?z=Object.assign({},z,k):delete z.Authorization;F.Y.ya=z}},HMC=function(F){F.yh&&!F.W&&nK$(F,F.yh())},WT=function(F){this.scheme="https"; this.port=this.domain="";this.Y="/api/lounge";this.L=!0;F=F||document.location.href;var k=Number(g.Mt(4,F))||"";k&&(this.port=":"+k);this.domain=g.Lw(F)||"";F=g.ZH();F.search("MSIE")>=0&&(F=F.match(/MSIE ([\d.]+)/)[1],g.tD(F,"10.0")<0&&(this.L=!1))},FV=function(F,k){var z=F.Y; F.L&&(z=F.scheme+"://"+F.domain+F.port+F.Y);return g.oW(z+k,{})},MB$=function(F,k){g.A1.call(this); var z=this;this.j9=F();this.j9.subscribe("handlerOpened",this.lr,this);this.j9.subscribe("handlerClosed",this.onClosed,this);this.j9.subscribe("handlerError",function(x,D){z.onError(D)}); this.j9.subscribe("handlerMessage",this.onMessage,this);this.Y=k},Lg$=function(F,k,z){var x=this; z=z===void 0?function(){return""}:z; var D=D===void 0?new RpC:D;var e=e===void 0?new g.Ze:e;this.pathPrefix=F;this.Y=k;this.t4=z;this.W=e;this.B=null;this.K=this.G=0;this.channel=null;this.S=0;this.U=new fH(function(){x.U.isActive();var C;((C=x.channel)==null?void 0:m5n((new nnH(C,C.Y)).Y.L))===0&&x.connect(x.B,x.G)}); this.j={};this.L={};this.Qh=!1;this.logger=null;this.PR=[];this.H5=void 0;this.cR=new dJC;this.mp=new JUV;this.yh=new yUt;this.Xf=new gcC},f0V=function(F){g.zh(F.channel,"m",function(){F.S=3; F.U.reset();F.B=null;F.G=0;for(var k=g.l(F.PR),z=k.next();!z.done;z=k.next())z=z.value,F.channel&&F.channel.send(z);F.PR=[];F.publish("webChannelOpened");F.cR.uc("WEB_CHANNEL")}); g.zh(F.channel,"n",function(){F.S=0;F.U.isActive()||F.publish("webChannelClosed");var k,z=(k=F.channel)==null?void 0:MZH(new nnH(k,k.Y));z&&(F.PR=[].concat(g.r(z)));F.mp.uc("WEB_CHANNEL")}); g.zh(F.channel,"p",function(k){var z=k.data;z[0]==="gracefulReconnect"?(F.U.start(),F.channel&&F.channel.close()):F.publish("webChannelMessage",new OMn(z[0],z[1]));F.H5=k.statusCode;F.yh.uc("WEB_CHANNEL")}); g.zh(F.channel,"o",function(){F.H5===401||F.U.start();F.publish("webChannelError");F.Xf.uc("WEB_CHANNEL")})},Kg7=function(F){var k=F.t4(); k?F.j["x-youtube-lounge-xsrf-token"]=k:delete F.j["x-youtube-lounge-xsrf-token"]},WgG=function(F){g.A1.call(this); this.Y=F();this.Y.subscribe("webChannelOpened",this.xl,this);this.Y.subscribe("webChannelClosed",this.onClosed,this);this.Y.subscribe("webChannelError",this.onError,this);this.Y.subscribe("webChannelMessage",this.onMessage,this)},FN7=function(F,k,z,x,D){function e(){return new VBn(FV(F,"/bc"),k,!1,z,x)} z=z===void 0?function(){return""}:z; return g.sY("enable_mdx_web_channel_desktop")?new WgG(function(){return new Lg$(FV(F,"/wc"),k,z)}):new MB$(e,D)},xKH=function(){var F=kIC; o4A();kw.push(F);zLl()},oZ=function(F,k){o4A(); var z=ibC(F,String(k));kw.length==0?DKn(z):(zLl(),g.XN(kw,function(x){x(z)}))},zH=function(F){oZ("CP",F)},o4A=function(){kw||(kw=g.yR("yt.mdx.remote.debug.handlers_")||[],g.dI("yt.mdx.remote.debug.handlers_",kw))},DKn=function(F){var k=(xw+1)%50; xw=k;iu[k]=F;Ds||(Ds=k==49)},zLl=function(){var F=kw; if(iu[0]){var k=Ds?xw:-1,z={};do z={HA:void 0},k=(k+1)%50,z.HA=iu[k],g.XN(F,function(x){return function(D){D(x.HA)}}(z)); while(k!=xw);iu=Array(50);xw=-1;Ds=!1}},ibC=function(F,k){var z=(Date.now()-$KG)/1E3; z.toFixed&&(z=z.toFixed(3));var x=[];x.push("[",z+"s","] ");x.push("[","yt.mdx.remote","] ");x.push(F+": "+k,"\n");return x.join("")},$w=function(F){g.uG.call(this); this.S=F;this.screens=[]},j9p=function(F,k){var z=F.get(k.uuid)||F.get(k.id); if(z)return F=z.name,z.id=k.id||z.id,z.name=k.name,z.token=k.token,z.uuid=k.uuid||z.uuid,z.name!=F;F.screens.push(k);return!0},eLY=function(F,k){var z=F.screens.length!=k.length; F.screens=g.pT(F.screens,function(e){return!!BzD(k,e)}); for(var x=k.length,D=0;D0&&F.j0&&TH(F,z)},function(k){F.W=function(){}; F.Z$(k)})},aZ7=function(F){var k={}; k.pairingCode=F.mp;k.theme=F.l$;Hgl()&&(k.env_useStageMdx=1);return g.ky(k)},SaV=function(F){return new Promise(function(k){F.mp=sS$(); if(F.cR){var z=new chrome.cast.DialLaunchResponse(!0,aZ7(F));k(z);HbA(F)}else F.Qh=function(){g.lP(F.K);F.Qh=function(){}; F.K=NaN;var x=new chrome.cast.DialLaunchResponse(!0,aZ7(F));k(x);HbA(F)},F.K=g.mz(function(){F.Qh()},100)})},dKt=function(F,k,z){F.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(k)); var x=new j$(k);return(new Promise(function(D){bbl(F,x,function(e){e?(F.PR=!0,En(F.j,x),qY(F,x),TH(F,z)):g.kT(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(k)+" is not online."));D(e)},5)})).then(function(D){return D?new chrome.cast.DialLaunchResponse(!1):SaV(F)})},Jy$=function(F,k){var z=F.B.receiver.label,x=F.L.friendlyName; return(new Promise(function(D){lZD(F.j,z,k,x,function(e){e&&e.token&&qY(F,e);D(e)},function(e){NY(F,"Failed to get DIAL screen: "+e); D(null)})})).then(function(D){return D&&D.token?new chrome.cast.DialLaunchResponse(!1):SaV(F)})},bbl=function(F,k,z,x){g.lP(F.S); F.S=0;hLl(F.j,k,function(D){D||x<0?z(D):F.S=g.mz(function(){bbl(F,k,z,x-1)},300)})},TH=function(F,k){F.info("getDialAppInfoWithTimeout_ "+k); mH(F)&&(g.lP(F.G),F.G=0,k==0?yy7(F):F.G=g.mz(function(){yy7(F)},k))},yy7=function(F){mH(F)&&F.U.getDialAppInfo(function(k){F.info("getDialAppInfo dialLaunchData: "+JSON.stringify(k)); k=k.extraData||{};var z=null;if(k.loungeToken){var x;((x=F.Y)==null?void 0:x.token)==k.loungeToken&&(z="staleLoungeToken")}else z="missingLoungeToken";z?(F.t4=z,TH(F,3E4)):(F.PR=!1,F.t4="unknown",GIp(F,k.loungeToken),TH(F,k.loungeTokenRefreshIntervalMs))},function(k){F.info("getDialAppInfo error: "+k); F.t4="noLoungeTokenResponse";TH(F,3E4)})},RLC=function(F){g.lP(F.S); F.S=0;g.lP(F.G);F.G=0;F.W();F.W=function(){}; g.lP(F.K)},lu=function(F,k){XV.call(this,F,k,"ManualSession"); this.U=g.mz((0,g.W6)(this.MM,this,null),150)},QW=function(F,k){g.uG.call(this); this.config_=k;this.L=F;this.B=k.appId||"233637DE";this.j=k.theme||"cl";this.K=k.disableCastApi||!1;this.S=k.forceMirroring||!1;this.Y=null;this.G=!1;this.U=[];this.W=(0,g.W6)(this.K_G,this)},g4n=function(F,k){return k?g.M$(F.U,function(z){return e$(k,z.label)},F):null},h3=function(F){oZ("Controller",F)},kIC=function(F){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(F)},sn=function(F){return F.G||!!F.U.length||!!F.Y},rK=function(F,k,z){k!=F.Y&&(g.CC(F.Y),(F.Y=k)?(z?F.publish("yt-remote-cast2-receiver-resumed", k.L):F.publish("yt-remote-cast2-receiver-selected",k.L),k.subscribe("sessionScreen",(0,g.W6)(F.ZC,F,k)),k.subscribe("sessionFailed",function(){return YaC(F,k)}),k.Y?F.publish("yt-remote-cast2-session-change",k.Y):z&&F.Y.MM(null)):F.publish("yt-remote-cast2-session-change",null))},YaC=function(F,k){F.Y==k&&F.publish("yt-remote-cast2-session-failed")},n4C=function(F){var k=F.L.n7(),z=F.Y&&F.Y.L; F=g.tW(k,function(x){z&&e$(x,z.label)&&(z=null);var D=x.uuid?x.uuid:x.id,e=g4n(this,x);e?(e.label=D,e.friendlyName=x.name):(e=new chrome.cast.Receiver(D,x.name),e.receiverType=chrome.cast.ReceiverType.CUSTOM);return e},F); z&&(z.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(z=new chrome.cast.Receiver(z.label,z.friendlyName),z.receiverType=chrome.cast.ReceiverType.CUSTOM),F.push(z));return F},kbC=function(F,k,z,x){x.disableCastApi?Bo("Cannot initialize because disabled by Mdx config."):MAV()?LNp(k,x)&&(fZt(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?KNC(F,z):(window.__onGCastApiAvailable=function(D,e){D?KNC(F,z):(GH("Failed to load cast API: "+e),WNC(!1),fZt(!1),g.da("yt-remote-cast-available"),g.da("yt-remote-cast-receiver"), Ffp(),z(!1))},x.loadCastApiSetupScript?g.NH("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?SY$()>=60&&MlY():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?yBn():SY$()>=89?fC$():(nT$(),wq(Lz$.map(RcD))))):Bo("Cannot initialize because not running Chrome")},Ffp=function(){Bo("dispose"); var F=Un();F&&F.dispose();g.dI("yt.mdx.remote.cloudview.instance_",null);o3t(!1);g.XU(z$A);z$A.length=0},t3=function(){return!!g.bn("yt-remote-cast-installed")},xHV=function(){var F=g.bn("yt-remote-cast-receiver"); return F?F.friendlyName:null},iFC=function(){Bo("clearCurrentReceiver"); g.da("yt-remote-cast-receiver")},DHC=function(){return t3()?Un()?Un().getCastSession():(GH("getCastSelector: Cast is not initialized."),null):(GH("getCastSelector: Cast API is not installed!"),null)},$HC=function(){t3()?Un()?Zs()?(Bo("Requesting cast selector."),Un().requestSession()):(Bo("Wait for cast API to be ready to request the session."),z$A.push(g.Ex("yt-remote-cast2-api-ready",$HC))):GH("requestCastSelector: Cast is not initialized."):GH("requestCastSelector: Cast API is not installed!")}, vo=function(F,k){Zs()?Un().setConnectedScreenStatus(F,k):GH("setConnectedScreenStatus called before ready.")},MAV=function(){var F=g.ZH().search(/ (CrMo|Chrome|CriOS)\//)>=0; return g.SD||F},jj7=function(F,k){Un().init(F,k)},LNp=function(F,k){var z=!1; Un()||(F=new QW(F,k),F.subscribe("yt-remote-cast2-availability-change",function(x){g.SZ("yt-remote-cast-available",x);N0("yt-remote-cast2-availability-change",x)}),F.subscribe("yt-remote-cast2-receiver-selected",function(x){Bo("onReceiverSelected: "+x.friendlyName); g.SZ("yt-remote-cast-receiver",x);N0("yt-remote-cast2-receiver-selected",x)}),F.subscribe("yt-remote-cast2-receiver-resumed",function(x){Bo("onReceiverResumed: "+x.friendlyName); g.SZ("yt-remote-cast-receiver",x);N0("yt-remote-cast2-receiver-resumed",x)}),F.subscribe("yt-remote-cast2-session-change",function(x){Bo("onSessionChange: "+CH(x)); x||g.da("yt-remote-cast-receiver");N0("yt-remote-cast2-session-change",x)}),g.dI("yt.mdx.remote.cloudview.instance_",F),z=!0); Bo("cloudview.createSingleton_: "+z);return z},Un=function(){return g.yR("yt.mdx.remote.cloudview.instance_")},KNC=function(F,k){WNC(!0); fZt(!1);jj7(F,function(z){z?(o3t(!0),g.qH("yt-remote-cast2-api-ready")):(GH("Failed to initialize cast API."),WNC(!1),g.da("yt-remote-cast-available"),g.da("yt-remote-cast-receiver"),Ffp());k(z)})},Bo=function(F){oZ("cloudview",F)},GH=function(F){oZ("cloudview",F)},WNC=function(F){Bo("setCastInstalled_ "+F); g.SZ("yt-remote-cast-installed",F)},Zs=function(){return!!g.yR("yt.mdx.remote.cloudview.apiReady_")},o3t=function(F){Bo("setApiReady_ "+F); g.dI("yt.mdx.remote.cloudview.apiReady_",F)},fZt=function(F){g.dI("yt.mdx.remote.cloudview.initializing_",F)},co=function(F){this.index=-1; this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.S=this.G=0;this.trackData=null;this.D4=this.HZ=!1;this.B=this.W=this.Y=this.j=0;this.U=NaN;this.L=!1;this.reset(F)},e$7=function(F){F.audioTrackId=null; F.trackData=null;F.playerState=-1;F.HZ=!1;F.D4=!1;F.G=0;F.S=g.op();F.j=0;F.Y=0;F.W=0;F.B=0;F.U=NaN;F.L=!1},Po=function(F){return F.isPlaying()?(g.op()-F.S)/1E3:0},On=function(F,k){F.G=k; F.S=g.op()},VW=function(F){switch(F.playerState){case 1:case 1081:return(g.op()-F.S)/1E3+F.G; case -1E3:return 0}return F.G},IZ=function(F,k,z){var x=F.videoId; F.videoId=k;F.index=z;k!=x&&e$7(F)},CeC=function(F){var k={}; k.index=F.index;k.listId=F.listId;k.videoId=F.videoId;k.playerState=F.playerState;k.volume=F.volume;k.muted=F.muted;k.audioTrackId=F.audioTrackId;k.trackData=g.yd(F.trackData);k.hasPrevious=F.HZ;k.hasNext=F.D4;k.playerTime=F.G;k.playerTimeAt=F.S;k.seekableStart=F.j;k.seekableEnd=F.Y;k.duration=F.W;k.loadedTime=F.B;k.liveIngestionTime=F.U;return k},aZ=function(F,k){g.uG.call(this); var z=this;this.U=0;this.j=F;this.S=[];this.W=new vKt;this.L=this.Y=null;this.K=(0,g.W6)(this.Xeh,this);this.G=(0,g.W6)(this.G5,this);this.B=(0,g.W6)(this.mRt,this);this.Qh=(0,g.W6)(this.SJR,this);var x=0;F?(x=F.getProxyState(),x!=3&&(F.subscribe("proxyStateChange",this.GF,this),APG(this))):x=3;x!=0&&(k?this.GF(x):g.mz(function(){z.GF(x)},0)); (F=DHC())&&Ho(this,F);this.subscribe("yt-remote-cast2-session-change",this.Qh)},SE=function(F){return new co(F.j.getPlayerContextData())},APG=function(F){g.XN("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(k){this.S.push(this.j.subscribe(k,g.FY(this.D5k,k),this))},F)},ptG=function(F){g.XN(F.S,function(k){this.j.unsubscribeByKey(k)},F); F.S.length=0},bu=function(F){return F.getState()==1},dK=function(F,k){var z=F.W; z.Y.length+z.L.length<50&&F.W.enqueue(k)},E3C=function(F,k,z){var x=SE(F); On(x,z);x.playerState!=-1E3&&(x.playerState=k);J3(F,x)},yW=function(F,k,z){F.j.sendMessage(k,z)},J3=function(F,k){ptG(F); F.j.setPlayerContextData(CeC(k));APG(F)},Ho=function(F,k){F.L&&(F.L.removeUpdateListener(F.K),F.L.removeMediaListener(F.G),F.G5(null)); F.L=k;F.L&&(zH("Setting cast session: "+F.L.sessionId),F.L.addUpdateListener(F.K),F.L.addMediaListener(F.G),F.L.media.length&&F.G5(F.L.media[0]))},XtC=function(F){var k=F.Y.media,z=F.Y.customData; if(k&&z){var x=SE(F);k.contentId!=x.videoId&&zH("Cast changing video to: "+k.contentId);x.videoId=k.contentId;x.playerState=z.playerState;On(x,F.Y.getEstimatedTime());J3(F,x)}else zH("No cast media video. Ignoring state update.")},RZ=function(F,k,z){return(0,g.W6)(function(x){this.b7("Failed to "+k+" with cast v2 channel. Error code: "+x.code); x.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.b7("Retrying "+k+" using MDx browser channel."),yW(this,k,z))},F)},n5=function(F,k,z,x){x=x===void 0?!1:x; g.uG.call(this);var D=this;this.S=NaN;this.mp=!1;this.K=this.B=this.PR=this.t4=NaN;this.Qh=[];this.W=this.G=this.j=this.Y=this.L=null;this.cR=F;this.yh=x;this.Qh.push(g.UN(window,"beforeunload",function(){D.Rk(2)})); this.U=[];this.Y=new co;this.l$=k.id;this.Xf=k.idType;this.L=FN7(this.cR,z,this.Js,this.Xf=="shortLived",this.l$);this.L.listen("channelOpened",function(){qxY(D)}); this.L.listen("channelClosed",function(){gK("Channel closed");isNaN(D.S)?X3(!0):X3();D.dispose()}); this.L.listen("channelError",function(e){X3();isNaN(D.zp())?(e==1&&D.Xf=="shortLived"&&D.publish("browserChannelAuthError",e),gK("Channel error: "+e+" without reconnection"),D.dispose()):(D.mp=!0,gK("Channel error: "+e+" with reconnection in "+D.zp()+" ms"),Yw(D,2))}); this.L.listen("channelMessage",function(e){NXY(D,e)}); this.L.Eo(k.token);this.subscribe("remoteQueueChange",function(){var e=D.Y.videoId;g.Jx()&&g.SZ("yt-remote-session-video-id",e)})},uU$=function(F){return g.M$(F.U,function(k){return k.type=="LOUNGE_SCREEN"})},gK=function(F){oZ("conn",F)},Yw=function(F,k){F.publish("proxyStateChange",k)},wtt=function(F){F.S=g.mz(function(){gK("Connecting timeout"); F.Rk(1)},2E4)},mHH=function(F){g.lP(F.S); F.S=NaN},TXV=function(F){g.lP(F.t4); F.t4=NaN},Qjl=function(F){l1G(F); F.PR=g.mz(function(){MY(F,"getNowPlaying")},2E4)},l1G=function(F){g.lP(F.PR); F.PR=NaN},qxY=function(F){gK("Channel opened"); F.mp&&(F.mp=!1,TXV(F),F.t4=g.mz(function(){gK("Timing out waiting for a screen.");F.Rk(1)},15E3))},sjA=function(F,k){var z=null; if(k){var x=uU$(F);x&&(z={clientName:x.clientName,deviceMake:x.brand,deviceModel:x.model,osVersion:x.osVersion})}g.dI("yt.mdx.remote.remoteClient_",z);k&&(mHH(F),TXV(F));z=F.L.wz()&&isNaN(F.S);k==z?k&&(Yw(F,1),MY(F,"getSubtitlesTrack")):k?(F.uI()&&F.Y.reset(),Yw(F,1),MY(F,"getNowPlaying"),h$A(F)):F.Rk(1)},rPY=function(F,k){var z=k.params.videoId; delete k.params.videoId;z==F.Y.videoId&&(g.SI(k.params)?F.Y.trackData=null:F.Y.trackData=k.params,F.publish("remotePlayerChange"))},BXC=function(F,k,z){var x=k.params.videoId||k.params.video_id,D=parseInt(k.params.currentIndex,10); F.Y.listId=k.params.listId||F.Y.listId;IZ(F.Y,x,D);F.publish("remoteQueueChange",z)},UHV=function(F,k){k.params=k.params||{}; BXC(F,k,"NOW_PLAYING_MAY_CHANGE");GbD(F,k);F.publish("autoplayDismissed")},GbD=function(F,k){var z=parseInt(k.params.currentTime||k.params.current_time,10); On(F.Y,isNaN(z)?0:z);z=parseInt(k.params.state,10);z=isNaN(z)?-1:z;z==-1&&F.Y.playerState==-1E3&&(z=-1E3);F.Y.playerState=z;z=Number(k.params.loadedTime);F.Y.B=isNaN(z)?0:z;F.Y.zc(Number(k.params.duration));z=F.Y;var x=Number(k.params.liveIngestionTime);z.U=x;z.L=isNaN(x)?!1:!0;z=F.Y;x=Number(k.params.seekableStartTime);k=Number(k.params.seekableEndTime);z.j=isNaN(x)?0:x;z.Y=isNaN(k)?0:k;F.Y.playerState==1?Qjl(F):l1G(F);F.publish("remotePlayerChange")},tF7=function(F,k){if(F.Y.playerState!=-1E3){var z= 1085; switch(parseInt(k.params.adState,10)){case 1:z=1081;break;case 2:z=1084;break;case 0:z=1083}F.Y.playerState=z;k=parseInt(k.params.currentTime,10);On(F.Y,isNaN(k)?0:k);F.publish("remotePlayerChange")}},ZFC=function(F,k){var z=k.params.muted=="true"; F.Y.volume=parseInt(k.params.volume,10);F.Y.muted=z;F.publish("remotePlayerChange")},v3D=function(F,k){F.G=k.params.videoId; F.publish("nowAutoplaying",parseInt(k.params.timeout,10))},cPt=function(F,k){F.G=k.params.videoId||null; F.publish("autoplayUpNext",F.G)},PeV=function(F,k){F.W=k.params.autoplayMode; F.publish("autoplayModeChange",F.W);F.W=="DISABLED"&&F.publish("autoplayDismissed")},OFp=function(F,k){var z=k.params.hasNext=="true"; F.Y.HZ=k.params.hasPrevious=="true";F.Y.D4=z;F.publish("previousNextChange")},NXY=function(F,k){k=k.message; k.params?gK("Received: action="+k.action+", params="+g.J1(k.params)):gK("Received: action="+k.action+" {}");switch(k.action){case "loungeStatus":k=o$(k.params.devices);F.U=g.tW(k,function(x){return new $u(x)}); k=!!g.M$(F.U,function(x){return x.type=="LOUNGE_SCREEN"}); sjA(F,k);k=F.CO("mlm");F.publish("multiStateLoopEnabled",k);break;case "loungeScreenDisconnected":g.kr(F.U,function(x){return x.type=="LOUNGE_SCREEN"}); sjA(F,!1);break;case "remoteConnected":var z=new $u(o$(k.params.device));g.M$(F.U,function(x){return x.VZ(z)})||P17(F.U,z); break;case "remoteDisconnected":z=new $u(o$(k.params.device));g.kr(F.U,function(x){return x.VZ(z)}); break;case "gracefulDisconnect":break;case "playlistModified":BXC(F,k,"QUEUE_MODIFIED");break;case "nowPlaying":UHV(F,k);break;case "onStateChange":GbD(F,k);break;case "onAdStateChange":tF7(F,k);break;case "onVolumeChanged":ZFC(F,k);break;case "onSubtitlesTrackChanged":rPY(F,k);break;case "nowAutoplaying":v3D(F,k);break;case "autoplayDismissed":F.publish("autoplayDismissed");break;case "autoplayUpNext":cPt(F,k);break;case "onAutoplayModeChanged":PeV(F,k);break;case "onHasPreviousNextChanged":OFp(F, k);break;case "requestAssistedSignIn":F.publish("assistedSignInRequested",k.params.authCode);break;case "onLoopModeChanged":F.publish("loopModeChange",k.params.loopMode);break;default:gK("Unrecognized action: "+k.action)}},h$A=function(F){g.lP(F.K); F.K=g.mz(function(){F.Rk(1)},864E5)},MY=function(F,k,z){z?gK("Sending: action="+k+", params="+g.J1(z)):gK("Sending: action="+k); F.L.sendMessage(k,z)},VFA=function(F){$w.call(this,"ScreenServiceProxy"); this.lG=F;this.Y=[];this.Y.push(this.lG.$_s("screenChange",(0,g.W6)(this.B0,this)));this.Y.push(this.lG.$_s("onlineScreenChange",(0,g.W6)(this.QbK,this)))},bFn=function(F,k){ICY(); if(!q0||!q0.get("yt-remote-disable-remote-module-for-dev")){k=g.LX("MDX_CONFIG")||k;GEG();vTl();L5||(L5=new WT(k?k.loungeApiHost:void 0),Hgl()&&(L5.Y="/api/loungedev"));f5||(f5=g.yR("yt.mdx.remote.deferredProxies_")||[],g.dI("yt.mdx.remote.deferredProxies_",f5));I1D();var z=K5();if(!z){var x=new p5(L5,k?k.disableAutomaticScreenCache||!1:!1);g.dI("yt.mdx.remote.screenService_",x);z=K5();var D={};k&&(D={appId:k.appId,disableDial:k.disableDial,theme:k.theme,loadCastApiSetupScript:k.loadCastApiSetupScript, disableCastApi:k.disableCastApi,enableDialLoungeToken:k.enableDialLoungeToken,enableCastLoungeToken:k.enableCastLoungeToken,forceMirroring:k.forceMirroring});g.dI("yt.mdx.remote.enableConnectWithInitialState_",k?k.enableConnectWithInitialState||!1:!1);kbC(F,x,function(e){e?Wo()&&vo(Wo(),"YouTube TV"):x.subscribe("onlineScreenChange",function(){N0("yt-remote-receiver-availability-change")})},D)}k&&!g.yR("yt.mdx.remote.initialized_")&&(g.dI("yt.mdx.remote.initialized_",!0),F2("Initializing: "+g.J1(k)), kU.push(g.Ex("yt-remote-cast2-api-ready",function(){N0("yt-remote-api-ready")})),kU.push(g.Ex("yt-remote-cast2-availability-change",function(){N0("yt-remote-receiver-availability-change")})),kU.push(g.Ex("yt-remote-cast2-receiver-selected",function(){o1(null); N0("yt-remote-auto-connect","cast-selector-receiver")})),kU.push(g.Ex("yt-remote-cast2-receiver-resumed",function(){N0("yt-remote-receiver-resumed","cast-selector-receiver")})),kU.push(g.Ex("yt-remote-cast2-session-change",HFl)),kU.push(g.Ex("yt-remote-connection-change",function(e){e?vo(Wo(),"YouTube TV"):z2()||(vo(null,null),iFC())})),kU.push(g.Ex("yt-remote-cast2-session-failed",function(){N0("yt-remote-connection-failed")})),F=a1C(),k.isAuto&&(F.id+="#dial"),D=k.capabilities||[],g.sY("desktop_enable_autoplay")&& D.push("atp"),D.length>0&&(F.capabilities=D),F.name=k.device,F.app=k.app,(k=k.theme)&&(F.theme=k),F2(" -- with channel params: "+g.J1(F)),F?(g.SZ("yt-remote-session-app",F.app),g.SZ("yt-remote-session-name",F.name)):(g.da("yt-remote-session-app"),g.da("yt-remote-session-name")),g.dI("yt.mdx.remote.channelParams_",F),z.start(),Wo()||Sx$())}},dHn=function(){var F=K5().lG.$_gos(); var k=xU();k&&ii()&&(BzD(F,k)||F.push(k));return rB9(F)},yPn=function(){var F=JPV(); !F&&t3()&&xHV()&&(F={key:"cast-selector-receiver",name:xHV()});return F},JPV=function(){var F=dHn(),k=xU(); k||(k=z2());return g.M$(F,function(z){return k&&e$(k,z.key)?!0:!1})},xU=function(){var F=Wo(); if(!F)return null;var k=K5().pF();return Af(k,F)},HFl=function(F){F2("remote.onCastSessionChange_: "+CH(F)); if(F){var k=xU();if(k&&k.id==F.id){if(vo(k.id,"YouTube TV"),F.idType=="shortLived"&&(F=F.token))Df&&(Df.token=F),(k=ii())&&k.Eo(F)}else k&&$U(),jW(F,1)}else ii()&&$U()},$U=function(){Zs()?Un().stopSession():GH("stopSession called before API ready."); var F=ii();F&&(F.disconnect(1),R$p(null))},g3C=function(){var F=ii(); return!!F&&F.getProxyState()!=3},F2=function(F){oZ("remote",F)},K5=function(){if(!Yx9){var F=g.yR("yt.mdx.remote.screenService_"); Yx9=F?new VFA(F):null}return Yx9},Wo=function(){return g.yR("yt.mdx.remote.currentScreenId_")},n3G=function(F){g.dI("yt.mdx.remote.currentScreenId_",F)},MF7=function(){return g.yR("yt.mdx.remote.connectData_")},o1=function(F){g.dI("yt.mdx.remote.connectData_",F)},ii=function(){return g.yR("yt.mdx.remote.connection_")},R$p=function(F){var k=ii(); o1(null);F||n3G("");g.dI("yt.mdx.remote.connection_",F);f5&&(g.XN(f5,function(z){z(F)}),f5.length=0); k&&!F?N0("yt-remote-connection-change",!1):!k&&F&&N0("yt-remote-connection-change",!0)},z2=function(){var F=g.Jx(); if(!F)return null;var k=K5();if(!k)return null;k=k.pF();return Af(k,F)},jW=function(F,k){Wo(); xU()&&xU();if(eW)Df=F;else{n3G(F.id);var z=g.yR("yt.mdx.remote.enableConnectWithInitialState_")||!1;F=new n5(L5,F,a1C(),z);F.connect(k,MF7());F.subscribe("beforeDisconnect",function(x){N0("yt-remote-before-disconnect",x)}); F.subscribe("beforeDispose",function(){ii()&&(ii(),R$p(null))}); F.subscribe("browserChannelAuthError",function(){var x=xU();x&&x.idType=="shortLived"&&(Zs()?Un().handleBrowserChannelAuthError():GH("refreshLoungeToken called before API ready."))}); R$p(F)}},Sx$=function(){var F=z2(); F?(F2("Resume connection to: "+CH(F)),jW(F,0)):(X3(),iFC(),F2("Skipping connecting because no session screen found."))},I1D=function(){var F=a1C(); if(g.SI(F)){F=Es();var k=g.bn("yt-remote-session-name")||"",z=g.bn("yt-remote-session-app")||"";F={device:"REMOTE_CONTROL",id:F,name:k,app:z,mdxVersion:3};F.authuser=String(g.LX("SESSION_INDEX","0"));(k=g.LX("DELEGATED_SESSION_ID"))&&(F.pageId=String(k));g.dI("yt.mdx.remote.channelParams_",F)}},a1C=function(){return g.yR("yt.mdx.remote.channelParams_")||{}},KfV=function(F,k,z){g.S.call(this); var x=this;this.module=F;this.T=k;this.TD=z;this.events=new g.yQ(this);this.j=!1;this.W=new g.CR(64);this.Y=new g.KS(this.Ny,500,this);this.L=new g.KS(this.wG,1E3,this);this.G=new mw(this.yGU,0,this);this.U={};this.B=new g.KS(this.Rs,1E3,this);this.S=new g.oR(this.seekTo,1E3,this);this.K=this.events.N(this.T,"onVolumeChange",function(D){Lf7(x,D)}); g.b(this,this.events);this.events.N(k,"onCaptionsTrackListChanged",this.pek);this.events.N(k,"captionschanged",this.iJU);this.events.N(k,"captionssettingschanged",this.D6);this.events.N(k,"videoplayerreset",this.qp);this.events.N(k,"mdxautoplaycancel",function(){x.TD.rT()}); k.V("enable_mdx_video_play_directly")&&this.events.N(k,"videodatachange",function(){f1A(x.module)||CI(x)||A2(x,0)}); F=this.TD;F.z4();F.subscribe("proxyStateChange",this.uZ,this);F.subscribe("remotePlayerChange",this.NF,this);F.subscribe("remoteQueueChange",this.qp,this);F.subscribe("previousNextChange",this.A_,this);F.subscribe("nowAutoplaying",this.Vi,this);F.subscribe("autoplayDismissed",this.t_,this);g.b(this,this.Y);g.b(this,this.L);g.b(this,this.G);g.b(this,this.B);g.b(this,this.S);this.D6();this.qp();this.NF()},Lf7=function(F,k){if(CI(F)){F.TD.unsubscribe("remotePlayerChange",F.NF,F); var z=Math.round(k.volume);k=!!k.muted;var x=SE(F.TD);if(z!==x.volume||k!==x.muted)F.TD.setVolume(z,k),F.B.start();F.TD.subscribe("remotePlayerChange",F.NF,F)}},WfA=function(F){F.xj(0); F.Y.stop();F.FI(new g.CR(64))},F5D=function(F,k){if(CI(F)&&!F.j){var z=null; k&&(z={style:F.T.getSubtitlesUserSettings()},Object.assign(z,k));F.TD.GL(F.T.getVideoData(1).videoId,z);F.U=SE(F.TD).trackData}},A2=function(F,k){var z=F.T.getPlaylist(); if(z==null?0:z.listId){var x=z.index;var D=z.listId.toString()}z=F.T.getVideoData(1);F.TD.playVideo(z.videoId,k,x,D,z.playerParams,z.Xf,cUt(z));F.FI(new g.CR(1))},kGY=function(F,k){if(k){var z=F.T.getOption("captions","tracklist",{I7:1}); z&&z.length?(F.T.setOption("captions","track",k),F.j=!1):(F.T.loadModule("captions"),F.j=!0)}else F.T.setOption("captions","track",{})},CI=function(F){return SE(F.TD).videoId===F.T.getVideoData(1).videoId},oZY=function(F){this.Y=F},pI=function(){g.Y.call(this,{X:"div", J:"ytp-mdx-popup-dialog",D:{role:"dialog"},Z:[{X:"div",J:"ytp-mdx-popup-dialog-inner-content",Z:[{X:"div",J:"ytp-mdx-popup-title",jk:"Saliste de tu cuenta"},{X:"div",J:"ytp-mdx-popup-description",jk:"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."},{X:"div",J:"ytp-mdx-privacy-popup-buttons",Z:[{X:"button",WR:["ytp-button", "ytp-mdx-privacy-popup-cancel"],jk:"Cancelar"},{X:"button",WR:["ytp-button","ytp-mdx-privacy-popup-confirm"],jk:"Confirmar"}]}]}]});this.fade=new g.Cv(this,250);this.cancelButton=this.EK("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.EK("ytp-mdx-privacy-popup-confirm");g.b(this,this.fade);this.N(this.cancelButton,"click",this.Y);this.N(this.confirmButton,"click",this.L)},E6=function(F){g.Y.call(this,{X:"div", J:"ytp-remote",Z:[{X:"div",J:"ytp-remote-display-status",Z:[{X:"div",J:"ytp-remote-display-status-icon",Z:[g.A6R()]},{X:"div",J:"ytp-remote-display-status-text",jk:"{{statustext}}"}]}]});this.api=F;this.fade=new g.Cv(this,250);g.b(this,this.fade);this.N(F,"presentingplayerstatechange",this.onStateChange);this.pJ(F.getPlayerStateObject())},X2=function(F,k){g.Hq.call(this,"Reproducir en",1,F,k); this.T=F;this.mf={};this.N(F,"onMdxReceiversChange",this.j);this.N(F,"presentingplayerstatechange",this.j);this.j()},zoC=function(F){g.XP.call(this,F); this.d2={key:sS$(),name:"Esta computadora"};this.Ii=null;this.subscriptions=[];this.uE=this.TD=null;this.mf=[this.d2];this.De=this.d2;this.fv=new g.CR(64);this.Po=0;this.yL=-1;this.QC=!1;this.D_=this.U_=this.IQ=null;if(!g.IB(this.player.C())&&!g.g8(this.player.C())){F=this.player;var k=g.mJ(F);k&&(k=k.sS())&&(k=new X2(F,k),g.b(this,k));k=new E6(F);g.b(this,k);g.Hv(F,k.element,4);this.IQ=new pI;g.b(this,this.IQ);g.Hv(F,this.IQ.element,4);this.QC=!!z2()}},q1=function(F){F.U_&&(F.player.removeEventListener("presentingplayerstatechange", F.U_),F.U_=null)},xE$=function(F,k,z){F.fv=z; F.player.publish("presentingplayerstatechange",new g.lH(z,k))},N1=function(F,k){if(k.key!==F.De.key)if(k.key===F.d2.key)$U(); else if(f1A(F)&&idC(F),F.De=k,!F.player.C().V("disable_mdx_connection_in_mdx_module_for_music_web")||!g.g8(F.player.C())){var z=F.player.getPlaylistId();var x=F.player.getVideoData(1);var D=x.videoId;if(!z&&!D||(F.player.getAppState()===2||F.player.getAppState()===1)&&F.player.C().V("should_clear_video_data_on_player_cued_unstarted"))x=null;else{var e=F.player.getPlaylist();if(e){var C=[];for(var p=0;p2*this.size&&DK(this),!0):!1}; g.A.get=function(F,k){return xu(this.L,F)?this.L[F]:k}; g.A.set=function(F,k){xu(this.L,F)||(this.size+=1,this.Y.push(F),this.ZL++);this.L[F]=k}; g.A.forEach=function(F,k){for(var z=this.mD(),x=0;x=x.Y.length)return g.$L;var e=x.Y[k++];return g.jr(F?e:x.L[e])}; return D}; var Fz9={R1R:"atp",iga:"ska",JRQ:"que",BnG:"mus",FD4:"sus",Tp4:"dsp",DZU:"seq",GuR:"mic",VeK:"dpa",BIh:"cds",Nn4:"mlm",nZf:"dsdtr",DE$:"ntb",KDQ:"vsp",u1t:"scn",qt4:"rpe",zOK:"dcn",oZf:"dcp",mZ4:"pas",bk4:"drq",Ytt:"opf",BOt:"els",wNG:"isg",vF_:"svq",wzt:"mvp",Bit:"ads",RJU:"iat",cIh:"stcp",LDR:"sads",l_R:"dloc"},kED={sxt:"u",K3k:"cl",hLR:"k",qn4:"i",mX4:"cr",u9k:"m",LrQ:"g",cX:"up"},StV={UC:"adPlaying",Qv:"onAdStateChange"},bM9={Kl4:"nowPlaying",QjR:"onStateChange",UC:"adPlaying",Qv:"onAdStateChange"}, dAY={rKt:"nowPlayingShorts",UZU:"onShortsStateChange"};$u.prototype.VZ=function(F){return F?this.id==F.id:!1}; var ZgV="",q0=null;aCn.prototype.flush=function(F,k){F=F===void 0?[]:F;k=k===void 0?!1:k;if(g.sY("enable_client_streamz_web")){F=g.l(F);for(var z=F.next();!z.done;z=F.next())z=g.p9D(z.value),z={serializedIncrementBatch:g.mv(z.L())},g.NA("streamzIncremented",z,{sendIsolatedPayload:k})}}; var ub,YY9=bg$("loadCastFramework")||bg$("loadCastApplicationFramework"),Lz$=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.xG(mw,g.S);g.A=mw.prototype;g.A.E1=function(F){this.j=arguments;this.Y=!1;this.Be?this.U=g.op()+this.UF:this.Be=g.aU(this.W,this.UF)}; g.A.stop=function(){this.Be&&(g.bD.clearTimeout(this.Be),this.Be=null);this.U=null;this.Y=!1;this.j=[]}; g.A.pause=function(){++this.L}; g.A.resume=function(){this.L&&(--this.L,!this.L&&this.Y&&(this.Y=!1,this.S.apply(null,this.j)))}; g.A.h4=function(){this.stop();mw.XA.h4.call(this)}; g.A.mI=function(){this.Be&&(g.bD.clearTimeout(this.Be),this.Be=null);this.U?(this.Be=g.aU(this.W,this.U-g.op()),this.U=null):this.L?this.Y=!0:(this.Y=!1,this.S.apply(null,this.j))};T3.prototype.stringify=function(F){return g.bD.JSON.stringify(F,void 0)}; T3.prototype.parse=function(F){return g.bD.JSON.parse(F,void 0)};g.xG(Kzp,g.gd);g.xG(Wzt,g.gd);var F9C=null;g.xG(on9,g.gd);g.xG(zpD,g.gd);g.xG(x59,g.gd);rq.prototype.debug=function(){}; rq.prototype.info=function(){}; rq.prototype.warning=function(){};var pWV={},AxC={};g.A=BT.prototype;g.A.setTimeout=function(F){this.kG=F}; g.A.Te=function(F){F=F.target;var k=this.RU;k&&g.C7(F)==3?k.vu():this.Pa(F)}; g.A.Pa=function(F){try{if(F==this.Y)a:{var k=g.C7(this.Y),z=this.Y.L,x=this.Y.getStatus();if(!(k<3)&&(k!=3||this.Y&&(this.L.L||g.p7(this.Y)||g.E2(this.Y)))){this.yh||k!=4||z==7||(z==8||x<=0?lb(3):lb(2));qNl(this);var D=this.Y.getStatus();this.UH=D;var e=Cn$(this);if(this.S=D==200){if(this.mY&&!this.J4){b:{if(this.Y){var C=g.Xb(this.Y,"X-HTTP-Initial-Response");if(C&&!g.hD(C)){var p=C;break b}}p=null}if(F=p)this.J4=!0,sx9(this,F);else{this.S=!1;this.W=3;Qb(12);Us(this);tf(this);break a}}if(this.Xf){F= !0;for(var E;!this.yh&&this.G0&&!this.Xm&&(this.Xm=!0,this.U.ZN(this)):(Us(this),tf(this))}else sx9(this,e);k==4&&Us(this);this.S&&!this.yh&&(k==4?Nat(this.U,this):(this.S=!1,G3(this)))}else g.ZxR(this.Y),D==400&&e.indexOf("Unknown SID")> 0?(this.W=3,Qb(12)):(this.W=0,Qb(13)),Us(this),tf(this)}}}catch(X){}finally{}}; g.A.cancel=function(){this.yh=!0;Us(this)}; g.A.XM=function(){this.Qh=null;var F=Date.now();F-this.vR>=0?(this.l$!=2&&(lb(3),Qb(17)),Us(this),this.W=2,tf(this)):XWn(this,this.vR-F)}; g.A.getLastError=function(){return this.W}; g.A.PK=function(){return this.Y};Ba$.prototype.cancel=function(){this.U=U5l(this);if(this.L)this.L.cancel(),this.L=null;else if(this.Y&&this.Y.size!==0){for(var F=g.l(this.Y.values()),k=F.next();!k.done;k=F.next())k.value.cancel();this.Y.clear()}};g.A=PnH.prototype;g.A.a$=8;g.A.Pl=1;g.A.connect=function(F,k,z,x){Qb(0);this.RS=F;this.yh=k||{};z&&x!==void 0&&(this.yh.OSID=z,this.yh.OAID=x);this.J4=this.uL;this.cR=luH(this,null,this.RS);PT(this)}; g.A.disconnect=function(){VZD(this);if(this.Pl==3){var F=this.u$++,k=this.cR.clone();g.cD(k,"SID",this.j);g.cD(k,"RID",F);g.cD(k,"TYPE","terminate");I$(this,k);F=new BT(this,this.j,F);F.l$=2;F.B=F3(k.clone());k=!1;if(g.bD.navigator&&g.bD.navigator.sendBeacon)try{k=g.bD.navigator.sendBeacon(F.B.toString(),"")}catch(z){}!k&&g.bD.Image&&((new Image).src=F.B,k=!0);k||(F.Y=jxA(F.U,null),F.Y.send(F.B));F.t4=Date.now();G3(F)}d5$(this)}; g.A.j5=function(){return this.Pl==0}; g.A.getState=function(){return this.Pl}; g.A.hs=function(F){if(this.S)if(this.S=null,this.Pl==1){if(!F){this.u$=Math.floor(Math.random()*1E5);F=this.u$++;var k=new BT(this,"",F),z=this.K;this.UH&&(z?(z=g.Jg(z),g.RM(z,this.UH)):z=this.UH);this.G!==null||this.vR||(k.cR=z,z=null);var x;if(this.dH)a:{for(var D=x=0;D4096){x=D;break a}if(x===4096||D===this.U.length-1){x=D+1;break a}}x= 1E3}else x=1E3;x=auC(this,k,x);D=this.cR.clone();g.cD(D,"RID",F);g.cD(D,"CVER",22);this.Xf&&g.cD(D,"X-HTTP-Session-Id",this.Xf);I$(this,D);z&&(this.vR?x="headers="+g.D8(g.RRI(z))+"&"+x:this.G&&g.I4(D,this.G,z));Ta7(this.L,k);this.Om&&g.cD(D,"TYPE","init");this.dH?(g.cD(D,"$req",x),g.cD(D,"SID","null"),k.mY=!0,$59(k,D,null)):$59(k,D,x);this.Pl=2}}else this.Pl==3&&(F?SN7(this,F):this.U.length==0||G_9(this.L)||SN7(this))}; g.A.jX=function(){this.B=null;bun(this);if(this.MD&&!(this.kG||this.Y==null||this.We<=0)){var F=2*this.We;this.mp=hf((0,g.W6)(this.trU,this),F)}}; g.A.trU=function(){this.mp&&(this.mp=null,this.J4=!1,this.kG=!0,Qb(10),vT(this),bun(this))}; g.A.ZN=function(F){this.Y==F&&this.MD&&!this.kG&&(Ou9(this),this.kG=!0,Qb(11))}; g.A.S2=function(){this.Qh!=null&&(this.Qh=null,vT(this),wWn(this),Qb(19))}; g.A.d4f=function(F){F?Qb(2):Qb(1)}; g.A.isActive=function(){return!!this.W&&this.W.isActive(this)}; g.A=yxY.prototype;g.A.mR=function(){}; g.A.E8=function(){}; g.A.i5=function(){}; g.A.FL=function(){}; g.A.isActive=function(){return!0}; g.A.e2=function(){};g.xG(a$,g.A1);a$.prototype.open=function(){this.Y.W=this.U;this.S&&(this.Y.l$=!0);this.Y.connect(this.W,this.L||void 0)}; a$.prototype.close=function(){this.Y.disconnect()}; a$.prototype.send=function(F){var k=this.Y;if(typeof F==="string"){var z={};z.__data__=F;F=z}else this.j&&(z={},z.__data__=g.J1(F),F=z);k.U.push(new rxG(k.H8++,F));k.Pl==3&&PT(k)}; a$.prototype.h4=function(){this.Y.W=null;delete this.U;this.Y.disconnect();delete this.Y;a$.XA.h4.call(this)}; g.xG(gnl,Kzp);g.xG(YNl,Wzt);g.xG(HT,yxY);HT.prototype.mR=function(){this.Y.dispatchEvent("m")}; HT.prototype.E8=function(F){this.Y.dispatchEvent(new gnl(F))}; HT.prototype.i5=function(F){this.Y.dispatchEvent(new YNl(F))}; HT.prototype.FL=function(){this.Y.dispatchEvent("n")};var bb=new g.A1;g.T(L97,g.gd);g.A=Jf.prototype;g.A.Pi=null;g.A.I5=!1;g.A.Mn=null;g.A.Lm=null;g.A.dB=null;g.A.kt=null;g.A.DS=null;g.A.C8=null;g.A.jI=null;g.A.gI=null;g.A.DB=0;g.A.tN=null;g.A.ZB=null;g.A.aq=null;g.A.KI=-1;g.A.Ft=!0;g.A.Oa=!1;g.A.Y$=0;g.A.p8=null;var oK$={},kXl={};g.A=Jf.prototype;g.A.setTimeout=function(F){this.L=F}; g.A.gS=function(F){F=F.target;var k=this.p8;k&&g.C7(F)==3?k.vu():this.XL(F)}; g.A.XL=function(F){try{if(F==this.gI)a:{var k=g.C7(this.gI),z=this.gI.L,x=this.gI.getStatus();if(g.DA&&!g.wN("420+")){if(k<4)break a}else if(k<3||k==3&&!g.p7(this.gI))break a;this.Oa||k!=4||z==7||(z==8||x<=0?this.Y.M6(3):this.Y.M6(2));iM7(this);var D=this.gI.getStatus();this.KI=D;var e=g.p7(this.gI);if(this.I5=D==200){k==4&&yb(this);if(this.Xf){for(F=!0;!this.Oa&&this.DB0?(this.aq=3,dq(13)):(this.aq=0,dq(14)),yb(this),DAH(this)}}catch(p){}finally{}}; g.A.cancel=function(){this.Oa=!0;yb(this)}; g.A.W0=function(){this.Mn=null;var F=Date.now();F-this.Lm>=0?(this.kt!=2&&this.Y.M6(3),yb(this),this.aq=2,dq(18),DAH(this)):xAD(this,this.Lm-F)}; g.A.getLastError=function(){return this.aq};g.A=CM7.prototype;g.A.Qy=null;g.A.cO=null;g.A.EM=!1;g.A.jG=null;g.A.cz=null;g.A.Ky=-1;g.A.sD=null;g.A.iH=null;g.A.connect=function(F){this.jG=F;F=gq(this.Y,null,this.jG);dq(3);Date.now();var k=this.Y.K;k!=null?(this.sD=k[0],(this.iH=k[1])?(this.cz=1,A6n(this)):(this.cz=2,pAC(this))):(ku(F,"MODE","init"),this.cO=new Jf(this),this.cO.Pi=this.Qy,W9l(this.cO,F,!1,null,!0),this.cz=0)}; g.A.rL=function(F){if(F)this.cz=2,pAC(this);else{dq(4);var k=this.Y;k.ji=k.kK.Ky;LH(k,9)}F&&this.M6(2)}; g.A.UO=function(F){return this.Y.UO(F)}; g.A.abort=function(){this.cO&&(this.cO.cancel(),this.cO=null);this.Ky=-1}; g.A.j5=function(){return!1}; g.A.TL=function(F,k){this.Ky=F.KI;if(this.cz==0)if(k){try{var z=this.L.parse(k)}catch(x){F=this.Y;F.ji=this.Ky;LH(F,2);return}this.sD=z[0];this.iH=z[1]}else F=this.Y,F.ji=this.Ky,LH(F,2);else this.cz==2&&(this.EM?(dq(7),Date.now()):k=="11111"?(dq(6),this.EM=!0,Date.now(),this.Ky=200,this.cO.cancel(),dq(12),Yu(this.Y,this,!0)):(dq(8),Date.now(),this.EM=!1))}; g.A.Pw=function(){this.Ky=this.cO.KI;if(this.cO.I5)this.cz==0?this.iH?(this.cz=1,A6n(this)):(this.cz=2,pAC(this)):this.cz==2&&(this.EM?(dq(12),Yu(this.Y,this,!0)):(dq(11),Yu(this.Y,this,!1)));else{this.cz==0?dq(9):this.cz==2&&dq(10);var F=this.Y;this.cO.getLastError();F.ji=this.Ky;LH(F,2)}}; g.A.YV=function(){return this.Y.YV()}; g.A.isActive=function(){return this.Y.isActive()}; g.A.M6=function(F){this.Y.M6(F)};g.A=EKp.prototype;g.A.ya=null;g.A.Lf=null;g.A.R6=null;g.A.mB=null;g.A.FO=null;g.A.OD=null;g.A.SX=null;g.A.hn=null;g.A.UW=0;g.A.ze=0;g.A.ao=null;g.A.Gl=null;g.A.vC=null;g.A.Fq=null;g.A.kK=null;g.A.IG=null;g.A.Zw=-1;g.A.eX=-1;g.A.ji=-1;g.A.kQ=0;g.A.C1=0;g.A.hA=8;g.xG(qtt,g.gd);g.xG(N3p,g.gd);g.A=EKp.prototype;g.A.connect=function(F,k,z,x,D){dq(0);this.FO=k;this.Lf=z||{};x&&D!==void 0&&(this.Lf.OSID=x,this.Lf.OAID=D);this.B?(S$((0,g.W6)(this.G6,this,F),100),wA$(this)):this.G6(F)}; g.A.disconnect=function(){mAA(this);if(this.Y==3){var F=this.UW++,k=this.OD.clone();g.cD(k,"SID",this.j);g.cD(k,"RID",F);g.cD(k,"TYPE","terminate");M0(this,k);F=new Jf(this,this.j,F);F.kt=2;F.DS=F3(k.clone());(new Image).src=F.DS.toString();F.dB=Date.now();Fgt(F)}tB9(this)}; g.A.G6=function(F){this.kK=new CM7(this);this.kK.Qy=this.ya;this.kK.L=this.W;this.kK.connect(F)}; g.A.j5=function(){return this.Y==0}; g.A.getState=function(){return this.Y}; g.A.gZ=function(F){this.Gl=null;sw$(this,F)}; g.A.Wa=function(){this.vC=null;this.mB=new Jf(this,this.j,"rpc",this.G);this.mB.Pi=this.ya;this.mB.Y$=0;var F=this.SX.clone();g.cD(F,"RID","rpc");g.cD(F,"SID",this.j);g.cD(F,"CI",this.IG?"0":"1");g.cD(F,"AID",this.Zw);M0(this,F);g.cD(F,"TYPE","xmlhttp");W9l(this.mB,F,!0,this.hn,!1)}; g.A.TL=function(F,k){if(this.Y!=0&&(this.mB==F||this.R6==F))if(this.ji=F.KI,this.R6==F&&this.Y==3)if(this.hA>7){try{var z=this.W.parse(k)}catch(x){z=null}if(Array.isArray(z)&&z.length==3)if(F=z,F[0]==0)a:{if(!this.vC){if(this.mB)if(this.mB.dB+3E30)){if(x=k==1)this.R6||this.Gl||this.Y==1||this.kQ>=2?x=!1:(this.Gl=S$((0,g.W6)(this.gZ,this,F),B37(this,this.kQ)),this.kQ++, x=!0);x=!(x||k==2&&GXC(this))}if(x)switch(z){case 1:LH(this,5);break;case 4:LH(this,10);break;case 3:LH(this,6);break;case 7:LH(this,12);break;default:LH(this,2)}}}; g.A.yj=function(F){if(!g.fC(arguments,this.Y))throw Error("Unexpected channel state: "+this.Y);}; g.A.vAh=function(F){F?dq(2):(dq(1),UAY(this,8))}; g.A.UO=function(F){if(F)throw Error("Can't create secondary domain capable XhrIo object.");F=new g.$y;F.G=!1;return F}; g.A.isActive=function(){return!!this.ao&&this.ao.isActive(this)}; g.A.M6=function(F){var k=bb;k.dispatchEvent(new N3p(k,F))}; g.A.YV=function(){return!1}; g.A=ZMn.prototype;g.A.o$=function(){}; g.A.zL=function(){}; g.A.l5=function(){}; g.A.yU=function(){}; g.A.EO=function(){}; g.A.b5=function(){return{}}; g.A.isActive=function(){return!0};g.A=vKt.prototype;g.A.enqueue=function(F){this.L.push(F)}; g.A.isEmpty=function(){return this.Y.length===0&&this.L.length===0}; g.A.clear=function(){this.Y=[];this.L=[]}; g.A.contains=function(F){return g.fC(this.Y,F)||g.fC(this.L,F)}; g.A.remove=function(F){var k=this.Y;var z=(0,g.U9A)(k,F);z>=0?(g.Wl(k,z),k=!0):k=!1;return k||g.FN(this.L,F)}; g.A.OS=function(){for(var F=[],k=this.Y.length-1;k>=0;--k)F.push(this.Y[k]);k=this.L.length;for(var z=0;z=DE7.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(F=DE7[this.L],this.Be=g.mz((0,g.W6)(this.nK,this),F),this.L++):this.publish("pairingFailed",Error("Server error "+F.status))}; g.A.Ge=function(){this.Y=null;this.publish("pairingFailed",Error("Server not responding"))}; var DE7=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.xG(eE,$w);g.A=eE.prototype;g.A.start=function(){jE(this)&&this.publish("screenChange");!g.bn("yt-remote-lounge-token-expiration")&&pyC(this);g.lP(this.Y);this.Y=g.mz((0,g.W6)(this.start,this),1E4)}; g.A.add=function(F,k){jE(this);j9p(this,F);C5(this,!1);this.publish("screenChange");k(F);F.token||pyC(this)}; g.A.remove=function(F,k){var z=jE(this);CaC(this,F)&&(C5(this,!1),z=!0);k(F);z&&this.publish("screenChange")}; g.A.xD=function(F,k,z,x){var D=jE(this),e=this.get(F.id);e?(e.name!=k&&(e.name=k,C5(this,!1),D=!0),z(F)):x(Error("no such local screen."));D&&this.publish("screenChange")}; g.A.h4=function(){g.lP(this.Y);eE.XA.h4.call(this)}; g.A.Tt4=function(F){jE(this);var k=this.screens.length;F=F&&F.screens||[];for(var z=F.length,x=0;x20)break a;p=k(e,C)}e=p}D.name=e}z(En(this,D))},this), onError:(0,g.W6)(function(D){x(Error("pairing request failed: "+D.status))},this), onTimeout:(0,g.W6)(function(){x(Error("pairing request timed out."))},this)})}; g.A.h4=function(){g.CC(this.L);g.CC(this.Y);p5.XA.h4.call(this)}; g.A.bap=function(){s9p(this);this.publish("screenChange");this.Y.update()}; p5.prototype.dispose=p5.prototype.dispose;g.xG(XV,g.uG);g.A=XV.prototype;g.A.Z$=function(F){this.z4()||(F&&(NY(this,""+F),this.publish("sessionFailed")),this.Y=null,this.publish("sessionScreen",null))}; g.A.info=function(F){oZ(this.Xf,F)}; g.A.VU=function(){return null}; g.A.nT=function(F){var k=this.L;F?(k.displayStatus=new chrome.cast.ReceiverDisplayStatus(F,[]),k.displayStatus.showStop=!0):k.displayStatus=null;chrome.cast.setReceiverDisplayStatus(k,(0,g.W6)(function(){this.info("Updated receiver status for "+k.friendlyName+": "+F)},this),(0,g.W6)(function(){NY(this,"Failed to update receiver status for: "+k.friendlyName)},this))}; g.A.h4=function(){this.nT("");XV.XA.h4.call(this)};g.T(uu,XV);g.A=uu.prototype;g.A.lQ=function(F){if(this.U){if(this.U==F)return;NY(this,"Overriding cast session with new session object");IZt(this);this.t4=!1;this.K="unknown";this.U.removeUpdateListener(this.PR);this.U.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.mp)}this.U=F;this.U.addUpdateListener(this.PR);this.U.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.mp);v47(this,"getMdxSessionStatus")}; g.A.MM=function(F){this.info("launchWithParams no-op for Cast: "+g.J1(F))}; g.A.stop=function(){this.U?this.U.stop((0,g.W6)(function(){this.Z$()},this),(0,g.W6)(function(){this.Z$(Error("Failed to stop receiver app."))},this)):this.Z$(Error("Stopping cast device without session."))}; g.A.nT=function(){}; g.A.h4=function(){this.info("disposeInternal");IZt(this);this.U&&(this.U.removeUpdateListener(this.PR),this.U.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.mp));this.U=null;XV.prototype.h4.call(this)}; g.A.sI_=function(F,k){if(!this.z4())if(k)if(k=o$(k),g.M9(k))switch(F=""+k.type,k=k.data||{},this.info("onYoutubeMessage_: "+F+" "+g.J1(k)),F){case "mdxSessionStatus":UK7(this,k);break;case "loungeToken":cyl(this,k);break;default:NY(this,"Unknown youtube message: "+F)}else NY(this,"Unable to parse message.");else NY(this,"No data in message.")}; g.A.Z8=function(F,k,z,x){g.lP(this.B);this.B=0;lZD(this.j,this.L.label,F,this.L.friendlyName,(0,g.W6)(function(D){D?k(D):x>=0?(NY(this,"Screen "+F+" appears to be offline. "+x+" retries left."),this.B=g.mz((0,g.W6)(this.Z8,this,F,k,z,x-1),300)):z(Error("Unable to fetch screen."))},this),z)}; g.A.VU=function(){return this.U}; g.A.qH=function(F){this.z4()||F||(NY(this,"Cast session died."),this.Z$())};g.T(wK,XV);g.A=wK.prototype;g.A.lQ=function(F){this.U=F;this.U.addUpdateListener(this.yh)}; g.A.MM=function(F){this.cR=F;this.Qh()}; g.A.stop=function(){RLC(this);this.U?this.U.stop((0,g.W6)(this.Z$,this,null),(0,g.W6)(this.Z$,this,"Failed to stop DIAL device.")):this.Z$()}; g.A.h4=function(){RLC(this);this.U&&this.U.removeUpdateListener(this.yh);this.U=null;XV.prototype.h4.call(this)}; g.A.AD=function(F){this.z4()||F||(NY(this,"DIAL session died."),this.W(),this.W=function(){},this.Z$())};g.T(lu,XV);lu.prototype.stop=function(){this.Z$()}; lu.prototype.lQ=function(){}; lu.prototype.MM=function(){g.lP(this.U);this.U=NaN;var F=Af(this.j.pF(),this.L.label);F?qY(this,F):this.Z$(Error("No such screen"))}; lu.prototype.h4=function(){g.lP(this.U);this.U=NaN;XV.prototype.h4.call(this)};g.T(QW,g.uG);g.A=QW.prototype; g.A.init=function(F,k){chrome.cast.timeout.requestSession=3E4;var z=new chrome.cast.SessionRequest(this.B,[chrome.cast.Capability.AUDIO_OUT]);g.sY("desktop_enable_cast_connect")&&(z.androidReceiverCompatible=!0);this.K||(z.dialRequest=new chrome.cast.DialRequest("YouTube"));var x=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;F=F||this.S?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var D=(0,g.W6)(this.dka,this);z=new chrome.cast.ApiConfig(z,(0,g.W6)(this.Cr, this),D,x,F);z.customDialLaunchCallback=(0,g.W6)(this.lRU,this);chrome.cast.initialize(z,(0,g.W6)(function(){this.z4()||(chrome.cast.addReceiverActionListener(this.W),xKH(),this.L.subscribe("onlineScreenChange",(0,g.W6)(this.I$,this)),this.U=n4C(this),chrome.cast.setCustomReceivers(this.U,function(){},(0,g.W6)(function(e){this.b7("Failed to set initial custom receivers: "+g.J1(e))},this)),this.publish("yt-remote-cast2-availability-change",sn(this)),k(!0))},this),(0,g.W6)(function(e){this.b7("Failed to initialize API: "+ g.J1(e)); k(!1)},this))}; g.A.inK=function(F,k){h3("Setting connected screen ID: "+F+" -> "+k);if(this.Y){var z=this.Y.Y;if(!F||z&&z.id!=F)h3("Unsetting old screen status: "+this.Y.L.friendlyName),rK(this,null)}if(F&&k){if(!this.Y){F=Af(this.L.pF(),F);if(!F){h3("setConnectedScreenStatus: Unknown screen.");return}if(F.idType=="shortLived"){h3("setConnectedScreenStatus: Screen with id type to be short lived.");return}z=g4n(this,F);z||(h3("setConnectedScreenStatus: Connected receiver not custom..."),z=new chrome.cast.Receiver(F.uuid? F.uuid:F.id,F.name),z.receiverType=chrome.cast.ReceiverType.CUSTOM,this.U.push(z),chrome.cast.setCustomReceivers(this.U,function(){},(0,g.W6)(function(x){this.b7("Failed to set initial custom receivers: "+g.J1(x))},this))); h3("setConnectedScreenStatus: new active receiver: "+z.friendlyName);rK(this,new lu(this.L,z),!0)}this.Y.nT(k)}else h3("setConnectedScreenStatus: no screen.")}; g.A.T$4=function(F){this.z4()?this.b7("Setting connection data on disposed cast v2"):this.Y?this.Y.MM(F):this.b7("Setting connection data without a session")}; g.A.NH=function(){this.z4()?this.b7("Stopping session on disposed cast v2"):this.Y?(this.Y.stop(),rK(this,null)):h3("Stopping non-existing session")}; g.A.requestSession=function(){chrome.cast.requestSession((0,g.W6)(this.Cr,this),(0,g.W6)(this.gP$,this))}; g.A.h4=function(){this.L.unsubscribe("onlineScreenChange",(0,g.W6)(this.I$,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.W);var F=kIC,k=g.yR("yt.mdx.remote.debug.handlers_");g.FN(k||[],F);g.CC(this.Y);g.uG.prototype.h4.call(this)}; g.A.b7=function(F){oZ("Controller",F)}; g.A.ZC=function(F,k){this.Y==F&&(k||rK(this,null),this.publish("yt-remote-cast2-session-change",k))}; g.A.K_G=function(F,k){if(!this.z4())if(F)switch(F.friendlyName=chrome.cast.unescape(F.friendlyName),h3("onReceiverAction_ "+F.label+" / "+F.friendlyName+"-- "+k),k){case chrome.cast.ReceiverAction.CAST:if(this.Y)if(this.Y.L.label!=F.label)h3("onReceiverAction_: Stopping active receiver: "+this.Y.L.friendlyName),this.Y.stop();else{h3("onReceiverAction_: Casting to active receiver.");this.Y.Y&&this.publish("yt-remote-cast2-session-change",this.Y.Y);break}switch(F.receiverType){case chrome.cast.ReceiverType.CUSTOM:rK(this, new lu(this.L,F));break;case chrome.cast.ReceiverType.DIAL:rK(this,new wK(this.L,F,this.j,this.config_));break;case chrome.cast.ReceiverType.CAST:rK(this,new uu(this.L,F,this.config_));break;default:this.b7("Unknown receiver type: "+F.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.Y&&this.Y.L.label==F.label?this.Y.stop():this.b7("Stopping receiver w/o session: "+F.friendlyName)}else this.b7("onReceiverAction_ called without receiver.")}; g.A.lRU=function(F){if(this.z4())return Promise.reject(Error("disposed"));var k=F.receiver;k.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.b7("Not DIAL receiver: "+k.friendlyName),k.receiverType=chrome.cast.ReceiverType.DIAL);var z=this.Y?this.Y.L:null;if(!z||z.label!=k.label)return this.b7("Receiving DIAL launch request for non-clicked DIAL receiver: "+k.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(z&&z.label==k.label&&z.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.Y.Y)return h3("Reselecting dial screen."), this.publish("yt-remote-cast2-session-change",this.Y.Y),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.b7('Changing CAST intent from "'+z.receiverType+'" to "dial" for '+k.friendlyName);rK(this,new wK(this.L,k,this.j,this.config_))}k=this.Y;k.B=F;k.B.appState==chrome.cast.DialAppState.RUNNING?(F=k.B.extraData||{},z=F.screenId||null,mH(k)&&F.loungeToken?F.loungeTokenRefreshIntervalMs?F=dKt(k,{name:k.L.friendlyName,screenId:F.screenId,loungeToken:F.loungeToken,dialId:k.B.receiver.label, screenIdType:"shortLived"},F.loungeTokenRefreshIntervalMs):(g.kT(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(F)+".")),F=Jy$(k,z)):F=Jy$(k,z)):F=SaV(k);return F}; g.A.Cr=function(F){var k=this;if(!this.z4()&&!this.S){h3("New cast session ID: "+F.sessionId);var z=F.receiver;if(z.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.Y)if(z.receiverType==chrome.cast.ReceiverType.CAST)h3("Got resumed cast session before resumed mdx connection."),z.friendlyName=chrome.cast.unescape(z.friendlyName),rK(this,new uu(this.L,z,this.config_),!0);else{this.b7("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var x=this.Y.L,D=Af(this.L.pF(), x.label);D&&e$(D,z.label)&&x.receiverType!=chrome.cast.ReceiverType.CAST&&z.receiverType==chrome.cast.ReceiverType.CAST&&(h3("onSessionEstablished_: manual to cast session change "+z.friendlyName),g.CC(this.Y),this.Y=new uu(this.L,z,this.config_),this.Y.subscribe("sessionScreen",(0,g.W6)(this.ZC,this,this.Y)),this.Y.subscribe("sessionFailed",function(){return YaC(k,k.Y)}),this.Y.MM(null)); this.Y.lQ(F)}}}; g.A.H0=function(){return this.Y?this.Y.VU():null}; g.A.gP$=function(F){this.z4()||(this.b7("Failed to estabilish a session: "+g.J1(F)),F.code!=chrome.cast.ErrorCode.CANCEL&&rK(this,null),this.publish("yt-remote-cast2-session-failed"))}; g.A.dka=function(F){h3("Receiver availability updated: "+F);if(!this.z4()){var k=sn(this);this.G=F==chrome.cast.ReceiverAvailability.AVAILABLE;sn(this)!=k&&this.publish("yt-remote-cast2-availability-change",sn(this))}}; g.A.I$=function(){this.z4()||(this.U=n4C(this),h3("Updating custom receivers: "+g.J1(this.U)),chrome.cast.setCustomReceivers(this.U,function(){},(0,g.W6)(function(){this.b7("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",sn(this)))}; QW.prototype.setLaunchParams=QW.prototype.T$4;QW.prototype.setConnectedScreenStatus=QW.prototype.inK;QW.prototype.stopSession=QW.prototype.NH;QW.prototype.getCastSession=QW.prototype.H0;QW.prototype.requestSession=QW.prototype.requestSession;QW.prototype.init=QW.prototype.init;QW.prototype.dispose=QW.prototype.dispose;var z$A=[];g.A=co.prototype; g.A.reset=function(F){this.listId="";this.index=-1;this.videoId="";e$7(this);this.volume=-1;this.muted=!1;F&&(this.index=F.index,this.listId=F.listId,this.videoId=F.videoId,this.playerState=F.playerState,this.volume=F.volume,this.muted=F.muted,this.audioTrackId=F.audioTrackId,this.trackData=F.trackData,this.HZ=F.hasPrevious,this.D4=F.hasNext,this.G=F.playerTime,this.S=F.playerTimeAt,this.j=F.seekableStart,this.Y=F.seekableEnd,this.W=F.duration,this.B=F.loadedTime,this.U=F.liveIngestionTime,this.L= !isNaN(this.U))}; g.A.isPlaying=function(){return this.playerState==1}; g.A.isBuffering=function(){return this.playerState==3}; g.A.On=function(){return this.playerState==1081}; g.A.zc=function(F){this.W=isNaN(F)?0:F}; g.A.getDuration=function(){return this.L?this.W+Po(this):this.W}; g.A.clone=function(){return new co(CeC(this))};g.T(aZ,g.uG);g.A=aZ.prototype;g.A.getState=function(){return this.U}; g.A.S3=function(){return this.j.getReconnectTimeout()}; g.A.Dq=function(){this.j.reconnect()}; g.A.play=function(){bu(this)?(this.Y?this.Y.play(null,g.h1,RZ(this,"play")):yW(this,"play"),E3C(this,1,VW(SE(this))),this.publish("remotePlayerChange")):dK(this,this.play)}; g.A.pause=function(){bu(this)?(this.Y?this.Y.pause(null,g.h1,RZ(this,"pause")):yW(this,"pause"),E3C(this,2,VW(SE(this))),this.publish("remotePlayerChange")):dK(this,this.pause)}; g.A.seekTo=function(F){if(bu(this)){if(this.Y){var k=SE(this),z=new chrome.cast.media.SeekRequest;z.currentTime=F;k.isPlaying()||k.isBuffering()?z.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:z.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.Y.seek(z,g.h1,RZ(this,"seekTo",{newTime:F}))}else yW(this,"seekTo",{newTime:F});E3C(this,3,F);this.publish("remotePlayerChange")}else dK(this,g.FY(this.seekTo,F))}; g.A.stop=function(){if(bu(this)){this.Y?this.Y.stop(null,g.h1,RZ(this,"stopVideo")):yW(this,"stopVideo");var F=SE(this);F.index=-1;F.videoId="";e$7(F);J3(this,F);this.publish("remotePlayerChange")}else dK(this,this.stop)}; g.A.setVolume=function(F,k){if(bu(this)){var z=SE(this);if(this.L){if(z.volume!=F){var x=Math.round(F)/100;this.L.setReceiverVolumeLevel(x,(0,g.W6)(function(){zH("set receiver volume: "+x)},this),(0,g.W6)(function(){this.b7("failed to set receiver volume.")},this))}z.muted!=k&&this.L.setReceiverMuted(k,(0,g.W6)(function(){zH("set receiver muted: "+k)},this),(0,g.W6)(function(){this.b7("failed to set receiver muted.")},this))}else{var D={volume:F, muted:k};z.volume!=-1&&(D.delta=F-z.volume);yW(this,"setVolume",D)}z.muted=k;z.volume=F;J3(this,z)}else dK(this,g.FY(this.setVolume,F,k))}; g.A.GL=function(F,k){if(bu(this)){var z=SE(this);F={videoId:F};k&&(z.trackData={trackName:k.name,languageCode:k.languageCode,sourceLanguageCode:k.translationLanguage?k.translationLanguage.languageCode:"",languageName:k.languageName,kind:k.kind},F.style=g.J1(k.style),g.RM(F,z.trackData));yW(this,"setSubtitlesTrack",F);J3(this,z)}else dK(this,g.FY(this.GL,F,k))}; g.A.setAudioTrack=function(F,k){bu(this)?(k=k.getLanguageInfo().getId(),yW(this,"setAudioTrack",{videoId:F,audioTrackId:k}),F=SE(this),F.audioTrackId=k,J3(this,F)):dK(this,g.FY(this.setAudioTrack,F,k))}; g.A.playVideo=function(F,k,z,x,D,e,C){x=x===void 0?null:x;D=D===void 0?null:D;e=e===void 0?null:e;C=C===void 0?null:C;var p=SE(this),E={videoId:F};z!==void 0&&(E.currentIndex=z);IZ(p,F,z||0);k!==void 0&&(On(p,k),E.currentTime=k);x&&(E.listId=x);D&&(E.playerParams=D);e&&(E.clickTrackingParams=e);C&&(E.locationInfo=g.J1(C));yW(this,"setPlaylist",E);x||J3(this,p)}; g.A.UM=function(F,k){if(bu(this)){if(F&&k){var z=SE(this);IZ(z,F,k);J3(this,z)}yW(this,"previous")}else dK(this,g.FY(this.UM,F,k))}; g.A.nextVideo=function(F,k){if(bu(this)){if(F&&k){var z=SE(this);IZ(z,F,k);J3(this,z)}yW(this,"next")}else dK(this,g.FY(this.nextVideo,F,k))}; g.A.zZ=function(){if(bu(this)){yW(this,"clearPlaylist");var F=SE(this);F.reset();J3(this,F);this.publish("remotePlayerChange")}else dK(this,this.zZ)}; g.A.rT=function(){bu(this)?yW(this,"dismissAutoplay"):dK(this,this.rT)}; g.A.dispose=function(){if(this.U!=3){var F=this.U;this.U=3;this.publish("proxyStateChange",F,this.U)}g.uG.prototype.dispose.call(this)}; g.A.h4=function(){ptG(this);this.j=null;this.W.clear();Ho(this,null);g.uG.prototype.h4.call(this)}; g.A.GF=function(F){if((F!=this.U||F==2)&&this.U!=3&&F!=0){var k=this.U;this.U=F;this.publish("proxyStateChange",k,F);if(F==1)for(;!this.W.isEmpty();)k=F=this.W,k.Y.length===0&&(k.Y=k.L,k.Y.reverse(),k.L=[]),F.Y.pop().apply(this);else F==3&&this.dispose()}}; g.A.D5k=function(F,k){this.publish(F,k)}; g.A.Xeh=function(F){if(!F)this.G5(null),Ho(this,null);else if(this.L.receiver.volume){F=this.L.receiver.volume;var k=SE(this),z=Math.round(100*F.level||0);if(k.volume!=z||k.muted!=F.muted)zH("Cast volume update: "+F.level+(F.muted?" muted":"")),k.volume=z,k.muted=!!F.muted,J3(this,k)}}; g.A.G5=function(F){zH("Cast media: "+!!F);this.Y&&this.Y.removeUpdateListener(this.B);if(this.Y=F)this.Y.addUpdateListener(this.B),XtC(this),this.publish("remotePlayerChange")}; g.A.mRt=function(F){F?(XtC(this),this.publish("remotePlayerChange")):this.G5(null)}; g.A.j6=function(){yW(this,"sendDebugCommand",{debugCommand:"stats4nerds "})}; g.A.SJR=function(){var F=DHC();F&&Ho(this,F)}; g.A.b7=function(F){oZ("CP",F)};g.T(n5,g.uG);g.A=n5.prototype; g.A.connect=function(F,k){if(k){var z=k.listId,x=k.videoId,D=k.videoIds,e=k.playerParams,C=k.clickTrackingParams,p=k.index,E={videoId:x},X=k.currentTime,q=k.locationInfo;k=k.loopMode;X!==void 0&&(E.currentTime=X<=5?0:X);e&&(E.playerParams=e);q&&(E.locationInfo=q);C&&(E.clickTrackingParams=C);z&&(E.listId=z);D&&D.length>0&&(E.videoIds=D.join(","));p!==void 0&&(E.currentIndex=p);this.yh&&(E.loopMode=k||"LOOP_MODE_OFF");z&&(this.Y.listId=z);this.Y.videoId=x;this.Y.index=p||0;this.Y.state=3;On(this.Y, X);this.W="UNSUPPORTED";z=this.yh?"setInitialState":"setPlaylist";gK("Connecting with "+z+" and params: "+g.J1(E));this.L.connect({method:z,params:g.J1(E)},F,cB$())}else gK("Connecting without params"),this.L.connect({},F,cB$());wtt(this)}; g.A.Eo=function(F){this.L.Eo(F)}; g.A.dispose=function(){this.z4()||(g.dI("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),Yw(this,3));g.uG.prototype.dispose.call(this)}; g.A.h4=function(){mHH(this);l1G(this);TXV(this);g.lP(this.B);this.B=NaN;g.lP(this.K);this.K=NaN;this.j=null;g.tx(this.Qh);this.Qh.length=0;this.L.dispose();g.uG.prototype.h4.call(this);this.W=this.G=this.U=this.Y=this.L=null}; g.A.CO=function(F){if(!this.U||this.U.length===0)return!1;for(var k=g.l(this.U),z=k.next();!z.done;z=k.next())if(!z.value.capabilities.has(F))return!1;return!0}; g.A.OY=function(){var F=3;this.z4()||(F=0,isNaN(this.zp())?this.L.wz()&&isNaN(this.S)&&(F=1):F=2);return F}; g.A.Rk=function(F){gK("Disconnecting with "+F);g.dI("yt.mdx.remote.remoteClient_",null);mHH(this);this.publish("beforeDisconnect",F);F==1&&X3();this.L.disconnect(F);this.dispose()}; g.A.Mc=function(){var F=this.Y;this.j&&(F=this.Y.clone(),IZ(F,this.j,F.index));return CeC(F)}; g.A.WBh=function(F){var k=this,z=new co(F);z.videoId&&z.videoId!=this.Y.videoId&&(this.j=z.videoId,g.lP(this.B),this.B=g.mz(function(){if(k.j){var D=k.j;k.j=null;k.Y.videoId!=D&&MY(k,"getNowPlaying")}},5E3)); var x=[];this.Y.listId==z.listId&&this.Y.videoId==z.videoId&&this.Y.index==z.index||x.push("remoteQueueChange");this.Y.playerState==z.playerState&&this.Y.volume==z.volume&&this.Y.muted==z.muted&&VW(this.Y)==VW(z)&&g.J1(this.Y.trackData)==g.J1(z.trackData)||x.push("remotePlayerChange");this.Y.reset(F);g.XN(x,function(D){this.publish(D)},this)}; g.A.uI=function(){var F=this.L.getDeviceId(),k=g.M$(this.U,function(z){return z.type=="REMOTE_CONTROL"&&z.id!=F}); return k?k.id:""}; g.A.zp=function(){return this.L.S3()}; g.A.nY=function(){return this.W||"UNSUPPORTED"}; g.A.xs=function(){return this.G||""}; g.A.wS=function(){!isNaN(this.zp())&&this.L.Dq()}; g.A.hEp=function(F,k){MY(this,F,k);h$A(this)}; g.A.Js=function(){var F=g.bP("SAPISID","")||g.bP("__Secure-1PAPISID")||"",k=g.bP("__Secure-3PAPISID","")||"";if(!F&&!k)return"";F=g.mv(g.l7(F),2);k=g.mv(g.l7(k),2);return g.mv(g.l7(","+F+","+k),2)}; n5.prototype.subscribe=n5.prototype.subscribe;n5.prototype.unsubscribeByKey=n5.prototype.QL;n5.prototype.getProxyState=n5.prototype.OY;n5.prototype.disconnect=n5.prototype.Rk;n5.prototype.getPlayerContextData=n5.prototype.Mc;n5.prototype.setPlayerContextData=n5.prototype.WBh;n5.prototype.getOtherConnectedRemoteId=n5.prototype.uI;n5.prototype.getReconnectTimeout=n5.prototype.zp;n5.prototype.getAutoplayMode=n5.prototype.nY;n5.prototype.getAutoplayVideoId=n5.prototype.xs;n5.prototype.reconnect=n5.prototype.wS; n5.prototype.sendMessage=n5.prototype.hEp;n5.prototype.getXsrfToken=n5.prototype.Js;n5.prototype.isCapabilitySupportedOnConnectedDevices=n5.prototype.CO;g.T(VFA,$w);g.A=VFA.prototype;g.A.pF=function(F){return this.lG.$_gs(F)}; g.A.contains=function(F){return!!this.lG.$_c(F)}; g.A.get=function(F){return this.lG.$_g(F)}; g.A.start=function(){this.lG.$_st()}; g.A.add=function(F,k,z){this.lG.$_a(F,k,z)}; g.A.remove=function(F,k,z){this.lG.$_r(F,k,z)}; g.A.xD=function(F,k,z,x){this.lG.$_un(F,k,z,x)}; g.A.h4=function(){for(var F=this.Y.length,k=0;k1&&!this.T.getOption("remote","quickCast")?(this.mf=g.qT(F,this.Y,this),this.zR(g.tW(F,this.Y)),F=this.T.getOption("remote","currentReceiver"),F=this.Y(F),this.options[F]&&this.hG(F),this.enable(!0)):this.enable(!1)}; X2.prototype.Y=function(F){return F.key}; X2.prototype.yH=function(F){return F==="cast-selector-receiver"?"Transmitir\u2026":this.mf[F].name}; X2.prototype.XY=function(F){g.Hq.prototype.XY.call(this,F);this.T.setOption("remote","currentReceiver",this.mf[F]);this.Sz.bL()};g.T(zoC,g.XP);g.A=zoC.prototype; g.A.create=function(){var F=this.player.C(),k=g.Vq(F);F={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:F.V("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:F.V("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:F.V("enable_cast_short_lived_lounge_token")};bFn(k,F);this.subscriptions.push(g.Ex("yt-remote-before-disconnect",this.Fu_,this));this.subscriptions.push(g.Ex("yt-remote-connection-change",this.YmU,this));this.subscriptions.push(g.Ex("yt-remote-receiver-availability-change",this.BE, this));this.subscriptions.push(g.Ex("yt-remote-auto-connect",this.vNa,this));this.subscriptions.push(g.Ex("yt-remote-receiver-resumed",this.r5$,this));this.subscriptions.push(g.Ex("mdx-privacy-popup-confirm",this.gYR,this));this.subscriptions.push(g.Ex("mdx-privacy-popup-cancel",this.ch4,this));this.BE()}; g.A.load=function(){this.player.cancelPlayback();g.XP.prototype.load.call(this);this.D_=new oZY(this);this.player.Cl(this.D_);this.Ii=new KfV(this,this.player,this.TD);var F=(F=MF7())?F.currentTime:0;var k=g3C()?new aZ(ii(),void 0):null;F==0&&k&&(F=VW(SE(k)));F!==0&&this.xj(F);xE$(this,this.fv,this.fv);this.player.ye(6)}; g.A.unload=function(){this.player.publish("mdxautoplaycanceled");this.player.oM();this.De=this.d2;g.AD(this.Ii,this.TD);this.TD=this.D_=this.Ii=null;g.XP.prototype.unload.call(this);this.player.ye(5);q1(this)}; g.A.h4=function(){g.XU(this.subscriptions);g.XP.prototype.h4.call(this)}; g.A.SB=function(F){var k=g.v6.apply(1,arguments);this.loaded&&this.Ii.HN.apply(this.Ii,[F].concat(g.r(k)))}; g.A.getAdState=function(){return this.yL}; g.A.HZ=function(){return this.TD?SE(this.TD).HZ:!1}; g.A.D4=function(){return this.TD?SE(this.TD).D4:!1}; g.A.xj=function(F,k){this.Po=F||0;this.player.publish("progresssync",F,k);this.player.YN("onVideoProgress",F||0)}; g.A.getCurrentTime=function(){return this.Po}; g.A.getProgressState=function(){var F=SE(this.TD),k=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:!F.On()&&this.player.xA(),clipEnd:k.clipEnd,clipStart:k.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:F.getDuration(),ingestionTime:F.L?F.U+Po(F):F.U,isAtLiveHead:(F.L?F.Y+Po(F):F.Y)-this.getCurrentTime()<=1,loaded:F.B,seekableEnd:F.L?F.Y+Po(F):F.Y,seekableStart:F.j>0?F.j+Po(F):F.j,offset:0,viewerLivestreamJoinMediaTime:0}}; g.A.nextVideo=function(){this.TD&&this.TD.nextVideo()}; g.A.UM=function(){this.TD&&this.TD.UM()}; g.A.Fu_=function(F){F===1&&(this.uE=this.TD?SE(this.TD):null)}; g.A.YmU=function(){var F=g3C()?new aZ(ii(),void 0):null;if(F){var k=this.De;this.loaded&&this.unload();this.TD=F;this.uE=null;k.key!==this.d2.key&&(this.De=k,this.load())}else g.CC(this.TD),this.TD=null,this.loaded&&(this.unload(),(F=this.uE)&&F.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(F.videoId,VW(F)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)}; g.A.BE=function(){var F=[this.d2],k=F.concat,z=dHn();t3()&&g.bn("yt-remote-cast-available")&&z.push({key:"cast-selector-receiver",name:"Cast..."});this.mf=k.call(F,z);F=yPn()||this.d2;N1(this,F);this.player.YN("onMdxReceiversChange")}; g.A.vNa=function(){var F=yPn();N1(this,F)}; g.A.r5$=function(){this.De=yPn()}; g.A.gYR=function(){this.QC=!0;q1(this);eW=!1;Df&&jW(Df,1);Df=null}; g.A.ch4=function(){this.QC=!1;q1(this);N1(this,this.d2);this.De=this.d2;eW=!1;Df=null;this.player.playVideo()}; g.A.tG=function(F,k){switch(F){case "casting":return this.loaded;case "receivers":return this.mf;case "currentReceiver":return k&&(k.key==="cast-selector-receiver"?$HC():N1(this,k)),this.loaded?this.De:this.d2;case "quickCast":return this.mf.length===2&&this.mf[1].key==="cast-selector-receiver"?(k&&$HC(),!0):!1}}; g.A.j6=function(){this.TD.j6()}; g.A.zy=function(){return!1}; g.A.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]}; g.A.isLoggedIn=function(){var F,k;return((F=g.LX("PLAYER_CONFIG"))==null?void 0:(k=F.args)==null?void 0:k.authuser)!==void 0?!0:!(!g.LX("SESSION_INDEX")&&!g.LX("LOGGED_IN"))};g.EL("remote",zoC);})(_yt_player);