(function(g){var window=this;'use strict';var B6=function(x){g.Eu(x,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.xw()).toString(36));return x},oD=function(x,u,k){Array.isArray(k)||(k=[String(k)]); g.JT5(x.K,u,k)},XgS=function(x){if(x instanceof g.bO)return x; if(typeof x.Wk=="function")return x.Wk(!1);if(g.AY(x)){var u=0,k=new g.bO;k.next=function(){for(;;){if(u>=x.length)return g.bz;if(u in x)return g.Vo(x[u++]);u++}}; return k}throw Error("Not implemented");},qnt=function(x,u,k){if(g.AY(x))g.q9(x,u,k); else for(x=XgS(x);;){var U=x.next();if(U.done)break;u.call(k,U.value,void 0,x)}},s1s=function(x,u){var k=[]; qnt(u,function(U){try{var m=g.Qu.prototype.V.call(this,U,!0)}catch(F){if(F=="Storage: Invalid value was encountered")return;throw F;}m===void 0?k.push(U):g.D4Y(m)&&k.push(U)},x); return k},HTk=function(x,u){s1s(x,u).forEach(function(k){g.Qu.prototype.remove.call(this,k)},x)},RQB=function(x){if(x.t5){if(x.t5.locationOverrideToken)return{locationOverrideToken:x.t5.locationOverrideToken}; if(x.t5.latitudeE7!=null&&x.t5.longitudeE7!=null)return{latitudeE7:x.t5.latitudeE7,longitudeE7:x.t5.longitudeE7}}return null},pg$=function(x,u){g.DG(x,u)||x.push(u)},cnw=function(x){var u=0,k; for(k in x)u++;return u},MS9=function(x,u){return g.lp(x,u)},wg9=function(x){try{return g.JY.JSON.parse(x)}catch(u){}x=String(x); if(/^\s*$/.test(x)?0:/^[\],:{}\s\u2028\u2029]*$/.test(x.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+x+")")}catch(u){}throw Error("Invalid JSON string: "+x);},xf=function(x){if(g.JY.JSON)try{return g.JY.JSON.parse(x)}catch(u){}return wg9(x)},yns=function(x){if(x.Y9&&typeof x.Y9=="function")return x.Y9(); if(typeof Map!=="undefined"&&x instanceof Map||typeof Set!=="undefined"&&x instanceof Set)return Array.from(x.values());if(typeof x==="string")return x.split("");if(g.AY(x)){for(var u=[],k=x.length,U=0;U1){if(k%2)throw Error("Uneven number of arguments");for(var U=0;U5&&(x=x.slice(x.length-5)); var u=g.nl(RI9(),function(U){return U.loungeToken}),k=g.nl(x,function(U){return U.loungeToken}); g.$L(k,function(U){return!g.DG(u,U)})&&pw$(); g.eZ("yt-remote-local-screens",x,31536E3)},qG=function(x){x||(g.PG("yt-remote-session-screen-id"),g.PG("yt-remote-session-video-id")); soW();x=hz();g.Bk(x,XE());XwB(x)},Mc$=function(){if(!sO){var x=g.dl(); x&&(sO=new g.jq(x))}},wwm=function(){Mc$(); return sO?!!sO.get("yt-remote-use-staging-server"):!1},HD=function(x,u){g.VA[x]=!0; var k=g.fC();k&&k.publish.apply(k,arguments);g.VA[x]=!1},yX9=function(){},ub=function(){if(!RD){RD=new g.$p(new yX9); var x=g.OQ("client_streamz_web_flush_count",-1);x!==-1&&(RD.J=x)}return RD},YQG=function(){var x=window.navigator.userAgent.match(/Chrome\/([0-9]+)/); return x?parseInt(x[1],10):0},tct=function(x){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+x)!=-1||document.currentScript.src.indexOf("&"+x)!=-1)},Ec9=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},pU=function(x){x.length?GmG(x.shift(),function(){pU(x)}):zIt()},WXS=function(x){return"chrome-extension://"+x+"/cast_sender.js"},GmG=function(x,u,k){var U=document.createElement("script"); U.onerror=u;k&&(U.onload=k);g.TN(U,g.nT(x));(document.head||document.documentElement).appendChild(U)},OVZ=function(){var x=YQG(),u=[]; if(x>1){var k=x-1;u.push("//www.gstatic.com/eureka/clank/"+x+"/cast_sender.js");u.push("//www.gstatic.com/eureka/clank/"+k+"/cast_sender.js")}return u},zIt=function(){var x=Ec9(); x&&x(!1,"No cast extension found")},lvo=function(){if(iVw){var x=2,u=Ec9(),k=function(){x--; x==0&&u&&u(!0)}; window.__onGCastApiAvailable=k;GmG("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",zIt,k)}},ncG=function(){lvo(); var x=OVZ();x.push("//www.gstatic.com/eureka/clank/cast_sender.js");pU(x)},rX$=function(){lvo(); var x=OVZ();x.push.apply(x,g.t($lG.map(WXS)));x.push("//www.gstatic.com/eureka/clank/cast_sender.js");pU(x)},cD=function(x,u,k){g.J.call(this); this.j=k!=null?(0,g.B4)(x,k):x;this.tG=u;this.N=(0,g.B4)(this.M2,this);this.S=!1;this.V=0;this.J=this.Hl=null;this.K=[]},MG=function(){},jot=function(){g.IP.call(this,"p")},ZVt=function(){g.IP.call(this,"o")},Qo9=function(){return avk=avk||new g.kp},IvS=function(x){g.IP.call(this,"serverreachability",x)},wZ=function(x){var u=Qo9(); u.dispatchEvent(new IvS(u,x))},eIm=function(x){g.IP.call(this,"statevent",x)},yT=function(x){var u=Qo9(); u.dispatchEvent(new eIm(u,x))},JXm=function(x,u,k,U){g.IP.call(this,"timingevent",x); this.size=u;this.rtt=k;this.retries=U},Yf=function(x,u){if(typeof x!=="function")throw Error("Fn must not be null and must be a function"); return g.JY.setTimeout(function(){x()},u)},tz=function(){},EO=function(x,u,k,U){this.J=x; this.K=u;this.wu=k;this.QI=U||1;this.Uk=new g.iQ(this);this.P$=45E3;this.c$=null;this.j=!1;this.U=this.B$=this.B=this.q$=this.Ok=this.oS=this.t5=null;this.RS=[];this.S=null;this.D=0;this.N=this.nm=null;this.RU=-1;this.gm=!1;this.QX=0;this.GY=null;this.ud=this.IS=this.Nj=this.ut=!1;this.V=new Ptm},Ptm=function(){this.J=null; this.S="";this.V=!1},dlk=function(x,u,k){x.q$=1; x.B=B6(u.clone());x.U=k;x.ut=!0;N6o(x,null)},N6o=function(x,u){x.Ok=Date.now(); G5(x);x.B$=x.B.clone();oD(x.B$,"t",x.QI);x.D=0;var k=x.J.q$;x.V=new Ptm;x.S=KXk(x.J,k?u:null,!x.U);x.QX>0&&(x.GY=new g.FH((0,g.B4)(x.Hp,x,x.S),x.QX));x.Uk.listen(x.S,"readystatechange",x.Vt);u=x.c$?g.ZE(x.c$):{};x.U?(x.nm||(x.nm="POST"),u["Content-Type"]="application/x-www-form-urlencoded",x.S.send(x.B$,x.nm,x.U,u)):(x.nm="GET",x.S.send(x.B$,x.nm,null,u));wZ(1)},T6G=function(x){if(!vcm(x))return g.gJ(x.S); var u=g.kb(x.S);if(u==="")return"";var k="",U=u.length,m=g.xb(x.S)==4;if(!x.V.J){if(typeof TextDecoder==="undefined")return z5(x),WD(x),"";x.V.J=new g.JY.TextDecoder}for(var F=0;Fu.length)return AXZ;u=u.slice(U,U+k);x.D=U+k;return u},G5=function(x){x.oS=Date.now()+x.P$; DlB(x,x.P$)},DlB=function(x,u){if(x.t5!=null)throw Error("WatchDog timer not null"); x.t5=Yf((0,g.B4)(x.Ss,x),u)},SQ9=function(x){x.t5&&(g.JY.clearTimeout(x.t5),x.t5=null)},WD=function(x){x.J.Jf()||x.gm||B6S(x.J,x)},z5=function(x){SQ9(x); g.bZ(x.GY);x.GY=null;x.Uk.removeAll();if(x.S){var u=x.S;x.S=null;u.abort();u.dispose()}},FyS=function(x,u){try{var k=x.J; if(k.sW!=0&&(k.S==x||o$B(k.V,x)))if(!x.IS&&o$B(k.V,x)&&k.sW==3){try{var U=k.AO.S.parse(u)}catch(Y){U=null}if(Array.isArray(U)&&U.length==3){var m=U;if(m[0]==0)a:{if(!k.B){if(k.S)if(k.S.Ok+3E30&&(k.QX=1.5*V);U=k;var h=x.jT();if(h){var X=g.Ub(h,"X-Client-Wire-Protocol");if(X){var q=U.V;!q.S&&(g.GW(X,"spdy")||g.GW(X,"quic")||g.GW(X,"h2"))&&(q.K=q.N,q.S=new Set,q.V&&(g$m(q,q.V),q.V=null))}if(U.ut){var H=g.Ub(h,"X-HTTP-Session-Id");H&&(U.nf=H,g.Eu(U.c$,U.ut,H))}}k.sW=3;k.N&&k.N.U1();k.R0&&(k.h9=Date.now()-x.Ok);U=k;var R=x;U.QH=kEt(U,U.q$?U.QI:null,U.wu);if(R.IS){UJt(U.V, R);var p=R,c=U.QX;c&&p.setTimeout(c);p.t5&&(SQ9(p),G5(p));U.S=R}else mJW(U);k.J.length>0&&nU(k)}else F[0]!="stop"&&F[0]!="close"||lb(k,7);else k.sW==3&&(F[0]=="stop"||F[0]=="close"?F[0]=="stop"?lb(k,7):k.disconnect():F[0]!="noop"&&k.N&&k.N.Cu(F),k.RS=0)}wZ(4)}catch(Y){}},f7Z=function(x,u){this.S=x; this.map=u;this.context=null},bSm=function(x){this.N=x||10; g.JY.PerformanceNavigationTiming?(x=g.JY.performance.getEntriesByType("navigation"),x=x.length>0&&(x[0].nextHopProtocol=="hq"||x[0].nextHopProtocol=="h2")):x=!!(g.JY.chrome&&g.JY.chrome.loadTimes&&g.JY.chrome.loadTimes()&&g.JY.chrome.loadTimes().wasFetchedViaSpdy);this.K=x?this.N:1;this.S=null;this.K>1&&(this.S=new Set);this.V=null;this.J=[]},VZt=function(x){return x.V?!0:x.S?x.S.size>=x.K:!1},utw=function(x){return x.V?1:x.S?x.S.size:0},o$B=function(x,u){return x.V?x.V==u:x.S?x.S.has(u):!1},g$m= function(x,u){x.S?x.S.add(u):x.V=u},UJt=function(x,u){x.V&&x.V==u?x.V=null:x.S&&x.S.has(u)&&x.S.delete(u)},he$=function(x){if(x.V!=null)return x.J.concat(x.V.RS); if(x.S!=null&&x.S.size!==0){var u=x.J;x=g.w(x.S.values());for(var k=x.next();!k.done;k=x.next())u=u.concat(k.value.RS);return u}return g.uU(x.J)},XGB=function(x,u){var k=new tz; if(g.JY.Image){var U=new Image;U.onload=g.o$($f,k,"TestLoadImage: loaded",!0,u,U);U.onerror=g.o$($f,k,"TestLoadImage: error",!1,u,U);U.onabort=g.o$($f,k,"TestLoadImage: abort",!1,u,U);U.ontimeout=g.o$($f,k,"TestLoadImage: timeout",!1,u,U);g.JY.setTimeout(function(){if(U.ontimeout)U.ontimeout()},1E4); U.src=x}else u(!1)},qM9=function(x,u){var k=new tz,U=new AbortController,m=setTimeout(function(){U.abort(); $f(k,"TestPingServer: timeout",!1,u)},1E4); fetch(x,{signal:U.signal}).then(function(F){clearTimeout(m);F.ok?$f(k,"TestPingServer: ok",!0,u):$f(k,"TestPingServer: server error",!1,u)}).catch(function(){clearTimeout(m); $f(k,"TestPingServer: error",!1,u)})},$f=function(x,u,k,U,m){try{m&&(m.onload=null,m.onerror=null,m.onabort=null,m.ontimeout=null),U(k)}catch(F){}},smZ=function(){this.S=new MG},HS$=function(x,u,k){var U=k||""; try{tSw(x,function(m,F){var f=m;g.CR(m)&&(f=g.jm(m));u.push(U+F+"="+encodeURIComponent(f))})}catch(m){throw u.push(U+"type="+encodeURIComponent("_badmap")),m; }},rZ=function(x,u,k){return k&&k.CtX?k.CtX[x]||u:u},ReS=function(x){this.J=[]; this.QI=this.QH=this.c$=this.wu=this.S=this.nf=this.ut=this.gm=this.D=this.RU=this.U=null;this.DB=this.B$=0;this.I3=rZ("failFast",!1,x);this.IS=this.t5=this.B=this.j=this.N=null;this.A9=!0;this.Xv=this.GY=-1;this.ud=this.RS=this.Ok=0;this.iX=rZ("baseRetryDelayMs",5E3,x);this.bX=rZ("retryDelaySeedMs",1E4,x);this.G1=rZ("forwardChannelMaxRetries",2,x);this.iC=rZ("forwardChannelRequestTimeoutMs",2E4,x);this.kN=x&&x.En$||void 0;this.HZ=x&&x.lYt||void 0;this.BZ=x&&x.N1Y||!1;this.QX=void 0;this.q$=x&&x.olk|| !1;this.K="";this.V=new bSm(x&&x.SMX);this.AO=new smZ;this.Uk=x&&x.axX||!1;this.oS=x&&x.lxX||!1;this.Uk&&this.oS&&(this.oS=!1);this.wX=x&&x.ojk||!1;x&&x.GGt&&(this.A9=!1);this.R0=!this.Uk&&this.A9&&x&&x.kGt||!1;this.I0=void 0;x&&x.aO&&x.aO>0&&(this.I0=x.aO);this.MV=void 0;this.h9=0;this.P$=!1;this.Nj=this.nm=null},ib=function(x){x.S&&(pGG(x),x.S.cancel(),x.S=null)},ciB=function(x){ib(x); x.B&&(g.JY.clearTimeout(x.B),x.B=null);OO(x);x.V.cancel();x.j&&(typeof x.j==="number"&&g.JY.clearTimeout(x.j),x.j=null)},nU=function(x){VZt(x.V)||x.j||(x.j=!0,g.s7(x.Pp,x),x.Ok=0)},wGG=function(x,u){if(utw(x.V)>=x.V.K-(x.j?1:0))return!1; if(x.j)return x.J=u.RS.concat(x.J),!0;if(x.sW==1||x.sW==2||x.Ok>=(x.I3?0:x.G1))return!1;x.j=Yf((0,g.B4)(x.Pp,x,u),MZG(x,x.Ok));x.Ok++;return!0},YMZ=function(x,u){var k; u?k=u.wu:k=x.B$++;var U=x.c$.clone();g.Eu(U,"SID",x.K);g.Eu(U,"RID",k);g.Eu(U,"AID",x.GY);jN(x,U);x.D&&x.U&&g.Ou(U,x.D,x.U);k=new EO(x,x.K,k,x.Ok+1);x.D===null&&(k.c$=x.U);u&&(x.J=u.RS.concat(x.J));u=yim(x,k,1E3);k.setTimeout(Math.round(x.iC*.5)+Math.round(x.iC*.5*Math.random()));g$m(x.V,k);dlk(k,U,u)},jN=function(x,u){x.gm&&g.YG(x.gm,function(k,U){g.Eu(u,U,k)}); x.N&&tSw({},function(k,U){g.Eu(u,U,k)})},yim=function(x,u,k){k=Math.min(x.J.length,k); var U=x.N?(0,g.B4)(x.N.O6,x.N,x):null;a:{for(var m=x.J,F=-1;;){var f=["count="+k];F==-1?k>0?(F=m[0].S,f.push("ofs="+F)):F=0:f.push("ofs="+F);for(var V=!0,h=0;h=3)return!1; x.ud++;x.B=Yf((0,g.B4)(x.Lu,x),MZG(x,x.RS));x.RS++;return!0},pGG=function(x){x.nm!=null&&(g.JY.clearTimeout(x.nm),x.nm=null)},tZ9=function(x){x.S=new EO(x,x.K,"rpc",x.ud); x.D===null&&(x.S.c$=x.U);x.S.QX=0;var u=x.QH.clone();g.Eu(u,"RID","rpc");g.Eu(u,"SID",x.K);g.Eu(u,"AID",x.GY);g.Eu(u,"CI",x.IS?"0":"1");!x.IS&&x.I0&&g.Eu(u,"TO",x.I0);g.Eu(u,"TYPE","xmlhttp");jN(x,u);x.D&&x.U&&g.Ou(u,x.D,x.U);x.QX&&x.S.setTimeout(x.QX);var k=x.S;x=x.QI;k.q$=1;k.B=B6(u.clone());k.U=null;k.ut=!0;N6o(k,x)},OO=function(x){x.t5!=null&&(g.JY.clearTimeout(x.t5),x.t5=null)},B6S=function(x,u){var k=null; if(x.S==u){OO(x);pGG(x);x.S=null;var U=2}else if(o$B(x.V,u))k=u.RS,UJt(x.V,u),U=1;else return;if(x.sW!=0)if(u.j)if(U==1){k=u.U?u.U.length:0;u=Date.now()-u.Ok;var m=x.Ok;U=Qo9();U.dispatchEvent(new JXm(U,k,u,m));nU(x)}else mJW(x);else{var F=u.RU;m=u.getLastError();if(m==3||m==0&&F>0||!(U==1&&wGG(x,u)||U==2&&xJW(x)))switch(k&&k.length>0&&(u=x.V,u.J=u.J.concat(k)),m){case 1:lb(x,5);break;case 4:lb(x,10);break;case 3:lb(x,6);break;default:lb(x,2)}}},MZG=function(x,u){var k=x.iX+Math.floor(Math.random()* x.bX); x.isActive()||(k*=2);return k*u},lb=function(x,u){if(u==2){var k=(0,g.B4)(x.Mnt,x),U=x.HZ,m=!U; U=new g.RZ(U||"//www.google.com/images/cleardot.gif");g.JY.location&&g.JY.location.protocol=="http"||g.pp(U,"https");B6(U);m?XGB(U.toString(),k):qM9(U.toString(),k)}else yT(2);x.sW=0;x.N&&x.N.dP(u);E$9(x);ciB(x)},E$9=function(x){x.sW=0; x.Nj=[];if(x.N){var u=he$(x.V);if(u.length!=0||x.J.length!=0)g.gS(x.Nj,u),g.gS(x.Nj,x.J),x.V.J.length=0,g.uU(x.J),x.J.length=0;x.N.zZ()}},GEw=function(x){if(x.sW==0)return x.Nj; var u=[];g.gS(u,he$(x.V));g.gS(u,x.J);return u},kEt=function(x,u,k){var U=g.Gc(k); U.S!=""?(u&&g.cL(U,u+"."+U.S),g.My(U,U.J)):(U=g.JY.location,U=EVW(U.protocol,u?u+"."+U.hostname:U.hostname,+U.port,k));u=x.ut;k=x.nf;u&&k&&g.Eu(U,u,k);g.Eu(U,"VER",x.Xe);jN(x,U);return U},KXk=function(x,u,k){if(u&&!x.q$)throw Error("Can't create secondary domain capable XhrIo object."); u=x.BZ&&!x.kN?new g.Sm(new g.hV({yg:k})):new g.Sm(x.kN);u.D=x.q$;return u},zeZ=function(){},WyG=function(){},aD=function(x,u){g.kp.call(this); this.S=new ReS(u);this.N=x;this.V=u&&u.QU$||null;x=u&&u.rtJ||null;u&&u.MXX&&(x?x["X-Client-Protocol"]="webchannel":x={"X-Client-Protocol":"webchannel"});this.S.U=x;x=u&&u.d5k||null;u&&u.BH&&(x?x["X-WebChannel-Content-Type"]=u.BH:x={"X-WebChannel-Content-Type":u.BH});u&&u.Wf&&(x?x["X-WebChannel-Client-Profile"]=u.Wf:x={"X-WebChannel-Client-Profile":u.Wf});this.S.RU=x;(x=u&&u.zNY)&&!g.Eo(x)&&(this.S.D=x);this.j=u&&u.olk||!1;this.K=u&&u.XLX||!1;(u=u&&u.X$$)&&!g.Eo(u)&&(this.S.ut=u,g.ip(this.V,u)&&(x= this.V,u in x&&delete x[u]));this.J=new Zw(this)},OSo=function(x){jot.call(this); x.__headers__&&(this.headers=x.__headers__,this.statusCode=x.__status__,delete x.__headers__,delete x.__status__);var u=x.__sm__;u?this.data=(this.S=g.z4(u))?g.rY(u,this.S):u:this.data=x},iSt=function(x){ZVt.call(this); this.status=1;this.errorCode=x},Zw=function(x){this.S=x},l7s=function(x,u){this.V=x; this.S=u},n$9=function(x){return GEw(x.S).map(function(u){var k=x.V; u=u.map;"__data__"in u?(u=u.__data__,k=k.K?wg9(u):u):k=u;return k})},QT=function(x,u){if(typeof x!=="function")throw Error("Fn must not be null and must be a function"); return g.JY.setTimeout(function(){x()},u)},eN=function(x){ID.dispatchEvent(new $Jt(ID,x))},$Jt=function(x){g.IP.call(this,"statevent",x)},Jz=function(x,u,k,U){this.S=x; this.K=u;this.D=k;this.j=U||1;this.V=45E3;this.J=new g.iQ(this);this.N=new g.W9;this.N.setInterval(250)},jmS=function(x,u,k){x.WM=1; x.Vx=B6(u.clone());x.C1=k;x.ut=!0;riW(x,null)},ZSW=function(x,u,k,U,m){x.WM=1; x.Vx=B6(u.clone());x.C1=null;x.ut=k;m&&(x.Ux=!1);riW(x,U)},riW=function(x,u){x.KK=Date.now(); a7m(x);x.eV=x.Vx.clone();oD(x.eV,"t",x.j);x.lQ=0;x.Wo=x.S.hB(x.S.nK()?u:null);x.l3>0&&(x.pB=new g.FH((0,g.B4)(x.oH,x,x.Wo),x.l3));x.J.listen(x.Wo,"readystatechange",x.kU);u=x.zj?g.ZE(x.zj):{};x.C1?(x.cM="POST",u["Content-Type"]="application/x-www-form-urlencoded",x.Wo.send(x.eV,x.cM,x.C1,u)):(x.cM="GET",x.Ux&&!g.Be&&(u.Connection="close"),x.Wo.send(x.eV,x.cM,null,u));x.S.q5(1)},ee$=function(x,u){var k=x.lQ,U=u.indexOf("\n",k); if(U==-1)return Qm9;k=Number(u.substring(k,U));if(isNaN(k))return I7w;U+=1;if(U+k>u.length)return Qm9;u=u.slice(U,U+k);x.lQ=U+k;return u},a7m=function(x){x.FQ=Date.now()+x.V; Jik(x,x.V)},Jik=function(x,u){if(x.Jj!=null)throw Error("WatchDog timer not null"); x.Jj=QT((0,g.B4)(x.Kb,x),u)},PRW=function(x){x.Jj&&(g.JY.clearTimeout(x.Jj),x.Jj=null)},NRG=function(x){x.S.Jf()||x.J0||x.S.qb(x)},PD=function(x){PRW(x); g.bZ(x.pB);x.pB=null;x.N.stop();x.J.removeAll();if(x.Wo){var u=x.Wo;x.Wo=null;u.abort();u.dispose()}x.zJ&&(x.zJ=null)},dJB=function(x,u){try{x.S.xQ(x,u),x.S.q5(4)}catch(k){}},v$S=function(x,u,k,U,m){if(U==0)k(!1); else{var F=m||0;U--;Kys(x,u,function(f){f?k(!0):g.JY.setTimeout(function(){v$S(x,u,k,U,F)},F)})}},Kys=function(x,u,k){var U=new Image; U.onload=function(){try{NG(U),k(!0)}catch(m){}}; U.onerror=function(){try{NG(U),k(!1)}catch(m){}}; U.onabort=function(){try{NG(U),k(!1)}catch(m){}}; U.ontimeout=function(){try{NG(U),k(!1)}catch(m){}}; g.JY.setTimeout(function(){if(U.ontimeout)U.ontimeout()},u); U.src=x},NG=function(x){x.onload=null; x.onerror=null;x.onabort=null;x.ontimeout=null},TRm=function(x){this.S=x; this.V=new MG},Ais=function(x){var u=dZ(x.S,x.qA,"/mail/images/cleardot.gif"); B6(u);v$S(u.toString(),5E3,(0,g.B4)(x.zc,x),3,2E3);x.q5(1)},CRt=function(x){var u=x.S.j; u!=null?(eN(5),u?(eN(11),KU(x.S,x,!1)):(eN(12),KU(x.S,x,!0))):(x.uP=new Jz(x),x.uP.zj=x.Nb,u=x.S,u=dZ(u,u.nK()?x.iQ:null,x.mO),eN(5),oD(u,"TYPE","xmlhttp"),ZSW(x.uP,u,!1,x.iQ,!1))},Lyt=function(x,u,k){this.S=1; this.V=[];this.J=[];this.N=new MG;this.U=x||null;this.j=u!=null?u:null;this.B=k||!1},DJo=function(x,u){this.S=x; this.map=u;this.context=null},SMm=function(x,u,k,U){g.IP.call(this,"timingevent",x); this.size=u;this.rtt=k;this.retries=U},BRt=function(x){g.IP.call(this,"serverreachability",x)},xWt=function(x){x.Ta(1,0); x.Fo=dZ(x,null,x.Ez);ost(x)},uKt=function(x){x.I$&&(x.I$.abort(),x.I$=null); x.pF&&(x.pF.cancel(),x.pF=null);x.Zx&&(g.JY.clearTimeout(x.Zx),x.Zx=null);vD(x);x.mH&&(x.mH.cancel(),x.mH=null);x.eR&&(g.JY.clearTimeout(x.eR),x.eR=null)},gsm=function(x,u){if(x.S==0)throw Error("Invalid operation: sending map when state is closed"); x.V.push(new DJo(x.ul++,u));x.S!=2&&x.S!=3||ost(x)},kZG=function(x){var u=0; x.pF&&u++;x.mH&&u++;return u},ost=function(x){x.mH||x.eR||(x.eR=QT((0,g.B4)(x.tL,x),0),x.K5=0)},FAo=function(x,u){if(x.S==1){if(!u){x.u_=Math.floor(Math.random()*1E5); u=x.u_++;var k=new Jz(x,"",u);k.zj=x.uH;var U=UWS(x),m=x.Fo.clone();g.Eu(m,"RID",u);g.Eu(m,"CVER","1");T5(x,m);jmS(k,m,U);x.mH=k;x.S=2}}else x.S==3&&(u?mWG(x,u):x.V.length==0||x.mH||mWG(x))},mWG=function(x,u){if(u)if(x.UD>6){x.V=x.J.concat(x.V); x.J.length=0;var k=x.u_-1;u=UWS(x)}else k=u.D,u=u.C1;else k=x.u_++,u=UWS(x);var U=x.Fo.clone();g.Eu(U,"SID",x.K);g.Eu(U,"RID",k);g.Eu(U,"AID",x.kC);T5(x,U);k=new Jz(x,x.K,k,x.K5+1);k.zj=x.uH;k.setTimeout(1E4+Math.round(1E4*Math.random()));x.mH=k;jmS(k,U,u)},T5=function(x,u){x.P7&&(x=x.P7.VJ())&&g.YG(x,function(k,U){g.Eu(u,U,k)})},UWS=function(x){var u=Math.min(x.V.length,1E3),k=["count="+u]; if(x.UD>6&&u>0){var U=x.V[0].S;k.push("ofs="+U)}else U=0;for(var m={},F=0;F=3)return!1; x.D++;x.Zx=QT((0,g.B4)(x.AL,x),bG$(x,x.Og));x.Og++;return!0},KU=function(x,u,k){x.zL=x.j==null?k:!x.j; x.Ht=u.b$;x.B||xWt(x)},vD=function(x){x.xI!=null&&(g.JY.clearTimeout(x.xI),x.xI=null)},bG$=function(x,u){var k=5E3+Math.floor(Math.random()*1E4); x.isActive()||(k*=2);return k*u},Az=function(x,u){if(u==2||u==9){var k=null; x.P7&&(k=null);var U=(0,g.B4)(x.RjJ,x);k||(k=new g.RZ("//www.google.com/images/cleardot.gif"),B6(k));Kys(k.toString(),1E4,U)}else eN(2);h89(x,u)},h89=function(x,u){x.S=0; x.P7&&x.P7.Rq(u);XTw(x);uKt(x)},XTw=function(x){x.S=0; x.Ht=-1;if(x.P7)if(x.J.length==0&&x.V.length==0)x.P7.jc();else{var u=g.uU(x.J),k=g.uU(x.V);x.J.length=0;x.V.length=0;x.P7.jc(u,k)}},dZ=function(x,u,k){var U=g.Gc(k); if(U.S!="")u&&g.cL(U,u+"."+U.S),g.My(U,U.J);else{var m=window.location;U=EVW(m.protocol,u?u+"."+m.hostname:m.hostname,+m.port,k)}x.TX&&g.YG(x.TX,function(F,f){g.Eu(U,f,F)}); g.Eu(U,"VER",x.UD);T5(x,U);return U},qwm=function(){},sVk=function(){this.S=[]; this.V=[]},HGm=function(x){g.IP.call(this,"channelMessage"); this.message=x},R8$=function(x){g.IP.call(this,"channelError"); this.error=x},pTS=function(x,u){this.action=x; this.params=u||{}},CU=function(x,u){g.J.call(this); this.S=new g.gl(this.Y_m,0,this);g.P(this,this.S);this.tG=5E3;this.V=0;if(typeof x==="function")u&&(x=(0,g.B4)(x,u));else if(x&&typeof x.handleEvent==="function")x=(0,g.B4)(x.handleEvent,x);else throw Error("Invalid listener argument");this.J=x},c_k=function(x,u,k,U,m,F,f,V,h,X,q){k=k===void 0?!1:k; U=U===void 0?function(){return""}:U; m=m===void 0?!1:m;F=F===void 0?!1:F;f=f===void 0?!1:f;V=V===void 0?!0:V;h=h===void 0?function(){return g.Yp({})}:h; X=X===void 0?!1:X;this.IS=x;this.t5=u;this.j=new g.rl;this.V=new CU(this.Ret,this);this.S=null;this.D=!1;this.U=null;this.Ok="";this.RS=this.B=0;this.J=[];this.Uk=k;this.ut=U;this.N=F;this.q$=h;this.c$=q;this.RU=f;this.gm=V;this.nm=null;this.K=g.Yp();this.Nj=m;this.oS=X;this.P$=new GDW;this.GY=new zQm;this.QX=new W_$;this.B$=new OTW;this.ud=new iTZ;this.QI=new l2G},y_s=function(x,u,k,U,m){M4m(x); if(x.S){var F=g.xc("ID_TOKEN"),f=x.S.uH||{};F?f["x-youtube-identity-token"]=F:delete f["x-youtube-identity-token"];x.S.uH=f}wTZ(x);U?(U.getState()!=3&&kZG(U)==0||U.getState(),x.S.connect(u,k,x.t5,U.K,U.kC)):m?x.S.connect(u,k,x.t5,m.sessionId,m.arrayId):x.S.connect(u,k,x.t5)},t49=function(x){var u,k; g.Z(function(U){if(U.S==1)return g.tY(U,2),x.gm?g.n(U,LU(x),2):(LU(x),U.TY(2));g.zx(U);u=x.J;x.J=[];k=u.length;Ywt(x,u,k);Dw(x);return g.W4(U,0)})},Ywt=function(x,u,k){for(var U=0;U0?k=Object.assign({},k,u):delete k.Authorization;x.S.uH=k}},wTZ=function(x){x.c$&&!x.N&&GZZ(x,x.c$())},SN=function(x){this.scheme="https"; this.port=this.domain="";this.S="/api/lounge";this.V=!0;x=x||document.location.href;var u=Number(g.JS(4,x))||"";u&&(this.port=":"+u);this.domain=g.P9(x)||"";x=g.lZ();x.search("MSIE")>=0&&(x=x.match(/MSIE ([\d.]+)/)[1],g.iZ(x,"10.0")<0&&(this.V=!1))},BD=function(x,u){var k=x.S; x.V&&(k=x.scheme+"://"+x.domain+x.port+x.S);return g.AS(k+u,{})},z8w=function(x,u){g.kp.call(this); var k=this;this.S$=x();this.S$.subscribe("handlerOpened",this.cK,this);this.S$.subscribe("handlerClosed",this.onClosed,this);this.S$.subscribe("handlerError",function(U,m){k.onError(m)}); this.S$.subscribe("handlerMessage",this.onMessage,this);this.S=u},WAW=function(x,u,k){var U=this; k=k===void 0?function(){return""}:k; var m=m===void 0?new WyG:m;var F=F===void 0?new g.rl:F;this.pathPrefix=x;this.S=u;this.Ok=k;this.N=F;this.B=null;this.U=this.D=0;this.channel=null;this.j=0;this.J=new CU(function(){U.J.isActive();var f;((f=U.channel)==null?void 0:utw((new l7s(f,f.S)).S.V))===0&&U.connect(U.B,U.D)}); this.K={};this.V={};this.t5=!1;this.logger=null;this.RS=[];this.b4=void 0;this.c$=new GDW;this.nm=new zQm;this.gm=new W_$;this.ut=new OTW},OGZ=function(x){g.Lk(x.channel,"m",function(){x.j=3; x.J.reset();x.B=null;x.D=0;for(var u=g.w(x.RS),k=u.next();!k.done;k=u.next())k=k.value,x.channel&&x.channel.send(k);x.RS=[];x.publish("webChannelOpened");x.c$.l4("WEB_CHANNEL")}); g.Lk(x.channel,"n",function(){x.j=0;x.J.isActive()||x.publish("webChannelClosed");var u,k=(u=x.channel)==null?void 0:n$9(new l7s(u,u.S));k&&(x.RS=[].concat(g.t(k)));x.nm.l4("WEB_CHANNEL")}); g.Lk(x.channel,"p",function(u){var k=u.data;k[0]==="gracefulReconnect"?(x.J.start(),x.channel&&x.channel.close()):x.publish("webChannelMessage",new pTS(k[0],k[1]));x.b4=u.statusCode;x.gm.l4("WEB_CHANNEL")}); g.Lk(x.channel,"o",function(){x.b4===401||x.J.start();x.publish("webChannelError");x.ut.l4("WEB_CHANNEL")})},iGG=function(x){var u=x.Ok(); u?x.K["x-youtube-lounge-xsrf-token"]=u:delete x.K["x-youtube-lounge-xsrf-token"]},loG=function(x){g.kp.call(this); this.S=x();this.S.subscribe("webChannelOpened",this.ll,this);this.S.subscribe("webChannelClosed",this.onClosed,this);this.S.subscribe("webChannelError",this.onError,this);this.S.subscribe("webChannelMessage",this.onMessage,this)},nsW=function(x,u,k,U,m){function F(){return new c_k(BD(x,"/bc"),u,!1,k,U)} k=k===void 0?function(){return""}:k; return g.Ww("enable_mdx_web_channel_desktop")?new loG(function(){return new WAW(BD(x,"/wc"),u,k)}):new z8w(F,m)},ZGk=function(){var x=$WG; r_G();oX.push(x);jVG()},xN=function(x,u){r_G(); var k=aoB(x,String(u));oX.length==0?QVS(k):(jVG(),g.q9(oX,function(U){U(k)}))},uj=function(x){xN("CP",x)},r_G=function(){oX||(oX=g.dQ("yt.mdx.remote.debug.handlers_")||[],g.ND("yt.mdx.remote.debug.handlers_",oX))},QVS=function(x){var u=(gr+1)%50; gr=u;kN[u]=x;Ug||(Ug=u==49)},jVG=function(){var x=oX; if(kN[0]){var u=Ug?gr:-1,k={};do k={mu:void 0},u=(u+1)%50,k.mu=kN[u],g.q9(x,function(U){return function(m){m(U.mu)}}(k)); while(u!=gr);kN=Array(50);gr=-1;Ug=!1}},aoB=function(x,u){var k=(Date.now()-IoW)/1E3; k.toFixed&&(k=k.toFixed(3));var U=[];U.push("[",k+"s","] ");U.push("[","yt.mdx.remote","] ");U.push(x+": "+u,"\n");return U.join("")},mp=function(x){g.Hm.call(this); this.j=x;this.screens=[]},e8o=function(x,u){var k=x.get(u.uuid)||x.get(u.id); if(k)return x=k.name,k.id=u.id||k.id,k.name=u.name,k.token=u.token,k.uuid=u.uuid||k.uuid,k.name!=x;x.screens.push(u);return!0},J_w=function(x,u){var k=x.screens.length!=u.length; x.screens=g.sZ(x.screens,function(F){return!!bVt(u,F)}); for(var U=u.length,m=0;m0&&x.K0&&Mq(x,k)},function(u){x.N=function(){}; x.Ho(u)})},RF9=function(x){var u={}; u.pairingCode=x.nm;u.theme=x.q$;wwm()&&(u.env_useStageMdx=1);return g.T1(u)},pMZ=function(x){return new Promise(function(u){x.nm=FXw(); if(x.c$){var k=new chrome.cast.DialLaunchResponse(!0,RF9(x));u(k);HWm(x)}else x.t5=function(){g.EQ(x.U);x.t5=function(){}; x.U=NaN;var U=new chrome.cast.DialLaunchResponse(!0,RF9(x));u(U);HWm(x)},x.U=g.Yc(function(){x.t5()},100)})},MVS=function(x,u,k){x.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(u)); var U=new FE(u);return(new Promise(function(m){cqZ(x,U,function(F){F?(x.RS=!0,XL(x.K,U),sg(x,U),Mq(x,k)):g.kc(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(u)+" is not online."));m(F)},5)})).then(function(m){return m?new chrome.cast.DialLaunchResponse(!1):pMZ(x)})},wMm=function(x,u){var k=x.B.receiver.label,U=x.V.friendlyName; return(new Promise(function(m){BBm(x.K,k,u,U,function(F){F&&F.token&&sg(x,F);m(F)},function(F){Hy(x,"Failed to get DIAL screen: "+F); m(null)})})).then(function(m){return m&&m.token?new chrome.cast.DialLaunchResponse(!1):pMZ(x)})},cqZ=function(x,u,k,U){g.EQ(x.j); x.j=0;x5s(x.K,u,function(m){m||U<0?k(m):x.j=g.Yc(function(){cqZ(x,u,k,U-1)},300)})},Mq=function(x,u){x.info("getDialAppInfoWithTimeout_ "+u); cy(x)&&(g.EQ(x.D),x.D=0,u==0?yqG(x):x.D=g.Yc(function(){yqG(x)},u))},yqG=function(x){cy(x)&&x.J.getDialAppInfo(function(u){x.info("getDialAppInfo dialLaunchData: "+JSON.stringify(u)); u=u.extraData||{};var k=null;if(u.loungeToken){var U;((U=x.S)==null?void 0:U.token)==u.loungeToken&&(k="staleLoungeToken")}else k="missingLoungeToken";k?(x.Ok=k,Mq(x,3E4)):(x.RS=!1,x.Ok="unknown",U5k(x,u.loungeToken),Mq(x,u.loungeTokenRefreshIntervalMs))},function(u){x.info("getDialAppInfo error: "+u); x.Ok="noLoungeTokenResponse";Mq(x,3E4)})},YJW=function(x){g.EQ(x.j); x.j=0;g.EQ(x.D);x.D=0;x.N();x.N=function(){}; g.EQ(x.U)},wr=function(x,u){qq.call(this,x,u,"ManualSession"); this.J=g.Yc((0,g.B4)(this.RI,this,null),150)},yv=function(x,u){g.Hm.call(this); this.config_=u;this.V=x;this.B=u.appId||"233637DE";this.K=u.theme||"cl";this.U=u.disableCastApi||!1;this.j=u.forceMirroring||!1;this.S=null;this.D=!1;this.J=[];this.N=(0,g.B4)(this.va$,this)},tV9=function(x,u){return u?g.Cm(x.J,function(k){return fU(u,k.label)},x):null},YN=function(x){xN("Controller",x)},$WG=function(x){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(x)},tF=function(x){return x.D||!!x.J.length||!!x.S},Eg=function(x,u,k){u!=x.S&&(g.bZ(x.S),(x.S=u)?(k?x.publish("yt-remote-cast2-receiver-resumed", u.V):x.publish("yt-remote-cast2-receiver-selected",u.V),u.subscribe("sessionScreen",(0,g.B4)(x.Qb,x,u)),u.subscribe("sessionFailed",function(){return EB$(x,u)}),u.S?x.publish("yt-remote-cast2-session-change",u.S):k&&x.S.RI(null)):x.publish("yt-remote-cast2-session-change",null))},EB$=function(x,u){x.S==u&&x.publish("yt-remote-cast2-session-failed")},GBW=function(x){var u=x.V.JL(),k=x.S&&x.S.V; x=g.nl(u,function(U){k&&fU(U,k.label)&&(k=null);var m=U.uuid?U.uuid:U.id,F=tV9(this,U);F?(F.label=m,F.friendlyName=U.name):(F=new chrome.cast.Receiver(m,U.name),F.receiverType=chrome.cast.ReceiverType.CUSTOM);return F},x); k&&(k.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(k=new chrome.cast.Receiver(k.label,k.friendlyName),k.receiverType=chrome.cast.ReceiverType.CUSTOM),x.push(k));return x},$5s=function(x,u,k,U){U.disableCastApi?GS("Cannot initialize because disabled by Mdx config."):zFt()?WUk(u,U)&&(OWm(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?iWm(x,k):(window.__onGCastApiAvailable=function(m,F){m?iWm(x,k):(zS("Failed to load cast API: "+F),lYS(!1),OWm(!1),g.PG("yt-remote-cast-available"),g.PG("yt-remote-cast-receiver"), nB$(),k(!1))},U.loadCastApiSetupScript?g.HO("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?YQG()>=60&&ncG():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?zIt():YQG()>=89?rX$():(lvo(),pU($lG.map(WXS))))):GS("Cannot initialize because not running Chrome")},nB$=function(){GS("dispose"); var x=Wy();x&&x.dispose();g.ND("yt.mdx.remote.cloudview.instance_",null);rqk(!1);g.qb(jIG);jIG.length=0},Og=function(){return!!g.Ji("yt-remote-cast-installed")},ZWm=function(){var x=g.Ji("yt-remote-cast-receiver"); return x?x.friendlyName:null},aYZ=function(){GS("clearCurrentReceiver"); g.PG("yt-remote-cast-receiver")},QIm=function(){return Og()?Wy()?Wy().getCastSession():(zS("getCastSelector: Cast is not initialized."),null):(zS("getCastSelector: Cast API is not installed!"),null)},IYt=function(){Og()?Wy()?ij()?(GS("Requesting cast selector."),Wy().requestSession()):(GS("Wait for cast API to be ready to request the session."),jIG.push(g.X4("yt-remote-cast2-api-ready",IYt))):zS("requestCastSelector: Cast is not initialized."):zS("requestCastSelector: Cast API is not installed!")}, lj=function(x,u){ij()?Wy().setConnectedScreenStatus(x,u):zS("setConnectedScreenStatus called before ready.")},zFt=function(){var x=g.lZ().search(/ (CrMo|Chrome|CriOS)\//)>=0; return g.QM||x},eFB=function(x,u){Wy().init(x,u)},WUk=function(x,u){var k=!1; Wy()||(x=new yv(x,u),x.subscribe("yt-remote-cast2-availability-change",function(U){g.eZ("yt-remote-cast-available",U);HD("yt-remote-cast2-availability-change",U)}),x.subscribe("yt-remote-cast2-receiver-selected",function(U){GS("onReceiverSelected: "+U.friendlyName); g.eZ("yt-remote-cast-receiver",U);HD("yt-remote-cast2-receiver-selected",U)}),x.subscribe("yt-remote-cast2-receiver-resumed",function(U){GS("onReceiverResumed: "+U.friendlyName); g.eZ("yt-remote-cast-receiver",U);HD("yt-remote-cast2-receiver-resumed",U)}),x.subscribe("yt-remote-cast2-session-change",function(U){GS("onSessionChange: "+bb(U)); U||g.PG("yt-remote-cast-receiver");HD("yt-remote-cast2-session-change",U)}),g.ND("yt.mdx.remote.cloudview.instance_",x),k=!0); GS("cloudview.createSingleton_: "+k);return k},Wy=function(){return g.dQ("yt.mdx.remote.cloudview.instance_")},iWm=function(x,u){lYS(!0); OWm(!1);eFB(x,function(k){k?(rqk(!0),g.s3("yt-remote-cast2-api-ready")):(zS("Failed to initialize cast API."),lYS(!1),g.PG("yt-remote-cast-available"),g.PG("yt-remote-cast-receiver"),nB$());u(k)})},GS=function(x){xN("cloudview",x)},zS=function(x){xN("cloudview",x)},lYS=function(x){GS("setCastInstalled_ "+x); g.eZ("yt-remote-cast-installed",x)},ij=function(){return!!g.dQ("yt.mdx.remote.cloudview.apiReady_")},rqk=function(x){GS("setApiReady_ "+x); g.ND("yt.mdx.remote.cloudview.apiReady_",x)},OWm=function(x){g.ND("yt.mdx.remote.cloudview.initializing_",x)},nL=function(x){this.index=-1; this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.j=this.D=0;this.trackData=null;this.wD=this.Nt=!1;this.B=this.N=this.S=this.K=0;this.J=NaN;this.V=!1;this.reset(x)},Jqk=function(x){x.audioTrackId=null; x.trackData=null;x.playerState=-1;x.Nt=!1;x.wD=!1;x.D=0;x.j=g.xw();x.K=0;x.S=0;x.N=0;x.B=0;x.J=NaN;x.V=!1},$N=function(x){return x.isPlaying()?(g.xw()-x.j)/1E3:0},rr=function(x,u){x.D=u; x.j=g.xw()},jx=function(x){switch(x.playerState){case 1:case 1081:return(g.xw()-x.j)/1E3+x.D; case -1E3:return 0}return x.D},Zr=function(x,u,k){var U=x.videoId; x.videoId=u;x.index=k;u!=U&&Jqk(x)},PhG=function(x){var u={}; u.index=x.index;u.listId=x.listId;u.videoId=x.videoId;u.playerState=x.playerState;u.volume=x.volume;u.muted=x.muted;u.audioTrackId=x.audioTrackId;u.trackData=g.av(x.trackData);u.hasPrevious=x.Nt;u.hasNext=x.wD;u.playerTime=x.D;u.playerTimeAt=x.j;u.seekableStart=x.K;u.seekableEnd=x.S;u.duration=x.N;u.loadedTime=x.B;u.liveIngestionTime=x.J;return u},Qv=function(x,u){g.Hm.call(this); var k=this;this.J=0;this.K=x;this.j=[];this.N=new sVk;this.V=this.S=null;this.U=(0,g.B4)(this.W5G,this);this.D=(0,g.B4)(this.CU,this);this.B=(0,g.B4)(this.et$,this);this.t5=(0,g.B4)(this.l3$,this);var U=0;x?(U=x.getProxyState(),U!=3&&(x.subscribe("proxyStateChange",this.cj,this),NbW(this))):U=3;U!=0&&(u?this.cj(U):g.Yc(function(){k.cj(U)},0)); (x=QIm())&&aX(this,x);this.subscribe("yt-remote-cast2-session-change",this.t5)},IX=function(x){return new nL(x.K.getPlayerContextData())},NbW=function(x){g.q9("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(u){this.j.push(this.K.subscribe(u,g.o$(this.UsX,u),this))},x)},d5o=function(x){g.q9(x.j,function(u){this.K.unsubscribeByKey(u)},x); x.j.length=0},ex=function(x){return x.getState()==1},JF=function(x,u){var k=x.N; k.S.length+k.V.length<50&&x.N.enqueue(u)},KU$=function(x,u,k){var U=IX(x); rr(U,k);U.playerState!=-1E3&&(U.playerState=u);Py(x,U)},Nq=function(x,u,k){x.K.sendMessage(u,k)},Py=function(x,u){d5o(x); x.K.setPlayerContextData(PhG(u));NbW(x)},aX=function(x,u){x.V&&(x.V.removeUpdateListener(x.U),x.V.removeMediaListener(x.D),x.CU(null)); x.V=u;x.V&&(uj("Setting cast session: "+x.V.sessionId),x.V.addUpdateListener(x.U),x.V.addMediaListener(x.D),x.V.media.length&&x.CU(x.V.media[0]))},vBw=function(x){var u=x.S.media,k=x.S.customData; if(u&&k){var U=IX(x);u.contentId!=U.videoId&&uj("Cast changing video to: "+u.contentId);U.videoId=u.contentId;U.playerState=k.playerState;rr(U,x.S.getEstimatedTime());Py(x,U)}else uj("No cast media video. Ignoring state update.")},dr=function(x,u,k){return(0,g.B4)(function(U){this.qF("Failed to "+u+" with cast v2 channel. Error code: "+U.code); U.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.qF("Retrying "+u+" using MDx browser channel."),Nq(this,u,k))},x)},TS=function(x,u,k,U){U=U===void 0?!1:U; g.Hm.call(this);var m=this;this.j=NaN;this.nm=!1;this.U=this.B=this.RS=this.Ok=NaN;this.t5=[];this.N=this.D=this.K=this.S=this.V=null;this.c$=x;this.gm=U;this.t5.push(g.OM(window,"beforeunload",function(){m.Ug(2)})); this.J=[];this.S=new nL;this.q$=u.id;this.ut=u.idType;this.V=nsW(this.c$,k,this.Tv,this.ut=="shortLived",this.q$);this.V.listen("channelOpened",function(){Tbt(m)}); this.V.listen("channelClosed",function(){KL("Channel closed");isNaN(m.j)?qG(!0):qG();m.dispose()}); this.V.listen("channelError",function(F){qG();isNaN(m.BF())?(F==1&&m.ut=="shortLived"&&m.publish("browserChannelAuthError",F),KL("Channel error: "+F+" without reconnection"),m.dispose()):(m.nm=!0,KL("Channel error: "+F+" with reconnection in "+m.BF()+" ms"),vy(m,2))}); this.V.listen("channelMessage",function(F){AqG(m,F)}); this.V.zl(u.token);this.subscribe("remoteQueueChange",function(){var F=m.S.videoId;g.NJ()&&g.eZ("yt-remote-session-video-id",F)})},ChG=function(x){return g.Cm(x.J,function(u){return u.type=="LOUNGE_SCREEN"})},KL=function(x){xN("conn",x)},vy=function(x,u){x.publish("proxyStateChange",u)},LUs=function(x){x.j=g.Yc(function(){KL("Connecting timeout"); x.Ug(1)},2E4)},D5B=function(x){g.EQ(x.j); x.j=NaN},SJk=function(x){g.EQ(x.Ok); x.Ok=NaN},oEt=function(x){BbS(x); x.RS=g.Yc(function(){AF(x,"getNowPlaying")},2E4)},BbS=function(x){g.EQ(x.RS); x.RS=NaN},Tbt=function(x){KL("Channel opened"); x.nm&&(x.nm=!1,SJk(x),x.Ok=g.Yc(function(){KL("Timing out waiting for a screen.");x.Ug(1)},15E3))},u4W=function(x,u){var k=null; if(u){var U=ChG(x);U&&(k={clientName:U.clientName,deviceMake:U.brand,deviceModel:U.model,osVersion:U.osVersion})}g.ND("yt.mdx.remote.remoteClient_",k);u&&(D5B(x),SJk(x));k=x.V.eP()&&isNaN(x.j);u==k?u&&(vy(x,1),AF(x,"getSubtitlesTrack")):u?(x.G6()&&x.S.reset(),vy(x,1),AF(x,"getNowPlaying"),xbG(x)):x.Ug(1)},gEo=function(x,u){var k=u.params.videoId; delete u.params.videoId;k==x.S.videoId&&(g.$G(u.params)?x.S.trackData=null:x.S.trackData=u.params,x.publish("remotePlayerChange"))},kfo=function(x,u,k){var U=u.params.videoId||u.params.video_id,m=parseInt(u.params.currentIndex,10); x.S.listId=u.params.listId||x.S.listId;Zr(x.S,U,m);x.publish("remoteQueueChange",k)},mb9=function(x,u){u.params=u.params||{}; kfo(x,u,"NOW_PLAYING_MAY_CHANGE");Ubm(x,u);x.publish("autoplayDismissed")},Ubm=function(x,u){var k=parseInt(u.params.currentTime||u.params.current_time,10); rr(x.S,isNaN(k)?0:k);k=parseInt(u.params.state,10);k=isNaN(k)?-1:k;k==-1&&x.S.playerState==-1E3&&(k=-1E3);x.S.playerState=k;k=Number(u.params.loadedTime);x.S.B=isNaN(k)?0:k;x.S.OM(Number(u.params.duration));k=x.S;var U=Number(u.params.liveIngestionTime);k.J=U;k.V=isNaN(U)?!1:!0;k=x.S;U=Number(u.params.seekableStartTime);u=Number(u.params.seekableEndTime);k.K=isNaN(U)?0:U;k.S=isNaN(u)?0:u;x.S.playerState==1?oEt(x):BbS(x);x.publish("remotePlayerChange")},FvZ=function(x,u){if(x.S.playerState!=-1E3){var k= 1085; switch(parseInt(u.params.adState,10)){case 1:k=1081;break;case 2:k=1084;break;case 0:k=1083}x.S.playerState=k;u=parseInt(u.params.currentTime,10);rr(x.S,isNaN(u)?0:u);x.publish("remotePlayerChange")}},f4w=function(x,u){var k=u.params.muted=="true"; x.S.volume=parseInt(u.params.volume,10);x.S.muted=k;x.publish("remotePlayerChange")},bCt=function(x,u){x.D=u.params.videoId; x.publish("nowAutoplaying",parseInt(u.params.timeout,10))},VaZ=function(x,u){x.D=u.params.videoId||null; x.publish("autoplayUpNext",x.D)},hPG=function(x,u){x.N=u.params.autoplayMode; x.publish("autoplayModeChange",x.N);x.N=="DISABLED"&&x.publish("autoplayDismissed")},XOW=function(x,u){var k=u.params.hasNext=="true"; x.S.Nt=u.params.hasPrevious=="true";x.S.wD=k;x.publish("previousNextChange")},AqG=function(x,u){u=u.message; u.params?KL("Received: action="+u.action+", params="+g.jm(u.params)):KL("Received: action="+u.action+" {}");switch(u.action){case "loungeStatus":u=xf(u.params.devices);x.J=g.nl(u,function(U){return new m$(U)}); u=!!g.Cm(x.J,function(U){return U.type=="LOUNGE_SCREEN"}); u4W(x,u);u=x.BB("mlm");x.publish("multiStateLoopEnabled",u);break;case "loungeScreenDisconnected":g.o5(x.J,function(U){return U.type=="LOUNGE_SCREEN"}); u4W(x,!1);break;case "remoteConnected":var k=new m$(xf(u.params.device));g.Cm(x.J,function(U){return U.mE(k)})||pg$(x.J,k); break;case "remoteDisconnected":k=new m$(xf(u.params.device));g.o5(x.J,function(U){return U.mE(k)}); break;case "gracefulDisconnect":break;case "playlistModified":kfo(x,u,"QUEUE_MODIFIED");break;case "nowPlaying":mb9(x,u);break;case "onStateChange":Ubm(x,u);break;case "onAdStateChange":FvZ(x,u);break;case "onVolumeChanged":f4w(x,u);break;case "onSubtitlesTrackChanged":gEo(x,u);break;case "nowAutoplaying":bCt(x,u);break;case "autoplayDismissed":x.publish("autoplayDismissed");break;case "autoplayUpNext":VaZ(x,u);break;case "onAutoplayModeChanged":hPG(x,u);break;case "onHasPreviousNextChanged":XOW(x, u);break;case "requestAssistedSignIn":x.publish("assistedSignInRequested",u.params.authCode);break;case "onLoopModeChanged":x.publish("loopModeChange",u.params.loopMode);break;default:KL("Unrecognized action: "+u.action)}},xbG=function(x){g.EQ(x.U); x.U=g.Yc(function(){x.Ug(1)},864E5)},AF=function(x,u,k){k?KL("Sending: action="+u+", params="+g.jm(k)):KL("Sending: action="+u); x.V.sendMessage(u,k)},q3k=function(x){mp.call(this,"ScreenServiceProxy"); this.qT=x;this.S=[];this.S.push(this.qT.$_s("screenChange",(0,g.B4)(this.I4,this)));this.S.push(this.qT.$_s("onlineScreenChange",(0,g.B4)(this.V$X,this)))},crS=function(x,u){Mc$(); if(!sO||!sO.get("yt-remote-disable-remote-module-for-dev")){u=g.xc("MDX_CONFIG")||u;VcG();soW();CL||(CL=new SN(u?u.loungeApiHost:void 0),wwm()&&(CL.S="/api/loungedev"));LL||(LL=g.dQ("yt.mdx.remote.deferredProxies_")||[],g.ND("yt.mdx.remote.deferredProxies_",LL));sys();var k=Dr();if(!k){var U=new hF(CL,u?u.disableAutomaticScreenCache||!1:!1);g.ND("yt.mdx.remote.screenService_",U);k=Dr();var m={};u&&(m={appId:u.appId,disableDial:u.disableDial,theme:u.theme,loadCastApiSetupScript:u.loadCastApiSetupScript, disableCastApi:u.disableCastApi,enableDialLoungeToken:u.enableDialLoungeToken,enableCastLoungeToken:u.enableCastLoungeToken,forceMirroring:u.forceMirroring});g.ND("yt.mdx.remote.enableConnectWithInitialState_",u?u.enableConnectWithInitialState||!1:!1);$5s(x,U,function(F){F?Sx()&&lj(Sx(),"YouTube TV"):U.subscribe("onlineScreenChange",function(){HD("yt-remote-receiver-availability-change")})},m)}u&&!g.dQ("yt.mdx.remote.initialized_")&&(g.ND("yt.mdx.remote.initialized_",!0),By("Initializing: "+g.jm(u)), ok.push(g.X4("yt-remote-cast2-api-ready",function(){HD("yt-remote-api-ready")})),ok.push(g.X4("yt-remote-cast2-availability-change",function(){HD("yt-remote-receiver-availability-change")})),ok.push(g.X4("yt-remote-cast2-receiver-selected",function(){xM(null); HD("yt-remote-auto-connect","cast-selector-receiver")})),ok.push(g.X4("yt-remote-cast2-receiver-resumed",function(){HD("yt-remote-receiver-resumed","cast-selector-receiver")})),ok.push(g.X4("yt-remote-cast2-session-change",HCw)),ok.push(g.X4("yt-remote-connection-change",function(F){F?lj(Sx(),"YouTube TV"):uT()||(lj(null,null),aYZ())})),ok.push(g.X4("yt-remote-cast2-session-failed",function(){HD("yt-remote-connection-failed")})),x=RPt(),u.isAuto&&(x.id+="#dial"),m=u.capabilities||[],g.Ww("desktop_enable_autoplay")&& m.push("atp"),m.length>0&&(x.capabilities=m),x.name=u.device,x.app=u.app,(u=u.theme)&&(x.theme=u),By(" -- with channel params: "+g.jm(x)),x?(g.eZ("yt-remote-session-app",x.app),g.eZ("yt-remote-session-name",x.name)):(g.PG("yt-remote-session-app"),g.PG("yt-remote-session-name")),g.ND("yt.mdx.remote.channelParams_",x),k.start(),Sx()||pOt())}},Mao=function(){var x=Dr().qT.$_gos(); var u=gv();u&&kM()&&(bVt(x,u)||x.push(u));return fvt(x)},yrS=function(){var x=wOk(); !x&&Og()&&ZWm()&&(x={key:"cast-selector-receiver",name:ZWm()});return x},wOk=function(){var x=Mao(),u=gv(); u||(u=uT());return g.Cm(x,function(k){return u&&fU(u,k.key)?!0:!1})},gv=function(){var x=Sx(); if(!x)return null;var u=Dr().rD();return VT(u,x)},HCw=function(x){By("remote.onCastSessionChange_: "+bb(x)); if(x){var u=gv();if(u&&u.id==x.id){if(lj(u.id,"YouTube TV"),x.idType=="shortLived"&&(x=x.token))Ut&&(Ut.token=x),(u=kM())&&u.zl(x)}else u&&mH(),FD(x,1)}else kM()&&mH()},mH=function(){ij()?Wy().stopSession():zS("stopSession called before API ready."); var x=kM();x&&(x.disconnect(1),Y3$(null))},ta$=function(){var x=kM(); return!!x&&x.getProxyState()!=3},By=function(x){xN("remote",x)},Dr=function(){if(!EEk){var x=g.dQ("yt.mdx.remote.screenService_"); EEk=x?new q3k(x):null}return EEk},Sx=function(){return g.dQ("yt.mdx.remote.currentScreenId_")},GfB=function(x){g.ND("yt.mdx.remote.currentScreenId_",x)},zPB=function(){return g.dQ("yt.mdx.remote.connectData_")},xM=function(x){g.ND("yt.mdx.remote.connectData_",x)},kM=function(){return g.dQ("yt.mdx.remote.connection_")},Y3$=function(x){var u=kM(); xM(null);x||GfB("");g.ND("yt.mdx.remote.connection_",x);LL&&(g.q9(LL,function(k){k(x)}),LL.length=0); u&&!x?HD("yt-remote-connection-change",!1):!u&&x&&HD("yt-remote-connection-change",!0)},uT=function(){var x=g.NJ(); if(!x)return null;var u=Dr();if(!u)return null;u=u.rD();return VT(u,x)},FD=function(x,u){Sx(); gv()&&gv();if(fE)Ut=x;else{GfB(x.id);var k=g.dQ("yt.mdx.remote.enableConnectWithInitialState_")||!1;x=new TS(CL,x,RPt(),k);x.connect(u,zPB());x.subscribe("beforeDisconnect",function(U){HD("yt-remote-before-disconnect",U)}); x.subscribe("beforeDispose",function(){kM()&&(kM(),Y3$(null))}); x.subscribe("browserChannelAuthError",function(){var U=gv();U&&U.idType=="shortLived"&&(ij()?Wy().handleBrowserChannelAuthError():zS("refreshLoungeToken called before API ready."))}); Y3$(x)}},pOt=function(){var x=uT(); x?(By("Resume connection to: "+bb(x)),FD(x,0)):(qG(),aYZ(),By("Skipping connecting because no session screen found."))},sys=function(){var x=RPt(); if(g.$G(x)){x=XE();var u=g.Ji("yt-remote-session-name")||"",k=g.Ji("yt-remote-session-app")||"";x={device:"REMOTE_CONTROL",id:x,name:u,app:k,mdxVersion:3};x.authuser=String(g.xc("SESSION_INDEX","0"));(u=g.xc("DELEGATED_SESSION_ID"))&&(x.pageId=String(u));g.ND("yt.mdx.remote.channelParams_",x)}},RPt=function(){return g.dQ("yt.mdx.remote.channelParams_")||{}},iCs=function(x,u,k){g.J.call(this); var U=this;this.module=x;this.W=u;this.iE=k;this.events=new g.Pr(this);this.K=!1;this.N=new g.fn(64);this.S=new g.gl(this.hH,500,this);this.V=new g.gl(this.gA,1E3,this);this.D=new cD(this.mzY,0,this);this.J={};this.B=new g.gl(this.lT,1E3,this);this.j=new g.FH(this.seekTo,1E3,this);this.U=this.events.Y(this.W,"onVolumeChange",function(m){Wvs(U,m)}); g.P(this,this.events);this.events.Y(u,"onCaptionsTrackListChanged",this.PEm);this.events.Y(u,"captionschanged",this.uvV);this.events.Y(u,"captionssettingschanged",this.IJ);this.events.Y(u,"videoplayerreset",this.SW);this.events.Y(u,"mdxautoplaycancel",function(){U.iE.Q3()}); u.G("enable_mdx_video_play_directly")&&this.events.Y(u,"videodatachange",function(){OC9(U.module)||bT(U)||VJ(U,0)}); x=this.iE;x.Ft();x.subscribe("proxyStateChange",this.bS,this);x.subscribe("remotePlayerChange",this.Sm,this);x.subscribe("remoteQueueChange",this.SW,this);x.subscribe("previousNextChange",this.Et,this);x.subscribe("nowAutoplaying",this.FN,this);x.subscribe("autoplayDismissed",this.M1,this);g.P(this,this.S);g.P(this,this.V);g.P(this,this.D);g.P(this,this.B);g.P(this,this.j);this.IJ();this.SW();this.Sm()},Wvs=function(x,u){if(bT(x)){x.iE.unsubscribe("remotePlayerChange",x.Sm,x); var k=Math.round(u.volume);u=!!u.muted;var U=IX(x.iE);if(k!==U.volume||u!==U.muted)x.iE.setVolume(k,u),x.B.start();x.iE.subscribe("remotePlayerChange",x.Sm,x)}},l4G=function(x){x.jk(0); x.S.stop();x.uE(new g.fn(64))},nEo=function(x,u){if(bT(x)&&!x.K){var k=null; u&&(k={style:x.W.getSubtitlesUserSettings()},Object.assign(k,u));x.iE.nJ(x.W.getVideoData(1).videoId,k);x.J=IX(x.iE).trackData}},VJ=function(x,u){var k=x.W.getPlaylist(); if(k==null?0:k.listId){var U=k.index;var m=k.listId.toString()}k=x.W.getVideoData(1);x.iE.playVideo(k.videoId,u,U,m,k.playerParams,k.ut,RQB(k));x.uE(new g.fn(1))},$bk=function(x,u){if(u){var k=x.W.getOption("captions","tracklist",{Nf:1}); k&&k.length?(x.W.setOption("captions","track",u),x.K=!1):(x.W.loadModule("captions"),x.K=!0)}else x.W.setOption("captions","track",{})},bT=function(x){return IX(x.iE).videoId===x.W.getVideoData(1).videoId},rrk=function(x){this.S=x},hP=function(){g.T.call(this,{T:"div", Z:"ytp-mdx-popup-dialog",C:{role:"dialog"},L:[{T:"div",Z:"ytp-mdx-popup-dialog-inner-content",L:[{T:"div",Z:"ytp-mdx-popup-title",VX:"You're signed out"},{T:"div",Z:"ytp-mdx-popup-description",VX:"Videos you watch may be added to the TV's watch history and influence TV recommendations. To avoid this, cancel and sign in to YouTube on your computer."},{T:"div",Z:"ytp-mdx-privacy-popup-buttons",L:[{T:"button",W$:["ytp-button","ytp-mdx-privacy-popup-cancel"],VX:"Cancel"},{T:"button",W$:["ytp-button", "ytp-mdx-privacy-popup-confirm"],VX:"Confirm"}]}]}]});this.fade=new g.fD(this,250);this.cancelButton=this.k$("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.k$("ytp-mdx-privacy-popup-confirm");g.P(this,this.fade);this.Y(this.cancelButton,"click",this.S);this.Y(this.confirmButton,"click",this.V)},XD=function(x){g.T.call(this,{T:"div", Z:"ytp-remote",L:[{T:"div",Z:"ytp-remote-display-status",L:[{T:"div",Z:"ytp-remote-display-status-icon",L:[g.HGR()]},{T:"div",Z:"ytp-remote-display-status-text",VX:"{{statustext}}"}]}]});this.api=x;this.fade=new g.fD(this,250);g.P(this,this.fade);this.Y(x,"presentingplayerstatechange",this.onStateChange);this.Pl(x.getPlayerStateObject())},q1=function(x,u){g.dd.call(this,"Play on",1,x,u); this.W=x;this.Cj={};this.Y(x,"onMdxReceiversChange",this.K);this.Y(x,"presentingplayerstatechange",this.K);this.K()},jyW=function(x){g.wj.call(this,x); this.BD={key:FXw(),name:"This computer"};this.lH=null;this.subscriptions=[];this.qY=this.iE=null;this.Cj=[this.BD];this.DY=this.BD;this.Sj=new g.fn(64);this.RO=0;this.lc=-1;this.NB=!1;this.lJ=this.gQ=this.Xh=null;if(!g.IB(this.player.X())&&!g.KD(this.player.X())){x=this.player;var u=g.cl(x);u&&(u=u.Zu())&&(u=new q1(x,u),g.P(this,u));u=new XD(x);g.P(this,u);g.QD(x,u.element,4);this.Xh=new hP;g.P(this,this.Xh);g.QD(x,this.Xh.element,4);this.NB=!!uT()}},HP=function(x){x.gQ&&(x.player.removeEventListener("presentingplayerstatechange", x.gQ),x.gQ=null)},ZCo=function(x,u,k){x.Sj=k; x.player.publish("presentingplayerstatechange",new g.wy(k,u))},Rk=function(x,u){if(u.key!==x.DY.key)if(u.key===x.BD.key)mH(); else if(OC9(x)&&a4G(x),x.DY=u,!x.player.X().G("disable_mdx_connection_in_mdx_module_for_music_web")||!g.KD(x.player.X())){var k=x.player.getPlaylistId();var U=x.player.getVideoData(1);var m=U.videoId;if(!k&&!m||(x.player.getAppState()===2||x.player.getAppState()===1)&&x.player.X().G("should_clear_video_data_on_player_cued_unstarted"))U=null;else{var F=x.player.getPlaylist();if(F){var f=[];for(var V=0;V2*this.size&&UO(this),!0):!1}; g.b.get=function(x,u){return gZ(this.V,x)?this.V[x]:u}; g.b.set=function(x,u){gZ(this.V,x)||(this.size+=1,this.S.push(x),this.jF++);this.V[x]=u}; g.b.forEach=function(x,u){for(var k=this.zo(),U=0;U=U.S.length)return g.bz;var F=U.S[u++];return g.Vo(x?F:U.V[F])}; return m}; var a2w={flX:"atp",n_X:"ska",DLY:"que",PHX:"mus",KKm:"sus",FTm:"dsp",CI$:"seq",YIG:"mic",b6$:"dpa",zxX:"cds",XkY:"mlm",Gd$:"dsdtr",vJS:"ntb",Unt:"vsp",z$X:"scn",ZSY:"rpe",js$:"dcn",aoJ:"dcp",pSX:"pas",IoY:"drq",MIt:"opf",P5t:"els",LHm:"isg",sFV:"svq",L4$:"mvp",Lx$:"ads",QYV:"iat"},uZW={dnX:"u",R$S:"cl",u9J:"k",fIm:"i",i6t:"cr",zR$:"m",JIY:"g",kY:"up"};m$.prototype.mE=function(x){return x?this.id==x.id:!1}; var qQG="",sO=null;yX9.prototype.flush=function(x,u){x=x===void 0?[]:x;u=u===void 0?!1:u;if(g.Ww("enable_client_streamz_web")){x=g.w(x);for(var k=x.next();!k.done;k=x.next())k=g.Um5(k.value),k={serializedIncrementBatch:g.M9(k.S())},g.RV("streamzIncremented",k,{sendIsolatedPayload:u})}}; var RD,iVw=tct("loadCastFramework")||tct("loadCastApplicationFramework"),$lG=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.gs(cD,g.J);g.b=cD.prototype;g.b.R4=function(x){this.K=arguments;this.S=!1;this.Hl?this.J=g.xw()+this.tG:this.Hl=g.O7(this.N,this.tG)}; g.b.stop=function(){this.Hl&&(g.JY.clearTimeout(this.Hl),this.Hl=null);this.J=null;this.S=!1;this.K=[]}; g.b.pause=function(){++this.V}; g.b.resume=function(){this.V&&(--this.V,!this.V&&this.S&&(this.S=!1,this.j.apply(null,this.K)))}; g.b.SJ=function(){this.stop();cD.kR.SJ.call(this)}; g.b.M2=function(){this.Hl&&(g.JY.clearTimeout(this.Hl),this.Hl=null);this.J?(this.Hl=g.O7(this.N,this.J-g.xw()),this.J=null):this.V?this.S=!0:(this.S=!1,this.j.apply(null,this.K))};MG.prototype.stringify=function(x){return g.JY.JSON.stringify(x,void 0)}; MG.prototype.parse=function(x){return g.JY.JSON.parse(x,void 0)};g.gs(jot,g.IP);g.gs(ZVt,g.IP);var avk=null;g.gs(IvS,g.IP);g.gs(eIm,g.IP);g.gs(JXm,g.IP);tz.prototype.debug=function(){}; tz.prototype.info=function(){}; tz.prototype.warning=function(){};var CtG={},AXZ={};g.b=EO.prototype;g.b.setTimeout=function(x){this.P$=x}; g.b.Vt=function(x){x=x.target;var u=this.GY;u&&g.xb(x)==3?u.qC():this.Hp(x)}; g.b.Hp=function(x){try{if(x==this.S)a:{var u=g.xb(this.S),k=this.S.V,U=this.S.getStatus();if(!(u<3)&&(u!=3||this.S&&(this.V.V||g.gJ(this.S)||g.kb(this.S)))){this.gm||u!=4||k==7||(k==8||U<=0?wZ(3):wZ(2));SQ9(this);var m=this.S.getStatus();this.RU=m;var F=T6G(this);if(this.j=m==200){if(this.Nj&&!this.IS){b:{if(this.S){var f=g.Ub(this.S,"X-HTTP-Initial-Response");if(f&&!g.Eo(f)){var V=f;break b}}V=null}if(x=V)this.IS=!0,FyS(this,x);else{this.j=!1;this.N=3;yT(12);z5(this);WD(this);break a}}if(this.ut){x= !0;for(var h;!this.gm&&this.D0&&!this.ud&&(this.ud=!0,this.J.FI(this)):(z5(this),WD(this))}else FyS(this,F);u==4&&z5(this);this.j&&!this.gm&&(u==4?B6S(this.J,this):(this.j=!1,G5(this)))}else g.WTj(this.S),m==400&&F.indexOf("Unknown SID")> 0?(this.N=3,yT(12)):(this.N=0,yT(13)),z5(this),WD(this)}}}catch(X){}finally{}}; g.b.cancel=function(){this.gm=!0;z5(this)}; g.b.Ss=function(){this.t5=null;var x=Date.now();x-this.oS>=0?(this.q$!=2&&(wZ(3),yT(17)),z5(this),this.N=2,WD(this)):DlB(this,this.oS-x)}; g.b.getLastError=function(){return this.N}; g.b.jT=function(){return this.S};bSm.prototype.cancel=function(){this.J=he$(this);if(this.V)this.V.cancel(),this.V=null;else if(this.S&&this.S.size!==0){for(var x=g.w(this.S.values()),u=x.next();!u.done;u=x.next())u.value.cancel();this.S.clear()}};g.b=ReS.prototype;g.b.Xe=8;g.b.sW=1;g.b.connect=function(x,u,k,U){yT(0);this.wu=x;this.gm=u||{};k&&U!==void 0&&(this.gm.OSID=k,this.gm.OAID=U);this.IS=this.A9;this.c$=kEt(this,null,this.wu);nU(this)}; g.b.disconnect=function(){ciB(this);if(this.sW==3){var x=this.B$++,u=this.c$.clone();g.Eu(u,"SID",this.K);g.Eu(u,"RID",x);g.Eu(u,"TYPE","terminate");jN(this,u);x=new EO(this,this.K,x);x.q$=2;x.B=B6(u.clone());u=!1;if(g.JY.navigator&&g.JY.navigator.sendBeacon)try{u=g.JY.navigator.sendBeacon(x.B.toString(),"")}catch(k){}!u&&g.JY.Image&&((new Image).src=x.B,u=!0);u||(x.S=KXk(x.J,null),x.S.send(x.B));x.Ok=Date.now();G5(x)}E$9(this)}; g.b.Jf=function(){return this.sW==0}; g.b.getState=function(){return this.sW}; g.b.Pp=function(x){if(this.j)if(this.j=null,this.sW==1){if(!x){this.B$=Math.floor(Math.random()*1E5);x=this.B$++;var u=new EO(this,"",x),k=this.U;this.RU&&(k?(k=g.ZE(k),g.Qe(k,this.RU)):k=this.RU);this.D!==null||this.oS||(u.c$=k,k=null);var U;if(this.Uk)a:{for(var m=U=0;m4096){U=m;break a}if(U===4096||m===this.J.length-1){U=m+1;break a}}U= 1E3}else U=1E3;U=yim(this,u,U);m=this.c$.clone();g.Eu(m,"RID",x);g.Eu(m,"CVER",22);this.ut&&g.Eu(m,"X-HTTP-Session-Id",this.ut);jN(this,m);k&&(this.oS?U="headers="+g.Bn(g.PrY(k))+"&"+U:this.D&&g.Ou(m,this.D,k));g$m(this.V,u);this.wX&&g.Eu(m,"TYPE","init");this.Uk?(g.Eu(m,"$req",U),g.Eu(m,"SID","null"),u.Nj=!0,dlk(u,m,null)):dlk(u,m,U);this.sW=2}}else this.sW==3&&(x?YMZ(this,x):this.J.length==0||VZt(this.V)||YMZ(this))}; g.b.Lu=function(){this.B=null;tZ9(this);if(this.R0&&!(this.P$||this.S==null||this.h9<=0)){var x=2*this.h9;this.nm=Yf((0,g.B4)(this.TMS,this),x)}}; g.b.TMS=function(){this.nm&&(this.nm=null,this.IS=!1,this.P$=!0,yT(10),ib(this),tZ9(this))}; g.b.FI=function(x){this.S==x&&this.R0&&!this.P$&&(pGG(this),this.P$=!0,yT(11))}; g.b.JQ=function(){this.t5!=null&&(this.t5=null,ib(this),xJW(this),yT(19))}; g.b.Mnt=function(x){x?yT(2):yT(1)}; g.b.isActive=function(){return!!this.N&&this.N.isActive(this)}; g.b=zeZ.prototype;g.b.U1=function(){}; g.b.Cu=function(){}; g.b.dP=function(){}; g.b.zZ=function(){}; g.b.isActive=function(){return!0}; g.b.O6=function(){};g.gs(aD,g.kp);aD.prototype.open=function(){this.S.N=this.J;this.j&&(this.S.q$=!0);this.S.connect(this.N,this.V||void 0)}; aD.prototype.close=function(){this.S.disconnect()}; aD.prototype.send=function(x){var u=this.S;if(typeof x==="string"){var k={};k.__data__=x;x=k}else this.K&&(k={},k.__data__=g.jm(x),x=k);u.J.push(new f7Z(u.DB++,x));u.sW==3&&nU(u)}; aD.prototype.SJ=function(){this.S.N=null;delete this.J;this.S.disconnect();delete this.S;aD.kR.SJ.call(this)}; g.gs(OSo,jot);g.gs(iSt,ZVt);g.gs(Zw,zeZ);Zw.prototype.U1=function(){this.S.dispatchEvent("m")}; Zw.prototype.Cu=function(x){this.S.dispatchEvent(new OSo(x))}; Zw.prototype.dP=function(x){this.S.dispatchEvent(new iSt(x))}; Zw.prototype.zZ=function(){this.S.dispatchEvent("n")};var ID=new g.kp;g.M($Jt,g.IP);g.b=Jz.prototype;g.b.zj=null;g.b.po=!1;g.b.Jj=null;g.b.FQ=null;g.b.KK=null;g.b.WM=null;g.b.Vx=null;g.b.eV=null;g.b.C1=null;g.b.Wo=null;g.b.lQ=0;g.b.zJ=null;g.b.cM=null;g.b.dS=null;g.b.OH=-1;g.b.Ux=!0;g.b.J0=!1;g.b.l3=0;g.b.pB=null;var I7w={},Qm9={};g.b=Jz.prototype;g.b.setTimeout=function(x){this.V=x}; g.b.kU=function(x){x=x.target;var u=this.pB;u&&g.xb(x)==3?u.qC():this.oH(x)}; g.b.oH=function(x){try{if(x==this.Wo)a:{var u=g.xb(this.Wo),k=this.Wo.V,U=this.Wo.getStatus();if(g.Be&&!g.cj("420+")){if(u<4)break a}else if(u<3||u==3&&!g.gJ(this.Wo))break a;this.J0||u!=4||k==7||(k==8||U<=0?this.S.q5(3):this.S.q5(2));PRW(this);var m=this.Wo.getStatus();this.OH=m;var F=g.gJ(this.Wo);if(this.po=m==200){u==4&&PD(this);if(this.ut){for(x=!0;!this.J0&&this.lQ0?(this.dS=3,eN(13)):(this.dS=0,eN(14)),PD(this),NRG(this)}}catch(V){}finally{}}; g.b.cancel=function(){this.J0=!0;PD(this)}; g.b.Kb=function(){this.Jj=null;var x=Date.now();x-this.FQ>=0?(this.WM!=2&&this.S.q5(3),PD(this),this.dS=2,eN(18),NRG(this)):Jik(this,this.FQ-x)}; g.b.getLastError=function(){return this.dS};g.b=TRm.prototype;g.b.Nb=null;g.b.uP=null;g.b.Zk=!1;g.b.mO=null;g.b.TN=null;g.b.b$=-1;g.b.iQ=null;g.b.qA=null;g.b.connect=function(x){this.mO=x;x=dZ(this.S,null,this.mO);eN(3);Date.now();var u=this.S.U;u!=null?(this.iQ=u[0],(this.qA=u[1])?(this.TN=1,Ais(this)):(this.TN=2,CRt(this))):(oD(x,"MODE","init"),this.uP=new Jz(this),this.uP.zj=this.Nb,ZSW(this.uP,x,!1,null,!0),this.TN=0)}; g.b.zc=function(x){if(x)this.TN=2,CRt(this);else{eN(4);var u=this.S;u.Ht=u.I$.b$;Az(u,9)}x&&this.q5(2)}; g.b.hB=function(x){return this.S.hB(x)}; g.b.abort=function(){this.uP&&(this.uP.cancel(),this.uP=null);this.b$=-1}; g.b.Jf=function(){return!1}; g.b.xQ=function(x,u){this.b$=x.OH;if(this.TN==0)if(u){try{var k=this.V.parse(u)}catch(U){x=this.S;x.Ht=this.b$;Az(x,2);return}this.iQ=k[0];this.qA=k[1]}else x=this.S,x.Ht=this.b$,Az(x,2);else this.TN==2&&(this.Zk?(eN(7),Date.now()):u=="11111"?(eN(6),this.Zk=!0,Date.now(),this.b$=200,this.uP.cancel(),eN(12),KU(this.S,this,!0)):(eN(8),Date.now(),this.Zk=!1))}; g.b.qb=function(){this.b$=this.uP.OH;if(this.uP.po)this.TN==0?this.qA?(this.TN=1,Ais(this)):(this.TN=2,CRt(this)):this.TN==2&&(this.Zk?(eN(12),KU(this.S,this,!0)):(eN(11),KU(this.S,this,!1)));else{this.TN==0?eN(9):this.TN==2&&eN(10);var x=this.S;this.uP.getLastError();x.Ht=this.b$;Az(x,2)}}; g.b.nK=function(){return this.S.nK()}; g.b.isActive=function(){return this.S.isActive()}; g.b.q5=function(x){this.S.q5(x)};g.b=Lyt.prototype;g.b.uH=null;g.b.TX=null;g.b.mH=null;g.b.pF=null;g.b.Ez=null;g.b.Fo=null;g.b.vX=null;g.b.yj=null;g.b.u_=0;g.b.ul=0;g.b.P7=null;g.b.eR=null;g.b.Zx=null;g.b.xI=null;g.b.I$=null;g.b.zL=null;g.b.kC=-1;g.b.sQ=-1;g.b.Ht=-1;g.b.K5=0;g.b.Og=0;g.b.UD=8;g.gs(SMm,g.IP);g.gs(BRt,g.IP);g.b=Lyt.prototype;g.b.connect=function(x,u,k,U,m){eN(0);this.Ez=u;this.TX=k||{};U&&m!==void 0&&(this.TX.OSID=U,this.TX.OAID=m);this.B?(QT((0,g.B4)(this.ij,this,x),100),xWt(this)):this.ij(x)}; g.b.disconnect=function(){uKt(this);if(this.S==3){var x=this.u_++,u=this.Fo.clone();g.Eu(u,"SID",this.K);g.Eu(u,"RID",x);g.Eu(u,"TYPE","terminate");T5(this,u);x=new Jz(this,this.K,x);x.WM=2;x.Vx=B6(u.clone());(new Image).src=x.Vx.toString();x.KK=Date.now();a7m(x)}XTw(this)}; g.b.ij=function(x){this.I$=new TRm(this);this.I$.Nb=this.uH;this.I$.V=this.N;this.I$.connect(x)}; g.b.Jf=function(){return this.S==0}; g.b.getState=function(){return this.S}; g.b.tL=function(x){this.eR=null;FAo(this,x)}; g.b.AL=function(){this.Zx=null;this.pF=new Jz(this,this.K,"rpc",this.D);this.pF.zj=this.uH;this.pF.l3=0;var x=this.vX.clone();g.Eu(x,"RID","rpc");g.Eu(x,"SID",this.K);g.Eu(x,"CI",this.zL?"0":"1");g.Eu(x,"AID",this.kC);T5(this,x);g.Eu(x,"TYPE","xmlhttp");ZSW(this.pF,x,!0,this.yj,!1)}; g.b.xQ=function(x,u){if(this.S!=0&&(this.pF==x||this.mH==x))if(this.Ht=x.OH,this.mH==x&&this.S==3)if(this.UD>7){try{var k=this.N.parse(u)}catch(U){k=null}if(Array.isArray(k)&&k.length==3)if(x=k,x[0]==0)a:{if(!this.Zx){if(this.pF)if(this.pF.KK+3E30)){if(U=u==1)this.mH||this.eR||this.S==1||this.K5>=2?U=!1:(this.eR=QT((0,g.B4)(this.tL,this,x),bG$(this,this.K5)),this.K5++,U=!0);U=!(U||u==2&&V4t(this))}if(U)switch(k){case 1:Az(this, 5);break;case 4:Az(this,10);break;case 3:Az(this,6);break;case 7:Az(this,12);break;default:Az(this,2)}}}; g.b.Ta=function(x){if(!g.DG(arguments,this.S))throw Error("Unexpected channel state: "+this.S);}; g.b.RjJ=function(x){x?eN(2):(eN(1),h89(this,8))}; g.b.hB=function(x){if(x)throw Error("Can't create secondary domain capable XhrIo object.");x=new g.Sm;x.D=!1;return x}; g.b.isActive=function(){return!!this.P7&&this.P7.isActive(this)}; g.b.q5=function(x){var u=ID;u.dispatchEvent(new BRt(u,x))}; g.b.nK=function(){return!1}; g.b=qwm.prototype;g.b.SA=function(){}; g.b.Mq=function(){}; g.b.Rq=function(){}; g.b.jc=function(){}; g.b.VJ=function(){return{}}; g.b.isActive=function(){return!0};g.b=sVk.prototype;g.b.enqueue=function(x){this.V.push(x)}; g.b.isEmpty=function(){return this.S.length===0&&this.V.length===0}; g.b.clear=function(){this.S=[];this.V=[]}; g.b.contains=function(x){return g.DG(this.S,x)||g.DG(this.V,x)}; g.b.remove=function(x){var u=this.S;var k=(0,g.qYm)(u,x);k>=0?(g.SB(u,k),u=!0):u=!1;return u||g.Bk(this.V,x)}; g.b.Y9=function(){for(var x=[],u=this.S.length-1;u>=0;--u)x.push(this.S[u]);u=this.V.length;for(var k=0;k=QyB.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(x=QyB[this.V],this.Hl=g.Yc((0,g.B4)(this.er,this),x),this.V++):this.publish("pairingFailed",Error("Server error "+x.status))}; g.b.hQ=function(){this.S=null;this.publish("pairingFailed",Error("Server not responding"))}; var QyB=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.gs(fL,mp);g.b=fL.prototype;g.b.start=function(){FL(this)&&this.publish("screenChange");!g.Ji("yt-remote-lounge-token-expiration")&&dW9(this);g.EQ(this.S);this.S=g.Yc((0,g.B4)(this.start,this),1E4)}; g.b.add=function(x,u){FL(this);e8o(this,x);bj(this,!1);this.publish("screenChange");u(x);x.token||dW9(this)}; g.b.remove=function(x,u){var k=FL(this);P3G(this,x)&&(bj(this,!1),k=!0);u(x);k&&this.publish("screenChange")}; g.b.Xx=function(x,u,k,U){var m=FL(this),F=this.get(x.id);F?(F.name!=u&&(F.name=u,bj(this,!1),m=!0),k(x)):U(Error("no such local screen."));m&&this.publish("screenChange")}; g.b.SJ=function(){g.EQ(this.S);fL.kR.SJ.call(this)}; g.b.c5$=function(x){FL(this);var u=this.screens.length;x=x&&x.screens||[];for(var k=x.length,U=0;U20)break a;V=u(F,f)}F=V}m.name=F}k(XL(this,m))},this), onError:(0,g.B4)(function(m){U(Error("pairing request failed: "+m.status))},this), onTimeout:(0,g.B4)(function(){U(Error("pairing request timed out."))},this)})}; g.b.SJ=function(){g.bZ(this.V);g.bZ(this.S);hF.kR.SJ.call(this)}; g.b.E$V=function(){uTt(this);this.publish("screenChange");this.S.update()}; hF.prototype.dispose=hF.prototype.dispose;g.gs(qq,g.Hm);g.b=qq.prototype;g.b.Ho=function(x){this.Ft()||(x&&(Hy(this,""+x),this.publish("sessionFailed")),this.S=null,this.publish("sessionScreen",null))}; g.b.info=function(x){xN(this.ut,x)}; g.b.KJ=function(){return null}; g.b.Tz=function(x){var u=this.V;x?(u.displayStatus=new chrome.cast.ReceiverDisplayStatus(x,[]),u.displayStatus.showStop=!0):u.displayStatus=null;chrome.cast.setReceiverDisplayStatus(u,(0,g.B4)(function(){this.info("Updated receiver status for "+u.friendlyName+": "+x)},this),(0,g.B4)(function(){Hy(this,"Failed to update receiver status for: "+u.friendlyName)},this))}; g.b.SJ=function(){this.Tz("");qq.kR.SJ.call(this)};g.M(RX,qq);g.b=RX.prototype;g.b.KR=function(x){if(this.J){if(this.J==x)return;Hy(this,"Overriding cast session with new session object");sI9(this);this.Ok=!1;this.U="unknown";this.J.removeUpdateListener(this.RS);this.J.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.nm)}this.J=x;this.J.addUpdateListener(this.RS);this.J.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.nm);bWk(this,"getMdxSessionStatus")}; g.b.RI=function(x){this.info("launchWithParams no-op for Cast: "+g.jm(x))}; g.b.stop=function(){this.J?this.J.stop((0,g.B4)(function(){this.Ho()},this),(0,g.B4)(function(){this.Ho(Error("Failed to stop receiver app."))},this)):this.Ho(Error("Stopping cast device without session."))}; g.b.Tz=function(){}; g.b.SJ=function(){this.info("disposeInternal");sI9(this);this.J&&(this.J.removeUpdateListener(this.RS),this.J.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.nm));this.J=null;qq.prototype.SJ.call(this)}; g.b.oam=function(x,u){if(!this.Ft())if(u)if(u=xf(u),g.CR(u))switch(x=""+u.type,u=u.data||{},this.info("onYoutubeMessage_: "+x+" "+g.jm(u)),x){case "mdxSessionStatus":m5G(this,u);break;case "loungeToken":VVS(this,u);break;default:Hy(this,"Unknown youtube message: "+x)}else Hy(this,"Unable to parse message.");else Hy(this,"No data in message.")}; g.b.QB=function(x,u,k,U){g.EQ(this.B);this.B=0;BBm(this.K,this.V.label,x,this.V.friendlyName,(0,g.B4)(function(m){m?u(m):U>=0?(Hy(this,"Screen "+x+" appears to be offline. "+U+" retries left."),this.B=g.Yc((0,g.B4)(this.QB,this,x,u,k,U-1),300)):k(Error("Unable to fetch screen."))},this),k)}; g.b.KJ=function(){return this.J}; g.b.N2=function(x){this.Ft()||x||(Hy(this,"Cast session died."),this.Ho())};g.M(pL,qq);g.b=pL.prototype;g.b.KR=function(x){this.J=x;this.J.addUpdateListener(this.gm)}; g.b.RI=function(x){this.c$=x;this.t5()}; g.b.stop=function(){YJW(this);this.J?this.J.stop((0,g.B4)(this.Ho,this,null),(0,g.B4)(this.Ho,this,"Failed to stop DIAL device.")):this.Ho()}; g.b.SJ=function(){YJW(this);this.J&&this.J.removeUpdateListener(this.gm);this.J=null;qq.prototype.SJ.call(this)}; g.b.q2=function(x){this.Ft()||x||(Hy(this,"DIAL session died."),this.N(),this.N=function(){},this.Ho())};g.M(wr,qq);wr.prototype.stop=function(){this.Ho()}; wr.prototype.KR=function(){}; wr.prototype.RI=function(){g.EQ(this.J);this.J=NaN;var x=VT(this.K.rD(),this.V.label);x?sg(this,x):this.Ho(Error("No such screen"))}; wr.prototype.SJ=function(){g.EQ(this.J);this.J=NaN;qq.prototype.SJ.call(this)};g.M(yv,g.Hm);g.b=yv.prototype; g.b.init=function(x,u){chrome.cast.timeout.requestSession=3E4;var k=new chrome.cast.SessionRequest(this.B,[chrome.cast.Capability.AUDIO_OUT]);g.Ww("desktop_enable_cast_connect")&&(k.androidReceiverCompatible=!0);this.U||(k.dialRequest=new chrome.cast.DialRequest("YouTube"));var U=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;x=x||this.j?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var m=(0,g.B4)(this.tjJ,this);k=new chrome.cast.ApiConfig(k,(0,g.B4)(this.YB, this),m,U,x);k.customDialLaunchCallback=(0,g.B4)(this.y9m,this);chrome.cast.initialize(k,(0,g.B4)(function(){this.Ft()||(chrome.cast.addReceiverActionListener(this.N),ZGk(),this.V.subscribe("onlineScreenChange",(0,g.B4)(this.kQ,this)),this.J=GBW(this),chrome.cast.setCustomReceivers(this.J,function(){},(0,g.B4)(function(F){this.qF("Failed to set initial custom receivers: "+g.jm(F))},this)),this.publish("yt-remote-cast2-availability-change",tF(this)),u(!0))},this),(0,g.B4)(function(F){this.qF("Failed to initialize API: "+ g.jm(F)); u(!1)},this))}; g.b.eeS=function(x,u){YN("Setting connected screen ID: "+x+" -> "+u);if(this.S){var k=this.S.S;if(!x||k&&k.id!=x)YN("Unsetting old screen status: "+this.S.V.friendlyName),Eg(this,null)}if(x&&u){if(!this.S){x=VT(this.V.rD(),x);if(!x){YN("setConnectedScreenStatus: Unknown screen.");return}if(x.idType=="shortLived"){YN("setConnectedScreenStatus: Screen with id type to be short lived.");return}k=tV9(this,x);k||(YN("setConnectedScreenStatus: Connected receiver not custom..."),k=new chrome.cast.Receiver(x.uuid? x.uuid:x.id,x.name),k.receiverType=chrome.cast.ReceiverType.CUSTOM,this.J.push(k),chrome.cast.setCustomReceivers(this.J,function(){},(0,g.B4)(function(U){this.qF("Failed to set initial custom receivers: "+g.jm(U))},this))); YN("setConnectedScreenStatus: new active receiver: "+k.friendlyName);Eg(this,new wr(this.V,k),!0)}this.S.Tz(u)}else YN("setConnectedScreenStatus: no screen.")}; g.b.iFJ=function(x){this.Ft()?this.qF("Setting connection data on disposed cast v2"):this.S?this.S.RI(x):this.qF("Setting connection data without a session")}; g.b.E6=function(){this.Ft()?this.qF("Stopping session on disposed cast v2"):this.S?(this.S.stop(),Eg(this,null)):YN("Stopping non-existing session")}; g.b.requestSession=function(){chrome.cast.requestSession((0,g.B4)(this.YB,this),(0,g.B4)(this.ga$,this))}; g.b.SJ=function(){this.V.unsubscribe("onlineScreenChange",(0,g.B4)(this.kQ,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.N);var x=$WG,u=g.dQ("yt.mdx.remote.debug.handlers_");g.Bk(u||[],x);g.bZ(this.S);g.Hm.prototype.SJ.call(this)}; g.b.qF=function(x){xN("Controller",x)}; g.b.Qb=function(x,u){this.S==x&&(u||Eg(this,null),this.publish("yt-remote-cast2-session-change",u))}; g.b.va$=function(x,u){if(!this.Ft())if(x)switch(x.friendlyName=chrome.cast.unescape(x.friendlyName),YN("onReceiverAction_ "+x.label+" / "+x.friendlyName+"-- "+u),u){case chrome.cast.ReceiverAction.CAST:if(this.S)if(this.S.V.label!=x.label)YN("onReceiverAction_: Stopping active receiver: "+this.S.V.friendlyName),this.S.stop();else{YN("onReceiverAction_: Casting to active receiver.");this.S.S&&this.publish("yt-remote-cast2-session-change",this.S.S);break}switch(x.receiverType){case chrome.cast.ReceiverType.CUSTOM:Eg(this, new wr(this.V,x));break;case chrome.cast.ReceiverType.DIAL:Eg(this,new pL(this.V,x,this.K,this.config_));break;case chrome.cast.ReceiverType.CAST:Eg(this,new RX(this.V,x,this.config_));break;default:this.qF("Unknown receiver type: "+x.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.S&&this.S.V.label==x.label?this.S.stop():this.qF("Stopping receiver w/o session: "+x.friendlyName)}else this.qF("onReceiverAction_ called without receiver.")}; g.b.y9m=function(x){if(this.Ft())return Promise.reject(Error("disposed"));var u=x.receiver;u.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.qF("Not DIAL receiver: "+u.friendlyName),u.receiverType=chrome.cast.ReceiverType.DIAL);var k=this.S?this.S.V:null;if(!k||k.label!=u.label)return this.qF("Receiving DIAL launch request for non-clicked DIAL receiver: "+u.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(k&&k.label==u.label&&k.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.S.S)return YN("Reselecting dial screen."), this.publish("yt-remote-cast2-session-change",this.S.S),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.qF('Changing CAST intent from "'+k.receiverType+'" to "dial" for '+u.friendlyName);Eg(this,new pL(this.V,u,this.K,this.config_))}u=this.S;u.B=x;u.B.appState==chrome.cast.DialAppState.RUNNING?(x=u.B.extraData||{},k=x.screenId||null,cy(u)&&x.loungeToken?x.loungeTokenRefreshIntervalMs?x=MVS(u,{name:u.V.friendlyName,screenId:x.screenId,loungeToken:x.loungeToken,dialId:u.B.receiver.label, screenIdType:"shortLived"},x.loungeTokenRefreshIntervalMs):(g.kc(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(x)+".")),x=wMm(u,k)):x=wMm(u,k)):x=pMZ(u);return x}; g.b.YB=function(x){var u=this;if(!this.Ft()&&!this.j){YN("New cast session ID: "+x.sessionId);var k=x.receiver;if(k.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.S)if(k.receiverType==chrome.cast.ReceiverType.CAST)YN("Got resumed cast session before resumed mdx connection."),k.friendlyName=chrome.cast.unescape(k.friendlyName),Eg(this,new RX(this.V,k,this.config_),!0);else{this.qF("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var U=this.S.V,m=VT(this.V.rD(), U.label);m&&fU(m,k.label)&&U.receiverType!=chrome.cast.ReceiverType.CAST&&k.receiverType==chrome.cast.ReceiverType.CAST&&(YN("onSessionEstablished_: manual to cast session change "+k.friendlyName),g.bZ(this.S),this.S=new RX(this.V,k,this.config_),this.S.subscribe("sessionScreen",(0,g.B4)(this.Qb,this,this.S)),this.S.subscribe("sessionFailed",function(){return EB$(u,u.S)}),this.S.RI(null)); this.S.KR(x)}}}; g.b.mA=function(){return this.S?this.S.KJ():null}; g.b.ga$=function(x){this.Ft()||(this.qF("Failed to estabilish a session: "+g.jm(x)),x.code!=chrome.cast.ErrorCode.CANCEL&&Eg(this,null),this.publish("yt-remote-cast2-session-failed"))}; g.b.tjJ=function(x){YN("Receiver availability updated: "+x);if(!this.Ft()){var u=tF(this);this.D=x==chrome.cast.ReceiverAvailability.AVAILABLE;tF(this)!=u&&this.publish("yt-remote-cast2-availability-change",tF(this))}}; g.b.kQ=function(){this.Ft()||(this.J=GBW(this),YN("Updating custom receivers: "+g.jm(this.J)),chrome.cast.setCustomReceivers(this.J,function(){},(0,g.B4)(function(){this.qF("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",tF(this)))}; yv.prototype.setLaunchParams=yv.prototype.iFJ;yv.prototype.setConnectedScreenStatus=yv.prototype.eeS;yv.prototype.stopSession=yv.prototype.E6;yv.prototype.getCastSession=yv.prototype.mA;yv.prototype.requestSession=yv.prototype.requestSession;yv.prototype.init=yv.prototype.init;yv.prototype.dispose=yv.prototype.dispose;var jIG=[];g.b=nL.prototype; g.b.reset=function(x){this.listId="";this.index=-1;this.videoId="";Jqk(this);this.volume=-1;this.muted=!1;x&&(this.index=x.index,this.listId=x.listId,this.videoId=x.videoId,this.playerState=x.playerState,this.volume=x.volume,this.muted=x.muted,this.audioTrackId=x.audioTrackId,this.trackData=x.trackData,this.Nt=x.hasPrevious,this.wD=x.hasNext,this.D=x.playerTime,this.j=x.playerTimeAt,this.K=x.seekableStart,this.S=x.seekableEnd,this.N=x.duration,this.B=x.loadedTime,this.J=x.liveIngestionTime,this.V= !isNaN(this.J))}; g.b.isPlaying=function(){return this.playerState==1}; g.b.isBuffering=function(){return this.playerState==3}; g.b.b5=function(){return this.playerState==1081}; g.b.OM=function(x){this.N=isNaN(x)?0:x}; g.b.getDuration=function(){return this.V?this.N+$N(this):this.N}; g.b.clone=function(){return new nL(PhG(this))};g.M(Qv,g.Hm);g.b=Qv.prototype;g.b.getState=function(){return this.J}; g.b.o$=function(){return this.K.getReconnectTimeout()}; g.b.Na=function(){this.K.reconnect()}; g.b.play=function(){ex(this)?(this.S?this.S.play(null,g.RC,dr(this,"play")):Nq(this,"play"),KU$(this,1,jx(IX(this))),this.publish("remotePlayerChange")):JF(this,this.play)}; g.b.pause=function(){ex(this)?(this.S?this.S.pause(null,g.RC,dr(this,"pause")):Nq(this,"pause"),KU$(this,2,jx(IX(this))),this.publish("remotePlayerChange")):JF(this,this.pause)}; g.b.seekTo=function(x){if(ex(this)){if(this.S){var u=IX(this),k=new chrome.cast.media.SeekRequest;k.currentTime=x;u.isPlaying()||u.isBuffering()?k.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:k.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.S.seek(k,g.RC,dr(this,"seekTo",{newTime:x}))}else Nq(this,"seekTo",{newTime:x});KU$(this,3,x);this.publish("remotePlayerChange")}else JF(this,g.o$(this.seekTo,x))}; g.b.stop=function(){if(ex(this)){this.S?this.S.stop(null,g.RC,dr(this,"stopVideo")):Nq(this,"stopVideo");var x=IX(this);x.index=-1;x.videoId="";Jqk(x);Py(this,x);this.publish("remotePlayerChange")}else JF(this,this.stop)}; g.b.setVolume=function(x,u){if(ex(this)){var k=IX(this);if(this.V){if(k.volume!=x){var U=Math.round(x)/100;this.V.setReceiverVolumeLevel(U,(0,g.B4)(function(){uj("set receiver volume: "+U)},this),(0,g.B4)(function(){this.qF("failed to set receiver volume.")},this))}k.muted!=u&&this.V.setReceiverMuted(u,(0,g.B4)(function(){uj("set receiver muted: "+u)},this),(0,g.B4)(function(){this.qF("failed to set receiver muted.")},this))}else{var m={volume:x, muted:u};k.volume!=-1&&(m.delta=x-k.volume);Nq(this,"setVolume",m)}k.muted=u;k.volume=x;Py(this,k)}else JF(this,g.o$(this.setVolume,x,u))}; g.b.nJ=function(x,u){if(ex(this)){var k=IX(this);x={videoId:x};u&&(k.trackData={trackName:u.name,languageCode:u.languageCode,sourceLanguageCode:u.translationLanguage?u.translationLanguage.languageCode:"",languageName:u.languageName,kind:u.kind},x.style=g.jm(u.style),g.Qe(x,k.trackData));Nq(this,"setSubtitlesTrack",x);Py(this,k)}else JF(this,g.o$(this.nJ,x,u))}; g.b.setAudioTrack=function(x,u){ex(this)?(u=u.getLanguageInfo().getId(),Nq(this,"setAudioTrack",{videoId:x,audioTrackId:u}),x=IX(this),x.audioTrackId=u,Py(this,x)):JF(this,g.o$(this.setAudioTrack,x,u))}; g.b.playVideo=function(x,u,k,U,m,F,f){U=U===void 0?null:U;m=m===void 0?null:m;F=F===void 0?null:F;f=f===void 0?null:f;var V=IX(this),h={videoId:x};k!==void 0&&(h.currentIndex=k);Zr(V,x,k||0);u!==void 0&&(rr(V,u),h.currentTime=u);U&&(h.listId=U);m&&(h.playerParams=m);F&&(h.clickTrackingParams=F);f&&(h.locationInfo=g.jm(f));Nq(this,"setPlaylist",h);U||Py(this,V)}; g.b.E4=function(x,u){if(ex(this)){if(x&&u){var k=IX(this);Zr(k,x,u);Py(this,k)}Nq(this,"previous")}else JF(this,g.o$(this.E4,x,u))}; g.b.nextVideo=function(x,u){if(ex(this)){if(x&&u){var k=IX(this);Zr(k,x,u);Py(this,k)}Nq(this,"next")}else JF(this,g.o$(this.nextVideo,x,u))}; g.b.PT=function(){if(ex(this)){Nq(this,"clearPlaylist");var x=IX(this);x.reset();Py(this,x);this.publish("remotePlayerChange")}else JF(this,this.PT)}; g.b.Q3=function(){ex(this)?Nq(this,"dismissAutoplay"):JF(this,this.Q3)}; g.b.dispose=function(){if(this.J!=3){var x=this.J;this.J=3;this.publish("proxyStateChange",x,this.J)}g.Hm.prototype.dispose.call(this)}; g.b.SJ=function(){d5o(this);this.K=null;this.N.clear();aX(this,null);g.Hm.prototype.SJ.call(this)}; g.b.cj=function(x){if((x!=this.J||x==2)&&this.J!=3&&x!=0){var u=this.J;this.J=x;this.publish("proxyStateChange",u,x);if(x==1)for(;!this.N.isEmpty();)u=x=this.N,u.S.length===0&&(u.S=u.V,u.S.reverse(),u.V=[]),x.S.pop().apply(this);else x==3&&this.dispose()}}; g.b.UsX=function(x,u){this.publish(x,u)}; g.b.W5G=function(x){if(!x)this.CU(null),aX(this,null);else if(this.V.receiver.volume){x=this.V.receiver.volume;var u=IX(this),k=Math.round(100*x.level||0);if(u.volume!=k||u.muted!=x.muted)uj("Cast volume update: "+x.level+(x.muted?" muted":"")),u.volume=k,u.muted=!!x.muted,Py(this,u)}}; g.b.CU=function(x){uj("Cast media: "+!!x);this.S&&this.S.removeUpdateListener(this.B);if(this.S=x)this.S.addUpdateListener(this.B),vBw(this),this.publish("remotePlayerChange")}; g.b.et$=function(x){x?(vBw(this),this.publish("remotePlayerChange")):this.CU(null)}; g.b.oM=function(){Nq(this,"sendDebugCommand",{debugCommand:"stats4nerds "})}; g.b.l3$=function(){var x=QIm();x&&aX(this,x)}; g.b.qF=function(x){xN("CP",x)};g.M(TS,g.Hm);g.b=TS.prototype; g.b.connect=function(x,u){if(u){var k=u.listId,U=u.videoId,m=u.videoIds,F=u.playerParams,f=u.clickTrackingParams,V=u.index,h={videoId:U},X=u.currentTime,q=u.locationInfo;u=u.loopMode;X!==void 0&&(h.currentTime=X<=5?0:X);F&&(h.playerParams=F);q&&(h.locationInfo=q);f&&(h.clickTrackingParams=f);k&&(h.listId=k);m&&m.length>0&&(h.videoIds=m.join(","));V!==void 0&&(h.currentIndex=V);this.gm&&(h.loopMode=u||"LOOP_MODE_OFF");k&&(this.S.listId=k);this.S.videoId=U;this.S.index=V||0;this.S.state=3;rr(this.S, X);this.N="UNSUPPORTED";k=this.gm?"setInitialState":"setPlaylist";KL("Connecting with "+k+" and params: "+g.jm(h));this.V.connect({method:k,params:g.jm(h)},x,HVZ())}else KL("Connecting without params"),this.V.connect({},x,HVZ());LUs(this)}; g.b.zl=function(x){this.V.zl(x)}; g.b.dispose=function(){this.Ft()||(g.ND("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),vy(this,3));g.Hm.prototype.dispose.call(this)}; g.b.SJ=function(){D5B(this);BbS(this);SJk(this);g.EQ(this.B);this.B=NaN;g.EQ(this.U);this.U=NaN;this.K=null;g.iR(this.t5);this.t5.length=0;this.V.dispose();g.Hm.prototype.SJ.call(this);this.N=this.D=this.J=this.S=this.V=null}; g.b.BB=function(x){if(!this.J||this.J.length===0)return!1;for(var u=g.w(this.J),k=u.next();!k.done;k=u.next())if(!k.value.capabilities.has(x))return!1;return!0}; g.b.x$$=function(){var x=3;this.Ft()||(x=0,isNaN(this.BF())?this.V.eP()&&isNaN(this.j)&&(x=1):x=2);return x}; g.b.Ug=function(x){KL("Disconnecting with "+x);g.ND("yt.mdx.remote.remoteClient_",null);D5B(this);this.publish("beforeDisconnect",x);x==1&&qG();this.V.disconnect(x);this.dispose()}; g.b.Lv=function(){var x=this.S;this.K&&(x=this.S.clone(),Zr(x,this.K,x.index));return PhG(x)}; g.b.glt=function(x){var u=this,k=new nL(x);k.videoId&&k.videoId!=this.S.videoId&&(this.K=k.videoId,g.EQ(this.B),this.B=g.Yc(function(){if(u.K){var m=u.K;u.K=null;u.S.videoId!=m&&AF(u,"getNowPlaying")}},5E3)); var U=[];this.S.listId==k.listId&&this.S.videoId==k.videoId&&this.S.index==k.index||U.push("remoteQueueChange");this.S.playerState==k.playerState&&this.S.volume==k.volume&&this.S.muted==k.muted&&jx(this.S)==jx(k)&&g.jm(this.S.trackData)==g.jm(k.trackData)||U.push("remotePlayerChange");this.S.reset(x);g.q9(U,function(m){this.publish(m)},this)}; g.b.G6=function(){var x=this.V.getDeviceId(),u=g.Cm(this.J,function(k){return k.type=="REMOTE_CONTROL"&&k.id!=x}); return u?u.id:""}; g.b.BF=function(){return this.V.o$()}; g.b.Eb=function(){return this.N||"UNSUPPORTED"}; g.b.jp=function(){return this.D||""}; g.b.a4=function(){!isNaN(this.BF())&&this.V.Na()}; g.b.T9k=function(x,u){AF(this,x,u);xbG(this)}; g.b.Tv=function(){var x=g.d6("SAPISID","")||g.d6("__Secure-1PAPISID")||"",u=g.d6("__Secure-3PAPISID","")||"";if(!x&&!u)return"";x=g.M9(g.yG(x),2);u=g.M9(g.yG(u),2);return g.M9(g.yG(","+x+","+u),2)}; TS.prototype.subscribe=TS.prototype.subscribe;TS.prototype.unsubscribeByKey=TS.prototype.v7;TS.prototype.getProxyState=TS.prototype.x$$;TS.prototype.disconnect=TS.prototype.Ug;TS.prototype.getPlayerContextData=TS.prototype.Lv;TS.prototype.setPlayerContextData=TS.prototype.glt;TS.prototype.getOtherConnectedRemoteId=TS.prototype.G6;TS.prototype.getReconnectTimeout=TS.prototype.BF;TS.prototype.getAutoplayMode=TS.prototype.Eb;TS.prototype.getAutoplayVideoId=TS.prototype.jp;TS.prototype.reconnect=TS.prototype.a4; TS.prototype.sendMessage=TS.prototype.T9k;TS.prototype.getXsrfToken=TS.prototype.Tv;TS.prototype.isCapabilitySupportedOnConnectedDevices=TS.prototype.BB;g.M(q3k,mp);g.b=q3k.prototype;g.b.rD=function(x){return this.qT.$_gs(x)}; g.b.contains=function(x){return!!this.qT.$_c(x)}; g.b.get=function(x){return this.qT.$_g(x)}; g.b.start=function(){this.qT.$_st()}; g.b.add=function(x,u,k){this.qT.$_a(x,u,k)}; g.b.remove=function(x,u,k){this.qT.$_r(x,u,k)}; g.b.Xx=function(x,u,k,U){this.qT.$_un(x,u,k,U)}; g.b.SJ=function(){for(var x=this.S.length,u=0;u1&&!this.W.getOption("remote","quickCast")?(this.Cj=g.R5(x,this.S,this),this.lP(g.nl(x,this.S)),x=this.W.getOption("remote","currentReceiver"),x=this.S(x),this.options[x]&&this.Mz(x),this.enable(!0)):this.enable(!1)}; q1.prototype.S=function(x){return x.key}; q1.prototype.W3=function(x){return x==="cast-selector-receiver"?"Cast...":this.Cj[x].name}; q1.prototype.Wq=function(x){g.dd.prototype.Wq.call(this,x);this.W.setOption("remote","currentReceiver",this.Cj[x]);this.WU.aU()};g.M(jyW,g.wj);g.b=jyW.prototype; g.b.create=function(){var x=this.player.X(),u=g.Q$(x);x={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:x.G("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:x.G("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:x.G("enable_cast_short_lived_lounge_token")};crS(u,x);this.subscriptions.push(g.X4("yt-remote-before-disconnect",this.nVm,this));this.subscriptions.push(g.X4("yt-remote-connection-change",this.R1$,this));this.subscriptions.push(g.X4("yt-remote-receiver-availability-change",this.Ds, this));this.subscriptions.push(g.X4("yt-remote-auto-connect",this.AOV,this));this.subscriptions.push(g.X4("yt-remote-receiver-resumed",this.s3m,this));this.subscriptions.push(g.X4("mdx-privacy-popup-confirm",this.qit,this));this.subscriptions.push(g.X4("mdx-privacy-popup-cancel",this.NCm,this));this.Ds()}; g.b.load=function(){this.player.cancelPlayback();g.wj.prototype.load.call(this);this.lJ=new rrk(this);this.player.Jl(this.lJ);this.lH=new iCs(this,this.player,this.iE);var x=(x=zPB())?x.currentTime:0;var u=ta$()?new Qv(kM(),void 0):null;x==0&&u&&(x=jx(IX(u)));x!==0&&this.jk(x);ZCo(this,this.Sj,this.Sj);this.player.Ju(6)}; g.b.unload=function(){this.player.publish("mdxautoplaycanceled");this.player.BY();this.DY=this.BD;g.VG(this.lH,this.iE);this.iE=this.lJ=this.lH=null;g.wj.prototype.unload.call(this);this.player.Ju(5);HP(this)}; g.b.SJ=function(){g.qb(this.subscriptions);g.wj.prototype.SJ.call(this)}; g.b.vY=function(x){var u=g.nR.apply(1,arguments);this.loaded&&this.lH.Is.apply(this.lH,[x].concat(g.t(u)))}; g.b.getAdState=function(){return this.lc}; g.b.Nt=function(){return this.iE?IX(this.iE).Nt:!1}; g.b.wD=function(){return this.iE?IX(this.iE).wD:!1}; g.b.jk=function(x,u){this.RO=x||0;this.player.publish("progresssync",x,u);this.player.A1("onVideoProgress",x||0)}; g.b.getCurrentTime=function(){return this.RO}; g.b.getProgressState=function(){var x=IX(this.iE),u=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:!x.b5()&&this.player.y5(),clipEnd:u.clipEnd,clipStart:u.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:x.getDuration(),ingestionTime:x.V?x.J+$N(x):x.J,isAtLiveHead:(x.V?x.S+$N(x):x.S)-this.getCurrentTime()<=1,loaded:x.B,seekableEnd:x.V?x.S+$N(x):x.S,seekableStart:x.K>0?x.K+$N(x):x.K,offset:0,viewerLivestreamJoinMediaTime:0}}; g.b.nextVideo=function(){this.iE&&this.iE.nextVideo()}; g.b.E4=function(){this.iE&&this.iE.E4()}; g.b.nVm=function(x){x===1&&(this.qY=this.iE?IX(this.iE):null)}; g.b.R1$=function(){var x=ta$()?new Qv(kM(),void 0):null;if(x){var u=this.DY;this.loaded&&this.unload();this.iE=x;this.qY=null;u.key!==this.BD.key&&(this.DY=u,this.load())}else g.bZ(this.iE),this.iE=null,this.loaded&&(this.unload(),(x=this.qY)&&x.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(x.videoId,jx(x)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)}; g.b.Ds=function(){var x=[this.BD],u=x.concat,k=Mao();Og()&&g.Ji("yt-remote-cast-available")&&k.push({key:"cast-selector-receiver",name:"Cast..."});this.Cj=u.call(x,k);x=yrS()||this.BD;Rk(this,x);this.player.A1("onMdxReceiversChange")}; g.b.AOV=function(){var x=yrS();Rk(this,x)}; g.b.s3m=function(){this.DY=yrS()}; g.b.qit=function(){this.NB=!0;HP(this);fE=!1;Ut&&FD(Ut,1);Ut=null}; g.b.NCm=function(){this.NB=!1;HP(this);Rk(this,this.BD);this.DY=this.BD;fE=!1;Ut=null;this.player.playVideo()}; g.b.VG=function(x,u){switch(x){case "casting":return this.loaded;case "receivers":return this.Cj;case "currentReceiver":return u&&(u.key==="cast-selector-receiver"?IYt():Rk(this,u)),this.loaded?this.DY:this.BD;case "quickCast":return this.Cj.length===2&&this.Cj[1].key==="cast-selector-receiver"?(u&&IYt(),!0):!1}}; g.b.oM=function(){this.iE.oM()}; g.b.JK=function(){return!1}; g.b.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]}; g.b.isLoggedIn=function(){var x,u;return((x=g.xc("PLAYER_CONFIG"))==null?void 0:(u=x.args)==null?void 0:u.authuser)!==void 0?!0:!(!g.xc("SESSION_INDEX")&&!g.xc("LOGGED_IN"))};g.M2("remote",jyW);})(_yt_player);