(function(g){var window=this;'use strict';var DRa=function(a,b){var c=(b-a.i)/(a.u-a.i);if(0>=c)return 0;if(1<=c)return 1;for(var d=0,e=1,f=0,h=0;8>h;h++){f=g.rr(a,c);var l=(g.rr(a,c+1E-6)-f)/1E-6;if(1E-6>Math.abs(f-b))return c;if(1E-6>Math.abs(l))break;else fh;h++)fc.Wq;c={Wq:c.Wq}, c.Wq++){var d=new g.W({G:"a",L:"ytp-suggestion-link",W:{href:"{{link}}",target:a.D,"aria-label":"{{aria_label}}"},U:[{G:"div",L:"ytp-suggestion-image",U:[{G:"div",W:{"data-is-live":"{{is_live}}"},L:"ytp-suggestion-duration",ya:"{{duration}}"}]},{G:"div",L:"ytp-suggestion-title",W:{title:"{{hover_title}}"},ya:"{{title}}"},{G:"div",L:"ytp-suggestion-author",ya:"{{views_or_author}}"}]});g.I(this,d);d.Da(this.suggestions.element);var e=d.Fa("ytp-suggestion-link");g.Rl(e,"transitionDelay",c.Wq/20+"s"); this.C.T(e,"click",function(f){return function(h){var l=b.suggestionData[f.Wq],m=l.sessionData;g.sN(h,b.api,b.K,m||void 0)&&b.api.Pj(l.videoId,m,l.playlistId)}}(c)); this.B.push(d)}g.I(this,this.next);this.next.Da(this.element);this.next.Ra("click",this.eQ,this);this.C.T(this.api,"videodatachange",this.onVideoDataChange);this.resize(this.api.bb().getPlayerSize());this.onVideoDataChange();this.show()},A5=function(a){a.next.element.style.bottom=a.D+"px"; a.previous.element.style.bottom=a.D+"px";var b=a.u,c=a.containerWidth-a.suggestionData.length*(a.tileWidth+a.i);g.N(a.element,"ytp-scroll-min",0<=b);g.N(a.element,"ytp-scroll-max",b<=c)},ERa=function(a){for(var b=0;ba.Xq;a={Xq:a.Xq},a.Xq++){var d=new g.W({G:"a",L:"ytp-suggestion-link",W:{href:"{{link}}",target:b.D,"aria-label":"{{aria_label}}"},U:[{G:"div",L:"ytp-suggestion-image"},{G:"div",L:"ytp-suggestion-overlay",W:{style:"{{blink_rendering_hack}}","aria-hidden":"{{aria_hidden}}"},U:[{G:"div",L:"ytp-suggestion-title",ya:"{{title}}"},{G:"div",L:"ytp-suggestion-author", ya:"{{author_and_views}}"},{G:"div",W:{"data-is-live":"{{is_live}}"},L:"ytp-suggestion-duration",ya:"{{duration}}"}]}]});g.I(this,d);d.Da(this.suggestions.element);var e=d.Fa("ytp-suggestion-link");g.Rl(e,"transitionDelay",a.Xq/20+"s");this.i.T(e,"click",function(f){return function(h){var l=f.Xq;if(1E3>(0,g.Q)()-c.Z)g.Lu(h),document.activeElement.blur();else{l=c.suggestionData[l];var m=l.sessionData;g.sN(h,c.api,c.K,m||void 0)&&c.api.Pj(l.videoId,m,l.playlistId)}}}(a)); this.B.push(d)}g.I(this,this.next);this.next.Da(this.element);this.next.Ra("click",this.gQ,this);b=new g.W({G:"button",Ga:["ytp-button","ytp-collapse"],W:{"aria-label":"Ocultar mais v\u00eddeos"},U:[{G:"svg",W:{height:"100%",viewBox:"0 0 16 16",width:"100%"},U:[{G:"path",W:{d:"M13 4L12 3 8 7 4 3 3 4 7 8 3 12 4 13 8 9 12 13 13 12 9 8z",fill:"#fff"}}]}]});g.I(this,b);b.Da(this.element);b.Ra("click",this.fU,this);g.I(this,this.expandButton);this.expandButton.Da(this.element);this.expandButton.Ra("click", this.gU,this);this.i.T(this.api,"appresize",this.wb);this.i.T(this.api,"fullscreentoggled",this.lm);this.i.T(this.api,"presentingplayerstatechange",this.Mc);this.i.T(this.api,"videodatachange",this.onVideoDataChange);this.wb(this.api.bb().getPlayerSize());this.onVideoDataChange()},H5=function(a){var b=a.I.Te()?32:16; b=a.X/2+b;a.next.element.style.bottom=b+"px";a.previous.element.style.bottom=b+"px";b=a.u;var c=a.containerWidth-a.suggestionData.length*(a.tileWidth+8);g.N(a.element,"ytp-scroll-min",0<=b);g.N(a.element,"ytp-scroll-max",b<=c)},HRa=function(a){for(var b=0;bb&&this.delay.start()};g.w(z5,g.W);g.k=z5.prototype;g.k.hide=function(){this.I=!0;g.W.prototype.hide.call(this)}; g.k.show=function(){this.I=!1;g.W.prototype.show.call(this)}; g.k.isHidden=function(){return this.I}; g.k.eQ=function(){this.scrollTo(this.u-this.containerWidth)}; g.k.fQ=function(){this.scrollTo(this.u+this.containerWidth)}; g.k.resize=function(a,b){var c=this.api.V(),d=16/9,e=650<=a.width,f=480>a.width||290>a.height,h=Math.min(this.suggestionData.length,this.B.length);if(150>=Math.min(a.width,a.height)||0===h||!c.xb)this.hide();else{var l;if(e){var m=l=28;this.i=16}else this.i=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);l=a/l-this.i;m=Math.floor(l/d);b&&m+100>b&&50l||g.GM(this.api)?this.hide():this.show();for(b=0;bl?"none":""}h=e+n+p+4;this.D=h+c+(m-f)/2;this.suggestions.element.style.height=m+h+"px";this.tileWidth=l;this.containerWidth=a;this.u=0;this.suggestions.element.scrollLeft=-0;A5(this)}}; g.k.onVideoDataChange=function(){var a=this.api.getVideoData(),b=this.api.V();this.K=a.D?!1:b.i;a.suggestions?this.suggestionData=g.Jo(a.suggestions,function(c){return c&&!c.playlistId}):this.suggestionData.length=0; ERa(this);a.D?this.title.update({title:g.lI("Mais v\u00eddeos de $DNI_RELATED_CHANNEL",{DNI_RELATED_CHANNEL:a.author})}):this.title.update({title:"Mais v\u00eddeos no YouTube"})}; g.k.scrollTo=function(a){a=g.dg(a,this.containerWidth-this.suggestionData.length*(this.tileWidth+this.i),0);this.S.start(this.u,a,1E3);this.u=a;A5(this)};g.w(B5,g.xN);B5.prototype.show=function(){g.xN.prototype.show.call(this);FRa(this,this.api.bb().getPlayerSize())}; B5.prototype.resize=function(a){g.xN.prototype.resize.call(this,a);FRa(this,a);g.N(this.element,"related-on-error-overlay-visible",!this.i.isHidden())}; B5.prototype.u=function(a){g.xN.prototype.u.call(this,a);var b=this.api.getVideoData();if(b.CE||b.playerErrorMessageRenderer)(a=b.CE)?GRa(this,a):b.playerErrorMessageRenderer&&GRa(this,b.playerErrorMessageRenderer);else{var c;a.wi&&(b.Bq?C5(b.Bq)?c=g.fA(b.Bq):c=g.yN(g.eA(b.Bq)):c=g.yN(a.wi),this.kd(c,"subreason"))}};g.w(D5,g.W);D5.prototype.Nh=function(){this.api.zb().isCued()||(this.hide(),this.api.ib(this.element,!1))}; D5.prototype.i=function(){var a=this.api.getVideoData(),b=this.api.V(),c=this.api.getVideoData().D,d=b.Db,e=!b.xb,f=this.u.tf();b=g.WE(b);d||f||c||e||b||!a.videoId?(this.hide(),this.api.ib(this.element,!1)):(a=g.wi(this.api.getVideoUrl(),g.rM("emb_imp_woyt")),this.Sa("url",a),this.show())}; D5.prototype.onClick=function(a){var b=g.wi(this.api.getVideoUrl(),g.rM("emb_imp_woyt"));g.tN(b,this.api,a);this.api.Cb(this.element)}; D5.prototype.show=function(){this.api.zb().isCued()&&(g.W.prototype.show.call(this),this.api.Wv(this.element)&&this.api.ib(this.element,!0))};g.w(E5,g.W);E5.prototype.u=function(){var a=this.api.zb(),b=this.api.getVideoData();this.api.V().N("embeds_enable_muted_autoplay")&&b.mutedAutoplay&&(g.T(a,2)&&!this.yb?(this.show(),this.i.show(),a=this.api.getVideoData(),this.Sa("text",a.wH),g.N(this.element,"ytp-muted-autoplay-show-end-panel",!0),this.api.ib(this.element,this.yb),this.api.Ma("onMutedAutoplayEnds")):this.hide())}; E5.prototype.onClick=function(){var a=this.api.getVideoData(),b=this.api.getCurrentTime();a.mutedAutoplay=!1;a.endSeconds=NaN;g.hG(a);this.api.loadVideoById(a.videoId,b);this.api.Cb(this.element);this.hide()};g.w(F5,g.W);F5.prototype.i=function(){var a=this.api.zb(),b=this.api.getVideoData();this.api.V().N("embeds_enable_muted_autoplay")&&b.mutedAutoplay&&!g.T(a,2)?this.yb||(g.W.prototype.show.call(this),this.B.start(),this.api.ib(this.element,this.yb)):this.hide()}; F5.prototype.u=function(){g.N(this.element,"ytp-muted-autoplay-hide-watermark",!0)}; F5.prototype.onClick=function(){var a=this.api.getVideoData(),b=this.api.getCurrentTime();a.mutedAutoplay=!1;a.endSeconds=NaN;g.hG(a);this.api.loadVideoById(a.videoId,b);this.api.Cb(this.element)};g.w(G5,g.W);g.k=G5.prototype;g.k.hide=function(){g.Uq(this.api.getRootNode(),"ytp-expand-pause-overlay");g.W.prototype.hide.call(this)}; g.k.fU=function(){this.D=!0;g.Uq(this.api.getRootNode(),"ytp-expand-pause-overlay");this.expandButton.focus()}; g.k.gU=function(){this.D=!1;g.M(this.api.getRootNode(),"ytp-expand-pause-overlay")}; g.k.gQ=function(){this.scrollTo(this.u-this.containerWidth)}; g.k.hQ=function(){this.scrollTo(this.u+this.containerWidth)}; g.k.lm=function(){this.wb(this.api.bb().getPlayerSize())}; g.k.Mc=function(a){if(!(g.T(a.state,1)||g.T(a.state,16)||g.T(a.state,32))){var b=!this.api.V().N("embeds_disable_pauseoverlay_on_autoplay_blocked_killswitch")&&g.T(a.state,1024);!g.T(a.state,4)||g.T(a.state,2)||b?this.C.hide():this.suggestionData.length&&(this.D||(g.M(this.api.getRootNode(),"ytp-expand-pause-overlay"),H5(this)),this.C.show(),this.Z=(0,g.Q)())}}; g.k.wb=function(a){var b=16/9,c=this.I.Te();a=a.width-(c?112:58);c=Math.ceil(a/(c?320:192));c=(a-8*c)/c;b=Math.floor(c/b);for(var d=0;da.width)&&!this.u||!a&&this.u){var b=new g.W(x5()),c=this.Fa("ytp-watermark");g.N(c,"ytp-watermark-small",a);g.Pg(c);b.Da(c);this.u=a}};g.w(J5,g.WM);g.k=J5.prototype;g.k.Ki=function(){return!1}; g.k.create=function(){var a,b=this.J.V(),c=g.zM(this.J),d=null===(a=this.J.getVideoData())||void 0===a?void 0:a.clientPlaybackNonce;d&&g.EA("cpn",d);b.xb&&(this.D=new G5(this.J,c),g.I(this,this.D),g.JM(this.J,this.D.element,4));b.N("embeds_enable_muted_autoplay")&&(this.i=new F5(this.J),g.I(this,this.i),g.JM(this.J,this.i.element,4),this.C=new E5(this.J),g.I(this,this.C),g.JM(this.J,this.C.element,4));if(b.Db||this.i)this.watermark=new I5(this.J),g.I(this,this.watermark),g.JM(this.J,this.watermark.element, 7);this.B=new D5(this.J,c);g.I(this,this.B);g.JM(this.J,this.B.element,7);this.u.T(this.J,"appresize",this.wb);this.u.T(this.J,"presentingplayerstatechange",this.Nh);this.u.T(this.J,"videodatachange",this.RX);this.u.T(this.J,"onMutedAutoplayStarts",this.onMutedAutoplayStarts);this.Tb(this.J.zb());this.player.Md("embed")}; g.k.wb=function(){var a=this.J.bb().getPlayerSize();this.Ae&&this.Ae.resize(a)}; g.k.Nh=function(a){this.Tb(a.state)}; g.k.Tb=function(a){g.T(a,128)?(this.Ae||(this.Ae=new B5(this.J),g.I(this,this.Ae),g.JM(this.J,this.Ae.element,4)),this.Ae.u(a.getData()),this.Ae.show(),g.M(this.J.getRootNode(),"ytp-embed-error")):this.Ae&&(this.Ae.dispose(),this.Ae=null,g.Uq(this.J.getRootNode(),"ytp-embed-error"))}; g.k.onMutedAutoplayStarts=function(){this.J.getVideoData().mutedAutoplay&&this.i&&this.watermark&&this.watermark.Da(this.i.bottomButtons,0)}; g.k.RX=function(){var a=this.J.getVideoData();this.watermark&&this.i&&!a.mutedAutoplay&&g.Tg(this.i.element,this.watermark.element)&&g.JM(this.J,this.watermark.element,7)};g.VM("embed",J5);})(_yt_player);