(function(g){var window=this;var zwa=function(a,b){var c=(b-a.o)/(a.u-a.o);if(0>=c)return 0;if(1<=c)return 1;for(var d=0,e=1,f=0,k=0;8>k;k++){f=g.Rn(a,c);var l=(g.Rn(a,c+1E-6)-f)/1E-6;if(1E-6>Math.abs(f-b))return c;if(1E-6>Math.abs(l))break;else fk;k++)fb;b++){var c=new g.W({D:"a",I:"ytp-suggestion-link",P:{href:"{{link}}",target:a.F,"aria-label":"{{aria_label}}"},K:[{D:"div",I:"ytp-suggestion-image",K:[{D:"div",P:{"data-is-live":"{{is_live}}"},I:"ytp-suggestion-duration",W:"{{duration}}"}]},{D:"div",I:"ytp-suggestion-title",P:{title:"{{hover_title}}"},W:"{{title}}"},{D:"div",I:"ytp-suggestion-author",W:"{{views_or_author}}"}]}); g.A(this,c);c.ca(this.G.element);var d=c.da("ytp-suggestion-link");g.H(d,"transitionDelay",b/20+"s");this.Z.N(d,"click",g.Ra(this.nJ,b));this.C.push(c)}this.H=new g.W({D:"button",X:["ytp-button","ytp-next"],P:{"aria-label":"Mostrar m\u00e1s v\u00eddeos sugeridos"},K:[g.lN()]});g.A(this,this.H);this.H.ca(this.element);this.H.na("click",this.lJ,this);this.Z.N(this.o,"videodatachange",this.tA);Cwa(this,g.uL(this.o).getPlayerSize());this.tA();this.show()},Cwa=function(a,b,c){var d=a.o.O(),e=16/9,f=650<= b.width,k=480>b.width||290>b.height,l=Math.min(a.u.length,a.C.length); if(150>=Math.min(b.width,b.height)||0==l||!d.Ea)a.hide();else{var m;if(f){var n=m=28;a.A=16}else n=m=8,a.A=8;if(k){var q=6;f=14;var t=12;k=24;d=12}else q=8,f=18,t=16,k=36,d=16;b=b.width-(48+m+n);m=Math.ceil(b/150);m=Math.min(3,m);m=b/m-a.A;n=Math.floor(m/e);c&&n+100>c&&50m||g.wL(a.o)?a.hide():a.show();for(c=0;cm?"none":""}l=f+q+t+4;a.T=l+d+(n-k)/2;a.G.element.style.height=n+l+"px";a.aa=m;a.F=b;a.B=0;a.uA(0);F4(a)}},Dwa=function(a,b){var c=g.Ud(b,a.F-a.u.length*(a.aa+a.A),0); a.ea.start(a.B,c,1E3);a.B=c;F4(a)},F4=function(a){a.H.element.style.bottom=a.T+"px"; a.L.element.style.bottom=a.T+"px";var b=a.B,c=a.F-a.u.length*(a.aa+a.A);g.K(a.element,"ytp-scroll-min",0<=b);g.K(a.element,"ytp-scroll-max",b<=c)},Ewa=function(a){for(var b=0;bb.width||290>b.height?(e={D:"div",X:["ytp-icon","ytp-icon-error-exclamation-small"]},f=Bwa(),k=0):650<=b.width&&(e={D:"div",X:["ytp-icon","ytp-icon-error-exclamation-large"]},f=g.X?{D:"div",X:["ytp-icon","ytp-icon-youtube-logo-redirect-extra-large"]}:{D:"svg",P:{fill:"#fff",height:"100%",viewBox:"0 0 24 24",width:"100%"},K:[{D:"path",P:{d:"M0 0h24v24H0V0z",fill:"none"}},{D:"path",P:{d:"M21.58 7.19c-.23-.86-.91-1.54-1.77-1.77C18.25 5 12 5 12 5s-6.25 0-7.81.42c-.86.23-1.54.91-1.77 1.77C2 8.75 2 12 2 12s0 3.25.42 4.81c.23.86.91 1.54 1.77 1.77C5.75 19 12 19 12 19s6.25 0 7.81-.42c.86-.23 1.54-.91 1.77-1.77C22 15.25 22 12 22 12s0-3.25-.42-4.81zM10 15V9l5.2 3-5.2 3z"}}]}, k=2);if(k!==a.B){e={"ytp-error-icon-container":e,"ytp-small-redirect":f};f=g.p(Object.keys(e));for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=g.je(l,a.element);g.ye(m);(new g.W(e[l])).ca(m)}a.B=k}}c.style.paddingTop=(b.height-a.u.element.clientHeight)/2-d/2+"px"},H4=function(a,b){var c=a.O(); g.W.call(this,{D:"button",X:["ytp-impression-link","ytp-button"]});this.hide();this.o=a;this.B=b;this.A=!1;g.PL(a,this.element,this,96714);var d=this.o.O(),e=this.o.getVideoData().Wb,f=d.Ga,k=d.pd;d=!d.Ea;var l=this.B.fe();f||k||l||e||d||(g.P(c.experiments,"embeds_impression_link_call_to_action")&&(g.J(this.element,"show-cta-button"),(new g.W({D:"div",I:"ytp-impression-link-content",K:[{D:"div",I:"ytp-impression-link-text",W:"Ver en"},{D:"div",I:"ytp-impression-link-logo",K:[C4()]}]})).ca(this.element), this.show()),g.P(c.experiments,"embeds_impression_link_video_thumbnail")&&Gwa(this),g.P(c.experiments,"embeds_impression_link_channel_thumbnail")&&Hwa(this),g.P(c.experiments,"embeds_impression_link_occlusion")&&Iwa(this),g.P(c.experiments,"embeds_impression_link_hover")&&Jwa(this),this.N(a,"presentingplayerstatechange",this.F),this.N(a,"videoplayerreset",this.G),this.N(this.element,"click",this.C))},Gwa=function(a){var b,c,d,e,f; g.Ba(function(k){if(1==k.o)return b=a.o.getVideoData(),g.sa(k,I4(a,b),2);c=k.u;if(!c)return k["return"]();d=c[0];a.u=d;g.J(a.element,"show-video-thumbnail-button");e=new g.W({D:"div",I:"ytp-impression-link-header",W:"M\u00e1s de YouTube"});e.ca(a.element);f=new g.W({D:"div",I:"ytp-impression-link-content",K:[{D:"div",I:"ytp-impression-link-metadata",K:[{D:"div",I:"ytp-impression-link-title",W:d.title},{D:"div",I:"ytp-impression-link-views-and-duration",W:"{{views_and_duration}}"}]},{D:"div",I:"ytp-impression-link-thumbnail"}]}); f.ca(a.element);J4(a,f,d);K4(a,f,d);a.show();k.o=0})},Hwa=function(a){var b,c,d; g.Ba(function(e){if(1==e.o)return g.sa(e,Kwa(a),2);b=e.u;if(!b)return e["return"]();a.u=b;g.J(a.element,"show-channel-thumbnail-button");c=new g.W({D:"div",I:"ytp-impression-link-header",W:"M\u00e1s de YouTube"});c.ca(a.element);d=new g.W({D:"div",I:"ytp-impression-link-content",K:[{D:"div",I:"ytp-impression-link-metadata",K:[{D:"div",I:"ytp-impression-link-title",W:b.em},{D:"div",I:"ytp-impression-link-subscribers",W:b.expandedSubtitle}]},{D:"div",I:"ytp-impression-link-thumbnail"}]});d.ca(a.element); J4(a,d,b);a.show();e.o=0})},Iwa=function(a){var b,c,d,e,f,k,l,m,n,q; g.Ba(function(t){if(1==t.o)return b=a.o.getVideoData(),g.sa(t,I4(a,b),2);c=t.u;if(!c)return t["return"]();d=c[0];a.u=d;g.J(a.element,"show-occlusion-video-thumbnail-button");e=new g.W({D:"div",I:"ytp-impression-link-header",W:"M\u00e1s de YouTube"});e.ca(a.element);f=new g.W({D:"div",I:"ytp-impression-link-content",K:[{D:"div",I:"ytp-impression-link-metadata",K:[{D:"div",I:"ytp-impression-link-title",W:d.title},{D:"div",I:"ytp-impression-link-author",W:d.author},{D:"div",I:"ytp-impression-link-views", W:"{{views}}"}]},{D:"div",I:"ytp-impression-link-thumbnail-and-duration",K:[{D:"div",I:"ytp-impression-link-thumbnail"},{D:"div",I:"ytp-impression-link-duration",W:"{{duration}}"}]}]});f.ca(a.element);J4(a,f,d);K4(a,f,d);k=new g.W({D:"button",X:["ytp-button","ytp-impression-link-close"],K:[{D:"div",X:["ytp-impression-link-close-icon"],K:[Awa()]}]});k.ca(a.element);k.na("click",function(u){a.hide();g.TL(a.o,a.element,!1);u.stopPropagation()},a); l=function(u){!g.p(u).next().value.isIntersecting&&a.element&&a.show()}; try{m={threshold:.8},n=new IntersectionObserver(l,m),q=document.querySelector("body"),n.observe(q)}catch(u){g.M(u)}t.o=0})},Jwa=function(a){var b,c,d,e,f; g.Ba(function(k){if(1==k.o)return b=a.o.getVideoData(),g.sa(k,I4(a,b),2);c=k.u;if(!c)return k["return"]();d=c[0];a.u=d;g.J(a.element,"show-video-thumbnail-expanding-button");a.N(a.element,"mouseenter",function(){g.J(a.element,"show-expanded-metadata");g.Hn(a.element,"show-collapsed-metadata")}); a.N(a.element,"mouseleave",function(){g.Hn(a.element,"show-expanded-metadata");g.J(a.element,"show-collapsed-metadata")}); e=new g.W({D:"div",I:"ytp-impression-link-header",W:"M\u00e1s v\u00eddeos"});e.ca(a.element);f=new g.W({D:"div",I:"ytp-impression-link-content",K:[{D:"div",I:"ytp-impression-link-metadata",K:[{D:"div",I:"ytp-impression-link-title",W:d.title},{D:"div",I:"ytp-impression-link-views-and-duration",W:"{{views_and_duration}}"}]},{D:"div",I:"ytp-impression-link-thumbnail"}]});f.ca(a.element);J4(a,f,d);K4(a,f,d);a.show();k.o=0})},J4=function(a,b,c){a=g.P(a.o.O().experiments,"embeds_impression_link_channel_thumbnail")? c.je:c.Ec(); b.da("ytp-impression-link-thumbnail").style.backgroundImage=a?"url("+a+")":""},K4=function(a,b,c){a=a.o.O(); var d="";c.ya?d="En directo":c.lengthSeconds&&(d=g.LM(c.lengthSeconds));c=c.shortViewCount?c.shortViewCount:"";var e="";c&&d?e=c+" \u2022 "+d:c?e=c:d&&(e=d);g.P(a.experiments,"embeds_impression_link_occlusion")?b.update({views:c,duration:d}):b.update({views_and_duration:e})},Lwa=function(a){var b,c,d,e; return g.Ba(function(f){if(1==f.o)return b=g.UJ(),c={isEmbedPreview:!0,videoId:a.videoId},d=g.FJ(g.XJ),g.sa(f,g.IJ(b,c,d),2);e=f.u;return f["return"](e)})},I4=function(a,b){var c,d,e,f,k; return g.Ba(function(l){if(1==l.o)return g.sa(l,Lwa(b),2);c=l.u;if(!c)return l["return"](null);d=a.o.O();e=new g.fB(d,{raw_watch_next_response:c});f=(0,g.Be)(e.suggestions,function(m){return m&&!m.list}); return(k=(0,g.Jc)(f,function(m){m=g.NM(d,m);g.A(a,m);return m}))&&0!=k.length?l["return"](k):l["return"](null)})},Kwa=function(a){var b,c,d,e,f,k,l; return g.Ba(function(m){if(1==m.o)return b=a.o.getVideoData(),g.sa(m,I4(a,b),2);if(3!=m.o){c=m.u;if(!c)return m["return"](null);d=b.em;e=c.filter(function(n){return null!==n&&n.author!==d}); return(f=e[0])?g.sa(m,Lwa(f),3):m["return"](null)}k=m.u;if(!k)return m["return"](null);l=new g.fB(a.o.O(),{raw_watch_next_response:k});return m["return"](l)})},L4=function(a){g.W.call(this,{D:"div", I:"ytp-muted-autoplay-endscreen-overlay",K:[{D:"div",I:"ytp-muted-autoplay-end-panel",K:[{D:"div",I:"ytp-muted-autoplay-end-text",W:"{{text}}"}]}]});this.o=a;this.A=this.da("ytp-muted-autoplay-end-panel");this.u=new g.wQ(a);g.A(this,this.u);this.u.ca(this.A,0);g.PL(a,this.element,this,52428);this.N(a,"presentingplayerstatechange",this.C);this.na("click",this.B);this.hide()},M4=function(a){g.W.call(this,{D:"div", I:"ytp-muted-autoplay-overlay",K:[{D:"div",I:"ytp-muted-autoplay-bottom-buttons",K:[{D:"button",X:["ytp-muted-autoplay-equalizer","ytp-button"],K:[{D:"div",X:["ytp-muted-autoplay-equalizer-icon"],K:[g.X?{D:"div",X:["ytp-icon","ytp-icon-equalizer-animation"]}:{D:"svg",P:{height:"100%",version:"1.1",viewBox:"-4 -4 24 24",width:"100%"},K:[{D:"g",P:{fill:"#fff"},K:[{D:"rect",I:"ytp-equalizer-bar-left",P:{height:"9",width:"4",x:"1",y:"7"}},{D:"rect",I:"ytp-equalizer-bar-middle",P:{height:"14",width:"4", x:"6",y:"2"}},{D:"rect",I:"ytp-equalizer-bar-right",P:{height:"12",width:"4",x:"11",y:"4"}}]}]}]}]}]}]});this.o=a;this.bottomButtons=this.da("ytp-muted-autoplay-bottom-buttons");this.A=this.da("ytp-muted-autoplay-equalizer");this.B=new g.I(this.C,4E3,this);g.PL(a,this.element,this,39306);this.N(a,"presentingplayerstatechange",this.u);this.N(a,"onMutedAutoplayStarts",this.u);this.na("click",this.F);this.hide()},N4=function(a,b){g.W.call(this,{D:"div", I:"ytp-pause-overlay"});this.o=a;this.ba=b;this.A=new g.Ur(this);g.A(this,this.A);this.U=new g.PN(this,1E3,!1,100);g.A(this,this.U);var c=a.O();"0"==c.controlsType&&g.J(a.getRootNode(),"ytp-pause-overlay-controls-hidden");this.C=[];this.u=[];this.F=0;this.ea=c.u;this.aa=!1;this.ua=0;this.T=new g.W({D:"h2",I:"ytp-related-title",W:"{{title}}"});g.A(this,this.T);this.T.ca(this.element);this.G=new g.W({D:"div",I:"ytp-suggestions"});g.A(this,this.G);this.G.ca(this.element);this.R=new g.W({D:"button",X:["ytp-button", "ytp-previous"],P:{"aria-label":"Mostrar v\u00eddeos sugeridos previamente"},K:[g.kN()]});g.A(this,this.R);this.R.ca(this.element);this.R.na("click",this.hJ,this);var d=g.Nt||g.Bh?{style:"will-change: opacity"}:null;this.fa=new D4((0,g.x)(this.sA,this));g.A(this,this.fa);for(var e=this.ma=this.Z=this.B=0;16>e;e++){var f=new g.W({D:"a",I:"ytp-suggestion-link",P:{href:"{{link}}",target:c.F,"aria-label":"{{aria_label}}"},K:[{D:"div",I:"ytp-suggestion-image"},{D:"div",I:"ytp-suggestion-overlay",P:d,K:[{D:"div", I:"ytp-suggestion-title",W:"{{title}}"},{D:"div",I:"ytp-suggestion-author",W:"{{author_and_views}}"},{D:"div",P:{"data-is-live":"{{is_live}}"},I:"ytp-suggestion-duration",W:"{{duration}}"}]}]});g.A(this,f);f.ca(this.G.element);var k=f.da("ytp-suggestion-link");g.H(k,"transitionDelay",e/20+"s");this.A.N(k,"click",g.Ra(this.iJ,e));this.C.push(f)}this.L=new g.W({D:"button",X:["ytp-button","ytp-next"],P:{"aria-label":"Mostrar m\u00e1s v\u00eddeos sugeridos"},K:[g.lN()]});g.A(this,this.L);this.L.ca(this.element); this.L.na("click",this.gJ,this);c=new g.W({D:"button",X:["ytp-button","ytp-collapse"],P:{"aria-label":"Ocultar m\u00e1s v\u00eddeos"},K:[Awa()]});g.A(this,c);c.ca(this.element);c.na("click",this.UK,this);this.H=new g.W({D:"button",X:["ytp-button","ytp-expand"],W:"M\u00e1s v\u00eddeos"});g.A(this,this.H);this.H.ca(this.element);this.H.na("click",this.VK,this);this.A.N(this.o,"appresize",this.pu);this.A.N(this.o,"fullscreentoggled",this.jJ);this.A.N(this.o,"presentingplayerstatechange",this.kJ);this.A.N(this.o, "videodatachange",this.rA);this.pu(g.uL(this.o).getPlayerSize());this.rA()},Mwa=function(a,b){var c=g.Ud(b,a.F-a.u.length*(a.Z+8),0); a.fa.start(a.B,c,1E3);a.B=c;O4(a)},O4=function(a){var b=a.ba.Lc(); b=a.ma/2+(b?32:16);a.L.element.style.bottom=b+"px";a.R.element.style.bottom=b+"px";b=a.B;var c=a.F-a.u.length*(a.Z+8);g.K(a.element,"ytp-scroll-min",0<=b);g.K(a.element,"ytp-scroll-max",b<=c)},Nwa=function(a){for(var b=0;bb&&this.delay.start()};g.r(E4,g.W);g.h=E4.prototype;g.h.hide=function(){this.U=!0;g.W.prototype.hide.call(this)}; g.h.show=function(){this.U=!1;g.W.prototype.show.call(this)}; g.h.isHidden=function(){return this.U}; g.h.lJ=function(){Dwa(this,this.B-this.F)}; g.h.mJ=function(){Dwa(this,this.B+this.F)}; g.h.nJ=function(a,b){var c=this.u[a],d=c.Zb;if(g.jO(b,this.o,this.ba,d||void 0)){var e=c.Da().videoId;c=c.getPlaylistId();g.UT(this.o.app,e,d,c,void 0,void 0)}}; g.h.tA=function(){var a=this,b=this.o.getVideoData(),c=this.o.O();this.ba=b.Wb?!1:c.u;if(b.suggestions){var d=(0,g.Be)(b.suggestions,function(e){return e&&!e.list}); this.u=(0,g.Jc)(d,function(e){e=g.NM(c,e);g.A(a,e);return e})}else this.u.length=0; Ewa(this);b.Wb?this.R.update({title:g.KM("M\u00e1s v\u00eddeos de $DNI_RELATED_CHANNEL",{DNI_RELATED_CHANNEL:b.author})}):this.R.update({title:"M\u00e1s v\u00eddeos de YouTube"})}; g.h.uA=function(a){this.G.element.scrollLeft=-a};g.r(G4,g.yQ);G4.prototype.show=function(){g.yQ.prototype.show.call(this);Fwa(this,g.uL(this.api).getPlayerSize())}; G4.prototype.o=function(a){g.yQ.prototype.o.call(this,a);Fwa(this,a);g.K(this.element,"related-on-error-overlay-visible",!this.u.isHidden())}; G4.prototype.A=function(a){g.yQ.prototype.A.call(this,a);var b=this.api.getVideoData(),c=g.P(this.api.O().experiments,"embeds_enable_sg_misinfo"),d;if(a.Fh){if(b.zo){a:{a=b.zo;if(a.runs)for(var e=0;e(0,g.N)()-this.ua)g.np(b),document.activeElement.blur();else{var c=this.u[a],d=c.Zb;if(g.jO(b,this.o,this.ea,d||void 0)){var e=c.Da().videoId;c=c.getPlaylistId();g.UT(this.o.app,e,d,c,void 0,void 0)}}}; g.h.jJ=function(){this.pu(g.uL(this.o).getPlayerSize())}; g.h.kJ=function(a){if(!(g.U(a.state,1)||g.U(a.state,16)||g.U(a.state,32))){var b=!g.P(this.o.O().experiments,"embeds_disable_pauseoverlay_on_autoplay_blocked_killswitch")&&g.U(a.state,2048);!g.U(a.state,4)||g.U(a.state,2)||b?this.U.hide():this.u.length&&(this.aa||(g.J(this.o.getRootNode(),"ytp-expand-pause-overlay"),O4(this)),this.U.show(),this.ua=(0,g.N)())}}; g.h.pu=function(a){var b=16/9,c=this.ba.Lc();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;if(c&&!this.B||!c&&this.B)a=480>a.width&&b.G?{D:"div",X:["ytp-icon","ytp-icon-watermark-small"]}:C4(),a=new g.W(a),b=this.da("ytp-watermark"),g.K(b,"ytp-watermark-small",c),g.ye(b),a.ca(b),this.B=c};g.r(Q4,g.ZL);g.h=Q4.prototype;g.h.Lf=function(){return!1}; g.h.create=function(){var a=this.o.O(),b=g.jC(this.o);a.Ea&&(this.H=new N4(this.o,b),g.A(this,this.H),g.NL(this.o,this.H.element,4));g.P(a.experiments,"embeds_enable_muted_autoplay")&&(this.A=new M4(this.o),g.A(this,this.A),g.NL(this.o,this.A.element,4),this.G=new L4(this.o),g.A(this,this.G),g.NL(this.o,this.G.element,4));if(a.Ga||this.A)this.B=new P4(this.o),g.A(this,this.B),g.NL(this.o,this.B.element,7);g.P(a.experiments,"embeds_impression_link")&&(this.F=new H4(this.o,b),g.A(this,this.F),g.NL(this.o, this.F.element,7));this.C.N(this.o,"appresize",this.fJ);this.C.N(this.o,"presentingplayerstatechange",this.eJ);this.C.N(this.o,"videodatachange",this.kP);this.C.N(this.o,"onMutedAutoplayStarts",this.fM);Owa(this,g.tL(this.o));g.KL(this.player,"embed")}; g.h.fJ=function(){var a=g.uL(this.o).getPlayerSize();this.u&&this.u.o(a)}; g.h.eJ=function(a){Owa(this,a.state)}; g.h.fM=function(){this.o.getVideoData().mutedAutoplay&&this.A&&this.B&&this.B.ca(this.A.bottomButtons,0)}; g.h.kP=function(){var a=this.o.getVideoData();this.B&&this.A&&!a.mutedAutoplay&&g.De(this.A.element,this.B.element)&&g.NL(this.o,this.B.element,7)};g.nM.embed=Q4;})(_yt_player);