(self.webpackChunkapp=self.webpackChunkapp||[]).push([[9573],{59573:(a,n,i)=>{i.r(n),i.d(n,{KeepAwakeWeb:()=>o});var r=i(15861),s=i(47423);class o extends s.Uw{constructor(){super(...arguments),this.wakeLock=null,this._isSupported=typeof navigator<"u"&&"wakeLock"in navigator,this.handleVisibilityChange=()=>{"visible"===document.visibilityState&&this.keepAwake()}}keepAwake(){var e=this;return(0,r.Z)(function*(){e._isSupported||e.throwUnsupportedError(),e.wakeLock&&(yield e.allowSleep()),e.wakeLock=yield navigator.wakeLock.request("screen"),document.addEventListener("visibilitychange",e.handleVisibilityChange),document.addEventListener("fullscreenchange",e.handleVisibilityChange)})()}allowSleep(){var e=this;return(0,r.Z)(function*(){var t;e._isSupported||e.throwUnsupportedError(),null===(t=e.wakeLock)||void 0===t||t.release(),e.wakeLock=null,document.removeEventListener("visibilitychange",e.handleVisibilityChange),document.removeEventListener("fullscreenchange",e.handleVisibilityChange)})()}isSupported(){var e=this;return(0,r.Z)(function*(){return{isSupported:e._isSupported}})()}isKeptAwake(){var e=this;return(0,r.Z)(function*(){return e._isSupported||e.throwUnsupportedError(),{isKeptAwake:!!e.wakeLock}})()}throwUnsupportedError(){throw this.unavailable("Screen Wake Lock API not available in this browser.")}}}}]);