(function(g){var window=this;'use strict';var Lh=function(F){g.zm(F,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.L3()).toString(36));return F},Fg=function(F,J,b){Array.isArray(b)||(b=[String(b)]); g.Rhv(F.Z,J,b)},rn1=function(F){if(F instanceof g.I8)return F; if(typeof F.WF=="function")return F.WF(!1);if(g.ca(F)){var J=0,b=new g.I8;b.next=function(){for(;;){if(J>=F.length)return g.qm;if(J in F)return g.uR(F[J++]);J++}}; return b}throw Error("Not implemented");},SJk=function(F,J,b){if(g.ca(F))g.gy(F,J,b); else for(F=rn1(F);;){var I=F.next();if(I.done)break;J.call(b,I.value,void 0,F)}},s3z=function(F,J){var b=[]; SJk(J,function(I){try{var u=g.PV.prototype.U.call(this,I,!0)}catch(w){if(w=="Storage: Invalid value was encountered")return;throw w;}u===void 0?b.push(I):g.HLm(u)&&b.push(I)},F); return b},YJV=function(F,J){s3z(F,J).forEach(function(b){g.PV.prototype.remove.call(this,b)},F)},$rt=function(F){if(F.Tj){if(F.Tj.locationOverrideToken)return{locationOverrideToken:F.Tj.locationOverrideToken}; if(F.Tj.latitudeE7!=null&&F.Tj.longitudeE7!=null)return{latitudeE7:F.Tj.latitudeE7,longitudeE7:F.Tj.longitudeE7}}return null},CGV=function(F,J){g.te(F,J)||F.push(J)},XVH=function(F){var J=0,b; for(b in F)J++;return J},Q3H=function(F,J){return g.jq(F,J)},R48=function(F){try{return g.Qz.JSON.parse(F)}catch(J){}F=String(F); if(/^\s*$/.test(F)?0:/^[\],:{}\s\u2028\u2029]*$/.test(F.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+F+")")}catch(J){}throw Error("Invalid JSON string: "+F);},JT=function(F){if(g.Qz.JSON)try{return g.Qz.JSON.parse(F)}catch(J){}return R48(F)},Drk=function(F){if(F.td&&typeof F.td=="function")return F.td(); if(typeof Map!=="undefined"&&F instanceof Map||typeof Set!=="undefined"&&F instanceof Set)return Array.from(F.values());if(typeof F==="string")return F.split("");if(g.ca(F)){for(var J=[],b=F.length,I=0;I1){if(b%2)throw Error("Uneven number of arguments");for(var I=0;I5&&(F=F.slice(F.length-5)); var J=g.EG($jk(),function(I){return I.loungeToken}),b=g.EG(F,function(I){return I.loungeToken}); g.jw(b,function(I){return!g.te(J,I)})&&CJe(); g.rm("yt-remote-local-screens",F,31536E3)},pN=function(F){F||(g.sy("yt-remote-session-screen-id"),g.sy("yt-remote-session-video-id")); spm();F=eH();g.Hk(F,KN());rER(F)},Qpm=function(){if(!gv){var F=g.Yd(); F&&(gv=new g.jM(F))}},Rz1=function(){Qpm(); return gv?!!gv.get("yt-remote-use-staging-server"):!1},ml=function(F,J){g.FT[F]=!0; var b=g.Hr();b&&b.publish.apply(b,arguments);g.FT[F]=!1},DjL=function(){},b4=function(){if(!y2){y2=new g.Es(new DjL); var F=g.li("client_streamz_web_flush_count",-1);F!==-1&&(y2.T=F)}return y2},kTV=function(){var F=window.navigator.userAgent.match(/Chrome\/([0-9]+)/); return F?parseInt(F[1],10):0},OXL=function(F){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+F)!=-1||document.currentScript.src.indexOf("&"+F)!=-1)},oDV=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},i4=function(F){F.length?hzU(F.shift(),function(){i4(F)}):cE5()},Uj1=function(F){return"chrome-extension://"+F+"/cast_sender.js"},hzU=function(F,J,b){var I=document.createElement("script"); I.onerror=J;b&&(I.onload=b);g.k_(I,g.WT(F));(document.head||document.documentElement).appendChild(I)},xjU=function(){var F=kTV(),J=[]; if(F>1){var b=F-1;J.push("//www.gstatic.com/eureka/clank/"+F+"/cast_sender.js");J.push("//www.gstatic.com/eureka/clank/"+b+"/cast_sender.js")}return J},cE5=function(){var F=oDV(); F&&F(!1,"No cast extension found")},t4t=function(){if(nDU){var F=2,J=oDV(),b=function(){F--; F==0&&J&&J(!0)}; window.__onGCastApiAvailable=b;hzU("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",cE5,b)}},ZXb=function(){t4t(); var F=xjU();F.push("//www.gstatic.com/eureka/clank/cast_sender.js");i4(F)},LM1=function(){t4t(); var F=xjU();F.push.apply(F,g.W(HXL.map(Uj1)));F.push("//www.gstatic.com/eureka/clank/cast_sender.js");i4(F)},zH=function(F,J,b){g.R.call(this); this.W=b!=null?(0,g.tJ)(F,b):F;this.gg=J;this.D=(0,g.tJ)(this.cT,this);this.C=!1;this.U=0;this.T=this.J_=null;this.Z=[]},NA=function(F,J,b){g.R.call(this); this.Z=b!=null?F.bind(b):F;this.gg=J;this.T=null;this.C=!1;this.U=0;this.J_=null},F11=function(F){F.J_=g.Wj(function(){F.J_=null; F.C&&!F.U&&(F.C=!1,F11(F))},F.gg); var J=F.T;F.T=null;F.Z.apply(null,J)},l4=function(){},JRH=function(){g.SX.call(this,"p")},blk=function(){g.SX.call(this,"o")},uFL=function(){return I$1=I$1||new g.Zr},wxk=function(F){g.SX.call(this,"serverreachability",F)},fN=function(F){var J=uFL(); J.dispatchEvent(new wxk(J,F))},MN8=function(F){g.SX.call(this,"statevent",F)},WD=function(F){var J=uFL(); J.dispatchEvent(new MN8(J,F))},ARt=function(F,J,b,I){g.SX.call(this,"timingevent",F); this.size=J;this.rtt=b;this.retries=I},dv=function(F,J){if(typeof F!=="function")throw Error("Fn must not be null and must be a function"); return g.Qz.setTimeout(function(){F()},J)},E8=function(){},jH=function(F,J,b,I){this.T=F; this.Z=J;this.Kk=b;this.xm=I||1;this.cN=new g.dR(this);this.nW=45E3;this.qf=null;this.W=!1;this.N=this.Jz=this.Y=this.dD=this.Gj=this.bR=this.Tj=null;this.eE=[];this.C=null;this.V=0;this.D=this.kQ=null;this.Um=-1;this.fW=!1;this.oI=0;this.KW=null;this.Om=this.zj=this.Q2=this.WN=!1;this.U=new q6W},q6W=function(){this.T=null; this.C="";this.U=!1},a$8=function(F,J,b){F.dD=1; F.Y=Lh(J.clone());F.N=b;F.WN=!0;v6R(F,null)},v6R=function(F,J){F.Gj=Date.now(); GH(F);F.Jz=F.Y.clone();Fg(F.Jz,"t",F.xm);F.V=0;var b=F.T.dD;F.U=new q6W;F.C=eyU(F.T,b?J:null,!F.N);F.oI>0&&(F.KW=new NA((0,g.tJ)(F.mA,F,F.C),F.oI));F.cN.listen(F.C,"readystatechange",F.Nx);J=F.qf?g.To(F.qf):{};F.N?(F.kQ||(F.kQ="POST"),J["Content-Type"]="application/x-www-form-urlencoded",F.C.send(F.Jz,F.kQ,F.N,J)):(F.kQ="GET",F.C.send(F.Jz,F.kQ,null,J));fN(1)},px8=function(F){if(!K1m(F))return g.Hj(F.C); var J=g.Lu(F.C);if(J==="")return"";var b="",I=J.length,u=g.tz(F.C)==4;if(!F.U.T){if(typeof TextDecoder==="undefined")return V2(F),PD(F),"";F.U.T=new g.Qz.TextDecoder}for(var w=0;wJ.length)return g6m;J=J.slice(I,I+b);F.V=I+b;return J},GH=function(F){F.bR=Date.now()+F.nW; ile(F,F.nW)},ile=function(F,J){if(F.Tj!=null)throw Error("WatchDog timer not null"); F.Tj=dv((0,g.tJ)(F.LC,F),J)},zyH=function(F){F.Tj&&(g.Qz.clearTimeout(F.Tj),F.Tj=null)},PD=function(F){F.T.Ph()||F.fW||N$1(F.T,F)},V2=function(F){zyH(F); g.q8(F.KW);F.KW=null;F.cN.removeAll();if(F.C){var J=F.C;F.C=null;J.abort();J.dispose()}},VNk=function(F,J){try{var b=F.T; if(b.WD!=0&&(b.C==F||l$m(b.U,F)))if(!F.zj&&l$m(b.U,F)&&b.WD==3){try{var I=b.Uz.C.parse(J)}catch(f){I=null}if(Array.isArray(I)&&I.length==3){var u=I;if(u[0]==0)a:{if(!b.Y){if(b.C)if(b.C.Gj+3E30&&(b.oI=1.5*q);I=b;var v=F.qt();if(v){var a=g.F5(v,"X-Client-Wire-Protocol");if(a){var e=I.U;!e.C&&(g.E1(a,"spdy")||g.E1(a,"quic")||g.E1(a,"h2"))&&(e.Z=e.D,e.C=new Set,e.U&&(dkz(e,e.U),e.U=null))}if(I.WN){var K=g.F5(v,"X-HTTP-Session-Id");K&&(I.xo=K,g.zm(I.qf,I.WN,K))}}b.WD=3;b.D&&b.D.w8();b.If&&(b.MI=Date.now()-F.Gj);I=b;var p=F;I.y6=E6e(I,I.dD?I.xm:null,I.Kk);if(p.zj){jRk(I.U, p);var m=p,y=I.oI;y&&m.setTimeout(y);m.Tj&&(zyH(m),GH(m));I.C=p}else Gk8(I);b.T.length>0&&SH(b)}else w[0]!="stop"&&w[0]!="close"||rv(b,7);else b.WD==3&&(w[0]=="stop"||w[0]=="close"?w[0]=="stop"?rv(b,7):b.disconnect():w[0]!="noop"&&b.D&&b.D.Cg(w),b.eE=0)}fN(4)}catch(f){}},PiH=function(F,J){this.C=F; this.map=J;this.context=null},B$W=function(F){this.D=F||10; g.Qz.PerformanceNavigationTiming?(F=g.Qz.performance.getEntriesByType("navigation"),F=F.length>0&&(F[0].nextHopProtocol=="hq"||F[0].nextHopProtocol=="h2")):F=!!(g.Qz.chrome&&g.Qz.chrome.loadTimes&&g.Qz.chrome.loadTimes()&&g.Qz.chrome.loadTimes().wasFetchedViaSpdy);this.Z=F?this.D:1;this.C=null;this.Z>1&&(this.C=new Set);this.U=null;this.T=[]},T$V=function(F){return F.U?!0:F.C?F.C.size>=F.Z:!1},W1e=function(F){return F.U?1:F.C?F.C.size:0},l$m=function(F,J){return F.U?F.U==J:F.C?F.C.has(J):!1},dkz= function(F,J){F.C?F.C.add(J):F.U=J},jRk=function(F,J){F.U&&F.U==J?F.U=null:F.C&&F.C.has(J)&&F.C.delete(J)},rRe=function(F){if(F.U!=null)return F.T.concat(F.U.eE); if(F.C!=null&&F.C.size!==0){var J=F.T;F=g.N(F.C.values());for(var b=F.next();!b.done;b=F.next())J=J.concat(b.value.eE);return J}return g.JL(F.T)},S6m=function(F,J){var b=new E8; if(g.Qz.Image){var I=new Image;I.onload=g.Ha(s8,b,"TestLoadImage: loaded",!0,J,I);I.onerror=g.Ha(s8,b,"TestLoadImage: error",!1,J,I);I.onabort=g.Ha(s8,b,"TestLoadImage: abort",!1,J,I);I.ontimeout=g.Ha(s8,b,"TestLoadImage: timeout",!1,J,I);g.Qz.setTimeout(function(){if(I.ontimeout)I.ontimeout()},1E4); I.src=F}else J(!1)},sRm=function(F,J){var b=new E8,I=new AbortController,u=setTimeout(function(){I.abort(); s8(b,"TestPingServer: timeout",!1,J)},1E4); fetch(F,{signal:I.signal}).then(function(w){clearTimeout(u);w.ok?s8(b,"TestPingServer: ok",!0,J):s8(b,"TestPingServer: server error",!1,J)}).catch(function(){clearTimeout(u); s8(b,"TestPingServer: error",!1,J)})},s8=function(F,J,b,I,u){try{u&&(u.onload=null,u.onerror=null,u.onabort=null,u.ontimeout=null),I(b)}catch(w){}},Y6L=function(){this.C=new l4},$kV=function(F,J,b){var I=b||""; try{O6W(F,function(u,w){var M=u;g.Um(u)&&(M=g.Gq(u));J.push(I+w+"="+encodeURIComponent(M))})}catch(u){throw J.push(I+"type="+encodeURIComponent("_badmap")),u; }},Yw=function(F,J,b){return b&&b.KGW?b.KGW[F]||J:J},CiV=function(F){this.T=[]; this.xm=this.y6=this.qf=this.Kk=this.C=this.xo=this.WN=this.fW=this.V=this.Um=this.N=null;this.K7=this.Jz=0;this.Vk=Yw("failFast",!1,F);this.zj=this.Tj=this.Y=this.W=this.D=null;this.NW=!0;this.Ly=this.KW=-1;this.Om=this.eE=this.Gj=0;this.GU=Yw("baseRetryDelayMs",5E3,F);this.xH=Yw("retryDelaySeedMs",1E4,F);this.zU=Yw("forwardChannelMaxRetries",2,F);this.M0=Yw("forwardChannelRequestTimeoutMs",2E4,F);this.g9=F&&F.v6G||void 0;this.n7=F&&F.KUI||void 0;this.YH=F&&F.FoR||!1;this.oI=void 0;this.dD=F&&F.Wr_|| !1;this.Z="";this.U=new B$W(F&&F.fQ_);this.Uz=new Y6L;this.cN=F&&F.Y0E||!1;this.bR=F&&F.zzz||!1;this.cN&&this.bR&&(this.bR=!1);this.jZ=F&&F.kaz||!1;F&&F.nfR&&(this.NW=!1);this.If=!this.cN&&this.NW&&F&&F.QV_||!1;this.Se=void 0;F&&F.Hf&&F.Hf>0&&(this.Se=F.Hf);this.T1=void 0;this.MI=0;this.nW=!1;this.Q2=this.kQ=null},TH=function(F){F.C&&(Xxz(F),F.C.cancel(),F.C=null)},QRt=function(F){TH(F); F.Y&&(g.Qz.clearTimeout(F.Y),F.Y=null);BD(F);F.U.cancel();F.W&&(typeof F.W==="number"&&g.Qz.clearTimeout(F.W),F.W=null)},SH=function(F){T$V(F.U)||F.W||(F.W=!0,g.qf(F.NT,F),F.Gj=0)},Dkk=function(F,J){if(W1e(F.U)>=F.U.Z-(F.W?1:0))return!1; if(F.W)return F.T=J.eE.concat(F.T),!0;if(F.WD==1||F.WD==2||F.Gj>=(F.Vk?0:F.zU))return!1;F.W=dv((0,g.tJ)(F.NT,F,J),Rye(F,F.Gj));F.Gj++;return!0},Olt=function(F,J){var b; J?b=J.Kk:b=F.Jz++;var I=F.qf.clone();g.zm(I,"SID",F.Z);g.zm(I,"RID",b);g.zm(I,"AID",F.KW);$w(F,I);F.V&&F.N&&g.Wt(I,F.V,F.N);b=new jH(F,F.Z,b,F.Gj+1);F.V===null&&(b.qf=F.N);J&&(F.T=J.eE.concat(F.T));J=kk1(F,b,1E3);b.setTimeout(Math.round(F.M0*.5)+Math.round(F.M0*.5*Math.random()));dkz(F.U,b);a$8(b,I,J)},$w=function(F,J){F.fW&&g.ie(F.fW,function(b,I){g.zm(J,I,b)}); F.D&&O6W({},function(b,I){g.zm(J,I,b)})},kk1=function(F,J,b){b=Math.min(F.T.length,b); var I=F.D?(0,g.tJ)(F.D.Cr,F.D,F):null;a:{for(var u=F.T,w=-1;;){var M=["count="+b];w==-1?b>0?(w=u[0].C,M.push("ofs="+w)):w=0:M.push("ofs="+w);for(var q=!0,v=0;v=3)return!1; F.Om++;F.Y=dv((0,g.tJ)(F.LS,F),Rye(F,F.eE));F.eE++;return!0},Xxz=function(F){F.kQ!=null&&(g.Qz.clearTimeout(F.kQ),F.kQ=null)},o61=function(F){F.C=new jH(F,F.Z,"rpc",F.Om); F.V===null&&(F.C.qf=F.N);F.C.oI=0;var J=F.y6.clone();g.zm(J,"RID","rpc");g.zm(J,"SID",F.Z);g.zm(J,"AID",F.KW);g.zm(J,"CI",F.zj?"0":"1");!F.zj&&F.Se&&g.zm(J,"TO",F.Se);g.zm(J,"TYPE","xmlhttp");$w(F,J);F.V&&F.N&&g.Wt(J,F.V,F.N);F.oI&&F.C.setTimeout(F.oI);var b=F.C;F=F.xm;b.dD=1;b.Y=Lh(J.clone());b.N=null;b.WN=!0;v6R(b,F)},BD=function(F){F.Tj!=null&&(g.Qz.clearTimeout(F.Tj),F.Tj=null)},N$1=function(F,J){var b=null; if(F.C==J){BD(F);Xxz(F);F.C=null;var I=2}else if(l$m(F.U,J))b=J.eE,jRk(F.U,J),I=1;else return;if(F.WD!=0)if(J.W)if(I==1){b=J.N?J.N.length:0;J=Date.now()-J.Gj;var u=F.Gj;I=uFL();I.dispatchEvent(new ARt(I,b,J,u));SH(F)}else Gk8(F);else{var w=J.Um;u=J.getLastError();if(u==3||u==0&&w>0||!(I==1&&Dkk(F,J)||I==2&&f$5(F)))switch(b&&b.length>0&&(J=F.U,J.T=J.T.concat(b)),u){case 1:rv(F,5);break;case 4:rv(F,10);break;case 3:rv(F,6);break;default:rv(F,2)}}},Rye=function(F,J){var b=F.GU+Math.floor(Math.random()* F.xH); F.isActive()||(b*=2);return b*J},rv=function(F,J){if(J==2){var b=(0,g.tJ)(F.M6E,F),I=F.n7,u=!I; I=new g.a2(I||"//www.google.com/images/cleardot.gif");g.Qz.location&&g.Qz.location.protocol=="http"||g.eh(I,"https");Lh(I);u?S6m(I.toString(),b):sRm(I.toString(),b)}else WD(2);F.WD=0;F.D&&F.D.r8(J);hye(F);QRt(F)},hye=function(F){F.WD=0; F.Q2=[];if(F.D){var J=rRe(F.U);if(J.length!=0||F.T.length!=0)g.bV(F.Q2,J),g.bV(F.Q2,F.T),F.U.T.length=0,g.JL(F.T),F.T.length=0;F.D.IR()}},cRV=function(F){if(F.WD==0)return F.Q2; var J=[];g.bV(J,rRe(F.U));g.bV(J,F.T);return J},E6e=function(F,J,b){var I=g.Nl(b); I.C!=""?(J&&g.KM(I,J+"."+I.C),g.pM(I,I.T)):(I=g.Qz.location,I=odk(I.protocol,J?J+"."+I.hostname:I.hostname,+I.port,b));J=F.WN;b=F.xo;J&&b&&g.zm(I,J,b);g.zm(I,"VER",F.cw);$w(F,I);return I},eyU=function(F,J,b){if(J&&!F.dD)throw Error("Can't create secondary domain capable XhrIo object."); J=F.YH&&!F.g9?new g.Us(new g.Ml({HU:b})):new g.Us(F.g9);J.V=F.dD;return J},Uk5=function(){},xkz=function(){},Xg=function(F,J){g.Zr.call(this); this.C=new CiV(J);this.D=F;this.U=J&&J.EmR||null;F=J&&J.M3R||null;J&&J.i1z&&(F?F["X-Client-Protocol"]="webchannel":F={"X-Client-Protocol":"webchannel"});this.C.N=F;F=J&&J.sEN||null;J&&J.Y9&&(F?F["X-WebChannel-Content-Type"]=J.Y9:F={"X-WebChannel-Content-Type":J.Y9});J&&J.Sb&&(F?F["X-WebChannel-Client-Profile"]=J.Sb:F={"X-WebChannel-Client-Profile":J.Sb});this.C.Um=F;(F=J&&J.XlQ)&&!g.d5(F)&&(this.C.V=F);this.W=J&&J.Wr_||!1;this.Z=J&&J.UiQ||!1;(J=J&&J.SQ_)&&!g.d5(J)&&(this.C.WN=J,g.Ea(this.U,J)&&(F= this.U,J in F&&delete F[J]));this.T=new CN(this)},n6b=function(F){JRH.call(this); F.__headers__&&(this.headers=F.__headers__,this.statusCode=F.__status__,delete F.__headers__,delete F.__status__);var J=F.__sm__;J?this.data=(this.C=g.f$(J))?g.P1(J,this.C):J:this.data=F},tNU=function(F){blk.call(this); this.status=1;this.errorCode=F},CN=function(F){this.C=F},Zle=function(F,J){this.U=F; this.C=J},Hlb=function(F){return cRV(F.C).map(function(J){var b=F.U; J=J.map;"__data__"in J?(J=J.__data__,b=b.Z?R48(J):J):b=J;return b})},Q2=function(F,J){if(typeof F!=="function")throw Error("Fn must not be null and must be a function"); return g.Qz.setTimeout(function(){F()},J)},DE=function(F){Rv.dispatchEvent(new L1V(Rv,F))},L1V=function(F){g.SX.call(this,"statevent",F)},kw=function(F,J,b,I){this.C=F; this.Z=J;this.V=b;this.W=I||1;this.U=45E3;this.T=new g.dR(this);this.D=new g.fu;this.D.setInterval(250)},JCb=function(F,J,b){F.Wj=1; F.ZB=Lh(J.clone());F.JG=b;F.WN=!0;Fut(F,null)},bwb=function(F,J,b,I,u){F.Wj=1; F.ZB=Lh(J.clone());F.JG=null;F.WN=b;u&&(F.rN=!1);Fut(F,I)},Fut=function(F,J){F.PO=Date.now(); Ivb(F);F.gp=F.ZB.clone();Fg(F.gp,"t",F.W);F.OP=0;F.Sm=F.C.OE(F.C.Re()?J:null);F.WI>0&&(F.Rp=new NA((0,g.tJ)(F.UZ,F,F.Sm),F.WI));F.T.listen(F.Sm,"readystatechange",F.Uq);J=F.vE?g.To(F.vE):{};F.JG?(F.Aj="POST",J["Content-Type"]="application/x-www-form-urlencoded",F.Sm.send(F.gp,F.Aj,F.JG,J)):(F.Aj="GET",F.rN&&!g.xM&&(J.Connection="close"),F.Sm.send(F.gp,F.Aj,null,J));F.C.Mb(1)},M9V=function(F,J){var b=F.OP,I=J.indexOf("\n",b); if(I==-1)return utL;b=Number(J.substring(b,I));if(isNaN(b))return wKU;I+=1;if(I+b>J.length)return utL;J=J.slice(I,I+b);F.OP=I+b;return J},Ivb=function(F){F.AZ=Date.now()+F.U; ACm(F,F.U)},ACm=function(F,J){if(F.il!=null)throw Error("WatchDog timer not null"); F.il=Q2((0,g.tJ)(F.wx,F),J)},qyU=function(F){F.il&&(g.Qz.clearTimeout(F.il),F.il=null)},vqz=function(F){F.C.Ph()||F.Xr||F.C.DH(F)},O8=function(F){qyU(F); g.q8(F.Rp);F.Rp=null;F.D.stop();F.T.removeAll();if(F.Sm){var J=F.Sm;F.Sm=null;J.abort();J.dispose()}F.N7&&(F.N7=null)},avk=function(F,J){try{F.C.Tu(F,J),F.C.Mb(4)}catch(b){}},KuU=function(F,J,b,I,u){if(I==0)b(!1); else{var w=u||0;I--;efe(F,J,function(M){M?b(!0):g.Qz.setTimeout(function(){KuU(F,J,b,I,w)},w)})}},efe=function(F,J,b){var I=new Image; I.onload=function(){try{ov(I),b(!0)}catch(u){}}; I.onerror=function(){try{ov(I),b(!1)}catch(u){}}; I.onabort=function(){try{ov(I),b(!1)}catch(u){}}; I.ontimeout=function(){try{ov(I),b(!1)}catch(u){}}; g.Qz.setTimeout(function(){if(I.ontimeout)I.ontimeout()},J); I.src=F},ov=function(F){F.onload=null; F.onerror=null;F.onabort=null;F.ontimeout=null},pK5=function(F){this.C=F; this.U=new l4},gqk=function(F){var J=hT(F.C,F.EK,"/mail/images/cleardot.gif"); Lh(J);KuU(J.toString(),5E3,(0,g.tJ)(F.Kz,F),3,2E3);F.Mb(1)},m1m=function(F){var J=F.C.W; J!=null?(DE(5),J?(DE(11),cD(F.C,F,!1)):(DE(12),cD(F.C,F,!0))):(F.Rc=new kw(F),F.Rc.vE=F.qv,J=F.C,J=hT(J,J.Re()?F.qo:null,F.iI),DE(5),Fg(J,"TYPE","xmlhttp"),bwb(F.Rc,J,!1,F.qo,!1))},yCb=function(F,J,b){this.C=1; this.U=[];this.T=[];this.D=new l4;this.N=F||null;this.W=J!=null?J:null;this.Y=b||!1},iwR=function(F,J){this.C=F; this.map=J;this.context=null},zfe=function(F,J,b,I){g.SX.call(this,"timingevent",F); this.size=J;this.rtt=b;this.retries=I},Nmz=function(F){g.SX.call(this,"serverreachability",F)},fve=function(F){F.TE(1,0); F.Dt=hT(F,null,F.Mv);lv1(F)},Wuk=function(F){F.zH&&(F.zH.abort(),F.zH=null); F.OV&&(F.OV.cancel(),F.OV=null);F.x8&&(g.Qz.clearTimeout(F.x8),F.x8=null);U8(F);F.Qz&&(F.Qz.cancel(),F.Qz=null);F.A$&&(g.Qz.clearTimeout(F.A$),F.A$=null)},d1L=function(F,J){if(F.C==0)throw Error("Invalid operation: sending map when state is closed"); F.U.push(new iwR(F.e1++,J));F.C!=2&&F.C!=3||lv1(F)},Eqb=function(F){var J=0; F.OV&&J++;F.Qz&&J++;return J},lv1=function(F){F.Qz||F.A$||(F.A$=Q2((0,g.tJ)(F.sZ,F),0),F.M1=0)},V9e=function(F,J){if(F.C==1){if(!J){F.gs=Math.floor(Math.random()*1E5); J=F.gs++;var b=new kw(F,"",J);b.vE=F.PF;var I=jgb(F),u=F.Dt.clone();g.zm(u,"RID",J);g.zm(u,"CVER","1");xw(F,u);JCb(b,u,I);F.Qz=b;F.C=2}}else F.C==3&&(J?GDV(F,J):F.U.length==0||F.Qz||GDV(F))},GDV=function(F,J){if(J)if(F.yj>6){F.U=F.T.concat(F.U); F.T.length=0;var b=F.gs-1;J=jgb(F)}else b=J.V,J=J.JG;else b=F.gs++,J=jgb(F);var I=F.Dt.clone();g.zm(I,"SID",F.Z);g.zm(I,"RID",b);g.zm(I,"AID",F.Ec);xw(F,I);b=new kw(F,F.Z,b,F.M1+1);b.vE=F.PF;b.setTimeout(1E4+Math.round(1E4*Math.random()));F.Qz=b;JCb(b,I,J)},xw=function(F,J){F.UJ&&(F=F.UJ.RW())&&g.ie(F,function(b,I){g.zm(J,I,b)})},jgb=function(F){var J=Math.min(F.U.length,1E3),b=["count="+J]; if(F.yj>6&&J>0){var I=F.U[0].C;b.push("ofs="+I)}else I=0;for(var u={},w=0;w=3)return!1; F.V++;F.x8=Q2((0,g.tJ)(F.XM,F),BmU(F,F.fO));F.fO++;return!0},cD=function(F,J,b){F.aF=F.W==null?b:!F.W; F.pL=J.KN;F.Y||fve(F)},U8=function(F){F.pI!=null&&(g.Qz.clearTimeout(F.pI),F.pI=null)},BmU=function(F,J){var b=5E3+Math.floor(Math.random()*1E4); F.isActive()||(b*=2);return b*J},nN=function(F,J){if(J==2||J==9){var b=null; F.UJ&&(b=null);var I=(0,g.tJ)(F.f4Q,F);b||(b=new g.a2("//www.google.com/images/cleardot.gif"),Lh(b));efe(b.toString(),1E4,I)}else DE(2);rCR(F,J)},rCR=function(F,J){F.C=0; F.UJ&&F.UJ.u0(J);Sy5(F);Wuk(F)},Sy5=function(F){F.C=0; F.pL=-1;if(F.UJ)if(F.T.length==0&&F.U.length==0)F.UJ.EE();else{var J=g.JL(F.T),b=g.JL(F.U);F.T.length=0;F.U.length=0;F.UJ.EE(J,b)}},hT=function(F,J,b){var I=g.Nl(b); if(I.C!="")J&&g.KM(I,J+"."+I.C),g.pM(I,I.T);else{var u=window.location;I=odk(u.protocol,J?J+"."+u.hostname:u.hostname,+u.port,b)}F.kd&&g.ie(F.kd,function(w,M){g.zm(I,M,w)}); g.zm(I,"VER",F.yj);xw(F,I);return I},sg1=function(){},Yy8=function(){this.C=[]; this.U=[]},$1b=function(F){g.SX.call(this,"channelMessage"); this.message=F},C8V=function(F){g.SX.call(this,"channelError"); this.error=F},XKL=function(F,J){this.action=F; this.params=J||{}},tT=function(F,J){g.R.call(this); this.C=new g.ty(this.UY_,0,this);g.k(this,this.C);this.gg=5E3;this.U=0;if(typeof F==="function")J&&(F=(0,g.tJ)(F,J));else if(F&&typeof F.handleEvent==="function")F=(0,g.tJ)(F.handleEvent,F);else throw Error("Invalid listener argument");this.T=F},Qg8=function(F,J,b,I,u,w,M){b=b===void 0?!1:b; I=I===void 0?function(){return""}:I; u=u===void 0?!1:u;w=w===void 0?!1:w;M=M===void 0?function(){return g.yX({})}:M; this.fW=F;this.Tj=J;this.D=new g.EJ;this.U=new tT(this.E7I,this);this.C=null;this.V=!1;this.N=null;this.Gj="";this.eE=this.Y=0;this.T=[];this.Jz=b;this.kQ=I;this.W=w;this.WN=M;this.Z=g.yX();this.oI=u;this.KW=new h4U;this.qf=new cnL;this.zj=new Ur1;this.dD=new xrz;this.nW=new ndt;this.bR=new tMb},D1z=function(F,J,b,I,u){Rfb(F); if(F.C){var w=g.cT("ID_TOKEN"),M=F.C.PF||{};w?M["x-youtube-identity-token"]=w:delete M["x-youtube-identity-token"];F.C.PF=M}I?(I.getState()!=3&&Eqb(I)==0||I.getState(),F.C.connect(J,b,F.Tj,I.Z,I.Ec)):u?F.C.connect(J,b,F.Tj,u.sessionId,u.arrayId):F.C.connect(J,b,F.Tj)},oqH=function(F){var J,b; g.S(function(I){if(I.C==1)return g.f3(I,2),g.T(I,kD8(F),2);g.Em(I);J=F.T;F.T=[];b=J.length;Ow5(F,J,b);ZE(F);return g.jz(I,0)})},Ow5=function(F,J,b){for(var I=0;I0?b=Object.assign({},b,J):delete b.Authorization;F.C.PF=b}).catch(function(){})},HD=function(F){this.scheme="https"; this.port=this.domain="";this.C="/api/lounge";this.U=!0;F=F||document.location.href;var J=Number(g.$V(4,F))||"";J&&(this.port=":"+J);this.domain=g.Cu(F)||"";F=g.Bk();F.search("MSIE")>=0&&(F=F.match(/MSIE ([\d.]+)/)[1],g.Pk(F,"10.0")<0&&(this.U=!1))},LN=function(F,J){var b=F.C; F.U&&(b=F.scheme+"://"+F.domain+F.port+F.C);return g.Os(b+J,{})},hfb=function(F,J){g.Zr.call(this); var b=this;this.eF=F();this.eF.subscribe("handlerOpened",this.Xf,this);this.eF.subscribe("handlerClosed",this.onClosed,this);this.eF.subscribe("handlerError",function(I,u){b.onError(u)}); this.eF.subscribe("handlerMessage",this.onMessage,this);this.C=J},cCR=function(F,J,b){var I=this; b=b===void 0?function(){return""}:b; var u=u===void 0?new xkz:u;var w=w===void 0?new g.EJ:w;this.pathPrefix=F;this.C=J;this.Gj=b;this.D=w;this.Y=null;this.N=this.V=0;this.channel=null;this.W=0;this.T=new tT(function(){I.T.isActive();var M;((M=I.channel)==null?void 0:W1e((new Zle(M,M.C)).C.U))===0&&I.connect(I.Y,I.V)}); this.Z={};this.U={};this.Tj=!1;this.logger=null;this.eE=[];this.Jw=void 0;this.qf=new h4U;this.kQ=new cnL;this.fW=new Ur1;this.WN=new xrz},U18=function(F){g.Dr(F.channel,"m",function(){F.W=3; F.T.reset();F.Y=null;F.V=0;for(var J=g.N(F.eE),b=J.next();!b.done;b=J.next())b=b.value,F.channel&&F.channel.send(b);F.eE=[];F.publish("webChannelOpened");F.qf.C("WEB_CHANNEL")}); g.Dr(F.channel,"n",function(){F.W=0;F.T.isActive()||F.publish("webChannelClosed");var J,b=(J=F.channel)==null?void 0:Hlb(new Zle(J,J.C));b&&(F.eE=[].concat(g.W(b)));F.kQ.C("WEB_CHANNEL")}); g.Dr(F.channel,"p",function(J){var b=J.data;b[0]==="gracefulReconnect"?(F.T.start(),F.channel&&F.channel.close()):F.publish("webChannelMessage",new XKL(b[0],b[1]));F.Jw=J.statusCode;F.fW.C("WEB_CHANNEL")}); g.Dr(F.channel,"o",function(){F.Jw===401||F.T.start();F.publish("webChannelError");F.WN.C("WEB_CHANNEL")})},x1m=function(F){var J=F.Gj(); J?F.Z["x-youtube-lounge-xsrf-token"]=J:delete F.Z["x-youtube-lounge-xsrf-token"]},nqt=function(F){g.Zr.call(this); this.C=F();this.C.subscribe("webChannelOpened",this.ut,this);this.C.subscribe("webChannelClosed",this.onClosed,this);this.C.subscribe("webChannelError",this.onError,this);this.C.subscribe("webChannelMessage",this.onMessage,this)},t9b=function(F,J,b,I,u){function w(){return new Qg8(LN(F,"/bc"),J,!1,b,I)} b=b===void 0?function(){return""}:b; return g.Nk("enable_mdx_web_channel_desktop")?new nqt(function(){return new cCR(LN(F,"/wc"),J,b)}):new hfb(w,u)},FH1=function(){var F=ZwV; HwV();FO.push(F);LuH()},J4=function(F,J){HwV(); var b=JYV(F,String(J));FO.length==0?bDb(b):(LuH(),g.gy(FO,function(I){I(b)}))},bn=function(F){J4("CP",F)},HwV=function(){FO||(FO=g.kC("yt.mdx.remote.debug.handlers_")||[],g.RG("yt.mdx.remote.debug.handlers_",FO))},bDb=function(F){var J=(I$+1)%50; I$=J;un[J]=F;wW||(wW=J==49)},LuH=function(){var F=FO; if(un[0]){var J=wW?I$:-1,b={};do b={lY:void 0},J=(J+1)%50,b.lY=un[J],g.gy(F,function(I){return function(u){u(I.lY)}}(b)); while(J!=I$);un=Array(50);I$=-1;wW=!1}},JYV=function(F,J){var b=(Date.now()-IZV)/1E3; b.toFixed&&(b=b.toFixed(3));var I=[];I.push("[",b+"s","] ");I.push("[","yt.mdx.remote","] ");I.push(F+": "+J,"\n");return I.join("")},Mo=function(F){g.uA.call(this); this.W=F;this.screens=[]},usR=function(F,J){var b=F.get(J.uuid)||F.get(J.id); if(b)return F=b.name,b.id=J.id||b.id,b.name=J.name,b.token=J.token,b.uuid=J.uuid||b.uuid,b.name!=F;F.screens.push(J);return!0},w$V=function(F,J){var b=F.screens.length!=J.length; F.screens=g.qN(F.screens,function(w){return!!PJt(J,w)}); for(var I=J.length,u=0;u0&&F.Z0&&ln(F,b)},function(J){F.D=function(){}; F.mS(J)})},Yl1=function(F){var J={}; J.pairingCode=F.kQ;J.theme=F.dD;Rz1()&&(J.env_useStageMdx=1);return g.kV(J)},$P5=function(F){return new Promise(function(J){F.kQ=GTR(); if(F.qf){var b=new chrome.cast.DialLaunchResponse(!0,Yl1(F));J(b);seH(F)}else F.Tj=function(){g.m1(F.N);F.Tj=function(){}; F.N=NaN;var I=new chrome.cast.DialLaunchResponse(!0,Yl1(F));J(I);seH(F)},F.N=g.pl(function(){F.Tj()},100)})},X$L=function(F,J,b){F.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(J)); var I=new AT(J);return(new Promise(function(u){Cam(F,I,function(w){w?(F.eE=!0,Ky(F.Z,I),gW(F,I),ln(F,b)):g.nX(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(J)+" is not online."));u(w)},5)})).then(function(u){return u?new chrome.cast.DialLaunchResponse(!1):$P5(F)})},Qe8=function(F,J){var b=F.Y.receiver.label,I=F.U.friendlyName; return(new Promise(function(u){iDR(F.Z,b,J,I,function(w){w&&w.token&&gW(F,w);u(w)},function(w){mm(F,"Failed to get DIAL screen: "+w); u(null)})})).then(function(u){return u&&u.token?new chrome.cast.DialLaunchResponse(!1):$P5(F)})},Cam=function(F,J,b,I){g.m1(F.W); F.W=0;NZe(F.Z,J,function(u){u||I<0?b(u):F.W=g.pl(function(){Cam(F,J,b,I-1)},300)})},ln=function(F,J){F.info("getDialAppInfoWithTimeout_ "+J); No(F)&&(g.m1(F.V),F.V=0,J==0?RUe(F):F.V=g.pl(function(){RUe(F)},J))},RUe=function(F){No(F)&&F.T.getDialAppInfo(function(J){F.info("getDialAppInfo dialLaunchData: "+JSON.stringify(J)); J=J.extraData||{};var b=null;if(J.loungeToken){var I;((I=F.C)==null?void 0:I.token)==J.loungeToken&&(b="staleLoungeToken")}else b="missingLoungeToken";b?(F.Gj=b,ln(F,3E4)):(F.eE=!1,F.Gj="unknown",dPW(F,J.loungeToken),ln(F,J.loungeTokenRefreshIntervalMs))},function(J){F.info("getDialAppInfo error: "+J); F.Gj="noLoungeTokenResponse";ln(F,3E4)})},DPH=function(F){g.m1(F.W); F.W=0;g.m1(F.V);F.V=0;F.D();F.D=function(){}; g.m1(F.N)},fy=function(F,J){py.call(this,F,J,"ManualSession"); this.T=g.pl((0,g.tJ)(this.UX,this,null),150)},Ww=function(F,J){g.uA.call(this); this.config_=J;this.U=F;this.Y=J.appId||"233637DE";this.Z=J.theme||"cl";this.N=J.disableCastApi||!1;this.W=J.forceMirroring||!1;this.C=null;this.V=!1;this.T=[];this.D=(0,g.tJ)(this.go_,this)},klV=function(F,J){return J?g.xL(F.T,function(b){return qA(J,b.label)},F):null},dW=function(F){J4("Controller",F)},ZwV=function(F){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(F)},E2=function(F){return F.V||!!F.T.length||!!F.C},jC=function(F,J,b){J!=F.C&&(g.q8(F.C),(F.C=J)?(b?F.publish("yt-remote-cast2-receiver-resumed", J.U):F.publish("yt-remote-cast2-receiver-selected",J.U),J.subscribe("sessionScreen",(0,g.tJ)(F.vB,F,J)),J.subscribe("sessionFailed",function(){return ODW(F,J)}),J.C?F.publish("yt-remote-cast2-session-change",J.C):b&&F.C.UX(null)):F.publish("yt-remote-cast2-session-change",null))},ODW=function(F,J){F.C==J&&F.publish("yt-remote-cast2-session-failed")},ouL=function(F){var J=F.U.kL(),b=F.C&&F.C.U; F=g.EG(J,function(I){b&&qA(I,b.label)&&(b=null);var u=I.uuid?I.uuid:I.id,w=klV(this,I);w?(w.label=u,w.friendlyName=I.name):(w=new chrome.cast.Receiver(u,I.name),w.receiverType=chrome.cast.ReceiverType.CUSTOM);return w},F); b&&(b.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(b=new chrome.cast.Receiver(b.label,b.friendlyName),b.receiverType=chrome.cast.ReceiverType.CUSTOM),F.push(b));return F},ZDt=function(F,J,b,I){I.disableCastApi?GW("Cannot initialize because disabled by Mdx config."):hU8()?cY8(J,I)&&(UPk(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?xPL(F,b):(window.__onGCastApiAvailable=function(u,w){u?xPL(F,b):(Vs("Failed to load cast API: "+w),nuH(!1),UPk(!1),g.sy("yt-remote-cast-available"),g.sy("yt-remote-cast-receiver"), tRV(),b(!1))},I.loadCastApiSetupScript?g.wP("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?kTV()>=60&&ZXb():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?cE5():kTV()>=89?LM1():(t4t(),i4(HXL.map(Uj1))))):GW("Cannot initialize because not running Chrome")},tRV=function(){GW("dispose"); var F=Pw();F&&F.dispose();g.RG("yt.mdx.remote.cloudview.instance_",null);HDb(!1);g.Iu(LH5);LH5.length=0},Bw=function(){return!!g.S9("yt-remote-cast-installed")},FEk=function(){var F=g.S9("yt-remote-cast-receiver"); return F?F.friendlyName:null},JBz=function(){GW("clearCurrentReceiver"); g.sy("yt-remote-cast-receiver")},bAb=function(){return Bw()?Pw()?Pw().getCastSession():(Vs("getCastSelector: Cast is not initialized."),null):(Vs("getCastSelector: Cast API is not installed!"),null)},IDb=function(){Bw()?Pw()?TW()?(GW("Requesting cast selector."),Pw().requestSession()):(GW("Wait for cast API to be ready to request the session."),LH5.push(g.b0("yt-remote-cast2-api-ready",IDb))):Vs("requestCastSelector: Cast is not initialized."):Vs("requestCastSelector: Cast API is not installed!")}, rW=function(F,J){TW()?Pw().setConnectedScreenStatus(F,J):Vs("setConnectedScreenStatus called before ready.")},hU8=function(){var F=g.Bk().search(/ (CrMo|Chrome|CriOS)\//)>=0; return g.B4||F},upL=function(F,J){Pw().init(F,J)},cY8=function(F,J){var b=!1; Pw()||(F=new Ww(F,J),F.subscribe("yt-remote-cast2-availability-change",function(I){g.rm("yt-remote-cast-available",I);ml("yt-remote-cast2-availability-change",I)}),F.subscribe("yt-remote-cast2-receiver-selected",function(I){GW("onReceiverSelected: "+I.friendlyName); g.rm("yt-remote-cast-receiver",I);ml("yt-remote-cast2-receiver-selected",I)}),F.subscribe("yt-remote-cast2-receiver-resumed",function(I){GW("onReceiverResumed: "+I.friendlyName); g.rm("yt-remote-cast-receiver",I);ml("yt-remote-cast2-receiver-resumed",I)}),F.subscribe("yt-remote-cast2-session-change",function(I){GW("onSessionChange: "+vD(I)); I||g.sy("yt-remote-cast-receiver");ml("yt-remote-cast2-session-change",I)}),g.RG("yt.mdx.remote.cloudview.instance_",F),b=!0); GW("cloudview.createSingleton_: "+b);return b},Pw=function(){return g.kC("yt.mdx.remote.cloudview.instance_")},xPL=function(F,J){nuH(!0); UPk(!1);upL(F,function(b){b?(HDb(!0),g.u0("yt-remote-cast2-api-ready")):(Vs("Failed to initialize cast API."),nuH(!1),g.sy("yt-remote-cast-available"),g.sy("yt-remote-cast-receiver"),tRV());J(b)})},GW=function(F){J4("cloudview",F)},Vs=function(F){J4("cloudview",F)},nuH=function(F){GW("setCastInstalled_ "+F); g.rm("yt-remote-cast-installed",F)},TW=function(){return!!g.kC("yt.mdx.remote.cloudview.apiReady_")},HDb=function(F){GW("setApiReady_ "+F); g.RG("yt.mdx.remote.cloudview.apiReady_",F)},UPk=function(F){g.RG("yt.mdx.remote.cloudview.initializing_",F)},SC=function(F){this.index=-1; this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.W=this.V=0;this.trackData=null;this.FI=this.Q5=!1;this.Y=this.D=this.C=this.Z=0;this.T=NaN;this.U=!1;this.reset(F)},wrR=function(F){F.audioTrackId=null; F.trackData=null;F.playerState=-1;F.Q5=!1;F.FI=!1;F.V=0;F.W=g.L3();F.Z=0;F.C=0;F.D=0;F.Y=0;F.T=NaN;F.U=!1},s2=function(F){return F.isPlaying()?(g.L3()-F.W)/1E3:0},YH=function(F,J){F.V=J; F.W=g.L3()},$H=function(F){switch(F.playerState){case 1:case 1081:return(g.L3()-F.W)/1E3+F.V; case -1E3:return 0}return F.V},Cy=function(F,J,b){var I=F.videoId; F.videoId=J;F.index=b;J!=I&&wrR(F)},M6m=function(F){var J={}; J.index=F.index;J.listId=F.listId;J.videoId=F.videoId;J.playerState=F.playerState;J.volume=F.volume;J.muted=F.muted;J.audioTrackId=F.audioTrackId;J.trackData=g.rl(F.trackData);J.hasPrevious=F.Q5;J.hasNext=F.FI;J.playerTime=F.V;J.playerTimeAt=F.W;J.seekableStart=F.Z;J.seekableEnd=F.C;J.duration=F.D;J.loadedTime=F.Y;J.liveIngestionTime=F.T;return J},Qs=function(F,J){g.uA.call(this); var b=this;this.T=0;this.Z=F;this.W=[];this.D=new Yy8;this.U=this.C=null;this.N=(0,g.tJ)(this.CX_,this);this.V=(0,g.tJ)(this.bV,this);this.Y=(0,g.tJ)(this.r_G,this);this.Tj=(0,g.tJ)(this.UIN,this);var I=0;F?(I=F.getProxyState(),I!=3&&(F.subscribe("proxyStateChange",this.WA,this),ABV(this))):I=3;I!=0&&(J?this.WA(I):g.pl(function(){b.WA(I)},0)); (F=bAb())&&XO(this,F);this.subscribe("yt-remote-cast2-session-change",this.Tj)},R$=function(F){return new SC(F.Z.getPlayerContextData())},ABV=function(F){g.gy("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(J){this.W.push(this.Z.subscribe(J,g.Ha(this.PCQ,J),this))},F)},qZz=function(F){g.gy(F.W,function(J){this.Z.unsubscribeByKey(J)},F); F.W.length=0},D2=function(F){return F.getState()==1},kH=function(F,J){var b=F.D; b.C.length+b.U.length<50&&F.D.enqueue(J)},vPU=function(F,J,b){var I=R$(F); YH(I,b);I.playerState!=-1E3&&(I.playerState=J);O2(F,I)},o$=function(F,J,b){F.Z.sendMessage(J,b)},O2=function(F,J){qZz(F); F.Z.setPlayerContextData(M6m(J));ABV(F)},XO=function(F,J){F.U&&(F.U.removeUpdateListener(F.N),F.U.removeMediaListener(F.V),F.bV(null)); F.U=J;F.U&&(bn("Setting cast session: "+F.U.sessionId),F.U.addUpdateListener(F.N),F.U.addMediaListener(F.V),F.U.media.length&&F.bV(F.U.media[0]))},aDm=function(F){var J=F.C.media,b=F.C.customData; if(J&&b){var I=R$(F);J.contentId!=I.videoId&&bn("Cast changing video to: "+J.contentId);I.videoId=J.contentId;I.playerState=b.playerState;YH(I,F.C.getEstimatedTime());O2(F,I)}else bn("No cast media video. Ignoring state update.")},h4=function(F,J,b){return(0,g.tJ)(function(I){this.ST("Failed to "+J+" with cast v2 channel. Error code: "+I.code); I.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.ST("Retrying "+J+" using MDx browser channel."),o$(this,J,b))},F)},xH=function(F,J,b,I){I=I===void 0?!1:I; g.uA.call(this);var u=this;this.W=NaN;this.kQ=!1;this.N=this.Y=this.eE=this.Gj=NaN;this.Tj=[];this.D=this.V=this.Z=this.C=this.U=null;this.qf=F;this.fW=I;this.Tj.push(g.l8(window,"beforeunload",function(){u.eG(2)})); this.T=[];this.C=new SC;this.dD=J.id;this.WN=J.idType;this.U=t9b(this.qf,b,this.qC,this.WN=="shortLived",this.dD);this.U.listen("channelOpened",function(){eoH(u)}); this.U.listen("channelClosed",function(){cw("Channel closed");isNaN(u.W)?pN(!0):pN();u.dispose()}); this.U.listen("channelError",function(w){pN();isNaN(u.B2())?(w==1&&u.WN=="shortLived"&&u.publish("browserChannelAuthError",w),cw("Channel error: "+w+" without reconnection"),u.dispose()):(u.kQ=!0,cw("Channel error: "+w+" with reconnection in "+u.B2()+" ms"),U2(u,2))}); this.U.listen("channelMessage",function(w){KEb(u,w)}); this.U.nA(J.token);this.subscribe("remoteQueueChange",function(){var w=u.C.videoId;g.Yq()&&g.rm("yt-remote-session-video-id",w)})},prm=function(F){return g.xL(F.T,function(J){return J.type=="LOUNGE_SCREEN"})},cw=function(F){J4("conn",F)},U2=function(F,J){F.publish("proxyStateChange",J)},gPW=function(F){F.W=g.pl(function(){cw("Connecting timeout"); F.eG(1)},2E4)},mKt=function(F){g.m1(F.W); F.W=NaN},yBU=function(F){g.m1(F.Gj); F.Gj=NaN},zom=function(F){iA1(F); F.eE=g.pl(function(){ny(F,"getNowPlaying")},2E4)},iA1=function(F){g.m1(F.eE); F.eE=NaN},eoH=function(F){cw("Channel opened"); F.kQ&&(F.kQ=!1,yBU(F),F.Gj=g.pl(function(){cw("Timing out waiting for a screen.");F.eG(1)},15E3))},lDW=function(F,J){var b=null; if(J){var I=prm(F);I&&(b={clientName:I.clientName,deviceMake:I.brand,deviceModel:I.model,osVersion:I.osVersion})}g.RG("yt.mdx.remote.remoteClient_",b);J&&(mKt(F),yBU(F));b=F.U.kW()&&isNaN(F.W);J==b?J&&(U2(F,1),ny(F,"getSubtitlesTrack")):J?(F.JA()&&F.C.reset(),U2(F,1),ny(F,"getNowPlaying"),NLz(F)):F.eG(1)},fD1=function(F,J){var b=J.params.videoId; delete J.params.videoId;b==F.C.videoId&&(g.Vj(J.params)?F.C.trackData=null:F.C.trackData=J.params,F.publish("remotePlayerChange"))},WE8=function(F,J,b){var I=J.params.videoId||J.params.video_id,u=parseInt(J.params.currentIndex,10); F.C.listId=J.params.listId||F.C.listId;Cy(F.C,I,u);F.publish("remoteQueueChange",b)},EPb=function(F,J){J.params=J.params||{}; WE8(F,J,"NOW_PLAYING_MAY_CHANGE");dKV(F,J);F.publish("autoplayDismissed")},dKV=function(F,J){var b=parseInt(J.params.currentTime||J.params.current_time,10); YH(F.C,isNaN(b)?0:b);b=parseInt(J.params.state,10);b=isNaN(b)?-1:b;b==-1&&F.C.playerState==-1E3&&(b=-1E3);F.C.playerState=b;b=Number(J.params.loadedTime);F.C.Y=isNaN(b)?0:b;F.C.GI(Number(J.params.duration));b=F.C;var I=Number(J.params.liveIngestionTime);b.T=I;b.U=isNaN(I)?!1:!0;b=F.C;I=Number(J.params.seekableStartTime);J=Number(J.params.seekableEndTime);b.Z=isNaN(I)?0:I;b.C=isNaN(J)?0:J;F.C.playerState==1?zom(F):iA1(F);F.publish("remotePlayerChange")},jKH=function(F,J){if(F.C.playerState!=-1E3){var b= 1085; switch(parseInt(J.params.adState,10)){case 1:b=1081;break;case 2:b=1084;break;case 0:b=1083}F.C.playerState=b;J=parseInt(J.params.currentTime,10);YH(F.C,isNaN(J)?0:J);F.publish("remotePlayerChange")}},GS1=function(F,J){var b=J.params.muted=="true"; F.C.volume=parseInt(J.params.volume,10);F.C.muted=b;F.publish("remotePlayerChange")},V65=function(F,J){F.V=J.params.videoId; F.publish("nowAutoplaying",parseInt(J.params.timeout,10))},PCL=function(F,J){F.V=J.params.videoId||null; F.publish("autoplayUpNext",F.V)},BLk=function(F,J){F.D=J.params.autoplayMode; F.publish("autoplayModeChange",F.D);F.D=="DISABLED"&&F.publish("autoplayDismissed")},TL1=function(F,J){var b=J.params.hasNext=="true"; F.C.Q5=J.params.hasPrevious=="true";F.C.FI=b;F.publish("previousNextChange")},KEb=function(F,J){J=J.message; J.params?cw("Received: action="+J.action+", params="+g.Gq(J.params)):cw("Received: action="+J.action+" {}");switch(J.action){case "loungeStatus":J=JT(J.params.devices);F.T=g.EG(J,function(I){return new MA(I)}); J=!!g.xL(F.T,function(I){return I.type=="LOUNGE_SCREEN"}); lDW(F,J);J=F.L6("mlm");F.publish("multiStateLoopEnabled",J);break;case "loungeScreenDisconnected":g.Lz(F.T,function(I){return I.type=="LOUNGE_SCREEN"}); lDW(F,!1);break;case "remoteConnected":var b=new MA(JT(J.params.device));g.xL(F.T,function(I){return I.Hg(b)})||CGV(F.T,b); break;case "remoteDisconnected":b=new MA(JT(J.params.device));g.Lz(F.T,function(I){return I.Hg(b)}); break;case "gracefulDisconnect":break;case "playlistModified":WE8(F,J,"QUEUE_MODIFIED");break;case "nowPlaying":EPb(F,J);break;case "onStateChange":dKV(F,J);break;case "onAdStateChange":jKH(F,J);break;case "onVolumeChanged":GS1(F,J);break;case "onSubtitlesTrackChanged":fD1(F,J);break;case "nowAutoplaying":V65(F,J);break;case "autoplayDismissed":F.publish("autoplayDismissed");break;case "autoplayUpNext":PCL(F,J);break;case "onAutoplayModeChanged":BLk(F,J);break;case "onHasPreviousNextChanged":TL1(F, J);break;case "requestAssistedSignIn":F.publish("assistedSignInRequested",J.params.authCode);break;case "onLoopModeChanged":F.publish("loopModeChange",J.params.loopMode);break;default:cw("Unrecognized action: "+J.action)}},NLz=function(F){g.m1(F.N); F.N=g.pl(function(){F.eG(1)},864E5)},ny=function(F,J,b){b?cw("Sending: action="+J+", params="+g.Gq(b)):cw("Sending: action="+J); F.U.sendMessage(J,b)},rB5=function(F){Mo.call(this,"ScreenServiceProxy"); this.S6=F;this.C=[];this.C.push(this.S6.$_s("screenChange",(0,g.tJ)(this.D3,this)));this.C.push(this.S6.$_s("onlineScreenChange",(0,g.tJ)(this.byN,this)))},CCt=function(F,J){Qpm(); if(!gv||!gv.get("yt-remote-disable-remote-module-for-dev")){J=g.cT("MDX_CONFIG")||J;BFz();spm();t4||(t4=new HD(J?J.loungeApiHost:void 0),Rz1()&&(t4.C="/api/loungedev"));Z2||(Z2=g.kC("yt.mdx.remote.deferredProxies_")||[],g.RG("yt.mdx.remote.deferredProxies_",Z2));SZ1();var b=Hw();if(!b){var I=new eC(t4,J?J.disableAutomaticScreenCache||!1:!1);g.RG("yt.mdx.remote.screenService_",I);b=Hw();var u={};J&&(u={appId:J.appId,disableDial:J.disableDial,theme:J.theme,loadCastApiSetupScript:J.loadCastApiSetupScript, disableCastApi:J.disableCastApi,enableDialLoungeToken:J.enableDialLoungeToken,enableCastLoungeToken:J.enableCastLoungeToken,forceMirroring:J.forceMirroring});g.RG("yt.mdx.remote.enableConnectWithInitialState_",J?J.enableConnectWithInitialState||!1:!1);ZDt(F,I,function(w){w?Ly()&&rW(Ly(),"YouTube TV"):I.subscribe("onlineScreenChange",function(){ml("yt-remote-receiver-availability-change")})},u)}J&&!g.kC("yt.mdx.remote.initialized_")&&(g.RG("yt.mdx.remote.initialized_",!0),FD("Initializing: "+g.Gq(J)), Jm.push(g.b0("yt-remote-cast2-api-ready",function(){ml("yt-remote-api-ready")})),Jm.push(g.b0("yt-remote-cast2-availability-change",function(){ml("yt-remote-receiver-availability-change")})),Jm.push(g.b0("yt-remote-cast2-receiver-selected",function(){bc(null); ml("yt-remote-auto-connect","cast-selector-receiver")})),Jm.push(g.b0("yt-remote-cast2-receiver-resumed",function(){ml("yt-remote-receiver-resumed","cast-selector-receiver")})),Jm.push(g.b0("yt-remote-cast2-session-change",sKe)),Jm.push(g.b0("yt-remote-connection-change",function(w){w?rW(Ly(),"YouTube TV"):IP()||(rW(null,null),JBz())})),Jm.push(g.b0("yt-remote-cast2-session-failed",function(){ml("yt-remote-connection-failed")})),F=YZH(),J.isAuto&&(F.id+="#dial"),u=J.capabilities||[],g.Nk("desktop_enable_autoplay")&& u.push("atp"),u.length>0&&(F.capabilities=u),F.name=J.device,F.app=J.app,(J=J.theme)&&(F.theme=J),FD(" -- with channel params: "+g.Gq(F)),F?(g.rm("yt-remote-session-app",F.app),g.rm("yt-remote-session-name",F.name)):(g.sy("yt-remote-session-app"),g.sy("yt-remote-session-name")),g.RG("yt.mdx.remote.channelParams_",F),b.start(),Ly()||$KL())}},Xrb=function(){var F=Hw().S6.$_gos(); var J=uc();J&&wz()&&(PJt(F,J)||F.push(J));return V48(F)},RoR=function(){var F=QKW(); !F&&Bw()&&FEk()&&(F={key:"cast-selector-receiver",name:FEk()});return F},QKW=function(){var F=Xrb(),J=uc(); J||(J=IP());return g.xL(F,function(b){return J&&qA(J,b.key)?!0:!1})},uc=function(){var F=Ly(); if(!F)return null;var J=Hw().KD();return av(J,F)},sKe=function(F){FD("remote.onCastSessionChange_: "+vD(F)); if(F){var J=uc();if(J&&J.id==F.id){if(rW(J.id,"YouTube TV"),F.idType=="shortLived"&&(F=F.token))MW&&(MW.token=F),(J=wz())&&J.nA(F)}else J&&Am(),qW(F,1)}else wz()&&Am()},Am=function(){TW()?Pw().stopSession():Vs("stopSession called before API ready."); var F=wz();F&&(F.disconnect(1),DKU(null))},kSU=function(){var F=wz(); return!!F&&F.getProxyState()!=3},FD=function(F){J4("remote",F)},Hw=function(){if(!OAU){var F=g.kC("yt.mdx.remote.screenService_"); OAU=F?new rB5(F):null}return OAU},Ly=function(){return g.kC("yt.mdx.remote.currentScreenId_")},oPU=function(F){g.RG("yt.mdx.remote.currentScreenId_",F)},hoV=function(){return g.kC("yt.mdx.remote.connectData_")},bc=function(F){g.RG("yt.mdx.remote.connectData_",F)},wz=function(){return g.kC("yt.mdx.remote.connection_")},DKU=function(F){var J=wz(); bc(null);F||oPU("");g.RG("yt.mdx.remote.connection_",F);Z2&&(g.gy(Z2,function(b){b(F)}),Z2.length=0); J&&!F?ml("yt-remote-connection-change",!1):!J&&F&&ml("yt-remote-connection-change",!0)},IP=function(){var F=g.Yq(); if(!F)return null;var J=Hw();if(!J)return null;J=J.KD();return av(J,F)},qW=function(F,J){Ly(); uc()&&uc();if(vJ)MW=F;else{oPU(F.id);var b=g.kC("yt.mdx.remote.enableConnectWithInitialState_")||!1;F=new xH(t4,F,YZH(),b);F.connect(J,hoV());F.subscribe("beforeDisconnect",function(I){ml("yt-remote-before-disconnect",I)}); F.subscribe("beforeDispose",function(){wz()&&(wz(),DKU(null))}); F.subscribe("browserChannelAuthError",function(){var I=uc();I&&I.idType=="shortLived"&&(TW()?Pw().handleBrowserChannelAuthError():Vs("refreshLoungeToken called before API ready."))}); DKU(F)}},$KL=function(){var F=IP(); F?(FD("Resume connection to: "+vD(F)),qW(F,0)):(pN(),JBz(),FD("Skipping connecting because no session screen found."))},SZ1=function(){var F=YZH(); if(g.Vj(F)){F=KN();var J=g.S9("yt-remote-session-name")||"",b=g.S9("yt-remote-session-app")||"";F={device:"REMOTE_CONTROL",id:F,name:J,app:b,mdxVersion:3};F.authuser=String(g.cT("SESSION_INDEX","0"));(J=g.cT("DELEGATED_SESSION_ID"))&&(F.pageId=String(J));g.RG("yt.mdx.remote.channelParams_",F)}},YZH=function(){return g.kC("yt.mdx.remote.channelParams_")||{}},xKH=function(F,J,b){g.R.call(this); var I=this;this.module=F;this.G=J;this.OI=b;this.events=new g.s5(this);this.Z=!1;this.D=new g.FC(64);this.C=new g.ty(this.M7,500,this);this.U=new g.ty(this.EH,1E3,this);this.V=new zH(this.juG,0,this);this.T={};this.Y=new g.ty(this.i9,1E3,this);this.W=new NA(this.seekTo,1E3,this);this.N=this.events.B(this.G,"onVolumeChange",function(u){cB8(I,u)}); g.k(this,this.events);this.events.B(J,"onCaptionsTrackListChanged",this.ztR);this.events.B(J,"captionschanged",this.NwG);this.events.B(J,"captionssettingschanged",this.KH);this.events.B(J,"videoplayerreset",this.ub);this.events.B(J,"mdxautoplaycancel",function(){I.OI.bj()}); J.S("enable_mdx_video_play_directly")&&this.events.B(J,"videodatachange",function(){UKW(I.module)||aP(I)||eT(I,0)}); F=this.OI;F.iR();F.subscribe("proxyStateChange",this.tW,this);F.subscribe("remotePlayerChange",this.w3,this);F.subscribe("remoteQueueChange",this.ub,this);F.subscribe("previousNextChange",this.hW,this);F.subscribe("nowAutoplaying",this.QK,this);F.subscribe("autoplayDismissed",this.sR,this);g.k(this,this.C);g.k(this,this.U);g.k(this,this.V);g.k(this,this.Y);g.k(this,this.W);this.KH();this.ub();this.w3()},cB8=function(F,J){if(aP(F)){F.OI.unsubscribe("remotePlayerChange",F.w3,F); var b=Math.round(J.volume);J=!!J.muted;var I=R$(F.OI);if(b!==I.volume||J!==I.muted)F.OI.setVolume(b,J),F.Y.start();F.OI.subscribe("remotePlayerChange",F.w3,F)}},nPm=function(F){F.Q6(0); F.C.stop();F.gY(new g.FC(64))},t6b=function(F,J){if(aP(F)&&!F.Z){var b=null; J&&(b={style:F.G.getSubtitlesUserSettings()},Object.assign(b,J));F.OI.OZ(F.G.getVideoData(1).videoId,b);F.T=R$(F.OI).trackData}},eT=function(F,J){var b=F.G.getPlaylist(); if(b==null?0:b.listId){var I=b.index;var u=b.listId.toString()}b=F.G.getVideoData(1);F.OI.playVideo(b.videoId,J,I,u,b.playerParams,b.WN,$rt(b));F.gY(new g.FC(1))},ZAb=function(F,J){if(J){var b=F.G.getOption("captions","tracklist",{K6:1}); b&&b.length?(F.G.setOption("captions","track",J),F.Z=!1):(F.G.loadModule("captions"),F.Z=!0)}else F.G.setOption("captions","track",{})},aP=function(F){return R$(F.OI).videoId===F.G.getVideoData(1).videoId},KP=function(){g.U.call(this,{X:"div", K:"ytp-mdx-popup-dialog",L:{role:"dialog"},j:[{X:"div",K:"ytp-mdx-popup-dialog-inner-content",j:[{X:"div",K:"ytp-mdx-popup-title",sQ:"No has iniciado sesi\u00f3n"},{X:"div",K:"ytp-mdx-popup-description",sQ:"Los v\u00eddeos que veas podr\u00edan aparecer en el historial de reproducciones de la TV e influir en las recomendaciones. Puedes evitarlo si cancelas e inicias sesi\u00f3n en YouTube desde tu ordenador."},{X:"div",K:"ytp-mdx-privacy-popup-buttons",j:[{X:"button",Dv:["ytp-button","ytp-mdx-privacy-popup-cancel"], sQ:"Cancelar"},{X:"button",Dv:["ytp-button","ytp-mdx-privacy-popup-confirm"],sQ:"Confirmar"}]}]}]});this.C=new g.ZU(this,250);this.cancelButton=this.RI("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.RI("ytp-mdx-privacy-popup-confirm");g.k(this,this.C);this.B(this.cancelButton,"click",this.U);this.B(this.confirmButton,"click",this.T)},pP=function(F){g.U.call(this,{X:"div", K:"ytp-remote",j:[{X:"div",K:"ytp-remote-display-status",j:[{X:"div",K:"ytp-remote-display-status-icon",j:[g.guG()]},{X:"div",K:"ytp-remote-display-status-text",sQ:"{{statustext}}"}]}]});this.api=F;this.C=new g.ZU(this,250);g.k(this,this.C);this.B(F,"presentingplayerstatechange",this.onStateChange);this.aC(F.getPlayerStateObject())},gz=function(F,J){g.tZ.call(this,"Reproducir en",1,F,J); this.G=F;this.Nl={};this.B(F,"onMdxReceiversChange",this.Z);this.B(F,"presentingplayerstatechange",this.Z);this.Z()},HAz=function(F){g.GN.call(this,F); this.jl={key:GTR(),name:"Este ordenador"};this.Ad=null;this.subscriptions=[];this.O_=this.OI=null;this.Nl=[this.jl];this.t$=this.jl;this.r0=new g.FC(64);this.uZ=0;this.HD=-1;this.iE=!1;this.Dn=this.m6=null;if(!g.TB(this.player.J())&&!g.sV(this.player.J())){F=this.player;var J=g.aj(F);J&&(J=J.z6())&&(J=new gz(F,J),g.k(this,J));J=new pP(F);g.k(this,J);g.Pp(F,J.element,4);this.m6=new KP;g.k(this,this.m6);g.Pp(F,this.m6.element,4);this.iE=!!IP()}},m3=function(F){F.Dn&&(F.player.removeEventListener("presentingplayerstatechange", F.Dn),F.Dn=null)},LE5=function(F,J,b){F.r0=b; F.player.publish("presentingplayerstatechange",new g.vL(b,J))},yY=function(F,J){if(J.key!==F.t$.key)if(J.key===F.jl.key)Am(); else if(UKW(F)&&FA1(F),F.t$=J,!F.player.J().S("disable_mdx_connection_in_mdx_module_for_music_web")||!g.sV(F.player.J())){var b=F.player.getPlaylistId();var I=F.player.getVideoData(1);var u=I.videoId;if(!b&&!u||(F.player.getAppState()===2||F.player.getAppState()===1)&&F.player.J().S("should_clear_video_data_on_player_cued_unstarted"))I=null;else{var w=F.player.getPlaylist();if(w){var M=[];for(var q=0;q2*this.size&&wv(this),!0):!1}; g.A.get=function(F,J){return Iv(this.U,F)?this.U[F]:J}; g.A.set=function(F,J){Iv(this.U,F)||(this.size+=1,this.C.push(F),this.Qj++);this.U[F]=J}; g.A.forEach=function(F,J){for(var b=this.b7(),I=0;I=I.C.length)return g.qm;var w=I.C[J++];return g.uR(F?w:I.U[w])}; return u}; var lkL={ULQ:"atp",SMG:"ska",cdR:"que",smR:"mus",lcD:"sus",v0v:"dsp",P7Q:"seq",IYz:"mic",NgQ:"dpa",Gi_:"cds",ZcD:"mlm",cNj:"dsdtr",WWD:"ntb",RPz:"vsp",GcI:"scn",NTW:"rpe",aj_:"dcn",bFG:"dcp",hkQ:"pas",mLQ:"drq",icD:"opf",uxI:"els",s5E:"isg",Arj:"svq",XFW:"mvp",G7E:"ads",CsI:"iat"},fk1={GfE:"u",iFE:"cl",hTG:"k",wxN:"i",BgD:"cr",uCG:"m",d__:"g",T3:"up"};MA.prototype.Hg=function(F){return F?this.id==F.id:!1}; var Skz="",gv=null;DjL.prototype.flush=function(F,J){F=F===void 0?[]:F;J=J===void 0?!1:J;if(g.Nk("enable_client_streamz_web")){F=g.N(F);for(var b=F.next();!b.done;b=F.next())b=g.KLa(b.value),b={serializedIncrementBatch:g.zw(b.C())},g.AY("streamzIncremented",b,{sendIsolatedPayload:J})}}; var y2,nDU=OXL("loadCastFramework")||OXL("loadCastApplicationFramework"),HXL=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.Fb(zH,g.R);g.A=zH.prototype;g.A.bG=function(F){this.Z=arguments;this.C=!1;this.J_?this.T=g.L3()+this.gg:this.J_=g.Wj(this.D,this.gg)}; g.A.stop=function(){this.J_&&(g.Qz.clearTimeout(this.J_),this.J_=null);this.T=null;this.C=!1;this.Z=[]}; g.A.pause=function(){++this.U}; g.A.resume=function(){this.U&&(--this.U,!this.U&&this.C&&(this.C=!1,this.W.apply(null,this.Z)))}; g.A.X_=function(){this.stop();zH.k7.X_.call(this)}; g.A.cT=function(){this.J_&&(g.Qz.clearTimeout(this.J_),this.J_=null);this.T?(this.J_=g.Wj(this.D,this.T-g.L3()),this.T=null):this.U?this.C=!0:(this.C=!1,this.W.apply(null,this.Z))};g.z(NA,g.R);g.A=NA.prototype;g.A.g7=function(F){this.T=arguments;this.J_||this.U?this.C=!0:F11(this)}; g.A.stop=function(){this.J_&&(g.Qz.clearTimeout(this.J_),this.J_=null,this.C=!1,this.T=null)}; g.A.pause=function(){this.U++}; g.A.resume=function(){this.U--;this.U||!this.C||this.J_||(this.C=!1,F11(this))}; g.A.X_=function(){g.R.prototype.X_.call(this);this.stop()};l4.prototype.stringify=function(F){return g.Qz.JSON.stringify(F,void 0)}; l4.prototype.parse=function(F){return g.Qz.JSON.parse(F,void 0)};g.Fb(JRH,g.SX);g.Fb(blk,g.SX);var I$1=null;g.Fb(wxk,g.SX);g.Fb(MN8,g.SX);g.Fb(ARt,g.SX);E8.prototype.debug=function(){}; E8.prototype.info=function(){}; E8.prototype.warning=function(){};var mkb={},g6m={};g.A=jH.prototype;g.A.setTimeout=function(F){this.nW=F}; g.A.Nx=function(F){F=F.target;var J=this.KW;J&&g.tz(F)==3?J.g7():this.mA(F)}; g.A.mA=function(F){try{if(F==this.C)a:{var J=g.tz(this.C),b=this.C.U,I=this.C.getStatus();if(!(J<3)&&(J!=3||this.C&&(this.U.U||g.Hj(this.C)||g.Lu(this.C)))){this.fW||J!=4||b==7||(b==8||I<=0?fN(3):fN(2));zyH(this);var u=this.C.getStatus();this.Um=u;var w=px8(this);if(this.W=u==200){if(this.Q2&&!this.zj){b:{if(this.C){var M=g.F5(this.C,"X-HTTP-Initial-Response");if(M&&!g.d5(M)){var q=M;break b}}q=null}if(F=q)this.zj=!0,VNk(this,F);else{this.W=!1;this.D=3;WD(12);V2(this);PD(this);break a}}if(this.WN){F= !0;for(var v;!this.fW&&this.V0&&!this.Om&&(this.Om=!0,this.T.qS(this)):(V2(this),PD(this))}else VNk(this,w);J==4&&V2(this);this.W&&!this.fW&&(J==4?N$1(this.T,this):(this.W=!1,GH(this)))}else g.Yaz(this.C),u==400&&w.indexOf("Unknown SID")> 0?(this.D=3,WD(12)):(this.D=0,WD(13)),V2(this),PD(this)}}}catch(a){}finally{}}; g.A.cancel=function(){this.fW=!0;V2(this)}; g.A.LC=function(){this.Tj=null;var F=Date.now();F-this.bR>=0?(this.dD!=2&&(fN(3),WD(17)),V2(this),this.D=2,PD(this)):ile(this,this.bR-F)}; g.A.getLastError=function(){return this.D}; g.A.qt=function(){return this.C};B$W.prototype.cancel=function(){this.T=rRe(this);if(this.U)this.U.cancel(),this.U=null;else if(this.C&&this.C.size!==0){for(var F=g.N(this.C.values()),J=F.next();!J.done;J=F.next())J.value.cancel();this.C.clear()}};g.A=CiV.prototype;g.A.cw=8;g.A.WD=1;g.A.connect=function(F,J,b,I){WD(0);this.Kk=F;this.fW=J||{};b&&I!==void 0&&(this.fW.OSID=b,this.fW.OAID=I);this.zj=this.NW;this.qf=E6e(this,null,this.Kk);SH(this)}; g.A.disconnect=function(){QRt(this);if(this.WD==3){var F=this.Jz++,J=this.qf.clone();g.zm(J,"SID",this.Z);g.zm(J,"RID",F);g.zm(J,"TYPE","terminate");$w(this,J);F=new jH(this,this.Z,F);F.dD=2;F.Y=Lh(J.clone());J=!1;if(g.Qz.navigator&&g.Qz.navigator.sendBeacon)try{J=g.Qz.navigator.sendBeacon(F.Y.toString(),"")}catch(b){}!J&&g.Qz.Image&&((new Image).src=F.Y,J=!0);J||(F.C=eyU(F.T,null),F.C.send(F.Y));F.Gj=Date.now();GH(F)}hye(this)}; g.A.Ph=function(){return this.WD==0}; g.A.getState=function(){return this.WD}; g.A.NT=function(F){if(this.W)if(this.W=null,this.WD==1){if(!F){this.Jz=Math.floor(Math.random()*1E5);F=this.Jz++;var J=new jH(this,"",F),b=this.N;this.Um&&(b?(b=g.To(b),g.Sq(b,this.Um)):b=this.Um);this.V!==null||this.bR||(J.qf=b,b=null);var I;if(this.cN)a:{for(var u=I=0;u4096){I=u;break a}if(I===4096||u===this.T.length-1){I=u+1;break a}}I= 1E3}else I=1E3;I=kk1(this,J,I);u=this.qf.clone();g.zm(u,"RID",F);g.zm(u,"CVER",22);this.WN&&g.zm(u,"X-HTTP-Session-Id",this.WN);$w(this,u);b&&(this.bR?I="headers="+g.x_(g.DIa(b))+"&"+I:this.V&&g.Wt(u,this.V,b));dkz(this.U,J);this.jZ&&g.zm(u,"TYPE","init");this.cN?(g.zm(u,"$req",I),g.zm(u,"SID","null"),J.Q2=!0,a$8(J,u,null)):a$8(J,u,I);this.WD=2}}else this.WD==3&&(F?Olt(this,F):this.T.length==0||T$V(this.U)||Olt(this))}; g.A.LS=function(){this.Y=null;o61(this);if(this.If&&!(this.nW||this.C==null||this.MI<=0)){var F=2*this.MI;this.kQ=dv((0,g.tJ)(this.LOE,this),F)}}; g.A.LOE=function(){this.kQ&&(this.kQ=null,this.zj=!1,this.nW=!0,WD(10),TH(this),o61(this))}; g.A.qS=function(F){this.C==F&&this.If&&!this.nW&&(Xxz(this),this.nW=!0,WD(11))}; g.A.Ii=function(){this.Tj!=null&&(this.Tj=null,TH(this),f$5(this),WD(19))}; g.A.M6E=function(F){F?WD(2):WD(1)}; g.A.isActive=function(){return!!this.D&&this.D.isActive(this)}; g.A=Uk5.prototype;g.A.w8=function(){}; g.A.Cg=function(){}; g.A.r8=function(){}; g.A.IR=function(){}; g.A.isActive=function(){return!0}; g.A.Cr=function(){};g.Fb(Xg,g.Zr);Xg.prototype.open=function(){this.C.D=this.T;this.W&&(this.C.dD=!0);this.C.connect(this.D,this.U||void 0)}; Xg.prototype.close=function(){this.C.disconnect()}; Xg.prototype.send=function(F){var J=this.C;if(typeof F==="string"){var b={};b.__data__=F;F=b}else this.Z&&(b={},b.__data__=g.Gq(F),F=b);J.T.push(new PiH(J.K7++,F));J.WD==3&&SH(J)}; Xg.prototype.X_=function(){this.C.D=null;delete this.T;this.C.disconnect();delete this.C;Xg.k7.X_.call(this)}; g.Fb(n6b,JRH);g.Fb(tNU,blk);g.Fb(CN,Uk5);CN.prototype.w8=function(){this.C.dispatchEvent("m")}; CN.prototype.Cg=function(F){this.C.dispatchEvent(new n6b(F))}; CN.prototype.r8=function(F){this.C.dispatchEvent(new tNU(F))}; CN.prototype.IR=function(){this.C.dispatchEvent("n")};var Rv=new g.Zr;g.z(L1V,g.SX);g.A=kw.prototype;g.A.vE=null;g.A.Wn=!1;g.A.il=null;g.A.AZ=null;g.A.PO=null;g.A.Wj=null;g.A.ZB=null;g.A.gp=null;g.A.JG=null;g.A.Sm=null;g.A.OP=0;g.A.N7=null;g.A.Aj=null;g.A.oX=null;g.A.GP=-1;g.A.rN=!0;g.A.Xr=!1;g.A.WI=0;g.A.Rp=null;var wKU={},utL={};g.A=kw.prototype;g.A.setTimeout=function(F){this.U=F}; g.A.Uq=function(F){F=F.target;var J=this.Rp;J&&g.tz(F)==3?J.g7():this.UZ(F)}; g.A.UZ=function(F){try{if(F==this.Sm)a:{var J=g.tz(this.Sm),b=this.Sm.U,I=this.Sm.getStatus();if(g.xM&&!g.iV("420+")){if(J<4)break a}else if(J<3||J==3&&!g.Hj(this.Sm))break a;this.Xr||J!=4||b==7||(b==8||I<=0?this.C.Mb(3):this.C.Mb(2));qyU(this);var u=this.Sm.getStatus();this.GP=u;var w=g.Hj(this.Sm);if(this.Wn=u==200){J==4&&O8(this);if(this.WN){for(F=!0;!this.Xr&&this.OP0?(this.oX=3,DE(13)):(this.oX=0,DE(14)),O8(this),vqz(this)}}catch(q){}finally{}}; g.A.cancel=function(){this.Xr=!0;O8(this)}; g.A.wx=function(){this.il=null;var F=Date.now();F-this.AZ>=0?(this.Wj!=2&&this.C.Mb(3),O8(this),this.oX=2,DE(18),vqz(this)):ACm(this,this.AZ-F)}; g.A.getLastError=function(){return this.oX};g.A=pK5.prototype;g.A.qv=null;g.A.Rc=null;g.A.JB=!1;g.A.iI=null;g.A.G6=null;g.A.KN=-1;g.A.qo=null;g.A.EK=null;g.A.connect=function(F){this.iI=F;F=hT(this.C,null,this.iI);DE(3);Date.now();var J=this.C.N;J!=null?(this.qo=J[0],(this.EK=J[1])?(this.G6=1,gqk(this)):(this.G6=2,m1m(this))):(Fg(F,"MODE","init"),this.Rc=new kw(this),this.Rc.vE=this.qv,bwb(this.Rc,F,!1,null,!0),this.G6=0)}; g.A.Kz=function(F){if(F)this.G6=2,m1m(this);else{DE(4);var J=this.C;J.pL=J.zH.KN;nN(J,9)}F&&this.Mb(2)}; g.A.OE=function(F){return this.C.OE(F)}; g.A.abort=function(){this.Rc&&(this.Rc.cancel(),this.Rc=null);this.KN=-1}; g.A.Ph=function(){return!1}; g.A.Tu=function(F,J){this.KN=F.GP;if(this.G6==0)if(J){try{var b=this.U.parse(J)}catch(I){F=this.C;F.pL=this.KN;nN(F,2);return}this.qo=b[0];this.EK=b[1]}else F=this.C,F.pL=this.KN,nN(F,2);else this.G6==2&&(this.JB?(DE(7),Date.now()):J=="11111"?(DE(6),this.JB=!0,Date.now(),this.KN=200,this.Rc.cancel(),DE(12),cD(this.C,this,!0)):(DE(8),Date.now(),this.JB=!1))}; g.A.DH=function(){this.KN=this.Rc.GP;if(this.Rc.Wn)this.G6==0?this.EK?(this.G6=1,gqk(this)):(this.G6=2,m1m(this)):this.G6==2&&(this.JB?(DE(12),cD(this.C,this,!0)):(DE(11),cD(this.C,this,!1)));else{this.G6==0?DE(9):this.G6==2&&DE(10);var F=this.C;this.Rc.getLastError();F.pL=this.KN;nN(F,2)}}; g.A.Re=function(){return this.C.Re()}; g.A.isActive=function(){return this.C.isActive()}; g.A.Mb=function(F){this.C.Mb(F)};g.A=yCb.prototype;g.A.PF=null;g.A.kd=null;g.A.Qz=null;g.A.OV=null;g.A.Mv=null;g.A.Dt=null;g.A.e_=null;g.A.fh=null;g.A.gs=0;g.A.e1=0;g.A.UJ=null;g.A.A$=null;g.A.x8=null;g.A.pI=null;g.A.zH=null;g.A.aF=null;g.A.Ec=-1;g.A.Zm=-1;g.A.pL=-1;g.A.M1=0;g.A.fO=0;g.A.yj=8;g.Fb(zfe,g.SX);g.Fb(Nmz,g.SX);g.A=yCb.prototype;g.A.connect=function(F,J,b,I,u){DE(0);this.Mv=J;this.kd=b||{};I&&u!==void 0&&(this.kd.OSID=I,this.kd.OAID=u);this.Y?(Q2((0,g.tJ)(this.Vg,this,F),100),fve(this)):this.Vg(F)}; g.A.disconnect=function(){Wuk(this);if(this.C==3){var F=this.gs++,J=this.Dt.clone();g.zm(J,"SID",this.Z);g.zm(J,"RID",F);g.zm(J,"TYPE","terminate");xw(this,J);F=new kw(this,this.Z,F);F.Wj=2;F.ZB=Lh(J.clone());(new Image).src=F.ZB.toString();F.PO=Date.now();Ivb(F)}Sy5(this)}; g.A.Vg=function(F){this.zH=new pK5(this);this.zH.qv=this.PF;this.zH.U=this.D;this.zH.connect(F)}; g.A.Ph=function(){return this.C==0}; g.A.getState=function(){return this.C}; g.A.sZ=function(F){this.A$=null;V9e(this,F)}; g.A.XM=function(){this.x8=null;this.OV=new kw(this,this.Z,"rpc",this.V);this.OV.vE=this.PF;this.OV.WI=0;var F=this.e_.clone();g.zm(F,"RID","rpc");g.zm(F,"SID",this.Z);g.zm(F,"CI",this.aF?"0":"1");g.zm(F,"AID",this.Ec);xw(this,F);g.zm(F,"TYPE","xmlhttp");bwb(this.OV,F,!0,this.fh,!1)}; g.A.Tu=function(F,J){if(this.C!=0&&(this.OV==F||this.Qz==F))if(this.pL=F.GP,this.Qz==F&&this.C==3)if(this.yj>7){try{var b=this.D.parse(J)}catch(I){b=null}if(Array.isArray(b)&&b.length==3)if(F=b,F[0]==0)a:{if(!this.x8){if(this.OV)if(this.OV.PO+3E30)){if(I=J==1)this.Qz||this.A$||this.C==1||this.M1>=2?I=!1:(this.A$=Q2((0,g.tJ)(this.sZ,this,F),BmU(this,this.M1)),this.M1++,I=!0);I=!(I||J==2&&Tm5(this))}if(I)switch(b){case 1:nN(this, 5);break;case 4:nN(this,10);break;case 3:nN(this,6);break;case 7:nN(this,12);break;default:nN(this,2)}}}; g.A.TE=function(F){if(!g.te(arguments,this.C))throw Error("Unexpected channel state: "+this.C);}; g.A.f4Q=function(F){F?DE(2):(DE(1),rCR(this,8))}; g.A.OE=function(F){if(F)throw Error("Can't create secondary domain capable XhrIo object.");F=new g.Us;F.V=!1;return F}; g.A.isActive=function(){return!!this.UJ&&this.UJ.isActive(this)}; g.A.Mb=function(F){var J=Rv;J.dispatchEvent(new Nmz(J,F))}; g.A.Re=function(){return!1}; g.A=sg1.prototype;g.A.P7=function(){}; g.A.Gu=function(){}; g.A.u0=function(){}; g.A.EE=function(){}; g.A.RW=function(){return{}}; g.A.isActive=function(){return!0};g.A=Yy8.prototype;g.A.enqueue=function(F){this.U.push(F)}; g.A.isEmpty=function(){return this.C.length===0&&this.U.length===0}; g.A.clear=function(){this.C=[];this.U=[]}; g.A.contains=function(F){return g.te(this.C,F)||g.te(this.U,F)}; g.A.remove=function(F){var J=this.C;var b=(0,g.YB4)(J,F);b>=0?(g.ZH(J,b),J=!0):J=!1;return J||g.Hk(this.U,F)}; g.A.td=function(){for(var F=[],J=this.C.length-1;J>=0;--J)F.push(this.C[J]);J=this.U.length;for(var b=0;b=JA1.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(F=JA1[this.U],this.J_=g.pl((0,g.tJ)(this.W3,this),F),this.U++):this.publish("pairingFailed",Error("Server error "+F.status))}; g.A.RS=function(){this.C=null;this.publish("pairingFailed",Error("Server not responding"))}; var JA1=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.Fb(qo,Mo);g.A=qo.prototype;g.A.start=function(){A4(this)&&this.publish("screenChange");!g.S9("yt-remote-lounge-token-expiration")&&qlb(this);g.m1(this.C);this.C=g.pl((0,g.tJ)(this.start,this),1E4)}; g.A.add=function(F,J){A4(this);usR(this,F);vw(this,!1);this.publish("screenChange");J(F);F.token||qlb(this)}; g.A.remove=function(F,J){var b=A4(this);MRz(this,F)&&(vw(this,!1),b=!0);J(F);b&&this.publish("screenChange")}; g.A.jL=function(F,J,b,I){var u=A4(this),w=this.get(F.id);w?(w.name!=J&&(w.name=J,vw(this,!1),u=!0),b(F)):I(Error("no such local screen."));u&&this.publish("screenChange")}; g.A.X_=function(){g.m1(this.C);qo.k7.X_.call(this)}; g.A.wNQ=function(F){A4(this);var J=this.screens.length;F=F&&F.screens||[];for(var b=F.length,I=0;I20)break a;q=J(w,M)}w=q}u.name=w}b(Ky(this,u))},this), onError:(0,g.tJ)(function(u){I(Error("pairing request failed: "+u.status))},this), onTimeout:(0,g.tJ)(function(){I(Error("pairing request timed out."))},this)})}; g.A.X_=function(){g.q8(this.U);g.q8(this.C);eC.k7.X_.call(this)}; g.A.R__=function(){lZe(this);this.publish("screenChange");this.C.update()}; eC.prototype.dispose=eC.prototype.dispose;g.Fb(py,g.uA);g.A=py.prototype;g.A.mS=function(F){this.iR()||(F&&(mm(this,""+F),this.publish("sessionFailed")),this.C=null,this.publish("sessionScreen",null))}; g.A.info=function(F){J4(this.WN,F)}; g.A.W7=function(){return null}; g.A.GK=function(F){var J=this.U;F?(J.displayStatus=new chrome.cast.ReceiverDisplayStatus(F,[]),J.displayStatus.showStop=!0):J.displayStatus=null;chrome.cast.setReceiverDisplayStatus(J,(0,g.tJ)(function(){this.info("Updated receiver status for "+J.friendlyName+": "+F)},this),(0,g.tJ)(function(){mm(this,"Failed to update receiver status for: "+J.friendlyName)},this))}; g.A.X_=function(){this.GK("");py.k7.X_.call(this)};g.z(ys,py);g.A=ys.prototype;g.A.Xy=function(F){if(this.T){if(this.T==F)return;mm(this,"Overriding cast session with new session object");Slt(this);this.Gj=!1;this.N="unknown";this.T.removeUpdateListener(this.eE);this.T.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.kQ)}this.T=F;this.T.addUpdateListener(this.eE);this.T.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.kQ);VRU(this,"getMdxSessionStatus")}; g.A.UX=function(F){this.info("launchWithParams no-op for Cast: "+g.Gq(F))}; g.A.stop=function(){this.T?this.T.stop((0,g.tJ)(function(){this.mS()},this),(0,g.tJ)(function(){this.mS(Error("Failed to stop receiver app."))},this)):this.mS(Error("Stopping cast device without session."))}; g.A.GK=function(){}; g.A.X_=function(){this.info("disposeInternal");Slt(this);this.T&&(this.T.removeUpdateListener(this.eE),this.T.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.kQ));this.T=null;py.prototype.X_.call(this)}; g.A.O7v=function(F,J){if(!this.iR())if(J)if(J=JT(J),g.Um(J))switch(F=""+J.type,J=J.data||{},this.info("onYoutubeMessage_: "+F+" "+g.Gq(J)),F){case "mdxSessionStatus":Euz(this,J);break;case "loungeToken":PaW(this,J);break;default:mm(this,"Unknown youtube message: "+F)}else mm(this,"Unable to parse message.");else mm(this,"No data in message.")}; g.A.ag=function(F,J,b,I){g.m1(this.Y);this.Y=0;iDR(this.Z,this.U.label,F,this.U.friendlyName,(0,g.tJ)(function(u){u?J(u):I>=0?(mm(this,"Screen "+F+" appears to be offline. "+I+" retries left."),this.Y=g.pl((0,g.tJ)(this.ag,this,F,J,b,I-1),300)):b(Error("Unable to fetch screen."))},this),b)}; g.A.W7=function(){return this.T}; g.A.gx=function(F){this.iR()||F||(mm(this,"Cast session died."),this.mS())};g.z(zW,py);g.A=zW.prototype;g.A.Xy=function(F){this.T=F;this.T.addUpdateListener(this.fW)}; g.A.UX=function(F){this.qf=F;this.Tj()}; g.A.stop=function(){DPH(this);this.T?this.T.stop((0,g.tJ)(this.mS,this,null),(0,g.tJ)(this.mS,this,"Failed to stop DIAL device.")):this.mS()}; g.A.X_=function(){DPH(this);this.T&&this.T.removeUpdateListener(this.fW);this.T=null;py.prototype.X_.call(this)}; g.A.WW=function(F){this.iR()||F||(mm(this,"DIAL session died."),this.D(),this.D=function(){},this.mS())};g.z(fy,py);fy.prototype.stop=function(){this.mS()}; fy.prototype.Xy=function(){}; fy.prototype.UX=function(){g.m1(this.T);this.T=NaN;var F=av(this.Z.KD(),this.U.label);F?gW(this,F):this.mS(Error("No such screen"))}; fy.prototype.X_=function(){g.m1(this.T);this.T=NaN;py.prototype.X_.call(this)};g.z(Ww,g.uA);g.A=Ww.prototype; g.A.init=function(F,J){chrome.cast.timeout.requestSession=3E4;var b=new chrome.cast.SessionRequest(this.Y,[chrome.cast.Capability.AUDIO_OUT]);g.Nk("desktop_enable_cast_connect")&&(b.androidReceiverCompatible=!0);this.N||(b.dialRequest=new chrome.cast.DialRequest("YouTube"));var I=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;F=F||this.W?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var u=(0,g.tJ)(this.Oef,this);b=new chrome.cast.ApiConfig(b,(0,g.tJ)(this.FD, this),u,I,F);b.customDialLaunchCallback=(0,g.tJ)(this.PXQ,this);chrome.cast.initialize(b,(0,g.tJ)(function(){this.iR()||(chrome.cast.addReceiverActionListener(this.D),FH1(),this.U.subscribe("onlineScreenChange",(0,g.tJ)(this.Ay,this)),this.T=ouL(this),chrome.cast.setCustomReceivers(this.T,function(){},(0,g.tJ)(function(w){this.ST("Failed to set initial custom receivers: "+g.Gq(w))},this)),this.publish("yt-remote-cast2-availability-change",E2(this)),J(!0))},this),(0,g.tJ)(function(w){this.ST("Failed to initialize API: "+ g.Gq(w)); J(!1)},this))}; g.A.Fu_=function(F,J){dW("Setting connected screen ID: "+F+" -> "+J);if(this.C){var b=this.C.C;if(!F||b&&b.id!=F)dW("Unsetting old screen status: "+this.C.U.friendlyName),jC(this,null)}if(F&&J){if(!this.C){F=av(this.U.KD(),F);if(!F){dW("setConnectedScreenStatus: Unknown screen.");return}if(F.idType=="shortLived"){dW("setConnectedScreenStatus: Screen with id type to be short lived.");return}b=klV(this,F);b||(dW("setConnectedScreenStatus: Connected receiver not custom..."),b=new chrome.cast.Receiver(F.uuid? F.uuid:F.id,F.name),b.receiverType=chrome.cast.ReceiverType.CUSTOM,this.T.push(b),chrome.cast.setCustomReceivers(this.T,function(){},(0,g.tJ)(function(I){this.ST("Failed to set initial custom receivers: "+g.Gq(I))},this))); dW("setConnectedScreenStatus: new active receiver: "+b.friendlyName);jC(this,new fy(this.U,b),!0)}this.C.GK(J)}else dW("setConnectedScreenStatus: no screen.")}; g.A.Jwf=function(F){this.iR()?this.ST("Setting connection data on disposed cast v2"):this.C?this.C.UX(F):this.ST("Setting connection data without a session")}; g.A.Oq=function(){this.iR()?this.ST("Stopping session on disposed cast v2"):this.C?(this.C.stop(),jC(this,null)):dW("Stopping non-existing session")}; g.A.requestSession=function(){chrome.cast.requestSession((0,g.tJ)(this.FD,this),(0,g.tJ)(this.yFN,this))}; g.A.X_=function(){this.U.unsubscribe("onlineScreenChange",(0,g.tJ)(this.Ay,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.D);var F=ZwV,J=g.kC("yt.mdx.remote.debug.handlers_");g.Hk(J||[],F);g.q8(this.C);g.uA.prototype.X_.call(this)}; g.A.ST=function(F){J4("Controller",F)}; g.A.vB=function(F,J){this.C==F&&(J||jC(this,null),this.publish("yt-remote-cast2-session-change",J))}; g.A.go_=function(F,J){if(!this.iR())if(F)switch(F.friendlyName=chrome.cast.unescape(F.friendlyName),dW("onReceiverAction_ "+F.label+" / "+F.friendlyName+"-- "+J),J){case chrome.cast.ReceiverAction.CAST:if(this.C)if(this.C.U.label!=F.label)dW("onReceiverAction_: Stopping active receiver: "+this.C.U.friendlyName),this.C.stop();else{dW("onReceiverAction_: Casting to active receiver.");this.C.C&&this.publish("yt-remote-cast2-session-change",this.C.C);break}switch(F.receiverType){case chrome.cast.ReceiverType.CUSTOM:jC(this, new fy(this.U,F));break;case chrome.cast.ReceiverType.DIAL:jC(this,new zW(this.U,F,this.Z,this.config_));break;case chrome.cast.ReceiverType.CAST:jC(this,new ys(this.U,F,this.config_));break;default:this.ST("Unknown receiver type: "+F.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.C&&this.C.U.label==F.label?this.C.stop():this.ST("Stopping receiver w/o session: "+F.friendlyName)}else this.ST("onReceiverAction_ called without receiver.")}; g.A.PXQ=function(F){if(this.iR())return Promise.reject(Error("disposed"));var J=F.receiver;J.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.ST("Not DIAL receiver: "+J.friendlyName),J.receiverType=chrome.cast.ReceiverType.DIAL);var b=this.C?this.C.U:null;if(!b||b.label!=J.label)return this.ST("Receiving DIAL launch request for non-clicked DIAL receiver: "+J.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(b&&b.label==J.label&&b.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.C.C)return dW("Reselecting dial screen."), this.publish("yt-remote-cast2-session-change",this.C.C),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.ST('Changing CAST intent from "'+b.receiverType+'" to "dial" for '+J.friendlyName);jC(this,new zW(this.U,J,this.Z,this.config_))}J=this.C;J.Y=F;J.Y.appState==chrome.cast.DialAppState.RUNNING?(F=J.Y.extraData||{},b=F.screenId||null,No(J)&&F.loungeToken?F.loungeTokenRefreshIntervalMs?F=X$L(J,{name:J.U.friendlyName,screenId:F.screenId,loungeToken:F.loungeToken,dialId:J.Y.receiver.label, screenIdType:"shortLived"},F.loungeTokenRefreshIntervalMs):(g.nX(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(F)+".")),F=Qe8(J,b)):F=Qe8(J,b)):F=$P5(J);return F}; g.A.FD=function(F){var J=this;if(!this.iR()&&!this.W){dW("New cast session ID: "+F.sessionId);var b=F.receiver;if(b.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.C)if(b.receiverType==chrome.cast.ReceiverType.CAST)dW("Got resumed cast session before resumed mdx connection."),b.friendlyName=chrome.cast.unescape(b.friendlyName),jC(this,new ys(this.U,b,this.config_),!0);else{this.ST("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var I=this.C.U,u=av(this.U.KD(), I.label);u&&qA(u,b.label)&&I.receiverType!=chrome.cast.ReceiverType.CAST&&b.receiverType==chrome.cast.ReceiverType.CAST&&(dW("onSessionEstablished_: manual to cast session change "+b.friendlyName),g.q8(this.C),this.C=new ys(this.U,b,this.config_),this.C.subscribe("sessionScreen",(0,g.tJ)(this.vB,this,this.C)),this.C.subscribe("sessionFailed",function(){return ODW(J,J.C)}),this.C.UX(null)); this.C.Xy(F)}}}; g.A.Ak=function(){return this.C?this.C.W7():null}; g.A.yFN=function(F){this.iR()||(this.ST("Failed to estabilish a session: "+g.Gq(F)),F.code!=chrome.cast.ErrorCode.CANCEL&&jC(this,null),this.publish("yt-remote-cast2-session-failed"))}; g.A.Oef=function(F){dW("Receiver availability updated: "+F);if(!this.iR()){var J=E2(this);this.V=F==chrome.cast.ReceiverAvailability.AVAILABLE;E2(this)!=J&&this.publish("yt-remote-cast2-availability-change",E2(this))}}; g.A.Ay=function(){this.iR()||(this.T=ouL(this),dW("Updating custom receivers: "+g.Gq(this.T)),chrome.cast.setCustomReceivers(this.T,function(){},(0,g.tJ)(function(){this.ST("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",E2(this)))}; Ww.prototype.setLaunchParams=Ww.prototype.Jwf;Ww.prototype.setConnectedScreenStatus=Ww.prototype.Fu_;Ww.prototype.stopSession=Ww.prototype.Oq;Ww.prototype.getCastSession=Ww.prototype.Ak;Ww.prototype.requestSession=Ww.prototype.requestSession;Ww.prototype.init=Ww.prototype.init;Ww.prototype.dispose=Ww.prototype.dispose;var LH5=[];g.A=SC.prototype; g.A.reset=function(F){this.listId="";this.index=-1;this.videoId="";wrR(this);this.volume=-1;this.muted=!1;F&&(this.index=F.index,this.listId=F.listId,this.videoId=F.videoId,this.playerState=F.playerState,this.volume=F.volume,this.muted=F.muted,this.audioTrackId=F.audioTrackId,this.trackData=F.trackData,this.Q5=F.hasPrevious,this.FI=F.hasNext,this.V=F.playerTime,this.W=F.playerTimeAt,this.Z=F.seekableStart,this.C=F.seekableEnd,this.D=F.duration,this.Y=F.loadedTime,this.T=F.liveIngestionTime,this.U= !isNaN(this.T))}; g.A.isPlaying=function(){return this.playerState==1}; g.A.isBuffering=function(){return this.playerState==3}; g.A.zc=function(){return this.playerState==1081}; g.A.GI=function(F){this.D=isNaN(F)?0:F}; g.A.getDuration=function(){return this.U?this.D+s2(this):this.D}; g.A.clone=function(){return new SC(M6m(this))};g.z(Qs,g.uA);g.A=Qs.prototype;g.A.getState=function(){return this.T}; g.A.C3=function(){return this.Z.getReconnectTimeout()}; g.A.Da=function(){this.Z.reconnect()}; g.A.play=function(){D2(this)?(this.C?this.C.play(null,g.ac,h4(this,"play")):o$(this,"play"),vPU(this,1,$H(R$(this))),this.publish("remotePlayerChange")):kH(this,this.play)}; g.A.pause=function(){D2(this)?(this.C?this.C.pause(null,g.ac,h4(this,"pause")):o$(this,"pause"),vPU(this,2,$H(R$(this))),this.publish("remotePlayerChange")):kH(this,this.pause)}; g.A.seekTo=function(F){if(D2(this)){if(this.C){var J=R$(this),b=new chrome.cast.media.SeekRequest;b.currentTime=F;J.isPlaying()||J.isBuffering()?b.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:b.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.C.seek(b,g.ac,h4(this,"seekTo",{newTime:F}))}else o$(this,"seekTo",{newTime:F});vPU(this,3,F);this.publish("remotePlayerChange")}else kH(this,g.Ha(this.seekTo,F))}; g.A.stop=function(){if(D2(this)){this.C?this.C.stop(null,g.ac,h4(this,"stopVideo")):o$(this,"stopVideo");var F=R$(this);F.index=-1;F.videoId="";wrR(F);O2(this,F);this.publish("remotePlayerChange")}else kH(this,this.stop)}; g.A.setVolume=function(F,J){if(D2(this)){var b=R$(this);if(this.U){if(b.volume!=F){var I=Math.round(F)/100;this.U.setReceiverVolumeLevel(I,(0,g.tJ)(function(){bn("set receiver volume: "+I)},this),(0,g.tJ)(function(){this.ST("failed to set receiver volume.")},this))}b.muted!=J&&this.U.setReceiverMuted(J,(0,g.tJ)(function(){bn("set receiver muted: "+J)},this),(0,g.tJ)(function(){this.ST("failed to set receiver muted.")},this))}else{var u={volume:F, muted:J};b.volume!=-1&&(u.delta=F-b.volume);o$(this,"setVolume",u)}b.muted=J;b.volume=F;O2(this,b)}else kH(this,g.Ha(this.setVolume,F,J))}; g.A.OZ=function(F,J){if(D2(this)){var b=R$(this);F={videoId:F};J&&(b.trackData={trackName:J.name,languageCode:J.languageCode,sourceLanguageCode:J.translationLanguage?J.translationLanguage.languageCode:"",languageName:J.languageName,kind:J.kind},F.style=g.Gq(J.style),g.Sq(F,b.trackData));o$(this,"setSubtitlesTrack",F);O2(this,b)}else kH(this,g.Ha(this.OZ,F,J))}; g.A.setAudioTrack=function(F,J){D2(this)?(J=J.getLanguageInfo().getId(),o$(this,"setAudioTrack",{videoId:F,audioTrackId:J}),F=R$(this),F.audioTrackId=J,O2(this,F)):kH(this,g.Ha(this.setAudioTrack,F,J))}; g.A.playVideo=function(F,J,b,I,u,w,M){I=I===void 0?null:I;u=u===void 0?null:u;w=w===void 0?null:w;M=M===void 0?null:M;var q=R$(this),v={videoId:F};b!==void 0&&(v.currentIndex=b);Cy(q,F,b||0);J!==void 0&&(YH(q,J),v.currentTime=J);I&&(v.listId=I);u&&(v.playerParams=u);w&&(v.clickTrackingParams=w);M&&(v.locationInfo=g.Gq(M));o$(this,"setPlaylist",v);I||O2(this,q)}; g.A.hB=function(F,J){if(D2(this)){if(F&&J){var b=R$(this);Cy(b,F,J);O2(this,b)}o$(this,"previous")}else kH(this,g.Ha(this.hB,F,J))}; g.A.nextVideo=function(F,J){if(D2(this)){if(F&&J){var b=R$(this);Cy(b,F,J);O2(this,b)}o$(this,"next")}else kH(this,g.Ha(this.nextVideo,F,J))}; g.A.Kn=function(){if(D2(this)){o$(this,"clearPlaylist");var F=R$(this);F.reset();O2(this,F);this.publish("remotePlayerChange")}else kH(this,this.Kn)}; g.A.bj=function(){D2(this)?o$(this,"dismissAutoplay"):kH(this,this.bj)}; g.A.dispose=function(){if(this.T!=3){var F=this.T;this.T=3;this.publish("proxyStateChange",F,this.T)}g.uA.prototype.dispose.call(this)}; g.A.X_=function(){qZz(this);this.Z=null;this.D.clear();XO(this,null);g.uA.prototype.X_.call(this)}; g.A.WA=function(F){if((F!=this.T||F==2)&&this.T!=3&&F!=0){var J=this.T;this.T=F;this.publish("proxyStateChange",J,F);if(F==1)for(;!this.D.isEmpty();)J=F=this.D,J.C.length===0&&(J.C=J.U,J.C.reverse(),J.U=[]),F.C.pop().apply(this);else F==3&&this.dispose()}}; g.A.PCQ=function(F,J){this.publish(F,J)}; g.A.CX_=function(F){if(!F)this.bV(null),XO(this,null);else if(this.U.receiver.volume){F=this.U.receiver.volume;var J=R$(this),b=Math.round(100*F.level||0);if(J.volume!=b||J.muted!=F.muted)bn("Cast volume update: "+F.level+(F.muted?" muted":"")),J.volume=b,J.muted=!!F.muted,O2(this,J)}}; g.A.bV=function(F){bn("Cast media: "+!!F);this.C&&this.C.removeUpdateListener(this.Y);if(this.C=F)this.C.addUpdateListener(this.Y),aDm(this),this.publish("remotePlayerChange")}; g.A.r_G=function(F){F?(aDm(this),this.publish("remotePlayerChange")):this.bV(null)}; g.A.NF=function(){o$(this,"sendDebugCommand",{debugCommand:"stats4nerds "})}; g.A.UIN=function(){var F=bAb();F&&XO(this,F)}; g.A.ST=function(F){J4("CP",F)};g.z(xH,g.uA);g.A=xH.prototype; g.A.connect=function(F,J){if(J){var b=J.listId,I=J.videoId,u=J.videoIds,w=J.playerParams,M=J.clickTrackingParams,q=J.index,v={videoId:I},a=J.currentTime,e=J.locationInfo;J=J.loopMode;a!==void 0&&(v.currentTime=a<=5?0:a);w&&(v.playerParams=w);e&&(v.locationInfo=e);M&&(v.clickTrackingParams=M);b&&(v.listId=b);u&&u.length>0&&(v.videoIds=u.join(","));q!==void 0&&(v.currentIndex=q);this.fW&&(v.loopMode=J||"LOOP_MODE_OFF");b&&(this.C.listId=b);this.C.videoId=I;this.C.index=q||0;this.C.state=3;YH(this.C, a);this.D="UNSUPPORTED";b=this.fW?"setInitialState":"setPlaylist";cw("Connecting with "+b+" and params: "+g.Gq(v));this.U.connect({method:b,params:g.Gq(v)},F,YkR())}else cw("Connecting without params"),this.U.connect({},F,YkR());gPW(this)}; g.A.nA=function(F){this.U.nA(F)}; g.A.dispose=function(){this.iR()||(g.RG("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),U2(this,3));g.uA.prototype.dispose.call(this)}; g.A.X_=function(){mKt(this);iA1(this);yBU(this);g.m1(this.Y);this.Y=NaN;g.m1(this.N);this.N=NaN;this.Z=null;g.fw(this.Tj);this.Tj.length=0;this.U.dispose();g.uA.prototype.X_.call(this);this.D=this.V=this.T=this.C=this.U=null}; g.A.L6=function(F){if(!this.T||this.T.length===0)return!1;for(var J=g.N(this.T),b=J.next();!b.done;b=J.next())if(!b.value.capabilities.has(F))return!1;return!0}; g.A.zG=function(){var F=3;this.iR()||(F=0,isNaN(this.B2())?this.U.kW()&&isNaN(this.W)&&(F=1):F=2);return F}; g.A.eG=function(F){cw("Disconnecting with "+F);g.RG("yt.mdx.remote.remoteClient_",null);mKt(this);this.publish("beforeDisconnect",F);F==1&&pN();this.U.disconnect(F);this.dispose()}; g.A.Eb=function(){var F=this.C;this.Z&&(F=this.C.clone(),Cy(F,this.Z,F.index));return M6m(F)}; g.A.YoI=function(F){var J=this,b=new SC(F);b.videoId&&b.videoId!=this.C.videoId&&(this.Z=b.videoId,g.m1(this.Y),this.Y=g.pl(function(){if(J.Z){var u=J.Z;J.Z=null;J.C.videoId!=u&&ny(J,"getNowPlaying")}},5E3)); var I=[];this.C.listId==b.listId&&this.C.videoId==b.videoId&&this.C.index==b.index||I.push("remoteQueueChange");this.C.playerState==b.playerState&&this.C.volume==b.volume&&this.C.muted==b.muted&&$H(this.C)==$H(b)&&g.Gq(this.C.trackData)==g.Gq(b.trackData)||I.push("remotePlayerChange");this.C.reset(F);g.gy(I,function(u){this.publish(u)},this)}; g.A.JA=function(){var F=this.U.getDeviceId(),J=g.xL(this.T,function(b){return b.type=="REMOTE_CONTROL"&&b.id!=F}); return J?J.id:""}; g.A.B2=function(){return this.U.C3()}; g.A.sb=function(){return this.D||"UNSUPPORTED"}; g.A.uL=function(){return this.V||""}; g.A.qX=function(){!isNaN(this.B2())&&this.U.Da()}; g.A.KuG=function(F,J){ny(this,F,J);NLz(this)}; g.A.qC=function(){var F=g.$6("SAPISID","")||g.$6("__Secure-1PAPISID")||"",J=g.$6("__Secure-3PAPISID","")||"";if(!F&&!J)return"";F=g.zw(g.lW(F),2);J=g.zw(g.lW(J),2);return g.zw(g.lW(","+F+","+J),2)}; xH.prototype.subscribe=xH.prototype.subscribe;xH.prototype.unsubscribeByKey=xH.prototype.gB;xH.prototype.getProxyState=xH.prototype.zG;xH.prototype.disconnect=xH.prototype.eG;xH.prototype.getPlayerContextData=xH.prototype.Eb;xH.prototype.setPlayerContextData=xH.prototype.YoI;xH.prototype.getOtherConnectedRemoteId=xH.prototype.JA;xH.prototype.getReconnectTimeout=xH.prototype.B2;xH.prototype.getAutoplayMode=xH.prototype.sb;xH.prototype.getAutoplayVideoId=xH.prototype.uL;xH.prototype.reconnect=xH.prototype.qX; xH.prototype.sendMessage=xH.prototype.KuG;xH.prototype.getXsrfToken=xH.prototype.qC;xH.prototype.isCapabilitySupportedOnConnectedDevices=xH.prototype.L6;g.z(rB5,Mo);g.A=rB5.prototype;g.A.KD=function(F){return this.S6.$_gs(F)}; g.A.contains=function(F){return!!this.S6.$_c(F)}; g.A.get=function(F){return this.S6.$_g(F)}; g.A.start=function(){this.S6.$_st()}; g.A.add=function(F,J,b){this.S6.$_a(F,J,b)}; g.A.remove=function(F,J,b){this.S6.$_r(F,J,b)}; g.A.jL=function(F,J,b,I){this.S6.$_un(F,J,b,I)}; g.A.X_=function(){for(var F=this.C.length,J=0;J1&&!this.G.getOption("remote","quickCast")?(this.Nl=g.mF(F,this.C,this),this.Wx(g.EG(F,this.C)),F=this.G.getOption("remote","currentReceiver"),F=this.C(F),this.options[F]&&this.oQ(F),this.enable(!0)):this.enable(!1)}; gz.prototype.C=function(F){return F.key}; gz.prototype.gX=function(F){return F==="cast-selector-receiver"?"Enviar...":this.Nl[F].name}; gz.prototype.qE=function(F){g.tZ.prototype.qE.call(this,F);this.G.setOption("remote","currentReceiver",this.Nl[F]);this.Rf.fk()};g.z(HAz,g.GN);g.A=HAz.prototype; g.A.create=function(){var F=this.player.J(),J=g.Bu(F);F={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:F.S("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:F.S("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:F.S("enable_cast_short_lived_lounge_token")};CCt(J,F);this.subscriptions.push(g.b0("yt-remote-before-disconnect",this.cJN,this));this.subscriptions.push(g.b0("yt-remote-connection-change",this.D0D,this));this.subscriptions.push(g.b0("yt-remote-receiver-availability-change",this.KK, this));this.subscriptions.push(g.b0("yt-remote-auto-connect",this.AFN,this));this.subscriptions.push(g.b0("yt-remote-receiver-resumed",this.W1z,this));this.subscriptions.push(g.b0("mdx-privacy-popup-confirm",this.nHR,this));this.subscriptions.push(g.b0("mdx-privacy-popup-cancel",this.jHz,this));this.KK()}; g.A.load=function(){this.player.cancelPlayback();g.GN.prototype.load.call(this);this.Ad=new xKH(this,this.player,this.OI);var F=(F=hoV())?F.currentTime:0;var J=kSU()?new Qs(wz(),void 0):null;F==0&&J&&(F=$H(R$(J)));F!==0&&this.Q6(F);LE5(this,this.r0,this.r0);this.player.uJ(6)}; g.A.unload=function(){this.player.publish("mdxautoplaycanceled");this.t$=this.jl;g.vk(this.Ad,this.OI);this.OI=this.Ad=null;g.GN.prototype.unload.call(this);this.player.uJ(5);m3(this)}; g.A.X_=function(){g.Iu(this.subscriptions);g.GN.prototype.X_.call(this)}; g.A.Lx=function(F){var J=g.Ba.apply(1,arguments);this.loaded&&this.Ad.Vz.apply(this.Ad,[F].concat(g.W(J)))}; g.A.getAdState=function(){return this.HD}; g.A.Q5=function(){return this.OI?R$(this.OI).Q5:!1}; g.A.FI=function(){return this.OI?R$(this.OI).FI:!1}; g.A.Q6=function(F,J){this.uZ=F||0;this.player.publish("progresssync",F,J);this.player.IC("onVideoProgress",F||0)}; g.A.getCurrentTime=function(){return this.uZ}; g.A.getProgressState=function(){var F=R$(this.OI),J=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:!F.zc()&&this.player.hX(),clipEnd:J.clipEnd,clipStart:J.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:F.getDuration(),ingestionTime:F.U?F.T+s2(F):F.T,isAtLiveHead:(F.U?F.C+s2(F):F.C)-this.getCurrentTime()<=1,loaded:F.Y,seekableEnd:F.U?F.C+s2(F):F.C,seekableStart:F.Z>0?F.Z+s2(F):F.Z,offset:0,viewerLivestreamJoinMediaTime:0}}; g.A.nextVideo=function(){this.OI&&this.OI.nextVideo()}; g.A.hB=function(){this.OI&&this.OI.hB()}; g.A.cJN=function(F){F===1&&(this.O_=this.OI?R$(this.OI):null)}; g.A.D0D=function(){var F=kSU()?new Qs(wz(),void 0):null;if(F){var J=this.t$;this.loaded&&this.unload();this.OI=F;this.O_=null;J.key!==this.jl.key&&(this.t$=J,this.load())}else g.q8(this.OI),this.OI=null,this.loaded&&(this.unload(),(F=this.O_)&&F.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(F.videoId,$H(F)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)}; g.A.KK=function(){var F=[this.jl],J=F.concat,b=Xrb();Bw()&&g.S9("yt-remote-cast-available")&&b.push({key:"cast-selector-receiver",name:"Cast..."});this.Nl=J.call(F,b);F=RoR()||this.jl;yY(this,F);this.player.IC("onMdxReceiversChange")}; g.A.AFN=function(){var F=RoR();yY(this,F)}; g.A.W1z=function(){this.t$=RoR()}; g.A.nHR=function(){this.iE=!0;m3(this);vJ=!1;MW&&qW(MW,1);MW=null}; g.A.jHz=function(){this.iE=!1;m3(this);yY(this,this.jl);this.t$=this.jl;vJ=!1;MW=null;this.player.playVideo()}; g.A.qJ=function(F,J){switch(F){case "casting":return this.loaded;case "receivers":return this.Nl;case "currentReceiver":return J&&(J.key==="cast-selector-receiver"?IDb():yY(this,J)),this.loaded?this.t$:this.jl;case "quickCast":return this.Nl.length===2&&this.Nl[1].key==="cast-selector-receiver"?(J&&IDb(),!0):!1}}; g.A.NF=function(){this.OI.NF()}; g.A.u7=function(){return!1}; g.A.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]}; g.A.isLoggedIn=function(){var F,J;return((F=g.cT("PLAYER_CONFIG"))==null?void 0:(J=F.args)==null?void 0:J.authuser)!==void 0?!0:!(!g.cT("SESSION_INDEX")&&!g.cT("LOGGED_IN"))};g.jn("remote",HAz);})(_yt_player);