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