(function(){var g,aa=aa||{},l=this;function p(a){return void 0!==a}function q(a){a=a.split(".");for(var b=l,c;c=a.shift();)if(null!=b[c])b=b[c];else return null;return b}function r(){}function ba(a){a.getInstance=function(){return a.W?a.W:a.W=new a}}
function ca(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 t(a){return"array"==ca(a)}function da(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function u(a){return"string"==typeof a}function ea(a){return"number"==typeof a}function fa(a){return"function"==ca(a)}function ga(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ha(a){return a[ia]||(a[ia]=++ja)}var ia="closure_uid_"+(1E9*Math.random()>>>0),ja=0;
function ka(a,b,c){return a.call.apply(a.bind,arguments)}function la(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")?ka:la;return v.apply(null,arguments)}
function ma(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 y(a,b){var c=a.split("."),d=l;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)!c.length&&p(b)?d[e]=b:d[e]?d=d[e]:d=d[e]={}}
function z(a,b){function c(){}c.prototype=b.prototype;a.F=b.prototype;a.prototype=new c;a.$e=function(a,c,f){return b.prototype[c].apply(a,Array.prototype.slice.call(arguments,2))}}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)};var na;function oa(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")}function pa(a){return decodeURIComponent(a.replace(/\+/g," "))}function qa(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"'},c;c=l.document.createElement("div");return a.replace(ra,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 sa(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 ra=/&([^;\s<&]+);?/g;function ta(a,b){return-1!=a.indexOf(b)}function ua(a){a=p(void 0)?a.toFixed(void 0):String(a);var b=a.indexOf(".");-1==b&&(b=a.length);b=Math.max(0,2-b);return Array(b+1).join("0")+a}
function va(a,b){for(var c=0,d=oa(String(a)).split("."),e=oa(String(b)).split("."),f=Math.max(d.length,e.length),h=0;0==c&&h<f;h++){var k=d[h]||"",m=e[h]||"",n=RegExp("(\\d*)(\\D*)","g"),s=RegExp("(\\d*)(\\D*)","g");do{var x=n.exec(k)||["","",""],$=s.exec(m)||["","",""];if(0==x[0].length&&0==$[0].length)break;c=wa(0==x[1].length?0:parseInt(x[1],10),0==$[1].length?0:parseInt($[1],10))||wa(0==x[2].length,0==$[2].length)||wa(x[2],$[2])}while(0==c)}return c}function wa(a,b){return a<b?-1:a>b?1:0}
function xa(a){for(var b=0,c=0;c<a.length;++c)b=31*b+a.charCodeAt(c),b%=4294967296;return b}function ya(){return"transform".replace(/\-([a-z])/g,function(a,b){return b.toUpperCase()})}function za(a){var b=u(void 0)?"undefined".replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08"):"\\s";return a.replace(new RegExp("(^"+(b?"|["+b+"]+":"")+")([a-z])","g"),function(a,b,e){return b+e.toUpperCase()})};function Aa(){};var A=Array.prototype,Ba=A.indexOf?function(a,b,c){return A.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},C=A.forEach?function(a,b,c){A.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)},Ca=A.filter?function(a,b,c){return A.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 m=h[k];b.call(c,m,k,a)&&(e[f++]=m)}return e},D=A.map?function(a,b,c){return A.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},Da=A.some?function(a,b,c){return A.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},Ea=A.every?function(a,b,c){return A.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 Fa(a,b,c){b=Ga(a,b,c);return 0>b?null:u(a)?a.charAt(b):a[b]}function Ga(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 Ha(a,b){return 0<=Ba(a,b)}function Ia(a){return 0==a.length}function Ja(){var a=Ka;if(!t(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0}function La(a,b){Ha(a,b)||a.push(b)}
function Ma(a,b){var c=Ba(a,b),d;(d=0<=c)&&A.splice.call(a,c,1);return d}function Na(a,b){var c=Ga(a,b,void 0);0<=c&&A.splice.call(a,c,1)}function Oa(a){return A.concat.apply(A,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],e;if(t(d)||(e=da(d))&&Object.prototype.hasOwnProperty.call(d,"callee"))a.push.apply(a,d);else if(e)for(var f=a.length,h=d.length,k=0;k<h;k++)a[f+k]=d[k];else a.push(d)}}function Ra(a,b,c,d){return A.splice.apply(a,Sa(arguments,1))}function Sa(a,b,c){return 2>=arguments.length?A.slice.call(a,b):A.slice.call(a,b,c)}function Ta(a,b){a.sort(b||Ua)}
function Va(a,b,c){if(!da(a)||!da(b)||a.length!=b.length)return!1;var d=a.length;c=c||Wa;for(var e=0;e<d;e++)if(!c(a[e],b[e]))return!1;return!0}function Ua(a,b){return a>b?1:a<b?-1:0}function Wa(a,b){return a===b};function Xa(a,b){for(var c in a)b.call(void 0,a[c],c,a)}function Ya(a,b,c){var d={},e;for(e in a)b.call(c,a[e],e,a)&&(d[e]=a[e]);return d}function Za(a){t:{var b=$a,c;for(c in b)if(b[c]==a){a=!0;break t}a=!1}return a}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 cb(a){var b=db,c;for(c in b)if(a.call(void 0,b[c],c,b))return c}function fb(a){for(var b in a)return!1;return!0}
function gb(a){var b={},c;for(c in a)b[c]=a[c];return b}function hb(a){var b=ca(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}function ib(a){var b={},c;for(c in a)b[a[c]]=c;return b}var jb="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
function kb(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<jb.length;f++)c=jb[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}}function lb(a){var b=arguments.length;if(1==b&&t(arguments[0]))return lb.apply(null,arguments[0]);for(var c={},d=0;d<b;d++)c[arguments[d]]=!0;return c};function mb(a,b,c){a&&(a.dataset?a.dataset[nb(b)]=c:a.setAttribute("data-"+b,c))}function E(a,b){return a?a.dataset?a.dataset[nb(b)]:a.getAttribute("data-"+b):null}var ob={};function nb(a){return ob[a]||(ob[a]=String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()}))};function pb(){}pb.prototype.Mb=!1;pb.prototype.C=function(){return this.Mb};pb.prototype.dispose=function(){this.Mb||(this.Mb=!0,this.B())};function qb(a,b){rb(a,ma(sb,b))}function rb(a,b){a.M||(a.M=[]);a.M.push(p(void 0)?v(b,void 0):b)}pb.prototype.B=function(){if(this.M)for(;this.M.length;)this.M.shift()()};function sb(a){a&&"function"==typeof a.dispose&&a.dispose()}function tb(a){for(var b=0,c=arguments.length;b<c;++b){var d=arguments[b];da(d)?tb.apply(null,d):sb(d)}};function F(){this.b=[];this.Z={}}z(F,pb);g=F.prototype;g.Jc=1;g.yb=0;g.subscribe=function(a,b,c){var d=this.Z[a];d||(d=this.Z[a]=[]);var e=this.Jc;this.b[e]=a;this.b[e+1]=b;this.b[e+2]=c;this.Jc=e+3;d.push(e);return e};g.Da=function(a,b,c){if(a=this.Z[a]){var d=this.b;if(a=Fa(a,function(a){return d[a+1]==b&&d[a+2]==c}))return this.ha(a)}return!1};
g.ha=function(a){if(0!=this.yb)return this.g||(this.g=[]),this.g.push(a),!1;var b=this.b[a];if(b){var c=this.Z[b];c&&Ma(c,a);delete this.b[a];delete this.b[a+1];delete this.b[a+2]}return!!b};g.q=function(a,b){var c=this.Z[a];if(c){this.yb++;for(var d=Sa(arguments,1),e=0,f=c.length;e<f;e++){var h=c[e];this.b[h+1].apply(this.b[h+2],d)}this.yb--;if(this.g&&0==this.yb)for(;c=this.g.pop();)this.ha(c);return 0!=e}return!1};
g.clear=function(a){if(a){var b=this.Z[a];b&&(C(b,this.ha,this),delete this.Z[a])}else this.b.length=0,this.Z={}};g.ya=function(a){if(a){var b=this.Z[a];return b?b.length:0}a=0;for(b in this.Z)a+=this.ya(b);return a};g.B=function(){F.F.B.call(this);delete this.b;delete this.Z;delete this.g};var ub=window.yt&&window.yt.config_||{};y("yt.config_",ub);y("yt.tokens_",window.yt&&window.yt.tokens_||{});var vb=window.yt&&window.yt.msgs_||{};y("yt.msgs_",vb);function wb(a){xb(ub,arguments)}function G(a,b){return a in ub?ub[a]:b}function yb(){return G("XSRF_TOKEN")}function H(a,b){fa(a)&&(a=zb(a));return window.setTimeout(a,b)}function Ab(a,b){fa(a)&&(a=zb(a));window.setInterval(a,b)}function I(a){window.clearTimeout(a)}
function zb(a){return a&&window.yterr?function(){try{return a.apply(this,arguments)}catch(b){throw Bb(b),b;}}:a}function Bb(a,b){if(window&&window.yterr){var c=q("yt.www.errors.log");c?c(a,b):(c=G("ERRORS")||[],c.push([a,b]),wb("ERRORS",c))}}function Cb(a,b){var c={},d=a in vb?vb[a]:b;if(d)for(var e in c)d=d.replace(new RegExp("\\$"+e,"gi"),function(){return c[e]});return d}function xb(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 Db="Microsoft Internet Explorer"==navigator.appName;var Eb=q("yt.pubsub.instance_")||new F;F.prototype.subscribe=F.prototype.subscribe;F.prototype.unsubscribeByKey=F.prototype.ha;F.prototype.publish=F.prototype.q;F.prototype.clear=F.prototype.clear;y("yt.pubsub.instance_",Eb);var Fb=q("yt.pubsub.subscribedKeys_")||{};y("yt.pubsub.subscribedKeys_",Fb);var Gb=q("yt.pubsub.topicToKeys_")||{};y("yt.pubsub.topicToKeys_",Gb);var Hb=q("yt.pubsub.isSynchronous_")||{};y("yt.pubsub.isSynchronous_",Hb);var Ib=q("yt.pubsub.skipSubId_")||null;
y("yt.pubsub.skipSubId_",Ib);function J(a,b,c){var d=Jb();if(d){var e=d.subscribe(a,function(){if(!Ib||Ib!=e){var d=arguments,h=function(){Fb[e]&&b.apply(c||window,d)};try{Hb[a]?h():H(h,0)}catch(k){Bb(k)}}},c);Fb[e]=!0;Gb[a]||(Gb[a]=[]);Gb[a].push(e);return e}return 0}function Kb(a){var b=Jb();b&&("number"==typeof a?a=[a]:"string"==typeof a&&(a=[parseInt(a,10)]),C(a,function(a){b.unsubscribeByKey(a);delete Fb[a]}))}function K(a,b){var c=Jb();return c?c.publish.apply(c,arguments):!1}
function Lb(a){Gb[a]&&(a=Gb[a],C(a,function(a){Fb[a]&&delete Fb[a]}),a.length=0)}function Mb(a){var b=Jb();if(b)if(b.clear(a),a)Lb(a);else for(var c in Gb)Lb(c)}function Jb(){return q("yt.pubsub.instance_")};function Nb(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(Ob,""),c=c.replace(Pb,""),c=c.replace("debug-",""),c=c.replace("tracing-",""))}spf.script.load(a,c,b)}else Qb(a,b)}function Qb(a,b){var c=Rb(a),d=document.getElementById(c),e=d&&E(d,"loaded"),f=d&&!e;if(e)b&&b();else{if(b){var e=J(c,b),h=""+ha(b);Sb[h]=e}f||(d=Tb(a,c,function(){E(d,"loaded")||(mb(d,"loaded","true"),K(c),H(ma(Mb,c),0))}))}}
function Tb(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 Rb(a){var b=document.createElement("a");b.href=a;a=b.href.replace(/^[a-zA-Z]+:\/\//,"//");return"js-"+xa(a)}
var Ob=/-vfl[a-zA-Z0-9_+=-]+/,Pb=/-[a-zA-Z]{2,3}_[a-zA-Z]{2,3}(?=(\/|$))/,Sb={};var Ub=null;function Vb(){var a=G("BG_I",null),b=G("BG_IU",null),c=G("BG_P");b?Nb(b,function(){Ub=new botguard.bg(c)}):a&&(eval(a),Ub=new botguard.bg(c))};function Wb(a){if(a.classList)return a.classList;a=a.className;return u(a)&&a.match(/\S+/g)||[]}function Xb(a,b){return a.classList?a.classList.contains(b):Ha(Wb(a),b)}function Yb(a,b){a.classList?a.classList.add(b):Xb(a,b)||(a.className+=0<a.className.length?" "+b:b)}function Zb(a,b){a.classList?a.classList.remove(b):Xb(a,b)&&(a.className=Ca(Wb(a),function(a){return a!=b}).join(" "))}function $b(a,b,c){c?Yb(a,b):Zb(a,b)};function ac(a,b){this.x=p(a)?a:0;this.y=p(b)?b:0}ac.prototype.clone=function(){return new ac(this.x,this.y)};ac.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};ac.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};function bc(a,b){this.width=a;this.height=b}bc.prototype.clone=function(){return new bc(this.width,this.height)};bc.prototype.isEmpty=function(){return!(this.width*this.height)};bc.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};bc.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};var L;t:{var cc=l.navigator;if(cc){var dc=cc.userAgent;if(dc){L=dc;break t}}L=""};var ec,fc;function gc(){return l.navigator||null}var hc=ta(L,"Opera")||ta(L,"OPR"),M=ta(L,"Trident")||ta(L,"MSIE"),ic=ta(L,"Gecko")&&!ta(L.toLowerCase(),"webkit")&&!(ta(L,"Trident")||ta(L,"MSIE")),jc=ta(L.toLowerCase(),"webkit"),kc=gc(),lc=kc&&kc.platform||"";ec=ta(lc,"Mac");fc=ta(lc,"Win");var mc=!!gc()&&ta(gc().appVersion||"","X11");function nc(){var a=l.document;return a?a.documentMode:void 0}
var oc=function(){var a="",b;if(hc&&l.opera)return a=l.opera.version,fa(a)?a():a;ic?b=/rv\:([^\);]+)(\)|;)/:M?b=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:jc&&(b=/WebKit\/(\S+)/);b&&(a=(a=b.exec(L))?a[1]:"");return M&&(b=nc(),b>parseFloat(a))?String(b):a}(),pc={};function qc(a){return pc[a]||(pc[a]=0<=va(oc,a))}function rc(a){return M&&sc>=a}var tc=l.document,sc=tc&&M?nc()||("CSS1Compat"==tc.compatMode?parseInt(oc,10):5):void 0;!ic&&!M||M&&rc(9)||ic&&qc("1.9.1");M&&qc("9");function uc(a){return a?new vc(wc(a)):na||(na=new vc)}function xc(a){return N(a)}function N(a){var b=document;return u(a)?b.getElementById(a):a}function yc(a){var b=document;return b.querySelectorAll&&b.querySelector?b.querySelectorAll("."+a):zc(a,void 0)}
function zc(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&&Ha(k.split(/\s+/),a)&&(f[e++]=c)}f.length=e;return f}return h}function Ac(a){return"CSS1Compat"==a.compatMode}
function Bc(a){if(!a)return null;if(a.firstChild)return a.firstChild;for(;a&&!a.nextSibling;)a=a.parentNode;return a?a.nextSibling:null}function Cc(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){return 9==a.nodeType?a:a.ownerDocument||a.document}function Dc(a){var b=Ec.Ne;return b?Fc(a,function(a){return!b||u(a.className)&&Ha(a.className.split(/\s+/),b)},!0):null}
function Fc(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 vc(a){this.b=a||l.document||document}vc.prototype.createElement=function(a){return this.b.createElement(a)};function Gc(a){var b=a.b;a=!jc&&Ac(b)?b.documentElement:b.body||b.documentElement;b=b.parentWindow||b.defaultView;return M&&qc("10")&&b.pageYOffset!=a.scrollTop?new ac(a.scrollLeft,a.scrollTop):new ac(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}
vc.prototype.appendChild=function(a,b){a.appendChild(b)};vc.prototype.contains=function(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};var Hc=jc?"webkit":ic?"moz":M?"ms":hc?"o":"",Ic=q("yt.dom.getNextId_");if(!Ic){Ic=function(){return++Jc};y("yt.dom.getNextId_",Ic);var Jc=0}function Kc(){var a=document,b;Da(["fullscreenElement","fullScreenElement"],function(c){c in a?b=a[c]:(c=Hc+c.charAt(0).toUpperCase()+c.substr(1),b=c in a?a[c]:void 0);return!!b});return b};function Lc(a){if(a=a||window.event){for(var b in a)b in Mc||(this[b]=a[b]);this.Pb=a;(b=a.target||a.srcElement)&&3==b.nodeType&&(b=b.parentNode);this.target=b;if(b=a.relatedTarget)try{b=b.nodeName&&b}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=Lc.prototype;g.Pb=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.Pb.returnValue=!1;this.Pb.preventDefault&&this.Pb.preventDefault()};var Mc={stopImmediatePropagation:1,stopPropagation:1,preventMouseEvent:1,preventManipulation:1,preventDefault:1,layerX:1,layerY:1,scale:1,rotation:1};var db=q("yt.events.listeners_")||{};y("yt.events.listeners_",db);var Nc=q("yt.events.counter_")||{count:0};y("yt.events.counter_",Nc);function Oc(a,b,c,d){return cb(function(e){return e[0]==a&&e[1]==b&&e[2]==c&&e[4]==!!d})}
function O(a,b,c,d){if(!a||!a.addEventListener&&!a.attachEvent)return"";d=!!d;var e=Oc(a,b,c,d);if(e)return e;var e=++Nc.count+"",f=!("mouseenter"!=b&&"mouseleave"!=b||!a.addEventListener||"onmouseenter"in document),h;h=f?function(d){d=new Lc(d);if(!Fc(d.relatedTarget,function(b){return b==a},!0))return d.currentTarget=a,d.type=b,c.call(a,d)}:function(b){b=new Lc(b);b.currentTarget=a;return c.call(a,b)};h=zb(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 Pc(a){a&&("string"==typeof a&&(a=[a]),C(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]}}))};var Qc=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function Rc(a){if(Sc){Sc=!1;var b=l.location;if(b){var c=b.href;if(c&&(c=Tc(c))&&c!=b.hostname)throw Sc=!0,Error();}}return a.match(Qc)}var Sc=jc;function Tc(a){return(a=Rc(a)[3]||null)&&decodeURIComponent(a)}
function Uc(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 Vc(a,b,c){if(t(b))for(var d=0;d<b.length;d++)Vc(a,String(b[d]),c);else null!=b&&c.push("&",a,""===b?"":"=",encodeURIComponent(String(b)))}function Wc(a,b,c){Math.max(b.length-(c||0),0);for(c=c||0;c<b.length;c+=2)Vc(b[c],b[c+1],a);return a}function Xc(a,b){for(var c in b)Vc(c,b[c],a);return a}
function Yc(a){a=Xc([],a);a[0]="";return a.join("")}function Zc(a,b){return Uc(2==arguments.length?Wc([a],arguments[1],0):Wc([a],arguments,1))}function $c(a,b){return Uc(Xc([a],b))};function ad(a){this.b=a}var bd=/\s*;\s*/;g=ad.prototype;g.set=function(a,b,c,d,e,f){if(/[;=\s]/.test(a))throw Error('Invalid cookie name "'+a+'"');if(/[;\r\n]/.test(b))throw Error('Invalid cookie value "'+b+'"');p(c)||(c=-1);e=e?";domain="+e:"";d=d?";path="+d:"";f=f?";secure":"";c=0>c?"":0==c?";expires="+(new Date(1970,1,1)).toUTCString():";expires="+(new Date(w()+1E3*c)).toUTCString();this.b.cookie=a+"="+b+e+d+c+f};
g.get=function(a,b){for(var c=a+"=",d=(this.b.cookie||"").split(bd),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=p(this.get(a));this.set(a,"",0,b,c);return d};g.na=function(){return cd(this).keys};g.ka=function(){return cd(this).fe};g.isEmpty=function(){return!this.b.cookie};g.ya=function(){return this.b.cookie?(this.b.cookie||"").split(bd).length:0};g.clear=function(){for(var a=cd(this).keys,b=a.length-1;0<=b;b--)this.remove(a[b])};
function cd(a){a=(a.b.cookie||"").split(bd);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,fe:c}}var dd=new ad(document);dd.g=3950;function ed(a,b,c){dd.set(""+a,b,c,"/","youtube.com")};function fd(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=pa(e[0]||""),e=pa(e[1]||"");f in b?t(b[f])?Qa(b[f],e):b[f]=[b[f],e]:b[f]=e}}return b}var gd=Tc;function hd(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=fd(d[1]||""),e;for(e in b)d[e]=b[e];return $c(a,d)+c}
function id(a){a=gd(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 jd(a,b){var c=Tc(a);if(c==Tc(window.location.href)||!c&&0==a.lastIndexOf("/",0)){var d=Rc(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="s_tempdata-"+xa(c),e=b?Yc(b):"",ed(c,e,5)}};function kd(a,b,c){var d=G("EVENT_ID");d&&(b||(b={}),b.ei||(b.ei=d));b&&jd(a,b);if(c)return!1;(window.ytspf||{}).enabled?spf.navigate(a):window.location=$c(a,{})+"";return!0};function ld(a,b,c){a.timeOfStartCall=(new Date).getTime();if(b&&JSON&&JSON.stringify){var d=JSON.stringify(b);200>=d.length&&(a.psdJson=d)}d=c||l;d.GOOGLE_FEEDBACK_START_ARGUMENTS=arguments;var e=a.serverUri||"//www.google.com/tools/feedback",f=d.GOOGLE_FEEDBACK_START;if(f)f.apply(d,arguments);else{var e=e+"/load.js?",h;for(h in a)f=a[h],null!=f&&!ga(f)&&(e+=encodeURIComponent(h)+"="+encodeURIComponent(f)+"&");h=d.document;d=h.createElement("script");d.src=e;h.body.appendChild(d)}};var md=!1;function nd(a){if(a=a.match(/[\d]+/g))a.length=3,a.join(".")}
if(navigator.plugins&&navigator.plugins.length){var od=navigator.plugins["Shockwave Flash"];od&&(md=!0,od.description&&nd(od.description));navigator.plugins["Shockwave Flash 2.0"]&&(md=!0)}else if(navigator.mimeTypes&&navigator.mimeTypes.length){var pd=navigator.mimeTypes["application/x-shockwave-flash"];(md=pd&&pd.enabledPlugin)&&nd(pd.enabledPlugin.description)}else try{var qd=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),md=!0;nd(qd.GetVariable("$version"))}catch(rd){try{qd=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),
md=!0}catch(sd){try{qd=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),md=!0,nd(qd.GetVariable("$version"))}catch(td){}}};var ud,vd,wd,xd,yd,zd,Ad;Ad=zd=yd=xd=wd=vd=ud=!1;var Bd=L;Bd&&(-1!=Bd.indexOf("Firefox")?ud=!0:-1!=Bd.indexOf("Camino")?vd=!0:-1!=Bd.indexOf("iPhone")||-1!=Bd.indexOf("iPod")?wd=!0:-1!=Bd.indexOf("iPad")?xd=!0:-1!=Bd.indexOf("Chrome")?zd=!0:-1!=Bd.indexOf("Android")?yd=!0:-1!=Bd.indexOf("Safari")&&(Ad=!0));var Cd=ud,Dd=vd,Ed=wd,Fd=xd,Gd=yd,Hd=zd,Id=Ad;function Jd(a){return(a=a.exec(L))?a[1]:""}(function(){if(Cd)return Jd(/Firefox\/([0-9.]+)/);if(M||hc)return oc;if(Hd)return Jd(/Chrome\/([0-9.]+)/);if(Id)return Jd(/Version\/([0-9.]+)/);if(Ed||Fd){var a;if(a=/Version\/(\S+).*Mobile\/(\S+)/.exec(L))return a[1]+"."+a[2]}else{if(Gd)return(a=Jd(/Android\s+([0-9.]+)/))?a:Jd(/Version\/([0-9.]+)/);if(Dd)return Jd(/Camino\/([0-9.]+)/)}return""})();function Kd(){this.i=this.g=this.b=0;this.j="";var a=q("window.navigator.plugins"),b=q("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.j=b;b=a;this.b=b[0];this.g=b[1];this.i=b[2];if(0>=this.b){var h,k,m,n;if(Db)try{h=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(s){h=null}else m=document.body,n=document.createElement("object"),n.setAttribute("type","application/x-shockwave-flash"),h=m.appendChild(n);if(h&&"GetVariable"in h)try{k=h.GetVariable("$version")}catch(x){k=""}m&&n&&m.removeChild(n);(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.b=h[0];this.g=h[1];this.i=h[2]}}ba(Kd);Kd.prototype.getVersion=function(){return[this.b,this.g,this.i]};function Ld(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.b>b[0]||a.b==b[0]&&a.g>b[1]||a.b==b[0]&&a.g==b[1]&&a.i>=b[2]}function Md(a){return-1<a.j.indexOf("Gnash")&&-1==a.j.indexOf("AVM2")||9==a.b&&1==a.g||9==a.b&&0==a.g&&1==a.i?!1:9<=a.b}
function Nd(a){return fc?!Ld(a,11,2):ec?!Ld(a,11,3):!Md(a)};function Od(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}Od.prototype.clone=function(){return new Od(this.top,this.right,this.bottom,this.left)};Od.prototype.contains=function(a){return this&&a?a instanceof Od?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};
Od.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};Od.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 Pd(a,b){var c=wc(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function Qd(a,b){return Pd(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style&&a.style[b]}
function Rd(a){var b;try{b=a.getBoundingClientRect()}catch(c){return{left:0,top:0,right:0,bottom:0}}M&&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 Sd(a){if(M&&!rc(8))return a.offsetParent;var b=wc(a),c=Qd(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=Qd(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return null}
function Td(a){var b,c=wc(a),d=Qd(a,"position"),e=ic&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),f=new ac(0,0),h;b=c?wc(c):document;(h=!M||rc(9))||(h=uc(b),h=Ac(h.b));h=h?b.documentElement:b.body;if(a==h)return f;if(a.getBoundingClientRect)b=Rd(a),a=Gc(uc(c)),f.x=b.left+a.x,f.y=b.top+a.y;else if(c.getBoxObjectFor&&!e)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(h),f.x=b.screenX-a.screenX,f.y=b.screenY-a.screenY;else{e=a;do{f.x+=e.offsetLeft;
f.y+=e.offsetTop;e!=a&&(f.x+=e.clientLeft||0,f.y+=e.clientTop||0);if(jc&&"fixed"==Qd(e,"position")){f.x+=c.body.scrollLeft;f.y+=c.body.scrollTop;break}e=e.offsetParent}while(e&&e!=a);if(hc||jc&&"absolute"==d)f.y-=c.body.offsetTop;for(e=a;(e=Sd(e))&&e!=c.body&&e!=h;)f.x-=e.scrollLeft,hc&&"TR"==e.tagName||(f.y-=e.scrollTop)}return f}function Ud(a,b){"number"==typeof a&&(a=(b?Math.round(a):a)+"px");return a}
function Vd(a){var b=Wd;if("none"!=Qd(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 Wd(a){var b=a.offsetWidth,c=a.offsetHeight,d=jc&&!b&&!c;return p(b)&&!d||!a.getBoundingClientRect?new bc(b,c):(a=Rd(a),new bc(a.right-a.left,a.bottom-a.top))}
function Xd(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 Yd(a,b){var c=a.currentStyle?a.currentStyle[b]:null;return c?Xd(a,c):0}var Zd={thin:2,medium:4,thick:6};
function $d(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 Zd?Zd[c]:Xd(a,c)}var ae=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;lb("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));lb("action","cite","data","formaction","href","manifest","poster","src");lb("link","script","style");function be(a,b){(a=N(a))&&a.style&&(a.style.display=b?"":"none",$b(a,"hid",!b))}function ce(a){C(arguments,function(a){be(a,!0)})}function de(a){C(arguments,function(a){be(a,!1)})};var ee={};
function fe(a,b){try{var c=G("FEEDBACK_LOCALE_EXTRAS",{});b?kb(ee,b):kb(ee,c);try{var d,e=q("yt.player.getPlayerByElement");(d=e?e("player-api"):null)&&d.pauseVideo&&d.pauseVideo();var f=Kd.getInstance();ee.flashVersion=f.getVersion().join(".");d&&(ee.playback_id=d.getVideoData().cpn)}catch(h){}var k=G("SESSION_INDEX"),m=G("FEEDBACK_BUCKET_ID"),n={abuseLink:"https://support.google.com/youtube/bin/answer.py?answer=140536",customZIndex:"2000000005",locale:G("FEEDBACK_LOCALE_LANGUAGE"),productId:(a||"59")+
""};k&&(n.authuser=k+"");m&&(n.bucket=m);var s=window.GOOGLE_FEEDBACK_DESTROY_FUNCTION;s&&s();ld(n,ee);return!1}catch(x){return!0}};function ge(a){a=a||{};this.url=a.url||"";this.urlV8=a.url_v8||"";this.urlV9As2=a.url_v9as2||"";this.args=a.args||gb(he);this.assets=a.assets||{};this.attrs=a.attrs||gb(ie);this.params=a.params||gb(je);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}var he={enablejsapi:1},ie={},je={allowscriptaccess:"always",allowfullscreen:"true",bgcolor:"#000000"};
function ke(a){a instanceof ge||(a=new ge(a));return a}ge.prototype.clone=function(){var a=new ge,b;for(b in this){var c=this[b];"object"==ca(c)?a[b]=gb(c):a[b]=c}return a};function le(){var a;if(a=dd.get("PREF",void 0)){a=unescape(a).split("&");for(var b=0;b<a.length;b++){var c=a[b].split("="),d=c[0];(c=c[1])&&(me[d]=c.toString())}}}ba(le);var me=q("yt.prefs.UserPrefs.prefs_")||{};y("yt.prefs.UserPrefs.prefs_",me);function ne(a){if(/^f([1-9][0-9]*)$/.test(a))throw"ExpectedRegexMatch: "+a;}function oe(a){if(!/^\w+$/.test(a))throw"ExpectedRegexMismatch: "+a;}function pe(a){return void 0!==me[a]?me[a].toString():null}
le.prototype.get=function(a,b){oe(a);ne(a);var c=pe(a);return null!=c?c:b?b:""};le.prototype.set=function(a,b){oe(a);ne(a);if(null==b)throw"ExpectedNotNull";me[a]=b.toString()};le.prototype.remove=function(a){oe(a);ne(a);delete me[a]};le.prototype.clear=function(){me={}};function qe(a,b,c){if(b){a=u(a)?N(a):a;c=ke(c);var d=gb(c.attrs);d.tabindex=0;var e=gb(c.params);e.flashvars=Yc(c.args);if(Db){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 re(a,b,c){if(a&&a.attrs&&a.attrs.id){a=ke(a);var d=!!b,e=N(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);id(k)||(h=k)}else h="unknown";h&&(d=!0,a.args.framer=h)}h=se();if(Ld(h,a.minVersion)){var k=te(a,h),m="";-1<navigator.userAgent.indexOf("Sony/COM2")||(m=e.getAttribute("src")||e.movie);(m!=k||d)&&qe(f,k,a);Nd(h)&&ue()}else ve(f,a,h);c&&c()}else H(function(){re(a,b,c)},50)}}
function ve(a,b,c){0==c.b&&b.fallback?b.fallback():0==c.b&&b.fallbackMessage?b.fallbackMessage():a.innerHTML='<div id="flash-upgrade">'+Cb("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>')+"</div>"}function te(a,b){return Md(b)&&a.url||(-1<navigator.userAgent.indexOf("Sony/COM2")&&!Ld(b,9,1,58)?!1:!0)&&a.urlV9As2||a.urlV8||a.url}
function se(){var a=Kd.getInstance();le.getInstance().set("fv",a.getVersion().join("."));var b;b=[];for(var c in me)b.push(c+"="+escape(me[c]));b=b.join("&");ed("PREF",b,63072E3);return a}function ue(){var a=N("flash10-promo-div"),b;le.getInstance();b=pe("f"+(Math.floor(107/31)+1));b=!!(((null!=b&&/^[A-Fa-f0-9]+$/.test(b)?parseInt(b,16):null)||0)&16384);a&&!b&&ce(a)};function we(a){if(window.spf){var b=a.match(xe);spf.style.load(a,b?b[1]:"",void 0)}else ye(a)}function ye(a){var b=ze(a),c=document.getElementById(b),d=c&&E(c,"loaded");d||c&&!d||(c=Ae(a,b,function(){E(c,"loaded")||(mb(c,"loaded","true"),K(b),H(ma(Mb,b),0))}))}function Ae(a,b,c){var d=document.createElement("link");d.id=b;d.rel="stylesheet";d.onload=function(){c&&setTimeout(c,0)};d.href=a;(document.getElementsByTagName("head")[0]||document.body).appendChild(d);return d}
function ze(a){var b=document.createElement("a");b.href=a;a=b.href.replace(/^[a-zA-Z]+:\/\//,"//");return"css-"+xa(a)}var xe=/cssbin\/(?:debug-)?([a-zA-Z0-9_-]+?)(?:-2x|-web|-rtl|-vfl|.css)/;var Be;var Ce=L,Ce=Ce.toLowerCase();if(ta(Ce,"android")){var De=Ce.match(/android\D*(\d\.\d)[^\;|\)]*[\;\)]/);if(De)Be=Number(De[1]);else{var Ee={cupcake:1.5,donut:1.6,eclair:2,froyo:2.2,gingerbread:2.3,honeycomb:3,"ice cream sandwich":4,jellybean:4.1},Fe=Ce.match("("+bb(Ee).join("|")+")");Be=Fe?Ee[Fe[0]]:0}}else Be=void 0;function Ge(){if(2.2==Be)return!0;var a;a=q("yt.player.utils.videoElement_");a||(a=document.createElement("video"),y("yt.player.utils.videoElement_",a));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}};var He="StopIteration"in l?l.StopIteration:Error("StopIteration");function Ie(){}Ie.prototype.next=function(){throw He;};Ie.prototype.ja=function(){return this};function Je(a){if(a instanceof Ie)return a;if("function"==typeof a.ja)return a.ja(!1);if(da(a)){var b=0,c=new Ie;c.next=function(){for(;;){if(b>=a.length)throw He;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");}
function Ke(a,b,c){if(da(a))try{C(a,b,c)}catch(d){if(d!==He)throw d;}else{a=Je(a);try{for(;;)b.call(c,a.next(),void 0,a)}catch(e){if(e!==He)throw e;}}}function Le(a){if(da(a))return Pa(a);a=Je(a);var b=[];Ke(a,function(a){b.push(a)});return b};function Me(a,b){this.g={};this.b=[];this.j=this.i=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)this.set(arguments[d],arguments[d+1])}else if(a){a instanceof Me?(c=a.na(),d=a.ka()):(c=bb(a),d=ab(a));for(var e=0;e<c.length;e++)this.set(c[e],d[e])}}g=Me.prototype;g.ya=function(){return this.i};g.ka=function(){Ne(this);for(var a=[],b=0;b<this.b.length;b++)a.push(this.g[this.b[b]]);return a};g.na=function(){Ne(this);return this.b.concat()};
g.equals=function(a,b){if(this===a)return!0;if(this.i!=a.ya())return!1;var c=b||Oe;Ne(this);for(var d,e=0;d=this.b[e];e++)if(!c(this.get(d),a.get(d)))return!1;return!0};function Oe(a,b){return a===b}g.isEmpty=function(){return 0==this.i};g.clear=function(){this.g={};this.j=this.i=this.b.length=0};g.remove=function(a){return Pe(this.g,a)?(delete this.g[a],this.i--,this.j++,this.b.length>2*this.i&&Ne(this),!0):!1};
function Ne(a){if(a.i!=a.b.length){for(var b=0,c=0;b<a.b.length;){var d=a.b[b];Pe(a.g,d)&&(a.b[c++]=d);b++}a.b.length=c}if(a.i!=a.b.length){for(var e={},c=b=0;b<a.b.length;)d=a.b[b],Pe(e,d)||(a.b[c++]=d,e[d]=1),b++;a.b.length=c}}g.get=function(a,b){return Pe(this.g,a)?this.g[a]:b};g.set=function(a,b){Pe(this.g,a)||(this.i++,this.b.push(a),this.j++);this.g[a]=b};g.forEach=function(a,b){for(var c=this.na(),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 Me(this)};
g.ja=function(a){Ne(this);var b=0,c=this.b,d=this.g,e=this.j,f=this,h=new Ie;h.next=function(){for(;;){if(e!=f.j)throw Error("The map has changed since the iterator was created");if(b>=c.length)throw He;var h=c[b++];return a?h:d[h]}};return h};function Pe(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function Qe(a){if("function"==typeof a.ka)return a.ka();if(u(a))return a.split("");if(da(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return ab(a)}
function Re(a,b){if("function"==typeof a.forEach)a.forEach(b,void 0);else if(da(a)||u(a))C(a,b,void 0);else{var c;if("function"==typeof a.na)c=a.na();else if("function"!=typeof a.ka)if(da(a)||u(a)){c=[];for(var d=a.length,e=0;e<d;e++)c.push(e)}else c=bb(a);else c=void 0;for(var d=Qe(a),e=d.length,f=0;f<e;f++)b.call(void 0,d[f],c&&c[f],a)}};function Se(a,b){var c;a instanceof Se?(this.Ha=p(b)?b:a.Ha,Te(this,a.Ta),this.Cb=a.Cb,Ue(this,a.Sa),Ve(this,a.ib),this.kb=a.kb,We(this,a.b.clone()),this.Bb=a.Bb):a&&(c=Rc(String(a)))?(this.Ha=!!b,Te(this,c[1]||"",!0),this.Cb=Xe(c[2]||""),Ue(this,c[3]||"",!0),Ve(this,c[4]),this.kb=Xe(c[5]||""),We(this,c[6]||"",!0),this.Bb=Xe(c[7]||"")):(this.Ha=!!b,this.b=new Ye(null,0,this.Ha))}g=Se.prototype;g.Ta="";g.Cb="";g.Sa="";g.ib=null;g.kb="";g.Bb="";g.Ha=!1;
g.toString=function(){var a=[],b=this.Ta;b&&a.push(Ze(b,$e),":");if(b=this.Sa){a.push("//");var c=this.Cb;c&&a.push(Ze(c,$e),"@");a.push(encodeURIComponent(String(b)));b=this.ib;null!=b&&a.push(":",String(b))}if(b=this.kb)this.Sa&&"/"!=b.charAt(0)&&a.push("/"),a.push(Ze(b,"/"==b.charAt(0)?af:bf));(b=this.b.toString())&&a.push("?",b);(b=this.Bb)&&a.push("#",Ze(b,cf));return a.join("")};g.clone=function(){return new Se(this)};function Te(a,b,c){a.Ta=c?Xe(b):b;a.Ta&&(a.Ta=a.Ta.replace(/:$/,""))}
function Ue(a,b,c){a.Sa=c?Xe(b):b}function Ve(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.ib=b}else a.ib=null}function We(a,b,c){b instanceof Ye?(a.b=b,df(a.b,a.Ha)):(c||(b=Ze(b,ef)),a.b=new Ye(b,0,a.Ha))}function P(a,b,c){a.b.set(b,c)}function ff(a,b,c){t(c)||(c=[String(c)]);gf(a.b,b,c)}function hf(a){P(a,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^w()).toString(36));return a}
function jf(a){return a instanceof Se?a.clone():new Se(a,void 0)}function kf(a,b,c,d){var e=new Se(null,void 0);a&&Te(e,a);b&&Ue(e,b);c&&Ve(e,c);d&&(e.kb=d);return e}function Xe(a){return a?decodeURIComponent(a):""}function Ze(a,b){return u(a)?encodeURI(a).replace(b,lf):null}function lf(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var $e=/[#\/\?@]/g,bf=/[\#\?:]/g,af=/[\#\?]/g,ef=/[\#\?@]/g,cf=/#/g;function Ye(a,b,c){this.b=a||null;this.g=!!c}
function mf(a){if(!a.H&&(a.H=new Me,a.V=0,a.b))for(var b=a.b.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null,f=null;0<=d?(e=b[c].substring(0,d),f=b[c].substring(d+1)):e=b[c];e=pa(e);e=nf(a,e);a.add(e,f?pa(f):"")}}g=Ye.prototype;g.H=null;g.V=null;g.ya=function(){mf(this);return this.V};g.add=function(a,b){mf(this);this.b=null;a=nf(this,a);var c=this.H.get(a);c||this.H.set(a,c=[]);c.push(b);this.V++;return this};
g.remove=function(a){mf(this);a=nf(this,a);return Pe(this.H.g,a)?(this.b=null,this.V-=this.H.get(a).length,this.H.remove(a)):!1};g.clear=function(){this.H=this.b=null;this.V=0};g.isEmpty=function(){mf(this);return 0==this.V};function of(a,b){mf(a);b=nf(a,b);return Pe(a.H.g,b)}g.na=function(){mf(this);for(var a=this.H.ka(),b=this.H.na(),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.ka=function(a){mf(this);var b=[];if(u(a))of(this,a)&&(b=Oa(b,this.H.get(nf(this,a))));else{a=this.H.ka();for(var c=0;c<a.length;c++)b=Oa(b,a[c])}return b};g.set=function(a,b){mf(this);this.b=null;a=nf(this,a);of(this,a)&&(this.V-=this.H.get(a).length);this.H.set(a,[b]);this.V++;return this};g.get=function(a,b){var c=a?this.ka(a):[];return 0<c.length?String(c[0]):b};function gf(a,b,c){a.remove(b);0<c.length&&(a.b=null,a.H.set(nf(a,b),Pa(c)),a.V+=c.length)}
g.toString=function(){if(this.b)return this.b;if(!this.H)return"";for(var a=[],b=this.H.na(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.ka(d),f=0;f<d.length;f++){var h=e;""!==d[f]&&(h+="="+encodeURIComponent(String(d[f])));a.push(h)}return this.b=a.join("&")};g.clone=function(){var a=new Ye;a.b=this.b;this.H&&(a.H=this.H.clone(),a.V=this.V);return a};function nf(a,b){var c=String(b);a.g&&(c=c.toLowerCase());return c}
function df(a,b){b&&!a.g&&(mf(a),a.b=null,a.H.forEach(function(a,b){var e=b.toLowerCase();b!=e&&(this.remove(b),gf(this,e,a))},a));a.g=b};var pf=/^https?:\/\/([A-Za-z0-9-]{1,63}\.)*(corp\.google\.com|prod\.google\.com|video\.google\.com|youtube\.com|youtube\.googleapis\.com|youtube-nocookie\.com|youtubeeducation\.com)(:[0-9]+)?\/embed\//;var qf="corp.google.com googleplex.com youtube.com youtube-nocookie.com youtubeeducation.com prod.google.com sandbox.google.com docs.google.com drive.google.com mail.google.com plus.google.com play.google.com googlevideo.com talkgadget.google.com 101epmpngvqtgfsf73utp3aomcvh4be6-a-hangout-opensocial.googleusercontent.com mb33edaaot4tnevadfqhve4857kpq1rs-a-hangout-opensocial.googleusercontent.com ot5106nq9r49sc62k7h52rtfngv5j94j-a-hangout-opensocial.googleusercontent.com survey.g.doubleclick.net".split(" "),
rf="";function sf(a){return a&&a==rf?!0:(new RegExp("^(https?:)?//([a-z0-9-]{1,63}\\.)*("+qf.join("|").replace(/\./g,".")+")(:[0-9]+)?([/?#]|$)","i")).test(a)?(rf=a,!0):!1};function tf(){};function uf(){}z(uf,tf);uf.prototype.ya=function(){var a=0;Ke(this.ja(!0),function(){a++});return a};uf.prototype.clear=function(){var a=Le(this.ja(!0)),b=this;C(a,function(a){b.remove(a)})};function vf(a){this.b=a}z(vf,uf);g=vf.prototype;g.isAvailable=function(){if(!this.b)return!1;try{return this.b.setItem("__sak","1"),this.b.removeItem("__sak"),!0}catch(a){return!1}};g.set=function(a,b){try{this.b.setItem(a,b)}catch(c){if(0==this.b.length)throw"Storage mechanism: Storage disabled";throw"Storage mechanism: Quota exceeded";}};g.get=function(a){a=this.b.getItem(a);if(!u(a)&&null!==a)throw"Storage mechanism: Invalid value was encountered";return a};g.remove=function(a){this.b.removeItem(a)};
g.ya=function(){return this.b.length};g.ja=function(a){var b=0,c=this.b,d=new Ie;d.next=function(){if(b>=c.length)throw He;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.b.clear()};g.key=function(a){return this.b.key(a)};function wf(){var a=null;try{a=window.localStorage||null}catch(b){}this.b=a}z(wf,vf);function xf(){var a=null;try{a=window.sessionStorage||null}catch(b){}this.b=a}z(xf,vf);function yf(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 zf(a){return eval("("+a+")")}function Q(a){return Af(new Bf(void 0),a)}function Bf(a){this.b=a}
function Af(a,b){var c=[];Cf(a,b,c);return c.join("")}
function Cf(a,b,c){switch(typeof b){case "string":Df(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(t(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Cf(a,a.b?a.b.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),Df(f,c),c.push(":"),
Cf(a,a.b?a.b.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Ef={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ff=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
function Df(a,b){b.push('"',a.replace(Ff,function(a){if(a in Ef)return Ef[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ef[a]=e+b.toString(16)}),'"')};function Gf(a){this.b=a}Gf.prototype.set=function(a,b){p(b)?this.b.set(a,Q(b)):this.b.remove(a)};Gf.prototype.get=function(a){var b;try{b=this.b.get(a)}catch(c){return}if(null!==b)try{return yf(b)}catch(d){throw"Storage: Invalid value was encountered";}};Gf.prototype.remove=function(a){this.b.remove(a)};function Hf(a){this.b=a}z(Hf,Gf);function If(a){this.data=a}function Jf(a){return!p(a)||a instanceof If?a:new If(a)}function Kf(a){a=a.data;if(!p(a))throw"Storage: Invalid value was encountered";return a}Hf.prototype.set=function(a,b){Hf.F.set.call(this,a,Jf(b))};Hf.prototype.jb=function(a){a=Hf.F.get.call(this,a);if(!p(a)||a instanceof Object)return a;throw"Storage: Invalid value was encountered";};Hf.prototype.get=function(a){return(a=this.jb(a))?Kf(a):void 0};function Lf(a){this.b=a}z(Lf,Hf);function Mf(a){var b=a.creation;a=a.expiration;return!!a&&a<w()||!!b&&b>w()}Lf.prototype.set=function(a,b,c){if(b=Jf(b)){if(c){if(c<w()){Lf.prototype.remove.call(this,a);return}b.expiration=c}b.creation=w()}Lf.F.set.call(this,a,b)};Lf.prototype.jb=function(a,b){var c=Lf.F.jb.call(this,a);if(c)if(!b&&Mf(c))Lf.prototype.remove.call(this,a);else return c};function Nf(a){this.b=a}z(Nf,Lf);function Of(a,b,c){var d=[];Ke(b,function(a){var b;try{b=Nf.prototype.jb.call(this,a,!0)}catch(h){if("Storage: Invalid value was encountered"==h){c&&d.push(a);return}throw h;}if(!p(b))d.push(a);else if(Mf(b))d.push(a);else if(c)try{Kf(b)}catch(k){if("Storage: Invalid value was encountered"==k)d.push(a);else throw k;}},a);return d}function Pf(a,b,c){b=Of(a,b,c);C(b,function(a){Nf.prototype.remove.call(this,a)},a);return b}
Nf.prototype.g=function(a){Pf(this,this.b.ja(!0),a)};function R(a,b,c){var d=c&&0<c?c:0;c=d?w()+1E3*d:0;if((d=d?Qf:Rf)&&window.JSON){u(b)||(b=JSON.stringify(b,void 0));try{d.set(a,b,c)}catch(e){d.remove(a)}}}function S(a){if(!Rf&&!Qf||!window.JSON)return null;var b;try{b=Rf.get(a)}catch(c){}if(!u(b))try{b=Qf.get(a)}catch(d){}if(!u(b))return null;try{b=JSON.parse(b,void 0)}catch(e){}return b}function Sf(a){Rf&&Rf.remove(a);Qf&&Qf.remove(a)}var Qf,Tf=new wf;Qf=Tf.isAvailable()?new Nf(Tf):null;var Rf,Uf=new xf;Rf=Uf.isAvailable()?new Nf(Uf):null;function Vf(){var a={volume:100,muted:!1},b=S("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 Wf(a,b){this.i=this.Aa=a;this.G=b;this.k=!1;this.b={};this.T=this.D=null;this.L=new F;qb(this,this.L);this.j={};this.o=this.ca=this.g=this.za=this.A=null;this.O=!1;this.ma=this.p=null;this.ba={};this.jd=["onReady"];this.La=null;this.jc=0;if(this.u=!!G("PLAYER_ENABLE_SHARED_UI"))this.Aa=document.createElement("div"),this.i.appendChild(this.Aa),this.i.style.position="relative";this.la=!1;this.kc=!!G("PLAYER_PERSISTENCE_REFACTOR");Xf(this);this.Ka("onVolumeChange",v(this.md,this));this.Ka("onError",
v(this.ld,this));this.Ka("onTabOrderChange",v(this.kd,this));this.Ka("WATCH_LATER_VIDEO_ADDED",v(this.nd,this));this.Ka("WATCH_LATER_VIDEO_REMOVED",v(this.od,this))}z(Wf,pb);g=Wf.prototype;g.$b=function(a,b){this.C()||(Yf(this,a),Zf(this,b),this.k&&$f(this))};
function Yf(a,b){a.za=b;a.A=b.clone();a.g=a.A.attrs.id||a.g;"video-player"==a.g&&(a.g=a.G,a.A.attrs.id=a.G);a.i.id==a.g&&(a.g=a.g+"-player",a.A.attrs.id=a.g);var c=a.A.args,d;if(!(d=a.A.args.eurl)){d=document.location.toString();var e=!!d&&-1!=d.search(pf),f=-1!=d.indexOf("/embed/");e!=f&&Bb(Error(d+" behavior is not consistent"));d=f?document.referrer&&document.referrer.substring(0,128)||"unknown":d}c.eurl=d;a.A.args.enablejsapi="1";a.A.args.playerapiid=a.G;a.ca||(a.ca=ag(a,a.A.args.jsapicallback||
"onYouTubePlayerReady"));a.A.args.jsapicallback=null;a.u&&(a.A.args.controls="0");if(c=a.A.attrs.width)a.i.style.width=Ud(Number(c)||c,!0);if(c=a.A.attrs.height)a.i.style.height=Ud(Number(c)||c,!0);a.i.style.overflow="hidden"}g.Ld=function(){return this.za};function $f(a){a.A.loaded||(a.A.loaded=!0,"0"!=a.A.args.autoplay?a.b.loadVideoByPlayerVars(a.A.args):a.b.cueVideoByPlayerVars(a.A.args))}
function bg(a){if(!p(a.A.disable.flash)){var b=a.A.disable,c;c=Ld(se(),a.A.minVersion);b.flash=!c}return!a.A.disable.flash}function cg(a){var b=N(a.g);b&&b.stopVideo&&b.stopVideo();if(bg(a)){var c=a.A;b&&b.getUpdatedConfigurationData&&(b=ke(b.getUpdatedConfigurationData()),b.args.video_id==c.args.video_id&&(c=b));c.args.autoplay=1;c.args.html5_unavailable="1";Yf(a,c);Zf(a,"flash")}}
function Zf(a,b){if(!a.C()){if(!b){var c;if(!(c=!a.A.html5&&bg(a))){if(!p(a.A.disable.html5)){if(c=Ge())c=dg(a)||a.A.assets.js;a.A.disable.html5=!c;c||(a.A.args.html5_unavailable="1")}c=!!a.A.disable.html5}b=c?bg(a)?"flash":"unsupported":"html5"}("flash"==b?a.qe:"html5"==b?a.re:a.se).call(a);a.u&&!a.la&&eg(a)}}function dg(a){var b=!0;a.kc&&((b=N(a.g))&&a.A?(a=a.A,a=E(b,"version")==a.assets.js):a=!1,b=a);return b&&!!q("yt.player.Application.create")}
g.re=function(){if(!this.O){var a=!0;this.kc&&(a=dg(this));a&&"html5"==fg(this)?(this.o="html5",this.k||this.Na(!0)):(gg(this),this.o="html5",a&&this.ma?(this.Aa.appendChild(this.ma),this.Na()):(this.A.loaded=!0,this.p=v(function(){var a=this.Aa,c=this.A.clone();q("yt.player.Application.create")(a,c);this.Na()},this),this.O=!0,dg(this)?this.p():(Nb(this.A.assets.js,this.p),we(this.A.assets.css))))}};
g.qe=function(){var a=this.A.clone();a.attrs.width=a.attrs.width||"100%";a.attrs.height=a.attrs.height||"100%";if("flash"==fg(this))this.o="flash",this.k||re(a,!1,v(this.Na,this));else{gg(this);this.o="flash";this.A.loaded=!0;var b=this.Aa,b=u(b)?N(b):b,a=ke(a);if(window!=window.top){var c=null;document.referrer&&(c=document.referrer.substring(0,128));a.args.framer=c}c=se();Ld(c,a.minVersion)?(c=te(a,c),qe(b,c,a)):ve(b,a,c);this.Na()}};
g.Na=function(a){var b=N(this.g),c=!1;try{b&&b.getApiInterface&&b.getApiInterface()&&(c=!0)}catch(d){}if(c)if(this.O=!1,a&&b.isNotServable&&b.isNotServable())cg(this);else{Xf(this);this.k=!0;a=N(this.g);a.addEventListener&&(this.D=hg(this,a,"addEventListener"));a.removeEventListener&&(this.T=hg(this,a,"removeEventListener"));b=a.getApiInterface();b=b.concat(a.getInternalApiInterface());for(c=0;c<b.length;c++){var e=b[c];this.b[e]||(this.b[e]=hg(this,a,e))}for(var f in this.j)this.D(f,this.j[f]);$f(this);
this.ca&&this.ca(this.b);this.L.q("onReady",this.b)}else this.jc=H(v(this.Na,this),50)};function hg(a,b,c){var d=b[c];return function(){try{return a.La=null,d.apply(b,arguments)}catch(e){e.message+=" ("+c+")",a.La=e,Bb(e,"WARNING")}}}
function Xf(a){a.k=!1;if(a.T)for(var b in a.j)a.T(b,a.j[b]);a.D=null;a.T=null;for(var c in a.b)a.b[c]=null;a.b.addEventListener=v(a.Ka,a);a.b.removeEventListener=v(a.Od,a);a.b.destroy=v(a.dispose,a);a.b.getLastError=v(a.Md,a);a.b.getPlayerType=v(a.Nd,a);a.b.getCurrentVideoConfig=v(a.Ld,a);a.b.loadNewVideoConfig=v(a.$b,a);a.b.isReady=v(a.Pd,a)}g.Pd=function(){return this.k};
g.Ka=function(a,b){if(!this.C()){var c=ag(this,b);if(c){if(!Ha(this.jd,a)&&!this.j[a]){var d=ig(this,a);this.D&&this.D(a,d)}this.L.subscribe(a,c);"onReady"==a&&this.k&&H(ma(c,this.b),0)}}};g.Od=function(a,b){if(!this.C()){var c=ag(this,b);c&&this.L.Da(a,c)}};function ag(a,b){var c=b;if("string"==typeof b){if(a.ba[b])return a.ba[b];c=function(){var a=q(b);a&&a.apply(l,arguments)};a.ba[b]=c}return c?c:null}
function ig(a,b){var c="ytPlayer"+b+a.G;a.j[b]=c;l[c]=function(c){H(function(){a.C()||a.L.q(b,c)},0)};return c}g.kd=function(a){a=a?Cc:Bc;for(var b=a(document.activeElement);b&&(1!=b.nodeType||(b.focus(),b!=document.activeElement));)b=a(b)};g.md=function(a){var b={};b.volume=isNaN(a.volume)?Vf().volume:Math.min(Math.max(a.volume,0),100);b.muted=void 0==a.muted?Vf().muted:a.muted;R("yt-player-volume",b,2592E3)};g.ld=function(a){5==a&&cg(this)};g.nd=function(a){K("WATCH_LATER_VIDEO_ADDED",a)};
g.od=function(a){K("WATCH_LATER_VIDEO_REMOVED",a)};
g.se=function(){gg(this);this.o="unsupported";var a=Cb("PLAYER_FALLBACK",'The 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=Cb("QUICKTIME_FALLBACK",'The 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=
N("player-unavailable");if(N("unavailable-submessage")&&b){N("unavailable-submessage").innerHTML=a;var a=b||document,c=null;a.querySelectorAll&&a.querySelector?c=a.querySelector(".icon"):c=zc("icon",b)[0];if(c=a=c||null)c=a?a.dataset?nb("icon")in a.dataset:a.hasAttribute?!!a.hasAttribute("data-icon"):!!a.getAttribute("data-icon"):!1;c&&(a.src=E(a,"icon"));Zb(b,"hid");Yb(N("player"),"off-screen-trigger")}};g.Nd=function(){return this.o||fg(this)};g.Md=function(){return this.La};
function fg(a){return(a=N(a.g))?"div"==a.tagName.toLowerCase()?"html5":"flash":null}function gg(a){a.cancel();Xf(a);a.o=null;a.A.loaded=!1;var b=N(a.g);"html5"==fg(a)?a.ma=b:b&&b.destroy&&b.destroy();a.u&&(b=N(a.g))&&b.parentNode&&b.parentNode.removeChild(b);for(a=a.Aa;b=a.firstChild;)a.removeChild(b)}g.cancel=function(){if(this.p){var a=this.p;this.A.assets.js&&a&&(a=""+ha(a),(a=Sb[a])&&Kb(a))}I(this.jc);this.O=!1};
function eg(a){a.A.assets.js_sharedui&&(a.la=!0,we(a.A.assets.css_sharedui),Nb(a.A.assets.js_sharedui,v(function(){this.b.addEventListener("onReady",v(this.Xd,this))},a)))}g.Xd=function(){var a=q("yt.player.ui.shared.init");a&&(this.b.hideUserInterface(),a(this.i,this.A.clone()))};
g.B=function(){gg(this);if(this.u){var a=q("yt.player.ui.shared.dispose");a&&a();this.la=!1}this.ba=null;for(var b in this.j)l[this.j[b]]=null;this.b=null;delete this.Aa;delete this.i;this.A&&(this.za=this.A=this.A.fallback=null);Wf.F.B.call(this)};var jg={},kg="player_uid_"+(1E9*Math.random()>>>0);function lg(a,b){a=u(a)?N(a):a;b=ke(b);var c=kg+"_"+ha(a),d=jg[c];if(d)return d.$b(b),d.b;d||(d=new Wf(a,c),jg[c]=d,K("player-added",d.b),rb(d,ma(mg,d)));H(function(){d.$b(b)},0);return d.b}function ng(){for(var a in jg){var b=jg[a];b&&b.cancel()}}function og(a){if(a=N(a))a=kg+"_"+ha(a),(a=jg[a])&&a.dispose()}function mg(a){jg[a.G]=null}function pg(a){a=N(a);if(!a)return null;var b=kg+"_"+ha(a),c=jg[b];c||(c=new Wf(a,b),jg[b]=c);return c.b};var qg=q("yt.player.exports.navigate")||kd;y("yt.player.exports.navigate",qg);var rg=q("yt.player.embed")||lg;y("yt.player.embed",rg);var sg=q("yt.player.destroy")||og;y("yt.player.destroy",sg);var tg=q("yt.player.cancelAll")||ng;y("yt.player.cancelAll",tg);var ug=q("yt.player.getPlayerByElement")||pg;y("yt.player.getPlayerByElement",ug);var vg=q("yt.player.exports.feedbackStart")||fe;y("yt.player.exports.feedbackStart",vg);var wg={},xg=0,yg=q("yt.net.ping.workerUrl_")||null;y("yt.net.ping.workerUrl_",yg);function zg(a){var b=new Image,c=""+xg++;wg[c]=b;b.onload=b.onerror=function(){delete wg[c]};b.src=a;b=eval("null")};function Ag(a,b,c){var d=document.location.protocol+"//"+document.domain+"/post_login";b&&(d=Zc(d,"mode",b));b=Zc("/signin?context=popup","next",d);c&&(b=Zc(b,"feature",c));if(c=window.open(b,"loginPopup","width=375,height=440,resizable=yes,scrollbars=yes",!0))b=J("LOGGED_IN",function(b){Kb(G("LOGGED_IN_PUBSUB_KEY"));wb("LOGGED_IN",!0);a(b)}),wb("LOGGED_IN_PUBSUB_KEY",b),c.moveTo((screen.width-375)/2,(screen.height-440)/2)}y("yt.pubsub.publish",K);var Bg=null;"undefined"!=typeof XMLHttpRequest?Bg=function(){return new XMLHttpRequest}:"undefined"!=typeof ActiveXObject&&(Bg=function(){return new ActiveXObject("Microsoft.XMLHTTP")});function Cg(a,b,c,d,e,f,h){function k(){4==(m&&"readyState"in m?m.readyState:0)&&b&&zb(b)(m)}var m=Bg&&Bg();if(!("open"in m))return null;"onloadend"in m?m.addEventListener("loadend",k,!1):m.onreadystatechange=k;c=(c||"GET").toUpperCase();d=d||"";m.open(c,a,!0);f&&(m.responseType=f);h&&(m.withCredentials=!0);f="POST"==c;if(e=Dg(a,e))for(var n in e)m.setRequestHeader(n,e[n]),"content-type"==n.toLowerCase()&&(f=!1);f&&m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");m.send(d);return m}
function Dg(a,b){b=b||{};var c;if(c=G("PAGE_CL")&&G("PAGE_BUILD_TIMESTAMP")){var d;d||(d=window.location.href);c=Rc(a)[1]||null;var e=gd(a);c&&e?(c=d,d=Rc(a),c=Rc(c),d=d[3]==c[3]&&d[1]==c[1]&&d[4]==c[4]):d=e?gd(d)==e&&(Number(Rc(d)[4]||null)||null)==(Number(Rc(a)[4]||null)||null):!0;c=d||Eg(a)}c&&(b["X-YouTube-Page-CL"]=G("PAGE_CL"),b["X-YouTube-Page-Timestamp"]=G("PAGE_BUILD_TIMESTAMP"));return b}
function Eg(a){var b=["X-YouTube-Page-CL","X-YouTube-Page-Timestamp"],c=G("CORS_HEADER_WHITELIST")||{};a=gd(a);if(!a)return!0;var d=c[a];return d?Ea(b,function(a){return Ha(d,a)}):!1}function Fg(a,b){var c=G("XSRF_FIELD_NAME"),d;b.headers&&(d=b.headers["Content-Type"]);return!b.af&&(!gd(a)||gd(a)==document.location.hostname)&&"POST"==b.method&&(!d||"application/x-www-form-urlencoded"==d)&&!(b.N&&b.N[c])}
function Gg(a,b){var c=b.format||"JSON";b.Ye&&(a=document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:"")+a);var d=G("XSRF_FIELD_NAME"),e=G("XSRF_TOKEN"),f=b.Tc;f&&(f[d]&&delete f[d],a=hd(a,f));var h=b.Ze||"",f=b.N;Fg(a,b)&&(f||(f={}),f[d]=e);f&&u(h)&&(d=fd(h),kb(d,f),h=Yc(d));var k=!1,m,n=Cg(a,function(a){if(!k){k=!0;m&&I(m);var d;t:switch(a&&"status"in a?a.status:-1){case 0:case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 304:d=
!0;break t;default:d=!1}var e=null;if(d||400<=a.status&&500>a.status)e=Hg(c,a);if(d)t:{switch(c){case "XML":d=0==parseInt(e&&e.return_code,10);break t;case "RAW":d=!0;break t}d=!!e}var e=e||{},f=b.context||l;d?b.onSuccess&&b.onSuccess.call(f,a,e):b.onError&&b.onError.call(f,a,e);b.fc&&b.fc.call(f,a,e)}},b.method,h,b.headers,b.responseType,b.withCredentials);b.Oa&&0<b.timeout&&(m=H(function(){k||(k=!0,n.abort(),I(m),b.Oa.call(b.context||l,n))},b.timeout));return n}
function Hg(a,b){var c=null;switch(a){case "JSON":var d=b.responseText,e=b.getResponseHeader("Content-Type")||"";d&&0<=e.indexOf("json")&&(c=zf(d));break;case "XML":if(d=(d=b.responseXML)?Ig(d):null)c={},C(d.getElementsByTagName("*"),function(a){c[a.tagName]=Jg(a)})}return c}function Ig(a){return a?(a=("responseXML"in a?a.responseXML:a).getElementsByTagName("root"))&&0<a.length?a[0]:null:null}function Jg(a){var b="";C(a.childNodes,function(a){b+=a.nodeValue});return b};function Kg(){var a=G("PLAYER_CONFIG");return a&&a.args&&void 0!==a.args.authuser?!0:!(!G("SESSION_INDEX")&&!G("LOGGED_IN"))};var Lg={},Mg="ontouchstart"in document;function Ng(a,b,c){var d;switch(a){case "mouseover":case "mouseout":d=3;break;case "mouseenter":case "mouseleave":d=9}return Fc(c,function(a){return Xb(a,b)},!0,d)}
function Og(a){var b="mouseover"==a.type&&"mouseenter"in Lg||"mouseout"==a.type&&"mouseleave"in Lg,c=a.type in Lg||b;if("HTML"!=a.target.tagName&&c){if(b){var b="mouseover"==a.type?"mouseenter":"mouseleave",c=Lg[b],d;for(d in c.Z){var e=Ng(b,d,a.target);e&&!Fc(a.relatedTarget,function(a){return a==e},!0)&&c.q(d,e,b,a)}}if(b=Lg[a.type])for(d in b.Z)(e=Ng(a.type,d,a.target))&&b.q(d,e,a.type,a)}}O(document,"blur",Og,!0);O(document,"change",Og,!0);O(document,"click",Og);O(document,"focus",Og,!0);
O(document,"mouseover",Og);O(document,"mouseout",Og);O(document,"mousedown",Og);O(document,"keydown",Og);O(document,"keyup",Og);O(document,"keypress",Og);O(document,"cut",Og);O(document,"paste",Og);Mg&&(O(document,"touchstart",Og),O(document,"touchend",Og),O(document,"touchcancel",Og));function Pg(){this.g={};this.i=[]}function Qg(a,b){return"yt-uix"+(a.ic?"-"+a.ic:"")+(b?"-"+b:"")}Pg.prototype.dispose=r;function Rg(a,b,c){b=J(b,c,a);a.i.push(b)}function Sg(a,b,c){var d=Qg(a,void 0),e=v(c,a);b in Lg||(Lg[b]=new F);Lg[b].subscribe(d,e);a.g[c]=e}function Tg(a,b){mb(a,"tooltip-text",b)}Pg.prototype.removeData=function(a,b){a&&(a.dataset?delete a.dataset[nb(b)]:a.removeAttribute("data-"+b))};function Ug(){Pg.call(this);this.b={}}z(Ug,Pg);ba(Ug);g=Ug.prototype;g.ic="tooltip";g.Fb=0;g.register=function(){Sg(this,"mouseover",this.Xc);Sg(this,"mouseout",this.Eb);Sg(this,"click",this.Eb);Sg(this,"touchstart",this.Ge);Sg(this,"touchend",this.cd);Sg(this,"touchcancel",this.cd)};g.dispose=function(){for(var a in this.b)this.Eb(this.b[a]);this.b={}};
g.Xc=function(a){if(!(this.Fb&&1E3>w()-this.Fb)){var b=parseInt(E(a,"tooltip-hide-timer"),10);b&&(this.removeData(a,"tooltip-hide-timer"),I(b));var b=v(function(){Vg(this,a);this.removeData(a,"tooltip-show-timer")},this),c=parseInt(E(a,"tooltip-show-delay"),10)||0,b=H(b,c);mb(a,"tooltip-show-timer",b.toString());a.title&&(Tg(a,Wg(a)),a.title="");b=ha(a).toString();this.b[b]=a}};
g.Eb=function(a){var b=parseInt(E(a,"tooltip-show-timer"),10);b&&(I(b),this.removeData(a,"tooltip-show-timer"));b=v(function(){if(a){var b=xc(Xg(this,a));b&&(Yg(b),b&&b.parentNode&&b.parentNode.removeChild(b),this.removeData(a,"content-id"))}this.removeData(a,"tooltip-hide-timer")},this);b=H(b,50);mb(a,"tooltip-hide-timer",b.toString());if(b=E(a,"tooltip-text"))a.title=b;b=ha(a).toString();delete this.b[b]};g.Ge=function(a,b){this.Fb=0;var c=Ng(b,Qg(this),null[0].target);this.Xc(c)};
g.cd=function(a,b){this.Fb=w();var c=Ng(b,Qg(this),null[0].target);this.Eb(c)};function Zg(a,b){Tg(a,b);var c=E(a,"content-id");if(c=N(c))c.innerHTML=b}function Wg(a){return E(a,"tooltip-text")||a.title}
function Vg(a,b){if(b){var c=Wg(b);if(c){var d=xc(Xg(a,b));if(!d){d=document.createElement("div");d.id=Xg(a,b);d.className=Qg(a,"tip");var e=document.createElement("div");e.className=Qg(a,"tip-body");var f=document.createElement("div");f.className=Qg(a,"tip-arrow");var h=document.createElement("div");h.className=Qg(a,"tip-content");var k=$g(a,b),m=Xg(a,b,"content");h.id=m;mb(b,"content-id",m);e.appendChild(h);k&&d.appendChild(k);d.appendChild(e);d.appendChild(f);(Kc()||document.body).appendChild(d);
Zg(b,c);(c=parseInt(E(b,"tooltip-max-width"),10))&&e.offsetWidth>c&&(e.style.width=c+"px",Yb(h,Qg(a,"normal-wrap")));h=Xb(b,Qg(a,"reverse"));ah(a,b,d,e,k,h)||ah(a,b,d,e,k,!h);var n=Qg(a,"tip-visible");H(function(){Yb(d,n)},0)}}}}
function ah(a,b,c,d,e,f){$b(c,Qg(a,"tip-reverse"),f);var h=0;f&&(h=1);a=Vd(b);f=new ac((a.width-10)/2,f?a.height:0);var k=Td(b);var k=new ac(k.x+f.x,k.y+f.y),k=k.clone(),m;m=(h&4&&"rtl"==Qd(c,"direction")?h^2:h)&-5;f=Vd(c);h=f.clone();0!=m&&(m&2&&(k.x-=h.width+0),m&1&&(k.y-=h.height+0));var n=k;m=ic&&(ec||mc)&&qc("1.9");n instanceof ac?(k=n.x,n=n.y):(k=n,n=void 0);c.style.left=Ud(k,m);c.style.top=Ud(n,m);if(!(f==h||f&&h&&f.width==h.width&&f.height==h.height))if(f=wc(c),f=uc(f),k=Ac(f.b),!M||qc("10")||
k&&qc("8"))f=c.style,ic?f.MozBoxSizing="border-box":jc?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,k){if(M){k=Yd(c,"paddingLeft");m=Yd(c,"paddingRight");var n=Yd(c,"paddingTop"),s=Yd(c,"paddingBottom"),k=new Od(n,m,s,k)}else k=Pd(c,"paddingLeft"),m=Pd(c,"paddingRight"),n=Pd(c,"paddingTop"),s=Pd(c,"paddingBottom"),k=new Od(parseFloat(n),parseFloat(m),parseFloat(s),parseFloat(k));if(M&&!rc(9)){m=$d(c,"borderLeft");
var n=$d(c,"borderRight"),s=$d(c,"borderTop"),x=$d(c,"borderBottom");m=new Od(s,n,x,m)}else m=Pd(c,"borderLeftWidth"),n=Pd(c,"borderRightWidth"),s=Pd(c,"borderTopWidth"),x=Pd(c,"borderBottomWidth"),m=new Od(parseFloat(s),parseFloat(n),parseFloat(x),parseFloat(m));f.pixelWidth=h.width-m.left-k.left-k.right-m.right;f.pixelHeight=h.height-m.top-k.top-k.bottom-m.bottom}else f.pixelWidth=h.width,f.pixelHeight=h.height;h=window.document;h=Ac(h)?h.documentElement:h.body;h=new bc(h.clientWidth,h.clientHeight);
if(1==c.nodeType){c.getBoundingClientRect?(f=Rd(c),f=new ac(f.left,f.top)):(f=Gc(uc(c)),k=Td(c),f=new ac(k.x-f.x,k.y-f.y));if(ic&&!qc(12)){n:{k=ya();if(void 0===c.style[k]&&(k=(jc?"Webkit":ic?"Moz":M?"ms":hc?"O":null)+za(k),void 0!==c.style[k])){k=(jc?"-webkit":ic?"-moz":M?"-ms":hc?"-o":null)+"-transform";break n}k="transform"}c=(c=Qd(c,k)||Qd(c,"transform"))?(c=c.match(ae))?new ac(parseFloat(c[1]),parseFloat(c[2])):new ac(0,0):new ac(0,0);c=new ac(f.x+c.x,f.y+c.y)}else c=f;m=c}else f=fa(c.g),k=c,
c.targetTouches?k=c.targetTouches[0]:f&&c.b.targetTouches&&(k=c.b.targetTouches[0]),m=new ac(k.clientX,k.clientY);c=Vd(d);n=Math.floor(c.width/2);f=!!(h.height<m.y+a.height);a=!!(m.y<a.height);k=!!(m.x<n);h=!!(h.width<m.x+n);m=(c.width+3)/-2- -5;b=E(b,"force-tooltip-direction");if("left"==b||k)m=-5;else if("right"==b||h)m=20-c.width-3;b=Math.floor(m)+"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 Xg(a,b,c){a=Qg(a);var d=b.__yt_uid_key;d||(d=Ic(),b.__yt_uid_key=d);b=a+d;c&&(b+="-"+c);return b}function $g(a,b){var c=null;fc&&Xb(b,Qg(a,"masked"))&&((c=N("yt-uix-tooltip-shared-mask"))?(c.parentNode.removeChild(c),ce(c)):(c=document.createElement("iframe"),c.src='javascript:""',c.id="yt-uix-tooltip-shared-mask",c.className=Qg(a,"tip-mask")));return c}
function Yg(a){var b=N("yt-uix-tooltip-shared-mask"),c=b&&Fc(b,function(b){return b==a},!1,2);b&&c&&(b.parentNode.removeChild(b),de(b),document.body.appendChild(b))};function bh(){Pg.call(this)}z(bh,Pg);ba(bh);bh.prototype.ic="subscription-button";
bh.prototype.register=function(){Sg(this,"click",this.Uc);Rg(this,"subscription-subscribe-loading",this.Wc);Rg(this,"subscription-subscribe-loaded",this.Vc);Rg(this,"subscription-unsubscirbe-loading",this.Wc);Rg(this,"subscription-unsubscribe-loaded",this.Vc);Rg(this,"subscription-subscribe-success",this.xe);Rg(this,"subscription-unsubscribe-success",this.ye);Rg(this,"subscription-enable-ypc",this.we);Rg(this,"subscription-disable-ypc",this.ve)};
var Ec={Yc:"hover-enabled",ze:"yt-uix-button-subscribe",Ae:"yt-uix-button-subscribed",bf:"ypc-enabled",Ne:"yt-uix-button-subscription-container",Oe:"yt-subscription-button-disabled-mask-container"},ch={cf:"channel-external-id",Be:"subscriber-count-show-when-subscribed",Ce:"subscriber-count-tooltip",De:"subscriber-count-title",df:"href",gd:"is-subscribed",ef:"parent-url",ff:"sessionlink",Ee:"style-type",hd:"subscription-id",gf:"target",He:"ypc-enabled",ad:"ypc-item-type",$c:"ypc-item-id",bd:"ypc-offers-url"};
g=bh.prototype;g.Uc=function(a){var b=E(a,"href"),c=Kg();if(b)a=E(a,"target")||"_self",window.open(b,a);else if(c){var b=E(a,"channel-external-id"),c=E(a,"sessionlink"),d;if(E(a,"ypc-enabled")){d=E(a,ch.ad);var e=E(a,ch.$c),f=E(a,ch.bd);d={itemType:d,itemId:e,offersUrl:f,subscriptionElement:a}}else d=null;e=E(a,"parent-url");E(a,"is-subscribed")?(f=E(a,"subscription-id"),K("subscription-unsubscribe",b,f,d,a,c,e)):K("subscription-subscribe",b,d,a,c,e)}else dh(this,a)};
g.Wc=function(a){this.Wa(a,this.ed,!0)};g.Vc=function(a){this.Wa(a,this.ed,!1)};g.xe=function(a,b){this.Wa(a,this.fd,!0,b)};g.ye=function(a){this.Wa(a,this.fd,!1)};g.we=function(a){this.Wa(a,this.Ke)};g.ve=function(a){this.Wa(a,this.Je)};g.fd=function(a,b,c){b?(mb(a,ch.gd,"true"),c&&mb(a,ch.hd,c)):(this.removeData(a,ch.gd),this.removeData(a,ch.hd));eh(a)};g.ed=function(a,b){var c;c=Dc(a);$b(c,Ec.Oe,b);a.setAttribute("aria-busy",b?"true":"false");a.disabled=b};
function eh(a){var b=E(a,ch.Ee),c=!!E(a,"is-subscribed"),b="-"+b,d=Ec.Ae+b;$b(a,Ec.ze+b,!c);$b(a,d,c);E(a,ch.Ce)&&!E(a,ch.Be)&&(b=Qg(Ug.getInstance()),$b(a,b,!c),a.title=c?"":E(a,ch.De));c?H(function(){Yb(a,Ec.Yc)},1E3):Zb(a,Ec.Yc)}g.Ke=function(a){var b=!!E(a,ch.ad),c=!!E(a,ch.$c),d=!!E(a,ch.bd);!E(a,"ypc-enabled")&&b&&c&&d&&(Yb(a,"ypc-enabled"),mb(a,ch.He,"true"))};g.Je=function(a){E(a,"ypc-enabled")&&(Zb(a,"ypc-enabled"),this.removeData(a,"ypc-enabled"))};
function fh(a,b){var c=yc(Qg(a));return Ca(c,function(a){return b==E(a,"channel-external-id")},a)}g.Re=function(a,b,c){var d=Sa(arguments,2);C(a,function(a){b.apply(this,Oa(a,d))},this)};g.Wa=function(a,b,c){var d=fh(this,a),d=Oa([d],Sa(arguments,1));this.Re.apply(this,d)};function dh(a,b){var c=v(function(a){a.discoverable_subscriptions&&wb("SUBSCRIBE_EMBED_DISCOVERABLE_SUBSCRIPTIONS",a.discoverable_subscriptions);this.Uc(b)},a);Ag(c,"subscribe","sub_button")};var gh=window.yt&&window.yt.uix&&window.yt.uix.widgets_||{};y("yt.uix.widgets_",gh);function hh(a){hh[" "](a);return a}hh[" "]=r;var ih={auto:0,tiny:144,light:144,small:240,medium:360,large:480,hd720:720,hd1080:1080,hd1440:1440,highres:2160};function jh(a,b,c){this.g=a||0;this.i=b||0;this.b=c}jh.prototype.equals=function(a){return this.g==a.g&&this.i==a.i&&this.b==a.b};function kh(a){new jh(ih.auto||0,ih[a]||0,!1)}kh("large");kh("auto");function T(){this.o=new F;qb(this,this.o)}z(T,pb);T.prototype.subscribe=function(a,b,c){return this.C()?0:this.o.subscribe(a,b,c)};T.prototype.Da=function(a,b,c){return this.C()?!1:this.o.Da(a,b,c)};T.prototype.ha=function(a){return this.C()?!1:this.o.ha(a)};T.prototype.q=function(a,b){return this.C()?!1:this.o.q.apply(this.o,arguments)};var lh,mh=window.performance||window.mozPerformance||window.msPerformance||window.webkitPerformance||{},nh=v(mh.clearResourceTimings||mh.webkitClearResourceTimings||mh.mozClearResourceTimings||mh.msClearResourceTimings||mh.oClearResourceTimings||r,mh),oh=mh.mark?function(a){mh.mark(a)}:r,qh="https:"===window.location.protocol&&fa(mh.getEntriesByType)?function(a){var b={};mh.getEntriesByType("resource").forEach(function(a){if(0===a.name.indexOf("https://s.ytimg.com/yts/")){var d=ph[a.initiatorType];
if(d&&d.extension.test(a.name)){var e=d.Ob,d=e+"t",e=e+"c";void 0===b[d]&&(b[d]=0,b[e]=0);b[d]++;0!==a.responseStart&&a.responseStart!==a.requestStart||b[e]++}}});Object.keys(b).forEach(function(c){a["cs"+c]=b[c]})}:r;
function rh(){var a=sh().tick,b=sh().span,c=sh().info,d=q("yt.timing.reportbuilder_");if(d){if(d=d(a,b,c,void 0))th(d),uh(),nh()}else{var d={v:2,s:"youtube",action:G("TIMING_ACTION")},e=G("TIMING_INFO")||{},f;for(f in e)c[f]=e[f];f=c.srt;delete c.srt;var h;f||0===f||(h=mh.timing||{},f=Math.max(0,h.responseStart-h.navigationStart),isNaN(f)&&c.pt&&(f=c.pt));if(f||0===f)c.srt=f;c.h5jse&&(f=window.location.protocol+q("ytplayer.config.assets.js"),(f=mh.getEntriesByName?mh.getEntriesByName(f)[0]:null)?
c.h5jse=Math.round(c.h5jse-f.responseEnd):delete c.h5jse);a.aft||(a.aft=a.pbr&&a.pbs>a.pbr?a.pbr:a.pbs?a.pbs:a.vr&&a.cl&&a.cl>a.vr?a.cl:a.vr?a.vr:a.ol);a.vr&&a.gv&&(b.vl=Math.round(a.vr-a.gv));f=a._start;if(!lh){h||(h=mh.timing||{});t:if(e=h,e.msFirstPaint)e=Math.max(0,e.msFirstPaint);else{var k=window.chrome;if(k&&(k=k.loadTimes,fa(k))){var k=k(),m=1E3*Math.min(k.requestTime||Infinity,k.startLoadTime||Infinity),m=Infinity===m?0:e.navigationStart-m,e=Math.max(0,Math.round(1E3*k.firstPaintTime+m)||
0);break t}e=0}0<e&&e>f&&(a.fpt=e);e=h.redirectEnd-h.redirectStart;0<e&&(b.rtime_=e);e=h.domainLookupEnd-h.domainLookupStart;0<e&&(b.dns_=e);e=h.connectEnd-h.connectStart;0<e&&(b.tcp_=e);e=h.connectEnd-h.secureConnectionStart;h.secureConnectionStart&&0<e&&(b.stcp_=e);e=h.responseStart-h.requestStart;0<e&&(b.req_=e);e=h.responseEnd-h.responseStart;0<e&&(b.rcv_=e);lh=!0}.001>Math.random()&&qh(b);for(var n in c)"_"!=n.charAt(0)&&(d[n]=c[n]);c={};n=[];for(var s in a)"_"!=s.charAt(0)&&(e=Math.max(Math.round(a[s]-
f),0),c[s]=e,n.push(s+"."+e));d.rt=n.join(",");a={};s=[];for(var x in b)"_"!=x.charAt(0)&&(a[x]=b[x],s.push(x+"."+b[x]));d.it=s.join(",");th(d);(b=q("ytdebug.logTiming"))&&b(d,c,a);uh();nh()}}function th(a){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))&&zg(a)}function sh(){return q("ytcsi.data_")||uh()}function uh(){var a={tick:{},span:{},info:{}};y("ytcsi.data_",a);return a}
var ph={link:{Ob:"c",extension:/\.css$/},script:{Ob:"j",extension:/\.js$/},css:{Ob:"s",extension:/\.(?:webp|png)$/},"":{Ob:"f",extension:/\.swf$/}};var vh;var wh=L,xh=wh.match(/\((iPad|iPhone|iPod)( Simulator)?;/);if(!xh||2>xh.length)vh=void 0;else{var yh=wh.match(/\((iPad|iPhone|iPod)( Simulator)?; (U; )?CPU (iPhone )?OS (\d_\d)[_ ]/);vh=yh&&6==yh.length?Number(yh[5].replace("_",".")):0}0<=vh&&0<=L.search("Safari")&&L.search("Version");function zh(a){return(0==a.search("cue")||0==a.search("load"))&&"loadModule"!=a}function Ah(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 Bh(a)}
function Bh(a,b,c){if(ga(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 Ch(a,b,c,d){if(ga(a)&&!t(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 Dh(a){var b=a.video_id||a.videoId;if(u(b)){var c=S("yt-player-two-stage-token")||{},d=S("yt-player-two-stage-token")||{};p(void 0)?d[b]=void 0:delete d[b];R("yt-player-two-stage-token",d,300);(b=c[b])&&(a.two_stage_token=b)}};var Eh=w(),Fh=null,Gh=Array(50),Hh=-1,Ih=!1;function Jh(a){Kh();Fh.push(a);Lh(Fh)}function Mh(a){var b=q("yt.mdx.remote.debug.handlers_");Ma(b||[],a)}function U(a,b){Kh();var c=Fh,d=Nh(a,String(b));Ia(c)?Oh(d):(Lh(c),C(c,function(a){a(d)}))}function Ph(a){U("remote",a)}function Kh(){Fh||(Fh=q("yt.mdx.remote.debug.handlers_")||[],y("yt.mdx.remote.debug.handlers_",Fh))}function Oh(a){var b=(Hh+1)%50;Hh=b;Gh[b]=a;Ih||(Ih=49==b)}
function Lh(a){var b=Gh;if(b[0]){var c=Hh,d=Ih?c:-1;do{var d=(d+1)%50,e=b[d];C(a,function(a){a(e)})}while(d!=c);Gh=Array(50);Hh=-1;Ih=!1}}function Nh(a,b){var c=(w()-Eh)/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 Qh(a){a=a||{};this.name=a.name||"";this.id=a.screenId||"";this.token=a.loungeToken||"";this.uuid=a.dialId||""}function Rh(a,b){return a.id==b||a.uuid==b}function Sh(a,b){return a||b?!a!=!b?!1:a.id==b.id:!0}function Th(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 Uh(a){return{name:a.name,screenId:a.id,loungeToken:a.token,dialId:a.uuid}}function Vh(a){return new Qh(a)}function Wh(a){return t(a)?D(a,Vh):[]}
function Xh(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 Yh(a){return t(a)?"["+D(a,Xh).join(",")+"]":"null"};var Zh=["boadgeojelhgndaghljhdicfkmllpafd","dliochdbjfkdbacpmhlcpmleaejidimm","hfaagokkkhdbgiakmmlclaapfelnkoah","fmfcbgogabcbclcofgocippekhfcmgfj","enhhojjnijigcajfphajepfemndkmdlo"];function $h(a){var b=S("yt-remote-cast-last-extension");b?"none"==b?a(null):a(b):ai(0,a)}function ai(a,b){a==Zh.length?(R("yt-remote-cast-last-extension","none"),b(null)):bi(Zh[a],function(c){c?(c=Zh[a],R("yt-remote-cast-last-extension",c),b(c)):ai(a+1,b)})}
function ci(a){return"chrome-extension://"+a+"/cast_sender.js"}function bi(a,b){var c=new XMLHttpRequest;c.onreadystatechange=function(){4==c.readyState&&200==c.status&&b(!0)};c.onerror=function(){b(!1)};c.open("GET",ci(a),!0);c.send()}
function di(a){window.__onGCastApiAvailable=a;$h(function(b){if(b){U("bootstrap","Found cast extension: "+b);y("chrome.cast.extensionId",b);var c=document.createElement("script");c.src=ci(b);c.onerror=function(){ei();Sf("yt-remote-cast-last-extension");a(!1,"Extension JS failed to load.")};(document.head||document.documentElement).appendChild(c)}else U("bootstrap","No cast extension found"),a(!1,"No cast extension found")})}
function ei(){window.__onGCastApiAvailable&&delete window.__onGCastApiAvailable};function fi(a){this.port=this.g="";this.b=!0;a=a||document.location.href;var b=Number(Rc(a)[4]||null)||null||"";b&&(this.port=":"+b);this.g=Tc(a)||"";a=L;0<=a.search("MSIE")&&(a=a.match(/MSIE ([\d.]+)/)[1],0>va(a,"10.0")&&(this.b=!1))}function gi(a,b,c,d){var e="/api/lounge";if(p(d)?d:a.b)e="https://"+a.g+a.port+"/api/lounge";return $c(e+b,c||{})}
fi.prototype.sendRequest=function(a,b,c,d,e,f,h){a={format:f?"RAW":"JSON",method:a,context:this,timeout:5E3,withCredentials:!!h,onSuccess:ma(this.j,d,!f),onError:ma(this.i,e),Oa:ma(this.o,e)};c&&(a.N=c,a.headers={"Content-Type":"application/x-www-form-urlencoded"});return Gg(b,a)};fi.prototype.j=function(a,b,c,d){b?a(d):a({text:c.responseText})};fi.prototype.i=function(a,b){a(Error("Request error: "+b.status))};fi.prototype.o=function(a){a(Error("request timed out"))};function hi(a){a&&(this.id=a.id||"",this.name=a.name||"",this.activityId=a.activityId||"",this.status=a.status||"UNKNOWN")}hi.prototype.id="";hi.prototype.name="";hi.prototype.activityId="";hi.prototype.status="UNKNOWN";function ii(a){return{id:a.id,name:a.name,activityId:a.activityId,status:a.status}}hi.prototype.toString=function(){return"{id:"+this.id+",name:"+this.name+",activityId:"+this.activityId+",status:"+this.status+"}"};
function ji(a){a=a||[];return"["+D(a,function(a){return a?a.toString():"null"}).join(",")+"]"};function ki(){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 li(a,b){return Fa(a,function(a){return a.key==b})}function mi(a){return D(a,function(a){return{key:a.id,name:a.name}})}function ni(a){return D(a,function(a){return ii(a)})}function oi(a){return D(a,function(a){return new hi(a)})}function pi(a,b){return a||b?a&&b?a.id==b.id&&a.name==b.name:!1:!0}
function qi(a,b){return Fa(a,function(a){return a.id==b})}function ri(a,b){return Fa(a,function(a){return Sh(a,b)})}function si(a,b){return Fa(a,function(a){return Rh(a,b)})};function ti(a){T.call(this);this.D=a;this.b=[]}z(ti,T);g=ti.prototype;g.R=function(){return this.b};g.contains=function(a){return!!ri(this.b,a)};g.get=function(a){return si(this.b,a)};function ui(a,b){var c;t:{c=0;for(var d=a.b.length;c<d;++c)if(Sh(a.b[c],b))break t;c=-1}0<=c?a.b[c]=b:a.b.push(b)}function vi(a,b){a.b=Ca(a.b,function(a){return!Sh(a,b)})}g.info=function(a){U(this.D,a)};g.warn=function(a){U(this.D,a)};function wi(){var a=xi(),b=yi();Ha(a,b);if(zi()){var c=a,d;d=Ua;for(var e=0,f=c.length,h;e<f;){var k=e+f>>1,m;m=d(b,c[k]);0<m?e=k+1:(f=k,h=!m)}d=h?e:~e;0>d&&Ra(c,-(d+1),0,b)}a=Ai(a);Ia(a)?dd.remove("remote_sid","/","youtube.com"):ed("remote_sid",a.join(","))}function xi(){var a=S("yt-remote-connected-devices")||[];Ta(a);return a}function Ai(a){if(Ia(a))return[];var b=a[0].indexOf("#"),c=-1==b?a[0]:a[0].substring(0,b);return D(a,function(a,b){return 0==b?a:a.substring(c.length)})}
function Bi(a){R("yt-remote-connected-devices",a,86400)}function yi(){if(Ci)return Ci;var a=S("yt-remote-device-id");a||(a=ki(),R("yt-remote-device-id",a,31536E3));for(var b=xi(),c=1,d=a;Ha(b,d);)c++,d=a+"#"+c;return Ci=d}function Di(){return S("yt-remote-session-browser-channel")}function zi(){return S("yt-remote-session-screen-id")}
function Ei(a){5<a.length&&(a=a.slice(a.length-5));var b=D(Fi(),function(a){return a.loungeToken}),c=D(a,function(a){return a.loungeToken});Ea(c,function(a){return!Ha(b,a)})&&R("yt-remote-lounge-token-expiration",!0,86400);R("yt-remote-local-screens",a,31536E3)}function Fi(){return S("yt-remote-local-screens")||[]}function Gi(){return!S("yt-remote-lounge-token-expiration")}function Hi(a){R("yt-remote-online-screens",a,60)}function Ii(){return S("yt-remote-online-screens")||[]}
function Ji(a){R("yt-remote-online-dial-devices",a,30)}function Ki(){return S("yt-remote-online-dial-devices")||[]}function Li(a){a||Sf("yt-remote-session-screen-id");wi();a=xi();Ma(a,yi());Bi(a)}var Ci="";function Mi(a){ti.call(this,"AccountScreenService");this.g=a;this.i=NaN;this.b=Ni();this.info("Initializing with "+Yh(this.b))}z(Mi,ti);g=Mi.prototype;g.start=function(){this.zc()};g.add=function(a,b,c){if(this.contains(a))this.Ia(a,a.name,b,c);else{var d=Oi(this,a.id);this.g.sendRequest("POST",d,{screen_name:a.name},v(this.le,this,a,b,c),v(this.Kb,this,"add",c),!0,!0)}};
g.remove=function(a,b,c){if(this.contains(a)){var d=Oi(this,a.id);this.g.sendRequest("DELETE",d,null,v(this.ne,this,a,b,c),v(this.Kb,this,"remove",c),!0,!0)}else a="Trying to remove non-account screen: "+a.name,this.warn(a),c(Error(a))};g.Ia=function(a,b,c,d){if(this.contains(a)){var e=Oi(this,a.id);this.g.sendRequest("PUT",e,{screen_name:b},v(this.oe,this,a,b,c,d),v(this.Kb,this,"update",d),!0,!0)}else a="Trying to update non-account screen: "+a.name,this.warn(a),d(Error(a))};
g.B=function(){I(this.i);Mi.F.B.call(this)};function Pi(a,b){return a.length!=b.length?!1:Va(a,b,function(a,b){return a||b?!a!=!b?!1:a.id==b.id&&a.name==b.name:!0})}function Ni(){var a=Wh(Fi()),b=Wh(Ii());return Ca(b,function(b){return!si(a,b.id)})}function Oi(a,b){var c=gi(a.g,"/screens");return b?c+"/"+b:c}g.zc=function(){if(!this.C()){I(this.i);var a=Oi(this);this.g.sendRequest("GET",a,null,v(this.ge,this),v(this.Kb,this,"load",r),!1,!0)}};
g.ge=function(a){if(!this.C())if(a=Wh(ab(a)),Pi(this.b,a))for(var b=0,c=this.b.length;b<c;++b){var d=this.b[b],e=si(a,d.id);e&&e.token&&(d.token=e.token)}else this.info("Updated account screens: "+Yh(a)),this.b=a,this.q("screenChange"),a=this.R().length?12E4:6E4,this.i=H(v(this.zc,this),a)};g.le=function(a,b){this.C()||(ui(this,a),this.q("screenChange"),b(a))};g.ne=function(a,b){this.C()||(vi(this,a),this.q("screenChange"),b(a))};g.oe=function(a,b,c){this.C()||(a=this.get(a.id),a.name=b,c(a),this.q("screenChange"))};
g.Kb=function(a,b,c){this.C()||(a="Failed to "+a+" account screen: "+c,this.warn(a),b(Error(a)))};function Qi(a,b,c,d){T.call(this);this.u=a;this.p=b;this.j=c;this.k=d;this.i=0;this.b=null;this.g=NaN}z(Qi,T);var Ri=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g=Qi.prototype;g.start=function(){!this.b&&isNaN(this.g)&&this.sc()};g.stop=function(){this.b&&(this.b.abort(),this.b=null);isNaN(this.g)||(I(this.g),this.g=NaN)};g.B=function(){this.stop();Qi.F.B.call(this)};
g.sc=function(){this.g=NaN;this.b=Gg(gi(this.u,"/pairing/get_screen"),{method:"POST",N:{pairing_code:this.p},timeout:5E3,onSuccess:v(this.Dd,this),onError:v(this.Cd,this),Oa:v(this.Ed,this)})};g.Dd=function(a,b){this.b=null;var c=b.screen||{};c.dialId=this.j;c.name=this.k;this.q("pairingComplete",new Qh(c))};
g.Cd=function(a){this.b=null;a.status&&404==a.status?this.i>=Ri.length?this.q("pairingFailed",Error("DIAL polling timed out")):(a=Ri[this.i],this.g=H(v(this.sc,this),a),this.i++):this.q("pairingFailed",Error("Server error "+a.status))};g.Ed=function(){this.b=null;this.q("pairingFailed",Error("Server not responding"))};function Si(a){ti.call(this,"LocalScreenService");this.i=a;this.g=NaN;this.b=Wh(Fi());this.info("Initializing with "+Yh(this.b))}z(Si,ti);g=Si.prototype;g.start=function(){Gi()&&Ti(this);this.g=H(v(this.start,this),6E5)};g.add=function(a,b){ui(this,a);Ui(this);b(a);Ti(this)};g.remove=function(a,b){vi(this,a);Ui(this);b(a)};g.Ia=function(a,b,c,d){var e=this.get(a.id);e?(e.name=b,Ui(this),c(a)):d(Error("no such local screen."))};g.B=function(){I(this.g);Si.F.B.call(this)};
function Ti(a){var b={N:{screen_ids:D(a.b,function(a){return a.id}).join(",")},method:"POST",timeout:5E3,context:a,onSuccess:v(a.Sd,a),onError:v(a.Bc,a),Oa:v(a.Bc,a,null)};Gg(gi(a.i,"/pairing/get_lounge_token_batch"),b)}g.Sd=function(a,b){for(var c=b&&b.screens||[],d=0,e=c.length;d<e;++d){var f=c[d],h=this.get(f.screenId);h&&(h.token=f.loungeToken)}Ui(this)};g.Bc=function(a){this.warn("Requesting lounge tokens failed: "+(a?"status = "+a.status:"timed out."));Ui(this)};
function Ui(a){Ei(D(a.b,Uh));a.q("screenChange")};function Vi(a,b){T.call(this);this.k=b;for(var c=S("yt-remote-online-screen-ids")||"",c=c?c.split(","):[],d={},e=0,f=c.length;e<f;++e)d[c[e]]=!0;this.b=d;this.u=a;this.i=NaN;this.p=[];this.j=NaN;this.g=null;Wi("Initialized with "+Q(this.b))}z(Vi,T);g=Vi.prototype;g.start=function(){var a=parseInt(S("yt-remote-fast-check-period")||"0",10);(this.i=w()-144E5<a?0:a)?Xi(this):(this.i=w()+3E5,R("yt-remote-fast-check-period",this.i),this.qb())};g.isEmpty=function(){return fb(this.b)};
g.update=function(a){Wi("Updating availability "+(a?"immediately.":"on schedule."));var b=this.k(!1),c=Ya(this.b,function(a,c){return a&&!!si(b,c)},this);Yi(this,c);a&&(this.p.push(a),this.qb())};g.B=function(){I(this.j);this.j=NaN;this.g&&(this.g.abort(),this.g=null);Vi.F.B.call(this)};function Zi(a,b){for(var c=bb(b),d=0,e=c.length;d<e;++d)if(!a.b[c[d]])return!1;return!0}
function Yi(a,b){Zi(a,b)||(a.b=b,$i(a.b),a.q("screenChange"),Wi("Updated online screens: "+Q(a.b)));var c=Ca(a.k(!0),function(a){return!!this.b[a.id]},a);Hi(D(c,Uh))}function Xi(a){a.j=H(v(a.qb,a),0<a.i&&a.i<w()?2E4:1E4)}
g.qb=function(){I(this.j);this.j=NaN;this.g&&this.g.abort();var a=aj(this),b=0,c;for(c in a)b++;b?(b=gi(this.u,"/pairing/get_screen_availability"),this.g=Gg(b,{method:"POST",N:{lounge_token:bb(a).join(",")},context:this,timeout:5E3,onSuccess:v(this.he,this,a),onError:v(this.Oc,this),Oa:v(this.Oc,this)})):(Yi(this,[]),Xi(this),bj(this))};
g.he=function(a,b,c){this.g=null;b=bb(aj(this));if(Va(b,bb(a))){c=c.screens||[];b=[];for(var d=0,e=c.length;d<e;++d)"online"==c[d].status&&(b[a[c[d].loungeToken]]=!0);Yi(this,b);Xi(this);bj(this)}else this.qb()};g.Oc=function(a){a?this.J("Screen availability failed: "+a.status):this.J("Screen availability failed: timed out.");this.g=null;Xi(this);bj(this)};function bj(a){var b=a.p;a.p=[];a=0;for(var c=b.length;a<c;++a)b[a]()}function Wi(a){U("OnlineScreenService",a)}
g.J=function(a){U("OnlineScreenService",a)};function aj(a){var b={};C(a.k(!1),function(a){a.token?b[a.token]=a.id:this.J("Requesting availability of screen w/o lounge token.")});return b}function $i(a){a=bb(a);a.length?R("yt-remote-online-screen-ids",a.join(",")):Sf("yt-remote-online-screen-ids")};function V(a,b){ti.call(this,"ScreenService");this.p=a;this.i=this.g=this.j=null;this.k=[];this.u={};cj(this,b)}z(V,ti);g=V.prototype;g.start=function(){this.g&&this.g.start();this.i.start();this.b.length&&(this.q("screenChange"),this.i.isEmpty()||this.q("onlineScreenChange"))};g.add=function(a,b,c){this.g?this.g.add(a,b,c):this.j.add(a,b,c)};g.remove=function(a,b,c){this.g&&this.g.contains(a)?(this.g.remove(a,b,c),this.j.remove(a,r,r)):this.j.remove(a,b,c);this.i.update()};
g.Ia=function(a,b,c,d){this.g&&this.g.contains(a)?this.g.Ia(a,b,c,d):this.j.contains(a)?this.j.Ia(a,b,c,d):(a="Updating name of unknown screen: "+a.name,this.warn(a),d(Error(a)))};g.R=function(a){return a?this.b:Oa(this.b,Ca(this.k,function(a){return!this.contains(a)},this))};g.Qc=function(a){a=this.R(a);return Ca(a,function(a){return!!this.i.b[a.id]},this)};
function dj(a,b,c,d,e,f){a.info("getAutomaticScreenByIds "+c+" / "+b);c||(c=a.u[b]);var h=a.R();if(h=(c?si(h,c):null)||si(h,b)){h.uuid=b;var k=ej(a,h);a.i.update(v(function(){e(this.i.b[k.id]?k:null)},a))}else c?fj(a,c,v(function(a){var f=ej(this,new Qh({name:d,screenId:c,loungeToken:a,dialId:b||""}));this.i.update(v(function(){e(this.i.b[f.id]?f:null)},this))},a),f):e(null)}
function gj(a,b,c,d,e,f){a.info("getDialScreenByPairingCode "+b+" / "+c);var h=new Qi(a.p,b,c,d);h.subscribe("pairingComplete",v(function(a){sb(h);e(ej(this,a))},a));h.subscribe("pairingFailed",function(a){sb(h);f(a)});h.start();return v(h.stop,h)}
g.We=function(a,b,c,d){Gg(gi(this.p,"/pairing/get_screen"),{method:"POST",N:{pairing_code:a},timeout:5E3,onSuccess:v(function(a,f){var h=f.screen||{};h.name=h.name||b;this.add(new Qh(h),c,d)},this),onError:v(function(a){d(Error("pairing request failed: "+a.status))},this),Oa:v(function(){d(Error("pairing request timed out."))},this)})};
function fj(a,b,c,d){a.info("requestLoungeToken_ for "+b);var e={N:{screen_ids:b},method:"POST",context:a,onSuccess: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"))}};Gg(gi(a.p,"/pairing/get_lounge_token_batch"),e)}
function hj(a){if(a.g){var b=a.g.R();a.b=Oa(b,Ca(a.j.R(),function(a){return!ri(b,a)}))}else a.b=a.j.R();for(var c=ib(a.u),d=0,e=a.b.length;d<e;++d){var f=a.b[d];f.uuid=c[f.id]||""}a.info("Updated manual screens: "+Yh(a.b))}g.Cc=function(){hj(this);this.q("screenChange");this.i.update()};
function cj(a,b){ij(a);a.j=new Si(a.p);a.j.subscribe("screenChange",v(a.Cc,a));qb(a,a.j);b&&(a.g=new Mi(a.p),a.g.subscribe("screenChange",v(a.Cc,a)),qb(a,a.g));hj(a);a.k=Wh(S("yt-remote-automatic-screen-cache")||[]);a.info("Initializing automatic screens: "+Yh(a.k));a.i=new Vi(a.p,v(a.R,a));a.i.subscribe("screenChange",v(function(){this.q("onlineScreenChange")},a));qb(a,a.i)}
function ej(a,b){var c=a.get(b.id);c?(c.uuid=b.uuid,b=c):((c=si(a.k,b.uuid))?(c.id=b.id,c.token=b.token,b=c):a.k.push(b),R("yt-remote-automatic-screen-cache",D(a.k,Uh)));ij(a);a.u[b.uuid]=b.id;R("yt-remote-device-id-map",a.u,31536E3);return b}function ij(a){a.u=S("yt-remote-device-id-map")||{}}V.prototype.dispose=V.prototype.dispose;function jj(a,b,c){T.call(this);this.T=c;this.G=a;this.g=b;this.i=null}z(jj,T);function kj(a,b){a.i=b;a.q("sessionScreen",a.i)}g=jj.prototype;g.X=function(a){this.C()||(a&&this.warn(""+a),this.i=null,this.q("sessionScreen",null))};g.info=function(a){U(this.T,a)};g.warn=function(a){U(this.T,a)};g.Mc=function(){return null};
g.Tb=function(a){var b=this.g;a?b.displayStatus=new chrome.cast.ReceiverDisplayStatus(a,[]):b.displayStatus=null;chrome.cast.setReceiverDisplayStatus&&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.Tb("");jj.F.B.call(this)};function lj(a,b){jj.call(this,a,b,"CastSession");this.b=null;this.k=0;this.j=null;this.u=v(this.Jd,this);this.p=v(this.Id,this);this.k=H(v(function(){mj(this,null)},this),12E4)}z(lj,jj);g=lj.prototype;
g.Yb=function(a){if(this.b){if(this.b==a)return;this.warn("Overriding cast sesison with new session object");this.b.removeUpdateListener(this.u);this.b.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.p)}this.b=a;this.b.addUpdateListener(this.u);this.b.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.p);this.j&&nj(this);oj(this,"getMdxSessionStatus")};g.cb=function(a){this.info("launchWithParams: "+Q(a));this.j=a;this.b&&nj(this)};
g.stop=function(){this.b?this.b.stop(v(function(){this.X()},this),v(function(){this.X(Error("Failed to stop receiver app."))},this)):this.X(Error("Stopping cast device witout session."))};g.Tb=r;g.B=function(){this.info("disposeInternal");I(this.k);this.k=0;this.b&&(this.b.removeUpdateListener(this.u),this.b.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.p));this.b=null;lj.F.B.call(this)};
function nj(a){var b=a.j.videoId||a.j.videoIds[a.j.index];b&&oj(a,"flingVideo",{videoId:b,currentTime:a.j.currentTime||0});a.j=null}function oj(a,b,c){a.info("sendYoutubeMessage_: "+b+" "+Q(c));var d={};d.type=b;c&&(d.data=c);a.b?a.b.sendMessage("urn:x-cast:com.google.youtube.mdx",d,r,v(function(){this.warn("Failed to send message: "+b+".")},a)):a.warn("Sending yt message without session: "+Q(d))}
g.Id=function(a,b){if(!this.C())if(b){var c=zf(b);if(c){var d=""+c.type,c=c.data||{};this.info("onYoutubeMessage_: "+d+" "+Q(c));switch(d){case "mdxSessionStatus":mj(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 mj(a,b){I(a.k);b?(a.info("onConnectedScreenId_: Received screenId: "+b),a.i&&a.i.id==b||dj(a.G,a.g.label,b,a.g.friendlyName,v(function(a){a?kj(this,a):this.X(Error("Unable to fetch screen."))},a),v(a.X,a))):a.X(Error("Waiting for session status timed out."))}g.Mc=function(){return this.b};g.Jd=function(a){this.C()||a||this.warn("Cast session died.")};function pj(a,b){jj.call(this,a,b,"DialSession");this.k=this.D=null;this.L="";this.j=null;this.u=r;this.p=NaN;this.O=v(this.Fd,this);this.b=r}z(pj,jj);g=pj.prototype;g.Yb=function(a){this.k=a;this.k.addUpdateListener(this.O)};g.cb=function(a){this.j=a;this.u()};g.stop=function(){this.b();this.b=r;I(this.p);this.k?this.k.stop(v(this.X,this,null),v(this.X,this,"Failed to stop DIAL device.")):this.X()};
g.B=function(){this.b();this.b=r;I(this.p);this.k&&this.k.removeUpdateListener(this.O);this.k=null;pj.F.B.call(this)};function qj(a){a.b=gj(a.G,a.L,a.g.label,a.g.friendlyName,v(function(a){this.b=r;kj(this,a)},a),v(function(a){this.b=r;this.X(a)},a))}g.Fd=function(a){this.C()||a||(this.warn("DIAL session died."),this.b(),this.b=r,this.X())};function rj(a){var b={};b.pairingCode=a.L;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}return Yc(b)}
g.Wb=function(a){this.L=ki();if(this.j){var b=new chrome.cast.DialLaunchResponse(!0,rj(this));a(b);qj(this)}else this.u=v(function(){I(this.p);this.u=r;this.p=NaN;var b=new chrome.cast.DialLaunchResponse(!0,rj(this));a(b);qj(this)},this),this.p=H(v(function(){this.u()},this),100)};
g.Hd=function(a,b){dj(this.G,this.D.receiver.label,a,this.g.friendlyName,v(function(a){a&&a.token?(kj(this,a),b(new chrome.cast.DialLaunchResponse(!1))):this.Wb(b)},this),v(function(a){this.warn("Failed to get DIAL screen: "+a);this.Wb(b)},this))};function sj(a,b){jj.call(this,a,b,"ManualSession");this.b=H(v(this.cb,this,null),150)}z(sj,jj);sj.prototype.stop=function(){this.X()};sj.prototype.Yb=r;sj.prototype.cb=function(){I(this.b);this.b=NaN;var a=si(this.G.R(),this.g.label);a?kj(this,a):this.X(Error("No such screen"))};sj.prototype.B=function(){I(this.b);this.b=NaN;sj.F.B.call(this)};function W(a){T.call(this);this.g=a;this.b=null;this.k=!1;this.i=[];this.j=v(this.oc,this)}z(W,T);g=W.prototype;
g.init=function(a){chrome.cast.timeout.requestSession=3E4;var b=new chrome.cast.SessionRequest("233637DE");b.dialRequest=new chrome.cast.DialRequest("YouTube");b=new chrome.cast.ApiConfig(b,v(this.Ec,this),v(this.Wd,this));b.customDialLaunchCallback=v(this.Vd,this);chrome.cast.initialize(b,v(function(){this.C()||(chrome.cast.addReceiverActionListener&&chrome.cast.addReceiverActionListener(this.j),Jh(tj),this.g.subscribe("onlineScreenChange",v(this.nc,this)),this.i=uj(this),chrome.cast.setCustomReceivers(this.i,
r,v(function(a){this.J("Failed to set initial custom receivers: "+Q(a))},this)),this.q("yt-remote-cast2-availability-change",wj(this)),a(!0))},this),function(b){this.J("Failed to initialize API: "+Q(b));a(!1)})};
g.Ue=function(a,b){xj("Setting connected screen ID: "+a+" -> "+b);if(this.b){var c=this.b.i;if(!a||c&&c.id!=a)xj("Unsetting old screen status: "+this.b.g.friendlyName),sb(this.b),this.b=null}if(a&&b){if(!this.b){xj("setConnectedScreenStatus: new active receiver.");c=si(this.g.R(),a);c=yj(this,c);if(!c){xj("setConnectedScreenStatus: Connected receiver not custom...");return}xj("setConnectedScreenStatus: new active receiver: "+c.friendlyName);zj(this,new sj(this.g,c));this.b.cb(null)}this.b.Tb(b)}else xj("setConnectedScreenStatus: no screen.")};
function yj(a,b){return b?Fa(a.i,function(a){return Rh(b,a.label)},a):null}g.Ve=function(a){this.C()?this.J("Setting connection data on disposed cast v2"):this.b?this.b.cb(a):this.J("Setting connection data without a session")};g.stopSession=function(){this.C()?this.J("Stopping session on disposed cast v2"):this.b?(this.b.stop(),sb(this.b),this.b=null):xj("Stopping non-existing session")};g.requestSession=function(){chrome.cast.requestSession(v(this.Ec,this),v(this.Me,this))};
g.B=function(){this.g.Da("onlineScreenChange",v(this.nc,this));chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener&&chrome.cast.removeReceiverActionListener(this.j);Mh(tj);sb(this.b);W.F.B.call(this)};function xj(a){U("Controller",a)}g.J=function(a){U("Controller",a)};function tj(a){chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(a)}function wj(a){return a.k||!!a.i.length||!!a.b}
function zj(a,b){sb(a.b);(a.b=b)?(a.q("yt-remote-cast2-receiver-selected",b.g),b.subscribe("sessionScreen",v(a.Bd,a,b)),b.i&&a.q("yt-remote-cast2-session-change",b.i)):a.q("yt-remote-cast2-session-change",null)}g.Bd=function(a,b){this.b==a&&(b||zj(this,null),this.q("yt-remote-cast2-session-change",b))};
g.oc=function(a,b){if(!this.C())if(a)switch(xj("onReceiverAction_ "+a.friendlyName+" -- "+b),b){case chrome.cast.ReceiverAction.CAST:if(this.b)if(this.b.g.label!=a.label)this.b.stop();else{xj("onReceiverAction_: Casting to active receiver.");this.b.i&&this.q("yt-remote-cast2-session-change",this.b.i);break}switch(a.receiverType){case chrome.cast.ReceiverType.CUSTOM:zj(this,new sj(this.g,a));break;case chrome.cast.ReceiverType.DIAL:zj(this,new pj(this.g,a));break;case chrome.cast.ReceiverType.CAST:zj(this,
new lj(this.g,a));break;default:this.J("Unknown receiver type: "+a.receiverType);return}break;case chrome.cast.ReceiverAction.STOP:this.b&&this.b.g.label==a.label?this.b.stop():this.J("Stopping receiver w/o session: "+a.friendlyName)}else this.J("onReceiverAction_ called without receiver.")};
g.Vd=function(a){if(this.C())return Promise.reject(Error("disposed"));var b=a.receiver;b.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.J("Not DIAL receiver: "+b.friendlyName),b.receiverType=chrome.cast.ReceiverType.DIAL);var c=this.b?this.b.g:null;if(!c||c.label!=b.label)return this.J("Receiving DIAL launch request for non-clicked DIAL receiver: "+b.friendlyName),Promise.reject(Error("illegal DIAL launch"));c&&c.label==b.label&&c.receiverType==chrome.cast.ReceiverType.CAST&&(this.J("Changing CAST intent from Cast-v2 to DIAL for "+
b.friendlyName),zj(this,new pj(this.g,b)));b=this.b;b.D=a;return b.D.appState==chrome.cast.DialAppState.RUNNING?new Promise(v(b.Hd,b,(b.D.extraData||{}).screenId||null)):new Promise(v(b.Wb,b))};g.Ec=function(a){xj("New cast session ID: "+a.sessionId);this.C()||(this.b&&this.b.g.label==a.receiver.label||this.oc(a.receiver,chrome.cast.ReceiverAction.CAST),a.receiver.receiverType!=chrome.cast.ReceiverType.CUSTOM&&this.b.Yb(a))};g.Xe=function(){return this.b?this.b.Mc():null};
g.Me=function(a){this.C()||(this.J("Failed to estabilish a session: "+Q(a)),a.code!=chrome.cast.ErrorCode.CANCEL&&zj(this,null))};g.Wd=function(a){xj("Receiver availability updated: "+a);if(!this.C()){var b=wj(this);this.k=a==chrome.cast.ReceiverAvailability.AVAILABLE;wj(this)!=b&&this.q("yt-remote-cast2-availability-change",wj(this))}};
function uj(a){var b=a.g.Qc(!0);return D(b,function(a){var b=a.uuid?a.uuid:a.id,e=yj(this,a);e?e.label=b:(e=new chrome.cast.Receiver(b,a.name),e.receiverType=chrome.cast.ReceiverType.CUSTOM);return e},a)}g.nc=function(){if(!this.C()){var a=wj(this);this.i=uj(this);xj("Updating custom receivers: "+Q(this.i));chrome.cast.setCustomReceivers(this.i,r,v(function(){this.J("Failed to set custom receivers.")},this));var b=wj(this);b!=a&&this.q("yt-remote-cast2-availability-change",b)}};
W.prototype.setLaunchParams=W.prototype.Ve;W.prototype.setConnectedScreenStatus=W.prototype.Ue;W.prototype.stopSession=W.prototype.stopSession;W.prototype.getCastSession=W.prototype.Xe;W.prototype.requestSession=W.prototype.requestSession;W.prototype.init=W.prototype.init;W.prototype.dispose=W.prototype.dispose;function Aj(a,b){Hd?Cj(a)&&(Dj(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?Ej(b):di(function(a,d){a?Ej(b):(Fj("Failed to load cast API: "+d),Gj(!1),Dj(!1),Sf("yt-remote-cast-available"),Sf("yt-remote-cast-receiver"),Hj(),b(!1))})):Bj("Cannot initialize because not running Chrome")}function Hj(){Bj("dispose");ei();var a=Ij();a&&a.dispose();Jj=null;y("yt.mdx.remote.cloudview.instance_",null);Kj(!1);Kb(Lj);Lj.length=0}function Mj(){return!!S("yt-remote-cast-installed")}
function Nj(){var a=S("yt-remote-cast-receiver");return a?a.friendlyName:null}function Oj(){Bj("clearCurrentReciever");Sf("yt-remote-cast-receiver")}function Pj(){Mj()?Ij()?Qj()?(Bj("Requesting cast selector."),Jj.requestSession()):(Bj("Wait for cast API to be ready to request the session."),Lj.push(J("yt-remote-cast2-api-ready",Pj))):Fj("requestCastSelector: Cast is not initialized."):Fj("requestCastSelector: Cast API is not installed!")}
function Rj(a){Qj()?Ij().setLaunchParams(a):Fj("setLaunchParams called before ready.")}function Sj(a,b){Qj()?Ij().setConnectedScreenStatus(a,b):Fj("setConnectedScreenStatus called before ready.")}var Jj=null;function Tj(a){Jj.init(a)}
function Cj(a){var b=!1;if(!Jj){var c=q("yt.mdx.remote.cloudview.instance_");c||(c=new W(a),c.subscribe("yt-remote-cast2-availability-change",function(a){R("yt-remote-cast-available",a);K("yt-remote-cast2-availability-change",a)}),c.subscribe("yt-remote-cast2-receiver-selected",function(a){Bj("onReceiverSelected: "+a.friendlyName);R("yt-remote-cast-receiver",a);K("yt-remote-cast2-receiver-selected",a)}),c.subscribe("yt-remote-cast2-session-change",function(a){Bj("onSessionChange: "+Xh(a));a||Sf("yt-remote-cast-receiver");
K("yt-remote-cast2-session-change",a)}),y("yt.mdx.remote.cloudview.instance_",c),b=!0);Jj=c}Bj("cloudview.createSingleton_: "+b);return b}function Ij(){Jj||(Jj=q("yt.mdx.remote.cloudview.instance_"));return Jj}function Ej(a){Gj(!0);Dj(!1);Tj(function(b){b?(Kj(!0),K("yt-remote-cast2-api-ready")):(Fj("Failed to initialize cast API."),Gj(!1),Sf("yt-remote-cast-available"),Sf("yt-remote-cast-receiver"),Hj());a(b)})}function Bj(a){U("cloudview",a)}function Fj(a){U("cloudview",a)}
function Gj(a){Bj("setCastInstalled_ "+a);R("yt-remote-cast-installed",a)}function Qj(){return!!q("yt.mdx.remote.cloudview.apiReady_")}function Kj(a){Bj("setApiReady_ "+a);y("yt.mdx.remote.cloudview.apiReady_",a)}function Dj(a){y("yt.mdx.remote.cloudview.initializing_",a)}var Lj=[];function Uj(){if(!("cast"in window))return!1;var a=window.cast||{};return"ActivityStatus"in a&&"Api"in a&&"LaunchRequest"in a&&"Receiver"in a}function Vj(a){U("CAST",a)}function Wj(a){var b=Xj();b&&b.logMessage&&b.logMessage(a)}function Yj(a){if(a.source==window&&a.data&&"CastApi"==a.data.source&&"Hello"==a.data.event)for(;Zj.length;)Zj.shift()()}
function ak(){if(!q("yt.mdx.remote.castv2_")&&!bk&&(Ia(Ka)&&Qa(Ka,Ki()),Uj())){var a=Xj();a?(a.removeReceiverListener("YouTube",ck),a.addReceiverListener("YouTube",ck),Vj("API initialized in the other binary")):(a=new cast.Api,dk(a),a.addReceiverListener("YouTube",ck),a.setReloadTabRequestHandler&&a.setReloadTabRequestHandler(function(){H(function(){window.location.reload(!0)},1E3)}),Jh(Wj),Vj("API initialized"));bk=!0}}
function ek(){var a=Xj();a&&(Vj("API disposed"),Mh(Wj),a.setReloadTabRequestHandler&&a.setReloadTabRequestHandler(r),a.removeReceiverListener("YouTube",ck),dk(null));bk=!1;Zj=null;(a=Oc(window,"message",Yj,!1))&&Pc(a)}function fk(a){var b=Ga(Ka,function(b){return b.id==a.id});0<=b&&(Ka[b]=ii(a))}
function ck(a){a.length&&Vj("Updating receivers: "+Q(a));gk(a);K("yt-remote-cast-device-list-update");C(hk(),function(a){ik(a.id)});C(a,function(a){if(a.isTabProjected){var c=jk(a.id);Vj("Detected device: "+c.id+" is tab projected. Firing DEVICE_TAB_PROJECTED event.");H(function(){K("yt-remote-cast-device-tab-projected",c.id)},1E3)}})}
function kk(a,b){Vj("Updating "+a+" activity status: "+Q(b));var c=jk(a);c?(b.activityId&&(c.activityId=b.activityId),c.status="running"==b.status?"RUNNING":"stopped"==b.status?"STOPPED":"error"==b.status?"ERROR":"UNKNOWN","RUNNING"!=c.status&&(c.activityId=""),fk(c),K("yt-remote-cast-device-status-update",c)):Vj("Device not found")}function hk(){ak();return oi(Ka)}
function gk(a){a=D(a,function(a){var c=a.id,d;d=a.name;d=ta(d,"&")?"document"in l?qa(d):sa(d):d;c={id:c,name:d};if(a=jk(a.id))c.activityId=a.activityId,c.status=a.status;return c});Ja();Qa(Ka,a)}function jk(a){var b=hk();return Fa(b,function(b){return b.id==a})||null}function ik(a){var b=jk(a),c=Xj();c&&b&&b.activityId&&c.getActivityStatus(b.activityId,function(b){"error"==b.status&&(b.status="stopped");kk(a,b)})}
function lk(a){ak();var b=jk(a),c=Xj();c&&b&&b.activityId?(Vj("Stopping cast activity"),c.stopActivity(b.activityId,ma(kk,a))):Vj("Dropping cast activity stop")}function Xj(){return q("yt.mdx.remote.castapi.api_")}function dk(a){y("yt.mdx.remote.castapi.api_",a)}var bk=!1,Zj=null,Ka=q("yt.mdx.remote.castapi.devices_")||[];y("yt.mdx.remote.castapi.devices_",Ka);function mk(a){a&&(this.id=a.id||a.name,this.name=a.name,this.app=a.app,this.type=a.type||"REMOTE_CONTROL")}mk.prototype.id="";mk.prototype.name="";mk.prototype.app="";mk.prototype.type="REMOTE_CONTROL";mk.prototype.equals=function(a){return a?this.id==a.id:!1};function nk(a,b){this.action=a;this.params=b||null};function ok(){};function pk(){this.b=w()}new pk;pk.prototype.set=function(a){this.b=a};pk.prototype.get=function(){return this.b};function qk(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=!1;this.Fc=!0}qk.prototype.dispose=function(){};qk.prototype.preventDefault=function(){this.defaultPrevented=!0;this.Fc=!1};var rk=!M||rc(9),sk=M&&!qc("9");!jc||qc("528");ic&&qc("1.9b")||M&&qc("8")||hc&&qc("9.5")||jc&&qc("528");ic&&!qc("8")||M&&qc("9");function tk(a,b){qk.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.charCode=this.keyCode=this.clientY=this.clientX=0;this.shiftKey=this.altKey=this.ctrlKey=!1;this.b=this.state=null;a&&this.init(a,b)}z(tk,qk);
tk.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(ic){var e;t:{try{hh(d.nodeName);e=!0;break t}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.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.b=a;a.defaultPrevented&&this.preventDefault()};tk.prototype.preventDefault=function(){tk.F.preventDefault.call(this);var a=this.b;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,sk)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};tk.prototype.g=function(){return this.b};var uk="closure_listenable_"+(1E6*Math.random()|0),vk=0;function wk(a,b,c,d,e){this.listener=a;this.proxy=null;this.src=b;this.type=c;this.xb=!!d;this.Db=e;this.key=++vk;this.removed=this.Ab=!1}function xk(a){a.removed=!0;a.listener=null;a.proxy=null;a.src=null;a.Db=null};function yk(a){this.src=a;this.b={};this.g=0}yk.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.b[f];a||(a=this.b[f]=[],this.g++);var h=zk(a,b,d,e);-1<h?(b=a[h],c||(b.Ab=!1)):(b=new wk(b,this.src,f,!!d,e),b.Ab=c,a.push(b));return b};yk.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.b))return!1;var e=this.b[a];b=zk(e,b,c,d);return-1<b?(xk(e[b]),A.splice.call(e,b,1),0==e.length&&(delete this.b[a],this.g--),!0):!1};
function Ak(a,b){var c=b.type;if(!(c in a.b))return!1;var d=Ma(a.b[c],b);d&&(xk(b),0==a.b[c].length&&(delete a.b[c],a.g--));return d}yk.prototype.removeAll=function(a){a=a&&a.toString();var b=0,c;for(c in this.b)if(!a||c==a){for(var d=this.b[c],e=0;e<d.length;e++)++b,xk(d[e]);delete this.b[c];this.g--}return b};function Bk(a,b,c,d,e){a=a.b[b.toString()];b=-1;a&&(b=zk(a,c,d,e));return-1<b?a[b]:null}
function zk(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.removed&&f.listener==b&&f.xb==!!c&&f.Db==d)return e}return-1};var Ck="closure_lm_"+(1E6*Math.random()|0),Dk={},Ek=0;function Fk(a,b,c,d,e){if(t(b)){for(var f=0;f<b.length;f++)Fk(a,b[f],c,d,e);return null}c=Gk(c);if(a&&a[uk])a=a.listen(b,c,d,e);else{if(!b)throw Error("Invalid event type");var f=!!d,h=Hk(a);h||(a[Ck]=h=new yk(a));c=h.add(b,c,!1,d,e);c.proxy||(d=Ik(),c.proxy=d,d.src=a,d.listener=c,a.addEventListener?a.addEventListener(b.toString(),d,f):a.attachEvent(Jk(b.toString()),d),Ek++);a=c}return a}
function Ik(){var a=Kk,b=rk?function(c){return a.call(b.src,b.listener,c)}:function(c){c=a.call(b.src,b.listener,c);if(!c)return c};return b}function Lk(a,b,c,d,e){if(t(b))for(var f=0;f<b.length;f++)Lk(a,b[f],c,d,e);else c=Gk(c),a&&a[uk]?a.ac(b,c,d,e):a&&(a=Hk(a))&&(b=Bk(a,b,c,!!d,e))&&Mk(b)}
function Mk(a){if(ea(a)||!a||a.removed)return!1;var b=a.src;if(b&&b[uk])return Ak(b.wa,a);var c=a.type,d=a.proxy;b.removeEventListener?b.removeEventListener(c,d,a.xb):b.detachEvent&&b.detachEvent(Jk(c),d);Ek--;(c=Hk(b))?(Ak(c,a),0==c.g&&(c.src=null,b[Ck]=null)):xk(a);return!0}function Jk(a){return a in Dk?Dk[a]:Dk[a]="on"+a}function Nk(a,b,c,d){var e=1;if(a=Hk(a))if(b=a.b[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.xb==c&&!f.removed&&(e&=!1!==Ok(f,d))}return Boolean(e)}
function Ok(a,b){var c=a.listener,d=a.Db||a.src;a.Ab&&Mk(a);return c.call(d,b)}
function Kk(a,b){if(a.removed)return!0;if(!rk){var c=b||q("window.event"),d=new tk(c,this),e=!0;if(!(0>c.keyCode||void 0!=c.returnValue)){t:{var f=!1;if(0==c.keyCode)try{c.keyCode=-1;break t}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],e&=Nk(c[k],f,!0,d);for(k=0;k<c.length;k++)d.currentTarget=c[k],e&=Nk(c[k],f,!1,d)}return e}return Ok(a,new tk(b,this))}
function Hk(a){a=a[Ck];return a instanceof yk?a:null}var Pk="__closure_events_fn_"+(1E9*Math.random()>>>0);function Gk(a){if(fa(a))return a;a[Pk]||(a[Pk]=function(b){return a.handleEvent(b)});return a[Pk]};function Qk(){this.wa=new yk(this);this.La=this;this.ca=null}z(Qk,pb);Qk.prototype[uk]=!0;g=Qk.prototype;g.addEventListener=function(a,b,c,d){Fk(this,a,b,c,d)};g.removeEventListener=function(a,b,c,d){Lk(this,a,b,c,d)};
function Rk(a,b){var c,d=a.ca;if(d){c=[];for(var e=1;d;d=d.ca)c.push(d),++e}var d=a.La,e=b,f=e.type||e;if(u(e))e=new qk(e,d);else if(e instanceof qk)e.target=e.target||d;else{var h=e,e=new qk(f,d);kb(e,h)}var h=!0,k;if(c)for(var m=c.length-1;0<=m;m--)k=e.currentTarget=c[m],h=Sk(k,f,!0,e)&&h;k=e.currentTarget=d;h=Sk(k,f,!0,e)&&h;h=Sk(k,f,!1,e)&&h;if(c)for(m=0;m<c.length;m++)k=e.currentTarget=c[m],h=Sk(k,f,!1,e)&&h}g.B=function(){Qk.F.B.call(this);this.removeAllListeners();this.ca=null};
g.listen=function(a,b,c,d){return this.wa.add(String(a),b,!1,c,d)};g.ac=function(a,b,c,d){return this.wa.remove(String(a),b,c,d)};g.removeAllListeners=function(a){return this.wa?this.wa.removeAll(a):0};function Sk(a,b,c,d){b=a.wa.b[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.removed&&h.xb==c){var k=h.listener,m=h.Db||h.src;h.Ab&&Ak(a.wa,h);e=!1!==k.call(m,d)&&e}}return e&&!1!=d.Fc};function Tk(a,b){this.g=new Bf(a);this.b=b?zf:yf}Tk.prototype.stringify=function(a){return Af(this.g,a)};Tk.prototype.parse=function(a){return this.b(a)};function Uk(a,b){Qk.call(this);this.b=a||1;this.g=b||l;this.i=v(this.yd,this);this.j=w()}z(Uk,Qk);g=Uk.prototype;g.oa=!1;g.$=null;function Vk(a,b){a.b=b;a.$&&a.oa?(a.stop(),a.start()):a.$&&a.stop()}g.yd=function(){if(this.oa){var a=w()-this.j;0<a&&a<.8*this.b?this.$=this.g.setTimeout(this.i,this.b-a):(this.$&&(this.g.clearTimeout(this.$),this.$=null),Rk(this,"tick"),this.oa&&(this.$=this.g.setTimeout(this.i,this.b),this.j=w()))}};
g.start=function(){this.oa=!0;this.$||(this.$=this.g.setTimeout(this.i,this.b),this.j=w())};g.stop=function(){this.oa=!1;this.$&&(this.g.clearTimeout(this.$),this.$=null)};g.B=function(){Uk.F.B.call(this);this.stop();delete this.g};function Wk(a,b,c){if(fa(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:l.setTimeout(a,b||0)};function Xk(a,b,c){this.j=a;this.i=b;this.g=c;this.b=v(this.xd,this)}z(Xk,pb);g=Xk.prototype;g.Nb=!1;g.Pa=null;g.stop=function(){this.Pa&&(l.clearTimeout(this.Pa),this.Pa=null,this.Nb=!1)};g.B=function(){Xk.F.B.call(this);this.stop()};g.xd=function(){this.Pa=null;this.Nb&&(this.Nb=!1,Yk(this))};function Yk(a){a.Pa=Wk(a.b,a.i);a.j.call(a.g)};function Zk(a){this.g=a;this.b={}}z(Zk,pb);var $k=[];g=Zk.prototype;g.listen=function(a,b,c,d){t(b)||(b&&($k[0]=b.toString()),b=$k);for(var e=0;e<b.length;e++){var f=Fk(a,b[e],c||this.handleEvent,d||!1,this.g||this);if(!f)break;this.b[f.key]=f}return this};
g.ac=function(a,b,c,d,e){if(t(b))for(var f=0;f<b.length;f++)this.ac(a,b[f],c,d,e);else c=c||this.handleEvent,e=e||this.g||this,c=Gk(c),d=!!d,b=a&&a[uk]?Bk(a.wa,String(b),c,d,e):a?(a=Hk(a))?Bk(a,b,c,d,e):null:null,b&&(Mk(b),delete this.b[b.key]);return this};g.removeAll=function(){Xa(this.b,Mk);this.b={}};g.B=function(){Zk.F.B.call(this);this.removeAll()};g.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};function al(){}al.prototype.b=null;function bl(a){var b;(b=a.b)||(b={},cl(a)&&(b[0]=!0,b[1]=!0),b=a.b=b);return b};var dl;function el(){}z(el,al);function fl(a){return(a=cl(a))?new ActiveXObject(a):new XMLHttpRequest}function cl(a){if(!a.g&&"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.g=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.g}dl=new el;function gl(a,b,c,d,e){this.b=a;this.i=c;this.u=d;this.p=e||1;this.o=45E3;this.j=new Zk(this);this.g=new Uk;Vk(this.g,250)}g=gl.prototype;g.Ba=null;g.fa=!1;g.Ua=null;g.dc=null;g.bb=null;g.Ra=null;g.ra=null;g.va=null;g.Ya=null;g.K=null;g.hb=0;g.ia=null;g.zb=null;g.Ea=null;g.Xa=-1;g.xc=!0;g.Fa=!1;g.Rb=0;g.rb=null;var hl={},il={};g=gl.prototype;g.setTimeout=function(a){this.o=a};function jl(a,b,c){a.Ra=1;a.ra=hf(b.clone());a.Ya=c;a.k=!0;kl(a,null)}
function ll(a,b,c,d,e){a.Ra=1;a.ra=hf(b.clone());a.Ya=null;a.k=c;e&&(a.xc=!1);kl(a,d)}function kl(a,b){a.bb=w();ml(a);a.va=a.ra.clone();ff(a.va,"t",a.p);a.hb=0;a.K=a.b.Zb(a.b.$a()?b:null);0<a.Rb&&(a.rb=new Xk(v(a.yc,a,a.K),a.Rb));a.j.listen(a.K,"readystatechange",a.Kd);var c=a.Ba?gb(a.Ba):{};a.Ya?(a.zb="POST",c["Content-Type"]="application/x-www-form-urlencoded",a.K.send(a.va,a.zb,a.Ya,c)):(a.zb="GET",a.xc&&!jc&&(c.Connection="close"),a.K.send(a.va,a.zb,null,c));a.b.ea(1)}
g.Kd=function(a){a=a.target;var b=this.rb;b&&3==nl(a)?b.Pa?b.Nb=!0:Yk(b):this.yc(a)};
g.yc=function(a){try{if(a==this.K)t:{var b=nl(this.K),c=this.K.j,d=this.K.getStatus();if(M&&!rc(10)||jc&&!qc("420+")){if(4>b)break t}else if(3>b||3==b&&!hc&&!ol(this.K))break t;this.Fa||4!=b||7==c||(8==c||0>=d?this.b.ea(3):this.b.ea(2));pl(this);var e=this.K.getStatus();this.Xa=e;var f=ol(this.K);(this.fa=200==e)?(4==b&&ql(this),this.k?(rl(this,b,f),hc&&this.fa&&3==b&&(this.j.listen(this.g,"tick",this.zd),this.g.start())):sl(this,f),this.fa&&!this.Fa&&(4==b?this.b.tb(this):(this.fa=!1,ml(this)))):
(this.Ea=400==e&&0<f.indexOf("Unknown SID")?3:0,X(),ql(this),tl(this))}}catch(h){this.K&&ol(this.K)}finally{}};function rl(a,b,c){for(var d=!0;!a.Fa&&a.hb<c.length;){var e=ul(a,c);if(e==il){4==b&&(a.Ea=4,X(),d=!1);break}else if(e==hl){a.Ea=4;X();d=!1;break}else sl(a,e)}4==b&&0==c.length&&(a.Ea=1,X(),d=!1);a.fa=a.fa&&d;d||(ql(a),tl(a))}g.zd=function(){var a=nl(this.K),b=ol(this.K);this.hb<b.length&&(pl(this),rl(this,a,b),this.fa&&4!=a&&ml(this))};
function ul(a,b){var c=a.hb,d=b.indexOf("\n",c);if(-1==d)return il;c=Number(b.substring(c,d));if(isNaN(c))return hl;d+=1;if(d+c>b.length)return il;var e=b.substr(d,c);a.hb=d+c;return e}
function vl(a,b){a.bb=w();ml(a);var c=b?window.location.hostname:"";a.va=a.ra.clone();P(a.va,"DOMAIN",c);P(a.va,"t",a.p);try{a.ia=new ActiveXObject("htmlfile")}catch(d){ql(a);a.Ea=7;X();tl(a);return}var e="<html><body>";b&&(e+='<script>document.domain="'+c+'"\x3c/script>');e+="</body></html>";a.ia.open();a.ia.write(e);a.ia.close();a.ia.parentWindow.m=v(a.Td,a);a.ia.parentWindow.d=v(a.Dc,a,!0);a.ia.parentWindow.rpcClose=v(a.Dc,a,!1);c=a.ia.createElement("div");a.ia.parentWindow.document.body.appendChild(c);
c.innerHTML='<iframe src="'+a.va+'"></iframe>';a.b.ea(1)}g.Td=function(a){wl(v(this.Te,this,a),0)};g.Te=function(a){this.Fa||(pl(this),sl(this,a),ml(this))};g.Dc=function(a){wl(v(this.Se,this,a),0)};g.Se=function(a){this.Fa||(ql(this),this.fa=a,this.b.tb(this),this.b.ea(4))};g.cancel=function(){this.Fa=!0;ql(this)};function ml(a){a.dc=w()+a.o;xl(a,a.o)}function xl(a,b){if(null!=a.Ua)throw Error("WatchDog timer not null");a.Ua=wl(v(a.Le,a),b)}function pl(a){a.Ua&&(l.clearTimeout(a.Ua),a.Ua=null)}
g.Le=function(){this.Ua=null;var a=w();0<=a-this.dc?(2!=this.Ra&&this.b.ea(3),ql(this),this.Ea=2,X(),tl(this)):xl(this,this.dc-a)};function tl(a){a.b.Ic()||a.Fa||a.b.tb(a)}function ql(a){pl(a);sb(a.rb);a.rb=null;a.g.stop();a.j.removeAll();if(a.K){var b=a.K;a.K=null;yl(b);b.dispose()}a.ia&&(a.ia=null)}function sl(a,b){try{a.b.Kc(a,b),a.b.ea(4)}catch(c){}};function zl(a,b,c,d,e){if(0==d)c(!1);else{var f=e||0;d--;Al(a,b,function(e){e?c(!0):l.setTimeout(function(){zl(a,b,c,d,f)},f)})}}function Al(a,b,c){var d=new Image;d.onload=function(){try{Bl(d),c(!0)}catch(a){}};d.onerror=function(){try{Bl(d),c(!1)}catch(a){}};d.onabort=function(){try{Bl(d),c(!1)}catch(a){}};d.ontimeout=function(){try{Bl(d),c(!1)}catch(a){}};l.setTimeout(function(){if(d.ontimeout)d.ontimeout()},b);d.src=a}
function Bl(a){a.onload=null;a.onerror=null;a.onabort=null;a.ontimeout=null};function Cl(a){this.b=a;this.g=new Tk(null,!0)}g=Cl.prototype;g.Ub=null;g.Y=null;g.wb=!1;g.tc=null;g.vb=null;g.Xb=null;g.cc=null;g.aa=null;g.qa=-1;g.eb=null;g.fb=null;g.connect=function(a){this.cc=a;a=Dl(this.b,null,this.cc);X();this.tc=w();var b=this.b.u;null!=b?(this.eb=b[0],(this.fb=b[1])?(this.aa=1,El(this)):(this.aa=2,Fl(this))):(ff(a,"MODE","init"),this.Y=new gl(this,0,void 0,void 0,void 0),this.Y.Ba=this.Ub,ll(this.Y,a,!1,null,!0),this.aa=0)};
function El(a){var b=Dl(a.b,a.fb,"/mail/images/cleardot.gif");hf(b);zl(b.toString(),5E3,v(a.Yd,a),3,2E3);a.ea(1)}g.Yd=function(a){if(a)this.aa=2,Fl(this);else{X();var b=this.b;b.da=b.ua.qa;Gl(b,9)}a&&this.ea(2)};
function Fl(a){var b=a.b.D;if(null!=b)X(),b?(X(),Hl(a.b,a,!1)):(X(),Hl(a.b,a,!0));else if(a.Y=new gl(a,0,void 0,void 0,void 0),a.Y.Ba=a.Ub,b=a.b,b=Dl(b,b.$a()?a.eb:null,a.cc),X(),!M||rc(10))ff(b,"TYPE","xmlhttp"),ll(a.Y,b,!1,a.eb,!1);else{ff(b,"TYPE","html");var c=a.Y;a=Boolean(a.eb);c.Ra=3;c.ra=hf(b.clone());vl(c,a)}}g.Zb=function(a){return this.b.Zb(a)};g.Ic=function(){return!1};
g.Kc=function(a,b){this.qa=a.Xa;if(0==this.aa)if(b){try{var c=this.g.parse(b)}catch(d){c=this.b;c.da=this.qa;Gl(c,2);return}this.eb=c[0];this.fb=c[1]}else c=this.b,c.da=this.qa,Gl(c,2);else if(2==this.aa)if(this.wb)X(),this.Xb=w();else if("11111"==b){if(X(),this.wb=!0,this.vb=w(),c=this.vb-this.tc,!M||rc(10)||500>c)this.qa=200,this.Y.cancel(),X(),Hl(this.b,this,!0)}else X(),this.vb=this.Xb=w(),this.wb=!1};
g.tb=function(){this.qa=this.Y.Xa;if(this.Y.fa)0==this.aa?this.fb?(this.aa=1,El(this)):(this.aa=2,Fl(this)):2==this.aa&&(a=!1,(a=!M||rc(10)?this.wb:200>this.Xb-this.vb?!1:!0)?(X(),Hl(this.b,this,!0)):(X(),Hl(this.b,this,!1)));else{0==this.aa?X():2==this.aa&&X();var a=this.b;a.da=this.qa;Gl(a,2)}};g.$a=function(){return this.b.$a()};g.ea=function(a){this.b.ea(a)};function Il(a){Qk.call(this);this.headers=new Me;this.O=a||null;this.g=!1;this.L=this.b=null;this.ma=this.u="";this.j=0;this.o="";this.i=this.ba=this.p=this.T=!1;this.k=0;this.D=null;this.la="";this.G=this.za=!1}z(Il,Qk);var Jl=/^https?$/i,Kl=["POST","PUT"];g=Il.prototype;
g.send=function(a,b,c,d){if(this.b)throw Error("[goog.net.XhrIo] Object is active with another request="+this.u+"; newUri="+a);b=b?b.toUpperCase():"GET";this.u=a;this.o="";this.j=0;this.ma=b;this.T=!1;this.g=!0;this.b=this.O?fl(this.O):fl(dl);this.L=this.O?bl(this.O):bl(dl);this.b.onreadystatechange=v(this.lc,this);try{ok(Ll(this,"Opening Xhr")),this.ba=!0,this.b.open(b,String(a),!0),this.ba=!1}catch(e){ok(Ll(this,"Error opening Xhr: "+e.message));Ml(this,e);return}a=c||"";var f=this.headers.clone();
d&&Re(d,function(a,b){f.set(b,a)});d=Fa(f.na(),Nl);c=l.FormData&&a instanceof l.FormData;!Ha(Kl,b)||d||c||f.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");f.forEach(function(a,b){this.b.setRequestHeader(b,a)},this);this.la&&(this.b.responseType=this.la);"withCredentials"in this.b&&(this.b.withCredentials=this.za);try{Ql(this),0<this.k&&(this.G=Rl(this.b),ok(Ll(this,"Will abort after "+this.k+"ms if incomplete, xhr2 "+this.G)),this.G?(this.b.timeout=this.k,this.b.ontimeout=v(this.mc,
this)):this.D=Wk(this.mc,this.k,this)),ok(Ll(this,"Sending request")),this.p=!0,this.b.send(a),this.p=!1}catch(h){ok(Ll(this,"Send error: "+h.message)),Ml(this,h)}};function Rl(a){return M&&qc(9)&&ea(a.timeout)&&p(a.ontimeout)}function Nl(a){return"content-type"==a.toLowerCase()}g.mc=function(){"undefined"!=typeof aa&&this.b&&(this.o="Timed out after "+this.k+"ms, aborting",this.j=8,Ll(this,this.o),Rk(this,"timeout"),yl(this,8))};
function Ml(a,b){a.g=!1;a.b&&(a.i=!0,a.b.abort(),a.i=!1);a.o=b;a.j=5;Sl(a);Tl(a)}function Sl(a){a.T||(a.T=!0,Rk(a,"complete"),Rk(a,"error"))}function yl(a,b){a.b&&a.g&&(Ll(a,"Aborting"),a.g=!1,a.i=!0,a.b.abort(),a.i=!1,a.j=b||7,Rk(a,"complete"),Rk(a,"abort"),Tl(a))}g.B=function(){this.b&&(this.g&&(this.g=!1,this.i=!0,this.b.abort(),this.i=!1),Tl(this,!0));Il.F.B.call(this)};g.lc=function(){this.C()||(this.ba||this.p||this.i?Ul(this):this.ie())};g.ie=function(){Ul(this)};
function Ul(a){if(a.g&&"undefined"!=typeof aa)if(a.L[1]&&4==nl(a)&&2==a.getStatus())Ll(a,"Local request error detected and ignored");else if(a.p&&4==nl(a))Wk(a.lc,0,a);else if(Rk(a,"readystatechange"),4==nl(a)){Ll(a,"Request complete");a.g=!1;try{var b=a.getStatus(),c,d;t:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:d=!0;break t;default:d=!1}if(!(c=d)){var e;if(e=0===b){var f=Rc(String(a.u))[1]||null;if(!f&&self.location)var h=self.location.protocol,f=h.substr(0,h.length-
1);e=!Jl.test(f?f.toLowerCase():"")}c=e}if(c)Rk(a,"complete"),Rk(a,"success");else{a.j=6;var k;try{k=2<nl(a)?a.b.statusText:""}catch(m){k=""}a.o=k+" ["+a.getStatus()+"]";Sl(a)}}finally{Tl(a)}}}function Tl(a,b){if(a.b){Ql(a);var c=a.b,d=a.L[0]?r:null;a.b=null;a.L=null;b||Rk(a,"ready");try{c.onreadystatechange=d}catch(e){}}}function Ql(a){a.b&&a.G&&(a.b.ontimeout=null);ea(a.D)&&(l.clearTimeout(a.D),a.D=null)}function nl(a){return a.b?a.b.readyState:0}
g.getStatus=function(){try{return 2<nl(this)?this.b.status:-1}catch(a){return-1}};function ol(a){try{return a.b?a.b.responseText:""}catch(b){return""}}function Ll(a,b){return b+" ["+a.ma+" "+a.u+" "+a.getStatus()+"]"};function Vl(a,b,c){this.p=a||null;this.b=1;this.g=[];this.j=[];this.o=new Tk(null,!0);this.u=b||null;this.D=null!=c?c:null}function Wl(a,b){this.b=a;this.map=b;this.context=null}g=Vl.prototype;g.mb=null;g.U=null;g.I=null;g.Qb=null;g.pb=null;g.qc=null;g.ub=null;g.Za=0;g.Rd=0;g.P=null;g.xa=null;g.pa=null;g.Ga=null;g.ua=null;g.ob=null;g.Ma=-1;g.wc=-1;g.da=-1;g.ab=0;g.Qa=0;g.Ca=8;var Xl=new Qk;function Yl(a){qk.call(this,"statevent",a)}z(Yl,qk);function Zl(a){qk.call(this,"timingevent",a)}z(Zl,qk);
function $l(a){qk.call(this,"serverreachability",a)}z($l,qk);g=Vl.prototype;g.connect=function(a,b,c,d,e){X();this.Qb=b;this.mb=c||{};d&&p(e)&&(this.mb.OSID=d,this.mb.OAID=e);this.ua=new Cl(this);this.ua.Ub=null;this.ua.g=this.o;this.ua.connect(a)};g.disconnect=function(){am(this);if(3==this.b){var a=this.Za++,b=this.pb.clone();P(b,"SID",this.i);P(b,"RID",a);P(b,"TYPE","terminate");bm(this,b);a=new gl(this,0,this.i,a,void 0);a.Ra=2;a.ra=hf(b.clone());(new Image).src=a.ra;a.bb=w();ml(a)}cm(this)};
function am(a){if(a.ua){var b=a.ua;b.Y&&(b.Y.cancel(),b.Y=null);b.qa=-1;a.ua=null}a.I&&(a.I.cancel(),a.I=null);a.pa&&(l.clearTimeout(a.pa),a.pa=null);dm(a);a.U&&(a.U.cancel(),a.U=null);a.xa&&(l.clearTimeout(a.xa),a.xa=null)}function em(a,b){if(0==a.b)throw Error("Invalid operation: sending map when state is closed");a.g.push(new Wl(a.Rd++,b));2!=a.b&&3!=a.b||fm(a)}g.Ic=function(){return 0==this.b};function fm(a){a.U||a.xa||(a.xa=wl(v(a.Ac,a),0),a.ab=0)}g.Ac=function(a){this.xa=null;gm(this,a)};
function gm(a,b){if(1==a.b){if(!b){a.Za=Math.floor(1E5*Math.random());var c=a.Za++,d=new gl(a,0,"",c,void 0);d.Ba=null;var e=hm(a),f=a.pb.clone();P(f,"RID",c);a.p&&P(f,"CVER",a.p);bm(a,f);jl(d,f,e);a.U=d;a.b=2}}else 3==a.b&&(b?im(a,b):0!=a.g.length&&(a.U||im(a)))}
function im(a,b){var c,d;b?6<a.Ca?(a.g=a.j.concat(a.g),a.j.length=0,c=a.Za-1,d=hm(a)):(c=b.u,d=b.Ya):(c=a.Za++,d=hm(a));var e=a.pb.clone();P(e,"SID",a.i);P(e,"RID",c);P(e,"AID",a.Ma);bm(a,e);c=new gl(a,0,a.i,c,a.ab+1);c.Ba=null;c.setTimeout(Math.round(1E4)+Math.round(1E4*Math.random()));a.U=c;jl(c,e,d)}function bm(a,b){if(a.P){var c=a.P.Zc(a);c&&Xa(c,function(a,c){P(b,c,a)})}}
function hm(a){var b=Math.min(a.g.length,1E3),c=["count="+b],d;6<a.Ca&&0<b?(d=a.g[0].b,c.push("ofs="+d)):d=0;for(var e=0;e<b;e++){var f=a.g[e].b,h=a.g[e].map,f=6>=a.Ca?e:f-d;try{Re(h,function(a,b){c.push("req"+f+"_"+b+"="+encodeURIComponent(a))})}catch(k){c.push("req"+f+"_type="+encodeURIComponent("_badmap"))}}a.j=a.j.concat(a.g.splice(0,b));return c.join("&")}function jm(a){a.I||a.pa||(a.k=1,a.pa=wl(v(a.Sc,a),0),a.Qa=0)}
function km(a){if(a.I||a.pa||3<=a.Qa)return!1;a.k++;a.pa=wl(v(a.Sc,a),lm(a,a.Qa));a.Qa++;return!0}g.Sc=function(){this.pa=null;this.I=new gl(this,0,this.i,"rpc",this.k);this.I.Ba=null;this.I.Rb=0;var a=this.qc.clone();P(a,"RID","rpc");P(a,"SID",this.i);P(a,"CI",this.ob?"0":"1");P(a,"AID",this.Ma);bm(this,a);if(!M||rc(10))P(a,"TYPE","xmlhttp"),ll(this.I,a,!0,this.ub,!1);else{P(a,"TYPE","html");var b=this.I,c=Boolean(this.ub);b.Ra=3;b.ra=hf(a.clone());vl(b,c)}};
function Hl(a,b,c){a.ob=c;a.da=b.qa;a.ue(1,0);a.pb=Dl(a,null,a.Qb);fm(a)}
g.Kc=function(a,b){if(0!=this.b&&(this.I==a||this.U==a))if(this.da=a.Xa,this.U==a&&3==this.b)if(7<this.Ca){var c;try{c=this.o.parse(b)}catch(d){c=null}if(t(c)&&3==c.length)if(0==c[0])t:{if(!this.pa){if(this.I)if(this.I.bb+3E3<this.U.bb)dm(this),this.I.cancel(),this.I=null;else break t;km(this);X()}}else this.wc=c[1],0<this.wc-this.Ma&&37500>c[2]&&this.ob&&0==this.Qa&&!this.Ga&&(this.Ga=wl(v(this.Gd,this),6E3));else Gl(this,11)}else"y2f%"!=b&&Gl(this,11);else if(this.I==a&&dm(this),!/^[\s\xa0]*$/.test(b)){c=
this.o.parse(b);t(c);for(var e=0;e<c.length;e++){var f=c[e];this.Ma=f[0];f=f[1];2==this.b?"c"==f[0]?(this.i=f[1],this.ub=f[2],f=f[3],null!=f?this.Ca=f:this.Ca=6,this.b=3,this.P&&this.P.vc(this),this.qc=Dl(this,this.$a()?this.ub:null,this.Qb),jm(this)):"stop"==f[0]&&Gl(this,7):3==this.b&&("stop"==f[0]?Gl(this,7):"noop"!=f[0]&&this.P&&this.P.uc(this,f),this.Qa=0)}}};g.Gd=function(){null!=this.Ga&&(this.Ga=null,this.I.cancel(),this.I=null,km(this),X())};
function dm(a){null!=a.Ga&&(l.clearTimeout(a.Ga),a.Ga=null)}
g.tb=function(a){var b;if(this.I==a)dm(this),this.I=null,b=2;else if(this.U==a)this.U=null,b=1;else return;this.da=a.Xa;if(0!=this.b)if(a.fa)1==b?(w(),Rk(Xl,new Zl(Xl)),fm(this),this.j.length=0):jm(this);else{var c=a.Ea,d;if(!(d=3==c||7==c||0==c&&0<this.da)){if(d=1==b)this.U||this.xa||1==this.b||2<=this.ab?d=!1:(this.xa=wl(v(this.Ac,this,a),lm(this,this.ab)),this.ab++,d=!0);d=!(d||2==b&&km(this))}if(d)switch(c){case 1:Gl(this,5);break;case 4:Gl(this,10);break;case 3:Gl(this,6);break;case 7:Gl(this,
12);break;default:Gl(this,2)}}};function lm(a,b){var c=5E3+Math.floor(1E4*Math.random());a.P||(c*=2);return c*b}g.ue=function(a){if(!Ha(arguments,this.b))throw Error("Unexpected channel state: "+this.b);};function Gl(a,b){if(2==b||9==b){var c=null;a.P&&(c=null);var d=v(a.Fe,a);c||(c=new Se("//www.google.com/images/cleardot.gif"),hf(c));Al(c.toString(),1E4,d)}else X();mm(a,b)}g.Fe=function(a){a?X():(X(),mm(this,8))};function mm(a,b){a.b=0;a.P&&a.P.Hc(a,b);cm(a);am(a)}
function cm(a){a.b=0;a.da=-1;if(a.P)if(0==a.j.length&&0==a.g.length)a.P.Vb(a);else{var b=Pa(a.j),c=Pa(a.g);a.j.length=0;a.g.length=0;a.P.Vb(a,b,c)}}function Dl(a,b,c){var d=jf(c);if(""!=d.Sa)b&&Ue(d,b+"."+d.Sa),Ve(d,d.ib);else var e=window.location,d=kf(e.protocol,b?b+"."+e.hostname:e.hostname,e.port,c);a.mb&&Xa(a.mb,function(a,b){P(d,b,a)});P(d,"VER",a.Ca);bm(a,d);return d}g.Zb=function(a){if(a)throw Error("Can't create secondary domain capable XhrIo object.");a=new Il;a.za=!1;return a};
function wl(a,b){if(!fa(a))throw Error("Fn must not be null and must be a function");return l.setTimeout(function(){a()},b)}g.ea=function(){Rk(Xl,new $l(Xl))};function X(){Rk(Xl,new Yl(Xl))}g.$a=function(){return!(!M||rc(10))};function nm(){}g=nm.prototype;g.vc=function(){};g.uc=function(){};g.Hc=function(){};g.Vb=function(){};g.Zc=function(){return{}};function om(a,b){Uk.call(this);if(fa(a))b&&(a=v(a,b));else if(a&&fa(a.handleEvent))a=v(a.handleEvent,a);else throw Error("Invalid listener argument");this.p=a;Fk(this,"tick",v(this.k,this));this.stop();Vk(this,5E3+2E4*Math.random())}z(om,Uk);om.prototype.o=0;om.prototype.k=function(){if(500<this.b){var a=this.b;24E4>2*a&&(a*=2);Vk(this,a)}this.p()};om.prototype.start=function(){om.F.start.call(this);this.o=w()+this.b};om.prototype.stop=function(){this.o=0;om.F.stop.call(this)};function pm(a,b){this.G=a;this.j=b;this.i=new F;this.g=new om(this.pd,this);this.b=null;this.M=!1;this.k=null;this.D="";this.u=this.o=0;this.p=[]}z(pm,nm);g=pm.prototype;g.subscribe=function(a,b,c){return this.i.subscribe(a,b,c)};g.Da=function(a,b,c){return this.i.Da(a,b,c)};g.ha=function(a){return this.i.ha(a)};g.q=function(a,b){return this.i.q.apply(this.i,arguments)};g.dispose=function(){this.M||(this.M=!0,this.i.clear(),this.disconnect(),sb(this.i))};g.C=function(){return this.M};
g.connect=function(a,b,c){if(!this.b||2!=this.b.b){this.D="";this.g.stop();this.k=a||null;this.o=b||0;a=this.G+"/test";b=this.G+"/bind";var d=new Vl("1",c?c.firstTestResults:null,c?c.secondTestResults:null),e=this.b;e&&(e.P=null);d.P=this;this.b=d;e?this.b.connect(a,b,this.j,e.i,e.Ma):c?this.b.connect(a,b,this.j,c.sessionId,c.arrayId):this.b.connect(a,b,this.j)}};g.disconnect=function(a){this.u=a||0;this.g.stop();this.b&&(3==this.b.b&&gm(this.b),this.b.disconnect());this.u=0};
g.sendMessage=function(a,b){var c={_sc:a};b&&kb(c,b);this.g.oa||2==(this.b?this.b.b:0)?this.p.push(c):this.b&&3==this.b.b&&em(this.b,c)};g.vc=function(){var a=this.g;a.stop();Vk(a,5E3+2E4*Math.random());this.k=null;this.o=0;if(this.p.length){a=this.p;this.p=[];for(var b=0,c=a.length;b<c;++b)em(this.b,a[b])}this.q("handlerOpened")};g.Hc=function(a,b){var c=2==b&&401==this.b.da;if(4!=b&&!c){if(6==b||410==this.b.da)c=this.g,c.stop(),Vk(c,500);this.g.start()}this.q("handlerError",b)};
g.Vb=function(a,b,c){if(!this.g.oa)this.q("handlerClosed");else if(c)for(a=0,b=c.length;a<b;++a)this.p.push(c[a].map)};g.Zc=function(){var a={v:2};this.D&&(a.gsessionid=this.D);0!=this.o&&(a.ui=""+this.o);0!=this.u&&(a.ui=""+this.u);this.k&&kb(a,this.k);return a};g.uc=function(a,b){if("S"==b[0])this.D=b[1];else if("gracefulReconnect"==b[0]){var c=this.g;c.stop();Vk(c,500);this.g.start();this.b.disconnect()}else this.q("handlerMessage",new nk(b[0],b[1]))};g.getDeviceId=function(){return this.j.id};
g.pd=function(){this.g.stop();var a=this.b,b=0;a.I&&b++;a.U&&b++;0!=b?this.g.start():this.connect(this.k,this.o)};function qm(a){rm(this,a)}function sm(a,b){if(a.G())throw Error(b+" is not allowed in V3.");}function tm(a){a.D=-1;a.u=!1;a.o=null;a.i=-1;a.j=null;a.p=0;a.M=w()}qm.prototype.G=function(){return!!this.k};function rm(a,b){a.g=[];a.k="";a.index=-1;a.b="";tm(a);b&&(a.g=b.videoIds,a.index=b.index,a.k=b.listId,a.b=b.videoId,a.i=b.playerState,a.j=b.errorReason,a.D=b.volume,a.u=b.muted,a.o=b.trackData,a.p=b.playerTime,a.M=b.playerTimeAt)}function um(a){return a.G()?a.b:a.g[a.index]}
function vm(a){switch(a.i){case 1:return(w()-a.M)/1E3+a.p;case -1E3:return 0}return a.p}function wm(a,b){sm(a,"setVideoId");var c=a.index;a.index=Ba(a.g,b);c!=a.index&&tm(a)}function xm(a,b,c){sm(a,"setPlaylist");c=c||um(a);Va(a.g,b)&&c==um(a)||(a.g=Pa(b),wm(a,c))}qm.prototype.add=function(a){sm(this,"add");return a&&!Ha(this.g,a)?(this.g.push(a),!0):!1};qm.prototype.remove=function(a){sm(this,"remove");var b=um(this);return Ma(this.g,a)?(this.index=Ba(this.g,b),!0):!1};
function ym(a){var b={};b.videoIds=Pa(a.g);b.index=a.index;b.listId=a.k;b.videoId=a.b;b.playerState=a.i;b.errorReason=a.j;b.volume=a.D;b.muted=a.u;b.trackData=hb(a.o);b.playerTime=a.p;b.playerTimeAt=a.M;return b}qm.prototype.clone=function(){return new qm(ym(this))};function Y(a,b,c){T.call(this);this.ma=a;this.G=[];this.G.push(O(window,"beforeunload",v(this.rd,this)));this.i=[];this.b=new qm;3==c["mdx-version"]&&(this.b.k="RQ"+b.token);this.L=b.id;this.g=new pm(gi(this.ma,"/bc",void 0,!1),c);this.g.subscribe("handlerOpened",this.wd,this);this.g.subscribe("handlerClosed",this.sd,this);this.g.subscribe("handlerError",this.td,this);this.b.G()?this.g.subscribe("handlerMessage",this.ud,this):this.g.subscribe("handlerMessage",this.vd,this);a=this.g;b=b.token;(a.j.loungeIdToken=
b)||a.g.stop()}z(Y,T);g=Y.prototype;g.gb=NaN;g.ec=NaN;g.nb=NaN;
g.connect=function(a,b){if(b){if(this.b.G()){var c=b.listId,d=b.videoId,e=b.index,f=b.currentTime||0;5>=f&&(f=0);h={videoId:d,currentTime:f};c&&(h.listId=c);p(e)&&(h.currentIndex=e);c&&(this.b.k=c);this.b.b=d;this.b.index=e||0}else{var d=b.videoIds[b.index],f=b.currentTime||0;5>=f&&(f=0);var h={videoIds:d,videoId:d,currentTime:f};this.b.g=[d];this.b.index=0}this.b.state=3;c=this.b;c.p=f;c.M=w();this.log_("Connecting with setPlaylist and params: "+Q(h));this.g.connect({method:"setPlaylist",params:Q(h)},
a,Di())}else this.log_("Connecting without params"),this.g.connect({},a,Di());zm(this)};g.dispose=function(){this.C()||Am(this,3);Y.F.dispose.call(this)};g.B=function(){Bm(this);Cm(this);I(this.nb);this.nb=NaN;this.j=null;Pc(this.G);this.G.length=0;this.g.dispose();Y.F.B.call(this);this.i=this.b=this.g=null};g.log_=function(a){U("conn",a)};g.rd=function(){this.p(2)};function Am(a,b){a.q("proxyStateChange",b)}function zm(a){a.gb=H(v(function(){this.log_("Connecting timeout");this.p(1)},a),1E4)}
function Bm(a){I(a.gb);a.gb=NaN}function Dm(a){Cm(a);a.ec=H(v(function(){this.k("getNowPlaying")},a),2E4)}function Cm(a){I(a.ec);a.ec=NaN}function Em(a){var b=a.g;return!!b.b&&3==b.b.b&&isNaN(a.gb)}g.wd=function(){this.log_("Channel opened");var a=this.g,b=this.L;R("yt-remote-session-browser-channel",{firstTestResults:[""],secondTestResults:!a.b.ob,sessionId:a.b.i,arrayId:a.b.Ma});R("yt-remote-session-screen-id",b);a=xi();b=yi();Ha(a,b)||a.push(b);Bi(a);wi()};
g.sd=function(){this.log_("Channel closed");isNaN(this.gb)?Li(!0):Li();this.dispose()};g.td=function(a){Li();isNaN(this.u())?(this.log_("Channel error: "+a+" without reconnection"),this.dispose()):(this.log_("Channel error: "+a+" with reconnection in "+this.u()+" ms"),Am(this,2))};function Fm(a,b){b==Em(a)?b&&Am(a,1):b?(Bm(a),a.D()&&rm(a.b),Am(a,1),a.k("getNowPlaying")):a.p(1)}
function Gm(a,b){var c=b.params.videoId;delete b.params.videoId;c==a.b.b&&(fb(b.params)?a.b.o=null:a.b.o=b.params,a.q("remotePlayerChange"))}function Hm(a,b){var c=b.params.videoId||b.params.video_id,d=parseInt(b.params.currentIndex,10);a.b.k=b.params.listId;var e=a.b,f=e.b;e.b=c;e.index=d;c!=f&&tm(e);a.q("remoteQueueChange")}function Im(a,b){Hm(a,b);Jm(a,b)}
function Jm(a,b){var c=parseInt(b.params.currentTime||b.params.current_time,10),d=a.b;d.p=isNaN(c)?0:c;d.M=w();c=parseInt(b.params.state,10);c=isNaN(c)?-1:c;-1==c&&-1E3==a.b.i&&(c=-1E3);a.b.i=c;d=null;-1E3==c&&(d=a.b.j||"unknown",p(b.params.currentError)&&(d=yf(b.params.currentError).reason||d));a.b.j=d;1==a.b.i?Dm(a):Cm(a);a.q("remotePlayerChange")}function Km(a,b){var c="true"==b.params.muted;a.b.D=parseInt(b.params.volume,10);a.b.u=c;a.q("remotePlayerChange")}
g.ud=function(a){a.params?this.log_("Received: action="+a.action+", params="+Q(a.params)):this.log_("Received: action="+a.action);switch(a.action){case "loungeStatus":a=yf(a.params.devices);this.i=D(a,function(a){return new mk(a)});a=!!Fa(this.i,function(a){return"LOUNGE_SCREEN"==a.type});Fm(this,a);break;case "loungeScreenConnected":Fm(this,!0);break;case "loungeScreenDisconnected":Na(this.i,function(a){return"LOUNGE_SCREEN"==a.type});Fm(this,!1);break;case "remoteConnected":var b=new mk(yf(a.params.device));
Fa(this.i,function(a){return a.equals(b)})||La(this.i,b);break;case "remoteDisconnected":b=new mk(yf(a.params.device));Na(this.i,function(a){return a.equals(b)});break;case "gracefulDisconnect":break;case "playlistModified":Hm(this,a);break;case "nowPlaying":Im(this,a);break;case "onStateChange":Jm(this,a);break;case "onVolumeChanged":Km(this,a);break;case "onSubtitlesTrackChanged":Gm(this,a);break;default:this.log_("Unrecognized action: "+a.action)}};
g.vd=function(a){a.params?this.log_("Received: action="+a.action+", params="+Q(a.params)):this.log_("Received: action="+a.action);Lm(this,a);Mm(this,a);if(Em(this)){var b=this.b.clone(),c=!1,d,e,f,h,k,m,n;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,m=a.params.muted,p(a.params.currentError)&&(n=yf(a.params.currentError)));if("onSubtitlesTrackChanged"==a.action)d==um(this.b)&&
(delete a.params.videoId,fb(a.params)?this.b.o=null:this.b.o=a.params,this.q("remotePlayerChange"));else if(um(this.b)||"onStateChange"!=a.action)"playlistModified"!=a.action&&"nowPlayingPlaylist"!=a.action||e?(d||"nowPlaying"!=a.action&&"nowPlayingPlaylist"!=a.action?d?um(this.b):d=um(this.b):wm(this.b,""),e&&(e=e.split(","),xm(this.b,e,d))):xm(this.b,[]),this.b.add(d)&&this.k("getPlaylist"),d&&wm(this.b,d),b.index==this.b.index&&Va(b.g,this.b.g)||this.q("remoteQueueChange"),p(f)&&(b=parseInt(f,
10),b=isNaN(b)?-1:b,-1==b&&-1E3==this.b.i&&(b=-1E3),0==b&&"0"==h&&(b=-1),c=c||b!=this.b.i,this.b.i=b,d=null,-1E3==b&&(d=this.b.j||"unknown",n&&(d=n.reason||d)),c=c||this.b.j!=d,this.b.j=d,1==this.b.i?Dm(this):Cm(this)),"onError"!=a.action||-1!=this.b.i&&-1E3!=this.b.i||(a=yf(a.params.errors)||[],1==a.length&&"PLAYER_ERROR"==a[0].error&&a[0].videoId==um(this.b)&&(this.b.i=-1E3,this.b.j=a[0].reason||"unknown",c=!0)),h&&(b=parseInt(h,10),c=this.b,c.p=isNaN(b)?0:b,c.M=w(),c=!0),p(k)&&(b=parseInt(k,10),
isNaN(b)||(c=c||this.b.D!=b,this.b.D=b),p(m)&&(m="true"==m,c=c||this.b.u!=m,this.b.u=m)),c&&this.q("remotePlayerChange")}};
function Lm(a,b){switch(b.action){case "loungeStatus":var c=yf(b.params.devices);a.i=D(c,function(a){return new mk(a)});break;case "loungeScreenDisconnected":Na(a.i,function(a){return"LOUNGE_SCREEN"==a.type});break;case "remoteConnected":var d=new mk(yf(b.params.device));Fa(a.i,function(a){return a.equals(d)})||La(a.i,d);break;case "remoteDisconnected":d=new mk(yf(b.params.device)),Na(a.i,function(a){return a.equals(d)})}}
function Mm(a,b){var c=!1;if("loungeStatus"==b.action)c=!!Fa(a.i,function(a){return"LOUNGE_SCREEN"==a.type});else if("loungeScreenConnected"==b.action)c=!0;else if("loungeScreenDisconnected"==b.action)c=!1;else return;c==Em(a)?c&&Am(a,1):c?(Bm(a),a.D()&&rm(a.b),Am(a,1),a.k("getNowPlaying")):a.p(1)}g.qd=function(){if(this.j){var a=this.j;this.j=null;this.b.b!=a&&this.k("getNowPlaying")}};Y.prototype.subscribe=Y.prototype.subscribe;Y.prototype.unsubscribeByKey=Y.prototype.ha;
Y.prototype.ba=function(){var a=3;this.C()||(a=0,isNaN(this.u())?Em(this)&&(a=1):a=2);return a};Y.prototype.getProxyState=Y.prototype.ba;Y.prototype.p=function(a){this.log_("Disconnecting with "+a);1==a&&Li();this.g.disconnect(a);this.dispose()};Y.prototype.disconnect=Y.prototype.p;Y.prototype.T=function(){var a=this.b;if(this.j){var b=a=this.b.clone(),c=this.j,d=a.index,e=b.b;b.b=c;b.index=d;c!=e&&tm(b)}return ym(a)};Y.prototype.getPlayerContextData=Y.prototype.T;
Y.prototype.ca=function(a){var b=new qm(a);b.b&&b.b!=this.b.b&&(this.j=b.b,I(this.nb),this.nb=H(v(this.qd,this),5E3));var c=[];this.b.k==b.k&&this.b.b==b.b&&this.b.index==b.index&&Va(this.b.g,b.g)||c.push("remoteQueueChange");this.b.i==b.i&&this.b.D==b.D&&this.b.u==b.u&&vm(this.b)==vm(b)&&Q(this.b.o)==Q(b.o)||c.push("remotePlayerChange");rm(this.b,a);C(c,function(a){this.q(a)},this)};Y.prototype.setPlayerContextData=Y.prototype.ca;Y.prototype.O=function(){return this.g.j.loungeIdToken};
Y.prototype.getLoungeToken=Y.prototype.O;Y.prototype.D=function(){var a=this.g.getDeviceId(),b=Fa(this.i,function(b){return"REMOTE_CONTROL"==b.type&&b.id!=a});return b?b.id:""};Y.prototype.getOtherConnectedRemoteId=Y.prototype.D;Y.prototype.u=function(){var a=this.g;return a.g.oa?a.g.o-w():NaN};Y.prototype.getReconnectTimeout=Y.prototype.u;Y.prototype.la=function(){if(!isNaN(this.u())){var a=this.g.g;a.oa&&(a.stop(),a.start(),a.k())}};Y.prototype.reconnect=Y.prototype.la;
Y.prototype.k=function(a,b){b?this.log_("Sending: action="+a+", params="+Q(b)):this.log_("Sending: action="+a);this.g.sendMessage(a,b)};Y.prototype.sendMessage=Y.prototype.k;function Nm(a){T.call(this);this.i=a;this.ga=Wh(Fi());this.log_("Initializing local screens: "+Yh(this.ga));this.ta=Om();this.log_("Initializing account screens: "+Yh(this.ta));this.Sb=null;this.b=[];this.g=[];Pm(this,hk()||[]);this.log_("Initializing DIAL devices: "+ji(this.g));a=Wh(Ii());Qm(this,a);this.log_("Initializing online screens: "+Yh(this.b));this.j=w()+3E5;Rm(this)}z(Nm,T);var Sm=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g=Nm.prototype;g.lb=NaN;g.Jb="";g.log_=function(a){U("RM",a)};
g.J=function(a){U("RM",a)};function Om(){var a=Wh(Fi()),b=Wh(Ii());return Ca(b,function(b){return!ri(a,b)})}function Rm(a){J("yt-remote-cast-device-list-update",function(){var a=hk();Pm(this,a||[])},a);J("yt-remote-cast-device-status-update",a.te,a);a.Lb();var b=w()>a.j?2E4:1E4;Ab(v(a.Lb,a),b)}g.q=function(a,b){if(this.C())return!1;this.log_("Firing "+a);return this.o.q.apply(this.o,arguments)};
g.Lb=function(){var a=hk()||[];Ia(a)||Pm(this,a);a=Tm(this);Ia(a)||(Da(a,function(a){return!ri(this.ta,a)},this)&&Gi()?Um(this):Vm(this,a))};function Wm(a){Qm(a,a.b,!0);Pm(a,hk()||[]);a.q("managedScreenChange",Tm(a))}function Xm(a,b){var c=Tm(a);return Ca(b,function(a){return a.uuid?(a=qi(this.g,a.uuid),!!a&&"RUNNING"==a.status):!!ri(c,a)},a)}
function Pm(a,b){var c=!1;C(b,function(a){var b=si(this.ga,a.id);b&&b.name!=a.name&&(this.log_("Renaming screen id "+b.id+" from "+b.name+" to "+a.name),b.name=a.name,c=!0)},a);c&&(a.log_("Renaming due to DIAL."),Ym(a));Ji(ni(b));var d=!Va(a.g,b,pi);d&&a.log_("Updating DIAL devices: "+ji(a.g)+" to "+ji(b));a.g=b;Qm(a,a.b);d&&a.q("onlineReceiverChange")}
g.te=function(a){var b=qi(this.g,a.id);b&&(this.log_("Updating DIAL device: "+b.id+"("+b.name+") from status: "+b.status+" to status: "+a.status+" and from activityId: "+b.activityId+" to activityId: "+a.activityId),b.activityId=a.activityId,b.status=a.status,Ji(ni(this.g)));Qm(this,this.b)};function Qm(a,b,c){var d=Xm(a,b),e=!Va(a.b,d,Th);if(e||c)Ia(b)||Hi(D(d,Uh));e&&(a.log_("Updating online screens: "+Yh(a.b)+" -> "+Yh(d)),a.b=d,a.q("onlineReceiverChange"))}
function Vm(a,b){var c=[],d={};C(b,function(a){a.token&&(d[a.token]=a,c.push(a.token))});var e={method:"POST",N:{lounge_token:c.join(",")},context:a,onSuccess:function(a,b){var c=[];C(b.screens||[],function(a){"online"==a.status&&c.push(d[a.loungeToken])});var e=this.Sb?Zm(this,this.Sb):null;e&&!ri(c,e)&&c.push(e);Qm(this,c,!0)}};Gg(gi(a.i,"/pairing/get_screen_availability"),e)}
function Um(a){var b=Tm(a),c=D(b,function(a){return a.id});Ia(c)||(a.log_("Updating lounge tokens for: "+Q(c)),Gg(gi(a.i,"/pairing/get_lounge_token_batch"),{N:{screen_ids:c.join(",")},method:"POST",context:a,onSuccess:function(a,c){$m(this,c.screens||[]);this.ga=Ca(this.ga,function(a){return!!a.token});Ym(this);Vm(this,b)}}))}function $m(a,b){C(Oa(a.ga,a.ta),function(a){var d=Fa(b,function(b){return a.id==b.screenId});d&&(a.token=d.loungeToken)})}
function Ym(a){var b=Wh(Fi());Va(a.ga,b,Th)||(a.log_("Saving local screens: "+Yh(b)+" to "+Yh(a.ga)),Ei(D(a.ga,Uh)),Wm(a))}function an(a,b,c){var d=Ga(b,function(a){return Sh(c,a)}),e=0>d;0>d?b.push(c):b[d]=c;ri(a.b,c)||a.b.push(c);return e}
g.Nc=function(a,b,c){var d=!1;b>=Sm.length&&(this.log_("Pairing DIAL device "+a+" with "+c+" timed out."),d=!0);var e=qi(this.g,a);if(!e)this.log_("Pairing DIAL device "+a+" with "+c+" failed: no device for "+a),d=!0;else if("ERROR"==e.status||"STOPPED"==e.status)this.log_("Pairing DIAL device "+a+" with "+c+" failed: launch error on "+a),d=!0;d?(bn(this),this.q("screenPair",null)):Gg(gi(this.i,"/pairing/get_screen"),{method:"POST",N:{pairing_code:c},context:this,onSuccess:function(a,b){if(c==this.Jb){bn(this);
var d=new Qh(b.screen);d.name=e.name;d.uuid=e.id;this.log_("Pairing "+c+" succeeded.");var m=an(this,this.ga,d);this.log_("Paired with "+(m?"a new":"an old")+" local screen:"+Xh(d));Ym(this);this.q("screenPair",d)}},onError:function(){c==this.Jb&&(this.log_("Polling pairing code: "+c),I(this.lb),this.lb=H(v(this.Nc,this,a,b+1,c),Sm[b]))}})};
function cn(a,b,c){var d=Z,e="";bn(d);if(qi(d.g,a)){if(!e){var f=e=ki();ak();var h=jk(a),k=Xj();if(k&&h){var m=new cast.Receiver(h.id,h.name),m=new cast.LaunchRequest("YouTube",m);m.parameters="pairingCode="+f;m.description=new cast.LaunchDescription;m.description.text=document.title;b&&(m.parameters+="&v="+b,c&&(m.parameters+="&t="+Math.round(c)),m.description.url="http://i.ytimg.com/vi/"+b+"/default.jpg");"UNKNOWN"!=h.status&&(h.status="UNKNOWN",fk(h),K("yt-remote-cast-device-status-update",h));
Vj("Sending a cast launch request with params: "+m.parameters);k.launch(m,ma(kk,a))}else Vj("No cast API or no cast device. Dropping cast launch.")}d.Jb=e;d.lb=H(v(d.Nc,d,a,0,e),Sm[0])}else d.log_("No DIAL device with id: "+a)}function bn(a){I(a.lb);a.lb=NaN;a.Jb=""}function Zm(a,b){var c=si(Tm(a),b);a.log_("Found screen: "+Xh(c)+" with key: "+b);return c}function dn(a){var b=Z,c=si(b.b,a);b.log_("Found online screen: "+Xh(c)+" with key: "+a);return c}
function en(a){var b=Z,c=qi(b.g,a);if(!c){var d=si(b.ga,a);d&&(c=qi(b.g,d.uuid))}b.log_("Found DIAL: "+(c?c.toString():"null")+" with key: "+a);return c}function Tm(a){return Oa(a.ta,Ca(a.ga,function(a){return!ri(this.ta,a)},a))}g.pe=function(){var a=gi(this.i,"/screens");Gg(a,{method:"GET",context:this,withCredentials:!0,onSuccess:function(a,c){this.ta=D(ab(c),function(a){return new Qh(a)});this.log_("Load account screens successfully.");this.Lb();Wm(this);this.q("accountScreenLoad")},onError:function(){this.J("Load account screens failed.")}})};
function fn(){var a=Z;Ia(a.ta)&&Ia(Om())||(a.log_("Clear cached account screens."),a.ta=[],a.Lb(),Wm(a))};function gn(a){ti.call(this,"ScreenServiceProxy");this.W=a;this.g=[];this.g.push(this.W.$_s("screenChange",v(this.ke,this)));this.g.push(this.W.$_s("onlineScreenChange",v(this.je,this)))}z(gn,ti);g=gn.prototype;g.R=function(a){return this.W.$_gos(a)};g.contains=function(a){return!!this.W.$_c(a)};g.get=function(a){return this.W.$_g(a)};g.start=function(){};g.add=function(a,b,c){this.W.$_a(a,b,c)};g.remove=function(a,b,c){this.W.$_r(a,b,c)};g.Ia=function(a,b,c,d){this.W.$_un(a,b,c,d)};
g.B=function(){for(var a=0,b=this.g.length;a<b;++a)this.W.$_ubk(this.g[a]);this.g.length=0;this.W=null;gn.F.B.call(this)};g.ke=function(){this.q("screenChange")};g.je=function(){this.q("onlineScreenChange")};V.prototype.$_gspc=V.prototype.We;V.prototype.$_c=V.prototype.contains;V.prototype.$_g=V.prototype.get;V.prototype.$_a=V.prototype.add;V.prototype.$_un=V.prototype.Ia;V.prototype.$_r=V.prototype.remove;V.prototype.$_gs=V.prototype.R;V.prototype.$_gos=V.prototype.Qc;V.prototype.$_s=V.prototype.subscribe;
V.prototype.$_ubk=V.prototype.ha;function hn(a){var b=!!G("MDX_ENABLE_CASTV2");b?y("yt.mdx.remote.castv2_",!0):ak();Qf&&Qf.g();wi();jn||(jn=new fi);Z||b||(Z=new Nm(jn),Z.subscribe("screenPair",kn),Z.subscribe("managedScreenChange",ln),Z.subscribe("onlineReceiverChange",function(){K("yt-remote-receiver-availability-change")}));mn||(mn=q("yt.mdx.remote.deferredProxies_")||[],y("yt.mdx.remote.deferredProxies_",mn));fb(nn)&&(nn=q("yt.mdx.remote.channelParams_")||{});var c=null;if(a&&fb(nn)){Ph("Initializing: "+Q(a));var d=!!a.isSignedIn;
if(b){var e=!!S("yt-remote-load-account-screens");e||(e=!!a.loadAccountScreens,R("yt-remote-load-account-screens",e,31536E3));c=new V(jn,d&&e);y("yt.mdx.remote.screenService_",c);c.start()}d=yi();a.isAuto&&(d+="#dial");nn={device:"REMOTE_CONTROL",id:d,name:a.device,app:a.app};a.isV3&&(nn["mdx-version"]=3);y("yt.mdx.remote.channelParams_",nn);on("Init with id = "+d+", name = "+a.device+", app = "+a.app);pn();Z&&(a.loadAccountScreens?Z.pe():fn())}b&&c&&(qn.push(J("yt-remote-cast2-availability-change",
function(){K("yt-remote-receiver-availability-change")})),qn.push(J("yt-remote-cast2-receiver-selected",function(){rn(null);K("yt-remote-auto-connect","cast-selector-receiver")})),qn.push(J("yt-remote-cast2-session-change",sn)),qn.push(J("yt-remote-connection-change",function(a){a?Sj(tn(),"YouTube TV"):un()||(Sj(null,null),Oj())})),Aj(c,function(a){a?tn()&&Sj(tn(),"YouTube TV"):c.subscribe("onlineScreenChange",function(){K("yt-remote-receiver-availability-change")})}))}
function vn(){Kb(qn);qn.length=0;sb(wn);wn=null;mn&&(C(mn,function(a){a(null)}),mn.length=0,mn=null,y("yt.mdx.remote.deferredProxies_",null));Z&&(sb(Z),Z=null);jn=null;nn={};ek()}
function xn(){if(yn()&&Mj()){var a=[];if(S("yt-remote-cast-available")||S("yt-remote-cloudview-cast-button-shown")||zn())a.push({key:"cast-selector-receiver",name:An()}),R("yt-remote-cloudview-cast-button-shown",!0);return a}if(q("yt.mdx.remote.cloudview.initializing_"))return[];var b=[],b=Bn()?Cn().W.$_gos(!0):Wh(Ii());(a=Dn())&&zn()&&(ri(b,a)||b.push(a));Bn()||(a=oi(Ki()),a=Ca(a,function(a){return!si(b,a.id)}),b=Oa(b,a));return mi(b)}
function En(){if(yn()&&Mj()){var a=Nj();return a?{key:"cast-selector-receiver",name:a}:null}var a=xn(),b=Fn(),c=Dn();c||(c=un());return Fa(a,function(a){return c&&Rh(c,a.key)||b&&(a=en(a.key))&&a.id==b?!0:!1})}function An(){if(yn()&&Mj())return Nj();var a=Dn();return a?a.name:null}function Dn(){var a=tn();if(!a)return null;if(!Z){var b=Cn().R();return si(b,a)}return Zm(Z,a)}
function sn(a){on("remote.onCastSessionChange_: "+Xh(a));if(a){var b=Dn();b&&b.id==a.id?Sj(b.id,"YouTube TV"):(b&&Gn(),Hn(a,1))}else zn()?Gn():K("yt-remote-connection-change",!1)}function In(a,b){on("Connecting to: "+Q(a));if("cast-selector-receiver"==a.key)rn(b||null),Rj(b||null);else{Gn();rn(b||null);var c=null;Z?c=dn(a.key):(c=Cn().R(),c=si(c,a.key));if(c)Hn(c,1);else{if(Z&&(c=en(a.key))){Jn(c);return}H(function(){Kn(null)},0)}}}
function Gn(){Z&&bn(Z);t:{var a=zn();if(a&&(a=a.getOtherConnectedRemoteId())){on("Do not stop DIAL due to "+a);Ln("");break t}(a=Fn())?(on("Stopping DIAL: "+a),lk(a),Ln("")):(a=Dn())&&a.uuid&&(on("Stopping DIAL: "+a.uuid),lk(a.uuid))}Qj()?Ij().stopSession():Fj("stopSession called before API ready.");(a=zn())&&a.disconnect(1);Kn(null)}function on(a){U("remote",a)}function yn(){return!!q("yt.mdx.remote.castv2_")}function Bn(){return q("yt.mdx.remote.screenService_")}
function Cn(){if(!wn){var a=Bn();a&&(wn=new gn(a))}return wn}function tn(){return q("yt.mdx.remote.currentScreenId_")}function Mn(a){y("yt.mdx.remote.currentScreenId_",a);if(Z){var b=Z;b.j=w()+3E5;if((b.Sb=a)&&(a=Zm(b,a))&&!ri(b.b,a)){var c=Pa(b.b);c.push(a);Qm(b,c,!0)}}}function Fn(){return q("yt.mdx.remote.currentDialId_")}function Ln(a){y("yt.mdx.remote.currentDialId_",a)}function Nn(){return q("yt.mdx.remote.connectData_")}function rn(a){y("yt.mdx.remote.connectData_",a)}
function zn(){return q("yt.mdx.remote.connection_")}function Kn(a){var b=zn();rn(null);a?Aa(!zn()):(Mn(""),Ln(""));y("yt.mdx.remote.connection_",a);C(mn,function(b){b(a)});mn.length=0;b&&!a?K("yt-remote-connection-change",!1):!b&&a&&K("yt-remote-connection-change",!0)}function un(){var a=zi();if(!a)return null;if(Bn()){var b=Cn().R();return si(b,a)}return Z?Zm(Z,a):null}
function Hn(a,b){Aa(!tn());Mn(a.id);var c=q("yt.mdx.remote.channelParams_"),c=new Y(jn,a,c);c.connect(b,Nn());rb(c,function(){zn()&&(zn(),Kn(null))});Kn(c)}function Jn(a){Fn();on("Connecting to: "+(a?a.toString():"null"));Ln(a.id);var b=Nn();b?cn(a.id,b.videoIds[b.index],b.currentTime):cn(a.id)}function pn(){var a=un();a?(on("Resume connection to: "+Xh(a)),Hn(a,0)):(Li(),Oj(),on("Skipping connecting because no session screen found."))}function kn(a){on("Paired with: "+Xh(a));a?Hn(a,1):Kn(null)}
function ln(){var a=tn();a&&!Dn()&&(on("Dropping current screen with id: "+a),Gn());un()||Li()}var jn=null,mn=null,wn=null,Z=null,nn={},qn=[];var On=null,Pn=[];function Qn(){Rn();if(En()){var a=On;"html5"!=a.getPlayerType()&&a.loadNewVideoConfig(a.getCurrentVideoConfig(),"html5")}}function Sn(a){"cast-selector-receiver"==a?Pj():Tn(a)}
function Tn(a){var b=xn();if(a=li(b,a)){var c=On,d=c.getVideoData().video_id,e=c.getVideoData().list,f=c.getCurrentTime();In(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 Rn(){var a=On;a&&a.updateRemoteReceivers&&a.updateRemoteReceivers(xn(),En())};var Un=null,Vn=[];function Wn(a){return{hc:a.externalChannelId,dd:a.offersUrl,source:a.source,Ie:a.subscriptionId}}function Xn(a){Yn(Wn(a))}function Yn(a){Kg()?(K("subscription-subscribe",a.hc,a.dd?{itemType:"U",itemId:a.hc,offersUrl:a.dd}:null),(a="/gen_204?"+Yc({event:"subscribe",source:a.source}))&&zg(a)):Zn(a)}function Zn(a){Ag(function(b){b.subscription_ajax&&Yn(a)},null,"sub_button")}
function $n(a){a=Wn(a);K("subscription-unsubscribe",a.hc,a.Ie,null);(a="/gen_204?"+Yc({event:"unsubscribe",source:a.source}))&&zg(a)}function ao(a,b){Un&&Un.channelSubscribed(a,b)}function bo(a){Un&&Un.channelUnsubscribed(a)};function co(a){this.i=a;this.i.subscribe("command",this.k,this);this.g={};this.j=!1}z(co,pb);co.prototype.start=function(){if(!this.j&&!this.C()){this.j=!0;var a=this.i;a.C()||eo(a.b,a.g,a.i,"RECEIVING",void 0)}};
co.prototype.k=function(a,b){if(this.j&&!this.C()){var c=b||{};switch(a){case "addEventListener":if(u(c.event)&&(c=c.event,!(c in this.g))){var d=v(this.p,this,c);this.g[c]=d;this.addEventListener(c,d)}break;case "removeEventListener":u(c.event)&&fo(this,c.event);break;default:if(this.b.isReady())switch(c=b||{},a){case "loadVideoById":c=Bh(c);Dh(c);this.b.loadVideoById(c);break;case "cueVideoById":c=Bh(c);Dh(c);this.b.cueVideoById(c);break;case "loadVideoByPlayerVars":this.b.loadVideoByPlayerVars&&
(Dh(c),this.b.loadVideoByPlayerVars(c));break;case "cueVideoByPlayerVars":this.b.cueVideoByPlayerVars&&(Dh(c),this.b.cueVideoByPlayerVars(c));break;case "loadPlaylist":c=Ch(c);Dh(c);this.b.loadPlaylist(c);break;case "cuePlaylist":c=Ch(c);Dh(c);this.b.cuePlaylist(c);break;case "playVideo":this.b.playVideo();break;case "pauseVideo":this.b.pauseVideo();break;case "stopVideo":this.b.stopVideo();break;case "seekTo":ea(c.seconds)&&this.b.seekTo(c.seconds,c.allowSeekAhead)}}}};
co.prototype.p=function(a,b){if(this.j&&!this.C()){var c=this.i;c.C()||eo(c.b,c.g,c.i,a,b)}};function fo(a,b){b in a.g&&(a.removeEventListener(b,a.g[b]),delete a.g[b])}co.prototype.B=function(){this.i.Da("command",this.k,this);this.i=null;for(var a in this.g)fo(this,a);co.F.B.call(this)};function go(a,b){co.call(this,b);this.b=a;this.o=["onReady","onStateChange","onError"];this.start()}z(go,co);go.prototype.addEventListener=function(a,b){Ha(this.o,a)&&this.b.addEventListener(a,b)};go.prototype.removeEventListener=function(a,b){Ha(this.o,a)&&this.b.removeEventListener(a,b)};go.prototype.B=function(){go.F.B.call(this);this.b=null};function ho(a,b){this.source=null;this.j=a||null;this.origin="*";this.u=window.document.location.protocol+"//"+window.document.location.hostname;this.k=b;this.i=this.b=this.g=this.o=null;O(window,"message",v(this.p,this))}
ho.prototype.p=function(a){var b=this.k||G("POST_MESSAGE_ORIGIN")||this.u;if("*"==b||a.origin==b)if(!this.j||a.source==this.j)if(this.source=a.source,this.origin="null"==a.origin?this.origin:a.origin,a=a.data,u(a)){try{a=yf(a)}catch(c){return}this.o=a.id;switch(a.event){case "listening":this.b&&(this.b(),this.b=null);break;case "command":this.g&&(this.i&&!Ha(this.i,a.func)||this.g(a.func,a.args))}}};ho.prototype.sendMessage=function(a){this.source&&(a.id=this.o,a=Q(a),this.source.postMessage(a,this.origin))};function io(){var a=this.g=new ho,b=v(this.Ud,this);a.g=b;a.i=null;this.i=[];this.k=!1;this.j=(a=G("POST_MESSAGE_ORIGIN"))&&sf(a)?a:null;this.o={}}g=io.prototype;g.Ud=function(a,b){if(this.j&&this.j!=this.g.origin)this.dispose();else if("addEventListener"==a&&b){var c=b[0];this.o[c]||"onReady"==c||(this.addEventListener(c,jo(this,c)),this.o[c]=!0)}else this.Pc(a,b)};g.Pc=function(){};function jo(a,b){return v(function(a){this.sendMessage(b,a)},a)}g.addEventListener=function(){};
g.Qd=function(){this.k=!0;this.sendMessage("initialDelivery",this.bc());this.sendMessage("onReady");C(this.i,this.Rc,this);this.i=[]};g.bc=function(){return null};function ko(a,b){a.sendMessage("infoDelivery",b)}g.Rc=function(a){this.k?this.g.sendMessage(a):this.i.push(a)};g.sendMessage=function(a,b){this.Rc({event:a,info:void 0==b?null:b})};g.dispose=function(){this.g=null};function lo(a){io.call(this);this.b=a;this.b.addEventListener("onReady",v(this.Zd,this));this.b.addEventListener("onVideoProgress",v(this.de,this));this.b.addEventListener("onVolumeChange",v(this.ee,this));this.b.addEventListener("onApiChange",v(this.$d,this));this.b.addEventListener("onPlaybackQualityChange",v(this.ae,this));this.b.addEventListener("onPlaybackRateChange",v(this.be,this));this.b.addEventListener("onStateChange",v(this.ce,this))}z(lo,io);g=lo.prototype;
g.Pc=function(a,b){if(this.b[a]){b=b||[];if(0<b.length&&zh(a)){var c;c=b;if(ga(c[0])&&!t(c[0]))c=c[0];else{var d={};switch(a){case "loadVideoById":case "cueVideoById":d=Bh.apply(window,c);break;case "loadVideoByUrl":case "cueVideoByUrl":d=Ah.apply(window,c);break;case "loadPlaylist":case "cuePlaylist":d=Ch.apply(window,c)}c=d}Dh(c);b.length=1;b[0]=c}this.b[a].apply(this.b,b);zh(a)&&ko(this,this.bc())}};g.Zd=function(){var a=v(this.Qd,this);this.g.b=a};
g.addEventListener=function(a,b){this.b.addEventListener(a,b)};g.bc=function(){var a=this.b.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.b[e]();b[f]=k}catch(m){}}}b.videoData=this.b.getVideoData();return b};
g.ce=function(a){a={playerState:a,currentTime:this.b.getCurrentTime(),duration:this.b.getDuration(),videoData:this.b.getVideoData(),videoStartBytes:0,videoBytesTotal:this.b.getVideoBytesTotal(),videoLoadedFraction:this.b.getVideoLoadedFraction(),playbackQuality:this.b.getPlaybackQuality(),availableQualityLevels:this.b.getAvailableQualityLevels(),videoUrl:this.b.getVideoUrl(),playlist:this.b.getPlaylist(),playlistIndex:this.b.getPlaylistIndex()};this.b.getProgressState&&(a.progressState=this.b.getProgressState());
ko(this,a)};g.ae=function(a){ko(this,{playbackQuality:a})};g.be=function(a){ko(this,{playbackRate:a})};g.$d=function(){for(var a=this.b.getOptions(),b={namespaces:a},c=0,d=a.length;c<d;c++){var e=a[c],f=this.b.getOptions(e);b[e]={options:f};for(var h=0,k=f.length;h<k;h++){var m=f[h],n=this.b.getOption(e,m);b[e][m]=n}}this.sendMessage("apiInfoDelivery",b)};g.ee=function(){ko(this,{muted:this.b.isMuted(),volume:this.b.getVolume()})};
g.de=function(a){a={currentTime:a,videoBytesLoaded:this.b.getVideoBytesLoaded(),videoLoadedFraction:this.b.getVideoLoadedFraction()};this.b.getProgressState&&(a.progressState=this.b.getProgressState());ko(this,a)};function mo(a,b,c){T.call(this);this.b=a;this.g=b;this.i=c}z(mo,T);mo.prototype.B=function(){this.g=this.b=null;mo.F.B.call(this)};function no(a,b,c){this.b=a;this.i=c;this.j=O(window,"message",v(this.o,this));this.g=new mo(this,a,b);qb(this,this.g)}z(no,pb);function eo(a,b,c,d,e){a.C()||b!=a.b||(b={id:c,command:d},e&&(b.data=e),a.b.postMessage(Q(b),a.i))}no.prototype.o=function(a){if(!this.C()&&a.origin==this.i&&a.source==this.b&&(a=a.data,u(a))){try{a=yf(a)}catch(b){return}if(a.command){var c=this.g;c.C()||c.q("command",a.command,a.data)}}};no.prototype.B=function(){Pc(this.j);this.b=null;no.F.B.call(this)};function oo(a){var b=void 0;void 0===b&&(b=NaN);var c=q("yt.scheduler.instance.addJob");c?(isNaN(b)&&(b=0),c(a,0,b)):isNaN(b)?a():H(a,b||0)};function po(a){this.args=a}function qo(a,b){this.b=a;this.Lc=b}qo.prototype.toString=function(){return this.b};var ro=q("yt.pubsub2.instance_")||new F;F.prototype.subscribe=F.prototype.subscribe;F.prototype.unsubscribeByKey=F.prototype.ha;F.prototype.publish=F.prototype.q;F.prototype.clear=F.prototype.clear;y("yt.pubsub2.instance_",ro);var so=q("yt.pubsub2.subscribedKeys_")||{};y("yt.pubsub2.subscribedKeys_",so);var to=q("yt.pubsub2.topicToKeys_")||{};y("yt.pubsub2.topicToKeys_",to);var uo=q("yt.pubsub2.isAsync_")||{};y("yt.pubsub2.isAsync_",uo);y("yt.pubsub2.skipSubKey_",null);
function vo(a,b){var c=wo();c&&c.publish.call(c,a.toString(),a,b)}
function xo(a,b){var c=wo();if(!c)return 0;var d=c.subscribe(a.toString(),function(c,f){if(!window.yt.pubsub2.skipSubKey_||window.yt.pubsub2.skipSubKey_!=d){var h=function(){if(so[d]){if(f&&a!=c){if(!f.args){Bb(Error("yt.pubsub2 cross-binary conversion is not possible for "+a.toString()));return}var h=function(){a.Lc.apply(this,f.args)};h.prototype=a.Lc.prototype;try{f=new h}catch(k){k.message="yt.pubsub2 cross-binary conversion error: "+k.message;Bb(k);return}}b.call(window,f)}};try{uo[a.toString()]?
q("yt.scheduler.instance")?oo(h):H(h,0):h()}catch(k){Bb(k)}}});so[d]=!0;to[a.toString()]||(to[a.toString()]=[]);to[a.toString()].push(d);return d}function yo(){var a=zo,b=wo();b&&(ea(a)&&(a=[a]),C(a,function(a){b.unsubscribeByKey(a);delete so[a]}))}function wo(){return q("yt.pubsub2.instance_")};var Ao={};function Bo(a){return a?24==a.length&&"UC"==a.slice(0,2)?a.substr(2):22==a.length?a:null:null};var Co;
Co={o:["BC","AD"],j:["Before Christ","Anno Domini"],p:"JFMAMJJASOND".split(""),T:"JFMAMJJASOND".split(""),k:"January February March April May June July August September October November December".split(" "),O:"January February March April May June July August September October November December".split(" "),M:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),ca:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),za:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),Mb:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
L:"Sun Mon Tue Wed Thu Fri Sat".split(" "),ma:"Sun Mon Tue Wed Thu Fri Sat".split(" "),u:"SMTWTFS".split(""),ba:"SMTWTFS".split(""),G:["Q1","Q2","Q3","Q4"],D:["1st quarter","2nd quarter","3rd quarter","4th quarter"],b:["AM","PM"],g:["EEEE, MMMM d, y","MMMM d, y","MMM d, y","M/d/yy"],la:["h:mm:ss a zzzz","h:mm:ss a z","h:mm:ss a","h:mm a"],i:["{1} 'at' {0}","{1} 'at' {0}","{1}, {0}","{1}, {0}"],Pe:6,La:[5,6],Qe:5};var Do=/^(\d{4})(?:(?:-?(\d{2})(?:-?(\d{2}))?)|(?:-?(\d{3}))|(?:-?W(\d{2})(?:-?([1-7]))?))?$/,Eo=/^(\d{2})(?::?(\d{2})(?::?(\d{2})(\.\d+)?)?)?$/,Fo=/Z|(?:([-+])(\d{2})(?::?(\d{2}))?)$/;function Go(a,b,c,d,e,f){u(a)?(this.k="y"==a?b:0,this.j="m"==a?b:0,this.b="d"==a?b:0,this.g="h"==a?b:0,this.i="n"==a?b:0,this.o="s"==a?b:0):(this.k=a||0,this.j=b||0,this.b=c||0,this.g=d||0,this.i=e||0,this.o=f||0)}
Go.prototype.equals=function(a){return a.k==this.k&&a.j==this.j&&a.b==this.b&&a.g==this.g&&a.i==this.i&&a.o==this.o};Go.prototype.clone=function(){return new Go(this.k,this.j,this.b,this.g,this.i,this.o)};Go.prototype.add=function(a){this.k+=a.k;this.j+=a.j;this.b+=a.b;this.g+=a.g;this.i+=a.i;this.o+=a.o};
function Ho(a,b,c){ea(a)?(this.b=Io(a,b||0,c||1),Jo(this,c||1)):ga(a)?(this.b=Io(a.getFullYear(),a.getMonth(),a.getDate()),Jo(this,a.getDate())):(this.b=new Date(w()),this.b.setHours(0),this.b.setMinutes(0),this.b.setSeconds(0),this.b.setMilliseconds(0))}function Io(a,b,c){b=new Date(a,b,c);0<=a&&100>a&&b.setFullYear(b.getFullYear()-1900);return b}g=Ho.prototype;g.Gb=Co.Pe;g.Hb=Co.Qe;g.clone=function(){var a=new Ho(this.b);a.Gb=this.Gb;a.Hb=this.Hb;return a};g.getFullYear=function(){return this.b.getFullYear()};
g.getMonth=function(){return this.b.getMonth()};g.getDate=function(){return this.b.getDate()};g.getTime=function(){return this.b.getTime()};function Ko(a){a=a.b.getTimezoneOffset();if(0==a)a="Z";else{var b=Math.abs(a)/60,c=Math.floor(b),b=60*(b-c);a=(0<a?"-":"+")+ua(c)+":"+ua(b)}return a}g.set=function(a){this.b=new Date(a.getFullYear(),a.getMonth(),a.getDate())};
g.add=function(a){if(a.k||a.j){var b=this.getMonth()+a.j+12*a.k,c=this.getFullYear()+Math.floor(b/12),b=b%12;0>b&&(b+=12);var d;t:{switch(b){case 1:d=0!=c%4||0==c%100&&0!=c%400?28:29;break t;case 5:case 8:case 10:case 3:d=30;break t}d=31}d=Math.min(d,this.getDate());this.b.setDate(1);this.b.setFullYear(c);this.b.setMonth(b);this.b.setDate(d)}a.b&&(a=new Date((new Date(this.getFullYear(),this.getMonth(),this.getDate(),12)).getTime()+864E5*a.b),this.b.setDate(1),this.b.setFullYear(a.getFullYear()),
this.b.setMonth(a.getMonth()),this.b.setDate(a.getDate()),Jo(this,a.getDate()))};g.Ib=function(a,b){return[this.getFullYear(),ua(this.getMonth()+1),ua(this.getDate())].join(a?"-":"")+(b?Ko(this):"")};g.equals=function(a){return!(!a||this.getFullYear()!=a.getFullYear()||this.getMonth()!=a.getMonth()||this.getDate()!=a.getDate())};g.toString=function(){return this.Ib()};function Jo(a,b){a.getDate()!=b&&a.b.setUTCHours(a.b.getUTCHours()+(a.getDate()<b?1:-1))}g.valueOf=function(){return this.b.valueOf()};
function Lo(a,b,c,d,e,f,h){this.b=ea(a)?new Date(a,b||0,c||1,d||0,e||0,f||0,h||0):new Date(a?a.getTime():w())}z(Lo,Ho);g=Lo.prototype;g.add=function(a){Ho.prototype.add.call(this,a);a.g&&this.b.setHours(this.b.getHours()+a.g);a.i&&this.b.setMinutes(this.b.getMinutes()+a.i);a.o&&this.b.setSeconds(this.b.getSeconds()+a.o)};
g.Ib=function(a,b){var c=Ho.prototype.Ib.call(this,a);return a?c+" "+ua(this.b.getHours())+":"+ua(this.b.getMinutes())+":"+ua(this.b.getSeconds())+(b?Ko(this):""):c+"T"+ua(this.b.getHours())+ua(this.b.getMinutes())+ua(this.b.getSeconds())+(b?Ko(this):"")};g.equals=function(a){return this.getTime()==a.getTime()};g.toString=function(){return this.Ib()};g.clone=function(){var a=new Lo(this.b);a.Gb=this.Gb;a.Hb=this.Hb;return a};function Mo(a,b){this.b=a;this.i=b}z(Mo,Nf);function No(a){var b=[];Ke(a.b.ja(!0),function(a){if("bounded-collectable-storage"!=a){var d;try{d=this.jb(a,!0)}catch(e){if("Storage: Invalid value was encountered"==e)return;throw e;}b.push({key:a,Gc:d.creation})}},a);Ta(b,function(a,b){return a.Gc-b.Gc});return D(b,function(a){return a.key})}function Oo(a,b){var c=Mo.F.get.call(a,"bounded-collectable-storage")||null;c&&t(c)||(b?c=No(a):c=[]);return c}
function Po(a,b){Mo.F.set.call(a,"bounded-collectable-storage",b)}function Qo(a,b){if(0==b.length)return Pa(a);for(var c=[],d=0,e=0;e<b.length&&d<a.length;){for(var f=b[e];d<a.length&&a[d]!=f;)c.push(a[d]),++d;++e}return Oa(c,Sa(a,d+1))}function Ro(a,b,c){if(b.length<=c)return Pa(b);c=Sa(b,0,b.length-c);C(c,function(a){Mo.F.remove.call(this,a)},a);return Qo(b,c)}Mo.prototype.g=function(a){var b=Oo(this,!0);a=Pf(this,b,a);b=Qo(b,a);Po(this,b)};
Mo.prototype.set=function(a,b,c){Mo.F.set.call(this,a,b,c);c=Oo(this,!0);Ma(c,a);p(b)&&(c.push(a),c.length>=this.i&&(a=Pf(this,c),c=Qo(c,a),c=Ro(this,c,this.i)));Po(this,c)};Mo.prototype.remove=function(a){Mo.F.remove.call(this,a);var b=Oo(this,!1);p(b)&&(Ma(b,a),Po(this,b))};function So(a,b){if(M&&!rc(9)){To||(To=new Me);this.S=To.get(a);this.S||(b?this.S=document.getElementById(b):(this.S=document.createElement("userdata"),this.S.addBehavior("#default#userData"),document.body.appendChild(this.S)),To.set(a,this.S));this.gc=a;try{this.S.load(this.gc)}catch(c){this.S=null}}}z(So,uf);var Uo={".":".2E","!":".21","~":".7E","*":".2A","'":".27","(":".28",")":".29","%":"."},To=null;g=So.prototype;g.S=null;g.gc=null;
function Vo(a){return"_"+encodeURIComponent(a).replace(/[.!~*'()%]/g,function(a){return Uo[a]})}g.isAvailable=function(){return!!this.S};g.set=function(a,b){this.S.setAttribute(Vo(a),b);Wo(this)};g.get=function(a){a=this.S.getAttribute(Vo(a));if(!u(a)&&null!==a)throw"Storage mechanism: Invalid value was encountered";return a};g.remove=function(a){this.S.removeAttribute(Vo(a));Wo(this)};g.ya=function(){return Xo(this).attributes.length};
g.ja=function(a){var b=0,c=Xo(this).attributes,d=new Ie;d.next=function(){if(b>=c.length)throw He;var d;d=c[b++];if(a)return decodeURIComponent(d.nodeName.replace(/\./g,"%")).substr(1);d=d.nodeValue;if(!u(d))throw"Storage mechanism: Invalid value was encountered";return d};return d};g.clear=function(){for(var a=Xo(this),b=a.attributes.length;0<b;b--)a.removeAttribute(a.attributes[b-1].nodeName);Wo(this)};function Wo(a){try{a.S.save(a.gc)}catch(b){throw"Storage mechanism: Quota exceeded";}}
function Xo(a){return a.S.XMLDocument.documentElement};function Yo(a,b){this.Va=a;this.Ja=b+"::"}z(Yo,uf);g=Yo.prototype;g.Va=null;g.Ja="";g.set=function(a,b){this.Va.set(this.Ja+a,b)};g.get=function(a){return this.Va.get(this.Ja+a)};g.remove=function(a){this.Va.remove(this.Ja+a)};g.ja=function(a){var b=this.Va.ja(!0),c=this,d=new Ie;d.next=function(){for(var d=b.next();d.substr(0,c.Ja.length)!=c.Ja;)d=b.next();return a?d.substr(c.Ja.length):c.Va.get(d)};return d};function Zo(a){var b=new wf;(b=b.isAvailable()?a?new Yo(b,a):b:null)||(a=new So(a||"UserDataSharedStore"),b=a.isAvailable()?a:null);return b};var $o={like:"l",dislike:"d",subscribe:"b",unsubscribe:"u",add_to_playlist:"d",comment:"c",share:"h"},ap=null;function bp(){if(!ap){var a=Zo("history_channel_");if(!a)return null;ap=new Mo(a,50)}return ap}function cp(a){return a?new Ho(a.getFullYear(),a.getMonth(),a.getDate()):new Ho};var dp;var $a=["3djj8jS0370cu_ghKs_Ong","LsooMJoIpl_7ux2jvdPB-Q","JkWoS4RsldA1coEIot5yDA","jVkjd2VWCWO-9DHRQER3Yg","L8ZULXASCc1I_oaOT0NaOQ"],ep=[];
function fp(a,b){if(!b){var c=G("CONVERSION_CONFIG_DICT");if(!c)return;b=c.uid||null;if(!b)return}if("cvisit"!=a&&"view"!=a&&"positive_action"!=a){var d=Bo(b);if(d){var e;i:{if(null==dp){c=Zo("aid");if(!c){c=null;break i}dp=new Mo(c,50)}c=dp}c?(c=c.get(d),e=ga(c)?c:null):e=null;if(e){c={foc_id:d,aid:e.aid||"!aid",label:"followon_"+a};if(e.ytfocHistoryEnabled){var f=new Ho;e=$o[a]||"x";var h=bp();if(h){var k=h.get(d);if(null==k)k=f.toString()+":"+e;else{if(k=bp()){var m=k.get(d);if(m){var f=cp(f),
n=m.substr(0,8),s=new Lo(2E3),n=oa(n),n=n.split(-1==n.indexOf("T")?" ":"T"),x;var $=n[0].match(Do);if($){var vj=Number($[2]),Ol=Number($[3]),Pl=Number($[4]);x=Number($[5]);var eb=Number($[6])||1;s.b.setFullYear(Number($[1]));Pl?(s.b.setDate(1),s.b.setMonth(0),s.add(new Go("d",Pl-1))):x?(s.b.setMonth(0),s.b.setDate(1),$=s.b.getDay()||7,s.add(new Go("d",(4>=$?1-$:8-$)+(Number(eb)+7*(Number(x)-1))-1))):(vj&&(s.b.setDate(1),s.b.setMonth(vj-1)),Ol&&s.b.setDate(Ol));x=!0}else x=!1;x&&!(x=2>n.length)&&(n=
n[1],x=n.match(Fo),eb=0,x&&("Z"!=x[0]&&(eb=60*x[2]+Number(x[3]),eb*="-"==x[1]?1:-1),eb-=s.b.getTimezoneOffset(),n=n.substr(0,n.length-x[0].length)),(x=n.match(Eo))?(s.b.setHours(Number(x[1])),s.b.setMinutes(Number(x[2])||0),s.b.setSeconds(Number(x[3])||0),s.b.setMilliseconds(x[4]?1E3*x[4]:0),0!=eb&&s.b.setTime(s.getTime()+6E4*eb),x=!0):x=!1);s=cp(x?s:null);m=m.substr(9);for(n=new Go("d",1);0>s.getTime()-f.getTime();)m+="-",s.add(n);s=m?m.split("-").length-1:0;for(n=-1;7<=s;)n=m.indexOf("-",n+1),--s;
m=m.substr(n+1,m.length);m=f.toString()+":"+m;k.set(d,m,w()+6048E5)}}k=h.get(d)+e}h.set(d,k,w()+6048E5)}if(e=bp())if(d=e.get(d),null==d)d=null;else{d=d.substr(9);m=f=k=h=e=0;s="x";for(n=0;n<d.length-1;n++)switch(d.charAt(n)){case "y":case "o":case "g":0<k?f+=1:e+=1;break;case "t":case "f":case "p":h+=1;break;case "a":k+=1;break;case "l":case "b":case "u":case "d":case "d":case "c":case "h":0==k&&(m=1)}if(0<d.length)switch(d.charAt(d.length-1)){case "y":case "o":case "g":s=0<k?"f":"y";break;case "t":case "f":case "p":s=
"s";break;case "a":s="a";break;case "l":case "b":case "u":case "d":case "d":case "c":case "h":s=d.charAt(d.length-1)}d=[s,"y"+e,"s"+h,"a"+k,"f"+f,"e"+m].join("")}else d=null;c.h=d||""}(c=$c("//www.gstatic.com/youtube/followonevent/l",c))&&c&&zg(c)}}}if("subscribe"==a||"unsubscribe"==a){if(u(b)){var B=Bo(b);if(B){B={label:"followon_"+a,foc_id:B};if("unsubscribe"==a||"dislike"==a)B.r=Math.round(1E4*Math.random());(B=$c("//googleads.g.doubleclick.net/pagead/viewthroughconversion/962985656/",B))&&B&&
zg(B)}}}else if("positive_action"!=a||Za(b))t:{c=G("CONVERSION_CONFIG_DICT");if(u(b)&&(d=Bo(b),!c||c.uid!=d)&&(c=Ao[d],!c||c.uid!=d))break t;if(a&&c&&c.baseUrl&&c.uid)if(h=c.rmktEnabled,d=c.focEnabled&&(!c.isAd||"view"!=a),h||d){e={};if(h){h={utuid:c.uid,type:a,client_name:"html5"};"cvisit"==a&&(h.type="cview");c.vid&&(h.utvid=c.vid);c.eventLabel&&(h.el=c.eventLabel);c.playerStyle&&(h.ps=c.playerStyle);c.feature&&(h.feature=c.feature);c.ppe&&(h.ppe=c.ppe);c.subscribed&&(h.subscribed=c.subscribed);
c.engaged&&(h.engaged=c.engaged);k=[];for(B in h)k.push(encodeURIComponent(B)+"="+encodeURIComponent(h[B]));B=k.join(";");e.data=B}d&&"view"==a&&c.vid&&c.uid&&(c.oeid||c.ieid)&&(c.oeid&&(e.oeid=c.oeid),c.ieid&&(e.ieid=c.ieid),e.evid=c.vid);d&&(e.label="followon_"+a,e.foc_id=c.uid);if("unsubscribe"==a||"dislike"==a)e.r=Math.round(1E4*Math.random());B=$c(c.baseUrl,e)}else B=null;else B=null;B&&B&&zg(B)}(B=G("CONVERSION_CONFIG_DICT"))&&(!u(b)||B.uid==Bo(b))&&Za(B.uid)&&B.baseUrl&&B.uid&&B.focEnabled&&
!B.isAd&&(c={label_no_cache:"followon_"+a,foc_id_no_cache:B.uid,random_no_cache:Math.round(1E4*Math.random())},(B=$c(B.baseUrl,c))&&B&&zg(B))};function gp(a){this.args=arguments}z(gp,po);function hp(a,b,c){this.args=arguments;this.i=a;this.g=b;this.b=c}z(hp,po);function ip(a,b,c,d){this.args=arguments;this.i=a;this.b=b;this.j=c||null;this.g=d||null}z(ip,po);function jp(a,b){this.args=arguments;this.g=a;this.b=b||null}z(jp,po);function kp(a){this.args=arguments}z(kp,po);
var lp=new qo("ypc-delayedloader-load",gp),mp=new qo("ypc-guide-sync-success",hp),np=new qo("ypc-purchase-success",ip),op=new qo("ypc-subscription-cancel",kp),pp=new qo("ypc-subscription-cancel-success",jp),qp=new qo("ypc-init-subscription",kp);var rp=!1,sp=[],zo=[];function tp(a,b,c,d,e,f){b?rp?K("subscription-external-subscribe",a,b,null,d,e):vo(lp,new gp(function(){vo(qp,new kp(b))})):up(a,c,d,e,f)}function vp(a,b,c,d,e,f,h){c?rp?K("subscription-external-unsubscribe",a,b,c,null,e,f):vo(lp,new gp(function(){vo(op,new kp(c))})):wp(a,b,d,e,f,h)}
function xp(a){if(a.length){var b=Ra(a,0,40);K("subscription-batch-subscribe-loading",b);yp("subscription-subscribe-loading",b);var c={};c.session_token=yb();c.a=b.join(",");var d=function(){K("subscription-batch-subscribe-loaded",b);yp("subscription-subscribe-loaded",b)};Gg("/subscription_ajax?action_create_subscription_to_all=1",{method:"POST",N:c,onSuccess:function(c,f){d();var h=f.response,k=h.id;if(t(k)&&k.length==b.length){var m={},n=h.channel_info_map;C(k,function(a,c){var d=b[c],e=n[d];m[d]=
a;K("subscription-subscribe-success",d,a,null,e)});K("subscription-batch-subscribe-success",m);(h=h.guide_notification_html_content)&&K("guide-add-subscription",h);a.length&&xp(a)}},onError:function(){d();K("subscription-batch-subscribe-failure",b);yp("subscription-subscribe-failure",b)}})}}
function zp(a){if(a.length){var b=Ra(a,0,40);K("subscription-batch-unsubscribe-loading",b);yp("subscription-unsubscirbe-loading",b);var c={};c.session_token=yb();c.c=b.join(",");var d=function(){K("subscription-batch-unsubscribe-loaded",b);yp("subscription-unsubscribe-loaded",b)};Gg("/subscription_ajax?action_remove_subscriptions=1",{method:"POST",N:c,onSuccess:function(){d();K("subscription-batch-unsubscribe-success",b);yp("subscription-unsubscribe-success",b);a.length&&zp(a)},onError:function(){d();
K("subscription-batch-unsubscribe-failure",b);yp("subscription-unsubscribe-failure",b)}})}}function Ap(a,b,c){Bp(a,b,null,null,c)}function Cp(a,b,c){Bp(a,null,null,b,c)}function Dp(a,b,c){Ep(a,b,null,c)}function Fp(a,b,c){Ep(a,null,b,c)}function Gp(a,b,c,d,e){Bp(a,b,c,d,e)}function Hp(a){var b=a.i.subscriptionElement||null,c=a.b.subscriptionId,d=a.b.channelInfo;c&&K("subscription-subscribe-success",a.g,c,b,d)}
function Ip(a){var b=a.b;Xa(a.i,function(a,d){K("subscription-subscribe-success",d,a,null,b[d])});K("guide-add-subscription",a.g)}function Jp(a){K("subscription-unsubscribe-success",a.g.itemId,a.g.subscriptionElement||null);a.b&&(K("subscription-batch-unsubscribe-success",a.b),yp("subscription-unsubscribe-success",a.b),yp("subscription-enable-ypc",a.b))}
function up(a,b,c,d,e){K("subscription-subscribe-loading",a);var f={};f.c=a;d&&(f.eurl=d);e&&(f.source=e);d={};d.session_token=yb();(e=G("PLAYBACK_ID"))&&(d.plid=e);c&&Kp("/subscription_ajax?action_create_subscription_to_channel=1",f,c);Gg("/subscription_ajax?action_create_subscription_to_channel=1",{method:"POST",Tc:f,N:d,onSuccess:function(c,d){var e=d.response;K("subscription-subscribe-success",a,e.id,b,e.channel_info);e.show_feed_privacy_dialog&&K("SHOW-FEED-PRIVACY-SUBSCRIBE-DIALOG",a);(e=e.guide_notification_html_content)&&
K("guide-add-subscription",e)},onError:function(){K("subscription-subscribe-failure",a)},fc:function(){K("subscription-subscribe-loaded",a)}})}
function wp(a,b,c,d,e,f){K("subscription-unsubscirbe-loading",a);var h={};e&&(h.eurl=e);f&&(h.source=f);e={};e.session_token=yb();e.c=a;e.s=b;(b=G("PLAYBACK_ID"))&&(e.plid=b);d&&Kp("/subscription_ajax?action_remove_subscriptions=1",{},d);Gg("/subscription_ajax?action_remove_subscriptions=1",{method:"POST",Tc:h,N:e,onSuccess:function(){K("subscription-unsubscribe-success",a,c)},onError:function(){K("subscription-unsubscribe-failure",a)},fc:function(){K("subscription-unsubscribe-loaded",a)}})}
function Bp(a,b,c,d,e){if(null!==b||null!==c||null!==d){var f={};f.session_token=yb();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);Gg("/subscription_ajax?action_update_subscription_preferences=1",{method:"POST",N:f,onError:function(){e&&e()}})}}
function Ep(a,b,c,d){if(a.length&&(null!==b||null!==c)){var e=Ra(a,0,40);K("subscription-batch-prefs-loading",e);var f={};f.session_token=yb();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(){K("subscription-batch-prefs-loaded",e)};Gg("/subscription_ajax?action_update_subscription_preferences_batch=1",{method:"POST",N:f,onSuccess:function(){h();K("subscription-batch-prefs-success",e);a.length&&Ep(a,b,c,d)},onError:function(){h();
d&&d();K("subscription-batch-prefs-failure",e)}})}}function yp(a,b){C(b,function(b){K(a,b)})}function Kp(a,b,c){a=hd(a,b);c=fd(c);jd(a,c)};var Lp=null,Mp=null,Np=null,Op=!1;y("yt.abuse.invokeBotguard",function(){return Ub?Ub.invoke():null});y("yt.abuse.botguardInitialized",function(){return null!=Ub});y("yt.setAjaxToken",function(){});y("yt.setConfig",wb);y("yt.setMsg",function(a){xb(vb,arguments)});y("yt.embed.openLoginDialog",function(){Ag(function(a){if(Lp.onLoginDialogSuccess)Lp.onLoginDialogSuccess(a)})});
y("writeEmbed",function(){var a=new ge(G("PLAYER_CONFIG")),b=document.referrer,c=G("POST_MESSAGE_ORIGIN"),d=!1;u(b)&&u(c)&&-1<b.indexOf(c)&&sf(c)&&sf(b)&&(d=!0);window!=window.top&&b&&b!=document.URL&&(a.args.loaderUrl=b);G("LIGHTWEIGHT_AUTOPLAY")&&(a.args.autoplay="1");a.args.autoplay&&Dh(a.args);Lp=lg("player",a);b=G("POST_MESSAGE_ID","player");G("ENABLE_JS_API")?Np=new lo(Lp):G("ENABLE_POST_API")&&u(b)&&u(c)&&(Mp=new no(window.parent,b,c),Np=new go(Lp,Mp.g));Op=d&&!G("ENABLE_CAST_API");Op||(c=
Lp,hn({device:"Desktop",app:"youtube-desktop",isV3:G("MDX_ENABLE_QUEUE"),isSignedIn:G("LOGGED_IN"),loadAccountScreens:a.args.has_mdx_screens}),On=c,On.addEventListener("onReady",Qn),On.addEventListener("onRemoteReceiverSelected",Sn),Pn.push(J("yt-remote-receiver-availability-change",Rn)),Pn.push(J("yt-remote-auto-connect",Tn)));G("BG_P")&&(G("BG_I")||G("BG_IU"))&&Vb();Un=Lp;Un.addEventListener("SUBSCRIBE",Xn);Un.addEventListener("UNSUBSCRIBE",$n);Vn.push(J("subscription-subscribe-success",ao));Vn.push(J("subscription-unsubscribe-success",
bo))});y("yt.www.watch.ads.restrictioncookie.spr",function(a){(a=a+"mac_204?action_fcts=1")&&zg(a);ed("CLAD","tlip="+w());return!0});
O(window,"load",function(){sh().tick.ol=w();oh("ol");if(G("TIMING_WAIT")){var a=G("TIMING_ACTION"),b=sh().tick;if(a&&b._start)if(a=G("TIMING_WAIT",[]),a.length){for(var c=!0,d=0,e=a.length;d<e;++d)if(!(a[d]in b)){c=!1;break}c&&rh()}else(b.ol||b.aft)&&rh()}else b=G("TIMING_ACTION"),a=!!G("TIMING_WFF"),c=sh().tick,b&&c._start&&(a&&c.vr||!a&&(c.ol||c.aft))&&rh();rp=!0;sp.push(J("subscription-subscribe",tp));sp.push(J("subscription-unsubscribe",vp));rp||(sp.push(J("subscription-external-subscribe",tp)),
sp.push(J("subscription-external-unsubscribe",vp)),sp.push(J("subscription-batch-subscribe",xp)),sp.push(J("subscription-batch-unsubscribe",zp)),sp.push(J("subscription-pref-email",Ap)),sp.push(J("subscription-pref-uploads",Cp)),sp.push(J("subscription-prefs",Gp)),sp.push(J("subscription-batch-pref-email",Dp)),sp.push(J("subscription-batch-pref-uploads",Fp)),zo.push(xo(np,Hp),xo(pp,Jp),xo(mp,Ip)),ep.push(J("subscription-subscribe-success",ma(fp,"subscribe")),J("subscription-unsubscribe-success",ma(fp,
"unsubscribe")),J("player-subscribe",ma(fp,"subscribe")),J("player-unsubscribe",ma(fp,"unsubscribe"))))});
O(window,"unload",function(){var a=Lp;a&&a.sendAbandonmentPing&&a.sendAbandonmentPing();G("PL_ATT")&&(Ub=null);Kb(sp);sp.length=0;yo();zo.length=0;rp=!1;Kb(ep);ep.length=0;Un&&(Un.removeEventListener("SUBSCRIBE",Yn),Un.removeEventListener("UNSUBSCRIBE",$n));Un=null;Kb(Vn);Op||(Kb(Pn),Pn.length=0,On&&(On.removeEventListener("onRemoteReceiverSelected",Sn),On.removeEventListener("onReady",Qn),On=null),vn());tb(Np,Mp);Lp.destroy()});var Pp=bh.getInstance(),Qp=Qg(Pp);
Qp in gh||(Pp.register(),Rg(Pp,"yt-uix-dispose-"+Qp,Pp.dispose),gh[Qp]=Pp);})();
