(function(g){var window=this;'use strict';var U3=function(a){g.W.call(this,{G:"div",L:"ytp-inline-preview-ui"});this.Be=!1;this.player=a;this.T(a,"onStateChange",this.dI);this.T(a,"videodatachange",this.Kl);this.T(a,"onInlinePreviewModeChange",this.oV);this.ge=new g.tp(this.Rq,null,this);g.H(this,this.ge)},V3=function(a){g.tL.call(this,a);
this.j=new U3(this.player);g.H(this,this.j);this.j.hide();g.gL(this.player,this.j.element,4);a.isInline()&&(this.load(),g.O(a.getRootNode(),"ytp-inline-preview-mode",!0),this.player.V().S("web_inline_player_disable_scrubbing")&&g.O(a.getRootNode(),"ytp-inline-preview-mode-no-scrubbing",!0))};
g.v(U3,g.W);g.h=U3.prototype;
g.h.PF=function(){this.tooltip=new g.qP(this.player,this);g.H(this,this.tooltip);g.gL(this.player,this.tooltip.element,4);this.tooltip.scale=.6;this.zc=new g.oM(this.player);g.H(this,this.zc);var a=["ytp-inline-preview-scrim"];this.player.V().S("web_inline_player_expand_to_watch")||a.push("ytp-inline-preview-scrim-clear");this.Rg=new g.W({G:"div",Ga:a});g.H(this,this.Rg);this.Rg.Ba(this.element);this.T(this.Rg.element,"click",this.vB);this.player.V().S("web_inline_player_expand_to_watch")&&(a=new g.u_(this.player,
this),g.H(this,a),a.Ba(this.Rg.element));this.Ug=new g.cP(this.player,this);g.H(this,this.Ug);this.Ug.Ba(this.Rg.element);this.controls=new g.W({G:"div",L:"ytp-inline-preview-controls"});g.H(this,this.controls);this.controls.Ba(this.element);a=new g.LN(this.player,this);g.H(this,a);a.Ba(this.controls.element);a=new g.aP(this.player,this);g.H(this,a);a.Ba(this.controls.element);this.Jc=new g.ZN(this.player,this);g.H(this,this.Jc);g.gL(this.player,this.Jc.element,4);this.T(this.player,"appresize",this.zb);
this.T(this.player,"fullscreentoggled",this.zb);this.zb()};
g.h.show=function(){g.up(this.ge);this.Be||(this.PF(),this.Be=!0);0!==this.player.getPlayerState()&&g.W.prototype.show.call(this);this.Jc.show()};
g.h.hide=function(){this.ge.stop();g.W.prototype.hide.call(this);this.player.isInline()||this.Be&&this.Jc.hide()};
g.h.ra=function(){g.W.prototype.ra.call(this)};
g.h.vB=function(a){a.target!==this.Rg.element||this.player.V().S("web_inline_player_expand_to_watch")||this.player.Oa("onExpandInlinePreview",a)};
g.h.oV=function(){g.O(this.player.getRootNode(),"ytp-inline-preview-mode",this.player.isInline())};
g.h.Hd=function(){this.Jc.Rb();this.Ug.Rb()};
g.h.Rq=function(){this.Hd();g.up(this.ge)};
g.h.zb=function(){g.oO(this.Jc,0,this.player.eb().getPlayerSize().width,!1);g.bO(this.Jc)};
g.h.dI=function(a){this.player.isInline()&&(0===a?this.hide():this.show())};
g.h.Kl=function(a,b){this.player.isInline()&&g.O(this.player.getRootNode(),"ytp-show-inline-preview-audio-controls",b.aG)};
g.h.qc=function(){return this.tooltip};
g.h.cf=function(){return!1};
g.h.Hf=function(){return!1};
g.h.Oi=function(){return!1};
g.h.py=function(){};
g.h.Un=function(){};
g.h.Vs=function(){};
g.h.Do=function(){return null};
g.h.Ow=function(){return null};
g.h.Mj=function(){return new g.Em(0,0,0,0)};
g.h.handleGlobalKeyDown=function(){return!1};
g.h.handleGlobalKeyUp=function(){return!1};
g.h.Yq=function(a,b,c,d,e){var f=d=0,k=0,l=g.Um(a);if(b){c=g.Bp(b,"ytp-miniplayer-expand-watch-page-button");var m=g.Bp(b,"ytp-mute-button"),n=g.Bp(b,"ytp-subtitles-button"),p=g.Sm(b,this.element);b=g.Um(b);d=p.y+40;c&&(k=8);if(n||m)k=p.x-l.width+b.width}else k=c-l.width/2,f=35;b=this.player.eb().getPlayerSize().width;k=g.yh(k,0,b-l.width);d?(a.style.top=d+(e||0)+"px",a.style.bottom=""):(a.style.top="",a.style.bottom=f+"px");a.style.left=k+"px"};
g.h.showControls=function(){};
g.h.Il=function(){};
g.h.Zk=function(){return!1};g.v(V3,g.tL);V3.prototype.gi=function(){return!1};
V3.prototype.load=function(){this.player.hideControls();this.j.show()};
V3.prototype.unload=function(){this.player.showControls();this.j.hide()};g.sL("inline_preview",V3);})(_yt_player);
