(function(){var g,aa=aa||{},m=this;function n(a){a=a.split(".");for(var b=m,c;c=a.shift();)if(null!=b[c])b=b[c];else return null;return b}function ba(){}function ca(a){a.getInstance=function(){return a.Vc?a.Vc:a.Vc=new a}}
function da(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function s(a){return void 0!==a}function t(a){return"array"==da(a)}function ea(a){var b=da(a);return"array"==b||"object"==b&&"number"==typeof a.length}function u(a){return"string"==typeof a}function fa(a){return"number"==typeof a}function ga(a){return"function"==da(a)}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=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var w=Date.now||function(){return+new Date};function x(a,b){var c=a.split("."),d=m;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function y(a,b){function c(){}c.prototype=b.prototype;a.R=b.prototype;a.prototype=new c}
Function.prototype.bind=Function.prototype.bind||function(a,b){if(1<arguments.length){var c=Array.prototype.slice.call(arguments,1);c.unshift(this,a);return v.apply(null,c)}return v(this,a)};function na(a){return decodeURIComponent(a.replace(/\+/g," "))}function oa(a){if(!pa.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(qa,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(ra,"&lt;"));-1!=a.indexOf(">")&&(a=a.replace(sa,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(ta,"&quot;"));return a}var qa=/&/g,ra=/</g,sa=/>/g,ta=/\"/g,pa=/[&<>\"]/;
function ua(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),h=0;0==c&&h<f;h++){var k=d[h]||"",l=e[h]||"",p=RegExp("(\\d*)(\\D*)","g"),r=RegExp("(\\d*)(\\D*)","g");do{var F=p.exec(k)||["","",""],q=r.exec(l)||["","",""];if(0==F[0].length&&0==q[0].length)break;c=((0==F[1].length?0:parseInt(F[1],10))<(0==q[1].length?0:parseInt(q[1],10))?-1:(0==F[1].length?0:parseInt(F[1],10))>(0==q[1].length?
0:parseInt(q[1],10))?1:0)||((0==F[2].length)<(0==q[2].length)?-1:(0==F[2].length)>(0==q[2].length)?1:0)||(F[2]<q[2]?-1:F[2]>q[2]?1:0)}while(0==c)}return c}function va(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})}function wa(a){var b=u(void 0)?"undefined".replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08"):"\\s";return a.replace(RegExp("(^"+(b?"|["+b+"]+":"")+")([a-z])","g"),function(a,b,e){return b+e.toUpperCase()})};var z=Array.prototype,xa=z.indexOf?function(a,b,c){return z.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},A=z.forEach?function(a,b,c){z.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)},ya=z.filter?function(a,b,c){return z.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],f=0,h=u(a)?
a.split(""):a,k=0;k<d;k++)if(k in h){var l=h[k];b.call(c,l,k,a)&&(e[f++]=l)}return e},za=z.map?function(a,b,c){return z.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},Aa=z.some?function(a,b,c){return z.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};function B(a,b,c){b=Ba(a,b,c);return 0>b?null:u(a)?a.charAt(b):a[b]}
function Ba(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 C(a,b){return 0<=xa(a,b)}function Ca(a){return 0==a.length}function Da(){var a=Ea;if(!t(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0}function Fa(a,b){C(a,b)||a.push(b)}function Ga(a,b){var c=xa(a,b),d;(d=0<=c)&&z.splice.call(a,c,1);return d}function Ha(a,b){var c=Ba(a,b,void 0);0<=c&&z.splice.call(a,c,1)}function Ia(a){return z.concat.apply(z,arguments)}
function Ja(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 Ka(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c],e;if(t(d)||(e=ea(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 La(a,b,c,d){return z.splice.apply(a,Ma(arguments,1))}function Ma(a,b,c){return 2>=arguments.length?z.slice.call(a,b):z.slice.call(a,b,c)}
function Na(a,b,c){if(!ea(a)||!ea(b)||a.length!=b.length)return!1;var d=a.length;c=c||Oa;for(var e=0;e<d;e++)if(!c(a[e],b[e]))return!1;return!0}function Oa(a,b){return a===b};var Pa;function Qa(a){a=a.className;return u(a)&&a.match(/\S+/g)||[]}function Ra(a,b){for(var c=Qa(a),d=Ma(arguments,1),e=c,f=0;f<d.length;f++)C(e,d[f])||e.push(d[f]);a.className=c.join(" ")}function Sa(a,b){var c=Qa(a),d=Ma(arguments,1),c=Ta(c,d);a.className=c.join(" ")}function Ta(a,b){return ya(a,function(a){return!C(b,a)})}function Ua(a,b,c){c?Ra(a,b):Sa(a,b)};function D(a,b){this.x=s(a)?a:0;this.y=s(b)?b:0}D.prototype.B=function(){return new D(this.x,this.y)};D.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};D.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};D.prototype.scale=function(a,b){var c=fa(b)?b:a;this.x*=a;this.y*=c;return this};function Va(a,b){this.width=a;this.height=b}Va.prototype.B=function(){return new Va(this.width,this.height)};Va.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};Va.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};Va.prototype.scale=function(a,b){var c=fa(b)?b:a;this.width*=a;this.height*=c;return this};function Wa(a,b,c){for(var d in a)b.call(c,a[d],d,a)}function Xa(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function Ya(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}function Za(a){var b=$a,c;for(c in b)if(a.call(void 0,b[c],c,b))return c}function ab(a){for(var b in a)return!1;return!0}function bb(a){var b={},c;for(c in a)b[c]=a[c];return b}var cb="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
function db(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<cb.length;f++)c=cb[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};var eb,fb,gb,hb,ib,jb;function kb(){return m.navigator?m.navigator.userAgent:null}function lb(){return m.navigator}hb=gb=fb=eb=!1;var mb;if(mb=kb()){var nb=lb();eb=0==mb.indexOf("Opera");fb=!eb&&-1!=mb.indexOf("MSIE");gb=!eb&&-1!=mb.indexOf("WebKit");hb=!eb&&!gb&&"Gecko"==nb.product}var ob=eb,E=fb,G=hb,H=gb,pb=lb(),qb=pb&&pb.platform||"";ib=-1!=qb.indexOf("Mac");jb=-1!=qb.indexOf("Win");var rb=!!lb()&&-1!=(lb().appVersion||"").indexOf("X11");
function sb(){var a=m.document;return a?a.documentMode:void 0}var tb;t:{var ub="",vb;if(ob&&m.opera)var wb=m.opera.version,ub="function"==typeof wb?wb():wb;else if(G?vb=/rv\:([^\);]+)(\)|;)/:E?vb=/MSIE\s+([^\);]+)(\)|;)/:H&&(vb=/WebKit\/(\S+)/),vb)var xb=vb.exec(kb()),ub=xb?xb[1]:"";if(E){var yb=sb();if(yb>parseFloat(ub)){tb=String(yb);break t}}tb=ub}var zb=tb,Ab={};function I(a){return Ab[a]||(Ab[a]=0<=ua(zb,a))}function Bb(a){return E&&Cb>=a}
var Db=m.document,Cb=Db&&E?sb()||("CSS1Compat"==Db.compatMode?parseInt(zb,10):5):void 0;var Eb=!G&&!E||E&&Bb(9)||G&&I("1.9.1");E&&I("9");function Fb(a){return a?new Gb(Hb(a)):Pa||(Pa=new Gb)}function J(a){return u(a)?document.getElementById(a):a}function Ib(a){var b=document;return b.querySelectorAll&&b.querySelector?b.querySelectorAll("."+a):b.getElementsByClassName?b.getElementsByClassName(a):Jb(a)}
function Jb(a){var b,c,d,e;b=document;if(b.querySelectorAll&&b.querySelector&&a)return b.querySelectorAll(""+(a?"."+a:""));if(a&&b.getElementsByClassName){var f=b.getElementsByClassName(a);return f}f=b.getElementsByTagName("*");if(a){e={};for(c=d=0;b=f[c];c++){var h=b.className;"function"==typeof h.split&&C(h.split(/\s+/),a)&&(e[d++]=b)}e.length=d;return e}return f}function Kb(a){return"CSS1Compat"==a.compatMode}
function Lb(a){if(!a)return null;if(a.firstChild)return a.firstChild;for(;a&&!a.nextSibling;)a=a.parentNode;return a?a.nextSibling:null}function Mb(a){if(!a)return null;if(!a.previousSibling)return a.parentNode;for(a=a.previousSibling;a&&a.lastChild;)a=a.lastChild;return a}function Hb(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function Nb(a){var b=Ob.ce;return b?Pb(a,function(a){return!b||C(Qa(a),b)},!0):null}
function Pb(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 Gb(a){this.b=a||m.document||document}Gb.prototype.createElement=function(a){return this.b.createElement(a)};function Qb(a){var b=a.b;a=!H&&Kb(b)?b.documentElement:b.body;b=b.parentWindow||b.defaultView;return E&&I("10")&&b.pageYOffset!=a.scrollTop?new D(a.scrollLeft,a.scrollTop):new D(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}
Gb.prototype.appendChild=function(a,b){a.appendChild(b)};Gb.prototype.getChildren=function(a){return Eb&&void 0!=a.children?a.children:ya(a.childNodes,function(a){return 1==a.nodeType})};function Rb(a,b,c){a.dataset?a.dataset[Sb(b)]=c:a.setAttribute("data-"+b,c)}function K(a,b){return a.dataset?a.dataset[Sb(b)]:a.getAttribute("data-"+b)}function Tb(a,b){a.dataset?delete a.dataset[Sb(b)]:a.removeAttribute("data-"+b)}var Ub={};function Sb(a){return Ub[a]||(Ub[a]=String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()}))};var Vb=n("yt.dom.getNextId_");if(!Vb){Vb=function(){return++Wb};x("yt.dom.getNextId_",Vb);var Wb=0}function Xb(a,b){if(a in b)return b[a];var c=a.charAt(0).toUpperCase()+a.substr(1);if("moz"+c in b)return b["moz"+c];if("ms"+c in b)return b["ms"+c];if("o"+c in b)return b["o"+c];if("webkit"+c in b)return b["webkit"+c]}function Yb(){var a=document,b;Aa(["fullscreenElement","fullScreenElement"],function(c){b=Xb(c,a);return!!b});return b};var Zb=window.yt&&window.yt.config_||{};x("yt.config_",Zb);var $b=window.yt&&window.yt.tokens_||{};x("yt.tokens_",$b);x("yt.globals_",window.yt&&window.yt.globals_||{});var ac=window.yt&&window.yt.msgs_||{};x("yt.msgs_",ac);var bc=window.yt&&window.yt.timeouts_||[];x("yt.timeouts_",bc);x("yt.intervals_",window.yt&&window.yt.intervals_||[]);function cc(a){dc(Zb,arguments)}function L(a){return a in Zb?Zb[a]:void 0}function ec(a){dc($b,arguments)}
function fc(){return"subscription_ajax"in $b?$b.subscription_ajax:void 0}function M(a,b){ga(a)&&(a=gc(a));var c=window.setTimeout(a,b);bc.push(c);return c}function hc(a){window.clearTimeout(a)}function gc(a){return window.yterr?function(){try{return a.apply(this,arguments)}catch(b){var c=n("yt.www.onException");c&&c(b);throw b;}}:a}function ic(a,b,c){var d=b||{};if(a=a in ac?ac[a]:c)for(var e in d)a=a.replace(RegExp("\\$"+e,"gi"),function(){return d[e]});return a}
function dc(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 jc="Microsoft Internet Explorer"==navigator.appName;function kc(a){if(a=a||window.event){for(var b in a)b in lc||(this[b]=a[b]);this.scale=a.scale;this.rotation=a.rotation;this.Fb=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;if(document.body&&document.documentElement){b=
document.body.scrollLeft+document.documentElement.scrollLeft;var d=document.body.scrollTop+document.documentElement.scrollTop;this.pageX=void 0!=a.pageX?a.pageX:a.clientX+b;this.pageY=void 0!=a.pageY?a.pageY:a.clientY+d}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.b&&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.Fb=null;g.type="";g.target=null;g.relatedTarget=null;g.currentTarget=null;g.data=null;g.source=null;g.keyCode=0;g.charCode=0;g.altKey=!1;g.ctrlKey=!1;g.shiftKey=!1;g.clientX=0;g.clientY=0;g.pageX=0;g.pageY=0;g.wheelDeltaX=0;g.wheelDeltaY=0;g.rotation=0;g.scale=1;g.preventDefault=function(){this.Fb.returnValue=!1;this.Fb.preventDefault&&this.Fb.preventDefault()};var lc={stopPropagation:1,preventMouseEvent:1,preventManipulation:1,preventDefault:1,layerX:1,layerY:1,scale:1,rotation:1};var $a=n("yt.events.listeners_")||{};x("yt.events.listeners_",$a);var mc=n("yt.events.counter_")||{count:0};x("yt.events.counter_",mc);function nc(a,b,c,d){return Za(function(e){return e[0]==a&&e[1]==b&&e[2]==c&&e[4]==!!d})}
function N(a,b,c,d){if(a&&(a.addEventListener||a.attachEvent)){d=!!d;var e=nc(a,b,c,d);if(!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(!Pb(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=gc(h);$a[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)}}};function oc(){}oc.prototype.p=!1;oc.prototype.dispose=function(){this.p||(this.p=!0,this.K())};function pc(a,b){a.kb||(a.kb=[]);a.kb.push(v(b,void 0))}oc.prototype.K=function(){if(this.kb)for(;this.kb.length;)this.kb.shift()()};function qc(a){a&&"function"==typeof a.dispose&&a.dispose()};function O(){this.b=[];this.V={}}y(O,oc);g=O.prototype;g.xc=1;g.Bb=0;g.I=function(a,b,c){var d=this.V[a];d||(d=this.V[a]=[]);var e=this.xc;this.b[e]=a;this.b[e+1]=b;this.b[e+2]=c;this.xc=e+3;d.push(e);return e};g.xa=function(a,b,c){if(a=this.V[a]){var d=this.b;if(a=B(a,function(a){return d[a+1]==b&&d[a+2]==c}))return this.na(a)}return!1};
g.na=function(a){if(0!=this.Bb)return this.g||(this.g=[]),this.g.push(a),!1;var b=this.b[a];if(b){var c=this.V[b];c&&Ga(c,a);delete this.b[a];delete this.b[a+1];delete this.b[a+2]}return!!b};g.w=function(a,b){var c=this.V[a];if(c){this.Bb++;for(var d=Ma(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.Bb--;if(this.g&&0==this.Bb)for(;c=this.g.pop();)this.na(c);return 0!=e}return!1};
g.clear=function(a){if(a){var b=this.V[a];b&&(A(b,this.na,this),delete this.V[a])}else this.b.length=0,this.V={}};g.K=function(){O.R.K.call(this);delete this.b;delete this.V;delete this.g};var rc=n("yt.pubsub.instance_")||new O;O.prototype.subscribe=O.prototype.I;O.prototype.unsubscribeByKey=O.prototype.na;O.prototype.publish=O.prototype.w;O.prototype.clear=O.prototype.clear;x("yt.pubsub.instance_",rc);function P(a,b,c){var d=n("yt.pubsub.instance_");return d?d.subscribe(a,function(){var a=arguments;M(function(){b.apply(c||m,a)},0)},c):0}
function sc(){var a=L("LOGGED_IN_PUBSUB_KEY"),b=n("yt.pubsub.instance_");b&&("number"==typeof a?a=[a]:"string"==typeof a&&(a=[parseInt(a,10)]),A(a,function(a){b.unsubscribeByKey(a)}))}function Q(a,b){var c=n("yt.pubsub.instance_");return c?c.publish.apply(c,arguments):!1};function tc(a,b,c,d,e){var f="";a&&(f+=a+":");b&&(f=f+"//"+b);c&&(f+=c);d&&(f+="?"+d);e&&(f+="#"+e);return f}var uc=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function vc(a){if(wc){wc=!1;var b=m.location;if(b){var c=b.href;if(c&&(c=xc(c))&&c!=b.hostname)throw wc=!0,Error();}}return a.match(uc)}var wc=H;function xc(a){return(a=vc(a)[3]||null)&&decodeURIComponent(a)}
function yc(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 zc(a,b,c){if(t(b))for(var d=0;d<b.length;d++)zc(a,String(b[d]),c);else null!=b&&c.push("&",a,""===b?"":"=",encodeURIComponent(String(b)))}function Ac(a,b,c){Math.max(b.length-(c||0),0);for(c=c||0;c<b.length;c+=2)zc(b[c],b[c+1],a);return a}function Bc(a,b){for(var c in b)zc(c,b[c],a);return a}
function Cc(a,b){return yc(2==arguments.length?Ac([a],arguments[1],0):Ac([a],arguments,1))};function Dc(a,b){var c=Cc("/signin?context=popup","next",document.location.protocol+"//"+document.domain+"/post_login");b&&(c=Cc(c,"feature",b));if(c=window.open(c,"loginPopup","width=375,height=440,resizable=yes,scrollbars=yes",!0)){var d=P("LOGGED_IN",function(b){sc();a(b)});cc("LOGGED_IN_PUBSUB_KEY",d);c.moveTo((screen.width-375)/2,(screen.height-440)/2)}}x("yt.pubsub.publish",Q);function Ec(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}Ec.prototype.B=function(){return new Ec(this.top,this.right,this.bottom,this.left)};Ec.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};Ec.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};
Ec.prototype.scale=function(a,b){var c=fa(b)?b:a;this.left*=a;this.right*=a;this.top*=c;this.bottom*=c;return this};function Fc(a,b,c){var d;t:if(d=va(c),void 0===a.style[d]&&(c=(H?"Webkit":G?"Moz":E?"ms":ob?"O":null)+wa(c),void 0!==a.style[c])){d=c;break t}d&&(a.style[d]=b)}function Gc(a,b){var c=Hb(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function Hc(a,b){return Gc(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style&&a.style[b]}
function Ic(a){var b;try{b=a.getBoundingClientRect()}catch(c){return{left:0,top:0,right:0,bottom:0}}E&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b}
function Jc(a){if(E&&!Bb(8))return a.offsetParent;var b=Hb(a),c=Hc(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=Hc(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 Kc(a){var b,c=Hb(a),d=Hc(a,"position"),e=G&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),f=new D(0,0),h;b=c?Hb(c):document;(h=!E)||(h=Bb(9))||(h=Fb(b),h=Kb(h.b));h=h?b.documentElement:b.body;if(a==h)return f;if(a.getBoundingClientRect)b=Ic(a),a=Qb(Fb(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(H&&"fixed"==Hc(e,"position")){f.x+=c.body.scrollLeft;f.y+=c.body.scrollTop;break}e=e.offsetParent}while(e&&e!=a);if(ob||H&&"absolute"==d)f.y-=c.body.offsetTop;for(e=a;(e=Jc(e))&&e!=c.body&&e!=h;)f.x-=e.scrollLeft,ob&&"TR"==e.tagName||(f.y-=e.scrollTop)}return f}function Lc(a,b){"number"==typeof a&&(a=(b?Math.round(a):a)+"px");return a}
function Mc(a){if("none"!=Hc(a,"display"))return Nc(a);var b=a.style,c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=Nc(a);b.display=c;b.position=e;b.visibility=d;return a}function Nc(a){var b=a.offsetWidth,c=a.offsetHeight,d=H&&!b&&!c;return s(b)&&!d||!a.getBoundingClientRect?new Va(b,c):(a=Ic(a),new Va(a.right-a.left,a.bottom-a.top))}
function Oc(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 Pc(a,b){var c=a.currentStyle?a.currentStyle[b]:null;return c?Oc(a,c):0}var Qc={thin:2,medium:4,thick:6};
function Rc(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 Qc?Qc[c]:Oc(a,c)}var Sc=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function Tc(a,b){(a=J(a))&&a.style&&(a.style.display=b?"":"none",Ua(a,"hid",!b))}function Uc(a){A(arguments,function(a){Tc(a,!0)})}function Vc(a){A(arguments,function(a){Tc(a,!1)})};var Wc={},Xc="ontouchstart"in document;function Yc(a,b,c){var d;switch(a){case "mouseover":case "mouseout":d=3;break;case "mouseenter":case "mouseleave":d=9}return Pb(c,function(a){return C(Qa(a),b)},!0,d)}
function R(a){var b="mouseover"==a.type&&"mouseenter"in Wc||"mouseout"==a.type&&"mouseleave"in Wc,c=a.type in Wc||b;if("HTML"!=a.target.tagName&&c){if(b){var b="mouseover"==a.type?"mouseenter":"mouseleave",c=Wc[b],d;for(d in c.V){var e=Yc(b,d,a.target);e&&!Pb(a.relatedTarget,function(a){return a==e},!0)&&c.w(d,e,b,a)}}if(b=Wc[a.type])for(d in b.V)(e=Yc(a.type,d,a.target))&&b.w(d,e,a.type,a)}}N(document,"blur",R,!0);N(document,"change",R,!0);N(document,"click",R);N(document,"focus",R,!0);
N(document,"mouseover",R);N(document,"mouseout",R);N(document,"mousedown",R);N(document,"keydown",R);N(document,"keyup",R);N(document,"keypress",R);N(document,"cut",R);N(document,"paste",R);Xc&&(N(document,"touchstart",R),N(document,"touchend",R),N(document,"touchcancel",R));var Zc=window.yt&&window.yt.uix&&window.yt.uix.widgets_||{};x("yt.uix.widgets_",Zc);function $c(){this.b={}}$c.prototype.g=!!eval("/*@cc_on!@*/false");$c.prototype.Wc=function(){return!0};function ad(a,b,c){var d=S(a,void 0),e=v(c,a);b in Wc||(Wc[b]=new O);Wc[b].I(d,e);a.b[c]=e}function bd(a,b){Rb(a,"tooltip-text",b)}function S(a,b){return"yt-uix"+(a.Zb?"-"+a.Zb:"")+(b?"-"+b:"")};function cd(){this.b={}}y(cd,$c);ca(cd);g=cd.prototype;g.Zb="tooltip";g.Ib=0;g.register=function(){ad(this,"mouseover",this.Ic);ad(this,"mouseout",this.Xb);ad(this,"click",this.Xb);ad(this,"touchstart",this.Yd);ad(this,"touchend",this.Nc);ad(this,"touchcancel",this.Nc)};g.Wc=function(){return!(this.g&&0==zb.indexOf("6"))};
g.Ic=function(a){if(!(this.Ib&&1E3>w()-this.Ib)){var b=parseInt(K(a,"tooltip-hide-timer"),10);b&&(Tb(a,"tooltip-hide-timer"),hc(b));var b=v(function(){dd(this,a);Tb(a,"tooltip-show-timer")},this),c=parseInt(K(a,"tooltip-show-delay"),10)||0,b=M(b,c);Rb(a,"tooltip-show-timer",b.toString());a.title&&(bd(a,K(a,"tooltip-text")||a.title),a.title="")}};
g.Xb=function(a){var b=parseInt(K(a,"tooltip-show-timer"),10);b&&(hc(b),Tb(a,"tooltip-show-timer"));b=v(function(){if(a){var b=J(ed(this,a));b&&(fd(b),b&&b.parentNode&&b.parentNode.removeChild(b),Tb(a,"content-id"))}Tb(a,"tooltip-hide-timer")},this);b=M(b,50);Rb(a,"tooltip-hide-timer",b.toString());if(b=K(a,"tooltip-text"))a.title=b};g.Yd=function(a,b){this.Ib=0;var c=Yc(b,S(this),null[0].target);this.Ic(c)};g.Nc=function(a,b){this.Ib=w();var c=Yc(b,S(this),null[0].target);this.Xb(c)};
function gd(a,b){bd(a,b);var c=K(a,"content-id");if(c=J(c))c.innerHTML=b}
function dd(a,b){if(b){var c=K(b,"tooltip-text")||b.title;if(c){var d=J(ed(a,b));if(!d){d=document.createElement("div");d.id=ed(a,b);d.className=S(a,"tip");var e=document.createElement("div");e.className=S(a,"tip-body");var f=document.createElement("div");f.className=S(a,"tip-arrow");var h=document.createElement("div");h.className=S(a,"tip-content");var k=hd(a,b),l=ed(a,b,"content");h.id=l;Rb(b,"content-id",l);e.appendChild(h);k&&d.appendChild(k);d.appendChild(e);d.appendChild(f);(Yb()||document.body).appendChild(d);
gd(b,c);(c=parseInt(K(b,"tooltip-max-width"),10))&&e.offsetWidth>c&&(e.style.width=c+"px",Ra(h,S(a,"normal-wrap")));h=C(Qa(b),S(a,"reverse"));id(a,b,d,e,k,h)||id(a,b,d,e,k,!h);var p=S(a,"tip-visible");M(function(){Ra(d,p)},0)}}}}
function id(a,b,c,d,e,f){Ua(c,S(a,"tip-reverse"),f);var h=0;f&&(h=1);a=Mc(b);f=new D((a.width-10)/2,f?a.height:0);var k=Kc(b);var k=new D(k.x+f.x,k.y+f.y),k=k.B(),l=(h&4&&"rtl"==Hc(c,"direction")?h^2:h)&-5;f=Mc(c);h=f.B();0!=l&&(l&2&&(k.x-=h.width+0),l&1&&(k.y-=h.height+0));var p=k,l=G&&(ib||rb)&&I("1.9");p instanceof D?(k=p.x,p=p.y):(k=p,p=void 0);c.style.left=Lc(k,l);c.style.top=Lc(p,l);if(!(f==h||f&&h&&f.width==h.width&&f.height==h.height))if(f=Fb(Hb(c)),k=Kb(f.b),!E||k&&I("8"))f=c.style,G?f.MozBoxSizing=
"border-box":H?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(E)var k=Pc(c,"paddingLeft"),l=Pc(c,"paddingRight"),p=Pc(c,"paddingTop"),r=Pc(c,"paddingBottom"),k=new Ec(p,l,r,k);else k=Gc(c,"paddingLeft"),l=Gc(c,"paddingRight"),p=Gc(c,"paddingTop"),r=Gc(c,"paddingBottom"),k=new Ec(parseFloat(p),parseFloat(l),parseFloat(r),parseFloat(k));if(E)var l=Rc(c,"borderLeft"),p=Rc(c,"borderRight"),r=Rc(c,"borderTop"),
F=Rc(c,"borderBottom"),l=new Ec(r,p,F,l);else l=Gc(c,"borderLeftWidth"),p=Gc(c,"borderRightWidth"),r=Gc(c,"borderTopWidth"),F=Gc(c,"borderBottomWidth"),l=new Ec(parseFloat(r),parseFloat(p),parseFloat(F),parseFloat(l));f.pixelWidth=h.width-l.left-k.left-k.right-l.right;f.pixelHeight=h.height-l.top-k.top-k.bottom-l.bottom}else f.pixelWidth=h.width,f.pixelHeight=h.height;var h=window.document,h=Kb(h)?h.documentElement:h.body,h=new Va(h.clientWidth,h.clientHeight),q;if(1==c.nodeType){c.getBoundingClientRect?
(f=Ic(c),f=new D(f.left,f.top)):(f=Qb(Fb(c)),k=Kc(c),f=new D(k.x-f.x,k.y-f.y));if(G&&!I(12)){var Z;E?Z="-ms-transform":H?Z="-webkit-transform":ob?Z="-o-transform":G&&(Z="-moz-transform");Z&&(q=Hc(c,Z));q||(q=Hc(c,"transform"));c=q?(c=q.match(Sc))?new D(parseFloat(c[1]),parseFloat(c[2])):new D(0,0):new D(0,0);c=new D(f.x+c.x,f.y+c.y)}else c=f;q=c}else Z=ga(c.Gd),q=c,c.targetTouches?q=c.targetTouches[0]:Z&&c.ib.targetTouches&&(q=c.ib.targetTouches[0]),q=new D(q.clientX,q.clientY);c=Mc(d);f=Math.floor(c.width/
2);e&&(e.style.left="3px",e.style.height=c.height+"px",e.style.width=c.width+"px");e=!!(h.height<q.y+a.height);a=!!(q.y<a.height);Z=!!(q.x<f);q=!!(h.width<q.x+f);h=(c.width+3)/-2- -5;b=K(b,"force-tooltip-direction");if("left"==b||Z)h=-5;else if("right"==b||q)h=20-c.width-3;d.style.left=Math.floor(h)+"px";return!(e||a)}function ed(a,b,c){a=S(a);var d=b.__yt_uid_key;d||(d=Vb(),b.__yt_uid_key=d);b=a+d;c&&(b+="-"+c);return b}
function hd(a,b){var c=null;jb&&C(Qa(b),S(a,"masked"))&&((c=J("yt-uix-tooltip-shared-mask"))?(c.parentNode.removeChild(c),Uc(c)):(c=document.createElement("iframe"),c.src='javascript:""',c.id="yt-uix-tooltip-shared-mask",c.className=S(a,"tip-mask")));return c}function fd(a){var b=J("yt-uix-tooltip-shared-mask"),c=b&&Pb(b,function(b){return b==a},!1,2);b&&c&&(b.parentNode.removeChild(b),Vc(b),document.body.appendChild(b))};function jd(){this.b={};this.h=[]}y(jd,$c);ca(jd);jd.prototype.Zb="subscription-button";
jd.prototype.register=function(){ad(this,"click",this.Ec);this.h.push(P("subscription-subscribe-loading",this.Dc,this),P("subscription-subscribe-loaded",this.Cc,this),P("subscription-unsubscirbe-loading",this.Dc,this),P("subscription-unsubscribe-loaded",this.Cc,this),P("subscription-subscribe-success",this.Nd,this),P("subscription-unsubscribe-success",this.Od,this),P("subscription-enable-ypc",this.Md,this),P("subscription-disable-ypc",this.Ld,this))};
var Ob={Hc:"hover-enabled",Sd:"yt-uix-button-subscribe",Td:"yt-uix-button-subscribed",le:"ypc-enabled",ce:"yt-uix-button-subscription-container",de:"yt-subscription-button-disabled-mask-container"},T={ne:"channel-external-id",Ud:"subscriber-count-show-when-subscribed",Vd:"subscriber-count-tooltip",Wd:"subscriber-count-title",Jg:"href",Rc:"is-subscribed",Kg:"parent-url",Lg:"sessionlink",Xd:"style-type",Sc:"subscription-id",Mg:"target",Zd:"ypc-enabled",Lc:"ypc-item-type",Kc:"ypc-item-id",Mc:"ypc-offers-url"};
g=jd.prototype;g.Ec=function(a){var b=K(a,"href");if(b)a=K(a,"target")||"_self",window.open(b,a);else if(fc()){var b=K(a,"channel-external-id"),c=K(a,"sessionlink"),d;if(K(a,"ypc-enabled")){d=K(a,T.Lc);var e=K(a,T.Kc),f=K(a,T.Mc);d={itemType:d,itemId:e,offersUrl:f,subscriptionElement:a}}else d=null;e=K(a,"parent-url");K(a,"is-subscribed")?(f=K(a,"subscription-id"),Q("subscription-unsubscribe",b,f,d,a,c,e)):Q("subscription-subscribe",b,d,a,c,e)}else kd(this,a)};g.Dc=function(a){this.Sa(a,this.Pc,!0)};
g.Cc=function(a){this.Sa(a,this.Pc,!1)};g.Nd=function(a,b){this.Sa(a,this.Qc,!0,b)};g.Od=function(a){this.Sa(a,this.Qc,!1)};g.Md=function(a){this.Sa(a,this.ae)};g.Ld=function(a){this.Sa(a,this.$d)};g.Qc=function(a,b,c){b?(Rb(a,T.Rc,"true"),c&&Rb(a,T.Sc,c)):(Tb(a,T.Rc),Tb(a,T.Sc));ld(a)};g.Pc=function(a,b){var c;c=Nb(a);Ua(c,Ob.de,b);a.setAttribute("aria-busy",b?"true":"false");a.disabled=b};
function ld(a){var b=K(a,T.Xd),c=!!K(a,"is-subscribed"),b="-"+b,d=Ob.Td+b;Ua(a,Ob.Sd+b,!c);Ua(a,d,c);K(a,T.Vd)&&!K(a,T.Ud)&&(b=S(cd.getInstance()),Ua(a,b,!c),a.title=c?"":K(a,T.Wd));c?M(function(){Ra(a,Ob.Hc)},1E3):Sa(a,Ob.Hc)}g.ae=function(a){var b=!!K(a,T.Lc),c=!!K(a,T.Kc),d=!!K(a,T.Mc);!K(a,"ypc-enabled")&&(b&&c&&d)&&(Ra(a,"ypc-enabled"),Rb(a,T.Zd,"true"))};g.$d=function(a){K(a,"ypc-enabled")&&(Sa(a,"ypc-enabled"),Tb(a,"ypc-enabled"))};
function md(a,b){var c=Ib(S(a));return ya(c,function(a){return b==K(a,"channel-external-id")},a)}g.fe=function(a,b,c){var d=Ma(arguments,2);A(a,function(a){b.apply(this,Ia(a,d))},this)};g.Sa=function(a,b,c){var d=md(this,a),d=Ia([d],Ma(arguments,1));this.fe.apply(this,d)};function kd(a,b){var c=v(function(a){a.subscription_ajax&&ec("subscription_ajax",a.subscription_ajax);this.Ec(b)},a);Dc(c,"sub_button")};function nd(a){a=a||{};this.url=a.url||"";this.urlV8=a.url_v8||"";this.urlV9As2=a.url_v9as2||"";this.args=a.args||bb(od);this.assets=a.assets||{};this.attrs=a.attrs||bb(pd);this.params=a.params||bb(qd);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 od={enablejsapi:1},pd={},qd={allowscriptaccess:"always",allowfullscreen:"true",bgcolor:"#000000"};
function rd(a){a instanceof nd||(a=new nd(a));return a}nd.prototype.B=function(){var a=new nd,b;for(b in this){var c=this[b];"object"==da(c)?a[b]=bb(c):a[b]=c}return a};var sd="StopIteration"in m?m.StopIteration:Error("StopIteration");function td(){}td.prototype.b=function(){throw sd;};td.prototype.Qa=function(){return this};function ud(a){if(a instanceof td)return a;if("function"==typeof a.Qa)return a.Qa(!1);if(ea(a)){var b=0,c=new td;c.b=function(){for(;;){if(b>=a.length)throw sd;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");}
function vd(a,b){if(ea(a))try{A(a,b,void 0)}catch(c){if(c!==sd)throw c;}else{a=ud(a);try{for(;;)b.call(void 0,a.b(),void 0,a)}catch(d){if(d!==sd)throw d;}}}function wd(a){if(ea(a))return Ja(a);a=ud(a);var b=[];vd(a,function(a){b.push(a)});return b};function xd(){};function yd(){}y(yd,xd);yd.prototype.clear=function(){var a=wd(this.Qa(!0)),b=this;A(a,function(a){b.remove(a)})};function zd(a){this.b=a}y(zd,yd);g=zd.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.Qa=function(a){var b=0,c=this.b,d=new td;d.b=function(){if(b>=c.length)throw sd;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 Ad(){var a=null;try{a=window.localStorage||null}catch(b){}this.b=a}y(Ad,zd);function Bd(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 Cd(a){return eval("("+a+")")}function U(a){return Dd(new Ed(void 0),a)}function Ed(a){this.b=a}
function Dd(a,b){var c=[];Fd(a,b,c);return c.join("")}
function Fd(a,b,c){switch(typeof b){case "string":Gd(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],Fd(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),Gd(f,c),c.push(":"),
Fd(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 Hd={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Id=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
function Gd(a,b){b.push('"',a.replace(Id,function(a){if(a in Hd)return Hd[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Hd[a]=e+b.toString(16)}),'"')};function Jd(a){this.Pa=a;this.Oc=new Ed}g=Jd.prototype;g.Pa=null;g.Oc=null;g.set=function(a,b){s(b)?this.Pa.set(a,Dd(this.Oc,b)):this.Pa.remove(a)};g.get=function(a){var b;try{b=this.Pa.get(a)}catch(c){return}if(null!==b)try{return Bd(b)}catch(d){throw"Storage: Invalid value was encountered";}};g.remove=function(a){this.Pa.remove(a)};function Kd(){var a=null;try{a=window.sessionStorage||null}catch(b){}this.b=a}y(Kd,zd);function Ld(a){Jd.call(this,a)}y(Ld,Jd);function Md(a){this.data=a}function Nd(a){return!s(a)||a instanceof Md?a:new Md(a)}Ld.prototype.set=function(a,b){Ld.R.set.call(this,a,Nd(b))};Ld.prototype.b=function(a){a=Ld.R.get.call(this,a);if(!s(a)||a instanceof Object)return a;throw"Storage: Invalid value was encountered";};Ld.prototype.get=function(a){if(a=this.b(a)){if(a=a.data,!s(a))throw"Storage: Invalid value was encountered";}else a=void 0;return a};function Od(a){Jd.call(this,a)}y(Od,Ld);function Pd(a){var b=a.creation;a=a.expiration;return!!a&&a<w()||!!b&&b>w()}Od.prototype.set=function(a,b,c){if(b=Nd(b)){if(c){if(c<w()){Od.prototype.remove.call(this,a);return}b.expiration=c}b.creation=w()}Od.R.set.call(this,a,b)};Od.prototype.b=function(a,b){var c=Od.R.b.call(this,a);if(c)if(!b&&Pd(c))Od.prototype.remove.call(this,a);else return c};function Qd(a){Jd.call(this,a)}y(Qd,Od);function Rd(){var a=Sd,b=[];vd(a.Pa.Qa(!0),function(c){var d;try{d=Qd.prototype.b.call(a,c,!0)}catch(e){if("Storage: Invalid value was encountered"==e)return;throw e;}Pd(d)&&b.push(c)});A(b,function(b){Qd.prototype.remove.call(a,b)})};function Td(a,b,c){var d=c&&0<c?c:0;c=d?w()+1E3*d:0;if(d=d?Sd:Ud){u(b)||(b=JSON.stringify(b,void 0));try{d.set(a,b,c)}catch(e){d.remove(a)}}}function Vd(a){if(!Ud&&!Sd)return null;var b;try{b=Ud.get(a),b=u(b)?b:Sd.get(a)}catch(c){return null}if(!u(b))return null;try{b=JSON.parse(b,void 0)}catch(d){}return b}var Sd,Wd=new Ad;Sd=Wd.isAvailable()?new Qd(Wd):null;var Ud,Xd=new Kd;Ud=Xd.isAvailable()?new Qd(Xd):null;function Yd(){var a={volume:100,muted:!1,nonNormalized:100},b=Vd("yt-player-volume");if(!b){var c=new Ad;c.isAvailable()&&(b=(new Jd(c)).get("yt-player-volume"))}b=b||{};a.volume=isNaN(b.volume)?100:Math.min(Math.max(b.volume,0),100);a.nonNormalized=isNaN(b.nonNormalized)?a.volume:b.nonNormalized;a.muted=void 0==b.muted?!1:b.muted;return a};function Zd(){this.b=w()}var $d=new Zd;Zd.prototype.set=function(a){this.b=a};Zd.prototype.get=function(){return this.b};function ae(a){this.h=a||"";this.i=$d}ae.prototype.g=!0;ae.prototype.b=!1;function be(a){return 10>a?"0"+a:String(a)}function ce(a,b){var c=(a.i-b)/1E3,d=c.toFixed(3),e=0;if(1>c)e=2;else for(;100>c;)e++,c*=10;for(;0<e--;)d=" "+d;return d}function de(a){ae.call(this,a)}y(de,ae);
function ee(a,b){var c=[];c.push(a.h," ");if(a.g){var d=new Date(b.i);c.push("[",be(d.getFullYear()-2E3)+be(d.getMonth()+1)+be(d.getDate())+" "+be(d.getHours())+":"+be(d.getMinutes())+":"+be(d.getSeconds())+"."+be(Math.floor(d.getMilliseconds()/10)),"] ")}c.push("[",ce(b,a.i.get()),"s] ");c.push("[",b.h,"] ");c.push(b.getMessage(),"\n");a.b&&b.g&&c.push(b.b,"\n");return c.join("")};function fe(a,b){this.g={};this.b=[];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 fe?(c=a.la(),d=a.$()):(c=Ya(a),d=Xa(a));for(var e=0;e<c.length;e++)this.set(c[e],d[e])}}g=fe.prototype;g.u=0;g.bb=0;g.$=function(){ge(this);for(var a=[],b=0;b<this.b.length;b++)a.push(this.g[this.b[b]]);return a};g.la=function(){ge(this);return this.b.concat()};
g.clear=function(){this.g={};this.bb=this.u=this.b.length=0};g.remove=function(a){return he(this.g,a)?(delete this.g[a],this.u--,this.bb++,this.b.length>2*this.u&&ge(this),!0):!1};function ge(a){if(a.u!=a.b.length){for(var b=0,c=0;b<a.b.length;){var d=a.b[b];he(a.g,d)&&(a.b[c++]=d);b++}a.b.length=c}if(a.u!=a.b.length){for(var e={},c=b=0;b<a.b.length;)d=a.b[b],he(e,d)||(a.b[c++]=d,e[d]=1),b++;a.b.length=c}}g.get=function(a,b){return he(this.g,a)?this.g[a]:b};
g.set=function(a,b){he(this.g,a)||(this.u++,this.b.push(a),this.bb++);this.g[a]=b};g.B=function(){return new fe(this)};g.Qa=function(a){ge(this);var b=0,c=this.b,d=this.g,e=this.bb,f=this,h=new td;h.b=function(){for(;;){if(e!=f.bb)throw Error("The map has changed since the iterator was created");if(b>=c.length)throw sd;var h=c[b++];return a?h:d[h]}};return h};function he(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function ie(a){if("function"==typeof a.$)return a.$();if(u(a))return a.split("");if(ea(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return Xa(a)}function je(a,b,c){if("function"==typeof a.forEach)a.forEach(b,c);else if(ea(a)||u(a))A(a,b,c);else{var d;if("function"==typeof a.la)d=a.la();else if("function"!=typeof a.$)if(ea(a)||u(a)){d=[];for(var e=a.length,f=0;f<e;f++)d.push(f)}else d=Ya(a);else d=void 0;for(var e=ie(a),f=e.length,h=0;h<f;h++)b.call(c,e[h],d&&d[h],a)}};function ke(a){return le(a||arguments.callee.caller,[])}
function le(a,b){var c=[];if(C(b,a))c.push("[...circular reference...]");else if(a&&50>b.length){c.push(me(a)+"(");for(var d=a.arguments,e=0;e<d.length;e++){0<e&&c.push(", ");var f;f=d[e];switch(typeof f){case "object":f=f?"object":"null";break;case "string":break;case "number":f=String(f);break;case "boolean":f=f?"true":"false";break;case "function":f=(f=me(f))?f:"[fn]";break;default:f=typeof f}40<f.length&&(f=f.substr(0,40)+"...");c.push(f)}b.push(a);c.push(")\n");try{c.push(le(a.caller,b))}catch(h){c.push("[exception trying to get caller]\n")}}else a?
c.push("[...long stack...]"):c.push("[end]");return c.join("")}function me(a){if(ne[a])return ne[a];a=String(a);if(!ne[a]){var b=/function ([^\(]+)/.exec(a);ne[a]=b?b[1]:"[Anonymous]"}return ne[a]}var ne={};function oe(a,b,c,d,e){"number"==typeof e||pe++;this.i=d||w();this.p=a;this.k=b;this.h=c;delete this.g;delete this.b}oe.prototype.g=null;oe.prototype.b=null;var pe=0;oe.prototype.getMessage=function(){return this.k};function V(a){this.g=a}V.prototype.b=null;function qe(a,b){this.name=a;this.value=b}qe.prototype.toString=function(){return this.name};var re=new qe("SHOUT",1200),se=new qe("SEVERE",1E3),te=new qe("WARNING",900),ue=new qe("INFO",800);g=V.prototype;g.od=function(){};g.qd=function(){return!1};g.getChildren=function(){this.b||(this.b={});return this.b};g.log=function(){};
g.pd=function(a,b,c){var d=new oe(a,String(b),this.g);if(c){d.g=c;var e;var f=arguments.callee.caller;try{var h;var k=n("window.location.href");if(u(c))h={message:c,name:"Unknown error",lineNumber:"Not available",fileName:k,stack:"Not available"};else{var l,p,r=!1;try{l=c.lineNumber||c.ie||"Not available"}catch(F){l="Not available",r=!0}try{p=c.fileName||c.filename||c.sourceURL||m.$googDebugFname||k}catch(q){p="Not available",r=!0}h=!r&&c.lineNumber&&c.fileName&&c.stack?c:{message:c.message,name:c.name,
lineNumber:l,fileName:p,stack:c.stack||"Not available"}}e="Message: "+oa(h.message)+'\nUrl: <a href="view-source:'+h.fileName+'" target="_new">'+h.fileName+"</a>\nLine: "+h.lineNumber+"\n\nBrowser stack:\n"+oa(h.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+oa(ke(f)+"-> ")}catch(Z){e="Exception trying to expose exception! You win, we lose. "+Z}d.b=e}return d};g.info=function(){};function ve(){}var we={},xe=null;function ye(){xe||(xe=new V(""),we[""]=xe)}
function ze(a){ye();var b;if(!(b=we[a])){b=new V(a);var c=a.lastIndexOf("."),d=a.substr(c+1);ze(a.substr(0,c)).getChildren()[d]=b;we[a]=b}return b};function Ae(){v(this.i,this);this.b=new de;this.b.g=!1;this.g=this.b.b=!1;this.h="";this.p={}}function Be(){var a=Ce;!0!=a.g&&(ye(),a.g=!0)}Ae.prototype.i=function(a){if(!this.p[a.h]){var b=ee(this.b,a),c=De;if(c)switch(a.p){case re:Ee(c,"info",b);break;case se:Ee(c,"error",b);break;case te:Ee(c,"warn",b);break;default:Ee(c,"debug",b)}else window.opera?window.opera.postError(b):this.h+=b}};var Ce=null,De=window.console;function Ee(a,b,c){if(a[b])a[b](c);else a.log(c)};function Fe(a){this.b=a}var Ge=/\s*;\s*/;g=Fe.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+'"');s(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(Ge),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=s(this.get(a));this.set(a,"",0,b,c);return d};g.la=function(){return He(this).keys};g.$=function(){return He(this).Jd};g.clear=function(){for(var a=He(this).keys,b=a.length-1;0<=b;b--)this.remove(a[b])};
function He(a){a=(a.b.cookie||"").split(Ge);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,Jd:c}}var Ie=new Fe(document);Ie.g=3950;function Je(a,b,c){Ie.set(""+a,b,c,"/","youtube.com")}function Ke(a,b){return Ie.get(""+a,b)}function Le(a){Ie.remove(""+a,"/","youtube.com")};function Me(){var a=Ke("PREF");if(a)for(var a=unescape(a).split("&"),b=0;b<a.length;b++){var c=a[b].split("="),d=c[0];(c=c[1])&&(Ne[d]=c.toString())}}ca(Me);var Ne=n("yt.prefs.UserPrefs.prefs_")||{};x("yt.prefs.UserPrefs.prefs_",Ne);function Oe(a){if(/^f([1-9][0-9]*)$/.test(a))throw"ExpectedRegexMatch: "+a;}function Pe(a){if(!/^\w+$/.test(a))throw"ExpectedRegexMismatch: "+a;}Me.prototype.get=function(a,b){Pe(a);Oe(a);var c=void 0!==Ne[a]?Ne[a].toString():null;return null!=c?c:b?b:""};
Me.prototype.set=function(a,b){Pe(a);Oe(a);if(null==b)throw"ExpectedNotNull";Ne[a]=b.toString()};Me.prototype.remove=function(a){Pe(a);Oe(a);delete Ne[a]};Me.prototype.clear=function(){Ne={}};var Qe={$f:0,Ke:1,Ee:2,Bf:3,Le:4,Cg:5,Eg:6,Bg:7,zg:8,Ag:9,Dg:10,yg:11,gg:12,fg:13,eg:14,jf:15,Of:16,Rf:17,Sf:18,Qf:19,Pf:20,hg:21,Pe:22,xg:23,Oe:24,pe:25,Qe:26,gf:27,cg:28,Ne:29,bg:30,og:31,ng:32,df:33,lg:34,ig:35,jg:36,kg:37,mg:38,Cf:39,Vf:40,qe:41,Uf:42,se:43,De:44,Te:45,Lf:46,qg:47,Fg:48,Gg:49,Ig:50,dg:51,Ce:52,Ge:53,Mf:54,xf:55,Re:56,ag:57,Yf:58,ff:59,If:60,yf:61,Df:62,re:63,ug:64,we:65,ue:66,Ef:67,Je:68,Ye:69,rf:70,Jf:71,hf:72,Zf:73,Ff:74,rg:75,te:76,Tf:77,Ze:78,sg:79,zf:80,Fe:81,Hf:82,sf:83,
uf:84,tf:85,vf:86,wf:87,xe:88,oe:89,ye:90,Nf:91,Kf:92,Ie:93,Hg:94,cf:95,bf:96,ef:97,Af:98,Ue:99,Gf:100,lf:101,kf:102,nf:103,of:104,mf:105,tg:106,ee:107,$e:108,Xf:109,af:110,pf:111,qf:112,Wf:113,Me:114,wg:115,vg:116,pg:117,He:118,Se:119,Ve:120,Xe:121,ve:122,Ae:123,We:124,Be:125,ze:126};function Re(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=na(e[0]||""),e=na(e[1]||"");f in b?t(b[f])?Ka(b[f],e):b[f]=[b[f],e]:b[f]=e}}return b}function Se(a){a=Bc([],a);a[0]="";return a.join("")}var Te=xc;function Ue(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=Re(d[1]||""),e;for(e in b)d[e]=b[e];return yc(Bc([a],d))+c}
function Ve(a){a=Te(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 We(){this.b=[];Xe(this)}ca(We);g=We.prototype;g.Q=0;g.Ba=0;g.jb=0;g.Wb="";g.pa=0;g.load=function(a){3<=this.pa?a(this):this.b.push(a)};g.getVersion=function(){return[this.Q,this.Ba,this.jb]};function Ye(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.Q>b[0]||a.Q==b[0]&&a.Ba>b[1]||a.Q==b[0]&&a.Ba==b[1]&&a.jb>=b[2]}
function Ze(a){return-1<a.Wb.indexOf("Gnash")&&-1==a.Wb.indexOf("AVM2")||9==a.Q&&1==a.Ba||9==a.Q&&0==a.Ba&&1==a.jb?!1:9<=a.Q}function $e(a){return-1<navigator.userAgent.indexOf("Sony/COM2")&&!Ye(a,9,1,58)?!1:!0}
function Xe(a){if(3>a.pa)if(1>a.pa){var b=n("window.navigator.plugins"),c=n("window.navigator.mimeTypes"),b=b&&b["Shockwave Flash"],c=c&&c["application/x-shockwave-flash"],c=b&&c&&c.enabledPlugin&&b.description||"";if(b=c){var d=b.indexOf("Shockwave Flash");0<=d&&(b=b.substr(d+15));for(var d=b.split(" "),e="",b="",f=0,h=d.length;f<h;f++)if(e)if(b)break;else b=d[f];else e=d[f];e=e.split(".");d=parseInt(e[0],10)||0;e=parseInt(e[1],10)||0;f=0;if("r"==b.charAt(0)||"d"==b.charAt(0))f=parseInt(b.substr(1),
10)||0;b=[d,e,f]}else b=[0,0,0];a.Wb=c;c=b;a.Q=c[0];a.Ba=c[1];a.jb=c[2];a.pa=1;0<a.Q?af(a):Xe(a)}else 2>a.pa?bf(a):af(a)}g.Uc=function(a){a?(a=a.split(" ")[1].split(","),a=[parseInt(a[0],10)||0,parseInt(a[1],10)||0,parseInt(a[2],10)||0]):a=[0,0,0];this.Q=a[0];this.Ba=a[1];this.jb=a[2];this.pa=2;0<this.Q?af(this):Xe(this)};function af(a){if(3>a.pa){a.pa=3;for(var b=0,c=a.b.length;b<c;b++)a.b[b](a);a.b=[]}}
function bf(a){function b(){if(c&&"GetVariable"in c)try{d=c.GetVariable("$version")}catch(a){d=""}d||10<=l?(e&&f&&e.removeChild(f),k(d||"")):(l++,M(b,10))}var c,d,e,f;if(jc){try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(h){c=null}c||a.Uc("")}else e=document.getElementsByTagName("body")[0],f=document.createElement("object"),f.setAttribute("type","application/x-shockwave-flash"),c=e.appendChild(f);var k=v(a.Uc,a),l=0;M(b,0)};function cf(a,b,c){if((a=J(a))&&b&&c){c=rd(c);var d=bb(c.attrs);d.tabindex=0;var e=bb(c.params);e.flashvars=Se(c.args);if(jc){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");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 df(a,b){a=J(a);b=rd(b);if(window!=window.top){var c=null;document.referrer&&(c=document.referrer.substring(0,128));b.args.framer=c}ef(function(c){Ye(c,b.minVersion)||L("IS_OPERA_MINI")?(c=Ze(c)&&b.url||$e(c)&&b.urlV9As2||b.urlV8||b.url,cf(a,c,b)):ff(a,b,c)})}
function gf(a,b,c){if(a&&a.attrs&&a.attrs.id){a=rd(a);var d=!!b,e=J(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);Ve(k)||(h=k)}else h="unknown";h&&(d=!0,a.args.framer=h)}ef(function(b){if(Ye(b,a.minVersion)||L("IS_OPERA_MINI")){var h=Ze(b)&&a.url||$e(b)&&a.urlV9As2||a.urlV8||a.url,k="";-1<navigator.userAgent.indexOf("Sony/COM2")||(k=e.getAttribute("src")||e.movie);(k!=h||d)&&cf(f,h,a);(jb?Ye(b,11,2):ib?Ye(b,
11,3):Ze(b))||(b=J("flash10-promo-div"),Me.getInstance(),h=Qe.ee,k=void 0!==Ne["f"+(Math.floor(h/31)+1)]?Ne["f"+(Math.floor(h/31)+1)].toString():null,h=!!(((null!=k&&/^[A-Fa-f0-9]+$/.test(k)?parseInt(k,16):null)||0)&1<<h%31),b&&!h&&Uc(b))}else ff(f,a,b);c&&c()})}else M(function(){gf(a,b,c)},50)}}
function ff(a,b,c){0==c.Q&&b.fallback?b.fallback():0==c.Q&&b.fallbackMessage?b.fallbackMessage():a.innerHTML='<div id="flash-upgrade">'+ic("FLASH_UPGRADE",void 0,'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 ef(a){We.getInstance().load(function(b){Me.getInstance().set("fv",b.getVersion().join("."));var c=[],d;for(d in Ne)c.push(d+"="+escape(Ne[d]));Je("PREF",c.join("&"),31536E4);a(b)})};function hf(a){return a.dataset?a.dataset.loaded:a.getAttribute("data-"+jf())};function kf(a){if(document.querySelectorAll)return document.querySelectorAll(a);if(lf){var b=document.createElement("style"),c=document.getElementsByTagName("head")[0];c.appendChild(b);window.__qsa=[];b.styleSheet.cssText=a+"{x:expression(__qsa.push(this))}";document.body.style.cssText+="";document.body.style.zoom=1;c.removeChild(b);return window.__qsa.slice(0)}return[]}var lf="Microsoft Internet Explorer"==navigator.appName;function mf(a,b){a in nf||(nf[a]=[]);nf[a].push([b,void 0])}function of(a,b){if(a in nf)for(var c=nf[a],d=Array.prototype.slice.call(arguments,1),e=0,f=c.length;e<f;e++)c[e]&&c[e][0].apply(c[e][1],d)}function pf(a){a?a in nf&&delete nf[a]:nf={}}var nf={};function qf(a){for(var b=0,c=0,d=a.length;c<d;++c)b=31*b+a.charCodeAt(c),b%=4294967296;return b}function jf(){return"loaded".replace(/([A-Z])/g,"-$1").toLowerCase()};function rf(a,b,c){var d="js-"+qf(a);c=c||"";var e=document.getElementById(d),f=e&&hf(e),e=e&&!f;if(f)b&&b();else if(b&&mf(d,b),!e)var h=c?kf("script."+c):[],k=sf(a,d,c,function(){if(!hf(k)){var a=k;a.dataset?a.dataset.loaded="true":a.setAttribute("data-"+jf(),"true");for(a=0;a<h.length;a++)pf(h[a].id),h[a].parentNode.removeChild(h[a]);of(d);pf(d)}})}
function sf(a,b,c,d){var e=document.createElement("script");e.id=b;e.className=c;e.onload=function(){setTimeout(d,0)};e.onreadystatechange=function(){switch(e.readyState){case "loaded":case "complete":e.onload()}};e.src=a;a=document.getElementsByTagName("head")[0]||document.body;a.insertBefore(e,a.firstChild);return e};var tf=/[^a-zA-Z0-9_-]/g;var uf;var vf=kb(),vf=vf.toLowerCase();if(-1!=vf.indexOf("android")){var wf=vf.match(/android\D*(\d\.\d)[^\;|\)]*[\;\)]/);if(wf)uf=Number(wf[1]);else{var xf={cupcake:1.5,donut:1.6,eclair:2,froyo:2.2,gingerbread:2.3,honeycomb:3,"ice cream sandwich":4,jellybean:4.1},yf=vf.match("("+Ya(xf).join("|")+")");uf=yf?xf[yf[0]]:0}}else uf=void 0;function zf(){if(2.2==uf)return!0;var a;a=n("yt.player.utils.videoElement_");a||(a=document.createElement("video"),x("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}};function Af(a,b){var c;if(a instanceof Af)this.Aa=s(b)?b:a.Aa,Bf(this,a.Oa),this.Db=a.Db,Cf(this,a.Na),Df(this,a.gb),this.hb=a.hb,Ef(this,a.b.B()),this.Cb=a.Cb;else if(a&&(c=vc(String(a)))){this.Aa=!!b;Bf(this,c[1]||"",!0);var d=c[2]||"";this.Db=d?decodeURIComponent(d):"";Cf(this,c[3]||"",!0);Df(this,c[4]);this.hb=(d=c[5]||"")?decodeURIComponent(d):"";Ef(this,c[6]||"",!0);this.Cb=(c=c[7]||"")?decodeURIComponent(c):""}else this.Aa=!!b,this.b=new Ff(null,0,this.Aa)}g=Af.prototype;g.Oa="";g.Db="";
g.Na="";g.gb=null;g.hb="";g.Cb="";g.Aa=!1;g.toString=function(){var a=[],b=this.Oa;b&&a.push(Gf(b,Hf),":");if(b=this.Na){a.push("//");var c=this.Db;c&&a.push(Gf(c,Hf),"@");a.push(encodeURIComponent(String(b)));b=this.gb;null!=b&&a.push(":",String(b))}if(b=this.hb)this.Na&&"/"!=b.charAt(0)&&a.push("/"),a.push(Gf(b,"/"==b.charAt(0)?If:Jf));(b=this.b.toString())&&a.push("?",b);(b=this.Cb)&&a.push("#",Gf(b,Kf));return a.join("")};g.B=function(){return new Af(this)};
function Bf(a,b,c){a.Oa=c?b?decodeURIComponent(b):"":b;a.Oa&&(a.Oa=a.Oa.replace(/:$/,""))}function Cf(a,b,c){a.Na=c?b?decodeURIComponent(b):"":b}function Df(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.gb=b}else a.gb=null}function Ef(a,b,c){b instanceof Ff?(a.b=b,Lf(a.b,a.Aa)):(c||(b=Gf(b,Mf)),a.b=new Ff(b,0,a.Aa))}function W(a,b,c){a.b.set(b,c)}function Nf(a,b,c){t(c)||(c=[String(c)]);Of(a.b,b,c)}
function Pf(a){W(a,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^w()).toString(36));return a}function Qf(a,b,c,d){var e=new Af(null,void 0);a&&Bf(e,a);b&&Cf(e,b);c&&Df(e,c);d&&(e.hb=d);return e}function Gf(a,b){return u(a)?encodeURI(a).replace(b,Rf):null}function Rf(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Hf=/[#\/\?@]/g,Jf=/[\#\?:]/g,If=/[\#\?]/g,Mf=/[\#\?@]/g,Kf=/#/g;
function Ff(a,b,c){this.b=a||null;this.g=!!c}function Sf(a){if(!a.D&&(a.D=new fe,a.u=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=na(e);e=Tf(a,e);d=a;f=f?na(f):"";Sf(d);d.b=null;var e=Tf(d,e),h=d.D.get(e);h||d.D.set(e,h=[]);h.push(f);d.u++}}g=Ff.prototype;g.D=null;g.u=null;
g.remove=function(a){Sf(this);a=Tf(this,a);return he(this.D.g,a)?(this.b=null,this.u-=this.D.get(a).length,this.D.remove(a)):!1};g.clear=function(){this.D=this.b=null;this.u=0};function Uf(a,b){Sf(a);b=Tf(a,b);return he(a.D.g,b)}g.la=function(){Sf(this);for(var a=this.D.$(),b=this.D.la(),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.$=function(a){Sf(this);var b=[];if(a)Uf(this,a)&&(b=Ia(b,this.D.get(Tf(this,a))));else{a=this.D.$();for(var c=0;c<a.length;c++)b=Ia(b,a[c])}return b};g.set=function(a,b){Sf(this);this.b=null;a=Tf(this,a);Uf(this,a)&&(this.u-=this.D.get(a).length);this.D.set(a,[b]);this.u++;return this};g.get=function(a,b){var c=a?this.$(a):[];return 0<c.length?String(c[0]):b};function Of(a,b,c){a.remove(b);0<c.length&&(a.b=null,a.D.set(Tf(a,b),Ja(c)),a.u+=c.length)}
g.toString=function(){if(this.b)return this.b;if(!this.D)return"";for(var a=[],b=this.D.la(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.$(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.B=function(){var a=new Ff;a.b=this.b;this.D&&(a.D=this.D.B(),a.u=this.u);return a};function Tf(a,b){var c=String(b);a.g&&(c=c.toLowerCase());return c}
function Lf(a,b){b&&!a.g&&(Sf(a),a.b=null,je(a.D,function(a,b){var e=b.toLowerCase();b!=e&&(this.remove(b),Of(this,e,a))},a));a.g=b};var Vf="corp.google.com youtube.com youtube-nocookie.com prod.google.com sandbox.google.com docs.google.com drive.google.com play.google.com".split(" ");function Wf(a){a&&(this.name=a.name,this.ba=a.screenId,this.Y=a.loungeToken,this.M=a.dialId||"")}g=Wf.prototype;g.name="";g.ba="";g.Y="";g.M="";g.Tc=function(){return{key:this.ba,name:this.name}};function Xf(a){return{name:a.name,screenId:a.ba,loungeToken:a.Y,dialId:a.M}}function Yf(a){return U(a?Xf(a):null)}function Zf(a){a=a||[];a=za(a,function(a){return Yf(a)});return U(a)};function $f(a){a&&(this.id=a.id||"",this.name=a.name||"",this.activityId=a.activityId||"",this.status=a.status||"UNKNOWN")}g=$f.prototype;g.id="";g.name="";g.activityId="";g.status="UNKNOWN";g.Tc=function(){return{key:this.id,name:this.name}};function ag(a){return{id:a.id,name:a.name,activityId:a.activityId,status:a.status}}function bg(a){a=a||[];a=za(a,function(a){return U(a?ag(a):null)});return U(a)};function cg(){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 dg(a,b){return B(a,function(a){return a.key==b})}function eg(a){return za(a,function(a){return a.Tc()})}function fg(a){return za(a,function(a){return ag(a)})}function gg(a){return za(a,function(a){return new $f(a)})}function hg(a,b){return a||b?a&&b?a.id==b.id&&a.name==b.name:!1:!0}function ig(a,b){return B(a,function(a){return a.id==b})}
function jg(a){return za(a,function(a){return Xf(a)})}function kg(a){return za(a,function(a){return new Wf(a)})}function lg(a,b){return a||b?a&&b?a.ba==b.ba:!1:!0}function mg(a,b){return a||b?a&&b?a.ba==b.ba&&a.Y==b.Y&&a.name==b.name&&a.M==b.M:!1:!0}function ng(a,b){return B(a,function(a){return lg(a,b)})}function og(a,b){return B(a,function(a){return b==a.ba||b==a.M})};function pg(){var a=Ke("remote_sid")||Vd("yt-remote-session-id");a||(a=cg());Td("yt-remote-session-id",a);return a}function qg(a){Je("remote_sid",pg());Td("yt-remote-session-screen-"+pg(),a,600)}function rg(){return Vd("yt-remote-session-screen-"+pg())}function sg(){var a="yt-remote-session-screen-"+pg();Ud&&Ud.remove(a);Sd&&Sd.remove(a);Le("remote_sid")}function tg(){return Vd("yt-remote-online-screens")||[]}function ug(a){Td("yt-remote-online-dial-devices",a,30)}
function vg(){return Vd("yt-remote-online-dial-devices")||[]};function wg(){return kg(Vd("yt-remote-app-screens")||[])}function xg(){var a=kg(tg()),b=gg(vg()),b=ya(b,function(b){return!og(a,b.id)});return eg(Ia(a,b))};function yg(){this.C=new O;pc(this,ma(qc,this.C))}y(yg,oc);yg.prototype.I=function(a,b,c){return this.p?0:this.C.I(a,b,c)};yg.prototype.xa=function(a,b,c){return this.p?!1:this.C.xa(a,b,c)};yg.prototype.na=function(a){return this.p?!1:this.C.na(a)};yg.prototype.w=function(a,b){return this.p?!1:this.C.w.apply(this.C,arguments)};var zg=null,Ag=null;function Bg(a,b){var c=n("yt.remote.debug.logger_");if(c){c.log(ue,a+": "+b,void 0);var d=n("yt.remote.debug.handlers_");if(d&&!Ca(d)){var e=c.getLogRecord(ue,a+": "+b,void 0);A(d,function(a){a(e)})}}};function Cg(a){a&&(this.id=a.id||a.name,this.name=a.name,this.app=a.app,this.type=a.type||"REMOTE_CONTROL",this.wc=a.user||"")}g=Cg.prototype;g.id="";g.name="";g.app="";g.type="REMOTE_CONTROL";g.wc="";function Dg(a){Bg("DIAL",a)}function Eg(a){var b=Fg();a=ee(Gg,a);b.logMessage(a)}
function Hg(){if(!Ig){Ca(Ea)&&Ka(Ea,vg());var a;"cast"in window?(a=window.cast||{},a="ActivityStatus"in a&&"Api"in a&&"IApi"in a&&"LaunchRequest"in a&&"Receiver"in a):a=!1;a&&((a=Fg())?(a.removeReceiverListener("YouTube",Jg),a.addReceiverListener("YouTube",Jg),Dg("API initialized in the other binary")):(a=new cast.Api,x("yt.remote.dialapi.api_",a),a.addReceiverListener("YouTube",Jg),Gg=new de,Gg.g=!1,Gg.b=!1,a.logMessage&&(n("yt.remote.debug.logger_")||(Ce||(Ce=new Ae),-1!=window.location.href.indexOf("Debug=true")&&
Be(),Be(),Ce.b.b=!0,zg=n("yt.remote.debug.logger_")||ze("yt.remote"),V.prototype.log=V.prototype.log,V.prototype.getLogRecord=V.prototype.pd,V.prototype.addHandler=V.prototype.od,V.prototype.removeHandler=V.prototype.qd,x("yt.remote.debug.logger_",zg),Ag=n("yt.remote.debug.handlers_")||[],x("yt.remote.debug.handlers_",Ag),n("yt.remote.debug.logger_")),n("yt.remote.debug.handlers_").push(Eg)),Dg("API initialized")),Ig=!0)}}
function Kg(a){var b=Ba(Ea,function(b){return b.id==a.id});0<=b&&(Ea[b]=ag(a))}function Jg(a){Dg("Updating receivers: "+U(a));Lg(a);Q("yt-remote-dial-device-list-update",Mg());A(Mg(),function(a){Ng(a.id)})}
function Og(a,b){Dg("Updating "+a+" activity status: "+U(b));var c=Pg(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=""),Kg(c),Q("yt-remote-dial-device-status-update",c)):Dg("Device not found")}function Mg(){Hg();return gg(Ea)}
function Lg(a){a=za(a,function(a){var c={id:a.id,name:a.name};if(a=Pg(a.id))c.activityId=a.activityId,c.status=a.status;return c});Da();Ka(Ea,a)}function Pg(a){var b=Mg();return B(b,function(b){return b.id==a})||null}function Ng(a){var b=Pg(a),c=Fg();c&&(b&&b.activityId)&&c.getActivityStatus(b.activityId,function(b){"error"==b.status&&(b.status="stopped");Og(a,b)})}
function Qg(a,b,c,d){Hg();var e=Pg(a),f=Fg();f&&e?(e=new cast.Receiver(e.id,e.name),e=new cast.LaunchRequest("YouTube",e),e.parameters="pairingCode="+b,e.description=new cast.LaunchDescription,e.description.text=document.title,c&&(e.parameters+="&v="+c,d&&(e.parameters+="&t="+Math.round(d)),e.description.url="http://i.ytimg.com/vi/"+c+"/default.jpg"),Dg("Sending a DIAL launch request with params: "+e.parameters),f.launch(e,ma(Og,a))):Dg("No DIAL API or no DIAL device. Dropping DIAL launch.")}
function Rg(a){Hg();var b=Pg(a),c=Fg();c&&b&&b.activityId?(Dg("Stopping DIAL activity"),c.stopActivity(b.activityId,ma(Og,a))):Dg("Dropping DIAL activity stop")}function Fg(){return n("yt.remote.dialapi.api_")}var Gg=null,Ig=!1,Ea=n("yt.remote.dialapi.devices_")||[];x("yt.remote.dialapi.devices_",Ea);function X(a,b){this.type=a;this.currentTarget=this.target=b}X.prototype.dispose=function(){};X.prototype.b=!1;X.prototype.g=!0;X.prototype.preventDefault=function(){this.g=!1};function Sg(a){Sg[" "](a);return a}Sg[" "]=ba;var Tg=!E||Bb(9),Ug=E&&!I("9");!H||I("528");G&&I("1.9b")||E&&I("8")||ob&&I("9.5")||H&&I("528");G&&!I("8")||E&&I("9");function Vg(a,b){a&&this.init(a,b)}y(Vg,X);g=Vg.prototype;g.target=null;g.relatedTarget=null;g.clientX=0;g.clientY=0;g.keyCode=0;g.charCode=0;g.ctrlKey=!1;g.altKey=!1;g.shiftKey=!1;g.ib=null;
g.init=function(a,b){var c=this.type=a.type;X.call(this,c);this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;if(d){if(G){var e;t:{try{Sg(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.ib=a;a.defaultPrevented&&this.preventDefault();delete this.b};g.preventDefault=function(){Vg.R.preventDefault.call(this);var a=this.ib;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Ug)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};g.Gd=function(){return this.ib};var Wg="closure_listenable_"+(1E6*Math.random()|0),Xg=0;function Yg(a,b,c,d,e,f){this.Z=a;this.proxy=b;this.src=c;this.type=d;this.capture=!!e;this.za=f;this.key=++Xg;this.removed=this.Ra=!1};var Zg={},$g={},ah={},bh={};
function ch(a,b,c,d,e){if(t(b)){for(var f=0;f<b.length;f++)ch(a,b[f],c,d,e);return null}c=dh(c);if(a&&a[Wg])a=a.lb(b,c,d,e);else t:{if(!b)throw Error("Invalid event type");d=!!d;var h=$g;b in h||(h[b]={u:0,ia:0});h=h[b];d in h||(h[d]={u:0,ia:0},h.u++);var h=h[d],f=ha(a),k;h.ia++;if(h[f]){k=h[f];for(var l=0;l<k.length;l++)if(h=k[l],h.Z==c&&h.za==e){if(h.removed)break;k[l].Ra=!1;a=k[l];break t}}else k=h[f]=[],h.u++;l=eh();h=new Yg(c,l,a,b,d,e);h.Ra=!1;l.src=a;l.Z=h;k.push(h);ah[f]||(ah[f]=[]);ah[f].push(h);
a.addEventListener?a.addEventListener(b,l,d):a.attachEvent(b in bh?bh[b]:bh[b]="on"+b,l);a=Zg[h.key]=h}return a}function eh(){var a=fh,b=Tg?function(c){return a.call(b.src,b.Z,c)}:function(c){c=a.call(b.src,b.Z,c);if(!c)return c};return b}function gh(a,b,c,d,e){if(t(b))for(var f=0;f<b.length;f++)gh(a,b[f],c,d,e);else if(c=dh(c),a&&a[Wg])a.Ub(b,c,d,e);else if(d=!!d,a=hh(a,b,d))for(f=0;f<a.length;f++)if(a[f].Z==c&&a[f].capture==d&&a[f].za==e){ih(a[f]);break}}
function ih(a){if(fa(a)||!a||a.removed)return!1;var b=a.src;if(b&&b[Wg])return jh(b,a);var c=a.type,d=a.proxy,e=a.capture;b.removeEventListener?b.removeEventListener(c,d,e):b.detachEvent&&b.detachEvent(c in bh?bh[c]:bh[c]="on"+c,d);b=ha(b);ah[b]&&(d=ah[b],Ga(d,a),0==d.length&&delete ah[b]);a.removed=!0;a.Z=null;a.proxy=null;a.src=null;a.za=null;if(d=$g[c][e][b])d.Fc=!0,kh(c,e,b,d);delete Zg[a.key];return!0}
function kh(a,b,c,d){if(!d.Hb&&d.Fc){for(var e=0,f=0;e<d.length;e++)d[e].removed||(e!=f&&(d[f]=d[e]),f++);d.length=f;d.Fc=!1;0==f&&(delete $g[a][b][c],$g[a][b].u--,0==$g[a][b].u&&(delete $g[a][b],$g[a].u--),0==$g[a].u&&delete $g[a])}}function hh(a,b,c){var d=$g;return b in d&&(d=d[b],c in d&&(d=d[c],a=ha(a),d[a]))?d[a]:null}
function lh(a,b,c,d,e){var f=1;b=ha(b);if(a[b]){var h=--a.ia,k=a[b];k.Hb?k.Hb++:k.Hb=1;try{for(var l=k.length,p=0;p<l;p++){var r=k[p];r&&!r.removed&&(f&=!1!==mh(r,e))}}finally{a.ia=Math.max(h,a.ia),k.Hb--,kh(c,d,b,k)}}return Boolean(f)}function mh(a,b){var c=a.Z,d=a.za||a.src;a.Ra&&ih(a);return c.call(d,b)}
function fh(a,b){if(a.removed)return!0;var c=a.type,d=$g;if(!(c in d))return!0;var d=d[c],e,f;if(!Tg){e=b||n("window.event");var h=!0 in d,k=!1 in d;if(h){if(0>e.keyCode||void 0!=e.returnValue)return!0;t:{var l=!1;if(0==e.keyCode)try{e.keyCode=-1;break t}catch(p){l=!0}if(l||void 0==e.returnValue)e.returnValue=!0}}l=new Vg;l.init(e,this);e=!0;try{if(h){for(var r=[],F=l.currentTarget;F;F=F.parentNode)r.push(F);f=d[!0];f.ia=f.u;for(var q=r.length-1;!l.b&&0<=q&&f.ia;q--)l.currentTarget=r[q],e&=lh(f,r[q],
c,!0,l);if(k)for(f=d[!1],f.ia=f.u,q=0;!l.b&&q<r.length&&f.ia;q++)l.currentTarget=r[q],e&=lh(f,r[q],c,!1,l)}else e=mh(a,l)}finally{r&&(r.length=0)}return e}c=new Vg(b,this);return e=mh(a,c)}var nh="__closure_events_fn_"+(1E9*Math.random()>>>0);function dh(a){return ga(a)?a:a[nh]||(a[nh]=function(b){return a.handleEvent(b)})};function oh(){this.g={};this.rd=this}y(oh,oc);oh.prototype[Wg]=!0;g=oh.prototype;g.Tb=null;g.addEventListener=function(a,b,c,d){ch(this,a,b,c,d)};g.removeEventListener=function(a,b,c,d){gh(this,a,b,c,d)};
function Y(a,b){var c,d=a.Tb;if(d){c=[];for(var e=1;d;d=d.Tb)c.push(d),++e}var d=a.rd,e=b,f=e.type||e;if(u(e))e=new X(e,d);else if(e instanceof X)e.target=e.target||d;else{var h=e,e=new X(f,d);db(e,h)}var h=!0,k;if(c)for(var l=c.length-1;!e.b&&0<=l;l--)k=e.currentTarget=c[l],h=ph(k,f,!0,e)&&h;e.b||(k=e.currentTarget=d,h=ph(k,f,!0,e)&&h,e.b||(h=ph(k,f,!1,e)&&h));if(c)for(l=0;!e.b&&l<c.length;l++)k=e.currentTarget=c[l],h=ph(k,f,!1,e)&&h}
g.K=function(){oh.R.K.call(this);var a=0,b;for(b in this.g){for(var c=this.g[b],d=0;d<c.length;d++)++a,delete Zg[c[d].key],c[d].removed=!0;c.length=0}this.Tb=null};g.lb=function(a,b,c,d){var e=this.g[a]||(this.g[a]=[]),f=qh(e,b,c,d);-1<f?(a=e[f],a.Ra=!1):(a=new Yg(b,null,this,a,!!c,d),a.Ra=!1,e.push(a));return a};g.Ub=function(a,b,c,d){if(!(a in this.g))return!1;a=this.g[a];b=qh(a,b,c,d);return-1<b?(c=a[b],delete Zg[c.key],c.removed=!0,1==z.splice.call(a,b,1).length):!1};
function jh(a,b){var c=b.type;if(!(c in a.g))return!1;if(c=Ga(a.g[c],b))delete Zg[b.key],b.removed=!0;return c}function ph(a,b,c,d){if(!(b in a.g))return!0;var e=!0;b=Ja(a.g[b]);for(var f=0;f<b.length;++f){var h=b[f];if(h&&!h.removed&&h.capture==c){var k=h.Z,l=h.za||h.src;h.Ra&&jh(a,h);e=!1!==k.call(l,d)&&e}}return e&&!1!=d.g}function qh(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(f.Z==b&&f.capture==!!c&&f.za==d)return e}return-1};function rh(a,b){this.g=new Ed(a);this.b=b?Cd:Bd}rh.prototype.stringify=function(a){return Dd(this.g,a)};rh.prototype.parse=function(a){return this.b(a)};function sh(a,b){oh.call(this);this.b=a||1;this.h=b||m;this.i=v(this.nd,this);this.k=w()}y(sh,oh);g=sh.prototype;g.Ka=!1;g.S=null;function th(a,b){a.b=b;a.S&&a.Ka?(a.stop(),a.start()):a.S&&a.stop()}g.nd=function(){if(this.Ka){var a=w()-this.k;0<a&&a<0.8*this.b?this.S=this.h.setTimeout(this.i,this.b-a):(this.S&&(this.h.clearTimeout(this.S),this.S=null),Y(this,"tick"),this.Ka&&(this.S=this.h.setTimeout(this.i,this.b),this.k=w()))}};
g.start=function(){this.Ka=!0;this.S||(this.S=this.h.setTimeout(this.i,this.b),this.k=w())};g.stop=function(){this.Ka=!1;this.S&&(this.h.clearTimeout(this.S),this.S=null)};g.K=function(){sh.R.K.call(this);this.stop();delete this.h};function uh(a,b,c){if(ga(a))c&&(a=v(a,c));else if(a&&"function"==typeof a.handleEvent)a=v(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<b?-1:m.setTimeout(a,b||0)};function vh(a,b,c){this.i=a;this.h=b;this.g=c;this.b=v(this.ed,this)}y(vh,oc);g=vh.prototype;g.Eb=!1;g.La=null;g.stop=function(){this.La&&(m.clearTimeout(this.La),this.La=null,this.Eb=!1)};g.K=function(){vh.R.K.call(this);this.stop()};g.ed=function(){this.La=null;this.Eb&&(this.Eb=!1,wh(this))};function wh(a){a.La=uh(a.b,a.h);a.i.call(a.g)};function xh(a){this.g=a;this.b={}}y(xh,oc);var yh=[];g=xh.prototype;g.lb=function(a,b,c,d,e){t(b)||(yh[0]=b,b=yh);for(var f=0;f<b.length;f++){var h=ch(a,b[f],c||this,d||!1,e||this.g||this);this.b[h.key]=h}return this};
g.Ub=function(a,b,c,d,e){if(t(b))for(var f=0;f<b.length;f++)this.Ub(a,b[f],c,d,e);else{t:if(e=e||this.g||this,d=!!d,c=dh(c||this),a&&a[Wg])a=a.g[b],b=-1,a&&(b=qh(a,c,d,e)),e=-1<b?a[b]:null;else{if(a=hh(a,b,d))for(b=0;b<a.length;b++)if(!a[b].removed&&a[b].Z==c&&a[b].capture==d&&a[b].za==e){e=a[b];break t}e=null}e&&(ih(e),delete this.b[e.key])}return this};g.removeAll=function(){Wa(this.b,ih);this.b={}};g.K=function(){xh.R.K.call(this);this.removeAll()};
g.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};function zh(){}zh.prototype.b=null;var Ah;function Bh(){}y(Bh,zh);function Ch(a){return(a=Dh(a))?new ActiveXObject(a):new XMLHttpRequest}function Eh(a){var b={};Dh(a)&&(b[0]=!0,b[1]=!0);return b}
function Dh(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}Ah=new Bh;function Fh(a,b,c,d,e){this.g=a;this.b=b;this.p=c;this.h=d;this.i=e||1;this.q=45E3;this.o=new xh(this);this.k=new sh;th(this.k,250)}g=Fh.prototype;g.qa=null;g.X=!1;g.Ma=null;g.Sb=null;g.Ua=null;g.Ia=null;g.ja=null;g.N=null;g.Fa=null;g.G=null;g.Wa=0;g.U=null;g.Ga=null;g.ta=null;g.Ta=-1;g.bc=!0;g.va=!1;g.Jb=0;g.qb=null;function Gh(a,b){switch(a){case 0:return"Non-200 return code ("+b+")";case 1:return"XMLHTTP failure (no data)";case 2:return"HttpConnection timeout";default:return"Unknown error"}}
var Hh={},Ih={};g=Fh.prototype;g.setTimeout=function(a){this.q=a};function Jh(a,b,c){a.Ia=1;a.ja=Pf(b.B());a.Fa=c;a.C=!0;Kh(a,null)}function Lh(a,b,c,d,e){a.Ia=1;a.ja=Pf(b.B());a.Fa=null;a.C=c;e&&(a.bc=!1);Kh(a,d)}
function Kh(a,b){a.Ua=w();Mh(a);a.N=a.ja.B();Nf(a.N,"t",a.i);a.Wa=0;a.G=a.g.Lb(a.g.ub()?b:null);0<a.Jb&&(a.qb=new vh(v(a.cc,a,a.G),a.Jb));a.o.lb(a.G,"readystatechange",a.ad);var c=a.qa?bb(a.qa):{};a.Fa?(a.Ga="POST",c["Content-Type"]="application/x-www-form-urlencoded",Nh(a.G,a.N,a.Ga,a.Fa,c)):(a.Ga="GET",a.bc&&!H&&(c.Connection="close"),Nh(a.G,a.N,a.Ga,null,c));a.g.T(1);var d=a.Fa;if(d)for(var c="",d=d.split("&"),e=0;e<d.length;e++){var f=d[e].split("=");if(1<f.length)var h=f[0],f=f[1],k=h.split("_"),
c=2<=k.length&&"type"==k[1]?c+(h+"="+f+"&"):c+(h+"=redacted&")}else c=null;a.b.info("XMLHTTP REQ ("+a.h+") [attempt "+a.i+"]: "+a.Ga+"\n"+a.N+"\n"+c)}g.ad=function(a){a=a.target;var b=this.qb;b&&3==Oh(a)?(this.b.info("Throttling readystatechange."),b.La?b.Eb=!0:wh(b)):this.cc(a)};
g.cc=function(a){try{if(a==this.G)t:{var b=Oh(this.G),c=this.G.k,d=Ph(this.G);if(E&&!Bb(10)||H&&!I("420+")){if(4>b)break t}else if(3>b||3==b&&!ob&&!Qh(this.G))break t;this.va||(4!=b||7==c)||(8==c||0>=d?this.g.T(3):this.g.T(2));Rh(this);var e=Ph(this.G);this.Ta=e;var f=Qh(this.G);f||this.b.info("No response text for uri "+this.N+" status "+e);this.X=200==e;this.b.info("XMLHTTP RESP ("+this.h+") [ attempt "+this.i+"]: "+this.Ga+"\n"+this.N+"\n"+b+" "+e);this.X?(4==b&&Sh(this),this.C?(Th(this,b,f),ob&&
3==b&&(this.o.lb(this.k,"tick",this.$c),this.k.start())):(Uh(this.b,this.h,f,null),Vh(this,f)),this.X&&!this.va&&(4==b?this.g.tb(this):(this.X=!1,Mh(this)))):(this.ta=400==e&&0<f.indexOf("Unknown SID")?3:0,$(),Sh(this),Wh(this))}}catch(h){this.b.info("Failed call to OnXmlHttpReadyStateChanged_"),this.G&&Qh(this.G)&&Qh(this.G)}finally{}};
function Th(a,b,c){for(var d=!0;!a.va&&a.Wa<c.length;){var e=Xh(a,c);if(e==Ih){4==b&&(a.ta=4,$(),d=!1);Uh(a.b,a.h,null,"[Incomplete Response]");break}else if(e==Hh){a.ta=4;$();Uh(a.b,a.h,c,"[Invalid Chunk]");d=!1;break}else Uh(a.b,a.h,e,null),Vh(a,e)}4==b&&0==c.length&&(a.ta=1,$(),d=!1);a.X=a.X&&d;d||(Uh(a.b,a.h,c,"[Invalid Chunked Response]"),Sh(a),Wh(a))}g.$c=function(){var a=Oh(this.G),b=Qh(this.G);this.Wa<b.length&&(Rh(this),Th(this,a,b),this.X&&4!=a&&Mh(this))};
function Xh(a,b){var c=a.Wa,d=b.indexOf("\n",c);if(-1==d)return Ih;c=Number(b.substring(c,d));if(isNaN(c))return Hh;d+=1;if(d+c>b.length)return Ih;var e=b.substr(d,c);a.Wa=d+c;return e}
function Yh(a,b){a.Ua=w();Mh(a);var c=b?window.location.hostname:"";a.N=a.ja.B();W(a.N,"DOMAIN",c);W(a.N,"t",a.i);try{a.U=new ActiveXObject("htmlfile")}catch(d){Sh(a);a.ta=7;$();Wh(a);return}var e="<html><body>";b&&(e+='<script>document.domain="'+c+'"\x3c/script>');e+="</body></html>";a.U.open();a.U.write(e);a.U.close();a.U.parentWindow.m=v(a.bd,a);a.U.parentWindow.d=v(a.ic,a,!0);a.U.parentWindow.rpcClose=v(a.ic,a,!1);c=a.U.createElement("div");a.U.parentWindow.document.body.appendChild(c);c.innerHTML=
'<iframe src="'+a.N+'"></iframe>';a.b.info("TRIDENT REQ ("+a.h+") [ attempt "+a.i+"]: GET\n"+a.N);a.g.T(1)}g.bd=function(a){Zh(v(this.he,this,a),0)};g.he=function(a){if(!this.va){var b=this.b;b.info("TRIDENT TEXT ("+this.h+"): "+$h(b,a));Rh(this);Vh(this,a);Mh(this)}};g.ic=function(a){Zh(v(this.ge,this,a),0)};g.ge=function(a){this.va||(this.b.info("TRIDENT TEXT ("+this.h+"): "+a?"success":"failure"),Sh(this),this.X=a,this.g.tb(this),this.g.T(4))};function ai(a){a.va=!0;Sh(a)}
function Mh(a){a.Sb=w()+a.q;bi(a,a.q)}function bi(a,b){if(null!=a.Ma)throw Error("WatchDog timer not null");a.Ma=Zh(v(a.be,a),b)}function Rh(a){a.Ma&&(m.clearTimeout(a.Ma),a.Ma=null)}g.be=function(){this.Ma=null;var a=w();0<=a-this.Sb?(this.b.info("TIMEOUT: "+this.N),2!=this.Ia&&this.g.T(3),Sh(this),this.ta=2,$(),Wh(this)):bi(this,this.Sb-a)};function Wh(a){a.g.zc()||a.va||a.g.tb(a)}
function Sh(a){Rh(a);qc(a.qb);a.qb=null;a.k.stop();a.o.removeAll();if(a.G){var b=a.G;a.G=null;ci(b);b.dispose()}a.U&&(a.U=null)}function Vh(a,b){try{a.g.Ac(a,b),a.g.T(4)}catch(c){}};function di(){}function Uh(a,b,c,d){a.info("XMLHTTP TEXT ("+b+"): "+$h(a,c)+(d?" "+d:""))}function ei(a,b){a.info(b)}di.prototype.info=function(){};function $h(a,b){if(!b||"y2f%"==b)return b;try{var c=Cd(b);if(c)for(var d=0;d<c.length;d++)if(t(c[d])){var e=c[d];if(!(2>e.length)){var f=e[1];if(t(f)&&!(1>f.length)){var h=f[0];if("noop"!=h&&"stop"!=h)for(var k=1;k<f.length;k++)f[k]=""}}}return U(c)}catch(l){return a.info("Exception parsing expected JS array - probably was not JS"),b}};function fi(a,b,c,d,e){ei(new di,"TestLoadImageWithRetries: "+e);if(0==d)c(!1);else{var f=e||0;d--;gi(a,b,function(e){e?c(!0):m.setTimeout(function(){fi(a,b,c,d,f)},f)})}}
function gi(a,b,c){var d=new di;d.info("TestLoadImage: loading "+a);var e=new Image;e.onload=function(){try{d.info("TestLoadImage: loaded"),hi(e),c(!0)}catch(a){}};e.onerror=function(){try{d.info("TestLoadImage: error"),hi(e),c(!1)}catch(a){}};e.onabort=function(){try{d.info("TestLoadImage: abort"),hi(e),c(!1)}catch(a){}};e.ontimeout=function(){try{d.info("TestLoadImage: timeout"),hi(e),c(!1)}catch(a){}};m.setTimeout(function(){if(e.ontimeout)e.ontimeout()},b);e.src=a}
function hi(a){a.onload=null;a.onerror=null;a.onabort=null;a.ontimeout=null};function ii(a,b){this.b=a;this.g=b;this.h=new rh(null,!0)}g=ii.prototype;g.Mb=null;g.O=null;g.yb=!1;g.mc=null;g.xb=null;g.Pb=null;g.Qb=null;g.P=null;g.wa=-1;g.Za=null;g.ab=null;g.connect=function(a){this.Qb=a;a=ji(this.b,this.Qb);$();this.mc=w();var b=this.b.C;null!=b?(this.Za=b[0],(this.ab=b[1])?(this.P=1,ki(this)):(this.P=2,li(this))):(Nf(a,"MODE","init"),this.O=new Fh(this,this.g,void 0,void 0,void 0),this.O.qa=this.Mb,Lh(this.O,a,!1,null,!0),this.P=0)};
function ki(a){var b=mi(a.b,a.ab,"/mail/images/cleardot.gif");Pf(b);fi(b.toString(),5E3,v(a.Hd,a),3,2E3);a.T(1)}g.Hd=function(a){if(a)this.P=2,li(this);else{$();var b=this.b;b.b.info("Test Connection Blocked");b.fa=b.oa.wa;ni(b,9)}a&&this.T(2)};
function li(a){a.g.info("TestConnection: starting stage 2");var b=a.b.H;if(null!=b)a.g.info("TestConnection: skipping stage 2, precomputed result is "+b?"Buffered":"Unbuffered"),$(),b?($(),oi(a.b,a,!1)):($(),oi(a.b,a,!0));else if(a.O=new Fh(a,a.g,void 0,void 0,void 0),a.O.qa=a.Mb,b=pi(a.b,a.Za,a.Qb),$(),!E||Bb(10))Nf(b,"TYPE","xmlhttp"),Lh(a.O,b,!1,a.Za,!1);else{Nf(b,"TYPE","html");var c=a.O;a=Boolean(a.Za);c.Ia=3;c.ja=Pf(b.B());Yh(c,a)}}g.Lb=function(a){return this.b.Lb(a)};g.zc=function(){return!1};
g.Ac=function(a,b){this.wa=a.Ta;if(0==this.P)if(this.g.info("TestConnection: Got data for stage 1"),b){try{var c=this.h.parse(b)}catch(d){qi(this.b,this);return}this.Za=c[0];this.ab=c[1]}else this.g.info("TestConnection: Null responseText"),qi(this.b,this);else if(2==this.P)if(this.yb)$(),this.Pb=w();else if("11111"==b){if($(),this.yb=!0,this.xb=w(),c=this.xb-this.mc,!E||Bb(10)||500>c)this.wa=200,ai(this.O),this.g.info("Test connection succeeded; using streaming connection"),$(),oi(this.b,this,!0)}else $(),
this.xb=this.Pb=w(),this.yb=!1};
g.tb=function(){this.wa=this.O.Ta;if(!this.O.X)this.g.info("TestConnection: request failed, in state "+this.P),0==this.P?$():2==this.P&&$(),qi(this.b,this);else if(0==this.P)this.g.info("TestConnection: request complete for initial check"),this.ab?(this.P=1,ki(this)):(this.P=2,li(this));else if(2==this.P){this.g.info("TestConnection: request complete for stage 2");var a=!1;(a=!E||Bb(10)?this.yb:200>this.Pb-this.xb?!1:!0)?(this.g.info("Test connection succeeded; using streaming connection"),$(),oi(this.b,
this,!0)):(this.g.info("Test connection failed; not using streaming"),$(),oi(this.b,this,!1))}};g.ub=function(){return this.b.ub()};g.T=function(a){this.b.T(a)};function ri(a){oh.call(this);this.headers=new fe;this.o=a||null;this.h=!1;this.ca=this.b=null;this.Da=this.W="";this.k=0;this.q="";this.i=this.ra=this.H=this.ka=!1;this.C=0;this.ea=null;this.mb="";this.da=this.gc=!1}y(ri,oh);var si=/^https?$/i,ti=["POST","PUT"];
function Nh(a,b,c,d,e){if(a.b)throw Error("[goog.net.XhrIo] Object is active with another request="+a.W+"; newUri="+b);c=c?c.toUpperCase():"GET";a.W=b;a.q="";a.k=0;a.Da=c;a.ka=!1;a.h=!0;a.b=a.o?Ch(a.o):Ch(Ah);a.ca=a.o?a.o.b||(a.o.b=Eh(a.o)):Ah.b||(Ah.b=Eh(Ah));a.b.onreadystatechange=v(a.Va,a);try{ve(ui(a,"Opening Xhr")),a.ra=!0,a.b.open(c,b,!0),a.ra=!1}catch(f){ve(ui(a,"Error opening Xhr: "+f.message));vi(a,f);return}b=d||"";var h=a.headers.B();e&&je(e,function(a,b){h.set(b,a)});e=B(h.la(),wi);d=
m.FormData&&b instanceof m.FormData;!C(ti,c)||(e||d)||h.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");je(h,function(a,b){this.b.setRequestHeader(b,a)},a);a.mb&&(a.b.responseType=a.mb);"withCredentials"in a.b&&(a.b.withCredentials=a.gc);try{xi(a),0<a.C&&(a.da=E&&I(9)&&fa(a.b.timeout)&&s(a.b.ontimeout),ve(ui(a,"Will abort after "+a.C+"ms if incomplete, xhr2 "+a.da)),a.da?(a.b.timeout=a.C,a.b.ontimeout=v(a.Ea,a)):a.ea=uh(a.Ea,a.C,a)),ve(ui(a,"Sending request")),a.H=!0,a.b.send(b),
a.H=!1}catch(k){ve(ui(a,"Send error: "+k.message)),vi(a,k)}}function wi(a){return"content-type"==a.toLowerCase()}ri.prototype.Ea=function(){"undefined"!=typeof aa&&this.b&&(this.q="Timed out after "+this.C+"ms, aborting",this.k=8,ui(this,this.q),Y(this,"timeout"),ci(this,8))};function vi(a,b){a.h=!1;a.b&&(a.i=!0,a.b.abort(),a.i=!1);a.q=b;a.k=5;yi(a);zi(a)}function yi(a){a.ka||(a.ka=!0,Y(a,"complete"),Y(a,"error"))}
function ci(a,b){a.b&&a.h&&(ui(a,"Aborting"),a.h=!1,a.i=!0,a.b.abort(),a.i=!1,a.k=b||7,Y(a,"complete"),Y(a,"abort"),zi(a))}ri.prototype.K=function(){this.b&&(this.h&&(this.h=!1,this.i=!0,this.b.abort(),this.i=!1),zi(this,!0));ri.R.K.call(this)};ri.prototype.Va=function(){this.p||(this.ra||this.H||this.i?Ai(this):this.Kd())};ri.prototype.Kd=function(){Ai(this)};
function Ai(a){if(a.h&&"undefined"!=typeof aa)if(a.ca[1]&&4==Oh(a)&&2==Ph(a))ui(a,"Local request error detected and ignored");else if(a.H&&4==Oh(a))uh(a.Va,0,a);else if(Y(a,"readystatechange"),4==Oh(a)){ui(a,"Request complete");a.h=!1;try{var b=Ph(a),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=vc(String(a.W))[1]||null;if(!f&&self.location)var h=self.location.protocol,f=h.substr(0,h.length-1);e=!si.test(f?
f.toLowerCase():"")}c=e}if(c)Y(a,"complete"),Y(a,"success");else{a.k=6;var k;try{k=2<Oh(a)?a.b.statusText:""}catch(l){k=""}a.q=k+" ["+Ph(a)+"]";yi(a)}}finally{zi(a)}}}function zi(a,b){if(a.b){xi(a);var c=a.b,d=a.ca[0]?ba:null;a.b=null;a.ca=null;b||Y(a,"ready");try{c.onreadystatechange=d}catch(e){}}}function xi(a){a.b&&a.da&&(a.b.ontimeout=null);fa(a.ea)&&(m.clearTimeout(a.ea),a.ea=null)}function Oh(a){return a.b?a.b.readyState:0}function Ph(a){try{return 2<Oh(a)?a.b.status:-1}catch(b){return-1}}
function Qh(a){try{return a.b?a.b.responseText:""}catch(b){return""}}function ui(a,b){return b+" ["+a.Da+" "+a.W+" "+Ph(a)+"]"};function Bi(a,b,c){this.q=a||null;this.g=1;this.h=[];this.i=[];this.b=new di;this.k=new rh(null,!0);this.C=b||null;this.H=null!=c?c:null}function Ci(a,b){this.b=a;this.map=b;this.eb=null}g=Bi.prototype;g.cb=null;g.L=null;g.F=null;g.Kb=null;g.rb=null;g.ec=null;g.vb=null;g.Xa=0;g.hd=0;g.J=null;g.ma=null;g.ga=null;g.ya=null;g.oa=null;g.nb=null;g.Ca=-1;g.lc=-1;g.fa=-1;g.Ya=0;g.Ja=0;g.ua=8;var Di=new oh;function Ei(a){X.call(this,"statevent",a)}y(Ei,X);function Fi(a){X.call(this,"timingevent",a)}
y(Fi,X);function Gi(a){X.call(this,"serverreachability",a)}y(Gi,X);g=Bi.prototype;g.connect=function(a,b,c,d,e){this.b.info("connect()");$();this.Kb=b;this.cb=c||{};d&&s(e)&&(this.cb.OSID=d,this.cb.OAID=e);this.b.info("connectTest_()");this.oa=new ii(this,this.b);this.oa.Mb=null;this.oa.h=this.k;this.oa.connect(a)};
function Hi(a){if(a.oa){var b=a.oa;b.O&&(ai(b.O),b.O=null);b.wa=-1;a.oa=null}a.F&&(ai(a.F),a.F=null);a.ga&&(m.clearTimeout(a.ga),a.ga=null);Ii(a);a.L&&(ai(a.L),a.L=null);a.ma&&(m.clearTimeout(a.ma),a.ma=null)}g.zc=function(){return 0==this.g};function Ji(a){a.L||a.ma||(a.ma=Zh(v(a.nc,a),0),a.Ya=0)}
g.nc=function(a){this.ma=null;this.b.info("startForwardChannel_");if(1==this.g){if(!a){this.b.info("open_()");this.Xa=Math.floor(1E5*Math.random());a=this.Xa++;var b=new Fh(this,this.b,"",a,void 0);b.qa=null;var c=Ki(this),d=this.rb.B();W(d,"RID",a);this.q&&W(d,"CVER",this.q);Li(this,d);Jh(b,d,c);this.L=b;this.g=2}}else 3==this.g&&(a?Mi(this,a):0==this.h.length?this.b.info("startForwardChannel_ returned: nothing to send"):this.L||(Mi(this),this.b.info("startForwardChannel_ finished, sent request")))};
function Mi(a,b){var c,d;b?6<a.ua?(a.h=a.i.concat(a.h),a.i.length=0,c=a.Xa-1,d=Ki(a)):(c=b.h,d=b.Fa):(c=a.Xa++,d=Ki(a));var e=a.rb.B();W(e,"SID",a.p);W(e,"RID",c);W(e,"AID",a.Ca);Li(a,e);c=new Fh(a,a.b,a.p,c,a.Ya+1);c.qa=null;c.setTimeout(Math.round(1E4)+Math.round(1E4*Math.random()));a.L=c;Jh(c,e,d)}function Li(a,b){if(a.J){var c=a.J.Jc(a);c&&je(c,function(a,c){W(b,c,a)})}}
function Ki(a){var b=Math.min(a.h.length,1E3),c=["count="+b],d;6<a.ua&&0<b?(d=a.h[0].b,c.push("ofs="+d)):d=0;for(var e=0;e<b;e++){var f=a.h[e].b,h=a.h[e].map,f=6>=a.ua?e:f-d;try{je(h,function(a,b){c.push("req"+f+"_"+b+"="+encodeURIComponent(a))})}catch(k){c.push("req"+f+"_type="+encodeURIComponent("_badmap"))}}a.i=a.i.concat(a.h.splice(0,b));return c.join("&")}function Ni(a){a.F||a.ga||(a.o=1,a.ga=Zh(v(a.vc,a),0),a.Ja=0)}
function Oi(a){if(a.F||a.ga||3<=a.Ja)return!1;a.b.info("Going to retry GET");a.o++;a.ga=Zh(v(a.vc,a),Pi(a,a.Ja));a.Ja++;return!0}
g.vc=function(){this.ga=null;this.b.info("Creating new HttpRequest");this.F=new Fh(this,this.b,this.p,"rpc",this.o);this.F.qa=null;this.F.Jb=0;var a=this.ec.B();W(a,"RID","rpc");W(a,"SID",this.p);W(a,"CI",this.nb?"0":"1");W(a,"AID",this.Ca);Li(this,a);if(!E||Bb(10))W(a,"TYPE","xmlhttp"),Lh(this.F,a,!0,this.vb,!1);else{W(a,"TYPE","html");var b=this.F,c=Boolean(this.vb);b.Ia=3;b.ja=Pf(a.B());Yh(b,c)}this.b.info("New Request created")};
function oi(a,b,c){a.b.info("Test Connection Finished");a.nb=c;a.fa=b.wa;a.b.info("connectChannel_()");a.Ed(1,0);a.rb=ji(a,a.Kb);Ji(a)}function qi(a,b){a.b.info("Test Connection Failed");a.fa=b.wa;ni(a,2)}
g.Ac=function(a,b){if(0!=this.g&&(this.F==a||this.L==a))if(this.fa=a.Ta,this.L==a&&3==this.g)if(7<this.ua){var c;try{c=this.k.parse(b)}catch(d){c=null}if(t(c)&&3==c.length){var e=c;if(0==e[0])t:if(this.b.info("Server claims our backchannel is missing."),this.ga)this.b.info("But we are currently starting the request.");else{if(this.F)if(this.F.Ua+3E3<this.L.Ua)Ii(this),ai(this.F),this.F=null;else break t;Oi(this);$()}else this.lc=e[1],c=this.lc-this.Ca,0<c&&(e=e[2],this.b.info(e+" bytes (in "+c+" arrays) are outstanding on the BackChannel"),
37500>e&&(this.nb&&0==this.Ja)&&!this.ya&&(this.ya=Zh(v(this.cd,this),6E3)))}else this.b.info("Bad POST response data returned"),ni(this,11)}else"y2f%"!=b&&(this.b.info("Bad data returned - missing/invald magic cookie"),ni(this,11));else if(this.F==a&&Ii(this),!/^[\s\xa0]*$/.test(b))for(c=this.k.parse(b),t(c),e=0;e<c.length;e++){var f=c[e];this.Ca=f[0];f=f[1];2==this.g?"c"==f[0]?(this.p=f[1],this.vb=f[2],f=f[3],null!=f?this.ua=f:this.ua=6,this.g=3,this.J&&this.J.kc(this),this.ec=pi(this,this.vb,this.Kb),
Ni(this)):"stop"==f[0]&&ni(this,7):3==this.g&&("stop"==f[0]?ni(this,7):"noop"!=f[0]&&this.J&&this.J.jc(this,f),this.Ja=0)}};g.cd=function(){null!=this.ya&&(this.ya=null,ai(this.F),this.F=null,Oi(this),$())};function Ii(a){null!=a.ya&&(m.clearTimeout(a.ya),a.ya=null)}
g.tb=function(a){this.b.info("Request complete");var b;if(this.F==a)Ii(this),this.F=null,b=2;else if(this.L==a)this.L=null,b=1;else return;this.fa=a.Ta;if(0!=this.g)if(a.X)1==b?(w(),Y(Di,new Fi(Di)),Ji(this),this.i.length=0):Ni(this);else{var c=a.ta;if(3==c||7==c||0==c&&0<this.fa)this.b.info("Not retrying due to error type");else{this.b.info("Maybe retrying, last error: "+Gh(c,this.fa));var d;if(d=1==b)this.L||this.ma?d=!1:1==this.g||2<=this.Ya?d=!1:(this.b.info("Going to retry POST"),this.ma=Zh(v(this.nc,
this,a),Pi(this,this.Ya)),this.Ya++,d=!0);if(d||2==b&&Oi(this))return;this.b.info("Exceeded max number of retries")}this.b.info("Error: HTTP request failed");switch(c){case 1:ni(this,5);break;case 4:ni(this,10);break;case 3:ni(this,6);break;case 7:ni(this,12);break;default:ni(this,2)}}};function Pi(a,b){var c=5E3+Math.floor(1E4*Math.random());a.J||(a.b.info("Inactive channel"),c*=2);return c*b}g.Ed=function(a){if(!C(arguments,this.g))throw Error("Unexpected channel state: "+this.g);};
function ni(a,b){a.b.info("Error code "+b);if(2==b||9==b){var c=null;a.J&&(c=null);var d=v(a.Id,a);c||(c=new Af("//www.google.com/images/cleardot.gif"),Pf(c));gi(c.toString(),1E4,d)}else $();Qi(a,b)}g.Id=function(a){a?(this.b.info("Successfully pinged google.com"),$()):(this.b.info("Failed to ping google.com"),$(),Qi(this,8))};function Qi(a,b){a.b.info("HttpChannel: error - "+b);a.g=0;a.J&&a.J.tc(a,b);Ri(a);Hi(a)}
function Ri(a){a.g=0;a.fa=-1;if(a.J)if(0==a.i.length&&0==a.h.length)a.J.Ob(a);else{a.b.info("Number of undelivered maps, pending: "+a.i.length+", outgoing: "+a.h.length);var b=Ja(a.i),c=Ja(a.h);a.i.length=0;a.h.length=0;a.J.Ob(a,b,c)}}function ji(a,b){var c=mi(a,null,b);a.b.info("GetForwardChannelUri: "+c);return c}function pi(a,b,c){b=mi(a,a.ub()?b:null,c);a.b.info("GetBackChannelUri: "+b);return b}
function mi(a,b,c){var d=c instanceof Af?c.B():new Af(c,void 0);if(""!=d.Na)b&&Cf(d,b+"."+d.Na),Df(d,d.gb);else var e=window.location,d=Qf(e.protocol,b?b+"."+e.hostname:e.hostname,e.port,c);a.cb&&je(a.cb,function(a,b){W(d,b,a)});W(d,"VER",a.ua);Li(a,d);return d}g.Lb=function(a){if(a)throw Error("Can't create secondary domain capable XhrIo object.");a=new ri;a.gc=!1;return a};
function Zh(a,b){if(!ga(a))throw Error("Fn must not be null and must be a function");return m.setTimeout(function(){a()},b)}g.T=function(){Y(Di,new Gi(Di))};function $(){Y(Di,new Ei(Di))}g.ub=function(){return!(!E||Bb(10))};function Si(){}g=Si.prototype;g.kc=function(){};g.jc=function(){};g.tc=function(){};g.Ob=function(){};g.Jc=function(){return{}};function Ti(a,b){sh.call(this);if(ga(a))b&&(a=v(a,b));else if(a&&ga(a.handleEvent))a=v(a.handleEvent,a);else throw Error("Invalid listener argument");this.q=a;ch(this,"tick",v(this.o,this));this.stop();th(this,5E3+2E4*Math.random())}y(Ti,sh);Ti.prototype.o=function(){if(500<this.b){var a=this.b;24E4>2*a&&(a*=2);th(this,a)}this.q()};function Ui(a,b){this.action=a;this.params=b||null};function Vi(a,b){this.k=a;this.p=b;this.h=new O;this.g=new Ti(this.dd,this);this.b=null}y(Vi,Si);g=Vi.prototype;g.wb="";g.$a=0;g.zb=0;g.I=function(a,b,c){return this.h.I(a,b,c)};g.xa=function(a,b,c){return this.h.xa(a,b,c)};g.na=function(a){return this.h.na(a)};g.w=function(a,b){return this.h.w.apply(this.h,arguments)};
g.connect=function(a,b,c){if(!this.b||2!=this.b.g){this.wb="";this.g.stop();this.i=a||null;this.$a=b||0;a=this.k+"/test";b=this.k+"/bind";var d=new Bi("1",c?c.firstTestResults:null,c?c.secondTestResults:null),e=this.b;e&&(e.J=null);d.J=this;this.b=d;e?this.b.connect(a,b,this.p,e.p,e.Ca):c?this.b.connect(a,b,this.p,c.sessionId,c.arrayId):this.b.connect(a,b,this.p)}};
function Wi(a,b){a.zb=b||0;a.g.stop();if(a.b&&0!=a.b.g){var c=a.b;c.b.info("disconnect()");Hi(c);if(3==c.g){var d=c.Xa++,e=c.rb.B();W(e,"SID",c.p);W(e,"RID",d);W(e,"TYPE","terminate");Li(c,e);d=new Fh(c,c.b,c.p,d,void 0);d.Ia=2;d.ja=Pf(e.B());(new Image).src=d.ja;d.Ua=w();Mh(d)}Ri(c)}a.zb=0}
g.sendMessage=function(a,b){if(this.b&&0!=this.b.g&&(2==this.b.g||3==this.b.g||this.g.Ka)){var c={_sc:a};b&&db(c,b);U(c);var d=this.b;if(0==d.g)throw Error("Invalid operation: sending map when state is closed");1E3==d.h.length&&U(c);d.h.push(new Ci(d.hd++,c));2!=d.g&&3!=d.g||Ji(d)}};g.kc=function(){var a=this.g;a.stop();th(a,5E3+2E4*Math.random());this.i=null;this.$a=0;this.w("onStateOpened")};
g.tc=function(a,b){var c=2==b&&401==this.b.fa;4==b||c||(6==b&&(c=this.g,c.stop(),th(c,500)),this.g.start());this.w("onError",b)};g.Ob=function(){this.w("onStateClosed")};g.Jc=function(){var a={v:2};this.wb&&(a.gsessionid=this.wb);0!=this.$a&&(a.ui=""+this.$a);0!=this.zb&&(a.ui=""+this.zb);this.i&&db(a,this.i);return a};g.jc=function(a,b){"S"==b[0]?this.wb=b[1]:this.h.w("onMessage",new Ui(b[0],b[1]))};
g.dd=function(){this.g.stop();var a=this.b,b=0;a.F&&b++;a.L&&b++;0!=b?this.g.start():this.connect(this.i,this.$a)};function Xi(){this.b=[];this.index=-1;Yi(this)}function Yi(a){a.volume=-1;a.muted=!1;a.g=-1;a.h=null;w()}function Zi(a){return a.b[a.index]}function $i(a,b){var c=a.index;a.index=xa(a.b,b);c!=a.index&&Yi(a)}function aj(a,b,c){c=c||Zi(a);if(Na(a.b,b)&&c==Zi(a))return!1;a.b=Ja(b);$i(a,c);return!0}Xi.prototype.remove=function(a){var b=Zi(this);return Ga(this.b,a)?(this.index=xa(this.b,b),!0):!1};var bj=null;"undefined"!=typeof XMLHttpRequest?bj=function(){return new XMLHttpRequest}:"undefined"!=typeof ActiveXObject&&(bj=function(){return new ActiveXObject("Microsoft.XMLHTTP")});function cj(a,b,c,d,e,f,h){var k=bj&&bj();if("open"in k){k.onreadystatechange=function(){4==(k&&"readyState"in k?k.readyState:0)&&b&&gc(b)(k)};c=(c||"GET").toUpperCase();d=d||"";k.open(c,a,!0);f&&(k.responseType=f);h&&(k.withCredentials=!0);a="POST"==c;if(e)for(var l in e)k.setRequestHeader(l,e[l]),"content-type"==l.toLowerCase()&&(a=!1);a&&k.setRequestHeader("Content-Type","application/x-www-form-urlencoded");k.send(d);return k}}
function dj(a,b){var c=b.format||"JSON";b.je&&(a=document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:"")+a);var d=b.Gc;d&&(a=Ue(a,d));var e=b.ke||"";if(d=b.ha)e=Re(e),db(e,d),e=Se(e);var f=!1,h,k=cj(a,function(a){if(!f){f=!0;h&&hc(h);var d;t:switch(a&&"status"in a?a.status:-1){case 0:case 200:case 204:case 304:d=!0;break t;default:d=!1}var e=null;if(d||400<=a.status&&500>a.status)e=ej(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||{},k=b.eb||m;d?b.aa&&b.aa.call(k,a,e):b.onError&&b.onError.call(k,a,e);b.Gb&&b.Gb.call(k,a,e)}},b.method,e,b.headers,b.responseType,b.withCredentials);b.Pd&&0<b.timeout&&(h=M(function(){f||(f=!0,k.abort(),hc(h),b.Pd.call(b.eb||m,k))},b.timeout))}
function ej(a,b){var c=null;switch(a){case "JSON":var d=b.responseText,e=b.getResponseHeader("Content-Type")||"";d&&0<=e.indexOf("json")&&(c=Cd(d));break;case "XML":if(d=(d=b.responseXML)?fj(d):null)c={},A(d.getElementsByTagName("*"),function(a){c[a.tagName]=gj(a)})}return c}function fj(a){return a?(a=("responseXML"in a?a.responseXML:a).getElementsByTagName("root"))&&0<a.length?a[0]:null:null}function gj(a){var b="";A(a.childNodes,function(a){b+=a.nodeValue});return b};function hj(){yg.call(this);this.A=wg();this.j("Initializing app screens: "+Zf(this.A));this.g=[];this.b=[];ij(this,Mg());this.j("Initializing DIAL devices: "+bg(this.b));var a=kg(tg());jj(this,a);this.j("Initializing online screens: "+Zf(this.g));kj(this);this.qc();this.Ab()}y(hj,yg);var lj=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,1E4,15E3,2E4];g=hj.prototype;g.Yb=NaN;g.fb=NaN;g.j=function(a){Bg("RM",a)};
function mj(a){var b=navigator.userAgent;if(0<=b.search("MSIE")&&(b=b.match(/MSIE ([\d.]+)/)[1],0>ua(b,"10.0")))return a;b=vc(document.location.href);return tc("https",b[3],a)}function kj(a){a.I("appScreenChange",a.Qd,a);P("yt-remote-dial-device-list-update",function(a){ij(this,a);Ca(a)||this.Ab()},a);P("yt-remote-dial-device-status-update",a.Rd,a)}g.qc=function(){nj(this);M(v(this.qc,this),864E5)};
g.Ab=function(){hc(this.Yb);this.Yb=NaN;oj(this);var a=Mg();Ca(a)||ij(this,a);this.Yb=M(v(this.Ab,this),1E4)};g.Qd=function(){this.j("App screen changed.");var a=ya(this.A,function(a){return!!ng(this.g,a)},this);jj(this,a);ij(this,Mg());Ca(this.A)&&Ca(this.b)||this.Ab()};function pj(a,b){return ya(b,function(a){return a.M?(a=ig(this.b,a.M),!!a&&"RUNNING"==a.status):!0},a)}
function ij(a,b){A(b,function(a){var b=og(this.A,a.id);b&&(b.name=a.name)},a);qj(a);ug(fg(b));var c=!Na(a.b,b,hg);c&&a.j("Updating DIAL devices: "+bg(a.b)+" to "+bg(b));a.b=b;jj(a,a.g);c&&(a.j("DIAL devices updated. Firing ONLINE_RECEIVER_CHANGE"),a.w("onlineReceiverChange"))}
g.Rd=function(a){var b=ig(this.b,a.id);b&&(this.j("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,ug(fg(this.b)));jj(this,this.g)};
function jj(a,b,c){b=pj(a,b);var d=!Na(a.g,b,mg);if(d||c)c=jg(b),Td("yt-remote-online-screens",c,60);d&&(a.j("Updating online screens: "+Zf(a.g)+" -> "+Zf(b)),a.g=b,a.j("Online screens updated. Firing ONLINE_RECEIVER_CHANGE"),a.w("onlineReceiverChange"))}
function rj(a){var b=[],c={};A(a.A,function(a){c[a.Y]=a;b.push(a.Y)});a={method:"POST",ha:{lounge_token:b.join(",")},eb:a,aa:function(a,b){var f=[];A(b.screens||[],function(a){"online"==a.status&&f.push(c[a.loungeToken])});jj(this,f,!0)}};dj(mj("/api/lounge/pairing/get_screen_availability"),a)}
function nj(a){var b=za(a.A,function(a){return a.ba});Ca(b)||(a.j("Updating screen lounge tokens for screen ids: "+U(b)),dj(mj("/api/lounge/pairing/get_lounge_token_batch"),{ha:{screen_ids:b.join(",")},method:"POST",eb:a,aa:function(a,b){A(b.screens||[],function(a){var b=B(this.A,function(b){return b.ba==a.screenId});b&&(b.Y=a.loungeToken)},this);this.A=ya(this.A,function(a){return!!a.Y});qj(this);rj(this)}}))}
function oj(a){var b=a.A,c=wg();a.A=0<c.length?c:a.A;Na(a.A,b,mg)||(a.j("Refreshing app screens: "+Zf(b)+" to "+Zf(a.A)),a.j("App screens updated. Firing APP_SCREEN_CHANGE"),a.w("appScreenChange"));B(a.A,function(a){var b=ig(this.b,a.M);return!a.M||!!b},a)&&(B(a.A,function(a){return!a.Y})?nj(a):rj(a))}
function qj(a){5<a.A.length&&(a.A=a.A.slice(a.A.length-5));var b=wg();Na(a.A,b,mg)||(a.j("Saving app screens: "+Zf(b)+" to "+Zf(a.A)),a.j("App screens updated. Firing APP_SCREEN_CHANGE"),b=jg(a.A),Td("yt-remote-app-screens",b,31536E3),a.w("appScreenChange"))}function sj(a,b){var c=Ba(a.A,function(a){return lg(b,a)});0>c?(a.j("Paired with a new screen: "+Yf(b)),a.A.push(b)):(a.j("Paired with an old screen: "+Yf(b)),a.A[c]=b);ng(a.g,b)||a.g.push(b);qj(a)}
g.uc=function(a,b,c){var d=!1;b>=lj.length&&(this.j("Pairing DIAL device "+a+" with pairing code "+c+" timed out. Firing SCREEN_PAIRING_COMPLETE."),d=!0);var e=ig(this.b,a);if(!e)this.j("Pairing DIAL device "+a+" with pairing code "+c+" failed: no local device found with id "+a+". Firing SCREEN_PAIRING_COMPLETE."),d=!0;else if("ERROR"==e.status||"STOPPED"==e.status)this.j("Pairing DIAL device "+a+" with pairing code "+c+" failed: error launching YTTV app on device "+a+". Firing SCREEN_PAIRING_COMPLETE."),
d=!0;d?(tj(this),this.w("screenPairingComplete",null,c)):dj(mj("/api/lounge/pairing/get_screen"),{method:"POST",ha:{pairing_code:c},eb:this,aa:function(a,b){tj(this);var d=new Wf(b.screen);d.name=e.name;d.M=e.id;sj(this,d);this.j("Pairing a DIAL device with "+c+" succeeded. Firing SCREEN_PAIRING_COMPLETE.");this.w("screenPairingComplete",d,c)},onError:function(){this.j("Polling a DIAL device with pairing code: "+c);hc(this.fb);this.fb=M(v(this.uc,this,a,b+1,c),lj[b])}})};
function uj(a,b,c,d,e){tj(a);ig(a.b,b)?(c||(c=cg(),Qg(b,c,d,e)),a.fb=M(v(a.uc,a,b,0,c),lj[0])):a.j("Cannot find DIAL device with id: "+b)}function tj(a){hc(a.fb);a.fb=NaN}function vj(a,b){var c=og(a.g,b);a.j("Found screen: "+Yf(c)+" with key: "+b);return c}function wj(a,b){var c=ig(a.b,b);if(!c){var d=og(a.A,b);d&&(c=ig(a.b,d.M))}a.j("Found DIAL device: "+U(c?ag(c):null)+" with key: "+b);return c};function xj(a,b){yg.call(this);Sd&&Rd();rg()||Le("remote_sid");ze("goog.net.BrowserChannel");this.h=new hj;var c=Vd("yt-remote-device-id");c||(c=cg(),Td("yt-remote-device-id",c,31536E3));this.i=new Vi("/api/lounge/bc",{device:"REMOTE_CONTROL",id:c,name:a,app:b});this.b=null;this.q=[];this.i.I("onStateOpened",this.md,this);this.i.I("onStateClosed",this.oc,this);this.i.I("onError",this.kd,this);this.i.I("onMessage",this.ld,this);this.h.I("appScreenChange",this.jd,this);this.j("Initializing with device name = "+
a+", app = "+b)}y(xj,yg);g=xj.prototype;g.Ha=NaN;g.Nb=NaN;g.j=function(a){Bg("RC",a)};function yj(){var a=rg();return a?new Wf(a):null}function zj(a,b){"playerChange"==b&&isNaN(NaN)&&(a.j("Update received from MDx Server. Firing PLAYER_CHANGE"),a.w("playerChange"));"playlistChange"==b&&isNaN(NaN)&&(a.j("Update received from MDx Server. Firing PLAYLIST_CHANGE"),a.w("playlistChange"))}
function Aj(a,b){a.j("Changing current screen from: "+Yf(a.g)+" to "+Yf(b));a.g=b;var c=a.i,d=b?b.Y:"";(c.p.loungeIdToken=d)||c.g.stop()}g.connect=function(a){this.j("Connecting to the receiver: "+U(a));var b=vj(this.h,a.key);b?Bj(this,b):(a=wj(this.h,a.key))?Cj(this,a):M(v(function(){this.j("No receiver found. Firing CONNECTION_ERROR");this.w("connectionError")},this),0)};
function Bj(a,b){a.j("Connecting to screen: "+Yf(b));var c=yj();c&&!lg(b,c)?Dj(a):Ej(a);a.b=null;Aj(a,b);var c={},d=Vd("yt-remote-delayed-connect-key");if(d)c.videoIds=d[1],c.videoId=d[1],c.currentTime=d[2];else if(a.k){var d=a.k.g(),e=d[a.k.h()];c.videoIds=d.join(",");c.videoId=e;c.videoSources=a.k.i().join(",");c.currentTime=a.k.b()}ab(c)?a.j("Connecting with empty params"):a.j("Connecting with setPlaylist and params: "+U(c));a.i.connect(ab(c)?{}:{method:"setPlaylist",params:U(c)},1,Vd("yt-remote-session-browser-channel-"+
pg()));a.b=new Xi;ab(c)||(a.b.b=c.videoIds.split(","),$i(a.b,c.videoId));Fj(a)}function Cj(a,b){a.j("Connecting to DIAL device: "+U(b?ag(b):null));Gj(a);Hj(a);var c=Vd("yt-remote-delayed-connect-key");(c=c?c[3]:"")?uj(a.h,b.id,c):a.k?(c=a.k.g()[a.k.h()],uj(a.h,b.id,"",c,a.k.b())):uj(a.h,b.id,"");a.o=b;a.h.I("screenPairingComplete",a.hc,a)}g.hc=function(a){this.j("Paired with a DIAL screen: "+Yf(a));Gj(this);a?Bj(this,a):(this.j("Dial pairing failed. Firing CONNECTION_ERROR"),this.o=null,this.w("connectionError"))};
function Dj(a){a.j("Disconnecting with user intent.");Hj(a);sg();Wi(a.i,1)}function Hj(a){tj(a.h);var b=B(a.q,function(a){return"REMOTE_CONTROL"==a.type});b?(a.j("Did not stop DIAL device, because another remote is connected: "+U(b?{id:b.id,name:b.name,app:b.app,type:b.type,user:b.wc}:null)),a.o=null):a.o?(a.j("Stopping DIAL device: "+a.o.id),Rg(a.o.id),a.o=null):a.g&&a.g.M&&(a.j("Stopping DIAL device: "+a.g.M),Rg(a.g.M))}
function Ej(a){a.j("Disconnecting from screen.");a.g&&(a.j("Storing session screen: "+Yf(a.g)),qg(Xf(a.g)));Wi(a.i,2)}function Ij(a,b){a.j("Sending: action="+b);a.i.sendMessage(b,void 0)}g.dc=function(){Ij(this,"getNowPlaying")};function Fj(a){Jj(a);a.Ha=M(v(function(){Jj(this);Aj(this,null);this.b=this.o=null;this.j("Connecting remote screen timeout. Firing CONNECTION_ERROR");this.w("connectionError")},a),1E4)}function Jj(a){hc(a.Ha);a.Ha=NaN}function Kj(a){hc(a.Nb);a.Nb=NaN}
function Gj(a){a.h.xa("screenPairingComplete",a.hc,a)}g.md=function(){this.j("Channel opened");qg(Xf(this.g))};g.oc=function(){this.j("Channel closed");Kj(this);var a={firstTestResults:[""],secondTestResults:!this.i.b.nb,sessionId:this.i.b.p,arrayId:this.i.b.Ca};Td("yt-remote-session-browser-channel-"+pg(),a,30);a=!!this.g&&isNaN(this.Ha);Aj(this,null);this.o=null;a&&(this.j("Closing channel. Firing CONNECTION_CHANGE(false)"),this.w("connectionChange",!1))};
g.kd=function(){this.j("Channel error");this.oc();Jj(this);this.j("Channel error. Firing CONNECTION_ERROR");this.w("connectionError")};
function Lj(a,b){switch(b.action){case "loungeStatus":var c=Bd(b.params.devices);a.q=za(c,function(a){return new Cg(a)});break;case "loungeScreenDisconnected":Ha(a.q,function(a){return"LOUNGE_SCREEN"==a.type});break;case "remoteConnected":var d=new Cg(Bd(b.params.device));B(a.q,function(a){return d?a.id==d.id:!1})||Fa(a.q,d);break;case "remoteDisconnected":d=new Cg(Bd(b.params.device)),Ha(a.q,function(a){return d?a.id==d.id:!1})}}
function Mj(a,b){var c=!1;if("loungeStatus"==b.action)c=!!B(a.q,function(a){return"LOUNGE_SCREEN"==a.type});else if("loungeScreenConnected"==b.action)c=!0;else if("loungeScreenDisconnected"==b.action)c=!1;else return;c!=(!!a.g&&isNaN(a.Ha))&&(c?(Jj(a),a.b.p=a.g,a.j("Screen connected. Firing CONNECTION_CHANGE(true)"),a.w("connectionChange",!0),a.dc()):Dj(a))}
g.ld=function(a){a.params?this.j("Received: action="+a.action+", params="+U(a.params)):this.j("Received: action="+a.action);Lj(this,a);Mj(this,a);if(this.g&&isNaN(this.Ha)){var b=!1,c=!1,d,e,f,h,k,l,p;a.params&&(d=a.params.videoId||a.params.video_id,e=a.params.videoIds||a.params.video_ids,f=a.params.state,h=a.params.currentTime||a.params.current_time,k=a.params.volume,l=a.params.muted,s(a.params.currentError)&&(p=Bd(a.params.currentError)));if("onSubtitlesTrackChanged"==a.action)d==Zi(this.b)&&(delete a.params.videoId,
ab(a.params)?this.b.i=null:this.b.i=a.params,zj(this,"playerChange"));else if(Zi(this.b)||'"onStateChange"'!=a.action){"playlistModified"!=a.action&&"nowPlayingPlaylist"!=a.action||e?(d||"nowPlaying"!=a.action&&"nowPlayingPlaylist"!=a.action?d?d!=Zi(this.b)&&(b=!0):d=Zi(this.b):($i(this.b,""),b=!0),e&&(e=e.split(","),aj(this.b,e,d)&&(b=!0))):(aj(this.b,[]),b=!0);e=this.b;var r=d;r&&!C(e.b,r)?(e.b.push(r),e=!0):e=!1;e&&Ij(this,"getPlaylist");d&&$i(this.b,d);b&&zj(this,"playlistChange");s(f)&&(b=parseInt(f,
10),b=isNaN(b)?-1:b,-1==b&&-1E3==this.b.g&&(b=-1E3),c=c||b!=this.b.g,this.b.g=b,d=null,-1E3==b&&(d=this.b.h||"unknown",p&&(d=p.reason||d)),c=c||this.b.h!=d,this.b.h=d,1==this.b.g?(Kj(this),this.Nb=M(v(this.dc,this),2E4)):Kj(this));"onError"!=a.action||-1!=this.b.g&&-1E3!=this.b.g||(a=Bd(a.params.errors)||[],1==a.length&&("PLAYER_ERROR"==a[0].error&&a[0].videoId==Zi(this.b))&&(this.b.g=-1E3,this.b.h=a[0].reason||"unknown",c=!0));h&&(w(),c=!0);s(k)&&(b=parseInt(k,10),isNaN(b)||(c=c||this.b.volume!=
b,this.b.volume=b),s(l)&&(l="true"==l,c=c||this.b.muted!=l,this.b.muted=l));c&&zj(this,"playerChange")}}};g.jd=function(){this.j("App screens changed");var a=wg(),b=yj();b&&((a=ng(a,b))?mg(a,b)||qg(Xf(a)):(sg(),this.j("Dropping session screen: "+Yf(b))));b=wg();this.g&&((b=ng(b,this.g),b)?mg(b,this.g)||(Aj(this,b),this.b&&(this.b.p=b)):(this.j("Dropping current screen: "+Yf(this.g)),Dj(this),this.b=null))};function Nj(){xj.call(this,"Desktop","youtube-desktop");N(window,"unload",v(this.H,this));N(window,"beforeunload",v(this.H,this))}y(Nj,xj);ca(Nj);Nj.prototype.H=function(){Ej(this)};function Oj(a,b){var c=xc(a),d;if(!(d=c==xc(window.location.href))){if(c=!c)c=0==a.lastIndexOf("/",0);d=c}if(d&&(c=vc(a),c=tc(null,null,c[5],c[6],c[7]),d=c.indexOf("#"),c=0>d?c:c.substr(0,d))){for(var e=d=0;e<c.length;++e)d=31*d+c.charCodeAt(e),d%=4294967296;c="s_tempdata-"+d;d=b?Se(b):"";Je(c,d,5)}};var Pj={};function Qj(a,b,c){a=J(a);if(!a)return null;b=rd(b);var d="player"+ha(a),e=Pj[d];!e||J(e.h)&&e.g.loadVideoByPlayerVars||(e.$b(),e=null);e?Rj(e,b,c):e=new Sj(a,d,b,c);Pj[d]=e;M(function(){e.ob();Q("player-added",e.g)},0);return e.g}function Tj(a,b,c){return Qj(a,b,{force:c})}function Uj(a){if(a=J(a)){a="player"+ha(a);var b=Pj[a];b&&b.dispose();Pj[a]=null}}function Vj(a){a=J(a);if(!a)return null;a="player"+ha(a);return(a=Pj[a])?a.g:null}
function Wj(a){a=Pj[a];if(!a.C){a.C=!0;for(var b=J(a.h),c=b.getApiInterface(),d=0;d<c.length;d++){var e=c[d];"addEventListener"==e?a.H=v(b[e],b):"destroy"==e?a.da=v(b[e],b):"removeEventListener"==e?a.ca=v(b[e],b):a.g[e]=v(b[e],b)}for(var f in a.k)a.H(f,a.k[f]);a.pb("onTabOrderChange",v(a.td,a));a.pb("onNavigate",v(a.vd,a));"flash"==a.i&&a.pb("onRemoteReceiverSelected",v(a.ud,a));Nj.getInstance().h.I("onlineReceiverChange",a.ac,a);a.ea&&a.ea(a.g);a.W.w("onReady",a.g)}Q("player-ready",a.g)}
function Sj(a,b,c,d){this.Ea=this.o=a;this.Da=b;this.g={addEventListener:v(this.pb,this),removeEventListener:v(this.Yc,this),destroy:v(this.$b,this),getPlayerType:v(this.Xc,this),writePlayer:v(this.ob,this),isReady:v(this.Zc,this)};this.da=this.ca=this.H=null;this.W=new O;pc(this,ma(qc,this.W));this.k={};this.C=this.ra=!1;this.ea=this.Va=this.h=this.q=this.b=null;this.i="flash";this.ka={};this.mb=["onReady"];Rj(this,c,d);if(a=this.b.attrs.width)this.o.style.width=Lc(Number(a)||a,!0);if(a=this.b.attrs.height)this.o.style.height=
Lc(Number(a)||a,!0);a=this.o;u("overflow")?Fc(a,"hidden","overflow"):Wa("overflow",ma(Fc,a))}y(Sj,oc);
function Rj(a,b,c){a.b=b.B();a.h=a.b.attrs.id||a.h;a.o.id==a.h&&(a.h=a.h+"-player",a.b.attrs.id=a.h);a.Va=a.b.args.el;a.q=c||null;(b=a.b.args.eurl)||(b=document.location.toString(),b=-1!=b.indexOf("/embed/")?document.referrer&&document.referrer.substring(0,128)||"unknown":b);a.b.args.eurl=b;a.b.args.enablejsapi="1";a.b.args.playerapiid=a.Da;zf()&&(n("yt.player.Application")||a.b.assets.js)||(a.b.args.html5_unavailable="1",a.b.disable.html5=!0);a.b.fallback=v(a.sc,a);a.ea||(a.ea=Xj(a,a.b.args.jsapicallback||
"onYouTubePlayerReady"));a.b.args.jsapicallback="ytPlayerOnYouTubePlayerReady"}g=Sj.prototype;g.ud=function(a){var b=xg();if(dg(b,a)&&"html5"!=this.i){var b=this.b.args.video_id,c=this.g.getCurrentTime();this.g.stopVideo();var d=Nj.getInstance(),e=[a,b,c];d.j("Setting the delayed connect data: "+U(e));!vj(d.h,a)&&(a=wj(d.h,a))&&(d=cg(),e.push(d),Qg(a.id,d,b,c));Td("yt-remote-delayed-connect-key",e);this.ob("html5")}};
g.sc=function(a){a=rd(a||this.b);var b=!0;if("flash"==this.i)a.disable.flash=!0,this.ra&&(b=!1);else if("html5"==this.i){var c=J(this.h);c.stopVideo&&c.stopVideo();a.disable.flash?b=!1:(a.args.autoplay=1,a.args.html5_unavailable="1",a.disable.html5=!0)}b&&(Rj(this,a),this.ob())};
g.ob=function(a){if(!this.p){if(!a){a=!!this.b.disable.html5;var b=!!this.b.disable.flash;a=!this.b.html5&&!b||a?b?"unsupported":"flash":"html5"}("flash"==a?this.gd:"html5"==a?this.fc:this.fd).call(this);this.b.loaded||(a=this.b.args,J(this.h)&&this.g.loadVideoByPlayerVars&&("0"!=a.autoplay?this.g.loadVideoByPlayerVars(a):this.g.cueVideoByPlayerVars(a)),this.b.loaded=!0)}};
g.fc=function(){this.i="html5";var a=this.b.B(),b=n("yt.player.Application");if(b)this.q?(this.Rb(),this.q=null):(Yj(this),this.ra=!0,this.C=!1,new b(this.Ea,a));else{var a=this.b.assets.js,b=v(this.fc,this),c;c=a.indexOf("jsbin/");c=0<=c?c+6:c;var d=a.indexOf("-vfl"),d=0<=d?d:a.indexOf(".js");c=0<=c&&0<=d?a.substring(c,d).replace(tf,""):"";rf(a,b,c)}};
g.gd=function(){this.i="flash";var a=this.b.B();a.attrs.width=a.attrs.width||"100%";a.attrs.height=a.attrs.height||"100%";this.q?(gf(a,!!this.q.force,v(this.Rb,this)),this.q=null):(this.C=!1,df(this.Ea,a),this.b.loaded=!0)};g.Rb=function(){var a=J(this.h);a&&a.getApiInterface?a.hasFallbackHappened&&a.hasFallbackHappened()?this.sc():Wj(this.Da):M(v(this.Rb,this),50)};function Yj(a){var b=J(a.h);b&&b.destroy&&b.destroy();a.ra=!1;for(a=a.Ea;b=a.firstChild;)a.removeChild(b)}g.Zc=function(){return this.C};
g.ac=function(){this.g.updateRemoteReceivers&&this.g.updateRemoteReceivers(xg())};g.pb=function(a,b){var c=Xj(this,b);if(c){if(!C(this.mb,a)&&!this.k[a]){var d=Zj(this,a);this.H&&this.H(a,d)}this.W.I(a,c)}};g.Yc=function(a,b){var c=Xj(this,b);c&&this.W.xa(a,c)};function Xj(a,b){var c=b;if("string"==typeof b){if(a.ka[b])return a.ka[b];c=function(){var a=n(b);a&&a.apply(m,arguments)};a.ka[b]=c}return c?c:null}
function Zj(a,b){var c="ytPlayer"+b+a.Da;a.k[b]=c;m[c]=function(c){M(function(){a.p||a.W.w(b,c)},0)};return c}g.td=function(a){a=a?Mb:Lb;for(var b=a(document.activeElement);b&&(1!=b.nodeType||(b.focus(),b!=document.activeElement));)b=a(b)};g.vd=function(a){var b=L("EVENT_ID");b&&Oj(a.url,{ei:b,feature:a.feature})};
g.fd=function(){var a=ic("PLAYER_FALLBACK_OVERRIDE");if(!a){var a=ic("PLAYER_FALLBACK",void 0,'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=ic("QUICKTIME_FALLBACK",void 0,'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>'))}this.o.innerHTML=
'<div class="ytp-fallback"><div class="ytp-fallback-content">'+a+"</div></div>";if("embedded"==this.Va)for(a=this.o.getElementsByTagName("a"),b=0;b<a.length;b++)a[b].setAttribute("target","_blank")};g.Xc=function(){return this.i};g.$b=function(){ak(this.o)};
g.K=function(){this.ka=null;for(var a in this.k)this.ca&&this.ca(a,this.k[a]),delete m[this.k[a]];this.ca=this.H=null;this.da&&(this.da(),this.da=null);this.g=null;this.b=this.b.fallback=null;Yj(this);Nj.getInstance().h.xa("onlineReceiverChange",this.ac,this);Sj.R.K.call(this)};var bk=n("yt.player.embed")||Qj;x("yt.player.embed",bk);var ck=n("yt.player.update")||Tj;x("yt.player.update",ck);var ak=n("yt.player.destroy")||Uj;x("yt.player.destroy",ak);var dk=n("yt.player.getPlayerByElement")||Vj;
x("yt.player.getPlayerByElement",dk);n("ytPlayerOnYouTubePlayerReady")||x("ytPlayerOnYouTubePlayerReady",Wj);var ek={},fk=0;function gk(a){if(a){var b=new Image,c=""+fk++;ek[c]=b;b.onload=b.onerror=function(){delete ek[c]};b.src=a;b=eval("null")}};function hk(){var a=ik().tick,b=ik().span,c=ik().info,d=n("yt.timing.reportbuilder_");if(d){if(d=d.apply(null,[a,b,c,void 0]))jk(d),kk()}else{var d={v:2,s:"youtube",action:L("TIMING_ACTION")},e=L("TIMING_INFO")||{},f;for(f in e)c[f]=e[f];f=c.srt;delete c.srt;if(!f&&0!==f)try{var h=(window.performance||window.mozPerformance||window.msPerformance||window.webkitPerformance).timing;f=h.responseStart-h.navigationStart}catch(k){c.pt&&(f=c.pt)}if(f||0===f)c.srt=f;a.aft||(a.aft=a.vr&&a.cl&&a.cl>a.vr?a.cl:
a.vr?a.vr:a.ol);a.aft&&a.plev&&(a.aft=Math.min(a.aft,a.plev));a.vr&&a.gv&&(b.vl=Math.round(a.vr-a.gv));for(var l in c)"_"!=l.charAt(0)&&(d[l]=c[l]);c={};h=[];l=a._start;for(var p in a)"_"!=p.charAt(0)&&(f=Math.max(Math.round(a[p]-l),0),c[p]=f,h.push(p+"."+f));d.rt=h.join(",");a={};p=[];for(var r in b)"_"!=r.charAt(0)&&(a[r]=b[r],p.push(r+"."+b[r]));d.it=p.join(",");jk(d);(b=n("ytdebug.logTiming"))&&b(d,c,a);kk()}}
function jk(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];gk(b+"?"+c.substring(1))}function ik(){return n("ytcsi.data_")||kk()}function kk(){var a={tick:{},span:{},info:{}};x("ytcsi.data_",a);return a};function lk(a,b){this.source=null;this.i=a||null;this.origin="*";this.q=window.document.location.protocol+"//"+window.document.location.hostname;this.k=b;this.h=this.b=this.g=this.p=null;N(window,"message",v(this.o,this))}
lk.prototype.o=function(a){var b=this.k||L("POST_MESSAGE_ORIGIN")||this.q;if("*"==b||a.origin==b)if(!this.i||a.source==this.i)switch(this.source=a.source,this.origin="null"==a.origin?this.origin:a.origin,a=Bd(a.data),this.p=a.id,a.event){case "listening":this.b&&(this.b(),this.b=null);break;case "command":this.g&&(this.h&&!C(this.h,a.func)||this.g(a.func,a.args))}};lk.prototype.sendMessage=function(a){this.source&&(a.id=this.p,a=U(a),this.source.postMessage(a,this.origin))};function mk(){var a=this.g=new lk,b=v(this.Fd,this);a.g=b;a.h=null;this.h=[];this.q=!1;this.o=(a=L("POST_MESSAGE_ORIGIN"))&&RegExp("^https?://([a-z0-9-]{1,63}\\.)*("+Vf.join("|").replace(/\./g,".")+")(:[0-9]+)?([/?#]|$)","i").test(a)?a:null;this.i={}}g=mk.prototype;g.Fd=function(a,b){if(this.o&&this.o!=this.g.origin)this.dispose();else if("addEventListener"==a&&b){var c=b[0];this.i[c]||(this.addEventListener(c,nk(this,c)),this.i[c]=!0)}else this.yc(a,b)};g.yc=function(){};
function nk(a,b){return v(function(a){this.sendMessage(b,a)},a)}g.addEventListener=function(){};g.sd=function(){this.q=!0;this.sendMessage("initialDelivery",this.Vb());this.sendMessage("onReady");A(this.h,this.Bc,this);this.h=[]};g.Vb=function(){return null};function ok(a,b){a.sendMessage("infoDelivery",b)}g.Bc=function(a){this.q?this.g.sendMessage(a):this.h.push(a)};g.sendMessage=function(a,b){this.Bc({event:a,info:void 0==b?null:b})};g.dispose=function(){this.g=null};function pk(a){mk.call(this);this.b=a;this.p={};this.k={};this.b.addEventListener("onReady",v(this.wd,this));this.b.addEventListener("onVideoProgress",v(this.Cd,this));this.b.addEventListener("onVolumeChange",v(this.Dd,this));this.b.addEventListener("onApiChange",v(this.xd,this));this.b.addEventListener("onPlaybackQualityChange",v(this.yd,this));this.b.addEventListener("onPlaybackRateChange",v(this.zd,this));this.b.addEventListener("onStateChange",v(this.Bd,this))}y(pk,mk);
function qk(a,b){Wa(a.p,function(a,d){if(b[d]){var e=this.k[a];e&&(b[a]=e)}},a);return b}g=pk.prototype;g.yc=function(a,b){if(this.b[a]){b=b||[];var c;if(c=0==a.search("cue")||0==a.search("load")){c=b[0];var d=typeof c;c="object"==d&&null!=c||"function"==d}c&&(b[0]=qk(this,b[0]));this.b[a].apply(this.b,b);0!=a.search("cue")&&0!=a.search("load")||ok(this,this.Vb())}};g.wd=function(){var a=v(this.sd,this);this.g.b=a};g.addEventListener=function(a,b){this.b.addEventListener(a,b)};
g.Vb=function(){var a=this.b.getApiInterface();Ga(a,"getVideoData");for(var b={apiInterface:a},c=0,d=a.length;c<d;c++){var e=a[c];if(0==e.search("get")||0==e.search("is")){var f;f=e;var 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(l){}}}b.videoData={video_id:this.b.getVideoData().video_id};return b};
g.Bd=function(a){ok(this,{playerState:a,currentTime:this.b.getCurrentTime(),duration:this.b.getDuration(),videoData:{video_id:this.b.getVideoData().video_id},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()})};
g.yd=function(a){ok(this,{playbackQuality:a})};g.zd=function(a){ok(this,{playbackRate:a})};g.xd=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 l=f[h],p=this.b.getOption(e,l);b[e][l]=p}}this.sendMessage("apiInfoDelivery",b)};g.Dd=function(){ok(this,{muted:this.b.isMuted(),volume:this.b.getVolume()})};
g.Cd=function(a){ok(this,{currentTime:a,videoBytesLoaded:this.b.getVideoBytesLoaded(),videoLoadedFraction:this.b.getVideoLoadedFraction()})};function rk(a,b){var c=L("CONVERSION_CONFIG_DICT");if(c){if(u(b)){var d=24==b.length&&"UC"==b.slice(0,2)?b.substr(2):22==b.length?b:null;if(c.uid!=d)return}var e="followon_"+a;if(c.baseUrl&&c.uid){var f=c.rmktEnabled,d=c.focEnabled&&!c.isAd;if(f||d){e={label:d?e:"default"};if(f){f={utuid:c.uid,type:a};c.vid&&(f.utvid=c.vid);c.eventLabel&&(f.el=c.eventLabel);c.playerStyle&&(f.ps=c.playerStyle);c.feature&&(f.feature=c.feature);c.ppe&&(f.ppe=c.ppe);var h=[],k;for(k in f)h.push(encodeURIComponent(k)+
"="+encodeURIComponent(f[k]));e.data=h.join(";")}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.foc_id=c.uid);c=yc(Bc([c.baseUrl],e))}else c=null}else c=null;c&&gk(c)}};var sk=[];function tk(a,b,c,d,e){b?Q("ypc-delayedloader-load",function(){Q("ypc-init-subscription",b)}):uk(a,c,d,e)}function vk(a,b,c,d,e,f){c?Q("ypc-delayedloader-load",function(){Q("ypc-subscription-cancel",c)}):wk(a,b,d,e,f)}
function xk(a){if(a.length){var b=La(a,0,40);Q("subscription-batch-subscribe-loading",b);yk("subscription-subscribe-loading",b);var c={};c.session_token=fc();c.a=b.join(",");var d=function(){Q("subscription-batch-subscribe-loaded",b);yk("subscription-subscribe-loaded",b)};dj("/subscription_ajax?action_create_subscription_to_all=1",{method:"POST",ha:c,aa:function(c,f){d();var h=f.response,k=h.id;if(t(k)&&k.length==b.length){var l={};A(k,function(a,c){l[b[c]]=a});Q("subscription-batch-subscribe-success",
l);Wa(l,function(a,b){Q("subscription-subscribe-success",b,a)});(h=h.guide_notification_html_content)&&Q("guide-add-subscription",h);a.length&&xk(a)}},onError:function(){d();Q("subscription-batch-subscribe-failure",b);yk("subscription-subscribe-failure",b)}})}}
function zk(a){if(!ab(a)){var b=Ya(a),c=La(b,0,40),d=[];A(c,function(b){d.push(a[b])});var e={};A(b,function(b){e[b]=a[b]});Q("subscription-batch-unsubscribe-loading",c);yk("subscription-unsubscirbe-loading",c);b={};b.session_token=fc();b.s=d.join(",");var f=function(){Q("subscription-batch-unsubscribe-loaded",c);yk("subscription-unsubscribe-loaded",c)};dj("/subscription_ajax?action_remove_subscriptions=1",{method:"POST",ha:b,aa:function(){f();Q("subscription-batch-unsubscribe-success",c);yk("subscription-unsubscribe-success",
c);ab(e)||zk(e)},onError:function(){f();Q("subscription-batch-unsubscribe-failure",c);yk("subscription-unsubscribe-failure",c)}})}}function Ak(a,b,c){Bk(a,b,null,c)}function Ck(a,b,c){Bk(a,null,b,c)}function Dk(a,b,c){Ek(a,b,null,c)}function Fk(a,b,c){Ek(a,null,b,c)}function Gk(a,b,c,d){Bk(a,b,c,d)}function Hk(a,b,c,d){a=a.subscriptionElement||null;(b=b.subscriptionId)&&Q("subscription-subscribe-success",d,b,a)}
function Ik(a,b){Wa(a,function(a,b){Q("subscription-subscribe-success",b,a)});Q("guide-add-subscription",b)}function Jk(a,b){Q("subscription-unsubscribe-success",a.itemId,a.subscriptionElement||null);b&&(Q("subscription-batch-unsubscribe-success",b),yk("subscription-unsubscribe-success",b),yk("subscription-enable-ypc",b))}
function uk(a,b,c,d){Q("subscription-subscribe-loading",a);var e={};e.c=a;d&&(e.eurl=d);d={};d.session_token=fc();var f=L("PLAYBACK_ID");f&&(d.plid=f);c&&Kk("/subscription_ajax?action_create_subscription_to_channel=1",e,c);dj("/subscription_ajax?action_create_subscription_to_channel=1",{method:"POST",Gc:e,ha:d,aa:function(c,d){var e=d.response;Q("subscription-subscribe-success",a,e.id,b);e.show_feed_privacy_dialog&&Q("SHOW-FEED-PRIVACY-SUBSCRIBE-DIALOG",a);(e=e.guide_notification_html_content)&&Q("guide-add-subscription",
e)},onError:function(){Q("subscription-subscribe-failure",a)},Gb:function(){Q("subscription-subscribe-loaded",a)}});rk("subscribe",a)}
function wk(a,b,c,d,e){Q("subscription-unsubscirbe-loading",a);var f={};e&&(f.eurl=e);e={};e.session_token=fc();e.s=b;(b=L("PLAYBACK_ID"))&&(e.plid=b);d&&Kk("/subscription_ajax?action_remove_subscriptions=1",{},d);dj("/subscription_ajax?action_remove_subscriptions=1",{method:"POST",Gc:f,ha:e,aa:function(){Q("subscription-unsubscribe-success",a,c)},onError:function(){Q("subscription-unsubscribe-failure",a)},Gb:function(){Q("subscription-unsubscribe-loaded",a)}});rk("unsubscribe",a)}
function Bk(a,b,c,d){if(null!==b||null!==c){Q("subscription-prefs-loading",a);var e={};e.session_token=fc();e.subscription_id=a;null===b||(e.email_on_upload=b);null===c||(e.uploads_only=c);dj("/subscription_ajax?action_update_subscription_preferences=1",{method:"POST",ha:e,aa:function(){Q("subscription-prefs-success",a)},onError:function(){d&&d();Q("subscription-prefs-failure",a)},Gb:function(){Q("subscription-prefs-loaded",a)}})}}
function Ek(a,b,c,d){if(a.length&&(null!==b||null!==c)){var e=La(a,0,40);Q("subscription-batch-prefs-loading",e);var f={};f.session_token=fc();f.s=e.join(",");null===b||(f.email_on_upload=b);null===c||(f.uploads_only=c);var h=function(){Q("subscription-batch-prefs-loaded",e)};dj("/subscription_ajax?action_update_subscription_preferences_batch=1",{method:"POST",ha:f,aa:function(){h();Q("subscription-batch-prefs-success",e);a.length&&Ek(a,b,c,d)},onError:function(){h();d&&d();Q("subscription-batch-prefs-failure",
e)}})}}function yk(a,b){A(b,function(b){Q(a,b)})}function Kk(a,b,c){a=Ue(a,b);c=Re(c);Oj(a,c)};function Lk(a,b){var c=Mk();if(c){var d=Ke(c,"").split(","),d=ya(d,function(b){return 0!=b.indexOf(a)&&!!b.length});4<=d.length&&d.shift();d.push(a+":"+b);Je(c,d.join(","),1814400)}}function Nk(a){var b=Mk();if(b){var c=Ke(b,"").split(","),c=ya(c,function(b){return 0!=b.indexOf(a)});0==c.length?Le(b):Je(b,c.join(","),1814400)}}function Ok(){var a=L("PLAYER_REFERENCE");if(a){var b=L("VIDEO_ID"),c=a.getDuration(),a=Math.floor(a.getCurrentTime());0==c||120>=a||a+120>=c?Nk(b):Lk(b,Math.floor(a))}}
function Pk(){Mk()&&N(window,"beforeunload",Ok);Ca(tg())&&Ca(vg())||(void 0).updateRemoteReceivers(xg())}function Mk(){return L("RESUME_COOKIE_NAME")};var Qk=null,Rk=null,Sk={cc_load_policy:"cc3_module",threed_load_policy:"threed_module"};function Tk(a){var b={};Wa(Sk,function(c){a.args[c]&&(b[c]=a.args[c],delete a.args[c])});return b}function Uk(a){var b={};b.volume=isNaN(a.volume)?Yd().volume:Math.min(Math.max(a.volume,0),100);b.nonNormalized=a.nonNormalized;b.muted=void 0==a.muted?Yd().muted:a.muted;Td("yt-player-volume",b,2592E3)};x("yt.setAjaxToken",ec);x("yt.setConfig",cc);x("yt.setMsg",function(a){dc(ac,arguments)});x("yt.embed.openLoginDialog",function(){Dc(function(a){Qk.b&&Qk.b(a)})});
x("writeEmbed",function(){var a=new nd(L("PLAYER_CONFIG")),b=Tk(a);a.args.jsapicallback=Pk;var c;c=window.location.hash;"#"==c.charAt(0)&&(c="!"==c.charAt(1)?c.substr(2):c.substr(1));c=Re(c);if(c=c.t||c.at){var d=window.location.hash.replace(/\bat=[^&]*&?/,"");window.location.hash=d&&"#"!=d?d:"#!";d=c;c=0;-1!=d.indexOf("h")&&(d=d.split("h"),c=3600*d[0],d=d[1]);-1!=d.indexOf("m")&&(d=d.split("m"),c=60*d[0]+c,d=d[1]);-1!=d.indexOf("s")?(d=d.split("s"),c=1*d[0]+c):c=1*d+c}else c=0;c&&(a.args.start=c,
a.args.resume=1);a.args.el="embedded";L("CUED_AUTOPLAY")&&(a.args.autoplay=1);Qk=bk("player",a);Qk.addEventListener("onVolumeChange",Uk);a=Rk=new pk(Qk);a.p=Sk;a.k=b});
N(window,"load",function(){ik().tick.ol=w();var a=L("TIMING_ACTION"),b=!!L("TIMING_WFF"),c=ik().tick;a&&c._start&&(b&&c.vr?hk():b||!c.ol&&!c.aft||hk());sk.push(P("subscription-subscribe",tk));sk.push(P("subscription-unsubscribe",vk));sk.push(P("subscription-batch-subscribe",xk));sk.push(P("subscription-batch-unsubscribe",zk));sk.push(P("subscription-pref-email",Ak));sk.push(P("subscription-pref-uploads",Ck));sk.push(P("subscription-prefs",Gk));sk.push(P("subscription-batch-pref-email",Dk));sk.push(P("subscription-batch-pref-uploads",
Fk));sk.push(P("ypc-purchase-success",Hk));sk.push(P("ypc-subscription-cancel-success",Jk));sk.push(P("ypc-guide-sync-success",Ik))});N(window,"unload",function(){Qk.destroy();Rk.dispose()});var Vk=jd.getInstance(),Wk=S(Vk);Wk in Zc||!Vk.Wc()||(Vk.register(),Zc[Wk]=Vk);})();
