@bricks-soft/capacitor-location-tracking 8.0.1 → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BricksSoftCapacitorLocationTracking.podspec +18 -0
- package/Package.swift +13 -0
- package/README.md +476 -147
- package/android/build.gradle +3 -1
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/com/brickssoft/locationtracking/bridge/OptionParsers.kt +4 -1
- package/android/src/main/java/com/brickssoft/locationtracking/bridge/PluginHandlers.kt +14 -5
- package/android/src/main/java/com/brickssoft/locationtracking/config/Config.kt +10 -0
- package/android/src/main/java/com/brickssoft/locationtracking/config/ConfigJson.kt +70 -15
- package/android/src/main/java/com/brickssoft/locationtracking/config/ConfigStore.kt +6 -0
- package/android/src/main/java/com/brickssoft/locationtracking/config/ConfigValidator.kt +8 -3
- package/android/src/main/java/com/brickssoft/locationtracking/config/RuntimeStateJson.kt +10 -0
- package/android/src/main/java/com/brickssoft/locationtracking/config/SecretStore.kt +188 -0
- package/android/src/main/java/com/brickssoft/locationtracking/config/SharedPrefsConfigStore.kt +188 -17
- package/android/src/main/java/com/brickssoft/locationtracking/config/State.kt +11 -0
- package/android/src/main/java/com/brickssoft/locationtracking/core/Components.kt +21 -5
- package/android/src/main/java/com/brickssoft/locationtracking/core/ForceStopProbe.kt +20 -9
- package/android/src/main/java/com/brickssoft/locationtracking/core/TrackingEvent.kt +24 -2
- package/android/src/main/java/com/brickssoft/locationtracking/data/TrackingDatabase.kt +43 -1
- package/android/src/main/java/com/brickssoft/locationtracking/device/DefaultDeviceInfoProvider.kt +17 -0
- package/android/src/main/java/com/brickssoft/locationtracking/device/DeviceDetails.kt +167 -0
- package/android/src/main/java/com/brickssoft/locationtracking/engine/DefaultTrackingEngine.kt +191 -34
- package/android/src/main/java/com/brickssoft/locationtracking/engine/TrackingEngine.kt +6 -0
- package/android/src/main/java/com/brickssoft/locationtracking/engine/TrackingTimers.kt +3 -0
- package/android/src/main/java/com/brickssoft/locationtracking/heartbeat/DefaultHeartbeatScheduler.kt +52 -8
- package/android/src/main/java/com/brickssoft/locationtracking/heartbeat/HeartbeatAlarmReceiver.kt +22 -0
- package/android/src/main/java/com/brickssoft/locationtracking/http/AuthorizationManager.kt +78 -27
- package/android/src/main/java/com/brickssoft/locationtracking/http/ConfigChecks.kt +140 -0
- package/android/src/main/java/com/brickssoft/locationtracking/http/HttpSupport.kt +50 -12
- package/android/src/main/java/com/brickssoft/locationtracking/http/HttpSyncer.kt +17 -0
- package/android/src/main/java/com/brickssoft/locationtracking/http/OkHttpSyncer.kt +507 -92
- package/android/src/main/java/com/brickssoft/locationtracking/http/SyncPolicy.kt +6 -6
- package/android/src/main/java/com/brickssoft/locationtracking/http/TemplateRenderer.kt +23 -1
- package/android/src/main/java/com/brickssoft/locationtracking/http/UploadJobs.kt +217 -0
- package/android/src/main/java/com/brickssoft/locationtracking/http/UploadWait.kt +184 -0
- package/android/src/main/java/com/brickssoft/locationtracking/logging/FileLogger.kt +66 -7
- package/android/src/main/java/com/brickssoft/locationtracking/logging/LogRedaction.kt +31 -0
- package/android/src/main/java/com/brickssoft/locationtracking/model/DeviceModels.kt +44 -1
- package/android/src/main/java/com/brickssoft/locationtracking/model/ModelJson.kt +79 -8
- package/android/src/main/java/com/brickssoft/locationtracking/model/Record.kt +9 -0
- package/android/src/main/java/com/brickssoft/locationtracking/model/TrackedLocation.kt +12 -2
- package/android/src/main/java/com/brickssoft/locationtracking/position/DefaultPositionService.kt +10 -2
- package/android/src/main/java/com/brickssoft/locationtracking/position/PositionWatch.kt +24 -1
- package/android/src/main/java/com/brickssoft/locationtracking/processing/DefaultRecordFactory.kt +31 -10
- package/android/src/main/java/com/brickssoft/locationtracking/provider/Backends.kt +48 -3
- package/android/src/main/java/com/brickssoft/locationtracking/provider/DefaultProviderFactory.kt +60 -0
- package/android/src/main/java/com/brickssoft/locationtracking/provider/LocationSubscriptions.kt +180 -0
- package/android/src/main/java/com/brickssoft/locationtracking/provider/android/AndroidLocationBackend.kt +200 -126
- package/android/src/main/java/com/brickssoft/locationtracking/provider/android/LocationProviders.kt +20 -0
- package/android/src/main/java/com/brickssoft/locationtracking/provider/gms/GmsLocationBackend.kt +39 -51
- package/android/src/main/java/com/brickssoft/locationtracking/provider/gms/GmsProviderBundle.kt +8 -0
- package/android/src/main/java/com/brickssoft/locationtracking/provider/hms/HmsLocationBackend.kt +47 -53
- package/android/src/main/java/com/brickssoft/locationtracking/provider/hms/HmsProviderBundle.kt +34 -2
- package/android/src/main/java/com/brickssoft/locationtracking/record/RecordSink.kt +19 -1
- package/android/src/main/java/com/brickssoft/locationtracking/service/BootCountStore.kt +7 -0
- package/android/src/main/res/xml/lt_file_paths.xml +1 -1
- package/dist/esm/definitions.d.ts +117 -8
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/events.d.ts +8 -2
- package/dist/esm/events.js +7 -1
- package/dist/esm/events.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/web/config.js +10 -0
- package/dist/esm/web/config.js.map +1 -1
- package/dist/esm/web/device.d.ts +1 -1
- package/dist/esm/web/device.js +8 -1
- package/dist/esm/web/device.js.map +1 -1
- package/dist/esm/web.d.ts +0 -8
- package/dist/esm/web.js +12 -3
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +39 -5
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +39 -5
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/LocationTrackingPlugin/Api/BackgroundUpload.swift +24 -0
- package/ios/Sources/LocationTrackingPlugin/Api/LocationTrackingNative.swift +183 -0
- package/ios/Sources/LocationTrackingPlugin/Config/ConfigDefaults.swift +96 -0
- package/ios/Sources/LocationTrackingPlugin/Config/ConfigSchema.swift +74 -0
- package/ios/Sources/LocationTrackingPlugin/Config/ConfigValidator.swift +40 -0
- package/ios/Sources/LocationTrackingPlugin/Config/SecretStore.swift +35 -0
- package/ios/Sources/LocationTrackingPlugin/Config/TrackingConfig.swift +104 -0
- package/ios/Sources/LocationTrackingPlugin/Core/JSON.swift +50 -0
- package/ios/Sources/LocationTrackingPlugin/Core/Options.swift +26 -0
- package/ios/Sources/LocationTrackingPlugin/Core/PluginInfo.swift +6 -0
- package/ios/Sources/LocationTrackingPlugin/Core/TrackingClock.swift +11 -0
- package/ios/Sources/LocationTrackingPlugin/Core/TrackingCore.swift +298 -0
- package/ios/Sources/LocationTrackingPlugin/Data/TrackingStore.swift +155 -0
- package/ios/Sources/LocationTrackingPlugin/Device/DeviceReadings.swift +43 -0
- package/ios/Sources/LocationTrackingPlugin/Engine/CheckInNotifier.swift +92 -0
- package/ios/Sources/LocationTrackingPlugin/Engine/MotionStateMachine.swift +122 -0
- package/ios/Sources/LocationTrackingPlugin/Engine/SessionDeadline.swift +29 -0
- package/ios/Sources/LocationTrackingPlugin/Engine/TrackingEngine.swift +344 -0
- package/ios/Sources/LocationTrackingPlugin/Engine/TrackingTimers.swift +35 -0
- package/ios/Sources/LocationTrackingPlugin/Geofence/DwellTracker.swift +35 -0
- package/ios/Sources/LocationTrackingPlugin/Geofence/GeofenceEventAdapter.swift +88 -0
- package/ios/Sources/LocationTrackingPlugin/Geofence/GeofenceManager.swift +453 -0
- package/ios/Sources/LocationTrackingPlugin/Geofence/GeofenceMonitor.swift +207 -0
- package/ios/Sources/LocationTrackingPlugin/Geofence/GeofenceSpec.swift +103 -0
- package/ios/Sources/LocationTrackingPlugin/Geofence/GeofenceStore.swift +52 -0
- package/ios/Sources/LocationTrackingPlugin/Geofence/PolygonMath.swift +176 -0
- package/ios/Sources/LocationTrackingPlugin/Heartbeat/ExecutionAssertion.swift +33 -0
- package/ios/Sources/LocationTrackingPlugin/Heartbeat/HeartbeatWindow.swift +29 -0
- package/ios/Sources/LocationTrackingPlugin/Http/BodyBuilder.swift +52 -0
- package/ios/Sources/LocationTrackingPlugin/Http/HTTPTransport.swift +87 -0
- package/ios/Sources/LocationTrackingPlugin/Http/StrictJSON.swift +98 -0
- package/ios/Sources/LocationTrackingPlugin/Http/Syncer.swift +313 -0
- package/ios/Sources/LocationTrackingPlugin/Http/UploadBackoff.swift +26 -0
- package/ios/Sources/LocationTrackingPlugin/Location/RouteSource.swift +124 -0
- package/ios/Sources/LocationTrackingPlugin/LocationTrackingPlugin.swift +155 -0
- package/ios/Sources/LocationTrackingPlugin/Logging/LogExport.swift +73 -0
- package/ios/Sources/LocationTrackingPlugin/Logging/TrackingLog.swift +47 -0
- package/ios/Sources/LocationTrackingPlugin/Permission/LocationServices.swift +32 -0
- package/ios/Sources/LocationTrackingPlugin/Permission/Permissions.swift +102 -0
- package/ios/Sources/LocationTrackingPlugin/Position/PositionSource.swift +79 -0
- package/ios/Sources/LocationTrackingPlugin/Position/Positions.swift +33 -0
- package/ios/Sources/LocationTrackingPlugin/Position/SampleCollector.swift +31 -0
- package/ios/Sources/LocationTrackingPlugin/PrivacyInfo.xcprivacy +10 -0
- package/ios/Sources/LocationTrackingPlugin/Processing/LocationProcessor.swift +83 -0
- package/ios/Sources/LocationTrackingPlugin/Processing/TrackedLocation.swift +64 -0
- package/ios/Sources/LocationTrackingPlugin/Record/ExternalRecord.swift +54 -0
- package/ios/Sources/LocationTrackingPlugin/Record/RecordFactory.swift +27 -0
- package/package.json +10 -4
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/plugin.js","esm/events.js","esm/web/config.js","esm/web/device.js","esm/web/errors.js","esm/web/geolocation.js","esm/web/location.js","esm/web.js"],"sourcesContent":["// Owned by Unit 1 (TS wrapper + web).\nimport { registerPlugin } from '@capacitor/core';\n// Capacitor calls the web factory again for every call made before the first one resolves, so the (stateful) web\n// implementation is memoized: concurrent first calls such as `onLocation(...)` + `ready(...)` share one instance.\nlet webImplementation;\n/** The Capacitor plugin object. */\nexport const LocationTracking = registerPlugin('LocationTracking', {\n web: () => webImplementation || (webImplementation = import('./web').then((m) => new m.LocationTrackingWeb())),\n});\n//# sourceMappingURL=plugin.js.map","import { LocationTracking } from './plugin';\n/** Names of every event emitted by the plugin. */\nexport const Events = {\n LOCATION: 'location',\n MOTIONCHANGE: 'motionchange',\n ACTIVITYCHANGE: 'activitychange',\n PROVIDERCHANGE: 'providerchange',\n HEARTBEAT: 'heartbeat',\n GEOFENCE: 'geofence',\n GEOFENCESCHANGE: 'geofenceschange',\n HTTP: 'http',\n CONNECTIVITYCHANGE: 'connectivitychange',\n POWERSAVECHANGE: 'powersavechange',\n ENABLEDCHANGE: 'enabledchange',\n NOTIFICATIONACTION: 'notificationaction',\n AUTHORIZATION: 'authorization',\n};\n/**\n * Subscribes to any plugin event with a typed payload. Call `remove()` on the resolved handle to unsubscribe.\n * The helpers below are standalone functions on purpose: Capacitor's plugin proxy turns unknown properties of\n * `LocationTracking` into native calls, so nothing is attached to it.\n */\nexport function on(name, callback) {\n return LocationTracking.addListener(name, callback);\n}\n/** Every recorded location, including persisted `current_position` / `watch_position` fixes and motion changes. */\nexport const onLocation = (cb) => on('location', cb);\n/** Moving / stationary transitions, with the fix at the moment of the change. */\nexport const onMotionChange = (cb) => on('motionchange', cb);\n/** Detected activity (still, walking, in_vehicle, ...). */\nexport const onActivityChange = (cb) => on('activitychange', cb);\n/** Location services or permission changes. */\nexport const onProviderChange = (cb) => on('providerchange', cb);\n/** Heartbeat records, created when no record was made for `heartbeat.minInterval` seconds while tracking. */\nexport const onHeartbeat = (cb) => on('heartbeat', cb);\n/** Geofence ENTER / EXIT / DWELL transitions. */\nexport const onGeofence = (cb) => on('geofence', cb);\n/** Geofences added to or removed from monitoring. */\nexport const onGeofencesChange = (cb) => on('geofenceschange', cb);\n/** Result of every HTTP upload request. */\nexport const onHttp = (cb) => on('http', cb);\n/** Network connectivity changes. */\nexport const onConnectivityChange = (cb) => on('connectivitychange', cb);\n/** Battery-saver mode changes. */\nexport const onPowerSaveChange = (cb) => on('powersavechange', cb);\n/** Tracking enabled / disabled. */\nexport const onEnabledChange = (cb) => on('enabledchange', cb);\n/** Taps on the foreground notification's action buttons. */\nexport const onNotificationAction = (cb) => on('notificationaction', cb);\n/** JWT refresh results. */\nexport const onAuthorization = (cb) => on('authorization', cb);\n//# sourceMappingURL=events.js.map","/** Never copied: assigning `__proto__` would change the target's prototype instead of adding a key. */\nconst PROTO_KEY = '__proto__';\n/** Free-form maps. They are config values, not sections: a new value replaces the old one instead of merging. */\nconst MAP_VALUES = [\n 'http.headers',\n 'http.params',\n 'persistence.extras',\n 'http.authorization.refreshPayload',\n 'http.authorization.refreshHeaders',\n];\n/** Sections whose own default is `null`. `null` resets them to `null`; setting them fills in their field defaults. */\nconst NULLABLE_SECTIONS = ['http.authorization'];\n/**\n * Every documented `@default` of {@link Config}, mirroring the Android `Config` model.\n * Keys without a default (for example `notification.title`, which falls back to the app label) are left out.\n */\nexport function defaultConfig() {\n return {\n geolocation: {\n desiredAccuracy: 'high',\n distanceFilter: 10,\n locationUpdateInterval: 1000,\n fastestLocationUpdateInterval: 500,\n disableElasticity: false,\n elasticityMultiplier: 1,\n stationaryRadius: 25,\n stopTimeout: 5,\n stopAfterElapsedMinutes: 0,\n stopOnStationary: false,\n locationTimeout: 30000,\n filter: {\n useKalman: false,\n trackingAccuracyThreshold: 100,\n maxImpliedSpeed: 80,\n odometerAccuracyThreshold: 20,\n allowIdenticalLocations: false,\n rejectMockLocations: false,\n },\n },\n activity: {\n disableMotionActivityUpdates: false,\n activityRecognitionInterval: 10000,\n minimumActivityRecognitionConfidence: 75,\n motionTriggerDelay: 0,\n disableStopDetection: false,\n },\n heartbeat: {\n enabled: true,\n minInterval: 180,\n maxInterval: 300,\n },\n http: {\n url: null,\n method: 'POST',\n headers: {},\n params: {},\n autoSync: true,\n autoSyncThreshold: 0,\n syncInterval: 0,\n batchSync: false,\n maxBatchSize: 100,\n disableAutoSyncOnCellular: false,\n rootProperty: 'location',\n locationTemplate: null,\n geofenceTemplate: null,\n timeout: 60000,\n authorization: null,\n },\n persistence: {\n maxDaysToPersist: 7,\n maxRecordsToPersist: -1,\n extras: {},\n },\n app: {\n stopOnTerminate: true,\n startOnBoot: false,\n },\n notification: {\n text: 'Location tracking is active',\n smallIcon: 'drawable/lt_ic_notification',\n priority: 'default',\n channelId: 'location_tracking',\n channelName: 'Location tracking',\n actions: [],\n resume: {\n enabled: false,\n text: 'Location tracking is paused. Tap to resume.',\n channelName: 'Paused location tracking',\n },\n },\n geofence: {\n initialTriggerEntry: true,\n },\n logger: {\n logLevel: 'info',\n logMaxDays: 3,\n },\n backgroundPermissionRationale: {},\n locationProvider: 'auto',\n };\n}\n/** Field defaults of `http.authorization`, applied once it is set (the section itself defaults to `null`). */\nfunction defaultAuthorization() {\n return {\n strategy: 'JWT',\n refreshPayload: {},\n refreshHeaders: {},\n refreshPayloadEncoding: 'json',\n expires: -1,\n };\n}\nfunction defaultTrees() {\n const sections = defaultConfig();\n sections.http.authorization = defaultAuthorization();\n return { values: defaultConfig(), sections };\n}\nexport function isPlainObject(value) {\n return Object.prototype.toString.call(value) === '[object Object]';\n}\n/** Deep copy of JSON-like data (plain objects, arrays and primitives). */\nexport function cloneJson(value) {\n if (Array.isArray(value)) {\n return value.map((item) => cloneJson(item));\n }\n if (isPlainObject(value)) {\n const copy = {};\n for (const key of Object.keys(value)) {\n if (key !== PROTO_KEY) {\n copy[key] = cloneJson(value[key]);\n }\n }\n return copy;\n }\n return value;\n}\nfunction lookup(tree, path) {\n let node = tree;\n for (const key of path) {\n if (!isPlainObject(node)) {\n return undefined;\n }\n node = node[key];\n }\n return node;\n}\nfunction hasValue(patch) {\n return Object.keys(patch).some((key) => patch[key] !== undefined && patch[key] !== null);\n}\nfunction mergeInto(target, patch, path, trees) {\n for (const key of Object.keys(patch)) {\n const value = patch[key];\n if (value === undefined || key === PROTO_KEY) {\n continue;\n }\n const childPath = path.concat(key);\n const dotted = childPath.join('.');\n const sectionDefaults = lookup(trees.sections, childPath);\n const isSection = isPlainObject(sectionDefaults) && MAP_VALUES.indexOf(dotted) < 0;\n if (value === null) {\n // null resets the key to its default (fields of a null section use the section's field defaults);\n // keys without a default are removed.\n const own = lookup(trees.values, childPath);\n const reset = own !== undefined ? own : sectionDefaults;\n if (reset === undefined) {\n delete target[key];\n }\n else {\n target[key] = cloneJson(reset);\n }\n }\n else if (isSection) {\n // A section only accepts an object; anything else is ignored so the section stays fully populated.\n const current = target[key];\n // A null section is only switched on by a patch that sets something.\n const staysNull = NULLABLE_SECTIONS.indexOf(dotted) >= 0 && current === null && !hasValue(value);\n if (isPlainObject(value) && !staysNull) {\n const base = isPlainObject(current) ? current : cloneJson(sectionDefaults);\n mergeInto(base, value, childPath, trees);\n target[key] = base;\n }\n }\n else {\n // Arrays, maps and scalar values are replaced.\n target[key] = cloneJson(value);\n }\n }\n}\n/** The same clamps the Android config validator applies. */\nfunction clamp(config) {\n const heartbeat = config.heartbeat;\n if (heartbeat) {\n if (typeof heartbeat.minInterval === 'number' && heartbeat.minInterval < 60) {\n heartbeat.minInterval = 60;\n }\n if (typeof heartbeat.minInterval === 'number' &&\n typeof heartbeat.maxInterval === 'number' &&\n heartbeat.maxInterval < heartbeat.minInterval) {\n heartbeat.maxInterval = heartbeat.minInterval;\n }\n }\n const activity = config.activity;\n if (activity && typeof activity.minimumActivityRecognitionConfidence === 'number') {\n activity.minimumActivityRecognitionConfidence = Math.min(100, Math.max(0, activity.minimumActivityRecognitionConfidence));\n }\n const http = config.http;\n if (http && typeof http.maxBatchSize === 'number' && http.maxBatchSize < 1) {\n http.maxBatchSize = 1;\n }\n if (http && typeof http.syncInterval === 'number' && http.syncInterval < 0) {\n http.syncInterval = 0;\n }\n const notification = config.notification;\n if (notification && Array.isArray(notification.actions) && notification.actions.length > 3) {\n notification.actions = notification.actions.slice(0, 3);\n }\n}\n/**\n * Returns `base` deep-merged with `patch`, without changing either.\n * - Sections are merged key by key; arrays, maps (`headers`, `params`, `extras`, ...) and scalars are replaced.\n * - `null` resets a key to its default (`http.authorization` resets to `null`); `undefined` is ignored.\n */\nexport function mergeConfig(base, patch) {\n const result = cloneJson(base);\n if (patch) {\n mergeInto(result, patch, [], defaultTrees());\n }\n const config = result;\n clamp(config);\n return config;\n}\n/** The web `State`: tracking is never enabled on web, and nothing is recorded or persisted. */\nexport function webState(config) {\n return {\n enabled: false,\n trackingMode: 'location',\n isMoving: false,\n odometer: 0,\n backend: 'web',\n lastRecordAt: null,\n config: cloneJson(config),\n };\n}\n//# sourceMappingURL=config.js.map","/** `npm version` copies the `package.json` version here (scripts/sync-version.mjs); a test checks it. */\nexport const PLUGIN_VERSION = '8.0.1';\n/** Tokens after `Android x` that do not name a device ('K' is Chrome's reduced user agent). */\nconst NOT_A_MODEL = ['K', 'U', 'wv', 'Mobile', 'Tablet', 'HarmonyOS'];\n/** The device model among the `;`-separated tokens that follow `Android x` in the user agent's comment. */\nfunction androidModel(tokens) {\n for (const token of tokens) {\n const model = token.replace(/\\s*Build\\/.*$/, '').trim();\n const skip = !model ||\n NOT_A_MODEL.indexOf(model) >= 0 ||\n /^[a-z]{2}(?:[-_][a-z]{2})?$/i.test(model) || // locale, e.g. en-us\n /^(?:rv:|HMSCore)/.test(model);\n if (!skip) {\n return model;\n }\n }\n return undefined;\n}\nfunction parseOs(ua) {\n let match = /\\(([^)]*?)Android\\s*([\\d.]*)([^)]*)\\)/.exec(ua);\n if (match) {\n return {\n osVersion: match[2] ? `Android ${match[2]}` : 'Android',\n manufacturer: 'unknown',\n model: androidModel(match[3].split(';')),\n };\n }\n match = /(iPhone|iPad|iPod).*?OS (\\d+(?:_\\d+)*)/.exec(ua);\n if (match) {\n return { osVersion: `iOS ${match[2].replace(/_/g, '.')}`, manufacturer: 'Apple', model: match[1] };\n }\n match = /Mac OS X (\\d+(?:[_.]\\d+)*)/.exec(ua);\n if (match) {\n return { osVersion: `macOS ${match[1].replace(/_/g, '.')}`, manufacturer: 'Apple', model: 'Macintosh' };\n }\n match = /Windows NT (\\d+(?:\\.\\d+)*)/.exec(ua);\n if (match) {\n return { osVersion: `Windows ${match[1]}`, manufacturer: 'unknown', model: undefined };\n }\n match = /CrOS \\S+ (\\d+(?:\\.\\d+)*)/.exec(ua);\n if (match) {\n return { osVersion: `ChromeOS ${match[1]}`, manufacturer: 'unknown', model: undefined };\n }\n if (/Linux/.test(ua)) {\n return { osVersion: 'Linux', manufacturer: 'unknown', model: undefined };\n }\n return { osVersion: 'unknown', manufacturer: 'unknown', model: undefined };\n}\n/** Browser name and major version, e.g. `Chrome 120`. Order matters: many browsers also claim Chrome or Safari. */\nfunction parseBrowser(ua) {\n const browsers = [\n ['Edge', /Edg(?:e|A|iOS)?\\/(\\d+)/],\n ['Opera', /(?:OPR|Opera)\\/(\\d+)/],\n ['Samsung Internet', /SamsungBrowser\\/(\\d+)/],\n ['Huawei Browser', /HuaweiBrowser\\/(\\d+)/],\n ['Firefox', /(?:Firefox|FxiOS)\\/(\\d+)/],\n ['Chrome', /(?:Chrome|CriOS)\\/(\\d+)/],\n ['Safari', /Version\\/(\\d+)[\\d.]*.*Safari\\//],\n ['Node.js', /Node\\.js\\/(\\d+)/],\n ];\n for (const [name, pattern] of browsers) {\n const match = pattern.exec(ua);\n if (match) {\n return `${name} ${match[1]}`;\n }\n }\n return 'unknown';\n}\n/**\n * Best-effort `DeviceInfo` for a browser, parsed from `navigator.userAgent`.\n * `brand` is the browser, `model` the device when the user agent names one (else `navigator.platform`),\n * `osVersion` includes the OS name, and `sdkInt` is -1 because there is no Android API level.\n */\nexport function webDeviceInfo(userAgent, platform) {\n const os = parseOs(userAgent);\n return {\n platform: 'web',\n manufacturer: os.manufacturer,\n model: os.model || platform || 'unknown',\n brand: parseBrowser(userAgent),\n osVersion: os.osVersion,\n sdkInt: -1,\n pluginVersion: PLUGIN_VERSION,\n gmsAvailable: false,\n hmsAvailable: false,\n backend: 'web',\n packagedProviders: [],\n };\n}\n//# sourceMappingURL=device.js.map","// Owned by Unit 1 (TS wrapper + web).\nimport { CapacitorException } from '@capacitor/core';\n/** A rejection shaped like the native bridge's: a `CapacitorException` whose `code` is an `ErrorCode`. */\nexport function webError(code, message) {\n return new CapacitorException(message, code);\n}\n/** `GeolocationPositionError.code`: 1 = PERMISSION_DENIED, 2 = POSITION_UNAVAILABLE, 3 = TIMEOUT. */\nexport function positionErrorInfo(error) {\n const raw = error && typeof error.code === 'number' ? error.code : 0;\n const code = raw === 1 ? 'PERMISSION_DENIED' : raw === 3 ? 'TIMEOUT' : 'UNAVAILABLE';\n const fallback = code === 'PERMISSION_DENIED'\n ? 'Location permission denied.'\n : code === 'TIMEOUT'\n ? 'Timed out waiting for a location.'\n : 'Location unavailable.';\n const message = error && typeof error.message === 'string' && error.message ? error.message : fallback;\n return { code, message };\n}\n//# sourceMappingURL=errors.js.map","import { positionErrorInfo, webError } from './errors';\n/** Largest delay `setTimeout` accepts; longer delays would fire immediately. */\nconst MAX_TIMER_MS = 2147483647;\n/** How long the permission probe waits for a fix once the user has answered the prompt. */\nconst PROBE_TIMEOUT_MS = 10000;\n/** Overall limit for the permission probe: some browsers never call back when their prompt is dismissed. */\nconst PROBE_DEADLINE_MS = 60000;\n/** Returns `navigator.geolocation`, or `undefined` when the browser has none. */\nexport function browserGeolocation() {\n return typeof navigator !== 'undefined' && navigator && navigator.geolocation ? navigator.geolocation : undefined;\n}\n/**\n * Takes up to `samples` fixes with consecutive `getCurrentPosition` calls and resolves the most accurate one.\n * The whole run shares one deadline (`timeout`). When the deadline passes, or a later call fails, it resolves the\n * best fix taken so far; with no fix it rejects with `TIMEOUT`, `PERMISSION_DENIED` or `UNAVAILABLE`.\n */\nexport function sampleBestPosition(geolocation, options) {\n return new Promise((resolve, reject) => {\n const deadline = Date.now() + options.timeout;\n let best = null;\n let taken = 0;\n let done = false;\n let timer;\n const finish = (error) => {\n if (done) {\n return;\n }\n done = true;\n if (timer !== undefined) {\n clearTimeout(timer);\n }\n if (best) {\n resolve(best);\n }\n else {\n reject(error || webError('TIMEOUT', `No location within ${options.timeout} ms.`));\n }\n };\n const next = () => {\n if (done) {\n return;\n }\n try {\n geolocation.getCurrentPosition((position) => {\n if (done) {\n return;\n }\n taken++;\n if (!best || position.coords.accuracy <= best.coords.accuracy) {\n best = position;\n }\n if (taken >= options.samples) {\n finish();\n }\n else {\n next();\n }\n }, (error) => {\n const info = positionErrorInfo(error);\n finish(webError(info.code, info.message));\n }, {\n enableHighAccuracy: options.enableHighAccuracy,\n maximumAge: taken === 0 ? options.maximumAge : 0,\n timeout: Math.max(0, deadline - Date.now()),\n });\n }\n catch (e) {\n finish(webError('UNAVAILABLE', e instanceof Error ? e.message : String(e)));\n }\n };\n // The browser's own timeout does not run while its permission prompt is open; this deadline does.\n if (options.timeout <= MAX_TIMER_MS) {\n timer = setTimeout(() => finish(), options.timeout);\n }\n next();\n });\n}\n/**\n * Asks for one fix so the browser shows its permission prompt, and waits for the user's answer.\n * Resolves `'denied'` on PERMISSION_DENIED and `'granted'` otherwise: the browser reports TIMEOUT and\n * POSITION_UNAVAILABLE only after permission was granted. Resolves `'prompt'` if nothing happens within a minute.\n */\nexport function probeLocationPermission(geolocation) {\n return new Promise((resolve) => {\n let done = false;\n const finish = (state) => {\n if (!done) {\n done = true;\n clearTimeout(timer);\n resolve(state);\n }\n };\n const timer = setTimeout(() => finish('prompt'), PROBE_DEADLINE_MS);\n try {\n geolocation.getCurrentPosition(() => finish('granted'), (error) => finish(positionErrorInfo(error).code === 'PERMISSION_DENIED' ? 'denied' : 'granted'), { enableHighAccuracy: false, maximumAge: Infinity, timeout: PROBE_TIMEOUT_MS });\n }\n catch (_a) {\n finish('prompt');\n }\n });\n}\n/** State of the browser's `geolocation` permission, or `undefined` when the Permissions API cannot tell. */\nexport async function queryLocationPermission() {\n const permissions = typeof navigator !== 'undefined' && navigator ? navigator.permissions : undefined;\n if (!permissions || typeof permissions.query !== 'function') {\n return undefined;\n }\n try {\n const status = await permissions.query({ name: 'geolocation' });\n const state = status.state;\n return state === 'granted' || state === 'denied' || state === 'prompt' ? state : 'prompt';\n }\n catch (_a) {\n return undefined;\n }\n}\n//# sourceMappingURL=geolocation.js.map","/** A version 4 UUID: `crypto.randomUUID()`, else built from `crypto.getRandomValues()`, else from `Math.random()`. */\nexport function uuid() {\n const webCrypto = typeof crypto !== 'undefined' ? crypto : undefined;\n if (webCrypto && typeof webCrypto.randomUUID === 'function') {\n return webCrypto.randomUUID();\n }\n const bytes = new Uint8Array(16);\n if (webCrypto && typeof webCrypto.getRandomValues === 'function') {\n webCrypto.getRandomValues(bytes);\n }\n else {\n for (let i = 0; i < bytes.length; i++) {\n bytes[i] = Math.floor(Math.random() * 256);\n }\n }\n bytes[6] = (bytes[6] & 0x0f) | 0x40;\n bytes[8] = (bytes[8] & 0x3f) | 0x80;\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += (bytes[i] + 0x100).toString(16).slice(1);\n }\n return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;\n}\n/** ISO-8601 UTC with milliseconds (`yyyy-MM-ddTHH:mm:ss.SSSZ`). Invalid input falls back to now. */\nexport function isoTime(epochMs) {\n const ms = typeof epochMs === 'number' && isFinite(epochMs) ? Math.round(epochMs) : Date.now();\n return new Date(ms).toISOString();\n}\n/** Monotonic milliseconds since the page's time origin: the closest web equivalent of `elapsedRealtime`. */\nfunction elapsedMs() {\n const hasClock = typeof performance !== 'undefined' && typeof performance.now === 'function';\n return hasClock ? Math.round(performance.now()) : 0;\n}\nfunction numberOrNull(value) {\n return typeof value === 'number' && isFinite(value) ? value : null;\n}\n/** Maps a browser fix to the plugin's `Location` record shape. `extras` is left out when empty. */\nexport function toLocation(position, event, extras) {\n const coords = position.coords;\n const location = {\n uuid: uuid(),\n event,\n timestamp: isoTime(position.timestamp),\n recorded_at: isoTime(Date.now()),\n elapsed_realtime_ms: elapsedMs(),\n boot_count: -1,\n is_moving: false,\n odometer: 0,\n mock: false,\n coords: {\n latitude: coords.latitude,\n longitude: coords.longitude,\n accuracy: coords.accuracy,\n altitude: numberOrNull(coords.altitude),\n altitude_accuracy: numberOrNull(coords.altitudeAccuracy),\n speed: numberOrNull(coords.speed),\n speed_accuracy: null,\n heading: numberOrNull(coords.heading),\n heading_accuracy: null,\n },\n activity: { type: 'unknown', confidence: 0 },\n battery: { level: -1, is_charging: false },\n backend: 'web',\n };\n if (extras && Object.keys(extras).length > 0) {\n location.extras = extras;\n }\n return location;\n}\n//# sourceMappingURL=location.js.map","// Owned by Unit 1 (TS wrapper + web).\nimport { WebPlugin } from '@capacitor/core';\nimport { cloneJson, defaultConfig, isPlainObject, mergeConfig, webState } from './web/config';\nimport { webDeviceInfo } from './web/device';\nimport { positionErrorInfo, webError } from './web/errors';\nimport { browserGeolocation, probeLocationPermission, queryLocationPermission, sampleBestPosition, } from './web/geolocation';\nimport { toLocation } from './web/location';\nconst ALL_PERMISSIONS = ['location', 'notifications', 'activityRecognition', 'backgroundLocation'];\nfunction highAccuracy(accuracy) {\n return accuracy === undefined || accuracy === 'high';\n}\nfunction nonNegative(value, fallback) {\n return typeof value === 'number' && value >= 0 ? value : fallback;\n}\n/** The defaults plus `options.config` (optional; must be an object when given). */\nfunction configFromDefaults(options) {\n const given = options ? options.config : undefined;\n if (given !== undefined && given !== null && !isPlainObject(given)) {\n throw webError('INVALID_ARGUMENT', 'config must be an object.');\n }\n return mergeConfig(defaultConfig(), given || undefined);\n}\n/**\n * Web implementation. It covers `getCurrentPosition`, `watchPosition` and `clearWatch` (via `navigator.geolocation`),\n * an in-memory config and state, permissions and device info. Nothing is persisted or uploaded, and tracking cannot\n * be started. Every other method rejects with `UNIMPLEMENTED`.\n *\n * Like the Android bridge, methods other than `ready`, `getState`, `checkPermissions`, `requestPermissions` and\n * `getDeviceInfo` reject with `NOT_READY` until `ready()` has resolved.\n */\nexport class LocationTrackingWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.config = defaultConfig();\n this.isReady = false;\n this.lastPosition = null;\n this.watchSeq = 0;\n this.watches = new Map();\n }\n async ready(options) {\n const config = configFromDefaults(options);\n // reset:false applies the given config only on the first ready(); afterwards the current config wins.\n if (!options || options.reset !== false || !this.isReady) {\n this.config = config;\n }\n this.isReady = true;\n return webState(this.config);\n }\n async setConfig(options) {\n this.requireReady();\n if (!options || !isPlainObject(options.config)) {\n throw webError('INVALID_ARGUMENT', 'config must be an object.');\n }\n this.config = mergeConfig(this.config, options.config);\n return webState(this.config);\n }\n async reset(options) {\n this.requireReady();\n this.config = configFromDefaults(options);\n return webState(this.config);\n }\n async getState() {\n return webState(this.config);\n }\n async start() {\n throw this.unimplemented('Not implemented on web.');\n }\n async startGeofences() {\n throw this.unimplemented('Not implemented on web.');\n }\n async stop() {\n throw this.unimplemented('Not implemented on web.');\n }\n async changePace(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n /**\n * Takes `samples` fixes within `timeout` and resolves the most accurate one. With `maximumAge > 0`, a fix this\n * plugin received at most that long ago is returned right away. Like a persisted record on Android, the result is\n * also emitted as a `location` event unless `persist` is false.\n */\n async getCurrentPosition(options) {\n var _a;\n this.requireReady();\n const geolocation = this.requireGeolocation();\n const o = options || {};\n const maximumAge = nonNegative(o.maximumAge, 0);\n const cached = this.lastPosition;\n let position;\n if (maximumAge > 0 && cached && Date.now() - cached.timestamp <= maximumAge) {\n position = cached;\n }\n else {\n const samples = typeof o.samples === 'number' && o.samples >= 1 ? Math.floor(o.samples) : 3;\n position = await sampleBestPosition(geolocation, {\n samples,\n timeout: nonNegative(o.timeout, nonNegative((_a = this.config.geolocation) === null || _a === void 0 ? void 0 : _a.locationTimeout, 30000)),\n maximumAge,\n enableHighAccuracy: highAccuracy(o.desiredAccuracy),\n });\n }\n this.lastPosition = position;\n const location = toLocation(position, 'current_position', this.recordExtras(o.extras));\n if (o.persist !== false) {\n this.emit('location', location);\n }\n return location;\n }\n /**\n * Starts `navigator.geolocation.watchPosition` and resolves its id. The callback gets each fix as a\n * `watch_position` Location, or `(null, { code, message })` on error. `interval` is ignored: the browser decides\n * how often fixes arrive. With `persist: true` each fix is also emitted as a `location` event.\n */\n async watchPosition(options, callback) {\n this.requireReady();\n if (typeof callback !== 'function') {\n throw webError('INVALID_ARGUMENT', 'watchPosition requires a callback.');\n }\n const geolocation = this.requireGeolocation();\n const o = options || {};\n const callExtras = cloneJson(o.extras);\n const persist = o.persist === true;\n const entry = { active: true, geolocation, browserId: 0 };\n try {\n entry.browserId = geolocation.watchPosition((position) => {\n // Browsers may still deliver a queued fix after clearWatch.\n if (!entry.active) {\n return;\n }\n this.lastPosition = position;\n const location = toLocation(position, 'watch_position', this.recordExtras(callExtras));\n if (persist) {\n this.emit('location', location);\n }\n callback(location);\n }, (error) => {\n if (entry.active) {\n callback(null, positionErrorInfo(error));\n }\n }, { enableHighAccuracy: highAccuracy(o.desiredAccuracy), maximumAge: 0 });\n }\n catch (e) {\n throw webError('UNAVAILABLE', e instanceof Error ? e.message : String(e));\n }\n const id = `web-watch-${++this.watchSeq}`;\n this.watches.set(id, entry);\n return id;\n }\n /** Stops a watch. Unknown ids are ignored. */\n async clearWatch(options) {\n this.requireReady();\n if (!options || typeof options.id !== 'string') {\n throw webError('INVALID_ARGUMENT', 'id must be a string.');\n }\n const entry = this.watches.get(options.id);\n if (!entry) {\n return;\n }\n this.watches.delete(options.id);\n entry.active = false;\n entry.geolocation.clearWatch(entry.browserId);\n }\n async getOdometer() {\n throw this.unimplemented('Not implemented on web.');\n }\n async setOdometer(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async resetOdometer() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getLocations(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async getCount() {\n throw this.unimplemented('Not implemented on web.');\n }\n async insertLocation(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async destroyLocations() {\n throw this.unimplemented('Not implemented on web.');\n }\n async destroyLocation(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async sync() {\n throw this.unimplemented('Not implemented on web.');\n }\n async addGeofence(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async addGeofences(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async removeGeofence(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async removeGeofences(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async getGeofences() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getGeofence(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async geofenceExists(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async getHeartbeatStatus() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getProviderState() {\n throw this.unimplemented('Not implemented on web.');\n }\n async isPowerSaveMode() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getBatteryOptimizationStatus() {\n throw this.unimplemented('Not implemented on web.');\n }\n async openBatteryOptimizationSettings() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getPowerManagerInfo() {\n throw this.unimplemented('Not implemented on web.');\n }\n async openPowerManagerSettings() {\n throw this.unimplemented('Not implemented on web.');\n }\n async openLocationSettings() {\n throw this.unimplemented('Not implemented on web.');\n }\n async openAppSettings() {\n throw this.unimplemented('Not implemented on web.');\n }\n /** Best-effort values parsed from `navigator.userAgent`; `platform` is `'web'`. */\n async getDeviceInfo() {\n const nav = typeof navigator !== 'undefined' && navigator ? navigator : undefined;\n return webDeviceInfo(nav && typeof nav.userAgent === 'string' ? nav.userAgent : '', nav ? nav.platform : undefined);\n }\n async getSensors() {\n throw this.unimplemented('Not implemented on web.');\n }\n /** `location` comes from the Permissions API (`'prompt'` when it cannot tell); the other three are `'granted'`. */\n async checkPermissions() {\n const location = await queryLocationPermission();\n return {\n location: location || 'prompt',\n backgroundLocation: 'granted',\n activityRecognition: 'granted',\n notifications: 'granted',\n };\n }\n /** When `location` is requested and still undecided, asks for a fix so the browser prompts, then reports. */\n async requestPermissions(options) {\n const requested = options && Array.isArray(options.permissions) ? options.permissions : ALL_PERMISSIONS;\n const status = await this.checkPermissions();\n const geolocation = browserGeolocation();\n if (requested.indexOf('location') < 0 || status.location !== 'prompt' || !geolocation) {\n return status;\n }\n const answer = await probeLocationPermission(geolocation);\n // A granted probe is proof, even for a one-time grant the Permissions API still reports as 'prompt'. Otherwise\n // prefer the Permissions API: a dismissed prompt fails the probe as denied but leaves the permission at 'prompt'.\n status.location = answer === 'granted' ? answer : (await queryLocationPermission()) || answer;\n return status;\n }\n async log(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async getLog(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async destroyLog() {\n throw this.unimplemented('Not implemented on web.');\n }\n async uploadLog(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async emailLog(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n requireReady() {\n if (!this.isReady) {\n throw webError('NOT_READY', 'Call ready() before using this method.');\n }\n }\n requireGeolocation() {\n const geolocation = browserGeolocation();\n if (!geolocation) {\n throw webError('UNAVAILABLE', 'navigator.geolocation is not available.');\n }\n return geolocation;\n }\n /** `persistence.extras` merged with the call's extras (the call wins), like records created on Android. */\n recordExtras(extras) {\n const persisted = this.config.persistence ? this.config.persistence.extras : undefined;\n const merged = {};\n if (isPlainObject(persisted)) {\n Object.assign(merged, cloneJson(persisted));\n }\n if (isPlainObject(extras)) {\n Object.assign(merged, cloneJson(extras));\n }\n return Object.keys(merged).length > 0 ? merged : undefined;\n }\n /**\n * Like `notifyListeners`, but each listener gets its own copy of the payload (as on native, where every listener\n * receives deserialized data), and a throwing listener neither skips the others nor fails the calling method.\n */\n emit(eventName, data) {\n const listeners = this.listeners[eventName];\n if (!listeners) {\n return;\n }\n for (const listener of listeners.slice()) {\n try {\n listener(cloneJson(data));\n }\n catch (e) {\n console.error(`LocationTracking: \"${eventName}\" listener threw`, e);\n }\n }\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","CapacitorException","WebPlugin"],"mappings":";;;;AAAA;AAEA;AACA;AACA,IAAI,iBAAiB;AACrB;AACY,MAAC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,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACzC,YAAY;AACZ,YAAY,OAAO,CAAC,EAAE;AACtB,gBAAgB,OAAO,CAAC,KAAK,CAAC,CAAC,mBAAmB,EAAE,SAAS,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;AACnF,YAAY;AACZ,QAAQ;AACR,IAAI;AACJ;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/plugin.js","esm/events.js","esm/web/config.js","esm/web/device.js","esm/web/errors.js","esm/web/geolocation.js","esm/web/location.js","esm/web.js"],"sourcesContent":["// Owned by Unit 1 (TS wrapper + web).\nimport { registerPlugin } from '@capacitor/core';\n// Capacitor calls the web factory again for every call made before the first one resolves, so the (stateful) web\n// implementation is memoized: concurrent first calls such as `onLocation(...)` + `ready(...)` share one instance.\nlet webImplementation;\n/** The Capacitor plugin object. */\nexport const LocationTracking = registerPlugin('LocationTracking', {\n web: () => webImplementation || (webImplementation = import('./web').then((m) => new m.LocationTrackingWeb())),\n});\n//# sourceMappingURL=plugin.js.map","import { LocationTracking } from './plugin';\n/** Names of every event emitted by the plugin. */\nexport const Events = {\n LOCATION: 'location',\n MOTIONCHANGE: 'motionchange',\n ACTIVITYCHANGE: 'activitychange',\n PROVIDERCHANGE: 'providerchange',\n HEARTBEAT: 'heartbeat',\n GEOFENCE: 'geofence',\n GEOFENCESCHANGE: 'geofenceschange',\n HTTP: 'http',\n CONNECTIVITYCHANGE: 'connectivitychange',\n POWERSAVECHANGE: 'powersavechange',\n ENABLEDCHANGE: 'enabledchange',\n NOTIFICATIONACTION: 'notificationaction',\n AUTHORIZATION: 'authorization',\n LOCATIONERROR: 'locationerror',\n STORAGEFULL: 'storagefull',\n};\n/**\n * Subscribes to any plugin event with a typed payload. Call `remove()` on the resolved handle to unsubscribe.\n * The helpers below are standalone functions on purpose: Capacitor's plugin proxy turns unknown properties of\n * `LocationTracking` into native calls, so nothing is attached to it.\n */\nexport function on(name, callback) {\n return LocationTracking.addListener(name, callback);\n}\n/** Every recorded location, including persisted `current_position` / `watch_position` fixes and motion changes. */\nexport const onLocation = (cb) => on('location', cb);\n/** Moving / stationary transitions, with the fix at the moment of the change. */\nexport const onMotionChange = (cb) => on('motionchange', cb);\n/** Detected activity (still, walking, in_vehicle, ...). */\nexport const onActivityChange = (cb) => on('activitychange', cb);\n/** Location services or permission changes. */\nexport const onProviderChange = (cb) => on('providerchange', cb);\n/** Heartbeat records, created when no record was made for `heartbeat.minInterval` seconds while tracking. */\nexport const onHeartbeat = (cb) => on('heartbeat', cb);\n/** Geofence ENTER / EXIT / DWELL transitions. */\nexport const onGeofence = (cb) => on('geofence', cb);\n/** Geofences added to or removed from monitoring. */\nexport const onGeofencesChange = (cb) => on('geofenceschange', cb);\n/** Result of every HTTP upload request. */\nexport const onHttp = (cb) => on('http', cb);\n/** Network connectivity changes. */\nexport const onConnectivityChange = (cb) => on('connectivitychange', cb);\n/** Battery-saver mode changes. */\nexport const onPowerSaveChange = (cb) => on('powersavechange', cb);\n/** Tracking enabled / disabled, with the reason (the same values as the tracking_start / tracking_stop records). */\nexport const onEnabledChange = (cb) => on('enabledchange', cb);\n/** Taps on the foreground notification's action buttons. */\nexport const onNotificationAction = (cb) => on('notificationaction', cb);\n/** JWT refresh results. */\nexport const onAuthorization = (cb) => on('authorization', cb);\n/** The location request failed; the plugin requests updates again after `retryInMs`. */\nexport const onLocationError = (cb) => on('locationerror', cb);\n/** A record could not be stored because the device storage is full. */\nexport const onStorageFull = (cb) => on('storagefull', cb);\n//# sourceMappingURL=events.js.map","/** Never copied: assigning `__proto__` would change the target's prototype instead of adding a key. */\nconst PROTO_KEY = '__proto__';\n/** Free-form maps. They are config values, not sections: a new value replaces the old one instead of merging. */\nconst MAP_VALUES = [\n 'http.headers',\n 'http.params',\n 'persistence.extras',\n 'http.authorization.refreshPayload',\n 'http.authorization.refreshHeaders',\n];\n/** Sections whose own default is `null`. `null` resets them to `null`; setting them fills in their field defaults. */\nconst NULLABLE_SECTIONS = ['http.authorization'];\n/**\n * Every documented `@default` of {@link Config}, mirroring the Android `Config` model.\n * Keys without a default (for example `notification.title`, which falls back to the app label) are left out.\n */\nexport function defaultConfig() {\n return {\n geolocation: {\n desiredAccuracy: 'high',\n distanceFilter: 10,\n locationUpdateInterval: 1000,\n fastestLocationUpdateInterval: 500,\n disableElasticity: false,\n elasticityMultiplier: 1,\n stationaryRadius: 25,\n stopTimeout: 5,\n stopAfterElapsedMinutes: 0,\n stopOnStationary: false,\n locationTimeout: 30000,\n filter: {\n useKalman: false,\n trackingAccuracyThreshold: 100,\n maxImpliedSpeed: 80,\n odometerAccuracyThreshold: 20,\n allowIdenticalLocations: false,\n rejectMockLocations: false,\n },\n },\n activity: {\n disableMotionActivityUpdates: false,\n activityRecognitionInterval: 10000,\n minimumActivityRecognitionConfidence: 75,\n motionTriggerDelay: 0,\n disableStopDetection: false,\n },\n heartbeat: {\n enabled: true,\n minInterval: 180,\n maxInterval: 300,\n uploadKeepAwake: 10,\n },\n http: {\n url: null,\n method: 'POST',\n headers: {},\n params: {},\n autoSync: true,\n autoSyncThreshold: 0,\n syncInterval: 0,\n batchSync: false,\n maxBatchSize: 100,\n disableAutoSyncOnCellular: false,\n rootProperty: 'location',\n locationTemplate: null,\n geofenceTemplate: null,\n timeout: 60000,\n maxRetryAfter: 3600,\n authorization: null,\n },\n persistence: {\n maxDaysToPersist: 7,\n maxRecordsToPersist: -1,\n extras: {},\n },\n app: {\n stopOnTerminate: true,\n startOnBoot: false,\n },\n notification: {\n text: 'Location tracking is active',\n smallIcon: 'drawable/lt_ic_notification',\n priority: 'default',\n channelId: 'location_tracking',\n channelName: 'Location tracking',\n actions: [],\n resume: {\n enabled: false,\n text: 'Location tracking is paused. Tap to resume.',\n channelName: 'Paused location tracking',\n },\n },\n geofence: {\n initialTriggerEntry: true,\n },\n logger: {\n logLevel: 'info',\n logMaxDays: 3,\n },\n backgroundPermissionRationale: {},\n locationProvider: 'auto',\n };\n}\n/** Field defaults of `http.authorization`, applied once it is set (the section itself defaults to `null`). */\nfunction defaultAuthorization() {\n return {\n strategy: 'JWT',\n refreshPayload: {},\n refreshHeaders: {},\n refreshPayloadEncoding: 'json',\n expires: -1,\n };\n}\nfunction defaultTrees() {\n const sections = defaultConfig();\n sections.http.authorization = defaultAuthorization();\n return { values: defaultConfig(), sections };\n}\nexport function isPlainObject(value) {\n return Object.prototype.toString.call(value) === '[object Object]';\n}\n/** Deep copy of JSON-like data (plain objects, arrays and primitives). */\nexport function cloneJson(value) {\n if (Array.isArray(value)) {\n return value.map((item) => cloneJson(item));\n }\n if (isPlainObject(value)) {\n const copy = {};\n for (const key of Object.keys(value)) {\n if (key !== PROTO_KEY) {\n copy[key] = cloneJson(value[key]);\n }\n }\n return copy;\n }\n return value;\n}\nfunction lookup(tree, path) {\n let node = tree;\n for (const key of path) {\n if (!isPlainObject(node)) {\n return undefined;\n }\n node = node[key];\n }\n return node;\n}\nfunction hasValue(patch) {\n return Object.keys(patch).some((key) => patch[key] !== undefined && patch[key] !== null);\n}\nfunction mergeInto(target, patch, path, trees) {\n for (const key of Object.keys(patch)) {\n const value = patch[key];\n if (value === undefined || key === PROTO_KEY) {\n continue;\n }\n const childPath = path.concat(key);\n const dotted = childPath.join('.');\n const sectionDefaults = lookup(trees.sections, childPath);\n const isSection = isPlainObject(sectionDefaults) && MAP_VALUES.indexOf(dotted) < 0;\n if (value === null) {\n // null resets the key to its default (fields of a null section use the section's field defaults);\n // keys without a default are removed.\n const own = lookup(trees.values, childPath);\n const reset = own !== undefined ? own : sectionDefaults;\n if (reset === undefined) {\n delete target[key];\n }\n else {\n target[key] = cloneJson(reset);\n }\n }\n else if (isSection) {\n // A section only accepts an object; anything else is ignored so the section stays fully populated.\n const current = target[key];\n // A null section is only switched on by a patch that sets something.\n const staysNull = NULLABLE_SECTIONS.indexOf(dotted) >= 0 && current === null && !hasValue(value);\n if (isPlainObject(value) && !staysNull) {\n const base = isPlainObject(current) ? current : cloneJson(sectionDefaults);\n mergeInto(base, value, childPath, trees);\n target[key] = base;\n }\n }\n else {\n // Arrays, maps and scalar values are replaced.\n target[key] = cloneJson(value);\n }\n }\n}\n/** The same clamps the Android config validator applies. */\nfunction clamp(config) {\n const heartbeat = config.heartbeat;\n if (heartbeat) {\n if (typeof heartbeat.minInterval === 'number' && heartbeat.minInterval < 60) {\n heartbeat.minInterval = 60;\n }\n if (typeof heartbeat.minInterval === 'number' &&\n typeof heartbeat.maxInterval === 'number' &&\n heartbeat.maxInterval < heartbeat.minInterval) {\n heartbeat.maxInterval = heartbeat.minInterval;\n }\n if (typeof heartbeat.uploadKeepAwake === 'number') {\n heartbeat.uploadKeepAwake = Math.min(60, Math.max(0, heartbeat.uploadKeepAwake));\n }\n }\n const activity = config.activity;\n if (activity && typeof activity.minimumActivityRecognitionConfidence === 'number') {\n activity.minimumActivityRecognitionConfidence = Math.min(100, Math.max(0, activity.minimumActivityRecognitionConfidence));\n }\n const http = config.http;\n if (http && typeof http.maxBatchSize === 'number' && http.maxBatchSize < 1) {\n http.maxBatchSize = 1;\n }\n if (http && typeof http.syncInterval === 'number' && http.syncInterval < 0) {\n http.syncInterval = 0;\n }\n if (http && typeof http.maxRetryAfter === 'number' && http.maxRetryAfter < 0) {\n http.maxRetryAfter = 0;\n }\n const notification = config.notification;\n if (notification && Array.isArray(notification.actions) && notification.actions.length > 3) {\n notification.actions = notification.actions.slice(0, 3);\n }\n}\n/**\n * Returns `base` deep-merged with `patch`, without changing either.\n * - Sections are merged key by key; arrays, maps (`headers`, `params`, `extras`, ...) and scalars are replaced.\n * - `null` resets a key to its default (`http.authorization` resets to `null`); `undefined` is ignored.\n */\nexport function mergeConfig(base, patch) {\n const result = cloneJson(base);\n if (patch) {\n mergeInto(result, patch, [], defaultTrees());\n }\n const config = result;\n clamp(config);\n return config;\n}\n/** The web `State`: tracking is never enabled on web, and nothing is recorded or persisted. */\nexport function webState(config) {\n return {\n enabled: false,\n trackingMode: 'location',\n isMoving: false,\n odometer: 0,\n backend: 'web',\n lastRecordAt: null,\n lastStopReason: null,\n lastStopAt: null,\n config: cloneJson(config),\n };\n}\n//# sourceMappingURL=config.js.map","/** `npm version` copies the `package.json` version here (scripts/sync-version.mjs); a test checks it. */\nexport const PLUGIN_VERSION = '8.2.0';\n/** Tokens after `Android x` that do not name a device ('K' is Chrome's reduced user agent). */\nconst NOT_A_MODEL = ['K', 'U', 'wv', 'Mobile', 'Tablet', 'HarmonyOS'];\n/** The device model among the `;`-separated tokens that follow `Android x` in the user agent's comment. */\nfunction androidModel(tokens) {\n for (const token of tokens) {\n const model = token.replace(/\\s*Build\\/.*$/, '').trim();\n const skip = !model ||\n NOT_A_MODEL.indexOf(model) >= 0 ||\n /^[a-z]{2}(?:[-_][a-z]{2})?$/i.test(model) || // locale, e.g. en-us\n /^(?:rv:|HMSCore)/.test(model);\n if (!skip) {\n return model;\n }\n }\n return undefined;\n}\nfunction parseOs(ua) {\n let match = /\\(([^)]*?)Android\\s*([\\d.]*)([^)]*)\\)/.exec(ua);\n if (match) {\n return {\n osVersion: match[2] ? `Android ${match[2]}` : 'Android',\n manufacturer: 'unknown',\n model: androidModel(match[3].split(';')),\n };\n }\n match = /(iPhone|iPad|iPod).*?OS (\\d+(?:_\\d+)*)/.exec(ua);\n if (match) {\n return { osVersion: `iOS ${match[2].replace(/_/g, '.')}`, manufacturer: 'Apple', model: match[1] };\n }\n match = /Mac OS X (\\d+(?:[_.]\\d+)*)/.exec(ua);\n if (match) {\n return { osVersion: `macOS ${match[1].replace(/_/g, '.')}`, manufacturer: 'Apple', model: 'Macintosh' };\n }\n match = /Windows NT (\\d+(?:\\.\\d+)*)/.exec(ua);\n if (match) {\n return { osVersion: `Windows ${match[1]}`, manufacturer: 'unknown', model: undefined };\n }\n match = /CrOS \\S+ (\\d+(?:\\.\\d+)*)/.exec(ua);\n if (match) {\n return { osVersion: `ChromeOS ${match[1]}`, manufacturer: 'unknown', model: undefined };\n }\n if (/Linux/.test(ua)) {\n return { osVersion: 'Linux', manufacturer: 'unknown', model: undefined };\n }\n return { osVersion: 'unknown', manufacturer: 'unknown', model: undefined };\n}\n/** Browser name and major version, e.g. `Chrome 120`. Order matters: many browsers also claim Chrome or Safari. */\nfunction parseBrowser(ua) {\n const browsers = [\n ['Edge', /Edg(?:e|A|iOS)?\\/(\\d+)/],\n ['Opera', /(?:OPR|Opera)\\/(\\d+)/],\n ['Samsung Internet', /SamsungBrowser\\/(\\d+)/],\n ['Huawei Browser', /HuaweiBrowser\\/(\\d+)/],\n ['Firefox', /(?:Firefox|FxiOS)\\/(\\d+)/],\n ['Chrome', /(?:Chrome|CriOS)\\/(\\d+)/],\n ['Safari', /Version\\/(\\d+)[\\d.]*.*Safari\\//],\n ['Node.js', /Node\\.js\\/(\\d+)/],\n ];\n for (const [name, pattern] of browsers) {\n const match = pattern.exec(ua);\n if (match) {\n return `${name} ${match[1]}`;\n }\n }\n return 'unknown';\n}\n/**\n * Best-effort `DeviceInfo` for a browser, parsed from `navigator.userAgent`.\n * `brand` is the browser, `model` the device when the user agent names one (else `navigator.platform`),\n * `osVersion` includes the OS name, and `sdkInt` is -1 because there is no Android API level.\n */\nexport function webDeviceInfo(userAgent, platform) {\n const os = parseOs(userAgent);\n return {\n platform: 'web',\n manufacturer: os.manufacturer,\n model: os.model || platform || 'unknown',\n brand: parseBrowser(userAgent),\n osVersion: os.osVersion,\n sdkInt: -1,\n pluginVersion: PLUGIN_VERSION,\n gmsAvailable: false,\n hmsAvailable: false,\n backend: 'web',\n packagedProviders: [],\n backendFallbackReason: null,\n gmsStatus: null,\n hmsStatus: null,\n hmsCoreOutdated: null,\n locationAvailableHint: null,\n cpuCores: typeof navigator !== 'undefined' && navigator.hardwareConcurrency ? navigator.hardwareConcurrency : 0,\n supportedAbis: [],\n };\n}\n//# sourceMappingURL=device.js.map","// Owned by Unit 1 (TS wrapper + web).\nimport { CapacitorException } from '@capacitor/core';\n/** A rejection shaped like the native bridge's: a `CapacitorException` whose `code` is an `ErrorCode`. */\nexport function webError(code, message) {\n return new CapacitorException(message, code);\n}\n/** `GeolocationPositionError.code`: 1 = PERMISSION_DENIED, 2 = POSITION_UNAVAILABLE, 3 = TIMEOUT. */\nexport function positionErrorInfo(error) {\n const raw = error && typeof error.code === 'number' ? error.code : 0;\n const code = raw === 1 ? 'PERMISSION_DENIED' : raw === 3 ? 'TIMEOUT' : 'UNAVAILABLE';\n const fallback = code === 'PERMISSION_DENIED'\n ? 'Location permission denied.'\n : code === 'TIMEOUT'\n ? 'Timed out waiting for a location.'\n : 'Location unavailable.';\n const message = error && typeof error.message === 'string' && error.message ? error.message : fallback;\n return { code, message };\n}\n//# sourceMappingURL=errors.js.map","import { positionErrorInfo, webError } from './errors';\n/** Largest delay `setTimeout` accepts; longer delays would fire immediately. */\nconst MAX_TIMER_MS = 2147483647;\n/** How long the permission probe waits for a fix once the user has answered the prompt. */\nconst PROBE_TIMEOUT_MS = 10000;\n/** Overall limit for the permission probe: some browsers never call back when their prompt is dismissed. */\nconst PROBE_DEADLINE_MS = 60000;\n/** Returns `navigator.geolocation`, or `undefined` when the browser has none. */\nexport function browserGeolocation() {\n return typeof navigator !== 'undefined' && navigator && navigator.geolocation ? navigator.geolocation : undefined;\n}\n/**\n * Takes up to `samples` fixes with consecutive `getCurrentPosition` calls and resolves the most accurate one.\n * The whole run shares one deadline (`timeout`). When the deadline passes, or a later call fails, it resolves the\n * best fix taken so far; with no fix it rejects with `TIMEOUT`, `PERMISSION_DENIED` or `UNAVAILABLE`.\n */\nexport function sampleBestPosition(geolocation, options) {\n return new Promise((resolve, reject) => {\n const deadline = Date.now() + options.timeout;\n let best = null;\n let taken = 0;\n let done = false;\n let timer;\n const finish = (error) => {\n if (done) {\n return;\n }\n done = true;\n if (timer !== undefined) {\n clearTimeout(timer);\n }\n if (best) {\n resolve(best);\n }\n else {\n reject(error || webError('TIMEOUT', `No location within ${options.timeout} ms.`));\n }\n };\n const next = () => {\n if (done) {\n return;\n }\n try {\n geolocation.getCurrentPosition((position) => {\n if (done) {\n return;\n }\n taken++;\n if (!best || position.coords.accuracy <= best.coords.accuracy) {\n best = position;\n }\n if (taken >= options.samples) {\n finish();\n }\n else {\n next();\n }\n }, (error) => {\n const info = positionErrorInfo(error);\n finish(webError(info.code, info.message));\n }, {\n enableHighAccuracy: options.enableHighAccuracy,\n maximumAge: taken === 0 ? options.maximumAge : 0,\n timeout: Math.max(0, deadline - Date.now()),\n });\n }\n catch (e) {\n finish(webError('UNAVAILABLE', e instanceof Error ? e.message : String(e)));\n }\n };\n // The browser's own timeout does not run while its permission prompt is open; this deadline does.\n if (options.timeout <= MAX_TIMER_MS) {\n timer = setTimeout(() => finish(), options.timeout);\n }\n next();\n });\n}\n/**\n * Asks for one fix so the browser shows its permission prompt, and waits for the user's answer.\n * Resolves `'denied'` on PERMISSION_DENIED and `'granted'` otherwise: the browser reports TIMEOUT and\n * POSITION_UNAVAILABLE only after permission was granted. Resolves `'prompt'` if nothing happens within a minute.\n */\nexport function probeLocationPermission(geolocation) {\n return new Promise((resolve) => {\n let done = false;\n const finish = (state) => {\n if (!done) {\n done = true;\n clearTimeout(timer);\n resolve(state);\n }\n };\n const timer = setTimeout(() => finish('prompt'), PROBE_DEADLINE_MS);\n try {\n geolocation.getCurrentPosition(() => finish('granted'), (error) => finish(positionErrorInfo(error).code === 'PERMISSION_DENIED' ? 'denied' : 'granted'), { enableHighAccuracy: false, maximumAge: Infinity, timeout: PROBE_TIMEOUT_MS });\n }\n catch (_a) {\n finish('prompt');\n }\n });\n}\n/** State of the browser's `geolocation` permission, or `undefined` when the Permissions API cannot tell. */\nexport async function queryLocationPermission() {\n const permissions = typeof navigator !== 'undefined' && navigator ? navigator.permissions : undefined;\n if (!permissions || typeof permissions.query !== 'function') {\n return undefined;\n }\n try {\n const status = await permissions.query({ name: 'geolocation' });\n const state = status.state;\n return state === 'granted' || state === 'denied' || state === 'prompt' ? state : 'prompt';\n }\n catch (_a) {\n return undefined;\n }\n}\n//# sourceMappingURL=geolocation.js.map","/** A version 4 UUID: `crypto.randomUUID()`, else built from `crypto.getRandomValues()`, else from `Math.random()`. */\nexport function uuid() {\n const webCrypto = typeof crypto !== 'undefined' ? crypto : undefined;\n if (webCrypto && typeof webCrypto.randomUUID === 'function') {\n return webCrypto.randomUUID();\n }\n const bytes = new Uint8Array(16);\n if (webCrypto && typeof webCrypto.getRandomValues === 'function') {\n webCrypto.getRandomValues(bytes);\n }\n else {\n for (let i = 0; i < bytes.length; i++) {\n bytes[i] = Math.floor(Math.random() * 256);\n }\n }\n bytes[6] = (bytes[6] & 0x0f) | 0x40;\n bytes[8] = (bytes[8] & 0x3f) | 0x80;\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += (bytes[i] + 0x100).toString(16).slice(1);\n }\n return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;\n}\n/** ISO-8601 UTC with milliseconds (`yyyy-MM-ddTHH:mm:ss.SSSZ`). Invalid input falls back to now. */\nexport function isoTime(epochMs) {\n const ms = typeof epochMs === 'number' && isFinite(epochMs) ? Math.round(epochMs) : Date.now();\n return new Date(ms).toISOString();\n}\n/** Monotonic milliseconds since the page's time origin: the closest web equivalent of `elapsedRealtime`. */\nfunction elapsedMs() {\n const hasClock = typeof performance !== 'undefined' && typeof performance.now === 'function';\n return hasClock ? Math.round(performance.now()) : 0;\n}\nfunction numberOrNull(value) {\n return typeof value === 'number' && isFinite(value) ? value : null;\n}\n/** Maps a browser fix to the plugin's `Location` record shape. `extras` is left out when empty. */\nexport function toLocation(position, event, extras) {\n const coords = position.coords;\n const location = {\n uuid: uuid(),\n event,\n timestamp: isoTime(position.timestamp),\n recorded_at: isoTime(Date.now()),\n elapsed_realtime_ms: elapsedMs(),\n boot_count: -1,\n is_moving: false,\n odometer: 0,\n mock: false,\n coords: {\n latitude: coords.latitude,\n longitude: coords.longitude,\n accuracy: coords.accuracy,\n altitude: numberOrNull(coords.altitude),\n altitude_accuracy: numberOrNull(coords.altitudeAccuracy),\n speed: numberOrNull(coords.speed),\n speed_accuracy: null,\n heading: numberOrNull(coords.heading),\n heading_accuracy: null,\n },\n activity: { type: 'unknown', confidence: 0 },\n battery: { level: -1, is_charging: false },\n backend: 'web',\n };\n if (extras && Object.keys(extras).length > 0) {\n location.extras = extras;\n }\n return location;\n}\n//# sourceMappingURL=location.js.map","// Owned by Unit 1 (TS wrapper + web).\nimport { WebPlugin } from '@capacitor/core';\nimport { cloneJson, defaultConfig, isPlainObject, mergeConfig, webState } from './web/config';\nimport { webDeviceInfo } from './web/device';\nimport { positionErrorInfo, webError } from './web/errors';\nimport { browserGeolocation, probeLocationPermission, queryLocationPermission, sampleBestPosition, } from './web/geolocation';\nimport { toLocation } from './web/location';\nconst ALL_PERMISSIONS = ['location', 'notifications', 'activityRecognition', 'backgroundLocation'];\nfunction highAccuracy(accuracy) {\n return accuracy === undefined || accuracy === 'high';\n}\nfunction nonNegative(value, fallback) {\n return typeof value === 'number' && value >= 0 ? value : fallback;\n}\n/** The defaults plus `options.config` (optional; must be an object when given). */\nfunction configFromDefaults(options) {\n const given = options ? options.config : undefined;\n if (given !== undefined && given !== null && !isPlainObject(given)) {\n throw webError('INVALID_ARGUMENT', 'config must be an object.');\n }\n return mergeConfig(defaultConfig(), given || undefined);\n}\n/**\n * Web implementation. It covers `getCurrentPosition`, `watchPosition` and `clearWatch` (via `navigator.geolocation`),\n * an in-memory config and state, permissions and device info. Nothing is persisted or uploaded, and tracking cannot\n * be started. Every other method rejects with `UNIMPLEMENTED`.\n *\n * Like the Android bridge, methods other than `ready`, `getState`, `checkPermissions`, `requestPermissions` and\n * `getDeviceInfo` reject with `NOT_READY` until `ready()` has resolved.\n */\n/** The State of `ready`, `setConfig` and `reset`, with the `warnings` the Android plugin also returns. */\nfunction withWarnings(state) {\n var _a;\n const url = (_a = state.config.http) === null || _a === void 0 ? void 0 : _a.url;\n const warnings = typeof url === 'string' && /^http:\\/\\//i.test(url.trim())\n ? [\"http.url uses http://: Android 9+ blocks cleartext traffic unless the app's network security config allows it\"]\n : [];\n return Object.assign(Object.assign({}, state), { warnings });\n}\nexport class LocationTrackingWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.config = defaultConfig();\n this.isReady = false;\n this.lastPosition = null;\n this.watchSeq = 0;\n this.watches = new Map();\n }\n async ready(options) {\n const config = configFromDefaults(options);\n // reset:false applies the given config only on the first ready(); afterwards the current config wins.\n if (!options || options.reset !== false || !this.isReady) {\n this.config = config;\n }\n this.isReady = true;\n return withWarnings(webState(this.config));\n }\n async setConfig(options) {\n this.requireReady();\n if (!options || !isPlainObject(options.config)) {\n throw webError('INVALID_ARGUMENT', 'config must be an object.');\n }\n this.config = mergeConfig(this.config, options.config);\n return withWarnings(webState(this.config));\n }\n async reset(options) {\n this.requireReady();\n this.config = configFromDefaults(options);\n return withWarnings(webState(this.config));\n }\n async getState() {\n return webState(this.config);\n }\n async start() {\n throw this.unimplemented('Not implemented on web.');\n }\n async startGeofences() {\n throw this.unimplemented('Not implemented on web.');\n }\n async stop() {\n throw this.unimplemented('Not implemented on web.');\n }\n async changePace(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n /**\n * Takes `samples` fixes within `timeout` and resolves the most accurate one. With `maximumAge > 0`, a fix this\n * plugin received at most that long ago is returned right away. Like a persisted record on Android, the result is\n * also emitted as a `location` event unless `persist` is false.\n */\n async getCurrentPosition(options) {\n var _a;\n this.requireReady();\n const geolocation = this.requireGeolocation();\n const o = options || {};\n const maximumAge = nonNegative(o.maximumAge, 0);\n const cached = this.lastPosition;\n let position;\n if (maximumAge > 0 && cached && Date.now() - cached.timestamp <= maximumAge) {\n position = cached;\n }\n else {\n const samples = typeof o.samples === 'number' && o.samples >= 1 ? Math.floor(o.samples) : 3;\n position = await sampleBestPosition(geolocation, {\n samples,\n timeout: nonNegative(o.timeout, nonNegative((_a = this.config.geolocation) === null || _a === void 0 ? void 0 : _a.locationTimeout, 30000)),\n maximumAge,\n enableHighAccuracy: highAccuracy(o.desiredAccuracy),\n });\n }\n this.lastPosition = position;\n const location = toLocation(position, 'current_position', this.recordExtras(o.extras));\n if (o.persist !== false) {\n this.emit('location', location);\n }\n return location;\n }\n /**\n * Starts `navigator.geolocation.watchPosition` and resolves its id. The callback gets each fix as a\n * `watch_position` Location, or `(null, { code, message })` on error. `interval` is ignored: the browser decides\n * how often fixes arrive. With `persist: true` each fix is also emitted as a `location` event.\n */\n async watchPosition(options, callback) {\n this.requireReady();\n if (typeof callback !== 'function') {\n throw webError('INVALID_ARGUMENT', 'watchPosition requires a callback.');\n }\n const geolocation = this.requireGeolocation();\n const o = options || {};\n const callExtras = cloneJson(o.extras);\n const persist = o.persist === true;\n const entry = { active: true, geolocation, browserId: 0 };\n try {\n entry.browserId = geolocation.watchPosition((position) => {\n // Browsers may still deliver a queued fix after clearWatch.\n if (!entry.active) {\n return;\n }\n this.lastPosition = position;\n const location = toLocation(position, 'watch_position', this.recordExtras(callExtras));\n if (persist) {\n this.emit('location', location);\n }\n callback(location);\n }, (error) => {\n if (entry.active) {\n callback(null, positionErrorInfo(error));\n }\n }, { enableHighAccuracy: highAccuracy(o.desiredAccuracy), maximumAge: 0 });\n }\n catch (e) {\n throw webError('UNAVAILABLE', e instanceof Error ? e.message : String(e));\n }\n const id = `web-watch-${++this.watchSeq}`;\n this.watches.set(id, entry);\n return id;\n }\n /** Stops a watch. Unknown ids are ignored. */\n async clearWatch(options) {\n this.requireReady();\n if (!options || typeof options.id !== 'string') {\n throw webError('INVALID_ARGUMENT', 'id must be a string.');\n }\n const entry = this.watches.get(options.id);\n if (!entry) {\n return;\n }\n this.watches.delete(options.id);\n entry.active = false;\n entry.geolocation.clearWatch(entry.browserId);\n }\n async getOdometer() {\n throw this.unimplemented('Not implemented on web.');\n }\n async setOdometer(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async resetOdometer() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getLocations(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async getCount() {\n throw this.unimplemented('Not implemented on web.');\n }\n async insertLocation(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async destroyLocations() {\n throw this.unimplemented('Not implemented on web.');\n }\n async destroyLocation(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async sync() {\n throw this.unimplemented('Not implemented on web.');\n }\n async addGeofence(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async addGeofences(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async removeGeofence(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async removeGeofences(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async getGeofences() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getGeofence(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async geofenceExists(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async getHeartbeatStatus() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getProviderState() {\n throw this.unimplemented('Not implemented on web.');\n }\n async isPowerSaveMode() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getBatteryOptimizationStatus() {\n throw this.unimplemented('Not implemented on web.');\n }\n async openBatteryOptimizationSettings() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getPowerManagerInfo() {\n throw this.unimplemented('Not implemented on web.');\n }\n async openPowerManagerSettings() {\n throw this.unimplemented('Not implemented on web.');\n }\n async openLocationSettings() {\n throw this.unimplemented('Not implemented on web.');\n }\n async openAppSettings() {\n throw this.unimplemented('Not implemented on web.');\n }\n /** Best-effort values parsed from `navigator.userAgent`; `platform` is `'web'`. */\n async getDeviceInfo() {\n const nav = typeof navigator !== 'undefined' && navigator ? navigator : undefined;\n return webDeviceInfo(nav && typeof nav.userAgent === 'string' ? nav.userAgent : '', nav ? nav.platform : undefined);\n }\n async getSensors() {\n throw this.unimplemented('Not implemented on web.');\n }\n /** `location` comes from the Permissions API (`'prompt'` when it cannot tell); the other three are `'granted'`. */\n async checkPermissions() {\n const location = await queryLocationPermission();\n return {\n location: location || 'prompt',\n backgroundLocation: 'granted',\n activityRecognition: 'granted',\n notifications: 'granted',\n };\n }\n /** When `location` is requested and still undecided, asks for a fix so the browser prompts, then reports. */\n async requestPermissions(options) {\n const requested = options && Array.isArray(options.permissions) ? options.permissions : ALL_PERMISSIONS;\n const status = await this.checkPermissions();\n const geolocation = browserGeolocation();\n if (requested.indexOf('location') < 0 || status.location !== 'prompt' || !geolocation) {\n return status;\n }\n const answer = await probeLocationPermission(geolocation);\n // A granted probe is proof, even for a one-time grant the Permissions API still reports as 'prompt'. Otherwise\n // prefer the Permissions API: a dismissed prompt fails the probe as denied but leaves the permission at 'prompt'.\n status.location = answer === 'granted' ? answer : (await queryLocationPermission()) || answer;\n return status;\n }\n async log(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async getLog(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async destroyLog() {\n throw this.unimplemented('Not implemented on web.');\n }\n async uploadLog(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async emailLog(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n requireReady() {\n if (!this.isReady) {\n throw webError('NOT_READY', 'Call ready() before using this method.');\n }\n }\n requireGeolocation() {\n const geolocation = browserGeolocation();\n if (!geolocation) {\n throw webError('UNAVAILABLE', 'navigator.geolocation is not available.');\n }\n return geolocation;\n }\n /** `persistence.extras` merged with the call's extras (the call wins), like records created on Android. */\n recordExtras(extras) {\n const persisted = this.config.persistence ? this.config.persistence.extras : undefined;\n const merged = {};\n if (isPlainObject(persisted)) {\n Object.assign(merged, cloneJson(persisted));\n }\n if (isPlainObject(extras)) {\n Object.assign(merged, cloneJson(extras));\n }\n return Object.keys(merged).length > 0 ? merged : undefined;\n }\n /**\n * Like `notifyListeners`, but each listener gets its own copy of the payload (as on native, where every listener\n * receives deserialized data), and a throwing listener neither skips the others nor fails the calling method.\n */\n emit(eventName, data) {\n const listeners = this.listeners[eventName];\n if (!listeners) {\n return;\n }\n for (const listener of listeners.slice()) {\n try {\n listener(cloneJson(data));\n }\n catch (e) {\n console.error(`LocationTracking: \"${eventName}\" listener threw`, e);\n }\n }\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","CapacitorException","WebPlugin"],"mappings":";;;;AAAA;AAEA;AACA;AACA,IAAI,iBAAiB;AACrB;AACY,MAAC,gBAAgB,GAAGA,mBAAc,CAAC,kBAAkB,EAAE;AACnE,IAAI,GAAG,EAAE,MAAM,iBAAiB,KAAK,iBAAiB,GAAG,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC,CAAC;AAClH,CAAC;;ACPD;AACY,MAAC,MAAM,GAAG;AACtB,IAAI,QAAQ,EAAE,UAAU;AACxB,IAAI,YAAY,EAAE,cAAc;AAChC,IAAI,cAAc,EAAE,gBAAgB;AACpC,IAAI,cAAc,EAAE,gBAAgB;AACpC,IAAI,SAAS,EAAE,WAAW;AAC1B,IAAI,QAAQ,EAAE,UAAU;AACxB,IAAI,eAAe,EAAE,iBAAiB;AACtC,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,kBAAkB,EAAE,oBAAoB;AAC5C,IAAI,eAAe,EAAE,iBAAiB;AACtC,IAAI,aAAa,EAAE,eAAe;AAClC,IAAI,kBAAkB,EAAE,oBAAoB;AAC5C,IAAI,aAAa,EAAE,eAAe;AAClC,IAAI,aAAa,EAAE,eAAe;AAClC,IAAI,WAAW,EAAE,aAAa;AAC9B;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE;AACnC,IAAI,OAAO,gBAAgB,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC;AACvD;AACA;AACY,MAAC,UAAU,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,UAAU,EAAE,EAAE;AACnD;AACY,MAAC,cAAc,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,cAAc,EAAE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,CAAC;AACvD,QAAQ;AACR,QAAQ,IAAI,aAAa,CAAC,MAAM,CAAC,EAAE;AACnC,YAAY,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;AACpD,QAAQ;AACR,QAAQ,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,GAAG,MAAM,GAAG,SAAS;AAClE,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE;AAC1B,QAAQ,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;AACnD,QAAQ,IAAI,CAAC,SAAS,EAAE;AACxB,YAAY;AACZ,QAAQ;AACR,QAAQ,KAAK,MAAM,QAAQ,IAAI,SAAS,CAAC,KAAK,EAAE,EAAE;AAClD,YAAY,IAAI;AAChB,gBAAgB,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACzC,YAAY;AACZ,YAAY,OAAO,CAAC,EAAE;AACtB,gBAAgB,OAAO,CAAC,KAAK,CAAC,CAAC,mBAAmB,EAAE,SAAS,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;AACnF,YAAY;AACZ,QAAQ;AACR,IAAI;AACJ;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -25,6 +25,8 @@ var capacitorLocationTracking = (function (exports, core) {
|
|
|
25
25
|
ENABLEDCHANGE: 'enabledchange',
|
|
26
26
|
NOTIFICATIONACTION: 'notificationaction',
|
|
27
27
|
AUTHORIZATION: 'authorization',
|
|
28
|
+
LOCATIONERROR: 'locationerror',
|
|
29
|
+
STORAGEFULL: 'storagefull',
|
|
28
30
|
};
|
|
29
31
|
/**
|
|
30
32
|
* Subscribes to any plugin event with a typed payload. Call `remove()` on the resolved handle to unsubscribe.
|
|
@@ -54,12 +56,16 @@ var capacitorLocationTracking = (function (exports, core) {
|
|
|
54
56
|
const onConnectivityChange = (cb) => on('connectivitychange', cb);
|
|
55
57
|
/** Battery-saver mode changes. */
|
|
56
58
|
const onPowerSaveChange = (cb) => on('powersavechange', cb);
|
|
57
|
-
/** Tracking enabled / disabled. */
|
|
59
|
+
/** Tracking enabled / disabled, with the reason (the same values as the tracking_start / tracking_stop records). */
|
|
58
60
|
const onEnabledChange = (cb) => on('enabledchange', cb);
|
|
59
61
|
/** Taps on the foreground notification's action buttons. */
|
|
60
62
|
const onNotificationAction = (cb) => on('notificationaction', cb);
|
|
61
63
|
/** JWT refresh results. */
|
|
62
64
|
const onAuthorization = (cb) => on('authorization', cb);
|
|
65
|
+
/** The location request failed; the plugin requests updates again after `retryInMs`. */
|
|
66
|
+
const onLocationError = (cb) => on('locationerror', cb);
|
|
67
|
+
/** A record could not be stored because the device storage is full. */
|
|
68
|
+
const onStorageFull = (cb) => on('storagefull', cb);
|
|
63
69
|
|
|
64
70
|
/** Never copied: assigning `__proto__` would change the target's prototype instead of adding a key. */
|
|
65
71
|
const PROTO_KEY = '__proto__';
|
|
@@ -111,6 +117,7 @@ var capacitorLocationTracking = (function (exports, core) {
|
|
|
111
117
|
enabled: true,
|
|
112
118
|
minInterval: 180,
|
|
113
119
|
maxInterval: 300,
|
|
120
|
+
uploadKeepAwake: 10,
|
|
114
121
|
},
|
|
115
122
|
http: {
|
|
116
123
|
url: null,
|
|
@@ -127,6 +134,7 @@ var capacitorLocationTracking = (function (exports, core) {
|
|
|
127
134
|
locationTemplate: null,
|
|
128
135
|
geofenceTemplate: null,
|
|
129
136
|
timeout: 60000,
|
|
137
|
+
maxRetryAfter: 3600,
|
|
130
138
|
authorization: null,
|
|
131
139
|
},
|
|
132
140
|
persistence: {
|
|
@@ -260,6 +268,9 @@ var capacitorLocationTracking = (function (exports, core) {
|
|
|
260
268
|
heartbeat.maxInterval < heartbeat.minInterval) {
|
|
261
269
|
heartbeat.maxInterval = heartbeat.minInterval;
|
|
262
270
|
}
|
|
271
|
+
if (typeof heartbeat.uploadKeepAwake === 'number') {
|
|
272
|
+
heartbeat.uploadKeepAwake = Math.min(60, Math.max(0, heartbeat.uploadKeepAwake));
|
|
273
|
+
}
|
|
263
274
|
}
|
|
264
275
|
const activity = config.activity;
|
|
265
276
|
if (activity && typeof activity.minimumActivityRecognitionConfidence === 'number') {
|
|
@@ -272,6 +283,9 @@ var capacitorLocationTracking = (function (exports, core) {
|
|
|
272
283
|
if (http && typeof http.syncInterval === 'number' && http.syncInterval < 0) {
|
|
273
284
|
http.syncInterval = 0;
|
|
274
285
|
}
|
|
286
|
+
if (http && typeof http.maxRetryAfter === 'number' && http.maxRetryAfter < 0) {
|
|
287
|
+
http.maxRetryAfter = 0;
|
|
288
|
+
}
|
|
275
289
|
const notification = config.notification;
|
|
276
290
|
if (notification && Array.isArray(notification.actions) && notification.actions.length > 3) {
|
|
277
291
|
notification.actions = notification.actions.slice(0, 3);
|
|
@@ -300,12 +314,14 @@ var capacitorLocationTracking = (function (exports, core) {
|
|
|
300
314
|
odometer: 0,
|
|
301
315
|
backend: 'web',
|
|
302
316
|
lastRecordAt: null,
|
|
317
|
+
lastStopReason: null,
|
|
318
|
+
lastStopAt: null,
|
|
303
319
|
config: cloneJson(config),
|
|
304
320
|
};
|
|
305
321
|
}
|
|
306
322
|
|
|
307
323
|
/** `npm version` copies the `package.json` version here (scripts/sync-version.mjs); a test checks it. */
|
|
308
|
-
const PLUGIN_VERSION = '8.0
|
|
324
|
+
const PLUGIN_VERSION = '8.2.0';
|
|
309
325
|
/** Tokens after `Android x` that do not name a device ('K' is Chrome's reduced user agent). */
|
|
310
326
|
const NOT_A_MODEL = ['K', 'U', 'wv', 'Mobile', 'Tablet', 'HarmonyOS'];
|
|
311
327
|
/** The device model among the `;`-separated tokens that follow `Android x` in the user agent's comment. */
|
|
@@ -391,6 +407,13 @@ var capacitorLocationTracking = (function (exports, core) {
|
|
|
391
407
|
hmsAvailable: false,
|
|
392
408
|
backend: 'web',
|
|
393
409
|
packagedProviders: [],
|
|
410
|
+
backendFallbackReason: null,
|
|
411
|
+
gmsStatus: null,
|
|
412
|
+
hmsStatus: null,
|
|
413
|
+
hmsCoreOutdated: null,
|
|
414
|
+
locationAvailableHint: null,
|
|
415
|
+
cpuCores: typeof navigator !== 'undefined' && navigator.hardwareConcurrency ? navigator.hardwareConcurrency : 0,
|
|
416
|
+
supportedAbis: [],
|
|
394
417
|
};
|
|
395
418
|
}
|
|
396
419
|
|
|
@@ -622,6 +645,15 @@ var capacitorLocationTracking = (function (exports, core) {
|
|
|
622
645
|
* Like the Android bridge, methods other than `ready`, `getState`, `checkPermissions`, `requestPermissions` and
|
|
623
646
|
* `getDeviceInfo` reject with `NOT_READY` until `ready()` has resolved.
|
|
624
647
|
*/
|
|
648
|
+
/** The State of `ready`, `setConfig` and `reset`, with the `warnings` the Android plugin also returns. */
|
|
649
|
+
function withWarnings(state) {
|
|
650
|
+
var _a;
|
|
651
|
+
const url = (_a = state.config.http) === null || _a === void 0 ? void 0 : _a.url;
|
|
652
|
+
const warnings = typeof url === 'string' && /^http:\/\//i.test(url.trim())
|
|
653
|
+
? ["http.url uses http://: Android 9+ blocks cleartext traffic unless the app's network security config allows it"]
|
|
654
|
+
: [];
|
|
655
|
+
return Object.assign(Object.assign({}, state), { warnings });
|
|
656
|
+
}
|
|
625
657
|
class LocationTrackingWeb extends core.WebPlugin {
|
|
626
658
|
constructor() {
|
|
627
659
|
super(...arguments);
|
|
@@ -638,7 +670,7 @@ var capacitorLocationTracking = (function (exports, core) {
|
|
|
638
670
|
this.config = config;
|
|
639
671
|
}
|
|
640
672
|
this.isReady = true;
|
|
641
|
-
return webState(this.config);
|
|
673
|
+
return withWarnings(webState(this.config));
|
|
642
674
|
}
|
|
643
675
|
async setConfig(options) {
|
|
644
676
|
this.requireReady();
|
|
@@ -646,12 +678,12 @@ var capacitorLocationTracking = (function (exports, core) {
|
|
|
646
678
|
throw webError('INVALID_ARGUMENT', 'config must be an object.');
|
|
647
679
|
}
|
|
648
680
|
this.config = mergeConfig(this.config, options.config);
|
|
649
|
-
return webState(this.config);
|
|
681
|
+
return withWarnings(webState(this.config));
|
|
650
682
|
}
|
|
651
683
|
async reset(options) {
|
|
652
684
|
this.requireReady();
|
|
653
685
|
this.config = configFromDefaults(options);
|
|
654
|
-
return webState(this.config);
|
|
686
|
+
return withWarnings(webState(this.config));
|
|
655
687
|
}
|
|
656
688
|
async getState() {
|
|
657
689
|
return webState(this.config);
|
|
@@ -937,10 +969,12 @@ var capacitorLocationTracking = (function (exports, core) {
|
|
|
937
969
|
exports.onHeartbeat = onHeartbeat;
|
|
938
970
|
exports.onHttp = onHttp;
|
|
939
971
|
exports.onLocation = onLocation;
|
|
972
|
+
exports.onLocationError = onLocationError;
|
|
940
973
|
exports.onMotionChange = onMotionChange;
|
|
941
974
|
exports.onNotificationAction = onNotificationAction;
|
|
942
975
|
exports.onPowerSaveChange = onPowerSaveChange;
|
|
943
976
|
exports.onProviderChange = onProviderChange;
|
|
977
|
+
exports.onStorageFull = onStorageFull;
|
|
944
978
|
|
|
945
979
|
return exports;
|
|
946
980
|
|