(function(g){var window=this;'use strict';var l4=function(l){g.nR(l,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.cV()).toString(36));return l},c2=function(l,c,Y){Array.isArray(Y)||(Y=[String(Y)]); g.m8L(l.T,c,Y)},ztQ=function(l){if(l instanceof g.kH)return l; if(typeof l.s3=="function")return l.s3(!1);if(g.EV(l)){var c=0,Y=new g.kH;Y.next=function(){for(;;){if(c>=l.length)return g.e7;if(c in l)return g.rn(l[c++]);c++}}; return Y}throw Error("Not implemented");},nFa=function(l,c,Y){if(g.EV(l))g.Uv(l,c,Y); else for(l=ztQ(l);;){var X=l.next();if(X.done)break;c.call(Y,X.value,void 0,l)}},htE=function(l,c){var Y=[]; nFa(c,function(X){try{var k=g.wR.prototype.G.call(this,X,!0)}catch(r){if(r=="Storage: Invalid value was encountered")return;throw r;}k===void 0?Y.push(X):g.LzX(k)&&Y.push(X)},l); return Y},HnM=function(l,c){htE(l,c).forEach(function(Y){g.wR.prototype.remove.call(this,Y)},l)},wpi=function(l){if(l.AJ){if(l.AJ.locationOverrideToken)return{locationOverrideToken:l.AJ.locationOverrideToken}; if(l.AJ.latitudeE7!=null&&l.AJ.longitudeE7!=null)return{latitudeE7:l.AJ.latitudeE7,longitudeE7:l.AJ.longitudeE7}}return null},KBQ=function(l,c){g.AE(l,c)||l.push(c)},TfU=function(l){var c=0,Y; for(Y in l)c++;return c},j_L=function(l,c){return g.TE(l,c)},Vra=function(l){try{return g.Qn.JSON.parse(l)}catch(c){}l=String(l); if(/^\s*$/.test(l)?0:/^[\],:{}\s\u2028\u2029]*$/.test(l.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("("+l+")")}catch(c){}throw Error("Invalid JSON string: "+l);},Ye=function(l){if(g.Qn.JSON)try{return g.Qn.JSON.parse(l)}catch(c){}return Vra(l)},oFV=function(l){if(l.uq&&typeof l.uq=="function")return l.uq(); if(typeof Map!=="undefined"&&l instanceof Map||typeof Set!=="undefined"&&l instanceof Set)return Array.from(l.values());if(typeof l==="string")return l.split("");if(g.EV(l)){for(var c=[],Y=l.length,X=0;X1){if(Y%2)throw Error("Uneven number of arguments");for(var X=0;X5&&(l=l.slice(l.length-5)); var c=g.vL(wUQ(),function(X){return X.loungeToken}),Y=g.vL(l,function(X){return X.loungeToken}); g.xR(Y,function(X){return!g.AE(c,X)})&&Ku7(); g.jQ("yt-remote-local-screens",l,31536E3)},GN=function(l){l||(g.oE("yt-remote-session-screen-id"),g.oE("yt-remote-session-video-id")); hDi();l=tx();g.IU(l,Up());zDV(l)},jvQ=function(){if(!fN){var l=g.C6(); l&&(fN=new g.n6(l))}},VsU=function(){jvQ(); return fN?!!fN.get("yt-remote-use-staging-server"):!1},P2=function(l,c){g.rI[l]=!0; var Y=g.Xb();Y&&Y.publish.apply(Y,arguments);g.rI[l]=!1},omQ=function(){},Xd=function(){if(!b4){b4=new g.Cm(new omQ); var l=g.Rv("client_streamz_web_flush_count",-1);l!==-1&&(b4.K=l)}return b4},CaL=function(){var l=window.navigator.userAgent.match(/Chrome\/([0-9]+)/); return l?parseInt(l[1],10):0},ZgQ=function(l){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+l)!=-1||document.currentScript.src.indexOf("&"+l)!=-1)},$sU=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},q2=function(l){l.length?QvE(l.shift(),function(){q2(l)}):msV()},WuV=function(l){return"chrome-extension://"+l+"/cast_sender.js"},QvE=function(l,c,Y){var X=document.createElement("script"); X.onerror=c;Y&&(X.onload=Y);g.uC(X,g.vp(l));(document.head||document.documentElement).appendChild(X)},MsU=function(){var l=CaL(),c=[]; if(l>1){var Y=l-1;c.push("//www.gstatic.com/eureka/clank/"+l+"/cast_sender.js");c.push("//www.gstatic.com/eureka/clank/"+Y+"/cast_sender.js")}return c},msV=function(){var l=$sU(); l&&l(!1,"No cast extension found")},Bea=function(){if(sv6){var l=2,c=$sU(),Y=function(){l--; l==0&&c&&c(!0)}; window.__onGCastApiAvailable=Y;QvE("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",msV,Y)}},Lui=function(){Bea(); var l=MsU();l.push("//www.gstatic.com/eureka/clank/cast_sender.js");q2(l)},gm6=function(){Bea(); var l=MsU();l.push.apply(l,g.N(EmQ.map(WuV)));l.push("//www.gstatic.com/eureka/clank/cast_sender.js");q2(l)},aX=function(l,c,Y){g.C.call(this); this.W=Y!=null?(0,g.Fk)(l,Y):l;this.DY=c;this.N=(0,g.Fk)(this.vQ,this);this.D=!1;this.G=0;this.K=this.O$=null;this.T=[]},N2=function(){},u9L=function(){g.m3.call(this,"p")},A1i=function(){g.m3.call(this,"o")},IeN=function(){return FuQ=FuQ||new g.d3},l0c=function(l){g.m3.call(this,"serverreachability",l)},pN=function(l){var c=IeN(); c.dispatchEvent(new l0c(c,l))},cAL=function(l){g.m3.call(this,"statevent",l)},RX=function(l){var c=IeN(); c.dispatchEvent(new cAL(c,l))},YdN=function(l,c,Y,X){g.m3.call(this,"timingevent",l); this.size=c;this.rtt=Y;this.retries=X},i4=function(l,c){if(typeof l!=="function")throw Error("Fn must not be null and must be a function"); return g.Qn.setTimeout(function(){l()},c)},Se=function(){},v2=function(l,c,Y,X){this.K=l; this.T=c;this.qJ=Y;this.MJ=X||1;this.ph=new g.TU(this);this.uQ=45E3;this.NQ=null;this.W=!1;this.j=this.nh=this.U=this.yf=this.xT=this.iQ=this.AJ=null;this.Kh=[];this.D=null;this.C=0;this.N=this.JJ=null;this.Gc=-1;this.Ch=!1;this.Ud=0;this.Ed=null;this.V2=this.ZA=this.Pu=this.PU=!1;this.G=new XJE},XJE=function(){this.K=null; this.D="";this.G=!1},rAe=function(l,c,Y){l.yf=1; l.U=l4(c.clone());l.j=Y;l.PU=!0;ktL(l,null)},ktL=function(l,c){l.xT=Date.now(); xe(l);l.nh=l.U.clone();c2(l.nh,"t",l.MJ);l.C=0;var Y=l.K.yf;l.G=new XJE;l.D=egi(l.K,Y?c:null,!l.j);l.Ud>0&&(l.Ed=new g.Ij((0,g.Fk)(l.T4,l,l.D),l.Ud));l.ph.listen(l.D,"readystatechange",l.X6);c=l.NQ?g.Z4(l.NQ):{};l.j?(l.JJ||(l.JJ="POST"),c["Content-Type"]="application/x-www-form-urlencoded",l.D.send(l.nh,l.JJ,l.j,c)):(l.JJ="GET",l.D.send(l.nh,l.JJ,null,c));pN(1)},d16=function(l){if(!JAN(l))return g.db(l.D); var c=g.yq(l.D);if(c==="")return"";var Y="",X=c.length,k=g.eD(l.D)==4;if(!l.G.K){if(typeof TextDecoder==="undefined")return zN(l),nN(l),"";l.G.K=new g.Qn.TextDecoder}for(var r=0;rc.length)return yAi;c=c.slice(X,X+Y);l.C=X+Y;return c},xe=function(l){l.iQ=Date.now()+l.uQ; tQE(l,l.uQ)},tQE=function(l,c){if(l.AJ!=null)throw Error("WatchDog timer not null"); l.AJ=i4((0,g.Fk)(l.HQ,l),c)},U1N=function(l){l.AJ&&(g.Qn.clearTimeout(l.AJ),l.AJ=null)},nN=function(l){l.K.tN()||l.Ch||GtN(l.K,l)},zN=function(l){U1N(l); g.y7(l.Ed);l.Ed=null;l.ph.removeAll();if(l.D){var c=l.D;l.D=null;c.abort();c.dispose()}},RgL=function(l,c){try{var Y=l.K; if(Y.DR!=0&&(Y.D==l||f0Q(Y.G,l)))if(!l.ZA&&f0Q(Y.G,l)&&Y.DR==3){try{var X=Y.vI.D.parse(c)}catch(a){X=null}if(Array.isArray(X)&&X.length==3){var k=X;if(k[0]==0)a:{if(!Y.U){if(Y.D)if(Y.D.xT+3E30&&(Y.Ud=1.5*d);X=Y;var y=l.a8();if(y){var O=g.OQ(y,"X-Client-Wire-Protocol");if(O){var D=X.G;!D.D&&(g.vV(O,"spdy")||g.vV(O,"quic")||g.vV(O,"h2"))&&(D.T=D.N,D.D=new Set,D.G&&(qdU(D,D.G),D.G=null))}if(X.PU){var t=g.OQ(y,"X-HTTP-Session-Id");t&&(X.wC=t,g.nR(X.NQ,X.PU,t))}}Y.DR=3;Y.N&&Y.N.kG();Y.fC&&(Y.CC=Date.now()-l.xT);X=Y;var U=l;X.U$=a0N(X,X.yf?X.MJ:null,X.qJ);if(U.ZA){NFL(X.G, U);var G=U,f=X.Ud;f&&G.setTimeout(f);G.AJ&&(U1N(G),xe(G));X.D=U}else pJe(X);Y.K.length>0&&KN(Y)}else r[0]!="stop"&&r[0]!="close"||wX(Y,7);else Y.DR==3&&(r[0]=="stop"||r[0]=="close"?r[0]=="stop"?wX(Y,7):Y.disconnect():r[0]!="noop"&&Y.N&&Y.N.VZ(r),Y.Kh=0)}pN(4)}catch(a){}},ilE=function(l,c){this.D=l; this.map=c;this.context=null},SdM=function(l){this.N=l||10; g.Qn.PerformanceNavigationTiming?(l=g.Qn.performance.getEntriesByType("navigation"),l=l.length>0&&(l[0].nextHopProtocol=="hq"||l[0].nextHopProtocol=="h2")):l=!!(g.Qn.chrome&&g.Qn.chrome.loadTimes&&g.Qn.chrome.loadTimes()&&g.Qn.chrome.loadTimes().wasFetchedViaSpdy);this.T=l?this.N:1;this.D=null;this.T>1&&(this.D=new Set);this.G=null;this.K=[]},vEc=function(l){return l.G?!0:l.D?l.D.size>=l.T:!1},blV=function(l){return l.G?1:l.D?l.D.size:0},f0Q=function(l,c){return l.G?l.G==c:l.D?l.D.has(c):!1},qdU= function(l,c){l.D?l.D.add(c):l.G=c},NFL=function(l,c){l.G&&l.G==c?l.G=null:l.D&&l.D.has(c)&&l.D.delete(c)},x1L=function(l){if(l.G!=null)return l.K.concat(l.G.Kh); if(l.D!=null&&l.D.size!==0){var c=l.K;l=g.b(l.D.values());for(var Y=l.next();!Y.done;Y=l.next())c=c.concat(Y.value.Kh);return c}return g.YB(l.K)},zg6=function(l,c){var Y=new Se; if(g.Qn.Image){var X=new Image;X.onload=g.In(TN,Y,"TestLoadImage: loaded",!0,c,X);X.onerror=g.In(TN,Y,"TestLoadImage: error",!1,c,X);X.onabort=g.In(TN,Y,"TestLoadImage: abort",!1,c,X);X.ontimeout=g.In(TN,Y,"TestLoadImage: timeout",!1,c,X);g.Qn.setTimeout(function(){if(X.ontimeout)X.ontimeout()},1E4); X.src=l}else c(!1)},nEN=function(l,c){var Y=new Se,X=new AbortController,k=setTimeout(function(){X.abort(); TN(Y,"TestPingServer: timeout",!1,c)},1E4); fetch(l,{signal:X.signal}).then(function(r){clearTimeout(k);r.ok?TN(Y,"TestPingServer: ok",!0,c):TN(Y,"TestPingServer: server error",!1,c)}).catch(function(){clearTimeout(k); TN(Y,"TestPingServer: error",!1,c)})},TN=function(l,c,Y,X,k){try{k&&(k.onload=null,k.onerror=null,k.onabort=null,k.ontimeout=null),X(Y)}catch(r){}},hga=function(){this.D=new N2},HlU=function(l,c,Y){var X=Y||""; try{ZnN(l,function(k,r){var e=k;g.gy(k)&&(e=g.$P(k));c.push(X+r+"="+encodeURIComponent(e))})}catch(k){throw c.push(X+"type="+encodeURIComponent("_badmap")),k; }},je=function(l,c,Y){return Y&&Y.mQ0?Y.mQ0[l]||c:c},wJQ=function(l){this.K=[]; this.MJ=this.U$=this.NQ=this.qJ=this.D=this.wC=this.PU=this.Ch=this.C=this.Gc=this.j=null;this.EG=this.nh=0;this.WZ=je("failFast",!1,l);this.ZA=this.AJ=this.U=this.W=this.N=null;this.OV=!0;this.oe=this.Ed=-1;this.V2=this.Kh=this.xT=0;this.lh=je("baseRetryDelayMs",5E3,l);this.qM=je("retryDelaySeedMs",1E4,l);this.ZV=je("forwardChannelMaxRetries",2,l);this.CV=je("forwardChannelRequestTimeoutMs",2E4,l);this.gC=l&&l.qqU||void 0;this.uh=l&&l.XMJ||void 0;this.Sk=l&&l.Fgz||!1;this.Ud=void 0;this.yf=l&&l.pp0|| !1;this.T="";this.G=new SdM(l&&l.xFQ);this.vI=new hga;this.ph=l&&l.MRh||!1;this.iQ=l&&l.H$7||!1;this.ph&&this.iQ&&(this.iQ=!1);this.o4=l&&l.DFQ||!1;l&&l.UF7&&(this.OV=!1);this.fC=!this.ph&&this.OV&&l&&l.VRf||!1;this.Ie=void 0;l&&l.ez&&l.ez>0&&(this.Ie=l.ez);this.DZ=void 0;this.CC=0;this.uQ=!1;this.Pu=this.JJ=null},H2=function(l){l.D&&(KlE(l),l.D.cancel(),l.D=null)},TFM=function(l){H2(l); l.U&&(g.Qn.clearTimeout(l.U),l.U=null);hx(l);l.G.cancel();l.W&&(typeof l.W==="number"&&g.Qn.clearTimeout(l.W),l.W=null)},KN=function(l){vEc(l.G)||l.W||(l.W=!0,g.q5(l.gt,l),l.xT=0)},VQV=function(l,c){if(blV(l.G)>=l.G.T-(l.W?1:0))return!1; if(l.W)return l.K=c.Kh.concat(l.K),!0;if(l.DR==1||l.DR==2||l.xT>=(l.WZ?0:l.ZV))return!1;l.W=i4((0,g.Fk)(l.gt,l,c),jEF(l,l.xT));l.xT++;return!0},C3M=function(l,c){var Y; c?Y=c.qJ:Y=l.nh++;var X=l.NQ.clone();g.nR(X,"SID",l.T);g.nR(X,"RID",Y);g.nR(X,"AID",l.Ed);Ve(l,X);l.C&&l.j&&g.KR(X,l.C,l.j);Y=new v2(l,l.T,Y,l.xT+1);l.C===null&&(Y.NQ=l.j);c&&(l.K=c.Kh.concat(l.K));c=oEE(l,Y,1E3);Y.setTimeout(Math.round(l.CV*.5)+Math.round(l.CV*.5*Math.random()));qdU(l.G,Y);rAe(Y,X,c)},Ve=function(l,c){l.Ch&&g.v0(l.Ch,function(Y,X){g.nR(c,X,Y)}); l.N&&ZnN({},function(Y,X){g.nR(c,X,Y)})},oEE=function(l,c,Y){Y=Math.min(l.K.length,Y); var X=l.N?(0,g.Fk)(l.N.I6,l.N,l):null;a:{for(var k=l.K,r=-1;;){var e=["count="+Y];r==-1?Y>0?(r=k[0].D,e.push("ofs="+r)):r=0:e.push("ofs="+r);for(var d=!0,y=0;y=3)return!1; l.V2++;l.U=i4((0,g.Fk)(l.xG,l),jEF(l,l.Kh));l.Kh++;return!0},KlE=function(l){l.JJ!=null&&(g.Qn.clearTimeout(l.JJ),l.JJ=null)},ZlE=function(l){l.D=new v2(l,l.T,"rpc",l.V2); l.C===null&&(l.D.NQ=l.j);l.D.Ud=0;var c=l.U$.clone();g.nR(c,"RID","rpc");g.nR(c,"SID",l.T);g.nR(c,"AID",l.Ed);g.nR(c,"CI",l.ZA?"0":"1");!l.ZA&&l.Ie&&g.nR(c,"TO",l.Ie);g.nR(c,"TYPE","xmlhttp");Ve(l,c);l.C&&l.j&&g.KR(c,l.C,l.j);l.Ud&&l.D.setTimeout(l.Ud);var Y=l.D;l=l.MJ;Y.yf=1;Y.U=l4(c.clone());Y.j=null;Y.PU=!0;ktL(Y,l)},hx=function(l){l.AJ!=null&&(g.Qn.clearTimeout(l.AJ),l.AJ=null)},GtN=function(l,c){var Y=null; if(l.D==c){hx(l);KlE(l);l.D=null;var X=2}else if(f0Q(l.G,c))Y=c.Kh,NFL(l.G,c),X=1;else return;if(l.DR!=0)if(c.W)if(X==1){Y=c.j?c.j.length:0;c=Date.now()-c.xT;var k=l.xT;X=IeN();X.dispatchEvent(new YdN(X,Y,c,k));KN(l)}else pJe(l);else{var r=c.Gc;k=c.getLastError();if(k==3||k==0&&r>0||!(X==1&&VQV(l,c)||X==2&&P3i(l)))switch(Y&&Y.length>0&&(c=l.G,c.K=c.K.concat(Y)),k){case 1:wX(l,5);break;case 4:wX(l,10);break;case 3:wX(l,6);break;default:wX(l,2)}}},jEF=function(l,c){var Y=l.lh+Math.floor(Math.random()* l.qM); l.isActive()||(Y*=2);return Y*c},wX=function(l,c){if(c==2){var Y=(0,g.Fk)(l.Kf6,l),X=l.uh,k=!X; X=new g.N6(X||"//www.google.com/images/cleardot.gif");g.Qn.location&&g.Qn.location.protocol=="http"||g.pR(X,"https");l4(X);k?zg6(X.toString(),Y):nEN(X.toString(),Y)}else RX(2);l.DR=0;l.N&&l.N.PJ(c);$1U(l);TFM(l)},$1U=function(l){l.DR=0; l.Pu=[];if(l.N){var c=x1L(l.G);if(c.length!=0||l.K.length!=0)g.Xl(l.Pu,c),g.Xl(l.Pu,l.K),l.G.K.length=0,g.YB(l.K),l.K.length=0;l.N.Je()}},QEN=function(l){if(l.DR==0)return l.Pu; var c=[];g.Xl(c,x1L(l.G));g.Xl(c,l.K);return c},a0N=function(l,c,Y){var X=g.hY(Y); X.D!=""?(c&&g.Rp(X,c+"."+X.D),g.ij(X,X.K)):(X=g.Qn.location,X=$mi(X.protocol,c?c+"."+X.hostname:X.hostname,+X.port,Y));c=l.PU;Y=l.wC;c&&Y&&g.nR(X,c,Y);g.nR(X,"VER",l.z4);Ve(l,X);return X},egi=function(l,c,Y){if(c&&!l.yf)throw Error("Can't create secondary domain capable XhrIo object."); c=l.Sk&&!l.gC?new g.XQ(new g.PM({f_:Y})):new g.XQ(l.gC);c.C=l.yf;return c},m1L=function(){},WlF=function(){},CN=function(l,c){g.d3.call(this); this.D=new wJQ(c);this.N=l;this.G=c&&c.YV0||null;l=c&&c.L$T||null;c&&c.zFJ&&(l?l["X-Client-Protocol"]="webchannel":l={"X-Client-Protocol":"webchannel"});this.D.j=l;l=c&&c.fTh||null;c&&c.De&&(l?l["X-WebChannel-Content-Type"]=c.De:l={"X-WebChannel-Content-Type":c.De});c&&c.YY&&(l?l["X-WebChannel-Client-Profile"]=c.YY:l={"X-WebChannel-Client-Profile":c.YY});this.D.Gc=l;(l=c&&c.j3f)&&!g.iQ(l)&&(this.D.C=l);this.W=c&&c.pp0||!1;this.T=c&&c.iAd||!1;(c=c&&c.e6Q)&&!g.iQ(c)&&(this.D.PU=c,g.K8(this.G,c)&&(l= this.G,c in l&&delete l[c]));this.K=new oX(this)},MQN=function(l){u9L.call(this); l.__headers__&&(this.headers=l.__headers__,this.statusCode=l.__status__,delete l.__headers__,delete l.__status__);var c=l.__sm__;c?this.data=(this.D=g.hd(c))?g.oQ(c,this.D):c:this.data=l},sEV=function(l){A1i.call(this); this.status=1;this.errorCode=l},oX=function(l){this.D=l},BFF=function(l,c){this.G=l; this.D=c},Ll6=function(l){return QEN(l.D).map(function(c){var Y=l.G; c=c.map;"__data__"in c?(c=c.__data__,Y=Y.T?Vra(c):c):Y=c;return Y})},Z6=function(l,c){if(typeof l!=="function")throw Error("Fn must not be null and must be a function"); return g.Qn.setTimeout(function(){l()},c)},Qe=function(l){$e.dispatchEvent(new EEV($e,l))},EEV=function(l){g.m3.call(this,"statevent",l)},mg=function(l,c,Y,X){this.D=l; this.T=c;this.C=Y;this.W=X||1;this.G=45E3;this.K=new g.TU(this);this.N=new g.ju;this.N.setInterval(250)},uGe=function(l,c,Y){l.Ng=1; l.CR=l4(c.clone());l.cH=Y;l.PU=!0;gEN(l,null)},AAa=function(l,c,Y,X,k){l.Ng=1; l.CR=l4(c.clone());l.cH=null;l.PU=Y;k&&(l.Wy=!1);gEN(l,X)},gEN=function(l,c){l.yk=Date.now(); FlQ(l);l.W6=l.CR.clone();c2(l.W6,"t",l.W);l.Cc=0;l.Vj=l.D.Lw(l.D.Xk()?c:null);l.Mm>0&&(l.lk=new g.Ij((0,g.Fk)(l.lE,l,l.Vj),l.Mm));l.K.listen(l.Vj,"readystatechange",l.dI);c=l.uX?g.Z4(l.uX):{};l.cH?(l.B6="POST",c["Content-Type"]="application/x-www-form-urlencoded",l.Vj.send(l.W6,l.B6,l.cH,c)):(l.B6="GET",l.Wy&&!g.Yx&&(c.Connection="close"),l.Vj.send(l.W6,l.B6,null,c));l.D.Fi(1)},cbV=function(l,c){var Y=l.Cc,X=c.indexOf("\n",Y); if(X==-1)return I0L;Y=Number(c.substring(Y,X));if(isNaN(Y))return lnF;X+=1;if(X+Y>c.length)return I0L;c=c.slice(X,X+Y);l.Cc=X+Y;return c},FlQ=function(l){l.Uv=Date.now()+l.G; Yq7(l,l.G)},Yq7=function(l,c){if(l.Pv!=null)throw Error("WatchDog timer not null"); l.Pv=Z6((0,g.Fk)(l.F6,l),c)},XHN=function(l){l.Pv&&(g.Qn.clearTimeout(l.Pv),l.Pv=null)},kPM=function(l){l.D.tN()||l.v4||l.D.nw(l)},W2=function(l){XHN(l); g.y7(l.lk);l.lk=null;l.N.stop();l.K.removeAll();if(l.Vj){var c=l.Vj;l.Vj=null;c.abort();c.dispose()}l.B3&&(l.B3=null)},rbN=function(l,c){try{l.D.WJ(l,c),l.D.Fi(4)}catch(Y){}},JbQ=function(l,c,Y,X,k){if(X==0)Y(!1); else{var r=k||0;X--;e8N(l,c,function(e){e?Y(!0):g.Qn.setTimeout(function(){JbQ(l,c,Y,X,r)},r)})}},e8N=function(l,c,Y){var X=new Image; X.onload=function(){try{M2(X),Y(!0)}catch(k){}}; X.onerror=function(){try{M2(X),Y(!1)}catch(k){}}; X.onabort=function(){try{M2(X),Y(!1)}catch(k){}}; X.ontimeout=function(){try{M2(X),Y(!1)}catch(k){}}; g.Qn.setTimeout(function(){if(X.ontimeout)X.ontimeout()},c); X.src=l},M2=function(l){l.onload=null; l.onerror=null;l.onabort=null;l.ontimeout=null},daF=function(l){this.D=l; this.G=new N2},ybN=function(l){var c=sp(l.D,l.Ub,"/mail/images/cleardot.gif"); l4(c);JbQ(c.toString(),5E3,(0,g.Fk)(l.iR,l),3,2E3);l.Fi(1)},Obi=function(l){var c=l.D.W; c!=null?(Qe(5),c?(Qe(11),B2(l.D,l,!1)):(Qe(12),B2(l.D,l,!0))):(l.Cd=new mg(l),l.Cd.uX=l.Yb,c=l.D,c=sp(c,c.Xk()?l.v6:null,l.Ov),Qe(5),c2(c,"TYPE","xmlhttp"),AAa(l.Cd,c,!1,l.v6,!1))},DaM=function(l,c,Y){this.D=1; this.G=[];this.K=[];this.N=new N2;this.j=l||null;this.W=c!=null?c:null;this.U=Y||!1},tIF=function(l,c){this.D=l; this.map=c;this.context=null},Uac=function(l,c,Y,X){g.m3.call(this,"timingevent",l); this.size=c;this.rtt=Y;this.retries=X},GPQ=function(l){g.m3.call(this,"serverreachability",l)},PkU=function(l){l.Z4(1,0); l.H6=sp(l,null,l.cG);fn7(l)},bbV=function(l){l.M9&&(l.M9.abort(),l.M9=null); l.wD&&(l.wD.cancel(),l.wD=null);l.Yx&&(g.Qn.clearTimeout(l.Yx),l.Yx=null);LN(l);l.qd&&(l.qd.cancel(),l.qd=null);l.CA&&(g.Qn.clearTimeout(l.CA),l.CA=null)},qqV=function(l,c){if(l.D==0)throw Error("Invalid operation: sending map when state is closed"); l.G.push(new tIF(l.Eh++,c));l.D!=2&&l.D!=3||fn7(l)},anN=function(l){var c=0; l.wD&&c++;l.qd&&c++;return c},fn7=function(l){l.qd||l.CA||(l.CA=Z6((0,g.Fk)(l.vJ,l),0),l.lJ=0)},R8U=function(l,c){if(l.D==1){if(!c){l.bz=Math.floor(Math.random()*1E5); c=l.bz++;var Y=new mg(l,"",c);Y.uX=l.CF;var X=NO6(l),k=l.H6.clone();g.nR(k,"RID",c);g.nR(k,"CVER","1");Ep(l,k);uGe(Y,k,X);l.qd=Y;l.D=2}}else l.D==3&&(c?pHM(l,c):l.G.length==0||l.qd||pHM(l))},pHM=function(l,c){if(c)if(l.Rv>6){l.G=l.K.concat(l.G); l.K.length=0;var Y=l.bz-1;c=NO6(l)}else Y=c.C,c=c.cH;else Y=l.bz++,c=NO6(l);var X=l.H6.clone();g.nR(X,"SID",l.T);g.nR(X,"RID",Y);g.nR(X,"AID",l.Wv);Ep(l,X);Y=new mg(l,l.T,Y,l.lJ+1);Y.uX=l.CF;Y.setTimeout(1E4+Math.round(1E4*Math.random()));l.qd=Y;uGe(Y,X,c)},Ep=function(l,c){l.eS&&(l=l.eS.bE())&&g.v0(l,function(Y,X){g.nR(c,X,Y)})},NO6=function(l){var c=Math.min(l.G.length,1E3),Y=["count="+c]; if(l.Rv>6&&c>0){var X=l.G[0].D;Y.push("ofs="+X)}else X=0;for(var k={},r=0;r=3)return!1; l.C++;l.Yx=Z6((0,g.Fk)(l.C1,l),SqQ(l,l.VV));l.VV++;return!0},B2=function(l,c,Y){l.g5=l.W==null?Y:!l.W; l.iS=c.L$;l.U||PkU(l)},LN=function(l){l.mT!=null&&(g.Qn.clearTimeout(l.mT),l.mT=null)},SqQ=function(l,c){var Y=5E3+Math.floor(Math.random()*1E4); l.isActive()||(Y*=2);return Y*c},gX=function(l,c){if(c==2||c==9){var Y=null; l.eS&&(Y=null);var X=(0,g.Fk)(l.ACs,l);Y||(Y=new g.N6("//www.google.com/images/cleardot.gif"),l4(Y));e8N(Y.toString(),1E4,X)}else Qe(2);xaE(l,c)},xaE=function(l,c){l.D=0; l.eS&&l.eS.HJ(c);z86(l);bbV(l)},z86=function(l){l.D=0; l.iS=-1;if(l.eS)if(l.K.length==0&&l.G.length==0)l.eS.r5();else{var c=g.YB(l.K),Y=g.YB(l.G);l.K.length=0;l.G.length=0;l.eS.r5(c,Y)}},sp=function(l,c,Y){var X=g.hY(Y); if(X.D!="")c&&g.Rp(X,c+"."+X.D),g.ij(X,X.K);else{var k=window.location;X=$mi(k.protocol,c?c+"."+k.hostname:k.hostname,+k.port,Y)}l.sR&&g.v0(l.sR,function(r,e){g.nR(X,e,r)}); g.nR(X,"VER",l.Rv);Ep(l,X);return X},nli=function(){},h8Q=function(){this.D=[]; this.G=[]},Hba=function(l){g.m3.call(this,"channelMessage"); this.message=l},wHU=function(l){g.m3.call(this,"channelError"); this.error=l},KpE=function(l,c){this.action=l; this.params=c||{}},u4=function(l,c){g.C.call(this); this.D=new g.gY(this.LEf,0,this);g.Z(this,this.D);this.DY=5E3;this.G=0;if(typeof l==="function")c&&(l=(0,g.Fk)(l,c));else if(l&&typeof l.handleEvent==="function")l=(0,g.Fk)(l.handleEvent,l);else throw Error("Invalid listener argument");this.K=l},TON=function(l,c,Y,X,k,r,e,d,y,O,D,t,U){Y=Y===void 0?!1:Y; X=X===void 0?function(){return""}:X; k=k===void 0?!1:k;r=r===void 0?!1:r;e=e===void 0?!1:e;d=d===void 0?function(){return g.zx({})}:d; y=y===void 0?!1:y;D=D===void 0?!1:D;t=t===void 0?!1:t;U=U===void 0?!1:U;this.yf=l;this.AJ=c;this.W=new g.zD;this.G=new u4(this.ANh,this);this.D=null;this.C=!1;this.j=null;this.xT="";this.Kh=this.U=0;this.K=[];this.Gc=Y;this.PU=X;this.N=r;this.NQ=d;this.Ch=O;this.Pu=e;this.JJ=null;this.T=g.zx();this.V2=k;this.ph=y;this.iQ=D;this.uQ=t;this.MJ=U;this.Ud=new Q_i;this.ZA=new mmL;this.nh=new WB7;this.Ed=new MrN;this.qJ=new s_6;this.OV=new Bf6},olN=function(l,c,Y,X,k){jfN(l); if(l.D){var r=g.Ln("ID_TOKEN"),e=l.D.CF||{};r?e["x-youtube-identity-token"]=r:delete e["x-youtube-identity-token"];l.D.CF=e}VI7(l);X?(X.getState()!=3&&anN(X)==0||X.getState(),l.D.connect(c,Y,l.AJ,X.T,X.Wv)):k?l.D.connect(c,Y,l.AJ,k.sessionId,k.arrayId):l.D.connect(c,Y,l.AJ)},$aM=function(l,c){return l.MJ?!0:l.uQ?Object.values(CkQ).includes(c):l.iQ?!Object.values(Zbc).includes(c):!1},WpQ=function(l){var c,Y; g.H(function(X){if(X.D==1)return g.ic(X,2),g.n(X,Qfi(l),2);g.xv(X);c=l.K;l.K=[];Y=c.length;maL(l,c,Y);Ax(l);return g.nL(X,0)})},maL=function(l,c,Y){for(var X=0;X0?Y=Object.assign({},Y,c):delete Y.Authorization;l.D.CF=Y}},VI7=function(l){l.Ch&&!l.N&&sf6(l,l.Ch())},Fd=function(l){this.scheme="https"; this.port=this.domain="";this.D="/api/lounge";this.G=!0;l=l||document.location.href;var c=Number(g.Ba(4,l))||"";c&&(this.port=":"+c);this.domain=g.Lm(l)||"";l=g.HV();l.search("MSIE")>=0&&(l=l.match(/MSIE ([\d.]+)/)[1],g.hE(l,"10.0")<0&&(this.G=!1))},IX=function(l,c){var Y=l.D; l.G&&(Y=l.scheme+"://"+l.domain+l.port+l.D);return g.Il(Y+c,{})},BOM=function(l,c){g.d3.call(this); var Y=this;this.KV=l();this.KV.subscribe("handlerOpened",this.Mv,this);this.KV.subscribe("handlerClosed",this.onClosed,this);this.KV.subscribe("handlerError",function(X,k){Y.onError(k)}); this.KV.subscribe("handlerMessage",this.onMessage,this);this.D=c},Lp7=function(l,c,Y){var X=this; Y=Y===void 0?function(){return""}:Y; var k=k===void 0?new WlF:k;var r=r===void 0?new g.zD:r;this.pathPrefix=l;this.D=c;this.xT=Y;this.N=r;this.U=null;this.j=this.C=0;this.channel=null;this.W=0;this.K=new u4(function(){X.K.isActive();var e;((e=X.channel)==null?void 0:blV((new BFF(e,e.D)).D.G))===0&&X.connect(X.U,X.C)}); this.T={};this.G={};this.AJ=!1;this.logger=null;this.Kh=[];this.Mi=void 0;this.NQ=new Q_i;this.JJ=new mmL;this.Ch=new WB7;this.PU=new MrN},ElE=function(l){g.l_(l.channel,"m",function(){l.W=3; l.K.reset();l.U=null;l.C=0;for(var c=g.b(l.Kh),Y=c.next();!Y.done;Y=c.next())Y=Y.value,l.channel&&l.channel.send(Y);l.Kh=[];l.publish("webChannelOpened");l.NQ.J5("WEB_CHANNEL")}); g.l_(l.channel,"n",function(){l.W=0;l.K.isActive()||l.publish("webChannelClosed");var c,Y=(c=l.channel)==null?void 0:Ll6(new BFF(c,c.D));Y&&(l.Kh=[].concat(g.N(Y)));l.JJ.J5("WEB_CHANNEL")}); g.l_(l.channel,"p",function(c){var Y=c.data;Y[0]==="gracefulReconnect"?(l.K.start(),l.channel&&l.channel.close()):l.publish("webChannelMessage",new KpE(Y[0],Y[1]));l.Mi=c.statusCode;l.Ch.J5("WEB_CHANNEL")}); g.l_(l.channel,"o",function(){l.Mi===401||l.K.start();l.publish("webChannelError");l.PU.J5("WEB_CHANNEL")})},glc=function(l){var c=l.xT(); c?l.T["x-youtube-lounge-xsrf-token"]=c:delete l.T["x-youtube-lounge-xsrf-token"]},uTE=function(l){g.d3.call(this); this.D=l();this.D.subscribe("webChannelOpened",this.hk,this);this.D.subscribe("webChannelClosed",this.onClosed,this);this.D.subscribe("webChannelError",this.onError,this);this.D.subscribe("webChannelMessage",this.onMessage,this)},Aba=function(l,c,Y,X,k){function r(){return new TON(IX(l,"/bc"),c,!1,Y,X)} Y=Y===void 0?function(){return""}:Y; return g.pg("enable_mdx_web_channel_desktop")?new uTE(function(){return new Lp7(IX(l,"/wc"),c,Y)}):new BOM(r,k)},c0e=function(){var l=Fpc; InU();lF.push(l);lmL()},cg=function(l,c){InU(); var Y=Y1L(l,String(c));lF.length==0?XQQ(Y):(lmL(),g.Uv(lF,function(X){X(Y)}))},Yo=function(l){cg("CP",l)},InU=function(){lF||(lF=g.MX("yt.mdx.remote.debug.handlers_")||[],g.WS("yt.mdx.remote.debug.handlers_",lF))},XQQ=function(l){var c=(Xh+1)%50; Xh=c;ko[c]=l;rG||(rG=c==49)},lmL=function(){var l=lF; if(ko[0]){var c=rG?Xh:-1,Y={};do Y={rU:void 0},c=(c+1)%50,Y.rU=ko[c],g.Uv(l,function(X){return function(k){k(X.rU)}}(Y)); while(c!=Xh);ko=Array(50);Xh=-1;rG=!1}},Y1L=function(l,c){var Y=(Date.now()-kVc)/1E3; Y.toFixed&&(Y=Y.toFixed(3));var X=[];X.push("[",Y+"s","] ");X.push("[","yt.mdx.remote","] ");X.push(l+": "+c,"\n");return X.join("")},eS=function(l){g.OG.call(this); this.W=l;this.screens=[]},r06=function(l,c){var Y=l.get(c.uuid)||l.get(c.id); if(Y)return l=Y.name,Y.id=c.id||Y.id,Y.name=c.name,Y.token=c.token,Y.uuid=c.uuid||Y.uuid,Y.name!=l;l.screens.push(c);return!0},eda=function(l,c){var Y=l.screens.length!=c.length; l.screens=g.yo(l.screens,function(r){return!!SL7(c,r)}); for(var X=c.length,k=0;k0&&l.T0&&aq(l,Y)},function(c){l.N=function(){}; l.YW(c)})},VdF=function(l){var c={}; c.pairingCode=l.JJ;c.theme=l.yf;VsU()&&(c.env_useStageMdx=1);return g.FP(c)},oqi=function(l){return new Promise(function(c){l.JJ=RD7(); if(l.NQ){var Y=new chrome.cast.DialLaunchResponse(!0,VdF(l));c(Y);j9U(l)}else l.AJ=function(){g.qs(l.j);l.AJ=function(){}; l.j=NaN;var X=new chrome.cast.DialLaunchResponse(!0,VdF(l));c(X);j9U(l)},l.j=g.PU(function(){l.AJ()},100)})},Z17=function(l,c,Y){l.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(c)); var X=new dX(c);return(new Promise(function(k){C1V(l,X,function(r){r?(l.Kh=!0,tw(l.T,X),GI(l,X),aq(l,Y)):g.uh(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(c)+" is not online."));k(r)},5)})).then(function(k){return k?new chrome.cast.DialLaunchResponse(!1):oqi(l)})},$ZQ=function(l,c){var Y=l.U.receiver.label,X=l.G.friendlyName; return(new Promise(function(k){q1L(l.T,Y,c,X,function(r){r&&r.token&&GI(l,r);k(r)},function(r){ft(l,"Failed to get DIAL screen: "+r); k(null)})})).then(function(k){return k&&k.token?new chrome.cast.DialLaunchResponse(!1):oqi(l)})},C1V=function(l,c,Y,X){g.qs(l.W); l.W=0;N4c(l.T,c,function(k){k||X<0?Y(k):l.W=g.PU(function(){C1V(l,c,Y,X-1)},300)})},aq=function(l,c){l.info("getDialAppInfoWithTimeout_ "+c); qA(l)&&(g.qs(l.C),l.C=0,c==0?Q9e(l):l.C=g.PU(function(){Q9e(l)},c))},Q9e=function(l){qA(l)&&l.K.getDialAppInfo(function(c){l.info("getDialAppInfo dialLaunchData: "+JSON.stringify(c)); c=c.extraData||{};var Y=null;if(c.loungeToken){var X;((X=l.D)==null?void 0:X.token)==c.loungeToken&&(Y="staleLoungeToken")}else Y="missingLoungeToken";Y?(l.xT=Y,aq(l,3E4)):(l.Kh=!1,l.xT="unknown",S1Q(l,c.loungeToken),aq(l,c.loungeTokenRefreshIntervalMs))},function(c){l.info("getDialAppInfo error: "+c); l.xT="noLoungeTokenResponse";aq(l,3E4)})},mZe=function(l){g.qs(l.W); l.W=0;g.qs(l.C);l.C=0;l.N();l.N=function(){}; g.qs(l.j)},NA=function(l,c){Uw.call(this,l,c,"ManualSession"); this.K=g.PU((0,g.Fk)(this.gE,this,null),150)},pt=function(l,c){g.OG.call(this); this.config_=c;this.G=l;this.U=c.appId||"233637DE";this.T=c.theme||"cl";this.j=c.disableCastApi||!1;this.W=c.forceMirroring||!1;this.D=null;this.C=!1;this.K=[];this.N=(0,g.Fk)(this.fV6,this)},Wei=function(l,c){return c?g.gM(l.K,function(Y){return ye(c,Y.label)},l):null},Rq=function(l){cg("Controller",l)},Fpc=function(l){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(l)},iF=function(l){return l.C||!!l.K.length||!!l.D},SS=function(l,c,Y){c!=l.D&&(g.y7(l.D),(l.D=c)?(Y?l.publish("yt-remote-cast2-receiver-resumed", c.G):l.publish("yt-remote-cast2-receiver-selected",c.G),c.subscribe("sessionScreen",(0,g.Fk)(l.Dw,l,c)),c.subscribe("sessionFailed",function(){return Md7(l,c)}),c.D?l.publish("yt-remote-cast2-session-change",c.D):Y&&l.D.gE(null)):l.publish("yt-remote-cast2-session-change",null))},Md7=function(l,c){l.D==c&&l.publish("yt-remote-cast2-session-failed")},s9U=function(l){var c=l.G.II(),Y=l.D&&l.D.G; l=g.vL(c,function(X){Y&&ye(X,Y.label)&&(Y=null);var k=X.uuid?X.uuid:X.id,r=Wei(this,X);r?(r.label=k,r.friendlyName=X.name):(r=new chrome.cast.Receiver(k,X.name),r.receiverType=chrome.cast.ReceiverType.CUSTOM);return r},l); Y&&(Y.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(Y=new chrome.cast.Receiver(Y.label,Y.friendlyName),Y.receiverType=chrome.cast.ReceiverType.CUSTOM),l.push(Y));return l},FeQ=function(l,c,Y,X){X.disableCastApi?vg("Cannot initialize because disabled by Mdx config."):B4L()?LeL(c,X)&&(Eqc(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?gqV(l,Y):(window.__onGCastApiAvailable=function(k,r){k?gqV(l,Y):(xo("Failed to load cast API: "+r),uHQ(!1),Eqc(!1),g.oE("yt-remote-cast-available"),g.oE("yt-remote-cast-receiver"), A07(),Y(!1))},X.loadCastApiSetupScript?g.OR("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?CaL()>=60&&Lui():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?msV():CaL()>=89?gm6():(Bea(),q2(EmQ.map(WuV))))):vg("Cannot initialize because not running Chrome")},A07=function(){vg("dispose"); var l=zI();l&&l.dispose();g.WS("yt.mdx.remote.cloudview.instance_",null);ImN(!1);g.dI(lHc);lHc.length=0},nt=function(){return!!g.VK("yt-remote-cast-installed")},cS6=function(){var l=g.VK("yt-remote-cast-receiver"); return l?l.friendlyName:null},YRN=function(){vg("clearCurrentReceiver"); g.oE("yt-remote-cast-receiver")},XwL=function(){return nt()?zI()?zI().getCastSession():(xo("getCastSelector: Cast is not initialized."),null):(xo("getCastSelector: Cast API is not installed!"),null)},kwN=function(){nt()?zI()?hw()?(vg("Requesting cast selector."),zI().requestSession()):(vg("Wait for cast API to be ready to request the session."),lHc.push(g.JS("yt-remote-cast2-api-ready",kwN))):xo("requestCastSelector: Cast is not initialized."):xo("requestCastSelector: Cast API is not installed!")}, Hg=function(l,c){hw()?zI().setConnectedScreenStatus(l,c):xo("setConnectedScreenStatus called before ready.")},B4L=function(){var l=g.HV().search(/ (CrMo|Chrome|CriOS)\//)>=0; return g.Th||l},rSc=function(l,c){zI().init(l,c)},LeL=function(l,c){var Y=!1; zI()||(l=new pt(l,c),l.subscribe("yt-remote-cast2-availability-change",function(X){g.jQ("yt-remote-cast-available",X);P2("yt-remote-cast2-availability-change",X)}),l.subscribe("yt-remote-cast2-receiver-selected",function(X){vg("onReceiverSelected: "+X.friendlyName); g.jQ("yt-remote-cast-receiver",X);P2("yt-remote-cast2-receiver-selected",X)}),l.subscribe("yt-remote-cast2-receiver-resumed",function(X){vg("onReceiverResumed: "+X.friendlyName); g.jQ("yt-remote-cast-receiver",X);P2("yt-remote-cast2-receiver-resumed",X)}),l.subscribe("yt-remote-cast2-session-change",function(X){vg("onSessionChange: "+Op(X)); X||g.oE("yt-remote-cast-receiver");P2("yt-remote-cast2-session-change",X)}),g.WS("yt.mdx.remote.cloudview.instance_",l),Y=!0); vg("cloudview.createSingleton_: "+Y);return Y},zI=function(){return g.MX("yt.mdx.remote.cloudview.instance_")},gqV=function(l,c){uHQ(!0); Eqc(!1);rSc(l,function(Y){Y?(ImN(!0),g.y5("yt-remote-cast2-api-ready")):(xo("Failed to initialize cast API."),uHQ(!1),g.oE("yt-remote-cast-available"),g.oE("yt-remote-cast-receiver"),A07());c(Y)})},vg=function(l){cg("cloudview",l)},xo=function(l){cg("cloudview",l)},uHQ=function(l){vg("setCastInstalled_ "+l); g.jQ("yt-remote-cast-installed",l)},hw=function(){return!!g.MX("yt.mdx.remote.cloudview.apiReady_")},ImN=function(l){vg("setApiReady_ "+l); g.WS("yt.mdx.remote.cloudview.apiReady_",l)},Eqc=function(l){g.WS("yt.mdx.remote.cloudview.initializing_",l)},wG=function(l){this.index=-1; this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.W=this.C=0;this.trackData=null;this.mW=this.IB=!1;this.U=this.N=this.D=this.T=0;this.K=NaN;this.G=!1;this.reset(l)},eKQ=function(l){l.audioTrackId=null; l.trackData=null;l.playerState=-1;l.IB=!1;l.mW=!1;l.C=0;l.W=g.cV();l.T=0;l.D=0;l.N=0;l.U=0;l.K=NaN;l.G=!1},Kt=function(l){return l.isPlaying()?(g.cV()-l.W)/1E3:0},TI=function(l,c){l.C=c; l.W=g.cV()},jS=function(l){switch(l.playerState){case 1:case 1081:return(g.cV()-l.W)/1E3+l.C; case -1E3:return 0}return l.C},Vp=function(l,c,Y){var X=l.videoId; l.videoId=c;l.index=Y;c!=X&&eKQ(l)},JSM=function(l){var c={}; c.index=l.index;c.listId=l.listId;c.videoId=l.videoId;c.playerState=l.playerState;c.volume=l.volume;c.muted=l.muted;c.audioTrackId=l.audioTrackId;c.trackData=g.$p(l.trackData);c.hasPrevious=l.IB;c.hasNext=l.mW;c.playerTime=l.C;c.playerTimeAt=l.W;c.seekableStart=l.T;c.seekableEnd=l.D;c.duration=l.N;c.loadedTime=l.U;c.liveIngestionTime=l.K;return c},Ct=function(l,c){g.OG.call(this); var Y=this;this.K=0;this.T=l;this.W=[];this.N=new h8Q;this.G=this.D=null;this.j=(0,g.Fk)(this.lZJ,this);this.C=(0,g.Fk)(this.t1,this);this.U=(0,g.Fk)(this.kYf,this);this.AJ=(0,g.Fk)(this.Nk0,this);var X=0;l?(X=l.getProxyState(),X!=3&&(l.subscribe("proxyStateChange",this.EH,this),d7Q(this))):X=3;X!=0&&(c?this.EH(X):g.PU(function(){Y.EH(X)},0)); (l=XwL())&&oq(this,l);this.subscribe("yt-remote-cast2-session-change",this.AJ)},Zg=function(l){return new wG(l.T.getPlayerContextData())},d7Q=function(l){g.Uv("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(c){this.W.push(this.T.subscribe(c,g.In(this.pPf,c),this))},l)},ySc=function(l){g.Uv(l.W,function(c){this.T.unsubscribeByKey(c)},l); l.W.length=0},$o=function(l){return l.getState()==1},Qp=function(l,c){var Y=l.N; Y.D.length+Y.G.length<50&&l.N.enqueue(c)},OiQ=function(l,c,Y){var X=Zg(l); TI(X,Y);X.playerState!=-1E3&&(X.playerState=c);mH(l,X)},Wg=function(l,c,Y){l.T.sendMessage(c,Y)},mH=function(l,c){ySc(l); l.T.setPlayerContextData(JSM(c));d7Q(l)},oq=function(l,c){l.G&&(l.G.removeUpdateListener(l.j),l.G.removeMediaListener(l.C),l.t1(null)); l.G=c;l.G&&(Yo("Setting cast session: "+l.G.sessionId),l.G.addUpdateListener(l.j),l.G.addMediaListener(l.C),l.G.media.length&&l.t1(l.G.media[0]))},D7N=function(l){var c=l.D.media,Y=l.D.customData; if(c&&Y){var X=Zg(l);c.contentId!=X.videoId&&Yo("Cast changing video to: "+c.contentId);X.videoId=c.contentId;X.playerState=Y.playerState;TI(X,l.D.getEstimatedTime());mH(l,X)}else Yo("No cast media video. Ignoring state update.")},MA=function(l,c,Y){return(0,g.Fk)(function(X){this.CU("Failed to "+c+" with cast v2 channel. Error code: "+X.code); X.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.CU("Retrying "+c+" using MDx browser channel."),Wg(this,c,Y))},l)},Ew=function(l,c,Y,X){X=X===void 0?!1:X; g.OG.call(this);var k=this;this.W=NaN;this.JJ=!1;this.j=this.U=this.Kh=this.xT=NaN;this.AJ=[];this.N=this.C=this.T=this.D=this.G=null;this.NQ=l;this.Ch=X;this.AJ.push(g.i3(window,"beforeunload",function(){k.K9(2)})); this.K=[];this.D=new wG;this.yf=c.id;this.PU=c.idType;this.G=Aba(this.NQ,Y,this.Ml,this.PU=="shortLived",this.yf);this.G.listen("channelOpened",function(){tmQ(k)}); this.G.listen("channelClosed",function(){Bg("Channel closed");isNaN(k.W)?GN(!0):GN();k.dispose()}); this.G.listen("channelError",function(r){GN();isNaN(k.SK())?(r==1&&k.PU=="shortLived"&&k.publish("browserChannelAuthError",r),Bg("Channel error: "+r+" without reconnection"),k.dispose()):(k.JJ=!0,Bg("Channel error: "+r+" with reconnection in "+k.SK()+" ms"),Lt(k,2))}); this.G.listen("channelMessage",function(r){U7a(k,r)}); this.G.DT(c.token);this.subscribe("remoteQueueChange",function(){var r=k.D.videoId;g.Cl()&&g.jQ("yt-remote-session-video-id",r)})},GwL=function(l){return g.gM(l.K,function(c){return c.type=="LOUNGE_SCREEN"})},Bg=function(l){cg("conn",l)},Lt=function(l,c){l.publish("proxyStateChange",c)},fHe=function(l){l.W=g.PU(function(){Bg("Connecting timeout"); l.K9(1)},2E4)},P9L=function(l){g.qs(l.W); l.W=NaN},biL=function(l){g.qs(l.xT); l.xT=NaN},aHL=function(l){qRM(l); l.Kh=g.PU(function(){gG(l,"getNowPlaying")},2E4)},qRM=function(l){g.qs(l.Kh); l.Kh=NaN},tmQ=function(l){Bg("Channel opened"); l.JJ&&(l.JJ=!1,biL(l),l.xT=g.PU(function(){Bg("Timing out waiting for a screen.");l.K9(1)},15E3))},pwU=function(l,c){var Y=null; if(c){var X=GwL(l);X&&(Y={clientName:X.clientName,deviceMake:X.brand,deviceModel:X.model,osVersion:X.osVersion})}g.WS("yt.mdx.remote.remoteClient_",Y);c&&(P9L(l),biL(l));Y=l.G.wb()&&isNaN(l.W);c==Y?c&&(Lt(l,1),gG(l,"getSubtitlesTrack")):c?(l.jD()&&l.D.reset(),Lt(l,1),gG(l,"getNowPlaying"),NI7(l)):l.K9(1)},RKN=function(l,c){var Y=c.params.videoId; delete c.params.videoId;Y==l.D.videoId&&(g.VS(c.params)?l.D.trackData=null:l.D.trackData=c.params,l.publish("remotePlayerChange"))},iiQ=function(l,c,Y){var X=c.params.videoId||c.params.video_id,k=parseInt(c.params.currentIndex,10); l.D.listId=c.params.listId||l.D.listId;Vp(l.D,X,k);l.publish("remoteQueueChange",Y)},v4Q=function(l,c){c.params=c.params||{}; iiQ(l,c,"NOW_PLAYING_MAY_CHANGE");SRF(l,c);l.publish("autoplayDismissed")},SRF=function(l,c){var Y=parseInt(c.params.currentTime||c.params.current_time,10); TI(l.D,isNaN(Y)?0:Y);Y=parseInt(c.params.state,10);Y=isNaN(Y)?-1:Y;Y==-1&&l.D.playerState==-1E3&&(Y=-1E3);l.D.playerState=Y;Y=Number(c.params.loadedTime);l.D.U=isNaN(Y)?0:Y;l.D.VQ(Number(c.params.duration));Y=l.D;var X=Number(c.params.liveIngestionTime);Y.K=X;Y.G=isNaN(X)?!1:!0;Y=l.D;X=Number(c.params.seekableStartTime);c=Number(c.params.seekableEndTime);Y.T=isNaN(X)?0:X;Y.D=isNaN(c)?0:c;l.D.playerState==1?aHL(l):qRM(l);l.publish("remotePlayerChange")},x7F=function(l,c){if(l.D.playerState!=-1E3){var Y= 1085; switch(parseInt(c.params.adState,10)){case 1:Y=1081;break;case 2:Y=1084;break;case 0:Y=1083}l.D.playerState=Y;c=parseInt(c.params.currentTime,10);TI(l.D,isNaN(c)?0:c);l.publish("remotePlayerChange")}},zKe=function(l,c){var Y=c.params.muted=="true"; l.D.volume=parseInt(c.params.volume,10);l.D.muted=Y;l.publish("remotePlayerChange")},n4F=function(l,c){l.C=c.params.videoId; l.publish("nowAutoplaying",parseInt(c.params.timeout,10))},hKM=function(l,c){l.C=c.params.videoId||null; l.publish("autoplayUpNext",l.C)},HiN=function(l,c){l.N=c.params.autoplayMode; l.publish("autoplayModeChange",l.N);l.N=="DISABLED"&&l.publish("autoplayDismissed")},wwa=function(l,c){var Y=c.params.hasNext=="true"; l.D.IB=c.params.hasPrevious=="true";l.D.mW=Y;l.publish("previousNextChange")},U7a=function(l,c){c=c.message; c.params?Bg("Received: action="+c.action+", params="+g.$P(c.params)):Bg("Received: action="+c.action+" {}");switch(c.action){case "loungeStatus":c=Ye(c.params.devices);l.K=g.vL(c,function(X){return new Jx(X)}); c=!!g.gM(l.K,function(X){return X.type=="LOUNGE_SCREEN"}); pwU(l,c);c=l.zj("mlm");l.publish("multiStateLoopEnabled",c);break;case "loungeScreenDisconnected":g.lv(l.K,function(X){return X.type=="LOUNGE_SCREEN"}); pwU(l,!1);break;case "remoteConnected":var Y=new Jx(Ye(c.params.device));g.gM(l.K,function(X){return X.HI(Y)})||KBQ(l.K,Y); break;case "remoteDisconnected":Y=new Jx(Ye(c.params.device));g.lv(l.K,function(X){return X.HI(Y)}); break;case "gracefulDisconnect":break;case "playlistModified":iiQ(l,c,"QUEUE_MODIFIED");break;case "nowPlaying":v4Q(l,c);break;case "onStateChange":SRF(l,c);break;case "onAdStateChange":x7F(l,c);break;case "onVolumeChanged":zKe(l,c);break;case "onSubtitlesTrackChanged":RKN(l,c);break;case "nowAutoplaying":n4F(l,c);break;case "autoplayDismissed":l.publish("autoplayDismissed");break;case "autoplayUpNext":hKM(l,c);break;case "onAutoplayModeChanged":HiN(l,c);break;case "onHasPreviousNextChanged":wwa(l, c);break;case "requestAssistedSignIn":l.publish("assistedSignInRequested",c.params.authCode);break;case "onLoopModeChanged":l.publish("loopModeChange",c.params.loopMode);break;default:Bg("Unrecognized action: "+c.action)}},NI7=function(l){g.qs(l.j); l.j=g.PU(function(){l.K9(1)},864E5)},gG=function(l,c,Y){Y?Bg("Sending: action="+c+", params="+g.$P(Y)):Bg("Sending: action="+c); l.G.sendMessage(c,Y)},Ki7=function(l){eS.call(this,"ScreenServiceProxy"); this.vp=l;this.D=[];this.D.push(this.vp.$_s("screenChange",(0,g.Fk)(this.rI,this)));this.D.push(this.vp.$_s("onlineScreenChange",(0,g.Fk)(this.Q2J,this)))},C9Q=function(l,c){jvQ(); if(!fN||!fN.get("yt-remote-disable-remote-module-for-dev")){c=g.Ln("MDX_CONFIG")||c;vmE();hDi();uF||(uF=new Fd(c?c.loungeApiHost:void 0),VsU()&&(uF.D="/api/loungedev"));Aw||(Aw=g.MX("yt.mdx.remote.deferredProxies_")||[],g.WS("yt.mdx.remote.deferredProxies_",Aw));TIc();var Y=Fh();if(!Y){var X=new Dg(uF,c?c.disableAutomaticScreenCache||!1:!1);g.WS("yt.mdx.remote.screenService_",X);Y=Fh();var k={};c&&(k={appId:c.appId,disableDial:c.disableDial,theme:c.theme,loadCastApiSetupScript:c.loadCastApiSetupScript, disableCastApi:c.disableCastApi,enableDialLoungeToken:c.enableDialLoungeToken,enableCastLoungeToken:c.enableCastLoungeToken,forceMirroring:c.forceMirroring});g.WS("yt.mdx.remote.enableConnectWithInitialState_",c?c.enableConnectWithInitialState||!1:!1);FeQ(l,X,function(r){r?Iq()&&Hg(Iq(),"YouTube TV"):X.subscribe("onlineScreenChange",function(){P2("yt-remote-receiver-availability-change")})},k)}c&&!g.MX("yt.mdx.remote.initialized_")&&(g.WS("yt.mdx.remote.initialized_",!0),lV("Initializing: "+g.$P(c)), c9.push(g.JS("yt-remote-cast2-api-ready",function(){P2("yt-remote-api-ready")})),c9.push(g.JS("yt-remote-cast2-availability-change",function(){P2("yt-remote-receiver-availability-change")})),c9.push(g.JS("yt-remote-cast2-receiver-selected",function(){Y2(null); P2("yt-remote-auto-connect","cast-selector-receiver")})),c9.push(g.JS("yt-remote-cast2-receiver-resumed",function(){P2("yt-remote-receiver-resumed","cast-selector-receiver")})),c9.push(g.JS("yt-remote-cast2-session-change",jhQ)),c9.push(g.JS("yt-remote-connection-change",function(r){r?Hg(Iq(),"YouTube TV"):Xi()||(Hg(null,null),YRN())})),c9.push(g.JS("yt-remote-cast2-session-failed",function(){P2("yt-remote-connection-failed")})),l=VmF(),c.isAuto&&(l.id+="#dial"),k=c.capabilities||[],g.pg("desktop_enable_autoplay")&& k.push("atp"),k.length>0&&(l.capabilities=k),l.name=c.device,l.app=c.app,(c=c.theme)&&(l.theme=c),lV(" -- with channel params: "+g.$P(l)),l?(g.jQ("yt-remote-session-app",l.app),g.jQ("yt-remote-session-name",l.name)):(g.oE("yt-remote-session-app"),g.oE("yt-remote-session-name")),g.WS("yt.mdx.remote.channelParams_",l),Y.start(),Iq()||o4a())}},ZiQ=function(){var l=Fh().vp.$_gos(); var c=k2();c&&rJ()&&(SL7(l,c)||l.push(c));return igF(l)},QhN=function(){var l=$7N(); !l&&nt()&&cS6()&&(l={key:"cast-selector-receiver",name:cS6()});return l},$7N=function(){var l=ZiQ(),c=k2(); c||(c=Xi());return g.gM(l,function(Y){return c&&ye(c,Y.key)?!0:!1})},k2=function(){var l=Iq(); if(!l)return null;var c=Fh().r0();return D6(c,l)},jhQ=function(l){lV("remote.onCastSessionChange_: "+Op(l)); if(l){var c=k2();if(c&&c.id==l.id){if(Hg(c.id,"YouTube TV"),l.idType=="shortLived"&&(l=l.token))eP&&(eP.token=l),(c=rJ())&&c.DT(l)}else c&&J5(),dJ(l,1)}else rJ()&&J5()},J5=function(){hw()?zI().stopSession():xo("stopSession called before API ready."); var l=rJ();l&&(l.disconnect(1),m7U(null))},WiV=function(){var l=rJ(); return!!l&&l.getProxyState()!=3},lV=function(l){cg("remote",l)},Fh=function(){if(!MmU){var l=g.MX("yt.mdx.remote.screenService_"); MmU=l?new Ki7(l):null}return MmU},Iq=function(){return g.MX("yt.mdx.remote.currentScreenId_")},shV=function(l){g.WS("yt.mdx.remote.currentScreenId_",l)},BI7=function(){return g.MX("yt.mdx.remote.connectData_")},Y2=function(l){g.WS("yt.mdx.remote.connectData_",l)},rJ=function(){return g.MX("yt.mdx.remote.connection_")},m7U=function(l){var c=rJ(); Y2(null);l||shV("");g.WS("yt.mdx.remote.connection_",l);Aw&&(g.Uv(Aw,function(Y){Y(l)}),Aw.length=0); c&&!l?P2("yt-remote-connection-change",!1):!c&&l&&P2("yt-remote-connection-change",!0)},Xi=function(){var l=g.Cl(); if(!l)return null;var c=Fh();if(!c)return null;c=c.r0();return D6(c,l)},dJ=function(l,c){Iq(); k2()&&k2();if(yl)eP=l;else{shV(l.id);var Y=g.MX("yt.mdx.remote.enableConnectWithInitialState_")||!1;l=new Ew(uF,l,VmF(),Y);l.connect(c,BI7());l.subscribe("beforeDisconnect",function(X){P2("yt-remote-before-disconnect",X)}); l.subscribe("beforeDispose",function(){rJ()&&(rJ(),m7U(null))}); l.subscribe("browserChannelAuthError",function(){var X=k2();X&&X.idType=="shortLived"&&(hw()?zI().handleBrowserChannelAuthError():xo("refreshLoungeToken called before API ready."))}); m7U(l)}},o4a=function(){var l=Xi(); l?(lV("Resume connection to: "+Op(l)),dJ(l,0)):(GN(),YRN(),lV("Skipping connecting because no session screen found."))},TIc=function(){var l=VmF(); if(g.VS(l)){l=Up();var c=g.VK("yt-remote-session-name")||"",Y=g.VK("yt-remote-session-app")||"";l={device:"REMOTE_CONTROL",id:l,name:c,app:Y,mdxVersion:3};l.authuser=String(g.Ln("SESSION_INDEX","0"));(c=g.Ln("DELEGATED_SESSION_ID"))&&(l.pageId=String(c));g.WS("yt.mdx.remote.channelParams_",l)}},VmF=function(){return g.MX("yt.mdx.remote.channelParams_")||{}},g47=function(l,c,Y){g.C.call(this); var X=this;this.module=l;this.V=c;this.WA=Y;this.events=new g.Cr(this);this.T=!1;this.N=new g.kN(64);this.D=new g.gY(this.mH,500,this);this.G=new g.gY(this.pn,1E3,this);this.C=new aX(this.sH7,0,this);this.K={};this.U=new g.gY(this.o7,1E3,this);this.W=new g.Ij(this.seekTo,1E3,this);this.j=this.events.Z(this.V,"onVolumeChange",function(k){LiL(X,k)}); g.Z(this,this.events);this.events.Z(c,"onCaptionsTrackListChanged",this.rW0);this.events.Z(c,"captionschanged",this.P8d);this.events.Z(c,"captionssettingschanged",this.K_);this.events.Z(c,"videoplayerreset",this.CQ);this.events.Z(c,"mdxautoplaycancel",function(){X.WA.tj()}); c.B("enable_mdx_video_play_directly")&&this.events.Z(c,"videodatachange",function(){E4e(X.module)||OB(X)||Dp(X,0)}); l=this.WA;l.vU();l.subscribe("proxyStateChange",this.Rr,this);l.subscribe("remotePlayerChange",this.J1,this);l.subscribe("remoteQueueChange",this.CQ,this);l.subscribe("previousNextChange",this.n8,this);l.subscribe("nowAutoplaying",this.qe,this);l.subscribe("autoplayDismissed",this.Wj,this);g.Z(this,this.D);g.Z(this,this.G);g.Z(this,this.C);g.Z(this,this.U);g.Z(this,this.W);this.K_();this.CQ();this.J1()},LiL=function(l,c){if(OB(l)){l.WA.unsubscribe("remotePlayerChange",l.J1,l); var Y=Math.round(c.volume);c=!!c.muted;var X=Zg(l.WA);if(Y!==X.volume||c!==X.muted)l.WA.setVolume(Y,c),l.U.start();l.WA.subscribe("remotePlayerChange",l.J1,l)}},ubE=function(l){l.b8(0); l.D.stop();l.JW(new g.kN(64))},ASQ=function(l,c){if(OB(l)&&!l.T){var Y=null; c&&(Y={style:l.V.getSubtitlesUserSettings()},Object.assign(Y,c));l.WA.ql(l.V.getVideoData(1).videoId,Y);l.K=Zg(l.WA).trackData}},Dp=function(l,c){var Y=l.V.getPlaylist(); if(Y==null?0:Y.listId){var X=Y.index;var k=Y.listId.toString()}Y=l.V.getVideoData(1);l.WA.playVideo(Y.videoId,c,X,k,Y.playerParams,Y.PU,wpi(Y));l.JW(new g.kN(1))},Fi7=function(l,c){if(c){var Y=l.V.getOption("captions","tracklist",{rp:1}); Y&&Y.length?(l.V.setOption("captions","track",c),l.T=!1):(l.V.loadModule("captions"),l.T=!0)}else l.V.setOption("captions","track",{})},OB=function(l){return Zg(l.WA).videoId===l.V.getVideoData(1).videoId},IHE=function(l){this.D=l},t5=function(){g.B.call(this,{J:"div", X:"ytp-mdx-popup-dialog",S:{role:"dialog"},Y:[{J:"div",X:"ytp-mdx-popup-dialog-inner-content",Y:[{J:"div",X:"ytp-mdx-popup-title",Qf:"You're signed out"},{J:"div",X:"ytp-mdx-popup-description",Qf:"Videos you watch may be added to the TV's watch history and influence TV recommendations. To avoid this, cancel and sign in to YouTube on your computer."},{J:"div",X:"ytp-mdx-privacy-popup-buttons",Y:[{J:"button",WU:["ytp-button","ytp-mdx-privacy-popup-cancel"],Qf:"Cancel"},{J:"button",WU:["ytp-button", "ytp-mdx-privacy-popup-confirm"],Qf:"Confirm"}]}]}]});this.fade=new g.Xz(this,250);this.cancelButton=this.wf("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.wf("ytp-mdx-privacy-popup-confirm");g.Z(this,this.fade);this.Z(this.cancelButton,"click",this.D);this.Z(this.confirmButton,"click",this.G)},UB=function(l){g.B.call(this,{J:"div", X:"ytp-remote",Y:[{J:"div",X:"ytp-remote-display-status",Y:[{J:"div",X:"ytp-remote-display-status-icon",Y:[g.Day()]},{J:"div",X:"ytp-remote-display-status-text",Qf:"{{statustext}}"}]}]});this.api=l;this.fade=new g.Xz(this,250);g.Z(this,this.fade);this.Z(l,"presentingplayerstatechange",this.onStateChange);this.cA(l.getPlayerStateObject())},G8=function(l,c){g.oi.call(this,"Play on",1,l,c); this.V=l;this.pD={};this.Z(l,"onMdxReceiversChange",this.T);this.Z(l,"presentingplayerstatechange",this.T);this.T()},lNQ=function(l){g.GH.call(this,l); this.aB={key:RD7(),name:"This computer"};this.bq=null;this.subscriptions=[];this.U0=this.WA=null;this.pD=[this.aB];this.UP=this.aB;this.ZC=new g.kN(64);this.B$=0;this.kA=-1;this.Zj=!1;this.RV=this.dj=this.je=null;if(!g.o1(this.player.L())&&!g.Zq(this.player.L())){l=this.player;var c=g.qu(l);c&&(c=c.o5())&&(c=new G8(l,c),g.Z(this,c));c=new UB(l);g.Z(this,c);g.oD(l,c.element,4);this.je=new t5;g.Z(this,this.je);g.oD(l,this.je.element,4);this.Zj=!!Xi()}},f2=function(l){l.dj&&(l.player.removeEventListener("presentingplayerstatechange", l.dj),l.dj=null)},ck7=function(l,c,Y){l.ZC=Y; l.player.publish("presentingplayerstatechange",new g.Gd(Y,c))},P9=function(l,c){if(c.key!==l.UP.key)if(c.key===l.aB.key)J5(); else if(E4e(l)&&Y3U(l),l.UP=c,!l.player.L().B("disable_mdx_connection_in_mdx_module_for_music_web")||!g.Zq(l.player.L())){var Y=l.player.getPlaylistId();var X=l.player.getVideoData(1);var k=X.videoId;if(!Y&&!k||(l.player.getAppState()===2||l.player.getAppState()===1)&&l.player.L().B("should_clear_video_data_on_player_cued_unstarted"))X=null;else{var r=l.player.getPlaylist();if(r){var e=[];for(var d=0;d2*this.size&&ee(this),!0):!1}; g.J.get=function(l,c){return ke(this.G,l)?this.G[l]:c}; g.J.set=function(l,c){ke(this.G,l)||(this.size+=1,this.D.push(l),this.F0++);this.G[l]=c}; g.J.forEach=function(l,c){for(var Y=this.DM(),X=0;X=X.D.length)return g.e7;var r=X.D[c++];return g.rn(l?r:X.G[r])}; return k}; var FBL={Lis:"atp",VA0:"ska",Ml7:"que",c4s:"mus",JwQ:"sus",CNQ:"dsp",pnQ:"seq",hCQ:"mic",qOQ:"dpa",cYQ:"cds",u4z:"mlm",Zxf:"dsdtr",S3A:"ntb",fG0:"vsp",amf:"scn",UGh:"rpe",bx0:"dcn",ImQ:"dcp",kZf:"pas",dd0:"drq",KVf:"opf",rsd:"els",eJ7:"isg",Gmf:"svq",eCs:"mvp",cC0:"ads",YMQ:"iat",HjJ:"stcp",tAh:"sads",Fws:"dloc"},IYE={SZd:"u",Dd0:"cl",Pq7:"k",nPs:"i",WwA:"cr",r4T:"m",T0s:"g",kR:"up"},CkQ={wR:"adPlaying",tS:"onAdStateChange"},Zbc={DG0:"nowPlaying",QAs:"onStateChange",wR:"adPlaying",tS:"onAdStateChange"}; Jx.prototype.HI=function(l){return l?this.id==l.id:!1}; var nmc="",fN=null;omQ.prototype.flush=function(l,c){l=l===void 0?[]:l;c=c===void 0?!1:c;if(g.pg("enable_client_streamz_web")){l=g.b(l);for(var Y=l.next();!Y.done;Y=l.next())Y=g.yhg(Y.value),Y={serializedIncrementBatch:g.aW(Y.D())},g.Oq("streamzIncremented",Y,{sendIsolatedPayload:c})}}; var b4,sv6=ZgQ("loadCastFramework")||ZgQ("loadCastApplicationFramework"),EmQ=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.Xc(aX,g.C);g.J=aX.prototype;g.J.C5=function(l){this.T=arguments;this.D=!1;this.O$?this.K=g.cV()+this.DY:this.O$=g.VE(this.N,this.DY)}; g.J.stop=function(){this.O$&&(g.Qn.clearTimeout(this.O$),this.O$=null);this.K=null;this.D=!1;this.T=[]}; g.J.pause=function(){++this.G}; g.J.resume=function(){this.G&&(--this.G,!this.G&&this.D&&(this.D=!1,this.W.apply(null,this.T)))}; g.J.Tz=function(){this.stop();aX.Ty.Tz.call(this)}; g.J.vQ=function(){this.O$&&(g.Qn.clearTimeout(this.O$),this.O$=null);this.K?(this.O$=g.VE(this.N,this.K-g.cV()),this.K=null):this.G?this.D=!0:(this.D=!1,this.W.apply(null,this.T))};N2.prototype.stringify=function(l){return g.Qn.JSON.stringify(l,void 0)}; N2.prototype.parse=function(l){return g.Qn.JSON.parse(l,void 0)};g.Xc(u9L,g.m3);g.Xc(A1i,g.m3);var FuQ=null;g.Xc(l0c,g.m3);g.Xc(cAL,g.m3);g.Xc(YdN,g.m3);Se.prototype.debug=function(){}; Se.prototype.info=function(){}; Se.prototype.warning=function(){};var OlQ={},yAi={};g.J=v2.prototype;g.J.setTimeout=function(l){this.uQ=l}; g.J.X6=function(l){l=l.target;var c=this.Ed;c&&g.eD(l)==3?c.bk():this.T4(l)}; g.J.T4=function(l){try{if(l==this.D)a:{var c=g.eD(this.D),Y=this.D.G,X=this.D.getStatus();if(!(c<3)&&(c!=3||this.D&&(this.G.G||g.db(this.D)||g.yq(this.D)))){this.Ch||c!=4||Y==7||(Y==8||X<=0?pN(3):pN(2));U1N(this);var k=this.D.getStatus();this.Gc=k;var r=d16(this);if(this.W=k==200){if(this.Pu&&!this.ZA){b:{if(this.D){var e=g.OQ(this.D,"X-HTTP-Initial-Response");if(e&&!g.iQ(e)){var d=e;break b}}d=null}if(l=d)this.ZA=!0,RgL(this,l);else{this.W=!1;this.N=3;RX(12);zN(this);nN(this);break a}}if(this.PU){l= !0;for(var y;!this.Ch&&this.C0&&!this.V2&&(this.V2=!0,this.K.LL(this)):(zN(this),nN(this))}else RgL(this,r);c==4&&zN(this);this.W&&!this.Ch&&(c==4?GtN(this.K,this):(this.W=!1,xe(this)))}else g.npv(this.D),k==400&&r.indexOf("Unknown SID")> 0?(this.N=3,RX(12)):(this.N=0,RX(13)),zN(this),nN(this)}}}catch(O){}finally{}}; g.J.cancel=function(){this.Ch=!0;zN(this)}; g.J.HQ=function(){this.AJ=null;var l=Date.now();l-this.iQ>=0?(this.yf!=2&&(pN(3),RX(17)),zN(this),this.N=2,nN(this)):tQE(this,this.iQ-l)}; g.J.getLastError=function(){return this.N}; g.J.a8=function(){return this.D};SdM.prototype.cancel=function(){this.K=x1L(this);if(this.G)this.G.cancel(),this.G=null;else if(this.D&&this.D.size!==0){for(var l=g.b(this.D.values()),c=l.next();!c.done;c=l.next())c.value.cancel();this.D.clear()}};g.J=wJQ.prototype;g.J.z4=8;g.J.DR=1;g.J.connect=function(l,c,Y,X){RX(0);this.qJ=l;this.Ch=c||{};Y&&X!==void 0&&(this.Ch.OSID=Y,this.Ch.OAID=X);this.ZA=this.OV;this.NQ=a0N(this,null,this.qJ);KN(this)}; g.J.disconnect=function(){TFM(this);if(this.DR==3){var l=this.nh++,c=this.NQ.clone();g.nR(c,"SID",this.T);g.nR(c,"RID",l);g.nR(c,"TYPE","terminate");Ve(this,c);l=new v2(this,this.T,l);l.yf=2;l.U=l4(c.clone());c=!1;if(g.Qn.navigator&&g.Qn.navigator.sendBeacon)try{c=g.Qn.navigator.sendBeacon(l.U.toString(),"")}catch(Y){}!c&&g.Qn.Image&&((new Image).src=l.U,c=!0);c||(l.D=egi(l.K,null),l.D.send(l.U));l.xT=Date.now();xe(l)}$1U(this)}; g.J.tN=function(){return this.DR==0}; g.J.getState=function(){return this.DR}; g.J.gt=function(l){if(this.W)if(this.W=null,this.DR==1){if(!l){this.nh=Math.floor(Math.random()*1E5);l=this.nh++;var c=new v2(this,"",l),Y=this.j;this.Gc&&(Y?(Y=g.Z4(Y),g.QS(Y,this.Gc)):Y=this.Gc);this.C!==null||this.iQ||(c.NQ=Y,Y=null);var X;if(this.ph)a:{for(var k=X=0;k4096){X=k;break a}if(X===4096||k===this.K.length-1){X=k+1;break a}}X= 1E3}else X=1E3;X=oEE(this,c,X);k=this.NQ.clone();g.nR(k,"RID",l);g.nR(k,"CVER",22);this.PU&&g.nR(k,"X-HTTP-Session-Id",this.PU);Ve(this,k);Y&&(this.iQ?X="headers="+g.Yp(g.W3S(Y))+"&"+X:this.C&&g.KR(k,this.C,Y));qdU(this.G,c);this.o4&&g.nR(k,"TYPE","init");this.ph?(g.nR(k,"$req",X),g.nR(k,"SID","null"),c.Pu=!0,rAe(c,k,null)):rAe(c,k,X);this.DR=2}}else this.DR==3&&(l?C3M(this,l):this.K.length==0||vEc(this.G)||C3M(this))}; g.J.xG=function(){this.U=null;ZlE(this);if(this.fC&&!(this.uQ||this.D==null||this.CC<=0)){var l=2*this.CC;this.JJ=i4((0,g.Fk)(this.JWQ,this),l)}}; g.J.JWQ=function(){this.JJ&&(this.JJ=null,this.ZA=!1,this.uQ=!0,RX(10),H2(this),ZlE(this))}; g.J.LL=function(l){this.D==l&&this.fC&&!this.uQ&&(KlE(this),this.uQ=!0,RX(11))}; g.J.b4=function(){this.AJ!=null&&(this.AJ=null,H2(this),P3i(this),RX(19))}; g.J.Kf6=function(l){l?RX(2):RX(1)}; g.J.isActive=function(){return!!this.N&&this.N.isActive(this)}; g.J=m1L.prototype;g.J.kG=function(){}; g.J.VZ=function(){}; g.J.PJ=function(){}; g.J.Je=function(){}; g.J.isActive=function(){return!0}; g.J.I6=function(){};g.Xc(CN,g.d3);CN.prototype.open=function(){this.D.N=this.K;this.W&&(this.D.yf=!0);this.D.connect(this.N,this.G||void 0)}; CN.prototype.close=function(){this.D.disconnect()}; CN.prototype.send=function(l){var c=this.D;if(typeof l==="string"){var Y={};Y.__data__=l;l=Y}else this.T&&(Y={},Y.__data__=g.$P(l),l=Y);c.K.push(new ilE(c.EG++,l));c.DR==3&&KN(c)}; CN.prototype.Tz=function(){this.D.N=null;delete this.K;this.D.disconnect();delete this.D;CN.Ty.Tz.call(this)}; g.Xc(MQN,u9L);g.Xc(sEV,A1i);g.Xc(oX,m1L);oX.prototype.kG=function(){this.D.dispatchEvent("m")}; oX.prototype.VZ=function(l){this.D.dispatchEvent(new MQN(l))}; oX.prototype.PJ=function(l){this.D.dispatchEvent(new sEV(l))}; oX.prototype.Je=function(){this.D.dispatchEvent("n")};var $e=new g.d3;g.P(EEV,g.m3);g.J=mg.prototype;g.J.uX=null;g.J.BM=!1;g.J.Pv=null;g.J.Uv=null;g.J.yk=null;g.J.Ng=null;g.J.CR=null;g.J.W6=null;g.J.cH=null;g.J.Vj=null;g.J.Cc=0;g.J.B3=null;g.J.B6=null;g.J.e_=null;g.J.H4=-1;g.J.Wy=!0;g.J.v4=!1;g.J.Mm=0;g.J.lk=null;var lnF={},I0L={};g.J=mg.prototype;g.J.setTimeout=function(l){this.G=l}; g.J.dI=function(l){l=l.target;var c=this.lk;c&&g.eD(l)==3?c.bk():this.lE(l)}; g.J.lE=function(l){try{if(l==this.Vj)a:{var c=g.eD(this.Vj),Y=this.Vj.G,X=this.Vj.getStatus();if(g.Yx&&!g.qM("420+")){if(c<4)break a}else if(c<3||c==3&&!g.db(this.Vj))break a;this.v4||c!=4||Y==7||(Y==8||X<=0?this.D.Fi(3):this.D.Fi(2));XHN(this);var k=this.Vj.getStatus();this.H4=k;var r=g.db(this.Vj);if(this.BM=k==200){c==4&&W2(this);if(this.PU){for(l=!0;!this.v4&&this.Cc0?(this.e_=3,Qe(13)):(this.e_=0,Qe(14)),W2(this),kPM(this)}}catch(d){}finally{}}; g.J.cancel=function(){this.v4=!0;W2(this)}; g.J.F6=function(){this.Pv=null;var l=Date.now();l-this.Uv>=0?(this.Ng!=2&&this.D.Fi(3),W2(this),this.e_=2,Qe(18),kPM(this)):Yq7(this,this.Uv-l)}; g.J.getLastError=function(){return this.e_};g.J=daF.prototype;g.J.Yb=null;g.J.Cd=null;g.J.m8=!1;g.J.Ov=null;g.J.Bs=null;g.J.L$=-1;g.J.v6=null;g.J.Ub=null;g.J.connect=function(l){this.Ov=l;l=sp(this.D,null,this.Ov);Qe(3);Date.now();var c=this.D.j;c!=null?(this.v6=c[0],(this.Ub=c[1])?(this.Bs=1,ybN(this)):(this.Bs=2,Obi(this))):(c2(l,"MODE","init"),this.Cd=new mg(this),this.Cd.uX=this.Yb,AAa(this.Cd,l,!1,null,!0),this.Bs=0)}; g.J.iR=function(l){if(l)this.Bs=2,Obi(this);else{Qe(4);var c=this.D;c.iS=c.M9.L$;gX(c,9)}l&&this.Fi(2)}; g.J.Lw=function(l){return this.D.Lw(l)}; g.J.abort=function(){this.Cd&&(this.Cd.cancel(),this.Cd=null);this.L$=-1}; g.J.tN=function(){return!1}; g.J.WJ=function(l,c){this.L$=l.H4;if(this.Bs==0)if(c){try{var Y=this.G.parse(c)}catch(X){l=this.D;l.iS=this.L$;gX(l,2);return}this.v6=Y[0];this.Ub=Y[1]}else l=this.D,l.iS=this.L$,gX(l,2);else this.Bs==2&&(this.m8?(Qe(7),Date.now()):c=="11111"?(Qe(6),this.m8=!0,Date.now(),this.L$=200,this.Cd.cancel(),Qe(12),B2(this.D,this,!0)):(Qe(8),Date.now(),this.m8=!1))}; g.J.nw=function(){this.L$=this.Cd.H4;if(this.Cd.BM)this.Bs==0?this.Ub?(this.Bs=1,ybN(this)):(this.Bs=2,Obi(this)):this.Bs==2&&(this.m8?(Qe(12),B2(this.D,this,!0)):(Qe(11),B2(this.D,this,!1)));else{this.Bs==0?Qe(9):this.Bs==2&&Qe(10);var l=this.D;this.Cd.getLastError();l.iS=this.L$;gX(l,2)}}; g.J.Xk=function(){return this.D.Xk()}; g.J.isActive=function(){return this.D.isActive()}; g.J.Fi=function(l){this.D.Fi(l)};g.J=DaM.prototype;g.J.CF=null;g.J.sR=null;g.J.qd=null;g.J.wD=null;g.J.cG=null;g.J.H6=null;g.J.Nl=null;g.J.u6=null;g.J.bz=0;g.J.Eh=0;g.J.eS=null;g.J.CA=null;g.J.Yx=null;g.J.mT=null;g.J.M9=null;g.J.g5=null;g.J.Wv=-1;g.J.BJ=-1;g.J.iS=-1;g.J.lJ=0;g.J.VV=0;g.J.Rv=8;g.Xc(Uac,g.m3);g.Xc(GPQ,g.m3);g.J=DaM.prototype;g.J.connect=function(l,c,Y,X,k){Qe(0);this.cG=c;this.sR=Y||{};X&&k!==void 0&&(this.sR.OSID=X,this.sR.OAID=k);this.U?(Z6((0,g.Fk)(this.oW,this,l),100),PkU(this)):this.oW(l)}; g.J.disconnect=function(){bbV(this);if(this.D==3){var l=this.bz++,c=this.H6.clone();g.nR(c,"SID",this.T);g.nR(c,"RID",l);g.nR(c,"TYPE","terminate");Ep(this,c);l=new mg(this,this.T,l);l.Ng=2;l.CR=l4(c.clone());(new Image).src=l.CR.toString();l.yk=Date.now();FlQ(l)}z86(this)}; g.J.oW=function(l){this.M9=new daF(this);this.M9.Yb=this.CF;this.M9.G=this.N;this.M9.connect(l)}; g.J.tN=function(){return this.D==0}; g.J.getState=function(){return this.D}; g.J.vJ=function(l){this.CA=null;R8U(this,l)}; g.J.C1=function(){this.Yx=null;this.wD=new mg(this,this.T,"rpc",this.C);this.wD.uX=this.CF;this.wD.Mm=0;var l=this.Nl.clone();g.nR(l,"RID","rpc");g.nR(l,"SID",this.T);g.nR(l,"CI",this.g5?"0":"1");g.nR(l,"AID",this.Wv);Ep(this,l);g.nR(l,"TYPE","xmlhttp");AAa(this.wD,l,!0,this.u6,!1)}; g.J.WJ=function(l,c){if(this.D!=0&&(this.wD==l||this.qd==l))if(this.iS=l.H4,this.qd==l&&this.D==3)if(this.Rv>7){try{var Y=this.N.parse(c)}catch(X){Y=null}if(Array.isArray(Y)&&Y.length==3)if(l=Y,l[0]==0)a:{if(!this.Yx){if(this.wD)if(this.wD.yk+3E30)){if(X=c==1)this.qd||this.CA||this.D==1||this.lJ>=2?X=!1:(this.CA=Z6((0,g.Fk)(this.vJ,this,l),SqQ(this,this.lJ)),this.lJ++,X=!0);X=!(X||c==2&&vlM(this))}if(X)switch(Y){case 1:gX(this, 5);break;case 4:gX(this,10);break;case 3:gX(this,6);break;case 7:gX(this,12);break;default:gX(this,2)}}}; g.J.Z4=function(l){if(!g.AE(arguments,this.D))throw Error("Unexpected channel state: "+this.D);}; g.J.ACs=function(l){l?Qe(2):(Qe(1),xaE(this,8))}; g.J.Lw=function(l){if(l)throw Error("Can't create secondary domain capable XhrIo object.");l=new g.XQ;l.C=!1;return l}; g.J.isActive=function(){return!!this.eS&&this.eS.isActive(this)}; g.J.Fi=function(l){var c=$e;c.dispatchEvent(new GPQ(c,l))}; g.J.Xk=function(){return!1}; g.J=nli.prototype;g.J.Xp=function(){}; g.J.yZ=function(){}; g.J.HJ=function(){}; g.J.r5=function(){}; g.J.bE=function(){return{}}; g.J.isActive=function(){return!0};g.J=h8Q.prototype;g.J.enqueue=function(l){this.G.push(l)}; g.J.isEmpty=function(){return this.D.length===0&&this.G.length===0}; g.J.clear=function(){this.D=[];this.G=[]}; g.J.contains=function(l){return g.AE(this.D,l)||g.AE(this.G,l)}; g.J.remove=function(l){var c=this.D;var Y=(0,g.vvE)(c,l);Y>=0?(g.Fc(c,Y),c=!0):c=!1;return c||g.IU(this.G,l)}; g.J.uq=function(){for(var l=[],c=this.D.length-1;c>=0;--c)l.push(this.D[c]);c=this.G.length;for(var Y=0;Y=XRa.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(l=XRa[this.G],this.O$=g.PU((0,g.Fk)(this.qV,this),l),this.G++):this.publish("pairingFailed",Error("Server error "+l.status))}; g.J.Yv=function(){this.D=null;this.publish("pairingFailed",Error("Server not responding"))}; var XRa=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.Xc(dG,eS);g.J=dG.prototype;g.J.start=function(){Jw(this)&&this.publish("screenChange");!g.VK("yt-remote-lounge-token-expiration")&&y0c(this);g.qs(this.D);this.D=g.PU((0,g.Fk)(this.start,this),1E4)}; g.J.add=function(l,c){Jw(this);r06(this,l);yp(this,!1);this.publish("screenChange");c(l);l.token||y0c(this)}; g.J.remove=function(l,c){var Y=Jw(this);J0U(this,l)&&(yp(this,!1),Y=!0);c(l);Y&&this.publish("screenChange")}; g.J.zW=function(l,c,Y,X){var k=Jw(this),r=this.get(l.id);r?(r.name!=c&&(r.name=c,yp(this,!1),k=!0),Y(l)):X(Error("no such local screen."));k&&this.publish("screenChange")}; g.J.Tz=function(){g.qs(this.D);dG.Ty.Tz.call(this)}; g.J.W0A=function(l){Jw(this);var c=this.screens.length;l=l&&l.screens||[];for(var Y=l.length,X=0;X20)break a;d=c(r,e)}r=d}k.name=r}Y(tw(this,k))},this), onError:(0,g.Fk)(function(k){X(Error("pairing request failed: "+k.status))},this), onTimeout:(0,g.Fk)(function(){X(Error("pairing request timed out."))},this)})}; g.J.Tz=function(){g.y7(this.G);g.y7(this.D);Dg.Ty.Tz.call(this)}; g.J.IA7=function(){pQ7(this);this.publish("screenChange");this.D.update()}; Dg.prototype.dispose=Dg.prototype.dispose;g.Xc(Uw,g.OG);g.J=Uw.prototype;g.J.YW=function(l){this.vU()||(l&&(ft(this,""+l),this.publish("sessionFailed")),this.D=null,this.publish("sessionScreen",null))}; g.J.info=function(l){cg(this.PU,l)}; g.J.Z2=function(){return null}; g.J.bA=function(l){var c=this.G;l?(c.displayStatus=new chrome.cast.ReceiverDisplayStatus(l,[]),c.displayStatus.showStop=!0):c.displayStatus=null;chrome.cast.setReceiverDisplayStatus(c,(0,g.Fk)(function(){this.info("Updated receiver status for "+c.friendlyName+": "+l)},this),(0,g.Fk)(function(){ft(this,"Failed to update receiver status for: "+c.friendlyName)},this))}; g.J.Tz=function(){this.bA("");Uw.Ty.Tz.call(this)};g.P(Pg,Uw);g.J=Pg.prototype;g.J.XL=function(l){if(this.K){if(this.K==l)return;ft(this,"Overriding cast session with new session object");T46(this);this.xT=!1;this.j="unknown";this.K.removeUpdateListener(this.Kh);this.K.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.JJ)}this.K=l;this.K.addUpdateListener(this.Kh);this.K.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.JJ);nqQ(this,"getMdxSessionStatus")}; g.J.gE=function(l){this.info("launchWithParams no-op for Cast: "+g.$P(l))}; g.J.stop=function(){this.K?this.K.stop((0,g.Fk)(function(){this.YW()},this),(0,g.Fk)(function(){this.YW(Error("Failed to stop receiver app."))},this)):this.YW(Error("Stopping cast device without session."))}; g.J.bA=function(){}; g.J.Tz=function(){this.info("disposeInternal");T46(this);this.K&&(this.K.removeUpdateListener(this.Kh),this.K.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.JJ));this.K=null;Uw.prototype.Tz.call(this)}; g.J.pZd=function(l,c){if(!this.vU())if(c)if(c=Ye(c),g.gy(c))switch(l=""+c.type,c=c.data||{},this.info("onYoutubeMessage_: "+l+" "+g.$P(c)),l){case "mdxSessionStatus":vqF(this,c);break;case "loungeToken":hdi(this,c);break;default:ft(this,"Unknown youtube message: "+l)}else ft(this,"Unable to parse message.");else ft(this,"No data in message.")}; g.J.Kq=function(l,c,Y,X){g.qs(this.U);this.U=0;q1L(this.T,this.G.label,l,this.G.friendlyName,(0,g.Fk)(function(k){k?c(k):X>=0?(ft(this,"Screen "+l+" appears to be offline. "+X+" retries left."),this.U=g.PU((0,g.Fk)(this.Kq,this,l,c,Y,X-1),300)):Y(Error("Unable to fetch screen."))},this),Y)}; g.J.Z2=function(){return this.K}; g.J.Oh=function(l){this.vU()||l||(ft(this,"Cast session died."),this.YW())};g.P(bF,Uw);g.J=bF.prototype;g.J.XL=function(l){this.K=l;this.K.addUpdateListener(this.Ch)}; g.J.gE=function(l){this.NQ=l;this.AJ()}; g.J.stop=function(){mZe(this);this.K?this.K.stop((0,g.Fk)(this.YW,this,null),(0,g.Fk)(this.YW,this,"Failed to stop DIAL device.")):this.YW()}; g.J.Tz=function(){mZe(this);this.K&&this.K.removeUpdateListener(this.Ch);this.K=null;Uw.prototype.Tz.call(this)}; g.J.o6=function(l){this.vU()||l||(ft(this,"DIAL session died."),this.N(),this.N=function(){},this.YW())};g.P(NA,Uw);NA.prototype.stop=function(){this.YW()}; NA.prototype.XL=function(){}; NA.prototype.gE=function(){g.qs(this.K);this.K=NaN;var l=D6(this.T.r0(),this.G.label);l?GI(this,l):this.YW(Error("No such screen"))}; NA.prototype.Tz=function(){g.qs(this.K);this.K=NaN;Uw.prototype.Tz.call(this)};g.P(pt,g.OG);g.J=pt.prototype; g.J.init=function(l,c){chrome.cast.timeout.requestSession=3E4;var Y=new chrome.cast.SessionRequest(this.U,[chrome.cast.Capability.AUDIO_OUT]);g.pg("desktop_enable_cast_connect")&&(Y.androidReceiverCompatible=!0);this.j||(Y.dialRequest=new chrome.cast.DialRequest("YouTube"));var X=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;l=l||this.W?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var k=(0,g.Fk)(this.KE7,this);Y=new chrome.cast.ApiConfig(Y,(0,g.Fk)(this.jH, this),k,X,l);Y.customDialLaunchCallback=(0,g.Fk)(this.bCQ,this);chrome.cast.initialize(Y,(0,g.Fk)(function(){this.vU()||(chrome.cast.addReceiverActionListener(this.N),c0e(),this.G.subscribe("onlineScreenChange",(0,g.Fk)(this.Ee,this)),this.K=s9U(this),chrome.cast.setCustomReceivers(this.K,function(){},(0,g.Fk)(function(r){this.CU("Failed to set initial custom receivers: "+g.$P(r))},this)),this.publish("yt-remote-cast2-availability-change",iF(this)),c(!0))},this),(0,g.Fk)(function(r){this.CU("Failed to initialize API: "+ g.$P(r)); c(!1)},this))}; g.J.kOQ=function(l,c){Rq("Setting connected screen ID: "+l+" -> "+c);if(this.D){var Y=this.D.D;if(!l||Y&&Y.id!=l)Rq("Unsetting old screen status: "+this.D.G.friendlyName),SS(this,null)}if(l&&c){if(!this.D){l=D6(this.G.r0(),l);if(!l){Rq("setConnectedScreenStatus: Unknown screen.");return}if(l.idType=="shortLived"){Rq("setConnectedScreenStatus: Screen with id type to be short lived.");return}Y=Wei(this,l);Y||(Rq("setConnectedScreenStatus: Connected receiver not custom..."),Y=new chrome.cast.Receiver(l.uuid? l.uuid:l.id,l.name),Y.receiverType=chrome.cast.ReceiverType.CUSTOM,this.K.push(Y),chrome.cast.setCustomReceivers(this.K,function(){},(0,g.Fk)(function(X){this.CU("Failed to set initial custom receivers: "+g.$P(X))},this))); Rq("setConnectedScreenStatus: new active receiver: "+Y.friendlyName);SS(this,new NA(this.G,Y),!0)}this.D.bA(c)}else Rq("setConnectedScreenStatus: no screen.")}; g.J.BDf=function(l){this.vU()?this.CU("Setting connection data on disposed cast v2"):this.D?this.D.gE(l):this.CU("Setting connection data without a session")}; g.J.ea=function(){this.vU()?this.CU("Stopping session on disposed cast v2"):this.D?(this.D.stop(),SS(this,null)):Rq("Stopping non-existing session")}; g.J.requestSession=function(){chrome.cast.requestSession((0,g.Fk)(this.jH,this),(0,g.Fk)(this.yVh,this))}; g.J.Tz=function(){this.G.unsubscribe("onlineScreenChange",(0,g.Fk)(this.Ee,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.N);var l=Fpc,c=g.MX("yt.mdx.remote.debug.handlers_");g.IU(c||[],l);g.y7(this.D);g.OG.prototype.Tz.call(this)}; g.J.CU=function(l){cg("Controller",l)}; g.J.Dw=function(l,c){this.D==l&&(c||SS(this,null),this.publish("yt-remote-cast2-session-change",c))}; g.J.fV6=function(l,c){if(!this.vU())if(l)switch(l.friendlyName=chrome.cast.unescape(l.friendlyName),Rq("onReceiverAction_ "+l.label+" / "+l.friendlyName+"-- "+c),c){case chrome.cast.ReceiverAction.CAST:if(this.D)if(this.D.G.label!=l.label)Rq("onReceiverAction_: Stopping active receiver: "+this.D.G.friendlyName),this.D.stop();else{Rq("onReceiverAction_: Casting to active receiver.");this.D.D&&this.publish("yt-remote-cast2-session-change",this.D.D);break}switch(l.receiverType){case chrome.cast.ReceiverType.CUSTOM:SS(this, new NA(this.G,l));break;case chrome.cast.ReceiverType.DIAL:SS(this,new bF(this.G,l,this.T,this.config_));break;case chrome.cast.ReceiverType.CAST:SS(this,new Pg(this.G,l,this.config_));break;default:this.CU("Unknown receiver type: "+l.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.D&&this.D.G.label==l.label?this.D.stop():this.CU("Stopping receiver w/o session: "+l.friendlyName)}else this.CU("onReceiverAction_ called without receiver.")}; g.J.bCQ=function(l){if(this.vU())return Promise.reject(Error("disposed"));var c=l.receiver;c.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.CU("Not DIAL receiver: "+c.friendlyName),c.receiverType=chrome.cast.ReceiverType.DIAL);var Y=this.D?this.D.G:null;if(!Y||Y.label!=c.label)return this.CU("Receiving DIAL launch request for non-clicked DIAL receiver: "+c.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(Y&&Y.label==c.label&&Y.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.D.D)return Rq("Reselecting dial screen."), this.publish("yt-remote-cast2-session-change",this.D.D),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.CU('Changing CAST intent from "'+Y.receiverType+'" to "dial" for '+c.friendlyName);SS(this,new bF(this.G,c,this.T,this.config_))}c=this.D;c.U=l;c.U.appState==chrome.cast.DialAppState.RUNNING?(l=c.U.extraData||{},Y=l.screenId||null,qA(c)&&l.loungeToken?l.loungeTokenRefreshIntervalMs?l=Z17(c,{name:c.G.friendlyName,screenId:l.screenId,loungeToken:l.loungeToken,dialId:c.U.receiver.label, screenIdType:"shortLived"},l.loungeTokenRefreshIntervalMs):(g.uh(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(l)+".")),l=$ZQ(c,Y)):l=$ZQ(c,Y)):l=oqi(c);return l}; g.J.jH=function(l){var c=this;if(!this.vU()&&!this.W){Rq("New cast session ID: "+l.sessionId);var Y=l.receiver;if(Y.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.D)if(Y.receiverType==chrome.cast.ReceiverType.CAST)Rq("Got resumed cast session before resumed mdx connection."),Y.friendlyName=chrome.cast.unescape(Y.friendlyName),SS(this,new Pg(this.G,Y,this.config_),!0);else{this.CU("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var X=this.D.G,k=D6(this.G.r0(), X.label);k&&ye(k,Y.label)&&X.receiverType!=chrome.cast.ReceiverType.CAST&&Y.receiverType==chrome.cast.ReceiverType.CAST&&(Rq("onSessionEstablished_: manual to cast session change "+Y.friendlyName),g.y7(this.D),this.D=new Pg(this.G,Y,this.config_),this.D.subscribe("sessionScreen",(0,g.Fk)(this.Dw,this,this.D)),this.D.subscribe("sessionFailed",function(){return Md7(c,c.D)}),this.D.gE(null)); this.D.XL(l)}}}; g.J.u4=function(){return this.D?this.D.Z2():null}; g.J.yVh=function(l){this.vU()||(this.CU("Failed to estabilish a session: "+g.$P(l)),l.code!=chrome.cast.ErrorCode.CANCEL&&SS(this,null),this.publish("yt-remote-cast2-session-failed"))}; g.J.KE7=function(l){Rq("Receiver availability updated: "+l);if(!this.vU()){var c=iF(this);this.C=l==chrome.cast.ReceiverAvailability.AVAILABLE;iF(this)!=c&&this.publish("yt-remote-cast2-availability-change",iF(this))}}; g.J.Ee=function(){this.vU()||(this.K=s9U(this),Rq("Updating custom receivers: "+g.$P(this.K)),chrome.cast.setCustomReceivers(this.K,function(){},(0,g.Fk)(function(){this.CU("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",iF(this)))}; pt.prototype.setLaunchParams=pt.prototype.BDf;pt.prototype.setConnectedScreenStatus=pt.prototype.kOQ;pt.prototype.stopSession=pt.prototype.ea;pt.prototype.getCastSession=pt.prototype.u4;pt.prototype.requestSession=pt.prototype.requestSession;pt.prototype.init=pt.prototype.init;pt.prototype.dispose=pt.prototype.dispose;var lHc=[];g.J=wG.prototype; g.J.reset=function(l){this.listId="";this.index=-1;this.videoId="";eKQ(this);this.volume=-1;this.muted=!1;l&&(this.index=l.index,this.listId=l.listId,this.videoId=l.videoId,this.playerState=l.playerState,this.volume=l.volume,this.muted=l.muted,this.audioTrackId=l.audioTrackId,this.trackData=l.trackData,this.IB=l.hasPrevious,this.mW=l.hasNext,this.C=l.playerTime,this.W=l.playerTimeAt,this.T=l.seekableStart,this.D=l.seekableEnd,this.N=l.duration,this.U=l.loadedTime,this.K=l.liveIngestionTime,this.G= !isNaN(this.K))}; g.J.isPlaying=function(){return this.playerState==1}; g.J.isBuffering=function(){return this.playerState==3}; g.J.iN=function(){return this.playerState==1081}; g.J.VQ=function(l){this.N=isNaN(l)?0:l}; g.J.getDuration=function(){return this.G?this.N+Kt(this):this.N}; g.J.clone=function(){return new wG(JSM(this))};g.P(Ct,g.OG);g.J=Ct.prototype;g.J.getState=function(){return this.K}; g.J.G1=function(){return this.T.getReconnectTimeout()}; g.J.Cm=function(){this.T.reconnect()}; g.J.play=function(){$o(this)?(this.D?this.D.play(null,g.N5,MA(this,"play")):Wg(this,"play"),OiQ(this,1,jS(Zg(this))),this.publish("remotePlayerChange")):Qp(this,this.play)}; g.J.pause=function(){$o(this)?(this.D?this.D.pause(null,g.N5,MA(this,"pause")):Wg(this,"pause"),OiQ(this,2,jS(Zg(this))),this.publish("remotePlayerChange")):Qp(this,this.pause)}; g.J.seekTo=function(l){if($o(this)){if(this.D){var c=Zg(this),Y=new chrome.cast.media.SeekRequest;Y.currentTime=l;c.isPlaying()||c.isBuffering()?Y.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:Y.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.D.seek(Y,g.N5,MA(this,"seekTo",{newTime:l}))}else Wg(this,"seekTo",{newTime:l});OiQ(this,3,l);this.publish("remotePlayerChange")}else Qp(this,g.In(this.seekTo,l))}; g.J.stop=function(){if($o(this)){this.D?this.D.stop(null,g.N5,MA(this,"stopVideo")):Wg(this,"stopVideo");var l=Zg(this);l.index=-1;l.videoId="";eKQ(l);mH(this,l);this.publish("remotePlayerChange")}else Qp(this,this.stop)}; g.J.setVolume=function(l,c){if($o(this)){var Y=Zg(this);if(this.G){if(Y.volume!=l){var X=Math.round(l)/100;this.G.setReceiverVolumeLevel(X,(0,g.Fk)(function(){Yo("set receiver volume: "+X)},this),(0,g.Fk)(function(){this.CU("failed to set receiver volume.")},this))}Y.muted!=c&&this.G.setReceiverMuted(c,(0,g.Fk)(function(){Yo("set receiver muted: "+c)},this),(0,g.Fk)(function(){this.CU("failed to set receiver muted.")},this))}else{var k={volume:l, muted:c};Y.volume!=-1&&(k.delta=l-Y.volume);Wg(this,"setVolume",k)}Y.muted=c;Y.volume=l;mH(this,Y)}else Qp(this,g.In(this.setVolume,l,c))}; g.J.ql=function(l,c){if($o(this)){var Y=Zg(this);l={videoId:l};c&&(Y.trackData={trackName:c.name,languageCode:c.languageCode,sourceLanguageCode:c.translationLanguage?c.translationLanguage.languageCode:"",languageName:c.languageName,kind:c.kind},l.style=g.$P(c.style),g.QS(l,Y.trackData));Wg(this,"setSubtitlesTrack",l);mH(this,Y)}else Qp(this,g.In(this.ql,l,c))}; g.J.setAudioTrack=function(l,c){$o(this)?(c=c.getLanguageInfo().getId(),Wg(this,"setAudioTrack",{videoId:l,audioTrackId:c}),l=Zg(this),l.audioTrackId=c,mH(this,l)):Qp(this,g.In(this.setAudioTrack,l,c))}; g.J.playVideo=function(l,c,Y,X,k,r,e){X=X===void 0?null:X;k=k===void 0?null:k;r=r===void 0?null:r;e=e===void 0?null:e;var d=Zg(this),y={videoId:l};Y!==void 0&&(y.currentIndex=Y);Vp(d,l,Y||0);c!==void 0&&(TI(d,c),y.currentTime=c);X&&(y.listId=X);k&&(y.playerParams=k);r&&(y.clickTrackingParams=r);e&&(y.locationInfo=g.$P(e));Wg(this,"setPlaylist",y);X||mH(this,d)}; g.J.OJ=function(l,c){if($o(this)){if(l&&c){var Y=Zg(this);Vp(Y,l,c);mH(this,Y)}Wg(this,"previous")}else Qp(this,g.In(this.OJ,l,c))}; g.J.nextVideo=function(l,c){if($o(this)){if(l&&c){var Y=Zg(this);Vp(Y,l,c);mH(this,Y)}Wg(this,"next")}else Qp(this,g.In(this.nextVideo,l,c))}; g.J.tO=function(){if($o(this)){Wg(this,"clearPlaylist");var l=Zg(this);l.reset();mH(this,l);this.publish("remotePlayerChange")}else Qp(this,this.tO)}; g.J.tj=function(){$o(this)?Wg(this,"dismissAutoplay"):Qp(this,this.tj)}; g.J.dispose=function(){if(this.K!=3){var l=this.K;this.K=3;this.publish("proxyStateChange",l,this.K)}g.OG.prototype.dispose.call(this)}; g.J.Tz=function(){ySc(this);this.T=null;this.N.clear();oq(this,null);g.OG.prototype.Tz.call(this)}; g.J.EH=function(l){if((l!=this.K||l==2)&&this.K!=3&&l!=0){var c=this.K;this.K=l;this.publish("proxyStateChange",c,l);if(l==1)for(;!this.N.isEmpty();)c=l=this.N,c.D.length===0&&(c.D=c.G,c.D.reverse(),c.G=[]),l.D.pop().apply(this);else l==3&&this.dispose()}}; g.J.pPf=function(l,c){this.publish(l,c)}; g.J.lZJ=function(l){if(!l)this.t1(null),oq(this,null);else if(this.G.receiver.volume){l=this.G.receiver.volume;var c=Zg(this),Y=Math.round(100*l.level||0);if(c.volume!=Y||c.muted!=l.muted)Yo("Cast volume update: "+l.level+(l.muted?" muted":"")),c.volume=Y,c.muted=!!l.muted,mH(this,c)}}; g.J.t1=function(l){Yo("Cast media: "+!!l);this.D&&this.D.removeUpdateListener(this.U);if(this.D=l)this.D.addUpdateListener(this.U),D7N(this),this.publish("remotePlayerChange")}; g.J.kYf=function(l){l?(D7N(this),this.publish("remotePlayerChange")):this.t1(null)}; g.J.Pd=function(){Wg(this,"sendDebugCommand",{debugCommand:"stats4nerds "})}; g.J.Nk0=function(){var l=XwL();l&&oq(this,l)}; g.J.CU=function(l){cg("CP",l)};g.P(Ew,g.OG);g.J=Ew.prototype; g.J.connect=function(l,c){if(c){var Y=c.listId,X=c.videoId,k=c.videoIds,r=c.playerParams,e=c.clickTrackingParams,d=c.index,y={videoId:X},O=c.currentTime,D=c.locationInfo;c=c.loopMode;O!==void 0&&(y.currentTime=O<=5?0:O);r&&(y.playerParams=r);D&&(y.locationInfo=D);e&&(y.clickTrackingParams=e);Y&&(y.listId=Y);k&&k.length>0&&(y.videoIds=k.join(","));d!==void 0&&(y.currentIndex=d);this.Ch&&(y.loopMode=c||"LOOP_MODE_OFF");Y&&(this.D.listId=Y);this.D.videoId=X;this.D.index=d||0;this.D.state=3;TI(this.D, O);this.N="UNSUPPORTED";Y=this.Ch?"setInitialState":"setPlaylist";Bg("Connecting with "+Y+" and params: "+g.$P(y));this.G.connect({method:Y,params:g.$P(y)},l,HgV())}else Bg("Connecting without params"),this.G.connect({},l,HgV());fHe(this)}; g.J.DT=function(l){this.G.DT(l)}; g.J.dispose=function(){this.vU()||(g.WS("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),Lt(this,3));g.OG.prototype.dispose.call(this)}; g.J.Tz=function(){P9L(this);qRM(this);biL(this);g.qs(this.U);this.U=NaN;g.qs(this.j);this.j=NaN;this.T=null;g.SQ(this.AJ);this.AJ.length=0;this.G.dispose();g.OG.prototype.Tz.call(this);this.N=this.C=this.K=this.D=this.G=null}; g.J.zj=function(l){if(!this.K||this.K.length===0)return!1;for(var c=g.b(this.K),Y=c.next();!Y.done;Y=c.next())if(!Y.value.capabilities.has(l))return!1;return!0}; g.J.SB=function(){var l=3;this.vU()||(l=0,isNaN(this.SK())?this.G.wb()&&isNaN(this.W)&&(l=1):l=2);return l}; g.J.K9=function(l){Bg("Disconnecting with "+l);g.WS("yt.mdx.remote.remoteClient_",null);P9L(this);this.publish("beforeDisconnect",l);l==1&&GN();this.G.disconnect(l);this.dispose()}; g.J.oE=function(){var l=this.D;this.T&&(l=this.D.clone(),Vp(l,this.T,l.index));return JSM(l)}; g.J.Hts=function(l){var c=this,Y=new wG(l);Y.videoId&&Y.videoId!=this.D.videoId&&(this.T=Y.videoId,g.qs(this.U),this.U=g.PU(function(){if(c.T){var k=c.T;c.T=null;c.D.videoId!=k&&gG(c,"getNowPlaying")}},5E3)); var X=[];this.D.listId==Y.listId&&this.D.videoId==Y.videoId&&this.D.index==Y.index||X.push("remoteQueueChange");this.D.playerState==Y.playerState&&this.D.volume==Y.volume&&this.D.muted==Y.muted&&jS(this.D)==jS(Y)&&g.$P(this.D.trackData)==g.$P(Y.trackData)||X.push("remotePlayerChange");this.D.reset(l);g.Uv(X,function(k){this.publish(k)},this)}; g.J.jD=function(){var l=this.G.getDeviceId(),c=g.gM(this.K,function(Y){return Y.type=="REMOTE_CONTROL"&&Y.id!=l}); return c?c.id:""}; g.J.SK=function(){return this.G.G1()}; g.J.Xx=function(){return this.N||"UNSUPPORTED"}; g.J.bv=function(){return this.C||""}; g.J.cQ=function(){!isNaN(this.SK())&&this.G.Cm()}; g.J.JNQ=function(l,c){gG(this,l,c);NI7(this)}; g.J.Ml=function(){var l=g.Cg("SAPISID","")||g.Cg("__Secure-1PAPISID")||"",c=g.Cg("__Secure-3PAPISID","")||"";if(!l&&!c)return"";l=g.aW(g.pF(l),2);c=g.aW(g.pF(c),2);return g.aW(g.pF(","+l+","+c),2)}; Ew.prototype.subscribe=Ew.prototype.subscribe;Ew.prototype.unsubscribeByKey=Ew.prototype.jQ;Ew.prototype.getProxyState=Ew.prototype.SB;Ew.prototype.disconnect=Ew.prototype.K9;Ew.prototype.getPlayerContextData=Ew.prototype.oE;Ew.prototype.setPlayerContextData=Ew.prototype.Hts;Ew.prototype.getOtherConnectedRemoteId=Ew.prototype.jD;Ew.prototype.getReconnectTimeout=Ew.prototype.SK;Ew.prototype.getAutoplayMode=Ew.prototype.Xx;Ew.prototype.getAutoplayVideoId=Ew.prototype.bv;Ew.prototype.reconnect=Ew.prototype.cQ; Ew.prototype.sendMessage=Ew.prototype.JNQ;Ew.prototype.getXsrfToken=Ew.prototype.Ml;Ew.prototype.isCapabilitySupportedOnConnectedDevices=Ew.prototype.zj;g.P(Ki7,eS);g.J=Ki7.prototype;g.J.r0=function(l){return this.vp.$_gs(l)}; g.J.contains=function(l){return!!this.vp.$_c(l)}; g.J.get=function(l){return this.vp.$_g(l)}; g.J.start=function(){this.vp.$_st()}; g.J.add=function(l,c,Y){this.vp.$_a(l,c,Y)}; g.J.remove=function(l,c,Y){this.vp.$_r(l,c,Y)}; g.J.zW=function(l,c,Y,X){this.vp.$_un(l,c,Y,X)}; g.J.Tz=function(){for(var l=this.D.length,c=0;c1&&!this.V.getOption("remote","quickCast")?(this.pD=g.G_(l,this.D,this),this.yu(g.vL(l,this.D)),l=this.V.getOption("remote","currentReceiver"),l=this.D(l),this.options[l]&&this.AC(l),this.enable(!0)):this.enable(!1)}; G8.prototype.D=function(l){return l.key}; G8.prototype.HX=function(l){return l==="cast-selector-receiver"?"Cast...":this.pD[l].name}; G8.prototype.JN=function(l){g.oi.prototype.JN.call(this,l);this.V.setOption("remote","currentReceiver",this.pD[l]);this.l9.sV()};g.P(lNQ,g.GH);g.J=lNQ.prototype; g.J.create=function(){var l=this.player.L(),c=g.VI(l);l={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:l.B("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:l.B("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:l.B("enable_cast_short_lived_lounge_token")};C9Q(c,l);this.subscriptions.push(g.JS("yt-remote-before-disconnect",this.wAQ,this));this.subscriptions.push(g.JS("yt-remote-connection-change",this.ttd,this));this.subscriptions.push(g.JS("yt-remote-receiver-availability-change",this.cj, this));this.subscriptions.push(g.JS("yt-remote-auto-connect",this.AVz,this));this.subscriptions.push(g.JS("yt-remote-receiver-resumed",this.DMf,this));this.subscriptions.push(g.JS("mdx-privacy-popup-confirm",this.HUJ,this));this.subscriptions.push(g.JS("mdx-privacy-popup-cancel",this.vu6,this));this.cj()}; g.J.load=function(){this.player.cancelPlayback();g.GH.prototype.load.call(this);this.RV=new IHE(this);this.player.PY(this.RV);this.bq=new g47(this,this.player,this.WA);var l=(l=BI7())?l.currentTime:0;var c=WiV()?new Ct(rJ(),void 0):null;l==0&&c&&(l=jS(Zg(c)));l!==0&&this.b8(l);ck7(this,this.ZC,this.ZC);this.player.PS(6)}; g.J.unload=function(){this.player.publish("mdxautoplaycanceled");this.player.aX();this.UP=this.aB;g.ON(this.bq,this.WA);this.WA=this.RV=this.bq=null;g.GH.prototype.unload.call(this);this.player.PS(5);f2(this)}; g.J.Tz=function(){g.dI(this.subscriptions);g.GH.prototype.Tz.call(this)}; g.J.tP=function(l){var c=g.wy.apply(1,arguments);this.loaded&&this.bq.Lx.apply(this.bq,[l].concat(g.N(c)))}; g.J.getAdState=function(){return this.kA}; g.J.IB=function(){return this.WA?Zg(this.WA).IB:!1}; g.J.mW=function(){return this.WA?Zg(this.WA).mW:!1}; g.J.b8=function(l,c){this.B$=l||0;this.player.publish("progresssync",l,c);this.player.fV("onVideoProgress",l||0)}; g.J.getCurrentTime=function(){return this.B$}; g.J.getProgressState=function(){var l=Zg(this.WA),c=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:!l.iN()&&this.player.yA(),clipEnd:c.clipEnd,clipStart:c.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:l.getDuration(),ingestionTime:l.G?l.K+Kt(l):l.K,isAtLiveHead:(l.G?l.D+Kt(l):l.D)-this.getCurrentTime()<=1,loaded:l.U,seekableEnd:l.G?l.D+Kt(l):l.D,seekableStart:l.T>0?l.T+Kt(l):l.T,offset:0,viewerLivestreamJoinMediaTime:0}}; g.J.nextVideo=function(){this.WA&&this.WA.nextVideo()}; g.J.OJ=function(){this.WA&&this.WA.OJ()}; g.J.wAQ=function(l){l===1&&(this.U0=this.WA?Zg(this.WA):null)}; g.J.ttd=function(){var l=WiV()?new Ct(rJ(),void 0):null;if(l){var c=this.UP;this.loaded&&this.unload();this.WA=l;this.U0=null;c.key!==this.aB.key&&(this.UP=c,this.load())}else g.y7(this.WA),this.WA=null,this.loaded&&(this.unload(),(l=this.U0)&&l.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(l.videoId,jS(l)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)}; g.J.cj=function(){var l=[this.aB],c=l.concat,Y=ZiQ();nt()&&g.VK("yt-remote-cast-available")&&Y.push({key:"cast-selector-receiver",name:"Cast..."});this.pD=c.call(l,Y);l=QhN()||this.aB;P9(this,l);this.player.fV("onMdxReceiversChange")}; g.J.AVz=function(){var l=QhN();P9(this,l)}; g.J.DMf=function(){this.UP=QhN()}; g.J.HUJ=function(){this.Zj=!0;f2(this);yl=!1;eP&&dJ(eP,1);eP=null}; g.J.vu6=function(){this.Zj=!1;f2(this);P9(this,this.aB);this.UP=this.aB;yl=!1;eP=null;this.player.playVideo()}; g.J.tC=function(l,c){switch(l){case "casting":return this.loaded;case "receivers":return this.pD;case "currentReceiver":return c&&(c.key==="cast-selector-receiver"?kwN():P9(this,c)),this.loaded?this.UP:this.aB;case "quickCast":return this.pD.length===2&&this.pD[1].key==="cast-selector-receiver"?(c&&kwN(),!0):!1}}; g.J.Pd=function(){this.WA.Pd()}; g.J.Pn=function(){return!1}; g.J.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]}; g.J.isLoggedIn=function(){var l,c;return((l=g.Ln("PLAYER_CONFIG"))==null?void 0:(c=l.args)==null?void 0:c.authuser)!==void 0?!0:!(!g.Ln("SESSION_INDEX")&&!g.Ln("LOGGED_IN"))};g.U$("remote",lNQ);})(_yt_player);