{"version":3,"sources":["webpack:///./node_modules/@capacitor-community/keep-awake/dist/esm/web.js"],"names":["KeepAwakeWeb","super","arguments","this","wakeLock","_isSupported","navigator","throwUnsupportedError","allowSleep","request","_a","release","result","isSupported","isKeptAwake","unavailable"],"mappings":"kHAAA,oEACO,MAAMA,UAAqB,OAC9B,cACIC,SAASC,WACTC,KAAKC,SAAW,KAChBD,KAAKE,aAAe,aAAcC,UAEtC,kBACSH,KAAKE,cACNF,KAAKI,wBAELJ,KAAKC,gBACCD,KAAKK,aAEfL,KAAKC,eAAiBE,UAAUF,SAASK,QAAQ,UAErD,mBACI,IAAIC,EACCP,KAAKE,cACNF,KAAKI,wBAEgB,QAAxBG,EAAKP,KAAKC,gBAA6B,IAAPM,GAAyBA,EAAGC,UAC7DR,KAAKC,SAAW,KAEpB,oBACI,MAAMQ,EAAS,CACXC,YAAaV,KAAKE,cAEtB,OAAOO,EAEX,oBACST,KAAKE,cACNF,KAAKI,wBAET,MAAMK,EAAS,CACXE,cAAeX,KAAKC,UAExB,OAAOQ,EAEX,wBACI,MAAMT,KAAKY,YAAY","file":"js/chunk-2d0e48db.7137b9bd.js","sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class KeepAwakeWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.wakeLock = null;\n this._isSupported = 'wakeLock' in navigator;\n }\n async keepAwake() {\n if (!this._isSupported) {\n this.throwUnsupportedError();\n }\n if (this.wakeLock) {\n await this.allowSleep();\n }\n this.wakeLock = await navigator.wakeLock.request('screen');\n }\n async allowSleep() {\n var _a;\n if (!this._isSupported) {\n this.throwUnsupportedError();\n }\n (_a = this.wakeLock) === null || _a === void 0 ? void 0 : _a.release();\n this.wakeLock = null;\n }\n async isSupported() {\n const result = {\n isSupported: this._isSupported,\n };\n return result;\n }\n async isKeptAwake() {\n if (!this._isSupported) {\n this.throwUnsupportedError();\n }\n const result = {\n isKeptAwake: !!this.wakeLock,\n };\n return result;\n }\n throwUnsupportedError() {\n throw this.unavailable('Screen Wake Lock API not available in this browser.');\n }\n}\n//# sourceMappingURL=web.js.map"],"sourceRoot":""}