import{D as r,Ka as u,M as c,W as s,da as i,r as n,y as l}from"./chunk-AO7NUUXN.js";var F=(()=>{class t{constructor(){this.isFullScreen=u(!1),setTimeout(()=>{this.isFullScreen.set(!!window.__initialFullscreen)},100)}init(){this.handleF11(),this.handleFullScreenChange()}enterFullScreen(){document.documentElement?.requestFullscreen()}exitFullScreen(){document?.exitFullscreen().catch(()=>this.handleBrowserInOwnFullscreenState())}handleFullScreenChange(){l(document,"fullscreenchange").pipe(n(()=>!!document.fullscreenElement),c(),s(1)).subscribe(e=>{this.isFullScreen.set(e)})}handleF11(){l(document,"keydown").pipe(r(e=>e.key==="F11"),n(e=>(e.preventDefault(),!!document.fullscreenElement))).subscribe(e=>{e?this.exitFullScreen():this.enterFullScreen()})}handleBrowserInOwnFullscreenState(){document?.documentElement?.requestFullscreen().then(()=>{document.exitFullscreen()})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=i({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();export{F as a};
