(function(g){var window=this;'use strict';var NO6=function(h){if(h instanceof g.jX)return h;if(typeof h.WY=="function")return h.WY(!1);if(g.sI(h)){var W=0,c=new g.jX;c.next=function(){for(;;){if(W>=h.length)return g.ZZ;if(W in h)return g.a5(h[W++]);W++}}; return c}throw Error("Not implemented");},XEt=function(h,W,c){if(g.sI(h))g.gX(h,W,c); else for(h=NO6(h);;){var V=h.next();if(V.done)break;W.call(c,V.value,void 0,h)}},W4=function(h){g.By(h,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.Gt()).toString(36)); return h},c4=function(h,W,c){Array.isArray(c)||(c=[String(c)]); g.pUp(h.Y,W,c)},tnX=function(h,W){var c=[]; XEt(W,function(V){try{var H=g.Lc.prototype.W.call(this,V,!0)}catch(B){if(B=="Storage: Invalid value was encountered")return;throw B;}H===void 0?c.push(V):g.kdD(H)&&c.push(V)},h); return c},vZc=function(h,W){tnX(h,W).forEach(function(c){g.Lc.prototype.remove.call(this,c)},h)},mUI=function(h){if(h.hq){if(h.hq.locationOverrideToken)return{locationOverrideToken:h.hq.locationOverrideToken}; if(h.hq.latitudeE7!=null&&h.hq.longitudeE7!=null)return{latitudeE7:h.hq.latitudeE7,longitudeE7:h.hq.longitudeE7}}return null},oZ6=function(h,W){g.el(h,W)||h.push(W)},pEf=function(h){var W=0,c; for(c in h)W++;return W},I3X=function(h,W){return g.uN(h,W)},Y_X=function(h){try{return g.k5.JSON.parse(h)}catch(W){}h=String(h); if(/^\s*$/.test(h)?0:/^[\],:{}\s\u2028\u2029]*$/.test(h.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("("+h+")")}catch(W){}throw Error("Invalid JSON string: "+h);},V0=function(h){if(g.k5.JSON)try{return g.k5.JSON.parse(h)}catch(W){}return Y_X(h)},OuX=function(){var h=$I(); this.X=h;h.Ye("/client_streamz/youtube/living_room/mdx/channel/opened",g.We("channel_type"))},S_2=function(){var h=$I(); this.X=h;h.Ye("/client_streamz/youtube/living_room/mdx/channel/closed",g.We("channel_type"))},gZX=function(){var h=$I(); this.X=h;h.Ye("/client_streamz/youtube/living_room/mdx/channel/message_received",g.We("channel_type"))},DUS=function(){var h=$I(); this.X=h;h.Ye("/client_streamz/youtube/living_room/mdx/channel/success")},wEc=function(){var h=$I(); this.X=h;h.Ye("/client_streamz/youtube/living_room/mdx/channel/error",g.We("channel_type"),g.We("error_type"))},k7X=function(){var h=$I(); this.X=h;h.Ye("/client_streamz/youtube/living_room/mdx/browser_channel/pending_maps")},hIK=function(){var h=$I(); this.X=h;h.Ye("/client_streamz/youtube/living_room/mdx/browser_channel/undelivered_maps")},WfU=function(h,W,c,V){var H=new g.kQ(null); h&&g.hj(H,h);W&&g.Wy(H,W);c&&g.cy(H,c);V&&(H.W=V);return H},cc2=function(h,W){return new g.gH(h,W)},sl=function(h,W){return Object.prototype.hasOwnProperty.call(h,W)},VOX=function(h,W){return h===W},H4=function(h,W){this.W={}; this.X=[];this.Zo=this.size=0;var c=arguments.length;if(c>1){if(c%2)throw Error("Uneven number of arguments");for(var V=0;V5&&(h=h.slice(h.length-5)); var W=g.xw(tO2(),function(V){return V.loungeToken}),c=g.xw(h,function(V){return V.loungeToken}); g.l6(c,function(V){return!g.el(W,V)})&&v2f(); g.iL("yt-remote-local-screens",h,31536E3)},rC=function(h){h||(g.AP("yt-remote-session-screen-id"),g.AP("yt-remote-session-video-id")); NJS();h=GU();g.QU(h,ZR());bb2(h)},o2U=function(){if(!qr){var h=g.MM(); h&&(qr=new g.eQ(h))}},pff=function(){o2U(); return qr?!!qr.get("yt-remote-use-staging-server"):!1},xI=function(h,W){g.Ys[h]=!0; var c=g.pj();c&&c.publish.apply(c,arguments);g.Ys[h]=!1},IX2=function(){},$I=function(){if(!lg){lg=new g.bZ(new IX2); var h=g.rJ("client_streamz_web_flush_count",-1);h!==-1&&(lg.G=h)}return lg},YBu=function(){var h=window.navigator.userAgent.match(/Chrome\/([0-9]+)/); return h?parseInt(h[1],10):0},Ob2=function(h){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+h)!=-1||document.currentScript.src.indexOf("&"+h)!=-1)},SB6=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},nX=function(h){h.length?g2U(h.shift(),function(){nX(h)}):DC6()},wf6=function(h){return"chrome-extension://"+h+"/cast_sender.js"},g2U=function(h,W,c){var V=document.createElement("script"); V.onerror=W;c&&(V.onload=c);g.a0(V,g.nu(h));(document.head||document.documentElement).appendChild(V)},kNU=function(){var h=YBu(),W=[]; if(h>1){var c=h-1;W.push("//www.gstatic.com/eureka/clank/"+h+"/cast_sender.js");W.push("//www.gstatic.com/eureka/clank/"+c+"/cast_sender.js")}return W},DC6=function(){var h=SB6(); h&&h(!1,"No cast extension found")},W1S=function(){if(hO$){var h=2,W=SB6(),c=function(){h--; h==0&&W&&W(!0)}; window.__onGCastApiAvailable=c;g2U("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",DC6,c)}},cPt=function(){W1S(); var h=kNU();h.push("//www.gstatic.com/eureka/clank/cast_sender.js");nX(h)},$z6=function(){W1S(); var h=kNU();h.push.apply(h,g.rN(Vtu.map(wf6)));h.push("//www.gstatic.com/eureka/clank/cast_sender.js");nX(h)},jj=function(h,W,c){g.N.call(this); this.N=c!=null?(0,g.JS)(h,c):h;this.pw=W;this.C=(0,g.JS)(this.nF,this);this.X=!1;this.W=0;this.G=this.Fl=null;this.Y=[]},aZ=function(){},sIc=function(){g.mm.call(this,"p")},HSf=function(){g.mm.call(this,"o")},Ek$=function(){return BQI=BQI||new g.Rn},RO2=function(h){g.mm.call(this,"serverreachability",h)},ej=function(h){var W=Ek$(); W.dispatchEvent(new RO2(W,h))},JPc=function(h){g.mm.call(this,"statevent",h)},zU=function(h){var W=Ek$(); W.dispatchEvent(new JPc(W,h))},uRX=function(h,W,c,V){g.mm.call(this,"timingevent",h); this.size=W;this.rtt=c;this.retries=V},Q0=function(h,W){if(typeof h!=="function")throw Error("Fn must not be null and must be a function"); return g.k5.setTimeout(function(){h()},W)},LX=function(){},ig=function(h,W,c,V){this.G=h; this.Y=W;this.Sx=c;this.qU=V||1;this.Ak=new g.dH(this);this.Mn=45E3;this.Nn=null;this.N=!1;this.T=this.Jk=this.Z=this.CM=this.Pk=this.Ef=this.XI=null;this.Wk=[];this.X=null;this.S=0;this.C=this.DH=null;this.uW=-1;this.mW=!1;this.rE=0;this.yg=null;this.hI=this.Rz=this.lW=this.zV=!1;this.W=new dzS},dzS=function(){this.W=null; this.X="";this.G=!1},ZSt=function(h,W,c){h.CM=1; h.Z=W4(W.clone());h.T=c;h.zV=!0;GRf(h,null)},GRf=function(h,W){h.Pk=Date.now(); KX(h);h.Jk=h.Z.clone();c4(h.Jk,"t",h.qU);h.S=0;var c=h.G.CM;h.W=new dzS;h.X=rP6(h.G,c?W:null,!h.T);h.rE>0&&(h.yg=new g.O5((0,g.JS)(h.Lr,h,h.X),h.rE));h.Ak.listen(h.X,"readystatechange",h.CF);W=h.Nn?g.qx(h.Nn):{};h.T?(h.DH||(h.DH="POST"),W["Content-Type"]="application/x-www-form-urlencoded",h.X.send(h.Jk,h.DH,h.T,W)):(h.DH="GET",h.X.send(h.Jk,h.DH,null,W));ej(1)},xzX=function(h){if(!qhU(h))return g.Yv(h.X); var W=g.OL(h.X);if(W==="")return"";var c="",V=W.length,H=g.pW(h.X)==4;if(!h.W.W){if(typeof TextDecoder==="undefined")return Ai(h),Ul(h),"";h.W.W=new g.k5.TextDecoder}for(var B=0;BW.length)return lL6;W=W.slice(V,V+c);h.S=V+c;return W},KX=function(h){h.Ef=Date.now()+h.Mn; aLU(h,h.Mn)},aLU=function(h,W){if(h.XI!=null)throw Error("WatchDog timer not null"); h.XI=Q0((0,g.JS)(h.gw,h),W)},eOX=function(h){h.XI&&(g.k5.clearTimeout(h.XI),h.XI=null)},Ul=function(h){h.G.xx()||h.mW||zOI(h.G,h)},Ai=function(h){eOX(h); g.hA(h.yg);h.yg=null;h.Ak.removeAll();if(h.X){var W=h.X;h.X=null;W.abort();W.dispose()}},Mt2=function(h,W){try{var c=h.G; if(c.xL!=0&&(c.X==h||QIU(c.W,h)))if(!h.Rz&&QIU(c.W,h)&&c.xL==3){try{var V=c.d3.X.parse(W)}catch(z){V=null}if(Array.isArray(V)&&V.length==3){var H=V;if(H[0]==0)a:{if(!c.Z){if(c.X)if(c.X.Pk+3E30&&(c.rE=1.5*J);V=c;var u=h.BA();if(u){var d=g.Sa(u,"X-Client-Wire-Protocol");if(d){var G=V.W;!G.X&&(g.Mx(d,"spdy")||g.Mx(d,"quic")||g.Mx(d,"h2"))&&(G.Y=G.C,G.X=new Set,G.W&&(K1l(G,G.W),G.W=null))}if(V.zV){var Z=g.Sa(u,"X-HTTP-Session-Id");Z&&(V.q$=Z,g.By(V.Nn,V.zV,Z))}}c.xL=3;c.C&&c.C.SE();c.Zn&&(c.bX=Date.now()-h.Pk);V=c;var r=h;V.U8=AP6(V,V.CM?V.qU:null,V.Sx);if(r.Rz){UzK(V.W, r);var q=r,x=V.rE;x&&q.setTimeout(x);q.XI&&(eOX(q),KX(q));V.X=r}else CLu(V);c.G.length>0&&y0(c)}else B[0]!="stop"&&B[0]!="close"||FQ(c,7);else c.xL==3&&(B[0]=="stop"||B[0]=="close"?B[0]=="stop"?FQ(c,7):c.disconnect():B[0]!="noop"&&c.C&&c.C.jE(B),c.Wk=0)}ej(4)}catch(z){}},F1I=function(h,W){this.X=h; this.map=W;this.context=null},yPU=function(h){this.C=h||10; g.k5.PerformanceNavigationTiming?(h=g.k5.performance.getEntriesByType("navigation"),h=h.length>0&&(h[0].nextHopProtocol=="hq"||h[0].nextHopProtocol=="h2")):h=!!(g.k5.chrome&&g.k5.chrome.loadTimes&&g.k5.chrome.loadTimes()&&g.k5.chrome.loadTimes().wasFetchedViaSpdy);this.Y=h?this.C:1;this.X=null;this.Y>1&&(this.X=new Set);this.W=null;this.G=[]},PLX=function(h){return h.W?!0:h.X?h.X.size>=h.Y:!1},iSS=function(h){return h.W?1:h.X?h.X.size:0},QIU=function(h,W){return h.W?h.W==W:h.X?h.X.has(W):!1},K1l= function(h,W){h.X?h.X.add(W):h.W=W},UzK=function(h,W){h.W&&h.W==W?h.W=null:h.X&&h.X.has(W)&&h.X.delete(W)},fLc=function(h){if(h.W!=null)return h.G.concat(h.W.Wk); if(h.X!=null&&h.X.size!==0){var W=h.G;h=g.e(h.X.values());for(var c=h.next();!c.done;c=h.next())W=W.concat(c.value.Wk);return W}return g.Mu(h.G)},bSU=function(h,W){var c=new LX; if(g.k5.Image){var V=new Image;V.onload=g.uK(P4,c,"TestLoadImage: loaded",!0,W,V);V.onerror=g.uK(P4,c,"TestLoadImage: error",!1,W,V);V.onabort=g.uK(P4,c,"TestLoadImage: abort",!1,W,V);V.ontimeout=g.uK(P4,c,"TestLoadImage: timeout",!1,W,V);g.k5.setTimeout(function(){if(V.ontimeout)V.ontimeout()},1E4); V.src=h}else W(!1)},TQc=function(h,W){var c=new LX,V=new AbortController,H=setTimeout(function(){V.abort(); P4(c,"TestPingServer: timeout",!1,W)},1E4); fetch(h,{signal:V.signal}).then(function(B){clearTimeout(H);B.ok?P4(c,"TestPingServer: ok",!0,W):P4(c,"TestPingServer: server error",!1,W)}).catch(function(){clearTimeout(H); P4(c,"TestPingServer: error",!1,W)})},P4=function(h,W,c,V,H){try{H&&(H.onload=null,H.onerror=null,H.onabort=null,H.ontimeout=null),V(c)}catch(B){}},NQS=function(){this.X=new aZ},fX=function(h,W,c){return c&&c.D9?c.D9[h]||W:W},Xtl=function(h){this.G=[]; this.qU=this.U8=this.Nn=this.Sx=this.X=this.q$=this.zV=this.mW=this.S=this.uW=this.T=null;this.Uy=this.Jk=0;this.Lj=fX("failFast",!1,h);this.Rz=this.XI=this.Z=this.N=this.C=null;this.U5=!0;this.Tx=this.yg=-1;this.hI=this.Wk=this.Pk=0;this.Qj=fX("baseRetryDelayMs",5E3,h);this.H9=fX("retryDelaySeedMs",1E4,h);this.Ns=fX("forwardChannelMaxRetries",2,h);this.iX=fX("forwardChannelRequestTimeoutMs",2E4,h);this.hq=h&&h.KJB||void 0;this.mF=h&&h.L1V||void 0;this.BV=h&&h.CRk||!1;this.rE=void 0;this.CM=h&&h.LeO|| !1;this.Y="";this.W=new yPU(h&&h.eXk);this.d3=new NQS;this.Ak=h&&h.ngI||!1;this.Ef=h&&h.P0M||!1;this.Ak&&this.Ef&&(this.Ef=!1);this.nj=h&&h.y0I||!1;h&&h.j4k&&(this.U5=!1);this.Zn=!this.Ak&&this.U5&&h&&h.OnM||!1;this.RR=void 0;h&&h.xX&&h.xX>0&&(this.RR=h.xX);this.fR=void 0;this.bX=0;this.Mn=!1;this.lW=this.DH=null},Mr=function(h){h.X&&(ttI(h),h.X.cancel(),h.X=null)},vkI=function(h){Mr(h); h.Z&&(g.k5.clearTimeout(h.Z),h.Z=null);CX(h);h.W.cancel();h.N&&(typeof h.N==="number"&&g.k5.clearTimeout(h.N),h.N=null)},y0=function(h){PLX(h.W)||h.N||(h.N=!0,g.nW(h.mS,h),h.Pk=0)},ok6=function(h,W){if(iSS(h.W)>=h.W.Y-(h.N?1:0))return!1; if(h.N)return h.G=W.Wk.concat(h.G),!0;if(h.xL==1||h.xL==2||h.Pk>=(h.Lj?0:h.Ns))return!1;h.N=Q0((0,g.JS)(h.mS,h,W),mzt(h,h.Pk));h.Pk++;return!0},ILu=function(h,W){var c; W?c=W.Sx:c=h.Jk++;var V=h.Nn.clone();g.By(V,"SID",h.Y);g.By(V,"RID",c);g.By(V,"AID",h.yg);bg(h,V);h.S&&h.T&&g.ue(V,h.S,h.T);c=new ig(h,h.Y,c,h.Pk+1);h.S===null&&(c.Nn=h.T);W&&(h.G=W.Wk.concat(h.G));W=pt6(h,c,1E3);c.setTimeout(Math.round(h.iX*.5)+Math.round(h.iX*.5*Math.random()));K1l(h.W,c);ZSt(c,V,W)},bg=function(h,W){h.mW&&g.k6(h.mW,function(c,V){g.By(W,V,c)}); h.C&&g.k6({},function(c,V){g.By(W,V,c)})},pt6=function(h,W,c){c=Math.min(h.G.length,c); var V=h.C?(0,g.JS)(h.C.ST,h.C,h):null;a:{for(var H=h.G,B=-1;;){var E=["count="+c];B==-1?c>0?(B=H[0].X,E.push("ofs="+B)):B=0:E.push("ofs="+B);for(var J=!0,u=0;u=3)return!1; h.hI++;h.Z=Q0((0,g.JS)(h.HK,h),mzt(h,h.Wk));h.Wk++;return!0},ttI=function(h){h.DH!=null&&(g.k5.clearTimeout(h.DH),h.DH=null)},Yhu=function(h){h.X=new ig(h,h.Y,"rpc",h.hI); h.S===null&&(h.X.Nn=h.T);h.X.rE=0;var W=h.U8.clone();g.By(W,"RID","rpc");g.By(W,"SID",h.Y);g.By(W,"AID",h.yg);g.By(W,"CI",h.Rz?"0":"1");!h.Rz&&h.RR&&g.By(W,"TO",h.RR);g.By(W,"TYPE","xmlhttp");bg(h,W);h.S&&h.T&&g.ue(W,h.S,h.T);h.rE&&h.X.setTimeout(h.rE);var c=h.X;h=h.qU;c.CM=1;c.Z=W4(W.clone());c.T=null;c.zV=!0;GRf(c,h)},CX=function(h){h.XI!=null&&(g.k5.clearTimeout(h.XI),h.XI=null)},zOI=function(h,W){var c=null; if(h.X==W){CX(h);ttI(h);h.X=null;var V=2}else if(QIU(h.W,W))c=W.Wk,UzK(h.W,W),V=1;else return;if(h.xL!=0)if(W.N)if(V==1){c=W.T?W.T.length:0;W=Date.now()-W.Pk;var H=h.Pk;V=Ek$();V.dispatchEvent(new uRX(V,c,W,H));y0(h)}else CLu(h);else{var B=W.uW;H=W.getLastError();if(H==3||H==0&&B>0||!(V==1&&ok6(h,W)||V==2&&L1t(h)))switch(c&&c.length>0&&(W=h.W,W.G=W.G.concat(c)),H){case 1:FQ(h,5);break;case 4:FQ(h,10);break;case 3:FQ(h,6);break;default:FQ(h,2)}}},mzt=function(h,W){var c=h.Qj+Math.floor(Math.random()* h.H9); h.isActive()||(c*=2);return c*W},FQ=function(h,W){if(W==2){var c=(0,g.JS)(h.jdB,h),V=h.mF,H=!V; V=new g.kQ(V||"//www.google.com/images/cleardot.gif");g.k5.location&&g.k5.location.protocol=="http"||g.hj(V,"https");W4(V);H?bSU(V.toString(),c):TQc(V.toString(),c)}else zU(2);h.xL=0;h.C&&h.C.Cr(W);OSI(h);vkI(h)},OSI=function(h){h.xL=0; h.lW=[];if(h.C){var W=fLc(h.W);if(W.length!=0||h.G.length!=0)g.F6(h.lW,W),g.F6(h.lW,h.G),h.W.G.length=0,g.Mu(h.G),h.G.length=0;h.C.gB()}},Shl=function(h){if(h.xL==0)return h.lW; var W=[];g.F6(W,fLc(h.W));g.F6(W,h.G);return W},AP6=function(h,W,c){var V=g.E5(c); V.X!=""?(W&&g.Wy(V,W+"."+V.X),g.cy(V,V.G)):(V=g.k5.location,V=WfU(V.protocol,W?W+"."+V.hostname:V.hostname,+V.port,c));W=h.zV;c=h.q$;W&&c&&g.By(V,W,c);g.By(V,"VER",h.NJ);bg(h,V);return V},rP6=function(h,W,c){if(W&&!h.CM)throw Error("Can't create secondary domain capable XhrIo object."); W=h.BV&&!h.hq?new g.vK(new g.Sc({M2:c})):new g.vK(h.hq);W.S=h.CM;return W},gkc=function(){},Dz2=function(){},Nr=function(h,W){g.Rn.call(this); this.X=new Xtl(W);this.C=h;this.W=W&&W.h9N||null;h=W&&W.dnW||null;W&&W.BJM&&(h?h["X-Client-Protocol"]="webchannel":h={"X-Client-Protocol":"webchannel"});this.X.T=h;h=W&&W.IOf||null;W&&W.uh&&(h?h["X-WebChannel-Content-Type"]=W.uh:h={"X-WebChannel-Content-Type":W.uh});W&&W.pB&&(h?h["X-WebChannel-Client-Profile"]=W.pB:h={"X-WebChannel-Client-Profile":W.pB});this.X.uW=h;(h=W&&W.J7n)&&!g.Cr(h)&&(this.X.S=h);this.N=W&&W.LeO||!1;this.Y=W&&W.eDV||!1;(W=W&&W.h1)&&!g.Cr(W)&&(this.X.zV=W,g.JB(this.W,W)&&(h= this.W,W in h&&delete h[W]));this.G=new TU(this)},wtt=function(h){sIc.call(this); h.__headers__&&(this.headers=h.__headers__,this.statusCode=h.__status__,delete h.__headers__,delete h.__status__);var W=h.__sm__;W?this.data=(this.X=g.VW(W))?g.Za(W,this.X):W:this.data=h},kRU=function(h){HSf.call(this); this.status=1;this.errorCode=h},TU=function(h){this.X=h},hBU=function(h,W){this.W=h; this.X=W},W6$=function(h){return Shl(h.X).map(function(W){var c=h.W; W=W.map;"__data__"in W?(W=W.__data__,c=c.Y?Y_X(W):W):c=W;return c})},XQ=function(h,W){if(typeof h!=="function")throw Error("Fn must not be null and must be a function"); return g.k5.setTimeout(function(){h()},W)},v4=function(h){ti.dispatchEvent(new cZU(ti,h))},cZU=function(h){g.mm.call(this,"statevent",h)},mn=function(h,W,c,V){this.X=h; this.Y=W;this.S=c;this.N=V||1;this.W=45E3;this.G=new g.dH(this);this.C=new g.yR;this.C.setInterval(250)},$v2=function(h,W,c){h.iU=1; h.Yu=W4(W.clone());h.BX=c;h.zV=!0;VPl(h,null)},sC6=function(h,W,c,V,H){h.iU=1; h.Yu=W4(W.clone());h.BX=null;h.zV=c;H&&(h.dP=!1);VPl(h,V)},VPl=function(h,W){h.PD=Date.now(); Hg2(h);h.rG=h.Yu.clone();c4(h.rG,"t",h.N);h.yS=0;h.v3=h.X.xA(h.X.vD()?W:null);h.Jx>0&&(h.ZN=new g.O5((0,g.JS)(h.RJ,h,h.v3),h.Jx));h.G.listen(h.v3,"readystatechange",h.q4);W=h.tX?g.qx(h.tX):{};h.BX?(h.cw="POST",W["Content-Type"]="application/x-www-form-urlencoded",h.v3.send(h.rG,h.cw,h.BX,W)):(h.cw="GET",h.dP&&!g.Js&&(W.Connection="close"),h.v3.send(h.rG,h.cw,null,W));h.X.r8(1)},RBt=function(h,W){var c=h.yS,V=W.indexOf("\n",c); if(V==-1)return Bwf;c=Number(W.substring(c,V));if(isNaN(c))return E4t;V+=1;if(V+c>W.length)return Bwf;W=W.slice(V,V+c);h.yS=V+c;return W},Hg2=function(h){h.IW=Date.now()+h.W; JZX(h,h.W)},JZX=function(h,W){if(h.zR!=null)throw Error("WatchDog timer not null"); h.zR=XQ((0,g.JS)(h.Rj,h),W)},uJX=function(h){h.zR&&(g.k5.clearTimeout(h.zR),h.zR=null)},dvu=function(h){h.X.xx()||h.dY||h.X.Bf(h)},oZ=function(h){uJX(h); g.hA(h.ZN);h.ZN=null;h.C.stop();h.G.removeAll();if(h.v3){var W=h.v3;h.v3=null;W.abort();W.dispose()}h.Nm&&(h.Nm=null)},G1U=function(h,W){try{h.X.qJ(h,W),h.X.r8(4)}catch(c){}},rZ6=function(h,W,c,V,H){if(V==0)c(!1); else{var B=H||0;V--;Zgc(h,W,function(E){E?c(!0):g.k5.setTimeout(function(){rZ6(h,W,c,V,B)},B)})}},Zgc=function(h,W,c){var V=new Image; V.onload=function(){try{pX(V),c(!0)}catch(H){}}; V.onerror=function(){try{pX(V),c(!1)}catch(H){}}; V.onabort=function(){try{pX(V),c(!1)}catch(H){}}; V.ontimeout=function(){try{pX(V),c(!1)}catch(H){}}; g.k5.setTimeout(function(){if(V.ontimeout)V.ontimeout()},W); V.src=h},pX=function(h){h.onload=null; h.onerror=null;h.onabort=null;h.ontimeout=null},qGl=function(h){this.X=h; this.W=new aZ},xvl=function(h){var W=IZ(h.X,h.GX,"/mail/images/cleardot.gif"); W4(W);rZ6(W.toString(),5E3,(0,g.JS)(h.GE,h),3,2E3);h.r8(1)},lu2=function(h){var W=h.X.N; W!=null?(v4(5),W?(v4(11),YI(h.X,h,!1)):(v4(12),YI(h.X,h,!0))):(h.Xm=new mn(h),h.Xm.tX=h.Mc,W=h.X,W=IZ(W,W.vD()?h.JA:null,h.eZ),v4(5),c4(W,"TYPE","xmlhttp"),sC6(h.Xm,W,!1,h.JA,!1))},n4$=function(h,W,c){this.X=1; this.W=[];this.G=[];this.C=new aZ;this.T=h||null;this.N=W!=null?W:null;this.Z=c||!1},jC6=function(h,W){this.X=h; this.map=W;this.context=null},aul=function(h,W,c,V){g.mm.call(this,"timingevent",h); this.size=W;this.rtt=c;this.retries=V},eB$=function(h){g.mm.call(this,"serverreachability",h)},QCu=function(h){h.Fs(1,0); h.Iy=IZ(h,null,h.V_);zB$(h)},L6c=function(h){h.yK&&(h.yK.abort(),h.yK=null); h.At&&(h.At.cancel(),h.At=null);h.Ao&&(g.k5.clearTimeout(h.Ao),h.Ao=null);Ol(h);h.PR&&(h.PR.cancel(),h.PR=null);h.g7&&(g.k5.clearTimeout(h.g7),h.g7=null)},ig$=function(h,W){if(h.X==0)throw Error("Invalid operation: sending map when state is closed"); h.W.push(new jC6(h.KF++,W));h.X!=2&&h.X!=3||zB$(h)},K66=function(h){var W=0; h.At&&W++;h.PR&&W++;return W},zB$=function(h){h.PR||h.g7||(h.g7=XQ((0,g.JS)(h.UM,h),0),h.kG=0)},CCc=function(h,W){if(h.X==1){if(!W){h.bz=Math.floor(Math.random()*1E5); W=h.bz++;var c=new mn(h,"",W);c.tX=h.A2;var V=AZ2(h),H=h.Iy.clone();g.By(H,"RID",W);g.By(H,"CVER","1");Sj(h,H);$v2(c,H,V);h.PR=c;h.X=2}}else h.X==3&&(W?Uv6(h,W):h.W.length==0||h.PR||Uv6(h))},Uv6=function(h,W){if(W)if(h.e3>6){h.W=h.G.concat(h.W); h.G.length=0;var c=h.bz-1;W=AZ2(h)}else c=W.S,W=W.BX;else c=h.bz++,W=AZ2(h);var V=h.Iy.clone();g.By(V,"SID",h.Y);g.By(V,"RID",c);g.By(V,"AID",h.Qe);Sj(h,V);c=new mn(h,h.Y,c,h.kG+1);c.tX=h.A2;c.setTimeout(1E4+Math.round(1E4*Math.random()));h.PR=c;$v2(c,V,W)},Sj=function(h,W){h.Mh&&(h=h.Mh.cK())&&g.k6(h,function(c,V){g.By(W,V,c)})},AZ2=function(h){var W=Math.min(h.W.length,1E3),c=["count="+W]; if(h.e3>6&&W>0){var V=h.W[0].X;c.push("ofs="+V)}else V=0;for(var H={},B=0;B=3)return!1; h.S++;h.Ao=XQ((0,g.JS)(h.sM,h),F66(h,h.DL));h.DL++;return!0},YI=function(h,W,c){h.Hf=h.N==null?c:!h.N; h.Pj=W.T0;h.Z||QCu(h)},Ol=function(h){h.Ej!=null&&(g.k5.clearTimeout(h.Ej),h.Ej=null)},F66=function(h,W){var c=5E3+Math.floor(Math.random()*1E4); h.isActive()||(c*=2);return c*W},gC=function(h,W){if(W==2||W==9){var c=null; h.Mh&&(c=null);var V=(0,g.JS)(h.CJk,h);c||(c=new g.kQ("//www.google.com/images/cleardot.gif"),W4(c));Zgc(c.toString(),1E4,V)}else v4(2);PC6(h,W)},PC6=function(h,W){h.X=0; h.Mh&&h.Mh.oJ(W);fu6(h);L6c(h)},fu6=function(h){h.X=0; h.Pj=-1;if(h.Mh)if(h.G.length==0&&h.W.length==0)h.Mh.TU();else{var W=g.Mu(h.G),c=g.Mu(h.W);h.G.length=0;h.W.length=0;h.Mh.TU(W,c)}},IZ=function(h,W,c){var V=g.E5(c); if(V.X!="")W&&g.Wy(V,W+"."+V.X),g.cy(V,V.G);else{var H=window.location;V=WfU(H.protocol,W?W+"."+H.hostname:H.hostname,+H.port,c)}h.f8&&g.k6(h.f8,function(B,E){g.By(V,E,B)}); g.By(V,"VER",h.e3);Sj(h,V);return V},bgu=function(){},Twu=function(){this.X=[]; this.W=[]},NwU=function(h){g.mm.call(this,"channelMessage"); this.message=h},Xp6=function(h){g.mm.call(this,"channelError"); this.error=h},tPl=function(h,W){this.action=h; this.params=W||{}},DR=function(h,W){g.N.call(this); this.X=new g.oD(this.PVf,0,this);g.X(this,this.X);this.pw=5E3;this.W=0;if(typeof h==="function")W&&(h=(0,g.JS)(h,W));else if(h&&typeof h.handleEvent==="function")h=(0,g.JS)(h.handleEvent,h);else throw Error("Invalid listener argument");this.G=h},v4K=function(h,W,c,V,H,B,E,J,u,d,G,Z,r,q){c=c===void 0?!1:c; V=V===void 0?function(){return""}:V; H=H===void 0?!1:H;B=B===void 0?!1:B;E=E===void 0?!1:E;J=J===void 0?function(){return g.AF({})}:J; u=u===void 0?!1:u;G=G===void 0?!1:G;Z=Z===void 0?!1:Z;r=r===void 0?!1:r;q=q===void 0?!1:q;this.CM=h;this.XI=W;this.N=new g.ar;this.W=new DR(this.qhW,this);this.X=null;this.S=!1;this.T=null;this.Pk="";this.Wk=this.Z=0;this.G=[];this.hI=c;this.zV=V;this.C=B;this.Nn=J;this.mW=d;this.qU=E;this.DH=null;this.Y=g.AF();this.Sx=H;this.lW=u;this.Ak=G;this.Ef=Z;this.U5=r;this.uW=q;this.rE=new OuX;this.Rz=new S_2;this.Mn=new DUS;this.Jk=new gZX;this.yg=new wEc;this.Zn=new k7X;this.fR=new hIK},ppU=function(h, W,c,V,H){mvU(h); if(h.X){var B=g.X_("ID_TOKEN"),E=h.X.A2||{};B?E["x-youtube-identity-token"]=B:delete E["x-youtube-identity-token"];h.X.A2=E}o4U(h);V?(V.getState()!=3&&K66(V)==0||V.getState(),h.X.connect(W,c,h.XI,V.Y,V.Qe)):H?h.X.connect(W,c,h.XI,H.sessionId,H.arrayId):h.X.connect(W,c,h.XI)},SG2=function(h,W){return h.U5?!0:h.Ef?Object.values(Iuf).includes(W):h.Ak?!Object.values(YG6).includes(W):h.uW?Object.values(Og6).includes(W):!1},wp2=function(h){var W,c; g.P(function(V){if(V.W==1)return g.LU(V,2),g.F(V,g4U(h),2);g.Pd(V);W=h.G;h.G=[];c=W.length;DvS(h,W,c);wC(h);return g.bT(V,0)})},DvS=function(h,W,c){for(var V=0;V0?c=Object.assign({},c,W):delete c.Authorization;h.X.A2=c}},o4U=function(h){h.mW&&!h.C&&hj$(h,h.mW())},kI=function(h){this.scheme="https"; this.port=this.domain="";this.X="/api/lounge";this.W=!0;h=h||document.location.href;var W=Number(g.BA(h)[4]||null)||"";W&&(this.port=":"+W);this.domain=g.E6(h)||"";h=g.TF();h.search("MSIE")>=0&&(h=h.match(/MSIE ([\d.]+)/)[1],g.bN(h,"10.0")<0&&(this.W=!1))},hr=function(h,W){var c=h.X; h.W&&(c=h.scheme+"://"+h.domain+h.port+h.X);return g.r0(c+W,{})},WaI=function(h,W){g.Rn.call(this); var c=this;this.pR=h();this.pR.subscribe("handlerOpened",this.Z6,this);this.pR.subscribe("handlerClosed",this.onClosed,this);this.pR.subscribe("handlerError",function(V,H){c.onError(H)}); this.pR.subscribe("handlerMessage",this.onMessage,this);this.X=W},cLu=function(h,W,c){var V=this; c=c===void 0?function(){return""}:c; var H=H===void 0?new Dz2:H;var B=B===void 0?new g.ar:B;this.pathPrefix=h;this.X=W;this.Pk=c;this.C=B;this.Z=null;this.T=this.S=0;this.channel=null;this.N=0;this.G=new DR(function(){V.G.isActive();var E;((E=V.channel)==null?void 0:iSS((new hBU(E,E.X)).X.W))===0&&V.connect(V.Z,V.S)}); this.Y={};this.W={};this.XI=!1;this.logger=null;this.Wk=[];this.HH=void 0;this.Nn=new OuX;this.DH=new S_2;this.mW=new gZX;this.zV=new wEc},V56=function(h){g.DP(h.channel,"m",function(){h.N=3; h.G.reset();h.Z=null;h.S=0;for(var W=g.e(h.Wk),c=W.next();!c.done;c=W.next())c=c.value,h.channel&&h.channel.send(c);h.Wk=[];h.publish("webChannelOpened");h.Nn.jz("WEB_CHANNEL")}); g.DP(h.channel,"n",function(){h.N=0;h.G.isActive()||h.publish("webChannelClosed");var W,c=(W=h.channel)==null?void 0:W6$(new hBU(W,W.X));c&&(h.Wk=[].concat(g.rN(c)));h.DH.jz("WEB_CHANNEL")}); g.DP(h.channel,"p",function(W){var c=W.data;c[0]==="gracefulReconnect"?(h.G.start(),h.channel&&h.channel.close()):h.publish("webChannelMessage",new tPl(c[0],c[1]));h.HH=W.statusCode;h.mW.jz("WEB_CHANNEL")}); g.DP(h.channel,"o",function(){h.HH===401||h.G.start();h.publish("webChannelError");h.zV.jz("WEB_CHANNEL","")})},$0t=function(h){var W=h.Pk(); W?h.Y["x-youtube-lounge-xsrf-token"]=W:delete h.Y["x-youtube-lounge-xsrf-token"]},sSI=function(h){g.Rn.call(this); this.X=h();this.X.subscribe("webChannelOpened",this.cW,this);this.X.subscribe("webChannelClosed",this.onClosed,this);this.X.subscribe("webChannelError",this.onError,this);this.X.subscribe("webChannelMessage",this.onMessage,this)},HjS=function(h,W,c,V,H){function B(){return new v4K(hr(h,"/bc"),W,!1,c,V)} c=c===void 0?function(){return""}:c; return g.ZX("enable_mdx_web_channel_desktop")?new sSI(function(){return new cLu(hr(h,"/wc"),W,c)}):new WaI(B,H)},JLI=function(){var h=BIU; Es2();W1.push(h);Rjl()},c1=function(h,W){Es2(); var c=uXt(h,String(W));W1.length==0?d0t(c):(Rjl(),g.gX(W1,function(V){V(c)}))},VE=function(h){c1("CP",h)},Es2=function(){W1||(W1=g.c2("yt.mdx.remote.debug.handlers_")||[],g.hS("yt.mdx.remote.debug.handlers_",W1))},d0t=function(h){var W=($U+1)%50; $U=W;sD[W]=h;H1||(H1=W==49)},Rjl=function(){var h=W1; if(sD[0]){var W=H1?$U:-1,c={};do c={Zx:void 0},W=(W+1)%50,c.Zx=sD[W],g.gX(h,function(V){return function(H){H(V.Zx)}}(c)); while(W!=$U);sD=Array(50);$U=-1;H1=!1}},uXt=function(h,W){var c=(Date.now()-GZK)/1E3; c.toFixed&&(c=c.toFixed(3));var V=[];V.push("[",c+"s","] ");V.push("[","yt.mdx.remote","] ");V.push(h+": "+W,"\n");return V.join("")},B1=function(h){g.h1.call(this); this.N=h;this.screens=[]},Zj6=function(h,W){var c=h.get(W.uuid)||h.get(W.id); if(c)return h=c.name,c.id=W.id||c.id,c.name=W.name,c.token=W.token,c.uuid=W.uuid||c.uuid,c.name!=h;h.screens.push(W);return!0},rLI=function(h,W){var c=h.screens.length!=W.length; h.screens=g.Lf(h.screens,function(B){return!!yc6(W,B)}); for(var V=W.length,H=0;H0&&h.Y0&&jW(h,c)},function(W){h.C=function(){}; h.KU(W)})},pY2=function(h){var W={}; W.pairingCode=h.DH;W.theme=h.CM;pff()&&(W.env_useStageMdx=1);return g.ZB(W)},I8U=function(h){return new Promise(function(W){h.DH=MOu(); if(h.Nn){var c=new chrome.cast.DialLaunchResponse(!0,pY2(h));W(c);osS(h)}else h.XI=function(){g.uW(h.T);h.XI=function(){}; h.T=NaN;var V=new chrome.cast.DialLaunchResponse(!0,pY2(h));W(V);osS(h)},h.T=g.Rx(function(){h.XI()},100)})},OjS=function(h,W,c){h.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(W)); var V=new RZ(W);return(new Promise(function(H){YrX(h,V,function(B){B?(h.Wk=!0,GI(h.Y,V),rd(h,V),jW(h,c)):g.pu(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(W)+" is not online."));H(B)},5)})).then(function(H){return H?new chrome.cast.DialLaunchResponse(!1):I8U(h)})},SrU=function(h,W){var c=h.Z.receiver.label,V=h.W.friendlyName; return(new Promise(function(H){Ka6(h.Y,c,W,V,function(B){B&&B.token&&rd(h,B);H(B)},function(B){qi(h,"Failed to get DIAL screen: "+B); H(null)})})).then(function(H){return H&&H.token?new chrome.cast.DialLaunchResponse(!1):I8U(h)})},YrX=function(h,W,c,V){g.uW(h.N); h.N=0;U02(h.Y,W,function(H){H||V<0?c(H):h.N=g.Rx(function(){YrX(h,W,c,V-1)},300)})},jW=function(h,W){h.info("getDialAppInfoWithTimeout_ "+W); ni(h)&&(g.uW(h.S),h.S=0,W==0?gsU(h):h.S=g.Rx(function(){gsU(h)},W))},gsU=function(h){ni(h)&&h.G.getDialAppInfo(function(W){h.info("getDialAppInfo dialLaunchData: "+JSON.stringify(W)); W=W.extraData||{};var c=null;if(W.loungeToken){var V;((V=h.X)==null?void 0:V.token)==W.loungeToken&&(c="staleLoungeToken")}else c="missingLoungeToken";c?(h.Pk=c,jW(h,3E4)):(h.Wk=!1,h.Pk="unknown",yL2(h,W.loungeToken),jW(h,W.loungeTokenRefreshIntervalMs))},function(W){h.info("getDialAppInfo error: "+W); h.Pk="noLoungeTokenResponse";jW(h,3E4)})},D0X=function(h){g.uW(h.N); h.N=0;g.uW(h.S);h.S=0;h.C();h.C=function(){}; g.uW(h.T)},ay=function(h,W){Zg.call(this,h,W,"ManualSession"); this.G=g.Rx((0,g.JS)(this.XX,this,null),150)},eW=function(h,W){g.h1.call(this); this.config_=W;this.W=h;this.Z=W.appId||"233637DE";this.Y=W.theme||"cl";this.T=W.disableCastApi||!1;this.N=W.forceMirroring||!1;this.X=null;this.S=!1;this.G=[];this.C=(0,g.JS)(this.jRk,this)},wY2=function(h,W){return W?g.jl(h.G,function(c){return Ji(W,c.label)},h):null},zI=function(h){c1("Controller",h)},BIU=function(h){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(h)},QE=function(h){return h.S||!!h.G.length||!!h.X},Li=function(h,W,c){W!=h.X&&(g.hA(h.X),(h.X=W)?(c?h.publish("yt-remote-cast2-receiver-resumed", W.W):h.publish("yt-remote-cast2-receiver-selected",W.W),W.subscribe("sessionScreen",(0,g.JS)(h.uK,h,W)),W.subscribe("sessionFailed",function(){return kZU(h,W)}),W.X?h.publish("yt-remote-cast2-session-change",W.X):c&&h.X.XX(null)):h.publish("yt-remote-cast2-session-change",null))},kZU=function(h,W){h.X==W&&h.publish("yt-remote-cast2-session-failed")},htS=function(h){var W=h.W.yc(),c=h.X&&h.X.W; h=g.xw(W,function(V){c&&Ji(V,c.label)&&(c=null);var H=V.uuid?V.uuid:V.id,B=wY2(this,V);B?(B.label=H,B.friendlyName=V.name):(B=new chrome.cast.Receiver(H,V.name),B.receiverType=chrome.cast.ReceiverType.CUSTOM);return B},h); c&&(c.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(c=new chrome.cast.Receiver(c.label,c.friendlyName),c.receiverType=chrome.cast.ReceiverType.CUSTOM),h.push(c));return h},BYu=function(h,W,c,V){V.disableCastApi?i9("Cannot initialize because disabled by Mdx config."):W52()?cn6(W,V)&&(V9S(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?$A$(h,c):(window.__onGCastApiAvailable=function(H,B){H?$A$(h,c):(Ki("Failed to load cast API: "+B),sl6(!1),V9S(!1),g.AP("yt-remote-cast-available"),g.AP("yt-remote-cast-receiver"), Hq6(),c(!1))},V.loadCastApiSetupScript?g.cB("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?YBu()>=60&&cPt():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?DC6():YBu()>=89?$z6():(W1S(),nX(Vtu.map(wf6))))):i9("Cannot initialize because not running Chrome")},Hq6=function(){i9("dispose"); var h=Ar();h&&h.dispose();g.hS("yt.mdx.remote.cloudview.instance_",null);EAf(!1);g.gI(Rt6);Rt6.length=0},UD=function(){return!!g.KS("yt-remote-cast-installed")},JnU=function(){var h=g.KS("yt-remote-cast-receiver"); return h?h.friendlyName:null},uI6=function(){i9("clearCurrentReceiver"); g.AP("yt-remote-cast-receiver")},dA6=function(){return UD()?Ar()?Ar().getCastSession():(Ki("getCastSelector: Cast is not initialized."),null):(Ki("getCastSelector: Cast API is not installed!"),null)},Ge6=function(){UD()?Ar()?Ci()?(i9("Requesting cast selector."),Ar().requestSession()):(i9("Wait for cast API to be ready to request the session."),Rt6.push(g.S5("yt-remote-cast2-api-ready",Ge6))):Ki("requestCastSelector: Cast is not initialized."):Ki("requestCastSelector: Cast API is not installed!")}, Mi=function(h,W){Ci()?Ar().setConnectedScreenStatus(h,W):Ki("setConnectedScreenStatus called before ready.")},W52=function(){var h=g.TF().search(/ (CrMo|Chrome|CriOS)\//)>=0; return g.Zx||h},ZqU=function(h,W){Ar().init(h,W)},cn6=function(h,W){var c=!1; Ar()||(h=new eW(h,W),h.subscribe("yt-remote-cast2-availability-change",function(V){g.iL("yt-remote-cast-available",V);xI("yt-remote-cast2-availability-change",V)}),h.subscribe("yt-remote-cast2-receiver-selected",function(V){i9("onReceiverSelected: "+V.friendlyName); g.iL("yt-remote-cast-receiver",V);xI("yt-remote-cast2-receiver-selected",V)}),h.subscribe("yt-remote-cast2-receiver-resumed",function(V){i9("onReceiverResumed: "+V.friendlyName); g.iL("yt-remote-cast-receiver",V);xI("yt-remote-cast2-receiver-resumed",V)}),h.subscribe("yt-remote-cast2-session-change",function(V){i9("onSessionChange: "+ug(V)); V||g.AP("yt-remote-cast-receiver");xI("yt-remote-cast2-session-change",V)}),g.hS("yt.mdx.remote.cloudview.instance_",h),c=!0); i9("cloudview.createSingleton_: "+c);return c},Ar=function(){return g.c2("yt.mdx.remote.cloudview.instance_")},$A$=function(h,W){sl6(!0); V9S(!1);ZqU(h,function(c){c?(EAf(!0),g.D8("yt-remote-cast2-api-ready")):(Ki("Failed to initialize cast API."),sl6(!1),g.AP("yt-remote-cast-available"),g.AP("yt-remote-cast-receiver"),Hq6());W(c)})},i9=function(h){c1("cloudview",h)},Ki=function(h){c1("cloudview",h)},sl6=function(h){i9("setCastInstalled_ "+h); g.iL("yt-remote-cast-installed",h)},Ci=function(){return!!g.c2("yt.mdx.remote.cloudview.apiReady_")},EAf=function(h){i9("setApiReady_ "+h); g.hS("yt.mdx.remote.cloudview.apiReady_",h)},V9S=function(h){g.hS("yt.mdx.remote.cloudview.initializing_",h)},Fb=function(h){this.index=-1; this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.C=this.N=0;this.trackData=null;this.mA=this.J0=!1;this.Z=this.G=this.S=this.W=0;this.X=NaN;this.Y=!1;this.reset(h)},rnI=function(h){h.audioTrackId=null; h.trackData=null;h.playerState=-1;h.J0=!1;h.mA=!1;h.N=0;h.C=g.Gt();h.W=0;h.S=0;h.G=0;h.Z=0;h.X=NaN;h.Y=!1},yE=function(h){return h.isPlaying()?(g.Gt()-h.C)/1E3:0},P1=function(h,W){h.N=W; h.C=g.Gt()},fi=function(h){switch(h.playerState){case 1:case 1081:return(g.Gt()-h.C)/1E3+h.N; case -1E3:return 0}return h.N},qcl=function(h){return h.Y?h.S+yE(h):h.S},b9=function(h,W,c){var V=h.videoId; h.videoId=W;h.index=c;W!=V&&rnI(h)},xAS=function(h){var W={}; W.index=h.index;W.listId=h.listId;W.videoId=h.videoId;W.playerState=h.playerState;W.volume=h.volume;W.muted=h.muted;W.audioTrackId=h.audioTrackId;W.trackData=g.xF(h.trackData);W.hasPrevious=h.J0;W.hasNext=h.mA;W.playerTime=h.N;W.playerTimeAt=h.C;W.seekableStart=h.W;W.seekableEnd=h.S;W.duration=h.G;W.loadedTime=h.Z;W.liveIngestionTime=h.X;return W},Ni=function(h,W){g.h1.call(this); var c=this;this.G=0;this.Y=h;this.N=[];this.C=new Twu;this.W=this.X=null;this.T=(0,g.JS)(this.Jkz,this);this.S=(0,g.JS)(this.Fw,this);this.Z=(0,g.JS)(this.ykE,this);this.XI=(0,g.JS)(this.xng,this);var V=0;h?(V=h.getProxyState(),V!=3&&(h.subscribe("proxyStateChange",this.jF,this),llX(this))):V=3;V!=0&&(W?this.jF(V):g.Rx(function(){c.jF(V)},0)); (h=dA6())&&TI(this,h);this.subscribe("yt-remote-cast2-session-change",this.XI)},Xb=function(h){return new Fb(h.Y.getPlayerContextData())},llX=function(h){g.gX("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(W){this.N.push(this.Y.subscribe(W,g.uK(this.nd9,W),this))},h)},nAK=function(h){g.gX(h.N,function(W){this.Y.unsubscribeByKey(W)},h); h.N.length=0},tr=function(h){return h.getState()==1},v1=function(h,W){var c=h.C; c.X.length+c.W.length<50&&h.C.enqueue(W)},jl$=function(h,W,c){var V=Xb(h); P1(V,c);V.playerState!=-1E3&&(V.playerState=W);m8(h,V)},oy=function(h,W,c){h.Y.sendMessage(W,c)},m8=function(h,W){nAK(h); h.Y.setPlayerContextData(xAS(W));llX(h)},TI=function(h,W){h.W&&(h.W.removeUpdateListener(h.T),h.W.removeMediaListener(h.S),h.Fw(null)); h.W=W;h.W&&(VE("Setting cast session: "+h.W.sessionId),h.W.addUpdateListener(h.T),h.W.addMediaListener(h.S),h.W.media.length&&h.Fw(h.W.media[0]))},alK=function(h){var W=h.X.media,c=h.X.customData; if(W&&c){var V=Xb(h);W.contentId!=V.videoId&&VE("Cast changing video to: "+W.contentId);V.videoId=W.contentId;V.playerState=c.playerState;P1(V,h.X.getEstimatedTime());m8(h,V)}else VE("No cast media video. Ignoring state update.")},pi=function(h,W,c){return(0,g.JS)(function(V){this.uJ("Failed to "+W+" with cast v2 channel. Error code: "+V.code); V.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.uJ("Retrying "+W+" using MDx browser channel."),oy(this,W,c))},h)},OD=function(h,W,c,V){V=V===void 0?!1:V; g.h1.call(this);var H=this;this.N=NaN;this.DH=!1;this.T=this.Z=this.Wk=this.Pk=NaN;this.XI=[];this.C=this.S=this.Y=this.X=this.W=null;this.Nn=h;this.mW=V;this.XI.push(g.qz(window,"beforeunload",function(){H.TR(2)})); this.G=[];this.X=new Fb;this.CM=W.id;this.zV=W.idType;this.W=HjS(this.Nn,c,this.td,this.zV=="shortLived",this.CM);this.W.listen("channelOpened",function(){et6(H)}); this.W.listen("channelClosed",function(){Iy("Channel closed");isNaN(H.N)?rC(!0):rC();H.dispose()}); this.W.listen("channelError",function(B){rC();isNaN(H.kW())?(B==1&&H.zV=="shortLived"&&H.publish("browserChannelAuthError",B),Iy("Channel error: "+B+" without reconnection"),H.dispose()):(H.DH=!0,Iy("Channel error: "+B+" with reconnection in "+H.kW()+" ms"),YU(H,2))}); this.W.listen("channelMessage",function(B){ztK(H,B)}); this.W.aS(W.token);this.subscribe("remoteQueueChange",function(){var B=H.X.videoId;g.Uh()&&g.iL("yt-remote-session-video-id",B)})},QlI=function(h){return g.jl(h.G,function(W){return W.type=="LOUNGE_SCREEN"})},Iy=function(h){c1("conn",h)},YU=function(h,W){h.publish("proxyStateChange",W)},L5U=function(h){h.N=g.Rx(function(){Iy("Connecting timeout"); h.TR(1)},2E4)},iq$=function(h){g.uW(h.N); h.N=NaN},K5l=function(h){g.uW(h.Pk); h.Pk=NaN},UA6=function(h){AnU(h); h.Wk=g.Rx(function(){SW(h,"getNowPlaying")},2E4)},AnU=function(h){g.uW(h.Wk); h.Wk=NaN},et6=function(h){Iy("Channel opened"); h.DH&&(h.DH=!1,K5l(h),h.Pk=g.Rx(function(){Iy("Timing out waiting for a screen.");h.TR(1)},15E3))},M9t=function(h,W){var c=null; if(W){var V=QlI(h);V&&(c={clientName:V.clientName,deviceMake:V.brand,deviceModel:V.model,osVersion:V.osVersion})}g.hS("yt.mdx.remote.remoteClient_",c);W&&(iq$(h),K5l(h));c=h.W.Nj()&&isNaN(h.N);W==c?W&&(YU(h,1),SW(h,"getSubtitlesTrack")):W?(h.YR()&&h.X.reset(),YU(h,1),SW(h,"getNowPlaying"),Cxc(h)):h.TR(1)},F5S=function(h,W){var c=W.params.videoId; delete W.params.videoId;c==h.X.videoId&&(g.GF(W.params)?h.X.trackData=null:h.X.trackData=W.params,h.publish("remotePlayerChange"))},ynX=function(h,W,c){var V=W.params.videoId||W.params.video_id,H=parseInt(W.params.currentIndex,10); h.X.listId=W.params.listId||h.X.listId;b9(h.X,V,H);h.publish("remoteQueueChange",c)},flU=function(h,W){W.params=W.params||{}; ynX(h,W,"NOW_PLAYING_MAY_CHANGE");PxU(h,W);h.publish("autoplayDismissed")},PxU=function(h,W){var c=parseInt(W.params.currentTime||W.params.current_time,10); P1(h.X,isNaN(c)?0:c);c=parseInt(W.params.state,10);c=isNaN(c)?-1:c;c==-1&&h.X.playerState==-1E3&&(c=-1E3);h.X.playerState=c;c=Number(W.params.loadedTime);h.X.Z=isNaN(c)?0:c;h.X.I3(Number(W.params.duration));c=h.X;var V=Number(W.params.liveIngestionTime);c.X=V;c.Y=isNaN(V)?!1:!0;c=h.X;V=Number(W.params.seekableStartTime);W=Number(W.params.seekableEndTime);c.W=isNaN(V)?0:V;c.S=isNaN(W)?0:W;h.X.playerState==1?UA6(h):AnU(h);h.publish("remotePlayerChange")},bql=function(h,W){if(h.X.playerState!=-1E3){var c= 1085; switch(parseInt(W.params.adState,10)){case 1:c=1081;break;case 2:c=1084;break;case 0:c=1083}h.X.playerState=c;W=parseInt(W.params.currentTime,10);P1(h.X,isNaN(W)?0:W);h.publish("remotePlayerChange")}},TYS=function(h,W){var c=W.params.muted=="true"; h.X.volume=parseInt(W.params.volume,10);h.X.muted=c;h.publish("remotePlayerChange")},NY6=function(h,W){h.S=W.params.videoId; h.publish("nowAutoplaying",parseInt(W.params.timeout,10))},XBI=function(h,W){h.S=W.params.videoId||null; h.publish("autoplayUpNext",h.S)},t96=function(h,W){h.C=W.params.autoplayMode; h.publish("autoplayModeChange",h.C);h.C=="DISABLED"&&h.publish("autoplayDismissed")},vAU=function(h,W){var c=W.params.hasNext=="true"; h.X.J0=W.params.hasPrevious=="true";h.X.mA=c;h.publish("previousNextChange")},ztK=function(h,W){W=W.message; W.params?Iy("Received: action="+W.action+", params="+g.Nd(W.params)):Iy("Received: action="+W.action+" {}");switch(W.action){case "loungeStatus":W=V0(W.params.devices);h.G=g.xw(W,function(V){return new El(V)}); W=!!g.jl(h.G,function(V){return V.type=="LOUNGE_SCREEN"}); M9t(h,W);W=h.Gd("mlm");h.publish("multiStateLoopEnabled",W);break;case "loungeScreenDisconnected":g.UI(h.G,function(V){return V.type=="LOUNGE_SCREEN"}); M9t(h,!1);break;case "remoteConnected":var c=new El(V0(W.params.device));g.jl(h.G,function(V){return V.equals(c)})||oZ6(h.G,c); break;case "remoteDisconnected":c=new El(V0(W.params.device));g.UI(h.G,function(V){return V.equals(c)}); break;case "gracefulDisconnect":break;case "playlistModified":ynX(h,W,"QUEUE_MODIFIED");break;case "nowPlaying":flU(h,W);break;case "onStateChange":PxU(h,W);break;case "onAdStateChange":bql(h,W);break;case "onVolumeChanged":TYS(h,W);break;case "onSubtitlesTrackChanged":F5S(h,W);break;case "nowAutoplaying":NY6(h,W);break;case "autoplayDismissed":h.publish("autoplayDismissed");break;case "autoplayUpNext":XBI(h,W);break;case "onAutoplayModeChanged":t96(h,W);break;case "onHasPreviousNextChanged":vAU(h, W);break;case "requestAssistedSignIn":h.publish("assistedSignInRequested",W.params.authCode);break;case "onLoopModeChanged":h.publish("loopModeChange",W.params.loopMode);break;default:Iy("Unrecognized action: "+W.action)}},Cxc=function(h){g.uW(h.T); h.T=g.Rx(function(){h.TR(1)},864E5)},SW=function(h,W,c){c?Iy("Sending: action="+W+", params="+g.Nd(c)):Iy("Sending: action="+W); h.W.sendMessage(W,c)},mAU=function(h){B1.call(this,"ScreenServiceProxy"); this.hh=h;this.X=[];this.X.push(this.hh.$_s("screenChange",(0,g.JS)(this.Vd,this)));this.X.push(this.hh.$_s("onlineScreenChange",(0,g.JS)(this.F8O,this)))},OqK=function(h,W){o2U(); if(!qr||!qr.get("yt-remote-disable-remote-module-for-dev")){W=g.X_("MDX_CONFIG")||W;PW2();NJS();gd||(gd=new kI(W?W.loungeApiHost:void 0),pff()&&(gd.X="/api/loungedev"));Dg||(Dg=g.c2("yt.mdx.remote.deferredProxies_")||[],g.hS("yt.mdx.remote.deferredProxies_",Dg));oA$();var c=wd();if(!c){var V=new dd(gd,W?W.disableAutomaticScreenCache||!1:!1);g.hS("yt.mdx.remote.screenService_",V);c=wd();var H={};W&&(H={appId:W.appId,disableDial:W.disableDial,theme:W.theme,loadCastApiSetupScript:W.loadCastApiSetupScript, disableCastApi:W.disableCastApi,enableDialLoungeToken:W.enableDialLoungeToken,enableCastLoungeToken:W.enableCastLoungeToken,forceMirroring:W.forceMirroring});g.hS("yt.mdx.remote.enableConnectWithInitialState_",W?W.enableConnectWithInitialState||!1:!1);BYu(h,V,function(B){B?kU()&&Mi(kU(),"YouTube TV"):V.subscribe("onlineScreenChange",function(){xI("yt-remote-receiver-availability-change")})},H)}W&&!g.c2("yt.mdx.remote.initialized_")&&(g.hS("yt.mdx.remote.initialized_",!0),hh("Initializing: "+g.Nd(W)), WQ.push(g.S5("yt-remote-cast2-api-ready",function(){xI("yt-remote-api-ready")})),WQ.push(g.S5("yt-remote-cast2-availability-change",function(){xI("yt-remote-receiver-availability-change")})),WQ.push(g.S5("yt-remote-cast2-receiver-selected",function(){cQ(null); xI("yt-remote-auto-connect","cast-selector-receiver")})),WQ.push(g.S5("yt-remote-cast2-receiver-resumed",function(){xI("yt-remote-receiver-resumed","cast-selector-receiver")})),WQ.push(g.S5("yt-remote-cast2-session-change",pBK)),WQ.push(g.S5("yt-remote-connection-change",function(B){B?Mi(kU(),"YouTube TV"):VG()||(Mi(null,null),uI6())})),WQ.push(g.S5("yt-remote-cast2-session-failed",function(){xI("yt-remote-connection-failed")})),h=IlU(),W.isAuto&&(h.id+="#dial"),H=W.capabilities||[],H.length>0&&(h.capabilities= H),h.name=W.device,h.app=W.app,(W=W.theme)&&(h.theme=W),hh(" -- with channel params: "+g.Nd(h)),h?(g.iL("yt-remote-session-app",h.app),g.iL("yt-remote-session-name",h.name)):(g.AP("yt-remote-session-app"),g.AP("yt-remote-session-name")),g.hS("yt.mdx.remote.channelParams_",h),c.start(),kU()||Yc2())}},Sc$=function(){var h=wd().hh.$_gos(); var W=$d();W&&sY()&&(yc6(h,W)||h.push(W));return Fff(h)},DA2=function(){var h=gAu(); !h&&UD()&&JnU()&&(h={key:"cast-selector-receiver",name:JnU()});return h},gAu=function(){var h=Sc$(),W=$d(); W||(W=VG());return g.jl(h,function(c){return W&&Ji(W,c.key)?!0:!1})},$d=function(){var h=kU(); if(!h)return null;var W=wd().N5();return dC(W,h)},pBK=function(h){hh("remote.onCastSessionChange_: "+ug(h)); if(h){var W=$d();if(W&&W.id==h.id){if(Mi(W.id,"YouTube TV"),h.idType=="shortLived"&&(h=h.token))HQ&&(HQ.token=h),(W=sY())&&W.aS(h)}else W&&BQ(),EY(h,1)}else sY()&&BQ()},BQ=function(){Ci()?Ar().stopSession():Ki("stopSession called before API ready."); var h=sY();h&&(h.disconnect(1),wBK(null))},keK=function(){var h=sY(); return!!h&&h.getProxyState()!=3},hh=function(h){c1("remote",h)},wd=function(){if(!h_K){var h=g.c2("yt.mdx.remote.screenService_"); h_K=h?new mAU(h):null}return h_K},kU=function(){return g.c2("yt.mdx.remote.currentScreenId_")},WtX=function(h){g.hS("yt.mdx.remote.currentScreenId_",h)},c52=function(){return g.c2("yt.mdx.remote.connectData_")},cQ=function(h){g.hS("yt.mdx.remote.connectData_",h)},sY=function(){return g.c2("yt.mdx.remote.connection_")},wBK=function(h){var W=sY(); cQ(null);h||WtX("");g.hS("yt.mdx.remote.connection_",h);Dg&&(g.gX(Dg,function(c){c(h)}),Dg.length=0); W&&!h?xI("yt-remote-connection-change",!1):!W&&h&&xI("yt-remote-connection-change",!0)},VG=function(){var h=g.Uh(); if(!h)return null;var W=wd();if(!W)return null;W=W.N5();return dC(W,h)},EY=function(h,W){kU(); $d()&&$d();if(Rd)HQ=h;else{WtX(h.id);var c=g.c2("yt.mdx.remote.enableConnectWithInitialState_")||!1;h=new OD(gd,h,IlU(),c);h.connect(W,c52());h.subscribe("beforeDisconnect",function(V){xI("yt-remote-before-disconnect",V)}); h.subscribe("beforeDispose",function(){sY()&&(sY(),wBK(null))}); h.subscribe("browserChannelAuthError",function(){var V=$d();V&&V.idType=="shortLived"&&(Ci()?Ar().handleBrowserChannelAuthError():Ki("refreshLoungeToken called before API ready."))}); wBK(h)}},Yc2=function(){var h=VG(); h?(hh("Resume connection to: "+ug(h)),EY(h,0)):(rC(),uI6(),hh("Skipping connecting because no session screen found."))},oA$=function(){var h=IlU(); if(g.GF(h)){h=ZR();var W=g.KS("yt-remote-session-name")||"",c=g.KS("yt-remote-session-app")||"";h={device:"REMOTE_CONTROL",id:h,name:W,app:c,mdxVersion:3};h.authuser=String(g.X_("SESSION_INDEX","0"));(W=g.X_("DELEGATED_SESSION_ID"))&&(h.pageId=String(W));g.hS("yt.mdx.remote.channelParams_",h)}},IlU=function(){return g.c2("yt.mdx.remote.channelParams_")||{}},s3$=function(h,W,c){g.N.call(this); var V=this;this.X=h;this.L=W;this.tI=c;this.events=new g.lX(this);this.C=!1;this.N=new g.l1(64);this.W=new g.oD(this.ZR,500,this);this.G=new g.oD(this.rP,1E3,this);this.Z=new jj(this.TeV,0,this);this.Y={};this.T=new g.oD(this.EB,1E3,this);this.S=new g.O5(this.seekTo,1E3,this);this.XI=this.events.U(this.L,"onVolumeChange",function(H){V2K(V,H)}); g.X(this,this.events);this.events.U(W,"onCaptionsTrackListChanged",this.kzk);this.events.U(W,"captionschanged",this.iMB);this.events.U(W,"captionssettingschanged",this.Vh);this.events.U(W,"videoplayerreset",this.JC);this.events.U(W,"mdxautoplaycancel",function(){V.tI.Qk()}); W.j("enable_mdx_video_play_directly")&&this.events.U(W,"videodatachange",function(){$_c(V.X)||Jh(V)||uV(V,0)}); h=this.tI;h.gE();h.subscribe("proxyStateChange",this.TN,this);h.subscribe("remotePlayerChange",this.rL,this);h.subscribe("remoteQueueChange",this.JC,this);h.subscribe("previousNextChange",this.B_,this);h.subscribe("nowAutoplaying",this.Jj,this);h.subscribe("autoplayDismissed",this.nD,this);g.X(this,this.W);g.X(this,this.G);g.X(this,this.Z);g.X(this,this.T);g.X(this,this.S);this.Vh();this.JC();this.rL()},V2K=function(h,W){if(Jh(h)){h.tI.unsubscribe("remotePlayerChange",h.rL,h); var c=Math.round(W.volume);W=!!W.muted;var V=Xb(h.tI);if(c!==V.volume||W!==V.muted)h.tI.setVolume(c,W),h.T.start();h.tI.subscribe("remotePlayerChange",h.rL,h)}},HxX=function(h){h.kd(0); h.W.stop();h.Tz(new g.l1(64))},Bc2=function(h,W){if(Jh(h)&&!h.C){var c=null; W&&(c={style:h.L.getSubtitlesUserSettings()},Object.assign(c,W));h.tI.MJ(h.L.getVideoData(1).videoId,c);h.Y=Xb(h.tI).trackData}},uV=function(h,W){var c=h.L.getPlaylist(); if(c==null?0:c.listId){var V=c.index;var H=c.listId.toString()}c=h.L.getVideoData(1);h.tI.playVideo(c.videoId,W,V,H,c.playerParams,c.Nn,mUI(c));h.Tz(new g.l1(1))},ENK=function(h,W){if(W){var c=h.L.getOption("captions","tracklist",{eJ:1}); c&&c.length?(h.L.setOption("captions","track",W),h.C=!1):(h.L.loadModule("captions"),h.C=!0)}else h.L.setOption("captions","track",{})},Jh=function(h){return Xb(h.tI).videoId===h.L.getVideoData(1).videoId},R_c=function(h,W){g.O7.call(this,h); this.X=W},dt=function(){g.p.call(this,{D:"div", K:"ytp-mdx-popup-dialog",J:{role:"dialog"},V:[{D:"div",K:"ytp-mdx-popup-dialog-inner-content",V:[{D:"div",K:"ytp-mdx-popup-title",YN:"Saliste de tu cuenta"},{D:"div",K:"ytp-mdx-popup-description",YN:"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."},{D:"div",K:"ytp-mdx-privacy-popup-buttons",V:[{D:"button",LM:["ytp-button", "ytp-mdx-privacy-popup-cancel"],YN:"Cancelar"},{D:"button",LM:["ytp-button","ytp-mdx-privacy-popup-confirm"],YN:"Confirmar"}]}]}]});this.fade=new g.SL(this,250);this.cancelButton=this.vk("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.vk("ytp-mdx-privacy-popup-confirm");g.X(this,this.fade);this.U(this.cancelButton,"click",this.X);this.U(this.confirmButton,"click",this.W)},GB=function(h){g.p.call(this,{D:"div", K:"ytp-remote",V:[{D:"div",K:"ytp-remote-display-status",V:[{D:"div",K:"ytp-remote-display-status-icon",V:[g.rPl()]},{D:"div",K:"ytp-remote-display-status-text",YN:"{{statustext}}"}]}]});this.api=h;this.fade=new g.SL(this,250);g.X(this,this.fade);this.U(h,"presentingplayerstatechange",this.onStateChange);this.So(h.getPlayerStateObject())},Z5=function(h,W){g.Xt.call(this,"Reproducir en",1,h,W); this.L=h;this.a5={};this.U(h,"onMdxReceiversChange",this.Y);this.U(h,"presentingplayerstatechange",this.Y);this.Y()},J5t=function(h){g.K3.call(this,h); this.u0={key:MOu(),name:"Esta computadora"};this.GL=null;this.subscriptions=[];this.FH=this.tI=null;this.a5=[this.u0];this.IS=this.u0;this.Zh=new g.l1(64);this.LL=0;this.P5=-1;this.l7=!1;this.bO=this.u7=this.x8=null;if(!g.$X(this.player.B())&&!g.CV(this.player.B())){h=this.player;var W=g.CQ(h);W&&(W=W.zA())&&(W=new Z5(h,W),g.X(this,W));W=new GB(h);g.X(this,W);g.ge(h,W.element,4);this.x8=new dt;g.X(this,this.x8);g.ge(h,this.x8.element,4);this.l7=!!VG()}},rt=function(h){h.u7&&(h.player.removeEventListener("presentingplayerstatechange", h.u7),h.u7=null)},uef=function(h,W,c){h.Zh=c; h.player.publish("presentingplayerstatechange",new g.H8(c,W))},qI=function(h,W){if(W.key!==h.IS.key)if(W.key===h.u0.key)BQ(); else if($_c(h)&&d_c(h),h.IS=W,!h.player.B().j("disable_mdx_connection_in_mdx_module_for_music_web")||!g.CV(h.player.B())){var c=h.player.getPlaylistId();var V=h.player.getVideoData(1);var H=V.videoId;if(!c&&!H||(h.player.getAppState()===2||h.player.getAppState()===1)&&h.player.B().j("should_clear_video_data_on_player_cued_unstarted"))V=null;else{var B=h.player.getPlaylist();if(B){var E=[];for(var J=0;J2*this.size&&B4(this),!0):!1}; g.l.get=function(h,W){return sl(this.W,h)?this.W[h]:W}; g.l.set=function(h,W){sl(this.W,h)||(this.size+=1,this.X.push(h),this.Zo++);this.W[h]=W}; g.l.forEach=function(h,W){for(var c=this.UU(),V=0;V=V.X.length)return g.ZZ;var B=V.X[W++];return g.a5(h?B:V.W[B])}; return H}; var BJ$={HwV:"atp",ONO:"ska",LlN:"que",qpz:"mus",TKf:"sus",a8N:"dsp",ZNO:"seq",NAN:"mic",Qx9:"dpa",Spg:"mlm",Dvk:"dsdtr",i$W:"ntb",ypV:"vsp",KRz:"scn",HNk:"rpe",vCW:"dcn",frz:"dcp",O$n:"pas",zpk:"drq",x5E:"opf",FRn:"els",qrf:"isg",Jvk:"svq",RJz:"mvp",HGM:"ads",YOB:"stcp",MlI:"sads",bUO:"dloc",NVH:"dcw",mhf:"asw",nLk:"apw"},E2l={i9B:"u",JGB:"cl",TiN:"k",mqN:"i",X3W:"cr",FAf:"m",p39:"g",Sa:"up"},Iuf={zo:"adPlaying",zD:"onAdStateChange"},YG6={y2V:"nowPlaying",t5n:"onStateChange",zo:"adPlaying",zD:"onAdStateChange", fk:"nowPlayingShorts",DP:"onShortsStateChange"},Og6={fk:"nowPlayingShorts",DP:"onShortsStateChange"};El.prototype.equals=function(h){return h?this.id==h.id:!1}; var TJt="",qr=null;g.n(IX2,g.Fy);var lg,hO$=Ob2("loadCastFramework")||Ob2("loadCastApplicationFramework"),Vtu=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.rX(jj,g.N);g.l=jj.prototype;g.l.HW=function(h){this.Y=arguments;this.X=!1;this.Fl?this.G=g.Gt()+this.pw:this.Fl=g.PK(this.C,this.pw)}; g.l.stop=function(){this.Fl&&(g.k5.clearTimeout(this.Fl),this.Fl=null);this.G=null;this.X=!1;this.Y=[]}; g.l.pause=function(){++this.W}; g.l.resume=function(){this.W&&(--this.W,!this.W&&this.X&&(this.X=!1,this.N.apply(null,this.Y)))}; g.l.dE=function(){this.stop();jj.Ms.dE.call(this)}; g.l.nF=function(){this.Fl&&(g.k5.clearTimeout(this.Fl),this.Fl=null);this.G?(this.Fl=g.PK(this.C,this.G-g.Gt()),this.G=null):this.W?this.X=!0:(this.X=!1,this.N.apply(null,this.Y))};aZ.prototype.stringify=function(h){return g.k5.JSON.stringify(h,void 0)}; aZ.prototype.parse=function(h){return g.k5.JSON.parse(h,void 0)};g.rX(sIc,g.mm);g.rX(HSf,g.mm);var BQI=null;g.rX(RO2,g.mm);g.rX(JPc,g.mm);g.rX(uRX,g.mm);LX.prototype.debug=function(){}; LX.prototype.info=function(){}; LX.prototype.warning=function(){};var nkX={},lL6={};g.l=ig.prototype;g.l.setTimeout=function(h){this.Mn=h}; g.l.CF=function(h){h=h.target;var W=this.yg;W&&g.pW(h)==3?W.pH():this.Lr(h)}; g.l.Lr=function(h){try{if(h==this.X)a:{var W=g.pW(this.X),c=this.X.W,V=this.X.getStatus();if(!(W<3)&&(W!=3||this.X&&(this.W.G||g.Yv(this.X)||g.OL(this.X)))){this.mW||W!=4||c==7||(c==8||V<=0?ej(3):ej(2));eOX(this);var H=this.X.getStatus();this.uW=H;var B=xzX(this);if(this.N=H==200){if(this.lW&&!this.Rz){b:{if(this.X){var E=g.Sa(this.X,"X-HTTP-Initial-Response");if(E&&!g.Cr(E)){var J=E;break b}}J=null}if(h=J)this.Rz=!0,Mt2(this,h);else{this.N=!1;this.C=3;zU(12);Ai(this);Ul(this);break a}}if(this.zV){h= !0;for(var u;!this.mW&&this.S0&&!this.hI&&(this.hI=!0,this.G.Jf(this)):(Ai(this),Ul(this))}else Mt2(this,B);W==4&&Ai(this);this.N&&!this.mW&&(W==4?zOI(this.G,this):(this.N=!1,KX(this)))}else g.z7D(this.X),H==400&&B.indexOf("Unknown SID")> 0?(this.C=3,zU(12)):(this.C=0,zU(13)),Ai(this),Ul(this)}}}catch(d){}finally{}}; g.l.cancel=function(){this.mW=!0;Ai(this)}; g.l.gw=function(){this.XI=null;var h=Date.now();h-this.Ef>=0?(this.CM!=2&&(ej(3),zU(17)),Ai(this),this.C=2,Ul(this)):aLU(this,this.Ef-h)}; g.l.getLastError=function(){return this.C}; g.l.BA=function(){return this.X};yPU.prototype.cancel=function(){this.G=fLc(this);if(this.W)this.W.cancel(),this.W=null;else if(this.X&&this.X.size!==0){for(var h=g.e(this.X.values()),W=h.next();!W.done;W=h.next())W.value.cancel();this.X.clear()}};g.l=Xtl.prototype;g.l.NJ=8;g.l.xL=1;g.l.connect=function(h,W,c,V){zU(0);this.Sx=h;this.mW=W||{};c&&V!==void 0&&(this.mW.OSID=c,this.mW.OAID=V);this.Rz=this.U5;this.Nn=AP6(this,null,this.Sx);y0(this)}; g.l.disconnect=function(){vkI(this);if(this.xL==3){var h=this.Jk++,W=this.Nn.clone();g.By(W,"SID",this.Y);g.By(W,"RID",h);g.By(W,"TYPE","terminate");bg(this,W);h=new ig(this,this.Y,h);h.CM=2;h.Z=W4(W.clone());W=!1;if(g.k5.navigator&&g.k5.navigator.sendBeacon)try{W=g.k5.navigator.sendBeacon(h.Z.toString(),"")}catch(c){}!W&&g.k5.Image&&((new Image).src=h.Z,W=!0);W||(h.X=rP6(h.G,null),h.X.send(h.Z));h.Pk=Date.now();KX(h)}OSI(this)}; g.l.xx=function(){return this.xL==0}; g.l.getState=function(){return this.xL}; g.l.mS=function(h){if(this.N)if(this.N=null,this.xL==1){if(!h){this.Jk=Math.floor(Math.random()*1E5);h=this.Jk++;var W=new ig(this,"",h),c=this.T;this.uW&&(c?(c=g.qx(c),g.lN(c,this.uW)):c=this.uW);this.S!==null||this.Ef||(W.Nn=c,c=null);var V;if(this.Ak)a:{for(var H=V=0;H4096){V=H;break a}if(V===4096||H===this.G.length-1){V=H+1;break a}}V= 1E3}else V=1E3;V=pt6(this,W,V);H=this.Nn.clone();g.By(H,"RID",h);g.By(H,"CVER",22);this.zV&&g.By(H,"X-HTTP-Session-Id",this.zV);bg(this,H);c&&(this.Ef?V="headers="+g.Ak(g.Ik5(c))+"&"+V:this.S&&g.ue(H,this.S,c));K1l(this.W,W);this.nj&&g.By(H,"TYPE","init");this.Ak?(g.By(H,"$req",V),g.By(H,"SID","null"),W.lW=!0,ZSt(W,H,null)):ZSt(W,H,V);this.xL=2}}else this.xL==3&&(h?ILu(this,h):this.G.length==0||PLX(this.W)||ILu(this))}; g.l.HK=function(){this.Z=null;Yhu(this);if(this.Zn&&!(this.Mn||this.X==null||this.bX<=0)){var h=4*this.bX;this.DH=Q0((0,g.JS)(this.rkg,this),h)}}; g.l.rkg=function(){this.DH&&(this.DH=null,this.Rz=!1,this.Mn=!0,zU(10),Mr(this),Yhu(this))}; g.l.Jf=function(h){this.X==h&&this.Zn&&!this.Mn&&(ttI(this),this.Mn=!0,zU(11))}; g.l.jT=function(){this.XI!=null&&(this.XI=null,Mr(this),L1t(this),zU(19))}; g.l.jdB=function(h){h?zU(2):zU(1)}; g.l.isActive=function(){return!!this.C&&this.C.isActive(this)}; g.l=gkc.prototype;g.l.SE=function(){}; g.l.jE=function(){}; g.l.Cr=function(){}; g.l.gB=function(){}; g.l.isActive=function(){return!0}; g.l.ST=function(){};g.rX(Nr,g.Rn);Nr.prototype.open=function(){this.X.C=this.G;this.N&&(this.X.CM=!0);this.X.connect(this.C,this.W||void 0)}; Nr.prototype.close=function(){this.X.disconnect()}; Nr.prototype.send=function(h){var W=this.X;if(typeof h==="string"){var c={};c.__data__=h;h=c}else this.Y&&(c={},c.__data__=g.Nd(h),h=c);W.G.push(new F1I(W.Uy++,h));W.xL==3&&y0(W)}; Nr.prototype.dE=function(){this.X.C=null;delete this.G;this.X.disconnect();delete this.X;Nr.Ms.dE.call(this)}; g.rX(wtt,sIc);g.rX(kRU,HSf);g.rX(TU,gkc);TU.prototype.SE=function(){this.X.dispatchEvent("m")}; TU.prototype.jE=function(h){this.X.dispatchEvent(new wtt(h))}; TU.prototype.Cr=function(h){this.X.dispatchEvent(new kRU(h))}; TU.prototype.gB=function(){this.X.dispatchEvent("n")};var ti=new g.Rn;g.n(cZU,g.mm);g.l=mn.prototype;g.l.tX=null;g.l.m1=!1;g.l.zR=null;g.l.IW=null;g.l.PD=null;g.l.iU=null;g.l.Yu=null;g.l.rG=null;g.l.BX=null;g.l.v3=null;g.l.yS=0;g.l.Nm=null;g.l.cw=null;g.l.p7=null;g.l.hc=-1;g.l.dP=!0;g.l.dY=!1;g.l.Jx=0;g.l.ZN=null;var E4t={},Bwf={};g.l=mn.prototype;g.l.setTimeout=function(h){this.W=h}; g.l.q4=function(h){h=h.target;var W=this.ZN;W&&g.pW(h)==3?W.pH():this.RJ(h)}; g.l.RJ=function(h){try{if(h==this.v3)a:{var W=g.pW(this.v3),c=this.v3.W,V=this.v3.getStatus();if(g.Js&&!g.tk("420+")){if(W<4)break a}else if(W<3||W==3&&!g.Yv(this.v3))break a;this.dY||W!=4||c==7||(c==8||V<=0?this.X.r8(3):this.X.r8(2));uJX(this);var H=this.v3.getStatus();this.hc=H;var B=g.Yv(this.v3);if(this.m1=H==200){W==4&&oZ(this);if(this.zV){for(h=!0;!this.dY&&this.yS0?(this.p7=3,v4(13)):(this.p7=0,v4(14)),oZ(this),dvu(this)}}catch(J){}finally{}}; g.l.cancel=function(){this.dY=!0;oZ(this)}; g.l.Rj=function(){this.zR=null;var h=Date.now();h-this.IW>=0?(this.iU!=2&&this.X.r8(3),oZ(this),this.p7=2,v4(18),dvu(this)):JZX(this,this.IW-h)}; g.l.getLastError=function(){return this.p7};g.l=qGl.prototype;g.l.Mc=null;g.l.Xm=null;g.l.by=!1;g.l.eZ=null;g.l.VZ=null;g.l.T0=-1;g.l.JA=null;g.l.GX=null;g.l.connect=function(h){this.eZ=h;h=IZ(this.X,null,this.eZ);v4(3);Date.now();var W=this.X.T;W!=null?(this.JA=W[0],(this.GX=W[1])?(this.VZ=1,xvl(this)):(this.VZ=2,lu2(this))):(c4(h,"MODE","init"),this.Xm=new mn(this),this.Xm.tX=this.Mc,sC6(this.Xm,h,!1,null,!0),this.VZ=0)}; g.l.GE=function(h){if(h)this.VZ=2,lu2(this);else{v4(4);var W=this.X;W.Pj=W.yK.T0;gC(W,9)}h&&this.r8(2)}; g.l.xA=function(h){return this.X.xA(h)}; g.l.abort=function(){this.Xm&&(this.Xm.cancel(),this.Xm=null);this.T0=-1}; g.l.xx=function(){return!1}; g.l.qJ=function(h,W){this.T0=h.hc;if(this.VZ==0)if(W){try{var c=this.W.parse(W)}catch(V){h=this.X;h.Pj=this.T0;gC(h,2);return}this.JA=c[0];this.GX=c[1]}else h=this.X,h.Pj=this.T0,gC(h,2);else this.VZ==2&&(this.by?(v4(7),Date.now()):W=="11111"?(v4(6),this.by=!0,Date.now(),this.T0=200,this.Xm.cancel(),v4(12),YI(this.X,this,!0)):(v4(8),Date.now(),this.by=!1))}; g.l.Bf=function(){this.T0=this.Xm.hc;if(this.Xm.m1)this.VZ==0?this.GX?(this.VZ=1,xvl(this)):(this.VZ=2,lu2(this)):this.VZ==2&&(this.by?(v4(12),YI(this.X,this,!0)):(v4(11),YI(this.X,this,!1)));else{this.VZ==0?v4(9):this.VZ==2&&v4(10);var h=this.X;this.Xm.getLastError();h.Pj=this.T0;gC(h,2)}}; g.l.vD=function(){return this.X.vD()}; g.l.isActive=function(){return this.X.isActive()}; g.l.r8=function(h){this.X.r8(h)};g.l=n4$.prototype;g.l.A2=null;g.l.f8=null;g.l.PR=null;g.l.At=null;g.l.V_=null;g.l.Iy=null;g.l.FF=null;g.l.E9=null;g.l.bz=0;g.l.KF=0;g.l.Mh=null;g.l.g7=null;g.l.Ao=null;g.l.Ej=null;g.l.yK=null;g.l.Hf=null;g.l.Qe=-1;g.l.Kr=-1;g.l.Pj=-1;g.l.kG=0;g.l.DL=0;g.l.e3=8;var GE6={OK:0,j3E:2,f$E:4,J2f:5,rpM:6,STOP:7,v8:8,COg:9,nQf:10,gQf:11,gLk:12};g.rX(aul,g.mm);g.rX(eB$,g.mm);g.l=n4$.prototype; g.l.connect=function(h,W,c,V,H){v4(0);this.V_=W;this.f8=c||{};V&&H!==void 0&&(this.f8.OSID=V,this.f8.OAID=H);this.Z?(XQ((0,g.JS)(this.TH,this,h),100),QCu(this)):this.TH(h)}; g.l.disconnect=function(){L6c(this);if(this.X==3){var h=this.bz++,W=this.Iy.clone();g.By(W,"SID",this.Y);g.By(W,"RID",h);g.By(W,"TYPE","terminate");Sj(this,W);h=new mn(this,this.Y,h);h.iU=2;h.Yu=W4(W.clone());(new Image).src=h.Yu.toString();h.PD=Date.now();Hg2(h)}fu6(this)}; g.l.TH=function(h){this.yK=new qGl(this);this.yK.Mc=this.A2;this.yK.W=this.C;this.yK.connect(h)}; g.l.xx=function(){return this.X==0}; g.l.getState=function(){return this.X}; g.l.UM=function(h){this.g7=null;CCc(this,h)}; g.l.sM=function(){this.Ao=null;this.At=new mn(this,this.Y,"rpc",this.S);this.At.tX=this.A2;this.At.Jx=0;var h=this.FF.clone();g.By(h,"RID","rpc");g.By(h,"SID",this.Y);g.By(h,"CI",this.Hf?"0":"1");g.By(h,"AID",this.Qe);Sj(this,h);g.By(h,"TYPE","xmlhttp");sC6(this.At,h,!0,this.E9,!1)}; g.l.qJ=function(h,W){if(this.X!=0&&(this.At==h||this.PR==h))if(this.Pj=h.hc,this.PR==h&&this.X==3)if(this.e3>7){try{var c=this.C.parse(W)}catch(V){c=null}if(Array.isArray(c)&&c.length==3)if(h=c,h[0]==0)a:{if(!this.Ao){if(this.At)if(this.At.PD+3E30)){if(V=W==1)this.PR||this.g7||this.X==1||this.kG>=2?V=!1:(this.g7=XQ((0,g.JS)(this.UM,this,h),F66(this,this.kG)),this.kG++, V=!0);V=!(V||W==2&&yZ6(this))}if(V)switch(c){case 1:gC(this,5);break;case 4:gC(this,10);break;case 3:gC(this,6);break;case 7:gC(this,12);break;default:gC(this,2)}}}; g.l.Fs=function(h){if(!g.el(arguments,this.X))throw Error("Unexpected channel state: "+this.X);}; g.l.CJk=function(h){h?v4(2):(v4(1),PC6(this,8))}; g.l.xA=function(h){if(h)throw Error("Can't create secondary domain capable XhrIo object.");h=new g.vK;h.S=!1;return h}; g.l.isActive=function(){return!!this.Mh&&this.Mh.isActive(this)}; g.l.r8=function(h){var W=ti;W.dispatchEvent(new eB$(W,h))}; g.l.vD=function(){return!1}; g.l=bgu.prototype;g.l.rB=function(){}; g.l.ZX=function(){}; g.l.im=function(){}; g.l.oJ=function(){}; g.l.TU=function(){}; g.l.cK=function(){return{}}; g.l.isActive=function(){return!0};g.l=Twu.prototype;g.l.enqueue=function(h){this.W.push(h)}; g.l.isEmpty=function(){return this.X.length===0&&this.W.length===0}; g.l.clear=function(){this.X=[];this.W=[]}; g.l.contains=function(h){return g.el(this.X,h)||g.el(this.W,h)}; g.l.remove=function(h){var W=this.X;var c=(0,g.rS6)(W,h);c>=0?(g.zt(W,c),W=!0):W=!1;return W||g.QU(this.W,h)}; g.l.No=function(){for(var h=[],W=this.X.length-1;W>=0;--W)h.push(this.X[W]);W=this.W.length;for(var c=0;c=ZxU.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(h=ZxU[this.W],this.Fl=g.Rx((0,g.JS)(this.jq,this),h),this.W++):this.publish("pairingFailed",Error("Server error "+h.status))}; g.l.Ij=function(){this.X=null;this.publish("pairingFailed",Error("Server not responding"))}; var ZxU=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.rX(Ry,B1);g.l=Ry.prototype;g.l.start=function(){ED(this)&&this.publish("screenChange");!g.KS("yt-remote-lounge-token-expiration")&&l8$(this);g.uW(this.X);this.X=g.Rx((0,g.JS)(this.start,this),1E4)}; g.l.add=function(h,W){ED(this);Zj6(this,h);Jr(this,!1);this.publish("screenChange");W(h);h.token||l8$(this)}; g.l.remove=function(h,W){var c=ED(this);qrI(this,h)&&(Jr(this,!1),c=!0);W(h);c&&this.publish("screenChange")}; g.l.L3=function(h,W,c,V){var H=ED(this),B=this.get(h.id);B?(B.name!=W&&(B.name=W,Jr(this,!1),H=!0),c(h)):V(Error("no such local screen."));H&&this.publish("screenChange")}; g.l.dE=function(){g.uW(this.X);Ry.Ms.dE.call(this)}; g.l.K2=function(h){ED(this);var W=this.screens.length;h=h&&h.screens||[];for(var c=h.length,V=0;V20)break a;J=W(B,E)}B=J}H.name=B}c(GI(this,H))},this), onError:(0,g.JS)(function(H){V(Error("pairing request failed: "+H.status))},this), onTimeout:(0,g.JS)(function(){V(Error("pairing request timed out."))},this)})}; g.l.dE=function(){g.hA(this.W);g.hA(this.X);dd.Ms.dE.call(this)}; g.l.xF=function(){Cq6(this);this.publish("screenChange");this.X.update()}; dd.prototype.dispose=dd.prototype.dispose;g.rX(Zg,g.h1);g.l=Zg.prototype;g.l.KU=function(h){this.gE()||(h&&(qi(this,""+h),this.publish("sessionFailed")),this.X=null,this.publish("sessionScreen",null))}; g.l.info=function(h){c1(this.zV,h)}; g.l.IJ=function(){return null}; g.l.n4=function(h){var W=this.W;h?(W.displayStatus=new chrome.cast.ReceiverDisplayStatus(h,[]),W.displayStatus.showStop=!0):W.displayStatus=null;chrome.cast.setReceiverDisplayStatus(W,(0,g.JS)(function(){this.info("Updated receiver status for "+W.friendlyName+": "+h)},this),(0,g.JS)(function(){qi(this,"Failed to update receiver status for: "+W.friendlyName)},this))}; g.l.dE=function(){this.n4("");Zg.Ms.dE.call(this)};g.n(xU,Zg);g.l=xU.prototype;g.l.Ng=function(h){if(this.G){if(this.G==h)return;qi(this,"Overriding cast session with new session object");m0c(this);this.Pk=!1;this.T="unknown";this.G.removeUpdateListener(this.Wk);this.G.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.DH)}this.G=h;this.G.addUpdateListener(this.Wk);this.G.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.DH);TI6(this,"getMdxSessionStatus")}; g.l.XX=function(h){this.info("launchWithParams no-op for Cast: "+g.Nd(h))}; g.l.stop=function(){this.G?this.G.stop((0,g.JS)(function(){this.KU()},this),(0,g.JS)(function(){this.KU(Error("Failed to stop receiver app."))},this)):this.KU(Error("Stopping cast device without session."))}; g.l.n4=function(){}; g.l.dE=function(){this.info("disposeInternal");m0c(this);this.G&&(this.G.removeUpdateListener(this.Wk),this.G.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.DH));this.G=null;Zg.prototype.dE.call(this)}; g.l.g9k=function(h,W){if(!this.gE())if(W)if(W=V0(W),g.H2(W))switch(h=""+W.type,W=W.data||{},this.info("onYoutubeMessage_: "+h+" "+g.Nd(W)),h){case "mdxSessionStatus":Pq6(this,W);break;case "loungeToken":NIU(this,W);break;default:qi(this,"Unknown youtube message: "+h)}else qi(this,"Unable to parse message.");else qi(this,"No data in message.")}; g.l.z5=function(h,W,c,V){g.uW(this.Z);this.Z=0;Ka6(this.Y,this.W.label,h,this.W.friendlyName,(0,g.JS)(function(H){H?W(H):V>=0?(qi(this,"Screen "+h+" appears to be offline. "+V+" retries left."),this.Z=g.Rx((0,g.JS)(this.z5,this,h,W,c,V-1),300)):c(Error("Unable to fetch screen."))},this),c)}; g.l.IJ=function(){return this.G}; g.l.M4=function(h){this.gE()||h||(qi(this,"Cast session died."),this.KU())};g.n(l9,Zg);g.l=l9.prototype;g.l.Ng=function(h){this.G=h;this.G.addUpdateListener(this.mW)}; g.l.XX=function(h){this.Nn=h;this.XI()}; g.l.stop=function(){D0X(this);this.G?this.G.stop((0,g.JS)(this.KU,this,null),(0,g.JS)(this.KU,this,"Failed to stop DIAL device.")):this.KU()}; g.l.dE=function(){D0X(this);this.G&&this.G.removeUpdateListener(this.mW);this.G=null;Zg.prototype.dE.call(this)}; g.l.pF=function(h){this.gE()||h||(qi(this,"DIAL session died."),this.C(),this.C=function(){},this.KU())};g.n(ay,Zg);ay.prototype.stop=function(){this.KU()}; ay.prototype.Ng=function(){}; ay.prototype.XX=function(){g.uW(this.G);this.G=NaN;var h=dC(this.Y.N5(),this.W.label);h?rd(this,h):this.KU(Error("No such screen"))}; ay.prototype.dE=function(){g.uW(this.G);this.G=NaN;Zg.prototype.dE.call(this)};g.n(eW,g.h1);g.l=eW.prototype; g.l.init=function(h,W){chrome.cast.timeout.requestSession=3E4;var c=new chrome.cast.SessionRequest(this.Z,[chrome.cast.Capability.AUDIO_OUT]);g.ZX("desktop_enable_cast_connect")&&(c.androidReceiverCompatible=!0);this.T||(c.dialRequest=new chrome.cast.DialRequest("YouTube"));var V=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;h=h||this.N?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var H=(0,g.JS)(this.q8z,this);c=new chrome.cast.ApiConfig(c,(0,g.JS)(this.Ov, this),H,V,h);c.customDialLaunchCallback=(0,g.JS)(this.TEN,this);chrome.cast.initialize(c,(0,g.JS)(function(){this.gE()||(chrome.cast.addReceiverActionListener(this.C),JLI(),this.W.subscribe("onlineScreenChange",(0,g.JS)(this.xf,this)),this.G=htS(this),chrome.cast.setCustomReceivers(this.G,function(){},(0,g.JS)(function(B){this.uJ("Failed to set initial custom receivers: "+g.Nd(B))},this)),this.publish("yt-remote-cast2-availability-change",QE(this)),W(!0))},this),(0,g.JS)(function(B){this.uJ("Failed to initialize API: "+ g.Nd(B)); W(!1)},this))}; g.l.IgH=function(h,W){zI("Setting connected screen ID: "+h+" -> "+W);if(this.X){var c=this.X.X;if(!h||c&&c.id!=h)zI("Unsetting old screen status: "+this.X.W.friendlyName),Li(this,null)}if(h&&W){if(!this.X){h=dC(this.W.N5(),h);if(!h){zI("setConnectedScreenStatus: Unknown screen.");return}if(h.idType=="shortLived"){zI("setConnectedScreenStatus: Screen with id type to be short lived.");return}c=wY2(this,h);c||(zI("setConnectedScreenStatus: Connected receiver not custom..."),c=new chrome.cast.Receiver(h.uuid? h.uuid:h.id,h.name),c.receiverType=chrome.cast.ReceiverType.CUSTOM,this.G.push(c),chrome.cast.setCustomReceivers(this.G,function(){},(0,g.JS)(function(V){this.uJ("Failed to set initial custom receivers: "+g.Nd(V))},this))); zI("setConnectedScreenStatus: new active receiver: "+c.friendlyName);Li(this,new ay(this.W,c),!0)}this.X.n4(W)}else zI("setConnectedScreenStatus: no screen.")}; g.l.p9B=function(h){this.gE()?this.uJ("Setting connection data on disposed cast v2"):this.X?this.X.XX(h):this.uJ("Setting connection data without a session")}; g.l.eT=function(){this.gE()?this.uJ("Stopping session on disposed cast v2"):this.X?(this.X.stop(),Li(this,null)):zI("Stopping non-existing session")}; g.l.requestSession=function(){chrome.cast.requestSession((0,g.JS)(this.Ov,this),(0,g.JS)(this.AwO,this))}; g.l.dE=function(){this.W.unsubscribe("onlineScreenChange",(0,g.JS)(this.xf,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.C);var h=BIU,W=g.c2("yt.mdx.remote.debug.handlers_");g.QU(W||[],h);g.hA(this.X);g.h1.prototype.dE.call(this)}; g.l.uJ=function(h){c1("Controller",h)}; g.l.uK=function(h,W){this.X==h&&(W||Li(this,null),this.publish("yt-remote-cast2-session-change",W))}; g.l.jRk=function(h,W){if(!this.gE())if(h)switch(h.friendlyName=chrome.cast.unescape(h.friendlyName),zI("onReceiverAction_ "+h.label+" / "+h.friendlyName+"-- "+W),W){case chrome.cast.ReceiverAction.CAST:if(this.X)if(this.X.W.label!=h.label)zI("onReceiverAction_: Stopping active receiver: "+this.X.W.friendlyName),this.X.stop();else{zI("onReceiverAction_: Casting to active receiver.");this.X.X&&this.publish("yt-remote-cast2-session-change",this.X.X);break}switch(h.receiverType){case chrome.cast.ReceiverType.CUSTOM:Li(this, new ay(this.W,h));break;case chrome.cast.ReceiverType.DIAL:Li(this,new l9(this.W,h,this.Y,this.config_));break;case chrome.cast.ReceiverType.CAST:Li(this,new xU(this.W,h,this.config_));break;default:this.uJ("Unknown receiver type: "+h.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.X&&this.X.W.label==h.label?this.X.stop():this.uJ("Stopping receiver w/o session: "+h.friendlyName)}else this.uJ("onReceiverAction_ called without receiver.")}; g.l.TEN=function(h){if(this.gE())return Promise.reject(Error("disposed"));var W=h.receiver;W.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.uJ("Not DIAL receiver: "+W.friendlyName),W.receiverType=chrome.cast.ReceiverType.DIAL);var c=this.X?this.X.W:null;if(!c||c.label!=W.label)return this.uJ("Receiving DIAL launch request for non-clicked DIAL receiver: "+W.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(c&&c.label==W.label&&c.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.X.X)return zI("Reselecting dial screen."), this.publish("yt-remote-cast2-session-change",this.X.X),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.uJ('Changing CAST intent from "'+c.receiverType+'" to "dial" for '+W.friendlyName);Li(this,new l9(this.W,W,this.Y,this.config_))}W=this.X;W.Z=h;W.Z.appState==chrome.cast.DialAppState.RUNNING?(h=W.Z.extraData||{},c=h.screenId||null,ni(W)&&h.loungeToken?h.loungeTokenRefreshIntervalMs?h=OjS(W,{name:W.W.friendlyName,screenId:h.screenId,loungeToken:h.loungeToken,dialId:W.Z.receiver.label, screenIdType:"shortLived"},h.loungeTokenRefreshIntervalMs):(g.pu(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(h)+".")),h=SrU(W,c)):h=SrU(W,c)):h=I8U(W);return h}; g.l.Ov=function(h){var W=this;if(!this.gE()&&!this.N){zI("New cast session ID: "+h.sessionId);var c=h.receiver;if(c.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.X)if(c.receiverType==chrome.cast.ReceiverType.CAST)zI("Got resumed cast session before resumed mdx connection."),c.friendlyName=chrome.cast.unescape(c.friendlyName),Li(this,new xU(this.W,c,this.config_),!0);else{this.uJ("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var V=this.X.W,H=dC(this.W.N5(), V.label);H&&Ji(H,c.label)&&V.receiverType!=chrome.cast.ReceiverType.CAST&&c.receiverType==chrome.cast.ReceiverType.CAST&&(zI("onSessionEstablished_: manual to cast session change "+c.friendlyName),g.hA(this.X),this.X=new xU(this.W,c,this.config_),this.X.subscribe("sessionScreen",(0,g.JS)(this.uK,this,this.X)),this.X.subscribe("sessionFailed",function(){return kZU(W,W.X)}),this.X.XX(null)); this.X.Ng(h)}}}; g.l.BW=function(){return this.X?this.X.IJ():null}; g.l.AwO=function(h){this.gE()||(this.uJ("Failed to estabilish a session: "+g.Nd(h)),h.code!=chrome.cast.ErrorCode.CANCEL&&Li(this,null),this.publish("yt-remote-cast2-session-failed"))}; g.l.q8z=function(h){zI("Receiver availability updated: "+h);if(!this.gE()){var W=QE(this);this.S=h==chrome.cast.ReceiverAvailability.AVAILABLE;QE(this)!=W&&this.publish("yt-remote-cast2-availability-change",QE(this))}}; g.l.xf=function(){this.gE()||(this.G=htS(this),zI("Updating custom receivers: "+g.Nd(this.G)),chrome.cast.setCustomReceivers(this.G,function(){},(0,g.JS)(function(){this.uJ("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",QE(this)))}; eW.prototype.setLaunchParams=eW.prototype.p9B;eW.prototype.setConnectedScreenStatus=eW.prototype.IgH;eW.prototype.stopSession=eW.prototype.eT;eW.prototype.getCastSession=eW.prototype.BW;eW.prototype.requestSession=eW.prototype.requestSession;eW.prototype.init=eW.prototype.init;eW.prototype.dispose=eW.prototype.dispose;var Rt6=[];g.l=Fb.prototype; g.l.reset=function(h){this.listId="";this.index=-1;this.videoId="";rnI(this);this.volume=-1;this.muted=!1;h&&(this.index=h.index,this.listId=h.listId,this.videoId=h.videoId,this.playerState=h.playerState,this.volume=h.volume,this.muted=h.muted,this.audioTrackId=h.audioTrackId,this.trackData=h.trackData,this.J0=h.hasPrevious,this.mA=h.hasNext,this.N=h.playerTime,this.C=h.playerTimeAt,this.W=h.seekableStart,this.S=h.seekableEnd,this.G=h.duration,this.Z=h.loadedTime,this.X=h.liveIngestionTime,this.Y= !isNaN(this.X))}; g.l.isPlaying=function(){return this.playerState==1}; g.l.isBuffering=function(){return this.playerState==3}; g.l.I3=function(h){this.G=isNaN(h)?0:h}; g.l.getDuration=function(){return this.Y?this.G+yE(this):this.G}; g.l.clone=function(){return new Fb(xAS(this))};g.n(Ni,g.h1);g.l=Ni.prototype;g.l.getState=function(){return this.G}; g.l.WQ=function(){return this.Y.getReconnectTimeout()}; g.l.qF=function(){this.Y.reconnect()}; g.l.play=function(){tr(this)?(this.X?this.X.play(null,g.FW,pi(this,"play")):oy(this,"play"),jl$(this,1,fi(Xb(this))),this.publish("remotePlayerChange")):v1(this,this.play)}; g.l.pause=function(){tr(this)?(this.X?this.X.pause(null,g.FW,pi(this,"pause")):oy(this,"pause"),jl$(this,2,fi(Xb(this))),this.publish("remotePlayerChange")):v1(this,this.pause)}; g.l.seekTo=function(h){if(tr(this)){if(this.X){var W=Xb(this),c=new chrome.cast.media.SeekRequest;c.currentTime=h;W.isPlaying()||W.isBuffering()?c.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:c.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.X.seek(c,g.FW,pi(this,"seekTo",{newTime:h}))}else oy(this,"seekTo",{newTime:h});jl$(this,3,h);this.publish("remotePlayerChange")}else v1(this,g.uK(this.seekTo,h))}; g.l.stop=function(){if(tr(this)){this.X?this.X.stop(null,g.FW,pi(this,"stopVideo")):oy(this,"stopVideo");var h=Xb(this);h.index=-1;h.videoId="";rnI(h);m8(this,h);this.publish("remotePlayerChange")}else v1(this,this.stop)}; g.l.setVolume=function(h,W){if(tr(this)){var c=Xb(this);if(this.W){if(c.volume!=h){var V=Math.round(h)/100;this.W.setReceiverVolumeLevel(V,(0,g.JS)(function(){VE("set receiver volume: "+V)},this),(0,g.JS)(function(){this.uJ("failed to set receiver volume.")},this))}c.muted!=W&&this.W.setReceiverMuted(W,(0,g.JS)(function(){VE("set receiver muted: "+W)},this),(0,g.JS)(function(){this.uJ("failed to set receiver muted.")},this))}else{var H={volume:h, muted:W};c.volume!=-1&&(H.delta=h-c.volume);oy(this,"setVolume",H)}c.muted=W;c.volume=h;m8(this,c)}else v1(this,g.uK(this.setVolume,h,W))}; g.l.MJ=function(h,W){if(tr(this)){var c=Xb(this);h={videoId:h};W&&(c.trackData={trackName:W.name,languageCode:W.languageCode,sourceLanguageCode:W.translationLanguage?W.translationLanguage.languageCode:"",languageName:W.languageName,kind:W.kind},h.style=g.Nd(W.style),g.lN(h,c.trackData));oy(this,"setSubtitlesTrack",h);m8(this,c)}else v1(this,g.uK(this.MJ,h,W))}; g.l.setAudioTrack=function(h,W){tr(this)?(W=W.getLanguageInfo().getId(),oy(this,"setAudioTrack",{videoId:h,audioTrackId:W}),h=Xb(this),h.audioTrackId=W,m8(this,h)):v1(this,g.uK(this.setAudioTrack,h,W))}; g.l.playVideo=function(h,W,c,V,H,B,E){V=V===void 0?null:V;H=H===void 0?null:H;B=B===void 0?null:B;E=E===void 0?null:E;var J=Xb(this),u={videoId:h};c!==void 0&&(u.currentIndex=c);b9(J,h,c||0);W!==void 0&&(P1(J,W),u.currentTime=W);V&&(u.listId=V);H&&(u.playerParams=H);B&&(u.clickTrackingParams=B);E&&(u.locationInfo=g.Nd(E));oy(this,"setPlaylist",u);V||m8(this,J)}; g.l.aq=function(h,W){if(tr(this)){if(h&&W){var c=Xb(this);b9(c,h,W);m8(this,c)}oy(this,"previous")}else v1(this,g.uK(this.aq,h,W))}; g.l.nextVideo=function(h,W){if(tr(this)){if(h&&W){var c=Xb(this);b9(c,h,W);m8(this,c)}oy(this,"next")}else v1(this,g.uK(this.nextVideo,h,W))}; g.l.PN=function(){if(tr(this)){oy(this,"clearPlaylist");var h=Xb(this);h.reset();m8(this,h);this.publish("remotePlayerChange")}else v1(this,this.PN)}; g.l.Qk=function(){tr(this)?oy(this,"dismissAutoplay"):v1(this,this.Qk)}; g.l.dispose=function(){if(this.G!=3){var h=this.G;this.G=3;this.publish("proxyStateChange",h,this.G)}g.h1.prototype.dispose.call(this)}; g.l.dE=function(){nAK(this);this.Y=null;this.C.clear();TI(this,null);g.h1.prototype.dE.call(this)}; g.l.jF=function(h){if((h!=this.G||h==2)&&this.G!=3&&h!=0){var W=this.G;this.G=h;this.publish("proxyStateChange",W,h);if(h==1)for(;!this.C.isEmpty();)W=h=this.C,W.X.length===0&&(W.X=W.W,W.X.reverse(),W.W=[]),h.X.pop().apply(this);else h==3&&this.dispose()}}; g.l.nd9=function(h,W){this.publish(h,W)}; g.l.Jkz=function(h){if(!h)this.Fw(null),TI(this,null);else if(this.W.receiver.volume){h=this.W.receiver.volume;var W=Xb(this),c=Math.round(100*h.level||0);if(W.volume!=c||W.muted!=h.muted)VE("Cast volume update: "+h.level+(h.muted?" muted":"")),W.volume=c,W.muted=!!h.muted,m8(this,W)}}; g.l.Fw=function(h){VE("Cast media: "+!!h);this.X&&this.X.removeUpdateListener(this.Z);if(this.X=h)this.X.addUpdateListener(this.Z),alK(this),this.publish("remotePlayerChange")}; g.l.ykE=function(h){h?(alK(this),this.publish("remotePlayerChange")):this.Fw(null)}; g.l.G8=function(){oy(this,"sendDebugCommand",{debugCommand:"stats4nerds "})}; g.l.xng=function(){var h=dA6();h&&TI(this,h)}; g.l.uJ=function(h){c1("CP",h)};g.n(OD,g.h1);g.l=OD.prototype; g.l.connect=function(h,W){if(W){var c=W.listId,V=W.videoId,H=W.videoIds,B=W.playerParams,E=W.clickTrackingParams,J=W.index,u={videoId:V},d=W.currentTime,G=W.locationInfo;W=W.loopMode;d!==void 0&&(u.currentTime=d<=5?0:d);B&&(u.playerParams=B);G&&(u.locationInfo=G);E&&(u.clickTrackingParams=E);c&&(u.listId=c);H&&H.length>0&&(u.videoIds=H.join(","));J!==void 0&&(u.currentIndex=J);this.mW&&(u.loopMode=W||"LOOP_MODE_OFF");c&&(this.X.listId=c);this.X.videoId=V;this.X.index=J||0;this.X.state=3;P1(this.X, d);this.C="UNSUPPORTED";c=this.mW?"setInitialState":"setPlaylist";Iy("Connecting with "+c+" and params: "+g.Nd(u));this.W.connect({method:c,params:g.Nd(u)},h,XfU())}else Iy("Connecting without params"),this.W.connect({},h,XfU());L5U(this)}; g.l.aS=function(h){this.W.aS(h)}; g.l.dispose=function(){this.gE()||(g.hS("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),YU(this,3));g.h1.prototype.dispose.call(this)}; g.l.dE=function(){iq$(this);AnU(this);K5l(this);g.uW(this.Z);this.Z=NaN;g.uW(this.T);this.T=NaN;this.Y=null;g.xk(this.XI);this.XI.length=0;this.W.dispose();g.h1.prototype.dE.call(this);this.C=this.S=this.G=this.X=this.W=null}; g.l.Gd=function(h){if(!this.G||this.G.length===0)return!1;for(var W=g.e(this.G),c=W.next();!c.done;c=W.next())if(!c.value.capabilities.has(h))return!1;return!0}; g.l.P6=function(){var h=3;this.gE()||(h=0,isNaN(this.kW())?this.W.Nj()&&isNaN(this.N)&&(h=1):h=2);return h}; g.l.TR=function(h){Iy("Disconnecting with "+h);g.hS("yt.mdx.remote.remoteClient_",null);iq$(this);this.publish("beforeDisconnect",h);h==1&&rC();this.W.disconnect(h);this.dispose()}; g.l.W6=function(){var h=this.X;this.Y&&(h=this.X.clone(),b9(h,this.Y,h.index));return xAS(h)}; g.l.E4V=function(h){var W=this,c=new Fb(h);c.videoId&&c.videoId!=this.X.videoId&&(this.Y=c.videoId,g.uW(this.Z),this.Z=g.Rx(function(){if(W.Y){var H=W.Y;W.Y=null;W.X.videoId!=H&&SW(W,"getNowPlaying")}},5E3)); var V=[];this.X.listId==c.listId&&this.X.videoId==c.videoId&&this.X.index==c.index||V.push("remoteQueueChange");this.X.playerState==c.playerState&&this.X.volume==c.volume&&this.X.muted==c.muted&&fi(this.X)==fi(c)&&g.Nd(this.X.trackData)==g.Nd(c.trackData)||V.push("remotePlayerChange");this.X.reset(h);g.gX(V,function(H){this.publish(H)},this)}; g.l.YR=function(){var h=this.W.getDeviceId(),W=g.jl(this.G,function(c){return c.type=="REMOTE_CONTROL"&&c.id!=h}); return W?W.id:""}; g.l.kW=function(){return this.W.WQ()}; g.l.J9=function(){return this.C||"UNSUPPORTED"}; g.l.I_=function(){return this.S||""}; g.l.Ed=function(){!isNaN(this.kW())&&this.W.qF()}; g.l.ijz=function(h,W){SW(this,h,W);Cxc(this)}; g.l.td=function(){var h=g.Cb("SAPISID","")||g.Cb("__Secure-1PAPISID")||"",W=g.Cb("__Secure-3PAPISID","")||"";if(!h&&!W)return"";h=g.i6(g.Ls(h),2);W=g.i6(g.Ls(W),2);return g.i6(g.Ls(","+h+","+W),2)}; OD.prototype.subscribe=OD.prototype.subscribe;OD.prototype.unsubscribeByKey=OD.prototype.IF;OD.prototype.getProxyState=OD.prototype.P6;OD.prototype.disconnect=OD.prototype.TR;OD.prototype.getPlayerContextData=OD.prototype.W6;OD.prototype.setPlayerContextData=OD.prototype.E4V;OD.prototype.getOtherConnectedRemoteId=OD.prototype.YR;OD.prototype.getReconnectTimeout=OD.prototype.kW;OD.prototype.getAutoplayMode=OD.prototype.J9;OD.prototype.getAutoplayVideoId=OD.prototype.I_;OD.prototype.reconnect=OD.prototype.Ed; OD.prototype.sendMessage=OD.prototype.ijz;OD.prototype.getXsrfToken=OD.prototype.td;OD.prototype.isCapabilitySupportedOnConnectedDevices=OD.prototype.Gd;g.n(mAU,B1);g.l=mAU.prototype;g.l.N5=function(h){return this.hh.$_gs(h)}; g.l.contains=function(h){return!!this.hh.$_c(h)}; g.l.get=function(h){return this.hh.$_g(h)}; g.l.start=function(){this.hh.$_st()}; g.l.add=function(h,W,c){this.hh.$_a(h,W,c)}; g.l.remove=function(h,W,c){this.hh.$_r(h,W,c)}; g.l.L3=function(h,W,c,V){this.hh.$_un(h,W,c,V)}; g.l.dE=function(){for(var h=this.X.length,W=0;W1&&!this.L.getOption("remote","quickCast")?(this.a5=g.D2(h,this.X,this),this.Yy(g.xw(h,this.X)),h=this.L.getOption("remote","currentReceiver"),h=this.X(h),this.options[h]&&this.BB(h),this.enable(!0)):this.enable(!1)}; Z5.prototype.X=function(h){return h.key}; Z5.prototype.GS=function(h){return h==="cast-selector-receiver"?"Transmitir\u2026":this.a5[h].name}; Z5.prototype.Oy=function(h){g.Xt.prototype.Oy.call(this,h);this.L.setOption("remote","currentReceiver",this.a5[h]);this.YZ.NU()};g.n(J5t,g.K3);g.l=J5t.prototype; g.l.create=function(){var h=this.player.B(),W=g.Vf(h);h={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:h.j("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:h.j("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:h.j("enable_cast_short_lived_lounge_token")};OqK(W,h);this.subscriptions.push(g.S5("yt-remote-before-disconnect",this.ZMg,this));this.subscriptions.push(g.S5("yt-remote-connection-change",this.FKz,this));this.subscriptions.push(g.S5("yt-remote-receiver-availability-change",this.VO, this));this.subscriptions.push(g.S5("yt-remote-auto-connect",this.RAW,this));this.subscriptions.push(g.S5("yt-remote-receiver-resumed",this.S8n,this));this.subscriptions.push(g.S5("mdx-privacy-popup-confirm",this.Oyk,this));this.subscriptions.push(g.S5("mdx-privacy-popup-cancel",this.AqH,this));this.VO()}; g.l.load=function(){this.player.cancelPlayback();g.K3.prototype.load.call(this);this.bO=new R_c(this.player.B(),this);this.player.In(this.bO);this.GL=new s3$(this,this.player,this.tI);var h=(h=c52())?h.currentTime:0;var W=keK()?new Ni(sY(),void 0):null;h==0&&W&&(h=fi(Xb(W)));h!==0&&this.kd(h);uef(this,this.Zh,this.Zh);this.player.gZ(6)}; g.l.unload=function(){this.player.publish("mdxautoplaycanceled");this.player.HF();this.IS=this.u0;g.Wa(this.GL,this.tI);this.tI=this.bO=this.GL=null;g.K3.prototype.unload.call(this);this.player.gZ(5);rt(this)}; g.l.dE=function(){g.gI(this.subscriptions);g.K3.prototype.dE.call(this)}; g.l.Hu=function(h){var W=g.tN.apply(1,arguments);this.loaded&&this.GL.kO.apply(this.GL,[h].concat(g.rN(W)))}; g.l.getAdState=function(){return this.P5}; g.l.J0=function(){return this.tI?Xb(this.tI).J0:!1}; g.l.mA=function(){return this.tI?Xb(this.tI).mA:!1}; g.l.kd=function(h,W){this.LL=h||0;this.player.publish("progresssync",h,W);this.player.lV("onVideoProgress",h||0)}; g.l.getCurrentTime=function(){return this.LL}; g.l.getDuration=function(){return Xb(this.tI).getDuration()||0}; g.l.wW=function(){var h=Xb(this.tI);return h.Y?h.X+yE(h):h.X}; g.l.fg=function(){return Xb(this.tI).Z}; g.l.H3=function(){return qcl(Xb(this.tI))}; g.l.bP=function(){var h=Xb(this.tI);return h.W>0?h.W+yE(h):h.W}; g.l.getProgressState=function(){var h=Xb(this.tI),W=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:h.playerState!=1081&&this.player.MY(),clipEnd:W.clipEnd,clipStart:W.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:this.getDuration(),ingestionTime:this.wW(),isAtLiveHead:this.isAtLiveHead(),loaded:this.fg(),seekableEnd:this.H3(),seekableStart:this.bP(),offset:0,viewerLivestreamJoinMediaTime:0}}; g.l.isAtLiveHead=function(){return qcl(Xb(this.tI))-this.getCurrentTime()<=1}; g.l.nextVideo=function(){this.tI&&this.tI.nextVideo()}; g.l.aq=function(){this.tI&&this.tI.aq()}; g.l.ZMg=function(h){h===1&&(this.FH=this.tI?Xb(this.tI):null)}; g.l.FKz=function(){var h=keK()?new Ni(sY(),void 0):null;if(h){var W=this.IS;this.loaded&&this.unload();this.tI=h;this.FH=null;W.key!==this.u0.key&&(this.IS=W,this.load())}else g.hA(this.tI),this.tI=null,this.loaded&&(this.unload(),(h=this.FH)&&h.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(h.videoId,fi(h)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)}; g.l.VO=function(){var h=[this.u0],W=h.concat,c=Sc$();UD()&&g.KS("yt-remote-cast-available")&&c.push({key:"cast-selector-receiver",name:"Cast..."});this.a5=W.call(h,c);h=DA2()||this.u0;qI(this,h);this.player.lV("onMdxReceiversChange")}; g.l.RAW=function(){var h=DA2();qI(this,h)}; g.l.S8n=function(){this.IS=DA2()}; g.l.Oyk=function(){this.l7=!0;rt(this);Rd=!1;HQ&&EY(HQ,1);HQ=null}; g.l.AqH=function(){this.l7=!1;rt(this);qI(this,this.u0);this.IS=this.u0;Rd=!1;HQ=null;this.player.playVideo()}; g.l.Et=function(h,W){switch(h){case "casting":return this.loaded;case "receivers":return this.a5;case "currentReceiver":return W&&(W.key==="cast-selector-receiver"?Ge6():qI(this,W)),this.loaded?this.IS:this.u0;case "quickCast":return this.a5.length===2&&this.a5[1].key==="cast-selector-receiver"?(W&&Ge6(),!0):!1}}; g.l.G8=function(){this.tI.G8()}; g.l.xe=function(){return!1}; g.l.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]}; g.l.isLoggedIn=function(){var h,W;return((h=g.X_("PLAYER_CONFIG"))==null?void 0:(W=h.args)==null?void 0:W.authuser)!==void 0?!0:!(!g.X_("SESSION_INDEX")&&!g.X_("LOGGED_IN"))};g.i3("remote",J5t);})(_yt_player);