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