Files
kapp/4561.4e8e2e693790e000.js
T
2026-05-21 11:19:10 -03:00

1 line
1.1 KiB
JavaScript

(self.webpackChunkapp=self.webpackChunkapp||[]).push([[4561],{64561:(l,a,i)=>{i.r(a),i.d(a,{Geolocation:()=>u,GeolocationWeb:()=>s});var t=i(15861),c=i(47423);class s extends c.Uw{getCurrentPosition(e){return(0,t.Z)(function*(){return new Promise((n,r)=>{navigator.geolocation.getCurrentPosition(o=>{n(o)},o=>{r(o)},Object.assign({enableHighAccuracy:!1,timeout:1e4,maximumAge:0},e))})})()}watchPosition(e,n){return(0,t.Z)(function*(){return`${navigator.geolocation.watchPosition(o=>{n(o)},o=>{n(null,o)},Object.assign({enableHighAccuracy:!1,timeout:1e4,maximumAge:0,minimumUpdateInterval:5e3},e))}`})()}clearWatch(e){return(0,t.Z)(function*(){navigator.geolocation.clearWatch(parseInt(e.id,10))})()}checkPermissions(){var e=this;return(0,t.Z)(function*(){if(typeof navigator>"u"||!navigator.permissions)throw e.unavailable("Permissions API not available in this browser");const n=yield navigator.permissions.query({name:"geolocation"});return{location:n.state,coarseLocation:n.state}})()}requestPermissions(){var e=this;return(0,t.Z)(function*(){throw e.unimplemented("Not implemented on web.")})()}}const u=new s}}]);