@scandit/web-datacapture-core 8.2.0-beta.1 → 8.2.1
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/THIRD_PARTY.txt +0 -1
- package/build/electron/common.cjs +1 -1
- package/build/electron/constants.cjs +1 -1
- package/build/electron/main.cjs +1 -1
- package/build/electron/preload.cjs +1 -1
- package/build/js/Camera.js +1 -1
- package/build/js/{DataCaptureContext-COl4JuSo.d.ts → DataCaptureContext-Dvdr7st4.d.ts} +3 -0
- package/build/js/DataCaptureContext.d.ts +1 -1
- package/build/js/DataCaptureContext.js +1 -1
- package/build/js/DataCaptureContextRelated.d.ts +1 -1
- package/build/js/DataCaptureVersion.js +1 -1
- package/build/js/DataCaptureView.d.ts +1 -1
- package/build/js/DataCaptureView.js +1 -1
- package/build/js/Feedback.js +1 -1
- package/build/js/FrameData.d.ts +1 -1
- package/build/js/ImageFrameSource.js +1 -1
- package/build/js/NotificationPresenter/index.d.ts +1 -1
- package/build/js/NotificationPresenter/private/ConcreteNotificationPresenter.d.ts +1 -1
- package/build/js/NotificationPresenter/private/presets.d.ts +1 -1
- package/build/js/ScanditIconBuilder.js +1 -1
- package/build/js/Vibration.js +1 -1
- package/build/js/browserHelper.d.ts +19 -0
- package/build/js/browserHelper.js +1 -1
- package/build/js/chunks/chunk-24MGHMOY.js +1 -0
- package/build/js/chunks/{chunk-4DNKMVCD.js → chunk-4J3Y5IIL.js} +1 -1
- package/build/js/chunks/{chunk-6IWAI6XT.js → chunk-6JHZVRXK.js} +1 -1
- package/build/js/chunks/chunk-A225YZFY.js +2 -0
- package/build/js/chunks/{chunk-5JVQUPEF.js → chunk-BBOKPRKO.js} +1 -1
- package/build/js/chunks/chunk-CX2R2XQK.js +1 -0
- package/build/js/chunks/{chunk-KVRNF3VA.js → chunk-DTREAYZQ.js} +1 -1
- package/build/js/chunks/chunk-DZKTI5AJ.js +1 -0
- package/build/js/chunks/{chunk-CGZTKEVQ.js → chunk-GLSB4QTY.js} +1 -1
- package/build/js/chunks/{chunk-TGOZ2BNY.js → chunk-HQKKXJJY.js} +1 -1
- package/build/js/chunks/chunk-I4F6XB6S.js +1 -0
- package/build/js/chunks/chunk-JCP7NQPV.js +1 -0
- package/build/js/chunks/chunk-NT5WI2PS.js +1 -0
- package/build/js/chunks/{chunk-MUUHAY6N.js → chunk-NXAYIU7F.js} +1 -1
- package/build/js/chunks/chunk-NY2HBST4.js +1 -0
- package/build/js/chunks/chunk-Q5WJX5JB.js +1 -0
- package/build/js/chunks/chunk-QPR2YHD4.js +1 -0
- package/build/js/chunks/chunk-QUBJJDLC.js +1 -0
- package/build/js/chunks/{chunk-BD2C4EUH.js → chunk-RVAHEVSC.js} +1 -1
- package/build/js/chunks/chunk-SYGWA3T6.js +35 -0
- package/build/js/chunks/chunk-TR5HATUD.js +1 -0
- package/build/js/chunks/chunk-TTMLHWYT.js +6 -0
- package/build/js/chunks/{chunk-5DYRW7WM.js → chunk-UERKPMRV.js} +1 -1
- package/build/js/chunks/{chunk-2OCDIZIS.js → chunk-UQVVJP5Z.js} +1 -1
- package/build/js/chunks/{chunk-3DUIJMFT.js → chunk-VQYVIA64.js} +1 -1
- package/build/js/chunks/{chunk-UB4YB6TK.js → chunk-WVVNJRUA.js} +1 -1
- package/build/js/chunks/{chunk-MKOAX27U.js → chunk-XYZYNUX3.js} +1 -1
- package/build/js/chunks/{chunk-6OKFTR6P.js → chunk-Y7V35LNT.js} +1 -1
- package/build/js/chunks/{chunk-HBRR74H7.js → chunk-ZDROGZFO.js} +1 -1
- package/build/js/controls/CameraFOVSwitchControl.d.ts +1 -1
- package/build/js/controls/CameraFOVSwitchControl.js +1 -1
- package/build/js/controls/CameraSwitchControl.d.ts +1 -1
- package/build/js/controls/CameraSwitchControl.js +1 -1
- package/build/js/controls/TorchSwitchControl.d.ts +1 -1
- package/build/js/controls/TorchSwitchControl.js +1 -1
- package/build/js/controls/common.d.ts +1 -1
- package/build/js/controls/index.d.ts +1 -1
- package/build/js/controls/index.js +1 -1
- package/build/js/defaults/DefaultsCamera.d.ts +1 -1
- package/build/js/defaults/DefaultsDataCaptureView.js +1 -1
- package/build/js/index.d.ts +1 -1
- package/build/js/index.js +1 -1
- package/build/js/moduleLoader.d.ts +1 -1
- package/build/js/private/CameraAccess.js +1 -1
- package/build/js/private/CameraManager.d.ts +1 -1
- package/build/js/private/CameraManager.js +1 -1
- package/build/js/private/CameraPool.d.ts +1 -1
- package/build/js/private/CanvasDrawer.js +1 -1
- package/build/js/private/CanvasDrawerWithMetrics.d.ts +1 -1
- package/build/js/private/CanvasDrawerWithMetrics.js +1 -1
- package/build/js/private/CoreModuleLicenseTextProvider.d.ts +1 -1
- package/build/js/private/CoreModuleLicenseTextProvider.js +1 -1
- package/build/js/private/CustomLocationsView.js +1 -1
- package/build/js/private/DataCaptureContextRelated.d.ts +1 -1
- package/build/js/private/FrameReaders/FrameReader.d.ts +1 -1
- package/build/js/private/FrameReaders/FrameReader.js +1 -1
- package/build/js/private/FrameReaders/FrameReaderAbstract.d.ts +1 -1
- package/build/js/private/FrameReaders/GrayScaleFrameReader.d.ts +1 -1
- package/build/js/private/FrameReaders/GrayScaleFrameReader.js +1 -1
- package/build/js/private/FrameReaders/index.d.ts +1 -1
- package/build/js/private/FrameReaders/index.js +1 -1
- package/build/js/private/NormalizedModuleLoaderOptions.d.ts +1 -1
- package/build/js/private/OrientationObserver.js +1 -1
- package/build/js/private/SingleImageUploaderView.d.ts +1 -1
- package/build/js/private/SingleImageUploaderView.js +1 -1
- package/build/js/private/ViewControls+related.js +1 -1
- package/build/js/private/ViewControls_related.d.ts +1 -1
- package/build/js/private/ViewsRegistry.d.ts +1 -1
- package/build/js/private/hybridDesktopPlatformHelpers.js +1 -1
- package/build/js/private/ui/atoms/Toast.d.ts +3 -3
- package/build/js/private/ui/atoms/Toast.js +1 -1
- package/build/js/private/ui/molecules/HintPresenter.d.ts +1 -1
- package/build/js/private/ui/molecules/HintPresenter.js +1 -1
- package/build/js/private/ui/molecules/TorchSwitchIconButton.js +1 -1
- package/build/js/private/utils/index.d.ts +1 -0
- package/build/js/private/utils/index.js +1 -1
- package/build/js/private/utils/polyfillLoader.js +1 -1
- package/build/js/private/utils/replaceImagesInViewUtils.d.ts +1 -1
- package/build/js/private/utils/safeRequestAnimationFrame.d.ts +23 -0
- package/build/js/private/utils/safeRequestAnimationFrame.js +1 -0
- package/build/js/private/utils/warnMultithreadingUnavailable.js +1 -1
- package/build/js/worker/ImageConverterForwarder.d.ts +1 -1
- package/build/js/worker/ViewInfoHelper.d.ts +1 -1
- package/build/js/worker/WorkerMain.d.ts +1 -1
- package/build/js/worker/WorkerMain.js +1 -1
- package/build/js/worker/coreCapture.inlineWorker.d.ts +1 -1
- package/build/js/worker/coreCapture.inlineWorker.js +1 -1
- package/build/js/worker/dataCaptureEngine.d.ts +1 -1
- package/build/js/worker/dataCaptureEngine.js +1 -1
- package/build/js/worker/dataCaptureLoader.d.ts +1 -1
- package/build/js/worker/dataCaptureLoader.js +1 -1
- package/build/js/worker/dataCaptureWorkerRelated.d.ts +1 -1
- package/build/js/worker/dataCaptureWorkerRelated.js +1 -1
- package/build/js/worker/helperFs.d.ts +11 -1
- package/build/js/worker/helperFs.js +1 -1
- package/build/js/worker/index.d.ts +1 -1
- package/build/js/worker/index.js +1 -1
- package/package.json +1 -1
- package/build/js/chunks/chunk-56CY5YB3.js +0 -1
- package/build/js/chunks/chunk-6DTJIONB.js +0 -1
- package/build/js/chunks/chunk-DJSMVDVM.js +0 -1
- package/build/js/chunks/chunk-HQFHOI5U.js +0 -1
- package/build/js/chunks/chunk-K57UYTCR.js +0 -6
- package/build/js/chunks/chunk-KE4OXEHM.js +0 -1
- package/build/js/chunks/chunk-M73IKBDO.js +0 -1
- package/build/js/chunks/chunk-PJDP6LOG.js +0 -35
- package/build/js/chunks/chunk-QYTZLT3L.js +0 -1
- package/build/js/chunks/chunk-RZ45ODIK.js +0 -1
- package/build/js/chunks/chunk-SAMF6XBX.js +0 -1
- package/build/js/chunks/chunk-UWVAZAFS.js +0 -2
- package/build/js/chunks/chunk-X3GOCLVQ.js +0 -1
- /package/build/js/chunks/{chunk-CMOH3SZ2.js → chunk-5OF76LWH.js} +0 -0
- /package/build/js/chunks/{chunk-6XU4Z34Q.js → chunk-TU2LKPHV.js} +0 -0
- /package/build/js/chunks/{chunk-XLRKXFUR.js → chunk-VFOSFLTM.js} +0 -0
package/THIRD_PARTY.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var e,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,p=Object.prototype.hasOwnProperty;module.exports=(e={},((e,n,c,l)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let a of o(n))p.call(e,a)||a===c||t(e,a,{get:()=>n[a],enumerable:!(l=r(n,a))||l.enumerable});return e})(t({},"__esModule",{value:!0}),e));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var e,r=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,n=Object.prototype.hasOwnProperty,p={};((e,t)=>{for(var o in t)r(e,o,{get:t[o],enumerable:!0})})(p,{CHN:()=>y,Id:()=>i,K:()=>l}),module.exports=(e=p,((e,p,a,l)=>{if(p&&"object"==typeof p||"function"==typeof p)for(let i of o(p))n.call(e,i)||i===a||r(e,i,{get:()=>p[i],enumerable:!(l=t(p,i))||l.enumerable});return e})(r({},"__esModule",{value:!0}),e));var a=String.fromCodePoint,l=a.apply(String,[119,101,98,107,105,116,84,114,97,110,115,112,111,114,116,68,117,112,108,101,120,67,104,97,110,110,101,108]),i=a.apply(String,[53,65,41,124,75,47,108,120,50,48,115,62,66,60,107,57]),y=a.apply(String,[111,74,88,52,51,101,51,112,66,79,38,88,40,65,36,94]);
|
package/build/electron/main.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var e,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,p={};((e,n)=>{for(var a in n)t(e,a,{get:n[a],enumerable:!0})})(p,{register:()=>u,unregister:()=>f}),module.exports=(e=p,((e,p,s,o)=>{if(p&&"object"==typeof p||"function"==typeof p)for(let i of a(p))r.call(e,i)||i===s||t(e,i,{get:()=>p[i],enumerable:!(o=n(p,i))||o.enumerable});return e})(t({},"__esModule",{value:!0}),e));var s=String.fromCodePoint,o=(s.apply(String,[119,101,98,107,105,116,84,114,97,110,115,112,111,114,116,68,117,112,108,101,120,67,104,97,110,110,101,108]),s.apply(String,[53,65,41,124,75,47,108,120,50,48,115,62,66,60,107,57])),i=s.apply(String,[111,74,88,52,51,101,51,112,66,79,38,88,40,65,36,94]);function c(e,t){return async function(n,a){if(function(e,t){if(null==e)return!1;const n=new URL(e.url);return t.senderId===o&&"localhost"===n.hostname||""===n.hostname}(n.senderFrame,a))switch(a.type){case"get-license-key":if(null!=a.payload)try{const r=await async function(e,t){const{fs:n,crypto:a,path:r,app:p}=e,[s,o]=t.publicKey.split(":"),i=r.join(p.getAppPath(),t.licenseDataPath);return function(e,t,n){const r=a.createDecipheriv("aes-256-cbc",t,n);let p=r.update(e,"hex","utf8");return p+=r.final("utf8"),p}((await n.readFile(i)).toString("utf8"),Buffer.from(s,"base64"),Buffer.from(o,"base64"))}(e,{licenseDataPath:a.payload.licenseDataPath,publicKey:t});n.sender.send(i,{type:a.type,senderId:a.senderId,payload:{licenseKey:r??""}})}catch(e){n.sender.send(i,{type:a.type,senderId:a.senderId,payload:{error:e}})}break;case"get-app-info":try{const t=await async function(e){const{fs:t,path:n,app:a}=e;let r=process.cwd();a.isPackaged&&(r=a.getAppPath());const p=await t.readFile(n.join(r,"package.json"),"utf8"),s=JSON.parse(p);return{appId:s.build?.appId??s.appId,name:s.name,version:s.version}}(e);n.sender.send(i,{type:a.type,senderId:a.senderId,payload:{isPackaged:e.app.isPackaged,version:t.version??e.app.getVersion(),appName:t.name??e.app.getName(),appId:t.appId??""}})}catch(e){n.sender.send(i,{type:a.type,senderId:a.senderId,payload:{error:e}})}}}}var d=null,l=null;function u(e,t){l=e,d=c(e,t),l.ipcMain.on(i,d)}function f(){null!=d&&null!=l&&l.ipcMain.off(i,d)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var e,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,p={};((e,n)=>{for(var t in n)r(e,t,{get:n[t],enumerable:!0})})(p,{preloadBindings:()=>s}),module.exports=(e=p,((e,p,a,l)=>{if(p&&"object"==typeof p||"function"==typeof p)for(let y of t(p))o.call(e,y)||y===a||r(e,y,{get:()=>p[y],enumerable:!(l=n(p,y))||l.enumerable});return e})(r({},"__esModule",{value:!0}),e));var a=require("electron"),l=String.fromCodePoint,y=l.apply(String,[119,101,98,107,105,116,84,114,97,110,115,112,111,114,116,68,117,112,108,101,120,67,104,97,110,110,101,108]),i=l.apply(String,[53,65,41,124,75,47,108,120,50,48,115,62,66,60,107,57]),c=l.apply(String,[111,74,88,52,51,101,51,112,66,79,38,88,40,65,36,94]);function d(e){return null!=e.payload.error}function s(e){a.contextBridge.exposeInMainWorld(y,Object.freeze(function(e){return{getAppInfo:async()=>new Promise((r,n)=>{e.once(c,(e,t)=>{d(t)&&n(t.payload.error),"get-app-info"===t.type&&r(t.payload)}),e.send(c,{type:"get-app-info",senderId:i})}),getKey:async r=>new Promise((n,t)=>{e.once(c,(e,r)=>{d(r)&&t(r.payload.error),"get-license-key"===r.type&&n(r.payload)}),e.send(c,{type:"get-license-key",senderId:i,payload:r})})}}(e)))}
|
package/build/js/Camera.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as Camera}from'./chunks/chunk-
|
|
1
|
+
export{a as Camera}from'./chunks/chunk-4J3Y5IIL.js';
|
|
@@ -554,6 +554,7 @@ declare enum HintIcon {
|
|
|
554
554
|
}
|
|
555
555
|
declare enum HintAnchor {
|
|
556
556
|
Top = "top",
|
|
557
|
+
Center = "center",
|
|
557
558
|
AboveViewFinder = "aboveViewFinder",
|
|
558
559
|
BelowViewFinder = "belowViewFinder"
|
|
559
560
|
}
|
|
@@ -777,6 +778,7 @@ interface LoadLibraryParameters {
|
|
|
777
778
|
libraryLocation: string;
|
|
778
779
|
locationPath: string;
|
|
779
780
|
writableDataPathOverride?: string;
|
|
781
|
+
indexedDBTimeoutMs: number;
|
|
780
782
|
verifyResponseHash: boolean;
|
|
781
783
|
onProgress?: (info: ProgressInfo) => void;
|
|
782
784
|
referredOrigin?: string;
|
|
@@ -1307,6 +1309,7 @@ declare class DataCaptureLoader {
|
|
|
1307
1309
|
protected get name(): string;
|
|
1308
1310
|
protected get fixedWasmMemory(): number | null;
|
|
1309
1311
|
static create(options: DataCaptureLoaderOptions): Promise<DataCaptureLoader>;
|
|
1312
|
+
private getIndexedDBTimeoutMs;
|
|
1310
1313
|
load(): Promise<WorkerResponse<"loadLibrary">>;
|
|
1311
1314
|
/**
|
|
1312
1315
|
* Send a task (i.e. a command) to the worker. Every task sent has a corresponding Promise object which
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
import './Camera-DhGjpcjv.js';
|
|
3
|
-
export { b as Change, h as DataCaptureComponent, g as DataCaptureComponentJSON, p as DataCaptureContext, k as DataCaptureContextCreationOptions, m as DataCaptureContextJSON, D as DataCaptureContextState, c as DataCaptureMode, e as DataCaptureModeJSON, M as ModuleLoaderOptions, l as PrivateCapabilityInfo, P as PrivateChangeSet, f as PrivateDataCaptureComponent, j as PrivateDataCaptureContext, i as PrivateDataCaptureContextOptions, d as PrivateDataCaptureMode, o as PrivateFrameHandler, n as PrivateFrameHandlerResponse } from './DataCaptureContext-
|
|
3
|
+
export { b as Change, h as DataCaptureComponent, g as DataCaptureComponentJSON, p as DataCaptureContext, k as DataCaptureContextCreationOptions, m as DataCaptureContextJSON, D as DataCaptureContextState, c as DataCaptureMode, e as DataCaptureModeJSON, M as ModuleLoaderOptions, l as PrivateCapabilityInfo, P as PrivateChangeSet, f as PrivateDataCaptureComponent, j as PrivateDataCaptureContext, i as PrivateDataCaptureContextOptions, d as PrivateDataCaptureMode, o as PrivateFrameHandler, n as PrivateFrameHandlerResponse } from './DataCaptureContext-Dvdr7st4.js';
|
|
4
4
|
import './DataCaptureContextSettings.js';
|
|
5
5
|
import './commons/JSONType.js';
|
|
6
6
|
import './commons/Orientation.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as DataCaptureContext}from'./chunks/chunk-
|
|
1
|
+
export{b as DataCaptureContext}from'./chunks/chunk-TTMLHWYT.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
export { s as ContextStatus, r as ContextStatusJSON, q as DataCaptureContextListener, t as PrivateMirrorAxis } from './DataCaptureContext-
|
|
2
|
+
export { s as ContextStatus, r as ContextStatusJSON, q as DataCaptureContextListener, t as PrivateMirrorAxis } from './DataCaptureContext-Dvdr7st4.js';
|
|
3
3
|
import './Camera-DhGjpcjv.js';
|
|
4
4
|
import './ScanditIcon.js';
|
|
5
5
|
import './DataCaptureContextSettings.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as DataCaptureVersion}from'./chunks/chunk-
|
|
1
|
+
export{a as DataCaptureVersion}from'./chunks/chunk-TR5HATUD.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
import './Camera-DhGjpcjv.js';
|
|
3
|
-
export { u as DataCaptureOverlay, y as DataCaptureView, x as DataCaptureViewConnectOptions, w as DataCaptureViewJSON, v as DataCaptureViewListener } from './DataCaptureContext-
|
|
3
|
+
export { u as DataCaptureOverlay, y as DataCaptureView, x as DataCaptureViewConnectOptions, w as DataCaptureViewJSON, v as DataCaptureViewListener } from './DataCaptureContext-Dvdr7st4.js';
|
|
4
4
|
import './DataCaptureViewPlusRelated.js';
|
|
5
5
|
import './NotificationPresenter/NotificationPresenter.js';
|
|
6
6
|
import './commons/Anchor.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as DataCaptureView}from'./chunks/chunk-
|
|
1
|
+
export{a as DataCaptureView}from'./chunks/chunk-ZDROGZFO.js';
|
package/build/js/Feedback.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as Feedback}from'./chunks/chunk-
|
|
1
|
+
export{a as Feedback}from'./chunks/chunk-WVVNJRUA.js';
|
package/build/js/FrameData.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
export { F as FrameData, z as PrivateLoadableFrameData, A as convertToPublicFrameData } from './DataCaptureContext-
|
|
2
|
+
export { F as FrameData, z as PrivateLoadableFrameData, A as convertToPublicFrameData } from './DataCaptureContext-Dvdr7st4.js';
|
|
3
3
|
import './ScanditIcon.js';
|
|
4
4
|
import './Camera-DhGjpcjv.js';
|
|
5
5
|
import './commons/Rect.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as ImageFrameSource}from'./chunks/chunk-
|
|
1
|
+
export{a as ImageFrameSource}from'./chunks/chunk-GLSB4QTY.js';
|
|
@@ -8,7 +8,7 @@ import '../commons/Color.js';
|
|
|
8
8
|
import '../private/Serializable.js';
|
|
9
9
|
import '../ScanditIcon.js';
|
|
10
10
|
import '../private/utils/ScanditHTMLElement.js';
|
|
11
|
-
import '../DataCaptureContext-
|
|
11
|
+
import '../DataCaptureContext-Dvdr7st4.js';
|
|
12
12
|
import '../Camera-DhGjpcjv.js';
|
|
13
13
|
import '../commons/Rect.js';
|
|
14
14
|
import '../commons/Point.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { H as HintPresenter } from '../../DataCaptureContext-
|
|
2
|
+
import { H as HintPresenter } from '../../DataCaptureContext-Dvdr7st4.js';
|
|
3
3
|
import { NotificationConfiguration } from '../NotificationConfiguration.js';
|
|
4
4
|
import { NotificationPresenter } from '../NotificationPresenter.js';
|
|
5
5
|
import '../../Camera-DhGjpcjv.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { N as GenericHint } from '../../DataCaptureContext-
|
|
2
|
+
import { N as GenericHint } from '../../DataCaptureContext-Dvdr7st4.js';
|
|
3
3
|
import { NotificationConfiguration } from '../NotificationConfiguration.js';
|
|
4
4
|
import '../../Camera-DhGjpcjv.js';
|
|
5
5
|
import '../../commons/Rect.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as ScanditIconBuilder,b as ScanditIconForIconType,a as ScanditIconType}from'./chunks/chunk-
|
|
1
|
+
export{c as ScanditIconBuilder,b as ScanditIconForIconType,a as ScanditIconType}from'./chunks/chunk-5OF76LWH.js';export{a as ScanditIconShape}from'./chunks/chunk-O4HDBWKK.js';
|
package/build/js/Vibration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as Vibration}from'./chunks/chunk-
|
|
1
|
+
export{a as Vibration}from'./chunks/chunk-NXAYIU7F.js';
|
|
@@ -67,6 +67,24 @@ declare namespace BrowserHelper {
|
|
|
67
67
|
*/
|
|
68
68
|
export function isDesktopDevice(): boolean;
|
|
69
69
|
export function isIPhone(): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* @hidden
|
|
72
|
+
*
|
|
73
|
+
* @returns Whether the device is an iPad.
|
|
74
|
+
*/
|
|
75
|
+
export function isIPad(): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* @hidden
|
|
78
|
+
*
|
|
79
|
+
* @returns Whether the device is a MacBook.
|
|
80
|
+
*/
|
|
81
|
+
export function isMacBook(): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* @hidden
|
|
84
|
+
*
|
|
85
|
+
* @returns Whether the device is an Apple device (iPhone, iPad, or Mac).
|
|
86
|
+
*/
|
|
87
|
+
export function isAppleDevice(): boolean;
|
|
70
88
|
/**
|
|
71
89
|
* @hidden
|
|
72
90
|
*
|
|
@@ -189,6 +207,7 @@ declare namespace BrowserHelper {
|
|
|
189
207
|
* @returns Whether the app is running in PWA mode with the specified display mode.
|
|
190
208
|
*/
|
|
191
209
|
export function isPwaDisplayMode(displayMode: DisplayMode): boolean;
|
|
210
|
+
export function isFixedMemoryRequired(): boolean;
|
|
192
211
|
export { };
|
|
193
212
|
}
|
|
194
213
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as BrowserHelper,a as DisplayMode}from'./chunks/chunk-
|
|
1
|
+
export{b as BrowserHelper,a as DisplayMode}from'./chunks/chunk-A225YZFY.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {b}from'./chunk-QBDQQMQ5.js';import {b as b$1}from'./chunk-LA6TM76R.js';import {a}from'./chunk-CX2R2XQK.js';var v=(e=>(e.Nonzero="nonzero",e.Evenodd="evenodd",e))(v||{}),n=class n extends b{constructor(e){super();this._context=null;this.isNextDrawPending=false;this.latestCommands=new Uint8Array([]);this.canvas=e,this.doDrawLoop=this.doDraw.bind(this);}get context(){if(!this._context&&(this._context=this.canvas.getContext("2d"),!this._context))throw new TypeError("CanvasRenderingContext cannot be retrieved.");return this._context}draw(e){if(this.latestCommands=e,!this.isCanvasReady()){this.postponeDraw();return}this.isNextDrawPending||(this.isNextDrawPending=true,a(this.doDrawLoop));}updateCanvasSizeAttributes(e,s,t=window.devicePixelRatio){let i=Math.round(e*t),r=Math.round(s*t);(i!==this.canvas.width||r!==this.canvas.height)&&(this.canvas.width=i,this.canvas.height=r,this.context.scale(t,t));}startObservingCanvasResize(){if(!this.resizeObserver){if(!n.ResizeObserver)throw new Error("PrivateCanvasDrawer.ResizeObserver is not set");this.resizeObserver=new n.ResizeObserver(e=>{var r;let[s]=e,{width:t,height:i}=(r=s.contentRect)!=null?r:this.canvas;t===0||i===0||(this.updateCanvasSizeAttributes(t,i),this.latestCommands.length!==0&&(this.draw(this.latestCommands),this.latestCommands=new Uint8Array([])));}),this.resizeObserver.observe(this.canvas);}}endObservingCanvasResize(){this.resizeObserver&&this.resizeObserver.unobserve(this.canvas);}doDraw(e){this.context.clearRect(0,0,this.canvas.width,this.canvas.height);let s=new b$1(this.latestCommands);for(;!s.isConsumed();){let t=s.extractCommandType();this.drawSingleCommand(t,s);}this.isNextDrawPending=false;}postponeDraw(){this.startObservingCanvasResize();}isCanvasReady(){return this.canvas.width>0&&this.canvas.height>0}};n.ResizeObserver="ResizeObserver"in globalThis?globalThis.ResizeObserver:void 0;var d=n;export{v as a,d as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-IBDUCVB4.js';import {a as a$1}from'./chunk-LFJUGRQV.js';import {g as g$1}from'./chunk-PJDP6LOG.js';import {d as d$1}from'./chunk-QYTZLT3L.js';import {b as b$1}from'./chunk-UWVAZAFS.js';import {a as a$3}from'./chunk-XR65N6EG.js';import {g}from'./chunk-3D2HNEVH.js';import {a}from'./chunk-6LHGFWQI.js';import {a as a$2}from'./chunk-QCZSSQAQ.js';d$1.addVideoDevicesListener(w=>{b.integrateIncomingVideoDevices(w.map(e=>d.fromDeviceCamera(e)));});var C;C=a$1;var s=class s{constructor(e){this._label="";this._deviceId="";this._notFoundOnDevice=false;this._isBestGuess=false;this.type="camera";this._currentState="off";this._settings=new g;this._desiredTorchState="off";this._desiredState="off";this.listeners=[];this._context=null;this[C]={markAsUnmappedToDeviceCameras:this.markAsUnmappedToDeviceCameras.bind(this),setDeviceId:this.setDeviceId.bind(this),setLabel:this.setLabel.bind(this),markAsBestGuess:this.markAsBestGuess.bind(this)};this._captureAndSendBound=this.captureAndSend.bind(this);this.stateTransitionStrategyMap={off:{on:this.transitionFromStateOffToOn.bind(this),standby:this.transitionFromStateOffToStandby.bind(this)},on:{off:this.transitionFromStateOnToOff.bind(this),standby:this.transitionFromStateOnToStandby.bind(this)},standby:{off:this.transitionFromStateStandbyToOff.bind(this),on:this.transitionFromStateStandbyToOn.bind(this)}};this.cameraManager=e!=null?e:g$1.instance();}static pickBestGuess(){return s.getOrCreate({position:"worldFacing",bestGuess:true})}static pickBestGuessForPosition(e){if(!a.availablePositions.includes(e))throw new Error(`Invalid camera position: "${e}"`);return s.getOrCreate({position:e})}static forDeviceId(e){return s.getOrCreate({deviceId:e})}static async getAll(e,t){return await d$1.getCameras(e!=null?e:false,t!=null?t:false),[...b.get()]}static getOrCreate(e){let{deviceId:t,position:r,bestGuess:i}=e,n=new s;return n._deviceId=t!=null?t:"",n.position=r!=null?r:"worldFacing",i&&n[a$1].markAsBestGuess(),b.getOrCreate(n)}static fromDeviceCamera(e){let t=new s;return t.position=e.position,t._deviceId=e.deviceId,t._label=e.label,t}get deviceId(){return this._deviceId}get label(){return this._label}get desiredState(){return this._desiredState}get settings(){return this._settings}get currentResolution(){var e;return (e=this._currentResolution)!=null?e:null}setDeviceId(e){this._deviceId=e;}setLabel(e){this._label=e;}get context(){return this._context}set context(e){this._context=e,this._context&&this.currentState==="on"&&this.startSendingCapturesToWorker();}get currentState(){return this._currentState}async switchToDesiredState(e){var t,r;if(this.currentTransitionStrategyPromise&&await this.currentTransitionStrategyPromise,this._notFoundOnDevice&&(e==="on"||e==="standby"))throw new a$2({message:`Cannot switch state to ${e}. This camera could not be mapped to a detected camera on the device. Please use another camera and delete this one.`,name:"Unmapped Camera"});return this.currentTransitionStrategyPromise=(r=(t=this.stateTransitionStrategyMap[this.currentState])==null?void 0:t[e])==null?void 0:r.call(t).catch(i=>{if(i instanceof DOMException&&i.message==="The associated Track is in an invalid state"){a$3.log(a$3.Level.Warn,i);return}throw i}),this.currentTransitionStrategyPromise}getDesiredTorchState(){return this._desiredTorchState}async setDesiredTorchState(e){this._desiredTorchState=e,await this.cameraManager.setTorchEnabled(this._desiredTorchState==="on"),await this.notifyContext({type:"torchState",newValue:this._desiredTorchState});}async isTorchAvailable(){return this.cameraManager.isTorchAvailable()}addListener(e){e!=null&&(this.listeners.includes(e)||this.listeners.push(e));}removeListener(e){e!=null&&this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}async applySettings(e){var r;this._settings=new g(e);let t=this.settings.getProperty("grayScaleFrameReader");if(this.cameraManager.setFrameReaderType(t===true?"GRAYSCALE":"RGBA"),this.currentState==="on"||this.currentState==="standby"){let i=this.cameraManager.activeCameraSettings;(i==null?void 0:i.preferredResolution)!==this.settings.preferredResolution&&(await this.cameraManager.applyCameraSettings(this.settings),(r=this.cameraManager.activeCamera)!=null&&r.currentResolution&&(this._currentResolution={width:this.cameraManager.activeCamera.currentResolution.width,height:this.cameraManager.activeCamera.currentResolution.height})),await this.cameraManager.setZoom(this.settings.zoomFactor);let n=this.settings.getProperty("minFrameRate"),h=this.settings.getProperty("maxFrameRate");(n!=null||h!=null)&&await this.cameraManager.setFrameRate({min:n,max:h});let l=this.settings.getProperty("manualLensPosition");l!=null&&await this.cameraManager.setFocus(l);let p=this.settings.getProperty("exposureTargetBias"),S=this.settings.getProperty("exposureDuration");(p!=null||S!=null)&&await this.cameraManager.setExposure({compensation:p,time:S});}return this.notifyContext({type:"cameraSettings",newValue:this.settings})}toJSONObject(){return {type:this.type,position:this.position,settings:this.settings.toJSONObject(),desiredState:this.desiredState,desiredTorchState:this._desiredTorchState}}getMirrorImageEnabled(){var e;return (e=this._desiredMirrorImageEnabled)!=null?e:this.cameraManager.isMirrorImageEnabled()}async setMirrorImageEnabled(e){this._desiredMirrorImageEnabled=e,this.cameraManager.setMirrorImageEnabled(e,true),this.context&&await this.context.setFrameSource(this);}getCurrentState(){return this._currentState}async setClipArea(e){await this.cameraManager.setClipArea(e);}async setCurrentState(e){if(e!==this._currentState){this._currentState=e,this.notifyListeners();try{await this.notifyContext({type:"frameSourceState",newValue:e}),e==="on"&&this.startSendingCapturesToWorker();}catch{a$3.warn("Error while notifying context about new state of Camera");}}}async setupCamera(){if(this.cameraManager.setSelectedCameraSettings(this.settings),this.deviceId==="")this.cameraManager.setSelectedCamera(),this.cameraManager.setInitialCameraPosition(this.position);else {let t=(await d$1.getCameras()).find(r=>r.deviceId===this.deviceId);t&&(this.cameraManager.setInitialCameraPosition(t.position),this.cameraManager.setSelectedCamera(t));}await this.cameraManager.setupCameras(),typeof this._desiredMirrorImageEnabled=="boolean"?this.cameraManager.setMirrorImageEnabled(this._desiredMirrorImageEnabled,true):this.cameraManager.setMirrorImageEnabled(this.cameraManager.isMirrorImageEnabled(),false),this.context&&await this.context.setFrameSource(this),this.cameraManager.activeCamera&&(this._deviceId=this.cameraManager.activeCamera.deviceId,this._label=this.cameraManager.activeCamera.label,this.position=this.cameraManager.activeCamera.position,this._currentResolution=this.cameraManager.activeCamera.currentResolution);}markAsUnmappedToDeviceCameras(){this._notFoundOnDevice=true;}markAsBestGuess(){this._isBestGuess=true;}async notifyContext(e){if(this.context)return this.context.update([e])}notifyListeners(){for(let e of this.listeners)e.didChangeState&&e.didChangeState(this,this.currentState);}updateCanvasVideoImage(){this.currentState==="on"&&this.context&&(this.cameraManager.updateCanvasVideoImage(),this._lastCanvasVideoPreviewAnimationFrame=this.cameraManager.requestVideoFrame(this.updateCanvasVideoImage.bind(this)));}async captureAndSend(){if(this.currentState!=="on"||!this.context)return;if(!this.context.hasEnabledMode()){this._lastCaptureRequestAnimationFrame=this.cameraManager.requestVideoFrame(this._captureAndSendBound);return}let e=null;try{e=this.cameraManager.captureImage();}catch(t){a$3.warn("Camera: error while capturing image.",t);}finally{if(e!=null)if(this.cameraManager.synchronousFrameHandling){let t=await this.context.sendFrameToProcessor(e);this.cameraManager.recycle(t.data);}else this.context.sendFrameToProcessor(e).then(t=>(this.cameraManager.recycle(t.data),null)).catch(t=>{a$3.warn("error while recycling uint8array",t);});this._lastCaptureRequestAnimationFrame=this.cameraManager.requestVideoFrame(this._captureAndSendBound);}}startSendingCapturesToWorker(){this.stopSendingCapturesToWorker(),this.captureAndSend();}stopSendingCapturesToWorker(){this._lastCanvasVideoPreviewAnimationFrame!=null&&this.cameraManager.cancelVideoFrame(this._lastCanvasVideoPreviewAnimationFrame),this._lastCaptureRequestAnimationFrame!=null&&this.cameraManager.cancelVideoFrame(this._lastCaptureRequestAnimationFrame);}async transitionFromStateOffToOn(){if(!(this.currentState==="on"||this.currentState==="starting"||this.currentState==="wakingUp")){this._desiredState="on",await this.setCurrentState("starting");try{await this.setupCamera(),await this.setCurrentState("on");}catch(e){throw a$3.log(a$3.Level.Error,e),await this.setCurrentState("off"),e}}}async transitionFromStateOffToStandby(){if(!(this.currentState==="standby"||this.currentState==="bootingUp"||this.currentState==="goingToSleep")){if(await this.isAndroidWebView()){a$3.log(a$3.Level.Warn,'Warning: "Standby" state does not work inside web views. Falling back to state "On".'),await this.transitionFromStateOffToOn();return}this._desiredState="standby",await this.setCurrentState("bootingUp");try{await this.setupCamera(),this.cameraManager.pauseStream(),await this.setCurrentState("standby");}catch(e){throw a$3.log(a$3.Level.Error,e),await this.setCurrentState("off"),e}await this.setCurrentState("standby"),await this.setDesiredTorchState("off");}}async transitionFromStateOnToOff(){this.currentState==="off"||this.currentState==="stopping"||(this._desiredState="off",await this.setCurrentState("stopping"),await this.cameraManager.stopStream(),await this.setCurrentState("off"),await this.setDesiredTorchState("off"));}async transitionFromStateOnToStandby(){if(!(this.currentState==="standby"||this.currentState==="bootingUp"||this.currentState==="goingToSleep")){if(await this.isAndroidWebView()){a$3.log(a$3.Level.Warn,'Warning: "Standby" state does not work inside web views. Falling back to state "Off".'),await this.transitionFromStateOnToOff();return}this._desiredState="standby",await this.setCurrentState("goingToSleep"),this.cameraManager.pauseStream(),await this.setCurrentState("standby"),await this.setDesiredTorchState("off");}}async transitionFromStateStandbyToOff(){this.currentState==="off"||this.currentState==="stopping"||(this._desiredState="off",await this.setCurrentState("shuttingDown"),await this.cameraManager.stopStream(),await this.setCurrentState("off"),await this.setDesiredTorchState("off"));}async transitionFromStateStandbyToOn(){this.currentState==="on"||this.currentState==="starting"||this.currentState==="wakingUp"||(this._desiredState="on",await this.setCurrentState("wakingUp"),this.cameraManager.resumeStream(),await this.setCurrentState("on"));}async isAndroidWebView(){return this._isAndroidWebView==null&&(this._isAndroidWebView=await b$1.isAndroidWebView()),this._isAndroidWebView}isZoomAvailable(){var e;return ((e=this.cameraManager.mediaTrackCapabilities)==null?void 0:e.zoom)!=null}},d=s;export{d as a};
|
|
1
|
+
import {b}from'./chunk-IBDUCVB4.js';import {a as a$1}from'./chunk-LFJUGRQV.js';import {g as g$1}from'./chunk-SYGWA3T6.js';import {d as d$1}from'./chunk-NT5WI2PS.js';import {b as b$1}from'./chunk-A225YZFY.js';import {a as a$3}from'./chunk-XR65N6EG.js';import {g}from'./chunk-3D2HNEVH.js';import {a}from'./chunk-6LHGFWQI.js';import {a as a$2}from'./chunk-QCZSSQAQ.js';d$1.addVideoDevicesListener(w=>{b.integrateIncomingVideoDevices(w.map(e=>d.fromDeviceCamera(e)));});var C;C=a$1;var s=class s{constructor(e){this._label="";this._deviceId="";this._notFoundOnDevice=false;this._isBestGuess=false;this.type="camera";this._currentState="off";this._settings=new g;this._desiredTorchState="off";this._desiredState="off";this.listeners=[];this._context=null;this[C]={markAsUnmappedToDeviceCameras:this.markAsUnmappedToDeviceCameras.bind(this),setDeviceId:this.setDeviceId.bind(this),setLabel:this.setLabel.bind(this),markAsBestGuess:this.markAsBestGuess.bind(this)};this._captureAndSendBound=this.captureAndSend.bind(this);this.stateTransitionStrategyMap={off:{on:this.transitionFromStateOffToOn.bind(this),standby:this.transitionFromStateOffToStandby.bind(this)},on:{off:this.transitionFromStateOnToOff.bind(this),standby:this.transitionFromStateOnToStandby.bind(this)},standby:{off:this.transitionFromStateStandbyToOff.bind(this),on:this.transitionFromStateStandbyToOn.bind(this)}};this.cameraManager=e!=null?e:g$1.instance();}static pickBestGuess(){return s.getOrCreate({position:"worldFacing",bestGuess:true})}static pickBestGuessForPosition(e){if(!a.availablePositions.includes(e))throw new Error(`Invalid camera position: "${e}"`);return s.getOrCreate({position:e})}static forDeviceId(e){return s.getOrCreate({deviceId:e})}static async getAll(e,t){return await d$1.getCameras(e!=null?e:false,t!=null?t:false),[...b.get()]}static getOrCreate(e){let{deviceId:t,position:r,bestGuess:i}=e,n=new s;return n._deviceId=t!=null?t:"",n.position=r!=null?r:"worldFacing",i&&n[a$1].markAsBestGuess(),b.getOrCreate(n)}static fromDeviceCamera(e){let t=new s;return t.position=e.position,t._deviceId=e.deviceId,t._label=e.label,t}get deviceId(){return this._deviceId}get label(){return this._label}get desiredState(){return this._desiredState}get settings(){return this._settings}get currentResolution(){var e;return (e=this._currentResolution)!=null?e:null}setDeviceId(e){this._deviceId=e;}setLabel(e){this._label=e;}get context(){return this._context}set context(e){this._context=e,this._context&&this.currentState==="on"&&this.startSendingCapturesToWorker();}get currentState(){return this._currentState}async switchToDesiredState(e){var t,r;if(this.currentTransitionStrategyPromise&&await this.currentTransitionStrategyPromise,this._notFoundOnDevice&&(e==="on"||e==="standby"))throw new a$2({message:`Cannot switch state to ${e}. This camera could not be mapped to a detected camera on the device. Please use another camera and delete this one.`,name:"Unmapped Camera"});return this.currentTransitionStrategyPromise=(r=(t=this.stateTransitionStrategyMap[this.currentState])==null?void 0:t[e])==null?void 0:r.call(t).catch(i=>{if(i instanceof DOMException&&i.message==="The associated Track is in an invalid state"){a$3.log(a$3.Level.Warn,i);return}throw i}),this.currentTransitionStrategyPromise}getDesiredTorchState(){return this._desiredTorchState}async setDesiredTorchState(e){this._desiredTorchState=e,await this.cameraManager.setTorchEnabled(this._desiredTorchState==="on"),await this.notifyContext({type:"torchState",newValue:this._desiredTorchState});}async isTorchAvailable(){return this.cameraManager.isTorchAvailable()}addListener(e){e!=null&&(this.listeners.includes(e)||this.listeners.push(e));}removeListener(e){e!=null&&this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}async applySettings(e){var r;this._settings=new g(e);let t=this.settings.getProperty("grayScaleFrameReader");if(this.cameraManager.setFrameReaderType(t===true?"GRAYSCALE":"RGBA"),this.currentState==="on"||this.currentState==="standby"){let i=this.cameraManager.activeCameraSettings;(i==null?void 0:i.preferredResolution)!==this.settings.preferredResolution&&(await this.cameraManager.applyCameraSettings(this.settings),(r=this.cameraManager.activeCamera)!=null&&r.currentResolution&&(this._currentResolution={width:this.cameraManager.activeCamera.currentResolution.width,height:this.cameraManager.activeCamera.currentResolution.height})),await this.cameraManager.setZoom(this.settings.zoomFactor);let n=this.settings.getProperty("minFrameRate"),h=this.settings.getProperty("maxFrameRate");(n!=null||h!=null)&&await this.cameraManager.setFrameRate({min:n,max:h});let l=this.settings.getProperty("manualLensPosition");l!=null&&await this.cameraManager.setFocus(l);let p=this.settings.getProperty("exposureTargetBias"),S=this.settings.getProperty("exposureDuration");(p!=null||S!=null)&&await this.cameraManager.setExposure({compensation:p,time:S});}return this.notifyContext({type:"cameraSettings",newValue:this.settings})}toJSONObject(){return {type:this.type,position:this.position,settings:this.settings.toJSONObject(),desiredState:this.desiredState,desiredTorchState:this._desiredTorchState}}getMirrorImageEnabled(){var e;return (e=this._desiredMirrorImageEnabled)!=null?e:this.cameraManager.isMirrorImageEnabled()}async setMirrorImageEnabled(e){this._desiredMirrorImageEnabled=e,this.cameraManager.setMirrorImageEnabled(e,true),this.context&&await this.context.setFrameSource(this);}getCurrentState(){return this._currentState}async setClipArea(e){await this.cameraManager.setClipArea(e);}async setCurrentState(e){if(e!==this._currentState){this._currentState=e,this.notifyListeners();try{await this.notifyContext({type:"frameSourceState",newValue:e}),e==="on"&&this.startSendingCapturesToWorker();}catch{a$3.warn("Error while notifying context about new state of Camera");}}}async setupCamera(){if(this.cameraManager.setSelectedCameraSettings(this.settings),this.deviceId==="")this.cameraManager.setSelectedCamera(),this.cameraManager.setInitialCameraPosition(this.position);else {let t=(await d$1.getCameras()).find(r=>r.deviceId===this.deviceId);t&&(this.cameraManager.setInitialCameraPosition(t.position),this.cameraManager.setSelectedCamera(t));}await this.cameraManager.setupCameras(),typeof this._desiredMirrorImageEnabled=="boolean"?this.cameraManager.setMirrorImageEnabled(this._desiredMirrorImageEnabled,true):this.cameraManager.setMirrorImageEnabled(this.cameraManager.isMirrorImageEnabled(),false),this.context&&await this.context.setFrameSource(this),this.cameraManager.activeCamera&&(this._deviceId=this.cameraManager.activeCamera.deviceId,this._label=this.cameraManager.activeCamera.label,this.position=this.cameraManager.activeCamera.position,this._currentResolution=this.cameraManager.activeCamera.currentResolution);}markAsUnmappedToDeviceCameras(){this._notFoundOnDevice=true;}markAsBestGuess(){this._isBestGuess=true;}async notifyContext(e){if(this.context)return this.context.update([e])}notifyListeners(){for(let e of this.listeners)e.didChangeState&&e.didChangeState(this,this.currentState);}updateCanvasVideoImage(){this.currentState==="on"&&this.context&&(this.cameraManager.updateCanvasVideoImage(),this._lastCanvasVideoPreviewAnimationFrame=this.cameraManager.requestVideoFrame(this.updateCanvasVideoImage.bind(this)));}async captureAndSend(){if(this.currentState!=="on"||!this.context)return;if(!this.context.hasEnabledMode()){this._lastCaptureRequestAnimationFrame=this.cameraManager.requestVideoFrame(this._captureAndSendBound);return}let e=null;try{e=this.cameraManager.captureImage();}catch(t){a$3.warn("Camera: error while capturing image.",t);}finally{if(e!=null)if(this.cameraManager.synchronousFrameHandling){let t=await this.context.sendFrameToProcessor(e);this.cameraManager.recycle(t.data);}else this.context.sendFrameToProcessor(e).then(t=>(this.cameraManager.recycle(t.data),null)).catch(t=>{a$3.warn("error while recycling uint8array",t);});this._lastCaptureRequestAnimationFrame=this.cameraManager.requestVideoFrame(this._captureAndSendBound);}}startSendingCapturesToWorker(){this.stopSendingCapturesToWorker(),this.captureAndSend();}stopSendingCapturesToWorker(){this._lastCanvasVideoPreviewAnimationFrame!=null&&this.cameraManager.cancelVideoFrame(this._lastCanvasVideoPreviewAnimationFrame),this._lastCaptureRequestAnimationFrame!=null&&this.cameraManager.cancelVideoFrame(this._lastCaptureRequestAnimationFrame);}async transitionFromStateOffToOn(){if(!(this.currentState==="on"||this.currentState==="starting"||this.currentState==="wakingUp")){this._desiredState="on",await this.setCurrentState("starting");try{await this.setupCamera(),await this.setCurrentState("on");}catch(e){throw a$3.log(a$3.Level.Error,e),await this.setCurrentState("off"),e}}}async transitionFromStateOffToStandby(){if(!(this.currentState==="standby"||this.currentState==="bootingUp"||this.currentState==="goingToSleep")){if(await this.isAndroidWebView()){a$3.log(a$3.Level.Warn,'Warning: "Standby" state does not work inside web views. Falling back to state "On".'),await this.transitionFromStateOffToOn();return}this._desiredState="standby",await this.setCurrentState("bootingUp");try{await this.setupCamera(),this.cameraManager.pauseStream(),await this.setCurrentState("standby");}catch(e){throw a$3.log(a$3.Level.Error,e),await this.setCurrentState("off"),e}await this.setCurrentState("standby"),await this.setDesiredTorchState("off");}}async transitionFromStateOnToOff(){this.currentState==="off"||this.currentState==="stopping"||(this._desiredState="off",await this.setCurrentState("stopping"),await this.cameraManager.stopStream(),await this.setCurrentState("off"),await this.setDesiredTorchState("off"));}async transitionFromStateOnToStandby(){if(!(this.currentState==="standby"||this.currentState==="bootingUp"||this.currentState==="goingToSleep")){if(await this.isAndroidWebView()){a$3.log(a$3.Level.Warn,'Warning: "Standby" state does not work inside web views. Falling back to state "Off".'),await this.transitionFromStateOnToOff();return}this._desiredState="standby",await this.setCurrentState("goingToSleep"),this.cameraManager.pauseStream(),await this.setCurrentState("standby"),await this.setDesiredTorchState("off");}}async transitionFromStateStandbyToOff(){this.currentState==="off"||this.currentState==="stopping"||(this._desiredState="off",await this.setCurrentState("shuttingDown"),await this.cameraManager.stopStream(),await this.setCurrentState("off"),await this.setDesiredTorchState("off"));}async transitionFromStateStandbyToOn(){this.currentState==="on"||this.currentState==="starting"||this.currentState==="wakingUp"||(this._desiredState="on",await this.setCurrentState("wakingUp"),this.cameraManager.resumeStream(),await this.setCurrentState("on"));}async isAndroidWebView(){return this._isAndroidWebView==null&&(this._isAndroidWebView=await b$1.isAndroidWebView()),this._isAndroidWebView}isZoomAvailable(){var e;return ((e=this.cameraManager.mediaTrackCapabilities)==null?void 0:e.zoom)!=null}},d=s;export{d as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-4J3Y5IIL.js';import {d}from'./chunk-NT5WI2PS.js';import {f,g}from'./chunk-3D2HNEVH.js';var u=class{constructor(){this.type="camera";this.customImages={idle:"",pressed:""};this.cameraSwitchButton=void 0;this.CameraSwitchButtonClass=void 0;this.currentFrameSource=null;this.view=void 0;this.onCameraSwitched=this.handleCameraSwitched.bind(this);this.isTransitioning=false;}get idleImage(){return this.customImages.idle}set idleImage(t){this.customImages.idle=t,this.applyCustomImagesToButton();}get pressedImage(){return this.customImages.pressed}set pressedImage(t){this.customImages.pressed=t,this.applyCustomImagesToButton();}toJSONObject(){return {type:this.type}}async install(t){var i,r,s;this.CameraSwitchButtonClass||(this.CameraSwitchButtonClass=await import('../private/ui/molecules/CameraSwitchButton.js').then(l=>l.CameraSwitchButton),(i=this.CameraSwitchButtonClass)==null||i.register()),this.view=t,this.currentFrameSource=(s=(r=t.getContext())==null?void 0:r.frameSource)!=null?s:null,this.cameraSwitchButton=this.CameraSwitchButtonClass.create(),this.cameraSwitchButton.slot="topRight",this.cameraSwitchButton.hidden=true,this.cameraSwitchButton.addEventListener("camera-switched",this.onCameraSwitched);let e=t.controlsElement;e&&e.append(this.cameraSwitchButton),this.applyCustomImagesToButton();let a=await this.canShow();return this.updateButtonVisibility(a),true}remove(t){t&&this.cameraSwitchButton&&(this.cameraSwitchButton.removeEventListener("camera-switched",this.onCameraSwitched),this.cameraSwitchButton.remove(),this.cameraSwitchButton=null,this.currentFrameSource=null,this.view=void 0);}async update(t){var a,i;this.currentFrameSource=(i=(a=t.getContext())==null?void 0:a.frameSource)!=null?i:null,this.view=t;let e=await this.canShow();this.updateButtonVisibility(e);}updateButtonVisibility(t){this.cameraSwitchButton&&(this.cameraSwitchButton.hidden=!t);}applyCustomImagesToButton(){if(!this.cameraSwitchButton)return;this.customImages.idle||this.customImages.pressed?this.cameraSwitchButton.setCustomImages(this.customImages):this.cameraSwitchButton.useCustomImages=false;}async canShow(){if(!f(this.currentFrameSource)||this.currentFrameSource.getCurrentState()!=="on")return false;try{return (await d.getCameras(false,true)).length>1}catch{return false}}handleCameraSwitched(t){let{currentMode:e}=t.detail,a=e==="back"?"front":"back";this.cameraSwitchButton.mode=a,this.handleCameraSwitch();}async handleCameraSwitch(){if(this.isTransitioning)return;let t=await this.getNextDeviceCamera();t&&await this.switchCameras(t);}async getNextDeviceCamera(){var r;let t=await a.getAll(false,true),e=this.currentFrameSource?this.currentFrameSource:null,a$1=e==null?void 0:e.deviceId,i=t.findIndex(s=>s.deviceId===a$1);return i>-1?(r=t[i+1])!=null?r:t[0]:t.length>0?t[0]:null}async switchCameras(t){var s;this.isTransitioning=true;let e=(s=this.view)==null?void 0:s.getContext(),a=e==null?void 0:e.frameSource,i,r;a!=null&&(i=new g(a.settings),r=a.desiredState),await(a==null?void 0:a.switchToDesiredState("off")),i!=null&&await t.applySettings(i),await(e==null?void 0:e.setFrameSource(t)),await(e==null?void 0:e.frameSource).switchToDesiredState(r!=null?r:"on"),this.isTransitioning=false;}};export{u as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a as a$2}from'./chunk-KXAJHLEO.js';import {a as a$3}from'./chunk-AAEQZ45T.js';import {c,d,b as b$1,a as a$1,e}from'./chunk-SBC5K7IT.js';import {a,b}from'./chunk-TR3NGINC.js';var Ae=a((J,le)=>{(function(O,w){var be="1.0.40",V="",_="?",q="function",M="undefined",Q="object",K="string",ee="major",i="model",t="name",e="type",o="vendor",n="version",A="architecture",W="console",b="mobile",u="tablet",k="smarttv",E="wearable",ie="embedded",Y=500,z="Amazon",I="Apple",ce="ASUS",ue="BlackBerry",F="Browser",X="Chrome",pe="Edge",G="Firefox",j="Google",$="Huawei",a="LG",s="Microsoft",r="Motorola",d="Opera",g="Samsung",h="Sharp",x="Sony",y="Xiaomi",B="Zebra",oe="Facebook",P="Chromium OS",L="Mac OS",te=" Browser",ne=function(p,m){var c={};for(var v in p)m[v]&&m[v].length%2===0?c[v]=m[v].concat(p[v]):c[v]=p[v];return c},N=function(p){for(var m={},c=0;c<p.length;c++)m[p[c].toUpperCase()]=p[c];return m},D=function(p,m){return typeof p===K?R(m).indexOf(R(p))!==-1:false},R=function(p){return p.toLowerCase()},re=function(p){return typeof p===K?p.replace(/[^\d\.]/g,V).split(".")[0]:w},we=function(p,m){if(typeof p===K)return p=p.replace(/^\s\s*/,V),typeof m===M?p:p.substring(0,Y)},Z=function(p,m){for(var c=0,v,U,C,f,l,T;c<m.length&&!l;){var de=m[c],ge=m[c+1];for(v=U=0;v<de.length&&!l&&de[v];)if(l=de[v++].exec(p),l)for(C=0;C<ge.length;C++)T=l[++U],f=ge[C],typeof f===Q&&f.length>0?f.length===2?typeof f[1]==q?this[f[0]]=f[1].call(this,T):this[f[0]]=f[1]:f.length===3?typeof f[1]===q&&!(f[1].exec&&f[1].test)?this[f[0]]=T?f[1].call(this,T,f[2]):w:this[f[0]]=T?T.replace(f[1],f[2]):w:f.length===4&&(this[f[0]]=T?f[3].call(this,T.replace(f[1],f[2])):w):this[f]=T||w;c+=2;}},ae=function(p,m){for(var c in m)if(typeof m[c]===Q&&m[c].length>0){for(var v=0;v<m[c].length;v++)if(D(m[c][v],p))return c===_?w:c}else if(D(m[c],p))return c===_?w:c;return m.hasOwnProperty("*")?m["*"]:p},Te={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},me={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},fe={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[n,[t,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[n,[t,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[t,n],[/opios[\/ ]+([\w\.]+)/i],[n,[t,d+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[n,[t,d+" GX"]],[/\bopr\/([\w\.]+)/i],[n,[t,d]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[n,[t,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[n,[t,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[t,n],[/quark(?:pc)?\/([-\w\.]+)/i],[n,[t,"Quark"]],[/\bddg\/([\w\.]+)/i],[n,[t,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[n,[t,"UC"+F]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[n,[t,"WeChat"]],[/konqueror\/([\w\.]+)/i],[n,[t,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[n,[t,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[n,[t,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[n,[t,"Smart Lenovo "+F]],[/(avast|avg)\/([\w\.]+)/i],[[t,/(.+)/,"$1 Secure "+F],n],[/\bfocus\/([\w\.]+)/i],[n,[t,G+" Focus"]],[/\bopt\/([\w\.]+)/i],[n,[t,d+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[n,[t,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[n,[t,"Dolphin"]],[/coast\/([\w\.]+)/i],[n,[t,d+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[n,[t,"MIUI"+te]],[/fxios\/([\w\.-]+)/i],[n,[t,G]],[/\bqihoobrowser\/?([\w\.]*)/i],[n,[t,"360"]],[/\b(qq)\/([\w\.]+)/i],[[t,/(.+)/,"$1Browser"],n],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[t,/(.+)/,"$1"+te],n],[/samsungbrowser\/([\w\.]+)/i],[n,[t,g+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[n,[t,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[t,"Sogou Mobile"],n],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[t,n],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[t],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[n,t],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[t,oe],n],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[t,n],[/\bgsa\/([\w\.]+) .*safari\//i],[n,[t,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[n,[t,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[n,[t,X+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[t,X+" WebView"],n],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[n,[t,"Android "+F]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[t,n],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[n,[t,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[n,t],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[t,[n,ae,Te]],[/(webkit|khtml)\/([\w\.]+)/i],[t,n],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[t,"Netscape"],n],[/(wolvic|librewolf)\/([\w\.]+)/i],[t,n],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[n,[t,G+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[t,[n,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[t,[n,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[A,"amd64"]],[/(ia32(?=;))/i],[[A,R]],[/((?:i[346]|x)86)[;\)]/i],[[A,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[A,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[A,"armhf"]],[/windows (ce|mobile); ppc;/i],[[A,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[A,/ower/,V,R]],[/(sun4\w)[;\)]/i],[[A,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[A,R]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[i,[o,g],[e,u]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[i,[o,g],[e,b]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[i,[o,I],[e,b]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[i,[o,I],[e,u]],[/(macintosh);/i],[i,[o,I]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[i,[o,h],[e,b]],[/(?:honor)([-\w ]+)[;\)]/i],[i,[o,"Honor"],[e,b]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[i,[o,$],[e,u]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[i,[o,$],[e,b]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[i,/_/g," "],[o,y],[e,b]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[i,/_/g," "],[o,y],[e,u]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[i,[o,"OPPO"],[e,b]],[/\b(opd2\d{3}a?) bui/i],[i,[o,"OPPO"],[e,u]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[i,[o,"Vivo"],[e,b]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[i,[o,"Realme"],[e,b]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[i,[o,r],[e,b]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[i,[o,r],[e,u]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[i,[o,a],[e,u]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[i,[o,a],[e,b]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[i,[o,"Lenovo"],[e,u]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[i,/_/g," "],[o,"Nokia"],[e,b]],[/(pixel c)\b/i],[i,[o,j],[e,u]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[i,[o,j],[e,b]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[i,[o,x],[e,b]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[i,"Xperia Tablet"],[o,x],[e,u]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[i,[o,"OnePlus"],[e,b]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[i,[o,z],[e,u]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[i,/(.+)/g,"Fire Phone $1"],[o,z],[e,b]],[/(playbook);[-\w\),; ]+(rim)/i],[i,o,[e,u]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[i,[o,ue],[e,b]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[i,[o,ce],[e,u]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[i,[o,ce],[e,b]],[/(nexus 9)/i],[i,[o,"HTC"],[e,u]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[o,[i,/_/g," "],[e,b]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[i,[o,"TCL"],[e,u]],[/(itel) ((\w+))/i],[[o,R],i,[e,ae,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[i,[o,"Acer"],[e,u]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[i,[o,"Meizu"],[e,b]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[i,[o,"Ulefone"],[e,b]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[i,[o,"Energizer"],[e,b]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[i,[o,"Cat"],[e,b]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[i,[o,"Smartfren"],[e,b]],[/droid.+; (a(?:015|06[35]|142p?))/i],[i,[o,"Nothing"],[e,b]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[o,i,[e,b]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[o,i,[e,u]],[/(surface duo)/i],[i,[o,s],[e,u]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[i,[o,"Fairphone"],[e,b]],[/(u304aa)/i],[i,[o,"AT&T"],[e,b]],[/\bsie-(\w*)/i],[i,[o,"Siemens"],[e,b]],[/\b(rct\w+) b/i],[i,[o,"RCA"],[e,u]],[/\b(venue[\d ]{2,7}) b/i],[i,[o,"Dell"],[e,u]],[/\b(q(?:mv|ta)\w+) b/i],[i,[o,"Verizon"],[e,u]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[i,[o,"Barnes & Noble"],[e,u]],[/\b(tm\d{3}\w+) b/i],[i,[o,"NuVision"],[e,u]],[/\b(k88) b/i],[i,[o,"ZTE"],[e,u]],[/\b(nx\d{3}j) b/i],[i,[o,"ZTE"],[e,b]],[/\b(gen\d{3}) b.+49h/i],[i,[o,"Swiss"],[e,b]],[/\b(zur\d{3}) b/i],[i,[o,"Swiss"],[e,u]],[/\b((zeki)?tb.*\b) b/i],[i,[o,"Zeki"],[e,u]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[o,"Dragon Touch"],i,[e,u]],[/\b(ns-?\w{0,9}) b/i],[i,[o,"Insignia"],[e,u]],[/\b((nxa|next)-?\w{0,9}) b/i],[i,[o,"NextBook"],[e,u]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[o,"Voice"],i,[e,b]],[/\b(lvtel\-)?(v1[12]) b/i],[[o,"LvTel"],i,[e,b]],[/\b(ph-1) /i],[i,[o,"Essential"],[e,b]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[i,[o,"Envizen"],[e,u]],[/\b(trio[-\w\. ]+) b/i],[i,[o,"MachSpeed"],[e,u]],[/\btu_(1491) b/i],[i,[o,"Rotor"],[e,u]],[/(shield[\w ]+) b/i],[i,[o,"Nvidia"],[e,u]],[/(sprint) (\w+)/i],[o,i,[e,b]],[/(kin\.[onetw]{3})/i],[[i,/\./g," "],[o,s],[e,b]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[i,[o,B],[e,u]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[i,[o,B],[e,b]],[/smart-tv.+(samsung)/i],[o,[e,k]],[/hbbtv.+maple;(\d+)/i],[[i,/^/,"SmartTV"],[o,g],[e,k]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[o,a],[e,k]],[/(apple) ?tv/i],[o,[i,I+" TV"],[e,k]],[/crkey/i],[[i,X+"cast"],[o,j],[e,k]],[/droid.+aft(\w+)( bui|\))/i],[i,[o,z],[e,k]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[i,[o,h],[e,k]],[/(bravia[\w ]+)( bui|\))/i],[i,[o,x],[e,k]],[/(mitv-\w{5}) bui/i],[i,[o,y],[e,k]],[/Hbbtv.*(technisat) (.*);/i],[o,i,[e,k]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[o,we],[i,we],[e,k]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[e,k]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[o,i,[e,W]],[/droid.+; (shield) bui/i],[i,[o,"Nvidia"],[e,W]],[/(playstation [345portablevi]+)/i],[i,[o,x],[e,W]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[i,[o,s],[e,W]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[i,[o,g],[e,E]],[/((pebble))app/i],[o,i,[e,E]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[i,[o,I],[e,E]],[/droid.+; (glass) \d/i],[i,[o,j],[e,E]],[/droid.+; (wt63?0{2,3})\)/i],[i,[o,B],[e,E]],[/droid.+; (glass) \d/i],[i,[o,j],[e,E]],[/(pico) (4|neo3(?: link|pro)?)/i],[o,i,[e,E]],[/; (quest( \d| pro)?)/i],[i,[o,oe],[e,E]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[o,[e,ie]],[/(aeobc)\b/i],[i,[o,z],[e,ie]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[i,[e,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[i,[e,u]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[e,u]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[e,b]],[/(android[-\w\. ]{0,9});.+buil/i],[i,[o,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[n,[t,pe+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[t,n],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[n,[t,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[t,n],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[n,t]],os:[[/microsoft (windows) (vista|xp)/i],[t,n],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[t,[n,ae,me]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[n,ae,me],[t,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[n,/_/g,"."],[t,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[t,L],[n,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[n,t],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[t,n],[/\(bb(10);/i],[n,[t,ue]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[n,[t,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[n,[t,G+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[n,[t,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[n,[t,"watchOS"]],[/crkey\/([\d\.]+)/i],[n,[t,X+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[t,P],n],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[t,n],[/(sunos) ?([\w\.\d]*)/i],[[t,"Solaris"],n],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[t,n]]},S=function(p,m){if(typeof p===Q&&(m=p,p=w),!(this instanceof S))return new S(p,m).getResult();var c=typeof O!==M&&O.navigator?O.navigator:w,v=p||(c&&c.userAgent?c.userAgent:V),U=c&&c.userAgentData?c.userAgentData:w,C=m?ne(fe,m):fe,f=c&&c.userAgent==v;return this.getBrowser=function(){var l={};return l[t]=w,l[n]=w,Z.call(l,v,C.browser),l[ee]=re(l[n]),f&&c&&c.brave&&typeof c.brave.isBrave==q&&(l[t]="Brave"),l},this.getCPU=function(){var l={};return l[A]=w,Z.call(l,v,C.cpu),l},this.getDevice=function(){var l={};return l[o]=w,l[i]=w,l[e]=w,Z.call(l,v,C.device),f&&!l[e]&&U&&U.mobile&&(l[e]=b),f&&l[i]=="Macintosh"&&c&&typeof c.standalone!==M&&c.maxTouchPoints&&c.maxTouchPoints>2&&(l[i]="iPad",l[e]=u),l},this.getEngine=function(){var l={};return l[t]=w,l[n]=w,Z.call(l,v,C.engine),l},this.getOS=function(){var l={};return l[t]=w,l[n]=w,Z.call(l,v,C.os),f&&!l[t]&&U&&U.platform&&U.platform!="Unknown"&&(l[t]=U.platform.replace(/chrome os/i,P).replace(/macos/i,L)),l},this.getResult=function(){return {ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return v},this.setUA=function(l){return v=typeof l===K&&l.length>Y?we(l,Y):l,this},this.setUA(v),this};S.VERSION=be,S.BROWSER=N([t,n,ee]),S.CPU=N([A]),S.DEVICE=N([i,o,e,W,b,k,u,E,ie]),S.ENGINE=S.OS=N([t,n]),typeof J!==M?(typeof le!==M&&le.exports&&(J=le.exports=S),J.UAParser=S):typeof define===q&&define.amd?define(function(){return S}):typeof O!==M&&(O.UAParser=S);var H=typeof O!==M&&(O.jQuery||O.Zepto);if(H&&!H.ua){var se=new S;H.ua=se.getResult(),H.ua.get=function(){return se.getUA()},H.ua.set=function(p){se.setUA(p);var m=se.getResult();for(var c in m)H.ua[c]=m[c];};}})(typeof window=="object"?window:J);});var Ce=b(Ae(),1);var Re=(_=>(_.Standalone="standalone",_.Fullscreen="fullscreen",_.MinimalUI="minimal-ui",_.Browser="browser",_))(Re||{}),Ee;($=>{let O;function w(){return O==null&&(O=new Ce.default(navigator.userAgent)),O}$.getUserAgentInfo=w;function be(){var r;if("orientation"in window)return false;let a="(any-pointer: coarse)",s=(r=window.matchMedia)==null?void 0:r.call(window,a);return navigator.maxTouchPoints===0||(s==null?void 0:s.media)===a&&!(s!=null&&s.matches)}$.isDesktopDevice=be;function V(){return w().getDevice().model==="iPhone"}$.isIPhone=V;function _(){var h,x,y,B;let a=w(),s=(x=(h=a.getOS().name)==null?void 0:h.toLowerCase())!=null?x:"",r=a.getDevice(),d=(B=(y=r.model)==null?void 0:y.toLowerCase())!=null?B:"",g=r.type;return s.includes("ios")&&(g==="tablet"||d.includes("ipad"))}$.isIPad=_;function q(){var g,h,x,y;let a=(h=(g=w().getOS().name)==null?void 0:g.toLowerCase())!=null?h:"",s=w().getDevice(),r=s.type,d=(y=(x=s.model)==null?void 0:x.toLowerCase())!=null?y:"";return a.includes("mac")&&(r==="laptop"||d.includes("macintosh"))}$.isMacBook=q;function M(){return V()||_()||q()}$.isAppleDevice=M;function Q(){let a=w().getOS();return a.name==="iOS"&&a.version!=null&&a.version.localeCompare("16.3",void 0,{numeric:true})>=0}$.isIOSDeviceWithExtendedCameraAccess=Q;function K(){return "document"in window?window.document.createElement("canvas"):null}$.getCanvas=K;function ee(a){return a.name==="iOS"&&a.version!=null&&["11.2.2","11.2.5","11.2.6"].includes(a.version)}async function i(){return c()}$.hasSIMDSupport=i;async function t(){return d()}$.hasThreadsSupport=t;function e$1(a,s,r){let d=a[s[0]];return d==null?false:s.length===1?typeof d===r:(typeof d=="function"||typeof d=="object")&&e$1(d,s.slice(1),r)}function o(){var h;let a=true,s=null,r=null,d=null,g=null;try{if(s=$.getCanvas(),r=$.getCanvas(),d=s==null?void 0:s.getContext("webgl"),g=r==null?void 0:r.getContext("experimental-webgl"),!e$1(window,["WebGLRenderingContext"],"function")||d==null&&g==null)throw new Error("WebGLRenderingContext is not supported")}catch{a=false;}finally{for(let x of [d,g])typeof(x==null?void 0:x.getExtension)=="function"&&((h=x.getExtension("WEBGL_lose_context"))==null||h.loseContext());d=null,g=null,s=null,r=null;}return a}function n(){let a=true,s=true,r=new Set;location.protocol.startsWith("http")||r.add("httpProtocol"),e$1(window,["isSecureContext"],"boolean")&&!window.isSecureContext&&r.add("secureContext"),!e$1(navigator,["mediaDevices","getUserMedia"],"function")&&!e$1(navigator,["enumerateDevices"],"function")&&!e$1(window,["MediaStreamTrack","getSources"],"function")&&(r.add("mediaDevices"),a=false),e$1(window,["Worker"],"function")||(r.add("webWorkers"),a=false,s=false),e$1(window,["WebAssembly"],"object")||(r.add("webAssembly"),a=false,s=false),e$1(window,["Blob"],"function")||(r.add("blob"),a=false,s=false),e$1(window,["URL","createObjectURL"],"function")||(r.add("urlObject"),a=false,s=false),e$1(window,["OffscreenCanvas"],"function")||r.add("offscreenCanvas"),o()||r.add("webGL");let d=w().getOS();return ee(d)&&(r.add("webAssemblyErrorFree"),a=false,s=false),b$1()||r.add("sharedArrayBuffer"),a$1()||r.add("crossOriginIsolated"),F()||r.add("animationApi"),{fullSupport:a,scannerSupport:s,missingFeatures:[...r]}}$.checkBrowserCompatibility=n;async function A(){return e()}$.checkMultithreadingSupport=A;async function W(){let a="scandit-device-id",s=a$2.getInstanceFor("localStorage"),r=s.getItem(a);if(r!=null&&r!=="")return r;let g=await a$3().get(a);if(r=g==null?void 0:g.value,r!=null&&r!=="")return s.setItem(a,r),r;let h=new Uint8Array(20);return crypto.getRandomValues(h),r=[...h].map(x=>{let y=x.toString(16);return y.length===1?`0${y}`:y}).join(""),s.setItem(a,r),r}$.getDeviceId=W;function b(a){return a instanceof HTMLElement||a!=null&&typeof a=="object"&&typeof a.tagName=="string"}$.isValidHTMLElement=b;function u(){var d,g;let a=w().getOS();if(a.name!=="iOS")return true;let[s,r]=(g=(d=a.version)==null?void 0:d.split(".").map(Number))!=null?g:[];return s>14||s===14&&r>=6}$.isSupportedIOSVersion=u;function k(){var a,s;return (s=(a=w().getBrowser().name)==null?void 0:a.toLowerCase().includes("safari"))!=null?s:false}$.isSafari=k;function E(){var s,r;return /iphone|ipod|ipad/.test((r=(s=w().getDevice().model)==null?void 0:s.toLowerCase())!=null?r:"")&&!k()}$.isIosWebView=E;async function ie(){var s;return ((s=w().getOS().name)==null?void 0:s.toLowerCase())!=="android"?false:w().getUA().includes("wv")?true:[...(await fetch(document.location.toString(),{method:"HEAD"})).headers].some(([r])=>r.toLowerCase()==="x-requested-with")}$.isAndroidWebView=ie;function Y(){return w().getOS().name==="Windows"}$.isWindows=Y;function z(){return w().getBrowser().name==="Firefox"}$.isFirefox=z;function I(){if("navigator"in globalThis){for(let a of ["vibrate","webkitVibrate","msVibrate","mozVibrate"])if(typeof navigator[a]=="function")return navigator[a]}}$.getSupportedVibrationMethod=I;function ce(){return I()!=null&&!be()&&!Y()&&!z()}$.isVibrationAvailable=ce;function ue(){return w().getOS().name==="iOS"}$.isIOS=ue;function F(){return typeof globalThis.Animation<"u"&&typeof globalThis.KeyframeEffect<"u"&&typeof globalThis.Element.prototype.animate<"u"}$.isAnimationApiSupported=F;function X(){return "virtualKeyboard"in navigator}$.hasVirtualKeyboardSupport=X;function pe(a){var d;let s=`(display-mode: ${a})`,r=(d=globalThis.matchMedia)==null?void 0:d.call(globalThis,s);return (r==null?void 0:r.matches)===true?true:a==="standalone"&&typeof navigator=="object"&&"standalone"in navigator&&typeof navigator.standalone=="boolean"?navigator.standalone===true:false}$.isPwaDisplayMode=pe;function G(a,s,r){let d=P=>P.split(".").map(L=>Number.parseInt(L,10)||0),g=d(a),h=d(s),x=d(r),y=(P,L)=>{var ne,N;let te=Math.max(P.length,L.length);for(let D=0;D<te;D++){let R=(ne=P[D])!=null?ne:0,re=(N=L[D])!=null?N:0;if(R>re)return 1;if(R<re)return -1}return 0},B=y(g,h)>=0,oe=y(g,x)<0;return B&&oe}function j(){let s="26.3";if(M()){let r=w(),d=r.getOS(),g=r.getBrowser(),h=k()?g.version:d.version;return h?G(h,"26",s):false}return false}$.isFixedMemoryRequired=j;})(Ee||(Ee={}));
|
|
2
|
+
export{Re as a,Ee as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-A225YZFY.js';import {a}from'./chunk-XR65N6EG.js';async function c(l){if(!b.isAnimationApiSupported()||l)try{l?a.debug("Force loading animation polyfill as requested."):a.debug("Web Animation API not fully supported, you might need to add https://www.npmjs.com/package/web-animations-js polyfill to see some animations.");let{polyfill:o}=await import('../private/utils/AnimationSimplePolyfill.js');o();}catch(o){a.warn("Error importing AnimationSimplePolyfill.js, the Animation API will not be polyfilled. This is not a problem for most browsers, but it might be a problem for older browsers like Chrome 75<",o);}}async function d(l){if(typeof globalThis.structuredClone!="function"||l)try{l?a.debug("Force loading structuredClone polyfill as requested."):a.debug("structuredClone API not supported, loading polyfill for older browsers.");let{structuredClonePolyfill:o}=await import('../private/utils/structuredClonePolyfill.js');o();}catch(o){a.warn("Error importing structuredClonePolyfill.js, the structuredClone API will not be polyfilled. This might cause issues in older browsers.",o);}}async function u(l){if(!(typeof globalThis<"u"&&"cookieStore"in globalThis&&globalThis.cookieStore!=null&&!l))try{l?a.debug("Force loading CookieStore polyfill as requested."):a.debug("CookieStore API not supported, loading polyfill for older browsers.");let{installCookieStorePolyfill:o}=await import('../private/utils/cookieStorePolyfill.js');o();}catch(o){a.warn("Error importing cookieStorePolyfill.js, the CookieStore API will not be polyfilled. This might cause issues with cookie management in older browsers.",o);}}async function y(l={}){let{forceAnimationPolyfill:o=false,forceStructuredClonePolyfill:t=false,forceCookieStorePolyfill:n=false,forceAllPolyfills:i=false}=l,s=i||o,a=i||t,f=i||n;await Promise.all([c(s),d(a),u(f)]);}
|
|
2
2
|
export{y as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function n(e){return typeof globalThis<"u"&&globalThis.requestAnimationFrame?globalThis.requestAnimationFrame(e):setTimeout(()=>{e(performance.now());},0)}function a(e){typeof globalThis<"u"&&globalThis.cancelAnimationFrame?globalThis.cancelAnimationFrame(e):clearTimeout(e);}export{n as a,a as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$3}from'./chunk-XIAF6V7E.js';import {b,a as a$2}from'./chunk-KYNYQBNF.js';import {a as a$
|
|
1
|
+
import {a as a$3}from'./chunk-XIAF6V7E.js';import {b,a as a$2}from'./chunk-KYNYQBNF.js';import {a as a$1}from'./chunk-QOCHMKNY.js';import {a as a$4}from'./chunk-KAFNKP6O.js';var z={bottomLeft:"bottomRight",bottomRight:"bottomLeft",topLeft:"topRight",topRight:"topLeft",centerLeft:"centerRight",centerRight:"centerLeft",center:"center",topCenter:"topCenter",bottomCenter:"bottomCenter"},a=class a{constructor(){this.listener=null;this._mounted=false;this._mirrored=false;this._cachedSize=new a$1(0,0);this.resizeObserver=null;this.mapViewAnchorPositionsForFramePoint=t=>t;}get size(){return this._cachedSize}setMirrored(t){this._mounted&&(this._mirrored=t);}mount(t){var n;if(this._mounted)return;if(!document.head.querySelector(`[data-component=${a.componentName}]`)){let i=document.createElement("style");i.dataset.component=a.componentName,i.append(document.createTextNode(b)),document.head.append(i);}let r=document.createElement("div");r.classList.add(a$2.CUSTOM_VIEW_CONTAINER),(n=t.parentNode)==null||n.replaceChild(r,t),this._htmlRoot=r,this.gestureRecognizer=new a$3(this._htmlRoot),this.gestureRecognizer.addListener({onTap:(i,o)=>{var s,e;let m=(s=o.target.dataset.identifier)!=null?s:"";m!==""&&((e=this.listener)==null||e.didTapView(Number.parseInt(m,10)));}}),this.resizeObserver=new ResizeObserver(([i])=>{this._cachedSize=new a$1(i.contentRect.width,i.contentRect.height);}),this.resizeObserver.observe(this._htmlRoot),this._cachedSize=new a$1(this._htmlRoot.clientWidth,this._htmlRoot.clientHeight),this._mounted=true;}unmount(){var t,r,n,i;this._mounted&&(this.removeChildren(),(t=this.gestureRecognizer)==null||t.removeAllListeners(),(r=this.resizeObserver)==null||r.disconnect(),(n=this._htmlRoot)==null||n.remove(),this._htmlRoot=null,this.gestureRecognizer=null,(i=document.head.querySelector(`[data-component=${a.componentName}]`))==null||i.remove(),this.listener=null,this._mounted=false);}render(t){var n,i,o,m,s;if(t.elements.length===0){this.removeChildren();return}for(let e of t.removedIds)(i=(n=this._htmlRoot)==null?void 0:n.querySelector(`#${a.elementSelectorPrefix}${e}`))==null||i.remove();let r=document.createDocumentFragment();for(let e of t.elements){let c=`${a.elementSelectorPrefix}${e.identifier}`,p=(o=this._htmlRoot)==null?void 0:o.querySelector(`#${c}`),l=p;if(p==null&&(l=new Image(e.view.options.size.width,e.view.options.size.height),l.id=c,l.dataset.identifier=String(e.identifier),r.append(l)),l){l.src=e.view.data;let h=this.mapViewAnchorPositionsForFramePoint(e.anchorPositions)[this._mirrored?z[e.anchor]:e.anchor];this._mirrored&&(h=a$4.mirrorX(h,this.size));let{x:u,y:P}=this.adjustCoordinatesWithOffset(h,{elementSize:e.view.options.size,offset:e.offset}),v=(m=e.view.options.scale)!=null?m:1;l.style.scale=`${v}`,l.style.transform=`translate3d(${u/v}px, ${P/v}px, 0px)`;}}(s=this._htmlRoot)==null||s.append(r);}renderDomView(t){var n,i;if(t.elements.length===0){this.removeChildren();return}let r=document.createDocumentFragment();for(let o of t.elements){let m=`${a.elementSelectorPrefix}${o.identifier}`,s=(n=this._htmlRoot)==null?void 0:n.querySelector(`#${m}`),{view:e}=o;if(e!=null){e.id=m,s&&s!==e&&s.replaceWith(e);let c=this.mapViewAnchorPositionsForFramePoint(o.anchorPositions)[this._mirrored?z[o.anchor]:o.anchor];this._mirrored&&(c=a$4.mirrorX(c,this.size));let{width:p,height:l}=e.getBoundingClientRect(),{x:h,y:u}=this.adjustCoordinatesWithOffset(c,{elementSize:{width:p,height:l},offset:o.offset});e.style.position="absolute",e.style.transform=`translate3d(calc(${h}px - 50%), calc(${u}px - 50%), 0px)`,r.append(e);}}(i=this._htmlRoot)==null||i.append(r);}removeChildren(){var t;for(;(t=this._htmlRoot)!=null&&t.firstChild;)this._htmlRoot.firstChild.remove();}adjustCoordinatesWithOffset(t,r){let n=t,{elementSize:i,offset:o}=r,m=t.x-i.width/2,s=t.y-i.height/2;return o.x.unit==="pixel"&&(n=new a$4(m+o.x.value,s+o.y.value)),o.x.unit==="fraction"&&(n=new a$4(m+i.width*o.x.value,s+i.height*o.y.value)),n}};a.componentName="CustomLocationsView",a.elementSelectorPrefix="scandit-view-";var S=a;export{S as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-XR65N6EG.js';import {a as a$2}from'./chunk-QCZSSQAQ.js';var r=Promise.resolve(),u=false,a=false,t=false,o,l=1500,d="";async function S(e){if(o==null)return;u=true;let n;try{let i=new Promise((f,s)=>{n=setTimeout(()=>{a$1.debug(`IndexedDB database is blocked (timed out after ${l}ms). If you are running a Debug wasm build, things are slower and the timeout can be configured via IndexedDBBlockedTimeoutMs in localStorage (requires page reload).`),s(new a$2({name:"BlockedIndexedDB",message:"IndexedDB database is blocked"}));},l);}),w=new Promise((f,s)=>{o==null||o(e,c=>{c!=null?s(c):f();});});await Promise.race([w,i]);}finally{n!==void 0&&clearTimeout(n),u=false;}}async function b(e){return a?(t=e,r):(u?(a=true,t=e,r=r.then(async()=>(a=false,S(t)))):(t=e,r=S(e)),r)}function P(){FS.syncfs=((e,n)=>{b(e).then(()=>n(),i=>n(i));});}async function v(e){if(d=e.writableDataPath,l=e.indexedDBTimeoutMs,o=FS.syncfs,o==null)throw new Error("FS.syncfs is not available");P();try{FS.mkdir(d);}catch(n){if(n.code!=="EEXIST")throw o=void 0,n}try{FS.mount(IDBFS,{},d);}catch(n){throw o=void 0,n}return b(true)}export{v as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {e}from'./chunk-
|
|
1
|
+
import {e}from'./chunk-SYGWA3T6.js';import {a as a$1}from'./chunk-XR65N6EG.js';import {a}from'./chunk-QCZSSQAQ.js';var m=class i{constructor(){this.type="imageFrameSource";this._listeners=new Set;this._currentState="off";this._desiredState="off";this._context=null;this._imageData=null;}get desiredState(){return this._desiredState}get context(){return this._context}set context(e){this._context=e;}get currentState(){return this._currentState}static async fromFile(e){let r=URL.createObjectURL(e),t=new Image;t.src=r;try{await t.decode();}catch{throw new a({name:"InvalidImageError",message:"Submitted file is not an image"})}finally{URL.revokeObjectURL(r);}return i.fromImage(t)}static async fromImage(e){let r=new i;try{await e.decode();}catch{throw new a({name:"InvalidImageError",message:"Submitted image cannot be decoded"})}let t=r.getCanvasAndContext(e.width,e.height);return t.drawImage(e,0,0),r._imageData=t.getImageData(0,0,e.width,e.height,{colorSpace:"srgb"}),r}static async fromImageData(e){let r=new i,t=r.getCanvasAndContext(e.width,e.height);try{t.putImageData(e,0,0);}catch(n){throw new a({name:"InvalidImageError",message:`Submitted image data does not seem valid (details: ${n})`})}return r._imageData=e,r}async switchToDesiredState(e){if(e==="on"){if(this.currentState==="on")return}else if(this.currentState==="off")return;if(this._desiredState=e,e==="off"){await this.setCurrentState("off");return}return this._imageData==null?(a$1.log(a$1.Level.Warn,"No image data to process."),this.processSubmittedImage({data:new Uint8ClampedArray(0),width:0,height:0,colorSpace:"srgb"})):this.processSubmittedImage(this._imageData)}addListener(e){e!=null&&this._listeners.add(e);}removeListener(e){e!=null&&this._listeners.delete(e);}toJSONObject(){return {type:this.type}}getCurrentState(){return this._currentState}getCanvasAndContext(e,r){let t=document.createElement("canvas");t.width=e,t.height=r;let n=t.getContext("2d");if(n==null)throw new a({name:"ImageFrameSourceError",message:"Could not generate a canvas context to get image data"});return n}async setCurrentState(e){if(e!==this._currentState)return this._currentState=e,this.notifyListeners(),this.notifyContext({type:"frameSourceState",newValue:e})}async notifyContext(e){if(this._context)return this._context.update([e])}notifyListeners(){for(let e of this._listeners)e.didChangeState&&e.didChangeState(this,this.currentState);}async processSubmittedImage(e$1){var t;await this.setCurrentState("on");let r={data:e$1.data,width:e$1.width,height:e$1.height,frameId:e()};await((t=this._context)==null?void 0:t.sendFrameToProcessor(r)),await this.setCurrentState("off");}};export{m as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-4J3Y5IIL.js';import {d}from'./chunk-NT5WI2PS.js';import {b}from'./chunk-A225YZFY.js';import {f,g}from'./chunk-3D2HNEVH.js';var c=class{constructor(){this.type="camera-fov";this.customIcons={wide:{idle:"",pressed:""},ultraWide:{idle:"",pressed:""}};this.fovSwitchButton=void 0;this.CameraFOVSwitchButtonClass=void 0;this.currentFrameSource=null;this.view=void 0;this.onCameraFOVChanged=this.handleCameraFOVChanged.bind(this);this.isTransitioning=false;}get cameraFOVWideImage(){return this.customIcons.wide.idle}set cameraFOVWideImage(e){this.customIcons.wide.idle=e,this.applyCustomImagesToButton();}get cameraFOVWidePressedImage(){return this.customIcons.wide.pressed}set cameraFOVWidePressedImage(e){this.customIcons.wide.pressed=e,this.applyCustomImagesToButton();}get cameraFOVUltraWideImage(){return this.customIcons.ultraWide.idle}set cameraFOVUltraWideImage(e){this.customIcons.ultraWide.idle=e,this.applyCustomImagesToButton();}get cameraFOVUltraWidePressedImage(){return this.customIcons.ultraWide.pressed}set cameraFOVUltraWidePressedImage(e){this.customIcons.ultraWide.pressed=e,this.applyCustomImagesToButton();}toJSONObject(){return {type:this.type}}async install(e){var a,r,n;this.CameraFOVSwitchButtonClass||(this.CameraFOVSwitchButtonClass=await import('../private/ui/molecules/CameraFOVSwitchButton.js').then(d=>d.CameraFOVSwitchButton),(a=this.CameraFOVSwitchButtonClass)==null||a.register()),this.view=e,this.currentFrameSource=(n=(r=e.getContext())==null?void 0:r.frameSource)!=null?n:null,this.fovSwitchButton=this.CameraFOVSwitchButtonClass.create(),this.fovSwitchButton.slot="bottomRight",this.fovSwitchButton.hidden=true,this.updateButtonMode(),this.fovSwitchButton.addEventListener("camera-fov-changed",this.onCameraFOVChanged);let t=e.controlsElement;return t&&t.append(this.fovSwitchButton),this.applyCustomImagesToButton(),await this.canShow()&&(await this.setInitialWideCamera(),this.updateButtonVisibility(true)),true}remove(e){e&&this.fovSwitchButton&&(this.fovSwitchButton.removeEventListener("camera-fov-changed",this.onCameraFOVChanged),this.fovSwitchButton.remove(),this.fovSwitchButton=null,this.currentFrameSource=null,this.view=void 0);}async update(e){var i,a;this.currentFrameSource=(a=(i=e.getContext())==null?void 0:i.frameSource)!=null?a:null,this.view=e,this.updateButtonMode();let t=await this.canShow();this.updateButtonVisibility(t);}updateButtonMode(){if(!this.fovSwitchButton)return;let t=this.isUltraWideBackCamera()?"0.5x":"1.0x";this.fovSwitchButton.mode=t;}applyCustomImagesToButton(){if(!this.fovSwitchButton)return;this.customIcons.wide.idle||this.customIcons.wide.pressed||this.customIcons.ultraWide.idle||this.customIcons.ultraWide.pressed?this.fovSwitchButton.setCustomImages(this.customIcons):this.fovSwitchButton.useCustomImages=false;}updateButtonVisibility(e){this.fovSwitchButton&&(this.fovSwitchButton.hidden=!e);}async canShow(){if(!b.isIOSDeviceWithExtendedCameraAccess())return false;let e=this.currentFrameSource;return e===null||!f(e)?false:d.isIOSBackDualWideCameraLabel(e.label)||d.isIOSBackCameraLabel(e.label)||d.isIOSUltraWideBackCameraLabel(e.label)}isUltraWideBackCamera(){let e=this.currentFrameSource;return f(e)?d.isIOSUltraWideBackCameraLabel(e.label):false}async handleCameraFOVChanged(e){await this.handleCameraFOVSwitch(),this.updateButtonMode();}async setInitialWideCamera(){var e,t;if(!this.isTransitioning&&!d.isIOSBackCameraLabel((t=(e=this.currentFrameSource)==null?void 0:e.label)!=null?t:"")){let a$1=(await a.getAll()).find(r=>d.isIOSBackCameraLabel(r.label));a$1&&await this.switchCameras(a$1);}}async handleCameraFOVSwitch(){if(this.isTransitioning)return false;let e=await this.getAlternativeCamera();return e?(await this.switchCameras(e),true):false}async getAlternativeCamera(){return (await a.getAll()).find(t=>this.isUltraWideBackCamera()?d.isIOSBackCameraLabel(t.label):d.isIOSUltraWideBackCameraLabel(t.label))}async switchCameras(e){var n;this.isTransitioning=true;let t=(n=this.view)==null?void 0:n.getContext(),i=t==null?void 0:t.frameSource,a,r;i!=null&&(a=new g(i.settings),r=i.desiredState),await(i==null?void 0:i.switchToDesiredState("off")),a!=null&&await e.applySettings(a),await(t==null?void 0:t.setFrameSource(e)),await(t==null?void 0:t.frameSource).switchToDesiredState(r!=null?r:"on"),this.isTransitioning=false;}};export{c as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$3}from'./chunk-6EEMWSEO.js';import {a as a$2}from'./chunk-3MKSI2DV.js';import {e as e$1}from'./chunk-TTGJAMI2.js';import {a as a$7,b}from'./chunk-EQ6V4W5K.js';import {a as a$4}from'./chunk-UWBNF47P.js';import {a as a$6}from'./chunk-3A4KLILV.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$5}from'./chunk-LSZZVJ6B.js';var w=(t=>(t.DidShow="didshow",t.DidHide="didhide",t))(w||{}),s="--text-size",r="--text-color",i="--text-alignment",a="--text-weight",l="--line-height",c="--background-color",h="--corner-radius",o="--max-lines",A="ease-in-out",e=class e extends a$1{constructor(){super();this.toast=null;this._hintStyle=null;this._customIcon=null;this.currentAnimation=null;this.animationDuration=250;this._currentAnimationDirection=null;let t=this.attachShadow({mode:"open"});this._exclamationIcon=a$2.create(),this._checkIcon=a$3.create(),this._exclamationIcon.size=24,this._checkIcon.size=24,t.innerHTML=a$4`<div class="toast"><slot name="first-child"></slot><div class="left"><slot name="icon"></slot></div><p class="middle"><slot></slot></p></div>`,t.append(e.createStyleElement().cloneNode(true)),this.toast=t.querySelector(".toast");}static createStyleElement(){return a$5`:host{display:inline-block;font-family:SF Pro Display,sans-serif}:host([hidden]){display:none}.toast{${s}:1rem;${r}:#000;${a}:400;${i}:${"center"};${l}:1.5rem;${c}:#fff;${h}:.25rem;${o}:2;align-items:flex-start;background-color:var(${c});border-radius:var(${h});color:var(${r});display:flex;flex-direction:row;font-size:var(${s});font-weight:var(${a});gap:.625rem;justify-content:var(${i});line-height:var(${l});padding:.75rem 1rem}:host([direction=column]) .toast{align-items:center;flex-direction:column}:host([direction=row]) .toast{align-items:center;flex-direction:row}.toast .left{align-self:flex-start;display:flex}.toast.icon-${"none"} .left{display:none}.toast p.middle{display:inline-block;display:-webkit-box;line-clamp:var(${o});-webkit-line-clamp:var(${o});margin:0;padding:0;text-align:var(${i});-webkit-box-orient:vertical;align-self:center;overflow:hidden;text-shadow:0 1px 2px #${e$1.withAlpha(.3).toJSON()}}p.middle{text-align:var(${i})}`}get hintStyle(){return this._hintStyle}set hintStyle(t){this._hintStyle=t,this.render();}get customIcon(){return this._customIcon}set customIcon(t){this._customIcon=t,this.render();}get showAnimation(){return new Animation(new KeyframeEffect(this,[{opacity:0},{opacity:1}],{duration:this.animationDuration,fill:"both",easing:A}))}get hideAnimation(){return new Animation(new KeyframeEffect(this,[{opacity:1},{opacity:0}],{duration:this.animationDuration,fill:"both",easing:A}))}static create(){return e.register(),document.createElement(e.tag)}static register(){a$6({[e.tag]:e});}async show(){return this.toggle(true)}async hide(){return this.toggle(false)}connectedCallback(){this.render();}async toggle(t){var m,d;let n=t?"showing":"hiding";this.currentAnimation&&this._currentAnimationDirection===n&&this.currentAnimation.playState==="running"||(this.currentAnimation&&a$7(this.currentAnimation),this.animationDuration=(d=(m=this.hintStyle)==null?void 0:m.isAnimatedToView)==null||d?250:0,this._currentAnimationDirection=n,this.currentAnimation=t?this.showAnimation:this.hideAnimation,this.currentAnimation.play(),await b(this.currentAnimation),this.dispatchEvent(new CustomEvent(t?"didshow":"didhide",{bubbles:true,detail:{target:this}})),this.currentAnimation=null,this._currentAnimationDirection=null);}render(){var t;if(!(!this.toast||!this.hintStyle)){this.toast.className="toast",this.toast.style.setProperty(s,`${this.hintStyle.textSize}px`),this.toast.style.setProperty(r,`#${this.hintStyle.textColor}`),this.toast.style.setProperty(a,this.hintStyle.textWeight.toString()),this.toast.style.setProperty(i,this.hintStyle.textAlignment),this.toast.style.setProperty(l,`${this.hintStyle.lineHeight/14}`),this.toast.style.setProperty(c,`#${this.hintStyle.backgroundColor}`),this.toast.style.setProperty(h,`${this.hintStyle.cornerRadius/10}rem`),this.toast.style.setProperty(o,this.hintStyle.maxLines.toString());for(let n of this.querySelectorAll("[slot=icon]"))n.remove();this._customIcon?(this._customIcon.setAttribute("slot","icon"),this.append(this._customIcon),this.toast.classList.remove("icon-none")):(this.toast.classList.toggle("icon-none",this.hintStyle.hintIcon==="none"),this.hintStyle.hintIcon==="check"?(this._checkIcon.setAttribute("slot","icon"),this.append(this._checkIcon)):this.hintStyle.hintIcon==="exclamationMark"&&(this._exclamationIcon.setAttribute("slot","icon"),this.append(this._exclamationIcon)),this.hintStyle.iconColor&&((t=this.querySelector("[slot=icon]"))==null||t.setAttribute("fill",`#${this.hintStyle.iconColor}`)));}}};e.tag="scandit-toast-hint";var I=e;export{w as a,I as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o=(a=>(a.Body="body",a.Footnote="footnote",a))(o||{}),s=(t=>(t.Start="start",t.Center="center",t.End="end",t))(s||{}),i=(t=>(t.Normal="normal",t.Wider="wider",t.FitText="fitText",t))(i||{}),p=(a=>(a.Normal="normal",a.Taller="taller",a))(p||{}),d=(a=>(a.Square="square",a.Rounded="rounded",a))(d||{}),c=(t=>(t.None="none",t.Check="check",t.ExclamationMark="exclamationMark",t))(c||{}),m=(n=>(n.Top="top",n.Center="center",n.AboveViewFinder="aboveViewFinder",n.BelowViewFinder="belowViewFinder",n))(m||{}),l=(a=>(a.AboveViewFinder="aboveViewFinder",a.BelowViewFinder="belowViewFinder",a))(l||{}),u=(t=>(t.BlackOnWhite="blackOnWhite",t.WhiteOnBlack="whiteOnBlack",t.Transparent="transparent",t))(u||{}),C=(r=>(r.Success="success",r.Error="error",r.Warning="warning",r.Info="info",r.Notification="notification",r))(C||{}),g=(e=>(e[e.Ocr=0]="Ocr",e[e.HideLogo=1]="HideLogo",e[e.ShowTestLicenseMessage=2]="ShowTestLicenseMessage",e[e.AugmentedReality=5]="AugmentedReality",e[e.ActivityPingStatsAddon=8]="ActivityPingStatsAddon",e[e.ActivityPing=9]="ActivityPing",e[e.Registration=10]="Registration",e[e.Parser=11]="Parser",e[e.BarcodeCapture=14]="BarcodeCapture",e[e.Analytics=17]="Analytics",e[e.AnalyticsBatchMode=18]="AnalyticsBatchMode",e[e.AnalyticsScanContent=19]="AnalyticsScanContent",e[e.AnalyticsOnlineVerification=20]="AnalyticsOnlineVerification",e[e.SparkScan=21]="SparkScan",e[e.AamvaIdBarcodeVerification=22]="AamvaIdBarcodeVerification",e[e.MappingForTracking=23]="MappingForTracking",e[e.BarcodeFind=24]="BarcodeFind",e[e.MandatoryRegistration=25]="MandatoryRegistration",e[e.FeatureTracking=26]="FeatureTracking",e[e.IdCaptureViz=27]="IdCaptureViz",e[e.IdCaptureMrz=28]="IdCaptureMrz",e[e.IdCaptureBarcode=29]="IdCaptureBarcode",e[e.BarcodeSelectionAimToScan=30]="BarcodeSelectionAimToScan",e[e.BarcodeSelectionTapToScan=31]="BarcodeSelectionTapToScan",e[e.BarcodeCount=32]="BarcodeCount",e[e.BarcodePick=33]="BarcodePick",e[e.IdVerificationDataComparison=34]="IdVerificationDataComparison",e[e.SmartLabelBarcode=35]="SmartLabelBarcode",e[e.SmartLabelText=36]="SmartLabelText",e[e.VoidedIdDetection=37]="VoidedIdDetection",e[e.BarcodeArFull=38]="BarcodeArFull",e[e.BarcodeSequence=39]="BarcodeSequence",e))(g||{});export{o as a,s as b,i as c,p as d,d as e,c as f,m as g,l as h,u as i,C as j,g as k};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-GPJEB376.js';import {b}from'./chunk-A225YZFY.js';import {a as a$1}from'./chunk-XR65N6EG.js';import {a as a$2}from'./chunk-QCZSSQAQ.js';var ee=(C=>(C.WorldFacing="worldFacing",C.UserFacing="userFacing",C))(ee||{}),ae=(c=>(c[c.ULTRA_HD=0]="ULTRA_HD",c[c.FULL_HD=1]="FULL_HD",c[c.HD=2]="HD",c[c.SD=3]="SD",c[c.NONE=4]="NONE",c))(ae||{}),re=(v=>(v.AUTO="auto",v.FOUR_TO_THREE="fourToThree",v.SIXTEEN_TO_NINE="sixteenToNine",v))(re||{}),U;(l=>{let T=new Map([["DeviceCaptureError","AbortError"],["NotSupportedError","AbortError"],["ScreenCaptureError","AbortError"],["TabCaptureError","AbortError"],["TypeError","AbortError"],["InvalidStateError","NotAllowedError"],["MediaDeviceFailedDueToShutdown","NotAllowedError"],["MediaDeviceKillSwitchOn","NotAllowedError"],["PermissionDeniedError","NotAllowedError"],["PermissionDismissedError","NotAllowedError"],["DevicesNotFoundError","NotFoundError"],["SourceUnavailableError","NotReadableError"],["TrackStartError","NotReadableError"],["ConstraintNotSatisfiedError","OverconstrainedError"]]),O=["rear","back","r\xFCck","arri\xE8re","trasera","tr\xE1s","traseira","posteriore","\u540E\u9762","\u5F8C\u9762","\u80CC\u9762","\u540E\u7F6E","\u5F8C\u7F6E","\u80CC\u7F6E","\u0437\u0430\u0434\u043D\u0435\u0439","\u0627\u0644\u062E\u0644\u0641\u064A\u0629","\uD6C4","arka","achterzijde","\u0E2B\u0E25\u0E31\u0E07","baksidan","bagside","sau","bak","tylny","takakamera","belakang","\u05D0\u05D7\u05D5\u05E8\u05D9\u05EA","\u03C0\u03AF\u03C3\u03C9","spate","h\xE1ts\xF3","zadn\xED","darrere","posterior","zadn\xE1","\u0437\u0430\u0434\u043D\u044F","stra\u017Enja","belakang","\u092C\u0948\u0915"],C=new Set(["Desk View Camera","Schreibtischansicht-Kamera","Cam\xE9ra Desk\xA0View","C\xE1mara de Vista Cenital","C\xE2mara da Vista de Secret\xE1ria","Fotocamera di Panoramica Scrivania","\u684C\u4E0A\u89C6\u89D2\u76F8\u673A","\u30C7\u30B9\u30AF\u30D3\u30E5\u30FC\u30AB\u30E1\u30E9","\u041A\u0430\u043C\u0435\u0440\u0430 \u041E\u0431\u0437\u043E\u0440\u0430 \u0441\u0442\u043E\u043B\u0430","Masa G\xF6r\xFCnt\xFCs\xFC Kameras\u0131","Bureauweergave-camera","\u0643\u0627\u0645\u064A\u0631\u0627 \u0627\u0644\u0639\u0631\u0636 \u0627\u0644\u0631\u0623\u0633\u064A","\u0E01\u0E25\u0E49\u0E2D\u0E07\u0E14\u0E39\u0E14\u0E49\u0E32\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E42\u0E15\u0E4A\u0E30","Bordsvisningskamera","Kamera til Visning af skrivebord","Camera Desk View","Bordvisning-kamera","Kamera w\xA0aplikacji Widok blatu","Ty\xF6p\xF6yt\xE4n\xE4kym\xE4n kamera","Kamera Tampilan Meja","\u05DE\u05E6\u05DC\u05DE\u05EA \u05F4\u05EA\u05E6\u05D5\u05D2\u05EA \u05E9\u05D5\u05DC\u05D7\u05DF\u05F4","\u039A\u03AC\u03BC\u03B5\u03C1\u03B1 \u03C4\u03B7\u03C2 \u03A0\u03C1\u03BF\u03B2\u03BF\u03BB\u03AE\u03C2 \u03B3\u03C1\u03B1\u03C6\u03B5\u03AF\u03BF\u03C5","Camer\u0103 Vizualizare birou","\xCDr\xF3asztal n\xE9zet kamer\xE1ja","Stoln\xED kamera","C\xE0mera de l\u2019app Vista de l\u2019Escriptori"]),v=new Set(["MacBook Pro Desk View Camera"]),x=new Set(["Front Camera","Frontkamera","Appareil photo avant","C\xE1mara frontal","C\xE2mera Frontal","C\xE2mara frontal","Fotocamera (anteriore)","\u524D\u7F6E\u76F8\u673A","\u524D\u7F6E\u76F8\u6A5F","\u524D\u9762\u30AB\u30E1\u30E9","\u041A\u0430\u043C\u0435\u0440\u0430 \u043D\u0430 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0439 \u043F\u0430\u043D\u0435\u043B\u0438","\xD6n Kamera","Camera aan voorzijde","\u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0627\u0644\u0623\u0645\u0627\u0645\u064A\u0629","\u0E01\u0E25\u0E49\u0E2D\u0E07\u0E14\u0E49\u0E32\u0E19\u0E2B\u0E19\u0E49\u0E32","Kamera p\xE5 framsidan","Forsidekamera","Camera m\u1EB7t tr\u01B0\u1EDBc","Kamera foran","Przedni aparat","Etukamera","Kamera Depan","\u05DE\u05E6\u05DC\u05DE\u05D4 \u05E7\u05D3\u05DE\u05D9\u05EA","\u039C\u03C0\u03C1\u03BF\u03C3\u03C4\u03B9\u03BD\u03AE \u03BA\u03AC\u03BC\u03B5\u03C1\u03B1","Camer\u0103 fa\u021B\u0103","El\xFCls\u0151 kamera","P\u0159edn\xED fotoapar\xE1t","C\xE0mera frontal","Predn\xE1 kamera","\u041F\u0435\u0440\u0435\u0434\u043D\u044F \u043A\u0430\u043C\u0435\u0440\u0430","Prednja kamera","Kamera Depan","\u092B\u093C\u094D\u0930\u0902\u091F \u0915\u0948\u092E\u0930\u093E"]),c=new Set(["Back Camera","R\xFCckkamera","Cam\xE9ra arri\xE8re","C\xE1mara trasera","C\xE2mera Traseira","C\xE2mara traseira","Fotocamera (posteriore)","\u540E\u7F6E\u76F8\u673A","\u5F8C\u7F6E\u76F8\u6A5F","\u80CC\u9762\u30AB\u30E1\u30E9","\u041A\u0430\u043C\u0435\u0440\u0430 \u043D\u0430 \u0437\u0430\u0434\u043D\u0435\u0439 \u043F\u0430\u043D\u0435\u043B\u0438","Arka Kamera","Camera aan achterzijde","\u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0627\u0644\u062E\u0644\u0641\u064A\u0629","\u0E01\u0E25\u0E49\u0E2D\u0E07\u0E14\u0E49\u0E32\u0E19\u0E2B\u0E25\u0E31\u0E07","Kamera p\xE5 baksidan","Bagsidekamera","Camera m\u1EB7t sau","Kamera bak","Tylny aparat","Takakamera","Kamera Belakang","\u05DE\u05E6\u05DC\u05DE\u05D4 \u05D0\u05D7\u05D5\u05E8\u05D9\u05EA","\u03A0\u03AF\u03C3\u03C9 \u03BA\u03AC\u03BC\u03B5\u03C1\u03B1","Camer\u0103 spate","H\xE1ts\xF3 kamera","Zadn\xED fotoapar\xE1t","C\xE0mera posterior","Zadn\xE1 kamera","\u0417\u0430\u0434\u043D\u044F \u043A\u0430\u043C\u0435\u0440\u0430","Stra\u017Enja kamera","Kamera Belakang","\u092C\u0948\u0915 \u0915\u0948\u092E\u0930\u093E"]),N=new Set(["Back Dual Wide Camera","R\xFCckseitige Dual-Weitwinkelkamera","Double appareil photo grand angle arri\xE8re","C\xE1mara trasera dual con gran angular","C\xE2mera Dupla Grande-Angular Traseira","C\xE2mara grande angular dupla traseira","Fotocamera doppia con grandangolo (posteriore)","\u540E\u7F6E\u53CC\u5E7F\u89D2\u955C\u5934","\u5F8C\u7F6E\u96D9\u5EE3\u89D2\u76F8\u6A5F","\u80CC\u9762\u30C7\u30E5\u30A2\u30EB\u5E83\u89D2\u30AB\u30E1\u30E9","\u0417\u0430\u0434\u043D\u044F\u044F \u0434\u0432\u043E\u0439\u043D\u0430\u044F \u0448\u0438\u0440\u043E\u043A\u043E\u0443\u0433\u043E\u043B\u044C\u043D\u0430\u044F \u043A\u0430\u043C\u0435\u0440\u0430","\xC7ift Geni\u015F Kamera Arka Y\xFCz\xFC","\u0643\u0627\u0645\u064A\u0631\u0627 \u062E\u0644\u0641\u064A\u0629 \u0645\u0632\u062F\u0648\u062C\u0629 \u0639\u0631\u064A\u0636\u0629","\u0E01\u0E25\u0E49\u0E2D\u0E07\u0E04\u0E39\u0E48\u0E14\u0E49\u0E32\u0E19\u0E2B\u0E25\u0E31\u0E07\u0E21\u0E38\u0E21\u0E01\u0E27\u0E49\u0E32\u0E07","Dubbel vidvinkelkamera p\xE5 baksidan","Camera k\xE9p r\u1ED9ng m\u1EB7t sau","Dobbelt vidvinkelkamera bak","Tylny dwuobiektywowy aparat szerokok\u0105tny","Laajakulmainen kaksoistakakamera","Kamera Lebar Belakang Ganda","\u05DE\u05E6\u05DC\u05DE\u05D4 \u05DB\u05E4\u05D5\u05DC\u05D4 \u05E8\u05D7\u05D1\u05D4 \u05D0\u05D7\u05D5\u05E8\u05D9\u05EA","\u03A0\u03AF\u03C3\u03C9 \u03B4\u03B9\u03C0\u03BB\u03AE \u03B5\u03C5\u03C1\u03B5\u03AF\u03B1 \u03BA\u03AC\u03BC\u03B5\u03C1\u03B1","Camer\u0103 dubl\u0103 cu obiectiv superangular spate","H\xE1ts\xF3, kett\u0151s, sz\xE9les l\xE1t\xF3sz\xF6g\u0171 kamera","Zadn\xED du\xE1ln\xED \u0161iroko\xFAhl\xFD fotoapar\xE1t","C\xE0mera dual posterior amb gran angular","Zadn\xE1 du\xE1lna \u0161irokouhl\xE1 kamera","\u0417\u0430\u0434\u043D\u044F \u0437\u0434\u0432\u043E\u0454\u043D\u0430 \u0448\u0438\u0440\u043E\u043A\u043E\u043A\u0443\u0442\u043D\u0430 \u043A\u0430\u043C\u0435\u0440\u0430","Stra\u017Enja dvostruka \u0161iroka kamera","Dwikamera Lebar Belakang","\u092C\u0948\u0915 \u0921\u094D\u092F\u0941\u0905\u0932 \u0935\u093E\u0907\u0921 \u0915\u0948\u092E\u0930\u093E"]),B=new Set(["Back Ultra Wide Camera","R\xFCckseitige Ultra-Weitwinkelkamera","Appareil photo ultra grand angle arri\xE8re","C\xE1mara trasera con ultra gran angular","C\xE2mera Ultra-Angular Traseira","C\xE2mara ultra grande angular traseira","Fotocamera con ultra-grandangolo (posteriore)","\u540E\u7F6E\u8D85\u5E7F\u89D2\u76F8\u673A","\u5F8C\u7F6E\u8D85\u5EE3\u89D2\u76F8\u6A5F","\u80CC\u9762\u8D85\u5E83\u89D2\u30AB\u30E1\u30E9","\u0417\u0430\u0434\u043D\u044F\u044F \u0441\u0432\u0435\u0440\u0445\u0448\u0438\u0440\u043E\u043A\u043E\u0443\u0433\u043E\u043B\u044C\u043D\u0430\u044F \u043A\u0430\u043C\u0435\u0440\u0430","Ultra Geni\u015F Kamera Arka Y\xFCz\xFC","Ultrabrede camera aan achterzijde","\u0643\u0627\u0645\u064A\u0631\u0627 \u062E\u0644\u0641\u064A\u0629 \u0639\u0631\u064A\u0636\u0629 \u062C\u062F\u064B\u0627","\u0E01\u0E25\u0E49\u0E2D\u0E07\u0E14\u0E49\u0E32\u0E19\u0E2B\u0E25\u0E31\u0E07\u0E21\u0E38\u0E21\u0E01\u0E27\u0E49\u0E32\u0E07\u0E2D\u0E31\u0E25\u0E15\u0E23\u0E49\u0E32","Ultravidvinkelkamera p\xE5 baksidan","Ultravidvinkelkameraet p\xE5 bagsiden","Camera c\u1EF1c r\u1ED9ng m\u1EB7t sau","Ultravidvinkelkamera bak","Tylny aparat ultraszerokok\u0105tny","Ultralaajakulmainen takakamera","Kamera Ultra Lebar Belakang","\u05DE\u05E6\u05DC\u05DE\u05D4 \u05D0\u05D5\u05DC\u05D8\u05E8\u05D4 \u05E8\u05D7\u05D1\u05D4 \u05D0\u05D7\u05D5\u05E8\u05D9\u05EA","\u03A0\u03AF\u03C3\u03C9 \u03C5\u03C0\u03B5\u03C1\u03B5\u03C5\u03C1\u03B5\u03AF\u03B1 \u03BA\u03AC\u03BC\u03B5\u03C1\u03B1","Camer\u0103 cu obiectiv ultra\u2011superangular spate","H\xE1ts\xF3, ultrasz\xE9les l\xE1t\xF3sz\xF6g\u0171 kamera","Zadn\xED ultra \u0161iroko\xFAhl\xFD fotoapar\xE1t","C\xE0mera posterior amb ultra gran angular","Zadn\xE1 ultra\u0161irokouhl\xE1 kamera","\u0417\u0430\u0434\u043D\u044F \u043D\u0430\u0434\u0448\u0438\u0440\u043E\u043A\u043E\u043A\u0443\u0442\u043D\u0430 \u043A\u0430\u043C\u0435\u0440\u0430","Stra\u017Enja ultra \u0161iroka kamera","Kamera Ultralebar Belakang","\u092C\u0948\u0915 \u0905\u0932\u094D\u091F\u094D\u0930\u093E \u0935\u093E\u0907\u0921 \u0915\u0948\u092E\u0930\u093E"]),m,D=false;l.mainCameraForPositionOverridesOnDesktop=new Map,l.deviceIdToCameraObjects=new Map,l.inaccessibleDeviceIds=new Set;let w=new Set;function ie(e){w.add(e);}l.addVideoDevicesListener=ie;function te(e,r){l.mainCameraForPositionOverridesOnDesktop.set(e,r);}l.setMainCameraForPositionOverridesOnDesktop=te;function ne(){l.mainCameraForPositionOverridesOnDesktop.clear();}l.clearMainCameraForPositionOverridesOnDesktop=ne;function M(){return navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices)}function W(){if(typeof navigator.enumerateDevices=="function")return navigator.enumerateDevices.bind(navigator);if(typeof navigator.mediaDevices=="object"&&typeof navigator.mediaDevices.enumerateDevices=="function")return navigator.mediaDevices.enumerateDevices.bind(navigator.mediaDevices)}function E(){D=true;}function K(e){let r=e.toLowerCase();return O.some(a=>r.includes(a))}function h(e){return x.has(e)}l.isIOSFrontCameraLabel=h;function F(e){return c.has(e)}l.isIOSBackCameraLabel=F;function I(e){return N.has(e)}l.isIOSBackDualWideCameraLabel=I;function R(e){return B.has(e)}l.isIOSUltraWideBackCameraLabel=R;function L(e){var a;let r=e.message==="Invalid constraint"?"OverconstrainedError":(a=T.get(e.name))!=null?a:e.name;Object.defineProperty(e,"name",{value:r});}function V(e){if(e.length===0)return {areSomeCameraLabelsFilled:false,areAllCameraLabelsFilled:false,areAllCameraLabelsUnfilled:false};let r=0;for(let i of e)i.label!==""&&r++;let a=r===e.length,t=r===0;return {areSomeCameraLabelsFilled:r>0&&r<e.length,areAllCameraLabelsFilled:a,areAllCameraLabelsUnfilled:t}}function j(e,r){var a;return (a=l.mainCameraForPositionOverridesOnDesktop.get(r))!=null?a:e.find(t=>t.position===r)}function z(e,r){let a=r==="worldFacing"?F:h;for(let t of e)if(a(t.label))return t}function _(e,r){if(r==="worldFacing"){let a;for(let t of e){if(I(t.label))return t;!a&&F(t.label)&&(a=t);}return a}else for(let a of e)if(h(a.label))return a}function H(e,r){let{areSomeCameraLabelsFilled:a,areAllCameraLabelsUnfilled:t}=V(e),n=b.getUserAgentInfo().getOS().name==="iOS";if(t)return e[r==="userFacing"?0:e.length-1];let i=e.filter(o=>o.position===r);if(i.length===1)return i[0];if(a){if(n){let o=z(i,r);if(o!=null)return o}return i[r==="userFacing"?0:i.length-1]}if(n){let o=_(e,r);if(o)return o}return i.sort((o,s)=>o.label.localeCompare(s.label))[0]}function oe(e,r){return b.isDesktopDevice()?j(e,r):H(e,r)}l.getMainCameraForPosition=oe;function k(e,r){return e.unshift(e.splice(r,1)[0])}function se(e,r){function a(i,o){let s=l.mainCameraForPositionOverridesOnDesktop.get(o);return s!=null&&i.includes(s)&&(i=i.filter(g=>g!==s),i.unshift(s)),i}let t=e.filter(i=>i.position==="userFacing"),n=e.filter(i=>i.position==="worldFacing");return b.isDesktopDevice()?(t=a(t,"userFacing"),n=a(n,"worldFacing")):e.every(i=>i.label==="")?n.reverse():(t.sort((i,o)=>i.label.localeCompare(o.label)),n.sort((i,o)=>i.label.localeCompare(o.label)),b.getUserAgentInfo().getOS().name==="iOS"&&(t.some((i,o)=>h(i.label)&&k(t,o)>=0),n.some((i,o)=>R(i.label)&&k(n,o)>=0),n.some((i,o)=>I(i.label)&&k(n,o)>=0)||n.some((i,o)=>F(i.label)&&k(n,o)>=0))),r==="userFacing"?[...t,...n]:[...n,...t]}l.sortCamerasForCameraPosition=se;function A(e,r){let a=e.getVideoTracks();if(a.length>0){let t=a[0],n;typeof t.getSettings=="function"&&(n=t.getSettings(),n.facingMode!=null&&n.facingMode.length>0&&(r.position=n.facingMode==="environment"?"worldFacing":"userFacing"));let{label:i=""}=t;i.length>0&&(r.label=i);}}l.adjustCameraFromMediaStream=A;function G(e,r,a){if(l.deviceIdToCameraObjects.has(e.deviceId))return l.deviceIdToCameraObjects.get(e.deviceId);let{label:t="",deviceId:n}=e,i;return !b.isDesktopDevice()&&a.every(o=>o.label===""&&!l.deviceIdToCameraObjects.has(o.deviceId))?i=a.length===1||r+1<=Math.floor(a.length/2)?"userFacing":"worldFacing":i=K(t)?"worldFacing":"userFacing",{position:i,label:t,deviceId:n}}function Z(e){let r=e.map((a,t,n)=>G(a,t,n)).map(a=>(a.deviceId!==""&&l.deviceIdToCameraObjects.set(a.deviceId,a),a)).filter(a=>!/\b(?:ir|infrared)\b/i.test(a.label)||/^IR UVC WebCam$/i.test(a.label.toUpperCase())).filter(a=>!C.has(a.label)).filter(a=>!v.has(a.label)).filter(a=>!l.inaccessibleDeviceIds.has(a.deviceId));if(!b.isDesktopDevice()&&r.length>1&&!r.some(a=>a.position==="worldFacing")){let a=r.length-1,t=r.map(n=>{let i=/\b(\d+)mp?\b/i.exec(n.label);return i!=null?Number.parseInt(i[1],10):Number.NaN});t.some(n=>Number.isNaN(n))||(a=t.lastIndexOf(Math.max(...t))),r[a].position="worldFacing";}return r}async function Y(){if(m!=null&&m.length>0&&m.every(e=>e.label===""&&!l.deviceIdToCameraObjects.has(e.deviceId)))try{return await M()({video:true,audio:false})}catch{}}function X(e,r){var a,t;if(r.length>0&&e.length===r.length&&!r.every((n,i)=>e[i].deviceId===n.deviceId)){let n={};for(let[i,o]of e.entries()){let s=l.deviceIdToCameraObjects.get(o.deviceId);if(s==null||s.label!==((t=(a=r[i])==null?void 0:a.label)!=null?t:""))continue;let g=r[i].deviceId;n[s.deviceId]=g,l.inaccessibleDeviceIds.has(s.deviceId)&&l.inaccessibleDeviceIds.add(g),s.deviceId=g,l.deviceIdToCameraObjects.set(g,s);}a$1.log(a$1.Level.Debug,"Detected updated camera deviceId information and updated it accordingly",n);}}function $(){typeof navigator.mediaDevices.addEventListener=="function"?navigator.mediaDevices.addEventListener("devicechange",E):navigator.mediaDevices.ondevicechange=E;}async function y(){let e,r=W();if(r)e=await r();else throw new a({fullSupport:false,scannerSupport:true,missingFeatures:["mediaDevices"]});return e.filter(a=>a.kind==="videoinput")}async function le(e=false,r=false){var n;let a$2=b.checkBrowserCompatibility();if(!a$2.fullSupport)throw new a(a$2);if($(),m==null||e||D){D=false;let i,o=m!=null?m:[];m=[];try{m=await y(),r||(i=await Y(),i!=null&&(m=await y())),a$1.debug("Camera list (devices):",...m),m.length>0&&m.every(s=>s.deviceId==="")&&a$1.log(a$1.Level.Debug,"Incomplete camera information listed due to user permission denial, cameras will not be accessible"),X(o,m);}catch(s){throw L(s),s}finally{for(let s of (n=i==null?void 0:i.getVideoTracks())!=null?n:[])s.stop();}}let t=Z(m);a$1.log(a$1.Level.Debug,"Camera list (cameras): ",...t);for(let i of w)i([...t]);return [...t]}l.getCameras=le;async function q(e){return a$1.debug("Attempt to access camera (parameters):",e.video),new Promise((r,a)=>{setTimeout(async()=>{try{let t=await M()(e);if(t==null){a(new a$2({name:"AbortError",message:"Cannot get stream from getUserMedia function."}));return}r(t);}catch(t){a(t);}},0);})}function J(e,r){let a={resizeMode:"none"};switch(e){case 0:return {...a,width:{min:2880,ideal:r==="fourToThree"?2880:3840,max:4096},height:{min:1800,ideal:2160,max:2400}};case 1:return {...a,width:{min:1440,ideal:r==="fourToThree"?1440:1920,max:2160},height:{min:900,ideal:1080,max:1440}};case 2:return {...a,width:{min:960,ideal:r==="fourToThree"?960:1280,max:1440},height:{min:480,ideal:720,max:960}};case 3:return {...a,width:{min:640,ideal:640,max:800},height:{min:360,ideal:r==="fourToThree"?480:360,max:640}};default:return {}}}l.getUserMediaVideoParameters=J;function Q(e){e.deviceId!==""&&(a$1.log(a$1.Level.Debug,"Camera marked to be inaccessible:",e),l.inaccessibleDeviceIds.add(e.deviceId));}l.markCameraAsInaccessible=Q;async function me(e,r,a){a$1.log(a$1.Level.Debug,"Attempt to access camera (camera):",e);let t={audio:false,video:J(r,a)};e.deviceId===""?t.video.facingMode={ideal:e.position==="worldFacing"?"environment":"user"}:t.video.deviceId={exact:e.deviceId};try{let n=await q(t);return A(n,e),n}catch(n){throw L(n),["OverconstrainedError","NotReadableError","NotAllowedError"].includes(n.name)||Q(e),n}}l.accessCameraStream=me;})(U||(U={}));export{ee as a,ae as b,re as c,U as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-R6SUMD5F.js';import {b}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-R6SUMD5F.js';import {b}from'./chunk-A225YZFY.js';var n=class e{constructor(t,o=a.defaultVibrationPattern){this.type=t,this.pattern=o;let r=b.getSupportedVibrationMethod();r&&(this._vibrate=r.bind(navigator));}static get defaultVibration(){return new e("default")}static withPattern(t){return new e("default",t)}toJSONObject(){return {type:this.type}}vibrate(){var t;return (t=this._vibrate)==null?void 0:t.call(this,this.pattern)}};export{n as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$2}from'./chunk-SEAVQZN6.js';import {a}from'./chunk-RVAHEVSC.js';import {a as a$5}from'./chunk-AIRWHLJH.js';import {a as a$4}from'./chunk-FGO2SSRS.js';import {a as a$1}from'./chunk-QCRFVRSS.js';import {b}from'./chunk-FTD535WI.js';import {a as a$3}from'./chunk-XR65N6EG.js';var h=class{constructor(a$3,e){this.onMessageListener=this.onMessage.bind(this);this.workerSelf=a$3,this.dataCaptureInstance=new a(e,{postMessage:this.postMessage.bind(this),getOffscreenCanvas:this.getOffscreenCanvas.bind(this)}),a$1(a$3)&&(a$2(a$3),this.listenToMessages());}listenToMessages(){this.workerSelf.addEventListener("message",this.onMessageListener),this.workerSelf.addEventListener("error",a=>{a$3.log(a$3.Level.Error,a);}),this.workerSelf.addEventListener("messageerror",a=>{a$3.log(a$3.Level.Error,a);});}postMessage(a,e){this.workerSelf.postMessage(a,e!=null?e:[]);}getOffscreenCanvas(){if(this.isOffscreenCanvasSupported())return new this.workerSelf.OffscreenCanvas(32,32)}isOffscreenCanvasSupported(){return typeof this.workerSelf.OffscreenCanvas=="function"}hasPayload(a){return a$4(a)&&"payload"in a}hasTransferables(a){return a$4(a)&&Array.isArray(a.transferables)}async respondWith(a,e,l){let r=null,t;try{t=l(),t instanceof Promise&&(t=await t);}catch(m){t=void 0,r=a$5(m);}let i={type:"workerTaskId",command:a,id:e,payload:this.hasPayload(t)?t.payload:void 0};r!=null&&(i.error=r),this.postMessage(i,this.hasTransferables(t)?t.transferables:[]);}onMessage(a){switch(a.data.command){case "loadLibrary":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.loadLibrary({libraryLocation:e.libraryLocation,locationPath:e.locationPath,referredOrigin:e.referredOrigin,writableDataPathOverride:e.writableDataPathOverride,threadsSupport:e.threadsSupport,simdSupport:e.simdSupport,verifyResponseHash:e.verifyResponseHash,fixedWasmMemory:e.fixedWasmMemory,indexedDBTimeoutMs:e.indexedDBTimeoutMs}));}break}case "onTap":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>{this.dataCaptureInstance.onTap(e.point);});}break}case "hintPresenterV2update":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>{this.dataCaptureInstance.hintPresenterV2Update();});}break}case "createContext":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.createContext({context:e.context,deviceId:e.deviceId,delayedRegistration:e.delayedRegistration,highEndBlurryRecognition:e.highEndBlurryRecognition,appName:e.appName,parentDomain:e.parentDomain}));}break}case "setFrameSource":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.setFrameSource(e.mirrorAxis,e.isCameraFrameSource));}break}case "processFrame":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.processFrame({data:e.data,frameId:e.frameId,width:e.width,height:e.height,colorType:e.colorType}));}break}case "requestFrameData":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.requestFrameData(e.frameId));}break}case "deleteFrameData":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{this.dataCaptureInstance.deleteFrameData(e.frameId);});}break}case "updateContext":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.updateContext(e));}break}case "dispose":{this.respondWith(a.data.command,a.data.id,()=>this.dataCaptureInstance.dispose());break}case "flushAnalytics":{this.respondWith(a.data.command,a.data.id,()=>{this.dataCaptureInstance.flushAnalytics();});break}case "reportCameraProperties":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.reportCameraProperties(e));}break}case "setLogLevel":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{a$3.setLevel(e.level);});}break}case "extractCentaurusLicense":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.extractCentaurusLicense(e.licenseKey));}break}case "documentVisibility":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{this.dataCaptureInstance.onDocumentVisibilityChange(e.state);});}break}case "isFeatureSupported":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.isFeatureSupported(e.feature));}break}case "getViewfinderInfo":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.getViewfinderInfo());}break}case "getOpenSourceSoftwareLicenseInfo":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.getOpenSourceSoftwareLicenseInfo());}break}case "addNativeOverlay":this.dataCaptureInstance.addNativeOverlay(a);break;case "removeNativeOverlay":this.dataCaptureInstance.removeNativeOverlay(a);break;case "convertToJPEGResult":{{let{data:e}=a;this.dataCaptureInstance.convertToJPEGResult(e.imageId,e.result);}break}default:return b(a.data),false}return true}};export{h as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-NY2HBST4.js';var t=new a(globalThis,{get:()=>globalThis.Module,set:e=>{globalThis.Module=e;}});function l(e){}export{t as a,l as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {b}from'./chunk-A225YZFY.js';import {a as a$1}from'./chunk-KXAJHLEO.js';import {a}from'./chunk-XR65N6EG.js';var p=class u{constructor(e){this.workerCommandId=1;this.workerTasks=new Map;this.workerListeners=[];var r;this.libraryLocation=e.libraryLocation,this.workerMessageListener=this.onWorkerMessage.bind(this),this.dataCaptureWorker.addEventListener("message",this.workerMessageListener),this.verifyResponseHash=e.verifyResponseHash,this.highEndBlurryRecognition=(r=e.highEndBlurryRecognition)!=null?r:false,this.simdSupport=e.simdSupport,this.threadsSupport=e.threadsSupport,typeof e.loadProgressNotifier=="function"&&this.addWorkerListener(t=>{var o;t.type==="loadLibraryProgress"&&((o=e.loadProgressNotifier)==null||o.call(e,t.payload));});}get dataCaptureWorker(){return (this._dataCaptureWorker)!=null||(this._dataCaptureWorker=(void 0)),this._dataCaptureWorker}get name(){return "CoreLoader"}get fixedWasmMemory(){return this.threadsSupport&&b.isFixedMemoryRequired()?300:null}static async create(e){var t;let r=new u(e);return await r.workerCommand("setLogLevel",{level:(t=e.logLevel)!=null?t:a.Level.Debug}),await r.load(),r}getIndexedDBTimeoutMs(){var t;let e=a$1.getInstanceFor("localStorage"),r=Number.parseInt((t=e.getItem("IndexedDBBlockedTimeoutMs"))!=null?t:"1500",10);return Number.isNaN(r)&&(r=1500),r}async load(){var e;try{await this.workerCommand("loadLibrary",{libraryLocation:this.libraryLocation,locationPath:window.location.pathname,referredOrigin:window.location.origin,writableDataPathOverride:(e=a$1.getInstanceFor("localStorage").getItem("scanditWritableDataPathOverride"))!=null?e:void 0,indexedDBTimeoutMs:this.getIndexedDBTimeoutMs(),verifyResponseHash:this.verifyResponseHash,fixedWasmMemory:this.fixedWasmMemory,simdSupport:this.simdSupport,threadsSupport:this.threadsSupport});}catch(r){if(r!=null&&typeof r=="object"&&typeof r.error=="string"&&r.error.includes("BlockedIndexedDB"))return await this.terminateDataCaptureWorker(false),this.dataCaptureWorker.addEventListener("message",this.workerMessageListener),a$1.getInstanceFor("localStorage").setItem("scanditWritableDataPathOverride",`/scandit_sync_folder_${[...crypto.getRandomValues(new Uint32Array(2))].map(o=>o.toString(32)).join("")}`),this.load();throw r}}async workerCommand(e,r,t){return new Promise((o,i)=>{let a=this.workerCommandId++;this.workerTasks.set(a,{resolve:o,reject:i,command:e});let l={...r,command:e,id:a};this.dataCaptureWorker.postMessage(l,t);})}async terminateDataCaptureWorker(e=true){var r,t;e&&await this.workerCommand("dispose",{}),(r=this._dataCaptureWorker)==null||r.removeEventListener("message",this.workerMessageListener),(t=this._dataCaptureWorker)==null||t.terminate(),this._dataCaptureWorker=void 0;}addWorkerListener(e){this.workerListeners.push(e);}removeWorkerListener(e){this.workerListeners.includes(e)&&this.workerListeners.splice(this.workerListeners.indexOf(e),1);}getOptions(){return {libraryLocation:this.libraryLocation,simdSupport:this.simdSupport,threadsSupport:this.threadsSupport,verifyResponseHash:this.verifyResponseHash}}onWorkerMessage(e){let r=e.data;if(r.type==="workerTaskId"&&typeof r.id=="number"){let{id:t,error:o,payload:i}=r,a=this.workerTasks.get(t);o==null?a==null||a.resolve(i):a==null||a.reject(r),this.workerTasks.delete(t);}else for(let t of this.workerListeners)t(r);}};export{p as a};
|