(function(g){var window=this;'use strict';var awi=function(y){if(y instanceof g.uD)return y;if(typeof y.J_=="function")return y.J_(!1);if(g.pI(y)){var t=0,a=new g.uD;a.next=function(){for(;;){if(t>=y.length)return g.Fl;if(t in y)return g.VM(y[t++]);t++}}; return a}throw Error("Not implemented");},r3d=function(y,t,a){if(g.pI(y))g.wK(y,t,a); else for(y=awi(y);;){var r=y.next();if(r.done)break;t.call(a,r.value,void 0,y)}},T_=function(y){g.ze(y,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.oq()).toString(36)); return y},G_=function(y,t,a){Array.isArray(a)||(a=[String(a)]); g.sD1(y.D,t,a)},Ens=function(y,t){var a=[]; r3d(t,function(r){try{var E=g.e4.prototype.A5.call(this,r,!0)}catch(h){if(h=="Storage: Invalid value was encountered")return;throw h;}E===void 0?a.push(r):g.Sq7(E)&&a.push(r)},y); return a},hWE=function(y,t){Ens(y,t).forEach(function(a){g.e4.prototype.remove.call(this,a)},y)},Fh9=function(y){if(y.zl){if(y.zl.locationOverrideToken)return{locationOverrideToken:y.zl.locationOverrideToken}; if(y.zl.latitudeE7!=null&&y.zl.longitudeE7!=null)return{latitudeE7:y.zl.latitudeE7,longitudeE7:y.zl.longitudeE7}}return null},A3e=function(y,t){g.TE(y,t)||y.push(t)},xC3=function(y){var t=0,a; for(a in y)t++;return t},sfs=function(y,t){return g.QY(y,t)},$C7=function(y){try{return g.ks.JSON.parse(y)}catch(t){}y=String(y); if(/^\s*$/.test(y)?0:/^[\],:{}\s\u2028\u2029]*$/.test(y.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("("+y+")")}catch(t){}throw Error("Invalid JSON string: "+y);},Z6=function(y){if(g.ks.JSON)try{return g.ks.JSON.parse(y)}catch(t){}return $C7(y)},UCI=function(){var y=yK(); this.V=y;y.fD("/client_streamz/youtube/living_room/mdx/channel/opened",g.C0("channel_type"))},C4y=function(){var y=yK(); this.V=y;y.fD("/client_streamz/youtube/living_room/mdx/channel/closed",g.C0("channel_type"))},zW9=function(){var y=yK(); this.V=y;y.fD("/client_streamz/youtube/living_room/mdx/channel/message_received",g.C0("channel_type"))},O5I=function(){var y=yK(); this.V=y;y.fD("/client_streamz/youtube/living_room/mdx/channel/success")},LhI=function(){var y=yK(); this.V=y;y.fD("/client_streamz/youtube/living_room/mdx/channel/error",g.C0("channel_type"),g.C0("error_type"))},M09=function(){var y=yK(); this.V=y;y.fD("/client_streamz/youtube/living_room/mdx/browser_channel/pending_maps")},wSc=function(){var y=yK(); this.V=y;y.fD("/client_streamz/youtube/living_room/mdx/browser_channel/undelivered_maps")},RW2=function(y,t,a,r){var E=new g.$u(null); y&&g.A3(E,y);t&&g.Un(E,t);a&&g.xn(E,a);r&&(E.K=r);return E},P4F=function(y,t){return new g.rF(y,t)},tz=function(y,t){return Object.prototype.hasOwnProperty.call(y,t)},NlU=function(y,t){return y===t},aK=function(y,t){this.K={}; this.V=[];this.Bd=this.size=0;var a=arguments.length;if(a>1){if(a%2)throw Error("Uneven number of arguments");for(var r=0;r5&&(y=y.slice(y.length-5)); var t=g.v$(H53(),function(r){return r.loungeToken}),a=g.v$(y,function(r){return r.loungeToken}); g.pQ(a,function(r){return!g.TE(t,r)})&&b5I(); g.m7("yt-remote-local-screens",y,31536E3)},U7=function(y){y||(g.o_("yt-remote-session-screen-id"),g.o_("yt-remote-session-video-id")); J37();y=s7();g.tB(y,$Y());nn9(y)},c3U=function(){if(!Ch){var y=g.Jl(); y&&(Ch=new g.Qf(y))}},qTi=function(){c3U(); return Ch?!!Ch.get("yt-remote-use-staging-server"):!1},z$=function(y,t){g.tV[y]=!0; var a=g.Zd();a&&a.publish.apply(a,arguments);g.tV[y]=!1},YTc=function(){},yK=function(){if(!O7){O7=new g.or(new YTc); var y=g.jm("client_streamz_web_flush_count",-1);y!==-1&&(O7.Y=y)}return O7},DCU=function(){var y=window.navigator.userAgent.match(/Chrome\/([0-9]+)/); return y?parseInt(y[1],10):0},gnd=function(y){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+y)!=-1||document.currentScript.src.indexOf("&"+y)!=-1)},i5U=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},Lh=function(y){y.length?Khs(y.shift(),function(){Lh(y)}):Iw3()},Tl7=function(y){return"chrome-extension://"+y+"/cast_sender.js"},Khs=function(y,t,a){var r=document.createElement("script"); r.onerror=t;a&&(r.onload=a);g.mt(r,g.ei(y));(document.head||document.documentElement).appendChild(r)},Ges=function(){var y=DCU(),t=[]; if(y>1){var a=y-1;t.push("//www.gstatic.com/eureka/clank/"+y+"/cast_sender.js");t.push("//www.gstatic.com/eureka/clank/"+a+"/cast_sender.js")}return t},Iw3=function(){var y=i5U(); y&&y(!1,"No cast extension found")},yl7=function(){if(Z5q){var y=2,t=i5U(),a=function(){y--; y==0&&t&&t(!0)}; window.__onGCastApiAvailable=a;Khs("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",Iw3,a)}},t4F=function(){yl7(); var y=Ges();y.push("//www.gstatic.com/eureka/clank/cast_sender.js");Lh(y)},rls=function(){yl7(); var y=Ges();y.push.apply(y,g.i7(a$9.map(Tl7)));y.push("//www.gstatic.com/eureka/clank/cast_sender.js");Lh(y)},MF=function(y,t,a){g.H.call(this); this.J=a!=null?(0,g.mi)(y,a):y;this.Rd=t;this.L=(0,g.mi)(this.sI,this);this.V=!1;this.K=0;this.Y=this.fM=null;this.D=[]},wW=function(){this.V=g.oq()},EMF=function(){RK||(RK=new wW)},hI3=function(){RK||(RK=new wW)},PB=function(){},FTI=function(){g.tx.call(this,"p")},Ald=function(){g.tx.call(this,"o")},sYc=function(){return xRi=xRi||new g.MM},$R7=function(y){g.tx.call(this,"serverreachability",y)},NF=function(y){var t=sYc(); t.dispatchEvent(new $R7(t,y))},URd=function(y){g.tx.call(this,"statevent",y)},dW=function(y){var t=sYc(); t.dispatchEvent(new URd(t,y))},Cwc=function(y,t,a,r){g.tx.call(this,"timingevent",y); this.size=t;this.rtt=a;this.retries=r},Xh=function(y,t){if(typeof y!=="function")throw Error("Fn must not be null and must be a function"); return g.ks.setTimeout(function(){y()},t)},kY=function(){},fh=function(y,t,a,r){this.Y=y; this.D=t;this.XB=a;this.MK=r||1;this.Az=new g.wl(this);this.T7=45E3;this.Ff=null;this.J=!1;this.hF=this.JF=this.Z=this.yv=this.o5=this.n1=this.AF=null;this.Vv=[];this.V=null;this.W=0;this.L=this.DE=null;this.I7=-1;this.L1=!1;this.R5=0;this.r0=null;this.FB=this.C1=this.zl=this.d0=!1;this.K=new zI9},zI9=function(){this.Y=null; this.V="";this.K=!1},LTE=function(y,t,a){y.yv=1; y.Z=T_(t.clone());y.hF=a;y.d0=!0;Oe9(y,null)},Oe9=function(y,t){y.o5=Date.now(); WB(y);y.JF=y.Z.clone();G_(y.JF,"t",y.MK);y.W=0;var a=y.Y.C1;y.K=new zI9;y.V=M4i(y.Y,a?t:null,!y.hF);y.R5>0&&(y.r0=new g.tl((0,g.mi)(y.V6,y,y.V),y.R5));y.Az.listen(y.V,"readystatechange",y.zC);t=y.Ff?g.uN(y.Ff):{};y.hF?(y.DE||(y.DE="POST"),t["Content-Type"]="application/x-www-form-urlencoded",y.V.send(y.JF,y.DE,y.hF,t)):(y.DE="GET",y.V.send(y.JF,y.DE,null,t));NF(1)},RIF=function(y){if(!wHq(y))return g.KZ(y.V); var t=g.Ir(y.V);if(t==="")return"";var a="",r=t.length,E=g.gk(y.V)==4;if(!y.K.Y){if(typeof TextDecoder==="undefined")return jz(y),Sz(y),"";y.K.Y=new g.ks.TextDecoder}for(var h=0;ht.length)return Pw3;t=t.slice(r,r+a);y.W=r+a;return t},WB=function(y){y.n1=Date.now()+y.T7; XHy(y,y.T7)},XHy=function(y,t){if(y.AF!=null)throw Error("WatchDog timer not null"); y.AF=Xh((0,g.mi)(y.KX,y),t)},k4s=function(y){y.AF&&(g.ks.clearTimeout(y.AF),y.AF=null)},Sz=function(y){y.Y.l2()||y.L1||f$2(y.Y,y)},jz=function(y){k4s(y); g.wQ(y.r0);y.r0=null;y.Az.removeAll();if(y.V){var t=y.V;y.V=null;t.abort();t.dispose()}},l$c=function(y,t){try{var a=y.Y; if(a.fA!=0&&(a.V==y||WTU(a.K,y)))if(!y.C1&&WTU(a.K,y)&&a.fA==3){try{var r=a.bq.V.parse(t)}catch(k){r=null}if(Array.isArray(r)&&r.length==3){var E=r;if(E[0]==0)a:{if(!a.Z){if(a.V)if(a.V.o5+3E30&&(a.R5=1.5*U);r=a;var C=y.vk();if(C){var z=g.TZ(C,"X-Client-Wire-Protocol");if(z){var O=r.K;!O.V&&(g.GJ(z,"spdy")||g.GJ(z,"quic")||g.GJ(z,"h2"))&&(O.D=O.L,O.V=new Set,O.K&&(QYF(O,O.K),O.K=null))}if(r.d0){var M=g.TZ(C,"X-HTTP-Session-Id");M&&(r.cj=M,g.ze(r.Ff,r.d0,M))}}a.fA=3;a.L&&a.L.Y$();a.nJ&&(a.IR=Date.now()-y.o5);r=a;var L=y;r.MP=vMi(r,r.C1?r.XB:null,r.sR); if(L.C1){pH2(r.K,L);var w=L,d=r.R5;d&&w.setTimeout(d);w.AF&&(k4s(w),WB(w));r.V=L}else eII(r);a.Y.length>0&&ez(a)}else h[0]!="stop"&&h[0]!="close"||ph(a,7);else a.fA==3&&(h[0]=="stop"||h[0]=="close"?h[0]=="stop"?ph(a,7):a.disconnect():h[0]!="noop"&&a.L&&a.L.PY(h),a.Vv=0)}NF(4)}catch(k){}},uV2=function(y,t){this.V=y; this.map=t;this.context=null},V49=function(y){this.L=y||10; g.ks.PerformanceNavigationTiming?(y=g.ks.performance.getEntriesByType("navigation"),y=y.length>0&&(y[0].nextHopProtocol=="hq"||y[0].nextHopProtocol=="h2")):y=!!(g.ks.chrome&&g.ks.chrome.loadTimes&&g.ks.chrome.loadTimes()&&g.ks.chrome.loadTimes().wasFetchedViaSpdy);this.D=y?this.L:1;this.V=null;this.D>1&&(this.V=new Set);this.K=null;this.Y=[]},nMy=function(y){return y.K?!0:y.V?y.V.size>=y.D:!1},SzF=function(y){return y.K?1:y.V?y.V.size:0},WTU=function(y,t){return y.K?y.K==t:y.V?y.V.has(t):!1},QYF= function(y,t){y.V?y.V.add(t):y.K=t},pH2=function(y,t){y.K&&y.K==t?y.K=null:y.V&&y.V.has(t)&&y.V.delete(t)},mR2=function(y){if(y.K!=null)return y.Y.concat(y.K.Vv); if(y.V!=null&&y.V.size!==0){var t=y.Y;y=g.p(y.V.values());for(var a=y.next();!a.done;a=y.next())t=t.concat(a.value.Vv);return t}return g.hB(y.Y)},Jlq=function(y,t){var a=new kY; if(g.ks.Image){var r=new Image;r.onload=g.J7(lE,a,"TestLoadImage: loaded",!0,t,r);r.onerror=g.J7(lE,a,"TestLoadImage: error",!1,t,r);r.onabort=g.J7(lE,a,"TestLoadImage: abort",!1,t,r);r.ontimeout=g.J7(lE,a,"TestLoadImage: timeout",!1,t,r);g.ks.setTimeout(function(){if(r.ontimeout)r.ontimeout()},1E4); r.src=y}else t(!1)},oMU=function(y,t){var a=new kY,r=new AbortController,E=setTimeout(function(){r.abort(); lE(a,"TestPingServer: timeout",!1,t)},1E4); fetch(y,{signal:r.signal}).then(function(h){clearTimeout(E);h.ok?lE(a,"TestPingServer: ok",!0,t):lE(a,"TestPingServer: server error",!1,t)}).catch(function(){clearTimeout(E); lE(a,"TestPingServer: error",!1,t)})},lE=function(y,t,a,r,E){try{E&&(E.onload=null,E.onerror=null,E.onabort=null,E.ontimeout=null),r(a)}catch(h){}},Hec=function(){this.V=new PB},uE=function(y,t,a){return a&&a.JF4?a.JF4[y]||t:t},be2=function(y){this.Y=[]; this.XB=this.MP=this.Ff=this.sR=this.V=this.cj=this.d0=this.L1=this.W=this.zl=this.hF=null;this.ND=this.JF=0;this.P1=uE("failFast",!1,y);this.r0=this.AF=this.Z=this.J=this.L=null;this.ZA=!0;this.EM=this.yv=-1;this.MK=this.Vv=this.o5=0;this.uK=uE("baseRetryDelayMs",5E3,y);this.TR=uE("retryDelaySeedMs",1E4,y);this.ix=uE("forwardChannelMaxRetries",2,y);this.pM=uE("forwardChannelRequestTimeoutMs",2E4,y);this.RR=y&&y.CXf||void 0;this.GR=y&&y.Qer||void 0;this.oo=y&&y.kpr||!1;this.R5=void 0;this.C1=y&&y.TOm|| !1;this.D="";this.K=new V49(y&&y.W34);this.bq=new Hec;this.Az=y&&y.FCr||!1;this.n1=y&&y.sXm||!1;this.Az&&this.n1&&(this.n1=!1);this.Ri=y&&y.Bbf||!1;y&&y.UTm&&(this.ZA=!1);this.nJ=!this.Az&&this.ZA&&y&&y.E5r||!1;this.vO=void 0;y&&y.It&&y.It>0&&(this.vO=y.It);this.I7=void 0;this.IR=0;this.T7=!1;this.FB=this.DE=null},vB=function(y){y.V&&(BFI(y),y.V.cancel(),y.V=null)},cle=function(y){vB(y); y.Z&&(g.ks.clearTimeout(y.Z),y.Z=null);QK(y);y.K.cancel();y.J&&(typeof y.J==="number"&&g.ks.clearTimeout(y.J),y.J=null)},ez=function(y){nMy(y.K)||y.J||(y.J=!0,g.jv(y.sW,y),y.o5=0)},Yz9=function(y,t){if(SzF(y.K)>=y.K.D-(y.J?1:0))return!1; if(y.J)return y.Y=t.Vv.concat(y.Y),!0;if(y.fA==1||y.fA==2||y.o5>=(y.P1?0:y.ix))return!1;y.J=Xh((0,g.mi)(y.sW,y,t),qzU(y,y.o5));y.o5++;return!0},gM3=function(y,t){var a; t?a=t.XB:a=y.JF++;var r=y.Ff.clone();g.ze(r,"SID",y.D);g.ze(r,"RID",a);g.ze(r,"AID",y.yv);VK(y,r);y.W&&y.hF&&g.MC(r,y.W,y.hF);a=new fh(y,y.D,a,y.o5+1);y.W===null&&(a.Ff=y.hF);t&&(y.Y=t.Vv.concat(y.Y));t=DRd(y,a,1E3);a.setTimeout(Math.round(y.pM*.5)+Math.round(y.pM*.5*Math.random()));QYF(y.K,a);LTE(a,r,t)},VK=function(y,t){y.L1&&g.jy(y.L1,function(a,r){g.ze(t,r,a)}); y.L&&g.jy({},function(a,r){g.ze(t,r,a)})},DRd=function(y,t,a){a=Math.min(y.Y.length,a); var r=y.L?(0,g.mi)(y.L.YC,y.L,y):null;a:{for(var E=y.Y,h=-1;;){var F=["count="+a];h==-1?a>0?(h=E[0].V,F.push("ofs="+h)):h=0:F.push("ofs="+h);for(var x=!0,U=0;U=3)return!1; y.MK++;y.Z=Xh((0,g.mi)(y.cY,y),qzU(y,y.Vv));y.Vv++;return!0},BFI=function(y){y.DE!=null&&(g.ks.clearTimeout(y.DE),y.DE=null)},ie9=function(y){y.V=new fh(y,y.D,"rpc",y.MK); y.W===null&&(y.V.Ff=y.hF);y.V.R5=0;var t=y.MP.clone();g.ze(t,"RID","rpc");g.ze(t,"SID",y.D);g.ze(t,"AID",y.yv);g.ze(t,"CI",y.r0?"0":"1");!y.r0&&y.vO&&g.ze(t,"TO",y.vO);g.ze(t,"TYPE","xmlhttp");VK(y,t);y.W&&y.hF&&g.MC(t,y.W,y.hF);y.R5&&y.V.setTimeout(y.R5);var a=y.V;y=y.XB;a.yv=1;a.Z=T_(t.clone());a.hF=null;a.d0=!0;Oe9(a,y)},QK=function(y){y.AF!=null&&(g.ks.clearTimeout(y.AF),y.AF=null)},f$2=function(y,t){var a=null; if(y.V==t){QK(y);BFI(y);y.V=null;var r=2}else if(WTU(y.K,t))a=t.Vv,pH2(y.K,t),r=1;else return;if(y.fA!=0)if(t.J)if(r==1){a=t.hF?t.hF.length:0;t=Date.now()-t.o5;var E=y.o5;r=sYc();r.dispatchEvent(new Cwc(r,a,t,E));ez(y)}else eII(y);else{var h=t.I7;E=t.getLastError();if(E==3||E==0&&h>0||!(r==1&&Yz9(y,t)||r==2&&jY9(y)))switch(a&&a.length>0&&(t=y.K,t.Y=t.Y.concat(a)),E){case 1:ph(y,5);break;case 4:ph(y,10);break;case 3:ph(y,6);break;default:ph(y,2)}}},qzU=function(y,t){var a=y.uK+Math.floor(Math.random()* y.TR); y.isActive()||(a*=2);return a*t},ph=function(y,t){if(t==2){var a=(0,g.mi)(y.nX5,y),r=y.GR,E=!r; r=new g.$u(r||"//www.google.com/images/cleardot.gif");g.ks.location&&g.ks.location.protocol=="http"||g.A3(r,"https");T_(r);E?Jlq(r.toString(),a):oMU(r.toString(),a)}else dW(2);y.fA=0;y.L&&y.L.zF(t);KT9(y);cle(y)},KT9=function(y){y.fA=0; y.FB=[];if(y.L){var t=mR2(y.K);if(t.length!=0||y.Y.length!=0)g.F4(y.FB,t),g.F4(y.FB,y.Y),y.K.Y.length=0,g.hB(y.Y),y.Y.length=0;y.L.K6()}},I$y=function(y){if(y.fA==0)return y.FB; var t=[];g.F4(t,mR2(y.K));g.F4(t,y.Y);return t},vMi=function(y,t,a){var r=g.NH(a); r.V!=""?(t&&g.Un(r,t+"."+r.V),g.xn(r,r.Y)):(r=g.ks.location,r=RW2(r.protocol,t?t+"."+r.hostname:r.hostname,+r.port,a));t=y.d0;a=y.cj;t&&a&&g.ze(r,t,a);g.ze(r,"VER",y.Ik);VK(y,r);return r},M4i=function(y,t,a){if(t&&!y.C1)throw Error("Can't create secondary domain capable XhrIo object."); t=y.oo&&!y.RR?new g.qM(new g.rl({sJ:a})):new g.qM(y.RR);t.W=y.C1;return t},TF2=function(){},G4i=function(){},ml=function(y,t){g.MM.call(this); this.V=new be2(t);this.L=y;this.K=t&&t.MzF||null;y=t&&t.qSm||null;t&&t.p5m&&(y?y["X-Client-Protocol"]="webchannel":y={"X-Client-Protocol":"webchannel"});this.V.hF=y;y=t&&t.R4r||null;t&&t.gL&&(y?y["X-WebChannel-Content-Type"]=t.gL:y={"X-WebChannel-Content-Type":t.gL});t&&t.oQ&&(y?y["X-WebChannel-Client-Profile"]=t.oQ:y={"X-WebChannel-Client-Profile":t.oQ});this.V.zl=y;(y=t&&t.NUr)&&!g.TJ(y)&&(this.V.W=y);this.J=t&&t.TOm||!1;this.D=t&&t.ncv||!1;(t=t&&t.Mrr)&&!g.TJ(t)&&(this.V.d0=t,g.Sk(this.K,t)&&(y= this.K,t in y&&delete y[t]));this.Y=new nh(this)},Zey=function(y){FTI.call(this); y.__headers__&&(this.headers=y.__headers__,this.statusCode=y.__status__,delete y.__headers__,delete y.__status__);var t=y.__sm__;t?this.data=(this.V=g.k_(t))?g.ek(t,this.V):t:this.data=y},yCU=function(y){Ald.call(this); this.status=1;this.errorCode=y},nh=function(y){this.V=y},tii=function(y,t){this.K=y; this.V=t},aRi=function(y){return I$y(y.V).map(function(t){var a=y.K; t=t.map;"__data__"in t?(t=t.__data__,a=a.D?$C7(t):t):a=t;return a})},Jz=function(y,t){if(typeof y!=="function")throw Error("Fn must not be null and must be a function"); return g.ks.setTimeout(function(){y()},t)},HB=function(y){oK.dispatchEvent(new rCi(oK,y))},rCi=function(y){g.tx.call(this,"statevent",y)},bE=function(y,t,a,r){this.V=y; this.D=t;this.W=a;this.J=r||1;this.K=45E3;this.Y=new g.wl(this);this.L=new g.nZ;this.L.setInterval(250)},hsy=function(y,t,a){y.vP=1; y.yK=T_(t.clone());y.Gp=a;y.d0=!0;ERi(y,null)},FR9=function(y,t,a,r,E){y.vP=1; y.yK=T_(t.clone());y.Gp=null;y.d0=a;E&&(y.qs=!1);ERi(y,r)},ERi=function(y,t){y.kM=Date.now(); ACc(y);y.D0=y.yK.clone();G_(y.D0,"t",y.J);y.F4=0;y.gW=y.V.zG(y.V.C8()?t:null);y.o4>0&&(y.gJ=new g.tl((0,g.mi)(y.iF,y,y.gW),y.o4));y.Y.listen(y.gW,"readystatechange",y.xC);t=y.Tp?g.uN(y.Tp):{};y.Gp?(y.mU="POST",t["Content-Type"]="application/x-www-form-urlencoded",y.gW.send(y.D0,y.mU,y.Gp,t)):(y.mU="GET",y.qs&&!g.ko&&(t.Connection="close"),y.gW.send(y.D0,y.mU,null,t));y.V.hT(1)},$v9=function(y,t){var a=y.F4,r=t.indexOf("\n",a); if(r==-1)return xvc;a=Number(t.substring(a,r));if(isNaN(a))return sTE;r+=1;if(r+a>t.length)return xvc;t=t.slice(r,r+a);y.F4=r+a;return t},ACc=function(y){y.K3=Date.now()+y.K; Uvs(y,y.K)},Uvs=function(y,t){if(y.TP!=null)throw Error("WatchDog timer not null"); y.TP=Jz((0,g.mi)(y.iV,y),t)},Cte=function(y){y.TP&&(g.ks.clearTimeout(y.TP),y.TP=null)},zs9=function(y){y.V.l2()||y.qW||y.V.Yp(y)},qF=function(y){Cte(y); g.wQ(y.gJ);y.gJ=null;y.L.stop();y.Y.removeAll();if(y.gW){var t=y.gW;y.gW=null;t.abort();t.dispose()}y.fl&&(y.fl=null)},O63=function(y,t){try{y.V.x$(y,t),y.V.hT(4)}catch(a){}},Mi9=function(y,t,a,r,E){if(r==0)a(!1); else{var h=E||0;r--;LRs(y,t,function(F){F?a(!0):g.ks.setTimeout(function(){Mi9(y,t,a,r,h)},h)})}},LRs=function(y,t,a){var r=new Image; r.onload=function(){try{YY(r),a(!0)}catch(E){}}; r.onerror=function(){try{YY(r),a(!1)}catch(E){}}; r.onabort=function(){try{YY(r),a(!1)}catch(E){}}; r.ontimeout=function(){try{YY(r),a(!1)}catch(E){}}; g.ks.setTimeout(function(){if(r.ontimeout)r.ontimeout()},t); r.src=y},YY=function(y){y.onload=null; y.onerror=null;y.onabort=null;y.ontimeout=null},wri=function(y){this.V=y; this.K=new PB},Rs3=function(y){var t=Dv(y.V,y.dT,"/mail/images/cleardot.gif"); T_(t);Mi9(t.toString(),5E3,(0,g.mi)(y.Wf,y),3,2E3);y.hT(1)},Pti=function(y){var t=y.V.J; t!=null?(HB(5),t?(HB(11),gW(y.V,y,!1)):(HB(12),gW(y.V,y,!0))):(y.E0=new bE(y),y.E0.Tp=y.Ph,t=y.V,t=Dv(t,t.C8()?y.Qw:null,y.ib),HB(5),G_(t,"TYPE","xmlhttp"),FR9(y.E0,t,!1,y.Qw,!1))},NNy=function(y,t,a){this.V=1; this.K=[];this.Y=[];this.L=new PB;this.hF=y||null;this.J=t!=null?t:null;this.Z=a||!1},dv9=function(y,t){this.V=y; this.map=t;this.context=null},Xrq=function(y,t,a,r){g.tx.call(this,"timingevent",y); this.size=t;this.rtt=a;this.retries=r},kLq=function(y){g.tx.call(this,"serverreachability",y)},WR3=function(y){y.DU(1,0); y.U$=Dv(y,null,y.dA);fRs(y)},jTi=function(y){y.QN&&(y.QN.abort(),y.QN=null); y.SJ&&(y.SJ.cancel(),y.SJ=null);y.Gy&&(g.ks.clearTimeout(y.Gy),y.Gy=null);iE(y);y.Ym&&(y.Ym.cancel(),y.Ym=null);y.EB&&(g.ks.clearTimeout(y.EB),y.EB=null)},S_d=function(y,t){if(y.V==0)throw Error("Invalid operation: sending map when state is closed"); y.K.push(new dv9(y.F9++,t));y.V!=2&&y.V!=3||fRs(y)},QTU=function(y){var t=0; y.SJ&&t++;y.Ym&&t++;return t},fRs=function(y){y.Ym||y.EB||(y.EB=Jz((0,g.mi)(y.mR,y),0),y.GP=0)},ese=function(y,t){if(y.V==1){if(!t){y.BH=Math.floor(Math.random()*1E5); t=y.BH++;var a=new bE(y,"",t);a.Tp=y.BG;var r=vRy(y),E=y.U$.clone();g.ze(E,"RID",t);g.ze(E,"CVER","1");Kh(y,E);hsy(a,E,r);y.Ym=a;y.V=2}}else y.V==3&&(t?prc(y,t):y.K.length==0||y.Ym||prc(y))},prc=function(y,t){if(t)if(y.Zc>6){y.K=y.Y.concat(y.K); y.Y.length=0;var a=y.BH-1;t=vRy(y)}else a=t.W,t=t.Gp;else a=y.BH++,t=vRy(y);var r=y.U$.clone();g.ze(r,"SID",y.D);g.ze(r,"RID",a);g.ze(r,"AID",y.ZJ);Kh(y,r);a=new bE(y,y.D,a,y.GP+1);a.Tp=y.BG;a.setTimeout(1E4+Math.round(1E4*Math.random()));y.Ym=a;hsy(a,r,t)},Kh=function(y,t){y.lq&&(y=y.lq.y6())&&g.jy(y,function(a,r){g.ze(t,r,a)})},vRy=function(y){var t=Math.min(y.K.length,1E3),a=["count="+t]; if(y.Zc>6&&t>0){var r=y.K[0].V;a.push("ofs="+r)}else r=0;for(var E={},h=0;h=3)return!1; y.W++;y.Gy=Jz((0,g.mi)(y.vY,y),uxq(y,y.RI));y.RI++;return!0},gW=function(y,t,a){y.qj=y.J==null?a:!y.J; y.zc=t.R_;y.Z||WR3(y)},iE=function(y){y.Sh!=null&&(g.ks.clearTimeout(y.Sh),y.Sh=null)},uxq=function(y,t){var a=5E3+Math.floor(Math.random()*1E4); y.isActive()||(a*=2);return a*t},IK=function(y,t){if(t==2||t==9){var a=null; y.lq&&(a=null);var r=(0,g.mi)(y.EXf,y);a||(a=new g.$u("//www.google.com/images/cleardot.gif"),T_(a));LRs(a.toString(),1E4,r)}else HB(2);nRI(y,t)},nRI=function(y,t){y.V=0; y.lq&&y.lq.Fw(t);mve(y);jTi(y)},mve=function(y){y.V=0; y.zc=-1;if(y.lq)if(y.Y.length==0&&y.K.length==0)y.lq.gA();else{var t=g.hB(y.Y),a=g.hB(y.K);y.Y.length=0;y.K.length=0;y.lq.gA(t,a)}},Dv=function(y,t,a){var r=g.NH(a); if(r.V!="")t&&g.Un(r,t+"."+r.V),g.xn(r,r.Y);else{var E=window.location;r=RW2(E.protocol,t?t+"."+E.hostname:E.hostname,+E.port,a)}y.t7&&g.jy(y.t7,function(h,F){g.ze(r,F,h)}); g.ze(r,"VER",y.Zc);Kh(y,r);return r},JCU=function(){},oRI=function(){this.V=[]; this.K=[]},H6I=function(y){g.tx.call(this,"channelMessage"); this.message=y},b6d=function(y){g.tx.call(this,"channelError"); this.error=y},BNE=function(y,t){this.action=y; this.params=t||{}},T$=function(y,t){g.H.call(this); this.V=new g.Te(this.b0e,0,this);g.c(this,this.V);this.Rd=5E3;this.retryCount=this.wh=0;if(typeof y==="function")t&&(y=(0,g.mi)(y,t));else if(y&&typeof y.handleEvent==="function")y=(0,g.mi)(y.handleEvent,y);else throw Error("Invalid listener argument");this.K=y},cCi=function(y,t,a,r,E,h,F,x,U,C,z,O,M,L,w,d){var k=this; a=a===void 0?!1:a;r=r===void 0?function(){return""}:r; E=E===void 0?!1:E;h=h===void 0?!1:h;F=F===void 0?!1:F;x=x===void 0?function(){return g.pZ({})}:x; U=U===void 0?!1:U;z=z===void 0?!1:z;O=O===void 0?!1:O;M=M===void 0?!1:M;L=L===void 0?!1:L;this.r0=y;this.o5=t;this.Z=new g.S4;this.J=d;this.K=(this.Y=!!w)?w(function(){k.ly()}):new T$(this.ly,this); this.V=null;this.hF=!1;this.Vv=null;this.d0="";this.DE=this.AF=0;this.D=[];this.XB=a;this.Ff=r;this.W=h;this.C1=x;this.yv=C;this.sR=F;this.L1=null;this.L=g.pZ();this.ZA=E;this.MK=U;this.zl=z;this.I7=O;this.nJ=M;this.FB=L;this.n1=new UCI;this.JF=new C4y;this.Az=new O5I;this.T7=new zW9;this.R5=new LhI;this.IR=new M09;this.vO=new wSc},Dv7=function(y,t,a,r,E){q_s(y); if(y.V){var h=g.yd("ID_TOKEN"),F=y.V.BG||{};h?F["x-youtube-identity-token"]=h:delete F["x-youtube-identity-token"];y.V.BG=F}Y_2(y);r?(r.getState()!=3&&QTU(r)==0||r.getState(),y.V.connect(t,a,y.o5,r.D,r.ZJ)):E?y.V.connect(t,a,y.o5,E.sessionId,E.arrayId):y.V.connect(t,a,y.o5);y.Y&&!y.K.isActive()&&y.K.start();y.J&&y.J.mYm()},IR9=function(y,t){return y.nJ?!0:y.I7?Object.values(gRE).includes(t):y.zl?!Object.values(i6U).includes(t):y.FB?Object.values(KRq).includes(t):!1},Z6e=function(y){var t,a; g.m(function(r){if(r.V==1)return g.sy(r,2),g.u(r,TNq(y),2);g.CI(r);t=y.D;y.D=[];a=t.length;GLI(y,t,a);G$(y);return g.zE(r,0)})},GLI=function(y,t,a){for(var r=0;r0?a=Object.assign({},a,t):delete a.Authorization;y.V.BG=a}},Y_2=function(y){y.yv&&!y.W&&tmF(y,y.yv())},Zv=function(y){this.scheme="https"; this.port=this.domain="";this.V="/api/lounge";this.K=!0;y=y||document.location.href;var t=Number(g.fE(y)[4]||null)||"";t&&(this.port=":"+t);this.domain=g.Wv(y)||"";y=g.rI();y.search("MSIE")>=0&&(y=y.match(/MSIE ([\d.]+)/)[1],g.ae(y,"10.0")<0&&(this.K=!1))},yy=function(y,t){var a=y.V; y.K&&(a=y.scheme+"://"+y.domain+y.port+y.V);return g.lJ(a+t,{})},aY3=function(y,t){g.MM.call(this); var a=this;this.handler=y();this.handler.subscribe("handlerOpened",this.UI,this);this.handler.subscribe("handlerClosed",this.onClosed,this);this.handler.subscribe("handlerError",function(r,E){a.onError(E)}); this.handler.subscribe("handlerMessage",this.onMessage,this);this.V=t},rmF=function(y,t,a){var r=this; a=a===void 0?function(){return""}:a; var E=E===void 0?new G4i:E;var h=h===void 0?new g.S4:h;this.pathPrefix=y;this.V=t;this.o5=a;this.L=h;this.Z=null;this.hF=this.W=0;this.channel=null;this.J=0;this.Y=new T$(function(){r.Y.isActive();var F;((F=r.channel)==null?void 0:SzF((new tii(F,F.V)).V.K))===0&&r.connect(r.Z,r.W)}); this.D={};this.K={};this.AF=!1;this.logger=null;this.Vv=[];this.L_=void 0;this.Ff=new UCI;this.DE=new C4y;this.L1=new zW9;this.d0=new LhI},Ez7=function(y){g.sb(y.channel,"m",function(){y.J=3; y.Y.reset();y.Z=null;y.W=0;for(var t=g.p(y.Vv),a=t.next();!a.done;a=t.next())a=a.value,y.channel&&y.channel.send(a);y.Vv=[];y.publish("webChannelOpened");y.Ff.QY("WEB_CHANNEL")}); g.sb(y.channel,"n",function(){y.J=0;y.Y.isActive()||y.publish("webChannelClosed");var t,a=(t=y.channel)==null?void 0:aRi(new tii(t,t.V));a&&(y.Vv=[].concat(g.i7(a)));y.DE.QY("WEB_CHANNEL")}); g.sb(y.channel,"p",function(t){var a=t.data;a[0]==="gracefulReconnect"?(y.Y.start(),y.channel&&y.channel.close()):y.publish("webChannelMessage",new BNE(a[0],a[1]));y.L_=t.statusCode;y.L1.QY("WEB_CHANNEL")}); g.sb(y.channel,"o",function(){y.L_===401||y.Y.start();y.publish("webChannelError");y.d0.QY("WEB_CHANNEL","")})},heq=function(y){var t=y.o5(); t?y.D["x-youtube-lounge-xsrf-token"]=t:delete y.D["x-youtube-lounge-xsrf-token"]},F_c=function(y){g.MM.call(this); this.V=y();this.V.subscribe("webChannelOpened",this.LX,this);this.V.subscribe("webChannelClosed",this.onClosed,this);this.V.subscribe("webChannelError",this.onError,this);this.V.subscribe("webChannelMessage",this.onMessage,this)},AmI=function(y,t,a,r,E){function h(){return new cCi(yy(y,"/bc"),t,!1,a,r)} a=a===void 0?function(){return""}:a; return g.WE("enable_mdx_web_channel_desktop")?new F_c(function(){return new rmF(yy(y,"/wc"),t,a)}):new aY3(h,E)},UtF=function(){var y=xtF; sB3();tW.push(y);$tF()},a3=function(y,t){sB3(); var a=Co7(y,String(t));tW.length==0?ze3(a):($tF(),g.wK(tW,function(r){r(a)}))},rV=function(y){a3("CP",y)},sB3=function(){tW||(tW=g.jc("yt.mdx.remote.debug.handlers_")||[],g.Wd("yt.mdx.remote.debug.handlers_",tW))},ze3=function(y){var t=(EZ+1)%50; EZ=t;hW[t]=y;FC||(FC=t==49)},$tF=function(){var y=tW; if(hW[0]){var t=FC?EZ:-1,a={};do a={AU:void 0},t=(t+1)%50,a.AU=hW[t],g.wK(y,function(r){return function(E){E(r.AU)}}(a)); while(t!=EZ);hW=Array(50);EZ=-1;FC=!1}},Co7=function(y,t){var a=(Date.now()-Ot9)/1E3; a.toFixed&&(a=a.toFixed(3));var r=[];r.push("[",a+"s","] ");r.push("[","yt.mdx.remote","] ");r.push(y+": "+t,"\n");return r.join("")},AW=function(y){g.FM.call(this); this.J=y;this.screens=[]},L_9=function(y,t){var a=y.get(t.uuid)||y.get(t.id); if(a)return y=a.name,a.id=t.id||a.id,a.name=t.name,a.token=t.token,a.uuid=t.uuid||a.uuid,a.name!=y;y.screens.push(t);return!0},Mmq=function(y,t){var a=y.screens.length!=t.length; y.screens=g.op(y.screens,function(h){return!!lwd(t,h)}); for(var r=t.length,E=0;E0&&y.D0&&Nj(y,a)},function(t){y.L=function(){}; y.wW(t)})},Dtq=function(y){var t={}; t.pairingCode=y.DE;t.theme=y.yv;qTi()&&(t.env_useStageMdx=1);return g.e8(t)},gzF=function(y){return new Promise(function(t){y.DE=pSi(); if(y.Ff){var a=new chrome.cast.DialLaunchResponse(!0,Dtq(y));t(a);YO3(y)}else y.AF=function(){g.Xk(y.hF);y.AF=function(){}; y.hF=NaN;var r=new chrome.cast.DialLaunchResponse(!0,Dtq(y));t(r);YO3(y)},y.hF=g.Nt(function(){y.AF()},100)})},K_s=function(y,t,a){y.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(t)); var r=new hz(t);return(new Promise(function(E){it3(y,r,function(h){h?(y.Vv=!0,zb(y.D,r),LG(y,r),Nj(y,a)):g.rs(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(t)+" is not online."));E(h)},5)})).then(function(E){return E?new chrome.cast.DialLaunchResponse(!1):gzF(y)})},IY7=function(y,t){var a=y.Z.receiver.label,r=y.K.friendlyName; return(new Promise(function(E){QB2(y.D,a,t,r,function(h){h&&h.token&&LG(y,h);E(h)},function(h){Mj(y,"Failed to get DIAL screen: "+h); E(null)})})).then(function(E){return E&&E.token?new chrome.cast.DialLaunchResponse(!1):gzF(y)})},it3=function(y,t,a,r){g.Xk(y.J); y.J=0;pEq(y.D,t,function(E){E||r<0?a(E):y.J=g.Nt(function(){it3(y,t,a,r-1)},300)})},Nj=function(y,t){y.info("getDialAppInfoWithTimeout_ "+t); PT(y)&&(g.Xk(y.W),y.W=0,t==0?TsI(y):y.W=g.Nt(function(){TsI(y)},t))},TsI=function(y){PT(y)&&y.Y.getDialAppInfo(function(t){y.info("getDialAppInfo dialLaunchData: "+JSON.stringify(t)); t=t.extraData||{};var a=null;if(t.loungeToken){var r;((r=y.V)==null?void 0:r.token)==t.loungeToken&&(a="staleLoungeToken")}else a="missingLoungeToken";a?(y.o5=a,Nj(y,3E4)):(y.Vv=!1,y.o5="unknown",VmI(y,t.loungeToken),Nj(y,t.loungeTokenRefreshIntervalMs))},function(t){y.info("getDialAppInfo error: "+t); y.o5="noLoungeTokenResponse";Nj(y,3E4)})},Gcq=function(y){g.Xk(y.J); y.J=0;g.Xk(y.W);y.W=0;y.L();y.L=function(){}; g.Xk(y.hF)},dV=function(y,t){OZ.call(this,y,t,"ManualSession"); this.Y=g.Nt((0,g.mi)(this.t5,this,null),150)},XC=function(y,t){g.FM.call(this); this.config_=t;this.K=y;this.Z=t.appId||"233637DE";this.D=t.theme||"cl";this.hF=t.disableCastApi||!1;this.J=t.forceMirroring||!1;this.V=null;this.W=!1;this.Y=[];this.L=(0,g.mi)(this.O0F,this)},Ztd=function(y,t){return t?g.D9(y.Y,function(a){return Fh(t,a.label)},y):null},kP=function(y){a3("Controller",y)},xtF=function(y){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(y)},fG=function(y){return y.W||!!y.Y.length||!!y.V},WT=function(y,t,a){t!=y.V&&(g.wQ(y.V),(y.V=t)?(a?y.publish("yt-remote-cast2-receiver-resumed", t.K):y.publish("yt-remote-cast2-receiver-selected",t.K),t.subscribe("sessionScreen",(0,g.mi)(y.g$,y,t)),t.subscribe("sessionFailed",function(){return yUE(y,t)}),t.V?y.publish("yt-remote-cast2-session-change",t.V):a&&y.V.t5(null)):y.publish("yt-remote-cast2-session-change",null))},yUE=function(y,t){y.V==t&&y.publish("yt-remote-cast2-session-failed")},tbd=function(y){var t=y.K.qF(),a=y.V&&y.V.K; y=g.v$(t,function(r){a&&Fh(r,a.label)&&(a=null);var E=r.uuid?r.uuid:r.id,h=Ztd(this,r);h?(h.label=E,h.friendlyName=r.name):(h=new chrome.cast.Receiver(E,r.name),h.receiverType=chrome.cast.ReceiverType.CUSTOM);return h},y); a&&(a.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(a=new chrome.cast.Receiver(a.label,a.friendlyName),a.receiverType=chrome.cast.ReceiverType.CUSTOM),y.push(a));return y},s_s=function(y,t,a,r){r.disableCastApi?ju("Cannot initialize because disabled by Mdx config."):a4e()?rU3(t,r)&&(EHU(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?h9s(y,a):(window.__onGCastApiAvailable=function(E,h){E?h9s(y,a):(Su("Failed to load cast API: "+h),F79(!1),EHU(!1),g.o_("yt-remote-cast-available"),g.o_("yt-remote-cast-receiver"), AUs(),a(!1))},r.loadCastApiSetupScript?g.F3(xe2):window.navigator.userAgent.indexOf("Android")>=0&&window.navigator.userAgent.indexOf("Chrome/")>=0&&window.navigator.presentation?DCU()>=60&&t4F():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?Iw3():DCU()>=89?rls():(yl7(),Lh(a$9.map(Tl7))))):ju("Cannot initialize because not running Chrome")},AUs=function(){ju("dispose"); var y=Qy();y&&y.dispose();g.Wd("yt.mdx.remote.cloudview.instance_",null);$ec(!1);g.ER(Uee);Uee.length=0},vT=function(){return!!g.JU("yt-remote-cast-installed")},Cm9=function(){var y=g.JU("yt-remote-cast-receiver"); return y?y.friendlyName:null},z9U=function(){ju("clearCurrentReceiver"); g.o_("yt-remote-cast-receiver")},Ooq=function(){return vT()?Qy()?Qy().getCastSession():(Su("getCastSelector: Cast is not initialized."),null):(Su("getCastSelector: Cast API is not installed!"),null)},L77=function(){vT()?Qy()?pG()?(ju("Requesting cast selector."),Qy().requestSession()):(ju("Wait for cast API to be ready to request the session."),Uee.push(g.ru("yt-remote-cast2-api-ready",L77))):Su("requestCastSelector: Cast is not initialized."):Su("requestCastSelector: Cast API is not installed!")}, eu=function(y,t){pG()?Qy().setConnectedScreenStatus(y,t):Su("setConnectedScreenStatus called before ready.")},a4e=function(){var y=g.rI().search(/ (CrMo|Chrome|CriOS)\//)>=0; return g.x8||y},Mbc=function(y,t){Qy().init(y,t)},rU3=function(y,t){var a=!1; Qy()||(y=new XC(y,t),y.subscribe("yt-remote-cast2-availability-change",function(r){g.m7("yt-remote-cast-available",r);z$("yt-remote-cast2-availability-change",r)}),y.subscribe("yt-remote-cast2-receiver-selected",function(r){ju("onReceiverSelected: "+r.friendlyName); g.m7("yt-remote-cast-receiver",r);z$("yt-remote-cast2-receiver-selected",r)}),y.subscribe("yt-remote-cast2-receiver-resumed",function(r){ju("onReceiverResumed: "+r.friendlyName); g.m7("yt-remote-cast-receiver",r);z$("yt-remote-cast2-receiver-resumed",r)}),y.subscribe("yt-remote-cast2-session-change",function(r){ju("onSessionChange: "+Az(r)); r||g.o_("yt-remote-cast-receiver");z$("yt-remote-cast2-session-change",r)}),g.Wd("yt.mdx.remote.cloudview.instance_",y),a=!0); ju("cloudview.createSingleton_: "+a);return a},Qy=function(){return g.jc("yt.mdx.remote.cloudview.instance_")},h9s=function(y,t){F79(!0); EHU(!1);Mbc(y,function(a){a?($ec(!0),g.hV("yt-remote-cast2-api-ready")):(Su("Failed to initialize cast API."),F79(!1),g.o_("yt-remote-cast-available"),g.o_("yt-remote-cast-receiver"),AUs());t(a)})},ju=function(y){a3("cloudview",y)},Su=function(y){a3("cloudview",y)},F79=function(y){ju("setCastInstalled_ "+y); g.m7("yt-remote-cast-installed",y)},pG=function(){return!!g.jc("yt.mdx.remote.cloudview.apiReady_")},$ec=function(y){ju("setApiReady_ "+y); g.Wd("yt.mdx.remote.cloudview.apiReady_",y)},EHU=function(y){g.Wd("yt.mdx.remote.cloudview.initializing_",y)},lX=function(y){this.index=-1; this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.L=this.J=0;this.trackData=null;this.hasNext=this.hasPrevious=!1;this.loadedTime=this.Y=this.W=this.K=0;this.V=NaN;this.D=!1;this.reset(y)},wG9=function(y){y.audioTrackId=null; y.trackData=null;y.playerState=-1;y.hasPrevious=!1;y.hasNext=!1;y.J=0;y.L=g.oq();y.K=0;y.W=0;y.Y=0;y.loadedTime=0;y.V=NaN;y.D=!1},uX=function(y){return y.isPlaying()?(g.oq()-y.L)/1E3:0},Vy=function(y,t){y.J=t; y.L=g.oq()},nG=function(y){switch(y.playerState){case 1:case 1081:return(g.oq()-y.L)/1E3+y.J; case -1E3:return 0}return y.J},R9I=function(y){return y.D?y.W+uX(y):y.W},mG=function(y,t,a){var r=y.videoId; y.videoId=t;y.index=a;t!=r&&wG9(y)},Pmc=function(y){var t={}; t.index=y.index;t.listId=y.listId;t.videoId=y.videoId;t.playerState=y.playerState;t.volume=y.volume;t.muted=y.muted;t.audioTrackId=y.audioTrackId;t.trackData=g.nJ(y.trackData);t.hasPrevious=y.hasPrevious;t.hasNext=y.hasNext;t.playerTime=y.J;t.playerTimeAt=y.L;t.seekableStart=y.K;t.seekableEnd=y.W;t.duration=y.Y;t.loadedTime=y.loadedTime;t.liveIngestionTime=y.V;return t},o3=function(y,t){g.FM.call(this); var a=this;this.Y=0;this.D=y;this.J=[];this.L=new oRI;this.K=this.V=null;this.hF=(0,g.mi)(this.z$X,this);this.W=(0,g.mi)(this.Wq,this);this.Z=(0,g.mi)(this.KJe,this);this.AF=(0,g.mi)(this.YRm,this);var r=0;y?(r=y.getProxyState(),r!=3&&(y.subscribe("proxyStateChange",this.Jb,this),NBU(this))):r=3;r!=0&&(t?this.Jb(r):g.Nt(function(){a.Jb(r)},0)); (y=Ooq())&&JW(this,y);this.subscribe("yt-remote-cast2-session-change",this.AF)},HT=function(y){return new lX(y.D.getPlayerContextData())},NBU=function(y){g.wK("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(t){this.J.push(this.D.subscribe(t,g.J7(this.EJu,t),this))},y)},de3=function(y){g.wK(y.J,function(t){this.D.unsubscribeByKey(t)},y); y.J.length=0},bX=function(y){return y.getState()==1},BT=function(y,t){var a=y.L; a.V.length+a.K.length<50&&y.L.enqueue(t)},XGc=function(y,t,a){var r=HT(y); Vy(r,a);r.playerState!=-1E3&&(r.playerState=t);cT(y,r)},qj=function(y,t,a){y.D.sendMessage(t,a)},cT=function(y,t){de3(y); y.D.setPlayerContextData(Pmc(t));NBU(y)},JW=function(y,t){y.K&&(y.K.removeUpdateListener(y.hF),y.K.removeMediaListener(y.W),y.Wq(null)); y.K=t;y.K&&(rV("Setting cast session: "+y.K.sessionId),y.K.addUpdateListener(y.hF),y.K.addMediaListener(y.W),y.K.media.length&&y.Wq(y.K.media[0]))},kD9=function(y){var t=y.V.media,a=y.V.customData; if(t&&a){var r=HT(y);t.contentId!=r.videoId&&rV("Cast changing video to: "+t.contentId);r.videoId=t.contentId;r.playerState=a.playerState;Vy(r,y.V.getEstimatedTime());cT(y,r)}else rV("No cast media video. Ignoring state update.")},YP=function(y,t,a){return(0,g.mi)(function(r){this.eJ("Failed to "+t+" with cast v2 channel. Error code: "+r.code); r.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.eJ("Retrying "+t+" using MDx browser channel."),qj(this,t,a))},y)},iX=function(y,t,a,r){r=r===void 0?!1:r; g.FM.call(this);var E=this;this.J=NaN;this.DE=!1;this.hF=this.Z=this.Vv=this.o5=NaN;this.AF=[];this.L=this.W=this.D=this.V=this.K=null;this.Ff=y;this.L1=r;this.AF.push(g.Sb(window,"beforeunload",function(){E.y9(2)})); this.Y=[];this.V=new lX;this.yv=t.id;this.d0=t.idType;this.K=AmI(this.Ff,a,this.BY,this.d0=="shortLived",this.yv);this.K.listen("channelOpened",function(){f4s(E)}); this.K.listen("channelClosed",function(){Ds("Channel closed");isNaN(E.J)?U7(!0):U7();E.dispose()}); this.K.listen("channelError",function(h){U7();isNaN(E.Ln())?(h==1&&E.d0=="shortLived"&&E.publish("browserChannelAuthError",h),Ds("Channel error: "+h+" without reconnection"),E.dispose()):(E.DE=!0,Ds("Channel error: "+h+" with reconnection in "+E.Ln()+" ms"),gV(E,2))}); this.K.listen("channelMessage",function(h){W7c(E,h)}); this.K.Lw(t.token);this.subscribe("remoteQueueChange",function(){var h=E.V.videoId;g.HG()&&g.m7("yt-remote-session-video-id",h)})},j_c=function(y){return g.D9(y.Y,function(t){return t.type=="LOUNGE_SCREEN"})},Ds=function(y){a3("conn",y)},gV=function(y,t){y.publish("proxyStateChange",t)},SXy=function(y){y.J=g.Nt(function(){Ds("Connecting timeout"); y.y9(1)},2E4)},Q_9=function(y){g.Xk(y.J); y.J=NaN},vHE=function(y){g.Xk(y.o5); y.o5=NaN},e9I=function(y){pG9(y); y.Vv=g.Nt(function(){KG(y,"getNowPlaying")},2E4)},pG9=function(y){g.Xk(y.Vv); y.Vv=NaN},f4s=function(y){Ds("Channel opened"); y.DE&&(y.DE=!1,vHE(y),y.o5=g.Nt(function(){Ds("Timing out waiting for a screen.");y.y9(1)},15E3))},uLs=function(y,t){var a=null; if(t){var r=j_c(y);r&&(a={clientName:r.clientName,deviceMake:r.brand,deviceModel:r.model,osVersion:r.osVersion})}g.Wd("yt.mdx.remote.remoteClient_",a);t&&(Q_9(y),vHE(y));a=y.K.E8()&&isNaN(y.J);t==a?t&&(gV(y,1),KG(y,"getSubtitlesTrack")):t?(y.yl()&&y.V.reset(),gV(y,1),KG(y,"getNowPlaying"),l4e(y)):y.y9(1)},VbU=function(y,t){var a=t.params.videoId; delete t.params.videoId;a==y.V.videoId&&(g.pJ(t.params)?y.V.trackData=null:y.V.trackData=t.params,y.publish("remotePlayerChange"))},nH3=function(y,t,a){var r=t.params.videoId||t.params.video_id,E=parseInt(t.params.currentIndex,10); y.V.listId=t.params.listId||y.V.listId;mG(y.V,r,E);y.publish("remoteQueueChange",a)},JUF=function(y,t){t.params=t.params||{}; nH3(y,t,"NOW_PLAYING_MAY_CHANGE");mec(y,t);y.publish("autoplayDismissed")},mec=function(y,t){var a=parseInt(t.params.currentTime||t.params.current_time,10); Vy(y.V,isNaN(a)?0:a);a=parseInt(t.params.state,10);a=isNaN(a)?-1:a;a==-1&&y.V.playerState==-1E3&&(a=-1E3);y.V.playerState=a;a=Number(t.params.loadedTime);y.V.loadedTime=isNaN(a)?0:a;y.V.Fd(Number(t.params.duration));a=y.V;var r=Number(t.params.liveIngestionTime);a.V=r;a.D=isNaN(r)?!1:!0;a=y.V;r=Number(t.params.seekableStartTime);t=Number(t.params.seekableEndTime);a.K=isNaN(r)?0:r;a.W=isNaN(t)?0:t;y.V.playerState==1?e9I(y):pG9(y);y.publish("remotePlayerChange")},oHd=function(y,t){if(y.V.playerState!= -1E3){var a=1085; switch(parseInt(t.params.adState,10)){case 1:a=1081;break;case 2:a=1084;break;case 0:a=1083}y.V.playerState=a;t=parseInt(t.params.currentTime,10);Vy(y.V,isNaN(t)?0:t);y.publish("remotePlayerChange")}},Hoi=function(y,t){var a=t.params.muted=="true"; y.V.volume=parseInt(t.params.volume,10);y.V.muted=a;y.publish("remotePlayerChange")},boU=function(y,t){y.W=t.params.videoId; y.publish("nowAutoplaying",parseInt(t.params.timeout,10))},BBI=function(y,t){y.W=t.params.videoId||null; y.publish("autoplayUpNext",y.W)},cUE=function(y,t){y.L=t.params.autoplayMode; y.publish("autoplayModeChange",y.L);y.L=="DISABLED"&&y.publish("autoplayDismissed")},qXi=function(y,t){var a=t.params.hasNext=="true"; y.V.hasPrevious=t.params.hasPrevious=="true";y.V.hasNext=a;y.publish("previousNextChange")},W7c=function(y,t){t=t.message; t.params?Ds("Received: action="+t.action+", params="+g.bY(t.params)):Ds("Received: action="+t.action+" {}");switch(t.action){case "loungeStatus":t=Z6(t.params.devices);y.Y=g.v$(t,function(r){return new E7(r)}); t=!!g.D9(y.Y,function(r){return r.type=="LOUNGE_SCREEN"}); uLs(y,t);t=y.qv("mlm");y.publish("multiStateLoopEnabled",t);break;case "loungeScreenDisconnected":g.aM(y.Y,function(r){return r.type=="LOUNGE_SCREEN"}); uLs(y,!1);break;case "remoteConnected":var a=new E7(Z6(t.params.device));g.D9(y.Y,function(r){return r.equals(a)})||A3e(y.Y,a); break;case "remoteDisconnected":a=new E7(Z6(t.params.device));g.aM(y.Y,function(r){return r.equals(a)}); break;case "gracefulDisconnect":break;case "playlistModified":nH3(y,t,"QUEUE_MODIFIED");break;case "nowPlaying":JUF(y,t);break;case "onStateChange":mec(y,t);break;case "onAdStateChange":oHd(y,t);break;case "onVolumeChanged":Hoi(y,t);break;case "onSubtitlesTrackChanged":VbU(y,t);break;case "nowAutoplaying":boU(y,t);break;case "autoplayDismissed":y.publish("autoplayDismissed");break;case "autoplayUpNext":BBI(y,t);break;case "onAutoplayModeChanged":cUE(y,t);break;case "onHasPreviousNextChanged":qXi(y, t);break;case "requestAssistedSignIn":y.publish("assistedSignInRequested",t.params.authCode);break;case "onLoopModeChanged":y.publish("loopModeChange",t.params.loopMode);break;default:Ds("Unrecognized action: "+t.action)}},l4e=function(y){g.Xk(y.hF); y.hF=g.Nt(function(){y.y9(1)},864E5)},KG=function(y,t,a){a?Ds("Sending: action="+t+", params="+g.bY(a)):Ds("Sending: action="+t); y.K.sendMessage(t,a)},YXF=function(y){AW.call(this,"ScreenServiceProxy"); this.oS=y;this.V=[];this.V.push(this.oS.$_s("screenChange",(0,g.mi)(this.lV,this)));this.V.push(this.oS.$_s("onlineScreenChange",(0,g.mi)(this.Vwu,this)))},I4i=function(y,t){c3U(); if(!Ch||!Ch.get("yt-remote-disable-remote-module-for-dev")){t=g.yd("MDX_CONFIG")||t;usi();J37();I3||(I3=new Zv(t?t.loungeApiHost:void 0),qTi()&&(I3.V="/api/loungedev"));Tb||(Tb=g.jc("yt.mdx.remote.deferredProxies_")||[],g.Wd("yt.mdx.remote.deferredProxies_",Tb));DeE();var a=Gb();if(!a){var r=new CG(I3,t?t.disableAutomaticScreenCache||!1:!1);g.Wd("yt.mdx.remote.screenService_",r);a=Gb();var E={};t&&(E={appId:t.appId,disableDial:t.disableDial,theme:t.theme,loadCastApiSetupScript:t.loadCastApiSetupScript, disableCastApi:t.disableCastApi,enableDialLoungeToken:t.enableDialLoungeToken,enableCastLoungeToken:t.enableCastLoungeToken,forceMirroring:t.forceMirroring});g.Wd("yt.mdx.remote.enableConnectWithInitialState_",t?t.enableConnectWithInitialState||!1:!1);s_s(y,r,function(h){h?Zs()&&eu(Zs(),"YouTube TV"):r.subscribe("onlineScreenChange",function(){z$("yt-remote-receiver-availability-change")})},E)}t&&!g.jc("yt.mdx.remote.initialized_")&&(g.Wd("yt.mdx.remote.initialized_",!0),yA("Initializing: "+g.bY(t)), to.push(g.ru("yt-remote-cast2-api-ready",function(){z$("yt-remote-api-ready")})),to.push(g.ru("yt-remote-cast2-availability-change",function(){z$("yt-remote-receiver-availability-change")})),to.push(g.ru("yt-remote-cast2-receiver-selected",function(){ab(null); z$("yt-remote-auto-connect","cast-selector-receiver")})),to.push(g.ru("yt-remote-cast2-receiver-resumed",function(){z$("yt-remote-receiver-resumed","cast-selector-receiver")})),to.push(g.ru("yt-remote-cast2-session-change",gHI)),to.push(g.ru("yt-remote-connection-change",function(h){h?eu(Zs(),"YouTube TV"):rq()||(eu(null,null),z9U())})),to.push(g.ru("yt-remote-cast2-session-failed",function(){z$("yt-remote-connection-failed")})),y=ioF(),t.isAuto&&(y.id+="#dial"),E=t.capabilities||[],E.length>0&&(y.capabilities= E),y.name=t.device,y.app=t.app,(t=t.theme)&&(y.theme=t),yA(" -- with channel params: "+g.bY(y)),y?(g.m7("yt-remote-session-app",y.app),g.m7("yt-remote-session-name",y.name)):(g.o_("yt-remote-session-app"),g.o_("yt-remote-session-name")),g.Wd("yt.mdx.remote.channelParams_",y),a.start(),Zs()||K79())}},TB3=function(){var y=Gb().oS.$_gos(); var t=Ea();t&&ho()&&(lwd(y,t)||y.push(t));return eWy(y)},ZoU=function(){var y=GDE(); !y&&vT()&&Cm9()&&(y={key:"cast-selector-receiver",name:Cm9()});return y},GDE=function(){var y=TB3(),t=Ea(); t||(t=rq());return g.D9(y,function(a){return t&&Fh(t,a.key)?!0:!1})},Ea=function(){var y=Zs(); if(!y)return null;var t=Gb().HG();return xY(t,y)},gHI=function(y){yA("remote.onCastSessionChange_: "+Az(y)); if(y){var t=Ea();if(t&&t.id==y.id){if(eu(t.id,"YouTube TV"),y.idType=="shortLived"&&(y=y.token))F8&&(F8.token=y),(t=ho())&&t.Lw(y)}else t&&Ao(),xT(y,1)}else ho()&&Ao()},Ao=function(){pG()?Qy().stopSession():Su("stopSession called before API ready."); var y=ho();y&&(y.disconnect(1),yk2(null))},tZF=function(){var y=ho(); return!!y&&y.getProxyState()!=3},yA=function(y){a3("remote",y)},Gb=function(){if(!aAy){var y=g.jc("yt.mdx.remote.screenService_"); aAy=y?new YXF(y):null}return aAy},Zs=function(){return g.jc("yt.mdx.remote.currentScreenId_")},rke=function(y){g.Wd("yt.mdx.remote.currentScreenId_",y)},EGq=function(){return g.jc("yt.mdx.remote.connectData_")},ab=function(y){g.Wd("yt.mdx.remote.connectData_",y)},ho=function(){return g.jc("yt.mdx.remote.connection_")},yk2=function(y){var t=ho(); ab(null);y||rke("");g.Wd("yt.mdx.remote.connection_",y);Tb&&(g.wK(Tb,function(a){a(y)}),Tb.length=0); t&&!y?z$("yt-remote-connection-change",!1):!t&&y&&z$("yt-remote-connection-change",!0)},rq=function(){var y=g.HG(); if(!y)return null;var t=Gb();if(!t)return null;t=t.HG();return xY(t,y)},xT=function(y,t){Zs(); Ea()&&Ea();if(sa)F8=y;else{rke(y.id);var a=g.jc("yt.mdx.remote.enableConnectWithInitialState_")||!1;y=new iX(I3,y,ioF(),a);y.connect(t,EGq());y.subscribe("beforeDisconnect",function(r){z$("yt-remote-before-disconnect",r)}); y.subscribe("beforeDispose",function(){ho()&&(ho(),yk2(null))}); y.subscribe("browserChannelAuthError",function(){var r=Ea();r&&r.idType=="shortLived"&&(pG()?Qy().handleBrowserChannelAuthError():Su("refreshLoungeToken called before API ready."))}); yk2(y)}},K79=function(){var y=rq(); y?(yA("Resume connection to: "+Az(y)),xT(y,0)):(U7(),z9U(),yA("Skipping connecting because no session screen found."))},DeE=function(){var y=ioF(); if(g.pJ(y)){y=$Y();var t=g.JU("yt-remote-session-name")||"",a=g.JU("yt-remote-session-app")||"";y={device:"REMOTE_CONTROL",id:y,name:t,app:a,mdxVersion:3};y.authuser=String(g.yd("SESSION_INDEX","0"));(t=g.yd("DELEGATED_SESSION_ID"))&&(y.pageId=String(t));g.Wd("yt.mdx.remote.channelParams_",y)}},ioF=function(){return g.jc("yt.mdx.remote.channelParams_")||{}},AkF=function(y,t,a){g.H.call(this); var r=this;this.V=y;this.C=t;this.ES=a;this.events=new g.Ci(this);this.L=!1;this.J=new g.PY(64);this.K=new g.Te(this.OJ,500,this);this.Y=new g.Te(this.Aa,1E3,this);this.Z=new MF(this.Lpv,0,this);this.D={};this.hF=new g.Te(this.cN,1E3,this);this.W=new g.tl(this.seekTo,1E3,this);this.AF=this.events.N(this.C,"onVolumeChange",function(E){hK2(r,E)}); g.c(this,this.events);this.events.N(t,"onCaptionsTrackListChanged",this.WJX);this.events.N(t,"captionschanged",this.okG);this.events.N(t,"captionssettingschanged",this.xN);this.events.N(t,"videoplayerreset",this.XY);this.events.N(t,"mdxautoplaycancel",function(){r.ES.CZ()}); t.B("enable_mdx_video_play_directly")&&this.events.N(t,"videodatachange",function(){FbE(r.V)||$T(r)||Ua(r,0)}); y=this.ES;y.Qv();y.subscribe("proxyStateChange",this.zt,this);y.subscribe("remotePlayerChange",this.Rn,this);y.subscribe("remoteQueueChange",this.XY,this);y.subscribe("previousNextChange",this.Ij,this);y.subscribe("nowAutoplaying",this.Oj,this);y.subscribe("autoplayDismissed",this.f7,this);g.c(this,this.K);g.c(this,this.Y);g.c(this,this.Z);g.c(this,this.hF);g.c(this,this.W);this.xN();this.XY();this.Rn()},hK2=function(y,t){if($T(y)){y.ES.unsubscribe("remotePlayerChange",y.Rn,y); var a=Math.round(t.volume);t=!!t.muted;var r=HT(y.ES);if(a!==r.volume||t!==r.muted)y.ES.setVolume(a,t),y.hF.start();y.ES.subscribe("remotePlayerChange",y.Rn,y)}},xxe=function(y){y.QD(0); y.K.stop();y.HO(new g.PY(64))},sUi=function(y,t){if($T(y)&&!y.L){var a=null; t&&(a={style:y.C.getSubtitlesUserSettings()},Object.assign(a,t));y.ES.t$(y.C.getVideoData(1).videoId,a);y.D=HT(y.ES).trackData}},Ua=function(y,t){var a=y.C.getPlaylist(); if(a==null?0:a.listId){var r=a.index;var E=a.listId.toString()}a=y.C.getVideoData(1);y.ES.playVideo(a.videoId,t,r,E,a.playerParams,a.AF,Fh9(a));y.HO(new g.PY(1))},$xU=function(y,t){if(t){var a=y.C.getOption("captions","tracklist",{d5:1}); a&&a.length?(y.C.setOption("captions","track",t),y.L=!1):(y.C.loadModule("captions"),y.L=!0)}else y.C.setOption("captions","track",{})},$T=function(y){return HT(y.ES).videoId===y.C.getVideoData(1).videoId},Uxe=function(y,t){g.mV.call(this,y); this.V=t},CT=function(){g.q.call(this,{U:"div", X:"ytp-mdx-popup-dialog",T:{role:"dialog"},S:[{U:"div",X:"ytp-mdx-popup-dialog-inner-content",S:[{U:"div",X:"ytp-mdx-popup-title",er:"Saliste de tu cuenta"},{U:"div",X:"ytp-mdx-popup-description",er:"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."},{U:"div",X:"ytp-mdx-privacy-popup-buttons",S:[{U:"button",mX:["ytp-button", "ytp-mdx-privacy-popup-cancel"],er:"Cancelar"},{U:"button",mX:["ytp-button","ytp-mdx-privacy-popup-confirm"],er:"Confirmar"}]}]}]});this.fade=new g.r0(this,250);this.cancelButton=this.K1("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.K1("ytp-mdx-privacy-popup-confirm");g.c(this,this.fade);this.N(this.cancelButton,"click",this.V);this.N(this.confirmButton,"click",this.K)},zP=function(y){g.q.call(this,{U:"div", X:"ytp-remote",S:[{U:"div",X:"ytp-remote-display-status",S:[{U:"div",X:"ytp-remote-display-status-icon",S:[g.Bs7()]},{U:"div",X:"ytp-remote-display-status-text",er:"{{statustext}}"}]}]});this.api=y;this.fade=new g.r0(this,250);g.c(this,this.fade);this.N(y,"presentingplayerstatechange",this.onStateChange);this.UR(y.getPlayerStateObject())},Oa=function(y,t){g.fB.call(this,"Reproducir en",1,y,t); this.C=y;this.Ek={};this.N(y,"onMdxReceiversChange",this.K);this.N(y,"presentingplayerstatechange",this.K);this.K()},Cl9=function(y){g.Cc.call(this,y); this.jd={key:pSi(),name:"Esta computadora"};this.wK=null;this.subscriptions=[];this.m_=this.ES=null;this.Ek=[this.jd];this.Lz=this.jd;this.kJ=new g.PY(64);this.uP=0;this.jf=-1;this.YF=!1;this.h9=this.Pi=this.Dg=null;if(!g.ic(this.player.G())&&!g.Jf(this.player.G())){y=this.player;var t=g.ff(y);t&&(t=t.QR())&&(t=new Oa(y,t),g.c(this,t));t=new zP(y);g.c(this,t);g.q$(y,t.element,4);this.Dg=new CT;g.c(this,this.Dg);g.q$(y,this.Dg.element,4);this.YF=!!rq()}},LT=function(y){y.Pi&&(y.player.removeEventListener("presentingplayerstatechange", y.Pi),y.Pi=null)},zKE=function(y,t,a){y.kJ=a; y.player.publish("presentingplayerstatechange",new g.CD(a,t))},M6=function(y,t){if(t.key!==y.Lz.key)if(t.key===y.jd.key)Ao(); else if(FbE(y)&&OxE(y),y.Lz=t,!g.Jf(y.player.G())){var a=y.player.getPlaylistId();var r=y.player.getVideoData(1);var E=r.videoId;if(!a&&!E||(y.player.getAppState()===2||y.player.getAppState()===1)&&y.player.G().B("should_clear_video_data_on_player_cued_unstarted"))r=null;else{var h=y.player.getPlaylist();if(h){var F=[];for(var x=0;x2*this.size&&rW(this),!0):!1}; g.R.get=function(y,t){return tz(this.K,y)?this.K[y]:t}; g.R.set=function(y,t){tz(this.K,y)||(this.size+=1,this.V.push(y),this.Bd++);this.K[y]=t}; g.R.forEach=function(y,t){for(var a=this.lU(),r=0;r=r.V.length)return g.Fl;var h=r.V[t++];return g.VM(y?h:r.K[h])}; return E}; var fwe={TWG:"atp",T_5:"ska",zsE:"que",HbX:"mus",WKm:"sus",tPr:"dsp",qN4:"seq",G1X:"mic",NdX:"dpa",hzv:"mlm",Xev:"dsdtr",zzF:"ntb",tFe:"vsp",VPr:"scn",YN4:"rpe",ln1:"dcn",u51:"dcp",qie:"pas",per:"drq",gSm:"opf",HDf:"els",A_0:"isg",B_5:"svq",AL5:"mvp",G0v:"ads",Oc7:"stcp",wKv:"sads",bLX:"dloc",RnF:"dcw",Snv:"asw",Z$F:"apw",Ej4:"wrc",WP5:"pcw",DH1:"ipv",xN1:"ndt",QsX:"ctops"},Whd={kyr:"u",Phv:"cl",UHu:"k",ZDu:"i",kZv:"cr",Vs5:"m",D11:"g",Hf:"up"},gRE={yk:"adPlaying",pu:"onAdStateChange"},i6U={Yiv:"nowPlaying", vS1:"onStateChange",yk:"adPlaying",pu:"onAdStateChange",u3:"nowPlayingShorts",Xv:"onShortsStateChange"},KRq={u3:"nowPlayingShorts",Xv:"onShortsStateChange"};E7.prototype.equals=function(y){return y?this.id==y.id:!1}; var mC9="",Ch=null;g.N(YTc,g.Hm);var O7,Z5q=gnd("loadCastFramework")||gnd("loadCastApplicationFramework"),a$9=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.Bd(MF,g.H);g.R=MF.prototype;g.R.oW=function(y){this.D=arguments;this.V=!1;this.fM?this.Y=g.oq()+this.Rd:this.fM=g.mJ(this.L,this.Rd)}; g.R.stop=function(){this.fM&&(g.ks.clearTimeout(this.fM),this.fM=null);this.Y=null;this.V=!1;this.D=[]}; g.R.pause=function(){++this.K}; g.R.resume=function(){this.K&&(--this.K,!this.K&&this.V&&(this.V=!1,this.J.apply(null,this.D)))}; g.R.I5=function(){this.stop();MF.W1.I5.call(this)}; g.R.sI=function(){this.fM&&(g.ks.clearTimeout(this.fM),this.fM=null);this.Y?(this.fM=g.mJ(this.L,this.Y-g.oq()),this.Y=null):this.K?this.V=!0:(this.V=!1,this.J.apply(null,this.D))};var RK=null;wW.prototype.set=function(y){this.V=y}; wW.prototype.reset=function(){this.set(g.oq())}; wW.prototype.get=function(){return this.V};g.Bd(hI3,EMF);PB.prototype.stringify=function(y){return g.ks.JSON.stringify(y,void 0)}; PB.prototype.parse=function(y){return g.ks.JSON.parse(y,void 0)};g.Bd(FTI,g.tx);g.Bd(Ald,g.tx);var xRi=null;g.Bd($R7,g.tx);g.Bd(URd,g.tx);g.Bd(Cwc,g.tx);kY.prototype.debug=function(){}; kY.prototype.info=function(){}; kY.prototype.warning=function(){};var NFc={},Pw3={};g.R=fh.prototype;g.R.setTimeout=function(y){this.T7=y}; g.R.zC=function(y){y=y.target;var t=this.r0;t&&g.gk(y)==3?t.yw():this.V6(y)}; g.R.V6=function(y){try{if(y==this.V)a:{var t=g.gk(this.V),a=this.V.K,r=this.V.getStatus();if(!(t<3)&&(t!=3||this.V&&(this.K.K||g.KZ(this.V)||g.Ir(this.V)))){this.L1||t!=4||a==7||(a==8||r<=0?NF(3):NF(2));k4s(this);var E=this.V.getStatus();this.I7=E;var h=RIF(this);if(this.J=E==200){if(this.zl&&!this.C1){b:{if(this.V){var F=g.TZ(this.V,"X-HTTP-Initial-Response");if(F&&!g.TJ(F)){var x=F;break b}}x=null}if(y=x)this.C1=!0,l$c(this,y);else{this.J=!1;this.L=3;dW(12);jz(this);Sz(this);break a}}if(this.d0){y= !0;for(var U;!this.L1&&this.W0&&!this.FB&&(this.FB=!0,this.Y.QO(this)):(jz(this),Sz(this))}else l$c(this,h);t==4&&jz(this);this.J&&!this.L1&&(t==4?f$2(this.Y,this):(this.J=!1,WB(this)))}else g.B8H(this.V),E==400&&h.indexOf("Unknown SID")> 0?(this.L=3,dW(12)):(this.L=0,dW(13)),jz(this),Sz(this)}}}catch(C){}finally{}}; g.R.cancel=function(){this.L1=!0;jz(this)}; g.R.KX=function(){this.AF=null;var y=Date.now();y-this.n1>=0?(this.yv!=2&&(NF(3),dW(17)),jz(this),this.L=2,Sz(this)):XHy(this,this.n1-y)}; g.R.getLastError=function(){return this.L}; g.R.vk=function(){return this.V};V49.prototype.cancel=function(){this.Y=mR2(this);if(this.K)this.K.cancel(),this.K=null;else if(this.V&&this.V.size!==0){for(var y=g.p(this.V.values()),t=y.next();!t.done;t=y.next())t.value.cancel();this.V.clear()}};g.R=be2.prototype;g.R.Ik=8;g.R.fA=1;g.R.connect=function(y,t,a,r){dW(0);this.sR=y;this.L1=t||{};a&&r!==void 0&&(this.L1.OSID=a,this.L1.OAID=r);this.r0=this.ZA;this.Ff=vMi(this,null,this.sR);ez(this)}; g.R.disconnect=function(){cle(this);if(this.fA==3){var y=this.JF++,t=this.Ff.clone();g.ze(t,"SID",this.D);g.ze(t,"RID",y);g.ze(t,"TYPE","terminate");VK(this,t);y=new fh(this,this.D,y);y.yv=2;y.Z=T_(t.clone());t=!1;if(g.ks.navigator&&g.ks.navigator.sendBeacon)try{t=g.ks.navigator.sendBeacon(y.Z.toString(),"")}catch(a){}!t&&g.ks.Image&&((new Image).src=y.Z,t=!0);t||(y.V=M4i(y.Y,null),y.V.send(y.Z));y.o5=Date.now();WB(y)}KT9(this)}; g.R.l2=function(){return this.fA==0}; g.R.getState=function(){return this.fA}; g.R.sW=function(y){if(this.J)if(this.J=null,this.fA==1){if(!y){this.JF=Math.floor(Math.random()*1E5);y=this.JF++;var t=new fh(this,"",y),a=this.hF;this.zl&&(a?(a=g.uN(a),g.ms(a,this.zl)):a=this.zl);this.W!==null||this.n1||(t.Ff=a,a=null);var r;if(this.Az)a:{for(var E=r=0;E4096){r=E;break a}if(r===4096||E===this.Y.length-1){r=E+1;break a}}r= 1E3}else r=1E3;r=DRd(this,t,r);E=this.Ff.clone();g.ze(E,"RID",y);g.ze(E,"CVER",22);this.d0&&g.ze(E,"X-HTTP-Session-Id",this.d0);VK(this,E);a&&(this.n1?r="headers="+g.cW(g.$r7(a))+"&"+r:this.W&&g.MC(E,this.W,a));QYF(this.K,t);this.Ri&&g.ze(E,"TYPE","init");this.Az?(g.ze(E,"$req",r),g.ze(E,"SID","null"),t.zl=!0,LTE(t,E,null)):LTE(t,E,r);this.fA=2}}else this.fA==3&&(y?gM3(this,y):this.Y.length==0||nMy(this.K)||gM3(this))}; g.R.cY=function(){this.Z=null;ie9(this);if(this.nJ&&!(this.T7||this.V==null||this.IR<=0)){var y=4*this.IR;this.DE=Xh((0,g.mi)(this.IhX,this),y)}}; g.R.IhX=function(){this.DE&&(this.DE=null,this.r0=!1,this.T7=!0,dW(10),vB(this),ie9(this))}; g.R.QO=function(y){this.V==y&&this.nJ&&!this.T7&&(BFI(this),this.T7=!0,dW(11))}; g.R.Ps=function(){this.AF!=null&&(this.AF=null,vB(this),jY9(this),dW(19))}; g.R.nX5=function(y){y?dW(2):dW(1)}; g.R.isActive=function(){return!!this.L&&this.L.isActive(this)}; g.R=TF2.prototype;g.R.Y$=function(){}; g.R.PY=function(){}; g.R.zF=function(){}; g.R.K6=function(){}; g.R.isActive=function(){return!0}; g.R.YC=function(){};g.Bd(ml,g.MM);ml.prototype.open=function(){this.V.L=this.Y;this.J&&(this.V.C1=!0);this.V.connect(this.L,this.K||void 0)}; ml.prototype.close=function(){this.V.disconnect()}; ml.prototype.send=function(y){var t=this.V;if(typeof y==="string"){var a={};a.__data__=y;y=a}else this.D&&(a={},a.__data__=g.bY(y),y=a);t.Y.push(new uV2(t.ND++,y));t.fA==3&&ez(t)}; ml.prototype.I5=function(){this.V.L=null;delete this.Y;this.V.disconnect();delete this.V;ml.W1.I5.call(this)}; g.Bd(Zey,FTI);g.Bd(yCU,Ald);g.Bd(nh,TF2);nh.prototype.Y$=function(){this.V.dispatchEvent("m")}; nh.prototype.PY=function(y){this.V.dispatchEvent(new Zey(y))}; nh.prototype.zF=function(y){this.V.dispatchEvent(new yCU(y))}; nh.prototype.K6=function(){this.V.dispatchEvent("n")}; tii.prototype.commit=function(y){this.V.I7=y};var oK=new g.MM;g.N(rCi,g.tx);g.R=bE.prototype;g.R.Tp=null;g.R.Sb=!1;g.R.TP=null;g.R.K3=null;g.R.kM=null;g.R.vP=null;g.R.yK=null;g.R.D0=null;g.R.Gp=null;g.R.gW=null;g.R.F4=0;g.R.fl=null;g.R.mU=null;g.R.RE=null;g.R.MW=-1;g.R.qs=!0;g.R.qW=!1;g.R.o4=0;g.R.gJ=null;var sTE={},xvc={};g.R=bE.prototype;g.R.setTimeout=function(y){this.K=y}; g.R.xC=function(y){y=y.target;var t=this.gJ;t&&g.gk(y)==3?t.yw():this.iF(y)}; g.R.iF=function(y){try{if(y==this.gW)a:{var t=g.gk(this.gW),a=this.gW.K,r=this.gW.getStatus();if(g.ko&&!g.yu("420+")){if(t<4)break a}else if(t<3||t==3&&!g.KZ(this.gW))break a;this.qW||t!=4||a==7||(a==8||r<=0?this.V.hT(3):this.V.hT(2));Cte(this);var E=this.gW.getStatus();this.MW=E;var h=g.KZ(this.gW);if(this.Sb=E==200){t==4&&qF(this);if(this.d0){for(y=!0;!this.qW&&this.F40?(this.RE=3,HB(13)):(this.RE=0,HB(14)),qF(this),zs9(this)}}catch(x){}finally{}}; g.R.cancel=function(){this.qW=!0;qF(this)}; g.R.iV=function(){this.TP=null;var y=Date.now();y-this.K3>=0?(this.vP!=2&&this.V.hT(3),qF(this),this.RE=2,HB(18),zs9(this)):Uvs(this,this.K3-y)}; g.R.getLastError=function(){return this.RE};g.R=wri.prototype;g.R.Ph=null;g.R.E0=null;g.R.F6=!1;g.R.ib=null;g.R.t_=null;g.R.R_=-1;g.R.Qw=null;g.R.dT=null;g.R.connect=function(y){this.ib=y;y=Dv(this.V,null,this.ib);HB(3);Date.now();var t=this.V.hF;t!=null?(this.Qw=t[0],(this.dT=t[1])?(this.t_=1,Rs3(this)):(this.t_=2,Pti(this))):(G_(y,"MODE","init"),this.E0=new bE(this),this.E0.Tp=this.Ph,FR9(this.E0,y,!1,null,!0),this.t_=0)}; g.R.Wf=function(y){if(y)this.t_=2,Pti(this);else{HB(4);var t=this.V;t.zc=t.QN.R_;IK(t,9)}y&&this.hT(2)}; g.R.zG=function(y){return this.V.zG(y)}; g.R.abort=function(){this.E0&&(this.E0.cancel(),this.E0=null);this.R_=-1}; g.R.l2=function(){return!1}; g.R.x$=function(y,t){this.R_=y.MW;if(this.t_==0)if(t){try{var a=this.K.parse(t)}catch(r){y=this.V;y.zc=this.R_;IK(y,2);return}this.Qw=a[0];this.dT=a[1]}else y=this.V,y.zc=this.R_,IK(y,2);else this.t_==2&&(this.F6?(HB(7),Date.now()):t=="11111"?(HB(6),this.F6=!0,Date.now(),this.R_=200,this.E0.cancel(),HB(12),gW(this.V,this,!0)):(HB(8),Date.now(),this.F6=!1))}; g.R.Yp=function(){this.R_=this.E0.MW;if(this.E0.Sb)this.t_==0?this.dT?(this.t_=1,Rs3(this)):(this.t_=2,Pti(this)):this.t_==2&&(this.F6?(HB(12),gW(this.V,this,!0)):(HB(11),gW(this.V,this,!1)));else{this.t_==0?HB(9):this.t_==2&&HB(10);var y=this.V;this.E0.getLastError();y.zc=this.R_;IK(y,2)}}; g.R.C8=function(){return this.V.C8()}; g.R.isActive=function(){return this.V.isActive()}; g.R.hT=function(y){this.V.hT(y)};g.R=NNy.prototype;g.R.BG=null;g.R.t7=null;g.R.Ym=null;g.R.SJ=null;g.R.dA=null;g.R.U$=null;g.R.gy=null;g.R.xp=null;g.R.BH=0;g.R.F9=0;g.R.lq=null;g.R.EB=null;g.R.Gy=null;g.R.Sh=null;g.R.QN=null;g.R.qj=null;g.R.ZJ=-1;g.R.Dz=-1;g.R.zc=-1;g.R.GP=0;g.R.RI=0;g.R.Zc=8;var Lby={OK:0,DBr:2,bIr:4,ibr:5,MFe:6,STOP:7,l3:8,EV7:9,GH1:10,Shr:11,njE:12};g.Bd(Xrq,g.tx);g.Bd(kLq,g.tx);g.R=NNy.prototype; g.R.connect=function(y,t,a,r,E){HB(0);this.dA=t;this.t7=a||{};r&&E!==void 0&&(this.t7.OSID=r,this.t7.OAID=E);this.Z?(Jz((0,g.mi)(this.P3,this,y),100),WR3(this)):this.P3(y)}; g.R.disconnect=function(){jTi(this);if(this.V==3){var y=this.BH++,t=this.U$.clone();g.ze(t,"SID",this.D);g.ze(t,"RID",y);g.ze(t,"TYPE","terminate");Kh(this,t);y=new bE(this,this.D,y);y.vP=2;y.yK=T_(t.clone());(new Image).src=y.yK.toString();y.kM=Date.now();ACc(y)}mve(this)}; g.R.P3=function(y){this.QN=new wri(this);this.QN.Ph=this.BG;this.QN.K=this.L;this.QN.connect(y)}; g.R.l2=function(){return this.V==0}; g.R.getState=function(){return this.V}; g.R.mR=function(y){this.EB=null;ese(this,y)}; g.R.vY=function(){this.Gy=null;this.SJ=new bE(this,this.D,"rpc",this.W);this.SJ.Tp=this.BG;this.SJ.o4=0;var y=this.gy.clone();g.ze(y,"RID","rpc");g.ze(y,"SID",this.D);g.ze(y,"CI",this.qj?"0":"1");g.ze(y,"AID",this.ZJ);Kh(this,y);g.ze(y,"TYPE","xmlhttp");FR9(this.SJ,y,!0,this.xp,!1)}; g.R.x$=function(y,t){if(this.V!=0&&(this.SJ==y||this.Ym==y))if(this.zc=y.MW,this.Ym==y&&this.V==3)if(this.Zc>7){try{var a=this.L.parse(t)}catch(r){a=null}if(Array.isArray(a)&&a.length==3)if(y=a,y[0]==0)a:{if(!this.Gy){if(this.SJ)if(this.SJ.kM+3E30)){if(r=t==1)this.Ym||this.EB||this.V==1||this.GP>=2?r=!1:(this.EB=Jz((0,g.mi)(this.mR,this,y),uxq(this,this.GP)),this.GP++, r=!0);r=!(r||t==2&&ViE(this))}if(r)switch(a){case 1:IK(this,5);break;case 4:IK(this,10);break;case 3:IK(this,6);break;case 7:IK(this,12);break;default:IK(this,2)}}}; g.R.DU=function(y){if(!g.TE(arguments,this.V))throw Error("Unexpected channel state: "+this.V);}; g.R.EXf=function(y){y?HB(2):(HB(1),nRI(this,8))}; g.R.zG=function(y){if(y)throw Error("Can't create secondary domain capable XhrIo object.");y=new g.qM;y.W=!1;return y}; g.R.isActive=function(){return!!this.lq&&this.lq.isActive(this)}; g.R.hT=function(y){var t=oK;t.dispatchEvent(new kLq(t,y))}; g.R.C8=function(){return!1}; new hI3;g.R=JCU.prototype;g.R.UW=function(){}; g.R.Q6=function(){}; g.R.L6=function(){}; g.R.Fw=function(){}; g.R.gA=function(){}; g.R.y6=function(){return{}}; g.R.isActive=function(){return!0};g.R=oRI.prototype;g.R.enqueue=function(y){this.K.push(y)}; g.R.isEmpty=function(){return this.V.length===0&&this.K.length===0}; g.R.clear=function(){this.V=[];this.K=[]}; g.R.contains=function(y){return g.TE(this.V,y)||g.TE(this.K,y)}; g.R.remove=function(y){var t=this.V;var a=(0,g.wT7)(t,y);a>=0?(g.GE(t,a),t=!0):t=!1;return t||g.tB(this.K,y)}; g.R.jP=function(){for(var y=[],t=this.V.length-1;t>=0;--t)y.push(this.V[t]);t=this.K.length;for(var a=0;a0&&(this.J.zyE(this.K.nN(),this.Y,!0),this.J.PAu());this.J&&this.J.w5X();this.Y?(this.K.stop(),g.wQ(this.K),this.K=new T$(this.ly,this),this.Y=!1):this.K.reset();this.Vv=null;this.AF=0;if(this.D.length)if(this.W)Z6e(this);else{var y=this.D;this.D=[];var t=y.length;Y_2(this);GLI(this,y,t);G$(this)}else G$(this)}; g.R.Fw=function(y){var t=y==2&&this.V.zc==401;y==4||t||(this.Y&&!this.K.isActive()&&(g.wQ(this.K),this.K=new T$(this.ly,this),this.Y=!1),this.K.start());this.publish("handlerError",y,t);t=Object.keys(Lby).find(function(a){return Lby[a]===y}); this.R5.QY("BROWSER_CHANNEL",t!=null?t:"UNKNOWN")}; g.R.gA=function(y,t){if(!this.K.isActive())this.publish("handlerClosed");else if(t)for(var a=t.length,r=0;r=MZ9.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(y=MZ9[this.K],this.fM=g.Nt((0,g.mi)(this.N4,this),y),this.K++):this.publish("pairingFailed",Error("Server error "+y.status))}; g.R.q$=function(){this.V=null;this.publish("pairingFailed",Error("Server not responding"))}; var MZ9=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.Bd(sZ,AW);g.R=sZ.prototype;g.R.start=function(){xP(this)&&this.publish("screenChange");!g.JU("yt-remote-lounge-token-expiration")&&PoU(this);g.Xk(this.V);this.V=g.Nt((0,g.mi)(this.start,this),1E4)}; g.R.add=function(y,t){xP(this);L_9(this,y);$P(this,!1);this.publish("screenChange");t(y);y.token||PoU(this)}; g.R.remove=function(y,t){var a=xP(this);wEF(this,y)&&($P(this,!1),a=!0);t(y);a&&this.publish("screenChange")}; g.R.aF=function(y,t,a,r){var E=xP(this),h=this.get(y.id);h?(h.name!=t&&(h.name=t,$P(this,!1),E=!0),a(y)):r(Error("no such local screen."));E&&this.publish("screenChange")}; g.R.I5=function(){g.Xk(this.V);sZ.W1.I5.call(this)}; g.R.H15=function(y){xP(this);var t=this.screens.length;y=y&&y.screens||[];for(var a=y.length,r=0;r20)break a;x=t(h,F)}h=x}E.name=h}a(zb(this,E))},this), onError:(0,g.mi)(function(E){r(Error("pairing request failed: "+E.status))},this), onTimeout:(0,g.mi)(function(){r(Error("pairing request timed out."))},this)})}; g.R.I5=function(){g.wQ(this.K);g.wQ(this.V);CG.W1.I5.call(this)}; g.R.zue=function(){eeq(this);this.publish("screenChange");this.V.update()}; CG.prototype.dispose=CG.prototype.dispose;g.Bd(OZ,g.FM);g.R=OZ.prototype;g.R.wW=function(y){this.Qv()||(y&&(Mj(this,""+y),this.publish("sessionFailed")),this.V=null,this.publish("sessionScreen",null))}; g.R.info=function(y){a3(this.d0,y)}; g.R.k$=function(){return null}; g.R.kR=function(y){var t=this.K;y?(t.displayStatus=new chrome.cast.ReceiverDisplayStatus(y,[]),t.displayStatus.showStop=!0):t.displayStatus=null;chrome.cast.setReceiverDisplayStatus(t,(0,g.mi)(function(){this.info("Updated receiver status for "+t.friendlyName+": "+y)},this),(0,g.mi)(function(){Mj(this,"Failed to update receiver status for: "+t.friendlyName)},this))}; g.R.I5=function(){this.kR("");OZ.W1.I5.call(this)};g.N(wV,OZ);g.R=wV.prototype;g.R.M9=function(y){if(this.Y){if(this.Y==y)return;Mj(this,"Overriding cast session with new session object");qO9(this);this.o5=!1;this.hF="unknown";this.Y.removeUpdateListener(this.Vv);this.Y.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.DE)}this.Y=y;this.Y.addUpdateListener(this.Vv);this.Y.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.DE);ozF(this,"getMdxSessionStatus")}; g.R.t5=function(y){this.info("launchWithParams no-op for Cast: "+g.bY(y))}; g.R.stop=function(){this.Y?this.Y.stop((0,g.mi)(function(){this.wW()},this),(0,g.mi)(function(){this.wW(Error("Failed to stop receiver app."))},this)):this.wW(Error("Stopping cast device without session."))}; g.R.kR=function(){}; g.R.I5=function(){this.info("disposeInternal");qO9(this);this.Y&&(this.Y.removeUpdateListener(this.Vv),this.Y.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.DE));this.Y=null;OZ.prototype.I5.call(this)}; g.R.h3v=function(y,t){if(!this.Qv())if(t)if(t=Z6(t),g.l3(t))switch(y=""+t.type,t=t.data||{},this.info("onYoutubeMessage_: "+y+" "+g.bY(t)),y){case "mdxSessionStatus":nzE(this,t);break;case "loungeToken":Htc(this,t);break;default:Mj(this,"Unknown youtube message: "+y)}else Mj(this,"Unable to parse message.");else Mj(this,"No data in message.")}; g.R.rE=function(y,t,a,r){g.Xk(this.Z);this.Z=0;QB2(this.D,this.K.label,y,this.K.friendlyName,(0,g.mi)(function(E){E?t(E):r>=0?(Mj(this,"Screen "+y+" appears to be offline. "+r+" retries left."),this.Z=g.Nt((0,g.mi)(this.rE,this,y,t,a,r-1),300)):a(Error("Unable to fetch screen."))},this),a)}; g.R.k$=function(){return this.Y}; g.R.kC=function(y){this.Qv()||y||(Mj(this,"Cast session died."),this.wW())};g.N(R3,OZ);g.R=R3.prototype;g.R.M9=function(y){this.Y=y;this.Y.addUpdateListener(this.L1)}; g.R.t5=function(y){this.Ff=y;this.AF()}; g.R.stop=function(){Gcq(this);this.Y?this.Y.stop((0,g.mi)(this.wW,this,null),(0,g.mi)(this.wW,this,"Failed to stop DIAL device.")):this.wW()}; g.R.I5=function(){Gcq(this);this.Y&&this.Y.removeUpdateListener(this.L1);this.Y=null;OZ.prototype.I5.call(this)}; g.R.CX=function(y){this.Qv()||y||(Mj(this,"DIAL session died."),this.L(),this.L=function(){},this.wW())};g.N(dV,OZ);dV.prototype.stop=function(){this.wW()}; dV.prototype.M9=function(){}; dV.prototype.t5=function(){g.Xk(this.Y);this.Y=NaN;var y=xY(this.D.HG(),this.K.label);y?LG(this,y):this.wW(Error("No such screen"))}; dV.prototype.I5=function(){g.Xk(this.Y);this.Y=NaN;OZ.prototype.I5.call(this)};g.N(XC,g.FM);g.R=XC.prototype; g.R.init=function(y,t){chrome.cast.timeout.requestSession=3E4;var a=new chrome.cast.SessionRequest(this.Z,[chrome.cast.Capability.AUDIO_OUT]);g.WE("desktop_enable_cast_connect")&&(a.androidReceiverCompatible=!0);this.hF||(a.dialRequest=new chrome.cast.DialRequest("YouTube"));var r=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;y=y||this.J?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var E=(0,g.mi)(this.H0F,this);a=new chrome.cast.ApiConfig(a,(0,g.mi)(this.xt, this),E,r,y);a.customDialLaunchCallback=(0,g.mi)(this.FJm,this);chrome.cast.initialize(a,(0,g.mi)(function(){this.Qv()||(chrome.cast.addReceiverActionListener(this.L),UtF(),this.K.subscribe("onlineScreenChange",(0,g.mi)(this.C6,this)),this.Y=tbd(this),chrome.cast.setCustomReceivers(this.Y,function(){},(0,g.mi)(function(h){this.eJ("Failed to set initial custom receivers: "+g.bY(h))},this)),this.publish("yt-remote-cast2-availability-change",fG(this)),t(!0))},this),(0,g.mi)(function(h){this.eJ("Failed to initialize API: "+ g.bY(h)); t(!1)},this))}; g.R.xZv=function(y,t){kP("Setting connected screen ID: "+y+" -> "+t);if(this.V){var a=this.V.V;if(!y||a&&a.id!=y)kP("Unsetting old screen status: "+this.V.K.friendlyName),WT(this,null)}if(y&&t){if(!this.V){y=xY(this.K.HG(),y);if(!y){kP("setConnectedScreenStatus: Unknown screen.");return}if(y.idType=="shortLived"){kP("setConnectedScreenStatus: Screen with id type to be short lived.");return}a=Ztd(this,y);a||(kP("setConnectedScreenStatus: Connected receiver not custom..."),a=new chrome.cast.Receiver(y.uuid? y.uuid:y.id,y.name),a.receiverType=chrome.cast.ReceiverType.CUSTOM,this.Y.push(a),chrome.cast.setCustomReceivers(this.Y,function(){},(0,g.mi)(function(r){this.eJ("Failed to set initial custom receivers: "+g.bY(r))},this))); kP("setConnectedScreenStatus: new active receiver: "+a.friendlyName);WT(this,new dV(this.K,a),!0)}this.V.kR(t)}else kP("setConnectedScreenStatus: no screen.")}; g.R.vXv=function(y){this.Qv()?this.eJ("Setting connection data on disposed cast v2"):this.V?this.V.t5(y):this.eJ("Setting connection data without a session")}; g.R.Jn=function(){this.Qv()?this.eJ("Stopping session on disposed cast v2"):this.V?(this.V.stop(),WT(this,null)):kP("Stopping non-existing session")}; g.R.requestSession=function(){chrome.cast.requestSession((0,g.mi)(this.xt,this),(0,g.mi)(this.LH0,this))}; g.R.I5=function(){this.K.unsubscribe("onlineScreenChange",(0,g.mi)(this.C6,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.L);var y=xtF,t=g.jc("yt.mdx.remote.debug.handlers_");g.tB(t||[],y);g.wQ(this.V);g.FM.prototype.I5.call(this)}; g.R.eJ=function(y){a3("Controller",y)}; g.R.g$=function(y,t){this.V==y&&(t||WT(this,null),this.publish("yt-remote-cast2-session-change",t))}; g.R.O0F=function(y,t){if(!this.Qv())if(y)switch(y.friendlyName=chrome.cast.unescape(y.friendlyName),kP("onReceiverAction_ "+y.label+" / "+y.friendlyName+"-- "+t),t){case chrome.cast.ReceiverAction.CAST:if(this.V)if(this.V.K.label!=y.label)kP("onReceiverAction_: Stopping active receiver: "+this.V.K.friendlyName),this.V.stop();else{kP("onReceiverAction_: Casting to active receiver.");this.V.V&&this.publish("yt-remote-cast2-session-change",this.V.V);break}switch(y.receiverType){case chrome.cast.ReceiverType.CUSTOM:WT(this, new dV(this.K,y));break;case chrome.cast.ReceiverType.DIAL:WT(this,new R3(this.K,y,this.D,this.config_));break;case chrome.cast.ReceiverType.CAST:WT(this,new wV(this.K,y,this.config_));break;default:this.eJ("Unknown receiver type: "+y.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.V&&this.V.K.label==y.label?this.V.stop():this.eJ("Stopping receiver w/o session: "+y.friendlyName)}else this.eJ("onReceiverAction_ called without receiver.")}; g.R.FJm=function(y){if(this.Qv())return Promise.reject(Error("disposed"));var t=y.receiver;t.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.eJ("Not DIAL receiver: "+t.friendlyName),t.receiverType=chrome.cast.ReceiverType.DIAL);var a=this.V?this.V.K:null;if(!a||a.label!=t.label)return this.eJ("Receiving DIAL launch request for non-clicked DIAL receiver: "+t.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(a&&a.label==t.label&&a.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.V.V)return kP("Reselecting dial screen."), this.publish("yt-remote-cast2-session-change",this.V.V),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.eJ('Changing CAST intent from "'+a.receiverType+'" to "dial" for '+t.friendlyName);WT(this,new R3(this.K,t,this.D,this.config_))}t=this.V;t.Z=y;t.Z.appState==chrome.cast.DialAppState.RUNNING?(y=t.Z.extraData||{},a=y.screenId||null,PT(t)&&y.loungeToken?y.loungeTokenRefreshIntervalMs?y=K_s(t,{name:t.K.friendlyName,screenId:y.screenId,loungeToken:y.loungeToken,dialId:t.Z.receiver.label, screenIdType:"shortLived"},y.loungeTokenRefreshIntervalMs):(g.rs(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(y)+".")),y=IY7(t,a)):y=IY7(t,a)):y=gzF(t);return y}; g.R.xt=function(y){var t=this;if(!this.Qv()&&!this.J){kP("New cast session ID: "+y.sessionId);var a=y.receiver;if(a.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.V)if(a.receiverType==chrome.cast.ReceiverType.CAST)kP("Got resumed cast session before resumed mdx connection."),a.friendlyName=chrome.cast.unescape(a.friendlyName),WT(this,new wV(this.K,a,this.config_),!0);else{this.eJ("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var r=this.V.K,E=xY(this.K.HG(), r.label);E&&Fh(E,a.label)&&r.receiverType!=chrome.cast.ReceiverType.CAST&&a.receiverType==chrome.cast.ReceiverType.CAST&&(kP("onSessionEstablished_: manual to cast session change "+a.friendlyName),g.wQ(this.V),this.V=new wV(this.K,a,this.config_),this.V.subscribe("sessionScreen",(0,g.mi)(this.g$,this,this.V)),this.V.subscribe("sessionFailed",function(){return yUE(t,t.V)}),this.V.t5(null)); this.V.M9(y)}}}; g.R.Bs=function(){return this.V?this.V.k$():null}; g.R.LH0=function(y){this.Qv()||(this.eJ("Failed to estabilish a session: "+g.bY(y)),y.code!=chrome.cast.ErrorCode.CANCEL&&WT(this,null),this.publish("yt-remote-cast2-session-failed"))}; g.R.H0F=function(y){kP("Receiver availability updated: "+y);if(!this.Qv()){var t=fG(this);this.W=y==chrome.cast.ReceiverAvailability.AVAILABLE;fG(this)!=t&&this.publish("yt-remote-cast2-availability-change",fG(this))}}; g.R.C6=function(){this.Qv()||(this.Y=tbd(this),kP("Updating custom receivers: "+g.bY(this.Y)),chrome.cast.setCustomReceivers(this.Y,function(){},(0,g.mi)(function(){this.eJ("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",fG(this)))}; XC.prototype.setLaunchParams=XC.prototype.vXv;XC.prototype.setConnectedScreenStatus=XC.prototype.xZv;XC.prototype.stopSession=XC.prototype.Jn;XC.prototype.getCastSession=XC.prototype.Bs;XC.prototype.requestSession=XC.prototype.requestSession;XC.prototype.init=XC.prototype.init;XC.prototype.dispose=XC.prototype.dispose;var wxd=g.K7(["https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"]),Uee=[],xe2=g.Cp(wxd);g.R=lX.prototype; g.R.reset=function(y){this.listId="";this.index=-1;this.videoId="";wG9(this);this.volume=-1;this.muted=!1;y&&(this.index=y.index,this.listId=y.listId,this.videoId=y.videoId,this.playerState=y.playerState,this.volume=y.volume,this.muted=y.muted,this.audioTrackId=y.audioTrackId,this.trackData=y.trackData,this.hasPrevious=y.hasPrevious,this.hasNext=y.hasNext,this.J=y.playerTime,this.L=y.playerTimeAt,this.K=y.seekableStart,this.W=y.seekableEnd,this.Y=y.duration,this.loadedTime=y.loadedTime,this.V=y.liveIngestionTime, this.D=!isNaN(this.V))}; g.R.isPlaying=function(){return this.playerState==1}; g.R.isBuffering=function(){return this.playerState==3}; g.R.Fd=function(y){this.Y=isNaN(y)?0:y}; g.R.getDuration=function(){return this.D?this.Y+uX(this):this.Y}; g.R.clone=function(){return new lX(Pmc(this))};g.N(o3,g.FM);g.R=o3.prototype;g.R.getState=function(){return this.Y}; g.R.Tf=function(){return this.D.getReconnectTimeout()}; g.R.OP=function(){this.D.reconnect()}; g.R.play=function(){bX(this)?(this.V?this.V.play(null,g.DP,YP(this,"play")):qj(this,"play"),XGc(this,1,nG(HT(this))),this.publish("remotePlayerChange")):BT(this,this.play)}; g.R.pause=function(){bX(this)?(this.V?this.V.pause(null,g.DP,YP(this,"pause")):qj(this,"pause"),XGc(this,2,nG(HT(this))),this.publish("remotePlayerChange")):BT(this,this.pause)}; g.R.seekTo=function(y){if(bX(this)){if(this.V){var t=HT(this),a=new chrome.cast.media.SeekRequest;a.currentTime=y;t.isPlaying()||t.isBuffering()?a.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:a.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.V.seek(a,g.DP,YP(this,"seekTo",{newTime:y}))}else qj(this,"seekTo",{newTime:y});XGc(this,3,y);this.publish("remotePlayerChange")}else BT(this,g.J7(this.seekTo,y))}; g.R.stop=function(){if(bX(this)){this.V?this.V.stop(null,g.DP,YP(this,"stopVideo")):qj(this,"stopVideo");var y=HT(this);y.index=-1;y.videoId="";wG9(y);cT(this,y);this.publish("remotePlayerChange")}else BT(this,this.stop)}; g.R.setVolume=function(y,t){if(bX(this)){var a=HT(this);if(this.K){if(a.volume!=y){var r=Math.round(y)/100;this.K.setReceiverVolumeLevel(r,(0,g.mi)(function(){rV("set receiver volume: "+r)},this),(0,g.mi)(function(){this.eJ("failed to set receiver volume.")},this))}a.muted!=t&&this.K.setReceiverMuted(t,(0,g.mi)(function(){rV("set receiver muted: "+t)},this),(0,g.mi)(function(){this.eJ("failed to set receiver muted.")},this))}else{var E={volume:y, muted:t};a.volume!=-1&&(E.delta=y-a.volume);qj(this,"setVolume",E)}a.muted=t;a.volume=y;cT(this,a)}else BT(this,g.J7(this.setVolume,y,t))}; g.R.t$=function(y,t){if(bX(this)){var a=HT(this);y={videoId:y};t&&(a.trackData={trackName:t.name,languageCode:t.languageCode,sourceLanguageCode:t.translationLanguage?t.translationLanguage.languageCode:"",languageName:t.languageName,kind:t.kind},y.style=g.bY(t.style),g.ms(y,a.trackData));qj(this,"setSubtitlesTrack",y);cT(this,a)}else BT(this,g.J7(this.t$,y,t))}; g.R.setAudioTrack=function(y,t){bX(this)?(t=t.getLanguageInfo().getId(),qj(this,"setAudioTrack",{videoId:y,audioTrackId:t}),y=HT(this),y.audioTrackId=t,cT(this,y)):BT(this,g.J7(this.setAudioTrack,y,t))}; g.R.playVideo=function(y,t,a,r,E,h,F){r=r===void 0?null:r;E=E===void 0?null:E;h=h===void 0?null:h;F=F===void 0?null:F;var x=HT(this),U={videoId:y};a!==void 0&&(U.currentIndex=a);mG(x,y,a||0);t!==void 0&&(Vy(x,t),U.currentTime=t);r&&(U.listId=r);E&&(U.playerParams=E);h&&(U.clickTrackingParams=h);F&&(U.locationInfo=g.bY(F));qj(this,"setPlaylist",U);r||cT(this,x)}; g.R.Kk=function(y,t){if(bX(this)){if(y&&t){var a=HT(this);mG(a,y,t);cT(this,a)}qj(this,"previous")}else BT(this,g.J7(this.Kk,y,t))}; g.R.nextVideo=function(y,t){if(bX(this)){if(y&&t){var a=HT(this);mG(a,y,t);cT(this,a)}qj(this,"next")}else BT(this,g.J7(this.nextVideo,y,t))}; g.R.kd=function(){if(bX(this)){qj(this,"clearPlaylist");var y=HT(this);y.reset();cT(this,y);this.publish("remotePlayerChange")}else BT(this,this.kd)}; g.R.CZ=function(){bX(this)?qj(this,"dismissAutoplay"):BT(this,this.CZ)}; g.R.dispose=function(){if(this.Y!=3){var y=this.Y;this.Y=3;this.publish("proxyStateChange",y,this.Y)}g.FM.prototype.dispose.call(this)}; g.R.I5=function(){de3(this);this.D=null;this.L.clear();JW(this,null);g.FM.prototype.I5.call(this)}; g.R.Jb=function(y){if((y!=this.Y||y==2)&&this.Y!=3&&y!=0){var t=this.Y;this.Y=y;this.publish("proxyStateChange",t,y);if(y==1)for(;!this.L.isEmpty();)t=y=this.L,t.V.length===0&&(t.V=t.K,t.V.reverse(),t.K=[]),y.V.pop().apply(this);else y==3&&this.dispose()}}; g.R.EJu=function(y,t){this.publish(y,t)}; g.R.z$X=function(y){if(!y)this.Wq(null),JW(this,null);else if(this.K.receiver.volume){y=this.K.receiver.volume;var t=HT(this),a=Math.round(100*y.level||0);if(t.volume!=a||t.muted!=y.muted)rV("Cast volume update: "+y.level+(y.muted?" muted":"")),t.volume=a,t.muted=!!y.muted,cT(this,t)}}; g.R.Wq=function(y){rV("Cast media: "+!!y);this.V&&this.V.removeUpdateListener(this.Z);if(this.V=y)this.V.addUpdateListener(this.Z),kD9(this),this.publish("remotePlayerChange")}; g.R.KJe=function(y){y?(kD9(this),this.publish("remotePlayerChange")):this.Wq(null)}; g.R.s1=function(){qj(this,"sendDebugCommand",{debugCommand:"stats4nerds "})}; g.R.YRm=function(){var y=Ooq();y&&JW(this,y)}; g.R.eJ=function(y){a3("CP",y)};g.N(iX,g.FM);g.R=iX.prototype; g.R.connect=function(y,t){if(t){var a=t.listId,r=t.videoId,E=t.videoIds,h=t.playerParams,F=t.clickTrackingParams,x=t.index,U={videoId:r},C=t.currentTime,z=t.locationInfo;t=t.loopMode;C!==void 0&&(U.currentTime=C<=5?0:C);h&&(U.playerParams=h);z&&(U.locationInfo=z);F&&(U.clickTrackingParams=F);a&&(U.listId=a);E&&E.length>0&&(U.videoIds=E.join(","));x!==void 0&&(U.currentIndex=x);this.L1&&(U.loopMode=t||"LOOP_MODE_OFF");a&&(this.V.listId=a);this.V.videoId=r;this.V.index=x||0;this.V.state=3;Vy(this.V, C);this.L="UNSUPPORTED";a=this.L1?"setInitialState":"setPlaylist";Ds("Connecting with "+a+" and params: "+g.bY(U));this.K.connect({method:a,params:g.bY(U)},y,on2())}else Ds("Connecting without params"),this.K.connect({},y,on2());SXy(this)}; g.R.Lw=function(y){this.K.Lw(y)}; g.R.dispose=function(){this.Qv()||(g.Wd("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),gV(this,3));g.FM.prototype.dispose.call(this)}; g.R.I5=function(){Q_9(this);pG9(this);vHE(this);g.Xk(this.Z);this.Z=NaN;g.Xk(this.hF);this.hF=NaN;this.D=null;g.Q1(this.AF);this.AF.length=0;this.K.dispose();g.FM.prototype.I5.call(this);this.L=this.W=this.Y=this.V=this.K=null}; g.R.qv=function(y){if(!this.Y||this.Y.length===0)return!1;for(var t=g.p(this.Y),a=t.next();!a.done;a=t.next())if(!a.value.capabilities.has(y))return!1;return!0}; g.R.rZ=function(){var y=3;this.Qv()||(y=0,isNaN(this.Ln())?this.K.E8()&&isNaN(this.J)&&(y=1):y=2);return y}; g.R.y9=function(y){Ds("Disconnecting with "+y);g.Wd("yt.mdx.remote.remoteClient_",null);Q_9(this);this.publish("beforeDisconnect",y);y==1&&U7();this.K.disconnect(y);this.dispose()}; g.R.qf=function(){var y=this.V;this.D&&(y=this.V.clone(),mG(y,this.D,y.index));return Pmc(y)}; g.R.QSe=function(y){var t=this,a=new lX(y);a.videoId&&a.videoId!=this.V.videoId&&(this.D=a.videoId,g.Xk(this.Z),this.Z=g.Nt(function(){if(t.D){var E=t.D;t.D=null;t.V.videoId!=E&&KG(t,"getNowPlaying")}},5E3)); var r=[];this.V.listId==a.listId&&this.V.videoId==a.videoId&&this.V.index==a.index||r.push("remoteQueueChange");this.V.playerState==a.playerState&&this.V.volume==a.volume&&this.V.muted==a.muted&&nG(this.V)==nG(a)&&g.bY(this.V.trackData)==g.bY(a.trackData)||r.push("remotePlayerChange");this.V.reset(y);g.wK(r,function(E){this.publish(E)},this)}; g.R.yl=function(){var y=this.K.getDeviceId(),t=g.D9(this.Y,function(a){return a.type=="REMOTE_CONTROL"&&a.id!=y}); return t?t.id:""}; g.R.Ln=function(){return this.K.Tf()}; g.R.Px=function(){return this.L||"UNSUPPORTED"}; g.R.YO=function(){return this.W||""}; g.R.fX=function(){!isNaN(this.Ln())&&this.K.OP()}; g.R.z0r=function(y,t){KG(this,y,t);l4e(this)}; g.R.BY=function(){var y=g.BE("SAPISID","")||g.BE("__Secure-1PAPISID")||"",t=g.BE("__Secure-3PAPISID","")||"";if(!y&&!t)return"";y=g.H$(g.og(y),2);t=g.H$(g.og(t),2);return g.H$(g.og(","+y+","+t),2)}; iX.prototype.subscribe=iX.prototype.subscribe;iX.prototype.unsubscribeByKey=iX.prototype.wO;iX.prototype.getProxyState=iX.prototype.rZ;iX.prototype.disconnect=iX.prototype.y9;iX.prototype.getPlayerContextData=iX.prototype.qf;iX.prototype.setPlayerContextData=iX.prototype.QSe;iX.prototype.getOtherConnectedRemoteId=iX.prototype.yl;iX.prototype.getReconnectTimeout=iX.prototype.Ln;iX.prototype.getAutoplayMode=iX.prototype.Px;iX.prototype.getAutoplayVideoId=iX.prototype.YO;iX.prototype.reconnect=iX.prototype.fX; iX.prototype.sendMessage=iX.prototype.z0r;iX.prototype.getXsrfToken=iX.prototype.BY;iX.prototype.isCapabilitySupportedOnConnectedDevices=iX.prototype.qv;g.N(YXF,AW);g.R=YXF.prototype;g.R.HG=function(y){return this.oS.$_gs(y)}; g.R.contains=function(y){return!!this.oS.$_c(y)}; g.R.get=function(y){return this.oS.$_g(y)}; g.R.start=function(){this.oS.$_st()}; g.R.add=function(y,t,a){this.oS.$_a(y,t,a)}; g.R.remove=function(y,t,a){this.oS.$_r(y,t,a)}; g.R.aF=function(y,t,a,r){this.oS.$_un(y,t,a,r)}; g.R.I5=function(){for(var y=this.V.length,t=0;t1&&!this.C.getOption("remote","quickCast")?(this.Ek=g.RM(y,this.V,this),this.nL(g.v$(y,this.V)),y=this.C.getOption("remote","currentReceiver"),y=this.V(y),this.options[y]&&this.uq(y),this.enable(!0)):this.enable(!1)}; Oa.prototype.V=function(y){return y.key}; Oa.prototype.Ve=function(y){return y==="cast-selector-receiver"?"Transmitir\u2026":this.Ek[y].name}; Oa.prototype.CM=function(y){g.fB.prototype.CM.call(this,y);this.C.setOption("remote","currentReceiver",this.Ek[y]);this.OS.LJ()};g.N(Cl9,g.Cc);g.R=Cl9.prototype; g.R.create=function(){var y=this.player.G(),t=g.g9(y);y={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:y.B("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:y.B("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:y.B("enable_cast_short_lived_lounge_token")};I4i(t,y);this.subscriptions.push(g.ru("yt-remote-before-disconnect",this.e$e,this));this.subscriptions.push(g.ru("yt-remote-connection-change",this.Vi7,this));this.subscriptions.push(g.ru("yt-remote-receiver-availability-change",this.Ko, this));this.subscriptions.push(g.ru("yt-remote-auto-connect",this.Al4,this));this.subscriptions.push(g.ru("yt-remote-receiver-resumed",this.hY4,this));this.subscriptions.push(g.ru("mdx-privacy-popup-confirm",this.MJr,this));this.subscriptions.push(g.ru("mdx-privacy-popup-cancel",this.qMu,this));this.Ko()}; g.R.load=function(){this.player.cancelPlayback();g.Cc.prototype.load.call(this);this.h9=new Uxe(this.player.G(),this);this.player.oL(this.h9);this.wK=new AkF(this,this.player,this.ES);var y=(y=EGq())?y.currentTime:0;var t=tZF()?new o3(ho(),void 0):null;y==0&&t&&(y=nG(HT(t)));y!==0&&this.QD(y);zKE(this,this.kJ,this.kJ);this.player.Lc(6)}; g.R.unload=function(){this.player.publish("mdxautoplaycanceled");this.player.wX();this.Lz=this.jd;g.Rp(this.wK,this.ES);this.ES=this.h9=this.wK=null;g.Cc.prototype.unload.call(this);this.player.Lc(5);LT(this)}; g.R.I5=function(){g.ER(this.subscriptions);g.Cc.prototype.I5.call(this)}; g.R.FY=function(y){var t=g.w2.apply(1,arguments);this.loaded&&this.wK.hQ.apply(this.wK,[y].concat(g.i7(t)))}; g.R.getAdState=function(){return this.jf}; g.R.hasPrevious=function(){return this.ES?HT(this.ES).hasPrevious:!1}; g.R.hasNext=function(){return this.ES?HT(this.ES).hasNext:!1}; g.R.QD=function(y,t){this.uP=y||0;this.player.publish("progresssync",y,t);this.player.hj("onVideoProgress",y||0)}; g.R.getCurrentTime=function(){return this.uP}; g.R.getDuration=function(){return HT(this.ES).getDuration()||0}; g.R.Pj=function(){var y=HT(this.ES);return y.D?y.V+uX(y):y.V}; g.R.aY=function(){return HT(this.ES).loadedTime}; g.R.ih=function(){return R9I(HT(this.ES))}; g.R.Xy=function(){var y=HT(this.ES);return y.K>0?y.K+uX(y):y.K}; g.R.getProgressState=function(){var y=HT(this.ES),t=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:y.playerState!=1081&&this.player.u2(),clipEnd:t.clipEnd,clipStart:t.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:this.getDuration(),ingestionTime:this.Pj(),isAtLiveHead:this.isAtLiveHead(),loaded:this.aY(),seekableEnd:this.ih(),seekableStart:this.Xy(),offset:0,viewerLivestreamJoinMediaTime:0}}; g.R.isAtLiveHead=function(){return R9I(HT(this.ES))-this.getCurrentTime()<=1}; g.R.nextVideo=function(){this.ES&&this.ES.nextVideo()}; g.R.Kk=function(){this.ES&&this.ES.Kk()}; g.R.e$e=function(y){y===1&&(this.m_=this.ES?HT(this.ES):null)}; g.R.Vi7=function(){var y=tZF()?new o3(ho(),void 0):null;if(y){var t=this.Lz;this.loaded&&this.unload();this.ES=y;this.m_=null;t.key!==this.jd.key&&(this.Lz=t,this.load())}else g.wQ(this.ES),this.ES=null,this.loaded&&(this.unload(),(y=this.m_)&&y.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(y.videoId,nG(y)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)}; g.R.Ko=function(){var y=[this.jd],t=y.concat,a=TB3();vT()&&g.JU("yt-remote-cast-available")&&a.push({key:"cast-selector-receiver",name:"Cast..."});this.Ek=t.call(y,a);y=ZoU()||this.jd;M6(this,y);this.player.hj("onMdxReceiversChange")}; g.R.Al4=function(){var y=ZoU();M6(this,y)}; g.R.hY4=function(){this.Lz=ZoU()}; g.R.MJr=function(){this.YF=!0;LT(this);sa=!1;F8&&xT(F8,1);F8=null}; g.R.qMu=function(){this.YF=!1;LT(this);M6(this,this.jd);this.Lz=this.jd;sa=!1;F8=null;this.player.playVideo()}; g.R.NZ=function(y,t){switch(y){case "casting":return this.loaded;case "receivers":return this.Ek;case "currentReceiver":return t&&(t.key==="cast-selector-receiver"?L77():M6(this,t)),this.loaded?this.Lz:this.jd;case "quickCast":return this.Ek.length===2&&this.Ek[1].key==="cast-selector-receiver"?(t&&L77(),!0):!1}}; g.R.s1=function(){this.ES.s1()}; g.R.Cw=function(){return!1}; g.R.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]}; g.R.isLoggedIn=function(){var y,t;return((y=g.yd("PLAYER_CONFIG"))==null?void 0:(t=y.args)==null?void 0:t.authuser)!==void 0?!0:!(!g.yd("SESSION_INDEX")&&!g.yd("LOGGED_IN"))};g.Ul("remote",Cl9);})(_yt_player);