/*! VERSION | 10.85.7 */"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[4963],{86592:(e,s,t)=>{t.d(s,{q:()=>E});var l=t(18775),i=t(76482),n=t(27378),o=t(48204),r=t(10269),a=t(35840),c=t(39120),h=t(99973),u=t(12265),d=t(75335),p=t(29421),v=t(84946);let m=h.BROWSER_CAPABILITIES.desktop&&!h.BROWSER_CAPABILITIES.isTablet,A={setControlsBlockVisibility:u.TK,updateViewCamSendTip:u.ED,hideActionMenu:r.fO};class F extends n.Component{componentWillUnmount(){this.hideControlsDebounce.cancel()}render(){return n.createElement(c.Z,{propsUpdateToActionsMap:this.propsUpdateToActionsMap,...this.props},n.createElement(v.G.Provider,{value:this.handlers},this.props.children))}constructor(...e){super(...e),(0,l._)(this,"wereShown",!1),(0,l._)(this,"isIgnoreMouseLeave",!1),(0,l._)(this,"propsUpdateToActionsMap",[{update:"modelId",action:()=>{h.BROWSER_CAPABILITIES.desktop||this.wereShown||this.showControlsAndRunHideDelay()}},{update:e=>!!(e.isFullscreen&&!this.props.isFullscreen),action:()=>{this.isIgnoreMouseLeave=!0,setTimeout(()=>{this.isIgnoreMouseLeave=!1})}}]),(0,l._)(this,"showControlsAndRunHideDelay",()=>{let{isControlsBlockVisible:e}=this.props;this.hideControlsDebounce(),e||this.props.setControlsBlockVisibility(!0)}),(0,l._)(this,"updateHideDelay",()=>{let{isControlsBlockVisible:e}=this.props;e&&this.hideControlsDebounce()}),(0,l._)(this,"hideControls",()=>{let{isControlsBlockVisible:e}=this.props;e&&(this.wereShown=!0,this.hideControlsDebounce.cancel(),this.props.setControlsBlockVisibility(!1))}),(0,l._)(this,"hideControlsDebounce",(0,i.Z)(()=>{let{isFullscreen:e}=this.props;e||this.hideControls()},4e3)),(0,l._)(this,"onBackgroundClick",()=>{let{isControlsBlockVisible:e,isFullscreenTipMenu:s,isFullscreenSendTip:t}=this.props;if(t){this.props.updateViewCamSendTip(null);return}if(s){this.props.hideActionMenu();return}!m&&e?this.hideControls():this.showControlsAndRunHideDelay()}),(0,l._)(this,"onMouseMoveOrEnter",()=>{h.BROWSER_CAPABILITIES.touch?this.updateHideDelay():this.showControlsAndRunHideDelay()}),(0,l._)(this,"onMouseLeave",()=>{this.isIgnoreMouseLeave||this.hideControls()}),(0,l._)(this,"handlers",{onBackgroundClick:this.onBackgroundClick,onMouseMoveOrEnter:this.onMouseMoveOrEnter,onMouseLeave:this.onMouseLeave})}}let E=(0,o.$j)(e=>({modelId:(0,a.n5)(e),isControlsBlockVisible:(0,d.Pd)(e),isFullscreen:(0,p.cU)(e),isFullscreenTipMenu:(0,d.pk)(e),isFullscreenSendTip:(0,p.yc)(e),isChatFocused:(0,a.zo)(e)}),A)(F)},52317:(e,s,t)=>{t.d(s,{q:()=>O});var l=t(18775),i=t(27378),n=t(48204),o=t(30754),r=t.n(o),a=t(36499),c=t(80439),h=t(10642),u=t(83550),d=t(39120),p=t(99973),v=t(99748),m=t(62512),A=t(63256),F=t(98371),E=t(62182),y=t(27251),M=t(58320),I=t(12265),C=t(75335),P=t(29421);class S{updateIosFullscreenRootClass(e){let s="ios-fullscreen";e?document.documentElement.classList.add(s):document.documentElement.classList.remove(s)}updateFullscreenBodyStyles(e){let{body:s}=document,{mac:t,safari:l}=p.BROWSER_CAPABILITIES;s.style.overflow=e?"hidden":"auto",t&&l&&(s.style.position=e?"fixed":"relative")}updateStyles(e){p.BROWSER_CAPABILITIES.iOS?this.updateIosFullscreenRootClass(e):this.updateFullscreenBodyStyles(e)}enter(){this.isActive||(this.updateStyles(!0),this.isActive=!0)}exit(){this.isActive&&(this.updateStyles(!1),this.isActive=!1)}constructor(){(0,l._)(this,"isActive",!1)}}var g=t(6679);let R=null,_=null;class B{get isPlayerInFullscreenMode(){return r().isEnabled&&r().isFullscreen&&r().element===this.getPlayerElem()}enterNativeFullscreen(){let e=this.getPlayerElem();return r().isEnabled&&e?r().request(e,{navigationUI:"hide"}):Promise.reject()}exitNativeFullscreen(){r().isEnabled&&r().exit()}movePortalRootIntoPlayerWrapper(){let e=this.getPlayerElem();null!=_||(_=document.getElementById(g.e)),_&&e&&e.appendChild(_)}movePortalRootBeforeReactRoot(){null!=R||(R=document.getElementById("body")),null!=_||(_=document.getElementById(g.e)),R&&_&&document.body.insertBefore(_,R)}async enter(){this.isPlayerInFullscreenMode||await this.enterNativeFullscreen(),!this.isModalsHackApplied&&this.shouldUseModalsHack&&(this.movePortalRootIntoPlayerWrapper(),this.setShouldRenderAllModalsInPortal(!0),this.isModalsHackApplied=!0),this.isActive=!0}exit(){this.isModalsHackApplied&&(this.setShouldRenderAllModalsInPortal(!1),this.movePortalRootBeforeReactRoot(),this.isModalsHackApplied=!1),this.isPlayerInFullscreenMode&&this.exitNativeFullscreen(),this.isActive=!1}get isIncompleteFullscreenEnter(){return this.isPlayerInFullscreenMode&&!this.isActive}get isIncompleteFullscreenExit(){return!this.isPlayerInFullscreenMode&&this.isActive}constructor(e){(0,l._)(this,"getPlayerElem",void 0),(0,l._)(this,"setShouldRenderAllModalsInPortal",void 0),(0,l._)(this,"shouldUseModalsHack",!1),(0,l._)(this,"isActive",!1),(0,l._)(this,"isModalsHackApplied",!1),this.getPlayerElem=e.getPlayerElem,this.setShouldRenderAllModalsInPortal=e.setShouldRenderAllModalsInPortal,this.shouldUseModalsHack=e.shouldUseModalsHack}}let w={toggleFullscreen:I.V9,setShouldRenderAllModalsInPortal:u.F5,setNativeFullscreenFail:I.L};class f extends i.Component{componentDidMount(){r().isEnabled&&r().on("change",this.onFullscreenChange),(0,m.H0)(this,document,"keydown",this.onKeyDown)}componentWillUnmount(){if(r().isEnabled&&r().off("change",this.onFullscreenChange),(0,m.OM)(this),document.pictureInPictureElement){var e,s;null===(e=(s=document).exitPictureInPicture)||void 0===e||e.call(s)}this.exitFullscreen()}onOrientationChange(){let{isMobile:e,isBlurVideoOnPrivate:s,isBroadcastingPageOpen:t,isAnyModalOpened:l,isFullscreen:i,shouldRenderPlayerOnBackground:n,windowOrientation:o}=this.props;if(!e||t||s||n||!i&&l||p.BROWSER_CAPABILITIES.iOS&&p.BROWSER_CAPABILITIES.firefoxMobile&&(0,v.gT)())return;let r="landscape"===o||"landscape-primary"===o||"landscape-secondary"===o;i!==r&&this.props.toggleFullscreen(r)}render(){return i.createElement(d.Z,{propsUpdateToActionsMap:this.propsUpdateToActionsMap,...this.props})}constructor(...e){super(...e),(0,l._)(this,"cssFullscreenSwitcher",new S),(0,l._)(this,"nativeFullscreenSwitcher",new B({getPlayerElem:()=>this.props.playerRef.current,setShouldRenderAllModalsInPortal:this.props.setShouldRenderAllModalsInPortal,shouldUseModalsHack:this.props.isRealFullscreenEnabled||this.props.shouldUseNativeFullscreen})),(0,l._)(this,"propsUpdateToActionsMap",[{update:E.Xd,action:()=>this.onOrientationChange()},{update:["isBroadcastingPageOpen"],action:()=>{this.props.isFullscreen&&this.props.toggleFullscreen(!1)}},{update:"isFullscreen",action:()=>{this.props.isFullscreen?this.enterFullscreen():this.exitFullscreen()}},{update:"isAnyModalOpened",action:()=>{!this.props.isRealFullscreenEnabled&&r().isFullscreen&&this.props.isAnyModalOpened&&this.props.isFullscreen&&this.props.toggleFullscreen(!1)}}]),(0,l._)(this,"onKeyDown",e=>{this.props.isFullscreen&&e.keyCode===p.KEY_CODES.escape&&(e.preventDefault(),e.stopPropagation(),this.props.toggleFullscreen(!1))}),(0,l._)(this,"onFullscreenChange",()=>{if(this.nativeFullscreenSwitcher.isIncompleteFullscreenEnter){this.props.toggleFullscreen(!0);return}this.nativeFullscreenSwitcher.isIncompleteFullscreenExit&&this.props.toggleFullscreen(!1)}),(0,l._)(this,"enterFullscreen",()=>{let{shouldUseNativeFullscreen:e,isBlurVideoOnPrivate:s}=this.props;if(!s){if(e){this.nativeFullscreenSwitcher.enter().catch(()=>{h.ZP.info("Can't request native fullscreen, use css fullscreen"),this.props.setNativeFullscreenFail(),this.cssFullscreenSwitcher.enter()});return}this.cssFullscreenSwitcher.enter()}}),(0,l._)(this,"exitFullscreen",async()=>{this.nativeFullscreenSwitcher.exit(),this.cssFullscreenSwitcher.exit()})}}let O=(0,n.$j)(e=>({isFullscreen:(0,P.cU)(e),windowOrientation:(0,y.Mp)(e),isBroadcastingPageOpen:(0,c.iD)(e),isMobile:(0,F.W7)(e),isAnyModalOpened:(0,y.dY)(e)||(0,a.yz)(e),shouldUseNativeFullscreen:(0,M.aW)(e),isRealFullscreenEnabled:(0,A.TYw)(e),isBlurVideoOnPrivate:(0,M.$C)(e),shouldRenderPlayerOnBackground:(0,C.qe)(e)}),w)(f)},38629:(e,s,t)=>{t.r(s),t.d(s,{PlayerWrapper:()=>M,default:()=>I});var l=t(27378),i=t(84946),n=t(86592),o=t(52317),r=t(99748),a=t(98846),c=t(95654),h=t(36886),u=t(63256),d=t(12712),p=t(80092),v=t(14151),m=t(58320),A=t(75335),F=t(29421);let E=(0,a.n7)({resolved:{},chunkName:()=>"SendMassMessagesModal",isReady(e){let s=this.resolve(e);return!0===this.resolved[s]&&!!t.m[s]},importAsync:()=>Promise.all([t.e(4893),t.e(5774)]).then(t.bind(t,33264)),requireAsync(e){let s=this.resolve(e);return this.resolved[s]=!1,this.importAsync(e).then(e=>(this.resolved[s]=!0,e))},requireSync(e){return t(this.resolve(e))},resolve:()=>33264},{fallback:void 0,ssr:!1}),y=e=>{let{onMouseLeave:s,onMouseMoveOrEnter:t}=(0,i.E)(),n=(0,l.useRef)(null),a=(0,c.C)(A.UP),y=(0,c.C)(A.Pd),M=(0,c.C)(m.Aq),I=(0,c.C)(F.cU),C=(0,c.C)(d.z),P=(0,c.C)(A.nz),S=(0,c.C)(u.hXr),g=(0,h.t)(),R=(0,c.C)(p.K$),{children:_,className:B}=e,w=(0,r.AK)("player-wrapper","broadcast-type-webrtc",`player-type-${g?M:"unknown"}`,B,{fullscreen:I,"native-fullscreen":P,isTheatreMode:C,hover:y||I&&R,cam2cam:a});return l.createElement("div",{className:w,onMouseMove:t,onMouseEnter:t,onMouseLeave:s,ref:n},l.createElement(o.q,{playerRef:n}),l.createElement("div",{id:v.PE}),l.createElement("div",{className:"content"},_,S&&l.createElement(E,null)))},M=e=>l.createElement(n.q,null,l.createElement(y,e)),I=M}}]);