(function(g){var window=this;'use strict';var ZXF=function(V,t){V.Os("onAutonavCoundownStarted",t)},PAs=function(V){var t,x,u; return V==null?void 0:(t=V.playerOverlays)==null?void 0:(x=t.playerOverlayRenderer)==null?void 0:(u=x.autoplay)==null?void 0:u.playerOverlayAutoplayRenderer},q_=function(V,t,x){g.Am(V.element,"ytp-suggestion-set",!!t.videoId); var u=t.playlistId;x=t.zm(x?x:"mqdefault.jpg");var Z=null,P=null;t instanceof g.Fr&&(t.lengthText?(Z=t.lengthText||null,P=t.Nh||null):t.lengthSeconds&&(Z=g.Q$(t.lengthSeconds),P=g.Q$(t.lengthSeconds,!0)));var K=!!u;u=K&&g.vi(u).type==="RD";var R=t instanceof g.Fr?t.isLivePlayback:null,f=t instanceof g.Fr?t.isUpcoming:null,b=t.author,E=t.shortViewCount,k=t.publishedTimeText,O=[],N=[];b&&O.push(b);E&&(O.push(E),N.push(E));k&&N.push(k);x={title:t.title,author:b,author_and_views:O.join(" \u2022 "),aria_label:t.ariaLabel|| g.Lm("Assistir a $TITLE",{TITLE:t.title}),duration:Z,timestamp:P,url:t.Lk(),is_live:R,is_upcoming:f,is_list:K,is_mix:u,background:x?"background-image: url("+x+")":"",views_and_publish_time:N.join(" \u2022 "),autoplayAlternativeHeader:t.cN};t instanceof g.Li&&(x.playlist_length=t.playlistLength);V.update(x)},RH=function(V){var t=V.K(),x=t.W; g.e.call(this,{Y:"a",V:"ytp-autonav-suggestion-card",j:{href:"{{url}}",target:x?t.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}}"},D:[{Y:"div",vX:["ytp-autonav-endscreen-upnext-thumbnail","ytp-autonav-thumbnail-small"],j:{style:"{{background}}"},D:[{Y:"div",j:{"aria-label":"{{timestamp}}"},vX:["ytp-autonav-timestamp"],mw:"{{duration}}"},{Y:"div",vX:["ytp-autonav-live-stamp"],mw:"Ao vivo"}, {Y:"div",vX:["ytp-autonav-upcoming-stamp"],mw:"Em breve"},{Y:"div",V:"ytp-autonav-list-overlay",D:[{Y:"div",V:"ytp-autonav-mix-text",mw:"Mix"},{Y:"div",V:"ytp-autonav-mix-icon"}]}]},{Y:"div",vX:["ytp-autonav-endscreen-upnext-title","ytp-autonav-title-card"],mw:"{{title}}"},{Y:"div",vX:["ytp-autonav-endscreen-upnext-author","ytp-autonav-author-card"],mw:"{{author}}"},{Y:"div",vX:["ytp-autonav-endscreen-upnext-author","ytp-autonav-view-and-date-card"],mw:"{{views_and_publish_time}}"}]});this.U=V;this.suggestion= null;this.J=x;this.listen("click",this.onClick);this.listen("keypress",this.onKeyPress)},fT=function(V,t){t=t===void 0?!1:t; g.e.call(this,{Y:"div",V:"ytp-autonav-endscreen-countdown-overlay"});var x=this;this.L=t;this.cancelCommand=this.B=void 0;this.N=0;this.container=new g.e({Y:"div",V:"ytp-autonav-endscreen-countdown-container"});g.y(this,this.container);this.container.t6(this.element);t=V.K();var u=t.W;this.U=V;this.suggestion=null;this.onVideoDataChange("newdata",this.U.getVideoData());this.Z(V,"videodatachange",this.onVideoDataChange);this.J=new g.e({Y:"div",V:"ytp-autonav-endscreen-upnext-container",j:{"aria-label":"{{aria_label}}", "data-is-live":"{{is_live}}","data-is-list":"{{is_list}}","data-is-mix":"{{is_mix}}","data-is-upcoming":"{{is_upcoming}}"},D:[{Y:"div",V:"ytp-autonav-endscreen-upnext-header"},{Y:"div",V:"ytp-autonav-endscreen-upnext-alternative-header",mw:"{{autoplayAlternativeHeader}}"},{Y:"a",V:"ytp-autonav-endscreen-link-container",j:{href:"{{url}}",target:u?t.X:""},D:[{Y:"div",V:"ytp-autonav-endscreen-upnext-thumbnail",j:{style:"{{background}}"},D:[{Y:"div",j:{"aria-label":"{{timestamp}}"},vX:["ytp-autonav-timestamp"], mw:"{{duration}}"},{Y:"div",vX:["ytp-autonav-live-stamp"],mw:"Ao vivo"},{Y:"div",vX:["ytp-autonav-upcoming-stamp"],mw:"Em breve"}]},{Y:"div",V:"ytp-autonav-endscreen-video-info",D:[{Y:"div",V:"ytp-autonav-endscreen-premium-badge"},{Y:"div",V:"ytp-autonav-endscreen-upnext-title",mw:"{{title}}"},{Y:"div",V:"ytp-autonav-endscreen-upnext-author",mw:"{{author}}"},{Y:"div",V:"ytp-autonav-view-and-date",mw:"{{views_and_publish_time}}"},{Y:"div",V:"ytp-autonav-author-and-view",mw:"{{author_and_views}}"}]}]}]}); g.y(this,this.J);this.J.t6(this.container.element);u||this.Z(this.J.f1("ytp-autonav-endscreen-link-container"),"click",this.Kj);this.U.createClientVe(this.container.element,this,115127);this.U.createClientVe(this.J.f1("ytp-autonav-endscreen-link-container"),this,115128);this.overlay=new g.e({Y:"div",V:"ytp-autonav-overlay"});g.y(this,this.overlay);this.overlay.t6(this.container.element);this.S=new g.e({Y:"div",V:"ytp-autonav-endscreen-button-container"});g.y(this,this.S);this.S.t6(this.container.element); this.cancelButton=new g.e({Y:"button",vX:["ytp-autonav-endscreen-upnext-button","ytp-autonav-endscreen-upnext-cancel-button",t.T("web_modern_buttons")?"ytp-autonav-endscreen-upnext-button-rounded":""],j:{"aria-label":"Cancelar reprodu\u00e7\u00e3o autom\u00e1tica"},mw:"Cancelar"});g.y(this,this.cancelButton);this.cancelButton.t6(this.S.element);this.cancelButton.listen("click",this.LX,this);this.U.createClientVe(this.cancelButton.element,this,115129);this.playButton=new g.e({Y:"a",vX:["ytp-autonav-endscreen-upnext-button", "ytp-autonav-endscreen-upnext-play-button",t.T("web_modern_buttons")?"ytp-autonav-endscreen-upnext-button-rounded":""],j:{href:"{{url}}",role:"button","aria-label":"Reproduzir pr\u00f3ximo v\u00eddeo"},mw:"Assista agora"});g.y(this,this.playButton);this.playButton.t6(this.S.element);this.playButton.listen("click",this.Kj,this);this.U.createServerVe(this.playButton.element,this.playButton,!0);(t=this.U.getVideoData())&&KF7(this,t);this.W=new g.qK(function(){qbc(x)},500); g.y(this,this.W);this.xf();this.Z(V,"autonavvisibility",this.xf);this.U.T("web_autonav_color_transition")&&(this.Z(V,"autonavchange",this.GS),this.Z(V,"onAutonavCoundownStarted",this.CqX))},$o=function(V){var t=V.U.Gi(!0,V.U.isFullscreen()); g.Am(V.container.element,"ytp-autonav-endscreen-small-mode",V.XJ(t));g.Am(V.container.element,"ytp-autonav-endscreen-is-premium",!!V.suggestion&&!!V.suggestion.r9w);g.Am(V.U.getRootNode(),"ytp-autonav-endscreen-cancelled-state",!V.U.qe());g.Am(V.U.getRootNode(),"countdown-running",V.Ze());g.Am(V.container.element,"ytp-player-content",V.U.qe());g.Ao(V.overlay.element,{width:t.width+"px"});if(!V.Ze()){V.U.qe()?R2$(V,Math.round(fYF(V)/1E3)):R2$(V);t=!!V.suggestion&&!!V.suggestion.cN;var x=V.U.qe()|| !t;g.Am(V.container.element,"ytp-autonav-endscreen-upnext-alternative-header-only",!x&&t);g.Am(V.container.element,"ytp-autonav-endscreen-upnext-no-alternative-header",x&&!t);V.S.RC(V.U.qe());g.Am(V.element,"ytp-enable-w2w-color-transitions",$zj(V))}},qbc=function(V){var t=fYF(V),x=Math,u=x.min; var Z=V.N?Date.now()-V.N:0;x=u.call(x,Z,t);R2$(V,Math.ceil((t-x)/1E3));t-x<=500&&V.Ze()?V.select(!0):V.Ze()&&V.W.start()},fYF=function(V){if(V.U.isFullscreen()){var t; V=(t=V.U.getVideoData())==null?void 0:t.uJ;return V===-1||V===void 0?8E3:V}return V.U.Kp()>=0?V.U.Kp():g.S7(V.U.K().experiments,"autoplay_time")||1E4},KF7=function(V,t){t=t.getWatchNextResponse(); var x,u;t=(x=PAs(t))==null?void 0:(u=x.nextButton)==null?void 0:u.buttonRenderer;V.B=t==null?void 0:t.navigationEndpoint;x=t==null?void 0:t.trackingParams;V.playButton&&x&&V.U.setTrackingParams(V.playButton.element,x)},$zj=function(V){var t; return!((t=V.U.getVideoData())==null||!t.watchToWatchTransitionRenderer)},R2$=function(V,t){t=t===void 0?-1:t; V=V.J.f1("ytp-autonav-endscreen-upnext-header");g.KQ(V);if(t>=0){t=String(t);var x="Pr\u00f3ximo v\u00eddeo em $SECONDS".match(RegExp("\\$SECONDS","gi"))[0],u="Pr\u00f3ximo v\u00eddeo em $SECONDS".indexOf(x);if(u>=0){V.appendChild(g.ZZ("Pr\u00f3ximo v\u00eddeo em $SECONDS".slice(0,u)));var Z=g.uc("span");g.ky(Z,"ytp-autonav-endscreen-upnext-header-countdown-number");g.$P(Z,t);V.appendChild(Z);V.appendChild(g.ZZ("Pr\u00f3ximo v\u00eddeo em $SECONDS".slice(u+x.length)));return}}g.$P(V,"Pr\u00f3ximo")}, bO=function(V,t){g.e.call(this,{Y:"div", vX:["html5-endscreen","ytp-player-content",t||"base-endscreen"]});this.created=!1;this.player=V},E_=function(V){g.e.call(this,{Y:"div", vX:["ytp-upnext","ytp-player-content"],j:{"aria-label":"{{aria_label}}"},D:[{Y:"div",V:"ytp-cued-thumbnail-overlay-image",j:{style:"{{background}}"}},{Y:"span",V:"ytp-upnext-top",D:[{Y:"span",V:"ytp-upnext-header",mw:"Pr\u00f3ximo"},{Y:"span",V:"ytp-upnext-title",mw:"{{title}}"},{Y:"span",V:"ytp-upnext-author",mw:"{{author}}"}]},{Y:"a",V:"ytp-upnext-autoplay-icon",j:{role:"button",href:"{{url}}","aria-label":"Reproduzir pr\u00f3ximo v\u00eddeo"},D:[{Y:"svg",j:{height:"100%",version:"1.1",viewBox:"0 0 72 72", width:"100%"},D:[{Y:"circle",V:"ytp-svg-autoplay-circle",j:{cx:"36",cy:"36",fill:"#fff","fill-opacity":"0.3",r:"31.5"}},{Y:"circle",V:"ytp-svg-autoplay-ring",j:{cx:"-36",cy:"36","fill-opacity":"0",r:"33.5",stroke:"#FFFFFF","stroke-dasharray":"211","stroke-dashoffset":"-211","stroke-width":"4",transform:"rotate(-90)"}},{Y:"path",V:"ytp-svg-fill",j:{d:"M 24,48 41,36 24,24 V 48 z M 44,24 v 24 h 4 V 24 h -4 z"}}]}]},{Y:"span",V:"ytp-upnext-bottom",D:[{Y:"span",V:"ytp-upnext-cancel"},{Y:"span",V:"ytp-upnext-paused", mw:"Reprodu\u00e7\u00e3o autom\u00e1tica pausada"}]}]});this.api=V;this.cancelButton=null;this.B=this.f1("ytp-svg-autoplay-ring");this.N=this.notification=this.J=this.suggestion=null;this.W=new g.qK(this.rW,5E3,this);this.S=0;var t=this.f1("ytp-upnext-cancel");this.cancelButton=new g.e({Y:"button",vX:["ytp-upnext-cancel-button","ytp-button"],j:{tabindex:"0","aria-label":"Cancelar reprodu\u00e7\u00e3o autom\u00e1tica"},mw:"Cancelar"});g.y(this,this.cancelButton);this.cancelButton.listen("click",this.Aw, this);this.cancelButton.t6(t);this.cancelButton&&this.api.createClientVe(this.cancelButton.element,this,115129);g.y(this,this.W);this.api.createClientVe(this.element,this,18788);t=this.f1("ytp-upnext-autoplay-icon");this.Z(t,"click",this.Vr);this.api.createClientVe(t,this,115130);this.sy();this.Z(V,"autonavvisibility",this.sy);this.Z(V,"mdxnowautoplaying",this.T9s);this.Z(V,"mdxautoplaycanceled",this.L_P);g.Am(this.element,"ytp-upnext-mobile",this.api.K().S)},bXr=function(V,t){if(t)return t; if(V.api.isFullscreen()){var x;V=(x=V.api.getVideoData())==null?void 0:x.uJ;return V===-1||V===void 0?8E3:V}return V.api.Kp()>=0?V.api.Kp():g.S7(V.api.K().experiments,"autoplay_time")||1E4},Evc=function(V,t){t=bXr(V,t); var x=Math,u=x.min;var Z=(0,g.Tu)()-V.S;x=u.call(x,Z,t);t=t===0?1:Math.min(x/t,1);V.B.setAttribute("stroke-dashoffset",""+-211*(t+1));t>=1&&V.Ze()&&V.api.getPresentingPlayerType()!==3?V.select(!0):V.Ze()&&V.J.start()},ko=function(V){bO.call(this,V,"autonav-endscreen"); this.overlay=this.videoData=null;this.table=new g.e({Y:"div",V:"ytp-suggestion-panel",D:[{Y:"div",vX:["ytp-autonav-endscreen-upnext-header","ytp-autonav-endscreen-more-videos"],mw:"Mais v\u00eddeos"}]});this.C=new g.e({Y:"div",V:"ytp-suggestions-container"});this.videos=[];this.N=null;this.B=this.L=!1;this.S=new fT(this.player);g.y(this,this.S);this.S.t6(this.element);V.getVideoData().IN?this.J=this.S:(this.J=new E_(V),g.aE(this.player,this.J.element,4),g.y(this,this.J));this.overlay=new g.e({Y:"div", V:"ytp-autonav-overlay-cancelled-state"});g.y(this,this.overlay);this.overlay.t6(this.element);this.W=new g.j6(this);g.y(this,this.W);g.y(this,this.table);this.table.t6(this.element);this.table.show();g.y(this,this.C);this.C.t6(this.table.element);this.hide()},iO=function(V){var t=V.qe(); t!==V.B&&(V.B=t,V.player.publish("autonavvisibility"),V.B?(V.S!==V.J&&V.S.hide(),V.table.hide()):(V.S!==V.J&&V.S.show(),V.table.show()))},O_=function(V,t){g.e.call(this,{Y:"button", vX:["ytp-watch-on-youtube-button","ytp-button"],mw:"{{content}}"});this.U=V;this.buttonType=this.buttonType=t;this.kx();this.buttonType===2&&g.OU(this.element,"ytp-continue-watching-button");this.listen("click",this.onClick);this.listen("videodatachange",this.kx);this.RC(!0)},s_=function(V,t){bO.call(this,V,"embeds-lite-endscreen"); this.U=V;this.J=t;this.U.createClientVe(this.element,this,156943);this.watchButton=new O_(V,2);g.y(this,this.watchButton);this.watchButton.t6(this.element);this.hide()},kBF=function(V){bO.call(this,V,"subscribecard-endscreen"); this.J=new g.e({Y:"div",V:"ytp-subscribe-card",D:[{Y:"img",V:"ytp-author-image",j:{src:"{{profilePicture}}"}},{Y:"div",V:"ytp-subscribe-card-right",D:[{Y:"div",V:"ytp-author-name",mw:"{{author}}"},{Y:"div",V:"html5-subscribe-button-container"}]}]});g.y(this,this.J);this.J.t6(this.element);var t=V.getVideoData();this.subscribeButton=new g.Ed("Inscreva-se",null,"Cancelar assinatura",null,!0,!1,t.Qm,t.subscribed,"trailer-endscreen",null,V,!1);g.y(this,this.subscribeButton);this.subscribeButton.t6(this.J.f1("html5-subscribe-button-container")); this.Z(V,"videodatachange",this.ZS);this.ZS();this.hide()},N_=function(V){var t=V.K(),x=g.oa||g.ge?{style:"will-change: opacity"}:void 0,u=t.W,Z=["ytp-videowall-still"]; t.S&&Z.push("ytp-videowall-show-text");g.e.call(this,{Y:"a",vX:Z,j:{href:"{{url}}",target:u?t.X:"","aria-label":"{{aria_label}}","data-is-live":"{{is_live}}","data-is-list":"{{is_list}}","data-is-mix":"{{is_mix}}"},D:[{Y:"div",V:"ytp-videowall-still-image",j:{style:"{{background}}"}},{Y:"span",V:"ytp-videowall-still-info",j:{"aria-hidden":"true"},D:[{Y:"span",V:"ytp-videowall-still-info-bg",D:[{Y:"span",V:"ytp-videowall-still-info-content",j:x,D:[{Y:"span",V:"ytp-videowall-still-info-title",mw:"{{title}}"}, {Y:"span",V:"ytp-videowall-still-info-author",mw:"{{author_and_views}}"},{Y:"span",V:"ytp-videowall-still-info-live",mw:"Ao vivo"},{Y:"span",V:"ytp-videowall-still-info-duration",mw:"{{duration}}"}]}]}]},{Y:"span",vX:["ytp-videowall-still-listlabel-regular","ytp-videowall-still-listlabel"],j:{"aria-hidden":"true"},D:[{Y:"span",V:"ytp-videowall-still-listlabel-icon"},"Playlist",{Y:"span",V:"ytp-videowall-still-listlabel-length",D:[" (",{Y:"span",mw:"{{playlist_length}}"},")"]}]},{Y:"span",vX:["ytp-videowall-still-listlabel-mix", "ytp-videowall-still-listlabel"],j:{"aria-hidden":"true"},D:[{Y:"span",V:"ytp-videowall-still-listlabel-mix-icon"},"Mix",{Y:"span",V:"ytp-videowall-still-listlabel-length",mw:" (50+)"}]}]});this.suggestion=null;this.S=u;this.api=V;this.J=new g.j6(this);g.y(this,this.J);this.listen("click",this.onClick);this.listen("keypress",this.onKeyPress);this.J.Z(V,"videodatachange",this.onVideoDataChange);V.createServerVe(this.element,this);this.onVideoDataChange()},pT=function(V){bO.call(this,V,"videowall-endscreen"); var t=this;this.U=V;this.N=0;this.stills=[];this.W=this.videoData=null;this.B=this.C=!1;this.X=null;this.S=new g.j6(this);g.y(this,this.S);this.L=new g.qK(function(){g.OU(t.element,"ytp-show-tiles")},0); g.y(this,this.L);var x=new g.e({Y:"button",vX:["ytp-button","ytp-endscreen-previous"],j:{"aria-label":"Anterior"},D:[g.XX()]});g.y(this,x);x.t6(this.element);x.listen("click",this.xk,this);this.table=new g.Az({Y:"div",V:"ytp-endscreen-content"});g.y(this,this.table);this.table.t6(this.element);x=new g.e({Y:"button",vX:["ytp-button","ytp-endscreen-next"],j:{"aria-label":"Pr\u00f3ximo"},D:[g.zP()]});g.y(this,x);x.t6(this.element);x.listen("click",this.dE,this);V.getVideoData().IN?this.J=new fT(V,!0): this.J=new E_(V);g.y(this,this.J);g.aE(this.player,this.J.element,4);V.createClientVe(this.element,this,158789);this.hide()},Ag=function(V){return g.rr(V.player)&&V.J_()&&!V.W},Sd=function(V){var t=V.qe(); t!==V.C&&(V.C=t,V.player.publish("autonavvisibility"))},GN=function(V){bO.call(this,V,"watch-again-on-youtube-endscreen"); this.watchButton=new O_(V,1);g.y(this,this.watchButton);this.watchButton.t6(this.element);g.pP0(V)&&(this.J=new g.Jk(V),g.y(this,this.J),this.S=new g.e({Y:"div",vX:["ytp-watch-again-on-youtube-endscreen-more-videos-container"],j:{tabIndex:"-1"},D:[this.J]}),g.y(this,this.S),this.J.t6(this.S.element),this.S.t6(this.element));V.createClientVe(this.element,this,156914);this.hide()},Njr=function(V){g.m5.call(this,V); var t=this;this.endScreen=null;this.S=this.J=this.N=this.W=!1;this.listeners=new g.j6(this);g.y(this,this.listeners);var x=V.K(),u=V.getVideoData();u=u&&u.limitedPlaybackDurationInSeconds!==0;g.AD(g.oh(x))&&u&&!g.BL(V)?(this.S=!0,this.endScreen=new s_(V,g.O5(V))):V.isEmbedsShortsMode()?this.endScreen=new GN(V):iXE(V)?(this.W=!0,OXj(this),this.J?this.endScreen=new ko(V):this.endScreen=new pT(V)):x.iT?this.endScreen=new kBF(V):this.endScreen=new bO(V);g.y(this,this.endScreen);g.aE(V,this.endScreen.element, 4);sjE(this);this.listeners.Z(V,"videodatachange",this.onVideoDataChange,this);this.listeners.Z(V,g.km("endscreen"),function(Z){t.onCueRangeEnter(Z)}); this.listeners.Z(V,g.i4("endscreen"),function(Z){t.onCueRangeExit(Z)})},OXj=function(V){var t=V.player.getVideoData(); if(!t||V.J===t.Jh&&V.N===t.IN)return!1;V.J=t.Jh;V.N=t.IN;return!0},iXE=function(V){V=V.K(); return V.q6&&!V.iT&&!V.disableOrganicUi},sjE=function(V){V.player.CR("endscreen"); var t=V.player.getVideoData();t=new g.b4(Math.max((t.lengthSeconds-10)*1E3,0),0x8000000000000,{id:"preload",namespace:"endscreen"});var x=new g.b4(0x8000000000000,0x8000000000000,{id:"load",priority:8,namespace:"endscreen"});V.player.gL([t,x])}; g.MD.prototype.Kp=g.xC(14,function(){return this.app.Kp()}); g.GV.prototype.Kp=g.xC(13,function(){return this.getVideoData().fB}); g.IE.prototype.KO=g.xC(12,function(V){this.cL().KO(V)}); g.Xg.prototype.KO=g.xC(11,function(V){this.J!==V&&(this.J=V,this.ZS())}); g.TU.prototype.KO=g.xC(10,function(V){this.overflowButton&&this.overflowButton.KO(V)}); g.IE.prototype.s7=g.xC(9,function(V){this.cL().s7(V)}); g.QN.prototype.s7=g.xC(8,function(V){this.S!==V&&(this.S=V,this.ZS())}); g.TU.prototype.s7=g.xC(7,function(V){this.shareButton&&this.shareButton.s7(V)}); g.IE.prototype.HA=g.xC(6,function(V){this.cL().HA(V)}); g.ZU.prototype.HA=g.xC(5,function(V){this.Q5!==V&&(this.Q5=V,this.wZ())}); g.IE.prototype.pE=g.xC(4,function(V){this.cL().pE(V)}); g.TU.prototype.pE=g.xC(3,function(V){this.kI!==V&&(this.kI=V,this.Il())});g.A(RH,g.e);RH.prototype.select=function(){this.U.vF(this.suggestion.videoId,this.suggestion.sessionData,this.suggestion.playlistId,void 0,void 0,this.suggestion.KM||void 0)&&this.U.logClick(this.element)}; RH.prototype.onClick=function(V){g.P3(V,this.U,this.J,this.suggestion.sessionData||void 0)&&this.select()}; RH.prototype.onKeyPress=function(V){switch(V.keyCode){case 13:case 32:V.defaultPrevented||(this.select(),V.preventDefault())}};g.A(fT,g.e);g.q=fT.prototype;g.q.j6=function(V){this.suggestion!==V&&(this.suggestion=V,q_(this.J,V),this.playButton.updateValue("url",this.suggestion.Lk()),$o(this))}; g.q.Ze=function(){return this.N>0}; g.q.Rk=function(){this.Ze()||(this.N=Date.now(),qbc(this),ZXF(this.U,fYF(this)),g.Am(this.U.getRootNode(),"countdown-running",this.Ze()))}; g.q.C2=function(){this.k5();qbc(this);var V=this.J.f1("ytp-autonav-endscreen-upnext-header");V&&g.$P(V,"Pr\u00f3ximo")}; g.q.k5=function(){this.Ze()&&(this.W.stop(),this.N=0)}; g.q.select=function(V){this.U.nextVideo(!1,V===void 0?!1:V);this.k5()}; g.q.Kj=function(V){g.P3(V,this.U)&&(V.currentTarget===this.playButton.element?this.U.logClick(this.playButton.element):V.currentTarget===this.J.f1("ytp-autonav-endscreen-link-container")&&(V=this.J.f1("ytp-autonav-endscreen-link-container"),this.U.logVisibility(V,!0),this.U.logClick(V)),this.B?(this.U.Os("innertubeCommand",this.B),this.k5()):this.select())}; g.q.LX=function(){this.U.logClick(this.cancelButton.element);g.Xb(this.U,!0);this.cancelCommand&&this.U.Os("innertubeCommand",this.cancelCommand)}; g.q.onVideoDataChange=function(V,t){KF7(this,t);V=t.getWatchNextResponse();var x,u;V=(x=PAs(V))==null?void 0:(u=x.cancelButton)==null?void 0:u.buttonRenderer;this.cancelCommand=V==null?void 0:V.command}; g.q.CqX=function(V){if($zj(this)){var t=this.U.getVideoData().watchToWatchTransitionRenderer,x=t==null?void 0:t.fromColorPaletteDark;t=t==null?void 0:t.toColorPaletteDark;if(x&&t){var u=this.element;u.style.setProperty("--w2w-start-background-color",g.d2(x.surgeColor));u.style.setProperty("--w2w-start-primary-text-color",g.d2(x.primaryTitleColor));u.style.setProperty("--w2w-start-secondary-text-color",g.d2(x.secondaryTitleColor));u.style.setProperty("--w2w-end-background-color",g.d2(t.surgeColor)); u.style.setProperty("--w2w-end-primary-text-color",g.d2(t.primaryTitleColor));u.style.setProperty("--w2w-end-secondary-text-color",g.d2(t.secondaryTitleColor));u.style.setProperty("--w2w-animation-duration",V+"ms")}g.Am(this.element,"ytp-w2w-animate",!0)}}; g.q.GS=function(V){this.U.T("web_autonav_color_transition")&&V!==2&&g.Am(this.element,"ytp-w2w-animate",!1)}; g.q.xf=function(){var V=this.U.qe();this.L&&this.iq!==V&&this.RC(V);$o(this);this.U.logVisibility(this.container.element,V);this.U.logVisibility(this.cancelButton.element,V);this.U.logVisibility(this.J.f1("ytp-autonav-endscreen-link-container"),V);this.U.logVisibility(this.playButton.element,V)}; g.q.XJ=function(V){return V.width<400||V.height<459};g.A(bO,g.e);g.q=bO.prototype;g.q.create=function(){this.created=!0}; g.q.destroy=function(){this.created=!1}; g.q.J_=function(){return!1}; g.q.qe=function(){return!1}; g.q.O5=function(){return!1};g.A(E_,g.e);g.q=E_.prototype;g.q.rW=function(){this.notification&&(this.W.stop(),this.vk(this.N),this.N=null,this.notification.close(),this.notification=null)}; g.q.j6=function(V){this.suggestion=V;q_(this,V,"hqdefault.jpg")}; g.q.sy=function(){this.RC(this.api.qe());this.api.logVisibility(this.element,this.api.qe());this.api.logVisibility(this.f1("ytp-upnext-autoplay-icon"),this.api.qe());this.cancelButton&&this.api.logVisibility(this.cancelButton.element,this.api.qe())}; g.q.K_w=function(){window.focus();this.rW()}; g.q.Rk=function(V){var t=this;this.Ze()||(g.s8("a11y-announce","Pr\u00f3ximo "+this.suggestion.title),this.S=(0,g.Tu)(),this.J=new g.qK(function(){Evc(t,V)},25),Evc(this,V),ZXF(this.api,bXr(this,V))); g.NK(this.element,"ytp-upnext-autoplay-paused")}; g.q.hide=function(){g.e.prototype.hide.call(this)}; g.q.Ze=function(){return!!this.J}; g.q.C2=function(){this.k5();this.S=(0,g.Tu)();Evc(this);g.OU(this.element,"ytp-upnext-autoplay-paused")}; g.q.k5=function(){this.Ze()&&(this.J.dispose(),this.J=null)}; g.q.select=function(V){V=V===void 0?!1:V;if(this.api.K().T("autonav_notifications")&&V&&window.Notification&&typeof document.hasFocus==="function"){var t=Notification.permission;t==="default"?Notification.requestPermission():t!=="granted"||document.hasFocus()||(this.rW(),this.notification=new Notification("Pr\u00f3ximo",{body:this.suggestion.title,icon:this.suggestion.zm()}),this.N=this.Z(this.notification,"click",this.K_w),this.W.start())}this.k5();this.api.nextVideo(!1,V)}; g.q.Vr=function(V){!g.fQ(this.cancelButton.element,V.target)&&g.P3(V,this.api)&&(this.api.qe()&&this.api.logClick(this.f1("ytp-upnext-autoplay-icon")),this.select())}; g.q.Aw=function(){this.api.qe()&&this.cancelButton&&this.api.logClick(this.cancelButton.element);g.Xb(this.api,!0)}; g.q.T9s=function(V){this.api.getPresentingPlayerType();this.show();this.Rk(V)}; g.q.L_P=function(){this.api.getPresentingPlayerType();this.k5();this.hide()}; g.q.NP=function(){this.k5();this.rW();g.e.prototype.NP.call(this)};g.A(ko,bO);g.q=ko.prototype;g.q.create=function(){bO.prototype.create.call(this);this.W.Z(this.player,"appresize",this.yb);this.W.Z(this.player,"onVideoAreaChange",this.yb);this.W.Z(this.player,"videodatachange",this.onVideoDataChange);this.W.Z(this.player,"autonavchange",this.y7);this.W.Z(this.player,"onAutonavCancelled",this.Pa);this.onVideoDataChange()}; g.q.show=function(){bO.prototype.show.call(this);(this.L||this.N&&this.N!==this.videoData.clientPlaybackNonce)&&g.Xb(this.player,!1);g.rr(this.player)&&this.J_()&&!this.N?(iO(this),this.videoData.autonavState===2?this.player.getVisibilityState()===3?this.J.select(!0):this.J.Rk():this.videoData.autonavState===3&&this.J.C2()):(g.Xb(this.player,!0),iO(this));this.yb()}; g.q.hide=function(){bO.prototype.hide.call(this);this.J.C2();iO(this)}; g.q.yb=function(){var V=this.player.Gi(!0,this.player.isFullscreen());iO(this);$o(this.S);g.Am(this.element,"ytp-autonav-cancelled-small-mode",this.XJ(V));g.Am(this.element,"ytp-autonav-cancelled-tiny-mode",this.uG(V));g.Am(this.element,"ytp-autonav-cancelled-mini-mode",V.width<=400||V.height<=360);this.overlay&&g.Ao(this.overlay.element,{width:V.width+"px"});if(!this.B)for(V=0;V0&&(V= k*4,N=t<=f-2&&b>=E*4;if((E+1)/k*u/K>K/(E/(k+1)*u)&&N)b-=E*4,t+=2;else if(O)b-=k*4,V+=2;else if(N)b-=E*4,t+=2;else break}u=!1;b>=12&&x*4-b<=6&&(t>=4||V>=4)&&(u=!0);b=V*96;R=t*54;K=b/R=V-2&&E>=t-2?N=1:E%2===0&&f%2===0&&(E<2&&f<2?E===0&&f===0&&(N=2):N=2),k=g.OY(k+this.N,x),N!==0){O=this.stills[K];O||(O=new N_(this.player),this.stills[K]=O,P.appendChild(O.element));var p=Math.floor(R*E/t),I=Math.floor(b*f/V),L=Math.floor(R*(E+N)/t)-p-4,M=Math.floor(b*(f+N)/V)-I-4;g.zh(O.element,I,p);g.QC(O.element,M,L);g.Ao(O.element,"transitionDelay",(E+f)/20+"s");g.Am(O.element,"ytp-videowall-still-mini", N===1);g.Am(O.element,"ytp-videowall-still-large",N>2);N=Math.max(M,L);g.Am(O.element,"ytp-videowall-still-round-large",N>=256);g.Am(O.element,"ytp-videowall-still-round-medium",N>96&&N<256);g.Am(O.element,"ytp-videowall-still-round-small",N<=96);k=Z[k];O.suggestion!==k&&(O.suggestion=k,N=O.api.K(),p=g.i6(O.element,"ytp-videowall-still-large")?"hqdefault.jpg":"mqdefault.jpg",q_(O,k,p),g.zo(N)&&!O.api.T("web_player_log_click_before_generating_ve_conversion_params")&&(N=k.Lk(),p={},g.$2(O.api,"addEmbedsConversionTrackingParams", [p]),N=g.CX(N,p),O.updateValue("url",N)),(k=(k=k.sessionData)&&k.itct)&&O.api.setTrackingParams(O.element,k));K++}P.ariaBusy="false";g.Am(this.element,"ytp-endscreen-paginate",K=K;Z--)V=this.stills[Z],g.RZ(V.element),g.Rc(V);this.stills.length=K}}; g.q.onVideoDataChange=function(){var V=this.player.getVideoData(1);this.videoData!==V&&(V!=null&&g.Va(V)?(this.N=0,this.videoData=V,this.UT()):this.player.J6("missg",{vid:(V==null?void 0:V.videoId)||"",cpn:(V==null?void 0:V.clientPlaybackNonce)||""}))}; g.q.dE=function(){this.N+=this.stills.length;this.UT()}; g.q.xk=function(){this.N-=this.stills.length;this.UT()}; g.q.O5=function(){return this.J.Ze()}; g.q.jV=function(V){V===1?(this.B=!1,this.W=this.videoData.clientPlaybackNonce,this.J.k5(),this.iq&&this.UT()):(this.B=!0,this.iq&&Ag(this)&&(V===2?this.J.Rk():V===3&&this.J.C2()))}; g.q.ZN=function(V){if(V){for(V=0;V0||V.endSeconds>0):V.mutedAutoplay;if((this.player.isEmbedsShortsMode()||this.S)&&!t)return!0;var x;var u=!!((V==null?0:g.Va(V))||(V==null?0:(x=V.suggestions)==null?0:x.length));u=!iXE(this.player)||u;V=V.pc;x=this.player.lX();return u&&!V&&!x&&!t}; g.q.qe=function(){return this.endScreen.qe()}; g.q.b1U=function(){return this.qe()?this.endScreen.O5():!1}; g.q.NP=function(){this.player.CR("endscreen");g.m5.prototype.NP.call(this)}; g.q.load=function(){var V=this.player.getVideoData();var t=V.transitionEndpointAtEndOfStream;if(t&&t.videoId){var x=this.player.Jl().S3.get("heartbeat"),u=g.Va(V);!u||t.videoId!==u.videoId||V.hN?(this.player.vF(t.videoId,void 0,void 0,!0,!0,t),x&&x.CZ("HEARTBEAT_ACTION_TRIGGER_AT_STREAM_END","HEARTBEAT_ACTION_TRANSITION_REASON_HAS_NEW_STREAM_TRANSITION_ENDPOINT"),V=!0):V=!1}else V=!1;V||(g.m5.prototype.load.call(this),this.endScreen.show())}; g.q.unload=function(){g.m5.prototype.unload.call(this);this.endScreen.hide();this.endScreen.destroy()}; g.q.onCueRangeEnter=function(V){this.oF()&&(this.endScreen.created||this.endScreen.create(),V.getId()==="load"&&this.load())}; g.q.onCueRangeExit=function(V){V.getId()==="load"&&this.loaded&&this.unload()}; g.q.onVideoDataChange=function(){sjE(this);this.W&&OXj(this)&&(this.endScreen&&(this.endScreen.hide(),this.endScreen.created&&this.endScreen.destroy(),this.endScreen.dispose()),this.J?this.endScreen=new ko(this.player):this.endScreen=new pT(this.player),g.y(this,this.endScreen),g.aE(this.player,this.endScreen.element,4))};g.BW("endscreen",Njr);})(_yt_player);