(function(g){var window=this;'use strict';var lgb=function(a){a.mutedAutoplay=!1;a.endSeconds=NaN;a.limitedPlaybackDurationInSeconds=NaN;g.MM(a)},mgb=function(){return{I:"svg", Y:{height:"100%",version:"1.1",viewBox:"0 0 110 26",width:"100%"},X:[{I:"path",yc:!0,S:"ytp-svg-fill",Y:{d:"M 16.68,.99 C 13.55,1.03 7.02,1.16 4.99,1.68 c -1.49,.4 -2.59,1.6 -2.99,3 -0.69,2.7 -0.68,8.31 -0.68,8.31 0,0 -0.01,5.61 .68,8.31 .39,1.5 1.59,2.6 2.99,3 2.69,.7 13.40,.68 13.40,.68 0,0 10.70,.01 13.40,-0.68 1.5,-0.4 2.59,-1.6 2.99,-3 .69,-2.7 .68,-8.31 .68,-8.31 0,0 .11,-5.61 -0.68,-8.31 -0.4,-1.5 -1.59,-2.6 -2.99,-3 C 29.11,.98 18.40,.99 18.40,.99 c 0,0 -0.67,-0.01 -1.71,0 z m 72.21,.90 0,21.28 2.78,0 .31,-1.37 .09,0 c .3,.5 .71,.88 1.21,1.18 .5,.3 1.08,.40 1.68,.40 1.1,0 1.99,-0.49 2.49,-1.59 .5,-1.1 .81,-2.70 .81,-4.90 l 0,-2.40 c 0,-1.6 -0.11,-2.90 -0.31,-3.90 -0.2,-0.89 -0.5,-1.59 -1,-2.09 -0.5,-0.4 -1.10,-0.59 -1.90,-0.59 -0.59,0 -1.18,.19 -1.68,.49 -0.49,.3 -1.01,.80 -1.21,1.40 l 0,-7.90 -3.28,0 z m -49.99,.78 3.90,13.90 .18,6.71 3.31,0 0,-6.71 3.87,-13.90 -3.37,0 -1.40,6.31 c -0.4,1.89 -0.71,3.19 -0.81,3.99 l -0.09,0 c -0.2,-1.1 -0.51,-2.4 -0.81,-3.99 l -1.37,-6.31 -3.40,0 z m 29.59,0 0,2.71 3.40,0 0,17.90 3.28,0 0,-17.90 3.40,0 c 0,0 .00,-2.71 -0.09,-2.71 l -9.99,0 z m -53.49,5.12 8.90,5.18 -8.90,5.09 0,-10.28 z m 89.40,.09 c -1.7,0 -2.89,.59 -3.59,1.59 -0.69,.99 -0.99,2.60 -0.99,4.90 l 0,2.59 c 0,2.2 .30,3.90 .99,4.90 .7,1.1 1.8,1.59 3.5,1.59 1.4,0 2.38,-0.3 3.18,-1 .7,-0.7 1.09,-1.69 1.09,-3.09 l 0,-0.5 -2.90,-0.21 c 0,1 -0.08,1.6 -0.28,2 -0.1,.4 -0.5,.62 -1,.62 -0.3,0 -0.61,-0.11 -0.81,-0.31 -0.2,-0.3 -0.30,-0.59 -0.40,-1.09 -0.1,-0.5 -0.09,-1.21 -0.09,-2.21 l 0,-0.78 5.71,-0.09 0,-2.62 c 0,-1.6 -0.10,-2.78 -0.40,-3.68 -0.2,-0.89 -0.71,-1.59 -1.31,-1.99 -0.7,-0.4 -1.48,-0.59 -2.68,-0.59 z m -50.49,.09 c -1.09,0 -2.01,.18 -2.71,.68 -0.7,.4 -1.2,1.12 -1.49,2.12 -0.3,1 -0.5,2.27 -0.5,3.87 l 0,2.21 c 0,1.5 .10,2.78 .40,3.78 .2,.9 .70,1.62 1.40,2.12 .69,.5 1.71,.68 2.81,.78 1.19,0 2.08,-0.28 2.78,-0.68 .69,-0.4 1.09,-1.09 1.49,-2.09 .39,-1 .49,-2.30 .49,-3.90 l 0,-2.21 c 0,-1.6 -0.2,-2.87 -0.49,-3.87 -0.3,-0.89 -0.8,-1.62 -1.49,-2.12 -0.7,-0.5 -1.58,-0.68 -2.68,-0.68 z m 12.18,.09 0,11.90 c -0.1,.3 -0.29,.48 -0.59,.68 -0.2,.2 -0.51,.31 -0.81,.31 -0.3,0 -0.58,-0.10 -0.68,-0.40 -0.1,-0.3 -0.18,-0.70 -0.18,-1.40 l 0,-10.99 -3.40,0 0,11.21 c 0,1.4 .18,2.39 .68,3.09 .49,.7 1.21,1 2.21,1 1.4,0 2.48,-0.69 3.18,-2.09 l .09,0 .31,1.78 2.59,0 0,-14.99 c 0,0 -3.40,.00 -3.40,-0.09 z m 17.31,0 0,11.90 c -0.1,.3 -0.29,.48 -0.59,.68 -0.2,.2 -0.51,.31 -0.81,.31 -0.3,0 -0.58,-0.10 -0.68,-0.40 -0.1,-0.3 -0.21,-0.70 -0.21,-1.40 l 0,-10.99 -3.40,0 0,11.21 c 0,1.4 .21,2.39 .71,3.09 .5,.7 1.18,1 2.18,1 1.39,0 2.51,-0.69 3.21,-2.09 l .09,0 .28,1.78 2.62,0 0,-14.99 c 0,0 -3.40,.00 -3.40,-0.09 z m 20.90,2.09 c .4,0 .58,.11 .78,.31 .2,.3 .30,.59 .40,1.09 .1,.5 .09,1.21 .09,2.21 l 0,1.09 -2.5,0 0,-1.09 c 0,-1 -0.00,-1.71 .09,-2.21 0,-0.4 .11,-0.8 .31,-1 .2,-0.3 .51,-0.40 .81,-0.40 z m -50.49,.12 c .5,0 .8,.18 1,.68 .19,.5 .28,1.30 .28,2.40 l 0,4.68 c 0,1.1 -0.08,1.90 -0.28,2.40 -0.2,.5 -0.5,.68 -1,.68 -0.5,0 -0.79,-0.18 -0.99,-0.68 -0.2,-0.5 -0.31,-1.30 -0.31,-2.40 l 0,-4.68 c 0,-1.1 .11,-1.90 .31,-2.40 .2,-0.5 .49,-0.68 .99,-0.68 z m 39.68,.09 c .3,0 .61,.10 .81,.40 .2,.3 .27,.67 .37,1.37 .1,.6 .12,1.51 .12,2.71 l .09,1.90 c 0,1.1 .00,1.99 -0.09,2.59 -0.1,.6 -0.19,1.08 -0.49,1.28 -0.2,.3 -0.50,.40 -0.90,.40 -0.3,0 -0.51,-0.08 -0.81,-0.18 -0.2,-0.1 -0.39,-0.29 -0.59,-0.59 l 0,-8.5 c .1,-0.4 .29,-0.7 .59,-1 .3,-0.3 .60,-0.40 .90,-0.40 z"}}]}}, ngb=function(a){g.V.call(this,{I:"div", S:"ytp-related-on-error-overlay"});var b=this;this.api=a;this.J=this.u=0;this.D=new g.lI(this);this.j=[];this.suggestionData=[];this.columns=this.containerWidth=0;this.title=new g.V({I:"h2",S:"ytp-related-title",xa:"{{title}}"});this.previous=new g.V({I:"button",Ka:["ytp-button","ytp-previous"],Y:{"aria-label":"Show previous suggested videos"},X:[g.AQ()]});this.ma=new g.Z2(function(f){b.suggestions.element.scrollLeft=-f}); this.C=this.B=0;this.K=!0;this.next=new g.V({I:"button",Ka:["ytp-button","ytp-next"],Y:{"aria-label":"Show more suggested videos"},X:[g.BQ()]});g.J(this,this.D);a=a.W();this.V=a.C;g.J(this,this.title);this.title.Ha(this.element);this.suggestions=new g.V({I:"div",S:"ytp-suggestions"});g.J(this,this.suggestions);this.suggestions.Ha(this.element);g.J(this,this.previous);this.previous.Ha(this.element);this.previous.Sa("click",this.OZ,this);g.J(this,this.ma);for(var c={Bw:0};16>c.Bw;c={Bw:c.Bw},c.Bw++){var d= new g.V({I:"a",S:"ytp-suggestion-link",Y:{href:"{{link}}",target:a.ea,"aria-label":"{{aria_label}}"},X:[{I:"div",S:"ytp-suggestion-image",X:[{I:"div",Y:{"data-is-live":"{{is_live}}"},S:"ytp-suggestion-duration",xa:"{{duration}}"}]},{I:"div",S:"ytp-suggestion-title",Y:{title:"{{hover_title}}"},xa:"{{title}}"},{I:"div",S:"ytp-suggestion-author",xa:"{{views_or_author}}"}]});g.J(this,d);d.Ha(this.suggestions.element);var e=d.Fa("ytp-suggestion-link");g.$m(e,"transitionDelay",c.Bw/20+"s");this.D.T(e,"click", function(f){return function(h){var l=f.Bw,m=b.suggestionData[l],n=m.sessionData;g.OK(b.api.W())&&b.api.N("web_player_log_click_before_generating_ve_conversion_params")?(b.api.rb(b.j[l].element),l=m.Ck(),m={},g.tJa(b.api,m,"emb_rel_err"),l=g.jj(l,m),g.JS(l,b.api,h)):g.IS(h,b.api,b.V,n||void 0)&&b.api.Nn(m.videoId,n,m.playlistId)}}(c)); this.j.push(d)}g.J(this,this.next);this.next.Ha(this.element);this.next.Sa("click",this.NZ,this);this.D.T(this.api,"videodatachange",this.onVideoDataChange);this.resize(this.api.kb().getPlayerSize());this.onVideoDataChange();this.show()},ogb=function(a,b){if(a.api.W().N("web_player_log_click_before_generating_ve_conversion_params"))for(var c=Math.floor(-a.B/(a.C+a.u)),d=Math.min(c+a.columns,a.suggestionData.length)-1;c<=d;c++)a.api.Xa(a.j[c].element,b)},pgb=function(a){a.next.element.style.bottom= a.J+"px"; a.previous.element.style.bottom=a.J+"px";var b=a.B,c=a.containerWidth-a.suggestionData.length*(a.C+a.u);g.bq(a.element,"ytp-scroll-min",0<=b);g.bq(a.element,"ytp-scroll-max",b<=c)},qgb=function(a){for(var b=0;b=b&&a.j?Z5(a):a.j&&a.j.start()}},Z5=function(a){a.j&&(a.j.dispose(),a.j=null,a.u=!1)},Fgb=function(a){g.uT.call(this,a); this.G=a;this.j=new g.lI(this);this.u=null;this.K=!1;this.countdownTimer=null;this.ea=!1;Egb(this);g.J(this,this.j);this.load()},Hgb=function(a){var b=g.h8a(a.G); if(b!==a.ea&&(a.ea=b,a.D&&(a.D.dispose(),a.D=null),a.B&&(a.B.dispose(),a.B=null),a.C&&(a.C.dispose(),a.C=null),a.u&&(a.u.stop(),a.u.dispose(),a.u=null),b)){b=g.cS(a.G);if(a.G.W().N("shorts_mode_to_player_api")?a.G.Yb():b.Yb())a.C=new g.V({I:"div",S:"ytp-pause-overlay-backdrop",Y:{tabIndex:"-1"}}),g.J(a,a.C),g.sS(a.G,a.C.element,4),a.u=new g.VQ(a.C,1E3,!1,100),g.J(a,a.u),a.C.hide();a.B=new Bgb(a.G,b);g.J(a,a.B);a.D=new g.V({I:"div",S:"ytp-pause-overlay-container",Y:{tabIndex:"-1"},X:[a.B]});g.J(a, a.D);g.sS(a.G,a.D.element,4);Ggb(a,a.G.Ib())}},Ggb=function(a,b){a.u&&(!g.BO(b,4)&&!g.BO(b,2)||g.BO(b,1024)?a.u.hide():a.u.show())},Egb=function(a){var b=a.G,c; a=a.G.W().N("shorts_mode_to_player_api")?!!b.Yb():!(null==(c=g.cS(b))||!c.Yb());g.bq(b.getRootNode(),"ytp-shorts-mode",a);if(b=b.getVideoData())b.zQ=a},$5=function(a,b){a={adSource:"EMBEDS_AD_SOURCE_YOUTUBE", breakType:0===a.G.getCurrentTime()?"EMBEDS_AD_BREAK_TYPE_PRE_ROLL":0===a.G.getPlayerState()?"EMBEDS_AD_BREAK_TYPE_POST_ROLL":"EMBEDS_AD_BREAK_TYPE_MID_ROLL",embedUrl:g.hfa(a.G.W().loaderUrl),eventType:b,youtubeHost:g.dj(a.G.W().Oa)||""};g.OA("embedsAdEvent",a)}; g.x(ngb,g.V);g.k=ngb.prototype;g.k.hide=function(){this.K=!0;g.V.prototype.hide.call(this);ogb(this,!1)}; g.k.show=function(){this.K=!1;g.V.prototype.show.call(this);ogb(this,!0)}; g.k.isHidden=function(){return this.K}; g.k.NZ=function(){this.scrollTo(this.B-this.containerWidth)}; g.k.OZ=function(){this.scrollTo(this.B+this.containerWidth)}; g.k.resize=function(a,b){var c=this.api.W(),d=16/9,e=650<=a.width,f=480>a.width||290>a.height,h=Math.min(this.suggestionData.length,this.j.length);if(150>=Math.min(a.width,a.height)||0===h||!c.yd)this.hide();else{var l;if(e){var m=l=28;this.u=16}else this.u=m=l=8;if(f){var n=6;e=14;var p=12;f=24;c=12}else n=8,e=18,p=16,f=36,c=16;a=a.width-(48+l+m);l=Math.ceil(a/150);l=Math.min(3,l);m=a/l-this.u;var q=Math.floor(m/d);b&&q+100>b&&50m||g.pS(this.api)?this.hide():this.show();for(b=0;bm?"none":""}h=e+n+p+4;this.J=h+c+(q-f)/2;this.suggestions.element.style.height=q+h+"px";this.C=m;this.containerWidth=a;this.columns=l;this.B=0;this.suggestions.element.scrollLeft= -0;pgb(this)}}; g.k.onVideoDataChange=function(){var a=this.api.getVideoData(),b=this.api.W();this.V=a.wd?!1:b.C;a.suggestions?this.suggestionData=g.fo(a.suggestions,function(c){return c&&!c.playlistId}):this.suggestionData.length=0; qgb(this);a.wd?this.title.update({title:g.XO("More videos from $DNI_RELATED_CHANNEL",{DNI_RELATED_CHANNEL:a.author})}):this.title.update({title:"More videos on YouTube"})}; g.k.scrollTo=function(a){a=g.oe(a,this.containerWidth-this.suggestionData.length*(this.C+this.u),0);this.ma.start(this.B,a,1E3);this.B=a;pgb(this);ogb(this,!0)};g.x(T5,g.NT);T5.prototype.show=function(){g.NT.prototype.show.call(this);tgb(this,this.api.kb().getPlayerSize())}; T5.prototype.resize=function(a){g.NT.prototype.resize.call(this,a);this.j&&(tgb(this,a),g.bq(this.element,"related-on-error-overlay-visible",!this.j.isHidden()))}; T5.prototype.u=function(a){g.NT.prototype.u.call(this,a);var b=this.api.getVideoData();if(b.MI||b.playerErrorMessageRenderer)(a=b.MI)?wgb(this,a):b.playerErrorMessageRenderer&&wgb(this,b.playerErrorMessageRenderer);else{var c;a.Mm&&(b.hx?ugb(b.hx)?c=g.CE(b.hx):c=g.OT(g.BE(b.hx)):c=g.OT(a.Mm),this.Yd(c,"subreason"))}};g.x(U5,g.V);U5.prototype.Ki=function(){this.api.Ib().isCued()||(this.hide(),this.api.Xa(this.element,!1))}; U5.prototype.j=function(){var a=this.api.getVideoData(),b=this.api.W(),c=this.api.getVideoData().wd,d=b.Ed,e=!b.yd,f=this.u,h=b.N("shorts_mode_to_player_api")?this.api.Yb():f.Yb();f=f.ah();var l=g.XK(b);b=b.B;d||f||c||e||l||b||h||!a.videoId?(this.hide(),this.api.Xa(this.element,!1)):(a=xgb(this),this.updateValue("url",a),this.show())}; U5.prototype.onClick=function(a){this.api.N("web_player_log_click_before_generating_ve_conversion_params")&&this.api.rb(this.element);var b=xgb(this);g.JS(b,this.api,a);this.api.N("web_player_log_click_before_generating_ve_conversion_params")||this.api.rb(this.element)}; U5.prototype.show=function(){this.api.Ib().isCued()&&(g.V.prototype.show.call(this),this.api.Fk(this.element)&&this.api.Xa(this.element,!0))};g.x(V5,g.V);V5.prototype.Ki=function(){var a=this.api.Ib();!this.api.Dh()||g.BO(a,2)&&g.mS(this.api)||g.BO(a,64)?(this.api.Xa(this.j,!1),this.api.Xa(this.forwardButton,!1),this.hide()):(this.show(),this.api.Xa(this.j,!0),this.api.Xa(this.forwardButton,!0))}; V5.prototype.u=function(){this.api.seekBy(-10*this.api.getPlaybackRate());this.api.rb(this.j)}; V5.prototype.B=function(){this.api.seekBy(10*this.api.getPlaybackRate());this.api.rb(this.forwardButton)};g.x(W5,g.V);W5.prototype.B=function(){var a=this.api.Ib(),b=this.api.getVideoData();this.api.W().N("embeds_enable_muted_autoplay")&&b.mutedAutoplay&&(g.BO(a,2)&&!this.Bb?(this.show(),this.j||(this.j=new g.LT(this.api),g.J(this,this.j),this.j.Ha(this.C,0),this.j.show()),a=this.api.getVideoData(),this.updateValue("text",a.CV),g.bq(this.element,"ytp-muted-autoplay-show-end-panel",!0),this.api.Xa(this.element,this.Bb),this.api.Pa("onMutedAutoplayEnds")):this.hide())}; W5.prototype.onClick=function(){if(!this.u){this.j&&(this.j.ra(),this.j=null);g.bq(this.api.getRootNode(),"ytp-muted-autoplay",!1);var a=this.api.getVideoData(),b=this.api.getCurrentTime();lgb(a);this.api.loadVideoById(a.videoId,b);this.api.rb(this.element);this.hide();this.u=!0}}; W5.prototype.onMutedAutoplayStarts=function(){this.u=!1;this.j&&(this.j.ra(),this.j=null)};g.x(X5,g.V);g.k=X5.prototype;g.k.HY=function(){var a=this.api.getVideoData(),b=this.api.getVideoData(1).wd,c=this.api.W();b=c.Ed&&!g.BO(this.state,2)&&!(b&&c.ma);a.mutedAutoplay||g.wQ(this,b);this.api.Xa(this.element,b)}; g.k.onStateChange=function(a){this.xc(a.state)}; g.k.xc=function(a){this.state!==a&&(this.state=a);this.HY()}; g.k.onVideoDataChange=function(){var a=this.api.W();a.B&&g.Yp(this.element,"ytp-no-hover");this.api.getVideoData().videoId&&!a.B?(a=this.api.getVideoUrl(!0,!1,!1,!0),this.updateValue("url",a),this.j||(this.j=this.Sa("click",this.onClick))):this.j&&(this.updateValue("url",null),this.Ic(this.j),this.j=null)}; g.k.onClick=function(a){this.api.N("web_player_log_click_before_generating_ve_conversion_params")&&this.api.rb(this.element);var b=this.api.getVideoUrl(!g.eR(a),!1,!0,!0);if(this.api.N("web_player_log_click_before_generating_ve_conversion_params")){var c={};g.aS(this.api,"addEmbedsConversionTrackingParams",[c]);b=g.jj(b,g.SR(c,"emb_yt_watermark"))}g.JS(b,this.api,a);this.api.N("web_player_log_click_before_generating_ve_conversion_params")||this.api.rb(this.element)}; g.k.Gb=function(a){if((a=480>a.width)&&!this.u||!a&&this.u){var b=new g.V(mgb()),c=this.Fa("ytp-watermark");g.bq(c,"ytp-watermark-small",a);g.af(c);b.Ha(c);this.u=a}};g.x(Agb,g.V);g.k=Agb.prototype;g.k.YI=function(){var a=this.api.Ib(),b=this.api.getVideoData();this.api.W().N("embeds_enable_muted_autoplay")&&b.mutedAutoplay&&!g.BO(a,2)?this.Bb||(g.V.prototype.show.call(this),this.api.Xa(this.element,this.Bb)):this.hide()}; g.k.X3=function(){this.j&&this.j.hide()}; g.k.onAutoplayBlocked=function(){this.hide();lgb(this.api.getVideoData())}; g.k.onClick=function(){if(!this.u){g.bq(this.api.getRootNode(),"ytp-muted-autoplay",!1);var a=this.api.getVideoData(),b=this.api.getCurrentTime();lgb(a);this.api.loadVideoById(a.videoId,b);this.api.rb(this.element);this.api.Pa("onMutedAutoplayEnds");this.u=!0}}; g.k.onMutedAutoplayEnds=function(){this.watermark&&(this.watermark.ra(),this.watermark=null)};g.x(Bgb,g.V);g.k=Bgb.prototype;g.k.hide=function(){g.$p(this.api.getRootNode(),"ytp-expand-pause-overlay");g.V.prototype.hide.call(this)}; g.k.Yb=function(){return this.api.W().N("shorts_mode_to_player_api")?this.api.Yb():this.C.Yb()}; g.k.B5=function(){this.u=!0;g.$p(this.api.getRootNode(),"ytp-expand-pause-overlay");this.C.Yb()&&this.api.Xa(this.element,!1);this.expandButton.focus()}; g.k.C5=function(){this.u=!1;g.Yp(this.api.getRootNode(),"ytp-expand-pause-overlay");this.C.Yb()&&this.api.Xa(this.element,!0);this.focus()}; g.k.Ra=function(a){a=this.api.W().N("embeds_web_enable_pause_overlay_wn_update")?this.api.Ib():a.state;g.BO(a,1)||g.BO(a,16)||g.BO(a,32)||(!g.BO(a,4)||g.BO(a,2)||g.BO(a,1024)?(this.u||this.api.Xa(this.element,!1),this.D.hide()):0b.endSeconds||g.pS(this.G)||(b=Math.max(1E3* (b.endSeconds-5),0),b=new g.sE(b,b+5E3,{id:"countdown timer",namespace:"embeds"}),this.G.Je([b]))),Egb(this),Hgb(this));this.G.W().B&&this.B&&this.B.detach()}; g.k.onAdStart=function(){$5(this,"EMBEDS_AD_EVENT_TYPE_AD_STARTED")}; g.k.onAdComplete=function(){$5(this,"EMBEDS_AD_EVENT_TYPE_AD_COMPLETED")}; g.k.onAdSkip=function(){$5(this,"EMBEDS_AD_EVENT_TYPE_AD_SKIPPED")}; g.k.onAdStateChange=function(a){2===a&&$5(this,"EMBEDS_AD_EVENT_TYPE_AD_PAUSED")};g.tT("embed",Fgb);})(_yt_player);