(function(g){var window=this;'use strict';var nlb=function(a,b){a.eb("onAutonavCoundownStarted",b)},n5=function(a,b,c){g.Cp(a.element,"ytp-suggestion-set",!!b.videoId); var d=b.playlistId;c=b.wh(c?c:"mqdefault.jpg");var e=null,f=null;b instanceof g.wQ&&(b.lengthText?(e=b.lengthText||null,f=b.zy||null):b.lengthSeconds&&(e=g.Vy(b.lengthSeconds),f=g.Vy(b.lengthSeconds,!0)));var h=!!d;d=h&&g.uQ(d).type==="RD";var l=b instanceof g.wQ?b.isLivePlayback:null,m=b instanceof g.wQ?b.isUpcoming:null,n=b.author,p=b.shortViewCount,q=b.publishedTimeText,r=[],t=[];n&&r.push(n);p&&(r.push(p),t.push(p));q&&t.push(q);c={title:b.title,author:n,author_and_views:r.join(" \u2022 "),aria_label:b.ariaLabel|| g.JE("Assistir a $TITLE",{TITLE:b.title}),duration:e,timestamp:f,url:b.Ul(),is_live:l,is_upcoming:m,is_list:h,is_mix:d,background:c?"background-image: url("+c+")":"",views_and_publish_time:t.join(" \u2022 "),autoplayAlternativeHeader:b.Vt};b instanceof g.vQ&&(c.playlist_length=b.playlistLength);a.update(c)},o5=function(a){var b=a.U(),c=b.D; g.S.call(this,{I:"a",N:"ytp-autonav-suggestion-card",Y:{href:"{{url}}",target:c?b.X:"","aria-label":"{{aria_label}}","data-is-live":"{{is_live}}","data-is-list":"{{is_list}}","data-is-mix":"{{is_mix}}","data-is-upcoming":"{{is_upcoming}}"},W:[{I:"div",Ka:["ytp-autonav-endscreen-upnext-thumbnail","ytp-autonav-thumbnail-small"],Y:{style:"{{background}}"},W:[{I:"div",Y:{"aria-label":"{{timestamp}}"},Ka:["ytp-autonav-timestamp"],xa:"{{duration}}"},{I:"div",Ka:["ytp-autonav-live-stamp"],xa:"Ao vivo"}, {I:"div",Ka:["ytp-autonav-upcoming-stamp"],xa:"Em breve"},{I:"div",N:"ytp-autonav-list-overlay",W:[{I:"div",N:"ytp-autonav-mix-text",xa:"Mix"},{I:"div",N:"ytp-autonav-mix-icon"}]}]},{I:"div",Ka:["ytp-autonav-endscreen-upnext-title","ytp-autonav-title-card"],xa:"{{title}}"},{I:"div",Ka:["ytp-autonav-endscreen-upnext-author","ytp-autonav-author-card"],xa:"{{author}}"},{I:"div",Ka:["ytp-autonav-endscreen-upnext-author","ytp-autonav-view-and-date-card"],xa:"{{views_and_publish_time}}"}]});this.J=a;this.suggestion= null;this.j=c;this.listen("click",this.onClick);this.listen("keypress",this.onKeyPress)},p5=function(a,b){b=b===void 0?!1:b; g.S.call(this,{I:"div",N:"ytp-autonav-endscreen-countdown-overlay"});var c=this;this.K=b;this.cancelCommand=this.G=void 0;this.C=0;this.container=new g.S({I:"div",N:"ytp-autonav-endscreen-countdown-container"});g.P(this,this.container);this.container.Ha(this.element);b=a.U();var d=b.D;this.J=a;this.suggestion=null;this.onVideoDataChange("newdata",this.J.getVideoData());this.S(a,"videodatachange",this.onVideoDataChange);this.j=new g.S({I:"div",N:"ytp-autonav-endscreen-upnext-container",Y:{"aria-label":"{{aria_label}}", "data-is-live":"{{is_live}}","data-is-list":"{{is_list}}","data-is-mix":"{{is_mix}}","data-is-upcoming":"{{is_upcoming}}"},W:[{I:"div",N:"ytp-autonav-endscreen-upnext-header"},{I:"div",N:"ytp-autonav-endscreen-upnext-alternative-header",xa:"{{autoplayAlternativeHeader}}"},{I:"a",N:"ytp-autonav-endscreen-link-container",Y:{href:"{{url}}",target:d?b.X:""},W:[{I:"div",N:"ytp-autonav-endscreen-upnext-thumbnail",Y:{style:"{{background}}"},W:[{I:"div",Y:{"aria-label":"{{timestamp}}"},Ka:["ytp-autonav-timestamp"], xa:"{{duration}}"},{I:"div",Ka:["ytp-autonav-live-stamp"],xa:"Ao vivo"},{I:"div",Ka:["ytp-autonav-upcoming-stamp"],xa:"Em breve"}]},{I:"div",N:"ytp-autonav-endscreen-video-info",W:[{I:"div",N:"ytp-autonav-endscreen-premium-badge"},{I:"div",N:"ytp-autonav-endscreen-upnext-title",xa:"{{title}}"},{I:"div",N:"ytp-autonav-endscreen-upnext-author",xa:"{{author}}"},{I:"div",N:"ytp-autonav-view-and-date",xa:"{{views_and_publish_time}}"},{I:"div",N:"ytp-autonav-author-and-view",xa:"{{author_and_views}}"}]}]}]}); g.P(this,this.j);this.j.Ha(this.container.element);d||this.S(this.j.Ea("ytp-autonav-endscreen-link-container"),"click",this.CV);this.J.createClientVe(this.container.element,this,115127);this.J.createClientVe(this.j.Ea("ytp-autonav-endscreen-link-container"),this,115128);this.overlay=new g.S({I:"div",N:"ytp-autonav-overlay"});g.P(this,this.overlay);this.overlay.Ha(this.container.element);this.B=new g.S({I:"div",N:"ytp-autonav-endscreen-button-container"});g.P(this,this.B);this.B.Ha(this.container.element); this.cancelButton=new g.S({I:"button",Ka:["ytp-autonav-endscreen-upnext-button","ytp-autonav-endscreen-upnext-cancel-button",b.L("web_modern_buttons")?"ytp-autonav-endscreen-upnext-button-rounded":""],Y:{"aria-label":"Cancelar reprodu\u00e7\u00e3o autom\u00e1tica"},xa:"Cancelar"});g.P(this,this.cancelButton);this.cancelButton.Ha(this.B.element);this.cancelButton.listen("click",this.m5,this);this.J.createClientVe(this.cancelButton.element,this,115129);this.playButton=new g.S({I:"a",Ka:["ytp-autonav-endscreen-upnext-button", "ytp-autonav-endscreen-upnext-play-button",b.L("web_modern_buttons")?"ytp-autonav-endscreen-upnext-button-rounded":""],Y:{href:"{{url}}",role:"button","aria-label":"Reproduzir pr\u00f3ximo v\u00eddeo"},xa:"Assista agora"});g.P(this,this.playButton);this.playButton.Ha(this.B.element);this.playButton.listen("click",this.CV,this);this.J.L("web_player_autonav_next_button_renderer")?(this.J.createServerVe(this.playButton.element,this.playButton,!0),(b=this.J.getVideoData())&&olb(this,b)):this.J.createClientVe(this.playButton.element, this,115130);this.D=new g.qp(function(){plb(c)},500); g.P(this,this.D);this.BV();this.S(a,"autonavvisibility",this.BV);this.J.L("web_autonav_color_transition")&&(this.S(a,"autonavchange",this.l5),this.S(a,"onAutonavCoundownStarted",this.dba))},q5=function(a){var b=a.J.Ko(!0,a.J.isFullscreen()); g.Cp(a.container.element,"ytp-autonav-endscreen-small-mode",a.Zg(b));g.Cp(a.container.element,"ytp-autonav-endscreen-is-premium",!!a.suggestion&&!!a.suggestion.sN);g.Cp(a.J.getRootNode(),"ytp-autonav-endscreen-cancelled-state",!a.J.Kf());g.Cp(a.J.getRootNode(),"countdown-running",a.Zl());g.Cp(a.container.element,"ytp-player-content",a.J.Kf());g.Cm(a.overlay.element,{width:b.width+"px"});if(!a.Zl()){a.J.Kf()?qlb(a,Math.round(rlb(a)/1E3)):qlb(a);b=!!a.suggestion&&!!a.suggestion.Vt;var c=a.J.Kf()||!b; g.Cp(a.container.element,"ytp-autonav-endscreen-upnext-alternative-header-only",!c&&b);g.Cp(a.container.element,"ytp-autonav-endscreen-upnext-no-alternative-header",c&&!b);g.Jx(a.B,a.J.Kf());g.Cp(a.element,"ytp-enable-w2w-color-transitions",slb(a))}},plb=function(a){var b=rlb(a),c=Math,d=c.min; var e=a.C?Date.now()-a.C:0;c=d.call(c,e,b);qlb(a,Math.ceil((b-c)/1E3));b-c<=500&&a.Zl()?a.select(!0):a.Zl()&&a.D.start()},rlb=function(a){if(a.J.isFullscreen()){var b; a=(b=a.J.getVideoData())==null?void 0:b.iE;return a===-1||a===void 0?8E3:a}return a.J.wu()>=0?a.J.wu():g.GD(a.J.U().experiments,"autoplay_time")||1E4},olb=function(a,b){a.J.L("web_player_autonav_next_button_renderer"); b=b.X4;a.G=b==null?void 0:b.navigationEndpoint;b=b==null?void 0:b.trackingParams;a.playButton&&b&&a.J.setTrackingParams(a.playButton.element,b)},slb=function(a){var b; return!((b=a.J.getVideoData())==null||!b.watchToWatchTransitionRenderer)},qlb=function(a,b){b=b===void 0?-1:b; a=a.j.Ea("ytp-autonav-endscreen-upnext-header");g.qh(a);if(b>=0){b=String(b);var c="Pr\u00f3ximo v\u00eddeo em $SECONDS".match(RegExp("\\$SECONDS","gi"))[0],d="Pr\u00f3ximo v\u00eddeo em $SECONDS".indexOf(c);if(d>=0){a.appendChild(g.oh("Pr\u00f3ximo v\u00eddeo em $SECONDS".slice(0,d)));var e=g.nh("span");g.wp(e,"ytp-autonav-endscreen-upnext-header-countdown-number");g.uh(e,b);a.appendChild(e);a.appendChild(g.oh("Pr\u00f3ximo v\u00eddeo em $SECONDS".slice(d+c.length)));return}}g.uh(a,"Pr\u00f3ximo")}, r5=function(a,b){g.S.call(this,{I:"div", Ka:["html5-endscreen","ytp-player-content",b||"base-endscreen"]});this.created=!1;this.player=a},s5=function(a){g.S.call(this,{I:"div", Ka:["ytp-upnext","ytp-player-content"],Y:{"aria-label":"{{aria_label}}"},W:[{I:"div",N:"ytp-cued-thumbnail-overlay-image",Y:{style:"{{background}}"}},{I:"span",N:"ytp-upnext-top",W:[{I:"span",N:"ytp-upnext-header",xa:"Pr\u00f3ximo"},{I:"span",N:"ytp-upnext-title",xa:"{{title}}"},{I:"span",N:"ytp-upnext-author",xa:"{{author}}"}]},{I:"a",N:"ytp-upnext-autoplay-icon",Y:{role:"button",href:"{{url}}","aria-label":"Reproduzir pr\u00f3ximo v\u00eddeo"},W:[{I:"svg",Y:{height:"100%",version:"1.1",viewBox:"0 0 72 72", width:"100%"},W:[{I:"circle",N:"ytp-svg-autoplay-circle",Y:{cx:"36",cy:"36",fill:"#fff","fill-opacity":"0.3",r:"31.5"}},{I:"circle",N:"ytp-svg-autoplay-ring",Y:{cx:"-36",cy:"36","fill-opacity":"0",r:"33.5",stroke:"#FFFFFF","stroke-dasharray":"211","stroke-dashoffset":"-211","stroke-width":"4",transform:"rotate(-90)"}},{I:"path",N:"ytp-svg-fill",Y:{d:"M 24,48 41,36 24,24 V 48 z M 44,24 v 24 h 4 V 24 h -4 z"}}]}]},{I:"span",N:"ytp-upnext-bottom",W:[{I:"span",N:"ytp-upnext-cancel"},{I:"span",N:"ytp-upnext-paused", xa:"Reprodu\u00e7\u00e3o autom\u00e1tica pausada"}]}]});this.api=a;this.cancelButton=null;this.G=this.Ea("ytp-svg-autoplay-ring");this.C=this.notification=this.j=this.suggestion=null;this.D=new g.qp(this.JJ,5E3,this);this.B=0;var b=this.Ea("ytp-upnext-cancel");this.cancelButton=new g.S({I:"button",Ka:["ytp-upnext-cancel-button","ytp-button"],Y:{tabindex:"0","aria-label":"Cancelar reprodu\u00e7\u00e3o autom\u00e1tica"},xa:"Cancelar"});g.P(this,this.cancelButton);this.cancelButton.listen("click",this.n5, this);this.cancelButton.Ha(b);this.cancelButton&&this.api.createClientVe(this.cancelButton.element,this,115129);g.P(this,this.D);this.api.createClientVe(this.element,this,18788);b=this.Ea("ytp-upnext-autoplay-icon");this.S(b,"click",this.o5);this.api.createClientVe(b,this,115130);this.EV();this.S(a,"autonavvisibility",this.EV);this.S(a,"mdxnowautoplaying",this.Sba);this.S(a,"mdxautoplaycanceled",this.Tba);g.Cp(this.element,"ytp-upnext-mobile",this.api.U().B)},tlb=function(a,b){if(b)return b; if(a.api.isFullscreen()){var c;a=(c=a.api.getVideoData())==null?void 0:c.iE;return a===-1||a===void 0?8E3:a}return a.api.wu()>=0?a.api.wu():g.GD(a.api.U().experiments,"autoplay_time")||1E4},ulb=function(a,b){b=tlb(a,b); var c=Math,d=c.min;var e=(0,g.Ut)()-a.B;c=d.call(c,e,b);b=b===0?1:Math.min(c/b,1);a.G.setAttribute("stroke-dashoffset",""+-211*(b+1));b>=1&&a.Zl()&&a.api.getPresentingPlayerType()!==3?a.select(!0):a.Zl()&&a.j.start()},t5=function(a){r5.call(this,a,"autonav-endscreen"); this.overlay=this.videoData=null;this.table=new g.S({I:"div",N:"ytp-suggestion-panel",W:[{I:"div",Ka:["ytp-autonav-endscreen-upnext-header","ytp-autonav-endscreen-more-videos"],xa:"Mais v\u00eddeos"}]});this.V=new g.S({I:"div",N:"ytp-suggestions-container"});this.videos=[];this.C=null;this.G=this.K=!1;this.B=new p5(this.player);g.P(this,this.B);this.B.Ha(this.element);a.getVideoData().Cf?this.j=this.B:(this.j=new s5(a),g.jS(this.player,this.j.element,4),g.P(this,this.j));this.overlay=new g.S({I:"div", N:"ytp-autonav-overlay-cancelled-state"});g.P(this,this.overlay);this.overlay.Ha(this.element);this.D=new g.XF(this);g.P(this,this.D);g.P(this,this.table);this.table.Ha(this.element);this.table.show();g.P(this,this.V);this.V.Ha(this.table.element);this.hide()},u5=function(a){var b=a.Kf(); b!==a.G&&(a.G=b,a.player.publish("autonavvisibility"),a.G?(a.B!==a.j&&a.B.hide(),a.table.hide()):(a.B!==a.j&&a.B.show(),a.table.show()))},v5=function(a,b){g.S.call(this,{I:"button", Ka:["ytp-watch-on-youtube-button","ytp-button"],xa:"{{content}}"});this.J=a;this.buttonType=this.buttonType=b;this.N2();this.buttonType===2&&g.yp(this.element,"ytp-continue-watching-button");this.listen("click",this.onClick);this.listen("videodatachange",this.N2);g.Jx(this,!0)},w5=function(a,b){r5.call(this,a,"embeds-lite-endscreen"); this.J=a;this.Te=b;this.J.createClientVe(this.element,this,156943);this.watchButton=new v5(a,2);g.P(this,this.watchButton);this.watchButton.Ha(this.element);this.hide()},vlb=function(a){r5.call(this,a,"subscribecard-endscreen"); this.j=new g.S({I:"div",N:"ytp-subscribe-card",W:[{I:"img",N:"ytp-author-image",Y:{src:"{{profilePicture}}"}},{I:"div",N:"ytp-subscribe-card-right",W:[{I:"div",N:"ytp-author-name",xa:"{{author}}"},{I:"div",N:"html5-subscribe-button-container"}]}]});g.P(this,this.j);this.j.Ha(this.element);var b=a.getVideoData();this.subscribeButton=new g.CY("Inscreva-se",null,"Cancelar assinatura",null,!0,!1,b.Am,b.subscribed,"trailer-endscreen",null,a,!1);g.P(this,this.subscribeButton);this.subscribeButton.Ha(this.j.Ea("html5-subscribe-button-container")); this.S(a,"videodatachange",this.Sa);this.Sa();this.hide()},x5=function(a){var b=a.U(),c=g.TF||g.yP?{style:"will-change: opacity"}:void 0,d=b.D,e=["ytp-videowall-still"]; b.B&&e.push("ytp-videowall-show-text");g.S.call(this,{I:"a",Ka:e,Y:{href:"{{url}}",target:d?b.X:"","aria-label":"{{aria_label}}","data-is-live":"{{is_live}}","data-is-list":"{{is_list}}","data-is-mix":"{{is_mix}}"},W:[{I:"div",N:"ytp-videowall-still-image",Y:{style:"{{background}}"}},{I:"span",N:"ytp-videowall-still-info",Y:{"aria-hidden":"true"},W:[{I:"span",N:"ytp-videowall-still-info-bg",W:[{I:"span",N:"ytp-videowall-still-info-content",Y:c,W:[{I:"span",N:"ytp-videowall-still-info-title",xa:"{{title}}"}, {I:"span",N:"ytp-videowall-still-info-author",xa:"{{author_and_views}}"},{I:"span",N:"ytp-videowall-still-info-live",xa:"Ao vivo"},{I:"span",N:"ytp-videowall-still-info-duration",xa:"{{duration}}"}]}]}]},{I:"span",Ka:["ytp-videowall-still-listlabel-regular","ytp-videowall-still-listlabel"],Y:{"aria-hidden":"true"},W:[{I:"span",N:"ytp-videowall-still-listlabel-icon"},"Playlist",{I:"span",N:"ytp-videowall-still-listlabel-length",W:[" (",{I:"span",xa:"{{playlist_length}}"},")"]}]},{I:"span",Ka:["ytp-videowall-still-listlabel-mix", "ytp-videowall-still-listlabel"],Y:{"aria-hidden":"true"},W:[{I:"span",N:"ytp-videowall-still-listlabel-mix-icon"},"Mix",{I:"span",N:"ytp-videowall-still-listlabel-length",xa:" (50+)"}]}]});this.suggestion=null;this.B=d;this.api=a;this.j=new g.XF(this);g.P(this,this.j);this.listen("click",this.onClick);this.listen("keypress",this.onKeyPress);this.j.S(a,"videodatachange",this.onVideoDataChange);a.createServerVe(this.element,this);this.onVideoDataChange()},y5=function(a){r5.call(this,a,"videowall-endscreen"); var b=this;this.J=a;this.C=0;this.stills=[];this.D=this.videoData=null;this.G=this.V=!1;this.X=null;this.B=new g.XF(this);g.P(this,this.B);this.K=new g.qp(function(){g.yp(b.element,"ytp-show-tiles")},0); g.P(this,this.K);var c=new g.S({I:"button",Ka:["ytp-button","ytp-endscreen-previous"],Y:{"aria-label":"Anterior"},W:[g.Qx()]});g.P(this,c);c.Ha(this.element);c.listen("click",this.s5,this);this.table=new g.Gx({I:"div",N:"ytp-endscreen-content"});g.P(this,this.table);this.table.Ha(this.element);c=new g.S({I:"button",Ka:["ytp-button","ytp-endscreen-next"],Y:{"aria-label":"Pr\u00f3ximo"},W:[g.Rx()]});g.P(this,c);c.Ha(this.element);c.listen("click",this.r5,this);a.getVideoData().Cf?this.j=new p5(a,!0): this.j=new s5(a);g.P(this,this.j);g.jS(this.player,this.j.element,4);a.createClientVe(this.element,this,158789);this.hide()},z5=function(a){return g.kS(a.player)&&a.QE()&&!a.D},A5=function(a){var b=a.Kf(); b!==a.V&&(a.V=b,a.player.publish("autonavvisibility"))},B5=function(a){r5.call(this,a,"watch-again-on-youtube-endscreen"); this.watchButton=new v5(a,1);g.P(this,this.watchButton);this.watchButton.Ha(this.element);g.dab(a)&&(this.j=new g.f1(a),g.P(this,this.j),this.B=new g.S({I:"div",Ka:["ytp-watch-again-on-youtube-endscreen-more-videos-container"],Y:{tabIndex:"-1"},W:[this.j]}),g.P(this,this.B),this.j.Ha(this.B.element),this.B.Ha(this.element));a.createClientVe(this.element,this,156914);this.hide()},zlb=function(a){g.YX.call(this,a); var b=this;this.endScreen=null;this.B=this.j=this.C=this.D=!1;this.listeners=new g.XF(this);g.P(this,this.listeners);var c=a.U(),d=a.getVideoData();d=d&&d.limitedPlaybackDurationInSeconds!==0;g.Bs(g.JP(c))&&d&&!g.gS(a)?(this.B=!0,this.endScreen=new w5(a,g.UR(a))):a.jd()?this.endScreen=new B5(a):wlb(a)?(this.D=!0,xlb(this),this.j?this.endScreen=new t5(a):this.endScreen=new y5(a)):c.nh?this.endScreen=new vlb(a):this.endScreen=new r5(a);g.P(this,this.endScreen);g.jS(a,this.endScreen.element,4);ylb(this); this.listeners.S(a,"videodatachange",this.onVideoDataChange,this);this.listeners.S(a,g.yE("endscreen"),function(e){b.onCueRangeEnter(e)}); this.listeners.S(a,g.zE("endscreen"),function(e){b.onCueRangeExit(e)})},xlb=function(a){var b=a.player.getVideoData(); if(!b||a.j===b.Cm&&a.C===b.Cf)return!1;a.j=b.Cm;a.C=b.Cf;return!0},wlb=function(a){a=a.U(); return a.fd&&!a.nh},ylb=function(a){a.player.Ze("endscreen"); var b=a.player.getVideoData();b=new g.wE(Math.max((b.lengthSeconds-10)*1E3,0),0x8000000000000,{id:"preload",namespace:"endscreen"});var c=new g.wE(0x8000000000000,0x8000000000000,{id:"load",priority:8,namespace:"endscreen"});a.player.df([b,c])}; g.cS.prototype.wu=g.da(14,function(){return this.app.wu()}); g.K_.prototype.wu=g.da(13,function(){return this.getVideoData().VL}); g.ZR.prototype.Ys=g.da(12,function(a){this.Oi().Ys(a)}); g.SY.prototype.Ys=g.da(11,function(a){this.j!==a&&(this.j=a,this.Sa())}); g.$Z.prototype.Ys=g.da(10,function(a){this.overflowButton&&this.overflowButton.Ys(a)}); g.ZR.prototype.Zs=g.da(9,function(a){this.Oi().Zs(a)}); g.XY.prototype.Zs=g.da(8,function(a){this.j!==a&&(this.j=a,this.Sa())}); g.$Z.prototype.Zs=g.da(7,function(a){this.shareButton&&this.shareButton.Zs(a)}); g.ZR.prototype.NC=g.da(6,function(a){this.Oi().NC(a)}); g.vY.prototype.NC=g.da(5,function(a){this.mT!==a&&(this.mT=a,this.yr())}); g.ZR.prototype.MC=g.da(4,function(a){this.Oi().MC(a)}); g.$Z.prototype.MC=g.da(3,function(a){this.lT!==a&&(this.lT=a,this.xr())});g.z(o5,g.S);o5.prototype.select=function(){this.J.Lp(this.suggestion.videoId,this.suggestion.sessionData,this.suggestion.playlistId,void 0,void 0,this.suggestion.wF||void 0)&&this.J.logClick(this.element)}; o5.prototype.onClick=function(a){g.BS(a,this.J,this.j,this.suggestion.sessionData||void 0)&&this.select()}; o5.prototype.onKeyPress=function(a){switch(a.keyCode){case 13:case 32:a.defaultPrevented||(this.select(),a.preventDefault())}};g.z(p5,g.S);g.k=p5.prototype;g.k.SI=function(a){this.suggestion!==a&&(this.suggestion=a,n5(this.j,a),this.playButton.updateValue("url",this.suggestion.Ul()),q5(this))}; g.k.Zl=function(){return this.C>0}; g.k.WC=function(){this.Zl()||(this.C=Date.now(),plb(this),nlb(this.J,rlb(this)),g.Cp(this.J.getRootNode(),"countdown-running",this.Zl()))}; g.k.Yy=function(){this.qr();plb(this);var a=this.j.Ea("ytp-autonav-endscreen-upnext-header");a&&g.uh(a,"Pr\u00f3ximo")}; g.k.qr=function(){this.Zl()&&(this.D.stop(),this.C=0)}; g.k.select=function(a){this.J.nextVideo(!1,a===void 0?!1:a);this.qr()}; g.k.CV=function(a){g.BS(a,this.J)&&(a.currentTarget===this.playButton.element?this.J.logClick(this.playButton.element):a.currentTarget===this.j.Ea("ytp-autonav-endscreen-link-container")&&(a=this.j.Ea("ytp-autonav-endscreen-link-container"),this.J.logVisibility(a,!0),this.J.logClick(a)),this.J.L("web_player_autonav_next_button_renderer")&&this.G?(this.J.eb("innertubeCommand",this.G),this.qr()):this.select())}; g.k.m5=function(){this.J.logClick(this.cancelButton.element);g.eS(this.J,!0);this.cancelCommand&&this.J.eb("innertubeCommand",this.cancelCommand)}; g.k.onVideoDataChange=function(a,b){this.J.L("web_player_autonav_next_button_renderer")&&olb(this,b);var c;this.cancelCommand=(c=b.T4)==null?void 0:c.command}; g.k.dba=function(a){if(slb(this)){var b=this.J.getVideoData().watchToWatchTransitionRenderer,c=b==null?void 0:b.fromColorPaletteDark;b=b==null?void 0:b.toColorPaletteDark;if(c&&b){var d=this.element;d.style.setProperty("--w2w-start-background-color",g.jz(c.surgeColor));d.style.setProperty("--w2w-start-primary-text-color",g.jz(c.primaryTitleColor));d.style.setProperty("--w2w-start-secondary-text-color",g.jz(c.secondaryTitleColor));d.style.setProperty("--w2w-end-background-color",g.jz(b.surgeColor)); d.style.setProperty("--w2w-end-primary-text-color",g.jz(b.primaryTitleColor));d.style.setProperty("--w2w-end-secondary-text-color",g.jz(b.secondaryTitleColor));d.style.setProperty("--w2w-animation-duration",a+"ms")}g.Cp(this.element,"ytp-w2w-animate",!0)}}; g.k.l5=function(a){this.J.L("web_autonav_color_transition")&&a!==2&&g.Cp(this.element,"ytp-w2w-animate",!1)}; g.k.BV=function(){var a=this.J.Kf();this.K&&this.Cb!==a&&g.Jx(this,a);q5(this);this.J.logVisibility(this.container.element,a);this.J.logVisibility(this.cancelButton.element,a);this.J.logVisibility(this.j.Ea("ytp-autonav-endscreen-link-container"),a);this.J.logVisibility(this.playButton.element,a)}; g.k.Zg=function(a){return a.width<400||a.height<459};g.z(r5,g.S);g.k=r5.prototype;g.k.create=function(){this.created=!0}; g.k.destroy=function(){this.created=!1}; g.k.QE=function(){return!1}; g.k.Kf=function(){return!1}; g.k.s_=function(){return!1};g.z(s5,g.S);g.k=s5.prototype;g.k.JJ=function(){this.notification&&(this.D.stop(),this.Mc(this.C),this.C=null,this.notification.close(),this.notification=null)}; g.k.SI=function(a){this.suggestion=a;n5(this,a,"hqdefault.jpg")}; g.k.EV=function(){g.Jx(this,this.api.Kf());this.api.logVisibility(this.element,this.api.Kf());this.api.logVisibility(this.Ea("ytp-upnext-autoplay-icon"),this.api.Kf());this.cancelButton&&this.api.logVisibility(this.cancelButton.element,this.api.Kf())}; g.k.bca=function(){window.focus();this.JJ()}; g.k.WC=function(a){var b=this;this.Zl()||(g.Gv("a11y-announce","Pr\u00f3ximo "+this.suggestion.title),this.B=(0,g.Ut)(),this.j=new g.qp(function(){ulb(b,a)},25),ulb(this,a),nlb(this.api,tlb(this,a))); g.Ap(this.element,"ytp-upnext-autoplay-paused")}; g.k.hide=function(){g.S.prototype.hide.call(this)}; g.k.Zl=function(){return!!this.j}; g.k.Yy=function(){this.qr();this.B=(0,g.Ut)();ulb(this);g.yp(this.element,"ytp-upnext-autoplay-paused")}; g.k.qr=function(){this.Zl()&&(this.j.dispose(),this.j=null)}; g.k.select=function(a){a=a===void 0?!1:a;if(this.api.U().L("autonav_notifications")&&a&&window.Notification&&typeof document.hasFocus==="function"){var b=Notification.permission;b==="default"?Notification.requestPermission():b!=="granted"||document.hasFocus()||(this.JJ(),this.notification=new Notification("Pr\u00f3ximo",{body:this.suggestion.title,icon:this.suggestion.wh()}),this.C=this.S(this.notification,"click",this.bca),this.D.start())}this.qr();this.api.nextVideo(!1,a)}; g.k.o5=function(a){!g.th(this.cancelButton.element,a.target)&&g.BS(a,this.api)&&(this.api.Kf()&&this.api.logClick(this.Ea("ytp-upnext-autoplay-icon")),this.select())}; g.k.n5=function(){this.api.Kf()&&this.cancelButton&&this.api.logClick(this.cancelButton.element);g.eS(this.api,!0)}; g.k.Sba=function(a){this.api.getPresentingPlayerType();this.show();this.WC(a)}; g.k.Tba=function(){this.api.getPresentingPlayerType();this.qr();this.hide()}; g.k.va=function(){this.qr();this.JJ();g.S.prototype.va.call(this)};g.z(t5,r5);g.k=t5.prototype;g.k.create=function(){r5.prototype.create.call(this);this.D.S(this.player,"appresize",this.GD);this.D.S(this.player,"onVideoAreaChange",this.GD);this.D.S(this.player,"videodatachange",this.onVideoDataChange);this.D.S(this.player,"autonavchange",this.FV);this.D.S(this.player,"onAutonavCancelled",this.p5);this.onVideoDataChange()}; g.k.show=function(){r5.prototype.show.call(this);(this.K||this.C&&this.C!==this.videoData.clientPlaybackNonce)&&g.eS(this.player,!1);g.kS(this.player)&&this.QE()&&!this.C?(u5(this),this.videoData.autonavState===2?this.player.getVisibilityState()===3?this.j.select(!0):this.j.WC():this.videoData.autonavState===3&&this.j.Yy()):(g.eS(this.player,!0),u5(this));this.GD()}; g.k.hide=function(){r5.prototype.hide.call(this);this.j.Yy();u5(this)}; g.k.GD=function(){var a=this.player.Ko(!0,this.player.isFullscreen());u5(this);q5(this.B);g.Cp(this.element,"ytp-autonav-cancelled-small-mode",this.Zg(a));g.Cp(this.element,"ytp-autonav-cancelled-tiny-mode",this.oL(a));g.Cp(this.element,"ytp-autonav-cancelled-mini-mode",a.width<=400||a.height<=360);this.overlay&&g.Cm(this.overlay.element,{width:a.width+"px"});if(!this.G)for(a=0;a0&&(a= q*4,t=b<=m-2&&n>=p*4;if((p+1)/q*d/h>h/(p/(q+1)*d)&&t)n-=p*4,b+=2;else if(r)n-=q*4,a+=2;else if(t)n-=p*4,b+=2;else break}d=!1;n>=12&&c*4-n<=6&&(b>=4||a>=4)&&(d=!0);n=a*96;l=b*54;h=n/l=a-2&&p>=b-2?t=1:p%2===0&&m%2===0&&(p<2&&m<2?p===0&&m===0&&(t=2):t=2),q=g.zg(q+this.C,c),t!==0){r=this.stills[h];r||(r=new x5(this.player),this.stills[h]=r,f.appendChild(r.element));var u=Math.floor(l*p/b),y=Math.floor(n*m/a),A=Math.floor(l*(p+t)/b)-u-4,C=Math.floor(n*(m+t)/a)-y-4;g.Jm(r.element,y,u);g.Nm(r.element,C,A);g.Cm(r.element,"transitionDelay",(p+m)/20+"s");g.Cp(r.element,"ytp-videowall-still-mini", t===1);g.Cp(r.element,"ytp-videowall-still-large",t>2);t=Math.max(C,A);g.Cp(r.element,"ytp-videowall-still-round-large",t>=256);g.Cp(r.element,"ytp-videowall-still-round-medium",t>96&&t<256);g.Cp(r.element,"ytp-videowall-still-round-small",t<=96);q=e[q];r.suggestion!==q&&(r.suggestion=q,t=r.api.U(),u=g.xp(r.element,"ytp-videowall-still-large")?"hqdefault.jpg":"mqdefault.jpg",n5(r,q,u),g.AP(t)&&!r.api.L("web_player_log_click_before_generating_ve_conversion_params")&&(t=q.Ul(),u={},g.QR(r.api,"addEmbedsConversionTrackingParams", [u]),t=g.dj(t,u),r.updateValue("url",t)),(q=(q=q.sessionData)&&q.itct)&&r.api.setTrackingParams(r.element,q));h++}f.ariaBusy="false";g.Cp(this.element,"ytp-endscreen-paginate",h=h;e--)a=this.stills[e],g.sh(a.element),g.rg(a);this.stills.length=h}}; g.k.onVideoDataChange=function(){var a=this.player.getVideoData(1);this.videoData!==a&&(a!=null&&g.eR(a)?(this.C=0,this.videoData=a,this.Er()):this.player.ma("missg",{vid:(a==null?void 0:a.videoId)||"",cpn:(a==null?void 0:a.clientPlaybackNonce)||""}))}; g.k.r5=function(){this.C+=this.stills.length;this.Er()}; g.k.s5=function(){this.C-=this.stills.length;this.Er()}; g.k.s_=function(){return this.j.Zl()}; g.k.XN=function(a){a===1?(this.G=!1,this.D=this.videoData.clientPlaybackNonce,this.j.qr(),this.Cb&&this.Er()):(this.G=!0,this.Cb&&z5(this)&&(a===2?this.j.WC():a===3&&this.j.Yy()))}; g.k.q5=function(a){if(a){for(a=0;a0;g.Cp(this.element,"ytp-shorts-branded-ui",b);b?a.show():a.hide()}var c;(c=g.UR(this.player))==null||c.NC(!0);this.player.logVisibility(this.element,!0);this.watchButton.yc(!0)}}; B5.prototype.hide=function(){r5.prototype.hide.call(this);var a;(a=g.UR(this.player))==null||a.NC(!1);this.player.logVisibility(this.element,!1);this.watchButton.yc(!1)};g.z(zlb,g.YX);g.k=zlb.prototype;g.k.Tv=function(){var a=this.player.getVideoData(),b=a.mutedAutoplay;if((this.player.jd()||this.B)&&!b)return!0;var c;var d=!!((a==null?0:g.eR(a))||(a==null?0:(c=a.suggestions)==null?0:c.length));d=!wlb(this.player)||d;a=a.dk;c=this.player.JF();return d&&!a&&!c&&!b}; g.k.Kf=function(){return this.endScreen.Kf()}; g.k.Q$=function(){return this.Kf()?this.endScreen.s_():!1}; g.k.va=function(){this.player.Ze("endscreen");g.YX.prototype.va.call(this)}; g.k.load=function(){var a=this.player.getVideoData();var b=a.transitionEndpointAtEndOfStream;if(b&&b.videoId){var c=this.player.zb().Me.get("heartbeat"),d=g.eR(a);!d||b.videoId!==d.videoId||a.jX?(this.player.Lp(b.videoId,void 0,void 0,!0,!0,b),c&&c.AL("HEARTBEAT_ACTION_TRIGGER_AT_STREAM_END","HEARTBEAT_ACTION_TRANSITION_REASON_HAS_NEW_STREAM_TRANSITION_ENDPOINT"),a=!0):a=!1}else a=!1;a||(g.YX.prototype.load.call(this),this.endScreen.show())}; g.k.unload=function(){g.YX.prototype.unload.call(this);this.endScreen.hide();this.endScreen.destroy()}; g.k.onCueRangeEnter=function(a){this.Tv()&&(this.endScreen.created||this.endScreen.create(),a.getId()==="load"&&this.load())}; g.k.onCueRangeExit=function(a){a.getId()==="load"&&this.loaded&&this.unload()}; g.k.onVideoDataChange=function(){ylb(this);this.D&&xlb(this)&&(this.endScreen&&(this.endScreen.hide(),this.endScreen.created&&this.endScreen.destroy(),this.endScreen.dispose()),this.j?this.endScreen=new t5(this.player):this.endScreen=new y5(this.player),g.P(this,this.endScreen),g.jS(this.player,this.endScreen.element,4))};g.XX("endscreen",zlb);})(_yt_player);