(function(){var g,ba=ba||{},m=this;function n(a){return void 0!==a}function p(a,b,c){a=a.split(".");c=c||m;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&n(b)?c[d]=b:c[d]?c=c[d]:c=c[d]={}}function r(a,b){for(var c=a.split("."),d=b||m,e;e=c.shift();)if(null!=d[e])d=d[e];else return null;return d}function t(){}function ca(a){a.getInstance=function(){return a.R?a.R:a.R=new a}}
function da(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ea(a){return"array"==da(a)}function fa(a){var b=da(a);return"array"==b||"object"==b&&"number"==typeof a.length}function u(a){return"string"==typeof a}function ga(a){return"number"==typeof a}function ha(a){return"function"==da(a)}function ia(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ja(a){return a[ka]||(a[ka]=++ma)}var ka="closure_uid_"+(1E9*Math.random()>>>0),ma=0;
function na(a,b,c){return a.call.apply(a.bind,arguments)}function oa(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function v(a,b,c){v=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?na:oa;return v.apply(null,arguments)}
function pa(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}}var w=Date.now||function(){return+new Date};function x(a,b){function c(){}c.prototype=b.prototype;a.G=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.base=function(a,c,f){for(var h=Array(arguments.length-2),k=2;k<arguments.length;k++)h[k-2]=arguments[k];return b.prototype[c].apply(a,h)}}
Function.prototype.bind=Function.prototype.bind||function(a,b){if(1<arguments.length){var c=Array.prototype.slice.call(arguments,1);c.unshift(this,a);return v.apply(null,c)}return v(this,a)};function qa(a){if(Error.captureStackTrace)Error.captureStackTrace(this,qa);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))}x(qa,Error);qa.prototype.name="CustomError";var ra;function sa(a){var b=a.length-5;return 0<=b&&a.indexOf("_html",b)==b}var ta=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};function ua(a){return decodeURIComponent(a.replace(/\+/g," "))}
function va(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"'},c;c=m.document.createElement("div");return a.replace(wa,function(a,e){var f=b[a];if(f)return f;if("#"==e.charAt(0)){var h=Number("0"+e.substr(1));isNaN(h)||(f=String.fromCharCode(h))}f||(c.innerHTML=a+" ",f=c.firstChild.nodeValue.slice(0,-1));return b[a]=f})}
function xa(a){return a.replace(/&([^;]+);/g,function(a,c){switch(c){case "amp":return"&";case "lt":return"<";case "gt":return">";case "quot":return'"';default:if("#"==c.charAt(0)){var d=Number("0"+c.substr(1));if(!isNaN(d))return String.fromCharCode(d)}return a}})}var wa=/&([^;\s<&]+);?/g;
function ya(a,b){for(var c=0,d=ta(String(a)).split("."),e=ta(String(b)).split("."),f=Math.max(d.length,e.length),h=0;0==c&&h<f;h++){var k=d[h]||"",l=e[h]||"",q=RegExp("(\\d*)(\\D*)","g"),N=RegExp("(\\d*)(\\D*)","g");do{var aa=q.exec(k)||["","",""],la=N.exec(l)||["","",""];if(0==aa[0].length&&0==la[0].length)break;c=za(0==aa[1].length?0:parseInt(aa[1],10),0==la[1].length?0:parseInt(la[1],10))||za(0==aa[2].length,0==la[2].length)||za(aa[2],la[2])}while(0==c)}return c}
function za(a,b){return a<b?-1:a>b?1:0}function Aa(a){for(var b=0,c=0;c<a.length;++c)b=31*b+a.charCodeAt(c),b%=4294967296;return b};function Ba(){};var y=Array.prototype,Ca=y.indexOf?function(a,b,c){return y.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(u(a))return u(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},z=y.forEach?function(a,b,c){y.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)},Da=y.filter?function(a,b,c){return y.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],f=0,h=u(a)?
a.split(""):a,k=0;k<d;k++)if(k in h){var l=h[k];b.call(c,l,k,a)&&(e[f++]=l)}return e},A=y.map?function(a,b,c){return y.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),f=u(a)?a.split(""):a,h=0;h<d;h++)h in f&&(e[h]=b.call(c,f[h],h,a));return e},Ea=y.some?function(a,b,c){return y.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return!0;return!1},Fa=y.every?function(a,b,c){return y.every.call(a,b,c)}:function(a,b,c){for(var d=
a.length,e=u(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&!b.call(c,e[f],f,a))return!1;return!0};function Ga(a,b,c){b=Ha(a,b,c);return 0>b?null:u(a)?a.charAt(b):a[b]}function Ha(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return f;return-1}function Ia(a,b){return 0<=Ca(a,b)}function Ja(){var a=Ka;if(!ea(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0}function La(a,b){Ia(a,b)||a.push(b)}
function Ma(a,b){var c=Ca(a,b),d;(d=0<=c)&&y.splice.call(a,c,1);return d}function Na(a,b){var c=Ha(a,b,void 0);0<=c&&y.splice.call(a,c,1)}function Oa(a){return y.concat.apply(y,arguments)}function Pa(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]}function Qa(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(fa(d)){var e=a.length||0,f=d.length||0;a.length=e+f;for(var h=0;h<f;h++)a[e+h]=d[h]}else a.push(d)}}
function Ra(a,b,c,d){return y.splice.apply(a,Sa(arguments,1))}function Sa(a,b,c){return 2>=arguments.length?y.slice.call(a,b):y.slice.call(a,b,c)}function Ta(a,b,c){if(!fa(a)||!fa(b)||a.length!=b.length)return!1;var d=a.length;c=c||Ua;for(var e=0;e<d;e++)if(!c(a[e],b[e]))return!1;return!0}function Va(a,b){return a>b?1:a<b?-1:0}function Ua(a,b){return a===b};function Wa(a,b){for(var c in a)b.call(void 0,a[c],c,a)}function Xa(a,b,c){var d={},e;for(e in a)b.call(c,a[e],e,a)&&(d[e]=a[e]);return d}function Ya(a){var b=0,c;for(c in a)b++;return b}function Za(a,b){return $a(a,b)}function ab(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function bb(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}function $a(a,b){for(var c in a)if(a[c]==b)return!0;return!1}function cb(a){var b=db,c;for(c in b)if(a.call(void 0,b[c],c,b))return c}
function eb(a){for(var b in a)return!1;return!0}function fb(a,b){if(b in a)throw Error('The object already contains the key "'+b+'"');a[b]=!0}function gb(a){var b={},c;for(c in a)b[c]=a[c];return b}function hb(a){var b=da(a);if("object"==b||"array"==b){if(a.clone)return a.clone();var b="array"==b?[]:{},c;for(c in a)b[c]=hb(a[c]);return b}return a}var ib="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
function jb(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<ib.length;f++)c=ib[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}}function kb(a){var b=arguments.length;if(1==b&&ea(arguments[0]))return kb.apply(null,arguments[0]);for(var c={},d=0;d<b;d++)c[arguments[d]]=!0;return c};kb("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));function lb(){this.e=""}lb.prototype.bc=!0;lb.prototype.Xb=function(){return this.e};lb.prototype.toString=function(){return"Const{"+this.e+"}"};function mb(){var a=new lb;a.e="HTML that is escaped and sanitized server-side and passed through yt.net.ajax";return a};function nb(){this.e="";this.f=ob}nb.prototype.bc=!0;nb.prototype.Xb=function(){return this.e};function pb(a){return a instanceof nb&&a.constructor===nb&&a.f===ob?a.e:"type_error:SafeUrl"}var qb=/^(?:(?:https?|mailto|ftp):|[^&:/?#]*(?:[/?#]|$))/i;function rb(a){if(a instanceof nb)return a;a=a.bc?a.Xb():String(a);a=qb.test(a)?sb(a):"about:invalid#zClosurez";var b=new nb;b.e=a;return b}
function sb(a){try{var b=encodeURI(a)}catch(c){return"about:invalid#zClosurez"}return b.replace(tb,function(a){return ub[a]})}var tb=/[()']|%5B|%5D|%25/g,ub={"'":"%27","(":"%28",")":"%29","%5B":"[","%5D":"]","%25":"%"},ob={};function vb(){this.e="";this.f=null}vb.prototype.bc=!0;vb.prototype.Xb=function(){return this.e};function wb(a,b){var c=new vb;c.e=a;c.f=b;return c}wb("<!DOCTYPE html>",0);wb("",0);function xb(a,b){var c;c=b instanceof nb?b:rb(b);a.href=pb(c)};function yb(a,b,c){a&&(a.dataset?a.dataset[zb(b)]=c:a.setAttribute("data-"+b,c))}function B(a,b){return a?a.dataset?a.dataset[zb(b)]:a.getAttribute("data-"+b):null}var Ab={};function zb(a){return Ab[a]||(Ab[a]=String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()}))};function C(){this.Pa=this.Pa;this.ma=this.ma}C.prototype.Pa=!1;C.prototype.F=function(){return this.Pa};C.prototype.dispose=function(){this.Pa||(this.Pa=!0,this.B())};function Bb(a,b){a.Pa?b.call(void 0):(a.ma||(a.ma=[]),a.ma.push(n(void 0)?v(b,void 0):b))}C.prototype.B=function(){if(this.ma)for(;this.ma.length;)this.ma.shift()()};function Cb(a){a&&"function"==typeof a.dispose&&a.dispose()}function Db(a){for(var b=0,c=arguments.length;b<c;++b){var d=arguments[b];fa(d)?Db.apply(null,d):Cb(d)}};function D(){C.call(this);this.e=[];this.aa={}}x(D,C);g=D.prototype;g.Ec=1;g.Fb=0;g.subscribe=function(a,b,c){var d=this.aa[a];d||(d=this.aa[a]=[]);var e=this.Ec;this.e[e]=a;this.e[e+1]=b;this.e[e+2]=c;this.Ec=e+3;d.push(e);return e};g.Na=function(a,b,c){if(a=this.aa[a]){var d=this.e;if(a=Ga(a,function(a){return d[a+1]==b&&d[a+2]==c}))return this.la(a)}return!1};
g.la=function(a){if(0!=this.Fb)return this.f||(this.f=[]),this.f.push(a),!1;var b=this.e[a];if(b){var c=this.aa[b];c&&Ma(c,a);delete this.e[a];delete this.e[a+1];delete this.e[a+2]}return!!b};g.A=function(a,b){var c=this.aa[a];if(c){this.Fb++;for(var d=Array(arguments.length-1),e=1,f=arguments.length;e<f;e++)d[e-1]=arguments[e];e=0;for(f=c.length;e<f;e++){var h=c[e];this.e[h+1].apply(this.e[h+2],d)}this.Fb--;if(this.f&&0==this.Fb)for(;c=this.f.pop();)this.la(c);return 0!=e}return!1};
g.clear=function(a){if(a){var b=this.aa[a];b&&(z(b,this.la,this),delete this.aa[a])}else this.e.length=0,this.aa={}};g.W=function(a){if(a){var b=this.aa[a];return b?b.length:0}a=0;for(b in this.aa)a+=this.W(b);return a};g.B=function(){D.G.B.call(this);delete this.e;delete this.aa;delete this.f};var Eb=window.yt&&window.yt.config_||window.ytcfg&&window.ytcfg.data_||{};p("yt.config_",Eb,void 0);p("yt.tokens_",window.yt&&window.yt.tokens_||{},void 0);var Fb=window.yt&&window.yt.msgs_||{};p("yt.msgs_",Fb,void 0);function Gb(a){Hb(Eb,arguments)}function E(a,b){return a in Eb?Eb[a]:b}function F(a,b){ha(a)&&(a=Ib(a));return window.setTimeout(a,b)}function Jb(a,b){ha(a)&&(a=Ib(a));window.setInterval(a,b)}function G(a){window.clearTimeout(a)}
function Ib(a){return a&&window.yterr?function(){try{return a.apply(this,arguments)}catch(b){throw Kb(b),b;}}:a}function Kb(a,b){var c=r("yt.www.errors.log");c?c(a,b):(c=E("ERRORS")||[],c.push([a,b]),Gb("ERRORS",c))}
function Lb(){var a={},b="FLASH_UPGRADE"in Fb?Fb.FLASH_UPGRADE:'You need to upgrade your Adobe Flash Player to watchthis video. <br> <a href="http://get.adobe.com/flashplayer/">Download it from Adobe.</a>';if(b)for(var c in a)b=b.replace(new RegExp("\\$"+c,"gi"),function(){return a[c]});return b}function Hb(a,b){if(1<b.length){var c=b[0];a[c]=b[1]}else{var d=b[0];for(c in d)a[c]=d[c]}}var Mb="Microsoft Internet Explorer"==navigator.appName;var Nb=r("yt.pubsub.instance_")||new D;D.prototype.subscribe=D.prototype.subscribe;D.prototype.unsubscribeByKey=D.prototype.la;D.prototype.publish=D.prototype.A;D.prototype.clear=D.prototype.clear;p("yt.pubsub.instance_",Nb,void 0);var Ob=r("yt.pubsub.subscribedKeys_")||{};p("yt.pubsub.subscribedKeys_",Ob,void 0);var Pb=r("yt.pubsub.topicToKeys_")||{};p("yt.pubsub.topicToKeys_",Pb,void 0);var Qb=r("yt.pubsub.isSynchronous_")||{};p("yt.pubsub.isSynchronous_",Qb,void 0);
var Rb=r("yt.pubsub.skipSubId_")||null;p("yt.pubsub.skipSubId_",Rb,void 0);function H(a,b,c){var d=Sb();if(d){var e=d.subscribe(a,function(){if(!Rb||Rb!=e){var d=arguments,h=function(){Ob[e]&&b.apply(c||window,d)};try{Qb[a]?h():F(h,0)}catch(k){Kb(k)}}},c);Ob[e]=!0;Pb[a]||(Pb[a]=[]);Pb[a].push(e);return e}return 0}function Tb(a){var b=Sb();b&&("number"==typeof a?a=[a]:"string"==typeof a&&(a=[parseInt(a,10)]),z(a,function(a){b.unsubscribeByKey(a);delete Ob[a]}))}
function I(a,b){var c=Sb();return c?c.publish.apply(c,arguments):!1}function Ub(a,b){Qb[a]=!0;var c=Sb();c&&c.publish.apply(c,arguments);Qb[a]=!1}function Vb(a){Pb[a]&&(a=Pb[a],z(a,function(a){Ob[a]&&delete Ob[a]}),a.length=0)}function Wb(a){var b=Sb();if(b)if(b.clear(a),a)Vb(a);else for(var c in Pb)Vb(c)}function Sb(){return r("yt.pubsub.instance_")};function Xb(a,b){if(window.spf){var c="";if(a){var d=a.indexOf("jsbin/"),e=a.lastIndexOf(".js"),f=d+6;-1<d&&-1<e&&e>f&&(c=a.substring(f,e),c=c.replace(Yb,""),c=c.replace(Zb,""),c=c.replace("debug-",""),c=c.replace("tracing-",""))}spf.script.load(a,c,b)}else $b(a,b)}function $b(a,b){var c=ac(a),d=document.getElementById(c),e=d&&B(d,"loaded"),f=d&&!e;if(e)b&&b();else{if(b){var e=H(c,b),h=""+ja(b);bc[h]=e}f||(d=cc(a,c,function(){B(d,"loaded")||(yb(d,"loaded","true"),I(c),F(pa(Wb,c),0))}))}}
function cc(a,b,c){var d=document.createElement("script");d.id=b;d.onload=function(){c&&setTimeout(c,0)};d.onreadystatechange=function(){switch(d.readyState){case "loaded":case "complete":d.onload()}};d.src=a;a=document.getElementsByTagName("head")[0]||document.body;a.insertBefore(d,a.firstChild);return d}function ac(a){var b=document.createElement("a");xb(b,a);a=b.href.replace(/^[a-zA-Z]+:\/\//,"//");return"js-"+Aa(a)}
var Yb=/\.vflset|-vfl[a-zA-Z0-9_+=-]+/,Zb=/-[a-zA-Z]{2,3}_[a-zA-Z]{2,3}(?=(\/|$))/,bc={};var dc=null;function ec(){var a=E("BG_I",null),b=E("BG_IU",null),c=E("BG_P");b?Xb(b,function(){dc=new botguard.bg(c)}):a&&(eval(a),dc=new botguard.bg(c))}function fc(){return null!=dc}function gc(){return dc?dc.invoke():null};function hc(a){if(a.classList)return a.classList;a=a.className;return u(a)&&a.match(/\S+/g)||[]}function ic(a,b){return a.classList?a.classList.contains(b):Ia(hc(a),b)}function jc(a,b){a.classList?a.classList.add(b):ic(a,b)||(a.className+=0<a.className.length?" "+b:b)}function kc(a,b){a.classList?a.classList.remove(b):ic(a,b)&&(a.className=Da(hc(a),function(a){return a!=b}).join(" "))}function lc(a,b,c){c?jc(a,b):kc(a,b)};function mc(a,b){this.x=n(a)?a:0;this.y=n(b)?b:0}mc.prototype.clone=function(){return new mc(this.x,this.y)};mc.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};mc.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};function nc(a,b){this.width=a;this.height=b}nc.prototype.clone=function(){return new nc(this.width,this.height)};nc.prototype.isEmpty=function(){return!(this.width*this.height)};nc.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};nc.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};var oc;a:{var pc=m.navigator;if(pc){var qc=pc.userAgent;if(qc){oc=qc;break a}}oc=""}function J(a){return-1!=oc.indexOf(a)};function rc(){return J("Opera")||J("OPR")}function sc(){return J("Edge")||J("Trident")||J("MSIE")}function tc(){return(J("Chrome")||J("CriOS"))&&!rc()&&!sc()};function uc(){return J("Edge")};function vc(){return J("iPhone")&&!J("iPod")&&!J("iPad")};var wc=rc(),K=sc(),xc=J("Gecko")&&!(-1!=oc.toLowerCase().indexOf("webkit")&&!uc())&&!(J("Trident")||J("MSIE"))&&!uc(),yc=-1!=oc.toLowerCase().indexOf("webkit")&&!uc(),zc=J("Macintosh"),Ac=J("Windows");function Bc(){var a=oc;if(xc)return/rv\:([^\);]+)(\)|;)/.exec(a);if(K&&uc())return/Edge\/([\d\.]+)/.exec(a);if(K)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(yc)return/WebKit\/(\S+)/.exec(a)}function Cc(){var a=m.document;return a?a.documentMode:void 0}
var Dc=function(){if(wc&&m.opera){var a=m.opera.version;return ha(a)?a():a}var a="",b=Bc();b&&(a=b?b[1]:"");return K&&!uc()&&(b=Cc(),b>parseFloat(a))?String(b):a}(),Ec={};function Fc(a){return Ec[a]||(Ec[a]=0<=ya(Dc,a))}function Gc(a){return K&&(uc()||Hc>=a)}var Ic=m.document,Jc=Cc(),Hc=!Ic||!K||!Jc&&uc()?void 0:Jc||("CSS1Compat"==Ic.compatMode?parseInt(Dc,10):5);!xc&&!K||K&&Gc(9)||xc&&Fc("1.9.1");K&&Fc("9");function Kc(a){return a?new Lc(Mc(a)):ra||(ra=new Lc)}function Nc(a){return u(a)?document.getElementById(a):a}function Oc(a){var b=document;return u(a)?b.getElementById(a):a}function Pc(a){var b=document;return b.querySelectorAll&&b.querySelector?b.querySelectorAll("."+a):Qc(a,void 0)}
function Qc(a,b){var c,d,e,f;c=document;c=b||c;if(c.querySelectorAll&&c.querySelector&&a)return c.querySelectorAll(""+(a?"."+a:""));if(a&&c.getElementsByClassName){var h=c.getElementsByClassName(a);return h}h=c.getElementsByTagName("*");if(a){f={};for(d=e=0;c=h[d];d++){var k=c.className;"function"==typeof k.split&&Ia(k.split(/\s+/),a)&&(f[e++]=c)}f.length=e;return f}return h}
function Rc(a){var b=!yc&&Sc(a)?a.documentElement:a.body||a.documentElement;a=a.parentWindow||a.defaultView;return K&&Fc("10")&&a.pageYOffset!=b.scrollTop?new mc(b.scrollLeft,b.scrollTop):new mc(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}function Sc(a){return"CSS1Compat"==a.compatMode}function Tc(a){for(var b;b=a.firstChild;)a.removeChild(b)}function Uc(a){if(!a)return null;if(a.firstChild)return a.firstChild;for(;a&&!a.nextSibling;)a=a.parentNode;return a?a.nextSibling:null}
function Vc(a){if(!a)return null;if(!a.previousSibling)return a.parentNode;for(a=a.previousSibling;a&&a.lastChild;)a=a.lastChild;return a}function Wc(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}function Mc(a){return 9==a.nodeType?a:a.ownerDocument||a.document}
function Xc(a){var b=Yc.nd;return b?Zc(a,function(a){return!b||u(a.className)&&Ia(a.className.split(/\s+/),b)},!0,void 0):null}function Zc(a,b,c,d){c||(a=a.parentNode);c=null==d;for(var e=0;a&&(c||e<=d);){if(b(a))return a;a=a.parentNode;e++}return null}function Lc(a){this.e=a||m.document||document}Lc.prototype.createElement=function(a){return this.e.createElement(a)};Lc.prototype.appendChild=function(a,b){a.appendChild(b)};Lc.prototype.contains=Wc;var $c=yc?"webkit":xc?"moz":K?"ms":wc?"o":"",ad=r("yt.dom.getNextId_");if(!ad){ad=function(){return++bd};p("yt.dom.getNextId_",ad,void 0);var bd=0}function cd(){var a=document,b;Ea(["fullscreenElement","fullScreenElement"],function(c){c in a?b=a[c]:(c=$c+c.charAt(0).toUpperCase()+c.substr(1),b=c in a?a[c]:void 0);return!!b});return b};function dd(a){if(a=a||window.event){for(var b in a)b in ed||(this[b]=a[b]);this.Nb=a;(b=a.target||a.srcElement)&&3==b.nodeType&&(b=b.parentNode);this.target=b;if(b=a.relatedTarget)try{b=b.nodeName?b:null}catch(c){b=null}else"mouseover"==this.type?b=a.fromElement:"mouseout"==this.type&&(b=a.toElement);this.relatedTarget=b;this.clientX=void 0!=a.clientX?a.clientX:a.pageX;this.clientY=void 0!=a.clientY?a.clientY:a.pageY;this.keyCode=a.keyCode?a.keyCode:a.which;this.charCode=a.charCode||("keypress"==
this.type?this.keyCode:0);this.altKey=a.altKey;this.ctrlKey=a.ctrlKey;this.shiftKey=a.shiftKey;"MozMousePixelScroll"==this.type?(this.wheelDeltaX=a.axis==a.HORIZONTAL_AXIS?a.detail:0,this.wheelDeltaY=a.axis==a.HORIZONTAL_AXIS?0:a.detail):window.opera?(this.wheelDeltaX=0,this.wheelDeltaY=a.detail):0==a.wheelDelta%120?"WebkitTransform"in document.documentElement.style?window.chrome&&0==navigator.platform.indexOf("Mac")?(this.wheelDeltaX=a.wheelDeltaX/-30,this.wheelDeltaY=a.wheelDeltaY/-30):(this.wheelDeltaX=
a.wheelDeltaX/-1.2,this.wheelDeltaY=a.wheelDeltaY/-1.2):(this.wheelDeltaX=0,this.wheelDeltaY=a.wheelDelta/-1.6):(this.wheelDeltaX=a.wheelDeltaX/-3,this.wheelDeltaY=a.wheelDeltaY/-3)}}g=dd.prototype;g.Nb=null;g.type="";g.target=null;g.relatedTarget=null;g.currentTarget=null;g.data=null;g.source=null;g.state=null;g.keyCode=0;g.charCode=0;g.altKey=!1;g.ctrlKey=!1;g.shiftKey=!1;g.clientX=0;g.clientY=0;g.wheelDeltaX=0;g.wheelDeltaY=0;
g.preventDefault=function(){this.Nb.returnValue=!1;this.Nb.preventDefault&&this.Nb.preventDefault()};var ed={stopImmediatePropagation:1,stopPropagation:1,preventMouseEvent:1,preventManipulation:1,preventDefault:1,layerX:1,layerY:1,scale:1,rotation:1};var db=r("yt.events.listeners_")||{};p("yt.events.listeners_",db,void 0);var fd=r("yt.events.counter_")||{count:0};p("yt.events.counter_",fd,void 0);function gd(a,b,c,d){return cb(function(e){return e[0]==a&&e[1]==b&&e[2]==c&&e[4]==!!d})}
function L(a,b,c,d){if(!a||!a.addEventListener&&!a.attachEvent)return"";d=!!d;var e=gd(a,b,c,d);if(e)return e;var e=++fd.count+"",f=!("mouseenter"!=b&&"mouseleave"!=b||!a.addEventListener||"onmouseenter"in document),h;h=f?function(d){d=new dd(d);if(!Zc(d.relatedTarget,function(b){return b==a},!0))return d.currentTarget=a,d.type=b,c.call(a,d)}:function(b){b=new dd(b);b.currentTarget=a;return c.call(a,b)};h=Ib(h);db[e]=[a,b,c,h,d];a.addEventListener?"mouseenter"==b&&f?a.addEventListener("mouseover",
h,d):"mouseleave"==b&&f?a.addEventListener("mouseout",h,d):"mousewheel"==b&&"MozBoxSizing"in document.documentElement.style?a.addEventListener("MozMousePixelScroll",h,d):a.addEventListener(b,h,d):a.attachEvent("on"+b,h);return e}function hd(a){a&&("string"==typeof a&&(a=[a]),z(a,function(a){if(a in db){var c=db[a],d=c[0],e=c[1],f=c[3],c=c[4];d.removeEventListener?d.removeEventListener(e,f,c):d.detachEvent&&d.detachEvent("on"+e,f);delete db[a]}}))};function id(a){this.e=a}var jd=/\s*;\s*/;g=id.prototype;g.isEnabled=function(){return navigator.cookieEnabled};function kd(a,b,c,d,e,f){if(/[;=\s]/.test(b))throw Error('Invalid cookie name "'+b+'"');if(/[;\r\n]/.test(c))throw Error('Invalid cookie value "'+c+'"');n(d)||(d=-1);f=f?";domain="+f:"";e=e?";path="+e:"";d=0>d?"":0==d?";expires="+(new Date(1970,1,1)).toUTCString():";expires="+(new Date(w()+1E3*d)).toUTCString();a.e.cookie=b+"="+c+f+e+d+""}
g.get=function(a,b){for(var c=a+"=",d=(this.e.cookie||"").split(jd),e=0,f;f=d[e];e++){if(0==f.lastIndexOf(c,0))return f.substr(c.length);if(f==a)return""}return b};g.remove=function(a,b,c){var d=n(this.get(a));kd(this,a,"",0,b,c);return d};g.sa=function(){return ld(this).keys};g.Y=function(){return ld(this).values};g.isEmpty=function(){return!this.e.cookie};g.W=function(){return this.e.cookie?(this.e.cookie||"").split(jd).length:0};
g.tb=function(a){for(var b=ld(this).values,c=0;c<b.length;c++)if(b[c]==a)return!0;return!1};g.clear=function(){for(var a=ld(this).keys,b=a.length-1;0<=b;b--)this.remove(a[b])};function ld(a){a=(a.e.cookie||"").split(jd);for(var b=[],c=[],d,e,f=0;e=a[f];f++)d=e.indexOf("="),-1==d?(b.push(""),c.push(e)):(b.push(e.substring(0,d)),c.push(e.substring(d+1)));return{keys:b,values:c}}var md=new id(document);md.f=3950;function nd(a,b,c){kd(md,""+a,b,c,"/","youtube.com")}function od(a,b){return md.get(""+a,b)};function pd(a,b){a=!!a;p("_lactCookie",a,window);if(null==r("_lact",window)){if(E("EXP_LACT_TEMPDATA")){var c=parseInt(E("LACT"),10),c=isFinite(c)?w()-Math.max(c,0):-1;p("_lact",c,window);-1==c&&qd()}else a&&b?(c=od("ACTIVITY","-1"),p("_lact",parseInt(c,10),window)):(p("_lact",-1,window),qd());L(document,"keydown",qd);L(document,"keyup",qd);L(document,"mousedown",qd);L(document,"mouseup",qd);E("EXP_LACT_MOUSE")&&H("page-mouse",qd);E("EXP_LACT_SCROLL")&&H("page-scroll",qd);E("EXP_LACT_RESIZE")&&H("page-resize",
qd)}}function qd(){var a=r("_lact",window);null==a&&(pd(),a=r("_lact",window));var b=w();p("_lact",b,window);E("EXP_LACT_TEMPDATA")||r("_lactCookie",window)&&1E3<=b-a&&nd("ACTIVITY",""+b,-1);I("USER_ACTIVE")}function rd(){var a=r("_lact",window);return null==a?-1:Math.max(w()-a,0)};var sd=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function td(a){if(ud){ud=!1;var b=m.location;if(b){var c=b.href;if(c&&(c=vd(c))&&c!=b.hostname)throw ud=!0,Error();}}return a.match(sd)}var ud=yc;function vd(a){return(a=td(a)[3]||null)?decodeURI(a):a}function wd(a,b){for(var c=a.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null,h=null;0<=e?(f=c[d].substring(0,e),h=c[d].substring(e+1)):f=c[d];b(f,h?ua(h):"")}}
function xd(a){if(a[1]){var b=a[0],c=b.indexOf("#");0<=c&&(a.push(b.substr(c)),a[0]=b=b.substr(0,c));c=b.indexOf("?");0>c?a[1]="?":c==b.length-1&&(a[1]=void 0)}return a.join("")}function yd(a,b,c){if(ea(b))for(var d=0;d<b.length;d++)yd(a,String(b[d]),c);else null!=b&&c.push("&",a,""===b?"":"=",encodeURIComponent(String(b)))}function zd(a,b,c){Math.max(b.length-(c||0),0);for(c=c||0;c<b.length;c+=2)yd(b[c],b[c+1],a);return a}function Ad(a,b){for(var c in b)yd(c,b[c],a);return a}
function Bd(a){a=Ad([],a);a[0]="";return a.join("")}function Cd(a,b){return xd(2==arguments.length?zd([a],arguments[1],0):zd([a],arguments,1))}function Dd(a,b){return xd(Ad([a],b))};function Ed(a){"?"==a.charAt(0)&&(a=a.substr(1));a=a.split("&");for(var b={},c=0,d=a.length;c<d;c++){var e=a[c].split("=");if(1==e.length&&e[0]||2==e.length){var f=ua(e[0]||""),e=ua(e[1]||"");f in b?ea(b[f])?Qa(b[f],e):b[f]=[b[f],e]:b[f]=e}}return b}var Fd=vd;function Gd(a,b){var c=a.split("#",2);a=c[0];var c=1<c.length?"#"+c[1]:"",d=a.split("?",2);a=d[0];var d=Ed(d[1]||""),e;for(e in b)d[e]=b[e];return Dd(a,d)+c}
function Hd(a){a=Fd(a);a=null===a?null:a.split(".").reverse();return(null===a?!1:"com"==a[0]&&a[1].match(/^youtube(?:-nocookie)?$/)?!0:!1)||(null===a?!1:"google"==a[1]?!0:"google"==a[2]?"au"==a[0]&&"com"==a[1]?!0:"uk"==a[0]&&"co"==a[1]?!0:!1:!1)};function Id(a,b){var c=vd(a);if(c==vd(window.location.href)||!c&&0==a.lastIndexOf("/",0)){var d=td(a),c=d[5],e=d[6],d=d[7],f="";c&&(f+=c);e&&(f+="?"+e);d&&(f+="#"+d);c=f;e=c.indexOf("#");if(c=0>e?c:c.substr(0,e))c=E("SMALLER_SESSION_TEMPDATA_NAME")?"ST-"+Aa(c).toString(36):"s_tempdata-"+Aa(c),e=b?Bd(b):"",nd(c,e,5)}};function Jd(a,b,c){var d=E("EVENT_ID");d&&(b||(b={}),b.ei||(b.ei=d));b&&Id(a,b);if(c)return!1;(window.ytspf||{}).enabled?spf.navigate(a):(b=window.location,a=Dd(a,{})+"",a=a instanceof nb?a:rb(a),b.href=pb(a));return!0};function Kd(a,b){return wb(b,null)};var Ld="StopIteration"in m?m.StopIteration:Error("StopIteration");function Md(){}Md.prototype.next=function(){throw Ld;};Md.prototype.pa=function(){return this};function Nd(a){if(a instanceof Md)return a;if("function"==typeof a.pa)return a.pa(!1);if(fa(a)){var b=0,c=new Md;c.next=function(){for(;;){if(b>=a.length)throw Ld;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");}
function Od(a,b,c){if(fa(a))try{z(a,b,c)}catch(d){if(d!==Ld)throw d;}else{a=Nd(a);try{for(;;)b.call(c,a.next(),void 0,a)}catch(e){if(e!==Ld)throw e;}}}function Pd(a){if(fa(a))return Pa(a);a=Nd(a);var b=[];Od(a,function(a){b.push(a)});return b};function Qd(a,b){this.f={};this.e=[];this.Ba=this.h=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)Rd(this,arguments[d],arguments[d+1])}else if(a){a instanceof Qd?(c=a.sa(),d=a.Y()):(c=bb(a),d=ab(a));for(var e=0;e<c.length;e++)Rd(this,c[e],d[e])}}g=Qd.prototype;g.W=function(){return this.h};g.Y=function(){Sd(this);for(var a=[],b=0;b<this.e.length;b++)a.push(this.f[this.e[b]]);return a};g.sa=function(){Sd(this);return this.e.concat()};
g.tb=function(a){for(var b=0;b<this.e.length;b++){var c=this.e[b];if(Td(this.f,c)&&this.f[c]==a)return!0}return!1};g.equals=function(a,b){if(this===a)return!0;if(this.h!=a.W())return!1;var c=b||Ud;Sd(this);for(var d,e=0;d=this.e[e];e++)if(!c(this.get(d),a.get(d)))return!1;return!0};function Ud(a,b){return a===b}g.isEmpty=function(){return 0==this.h};g.clear=function(){this.f={};this.Ba=this.h=this.e.length=0};
g.remove=function(a){return Td(this.f,a)?(delete this.f[a],this.h--,this.Ba++,this.e.length>2*this.h&&Sd(this),!0):!1};function Sd(a){if(a.h!=a.e.length){for(var b=0,c=0;b<a.e.length;){var d=a.e[b];Td(a.f,d)&&(a.e[c++]=d);b++}a.e.length=c}if(a.h!=a.e.length){for(var e={},c=b=0;b<a.e.length;)d=a.e[b],Td(e,d)||(a.e[c++]=d,e[d]=1),b++;a.e.length=c}}g.get=function(a,b){return Td(this.f,a)?this.f[a]:b};function Rd(a,b,c){Td(a.f,b)||(a.h++,a.e.push(b),a.Ba++);a.f[b]=c}
g.forEach=function(a,b){for(var c=this.sa(),d=0;d<c.length;d++){var e=c[d],f=this.get(e);a.call(b,f,e,this)}};g.clone=function(){return new Qd(this)};g.pa=function(a){Sd(this);var b=0,c=this.e,d=this.f,e=this.Ba,f=this,h=new Md;h.next=function(){for(;;){if(e!=f.Ba)throw Error("The map has changed since the iterator was created");if(b>=c.length)throw Ld;var h=c[b++];return a?h:d[h]}};return h};function Td(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function Vd(a){return"function"==typeof a.W?a.W():fa(a)||u(a)?a.length:Ya(a)}function Wd(a){if("function"==typeof a.Y)return a.Y();if(u(a))return a.split("");if(fa(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return ab(a)}function Xd(a){if("function"==typeof a.sa)return a.sa();if("function"!=typeof a.Y){if(fa(a)||u(a)){var b=[];a=a.length;for(var c=0;c<a;c++)b.push(c);return b}return bb(a)}}
function Yd(a,b){if("function"==typeof a.forEach)a.forEach(b,void 0);else if(fa(a)||u(a))z(a,b,void 0);else for(var c=Xd(a),d=Wd(a),e=d.length,f=0;f<e;f++)b.call(void 0,d[f],c&&c[f],a)}function Zd(a,b){if("function"==typeof a.every)return a.every(b,void 0);if(fa(a)||u(a))return Fa(a,b,void 0);for(var c=Xd(a),d=Wd(a),e=d.length,f=0;f<e;f++)if(!b.call(void 0,d[f],c&&c[f],a))return!1;return!0};function $d(a){this.e=new Qd;if(a){a=Wd(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])}}function ae(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+ja(a):b.substr(0,1)+a}g=$d.prototype;g.W=function(){return this.e.W()};g.add=function(a){Rd(this.e,ae(a),a)};g.removeAll=function(a){a=Wd(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};g.remove=function(a){return this.e.remove(ae(a))};g.clear=function(){this.e.clear()};g.isEmpty=function(){return this.e.isEmpty()};
g.contains=function(a){a=ae(a);return Td(this.e.f,a)};g.Y=function(){return this.e.Y()};g.clone=function(){return new $d(this)};g.equals=function(a){return this.W()==Vd(a)&&be(this,a)};function be(a,b){var c=Vd(b);if(a.W()>c)return!1;!(b instanceof $d)&&5<c&&(b=new $d(b));return Zd(a,function(a){var c=b;return"function"==typeof c.contains?c.contains(a):"function"==typeof c.tb?c.tb(a):fa(c)||u(c)?Ia(c,a):$a(c,a)})}g.pa=function(){return this.e.pa(!1)};function ce(){};function de(a,b,c){this.k=c;this.h=a;this.j=b;this.f=0;this.e=null}de.prototype.get=function(){var a;0<this.f?(this.f--,a=this.e,this.e=a.next,a.next=null):a=this.h();return a};de.prototype.put=function(a){this.j(a);this.f<this.k&&(this.f++,a.next=this.e,this.e=a)};function ee(a){m.setTimeout(function(){throw a;},0)}var fe;
function ge(){var a=m.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!J("Presto")&&(a=function(){var a=document.createElement("IFRAME");a.style.display="none";a.src="";document.documentElement.appendChild(a);var b=a.contentWindow,a=b.document;a.open();a.write("");a.close();var c="callImmediate"+Math.random(),d="file:"==b.location.protocol?"*":b.location.protocol+"//"+b.location.host,a=v(function(a){if(("*"==d||a.origin==d)&&a.data==
c)this.port1.onmessage()},this);b.addEventListener("message",a,!1);this.port1={};this.port2={postMessage:function(){b.postMessage(c,d)}}});if("undefined"!==typeof a&&!sc()){var b=new a,c={},d=c;b.port1.onmessage=function(){if(n(c.next)){c=c.next;var a=c.vc;c.vc=null;a()}};return function(a){d.next={vc:a};d=d.next;b.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?function(a){var b=document.createElement("SCRIPT");b.onreadystatechange=
function(){b.onreadystatechange=null;b.parentNode.removeChild(b);b=null;a();a=null};document.documentElement.appendChild(b)}:function(a){m.setTimeout(a,0)}};function he(){this.f=this.e=null}var je=new de(function(){return new ie},function(a){a.reset()},100);he.prototype.add=function(a,b){var c=je.get();c.e=a;c.scope=b;c.next=null;this.f?this.f.next=c:this.e=c;this.f=c};he.prototype.remove=function(){var a=null;this.e&&(a=this.e,this.e=this.e.next,this.e||(this.f=null),a.next=null);return a};function ie(){this.next=this.scope=this.e=null}ie.prototype.reset=function(){this.next=this.scope=this.e=null};function ke(a,b){le||me();ne||(le(),ne=!0);oe.add(a,b)}var le;function me(){if(m.Promise&&m.Promise.resolve){var a=m.Promise.resolve();le=function(){a.then(pe)}}else le=function(){var a=pe;!ha(m.setImmediate)||m.Window&&m.Window.prototype&&m.Window.prototype.setImmediate==m.setImmediate?(fe||(fe=ge()),fe(a)):m.setImmediate(a)}}var ne=!1,oe=new he;function pe(){for(var a=null;a=oe.remove();){try{a.e.call(a.scope)}catch(b){ee(b)}je.put(a)}ne=!1};function qe(a,b){this.e=0;this.o=void 0;this.k=this.f=this.h=null;this.j=this.l=!1;if(a==re)se(this,2,b);else try{var c=this;a.call(b,function(a){se(c,2,a)},function(a){se(c,3,a)})}catch(d){se(this,3,d)}}function te(){this.next=this.context=this.f=this.h=this.e=null;this.k=!1}te.prototype.reset=function(){this.context=this.f=this.h=this.e=null;this.k=!1};var ue=new de(function(){return new te},function(a){a.reset()},100);function ve(a,b,c){var d=ue.get();d.h=a;d.f=b;d.context=c;return d}
function re(){}qe.prototype.then=function(a,b,c){return we(this,ha(a)?a:null,ha(b)?b:null,c)};qe.prototype.then=qe.prototype.then;qe.prototype.$goog_Thenable=!0;qe.prototype.cancel=function(a){0==this.e&&ke(function(){var b=new xe(a);ye(this,b)},this)};
function ye(a,b){if(0==a.e)if(a.h){var c=a.h;if(c.f){for(var d=0,e=null,f=null,h=c.f;h&&(h.k||(d++,h.e==a&&(e=h),!(e&&1<d)));h=h.next)e||(f=h);e&&(0==c.e&&1==d?ye(c,b):(f?(d=f,d.next==c.k&&(c.k=d),d.next=d.next.next):ze(c),Ae(c,e,3,b)))}a.h=null}else se(a,3,b)}function Be(a,b){a.f||2!=a.e&&3!=a.e||Ce(a);a.k?a.k.next=b:a.f=b;a.k=b}
function we(a,b,c,d){var e=ve(null,null,null);e.e=new qe(function(a,h){e.h=b?function(c){try{var e=b.call(d,c);a(e)}catch(q){h(q)}}:a;e.f=c?function(b){try{var e=c.call(d,b);!n(e)&&b instanceof xe?h(b):a(e)}catch(q){h(q)}}:h});e.e.h=a;Be(a,e);return e.e}qe.prototype.C=function(a){this.e=0;se(this,2,a)};qe.prototype.H=function(a){this.e=0;se(this,3,a)};
function se(a,b,c){if(0==a.e){if(a==c)b=3,c=new TypeError("Promise cannot resolve to itself");else{var d;if(c)try{d=!!c.$goog_Thenable}catch(e){d=!1}else d=!1;if(d){a.e=1;b=c;c=a.C;d=a.H;b instanceof qe?Be(b,ve(c||t,d||null,a)):b.then(c,d,a);return}if(ia(c))try{var f=c.then;if(ha(f)){De(a,c,f);return}}catch(h){b=3,c=h}}a.o=c;a.e=b;a.h=null;Ce(a);3!=b||c instanceof xe||Ee(a,c)}}
function De(a,b,c){function d(b){f||(f=!0,a.H(b))}function e(b){f||(f=!0,a.C(b))}a.e=1;var f=!1;try{c.call(b,e,d)}catch(h){d(h)}}function Ce(a){a.l||(a.l=!0,ke(a.I,a))}function ze(a){var b=null;a.f&&(b=a.f,a.f=b.next,b.next=null);a.f||(a.k=null);return b}qe.prototype.I=function(){for(var a=null;a=ze(this);)Ae(this,a,this.e,this.o);this.l=!1};function Ae(a,b,c,d){b.e&&(b.e.h=null);if(2==c)b.h.call(b.context,d);else if(null!=b.f){if(!b.k)for(;a&&a.j;a=a.h)a.j=!1;b.f.call(b.context,d)}ue.put(b)}
function Ee(a,b){a.j=!0;ke(function(){a.j&&Fe.call(null,b)})}var Fe=ee;function xe(a){qa.call(this,a)}x(xe,qa);xe.prototype.name="cancel";function Ge(a){this.e=a;a.then(v(function(){},this))}function He(a,b,c,d){for(var e=Array(arguments.length-3),f=3;f<arguments.length;f++)e[f-3]=arguments[f];f=Ie(a,b,c).then(function(a){return a.apply(null,e)});return new Ge(f)}var Je={};
function Ie(a,b,c){var d="https://www.gstatic.com/feedback/js/help/"+(a&&"prod"!=a&&"canary"!=a?"nonprod":"prod")+"/"+b;if(a=Je[c])return a;a=(a=r(c))?new qe(re,a):(new qe(function(a,b){var c=document.createElement("script");c.async=!0;c.src=d;c.onload=c.onreadystatechange=function(){c.readyState&&"loaded"!=c.readyState&&"complete"!=c.readyState||a()};c.onerror=b;(document.head||document.getElementsByTagName("head")[0]).appendChild(c)})).then(function(){var a=r(c);if(!a)throw Error("Failed to load "+
c+" from "+d);return a});return Je[c]=a}function Ke(a,b,c){a.e.then(function(a){var e=a[b];if(!e)throw Error("Method not found: "+b);return e.apply(a,c)})};function Le(a){this.e=a}function Me(a,b){var c=b||{},c=He("prod","service/lazy.min.js","help.service.Lazy.create",a,{apiKey:c.nf||c.apiKey,environment:c.pf||c.environment,helpCenterPath:c.rf||c.helpCenterPath,locale:c.locale||c.locale,productData:c.uf||c.productData,receiverUri:c.vf||c.receiverUri,theme:c.theme||c.theme,window:c.window||c.window});return new Le(c)}Le.prototype.f=function(a){Ke(this.e,"startFeedback",arguments)};Le.prototype.h=function(a){Ke(this.e,"startHelp",arguments)};var Ne=!1;function Oe(a){if(a=a.match(/[\d]+/g))a.length=3,a.join(".")}
if(navigator.plugins&&navigator.plugins.length){var Pe=navigator.plugins["Shockwave Flash"];Pe&&(Ne=!0,Pe.description&&Oe(Pe.description));navigator.plugins["Shockwave Flash 2.0"]&&(Ne=!0)}else if(navigator.mimeTypes&&navigator.mimeTypes.length){var Qe=navigator.mimeTypes["application/x-shockwave-flash"];(Ne=Qe&&Qe.enabledPlugin)&&Oe(Qe.enabledPlugin.description)}else try{var Re=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),Ne=!0;Oe(Re.GetVariable("$version"))}catch(Se){try{Re=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),
Ne=!0}catch(Te){try{Re=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),Ne=!0,Oe(Re.GetVariable("$version"))}catch(Ue){}}};var Ve=J("Firefox"),We=vc()||J("iPod"),Xe=J("iPad"),Ye=J("Android")&&!(tc()||J("Firefox")||rc()||J("Silk")),Ze=tc(),$e=J("Safari")&&!(tc()||J("Coast")||rc()||sc()||J("Silk")||J("Android"))&&!(vc()||J("iPad")||J("iPod"));function af(a){return(a=a.exec(oc))?a[1]:""}(function(){if(Ve)return af(/Firefox\/([0-9.]+)/);if(K||wc)return Dc;if(Ze)return af(/Chrome\/([0-9.]+)/);if($e&&!(vc()||J("iPad")||J("iPod")))return af(/Version\/([0-9.]+)/);if(We||Xe){var a;if(a=/Version\/(\S+).*Mobile\/(\S+)/.exec(oc))return a[1]+"."+a[2]}else if(Ye)return(a=af(/Android\s+([0-9.]+)/))?a:af(/Version\/([0-9.]+)/);return""})();function bf(){this.h=this.f=this.e=0;this.k="";var a=r("window.navigator.plugins"),b=r("window.navigator.mimeTypes"),a=a&&a["Shockwave Flash"],b=b&&b["application/x-shockwave-flash"],b=a&&b&&b.enabledPlugin&&a.description||"";if(a=b){var c=a.indexOf("Shockwave Flash");0<=c&&(a=a.substr(c+15));for(var c=a.split(" "),d="",a="",e=0,f=c.length;e<f;e++)if(d)if(a)break;else a=c[e];else d=c[e];d=d.split(".");c=parseInt(d[0],10)||0;d=parseInt(d[1],10)||0;e=0;if("r"==a.charAt(0)||"d"==a.charAt(0))e=parseInt(a.substr(1),
10)||0;a=[c,d,e]}else a=[0,0,0];this.k=b;b=a;this.e=b[0];this.f=b[1];this.h=b[2];if(0>=this.e){var h,k,l,q;if(Mb)try{h=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(N){h=null}else l=document.body,q=document.createElement("object"),q.setAttribute("type","application/x-shockwave-flash"),h=l.appendChild(q);if(h&&"GetVariable"in h)try{k=h.GetVariable("$version")}catch(aa){k=""}l&&q&&l.removeChild(q);(h=k||"")?(h=h.split(" ")[1].split(","),h=[parseInt(h[0],10)||0,parseInt(h[1],10)||0,parseInt(h[2],
10)||0]):h=[0,0,0];this.e=h[0];this.f=h[1];this.h=h[2]}}ca(bf);bf.prototype.getVersion=function(){return[this.e,this.f,this.h]};function cf(a,b,c,d){b="string"==typeof b?b.split("."):[b,c,d];b[0]=parseInt(b[0],10)||0;b[1]=parseInt(b[1],10)||0;b[2]=parseInt(b[2],10)||0;return a.e>b[0]||a.e==b[0]&&a.f>b[1]||a.e==b[0]&&a.f==b[1]&&a.h>=b[2]}function df(a){return-1<a.k.indexOf("Gnash")&&-1==a.k.indexOf("AVM2")||9==a.e&&1==a.f||9==a.e&&0==a.f&&1==a.h?!1:9<=a.e}
function ef(a){return Ac?!cf(a,11,2):zc?!cf(a,11,3):!df(a)};function ff(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}ff.prototype.clone=function(){return new ff(this.top,this.right,this.bottom,this.left)};ff.prototype.contains=function(a){return this&&a?a instanceof ff?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1};
ff.prototype.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};ff.prototype.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};function gf(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}gf.prototype.clone=function(){return new gf(this.left,this.top,this.width,this.height)};gf.prototype.contains=function(a){return a instanceof gf?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height};
gf.prototype.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};gf.prototype.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function hf(a,b){var c=Mc(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function jf(a,b){return hf(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style&&a.style[b]}
function kf(a){var b;try{b=a.getBoundingClientRect()}catch(c){return{left:0,top:0,right:0,bottom:0}}K&&a.ownerDocument.body&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b}function lf(a,b){"number"==typeof a&&(a=(b?Math.round(a):a)+"px");return a}
function mf(a){var b=nf;if("none"!=jf(a,"display"))return b(a);var c=a.style,d=c.display,e=c.visibility,f=c.position;c.visibility="hidden";c.position="absolute";c.display="inline";a=b(a);c.display=d;c.position=f;c.visibility=e;return a}function nf(a){var b=a.offsetWidth,c=a.offsetHeight,d=yc&&!b&&!c;return n(b)&&!d||!a.getBoundingClientRect?new nc(b,c):(a=kf(a),new nc(a.right-a.left,a.bottom-a.top))}
function of(a,b){if(/^\d+px?$/.test(b))return parseInt(b,10);var c=a.style.left,d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=b;var e=a.style.pixelLeft;a.style.left=c;a.runtimeStyle.left=d;return e}function pf(a,b){var c=a.currentStyle?a.currentStyle[b]:null;return c?of(a,c):0}var qf={thin:2,medium:4,thick:6};
function rf(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null;return c in qf?qf[c]:of(a,c)};function sf(a,b){(a=Nc(a))&&a.style&&(a.style.display=b?"":"none",lc(a,"hid",!b))}function tf(a){z(arguments,function(a){sf(a,!0)})}function uf(a){z(arguments,function(a){sf(a,!1)})};var vf={};function wf(a,b){var c=E("FEEDBACK_LOCALE_LANGUAGE"),d=E("FEEDBACK_LOCALE_EXTRAS",{});a?jb(vf,a):jb(vf,d);try{var e,f=r("yt.player.getPlayerByElement");(e=f?f("player-api"):null)&&e.pauseVideo&&e.pauseVideo();var h=bf.getInstance();vf.flashVersion=h.getVersion().join(".");e&&(vf.playback_id=e.getVideoData().cpn)}catch(k){}b&&jb(vf,{trackingParam:b});return{helpCenterPath:"/youtube",locale:c,productData:vf}}
function xf(){var a=E("SESSION_INDEX"),b=E("FEEDBACK_BUCKET_ID"),c={abuseLink:"https://support.google.com/youtube/bin/answer.py?answer=140536",customZIndex:"2000000005"};a&&(c.authuser=a+"");b&&(c.bucket=b);return c}function yf(a,b){try{var c=(a||"59")+"",d=wf(b),e=xf();Me(c,d).f(e);return!1}catch(f){return!0}}function zf(a,b,c,d){var e;d=(d||"59")+"";c=wf(c,void 0);a={context:b,anchor:void 0,enableSendFeedback:!0,defaultHelpArticleId:a};jb(a,xf());try{Me(d,c).h(a),e=!1}catch(f){e=!0}return e};function Af(a){a=a||{};this.url=a.url||"";this.urlV9As2=a.url_v9as2||"";this.args=a.args||gb(Bf);this.assets=a.assets||{};this.attrs=a.attrs||gb(Cf);this.params=a.params||gb(Df);this.minVersion=a.min_version||"8.0.0";this.fallback=a.fallback||null;this.fallbackMessage=a.fallbackMessage||null;this.html5=!!a.html5;this.disable=a.disable||{};this.loaded=!!a.loaded;this.messages=a.messages||{}}var Bf={enablejsapi:1},Cf={},Df={allowscriptaccess:"always",allowfullscreen:"true",bgcolor:"#000000"};
function Ef(a){a instanceof Af||(a=new Af(a));return a}Af.prototype.clone=function(){var a=new Af,b;for(b in this){var c=this[b];"object"==da(c)?a[b]=gb(c):a[b]=c}return a};function Ff(a){Ff[" "](a);return a}Ff[" "]=t;var Gf=!K||Gc(9),Hf=K&&!Fc("9");!yc||Fc("528");xc&&Fc("1.9b")||K&&Fc("8")||wc&&Fc("9.5")||yc&&Fc("528");xc&&!Fc("8")||K&&Fc("9");function If(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=!1;this.Xc=!0}If.prototype.preventDefault=function(){this.defaultPrevented=!0;this.Xc=!1};function Jf(a,b){If.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.charCode=this.keyCode=this.button=this.clientY=this.clientX=0;this.shiftKey=this.altKey=this.ctrlKey=!1;this.e=this.state=null;a&&this.init(a,b)}x(Jf,If);
Jf.prototype.init=function(a,b){var c=this.type=a.type;this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;if(d){if(xc){var e;a:{try{Ff(d.nodeName);e=!0;break a}catch(f){}e=!1}e||(d=null)}}else"mouseover"==c?d=a.fromElement:"mouseout"==c&&(d=a.toElement);this.relatedTarget=d;this.clientX=void 0!==a.clientX?a.clientX:a.pageX;this.clientY=void 0!==a.clientY?a.clientY:a.pageY;this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);
this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.state=a.state;this.e=a;a.defaultPrevented&&this.preventDefault()};Jf.prototype.preventDefault=function(){Jf.G.preventDefault.call(this);var a=this.e;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Hf)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};Jf.prototype.f=function(){return this.e};var Kf="closure_listenable_"+(1E6*Math.random()|0),Lf=0;function Mf(a,b,c,d,e){this.ua=a;this.e=null;this.src=b;this.type=c;this.rb=!!d;this.xb=e;this.key=++Lf;this.Xa=this.qb=!1}function Nf(a){a.Xa=!0;a.ua=null;a.e=null;a.src=null;a.xb=null};function Of(a){this.src=a;this.e={};this.f=0}Of.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.e[f];a||(a=this.e[f]=[],this.f++);var h=Pf(a,b,d,e);-1<h?(b=a[h],c||(b.qb=!1)):(b=new Mf(b,this.src,f,!!d,e),b.qb=c,a.push(b));return b};Of.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.e))return!1;var e=this.e[a];b=Pf(e,b,c,d);return-1<b?(Nf(e[b]),y.splice.call(e,b,1),0==e.length&&(delete this.e[a],this.f--),!0):!1};
function Qf(a,b){var c=b.type;if(!(c in a.e))return!1;var d=Ma(a.e[c],b);d&&(Nf(b),0==a.e[c].length&&(delete a.e[c],a.f--));return d}Of.prototype.removeAll=function(a){a=a&&a.toString();var b=0,c;for(c in this.e)if(!a||c==a){for(var d=this.e[c],e=0;e<d.length;e++)++b,Nf(d[e]);delete this.e[c];this.f--}return b};function Rf(a,b,c,d,e){a=a.e[b.toString()];b=-1;a&&(b=Pf(a,c,d,e));return-1<b?a[b]:null}
function Pf(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.Xa&&f.ua==b&&f.rb==!!c&&f.xb==d)return e}return-1};var Sf="closure_lm_"+(1E6*Math.random()|0),Tf={},Uf=0;function Vf(a,b,c,d,e){if(ea(b)){for(var f=0;f<b.length;f++)Vf(a,b[f],c,d,e);return null}c=Wf(c);if(a&&a[Kf])a=a.Ab(b,c,d,e);else{if(!b)throw Error("Invalid event type");var f=!!d,h=Xf(a);h||(a[Sf]=h=new Of(a));c=h.add(b,c,!1,d,e);c.e||(d=Yf(),c.e=d,d.src=a,d.ua=c,a.addEventListener?a.addEventListener(b.toString(),d,f):a.attachEvent(Zf(b.toString()),d),Uf++);a=c}return a}
function Yf(){var a=$f,b=Gf?function(c){return a.call(b.src,b.ua,c)}:function(c){c=a.call(b.src,b.ua,c);if(!c)return c};return b}function ag(a,b,c,d,e){if(ea(b))for(var f=0;f<b.length;f++)ag(a,b[f],c,d,e);else c=Wf(c),a&&a[Kf]?a.kc(b,c,d,e):a&&(a=Xf(a))&&(b=Rf(a,b,c,!!d,e))&&bg(b)}
function bg(a){if(ga(a)||!a||a.Xa)return!1;var b=a.src;if(b&&b[Kf])return Qf(b.xa,a);var c=a.type,d=a.e;b.removeEventListener?b.removeEventListener(c,d,a.rb):b.detachEvent&&b.detachEvent(Zf(c),d);Uf--;(c=Xf(b))?(Qf(c,a),0==c.f&&(c.src=null,b[Sf]=null)):Nf(a);return!0}function Zf(a){return a in Tf?Tf[a]:Tf[a]="on"+a}function cg(a,b,c,d){var e=!0;if(a=Xf(a))if(b=a.e[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.rb==c&&!f.Xa&&(f=dg(f,d),e=e&&!1!==f)}return e}
function dg(a,b){var c=a.ua,d=a.xb||a.src;a.qb&&bg(a);return c.call(d,b)}
function $f(a,b){if(a.Xa)return!0;if(!Gf){var c=b||r("window.event"),d=new Jf(c,this),e=!0;if(!(0>c.keyCode||void 0!=c.returnValue)){a:{var f=!1;if(0==c.keyCode)try{c.keyCode=-1;break a}catch(h){f=!0}if(f||void 0==c.returnValue)c.returnValue=!0}c=[];for(f=d.currentTarget;f;f=f.parentNode)c.push(f);for(var f=a.type,k=c.length-1;0<=k;k--){d.currentTarget=c[k];var l=cg(c[k],f,!0,d),e=e&&l}for(k=0;k<c.length;k++)d.currentTarget=c[k],l=cg(c[k],f,!1,d),e=e&&l}return e}return dg(a,new Jf(b,this))}
function Xf(a){a=a[Sf];return a instanceof Of?a:null}var eg="__closure_events_fn_"+(1E9*Math.random()>>>0);function Wf(a){if(ha(a))return a;a[eg]||(a[eg]=function(b){return a.handleEvent(b)});return a[eg]};function fg(){var a=od("PREF");if(a)for(var a=unescape(a).split("&"),b=0;b<a.length;b++){var c=a[b].split("="),d=c[0];(c=c[1])&&(gg[d]=c.toString())}}ca(fg);var gg=r("yt.prefs.UserPrefs.prefs_")||{};p("yt.prefs.UserPrefs.prefs_",gg,void 0);function hg(a){if(/^f([1-9][0-9]*)$/.test(a))throw"ExpectedRegexMatch: "+a;}function ig(a){if(!/^\w+$/.test(a))throw"ExpectedRegexMismatch: "+a;}function jg(a){return void 0!==gg[a]?gg[a].toString():null}
fg.prototype.get=function(a,b){ig(a);hg(a);var c=jg(a);return null!=c?c:b?b:""};fg.prototype.remove=function(a){ig(a);hg(a);delete gg[a]};fg.prototype.clear=function(){gg={}};function kg(a,b,c){if(b){a=u(a)?Oc(a):a;c=Ef(c);var d=gb(c.attrs);d.tabindex=0;var e=gb(c.params);e.flashvars=Bd(c.args);if(Mb){d.classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";e.movie=b;b=document.createElement("object");for(var f in d)b.setAttribute(f,d[f]);for(f in e)d=document.createElement("param"),d.setAttribute("name",f),d.setAttribute("value",e[f]),b.appendChild(d)}else{d.type="application/x-shockwave-flash";d.src=b;b=document.createElement("embed");b.setAttribute("name",d.id);for(f in d)b.setAttribute(f,
d[f]);for(f in e)b.setAttribute(f,e[f])}e=document.createElement("div");e.appendChild(b);a.innerHTML=e.innerHTML}}
function lg(a,b,c){if(a&&a.attrs&&a.attrs.id){a=Ef(a);var d=!!b,e=Nc(a.attrs.id),f=e?e.parentNode:null;if(e&&f){if(window!=window.top){var h=null;if(document.referrer){var k=document.referrer.substring(0,128);Hd(k)||(h=k)}else h="unknown";h&&(d=!0,a.args.framer=h)}h=bf.getInstance();if(cf(h,a.minVersion)){var k=mg(a,h),l="";-1<navigator.userAgent.indexOf("Sony/COM2")||(l=e.getAttribute("src")||e.movie);(l!=k||d)&&kg(f,k,a);ef(h)&&ng()}else og(f,a,h);c&&c()}else F(function(){lg(a,b,c)},50)}}
function og(a,b,c){0==c.e&&b.fallback?b.fallback():0==c.e&&b.fallbackMessage?b.fallbackMessage():a.innerHTML='<div id="flash-upgrade">'+Lb()+"</div>"}function mg(a,b){return df(b)&&a.url||(-1<navigator.userAgent.indexOf("Sony/COM2")&&!cf(b,9,1,58)?!1:!0)&&a.urlV9As2||a.url}function ng(){var a=Nc("flash10-promo-div"),b;fg.getInstance();b=jg("f"+(Math.floor(107/31)+1));b=!!(((null!=b&&/^[A-Fa-f0-9]+$/.test(b)?parseInt(b,16):null)||0)&16384);a&&!b&&tf(a)};function pg(a){if(window.spf){var b=a.match(qg);spf.style.load(a,b?b[1]:"",void 0)}else rg(a)}function rg(a){var b=sg(a),c=document.getElementById(b),d=c&&B(c,"loaded");d||c&&!d||(c=tg(a,b,function(){B(c,"loaded")||(yb(c,"loaded","true"),I(b),F(pa(Wb,b),0))}))}function tg(a,b,c){var d=document.createElement("link");d.id=b;d.rel="stylesheet";d.onload=function(){c&&setTimeout(c,0)};xb(d,a);(document.getElementsByTagName("head")[0]||document.body).appendChild(d);return d}
function sg(a){var b=document.createElement("a");xb(b,a);a=b.href.replace(/^[a-zA-Z]+:\/\//,"//");return"css-"+Aa(a)}var qg=/cssbin\/(?:debug-)?([a-zA-Z0-9_-]+?)(?:-2x|-web|-rtl|-vfl|.css)/;var ug;var vg=oc,vg=vg.toLowerCase();if(-1!=vg.indexOf("android")){var wg=vg.match(/android\D*(\d\.\d)[^\;|\)]*[\;\)]/);if(wg)ug=Number(wg[1]);else{var xg={cupcake:1.5,donut:1.6,eclair:2,froyo:2.2,gingerbread:2.3,honeycomb:3,"ice cream sandwich":4,jellybean:4.1},yg=vg.match("("+bb(xg).join("|")+")");ug=yg?xg[yg[0]]:0}}else ug=void 0;function zg(){if(2.2==ug)return!0;var a;a=r("yt.player.utils.videoElement_");a||(a=document.createElement("video"),p("yt.player.utils.videoElement_",a,void 0));try{return!(!a||!a.canPlayType||!a.canPlayType('video/mp4; codecs="avc1.42001E, mp4a.40.2"')&&!a.canPlayType('video/webm; codecs="vp8.0, vorbis"'))}catch(b){return!1}};function Ag(a,b){var c;a instanceof Ag?(this.Ia=n(b)?b:a.Ia,Bg(this,a.Aa),this.Oa=a.Oa,Cg(this,a.ra),Dg(this,a.La),this.fa=a.fa,Eg(this,a.e.clone()),this.Ha=a.Ha):a&&(c=td(String(a)))?(this.Ia=!!b,Bg(this,c[1]||"",!0),this.Oa=Fg(c[2]||""),Cg(this,c[3]||"",!0),Dg(this,c[4]),this.fa=Fg(c[5]||"",!0),Eg(this,c[6]||"",!0),this.Ha=Fg(c[7]||"")):(this.Ia=!!b,this.e=new Gg(null,0,this.Ia))}g=Ag.prototype;g.Aa="";g.Oa="";g.ra="";g.La=null;g.fa="";g.Ha="";g.Ia=!1;
g.toString=function(){var a=[],b=this.Aa;b&&a.push(Hg(b,Ig,!0),":");if(b=this.ra){a.push("//");var c=this.Oa;c&&a.push(Hg(c,Ig,!0),"@");a.push(encodeURIComponent(String(b)).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.La;null!=b&&a.push(":",String(b))}if(b=this.fa)this.ra&&"/"!=b.charAt(0)&&a.push("/"),a.push(Hg(b,"/"==b.charAt(0)?Jg:Kg,!0));(b=this.e.toString())&&a.push("?",b);(b=this.Ha)&&a.push("#",Hg(b,Lg));return a.join("")};
g.resolve=function(a){var b=this.clone(),c=!!a.Aa;c?Bg(b,a.Aa):c=!!a.Oa;c?b.Oa=a.Oa:c=!!a.ra;c?Cg(b,a.ra):c=null!=a.La;var d=a.fa;if(c)Dg(b,a.La);else if(c=!!a.fa){if("/"!=d.charAt(0))if(this.ra&&!this.fa)d="/"+d;else{var e=b.fa.lastIndexOf("/");-1!=e&&(d=b.fa.substr(0,e+1)+d)}e=d;if(".."==e||"."==e)d="";else if(-1!=e.indexOf("./")||-1!=e.indexOf("/.")){for(var d=0==e.lastIndexOf("/",0),e=e.split("/"),f=[],h=0;h<e.length;){var k=e[h++];"."==k?d&&h==e.length&&f.push(""):".."==k?((1<f.length||1==f.length&&
""!=f[0])&&f.pop(),d&&h==e.length&&f.push("")):(f.push(k),d=!0)}d=f.join("/")}else d=e}c?b.fa=d:c=""!==a.e.toString();c?Eg(b,Fg(a.e.toString())):c=!!a.Ha;c&&(b.Ha=a.Ha);return b};g.clone=function(){return new Ag(this)};function Bg(a,b,c){a.Aa=c?Fg(b,!0):b;a.Aa&&(a.Aa=a.Aa.replace(/:$/,""))}function Cg(a,b,c){a.ra=c?Fg(b,!0):b}function Dg(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.La=b}else a.La=null}
function Eg(a,b,c){b instanceof Gg?(a.e=b,Mg(a.e,a.Ia)):(c||(b=Hg(b,Ng)),a.e=new Gg(b,0,a.Ia))}function M(a,b,c){a=a.e;Og(a);a.e=null;b=Pg(a,b);Qg(a,b)&&(a.U-=a.J.get(b).length);Rd(a.J,b,[c]);a.U++}function Rg(a,b,c){ea(c)||(c=[String(c)]);Sg(a.e,b,c)}function Tg(a){M(a,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^w()).toString(36));return a}function Ug(a){return a instanceof Ag?a.clone():new Ag(a,void 0)}
function Vg(a,b,c,d){var e=new Ag(null,void 0);a&&Bg(e,a);b&&Cg(e,b);c&&Dg(e,c);d&&(e.fa=d);return e}function Fg(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Hg(a,b,c){return u(a)?(a=encodeURI(a).replace(b,Wg),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Wg(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Ig=/[#\/\?@]/g,Kg=/[\#\?:]/g,Jg=/[\#\?]/g,Ng=/[\#\?@]/g,Lg=/#/g;function Gg(a,b,c){this.e=a||null;this.f=!!c}
function Og(a){a.J||(a.J=new Qd,a.U=0,a.e&&wd(a.e,function(b,c){a.add(ua(b),c)}))}g=Gg.prototype;g.J=null;g.U=null;g.W=function(){Og(this);return this.U};g.add=function(a,b){Og(this);this.e=null;a=Pg(this,a);var c=this.J.get(a);c||Rd(this.J,a,c=[]);c.push(b);this.U++;return this};g.remove=function(a){Og(this);a=Pg(this,a);return Td(this.J.f,a)?(this.e=null,this.U-=this.J.get(a).length,this.J.remove(a)):!1};g.clear=function(){this.J=this.e=null;this.U=0};g.isEmpty=function(){Og(this);return 0==this.U};
function Qg(a,b){Og(a);b=Pg(a,b);return Td(a.J.f,b)}g.tb=function(a){var b=this.Y();return Ia(b,a)};g.sa=function(){Og(this);for(var a=this.J.Y(),b=this.J.sa(),c=[],d=0;d<b.length;d++)for(var e=a[d],f=0;f<e.length;f++)c.push(b[d]);return c};g.Y=function(a){Og(this);var b=[];if(u(a))Qg(this,a)&&(b=Oa(b,this.J.get(Pg(this,a))));else{a=this.J.Y();for(var c=0;c<a.length;c++)b=Oa(b,a[c])}return b};g.get=function(a,b){var c=a?this.Y(a):[];return 0<c.length?String(c[0]):b};
function Sg(a,b,c){a.remove(b);0<c.length&&(a.e=null,Rd(a.J,Pg(a,b),Pa(c)),a.U+=c.length)}g.toString=function(){if(this.e)return this.e;if(!this.J)return"";for(var a=[],b=this.J.sa(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.Y(d),f=0;f<d.length;f++){var h=e;""!==d[f]&&(h+="="+encodeURIComponent(String(d[f])));a.push(h)}return this.e=a.join("&")};g.clone=function(){var a=new Gg;a.e=this.e;this.J&&(a.J=this.J.clone(),a.U=this.U);return a};
function Pg(a,b){var c=String(b);a.f&&(c=c.toLowerCase());return c}function Mg(a,b){b&&!a.f&&(Og(a),a.e=null,a.J.forEach(function(a,b){var e=b.toLowerCase();b!=e&&(this.remove(b),Sg(this,e,a))},a));a.f=b};var Xg="corp.google.com googleplex.com youtube.com youtube-nocookie.com youtubeeducation.com borg.google.com prod.google.com sandbox.google.com books.googleusercontent.com docs.google.com drive.google.com mail.google.com photos.google.com plus.google.com play.google.com googlevideo.com talkgadget.google.com survey.g.doubleclick.net youtube.googleapis.com vevo.com".split(" "),Yg="";
function Zg(a){return a&&a==Yg?!0:(new RegExp("^(https?:)?//([a-z0-9-]{1,63}\\.)*("+Xg.join("|").replace(/\./g,".")+")(:[0-9]+)?([/?#]|$)","i")).test(a)?(Yg=a,!0):!1};var $g={},ah=0,bh=r("yt.net.ping.workerUrl_")||null;p("yt.net.ping.workerUrl_",bh,void 0);function ch(a){var b=new Image,c=""+ah++;$g[c]=b;b.onload=b.onerror=function(){delete $g[c]};b.src=a;b=eval("null")};function dh(a){var b=void 0;void 0===b&&(b=NaN);var c=r("yt.scheduler.instance.addJob");c?(isNaN(b)&&(b=0),c(a,0,b)):isNaN(b)?a():F(a,b||0)};function O(a,b){this.version=a;this.args=b}function eh(a){if(!a.Ba){var b={};a.call(b);a.Ba=b.version}return a.Ba}
function fh(a,b){function c(){a.apply(this,b.args)}if(!b.args||!b.version)throw Error("yt.pubsub2.Data.deserialize(): serializedData is incomplete.");var d;try{d=eh(a)}catch(e){}if(!d||b.version!=d)throw Error("yt.pubsub2.Data.deserialize(): serializedData version is incompatible.");c.prototype=a.prototype;try{return new c}catch(f){throw f.message="yt.pubsub2.Data.deserialize(): "+f.message,f;}}function P(a,b){this.f=a;this.e=b}P.prototype.toString=function(){return this.f};var gh=r("yt.pubsub2.instance_")||new D;D.prototype.subscribe=D.prototype.subscribe;D.prototype.unsubscribeByKey=D.prototype.la;D.prototype.publish=D.prototype.A;D.prototype.clear=D.prototype.clear;p("yt.pubsub2.instance_",gh,void 0);var hh=r("yt.pubsub2.subscribedKeys_")||{};p("yt.pubsub2.subscribedKeys_",hh,void 0);var ih=r("yt.pubsub2.topicToKeys_")||{};p("yt.pubsub2.topicToKeys_",ih,void 0);var jh=r("yt.pubsub2.isAsync_")||{};p("yt.pubsub2.isAsync_",jh,void 0);
p("yt.pubsub2.skipSubKey_",null,void 0);function Q(a,b){var c=kh();c&&c.publish.call(c,a.toString(),a,b)}
function lh(a,b,c){var d=kh();if(!d)return 0;var e=d.subscribe(a.toString(),function(d,h){if(!window.yt.pubsub2.skipSubKey_||window.yt.pubsub2.skipSubKey_!=e){var k=function(){if(hh[e])try{if(h&&a instanceof P&&a!=d)try{h=fh(a.e,h)}catch(k){throw k.message="yt.pubsub2 cross-binary conversion error for "+a.toString()+": "+k.message,k;}b.call(c||window,h)}catch(q){Kb(q)}};jh[a.toString()]?r("yt.scheduler.instance")?dh(k):F(k,0):k()}});hh[e]=!0;ih[a.toString()]||(ih[a.toString()]=[]);ih[a.toString()].push(e);
return e}function mh(a){var b=kh();b&&(ga(a)&&(a=[a]),z(a,function(a){b.unsubscribeByKey(a);delete hh[a]}))}function kh(){return r("yt.pubsub2.instance_")};function nh(a){O.call(this,1,arguments)}x(nh,O);var oh=new P("timing-sent",nh);var R=window.performance||window.mozPerformance||window.msPerformance||window.webkitPerformance||{},ph=v(R.clearResourceTimings||R.webkitClearResourceTimings||R.mozClearResourceTimings||R.msClearResourceTimings||R.oClearResourceTimings||t,R),qh=R.mark?function(a){R.mark(a)}:t;function rh(a){sh().tick[a]=w();qh(a);E("CSI_LOG_ON_TICK")&&th()}function uh(){vh();ph();p("yt.timing.pingSent_",!1,void 0)}
function wh(){var a=sh().tick;if(a.aft)return a.aft;for(var b=E("TIMING_AFT_KEYS",["ol"]),c=b.length,d=0;d<c;d++){var e=a[b[d]];if(e)return e}return NaN}function xh(a){return Math.round(R.timing.navigationStart+a)}
function yh(a){var b=window.location.protocol,c=R.getEntriesByType("resource"),d=c.filter(function(a){return 0==a.name.indexOf(b+"//fonts.googleapis.com/css?family=")})[0],c=c.filter(function(a){return 0==a.name.indexOf(b+"//fonts.gstatic.com/s/")}).reduce(function(a,b){return b.duration>a.duration?b:a},{duration:0});d&&0<d.startTime&&0<d.responseEnd&&(a.wfcs=xh(d.startTime),a.wfce=xh(d.responseEnd));c&&0<c.startTime&&0<c.responseEnd&&(a.wffs=xh(c.startTime),a.wffe=xh(c.responseEnd))}
function th(){var a=E("TIMING_ACTION"),b=sh().tick;if(a&&b._start&&wh()){var a=!0,c=E("TIMING_WAIT",[]);if(c.length)for(var d=0,e=c.length;d<e;++d)if(!(c[d]in b)){a=!1;break}if(a)if(c=sh().tick,b=sh().span,d=sh().info,a=r("yt.timing.reportbuilder_")){if(a=a(c,b,d,void 0))zh(a),uh()}else{a={v:2,s:E("CSI_SERVICE_NAME","youtube"),action:E("TIMING_ACTION")};R.now&&R.timing&&(e=R.timing.navigationStart+R.now(),e=Math.round(w()-e),d.yt_hrd=e);var e=E("TIMING_INFO")||{},f;for(f in e)d[f]=e[f];f=d.srt;delete d.srt;
var h;f||0===f||(h=R.timing||{},f=Math.max(0,h.responseStart-h.navigationStart),isNaN(f)&&d.pt&&(f=d.pt));if(f||0===f)d.srt=f;d.h5jse&&(e=window.location.protocol+r("ytplayer.config.assets.js"),(e=R.getEntriesByName?R.getEntriesByName(e)[0]:null)?d.h5jse=Math.round(d.h5jse-e.responseEnd):delete d.h5jse);c.aft=wh();e=c._start;if("cold"==d.yt_lt){h||(h=R.timing||{});var k;a:if(k=h,k.msFirstPaint)k=Math.max(0,k.msFirstPaint);else{var l=window.chrome;if(l&&(l=l.loadTimes,ha(l))){var l=l(),q=1E3*Math.min(l.requestTime||
Infinity,l.startLoadTime||Infinity),q=Infinity===q?0:k.navigationStart-q;k=Math.max(0,Math.round(1E3*l.firstPaintTime+q)||0);break a}k=0}0<k&&k>e&&(c.fpt=k);k=sh().span;l=h.redirectEnd-h.redirectStart;0<l&&(k.rtime_=l);l=h.domainLookupEnd-h.domainLookupStart;0<l&&(k.dns_=l);l=h.connectEnd-h.connectStart;0<l&&(k.tcp_=l);l=h.connectEnd-h.secureConnectionStart;h.secureConnectionStart>=h.navigationStart&&0<l&&(k.stcp_=l);l=h.responseStart-h.requestStart;0<l&&(k.req_=l);l=h.responseEnd-h.responseStart;
0<l&&(k.rcv_=l);E("EXP_WEBFONT_ENABLED")&&R.getEntriesByType&&yh(c)}d.p=E("CLIENT_PROTOCOL")||"unknown";d.t=E("CLIENT_TRANSPORT")||"unknown";for(var N in d)"_"!=N.charAt(0)&&(a[N]=d[N]);E("CSI_MORE")&&(c.ps=w());N={};h=[];for(var aa in c)"_"!=aa.charAt(0)&&(k=Math.max(Math.round(c[aa]-e),0),N[aa]=k,h.push(aa+"."+k));a.rt=h.join(",");aa={};h=[];for(var la in b)"_"!=la.charAt(0)&&(aa[la]=b[la],h.push(la+"."+b[la]));a.it=h.join(",");(la=r("ytdebug.logTiming"))&&la(a,N,aa);uh();E("EXP_DEFER_CSI_PING")?
(Ah(),p("yt.timing.deferredPingArgs_",a,void 0),la=F(Ah,0),p("yt.timing.deferredPingTimer_",la,void 0)):zh(a);Q(oh,new nh(N.aft+(f||0)))}}}function zh(a){E("EXP_DEFER_CSI_PING")&&(G(r("yt.timing.deferredPingTimer_")),p("yt.timing.deferredPingArgs_",null,void 0));var b="https:"==window.location.protocol?"https://gg.google.com/csi":"http://csi.gstatic.com/csi",c="",d;for(d in a)c+="&"+d+"="+a[d];(a=b+"?"+c.substring(1))&&ch(a);p("yt.timing.pingSent_",!0,void 0)}
function Ah(a){if(E("EXP_DEFER_CSI_PING")){var b=r("yt.timing.deferredPingArgs_");b&&(a&&(b.yt_fss=a),zh(b))}}function sh(){return r("ytcsi.data_")||vh()}function vh(){var a={tick:{},span:{},info:{}};p("ytcsi.data_",a,void 0);return a};function Bh(){};function Ch(){}x(Ch,Bh);Ch.prototype.W=function(){var a=0;Od(this.pa(!0),function(){a++});return a};Ch.prototype.clear=function(){var a=Pd(this.pa(!0)),b=this;z(a,function(a){b.remove(a)})};function Dh(a){this.e=a}x(Dh,Ch);g=Dh.prototype;g.isAvailable=function(){if(!this.e)return!1;try{return this.e.setItem("__sak","1"),this.e.removeItem("__sak"),!0}catch(a){return!1}};g.Jd=function(a,b){try{this.e.setItem(a,b)}catch(c){if(0==this.e.length)throw"Storage mechanism: Storage disabled";throw"Storage mechanism: Quota exceeded";}};g.get=function(a){a=this.e.getItem(a);if(!u(a)&&null!==a)throw"Storage mechanism: Invalid value was encountered";return a};g.remove=function(a){this.e.removeItem(a)};
g.W=function(){return this.e.length};g.pa=function(a){var b=0,c=this.e,d=new Md;d.next=function(){if(b>=c.length)throw Ld;var d;d=c.key(b++);if(a)return d;d=c.getItem(d);if(!u(d))throw"Storage mechanism: Invalid value was encountered";return d};return d};g.clear=function(){this.e.clear()};g.key=function(a){return this.e.key(a)};function Eh(){var a=null;try{a=window.localStorage||null}catch(b){}this.e=a}x(Eh,Dh);function Fh(){var a=null;try{a=window.sessionStorage||null}catch(b){}this.e=a}x(Fh,Dh);function Gh(a){a=String(a);if(/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);}function Hh(a){return eval("("+a+")")}function S(a){return Ih(new Jh(void 0),a)}function Jh(a){this.e=a}
function Ih(a,b){var c=[];Kh(a,b,c);return c.join("")}
function Kh(a,b,c){switch(typeof b){case "string":Lh(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if(ea(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Kh(a,a.e?a.e.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Lh(f,c),
c.push(":"),Kh(a,a.e?a.e.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Mh={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Nh=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
function Lh(a,b){b.push('"',a.replace(Nh,function(a){if(a in Mh)return Mh[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Mh[a]=e+b.toString(16)}),'"')};function Oh(a){this.e=a}Oh.prototype.f=function(a,b){n(b)?this.e.Jd(a,S(b)):this.e.remove(a)};Oh.prototype.get=function(a){var b;try{b=this.e.get(a)}catch(c){return}if(null!==b)try{return Gh(b)}catch(d){throw"Storage: Invalid value was encountered";}};Oh.prototype.remove=function(a){this.e.remove(a)};function Ph(a){this.e=a}x(Ph,Oh);function Qh(a){this.data=a}function Rh(a){return!n(a)||a instanceof Qh?a:new Qh(a)}Ph.prototype.f=function(a,b){Ph.G.f.call(this,a,Rh(b))};Ph.prototype.h=function(a){a=Ph.G.get.call(this,a);if(!n(a)||a instanceof Object)return a;throw"Storage: Invalid value was encountered";};Ph.prototype.get=function(a){if(a=this.h(a)){if(a=a.data,!n(a))throw"Storage: Invalid value was encountered";}else a=void 0;return a};function Sh(a){this.e=a}x(Sh,Ph);function Th(a){var b=a.creation;a=a.expiration;return!!a&&a<w()||!!b&&b>w()}Sh.prototype.f=function(a,b,c){if(b=Rh(b)){if(c){if(c<w()){Sh.prototype.remove.call(this,a);return}b.expiration=c}b.creation=w()}Sh.G.f.call(this,a,b)};Sh.prototype.h=function(a,b){var c=Sh.G.h.call(this,a);if(c)if(!b&&Th(c))Sh.prototype.remove.call(this,a);else return c};function Uh(a){this.e=a}x(Uh,Sh);function Vh(a,b){var c=[];Od(b,function(a){var b;try{b=Uh.prototype.h.call(this,a,!0)}catch(f){if("Storage: Invalid value was encountered"==f)return;throw f;}n(b)?Th(b)&&c.push(a):c.push(a)},a);return c}function Wh(a,b){var c=Vh(a,b);z(c,function(a){Uh.prototype.remove.call(this,a)},a)}function Xh(){var a=Yh;Wh(a,a.e.pa(!0))};function T(a,b,c){var d=c&&0<c?c:0;c=d?w()+1E3*d:0;if((d=d?Yh:Zh)&&window.JSON){u(b)||(b=JSON.stringify(b,void 0));try{d.f(a,b,c)}catch(e){d.remove(a)}}}function U(a){if(!Zh&&!Yh||!window.JSON)return null;var b;try{b=Zh.get(a)}catch(c){}if(!u(b))try{b=Yh.get(a)}catch(d){}if(!u(b))return null;try{b=JSON.parse(b,void 0)}catch(e){}return b}function $h(a){Zh&&Zh.remove(a);Yh&&Yh.remove(a)}var Yh,ai=new Eh;Yh=ai.isAvailable()?new Uh(ai):null;var Zh,bi=new Fh;Zh=bi.isAvailable()?new Uh(bi):null;function ci(){var a={volume:100,muted:!1},b=U("yt-player-volume")||{};a.volume=isNaN(b.volume)?100:Math.min(Math.max(b.volume,0),100);a.muted=void 0==b.muted?!1:b.muted;return a};function di(a,b){C.call(this);this.k=this.l=a;this.S=b;this.I=!1;this.f={};this.nb=this.Q=null;this.ea=new D;Bb(this,pa(Cb,this.ea));this.j={};this.C=this.ob=this.h=this.Pb=this.e=null;this.oa=!1;this.N=this.H=this.Ob=this.o=null;this.pb={};this.ud=["onReady"];this.Qa=[];this.Qb=null;this.sc=0;this.Ca={};ei(this);this.na("onVolumeChange",v(this.fe,this));this.na("onError",v(this.ee,this));this.na("onTabOrderChange",v(this.yd,this));this.na("onTabAnnounce",v(this.Me,this));this.na("WATCH_LATER_VIDEO_ADDED",
v(this.ge,this));this.na("WATCH_LATER_VIDEO_REMOVED",v(this.he,this));this.na("onMouseWheelCapture",v(this.be,this));this.na("onMouseWheelRelease",v(this.ce,this));this.na("onMouseMoveCapture",v(this.$d,this));this.mb=!1;this.tc=Ze||Ve;this.Da=this.da=null;Vf(this.l,"mousewheel",this.Kc,!1,this);Vf(this.l,"wheel",this.Kc,!1,this)}x(di,C);g=di.prototype;g.nc=function(a,b){this.F()||(fi(this,a),gi(this,b),this.I&&hi(this))};
function fi(a,b){a.Pb=b;a.e=b.clone();a.h=a.e.attrs.id||a.h;"video-player"==a.h&&(a.h=a.S,a.e.attrs.id=a.S);a.k.id==a.h&&(a.h=a.h+"-player",a.e.attrs.id=a.h);a.e.args.enablejsapi="1";a.e.args.playerapiid=a.S;a.ob||(a.ob=ii(a,a.e.args.jsapicallback||"onYouTubePlayerReady"));a.e.args.jsapicallback=null;var c=a.e.attrs.width;c&&(a.k.style.width=lf(Number(c)||c,!0));if(c=a.e.attrs.height)a.k.style.height=lf(Number(c)||c,!0);a.k.style.overflow="hidden"}g.Gd=function(){return this.Pb};
function hi(a){a.e.loaded||(a.e.loaded=!0,"0"!=a.e.args.autoplay?a.f.loadVideoByPlayerVars(a.e.args):a.f.cueVideoByPlayerVars(a.e.args))}function ji(a){if(!n(a.e.disable.flash)){var b=a.e.disable,c;c=cf(bf.getInstance(),a.e.minVersion);b.flash=!c}return!a.e.disable.flash}function ki(a){var b=li(a);b&&b.stopVideo&&b.stopVideo();if(ji(a)){var c=a.e;b&&b.getUpdatedConfigurationData&&(c=Ef(b.getUpdatedConfigurationData()));c.args.autoplay=1;c.args.html5_unavailable="1";fi(a,c);gi(a,"flash")}}
function gi(a,b){if(!a.F()){if(!b){var c;if(!(c=!a.e.html5&&ji(a))){if(!n(a.e.disable.html5)){if(c=zg())c=mi(a)||a.e.assets.js;a.e.disable.html5=!c;c||(a.e.args.html5_unavailable="1")}c=!!a.e.disable.html5}b=c?ji(a)?"flash":"unsupported":"html5"}("flash"==b?a.Re:"html5"==b?a.Se:a.Te).call(a)}}function mi(a){var b=!0,c=li(a);c&&a.e&&(a=a.e,b=B(c,"version")==a.assets.js);return b&&!!r("yt.player.Application.create")}
g.Se=function(){if(!this.oa){var a=mi(this);if(a&&"html5"==ni(this))this.C="html5",this.I||this.Wa();else if(oi(this),this.C="html5",a&&this.Ob)this.l.appendChild(this.Ob),this.Wa();else{this.e.loaded=!0;var b=v(function(){var a=this.l,b=this.e.clone();r("yt.player.Application.create")(a,b);this.Wa()},this);this.o=b;this.oa=!0;a?this.o():(this.e.assets.js2?(this.o=a=v(function(){Xb(this.e.assets.js2,b);this.o=b},this),Xb(this.e.assets.js,a)):Xb(this.e.assets.js,this.o),pg(this.e.assets.css))}}};
g.Re=function(){var a=this.e.clone();if(!this.H){var b=li(this);b&&(this.H=document.createElement("span"),this.H.tabIndex=0,this.Qa.push(L(this.H,"focus",v(this.Hc,this))),this.N=document.createElement("span"),this.N.tabIndex=0,this.Qa.push(L(this.N,"focus",v(this.Hc,this))),b.parentNode&&b.parentNode.insertBefore(this.H,b),b.parentNode&&b.parentNode.insertBefore(this.N,b.nextSibling))}a.attrs.width=a.attrs.width||"100%";a.attrs.height=a.attrs.height||"100%";if("flash"==ni(this))this.C="flash",this.I||
lg(a,!1,v(this.Wa,this));else{oi(this);this.C="flash";this.e.loaded=!0;b=this.l;b=u(b)?Oc(b):b;a=Ef(a);if(window!=window.top){var c=null;document.referrer&&(c=document.referrer.substring(0,128));a.args.framer=c}c=bf.getInstance();cf(c,a.minVersion)?(c=mg(a,c),kg(b,c,a)):og(b,a,c);this.Wa()}};g.Hc=function(){li(this).focus()};function li(a){var b=Nc(a.h);!b&&a.k&&a.k.querySelector&&(b=a.k.querySelector("#"+a.h));return b}
g.Wa=function(){if(!this.F()){var a=li(this),b=!1;try{a&&a.getApiInterface&&a.getApiInterface()&&(b=!0)}catch(c){}if(b)if(this.oa=!1,a.isNotServable&&a.isNotServable(this.e.args.video_id))ki(this);else{ei(this);this.I=!0;a=li(this);a.addEventListener&&(this.Q=pi(this,a,"addEventListener"));a.removeEventListener&&(this.nb=pi(this,a,"removeEventListener"));for(var b=a.getApiInterface(),b=b.concat(a.getInternalApiInterface()),d=0;d<b.length;d++){var e=b[d];this.f[e]||(this.f[e]=pi(this,a,e))}for(var f in this.j)this.Q(f,
this.j[f]);hi(this);this.ob&&this.ob(this.f);this.ea.A("onReady",this.f);a.apiProxyReady&&a.apiProxyReady()}else this.sc=F(v(this.Wa,this),50)}};function pi(a,b,c){var d=b[c];return function(){try{return a.Qb=null,d.apply(b,arguments)}catch(e){"Bad NPObject as private data!"!=e.message&&"sendAbandonmentPing"!=c&&(e.message+=" ("+c+")",a.Qb=e,Kb(e,"WARNING"))}}}
function ei(a){a.I=!1;if(a.nb)for(var b in a.j)a.nb(b,a.j[b]);for(var c in a.Ca)G(parseInt(c,10));a.Ca={};a.Q=null;a.nb=null;for(var d in a.f)a.f[d]=null;a.f.addEventListener=v(a.na,a);a.f.removeEventListener=v(a.Be,a);a.f.destroy=v(a.dispose,a);a.f.getLastError=v(a.Hd,a);a.f.getPlayerType=v(a.Id,a);a.f.getCurrentVideoConfig=v(a.Gd,a);a.f.loadNewVideoConfig=v(a.nc,a);a.f.isReady=v(a.cf,a)}g.cf=function(){return this.I};
g.na=function(a,b){if(!this.F()){var c=ii(this,b);if(c){if(!Ia(this.ud,a)&&!this.j[a]){var d=qi(this,a);this.Q&&this.Q(a,d)}this.ea.subscribe(a,c);"onReady"==a&&this.I&&F(pa(c,this.f),0)}}};g.Be=function(a,b){if(!this.F()){var c=ii(this,b);c&&this.ea.Na(a,c)}};function ii(a,b){var c=b;if("string"==typeof b){if(a.pb[b])return a.pb[b];c=function(){var a=r(b);a&&a.apply(m,arguments)};a.pb[b]=c}return c?c:null}
function qi(a,b){var c="ytPlayer"+b+a.S;a.j[b]=c;m[c]=function(c){var e=F(function(){if(!a.F()){a.ea.A(b,c);var f=a.Ca,h=String(e);h in f&&delete f[h]}},0);fb(a.Ca,String(e))};return c}g.yd=function(a){a=a?Vc:Uc;for(var b=a(document.activeElement);b&&(1!=b.nodeType||b==this.H||b==this.N||(b.focus(),b!=document.activeElement));)b=a(b)};g.Me=function(a){I("a11y-announce",a)};
g.fe=function(a){var b={};b.volume=isNaN(a.volume)?ci().volume:Math.min(Math.max(a.volume,0),100);b.muted=void 0==a.muted?ci().muted:a.muted;T("yt-player-volume",b,2592E3)};g.ee=function(a){5==a&&ki(this)};g.ge=function(a){I("WATCH_LATER_VIDEO_ADDED",a)};g.he=function(a){I("WATCH_LATER_VIDEO_REMOVED",a)};g.ae=function(a){a=a||window.event;a=a.target||a.srcElement;3==a.nodeType&&(a=a.parentNode);if(!Wc(this.l,a))this.f.onExternalMouseMove()};g.$d=function(){Vf(document,"mousemove",this.ae,!1,this)};
g.be=function(){this.tc&&(this.mb||(this.Da=Rc(document)),this.da||(this.da=Vf(window,"scroll",this.we,!1,this)));this.mb=!0};g.ce=function(){this.da&&(bg(this.da),this.da=null);this.mb=!1};g.Kc=function(a){this.mb&&!this.tc&&a.preventDefault()};g.we=function(){this.Da&&window.scrollTo(this.Da.x,this.Da.y)};
g.Te=function(){oi(this);this.C="unsupported";var a='Adobe Flash Player or an HTML5 supported browser is required for video playback. <br> <a href="http://get.adobe.com/flashplayer/">Get the latest Flash Player</a> <br> <a href="/html5">Learn more about upgrading to an HTML5 browser</a>',b=navigator.userAgent.match(/Version\/(\d).*Safari/);b&&5<=parseInt(b[1],10)&&(a='Adobe Flash Player or QuickTime is required for video playback. <br> <a href="http://get.adobe.com/flashplayer/"> Get the latest Flash Player</a> <br> <a href="http://www.apple.com/quicktime/download/">Get the latest version of QuickTime</a>');
b=this.e.messages.player_fallback||a;a=Nc("player-unavailable");if(Nc("unavailable-submessage")&&a){Nc("unavailable-submessage").innerHTML=b;var b=a||document,c=null;b.getElementsByClassName?c=b.getElementsByClassName("icon")[0]:b.querySelectorAll&&b.querySelector?c=b.querySelector(".icon"):c=Qc("icon",a)[0];if(c=b=c||null)c=b?b.dataset?zb("icon")in b.dataset:b.hasAttribute?!!b.hasAttribute("data-icon"):!!b.getAttribute("data-icon"):!1;c&&(b.src=B(b,"icon"));kc(a,"hid");jc(Nc("player"),"off-screen-trigger")}};
g.Id=function(){return this.C||ni(this)};g.Hd=function(){return this.Qb};function ni(a){return(a=li(a))?"div"==a.tagName.toLowerCase()?"html5":"flash":null}function oi(a){rh("dcp");a.cancel();ei(a);a.C=null;a.e&&(a.e.loaded=!1);var b=li(a);"html5"==ni(a)?a.Ob=b:b&&b.destroy&&b.destroy();Tc(a.l);hd(a.Qa);a.Qa.length=0;a.H=null;a.N=null}g.cancel=function(){if(this.o){var a=this.o;this.e.assets.js&&a&&(a=""+ja(a),(a=bc[a])&&Tb(a))}G(this.sc);this.oa=!1};
g.B=function(){oi(this);this.pb=null;for(var a in this.j)m[this.j[a]]=null;this.f=null;delete this.l;delete this.k;this.e&&(this.Pb=this.e=this.e.fallback=null);di.G.B.call(this)};var ri={},si="player_uid_"+(1E9*Math.random()>>>0);function ti(a,b){a=u(a)?Oc(a):a;b=Ef(b);var c=si+"_"+ja(a),d=ri[c];if(d)return d.nc(b),d.f;d=new di(a,c);ri[c]=d;I("player-added",d.f);Bb(d,pa(ui,d));F(function(){d.nc(b)},0);return d.f}function vi(){for(var a in ri){var b=ri[a];b&&b.cancel()}}function wi(a){if(a=Nc(a))a=si+"_"+ja(a),(a=ri[a])&&a.dispose()}function ui(a){ri[a.S]=null}function xi(a){a=Nc(a);if(!a)return null;var b=si+"_"+ja(a),c=ri[b];c||(c=new di(a,b),ri[b]=c);return c.f};var yi=r("yt.abuse.botguardInitialized")||fc;p("yt.abuse.botguardInitialized",yi,void 0);var zi=r("yt.abuse.invokeBotguard")||gc;p("yt.abuse.invokeBotguard",zi,void 0);var Ai=r("yt.player.exports.navigate")||Jd;p("yt.player.exports.navigate",Ai,void 0);var Bi=r("yt.player.embed")||ti;p("yt.player.embed",Bi,void 0);var Ci=r("yt.player.destroy")||wi;p("yt.player.destroy",Ci,void 0);var Di=r("yt.player.cancelAll")||vi;p("yt.player.cancelAll",Di,void 0);var Ei=r("yt.player.getPlayerByElement")||xi;
p("yt.player.getPlayerByElement",Ei,void 0);var Fi=r("yt.player.exports.feedbackStart")||yf;p("yt.player.exports.feedbackStart",Fi,void 0);var Gi=r("yt.player.exports.feedbackShowArticle")||zf;p("yt.player.exports.feedbackShowArticle",Gi,void 0);var Hi=r("yt.util.activity.init")||pd;p("yt.util.activity.init",Hi,void 0);var Ii=r("yt.util.activity.getTimeSinceActive")||rd;p("yt.util.activity.getTimeSinceActive",Ii,void 0);var Ji=r("yt.util.activity.setTimestamp")||qd;
p("yt.util.activity.setTimestamp",Ji,void 0);function Ki(a){O.call(this,1,arguments);this.e=a}x(Ki,O);function Li(a){O.call(this,1,arguments);this.e=a}x(Li,O);function Mi(a,b,c){O.call(this,1,arguments);this.f=a;this.isEnabled=b;this.e=c||null}x(Mi,O);function Ni(a,b){O.call(this,1,arguments);this.e=a;this.isEnabled=b}x(Ni,O);function Oi(a,b,c,d,e){O.call(this,2,arguments);this.f=a;this.e=b;this.k=c||null;this.h=d||null;this.source=e||null}x(Oi,O);function Pi(a,b,c){O.call(this,1,arguments);this.e=a;this.Ya=b}x(Pi,O);
function Qi(a,b,c,d,e,f,h){O.call(this,1,arguments);this.f=a;this.Ya=b;this.e=c;this.j=d||null;this.k=e||null;this.h=f||null;this.source=h||null}x(Qi,O);
var Ri=new P("subscription-batch-pref-email",Mi),Si=new P("subscription-batch-pref-uploads",Mi),Ti=new P("subscription-batch-subscribe",Ki),Ui=new P("subscription-batch-unsubscribe",Ki),Vi=new P("subscription-pref-email",Ni),Wi=new P("subscription-pref-uploads",Ni),Xi=new P("subscription-subscribe",Oi),Yi=new P("subscription-subscribe-loading",Li),Zi=new P("subscription-subscribe-loaded",Li),$i=new P("subscription-subscribe-success",Pi),aj=new P("subscription-subscribe-external",Oi),bj=new P("subscription-unsubscribe",
Qi),cj=new P("subscription-unsubscirbe-loading",Li),dj=new P("subscription-unsubscribe-loaded",Li),ej=new P("subscription-unsubscribe-success",Li),fj=new P("subscription-external-unsubscribe",Qi),gj=new P("subscription-enable-ypc",Li),hj=new P("subscription-disable-ypc",Li);function ij(a,b,c){var d=document.location.protocol+"//"+document.domain+"/post_login";b&&(d=Cd(d,"mode",b));b=Cd("/signin?context=popup","next",d);c&&(b=Cd(b,"feature",c));if(c=window.open(b,"loginPopup","width=375,height=440,resizable=yes,scrollbars=yes",!0))b=H("LOGGED_IN",function(b){Tb(E("LOGGED_IN_PUBSUB_KEY"));Gb("LOGGED_IN",!0);a(b)}),Gb("LOGGED_IN_PUBSUB_KEY",b),c.moveTo((screen.width-375)/2,(screen.height-440)/2)}p("yt.pubsub.publish",I,void 0);var jj=null;"undefined"!=typeof XMLHttpRequest?jj=function(){return new XMLHttpRequest}:"undefined"!=typeof ActiveXObject&&(jj=function(){return new ActiveXObject("Microsoft.XMLHTTP")});function kj(a,b,c,d,e,f,h){function k(){4==(l&&"readyState"in l?l.readyState:0)&&b&&Ib(b)(l)}var l=jj&&jj();if(!("open"in l))return null;"onloadend"in l?l.addEventListener("loadend",k,!1):l.onreadystatechange=k;c=(c||"GET").toUpperCase();d=d||"";l.open(c,a,!0);f&&(l.responseType=f);h&&(l.withCredentials=!0);f="POST"==c;if(e=lj(a,e))for(var q in e)l.setRequestHeader(q,e[q]),"content-type"==q.toLowerCase()&&(f=!1);f&&l.setRequestHeader("Content-Type","application/x-www-form-urlencoded");l.send(d);return l}
function lj(a,b){b=b||{};for(var c in mj){var d=E(mj[c]),e;if(e=d){e=a;var f=void 0;f=window.location.href;var h=td(e)[1]||null,k=Fd(e);h&&k?(e=td(e),f=td(f),e=e[3]==f[3]&&e[1]==f[1]&&e[4]==f[4]):e=k?Fd(f)==k&&(Number(td(f)[4]||null)||null)==(Number(td(e)[4]||null)||null):!0;e||(e=c,f=E("CORS_HEADER_WHITELIST")||{},e=(h=Fd(a))?(f=f[h])?Ia(f,e):!1:!0)}e&&(b[c]=d)}return b}
function nj(a,b){var c=E("XSRF_FIELD_NAME"),d;b.headers&&(d=b.headers["Content-Type"]);return!b.qf&&(!Fd(a)||Fd(a)==document.location.hostname)&&"POST"==b.method&&(!d||"application/x-www-form-urlencoded"==d)&&!(b.O&&b.O[c])}
function oj(a,b){var c=b.format||"JSON";b.sf&&(a=document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:"")+a);var d=E("XSRF_FIELD_NAME"),e=E("XSRF_TOKEN"),f=b.lc;f&&(f[d]&&delete f[d],a=Gd(a,f));var h=b.tf||"",f=b.O;nj(a,b)&&(f||(f={}),f[d]=e);f&&u(h)&&(d=Ed(h),jb(d,f),h=Bd(d));var k=!1,l,q=kj(a,function(a){if(!k){k=!0;l&&G(l);var d;a:switch(a&&"status"in a?a.status:-1){case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 304:d=
!0;break a;default:d=!1}var e=null;if(d||400<=a.status&&500>a.status)e=pj(c,a,b.of);if(d)a:{switch(c){case "XML":d=0==parseInt(e&&e.return_code,10);break a;case "RAW":d=!0;break a}d=!!e}var e=e||{},f=b.context||m;d?b.Z&&b.Z.call(f,a,e):b.onError&&b.onError.call(f,a,e);b.ec&&b.ec.call(f,a,e)}},b.method,h,b.headers,b.responseType,b.withCredentials);b.Db&&0<b.timeout&&(l=F(function(){k||(k=!0,q.abort(),G(l),b.Db.call(b.context||m,q))},b.timeout));return q}
function pj(a,b,c){var d=null;switch(a){case "JSON":a=b.responseText;b=b.getResponseHeader("Content-Type")||"";a&&0<=b.indexOf("json")&&(d=Hh(a));break;case "XML":if(b=(b=b.responseXML)?qj(b):null)d={},z(b.getElementsByTagName("*"),function(a){d[a.tagName]=rj(a)})}if(c)for(var e in d)if("html_content"==e||sa(e))d[e]=Kd(mb(),d[e]);return d}function qj(a){return a?(a=("responseXML"in a?a.responseXML:a).getElementsByTagName("root"))&&0<a.length?a[0]:null:null}
function rj(a){var b="";z(a.childNodes,function(a){b+=a.nodeValue});return b}var mj={"X-YouTube-Page-CL":"PAGE_CL","X-YouTube-Page-Timestamp":"PAGE_BUILD_TIMESTAMP","X-YouTube-Variants-Checksum":"VARIANTS_CHECKSUM"};function sj(){var a=E("PLAYER_CONFIG");return a&&a.args&&void 0!==a.args.authuser?!0:!(!E("SESSION_INDEX")&&!E("LOGGED_IN"))};var tj={},uj="ontouchstart"in document;function vj(a,b,c){var d;switch(a){case "mouseover":case "mouseout":d=3;break;case "mouseenter":case "mouseleave":d=9}return Zc(c,function(a){return ic(a,b)},!0,d)}
function wj(a){var b="mouseover"==a.type&&"mouseenter"in tj||"mouseout"==a.type&&"mouseleave"in tj,c=a.type in tj||b;if("HTML"!=a.target.tagName&&c){if(b){var b="mouseover"==a.type?"mouseenter":"mouseleave",c=tj[b],d;for(d in c.aa){var e=vj(b,d,a.target);e&&!Zc(a.relatedTarget,function(a){return a==e},!0)&&c.A(d,e,b,a)}}if(b=tj[a.type])for(d in b.aa)(e=vj(a.type,d,a.target))&&b.A(d,e,a.type,a)}}L(document,"blur",wj,!0);L(document,"change",wj,!0);L(document,"click",wj);L(document,"focus",wj,!0);
L(document,"mouseover",wj);L(document,"mouseout",wj);L(document,"mousedown",wj);L(document,"keydown",wj);L(document,"keyup",wj);L(document,"keypress",wj);L(document,"cut",wj);L(document,"paste",wj);uj&&(L(document,"touchstart",wj),L(document,"touchend",wj),L(document,"touchcancel",wj));function xj(){this.f={};this.Uc=[];this.h=[]}function yj(a,b){return"yt-uix"+(a.Ub?"-"+a.Ub:"")+(b?"-"+b:"")}xj.prototype.init=t;xj.prototype.dispose=t;function zj(a,b,c){a.h.push(lh(b,c,a))}function Aj(a,b,c){var d=yj(a,void 0),e=v(c,a);b in tj||(tj[b]=new D);tj[b].subscribe(d,e);a.f[c]=e}function Bj(a,b){yb(a,"tooltip-text",b)}xj.prototype.removeData=function(a,b){a&&(a.dataset?delete a.dataset[zb(b)]:a.removeAttribute("data-"+b))};function Cj(){xj.call(this);this.e={}}x(Cj,xj);ca(Cj);g=Cj.prototype;g.Ub="tooltip";g.zb=0;g.register=function(){Aj(this,"mouseover",this.Gc);Aj(this,"mouseout",this.Bb);Aj(this,"click",this.Bb);Aj(this,"touchstart",this.Pe);Aj(this,"touchend",this.bd);Aj(this,"touchcancel",this.bd)};g.dispose=function(){for(var a in this.e)this.Bb(this.e[a]);this.e={}};
g.Gc=function(a){if(!(this.zb&&1E3>w()-this.zb)){var b=parseInt(B(a,"tooltip-hide-timer"),10);b&&(this.removeData(a,"tooltip-hide-timer"),G(b));var b=v(function(){Dj(this,a);this.removeData(a,"tooltip-show-timer")},this),c=parseInt(B(a,"tooltip-show-delay"),10)||0,b=F(b,c);yb(a,"tooltip-show-timer",b.toString());a.title&&(Bj(a,Ej(a)),a.title="");b=ja(a).toString();this.e[b]=a}};
g.Bb=function(a){var b=parseInt(B(a,"tooltip-show-timer"),10);b&&(G(b),this.removeData(a,"tooltip-show-timer"));b=v(function(){if(a){var b=Nc(Fj(this,a));b&&(Gj(b),b&&b.parentNode&&b.parentNode.removeChild(b),this.removeData(a,"content-id"))}this.removeData(a,"tooltip-hide-timer")},this);b=F(b,50);yb(a,"tooltip-hide-timer",b.toString());if(b=B(a,"tooltip-text"))a.title=b;b=ja(a).toString();delete this.e[b]};g.Pe=function(a,b){this.zb=0;var c=vj(b,yj(this),null[0].target);this.Gc(c)};
g.bd=function(a,b){this.zb=w();var c=vj(b,yj(this),null[0].target);this.Bb(c)};function Hj(a,b){Bj(a,b);var c=B(a,"content-id");if(c=Nc(c))if("textContent"in c)c.textContent=b;else if(3==c.nodeType)c.data=b;else if(c.firstChild&&3==c.firstChild.nodeType){for(;c.lastChild!=c.firstChild;)c.removeChild(c.lastChild);c.firstChild.data=b}else{Tc(c);var d=Mc(c);c.appendChild(d.createTextNode(String(b)))}}function Ej(a){return B(a,"tooltip-text")||a.title}
function Dj(a,b){if(b){var c=Ej(b);if(c){var d=Nc(Fj(a,b));if(!d){d=document.createElement("div");d.id=Fj(a,b);d.className=yj(a,"tip");var e=document.createElement("div");e.className=yj(a,"tip-body");var f=document.createElement("div");f.className=yj(a,"tip-arrow");var h=document.createElement("div");h.className=yj(a,"tip-content");var k=Ij(a,b),l=Fj(a,b,"content");h.id=l;yb(b,"content-id",l);e.appendChild(h);k&&d.appendChild(k);d.appendChild(e);d.appendChild(f);(cd()||document.body).appendChild(d);
Hj(b,c);(c=parseInt(B(b,"tooltip-max-width"),10))&&e.offsetWidth>c&&(e.style.width=c+"px",jc(h,yj(a,"normal-wrap")));h=ic(b,yj(a,"reverse"));Jj(a,b,d,e,k,h)||Jj(a,b,d,e,k,!h);var q=yj(a,"tip-visible");F(function(){jc(d,q)},0)}}}}
function Jj(a,b,c,d,e,f){lc(c,yj(a,"tip-reverse"),f);var h=0;f&&(h=1);a=mf(b);f=new mc((a.width-10)/2,f?a.height:0);var k=Mc(b),l=new mc(0,0),q;q=k?Mc(k):document;var N;(N=!K||Gc(9))||(N=Kc(q),N=Sc(N.e));b!=(N?q.documentElement:q.body)&&(q=kf(b),k=Kc(k),k=Rc(k.e),l.x=q.left+k.x,l.y=q.top+k.y);f=new mc(l.x+f.x,l.y+f.y);f=f.clone();l=(h&4&&"rtl"==jf(c,"direction")?h^2:h)&-5;h=mf(c);k=h.clone();q=f.clone();k=k.clone();0!=l&&(l&2&&(q.x-=k.width+0),l&1&&(q.y-=k.height+0));f=new gf(0,0,0,0);f.left=q.x;
f.top=q.y;f.width=k.width;f.height=k.height;k=new mc(f.left,f.top);k instanceof mc?(l=k.x,k=k.y):(l=k,k=void 0);c.style.left=lf(l,!1);c.style.top=lf(k,!1);k=new nc(f.width,f.height);if(!(h==k||h&&k&&h.width==k.width&&h.height==k.height))if(h=k,f=Mc(c),f=Kc(f),l=Sc(f.e),!K||Fc("10")||l&&Fc("8"))f=c.style,xc?f.MozBoxSizing="border-box":yc?f.WebkitBoxSizing="border-box":f.boxSizing="border-box",f.width=Math.max(h.width,0)+"px",f.height=Math.max(h.height,0)+"px";else if(f=c.style,l){K?(l=pf(c,"paddingLeft"),
k=pf(c,"paddingRight"),q=pf(c,"paddingTop"),N=pf(c,"paddingBottom"),l=new ff(q,k,N,l)):(l=hf(c,"paddingLeft"),k=hf(c,"paddingRight"),q=hf(c,"paddingTop"),N=hf(c,"paddingBottom"),l=new ff(parseFloat(q),parseFloat(k),parseFloat(N),parseFloat(l)));if(K&&!Gc(9)){k=rf(c,"borderLeft");q=rf(c,"borderRight");N=rf(c,"borderTop");var aa=rf(c,"borderBottom"),k=new ff(N,q,aa,k)}else k=hf(c,"borderLeftWidth"),q=hf(c,"borderRightWidth"),N=hf(c,"borderTopWidth"),aa=hf(c,"borderBottomWidth"),k=new ff(parseFloat(N),
parseFloat(q),parseFloat(aa),parseFloat(k));f.pixelWidth=h.width-k.left-l.left-l.right-k.right;f.pixelHeight=h.height-k.top-l.top-l.bottom-k.bottom}else f.pixelWidth=h.width,f.pixelHeight=h.height;h=window.document;h=Sc(h)?h.documentElement:h.body;h=new nc(h.clientWidth,h.clientHeight);1==c.nodeType?(c=kf(c),k=new mc(c.left,c.top)):(f=ha(c.f),l=c,c.targetTouches&&c.targetTouches.length?l=c.targetTouches[0]:f&&c.e.targetTouches&&c.e.targetTouches.length&&(l=c.e.targetTouches[0]),k=new mc(l.clientX,
l.clientY));c=mf(d);q=Math.floor(c.width/2);f=!!(h.height<k.y+a.height);a=!!(k.y<a.height);l=!!(k.x<q);h=!!(h.width<k.x+q);k=(c.width+3)/-2- -5;b=B(b,"force-tooltip-direction");if("left"==b||l)k=-5;else if("right"==b||h)k=20-c.width-3;b=Math.floor(k)+"px";d.style.left=b;e&&(e.style.left=b,e.style.height=c.height+"px",e.style.width=c.width+"px");return!(f||a)}function Fj(a,b,c){a=yj(a);var d=b.__yt_uid_key;d||(d=ad(),b.__yt_uid_key=d);b=a+d;c&&(b+="-"+c);return b}
function Ij(a,b){var c=null;Ac&&ic(b,yj(a,"masked"))&&((c=Nc("yt-uix-tooltip-shared-mask"))?(c.parentNode.removeChild(c),tf(c)):(c=document.createElement("iframe"),c.src='javascript:""',c.id="yt-uix-tooltip-shared-mask",c.className=yj(a,"tip-mask")));return c}function Gj(a){var b=Nc("yt-uix-tooltip-shared-mask"),c=b&&Zc(b,function(b){return b==a},!1,2);b&&c&&(b.parentNode.removeChild(b),uf(b),document.body.appendChild(b))};function Kj(){xj.call(this)}x(Kj,xj);ca(Kj);Kj.prototype.Ub="subscription-button";Kj.prototype.register=function(){Aj(this,"click",this.zc);zj(this,Yi,this.Jc);zj(this,Zi,this.Ic);zj(this,$i,this.pe);zj(this,cj,this.Jc);zj(this,dj,this.Ic);zj(this,ej,this.ue);zj(this,gj,this.Zd);zj(this,hj,this.Yd)};
var Yc={oc:"hover-enabled",ld:"yt-uix-button-subscribe",md:"yt-uix-button-subscribed",df:"ypc-enabled",nd:"yt-uix-button-subscription-container",od:"yt-subscription-button-disabled-mask-container"},Lj={ef:"channel-external-id",pd:"subscriber-count-show-when-subscribed",qd:"subscriber-count-tooltip",rd:"subscriber-count-title",ff:"href",pc:"is-subscribed",hf:"parent-url",kf:"sessionlink",sd:"style-type",qc:"subscription-id",mf:"target",vd:"ypc-enabled"};g=Kj.prototype;
g.zc=function(a){var b=B(a,"href"),c=sj();if(b)a=B(a,"target")||"_self",window.open(b,a);else if(c){var b=B(a,"channel-external-id"),c=B(a,"sessionlink"),d;if(B(a,"ypc-enabled")){d=B(a,"ypc-item-type");var e=B(a,"ypc-item-id");d={itemType:d,itemId:e,subscriptionElement:a}}else d=null;e=B(a,"parent-url");if(B(a,"is-subscribed")){var f=B(a,"subscription-id");Q(bj,new Qi(b,f,d,a,c,e))}else Q(Xi,new Oi(b,d,c,e))}else Mj(this,a)};g.Jc=function(a){this.Ra(a.e,this.Zc,!0)};
g.Ic=function(a){this.Ra(a.e,this.Zc,!1)};g.pe=function(a){this.Ra(a.e,this.$c,!0,a.Ya)};g.ue=function(a){this.Ra(a.e,this.$c,!1)};g.Zd=function(a){this.Ra(a.e,this.Cd)};g.Yd=function(a){this.Ra(a.e,this.Bd)};g.$c=function(a,b,c){b?(yb(a,Lj.pc,"true"),c&&yb(a,Lj.qc,c)):(this.removeData(a,Lj.pc),this.removeData(a,Lj.qc));Nj(a)};g.Zc=function(a,b){var c;c=Xc(a);lc(c,Yc.od,b);a.setAttribute("aria-busy",b?"true":"false");a.disabled=b};
function Nj(a){var b=B(a,Lj.sd),c=!!B(a,"is-subscribed"),b="-"+b,d=Yc.md+b;lc(a,Yc.ld+b,!c);lc(a,d,c);B(a,Lj.qd)&&!B(a,Lj.pd)&&(b=yj(Cj.getInstance()),lc(a,b,!c),a.title=c?"":B(a,Lj.rd));c?F(function(){jc(a,Yc.oc)},1E3):kc(a,Yc.oc)}g.Cd=function(a){var b=!!B(a,"ypc-item-type"),c=!!B(a,"ypc-item-id");!B(a,"ypc-enabled")&&b&&c&&(jc(a,"ypc-enabled"),yb(a,Lj.vd,"true"))};g.Bd=function(a){B(a,"ypc-enabled")&&(kc(a,"ypc-enabled"),this.removeData(a,"ypc-enabled"))};
function Oj(a,b){var c=Pc(yj(a));return Da(c,function(a){return b==B(a,"channel-external-id")},a)}g.xd=function(a,b,c){var d=Sa(arguments,2);z(a,function(a){b.apply(this,Oa(a,d))},this)};g.Ra=function(a,b,c){var d=Oj(this,a),d=Oa([d],Sa(arguments,1));this.xd.apply(this,d)};function Mj(a,b){var c=v(function(a){a.discoverable_subscriptions&&Gb("SUBSCRIBE_EMBED_DISCOVERABLE_SUBSCRIPTIONS",a.discoverable_subscriptions);this.zc(b)},a);ij(c,"subscribe","sub_button")};var Pj=window.yt&&window.yt.uix&&window.yt.uix.widgets_||{};p("yt.uix.widgets_",Pj,void 0);function Qj(a){return(0==a.search("cue")||0==a.search("load"))&&"loadModule"!=a}function Rj(a,b,c){u(a)&&(a={mediaContentUrl:a,startSeconds:b,suggestedQuality:c});b=a;c=/\/([ve]|embed)\/([^#?]+)/.exec(a.mediaContentUrl);b.videoId=c&&c[2]?c[2]:null;return Sj(a)}
function Sj(a,b,c){if(ia(a)){b="endSeconds startSeconds mediaContentUrl suggestedQuality videoId two_stage_token".split(" ");c={};for(var d=0;d<b.length;d++){var e=b[d];a[e]&&(c[e]=a[e])}return c}return{videoId:a,startSeconds:b,suggestedQuality:c}}
function Tj(a,b,c,d){if(ia(a)&&!ea(a)){b="playlist list listType index startSeconds suggestedQuality".split(" ");c={};for(d=0;d<b.length;d++){var e=b[d];a[e]&&(c[e]=a[e])}return c}c={index:b,startSeconds:c,suggestedQuality:d};u(a)&&16==a.length?c.list="PL"+a:c.playlist=a;return c}
function Uj(a){var b=a.video_id||a.videoId;if(u(b)){var c=U("yt-player-two-stage-token")||{},d=U("yt-player-two-stage-token")||{};n(void 0)?d[b]=void 0:delete d[b];T("yt-player-two-stage-token",d,300);(b=c[b])&&(a.two_stage_token=b)}};var Vj=w(),Wj=null,Xj=Array(50),Yj=-1,Zj=!1;function ak(a){bk();Wj.push(a);ck(Wj)}function dk(a){var b=r("yt.mdx.remote.debug.handlers_");Ma(b||[],a)}function ek(a,b){bk();var c=Wj,d=fk(a,String(b));0==c.length?gk(d):(ck(c),z(c,function(a){a(d)}))}function bk(){Wj||(Wj=r("yt.mdx.remote.debug.handlers_")||[],p("yt.mdx.remote.debug.handlers_",Wj,void 0))}function gk(a){var b=(Yj+1)%50;Yj=b;Xj[b]=a;Zj||(Zj=49==b)}
function ck(a){var b=Xj;if(b[0]){var c=Yj,d=Zj?c:-1;do{var d=(d+1)%50,e=b[d];z(a,function(a){a(e)})}while(d!=c);Xj=Array(50);Yj=-1;Zj=!1}}function fk(a,b){var c=(w()-Vj)/1E3;c.toFixed&&(c=c.toFixed(3));var d=[];d.push("[",c+"s","] ");d.push("[","yt.mdx.remote","] ");d.push(a+": "+b,"\n");return d.join("")};function hk(a){a=a||{};this.name=a.name||"";this.id=a.id||a.screenId||"";this.token=a.token||a.loungeToken||"";this.uuid=a.uuid||a.dialId||""}function ik(a,b){return!!b&&(a.id==b||a.uuid==b)}function jk(a,b){return a||b?!a!=!b?!1:a.id==b.id:!0}function kk(a,b){return a||b?!a!=!b?!1:a.id==b.id&&a.token==b.token&&a.name==b.name&&a.uuid==b.uuid:!0}function lk(a){return{name:a.name,screenId:a.id,loungeToken:a.token,dialId:a.uuid}}function mk(a){return new hk(a)}
function nk(a){return ea(a)?A(a,mk):[]}function ok(a){return a?'{name:"'+a.name+'",id:'+a.id.substr(0,6)+"..,token:"+(a.token?".."+a.token.slice(-6):"-")+",uuid:"+(a.uuid?".."+a.uuid.slice(-6):"-")+"}":"null"}function pk(a){return ea(a)?"["+A(a,ok).join(",")+"]":"null"};var qk=["boadgeojelhgndaghljhdicfkmllpafd","dliochdbjfkdbacpmhlcpmleaejidimm","hfaagokkkhdbgiakmmlclaapfelnkoah","fmfcbgogabcbclcofgocippekhfcmgfj","enhhojjnijigcajfphajepfemndkmdlo"];function rk(a,b){a==qk.length?b(null):sk(qk[a],function(c){c?(c=qk[a],T("yt-remote-cast-last-extension",c),b(c)):rk(a+1,b)})}function tk(a){return"chrome-extension://"+a+"/cast_sender.js"}
function sk(a,b){var c=new XMLHttpRequest;c.onreadystatechange=function(){4==c.readyState&&200==c.status&&b(!0)};c.onerror=function(){b(!1)};try{c.open("GET",tk(a),!0),c.send()}catch(d){b(!1)}}
function uk(a){window.__onGCastApiAvailable=a;vk(function(b){if(b){ek("bootstrap","Found cast extension: "+b);p("chrome.cast.extensionId",b,void 0);var c=document.createElement("script");c.src=tk(b);c.onerror=function(){wk();$h("yt-remote-cast-last-extension");a(!1,"Extension JS failed to load.")};(document.head||document.documentElement).appendChild(c)}else ek("bootstrap","No cast extension found"),a(!1,"No cast extension found")})}
function wk(){window.__onGCastApiAvailable&&delete window.__onGCastApiAvailable}function vk(a){var b=U("yt-remote-cast-last-extension");b?a(b):rk(0,a)};var xk={SKA_SKIPPABLE_ADS:"ska",jf:"que",gf:"mus",lf:"sus"};function yk(a){this.port=this.h="";this.e="/api/lounge";this.f=!0;a=a||document.location.href;var b=Number(td(a)[4]||null)||null||"";b&&(this.port=":"+b);this.h=vd(a)||"";a=oc;0<=a.search("MSIE")&&(a=a.match(/MSIE ([\d.]+)/)[1],0>ya(a,"10.0")&&(this.f=!1))}function zk(a,b,c,d){var e=a.e;if(n(d)?d:a.f)e="https://"+a.h+a.port+a.e;return Dd(e+b,c||{})}
function Ak(a,b,c,d,e){a={format:"JSON",method:"POST",context:a,timeout:5E3,withCredentials:!1,Z:pa(a.j,d,!0),onError:pa(a.k,e),Db:pa(a.l,e)};c&&(a.O=c,a.headers={"Content-Type":"application/x-www-form-urlencoded"});return oj(b,a)}yk.prototype.j=function(a,b,c,d){b?a(d):a({text:c.responseText})};yk.prototype.k=function(a,b){a(Error("Request error: "+b.status))};yk.prototype.l=function(a){a(Error("request timed out"))};function Bk(a){a&&(this.id=a.id||"",this.name=a.name||"",this.e=a.activityId||"",this.status=a.status||"UNKNOWN")}Bk.prototype.id="";Bk.prototype.name="";Bk.prototype.e="";Bk.prototype.status="UNKNOWN";function Ck(a){return{id:a.id,name:a.name,activityId:a.e,status:a.status}}Bk.prototype.toString=function(){return"{id:"+this.id+",name:"+this.name+",activityId:"+this.e+",status:"+this.status+"}"};function Dk(a){a=a||[];return"["+A(a,function(a){return a?a.toString():"null"}).join(",")+"]"};function Ek(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0;return("x"==a?b:b&3|8).toString(16)})}function Fk(a,b){return Ga(a,function(a){return a.key==b})}function Gk(a){return A(a,function(a){return{key:a.id,name:a.name}})}function Hk(a){return A(a,function(a){return Ck(a)})}function Ik(a){return A(a,function(a){return new Bk(a)})}function Jk(a,b){return a||b?a&&b?a.id==b.id&&a.name==b.name:!1:!0}
function Kk(a,b){return Ga(a,function(a){return a.id==b})}function Lk(a,b){return Ga(a,function(a){return jk(a,b)})}function Mk(a,b){return Ga(a,function(a){return ik(a,b)})};function V(){C.call(this);this.k=new D;Bb(this,pa(Cb,this.k))}x(V,C);V.prototype.subscribe=function(a,b,c){return this.F()?0:this.k.subscribe(a,b,c)};V.prototype.Na=function(a,b,c){return this.F()?!1:this.k.Na(a,b,c)};V.prototype.la=function(a){return this.F()?!1:this.k.la(a)};V.prototype.A=function(a,b){return this.F()?!1:this.k.A.apply(this.k,arguments)};function Nk(a){V.call(this);this.o=a;this.screens=[]}x(Nk,V);g=Nk.prototype;g.X=function(){return this.screens};g.contains=function(a){return!!Lk(this.screens,a)};g.get=function(a){return a?Mk(this.screens,a):null};function Ok(a,b){var c=a.get(b.uuid)||a.get(b.id);if(c){var d=c.name;c.id=b.id||c.id;c.name=b.name;c.token=b.token;c.uuid=b.uuid||c.uuid;return c.name!=d}a.screens.push(b);return!0}
function Pk(a,b){var c=a.screens.length!=b.length;a.screens=Da(a.screens,function(a){return!!Lk(b,a)});for(var d=0,e=b.length;d<e;d++)c=Ok(a,b[d])||c;return c}function Qk(a,b){var c=a.screens.length;a.screens=Da(a.screens,function(a){return!jk(a,b)});return a.screens.length<c}g.info=function(a){ek(this.o,a)};g.warn=function(a){ek(this.o,a)};function Rk(a,b,c,d){V.call(this);this.C=a;this.o=b;this.j=c;this.l=d;this.h=0;this.e=null;this.f=NaN}x(Rk,V);var Sk=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g=Rk.prototype;g.start=function(){!this.e&&isNaN(this.f)&&this.Tc()};g.stop=function(){this.e&&(this.e.abort(),this.e=null);isNaN(this.f)||(G(this.f),this.f=NaN)};g.B=function(){this.stop();Rk.G.B.call(this)};
g.Tc=function(){this.f=NaN;this.e=oj(zk(this.C,"/pairing/get_screen"),{method:"POST",O:{pairing_code:this.o},timeout:5E3,Z:v(this.We,this),onError:v(this.Ve,this),Db:v(this.Xe,this)})};g.We=function(a,b){this.e=null;var c=b.screen||{};c.dialId=this.j;c.name=this.l;this.A("pairingComplete",new hk(c))};
g.Ve=function(a){this.e=null;a.status&&404==a.status?this.h>=Sk.length?this.A("pairingFailed",Error("DIAL polling timed out")):(a=Sk[this.h],this.f=F(v(this.Tc,this),a),this.h++):this.A("pairingFailed",Error("Server error "+a.status))};g.Xe=function(){this.e=null;this.A("pairingFailed",Error("Server not responding"))};function Tk(a){a&&(this.id=a.id||a.name,this.name=a.name,this.wd=a.app,this.type=a.type||"REMOTE_CONTROL",this.avatar=a.userAvatarUri||"",this.theme=a.theme||"u",this.capabilities=new $d(Da((a.capabilities||"").split(","),pa(Za,xk))))}Tk.prototype.id="";Tk.prototype.name="";g=Tk.prototype;g.wd="";g.type="REMOTE_CONTROL";g.avatar="";g.theme="u";g.equals=function(a){return a?this.id==a.id:!1};var Uk;function Vk(){var a=Wk(),b=Xk();Ia(a,b);if(Yk()){var c=a,d;d=0;for(var e=c.length,f;d<e;){var h=d+e>>1,k;k=Va(b,c[h]);0<k?d=h+1:(e=h,f=!k)}d=f?d:~d;0>d&&Ra(c,-(d+1),0,b)}a=Zk(a);if(0==a.length)try{a="remote_sid",md.remove(""+a,"/","youtube.com")}catch(l){}else try{nd("remote_sid",a.join(","),-1)}catch(q){}}function Wk(){var a=U("yt-remote-connected-devices")||[];a.sort(Va);return a}
function Zk(a){if(0==a.length)return[];var b=a[0].indexOf("#"),c=-1==b?a[0]:a[0].substring(0,b);return A(a,function(a,b){return 0==b?a:a.substring(c.length)})}function $k(a){T("yt-remote-connected-devices",a,86400)}function Xk(){if(al)return al;var a=U("yt-remote-device-id");a||(a=Ek(),T("yt-remote-device-id",a,31536E3));for(var b=Wk(),c=1,d=a;Ia(b,d);)c++,d=a+"#"+c;return al=d}function bl(){return U("yt-remote-session-browser-channel")}function Yk(){return U("yt-remote-session-screen-id")}
function cl(a){5<a.length&&(a=a.slice(a.length-5));var b=A(dl(),function(a){return a.loungeToken}),c=A(a,function(a){return a.loungeToken});Fa(c,function(a){return!Ia(b,a)})&&el();T("yt-remote-local-screens",a,31536E3)}function dl(){return U("yt-remote-local-screens")||[]}function el(){T("yt-remote-lounge-token-expiration",!0,86400)}function fl(){return!U("yt-remote-lounge-token-expiration")}function gl(a){T("yt-remote-online-screens",a,60)}function hl(){return U("yt-remote-online-screens")||[]}
function il(a){T("yt-remote-online-dial-devices",a,30)}function jl(){return U("yt-remote-online-dial-devices")||[]}function kl(a,b){T("yt-remote-session-browser-channel",a);T("yt-remote-session-screen-id",b);var c=Wk(),d=Xk();Ia(c,d)||c.push(d);$k(c);Vk()}function ll(a){a||($h("yt-remote-session-screen-id"),$h("yt-remote-session-video-id"));Vk();a=Wk();Ma(a,Xk());$k(a)}
function ml(){if(!Uk){var a;a=new Eh;(a=a.isAvailable()?a:null)&&(Uk=new Oh(a))}return Uk?!!Uk.get("yt-remote-use-staging-server"):!1}var al="";function nl(a){Nk.call(this,"LocalScreenService");this.f=a;this.e=NaN;ol(this);this.info("Initializing with "+pk(this.screens))}x(nl,Nk);g=nl.prototype;g.start=function(){ol(this)&&this.A("screenChange");fl()&&pl(this);G(this.e);this.e=F(v(this.start,this),1E4)};g.add=function(a,b){ol(this);Ok(this,a);ql(this,!1);this.A("screenChange");b(a);a.token||pl(this)};g.remove=function(a,b){var c=ol(this);Qk(this,a)&&(ql(this,!1),c=!0);b(a);c&&this.A("screenChange")};
g.Kb=function(a,b,c,d){var e=ol(this),f=this.get(a.id);f?(f.name!=b&&(f.name=b,ql(this,!1),e=!0),c(a)):d(Error("no such local screen."));e&&this.A("screenChange")};g.B=function(){G(this.e);nl.G.B.call(this)};function pl(a){if(a.screens.length){var b=A(a.screens,function(a){return a.id}),c=zk(a.f,"/pairing/get_lounge_token_batch");Ak(a.f,c,{screen_ids:b.join(",")},v(a.Md,a),v(a.Ld,a))}}
g.Md=function(a){ol(this);var b=this.screens.length;a=a&&a.screens||[];for(var c=0,d=a.length;c<d;++c){var e=a[c],f=this.get(e.screenId);f&&(f.token=e.loungeToken,--b)}ql(this,!b);b&&this.warn("Missed "+b+" lounge tokens.")};g.Ld=function(a){this.warn("Requesting lounge tokens failed: "+a)};function ol(a){var b=nk(dl()),b=Da(b,function(a){return!a.uuid});return Pk(a,b)}function ql(a,b){cl(A(a.screens,lk));b&&el()};function rl(a,b){V.call(this);this.l=b;for(var c=U("yt-remote-online-screen-ids")||"",c=c?c.split(","):[],d={},e=this.l(),f=0,h=e.length;f<h;++f){var k=e[f].id;d[k]=Ia(c,k)}this.e=d;this.o=a;this.h=this.j=NaN;this.f=null;sl("Initialized with "+S(this.e))}x(rl,V);g=rl.prototype;g.start=function(){var a=parseInt(U("yt-remote-fast-check-period")||"0",10);(this.j=w()-144E5<a?0:a)?tl(this):(this.j=w()+3E5,T("yt-remote-fast-check-period",this.j),this.hc())};g.isEmpty=function(){return eb(this.e)};
g.update=function(){sl("Updating availability on schedule.");var a=this.l(),b=Xa(this.e,function(b,d){return b&&!!Mk(a,d)},this);ul(this,b)};function vl(a,b,c){var d=zk(a.o,"/pairing/get_screen_availability");Ak(a.o,d,{lounge_token:b.token},v(function(a){a=a.screens||[];for(var d=0,h=a.length;d<h;++d)if(a[d].loungeToken==b.token){c("online"==a[d].status);return}c(!1)},a),v(function(){c(!1)},a))}g.B=function(){G(this.h);this.h=NaN;this.f&&(this.f.abort(),this.f=null);rl.G.B.call(this)};
function ul(a,b){var c;a:if(Ya(b)!=Ya(a.e))c=!1;else{c=bb(b);for(var d=0,e=c.length;d<e;++d)if(!a.e[c[d]]){c=!1;break a}c=!0}c||(sl("Updated online screens: "+S(a.e)),a.e=b,a.A("screenChange"));wl(a)}function tl(a){isNaN(a.h)||G(a.h);a.h=F(v(a.hc,a),0<a.j&&a.j<w()?2E4:1E4)}
g.hc=function(){G(this.h);this.h=NaN;this.f&&this.f.abort();var a=xl(this);if(Ya(a)){var b=zk(this.o,"/pairing/get_screen_availability"),c={lounge_token:bb(a).join(",")};this.f=Ak(this.o,b,c,v(this.ne,this,a),v(this.me,this))}else ul(this,{}),tl(this)};g.ne=function(a,b){this.f=null;var c=bb(xl(this));if(Ta(c,bb(a))){for(var c=b.screens||[],d={},e=0,f=c.length;e<f;++e)d[a[c[e].loungeToken]]="online"==c[e].status;ul(this,d);tl(this)}else this.L("Changing Screen set during request."),this.hc()};
g.me=function(a){this.L("Screen availability failed: "+a);this.f=null;tl(this)};function sl(a){ek("OnlineScreenService",a)}g.L=function(a){ek("OnlineScreenService",a)};function xl(a){var b={};z(a.l(),function(a){a.token?b[a.token]=a.id:this.L("Requesting availability of screen w/o lounge token.")});return b}
function wl(a){var b=bb(Xa(a.e,function(a){return a}));b.sort(Va);b.length?T("yt-remote-online-screen-ids",b.join(","),60):$h("yt-remote-online-screen-ids");a=Da(a.l(),function(a){return!!this.e[a.id]},a);gl(A(a,lk))};function W(a){Nk.call(this,"ScreenService");this.l=a;this.e=this.f=null;this.h=[];this.j={};yl(this)}x(W,Nk);g=W.prototype;g.start=function(){this.f.start();this.e.start();this.screens.length&&(this.A("screenChange"),this.e.isEmpty()||this.A("onlineScreenChange"))};g.add=function(a,b,c){this.f.add(a,b,c)};g.remove=function(a,b,c){this.f.remove(a,b,c);this.e.update()};g.Kb=function(a,b,c,d){this.f.contains(a)?this.f.Kb(a,b,c,d):(a="Updating name of unknown screen: "+a.name,this.warn(a),d(Error(a)))};
g.X=function(a){return a?this.screens:Oa(this.screens,Da(this.h,function(a){return!this.contains(a)},this))};g.ed=function(){return Da(this.X(!0),function(a){return!!this.e.e[a.id]},this)};
function zl(a,b,c,d,e,f){a.info("getAutomaticScreenByIds "+c+" / "+b);c||(c=a.j[b]);var h=a.X();if(h=(c?Mk(h,c):null)||Mk(h,b)){h.uuid=b;var k=Al(a,h);vl(a.e,k,function(a){e(a?k:null)})}else c?Bl(a,c,v(function(a){var f=Al(this,new hk({name:d,screenId:c,loungeToken:a,dialId:b||""}));vl(this.e,f,function(a){e(a?f:null)})},a),f):e(null)}
g.fd=function(a,b,c,d,e){this.info("getDialScreenByPairingCode "+a+" / "+b);var f=new Rk(this.l,a,b,c);f.subscribe("pairingComplete",v(function(a){Cb(f);d(Al(this,a))},this));f.subscribe("pairingFailed",function(a){Cb(f);e(a)});f.start();return v(f.stop,f)};function Cl(a,b){for(var c=0,d=a.screens.length;c<d;++c)if(a.screens[c].name==b)return a.screens[c];return null}g.Bc=function(a,b){for(var c=2,d=b(a,c);Cl(this,d);){c++;if(20<c)return a;d=b(a,c)}return d};
g.Ze=function(a,b,c,d){oj(zk(this.l,"/pairing/get_screen"),{method:"POST",O:{pairing_code:a},timeout:5E3,Z:v(function(a,d){var h=new hk(d.screen||{});if(!h.name||Cl(this,h.name))h.name=this.Bc(h.name,b);c(Al(this,h))},this),onError:v(function(a){d(Error("pairing request failed: "+a.status))},this),Db:v(function(){d(Error("pairing request timed out."))},this)})};g.B=function(){Cb(this.f);Cb(this.e);W.G.B.call(this)};
function Bl(a,b,c,d){a.info("requestLoungeToken_ for "+b);var e={O:{screen_ids:b},method:"POST",context:a,Z:function(a,e){var k=e&&e.screens||[];k[0]&&k[0].screenId==b?c(k[0].loungeToken):d(Error("Missing lounge token in token response"))},onError:function(){d(Error("Request screen lounge token failed"))}};oj(zk(a.l,"/pairing/get_lounge_token_batch"),e)}
function Dl(a){a.screens=a.f.X();var b=a.j,c={},d;for(d in b)c[b[d]]=d;b=0;for(d=a.screens.length;b<d;++b){var e=a.screens[b];e.uuid=c[e.id]||""}a.info("Updated manual screens: "+pk(a.screens))}g.Nd=function(){Dl(this);this.A("screenChange");this.e.update()};
function yl(a){El(a);a.f=new nl(a.l);a.f.subscribe("screenChange",v(a.Nd,a));Dl(a);a.h=nk(U("yt-remote-automatic-screen-cache")||[]);El(a);a.info("Initializing automatic screens: "+pk(a.h));a.e=new rl(a.l,v(a.X,a,!0));a.e.subscribe("screenChange",v(function(){this.A("onlineScreenChange")},a))}
function Al(a,b){var c=a.get(b.id);c?(c.uuid=b.uuid,b=c):((c=Mk(a.h,b.uuid))?(c.id=b.id,c.token=b.token,b=c):a.h.push(b),T("yt-remote-automatic-screen-cache",A(a.h,lk)));El(a);a.j[b.uuid]=b.id;T("yt-remote-device-id-map",a.j,31536E3);return b}function El(a){a.j=U("yt-remote-device-id-map")||{}}W.prototype.dispose=W.prototype.dispose;function Fl(a,b,c){V.call(this);this.S=c;this.I=a;this.f=b;this.h=null}x(Fl,V);function Gl(a,b){a.h=b;a.A("sessionScreen",a.h)}g=Fl.prototype;g.V=function(a){this.F()||(a&&this.warn(""+a),this.h=null,this.A("sessionScreen",null))};g.info=function(a){ek(this.S,a)};g.warn=function(a){ek(this.S,a)};g.hd=function(){return null};
g.jc=function(a){var b=this.f;a?(b.displayStatus=new chrome.cast.ReceiverDisplayStatus(a,[]),b.displayStatus.showStop=!0):b.displayStatus=null;chrome.cast.setReceiverDisplayStatus(b,v(function(){this.info("Updated receiver status for "+b.friendlyName+": "+a)},this),v(function(){this.warn("Failed to update receiver status for: "+b.friendlyName)},this))};g.B=function(){this.jc("");Fl.G.B.call(this)};function Hl(a,b){Fl.call(this,a,b,"CastSession");this.e=null;this.l=0;this.j=null;this.C=v(this.$e,this);this.o=v(this.xe,this);this.l=F(v(function(){Il(this,null)},this),12E4)}x(Hl,Fl);g=Hl.prototype;
g.ic=function(a){if(this.e){if(this.e==a)return;this.warn("Overriding cast sesison with new session object");this.e.removeUpdateListener(this.C);this.e.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.o)}this.e=a;this.e.addUpdateListener(this.C);this.e.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.o);this.j&&Jl(this);Kl(this,"getMdxSessionStatus")};g.Va=function(a){this.info("launchWithParams: "+S(a));this.j=a;this.e&&Jl(this)};
g.stop=function(){this.e?this.e.stop(v(function(){this.V()},this),v(function(){this.V(Error("Failed to stop receiver app."))},this)):this.V(Error("Stopping cast device witout session."))};g.jc=t;g.B=function(){this.info("disposeInternal");G(this.l);this.l=0;this.e&&(this.e.removeUpdateListener(this.C),this.e.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.o));this.e=null;Hl.G.B.call(this)};
function Jl(a){var b=a.j.videoId||a.j.videoIds[a.j.index];b&&Kl(a,"flingVideo",{videoId:b,currentTime:a.j.currentTime||0});a.j=null}function Kl(a,b,c){a.info("sendYoutubeMessage_: "+b+" "+S(c));var d={};d.type=b;c&&(d.data=c);a.e?a.e.sendMessage("urn:x-cast:com.google.youtube.mdx",d,t,v(function(){this.warn("Failed to send message: "+b+".")},a)):a.warn("Sending yt message without session: "+S(d))}
g.xe=function(a,b){if(!this.F())if(b){var c=Hh(b);if(c){var d=""+c.type,c=c.data||{};this.info("onYoutubeMessage_: "+d+" "+S(c));switch(d){case "mdxSessionStatus":Il(this,c.screenId);break;default:this.warn("Unknown youtube message: "+d)}}else this.warn("Unable to parse message.")}else this.warn("No data in message.")};
function Il(a,b){G(a.l);b?(a.info("onConnectedScreenId_: Received screenId: "+b),a.h&&a.h.id==b||zl(a.I,a.f.label,b,a.f.friendlyName,v(function(a){a?Gl(this,a):this.V(Error("Unable to fetch screen."))},a),v(a.V,a))):a.V(Error("Waiting for session status timed out."))}g.hd=function(){return this.e};g.$e=function(a){this.F()||a||(this.warn("Cast session died."),this.V())};function Ll(a,b){Fl.call(this,a,b,"DialSession");this.l=this.H=null;this.N="";this.j=null;this.C=t;this.o=NaN;this.Q=v(this.bf,this);this.e=t}x(Ll,Fl);g=Ll.prototype;g.ic=function(a){this.l=a;this.l.addUpdateListener(this.Q)};g.Va=function(a){this.j=a;this.C()};g.stop=function(){this.e();this.e=t;G(this.o);this.l?this.l.stop(v(this.V,this,null),v(this.V,this,"Failed to stop DIAL device.")):this.V()};
g.B=function(){this.e();this.e=t;G(this.o);this.l&&this.l.removeUpdateListener(this.Q);this.l=null;Ll.G.B.call(this)};function Ml(a){a.e=a.I.fd(a.N,a.f.label,a.f.friendlyName,v(function(a){this.e=t;Gl(this,a)},a),v(function(a){this.e=t;this.V(a)},a))}g.bf=function(a){this.F()||a||(this.warn("DIAL session died."),this.e(),this.e=t,this.V())};
function Nl(a){var b={};b.pairingCode=a.N;if(a.j){var c=a.j.index||0,d=a.j.currentTime||0;b.v=a.j.videoId||a.j.videoIds[c];b.t=d}ml()&&(b.env_useStageMdx=1);return Bd(b)}g.cc=function(a){this.N=Ek();if(this.j){var b=new chrome.cast.DialLaunchResponse(!0,Nl(this));a(b);Ml(this)}else this.C=v(function(){G(this.o);this.C=t;this.o=NaN;var b=new chrome.cast.DialLaunchResponse(!0,Nl(this));a(b);Ml(this)},this),this.o=F(v(function(){this.C()},this),100)};
g.Od=function(a,b){zl(this.I,this.H.receiver.label,a,this.f.friendlyName,v(function(a){a&&a.token?(Gl(this,a),b(new chrome.cast.DialLaunchResponse(!1))):this.cc(b)},this),v(function(a){this.warn("Failed to get DIAL screen: "+a);this.cc(b)},this))};function Ol(a,b){Fl.call(this,a,b,"ManualSession");this.e=F(v(this.Va,this,null),150)}x(Ol,Fl);Ol.prototype.stop=function(){this.V()};Ol.prototype.ic=t;Ol.prototype.Va=function(){G(this.e);this.e=NaN;var a=Mk(this.I.X(),this.f.label);a?Gl(this,a):this.V(Error("No such screen"))};Ol.prototype.B=function(){G(this.e);this.e=NaN;Ol.G.B.call(this)};function Pl(a){V.call(this);this.f=a;this.e=null;this.l=!1;this.h=[];this.j=v(this.ke,this)}x(Pl,V);g=Pl.prototype;
g.init=function(a,b){chrome.cast.timeout.requestSession=3E4;var c=new chrome.cast.SessionRequest("233637DE");c.dialRequest=new chrome.cast.DialRequest("YouTube");var d=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED,e=a?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION,c=new chrome.cast.ApiConfig(c,v(this.Nc,this),v(this.le,this),d,e);c.customDialLaunchCallback=v(this.Xd,this);chrome.cast.initialize(c,v(function(){this.F()||(chrome.cast.addReceiverActionListener(this.j),
ak(Ql),this.f.subscribe("onlineScreenChange",v(this.gd,this)),this.h=Rl(this),chrome.cast.setCustomReceivers(this.h,t,v(function(a){this.L("Failed to set initial custom receivers: "+S(a))},this)),this.A("yt-remote-cast2-availability-change",Sl(this)),b(!0))},this),function(a){this.L("Failed to initialize API: "+S(a));b(!1)})};
g.Ke=function(a,b){Tl("Setting connected screen ID: "+a+" -> "+b);if(this.e){var c=this.e.h;if(!a||c&&c.id!=a)Tl("Unsetting old screen status: "+this.e.f.friendlyName),Cb(this.e),this.e=null}if(a&&b){if(!this.e){c=Mk(this.f.X(),a);if(!c){Tl("setConnectedScreenStatus: Unknown screen.");return}var d=Ul(this,c);d||(Tl("setConnectedScreenStatus: Connected receiver not custom..."),d=new chrome.cast.Receiver(c.uuid?c.uuid:c.id,c.name),d.receiverType=chrome.cast.ReceiverType.CUSTOM,this.h.push(d),chrome.cast.setCustomReceivers(this.h,
t,v(function(a){this.L("Failed to set initial custom receivers: "+S(a))},this)));Tl("setConnectedScreenStatus: new active receiver: "+d.friendlyName);Vl(this,new Ol(this.f,d),!0)}this.e.jc(b)}else Tl("setConnectedScreenStatus: no screen.")};function Ul(a,b){return b?Ga(a.h,function(a){return ik(b,a.label)},a):null}g.Le=function(a){this.F()?this.L("Setting connection data on disposed cast v2"):this.e?this.e.Va(a):this.L("Setting connection data without a session")};
g.stopSession=function(){this.F()?this.L("Stopping session on disposed cast v2"):this.e?(this.e.stop(),Cb(this.e),this.e=null):Tl("Stopping non-existing session")};g.requestSession=function(){chrome.cast.requestSession(v(this.Nc,this),v(this.oe,this))};g.B=function(){this.f.Na("onlineScreenChange",v(this.gd,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.j);dk(Ql);Cb(this.e);Pl.G.B.call(this)};function Tl(a){ek("Controller",a)}g.L=function(a){ek("Controller",a)};
function Ql(a){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(a)}function Sl(a){return a.l||!!a.h.length||!!a.e}function Vl(a,b,c){Cb(a.e);(a.e=b)?(c?a.A("yt-remote-cast2-receiver-resumed",b.f):a.A("yt-remote-cast2-receiver-selected",b.f),b.subscribe("sessionScreen",v(a.Oc,a,b)),b.h?a.A("yt-remote-cast2-session-change",b.h):c&&a.e.Va(null)):a.A("yt-remote-cast2-session-change",null)}
g.Oc=function(a,b){this.e==a&&(b||Vl(this,null),this.A("yt-remote-cast2-session-change",b))};
g.ke=function(a,b){if(!this.F())if(a)switch(Tl("onReceiverAction_ "+a.label+" / "+a.friendlyName+"-- "+b),b){case chrome.cast.ReceiverAction.CAST:if(this.e)if(this.e.f.label!=a.label)Tl("onReceiverAction_: Stopping active receiver: "+this.e.f.friendlyName),this.e.stop();else{Tl("onReceiverAction_: Casting to active receiver.");this.e.h&&this.A("yt-remote-cast2-session-change",this.e.h);break}switch(a.receiverType){case chrome.cast.ReceiverType.CUSTOM:Vl(this,new Ol(this.f,a));break;case chrome.cast.ReceiverType.DIAL:Vl(this,
new Ll(this.f,a));break;case chrome.cast.ReceiverType.CAST:Vl(this,new Hl(this.f,a));break;default:this.L("Unknown receiver type: "+a.receiverType);return}break;case chrome.cast.ReceiverAction.STOP:this.e&&this.e.f.label==a.label?this.e.stop():this.L("Stopping receiver w/o session: "+a.friendlyName)}else this.L("onReceiverAction_ called without receiver.")};
g.Xd=function(a){if(this.F())return Promise.reject(Error("disposed"));var b=a.receiver;b.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.L("Not DIAL receiver: "+b.friendlyName),b.receiverType=chrome.cast.ReceiverType.DIAL);var c=this.e?this.e.f:null;if(!c||c.label!=b.label)return this.L("Receiving DIAL launch request for non-clicked DIAL receiver: "+b.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(c&&c.label==b.label&&c.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.e.h)return Tl("Reselecting dial screen."),
this.A("yt-remote-cast2-session-change",this.e.h),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.L('Changing CAST intent from "'+c.receiverType+'" to "dial" for '+b.friendlyName);Vl(this,new Ll(this.f,b))}b=this.e;b.H=a;return b.H.appState==chrome.cast.DialAppState.RUNNING?new Promise(v(b.Od,b,(b.H.extraData||{}).screenId||null)):new Promise(v(b.cc,b))};
g.Nc=function(a){if(!this.F()){Tl("New cast session ID: "+a.sessionId);var b=a.receiver;if(b.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.e)if(b.receiverType==chrome.cast.ReceiverType.CAST)Tl("Got resumed cast session before resumed mdx connection."),Vl(this,new Hl(this.f,b),!0);else{this.L("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var c=this.e.f,d=Mk(this.f.X(),c.label);d&&ik(d,b.label)&&c.receiverType!=chrome.cast.ReceiverType.CAST&&b.receiverType==
chrome.cast.ReceiverType.CAST&&(Tl("onSessionEstablished_: manual to cast session change "+b.friendlyName),Cb(this.e),this.e=new Hl(this.f,b),this.e.subscribe("sessionScreen",v(this.Oc,this,this.e)),this.e.Va(null));this.e.ic(a)}}};g.af=function(){return this.e?this.e.hd():null};g.oe=function(a){this.F()||(this.L("Failed to estabilish a session: "+S(a)),a.code!=chrome.cast.ErrorCode.CANCEL&&Vl(this,null))};
g.le=function(a){Tl("Receiver availability updated: "+a);if(!this.F()){var b=Sl(this);this.l=a==chrome.cast.ReceiverAvailability.AVAILABLE;Sl(this)!=b&&this.A("yt-remote-cast2-availability-change",Sl(this))}};
function Rl(a){var b=a.f.ed(),c=a.e&&a.e.f;a=A(b,function(a){c&&ik(a,c.label)&&(c=null);var b=a.uuid?a.uuid:a.id,f=Ul(this,a);f?(f.label=b,f.friendlyName=a.name):(f=new chrome.cast.Receiver(b,a.name),f.receiverType=chrome.cast.ReceiverType.CUSTOM);return f},a);c&&(c.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(c=new chrome.cast.Receiver(c.label,c.friendlyName),c.receiverType=chrome.cast.ReceiverType.CUSTOM),a.push(c));return a}
g.gd=function(){if(!this.F()){var a=Sl(this);this.h=Rl(this);Tl("Updating custom receivers: "+S(this.h));chrome.cast.setCustomReceivers(this.h,t,v(function(){this.L("Failed to set custom receivers.")},this));var b=Sl(this);b!=a&&this.A("yt-remote-cast2-availability-change",b)}};Pl.prototype.setLaunchParams=Pl.prototype.Le;Pl.prototype.setConnectedScreenStatus=Pl.prototype.Ke;Pl.prototype.stopSession=Pl.prototype.stopSession;Pl.prototype.getCastSession=Pl.prototype.af;Pl.prototype.requestSession=Pl.prototype.requestSession;
Pl.prototype.init=Pl.prototype.init;Pl.prototype.dispose=Pl.prototype.dispose;function Wl(a,b,c){Xl()?Zl(a)&&($l(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?am(b):c?(window.__onGCastApiAvailable=function(a,c){bm(b,a,c)},Xb("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js")):uk(function(a,c){bm(b,a,c)})):Yl("Cannot initialize because not running Chrome")}function cm(){Yl("dispose");wk();var a=dm();a&&a.dispose();em=null;p("yt.mdx.remote.cloudview.instance_",null,void 0);fm(!1);Tb(gm);gm.length=0}function hm(){return!!U("yt-remote-cast-installed")}
function im(){var a=U("yt-remote-cast-receiver");return a?a.friendlyName:null}function jm(){Yl("clearCurrentReciever");$h("yt-remote-cast-receiver")}function km(){hm()?dm()?lm()?(Yl("Requesting cast selector."),em.requestSession()):(Yl("Wait for cast API to be ready to request the session."),gm.push(H("yt-remote-cast2-api-ready",km))):mm("requestCastSelector: Cast is not initialized."):mm("requestCastSelector: Cast API is not installed!")}
function nm(a){lm()?dm().setLaunchParams(a):mm("setLaunchParams called before ready.")}function om(a,b){lm()?dm().setConnectedScreenStatus(a,b):mm("setConnectedScreenStatus called before ready.")}var em=null;function Xl(){var a;a=0<=oc.search(/\ (CrMo|Chrome|CriOS)\//);return Ze||a}function bm(a,b,c){b?am(a):(mm("Failed to load cast API: "+c),pm(!1),$l(!1),$h("yt-remote-cast-available"),$h("yt-remote-cast-receiver"),cm(),a(!1))}function qm(a){em.init(!0,a)}
function Zl(a){var b=!1;if(!em){var c=r("yt.mdx.remote.cloudview.instance_");c||(c=new Pl(a),c.subscribe("yt-remote-cast2-availability-change",function(a){T("yt-remote-cast-available",a);I("yt-remote-cast2-availability-change",a)}),c.subscribe("yt-remote-cast2-receiver-selected",function(a){Yl("onReceiverSelected: "+a.friendlyName);T("yt-remote-cast-receiver",a);I("yt-remote-cast2-receiver-selected",a)}),c.subscribe("yt-remote-cast2-receiver-resumed",function(a){Yl("onReceiverResumed: "+a.friendlyName);
T("yt-remote-cast-receiver",a)}),c.subscribe("yt-remote-cast2-session-change",function(a){Yl("onSessionChange: "+ok(a));a||$h("yt-remote-cast-receiver");I("yt-remote-cast2-session-change",a)}),p("yt.mdx.remote.cloudview.instance_",c,void 0),b=!0);em=c}Yl("cloudview.createSingleton_: "+b);return b}function dm(){em||(em=r("yt.mdx.remote.cloudview.instance_"));return em}
function am(a){pm(!0);$l(!1);qm(function(b){b?(fm(!0),I("yt-remote-cast2-api-ready")):(mm("Failed to initialize cast API."),pm(!1),$h("yt-remote-cast-available"),$h("yt-remote-cast-receiver"),cm());a(b)})}function Yl(a){ek("cloudview",a)}function mm(a){ek("cloudview",a)}function pm(a){Yl("setCastInstalled_ "+a);T("yt-remote-cast-installed",a)}function lm(){return!!r("yt.mdx.remote.cloudview.apiReady_")}function fm(a){Yl("setApiReady_ "+a);p("yt.mdx.remote.cloudview.apiReady_",a,void 0)}
function $l(a){p("yt.mdx.remote.cloudview.initializing_",a,void 0)}var gm=[];function rm(){if(!("cast"in window))return!1;var a=window.cast||{};return"ActivityStatus"in a&&"Api"in a&&"LaunchRequest"in a&&"Receiver"in a}function sm(a){ek("CAST",a)}function tm(a){var b=um();b&&b.logMessage&&b.logMessage(a)}function vm(a){if(a.source==window&&a.data&&"CastApi"==a.data.source&&"Hello"==a.data.event)for(;wm.length;)wm.shift()()}
function xm(){if(!r("yt.mdx.remote.castv2_")&&!ym&&(0==Ka.length&&Qa(Ka,jl()),rm())){var a=um();a?(a.removeReceiverListener("YouTube",zm),a.addReceiverListener("YouTube",zm),sm("API initialized in the other binary")):(a=new cast.Api,Am(a),a.addReceiverListener("YouTube",zm),a.setReloadTabRequestHandler&&a.setReloadTabRequestHandler(function(){F(function(){window.location.reload(!0)},1E3)}),ak(tm),sm("API initialized"));ym=!0}}
function Bm(){var a=um();a&&(sm("API disposed"),dk(tm),a.setReloadTabRequestHandler&&a.setReloadTabRequestHandler(t),a.removeReceiverListener("YouTube",zm),Am(null));ym=!1;wm=null;(a=gd(window,"message",vm,!1))&&hd(a)}function Cm(a){var b=Ha(Ka,function(b){return b.id==a.id});0<=b&&(Ka[b]=Ck(a))}
function zm(a){a.length&&sm("Updating receivers: "+S(a));Dm(a);I("yt-remote-cast-device-list-update");z(Em(),function(a){Fm(a.id)});z(a,function(a){if(a.isTabProjected){var c=Gm(a.id);sm("Detected device: "+c.id+" is tab projected. Firing DEVICE_TAB_PROJECTED event.");F(function(){I("yt-remote-cast-device-tab-projected",c.id)},1E3)}})}
function Hm(a,b){sm("Updating "+a+" activity status: "+S(b));var c=Gm(a);c?(b.activityId&&(c.e=b.activityId),c.status="running"==b.status?"RUNNING":"stopped"==b.status?"STOPPED":"error"==b.status?"ERROR":"UNKNOWN","RUNNING"!=c.status&&(c.e=""),Cm(c),I("yt-remote-cast-device-status-update",c)):sm("Device not found")}function Em(){xm();return Ik(Ka)}
function Dm(a){a=A(a,function(a){var c=a.id,d;d=a.name;d=-1!=d.indexOf("&")?"document"in m?va(d):xa(d):d;c={id:c,name:d};if(a=Gm(a.id))c.activityId=a.e,c.status=a.status;return c});Ja();Qa(Ka,a)}function Gm(a){var b=Em();return Ga(b,function(b){return b.id==a})||null}function Fm(a){var b=Gm(a),c=um();c&&b&&b.e&&c.getActivityStatus(b.e,function(b){"error"==b.status&&(b.status="stopped");Hm(a,b)})}
function Im(a){xm();var b=Gm(a),c=um();c&&b&&b.e?(sm("Stopping cast activity"),c.stopActivity(b.e,pa(Hm,a))):sm("Dropping cast activity stop")}function um(){return r("yt.mdx.remote.castapi.api_")}function Am(a){p("yt.mdx.remote.castapi.api_",a,void 0)}var ym=!1,wm=null,Ka=r("yt.mdx.remote.castapi.devices_")||[];p("yt.mdx.remote.castapi.devices_",Ka,void 0);function Jm(a,b){this.action=a;this.params=b||null};function Km(){this.e=w()}new Km;Km.prototype.reset=function(){this.e=w()};Km.prototype.get=function(){return this.e};function Lm(){C.call(this);this.xa=new Of(this);this.Qa=this;this.ea=null}x(Lm,C);Lm.prototype[Kf]=!0;g=Lm.prototype;g.addEventListener=function(a,b,c,d){Vf(this,a,b,c,d)};g.removeEventListener=function(a,b,c,d){ag(this,a,b,c,d)};
function Mm(a,b){var c,d=a.ea;if(d){c=[];for(var e=1;d;d=d.ea)c.push(d),++e}var d=a.Qa,e=b,f=e.type||e;if(u(e))e=new If(e,d);else if(e instanceof If)e.target=e.target||d;else{var h=e,e=new If(f,d);jb(e,h)}var h=!0,k;if(c)for(var l=c.length-1;0<=l;l--)k=e.currentTarget=c[l],h=Nm(k,f,!0,e)&&h;k=e.currentTarget=d;h=Nm(k,f,!0,e)&&h;h=Nm(k,f,!1,e)&&h;if(c)for(l=0;l<c.length;l++)k=e.currentTarget=c[l],h=Nm(k,f,!1,e)&&h}g.B=function(){Lm.G.B.call(this);this.removeAllListeners();this.ea=null};
g.Ab=function(a,b,c,d){return this.xa.add(String(a),b,!1,c,d)};g.kc=function(a,b,c,d){return this.xa.remove(String(a),b,c,d)};g.removeAllListeners=function(a){return this.xa?this.xa.removeAll(a):0};function Nm(a,b,c,d){b=a.xa.e[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,f=0;f<b.length;++f){var h=b[f];if(h&&!h.Xa&&h.rb==c){var k=h.ua,l=h.xb||h.src;h.qb&&Qf(a.xa,h);e=!1!==k.call(l,d)&&e}}return e&&0!=d.Xc};function Om(a,b){this.f=new Jh(a);this.e=b?Hh:Gh}Om.prototype.stringify=function(a){return Ih(this.f,a)};Om.prototype.parse=function(a){return this.e(a)};function Pm(a,b){Lm.call(this);this.e=a||1;this.f=b||m;this.h=v(this.Oe,this);this.k=w()}x(Pm,Lm);g=Pm.prototype;g.enabled=!1;g.ba=null;function Qm(a,b){a.e=b;a.ba&&a.enabled?(a.stop(),a.start()):a.ba&&a.stop()}g.Oe=function(){if(this.enabled){var a=w()-this.k;0<a&&a<.8*this.e?this.ba=this.f.setTimeout(this.h,this.e-a):(this.ba&&(this.f.clearTimeout(this.ba),this.ba=null),Mm(this,"tick"),this.enabled&&(this.ba=this.f.setTimeout(this.h,this.e),this.k=w()))}};
g.start=function(){this.enabled=!0;this.ba||(this.ba=this.f.setTimeout(this.h,this.e),this.k=w())};g.stop=function(){this.enabled=!1;this.ba&&(this.f.clearTimeout(this.ba),this.ba=null)};g.B=function(){Pm.G.B.call(this);this.stop();delete this.f};function Rm(a,b,c){if(ha(a))c&&(a=v(a,c));else if(a&&"function"==typeof a.handleEvent)a=v(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<b?-1:m.setTimeout(a,b||0)};function Sm(a,b,c){C.call(this);this.k=a;this.h=b;this.f=c;this.e=v(this.qe,this)}x(Sm,C);g=Sm.prototype;g.Jb=!1;g.Ta=null;g.stop=function(){this.Ta&&(m.clearTimeout(this.Ta),this.Ta=null,this.Jb=!1)};g.B=function(){Sm.G.B.call(this);this.stop()};g.qe=function(){this.Ta=null;this.Jb&&(this.Jb=!1,Tm(this))};function Tm(a){a.Ta=Rm(a.e,a.h);a.k.call(a.f)};function Um(a){C.call(this);this.f=a;this.e={}}x(Um,C);var Vm=[];g=Um.prototype;g.Ab=function(a,b,c,d){ea(b)||(b&&(Vm[0]=b.toString()),b=Vm);for(var e=0;e<b.length;e++){var f=Vf(a,b[e],c||this.handleEvent,d||!1,this.f||this);if(!f)break;this.e[f.key]=f}return this};
g.kc=function(a,b,c,d,e){if(ea(b))for(var f=0;f<b.length;f++)this.kc(a,b[f],c,d,e);else c=c||this.handleEvent,e=e||this.f||this,c=Wf(c),d=!!d,b=a&&a[Kf]?Rf(a.xa,String(b),c,d,e):a?(a=Xf(a))?Rf(a,b,c,d,e):null:null,b&&(bg(b),delete this.e[b.key]);return this};g.removeAll=function(){Wa(this.e,bg);this.e={}};g.B=function(){Um.G.B.call(this);this.removeAll()};g.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};function Wm(){}Wm.prototype.e=null;function Xm(a){var b;(b=a.e)||(b={},Ym(a)&&(b[0]=!0,b[1]=!0),b=a.e=b);return b};var Zm;function $m(){}x($m,Wm);function an(a){return(a=Ym(a))?new ActiveXObject(a):new XMLHttpRequest}function Ym(a){if(!a.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;c<b.length;c++){var d=b[c];try{return new ActiveXObject(d),a.f=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.f}Zm=new $m;function bn(a,b,c,d,e){this.e=a;this.h=c;this.C=d;this.o=e||1;this.j=45E3;this.k=new Um(this);this.f=new Pm;Qm(this.f,250)}g=bn.prototype;g.Ja=null;g.ja=!1;g.$a=null;g.mc=null;g.jb=null;g.Za=null;g.va=null;g.za=null;g.Ma=null;g.M=null;g.lb=0;g.ka=null;g.Mb=null;g.Ka=null;g.hb=-1;g.Yc=!0;g.Ea=!1;g.ac=0;g.Gb=null;var cn={},dn={};g=bn.prototype;g.setTimeout=function(a){this.j=a};function en(a,b,c){a.Za=1;a.va=Tg(b.clone());a.Ma=c;a.l=!0;fn(a,null)}
function gn(a,b,c,d,e){a.Za=1;a.va=Tg(b.clone());a.Ma=null;a.l=c;e&&(a.Yc=!1);fn(a,d)}function fn(a,b){a.jb=w();hn(a);a.za=a.va.clone();Rg(a.za,"t",a.o);a.lb=0;a.M=a.e.Tb(a.e.kb()?b:null);0<a.ac&&(a.Gb=new Sm(v(a.cd,a,a.M),a.ac));a.k.Ab(a.M,"readystatechange",a.ze);var c=a.Ja?gb(a.Ja):{};a.Ma?(a.Mb="POST",c["Content-Type"]="application/x-www-form-urlencoded",a.M.send(a.za,a.Mb,a.Ma,c)):(a.Mb="GET",a.Yc&&!yc&&(c.Connection="close"),a.M.send(a.za,a.Mb,null,c));a.e.ia(1)}
g.ze=function(a){a=a.target;var b=this.Gb;b&&3==jn(a)?b.Ta?b.Jb=!0:Tm(b):this.cd(a)};
g.cd=function(a){try{if(a==this.M)a:{var b=jn(this.M),c=this.M.k,d=this.M.getStatus();if(K&&!Gc(10)||yc&&!Fc("420+")){if(4>b)break a}else if(3>b||3==b&&!wc&&!kn(this.M))break a;this.Ea||4!=b||7==c||(8==c||0>=d?this.e.ia(3):this.e.ia(2));ln(this);var e=this.M.getStatus();this.hb=e;var f=kn(this.M);(this.ja=200==e)?(4==b&&mn(this),this.l?(nn(this,b,f),wc&&this.ja&&3==b&&(this.k.Ab(this.f,"tick",this.ye),this.f.start())):on(this,f),this.ja&&!this.Ea&&(4==b?this.e.Cb(this):(this.ja=!1,hn(this)))):(this.Ka=
400==e&&0<f.indexOf("Unknown SID")?3:0,X(),mn(this),pn(this))}}catch(h){this.M&&kn(this.M)}finally{}};function nn(a,b,c){for(var d=!0;!a.Ea&&a.lb<c.length;){var e=qn(a,c);if(e==dn){4==b&&(a.Ka=4,X(),d=!1);break}else if(e==cn){a.Ka=4;X();d=!1;break}else on(a,e)}4==b&&0==c.length&&(a.Ka=1,X(),d=!1);a.ja=a.ja&&d;d||(mn(a),pn(a))}g.ye=function(){var a=jn(this.M),b=kn(this.M);this.lb<b.length&&(ln(this),nn(this,a,b),this.ja&&4!=a&&hn(this))};
function qn(a,b){var c=a.lb,d=b.indexOf("\n",c);if(-1==d)return dn;c=Number(b.substring(c,d));if(isNaN(c))return cn;d+=1;if(d+c>b.length)return dn;var e=b.substr(d,c);a.lb=d+c;return e}
function rn(a,b){a.jb=w();hn(a);var c=b?window.location.hostname:"";a.za=a.va.clone();M(a.za,"DOMAIN",c);M(a.za,"t",a.o);try{a.ka=new ActiveXObject("htmlfile")}catch(d){mn(a);a.Ka=7;X();pn(a);return}var e="<html><body>";b&&(e+='<script>document.domain="'+c+'"\x3c/script>');e+="</body></html>";a.ka.open();a.ka.write(e);a.ka.close();a.ka.parentWindow.m=v(a.te,a);a.ka.parentWindow.d=v(a.Rc,a,!0);a.ka.parentWindow.rpcClose=v(a.Rc,a,!1);c=a.ka.createElement("DIV");a.ka.parentWindow.document.body.appendChild(c);
c.innerHTML='<iframe src="'+a.za+'"></iframe>';a.e.ia(1)}g.te=function(a){sn(v(this.se,this,a),0)};g.se=function(a){this.Ea||(ln(this),on(this,a),hn(this))};g.Rc=function(a){sn(v(this.re,this,a),0)};g.re=function(a){this.Ea||(mn(this),this.ja=a,this.e.Cb(this),this.e.ia(4))};g.cancel=function(){this.Ea=!0;mn(this)};function hn(a){a.mc=w()+a.j;tn(a,a.j)}function tn(a,b){if(null!=a.$a)throw Error("WatchDog timer not null");a.$a=sn(v(a.ve,a),b)}function ln(a){a.$a&&(m.clearTimeout(a.$a),a.$a=null)}
g.ve=function(){this.$a=null;var a=w();0<=a-this.mc?(2!=this.Za&&this.e.ia(3),mn(this),this.Ka=2,X(),pn(this)):tn(this,this.mc-a)};function pn(a){a.e.Dc()||a.Ea||a.e.Cb(a)}function mn(a){ln(a);Cb(a.Gb);a.Gb=null;a.f.stop();a.k.removeAll();if(a.M){var b=a.M;a.M=null;un(b);b.dispose()}a.ka&&(a.ka=null)}function on(a,b){try{a.e.Mc(a,b),a.e.ia(4)}catch(c){}};function vn(a,b,c,d,e){if(0==d)c(!1);else{var f=e||0;d--;wn(a,b,function(e){e?c(!0):m.setTimeout(function(){vn(a,b,c,d,f)},f)})}}function wn(a,b,c){var d=new Image;d.onload=function(){try{xn(d),c(!0)}catch(a){}};d.onerror=function(){try{xn(d),c(!1)}catch(a){}};d.onabort=function(){try{xn(d),c(!1)}catch(a){}};d.ontimeout=function(){try{xn(d),c(!1)}catch(a){}};m.setTimeout(function(){if(d.ontimeout)d.ontimeout()},b);d.src=a}
function xn(a){a.onload=null;a.onerror=null;a.onabort=null;a.ontimeout=null};function yn(a){this.e=a;this.f=new Om(null,!0)}g=yn.prototype;g.Zb=null;g.$=null;g.Hb=!1;g.ad=null;g.ub=null;g.dc=null;g.$b=null;g.ca=null;g.ta=-1;g.gb=null;g.ab=null;function zn(a){var b=An(a.e,a.ab,"/mail/images/cleardot.gif");Tg(b);vn(b.toString(),5E3,v(a.zd,a),3,2E3);a.ia(1)}g.zd=function(a){if(a)this.ca=2,Bn(this);else{X();var b=this.e;b.ga=b.wa.ta;Cn(b,9)}a&&this.ia(2)};
function Bn(a){var b=a.e.H;if(null!=b)X(),b?(X(),Dn(a.e,a,!1)):(X(),Dn(a.e,a,!0));else if(a.$=new bn(a,0,void 0,void 0,void 0),a.$.Ja=a.Zb,b=a.e,b=An(b,b.kb()?a.gb:null,a.$b),X(),!K||Gc(10))Rg(b,"TYPE","xmlhttp"),gn(a.$,b,!1,a.gb,!1);else{Rg(b,"TYPE","html");var c=a.$;a=Boolean(a.gb);c.Za=3;c.va=Tg(b.clone());rn(c,a)}}g.Tb=function(a){return this.e.Tb(a)};g.Dc=function(){return!1};
g.Mc=function(a,b){this.ta=a.hb;if(0==this.ca)if(b){try{var c=this.f.parse(b)}catch(d){c=this.e;c.ga=this.ta;Cn(c,2);return}this.gb=c[0];this.ab=c[1]}else c=this.e,c.ga=this.ta,Cn(c,2);else if(2==this.ca)if(this.Hb)X(),this.dc=w();else if("11111"==b){if(X(),this.Hb=!0,this.ub=w(),c=this.ub-this.ad,!K||Gc(10)||500>c)this.ta=200,this.$.cancel(),X(),Dn(this.e,this,!0)}else X(),this.ub=this.dc=w(),this.Hb=!1};
g.Cb=function(){this.ta=this.$.hb;if(this.$.ja)0==this.ca?this.ab?(this.ca=1,zn(this)):(this.ca=2,Bn(this)):2==this.ca&&(a=!1,(a=!K||Gc(10)?this.Hb:200>this.dc-this.ub?!1:!0)?(X(),Dn(this.e,this,!0)):(X(),Dn(this.e,this,!1)));else{0==this.ca?X():2==this.ca&&X();var a=this.e;a.ga=this.ta;Cn(a,2)}};g.kb=function(){return this.e.kb()};g.isActive=function(){return this.e.isActive()};g.ia=function(a){this.e.ia(a)};function En(a){Lm.call(this);this.headers=new Qd;this.Q=a||null;this.f=!1;this.N=this.e=null;this.oa=this.C="";this.k=0;this.j="";this.h=this.da=this.o=this.S=!1;this.l=0;this.H=null;this.Ca="";this.I=this.Da=!1}x(En,Lm);var Fn=/^https?$/i,Gn=["POST","PUT"];g=En.prototype;
g.send=function(a,b,c,d){if(this.e)throw Error("[goog.net.XhrIo] Object is active with another request="+this.C+"; newUri="+a);b=b?b.toUpperCase():"GET";this.C=a;this.j="";this.k=0;this.oa=b;this.S=!1;this.f=!0;this.e=this.Q?an(this.Q):an(Zm);this.N=this.Q?Xm(this.Q):Xm(Zm);this.e.onreadystatechange=v(this.Lc,this);try{ce(Hn(this,"Opening Xhr")),this.da=!0,this.e.open(b,String(a),!0),this.da=!1}catch(e){ce(Hn(this,"Error opening Xhr: "+e.message));In(this,e);return}a=c||"";var f=this.headers.clone();
d&&Yd(d,function(a,b){Rd(f,b,a)});d=Ga(f.sa(),Jn);c=m.FormData&&a instanceof m.FormData;!Ia(Gn,b)||d||c||Rd(f,"Content-Type","application/x-www-form-urlencoded;charset=utf-8");f.forEach(function(a,b){this.e.setRequestHeader(b,a)},this);this.Ca&&(this.e.responseType=this.Ca);"withCredentials"in this.e&&(this.e.withCredentials=this.Da);try{Kn(this),0<this.l&&(this.I=Ln(this.e),ce(Hn(this,"Will abort after "+this.l+"ms if incomplete, xhr2 "+this.I)),this.I?(this.e.timeout=this.l,this.e.ontimeout=v(this.Cc,
this)):this.H=Rm(this.Cc,this.l,this)),ce(Hn(this,"Sending request")),this.o=!0,this.e.send(a),this.o=!1}catch(h){ce(Hn(this,"Send error: "+h.message)),In(this,h)}};function Ln(a){return K&&Fc(9)&&ga(a.timeout)&&n(a.ontimeout)}function Jn(a){return"content-type"==a.toLowerCase()}g.Cc=function(){"undefined"!=typeof ba&&this.e&&(this.j="Timed out after "+this.l+"ms, aborting",this.k=8,Hn(this,this.j),Mm(this,"timeout"),un(this,8))};
function In(a,b){a.f=!1;a.e&&(a.h=!0,a.e.abort(),a.h=!1);a.j=b;a.k=5;Mn(a);Nn(a)}function Mn(a){a.S||(a.S=!0,Mm(a,"complete"),Mm(a,"error"))}function un(a,b){a.e&&a.f&&(Hn(a,"Aborting"),a.f=!1,a.h=!0,a.e.abort(),a.h=!1,a.k=b||7,Mm(a,"complete"),Mm(a,"abort"),Nn(a))}g.B=function(){this.e&&(this.f&&(this.f=!1,this.h=!0,this.e.abort(),this.h=!1),Nn(this,!0));En.G.B.call(this)};g.Lc=function(){this.F()||(this.da||this.o||this.h?On(this):this.ie())};g.ie=function(){On(this)};
function On(a){if(a.f&&"undefined"!=typeof ba)if(a.N[1]&&4==jn(a)&&2==a.getStatus())Hn(a,"Local request error detected and ignored");else if(a.o&&4==jn(a))Rm(a.Lc,0,a);else if(Mm(a,"readystatechange"),4==jn(a)){Hn(a,"Request complete");a.f=!1;try{var b=a.getStatus(),c;a:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:c=!0;break a;default:c=!1}var d;if(!(d=c)){var e;if(e=0===b){var f=td(String(a.C))[1]||null;if(!f&&self.location)var h=self.location.protocol,f=h.substr(0,h.length-
1);e=!Fn.test(f?f.toLowerCase():"")}d=e}if(d)Mm(a,"complete"),Mm(a,"success");else{a.k=6;var k;try{k=2<jn(a)?a.e.statusText:""}catch(l){k=""}a.j=k+" ["+a.getStatus()+"]";Mn(a)}}finally{Nn(a)}}}function Nn(a,b){if(a.e){Kn(a);var c=a.e,d=a.N[0]?t:null;a.e=null;a.N=null;b||Mm(a,"ready");try{c.onreadystatechange=d}catch(e){}}}function Kn(a){a.e&&a.I&&(a.e.ontimeout=null);ga(a.H)&&(m.clearTimeout(a.H),a.H=null)}g.isActive=function(){return!!this.e};function jn(a){return a.e?a.e.readyState:0}
g.getStatus=function(){try{return 2<jn(this)?this.e.status:-1}catch(a){return-1}};function kn(a){try{return a.e?a.e.responseText:""}catch(b){return""}}function Hn(a,b){return b+" ["+a.oa+" "+a.C+" "+a.getStatus()+"]"};function Pn(a,b,c){this.o=a||null;this.e=1;this.f=[];this.k=[];this.j=new Om(null,!0);this.C=b||null;this.H=null!=c?c:null}function Qn(a,b){this.e=a;this.map=b;this.context=null}g=Pn.prototype;g.eb=null;g.T=null;g.K=null;g.Yb=null;g.vb=null;g.uc=null;g.wb=null;g.ib=0;g.Qd=0;g.P=null;g.ya=null;g.qa=null;g.Ga=null;g.wa=null;g.Lb=null;g.Ua=-1;g.Fc=-1;g.ga=-1;g.fb=0;g.Sa=0;g.Fa=8;var Rn=new Lm;function Sn(a){If.call(this,"statevent",a)}x(Sn,If);
function Tn(a,b){If.call(this,"timingevent",a);this.size=b}x(Tn,If);function Un(a){If.call(this,"serverreachability",a)}x(Un,If);function Vn(a,b,c,d,e,f){X();a.Yb=c;a.eb=d||{};e&&n(f)&&(a.eb.OSID=e,a.eb.OAID=f);a.wa=new yn(a);a.wa.Zb=null;a.wa.f=a.j;a=a.wa;a.$b=b;b=An(a.e,null,a.$b);X();a.ad=w();c=a.e.C;null!=c?(a.gb=c[0],a.ab=c[1],a.ab?(a.ca=1,zn(a)):(a.ca=2,Bn(a))):(Rg(b,"MODE","init"),a.$=new bn(a,0,void 0,void 0,void 0),a.$.Ja=a.Zb,gn(a.$,b,!1,null,!0),a.ca=0)}
function Wn(a){Xn(a);if(3==a.e){var b=a.ib++,c=a.vb.clone();M(c,"SID",a.h);M(c,"RID",b);M(c,"TYPE","terminate");Yn(a,c);b=new bn(a,0,a.h,b,void 0);b.Za=2;b.va=Tg(c.clone());(new Image).src=b.va;b.jb=w();hn(b)}Zn(a)}function Xn(a){if(a.wa){var b=a.wa;b.$&&(b.$.cancel(),b.$=null);b.ta=-1;a.wa=null}a.K&&(a.K.cancel(),a.K=null);a.qa&&(m.clearTimeout(a.qa),a.qa=null);$n(a);a.T&&(a.T.cancel(),a.T=null);a.ya&&(m.clearTimeout(a.ya),a.ya=null)}
function ao(a,b){if(0==a.e)throw Error("Invalid operation: sending map when state is closed");a.f.push(new Qn(a.Qd++,b));2!=a.e&&3!=a.e||bo(a)}g=Pn.prototype;g.Dc=function(){return 0==this.e};function bo(a){a.T||a.ya||(a.ya=sn(v(a.Qc,a),0),a.fb=0)}g.Qc=function(a){this.ya=null;co(this,a)};
function co(a,b){if(1==a.e){if(!b){a.ib=Math.floor(1E5*Math.random());var c=a.ib++,d=new bn(a,0,"",c,void 0);d.Ja=null;var e=eo(a),f=a.vb.clone();M(f,"RID",c);a.o&&M(f,"CVER",a.o);Yn(a,f);en(d,f,e);a.T=d;a.e=2}}else 3==a.e&&(b?fo(a,b):0!=a.f.length&&(a.T||fo(a)))}
function fo(a,b){var c,d;b?6<a.Fa?(a.f=a.k.concat(a.f),a.k.length=0,c=a.ib-1,d=eo(a)):(c=b.C,d=b.Ma):(c=a.ib++,d=eo(a));var e=a.vb.clone();M(e,"SID",a.h);M(e,"RID",c);M(e,"AID",a.Ua);Yn(a,e);c=new bn(a,0,a.h,c,a.fb+1);c.Ja=null;c.setTimeout(Math.round(1E4)+Math.round(1E4*Math.random()));a.T=c;en(c,e,d)}function Yn(a,b){if(a.P){var c=a.P.Ac(a);c&&Wa(c,function(a,c){M(b,c,a)})}}
function eo(a){var b=Math.min(a.f.length,1E3),c=["count="+b],d;6<a.Fa&&0<b?(d=a.f[0].e,c.push("ofs="+d)):d=0;for(var e=0;e<b;e++){var f=a.f[e].e,h=a.f[e].map,f=6>=a.Fa?e:f-d;try{Yd(h,function(a,b){c.push("req"+f+"_"+b+"="+encodeURIComponent(a))})}catch(k){c.push("req"+f+"_type="+encodeURIComponent("_badmap"))}}a.k=a.k.concat(a.f.splice(0,b));return c.join("&")}function go(a){a.K||a.qa||(a.l=1,a.qa=sn(v(a.Pc,a),0),a.Sa=0)}
function ho(a){if(a.K||a.qa||3<=a.Sa)return!1;a.l++;a.qa=sn(v(a.Pc,a),io(a,a.Sa));a.Sa++;return!0}g.Pc=function(){this.qa=null;this.K=new bn(this,0,this.h,"rpc",this.l);this.K.Ja=null;this.K.ac=0;var a=this.uc.clone();M(a,"RID","rpc");M(a,"SID",this.h);M(a,"CI",this.Lb?"0":"1");M(a,"AID",this.Ua);Yn(this,a);if(!K||Gc(10))M(a,"TYPE","xmlhttp"),gn(this.K,a,!0,this.wb,!1);else{M(a,"TYPE","html");var b=this.K,c=Boolean(this.wb);b.Za=3;b.va=Tg(a.clone());rn(b,c)}};
function Dn(a,b,c){a.Lb=c;a.ga=b.ta;a.Dd(1,0);a.vb=An(a,null,a.Yb);bo(a)}
g.Mc=function(a,b){if(0!=this.e&&(this.K==a||this.T==a))if(this.ga=a.hb,this.T==a&&3==this.e)if(7<this.Fa){var c;try{c=this.j.parse(b)}catch(d){c=null}if(ea(c)&&3==c.length)if(0==c[0])a:{if(!this.qa){if(this.K)if(this.K.jb+3E3<this.T.jb)$n(this),this.K.cancel(),this.K=null;else break a;ho(this);X()}}else this.Fc=c[1],0<this.Fc-this.Ua&&37500>c[2]&&this.Lb&&0==this.Sa&&!this.Ga&&(this.Ga=sn(v(this.Rd,this),6E3));else Cn(this,11)}else"y2f%"!=b&&Cn(this,11);else if(this.K==a&&$n(this),!/^[\s\xa0]*$/.test(b)){c=
this.j.parse(b);ea(c);for(var e=0;e<c.length;e++){var f=c[e];this.Ua=f[0];f=f[1];2==this.e?"c"==f[0]?(this.h=f[1],this.wb=f[2],f=f[3],null!=f?this.Fa=f:this.Fa=6,this.e=3,this.P&&this.P.yc(this),this.uc=An(this,this.kb()?this.wb:null,this.Yb),go(this)):"stop"==f[0]&&Cn(this,7):3==this.e&&("stop"==f[0]?Cn(this,7):"noop"!=f[0]&&this.P&&this.P.xc(this,f),this.Sa=0)}}};g.Rd=function(){null!=this.Ga&&(this.Ga=null,this.K.cancel(),this.K=null,ho(this),X())};
function $n(a){null!=a.Ga&&(m.clearTimeout(a.Ga),a.Ga=null)}
g.Cb=function(a){var b;if(this.K==a)$n(this),this.K=null,b=2;else if(this.T==a)this.T=null,b=1;else return;this.ga=a.hb;if(0!=this.e)if(a.ja)1==b?(w(),Mm(Rn,new Tn(Rn,a.Ma?a.Ma.length:0)),bo(this),this.k.length=0):go(this);else{var c=a.Ka,d;if(!(d=3==c||7==c||0==c&&0<this.ga)){if(d=1==b)this.T||this.ya||1==this.e||2<=this.fb?d=!1:(this.ya=sn(v(this.Qc,this,a),io(this,this.fb)),this.fb++,d=!0);d=!(d||2==b&&ho(this))}if(d)switch(c){case 1:Cn(this,5);break;case 4:Cn(this,10);break;case 3:Cn(this,6);
break;case 7:Cn(this,12);break;default:Cn(this,2)}}};function io(a,b){var c=5E3+Math.floor(1E4*Math.random());a.isActive()||(c*=2);return c*b}g.Dd=function(a){if(!Ia(arguments,this.e))throw Error("Unexpected channel state: "+this.e);};function Cn(a,b){if(2==b||9==b){var c=null;a.P&&(c=null);var d=v(a.Ne,a);c||(c=new Ag("//www.google.com/images/cleardot.gif"),Tg(c));wn(c.toString(),1E4,d)}else X();jo(a,b)}g.Ne=function(a){a?X():(X(),jo(this,8))};
function jo(a,b){a.e=0;a.P&&a.P.wc(a,b);Zn(a);Xn(a)}function Zn(a){a.e=0;a.ga=-1;if(a.P)if(0==a.k.length&&0==a.f.length)a.P.Rb(a);else{var b=Pa(a.k),c=Pa(a.f);a.k.length=0;a.f.length=0;a.P.Rb(a,b,c)}}function An(a,b,c){var d=Ug(c);if(""!=d.ra)b&&Cg(d,b+"."+d.ra),Dg(d,d.La);else var e=window.location,d=Vg(e.protocol,b?b+"."+e.hostname:e.hostname,e.port,c);a.eb&&Wa(a.eb,function(a,b){M(d,b,a)});M(d,"VER",a.Fa);Yn(a,d);return d}
g.Tb=function(a){if(a)throw Error("Can't create secondary domain capable XhrIo object.");a=new En;a.Da=!1;return a};g.isActive=function(){return!!this.P&&this.P.isActive(this)};function sn(a,b){if(!ha(a))throw Error("Fn must not be null and must be a function");return m.setTimeout(function(){a()},b)}g.ia=function(){Mm(Rn,new Un(Rn))};function X(){Mm(Rn,new Sn(Rn))}g.kb=function(){return!(!K||Gc(10))};function ko(){}g=ko.prototype;g.yc=function(){};g.xc=function(){};g.wc=function(){};g.Rb=function(){};
g.Ac=function(){return{}};g.isActive=function(){return!0};function lo(a,b){Pm.call(this);if(ha(a))b&&(a=v(a,b));else if(a&&ha(a.handleEvent))a=v(a.handleEvent,a);else throw Error("Invalid listener argument");this.o=a;Vf(this,"tick",v(this.l,this));this.stop();Qm(this,5E3+2E4*Math.random())}x(lo,Pm);lo.prototype.j=0;lo.prototype.l=function(){if(500<this.e){var a=this.e;24E4>2*a&&(a*=2);Qm(this,a)}this.o()};lo.prototype.start=function(){lo.G.start.call(this);this.j=w()+this.e};lo.prototype.stop=function(){this.j=0;lo.G.stop.call(this)};function mo(a,b){this.ma=a;this.k=b;this.h=new D;this.f=new lo(this.Ue,this);this.e=null;this.I=!1;this.l=null;this.H="";this.C=this.j=0;this.o=[]}x(mo,ko);g=mo.prototype;g.subscribe=function(a,b,c){return this.h.subscribe(a,b,c)};g.Na=function(a,b,c){return this.h.Na(a,b,c)};g.la=function(a){return this.h.la(a)};g.A=function(a,b){return this.h.A.apply(this.h,arguments)};g.dispose=function(){this.I||(this.I=!0,this.h.clear(),no(this),Cb(this.h))};g.F=function(){return this.I};
function oo(a){return{firstTestResults:[""],secondTestResults:!a.e.Lb,sessionId:a.e.h,arrayId:a.e.Ua}}function po(a,b,c,d){if(!a.e||2!=a.e.e){a.H="";a.f.stop();a.l=b||null;a.j=c||0;b=a.ma+"/test";c=a.ma+"/bind";var e=new Pn("1",d?d.firstTestResults:null,d?d.secondTestResults:null),f=a.e;f&&(f.P=null);e.P=a;a.e=e;f?Vn(a.e,b,c,a.k,f.h,f.Ua):d?Vn(a.e,b,c,a.k,d.sessionId,d.arrayId):Vn(a.e,b,c,a.k)}}function no(a,b){a.C=b||0;a.f.stop();a.e&&(3==a.e.e&&co(a.e),Wn(a.e));a.C=0}
g.yc=function(){var a=this.f;a.stop();Qm(a,5E3+2E4*Math.random());this.l=null;this.j=0;if(this.o.length){a=this.o;this.o=[];for(var b=0,c=a.length;b<c;++b)ao(this.e,a[b])}this.A("handlerOpened")};g.wc=function(a,b){var c=2==b&&401==this.e.ga;if(4!=b&&!c){if(6==b||410==this.e.ga)c=this.f,c.stop(),Qm(c,500);this.f.start()}this.A("handlerError",b)};g.Rb=function(a,b,c){if(!this.f.enabled)this.A("handlerClosed");else if(c)for(a=0,b=c.length;a<b;++a)this.o.push(c[a].map)};
g.Ac=function(){var a={v:2};this.H&&(a.gsessionid=this.H);0!=this.j&&(a.ui=""+this.j);0!=this.C&&(a.ui=""+this.C);this.l&&jb(a,this.l);return a};g.xc=function(a,b){if("S"==b[0])this.H=b[1];else if("gracefulReconnect"==b[0]){var c=this.f;c.stop();Qm(c,500);this.f.start();Wn(this.e)}else this.A("handlerMessage",new Jm(b[0],b[1]))};function qo(a,b){(a.k.loungeIdToken=b)||a.f.stop()}g.Ue=function(){this.f.stop();var a=this.e,b=0;a.K&&b++;a.T&&b++;0!=b?this.f.start():po(this,this.l,this.j)};function ro(a){this.reset(a)}function so(a,b){if(a.f)throw Error(b+" is not allowed in V3.");}function to(a){a.volume=-1;a.l=!1;a.k=null;a.e=-1;a.h=null;a.j=0;a.o=w()}g=ro.prototype;g.reset=function(a){this.videoIds=[];this.f="";this.index=-1;this.videoId="";to(this);a&&(this.videoIds=a.videoIds,this.index=a.index,this.f=a.listId,this.videoId=a.videoId,this.e=a.playerState,this.h=a.errorReason,this.volume=a.volume,this.l=a.muted,this.k=a.trackData,this.j=a.playerTime,this.o=a.playerTimeAt)};
function uo(a){return a.f?a.videoId:a.videoIds[a.index]}function vo(a){switch(a.e){case 1:return(w()-a.o)/1E3+a.j;case -1E3:return 0}return a.j}g.setVideoId=function(a){so(this,"setVideoId");var b=this.index;this.index=Ca(this.videoIds,a);b!=this.index&&to(this);return-1!=b};function wo(a,b,c){so(a,"setPlaylist");c=c||uo(a);Ta(a.videoIds,b)&&c==uo(a)||(a.videoIds=Pa(b),a.setVideoId(c))}g.add=function(a){so(this,"add");return a&&!Ia(this.videoIds,a)?(this.videoIds.push(a),!0):!1};
g.remove=function(a){so(this,"remove");var b=uo(this);return Ma(this.videoIds,a)?(this.index=Ca(this.videoIds,b),!0):!1};function xo(a){var b={};b.videoIds=Pa(a.videoIds);b.index=a.index;b.listId=a.f;b.videoId=a.videoId;b.playerState=a.e;b.errorReason=a.h;b.volume=a.volume;b.muted=a.l;b.trackData=hb(a.k);b.playerTime=a.j;b.playerTimeAt=a.o;return b}g.clone=function(){return new ro(xo(this))};function Y(a,b,c){V.call(this);this.ea=a;this.C=[];this.C.push(L(window,"beforeunload",v(this.Kd,this)));this.f=[];this.n=new ro;3==c["mdx-version"]&&(this.n.f="RQ"+b.token);this.H=b.id;this.e=yo(this,c);this.e.subscribe("handlerOpened",this.Wd,this);this.e.subscribe("handlerClosed",this.Sd,this);this.e.subscribe("handlerError",this.Td,this);this.n.f?this.e.subscribe("handlerMessage",this.Ud,this):this.e.subscribe("handlerMessage",this.Vd,this);qo(this.e,b.token);this.subscribe("remoteQueueChange",
function(){var a=this.n.videoId;Yk()&&T("yt-remote-session-video-id",a)},this)}x(Y,V);g=Y.prototype;g.bb=NaN;g.gc=!1;g.Ib=NaN;g.fc=NaN;g.sb=NaN;g.yb=NaN;
function zo(a,b){var c=Ao();if(c){if(a.n.f){var d=c.listId,e=c.videoId,f=c.index,c=c.currentTime||0;5>=c&&(c=0);h={videoId:e,currentTime:c};d&&(h.listId=d);n(f)&&(h.currentIndex=f);d&&(a.n.f=d);a.n.videoId=e;a.n.index=f||0}else{var e=c.videoIds[c.index],c=c.currentTime||0;5>=c&&(c=0);var h={videoIds:e,videoId:e,currentTime:c};a.n.videoIds=[e];a.n.index=0}a.n.state=3;d=a.n;d.j=c;d.o=w();a.D("Connecting with setPlaylist and params: "+S(h));po(a.e,{method:"setPlaylist",params:S(h)},b,bl())}else a.D("Connecting without params"),
po(a.e,{},b,bl());Bo(a)}g.dispose=function(){this.F()||(this.A("beforeDispose"),Co(this,3));Y.G.dispose.call(this)};g.B=function(){Do(this);Eo(this);Fo(this);G(this.sb);this.sb=NaN;G(this.yb);this.yb=NaN;this.j=null;hd(this.C);this.C.length=0;this.e.dispose();Y.G.B.call(this);this.f=this.n=this.e=null};g.D=function(a){ek("conn",a)};g.Kd=function(){this.h(2)};function yo(a,b){return new mo(zk(a.ea,"/bc",void 0,!1),b)}function Co(a,b){a.A("proxyStateChange",b)}
function Bo(a){a.bb=F(v(function(){this.D("Connecting timeout");this.h(1)},a),2E4)}function Do(a){G(a.bb);a.bb=NaN}function Fo(a){G(a.Ib);a.Ib=NaN}function Go(a){Eo(a);a.fc=F(v(function(){Ho(this,"getNowPlaying")},a),2E4)}function Eo(a){G(a.fc);a.fc=NaN}function Io(a){var b=a.e;return!!b.e&&3==b.e.e&&isNaN(a.bb)}g.Wd=function(){this.D("Channel opened");this.gc&&(this.gc=!1,Fo(this),this.Ib=F(v(function(){this.D("Timing out waiting for a screen.");this.h(1)},this),15E3));kl(oo(this.e),this.H)};
g.Sd=function(){this.D("Channel closed");isNaN(this.bb)?ll(!0):ll();this.dispose()};g.Td=function(a){ll();isNaN(this.l())?(this.D("Channel error: "+a+" without reconnection"),this.dispose()):(this.gc=!0,this.D("Channel error: "+a+" with reconnection in "+this.l()+" ms"),Co(this,2))};function Jo(a,b){b&&(Do(a),Fo(a));b==Io(a)?b&&(Co(a,1),Ho(a,"getSubtitlesTrack")):b?(a.o()&&a.n.reset(),Co(a,1),Ho(a,"getNowPlaying"),Ko(a)):a.h(1)}
function Lo(a,b){var c=b.params.videoId;delete b.params.videoId;c==a.n.videoId&&(eb(b.params)?a.n.k=null:a.n.k=b.params,a.A("remotePlayerChange"))}function Mo(a,b){var c=b.params.videoId||b.params.video_id,d=parseInt(b.params.currentIndex,10);a.n.f=b.params.listId||a.n.f;var e=a.n,f=e.videoId;e.videoId=c;e.index=d;c!=f&&to(e);a.A("remoteQueueChange")}function No(a,b){b.params=b.params||{};Mo(a,b);Oo(a,b)}
function Oo(a,b){var c=parseInt(b.params.currentTime||b.params.current_time,10),d=a.n;d.j=isNaN(c)?0:c;d.o=w();c=parseInt(b.params.state,10);c=isNaN(c)?-1:c;-1==c&&-1E3==a.n.e&&(c=-1E3);a.n.e=c;d=null;-1E3==c&&(d=a.n.h||"unknown",n(b.params.currentError)&&(d=Gh(b.params.currentError).reason||d));a.n.h=d;1==a.n.e?Go(a):Eo(a);a.A("remotePlayerChange")}function Po(a,b){var c="true"==b.params.muted;a.n.volume=parseInt(b.params.volume,10);a.n.l=c;a.A("remotePlayerChange")}
g.Ud=function(a){a.params?this.D("Received: action="+a.action+", params="+S(a.params)):this.D("Received: action="+a.action+" {}");switch(a.action){case "loungeStatus":a=Gh(a.params.devices);this.f=A(a,function(a){return new Tk(a)});a=!!Ga(this.f,function(a){return"LOUNGE_SCREEN"==a.type});Jo(this,a);break;case "loungeScreenConnected":Jo(this,!0);break;case "loungeScreenDisconnected":Na(this.f,function(a){return"LOUNGE_SCREEN"==a.type});Jo(this,!1);break;case "remoteConnected":var b=new Tk(Gh(a.params.device));
Ga(this.f,function(a){return a.equals(b)})||La(this.f,b);break;case "remoteDisconnected":b=new Tk(Gh(a.params.device));Na(this.f,function(a){return a.equals(b)});break;case "gracefulDisconnect":break;case "playlistModified":Mo(this,a);break;case "nowPlaying":No(this,a);break;case "onStateChange":Oo(this,a);break;case "onVolumeChanged":Po(this,a);break;case "onSubtitlesTrackChanged":Lo(this,a);break;default:this.D("Unrecognized action: "+a.action)}};
g.Vd=function(a){a.params?this.D("Received: action="+a.action+", params="+S(a.params)):this.D("Received: action="+a.action);Qo(this,a);Ro(this,a);if(Io(this)){var b=this.n.clone(),c=!1,d,e,f,h,k,l,q;a.params&&(d=a.params.videoId||a.params.video_id,e=a.params.videoIds||a.params.video_ids,f=a.params.state,h=a.params.currentTime||a.params.current_time,k=a.params.volume,l=a.params.muted,n(a.params.currentError)&&(q=Gh(a.params.currentError)));if("onSubtitlesTrackChanged"==a.action)d==uo(this.n)&&(delete a.params.videoId,
eb(a.params)?this.n.k=null:this.n.k=a.params,this.A("remotePlayerChange"));else if(uo(this.n)||"onStateChange"!=a.action)"playlistModified"!=a.action&&"nowPlayingPlaylist"!=a.action||e?(d||"nowPlaying"!=a.action&&"nowPlayingPlaylist"!=a.action?d||(d=uo(this.n)):this.n.setVideoId(""),e&&(e=e.split(","),wo(this.n,e,d))):wo(this.n,[]),this.n.add(d)&&Ho(this,"getPlaylist"),d&&this.n.setVideoId(d),b.index==this.n.index&&Ta(b.videoIds,this.n.videoIds)||this.A("remoteQueueChange"),n(f)&&(b=parseInt(f,10),
b=isNaN(b)?-1:b,-1==b&&-1E3==this.n.e&&(b=-1E3),0==b&&"0"==h&&(b=-1),c=c||b!=this.n.e,this.n.e=b,d=null,-1E3==b&&(d=this.n.h||"unknown",q&&(d=q.reason||d)),c=c||this.n.h!=d,this.n.h=d,1==this.n.e?Go(this):Eo(this)),"onError"!=a.action||-1!=this.n.e&&-1E3!=this.n.e||(a=Gh(a.params.errors)||[],1==a.length&&"PLAYER_ERROR"==a[0].error&&a[0].videoId==uo(this.n)&&(this.n.e=-1E3,this.n.h=a[0].reason||"unknown",c=!0)),h&&(b=parseInt(h,10),c=this.n,c.j=isNaN(b)?0:b,c.o=w(),c=!0),n(k)&&(b=parseInt(k,10),isNaN(b)||
(c=c||this.n.volume!=b,this.n.volume=b),n(l)&&(l="true"==l,c=c||this.n.l!=l,this.n.l=l)),c&&this.A("remotePlayerChange")}};
function Qo(a,b){switch(b.action){case "loungeStatus":var c=Gh(b.params.devices);a.f=A(c,function(a){return new Tk(a)});break;case "loungeScreenDisconnected":Na(a.f,function(a){return"LOUNGE_SCREEN"==a.type});break;case "remoteConnected":var d=new Tk(Gh(b.params.device));Ga(a.f,function(a){return a.equals(d)})||La(a.f,d);break;case "remoteDisconnected":d=new Tk(Gh(b.params.device)),Na(a.f,function(a){return a.equals(d)})}}
function Ro(a,b){var c=!1;if("loungeStatus"==b.action)c=!!Ga(a.f,function(a){return"LOUNGE_SCREEN"==a.type});else if("loungeScreenConnected"==b.action)c=!0;else if("loungeScreenDisconnected"==b.action)c=!1;else return;if(!isNaN(a.Ib))if(c)Fo(a);else return;c==Io(a)?c&&Co(a,1):c?(Do(a),a.o()&&a.n.reset(),Co(a,1),Ho(a,"getNowPlaying"),Ko(a)):a.h(1)}g.Ce=function(){if(this.j){var a=this.j;this.j=null;this.n.videoId!=a&&Ho(this,"getNowPlaying")}};Y.prototype.subscribe=Y.prototype.subscribe;
Y.prototype.unsubscribeByKey=Y.prototype.la;Y.prototype.Q=function(){var a=3;this.F()||(a=0,isNaN(this.l())?Io(this)&&(a=1):a=2);return a};Y.prototype.getProxyState=Y.prototype.Q;Y.prototype.h=function(a){this.D("Disconnecting with "+a);Do(this);this.A("beforeDisconnect",a);1==a&&ll();no(this.e,a);this.dispose()};Y.prototype.disconnect=Y.prototype.h;Y.prototype.N=function(){var a=this.n;if(this.j){var b=a=this.n.clone(),c=this.j,d=a.index,e=b.videoId;b.videoId=c;b.index=d;c!=e&&to(b)}return xo(a)};
Y.prototype.getPlayerContextData=Y.prototype.N;Y.prototype.da=function(a){var b=new ro(a);b.videoId&&b.videoId!=this.n.videoId&&(this.j=b.videoId,G(this.sb),this.sb=F(v(this.Ce,this),5E3));var c=[];this.n.f==b.f&&this.n.videoId==b.videoId&&this.n.index==b.index&&Ta(this.n.videoIds,b.videoIds)||c.push("remoteQueueChange");this.n.e==b.e&&this.n.volume==b.volume&&this.n.l==b.l&&vo(this.n)==vo(b)&&S(this.n.k)==S(b.k)||c.push("remotePlayerChange");this.n.reset(a);z(c,function(a){this.A(a)},this)};
Y.prototype.setPlayerContextData=Y.prototype.da;Y.prototype.I=function(){return this.e.k.loungeIdToken};Y.prototype.getLoungeToken=Y.prototype.I;Y.prototype.o=function(){var a=this.e.k.id,b=Ga(this.f,function(b){return"REMOTE_CONTROL"==b.type&&b.id!=a});return b?b.id:""};Y.prototype.getOtherConnectedRemoteId=Y.prototype.o;Y.prototype.l=function(){var a=this.e;return a.f.enabled?a.f.j-w():NaN};Y.prototype.getReconnectTimeout=Y.prototype.l;
Y.prototype.oa=function(){if(!isNaN(this.l())){var a=this.e.f;a.enabled&&(a.stop(),a.start(),a.l())}};Y.prototype.reconnect=Y.prototype.oa;function Ko(a){G(a.yb);a.yb=F(v(a.h,a,1),864E5)}function Ho(a,b,c){c?a.D("Sending: action="+b+", params="+S(c)):a.D("Sending: action="+b);a=a.e;b={_sc:b};c&&jb(b,c);a.f.enabled||2==(a.e?a.e.e:0)?a.o.push(b):a.e&&3==a.e.e&&ao(a.e,b)}Y.prototype.S=function(a,b){Ho(this,a,b);Ko(this)};Y.prototype.sendMessage=Y.prototype.S;function So(a){V.call(this);this.j=a;this.ha=To();this.D("Initializing local screens: "+pk(this.ha));this.h=Uo();this.D("Initializing account screens: "+pk(this.h));this.Sb=null;this.e=[];this.f=[];Vo(this,Em()||[]);this.D("Initializing DIAL devices: "+Dk(this.f));a=nk(hl());Wo(this,a);this.D("Initializing online screens: "+pk(this.e));this.l=w()+3E5;Xo(this)}x(So,V);var Yo=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g=So.prototype;g.cb=NaN;g.Eb="";g.D=function(a){ek("RM",a)};
g.L=function(a){ek("RM",a)};function Uo(){var a=To(),b=nk(hl());return Da(b,function(b){return!Lk(a,b)})}function To(){var a=nk(dl());return Da(a,function(a){return!a.uuid})}function Xo(a){H("yt-remote-cast-device-list-update",function(){var a=Em();Vo(this,a||[])},a);H("yt-remote-cast-device-status-update",a.Qe,a);a.Wc();var b=w()>a.l?2E4:1E4;Jb(v(a.Wc,a),b)}g.A=function(a,b){if(this.F())return!1;this.D("Firing "+a);return this.k.A.apply(this.k,arguments)};
g.Wc=function(){var a=Em()||[];0==a.length||Vo(this,a);a=Zo(this);0==a.length||(Ea(a,function(a){return!Lk(this.h,a)},this)&&fl()?$o(this):ap(this,a))};function bp(a,b){var c=Zo(a);return Da(b,function(a){return a.uuid?(a=Kk(this.f,a.uuid),!!a&&"RUNNING"==a.status):!!Lk(c,a)},a)}
function Vo(a,b){var c=!1;z(b,function(a){var b=Mk(this.ha,a.id);b&&b.name!=a.name&&(this.D("Renaming screen id "+b.id+" from "+b.name+" to "+a.name),b.name=a.name,c=!0)},a);c&&(a.D("Renaming due to DIAL."),cp(a));il(Hk(b));var d=!Ta(a.f,b,Jk);d&&a.D("Updating DIAL devices: "+Dk(a.f)+" to "+Dk(b));a.f=b;Wo(a,a.e);d&&a.A("onlineReceiverChange")}
g.Qe=function(a){var b=Kk(this.f,a.id);b&&(this.D("Updating DIAL device: "+b.id+"("+b.name+") from status: "+b.status+" to status: "+a.status+" and from activityId: "+b.e+" to activityId: "+a.e),b.e=a.e,b.status=a.status,il(Hk(this.f)));Wo(this,this.e)};function Wo(a,b,c){var d=bp(a,b),e=!Ta(a.e,d,kk);if(e||c)0==b.length||gl(A(d,lk));e&&(a.D("Updating online screens: "+pk(a.e)+" -> "+pk(d)),a.e=d,a.A("onlineReceiverChange"))}
function ap(a,b){var c=[],d={};z(b,function(a){a.token&&(d[a.token]=a,c.push(a.token))});var e={method:"POST",O:{lounge_token:c.join(",")},context:a,Z:function(a,b){var c=[];z(b.screens||[],function(a){"online"==a.status&&c.push(d[a.loungeToken])});var e=this.Sb?dp(this,this.Sb):null;e&&!Lk(c,e)&&c.push(e);Wo(this,c,!0)}};oj(zk(a.j,"/pairing/get_screen_availability"),e)}
function $o(a){var b=Zo(a),c=A(b,function(a){return a.id});0!=c.length&&(a.D("Updating lounge tokens for: "+S(c)),oj(zk(a.j,"/pairing/get_lounge_token_batch"),{O:{screen_ids:c.join(",")},method:"POST",context:a,Z:function(a,c){ep(this,c.screens||[]);this.ha=Da(this.ha,function(a){return!!a.token});cp(this);ap(this,b)}}))}function ep(a,b){z(Oa(a.ha,a.h),function(a){var d=Ga(b,function(b){return a.id==b.screenId});d&&(a.token=d.loungeToken)})}
function cp(a){var b=To();Ta(a.ha,b,kk)||(a.D("Saving local screens: "+pk(b)+" to "+pk(a.ha)),cl(A(a.ha,lk)),Wo(a,a.e,!0),Vo(a,Em()||[]),a.A("managedScreenChange",Zo(a)))}function fp(a,b,c){var d=Ha(b,function(a){return jk(c,a)}),e=0>d;0>d?b.push(c):b[d]=c;Lk(a.e,c)||a.e.push(c);return e}g.Bc=function(a,b){for(var c=Zo(this),c=A(c,function(a){return a.name}),d=a,e=2;Ia(c,d);)d=b.call(m,e),e++;return d};
g.Sc=function(a,b,c){var d=!1;b>=Yo.length&&(this.D("Pairing DIAL device "+a+" with "+c+" timed out."),d=!0);var e=Kk(this.f,a);if(!e)this.D("Pairing DIAL device "+a+" with "+c+" failed: no device for "+a),d=!0;else if("ERROR"==e.status||"STOPPED"==e.status)this.D("Pairing DIAL device "+a+" with "+c+" failed: launch error on "+a),d=!0;d?(gp(this),this.A("screenPair",null)):oj(zk(this.j,"/pairing/get_screen"),{method:"POST",O:{pairing_code:c},context:this,Z:function(a,b){if(c==this.Eb){gp(this);var d=
new hk(b.screen);d.name=e.name;d.uuid=e.id;this.D("Pairing "+c+" succeeded.");var l=fp(this,this.ha,d);this.D("Paired with "+(l?"a new":"an old")+" local screen:"+ok(d));cp(this);this.A("screenPair",d)}},onError:function(){c==this.Eb&&(this.D("Polling pairing code: "+c),G(this.cb),this.cb=F(v(this.Sc,this,a,b+1,c),Yo[b]))}})};
function hp(a,b,c){var d=Z,e="";gp(d);if(Kk(d.f,a)){if(!e){var f=e=Ek();xm();var h=Gm(a),k=um();if(k&&h){var l=new cast.Receiver(h.id,h.name),l=new cast.LaunchRequest("YouTube",l);l.parameters="pairingCode="+f;l.description=new cast.LaunchDescription;l.description.text=document.title;b&&(l.parameters+="&v="+b,c&&(l.parameters+="&t="+Math.round(c)),l.description.url="http://i.ytimg.com/vi/"+b+"/default.jpg");"UNKNOWN"!=h.status&&(h.status="UNKNOWN",Cm(h),I("yt-remote-cast-device-status-update",h));
sm("Sending a cast launch request with params: "+l.parameters);k.launch(l,pa(Hm,a))}else sm("No cast API or no cast device. Dropping cast launch.")}d.Eb=e;d.cb=F(v(d.Sc,d,a,0,e),Yo[0])}else d.D("No DIAL device with id: "+a)}function gp(a){G(a.cb);a.cb=NaN;a.Eb=""}function dp(a,b){var c=Mk(Zo(a),b);a.D("Found screen: "+ok(c)+" with key: "+b);return c}function ip(a){var b=Z,c=Mk(b.e,a);b.D("Found online screen: "+ok(c)+" with key: "+a);return c}
function jp(a){var b=Z,c=Kk(b.f,a);if(!c){var d=Mk(b.ha,a);d&&(c=Kk(b.f,d.uuid))}b.D("Found DIAL: "+(c?c.toString():"null")+" with key: "+a);return c}function Zo(a){return Oa(a.h,Da(a.ha,function(a){return!Lk(this.h,a)},a))};function kp(a){Nk.call(this,"ScreenServiceProxy");this.R=a;this.e=[];this.e.push(this.R.$_s("screenChange",v(this.Ye,this)));this.e.push(this.R.$_s("onlineScreenChange",v(this.de,this)))}x(kp,Nk);g=kp.prototype;g.X=function(a){return this.R.$_gs(a)};g.contains=function(a){return!!this.R.$_c(a)};g.get=function(a){return this.R.$_g(a)};g.start=function(){this.R.$_st()};g.add=function(a,b,c){this.R.$_a(a,b,c)};g.remove=function(a,b,c){this.R.$_r(a,b,c)};g.Kb=function(a,b,c,d){this.R.$_un(a,b,c,d)};
g.B=function(){for(var a=0,b=this.e.length;a<b;++a)this.R.$_ubk(this.e[a]);this.e.length=0;this.R=null;kp.G.B.call(this)};g.Ye=function(){this.A("screenChange")};g.de=function(){this.A("onlineScreenChange")};W.prototype.$_st=W.prototype.start;W.prototype.$_gspc=W.prototype.Ze;W.prototype.$_gsppc=W.prototype.fd;W.prototype.$_c=W.prototype.contains;W.prototype.$_g=W.prototype.get;W.prototype.$_a=W.prototype.add;W.prototype.$_un=W.prototype.Kb;W.prototype.$_r=W.prototype.remove;W.prototype.$_gs=W.prototype.X;
W.prototype.$_gos=W.prototype.ed;W.prototype.$_s=W.prototype.subscribe;W.prototype.$_ubk=W.prototype.la;function lp(){var a=!!E("MDX_ENABLE_CASTV2"),b=!!E("MDX_ENABLE_QUEUE"),c={device:"Desktop",app:"youtube-desktop"};a?p("yt.mdx.remote.castv2_",!0,void 0):xm();Yh&&Xh();Vk();mp||(mp=new yk,ml()&&(mp.e="/api/loungedev"));Z||a||(Z=new So(mp),Z.subscribe("screenPair",np),Z.subscribe("managedScreenChange",op),Z.subscribe("onlineReceiverChange",function(){I("yt-remote-receiver-availability-change")}));pp||(pp=r("yt.mdx.remote.deferredProxies_")||[],p("yt.mdx.remote.deferredProxies_",pp,void 0));qp(b);b=
rp();if(a&&!b){var d=new W(mp);p("yt.mdx.remote.screenService_",d,void 0);b=rp();Wl(d,function(a){a?sp()&&om(sp(),"YouTube TV"):d.subscribe("onlineScreenChange",function(){I("yt-remote-receiver-availability-change")})},!(!c||!c.loadCastApiSetupScript))}if(c&&!r("yt.mdx.remote.initialized_")){p("yt.mdx.remote.initialized_",!0,void 0);tp("Initializing: "+S(c));up.push(H("yt-remote-cast2-availability-change",function(){I("yt-remote-receiver-availability-change")}));up.push(H("yt-remote-cast2-receiver-selected",
function(){vp(null);I("yt-remote-auto-connect","cast-selector-receiver")}));up.push(H("yt-remote-cast2-session-change",wp));up.push(H("yt-remote-connection-change",function(a){a?om(sp(),"YouTube TV"):xp()||(om(null,null),jm())}));var e=yp();c.isAuto&&(e.id+="#dial");e.name=c.device;e.app=c.app;tp(" -- with channel params: "+S(e));zp(e);a&&b.start();sp()||Ap()}}
function Bp(){Tb(up);up.length=0;Cb(Cp);Cp=null;pp&&(z(pp,function(a){a(null)}),pp.length=0,pp=null,p("yt.mdx.remote.deferredProxies_",null,void 0));Z&&(Cb(Z),Z=null);mp=null;Bm()}function Dp(){if(Ep()&&hm()){var a=[];if(U("yt-remote-cast-available")||r("yt.mdx.remote.cloudview.castButtonShown_")||Fp())a.push({key:"cast-selector-receiver",name:Gp()}),p("yt.mdx.remote.cloudview.castButtonShown_",!0,void 0);return a}return r("yt.mdx.remote.cloudview.initializing_")?[]:Hp()}
function Hp(){var a=[],a=Ip()?rp().R.$_gos():nk(hl()),b=Jp();b&&Fp()&&(Lk(a,b)||a.push(b));Ip()||(b=Ik(jl()),b=Da(b,function(b){return!Mk(a,b.id)}),a=Oa(a,b));return Gk(a)}function Kp(){if(Ep()&&hm()){var a=im();return a?{key:"cast-selector-receiver",name:a}:null}return Lp()}function Lp(){var a=Hp(),b=Mp(),c=Jp();c||(c=xp());return Ga(a,function(a){return c&&ik(c,a.key)||b&&(a=jp(a.key))&&a.id==b?!0:!1})}function Gp(){if(Ep()&&hm())return im();var a=Jp();return a?a.name:null}
function Jp(){var a=sp();if(!a)return null;if(!Z){var b=rp().X();return Mk(b,a)}return dp(Z,a)}function wp(a){tp("remote.onCastSessionChange_: "+ok(a));if(a){var b=Jp();b&&b.id==a.id?om(b.id,"YouTube TV"):(b&&Np(),Op(a,1))}else Np()}function Pp(a,b){tp("Connecting to: "+S(a));if("cast-selector-receiver"==a.key)vp(b||null),nm(b||null);else{Np();vp(b||null);var c=null;Z?c=ip(a.key):(c=rp().X(),c=Mk(c,a.key));if(c)Op(c,1);else{if(Z&&(c=jp(a.key))){Qp(c);return}F(function(){Rp(null)},0)}}}
function Np(){Z&&gp(Z);a:{var a=Fp();if(a&&(a=a.getOtherConnectedRemoteId())){tp("Do not stop DIAL due to "+a);Sp("");break a}(a=Mp())?(tp("Stopping DIAL: "+a),Im(a),Sp("")):(a=Jp())&&a.uuid&&(tp("Stopping DIAL: "+a.uuid),Im(a.uuid))}lm()?dm().stopSession():mm("stopSession called before API ready.");(a=Fp())?a.disconnect(1):(Ub("yt-remote-before-disconnect",1),Ub("yt-remote-connection-change",!1));Rp(null)}function tp(a){ek("remote",a)}function Ep(){return!!r("yt.mdx.remote.castv2_")}
function Ip(){return r("yt.mdx.remote.screenService_")}function rp(){if(!Cp){var a=Ip();Cp=a?new kp(a):null}return Cp}function sp(){return r("yt.mdx.remote.currentScreenId_")}function Tp(a){p("yt.mdx.remote.currentScreenId_",a,void 0);if(Z){var b=Z;b.l=w()+3E5;if((b.Sb=a)&&(a=dp(b,a))&&!Lk(b.e,a)){var c=Pa(b.e);c.push(a);Wo(b,c,!0)}}}function Mp(){return r("yt.mdx.remote.currentDialId_")}function Sp(a){p("yt.mdx.remote.currentDialId_",a,void 0)}
function Ao(){return r("yt.mdx.remote.connectData_")}function vp(a){p("yt.mdx.remote.connectData_",a,void 0)}function Fp(){return r("yt.mdx.remote.connection_")}function Rp(a){var b=Fp();vp(null);a?Ba(!Fp()):(Tp(""),Sp(""));p("yt.mdx.remote.connection_",a,void 0);pp&&(z(pp,function(b){b(a)}),pp.length=0);b&&!a?Ub("yt-remote-connection-change",!1):!b&&a&&I("yt-remote-connection-change",!0)}function xp(){var a=Yk();if(!a)return null;if(Ip()){var b=rp().X();return Mk(b,a)}return Z?dp(Z,a):null}
function Op(a,b){Ba(!sp());Tp(a.id);var c=new Y(mp,a,yp());zo(c,b);c.subscribe("beforeDisconnect",function(a){Ub("yt-remote-before-disconnect",a)});c.subscribe("beforeDispose",function(){Fp()&&(Fp(),Rp(null))});Rp(c)}function Qp(a){Mp();tp("Connecting to: "+(a?a.toString():"null"));Sp(a.id);var b=Ao();b?hp(a.id,b.videoIds[b.index],b.currentTime):hp(a.id)}function Ap(){var a=xp();a?(tp("Resume connection to: "+ok(a)),Op(a,0)):(ll(),jm(),tp("Skipping connecting because no session screen found."))}
function np(a){tp("Paired with: "+ok(a));a?Op(a,1):Rp(null)}function op(){var a=sp();a&&!Jp()&&(tp("Dropping current screen with id: "+a),Np());xp()||ll()}var mp=null,pp=null,Cp=null,Z=null;function qp(a){var b=yp();if(eb(b)){var b=Xk(),c=U("yt-remote-session-name")||"",d=U("yt-remote-session-app")||"",b={device:"REMOTE_CONTROL",id:b,name:c,app:d};a&&(b["mdx-version"]=3);p("yt.mdx.remote.channelParams_",b,void 0)}}function yp(){return r("yt.mdx.remote.channelParams_")||{}}
function zp(a){a?(T("yt-remote-session-app",a.app),T("yt-remote-session-name",a.name)):($h("yt-remote-session-app"),$h("yt-remote-session-name"));p("yt.mdx.remote.channelParams_",a,void 0)}var up=[];var Up=null,Vp=[];function Wp(){Xp();if(Kp()){var a=Up;"html5"!=a.getPlayerType()&&a.loadNewVideoConfig(a.getCurrentVideoConfig(),"html5")}}function Yp(a){"cast-selector-receiver"==a?km():Zp(a)}
function Zp(a){var b=Dp();if(a=Fk(b,a)){var c=Up,d=c.getVideoData().video_id,e=c.getVideoData().list,f=c.getCurrentTime();Pp(a,{videoIds:[d],listId:e,videoId:d,index:0,currentTime:f});"html5"!=c.getPlayerType()?c.loadNewVideoConfig(c.getCurrentVideoConfig(),"html5"):c.updateRemoteReceivers&&c.updateRemoteReceivers(b,a)}}function Xp(){var a=Up;a&&a.updateRemoteReceivers&&a.updateRemoteReceivers(Dp(),Kp())};var $p=null,aq=[];function bq(a){return{externalChannelId:a.externalChannelId,Pd:!!a.isChannelPaid,source:a.source,Ya:a.subscriptionId}}function cq(a){dq(bq(a))}function dq(a){sj()?(Q(Xi,new Oi(a.externalChannelId,a.Pd?{itemType:"U",itemId:a.externalChannelId}:null)),(a="/gen_204?"+Bd({event:"subscribe",source:a.source}))&&ch(a)):eq(a)}function eq(a){ij(function(b){b.subscription_ajax&&dq(a)},null,"sub_button")}
function fq(a){a=bq(a);Q(bj,new Qi(a.externalChannelId,a.Ya,null));(a="/gen_204?"+Bd({event:"unsubscribe",source:a.source}))&&ch(a)}function gq(a){$p&&$p.channelSubscribed(a.e,a.Ya)}function hq(a){$p&&$p.channelUnsubscribed(a.e)};function iq(a){C.call(this);this.f=a;this.f.subscribe("command",this.Vc,this);this.h={};this.k=!1}x(iq,C);g=iq.prototype;g.start=function(){this.k||this.F()||(this.k=!0,jq(this.f,"RECEIVING"))};
g.Vc=function(a,b){if(this.k&&!this.F()){var c=b||{};switch(a){case "addEventListener":if(u(c.event)&&(c=c.event,!(c in this.h))){var d=v(this.Ee,this,c);this.h[c]=d;this.addEventListener(c,d)}break;case "removeEventListener":u(c.event)&&kq(this,c.event);break;default:this.e.isReady()&&this.e[a]&&(c=lq(a,b||{}),c=this.e[a].apply(this.e,c),(c=mq(a,c))&&this.k&&!this.F()&&jq(this.f,a,c))}}};g.Ee=function(a,b){this.k&&!this.F()&&jq(this.f,a,this.Vb(a,b))};g.Vb=function(a,b){if(null!=b)return{value:b}};
function kq(a,b){b in a.h&&(a.removeEventListener(b,a.h[b]),delete a.h[b])}g.B=function(){this.f.Na("command",this.Vc,this);this.f=null;for(var a in this.h)kq(this,a);iq.G.B.call(this)};function nq(a,b){iq.call(this,b);this.e=a;this.start()}x(nq,iq);nq.prototype.addEventListener=function(a,b){this.e.addEventListener(a,b)};nq.prototype.removeEventListener=function(a,b){this.e.removeEventListener(a,b)};
function lq(a,b){switch(a){case "loadVideoById":return b=Sj(b),Uj(b),[b];case "cueVideoById":return b=Sj(b),Uj(b),[b];case "loadVideoByPlayerVars":return Uj(b),[b];case "cueVideoByPlayerVars":return Uj(b),[b];case "loadPlaylist":return b=Tj(b),Uj(b),[b];case "cuePlaylist":return b=Tj(b),Uj(b),[b];case "seekTo":return[b.seconds,b.allowSeekAhead];case "playVideoAt":return[b.index];case "setVolume":return[b.volume];case "setPlaybackQuality":return[b.suggestedQuality];case "setPlaybackRate":return[b.suggestedRate];
case "setLoop":return[b.loopPlaylists];case "setShuffle":return[b.shufflePlaylist];case "getOptions":return[b.module];case "getOption":return[b.module,b.option];case "setOption":return[b.module,b.option,b.value]}return[]}
function mq(a,b){switch(a){case "isMuted":return{muted:b};case "getVolume":return{volume:b};case "getPlaybackRate":return{playbackRate:b};case "getAvailablePlaybackRates":return{availablePlaybackRates:b};case "getVideoLoadedFraction":return{videoLoadedFraction:b};case "getPlayerState":return{playerState:b};case "getCurrentTime":return{currentTime:b};case "getPlaybackQuality":return{playbackQuality:b};case "getAvailableQualityLevels":return{availableQualityLevels:b};case "getDuration":return{duration:b};
case "getVideoUrl":return{videoUrl:b};case "getVideoEmbedCode":return{videoEmbedCode:b};case "getPlaylist":return{playlist:b};case "getPlaylistIndex":return{playlistIndex:b};case "getOptions":return{options:b};case "getOption":return{option:b}}}
nq.prototype.Vb=function(a,b){switch(a){case "onReady":return;case "onStateChange":return{playerState:b};case "onPlaybackQualityChange":return{playbackQuality:b};case "onPlaybackRateChange":return{playbackRate:b};case "onError":return{errorCode:b}}return nq.G.Vb.call(this,a,b)};nq.prototype.B=function(){nq.G.B.call(this);delete this.e};function oq(a,b){this.source=null;this.k=a||null;this.origin="*";this.C=window.document.location.protocol+"//"+window.document.location.hostname;this.l=b;this.h=this.e=this.f=this.j=null;L(window,"message",v(this.o,this))}
oq.prototype.o=function(a){var b=this.l||E("POST_MESSAGE_ORIGIN")||this.C;if("*"!=b&&a.origin!=b)window.console&&window.console.warn("Untrusted origin: "+a.origin);else if(!this.k||a.source==this.k)if(this.source=a.source,this.origin="null"==a.origin?this.origin:a.origin,a=a.data,u(a)){try{a=Gh(a)}catch(c){return}this.j=a.id;switch(a.event){case "listening":this.e&&(this.e(),this.e=null);break;case "command":this.f&&(this.h&&!Ia(this.h,a.func)||this.f(a.func,a.args))}}};function pq(){var a=this.f=new oq,b=v(this.Ae,this);a.f=b;a.h=null;this.k=[];this.o=!1;this.j=(a=E("POST_MESSAGE_ORIGIN"))&&Zg(a)?a:null;this.l={}}g=pq.prototype;g.Ae=function(a,b){if(this.j&&this.j!=this.f.origin)this.dispose();else if("addEventListener"==a&&b){var c=b[0];this.l[c]||"onReady"==c||(this.addEventListener(c,qq(this,c)),this.l[c]=!0)}else this.jd(a,b)};g.jd=function(){};function qq(a,b){return v(function(a){rq(this,b,a)},a)}g.addEventListener=function(){};
g.Fd=function(){this.o=!0;rq(this,"initialDelivery",this.Wb());rq(this,"onReady");z(this.k,this.kd,this);this.k=[]};g.Wb=function(){return null};function sq(a,b){rq(a,"infoDelivery",b)}g.kd=function(a){if(this.o){var b=this.f;b.source&&(a.id=b.j,a=S(a),b.source.postMessage(a,b.origin))}else this.k.push(a)};function rq(a,b,c){a.kd({event:b,info:void 0==c?null:c})}g.dispose=function(){this.f=null};function tq(a){pq.call(this);this.e=a;this.h=[];this.addEventListener("onReady",v(this.je,this));this.addEventListener("onVideoProgress",v(this.Ie,this));this.addEventListener("onVolumeChange",v(this.Je,this));this.addEventListener("onApiChange",v(this.De,this));this.addEventListener("onPlaybackQualityChange",v(this.Fe,this));this.addEventListener("onPlaybackRateChange",v(this.Ge,this));this.addEventListener("onStateChange",v(this.He,this))}x(tq,pq);g=tq.prototype;
g.jd=function(a,b){if(this.e[a]){b=b||[];if(0<b.length&&Qj(a)){var c;c=b;if(ia(c[0])&&!ea(c[0]))c=c[0];else{var d={};switch(a){case "loadVideoById":case "cueVideoById":d=Sj.apply(window,c);break;case "loadVideoByUrl":case "cueVideoByUrl":d=Rj.apply(window,c);break;case "loadPlaylist":case "cuePlaylist":d=Tj.apply(window,c)}c=d}Uj(c);b.length=1;b[0]=c}this.e[a].apply(this.e,b);Qj(a)&&sq(this,this.Wb())}};g.je=function(){var a=v(this.Fd,this);this.f.e=a};
g.addEventListener=function(a,b){this.h.push({Ed:a,ua:b});this.e.addEventListener(a,b)};g.Wb=function(){if(!this.e)return null;var a=this.e.getApiInterface();Ma(a,"getVideoData");for(var b={apiInterface:a},c=0,d=a.length;c<d;c++){var e=a[c],f=e;if(0==f.search("get")||0==f.search("is")){var f=e,h=0;0==f.search("get")?h=3:0==f.search("is")&&(h=2);f=f.charAt(h).toLowerCase()+f.substr(h+1);try{var k=this.e[e]();b[f]=k}catch(l){}}}b.videoData=this.e.getVideoData();return b};
g.He=function(a){a={playerState:a,currentTime:this.e.getCurrentTime(),duration:this.e.getDuration(),videoData:this.e.getVideoData(),videoStartBytes:0,videoBytesTotal:this.e.getVideoBytesTotal(),videoLoadedFraction:this.e.getVideoLoadedFraction(),playbackQuality:this.e.getPlaybackQuality(),availableQualityLevels:this.e.getAvailableQualityLevels(),videoUrl:this.e.getVideoUrl(),playlist:this.e.getPlaylist(),playlistIndex:this.e.getPlaylistIndex()};this.e.getProgressState&&(a.progressState=this.e.getProgressState());
this.e.getStoryboardFormat&&(a.storyboardFormat=this.e.getStoryboardFormat());sq(this,a)};g.Fe=function(a){sq(this,{playbackQuality:a})};g.Ge=function(a){sq(this,{playbackRate:a})};g.De=function(){for(var a=this.e.getOptions(),b={namespaces:a},c=0,d=a.length;c<d;c++){var e=a[c],f=this.e.getOptions(e);b[e]={options:f};for(var h=0,k=f.length;h<k;h++){var l=f[h],q=this.e.getOption(e,l);b[e][l]=q}}rq(this,"apiInfoDelivery",b)};g.Je=function(){sq(this,{muted:this.e.isMuted(),volume:this.e.getVolume()})};
g.Ie=function(a){a={currentTime:a,videoBytesLoaded:this.e.getVideoBytesLoaded(),videoLoadedFraction:this.e.getVideoLoadedFraction()};this.e.getProgressState&&(a.progressState=this.e.getProgressState());sq(this,a)};g.dispose=function(){tq.G.dispose.call(this);for(var a=0;a<this.h.length;a++){var b=this.h[a];this.e.removeEventListener(b.Ed,b.ua)}this.h=[]};function uq(a,b,c){V.call(this);this.e=a;this.f=b;this.h=c}x(uq,V);function jq(a,b,c){if(!a.F()){var d=a.e;d.F()||a.f!=d.e||(a={id:a.h,command:b},c&&(a.data=c),d.e.postMessage(S(a),d.h))}}uq.prototype.B=function(){this.f=this.e=null;uq.G.B.call(this)};function vq(a,b,c){C.call(this);this.e=a;this.h=c;this.k=L(window,"message",v(this.j,this));this.f=new uq(this,a,b);Bb(this,pa(Cb,this.f))}x(vq,C);vq.prototype.j=function(a){var b;if(b=!this.F())if(b=a.origin==this.h){b=a.source;var c=!1;do{if(b==this.e){c=!0;break}if(b==b.parent)break;b=b.parent}while(b);b=c}if(b&&(a=a.data,u(a))){try{a=Gh(a)}catch(d){return}a.command&&(b=this.f,b.F()||b.A("command",a.command,a.data))}};vq.prototype.B=function(){hd(this.k);this.e=null;vq.G.B.call(this)};var wq={};function xq(a){return a?24==a.length&&"UC"==a.slice(0,2)?a.substr(2):22==a.length?a:null:null};var yq=[],zq=[];
function Aq(a,b){if("view"!=a&&"cvisit"!=a){if(!b){var c=E("CONVERSION_CONFIG_DICT");if(!c)return;b=c.uid||null;if(!b)return}if("subscribe"==a||"unsubscribe"==a){if(u(b)){var d=xq(b);d&&(d={label:"followon_"+a,foc_id:d,r:Math.round(1E4*Math.random())},(d=Dd("//googleads.g.doubleclick.net/pagead/viewthroughconversion/962985656/",d))&&d&&ch(d))}}else a:{c=E("CONVERSION_CONFIG_DICT");if(u(b)){var e=xq(b);if(!c||c.uid!=e)if(c=wq[e],!c||c.uid!=e)break a}if(a&&c&&c.baseUrl&&c.uid){var f=c.rmktEnabled,e=
c.focEnabled&&(!c.isAd||"view"!=a);if(f||e){var h={};if(f){f={utuid:c.uid,type:a,client_name:"html5"};"cvisit"==a&&(f.type="cview");c.vid&&(f.utvid=c.vid);c.eventLabel&&(f.el=c.eventLabel);c.playerStyle&&(f.ps=c.playerStyle);c.feature&&(f.feature=c.feature);c.ppe&&(f.ppe=c.ppe);c.subscribed&&(f.subscribed=c.subscribed);c.engaged&&(f.engaged=c.engaged);var k=[];for(d in f)k.push(encodeURIComponent(d)+"="+encodeURIComponent(f[d]));d=k.join(";");h.data=d}e&&(h.label="followon_"+a,h.foc_id=c.uid,h.r=
Math.round(1E4*Math.random()));if("unsubscribe"==a||"dislike"==a)h.r=Math.round(1E4*Math.random());d=Dd(c.baseUrl,h)}else d=null}else d=null;d&&d&&ch(d)}}}function Bq(a){Aq("subscribe",a.e)}function Cq(a){Aq("unsubscribe",a.e)};function Dq(a){O.call(this,1,arguments)}x(Dq,O);function Eq(a,b){O.call(this,2,arguments);this.f=a;this.e=b}x(Eq,O);function Fq(a,b,c,d){O.call(this,1,arguments);this.e=b;this.h=c||null;this.f=d||null}x(Fq,O);function Gq(a,b){O.call(this,1,arguments);this.f=a;this.e=b||null}x(Gq,O);function Hq(a){O.call(this,1,arguments)}x(Hq,O);
var Iq=new P("ypc-core-load",Dq),Jq=new P("ypc-guide-sync-success",Eq),Kq=new P("ypc-purchase-success",Fq),Lq=new P("ypc-subscription-cancel",Hq),Mq=new P("ypc-subscription-cancel-success",Gq),Nq=new P("ypc-init-subscription",Hq);var Oq=!1,Pq=[],Qq=[];function Rq(a){a.e?Oq?Q(aj,a):Q(Iq,new Dq(function(){Q(Nq,new Hq(a.e))})):Sq(a.f,a.k,a.h,a.source)}function Tq(a){a.e?Oq?Q(fj,a):Q(Iq,new Dq(function(){Q(Lq,new Hq(a.e))})):Uq(a.f,a.Ya,a.k,a.h,a.source)}function Vq(a){Wq(Pa(a.e))}function Xq(a){Yq(Pa(a.e))}function Zq(a){$q(a.e,a.isEnabled,null,null)}function ar(a){$q(a.e,null,null,a.isEnabled)}function br(a){cr(a.f,a.isEnabled,null,a.e)}function dr(a){cr(a.f,null,a.isEnabled,a.e)}function er(a,b,c,d,e){$q(a,b,c,d,e)}
function fr(a){var b=a.f,c=a.e.subscriptionId;b&&c&&Q($i,new Pi(b,c,a.e.channelInfo))}function gr(a){var b=a.e;Wa(a.f,function(a,d){Q($i,new Pi(d,a,b[d]))})}function hr(a){Q(ej,new Li(a.f.itemId));a.e&&a.e.length&&(ir(a.e,ej),ir(a.e,gj))}
function Sq(a,b,c,d){var e=new Li(a);Q(Yi,e);var f={};f.c=a;c&&(f.eurl=c);d&&(f.source=d);c={};(d=E("PLAYBACK_ID"))&&(c.plid=d);(d=E("EVENT_ID"))&&(c.ei=d);b&&jr("/subscription_ajax?action_create_subscription_to_channel=1",f,b);oj("/subscription_ajax?action_create_subscription_to_channel=1",{method:"POST",lc:f,O:c,Z:function(b,c){var d=c.response;Q($i,new Pi(a,d.id,d.channel_info));d.show_feed_privacy_dialog&&I("SHOW-FEED-PRIVACY-SUBSCRIBE-DIALOG",a)},ec:function(){Q(Zi,e)}})}
function Uq(a,b,c,d,e){var f=new Li(a);Q(cj,f);var h={};d&&(h.eurl=d);e&&(h.source=e);d={};d.c=a;d.s=b;(a=E("PLAYBACK_ID"))&&(d.plid=a);(a=E("EVENT_ID"))&&(d.ei=a);c&&jr("/subscription_ajax?action_remove_subscriptions=1",{},c);oj("/subscription_ajax?action_remove_subscriptions=1",{method:"POST",lc:h,O:d,Z:function(){Q(ej,f)},ec:function(){Q(dj,f)}})}
function $q(a,b,c,d,e){if(null!==b||null!==c||null!==d){var f={};a&&(f.channel_id=a);null===b||(f.email_on_upload=b);null===c||(f.receive_no_updates=c);null===d||(f.uploads_only=d);oj("/subscription_ajax?action_update_subscription_preferences=1",{method:"POST",O:f,onError:function(){e&&e()}})}}
function Wq(a){if(a.length){var b=Ra(a,0,40);Q("subscription-batch-subscribe-loading");ir(b,Yi);var c={};c.a=b.join(",");var d=function(){Q("subscription-batch-subscribe-loaded");ir(b,Zi)};oj("/subscription_ajax?action_create_subscription_to_all=1",{method:"POST",O:c,Z:function(c,f){d();var h=f.response,k=h.id;if(ea(k)&&k.length==b.length){var l=h.channel_info_map;z(k,function(a,c){var d=b[c];Q($i,new Pi(d,a,l[d]))});a.length?Wq(a):Q("subscription-batch-subscribe-finished")}},onError:function(){d();
Q("subscription-batch-subscribe-failure")}})}}function Yq(a){if(a.length){var b=Ra(a,0,40);Q("subscription-batch-unsubscribe-loading");ir(b,cj);var c={};c.c=b.join(",");var d=function(){Q("subscription-batch-unsubscribe-loaded");ir(b,dj)};oj("/subscription_ajax?action_remove_subscriptions=1",{method:"POST",O:c,Z:function(){d();ir(b,ej);a.length&&Yq(a)},onError:function(){d()}})}}
function cr(a,b,c,d){if(a.length&&(null!==b||null!==c)){var e=Ra(a,0,40);I("subscription-batch-prefs-loading",e);var f={};f.s=e.join(",");null!==b&&(f.email_on_upload=b,f.receive_no_updates=!b);null===c||(f.uploads_only=c);var h=function(){I("subscription-batch-prefs-loaded",e)};oj("/subscription_ajax?action_update_subscription_preferences_batch=1",{method:"POST",O:f,Z:function(){h();I("subscription-batch-prefs-success",e);a.length&&cr(a,b,c,d)},onError:function(){h();d&&d();I("subscription-batch-prefs-failure",
e)}})}}function ir(a,b){z(a,function(a){Q(b,new Li(a))})}function jr(a,b,c){a=Gd(a,b);c=Ed(c);Id(a,c)};var kr=null,lr=null,mr=null,nr=!1;var or={},pr=0;p("yt.setConfig",Gb,void 0);p("yt.setMsg",function(a){Hb(Fb,arguments)},void 0);
p("yt.www.errors.log",function(a,b){if(a&&window&&window.yterr&&!(5<=pr)){var c=a.stacktrace,d=a.columnNumber;var e=a,f=r("window.location.href");if(u(e))a={message:e,name:"Unknown error",lineNumber:"Not available",fileName:f,stack:"Not available"};else{var h,k,l=!1;try{h=e.lineNumber||e.line||"Not available"}catch(q){h="Not available",l=!0}try{k=e.fileName||e.filename||e.sourceURL||m.$googDebugFname||f}catch(N){k="Not available",l=!0}a=!l&&e.lineNumber&&e.fileName&&e.stack&&e.message&&e.name?e:{message:e.message||
"Not available",name:e.name||"UnknownError",lineNumber:h,fileName:k,stack:e.stack||"Not available"}}c=c||a.stack;e=a.lineNumber.toString();isNaN(e)||isNaN(d)||(e=e+":"+d);or[a.message]||(d={lc:{a:"logerror",t:"jserror",type:a.name,msg:a.message.substr(0,1E3),line:e,level:b||"ERROR"},O:{url:window.location.href,file:a.fileName},method:"POST"},c&&(d.O.stack=c),oj("/gen_204",d),or[a.message]=!0,pr++)}},void 0);
p("yt.embed.openLoginDialog",function(){ij(function(a){if(kr.onLoginDialogSuccess)kr.onLoginDialogSuccess(a)})},void 0);
p("writeEmbed",function(){var a=new Af(E("PLAYER_CONFIG")),b=document.referrer,c=E("POST_MESSAGE_ORIGIN"),d=!1;u(b)&&u(c)&&-1<b.indexOf(c)&&Zg(c)&&Zg(b)&&(d=!0);window!=window.top&&b&&b!=document.URL&&(a.args.loaderUrl=b);E("LIGHTWEIGHT_AUTOPLAY")&&(a.args.autoplay="1");a.args.autoplay&&Uj(a.args);kr=ti("player",a);b=E("POST_MESSAGE_ID","player");E("ENABLE_JS_API")?mr=new tq(kr):E("ENABLE_POST_API")&&u(b)&&u(c)&&(lr=new vq(window.parent,b,c),mr=new nq(kr,lr.f));(nr=d&&!E("ENABLE_CAST_API"))?a.args.disableCast=
"1":(a=kr,lp(),Up=a,Up.addEventListener("onReady",Wp),Up.addEventListener("onRemoteReceiverSelected",Yp),Vp.push(H("yt-remote-receiver-availability-change",Xp)),Vp.push(H("yt-remote-auto-connect",Zp)));E("BG_P")&&(E("BG_I")||E("BG_IU"))&&ec();$p=kr;$p.addEventListener("SUBSCRIBE",cq);$p.addEventListener("UNSUBSCRIBE",fq);aq.push(lh($i,gq),lh(ej,hq))},void 0);p("yt.www.watch.ads.restrictioncookie.spr",function(a){(a=a+"mac_204?action_fcts=1")&&ch(a);return!0},void 0);
L(window,"load",function(){rh("ol");E("CSI_LOG_ON_TICK")||th();Oq=!0;Qq.push(lh(Xi,Rq),lh(bj,Tq));Oq||(Qq.push(lh(aj,Rq),lh(fj,Tq),lh(Ti,Vq),lh(Ui,Xq),lh(Vi,Zq),lh(Wi,ar),lh(Ri,br),lh(Si,dr)),Pq.push(H("subscription-prefs",er)),Qq.push(lh(Kq,fr),lh(Mq,hr),lh(Jq,gr)),yq.push(H("player-subscribe",pa(Aq,"subscribe")),H("player-unsubscribe",pa(Aq,"unsubscribe"))),zq.push(lh($i,Bq),lh(ej,Cq)))});
L(window,"unload",function(){var a=kr;a&&a.sendAbandonmentPing&&a.sendAbandonmentPing();E("PL_ATT")&&(dc=null);Tb(Pq);Pq.length=0;mh(Qq);Qq.length=0;Oq=!1;Tb(yq);yq.length=0;mh(zq);zq.length=0;$p&&($p.removeEventListener("SUBSCRIBE",dq),$p.removeEventListener("UNSUBSCRIBE",fq));$p=null;mh(aq);aq.length=0;nr||(Tb(Vp),Vp.length=0,Up&&(Up.removeEventListener("onRemoteReceiverSelected",Yp),Up.removeEventListener("onReady",Wp),Up=null),Bp());Db(mr,lr);kr&&kr.destroy()});var qr=Kj.getInstance(),rr=yj(qr);
rr in Pj||(qr.register(),qr.Uc.push(H("yt-uix-init-"+rr,qr.init,qr)),qr.Uc.push(H("yt-uix-dispose-"+rr,qr.dispose,qr)),Pj[rr]=qr);})();
