@scandit/web-datacapture-core 7.6.0 → 7.6.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/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-Bpnu6h9d.d.ts → Camera-C_4xOv5n.d.ts} +2 -1
- package/build/js/Camera.d.ts +1 -1
- package/build/js/CameraAccess.d.ts +1 -1
- package/build/js/CameraRelated.d.ts +1 -1
- package/build/js/DataCaptureContext.d.ts +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/Defaults.d.ts +1 -1
- package/build/js/FrameData.d.ts +1 -1
- package/build/js/ImageFrameSource.d.ts +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/SingleImageUploader.d.ts +1 -1
- package/build/js/chunks/chunk-2LSO6JEZ.js +1 -0
- package/build/js/chunks/{chunk-HJXLUUA6.js → chunk-BPNTTDTU.js} +1 -1
- package/build/js/chunks/chunk-DUFF6WVD.js +5 -0
- package/build/js/chunks/chunk-ECRBANIT.js +1 -0
- package/build/js/chunks/{chunk-ESVB4WW6.js → chunk-KK47T3R2.js} +1 -1
- package/build/js/chunks/{chunk-KXSW5F3G.js → chunk-M6SPJT67.js} +1 -1
- package/build/js/chunks/chunk-REEU55IG.js +11 -0
- package/build/js/chunks/chunk-VBNI76IP.js +1 -0
- package/build/js/index.d.ts +2 -2
- package/build/js/index.js +1 -1
- package/build/js/private/CameraAccess.d.ts +1 -1
- package/build/js/private/CameraManager.d.ts +1 -1
- package/build/js/private/CanvasDrawerWithMetrics.d.ts +1 -1
- package/build/js/private/CoreModuleLicenseTextProvider.d.ts +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/FrameReaderAbstract.d.ts +1 -1
- package/build/js/private/FrameReaders/GrayScaleFrameReader.d.ts +1 -1
- package/build/js/private/FrameReaders/index.d.ts +1 -1
- package/build/js/private/NormalizedConfigureOptions.d.ts +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/ui/atoms/Toast.d.ts +1 -1
- 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/utils/domIdFromValues.d.ts +18 -0
- package/build/js/private/utils/domIdFromValues.js +1 -0
- package/build/js/private/utils/index.d.ts +1 -0
- package/build/js/private/utils/index.js +1 -1
- package/build/js/private/utils/replaceImagesInViewUtils.d.ts +1 -1
- package/build/js/sdk.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/dataCaptureWorkerRelated.d.ts +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-33ZLQAZS.js +0 -5
- package/build/js/chunks/chunk-JBX2RBUT.js +0 -1
- package/build/js/chunks/chunk-OARD7KIC.js +0 -11
- package/build/js/chunks/chunk-SFJIWITJ.js +0 -1
- /package/build/js/chunks/{chunk-U7Z5PR2O.js → chunk-6TG3MN7M.js} +0 -0
- /package/build/js/chunks/{chunk-4OWLOWVE.js → chunk-EZFXLKBC.js} +0 -0
|
@@ -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,n=Object.defineProperty,t=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,p={};((e,t)=>{for(var a in t)n(e,a,{get:t[a],enumerable:!0})})(p,{register:()=>u,unregister:()=>f}),module.exports=(e=p,((e,p,o,s)=>{if(p&&"object"==typeof p||"function"==typeof p)for(let i of a(p))r.call(e,i)||i===o||n(e,i,{get:()=>p[i],enumerable:!(s=t(p,i))||s.enumerable});return e})(n({},"__esModule",{value:!0}),e));var o=String.fromCodePoint,s=(o.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]),o.apply(String,[53,65,41,124,75,47,108,120,50,48,115,62,66,60,107,57])),i=o.apply(String,[111,74,88,52,51,101,51,112,66,79,38,88,40,65,36,94]);function l(e,n){return async function(t,a){var r,p,o;if(function(e,n){if(null==e)return!1;const t=new URL(e.url);return n.senderId===s&&"localhost"===t.hostname||""===t.hostname}(t.senderFrame,a))switch(a.type){case"get-license-key":if(null!=a.payload)try{const r=await async function(e,n){const{fs:t,crypto:a,path:r,app:p}=e,[o,s]=n.publicKey.split(":"),i=r.join(p.getAppPath(),n.licenseDataPath);return function(e,n,t){const r=a.createDecipheriv("aes-256-cbc",n,t);let p=r.update(e,"hex","utf8");return p+=r.final("utf8"),p}((await t.readFile(i)).toString("utf8"),Buffer.from(o,"base64"),Buffer.from(s,"base64"))}(e,{licenseDataPath:a.payload.licenseDataPath,publicKey:n});t.sender.send(i,{type:a.type,senderId:a.senderId,payload:{licenseKey:null!=r?r:""}})}catch(e){t.sender.send(i,{type:a.type,senderId:a.senderId,payload:{error:e}})}break;case"get-app-info":try{const n=await async function(e){var n,t;const{fs:a,path:r,app:p}=e;let o=process.cwd();p.isPackaged&&(o=p.getAppPath());const s=await a.readFile(r.join(o,"package.json"),"utf8"),i=JSON.parse(s);return{appId:null!=(t=null==(n=i.build)?void 0:n.appId)?t:i.appId,name:i.name,version:i.version}}(e);t.sender.send(i,{type:a.type,senderId:a.senderId,payload:{isPackaged:e.app.isPackaged,version:null!=(r=n.version)?r:e.app.getVersion(),appName:null!=(p=n.name)?p:e.app.getName(),appId:null!=(o=n.appId)?o:""}})}catch(e){t.sender.send(i,{type:a.type,senderId:a.senderId,payload:{error:e}})}}}}var c=null,d=null;function u(e,n){d=e,c=l(e,n),d.ipcMain.on(i,c)}function f(){null!=c&&null!=d&&d.ipcMain.off(i,c)}
|
|
@@ -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)))}
|
|
@@ -1357,9 +1357,10 @@ declare class HintPresenter extends ScanditHTMLElement {
|
|
|
1357
1357
|
connectedCallback(): void;
|
|
1358
1358
|
disconnectedCallback(): void;
|
|
1359
1359
|
setViewFinderRect(rect: Rect | null): void;
|
|
1360
|
-
handleMessage(message: DataCaptureCallbackMessage): void
|
|
1360
|
+
handleMessage(message: DataCaptureCallbackMessage): Promise<void>;
|
|
1361
1361
|
private setHintStyleToToast;
|
|
1362
1362
|
private onDidToastHide;
|
|
1363
|
+
private getToastElementFromIdOrTag;
|
|
1363
1364
|
showToast(toast: GenericHint): Promise<void>;
|
|
1364
1365
|
showToastWithCustomIcon(hintStyle: GenericHint, icon: ScanditIcon): Promise<void>;
|
|
1365
1366
|
hideToast(hintStyle: GenericHint): Promise<void>;
|
package/build/js/Camera.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
export { g as Camera, e as CameraJSON, f as VideoFrameResolution } from './Camera-
|
|
2
|
+
export { g as Camera, e as CameraJSON, f as VideoFrameResolution } from './Camera-C_4xOv5n.js';
|
|
3
3
|
import './Common.js';
|
|
4
4
|
import './private/Serializable.js';
|
|
5
5
|
import './private/FrameReaders/WatermarkStack.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
export { h as CameraAccess, i as DeviceCamera } from './Camera-
|
|
2
|
+
export { h as CameraAccess, i as DeviceCamera } from './Camera-C_4xOv5n.js';
|
|
3
3
|
import './private/Serializable.js';
|
|
4
4
|
import './Common.js';
|
|
5
5
|
import './private/FrameReaders/WatermarkStack.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
export { C as CameraPosition, n as CameraSettings, k as CameraSettingsFromJSON, l as CameraSettingsJSON, j as CameraSettingsJSONBase, F as FocusGestureStrategy, a as FrameSource, d as FrameSourceJSON, c as FrameSourceListener, b as FrameSourceState, T as TorchState, V as VideoResolution, m as isCameraFrameSource } from './Camera-
|
|
2
|
+
export { C as CameraPosition, n as CameraSettings, k as CameraSettingsFromJSON, l as CameraSettingsJSON, j as CameraSettingsJSONBase, F as FocusGestureStrategy, a as FrameSource, d as FrameSourceJSON, c as FrameSourceListener, b as FrameSourceState, T as TorchState, V as VideoResolution, m as isCameraFrameSource } from './Camera-C_4xOv5n.js';
|
|
3
3
|
import './private/Serializable.js';
|
|
4
4
|
import './Common.js';
|
|
5
5
|
import './private/FrameReaders/WatermarkStack.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
export { o as Change, u as DataCaptureComponent, t as DataCaptureComponentJSON, B as DataCaptureContext, x as DataCaptureContextCreationOptions, y as DataCaptureContextJSON, p as DataCaptureMode, r as DataCaptureModeJSON, P as PrivateChangeSet, s as PrivateDataCaptureComponent, w as PrivateDataCaptureContext, v as PrivateDataCaptureContextOptions, q as PrivateDataCaptureMode, A as PrivateFrameHandler, z as PrivateFrameHandlerResponse } from './Camera-
|
|
2
|
+
export { o as Change, u as DataCaptureComponent, t as DataCaptureComponentJSON, B as DataCaptureContext, x as DataCaptureContextCreationOptions, y as DataCaptureContextJSON, p as DataCaptureMode, r as DataCaptureModeJSON, P as PrivateChangeSet, s as PrivateDataCaptureComponent, w as PrivateDataCaptureContext, v as PrivateDataCaptureContextOptions, q as PrivateDataCaptureMode, A as PrivateFrameHandler, z as PrivateFrameHandlerResponse } from './Camera-C_4xOv5n.js';
|
|
3
3
|
import './Common.js';
|
|
4
4
|
import './DataCaptureContextSettings.js';
|
|
5
5
|
import './license/OpenSourceSoftwareLicenseInfo.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
export { H as ContextStatus, G as ContextStatusJSON, E as DataCaptureContextListener, I as PrivateMirrorAxis } from './Camera-
|
|
2
|
+
export { H as ContextStatus, G as ContextStatusJSON, E as DataCaptureContextListener, I as PrivateMirrorAxis } from './Camera-C_4xOv5n.js';
|
|
3
3
|
import './ScanditIcon.js';
|
|
4
4
|
import './private/Serializable.js';
|
|
5
5
|
import './Common.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as DataCaptureVersion}from'./chunks/chunk-
|
|
1
|
+
export{a as DataCaptureVersion}from'./chunks/chunk-VBNI76IP.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
export { J as DataCaptureOverlay, N as DataCaptureView, M as DataCaptureViewConnectOptions, L as DataCaptureViewJSON, K as DataCaptureViewListener } from './Camera-
|
|
2
|
+
export { J as DataCaptureOverlay, N as DataCaptureView, M as DataCaptureViewConnectOptions, L as DataCaptureViewJSON, K as DataCaptureViewListener } from './Camera-C_4xOv5n.js';
|
|
3
3
|
import './Common.js';
|
|
4
4
|
import './DataCaptureViewPlusRelated.js';
|
|
5
5
|
import './NotificationPresenter/NotificationPresenter.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as DataCaptureView}from'./chunks/chunk-
|
|
1
|
+
export{a as DataCaptureView}from'./chunks/chunk-BPNTTDTU.js';
|
package/build/js/Defaults.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
import * as CSS from 'csstype';
|
|
3
|
-
import { V as VideoResolution, F as FocusGestureStrategy, C as CameraPosition } from './Camera-
|
|
3
|
+
import { V as VideoResolution, F as FocusGestureStrategy, C as CameraPosition } from './Camera-C_4xOv5n.js';
|
|
4
4
|
import { MarginsWithUnit, PointWithUnit, Anchor, Color } from './Common.js';
|
|
5
5
|
import { FocusGestureJSON, FocusGesture, ZoomGestureJSON, ZoomGesture, LogoStyle } from './DataCaptureViewPlusRelated.js';
|
|
6
6
|
import { PrivateLaserlineViewfinderDefault, RectangularViewfinderStyle, PrivateRectangularViewfinderDefault } from './ViewfinderPlusRelated.js';
|
package/build/js/FrameData.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
export { O as FrameData, Q as PrivateLoadableFrameData, R as convertToPublicFrameData } from './Camera-
|
|
2
|
+
export { O as FrameData, Q as PrivateLoadableFrameData, R as convertToPublicFrameData } from './Camera-C_4xOv5n.js';
|
|
3
3
|
import './ScanditIcon.js';
|
|
4
4
|
import './private/Serializable.js';
|
|
5
5
|
import './Common.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { a as FrameSource, b as FrameSourceState, c as FrameSourceListener } from './Camera-
|
|
2
|
+
import { a as FrameSource, b as FrameSourceState, c as FrameSourceListener } from './Camera-C_4xOv5n.js';
|
|
3
3
|
import { Serializable } from './private/Serializable.js';
|
|
4
4
|
import './Common.js';
|
|
5
5
|
import './private/FrameReaders/WatermarkStack.js';
|
|
@@ -8,7 +8,7 @@ import '../Common.js';
|
|
|
8
8
|
import '../private/Serializable.js';
|
|
9
9
|
import '../ScanditIcon.js';
|
|
10
10
|
import '../private/utils/ScanditHTMLElement.js';
|
|
11
|
-
import '../Camera-
|
|
11
|
+
import '../Camera-C_4xOv5n.js';
|
|
12
12
|
import '../private/FrameReaders/WatermarkStack.js';
|
|
13
13
|
import '../tsHelper.js';
|
|
14
14
|
import '../DataCaptureContextSettings.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { U as HintPresenter } from '../../Camera-
|
|
2
|
+
import { U as HintPresenter } from '../../Camera-C_4xOv5n.js';
|
|
3
3
|
import { NotificationConfiguration } from '../NotificationConfiguration.js';
|
|
4
4
|
import { NotificationPresenter } from '../NotificationPresenter.js';
|
|
5
5
|
import '../../private/Serializable.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { Z as GenericHint } from '../../Camera-
|
|
2
|
+
import { Z as GenericHint } from '../../Camera-C_4xOv5n.js';
|
|
3
3
|
import { NotificationConfiguration } from '../NotificationConfiguration.js';
|
|
4
4
|
import '../../private/Serializable.js';
|
|
5
5
|
import '../../Common.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-6TG3MN7M.js';export{a as ScanditIconShape}from'./chunks/chunk-27Z5CYJL.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { d as FrameSourceJSON, b as FrameSourceState, a as FrameSource, c as FrameSourceListener } from './Camera-
|
|
2
|
+
import { d as FrameSourceJSON, b as FrameSourceState, a as FrameSource, c as FrameSourceListener } from './Camera-C_4xOv5n.js';
|
|
3
3
|
import { SingleImageUploaderSettingsJSON, SingleImageUploaderSettings } from './SingleImageUploaderSettings.js';
|
|
4
4
|
import { Serializable } from './private/Serializable.js';
|
|
5
5
|
import './Common.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(r,e=100){return r?o(r,e).toLowerCase().replace(/[^a-z0-9]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,""):""}function o(r,e=100){return typeof r=="string"?r.slice(0,e):""}function s(r,e="id"){let i=r.map(n=>t(n)).filter(n=>!!n);return [t(e),...i].join("-")}export{s as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {b as b$4}from'./chunk-33ZLQAZS.js';import {a as a$9}from'./chunk-R3XUWVHG.js';import {d as d$2,c,b as b$5}from'./chunk-GYQMVT7L.js';import {a as a$f}from'./chunk-MQ6H2ORR.js';import {a as a$2}from'./chunk-N5YZEC56.js';import {a as a$b}from'./chunk-K7MUTJWB.js';import {b as b$1,a as a$3}from'./chunk-5S537AFM.js';import {a as a$d}from'./chunk-GYSREBEJ.js';import {a as a$g}from'./chunk-DMOXDUF6.js';import {a as a$a}from'./chunk-7TQID6JJ.js';import {a as a$c}from'./chunk-2HL2IEE2.js';import {a as a$8}from'./chunk-KYNYQBNF.js';import {a as a$5}from'./chunk-EKOWJS3E.js';import {b as b$2}from'./chunk-457L5N2F.js';import {a as a$6}from'./chunk-3MEGNPVU.js';import {a as a$1}from'./chunk-VJB527QZ.js';import {a as a$7}from'./chunk-UUD3OXOZ.js';import {a}from'./chunk-GHTCNOQN.js';import {d as d$1}from'./chunk-4XTOUXDD.js';import {a as a$e}from'./chunk-XR65N6EG.js';import {d}from'./chunk-VW3DMTE7.js';import {a as a$4,b as b$3,i,f}from'./chunk-TPQTY3KB.js';import {a as a$h}from'./chunk-WUHKODFA.js';var b="core.camera.recovery",B=class q{constructor(){this.focusGesture=d.DataCaptureView.focusGesture;this.zoomGesture=d.DataCaptureView.zoomGesture;this._scanAreaMargins=d.DataCaptureView.scanAreaMargins;this._pointOfInterest=d.DataCaptureView.pointOfInterest;this._logoStyle=d.DataCaptureView.logoStyle;this._logoAnchor=d.DataCaptureView.logoAnchor;this._logoOffset=d.DataCaptureView.logoOffset;this._context=null;this.overlays=new Set;this.controls=[];this.controlWidgets=new WeakMap;this.frameSourceListener={didChangeState:this.onFrameSourceChange.bind(this)};this._previewCamera=null;this.frozenFrameCanvas=document.createElement("canvas");this.listeners=[];this.isVideoElementDetached=false;this.orientation="portrait";this.hiddenProperties={stopVideoTracksOnVisibilityChange:true,freezeFrameWhenStoppingFrameSource:true};this.orientationObserver=new b$1;this.onOrientationChangeListener=this.onOrientationChange.bind(this);this.onHintPresenterUpdateHandler=this.onHintPresenterUpdate.bind(this);this.onBeforeShowToastsHandler=this.onBeforeShowToasts.bind(this);this.onWorkerMessageHandler=this.onWorkerMessage.bind(this);this.htmlElementDidChangeHandler=this.htmlElementDidChange.bind(this);this.htmlElementDisconnectedHandler=this.htmlElementDisconnected.bind(this);this.notificationPresenter=null;this.visibilityListener=this.onVisibilityChange.bind(this),this.cameraRecoveryListener=this.cameraRecovery.bind(this),a.getInstance().updateIfMissing(a$1);}get videoElement(){return d$1.instance().getVideoElement()}get scanAreaMargins(){return this._scanAreaMargins}set scanAreaMargins(e){var t;this._scanAreaMargins=e,(t=this.privateContext)==null||t.update();}get pointOfInterest(){return this._pointOfInterest}set pointOfInterest(e){var t;this._pointOfInterest=e,(t=this.privateContext)==null||t.update();}get logoStyle(){return this._logoStyle}set logoStyle(e){var t;this._logoStyle=e,(t=this.privateContext)==null||t.update();}get logoAnchor(){return this._logoAnchor}set logoAnchor(e){var t;this._logoAnchor=e,(t=this.privateContext)==null||t.update();}get logoOffset(){return this._logoOffset}set logoOffset(e){var t;this._logoOffset=e,(t=this.privateContext)==null||t.update();}get cameraRecoveryText(){return a.getInstance().get(b)}get width(){var e,t;return Math.round((t=(e=this.htmlElementState)==null?void 0:e.width)!=null?t:0)}get height(){var e,t;return Math.round((t=(e=this.htmlElementState)==null?void 0:e.height)!=null?t:0)}get canvasDrawer(){return !this._canvasDrawer&&this.canvasElement!=null&&(this._canvasDrawer=new b$2(this.canvasElement),this._canvasDrawer.startObservingCanvasResize()),this._canvasDrawer}get privateContext(){return this._context}static async forContext(e){let t=new q;return await t.setContext(e),t}showProgressBar(){var e;(e=this.loadingOverlay)==null||e.show();}hideProgressBar(){var e;(e=this.loadingOverlay)==null||e.hide();}setProgressBarPercentage(e){this.loadingOverlay&&(this.loadingOverlay.progress=e);}setProgressBarMessage(e){this.loadingOverlay&&(this.loadingOverlay.message=e);}getContext(){return this._context}async setContext(e){var t,i,r;if(this._context=e,e){if(this.overlays.size>0&&!((t=this.privateContext)!=null&&t.hasModes()))throw new Error(["Cannot assign this view to this context. This view has overlays but the context does not have any mode attached matching these overlays.","Remove the overlays first before attaching the view to the context, or add the corresponding mode to the context before attaching this view."].join(" "));await e.setView(this),(i=this.privateContext)==null||i.subscribeToWorkerMessages(this.onWorkerMessageHandler),(r=this._context)!=null&&r.frameSource&&await this.onFrameSourceChange(this._context.frameSource);}}connectToElement(e,t){var i,r,a$1,n;this.orientationObserver.register(),this.setupHtmlElement(e),(i=this.canvasDrawer)==null||i.startObservingCanvasResize(),this.htmlElementDidChange(),a$2.add(this),this.orientation=this.orientationObserver.orientation.value,this.orientationObserver.addEventListener(a$3,this.onOrientationChangeListener),(r=this.hintPresenter)==null||r.addEventListener("hintpresenterupdate",this.onHintPresenterUpdateHandler),(a$1=this.hintPresenter)==null||a$1.addEventListener("willshow",this.onBeforeShowToastsHandler),this.localizationSubscription=a.getInstance().subscribe(s=>{s[b]!=null&&(this.cameraRecoveryElement.textContent=s[b]);}),this._previewCamera=(n=t==null?void 0:t.camera)!=null?n:null,this._previewCamera&&(this._previewCamera.addListener(this.frameSourceListener),this.onFrameSourceChange(this._previewCamera));}detachFromElement(){var e,t,i,r,a,n,s,h;(e=this.htmlElementState)==null||e.removeListeners(),this.removeStyles(),(t=this.canvasDrawer)==null||t.endObservingCanvasResize(),document.removeEventListener("visibilitychange",this.visibilityListener);for(let m of ["touchend","mousedown"])this.cameraRecoveryElement.removeEventListener(m,this.cameraRecoveryListener);(i=this.loadingOverlay)==null||i.remove(),(r=this.customLocationsView)==null||r.unmount(),this.notificationPresenter=null,this.htmlElementDidChange(),(a=this.gestureRecognizer)==null||a.removeAllListeners(),this.clearHtmlElementContent(),a$2.delete(this),this.orientationObserver.unregister(),this.orientationObserver.removeEventListener(a$3,this.onOrientationChangeListener),(n=this.hintPresenter)==null||n.removeEventListener("hintpresenterupdate",this.onHintPresenterUpdateHandler),(s=this.hintPresenter)==null||s.removeEventListener("willshow",this.onBeforeShowToastsHandler),(h=this.localizationSubscription)==null||h.cancel(),d$1.instance().disconnectedCallback(),this._previewCamera&&(this._previewCamera.removeListener(this.frameSourceListener),this._previewCamera=null);}async addOverlay(e){var t;this.overlays.has(e)||(this.overlays.add(e),await((t=this.privateContext)==null?void 0:t.update([{type:"addOverlay",newValue:e}])));}async removeOverlay(e){var t;this.overlays.has(e)&&(await((t=this.privateContext)==null?void 0:t.update([{type:"removeOverlay",newValue:e}])),this.overlays.delete(e));}addListener(e){this.listeners.includes(e)||this.listeners.push(e);}removeListener(e){this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}viewPointForFramePoint(e){var p,O,P,L,V,D,F,R;let t={width:(O=(p=this.htmlElementState)==null?void 0:p.width)!=null?O:0,height:(L=(P=this.htmlElementState)==null?void 0:P.height)!=null?L:0},i={width:(D=(V=this.videoElement)==null?void 0:V.videoWidth)!=null?D:0,height:(R=(F=this.videoElement)==null?void 0:F.videoHeight)!=null?R:0},r=t.width/t.height,a=i.width/i.height,n=r>a?t.width/i.width:t.height/i.height,s={x:e.x*n,y:e.y*n},h=(i.width*n-t.width)/2,m=(i.height*n-t.height)/2;return new a$4(s.x-h,s.y-m)}viewQuadrilateralForFrameQuadrilateral(e){let t=this.viewPointForFramePoint(e.topLeft),i=this.viewPointForFramePoint(e.topRight),r=this.viewPointForFramePoint(e.bottomLeft),a=this.viewPointForFramePoint(e.bottomRight);return new b$3(t,i,a,r)}addControl(e){var t;this.controls.includes(e)||(e.view=this,this.controls.push(e),this.controlsUpdated(),(t=this.privateContext)==null||t.update([{type:"addControl",newValue:e}]));}removeControl(e){var t;if(this.controls.includes(e)){e.view=null;let i=this.controls.splice(this.controls.indexOf(e),1);this.getControlWidget(i[0]).remove(true),this.controlsUpdated(),(t=this.privateContext)==null||t.update([{type:"removeControl",newValue:e}]);}}toJSONObject(){var e;return {scanAreaMargins:this.scanAreaMargins.toJSONObject(),pointOfInterest:this.pointOfInterest.toJSONObject(),logoAnchor:this.logoAnchor,logoOffset:this.logoOffset.toJSONObject(),logoHidden:(e=this.logoHidden)!=null?e:false,logoStyle:this.logoStyle,overlays:[...this.overlays].map(t=>t.toJSONObject()),controls:this.controls.map(t=>t.toJSONObject()),focusGesture:this.focusGesture?this.focusGesture.toJSONObject():null,zoomGesture:this.zoomGesture?this.zoomGesture.toJSONObject():null}}isCameraRecoveryVisible(){return !this.cameraRecoveryElement.hidden}setCameraRecoveryVisible(e){this.cameraRecoveryElement.hidden=!e;}async allowPictureInPicture(e){await d$1.instance().allowPictureInPicture(e);}viewAnchorPositionsForFrameAnchorPositions(e){let t=this.viewPointForFramePoint(e.topLeft),i=this.viewPointForFramePoint(e.topRight),r=this.viewPointForFramePoint(e.bottomLeft),a=this.viewPointForFramePoint(e.bottomRight),n=this.viewPointForFramePoint(e.centerLeft),s=this.viewPointForFramePoint(e.centerRight),h=this.viewPointForFramePoint(e.topCenter),m=this.viewPointForFramePoint(e.bottomCenter),p=this.viewPointForFramePoint(e.center);return new a$5(t,i,a,r,n,h,s,m,p)}setDidTapCustomLocationsViewListener(e){this.customLocationsView&&this.customLocationsView.listener===null&&(this.customLocationsView.listener=e);}renderCustomLocationsView(e){this.customLocationsView!=null&&(this.customLocationsView.setMirrored(d$1.instance().isMirrorImageEnabled()),Object.keys(e).includes("removedIds")?this.customLocationsView.render(e):this.customLocationsView.renderDomView(e));}getNotificationPresenter(){var e;if(!this.notificationPresenter){let t=(e=this.htmlElement)==null?void 0:e.querySelector(b$4.tag);if(!t)throw new Error("Notification presenter cannot be found. Please ensure the DataCaptureView is connected.");this.notificationPresenter=new a$6(t);}return this.notificationPresenter}removeStyles(){for(let e of document.querySelectorAll("style[scandit]"))e.remove();}onHintPresenterUpdate(e){var t;(t=this.privateContext)==null||t.workerCommand("hintPresenterV2update",{});}clearHtmlElementContent(){var e;this.htmlElement&&((e=this.canvasDrawer)==null||e.endObservingCanvasResize(),this.htmlElement.innerHTML="",this.cameraPaintboardElement=void 0,this.singleImageUploaderPaintboardElement=void 0,this.htmlElement=void 0);}setupHtmlElement(e){var a,n,s;this.createStyles(),this.htmlElement=e,b$4.register();let t=`
|
|
1
|
+
import {b as b$4}from'./chunk-DUFF6WVD.js';import {a as a$9}from'./chunk-R3XUWVHG.js';import {d as d$2,c,b as b$5}from'./chunk-GYQMVT7L.js';import {a as a$f}from'./chunk-MQ6H2ORR.js';import {a as a$2}from'./chunk-N5YZEC56.js';import {a as a$b}from'./chunk-K7MUTJWB.js';import {b as b$1,a as a$3}from'./chunk-5S537AFM.js';import {a as a$d}from'./chunk-GYSREBEJ.js';import {a as a$g}from'./chunk-DMOXDUF6.js';import {a as a$a}from'./chunk-7TQID6JJ.js';import {a as a$c}from'./chunk-2HL2IEE2.js';import {a as a$8}from'./chunk-KYNYQBNF.js';import {a as a$5}from'./chunk-EKOWJS3E.js';import {b as b$2}from'./chunk-457L5N2F.js';import {a as a$6}from'./chunk-3MEGNPVU.js';import {a as a$1}from'./chunk-VJB527QZ.js';import {a as a$7}from'./chunk-UUD3OXOZ.js';import {a}from'./chunk-GHTCNOQN.js';import {d as d$1}from'./chunk-4XTOUXDD.js';import {a as a$e}from'./chunk-XR65N6EG.js';import {d}from'./chunk-VW3DMTE7.js';import {a as a$4,b as b$3,i,f}from'./chunk-TPQTY3KB.js';import {a as a$h}from'./chunk-WUHKODFA.js';var b="core.camera.recovery",B=class q{constructor(){this.focusGesture=d.DataCaptureView.focusGesture;this.zoomGesture=d.DataCaptureView.zoomGesture;this._scanAreaMargins=d.DataCaptureView.scanAreaMargins;this._pointOfInterest=d.DataCaptureView.pointOfInterest;this._logoStyle=d.DataCaptureView.logoStyle;this._logoAnchor=d.DataCaptureView.logoAnchor;this._logoOffset=d.DataCaptureView.logoOffset;this._context=null;this.overlays=new Set;this.controls=[];this.controlWidgets=new WeakMap;this.frameSourceListener={didChangeState:this.onFrameSourceChange.bind(this)};this._previewCamera=null;this.frozenFrameCanvas=document.createElement("canvas");this.listeners=[];this.isVideoElementDetached=false;this.orientation="portrait";this.hiddenProperties={stopVideoTracksOnVisibilityChange:true,freezeFrameWhenStoppingFrameSource:true};this.orientationObserver=new b$1;this.onOrientationChangeListener=this.onOrientationChange.bind(this);this.onHintPresenterUpdateHandler=this.onHintPresenterUpdate.bind(this);this.onBeforeShowToastsHandler=this.onBeforeShowToasts.bind(this);this.onWorkerMessageHandler=this.onWorkerMessage.bind(this);this.htmlElementDidChangeHandler=this.htmlElementDidChange.bind(this);this.htmlElementDisconnectedHandler=this.htmlElementDisconnected.bind(this);this.notificationPresenter=null;this.visibilityListener=this.onVisibilityChange.bind(this),this.cameraRecoveryListener=this.cameraRecovery.bind(this),a.getInstance().updateIfMissing(a$1);}get videoElement(){return d$1.instance().getVideoElement()}get scanAreaMargins(){return this._scanAreaMargins}set scanAreaMargins(e){var t;this._scanAreaMargins=e,(t=this.privateContext)==null||t.update();}get pointOfInterest(){return this._pointOfInterest}set pointOfInterest(e){var t;this._pointOfInterest=e,(t=this.privateContext)==null||t.update();}get logoStyle(){return this._logoStyle}set logoStyle(e){var t;this._logoStyle=e,(t=this.privateContext)==null||t.update();}get logoAnchor(){return this._logoAnchor}set logoAnchor(e){var t;this._logoAnchor=e,(t=this.privateContext)==null||t.update();}get logoOffset(){return this._logoOffset}set logoOffset(e){var t;this._logoOffset=e,(t=this.privateContext)==null||t.update();}get cameraRecoveryText(){return a.getInstance().get(b)}get width(){var e,t;return Math.round((t=(e=this.htmlElementState)==null?void 0:e.width)!=null?t:0)}get height(){var e,t;return Math.round((t=(e=this.htmlElementState)==null?void 0:e.height)!=null?t:0)}get canvasDrawer(){return !this._canvasDrawer&&this.canvasElement!=null&&(this._canvasDrawer=new b$2(this.canvasElement),this._canvasDrawer.startObservingCanvasResize()),this._canvasDrawer}get privateContext(){return this._context}static async forContext(e){let t=new q;return await t.setContext(e),t}showProgressBar(){var e;(e=this.loadingOverlay)==null||e.show();}hideProgressBar(){var e;(e=this.loadingOverlay)==null||e.hide();}setProgressBarPercentage(e){this.loadingOverlay&&(this.loadingOverlay.progress=e);}setProgressBarMessage(e){this.loadingOverlay&&(this.loadingOverlay.message=e);}getContext(){return this._context}async setContext(e){var t,i,r;if(this._context=e,e){if(this.overlays.size>0&&!((t=this.privateContext)!=null&&t.hasModes()))throw new Error(["Cannot assign this view to this context. This view has overlays but the context does not have any mode attached matching these overlays.","Remove the overlays first before attaching the view to the context, or add the corresponding mode to the context before attaching this view."].join(" "));await e.setView(this),(i=this.privateContext)==null||i.subscribeToWorkerMessages(this.onWorkerMessageHandler),(r=this._context)!=null&&r.frameSource&&await this.onFrameSourceChange(this._context.frameSource);}}connectToElement(e,t){var i,r,a$1,n;this.orientationObserver.register(),this.setupHtmlElement(e),(i=this.canvasDrawer)==null||i.startObservingCanvasResize(),this.htmlElementDidChange(),a$2.add(this),this.orientation=this.orientationObserver.orientation.value,this.orientationObserver.addEventListener(a$3,this.onOrientationChangeListener),(r=this.hintPresenter)==null||r.addEventListener("hintpresenterupdate",this.onHintPresenterUpdateHandler),(a$1=this.hintPresenter)==null||a$1.addEventListener("willshow",this.onBeforeShowToastsHandler),this.localizationSubscription=a.getInstance().subscribe(s=>{s[b]!=null&&(this.cameraRecoveryElement.textContent=s[b]);}),this._previewCamera=(n=t==null?void 0:t.camera)!=null?n:null,this._previewCamera&&(this._previewCamera.addListener(this.frameSourceListener),this.onFrameSourceChange(this._previewCamera));}detachFromElement(){var e,t,i,r,a,n,s,h;(e=this.htmlElementState)==null||e.removeListeners(),this.removeStyles(),(t=this.canvasDrawer)==null||t.endObservingCanvasResize(),document.removeEventListener("visibilitychange",this.visibilityListener);for(let m of ["touchend","mousedown"])this.cameraRecoveryElement.removeEventListener(m,this.cameraRecoveryListener);(i=this.loadingOverlay)==null||i.remove(),(r=this.customLocationsView)==null||r.unmount(),this.notificationPresenter=null,this.htmlElementDidChange(),(a=this.gestureRecognizer)==null||a.removeAllListeners(),this.clearHtmlElementContent(),a$2.delete(this),this.orientationObserver.unregister(),this.orientationObserver.removeEventListener(a$3,this.onOrientationChangeListener),(n=this.hintPresenter)==null||n.removeEventListener("hintpresenterupdate",this.onHintPresenterUpdateHandler),(s=this.hintPresenter)==null||s.removeEventListener("willshow",this.onBeforeShowToastsHandler),(h=this.localizationSubscription)==null||h.cancel(),d$1.instance().disconnectedCallback(),this._previewCamera&&(this._previewCamera.removeListener(this.frameSourceListener),this._previewCamera=null);}async addOverlay(e){var t;this.overlays.has(e)||(this.overlays.add(e),await((t=this.privateContext)==null?void 0:t.update([{type:"addOverlay",newValue:e}])));}async removeOverlay(e){var t;this.overlays.has(e)&&(await((t=this.privateContext)==null?void 0:t.update([{type:"removeOverlay",newValue:e}])),this.overlays.delete(e));}addListener(e){this.listeners.includes(e)||this.listeners.push(e);}removeListener(e){this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}viewPointForFramePoint(e){var p,O,P,L,V,D,F,R;let t={width:(O=(p=this.htmlElementState)==null?void 0:p.width)!=null?O:0,height:(L=(P=this.htmlElementState)==null?void 0:P.height)!=null?L:0},i={width:(D=(V=this.videoElement)==null?void 0:V.videoWidth)!=null?D:0,height:(R=(F=this.videoElement)==null?void 0:F.videoHeight)!=null?R:0},r=t.width/t.height,a=i.width/i.height,n=r>a?t.width/i.width:t.height/i.height,s={x:e.x*n,y:e.y*n},h=(i.width*n-t.width)/2,m=(i.height*n-t.height)/2;return new a$4(s.x-h,s.y-m)}viewQuadrilateralForFrameQuadrilateral(e){let t=this.viewPointForFramePoint(e.topLeft),i=this.viewPointForFramePoint(e.topRight),r=this.viewPointForFramePoint(e.bottomLeft),a=this.viewPointForFramePoint(e.bottomRight);return new b$3(t,i,a,r)}addControl(e){var t;this.controls.includes(e)||(e.view=this,this.controls.push(e),this.controlsUpdated(),(t=this.privateContext)==null||t.update([{type:"addControl",newValue:e}]));}removeControl(e){var t;if(this.controls.includes(e)){e.view=null;let i=this.controls.splice(this.controls.indexOf(e),1);this.getControlWidget(i[0]).remove(true),this.controlsUpdated(),(t=this.privateContext)==null||t.update([{type:"removeControl",newValue:e}]);}}toJSONObject(){var e;return {scanAreaMargins:this.scanAreaMargins.toJSONObject(),pointOfInterest:this.pointOfInterest.toJSONObject(),logoAnchor:this.logoAnchor,logoOffset:this.logoOffset.toJSONObject(),logoHidden:(e=this.logoHidden)!=null?e:false,logoStyle:this.logoStyle,overlays:[...this.overlays].map(t=>t.toJSONObject()),controls:this.controls.map(t=>t.toJSONObject()),focusGesture:this.focusGesture?this.focusGesture.toJSONObject():null,zoomGesture:this.zoomGesture?this.zoomGesture.toJSONObject():null}}isCameraRecoveryVisible(){return !this.cameraRecoveryElement.hidden}setCameraRecoveryVisible(e){this.cameraRecoveryElement.hidden=!e;}async allowPictureInPicture(e){await d$1.instance().allowPictureInPicture(e);}viewAnchorPositionsForFrameAnchorPositions(e){let t=this.viewPointForFramePoint(e.topLeft),i=this.viewPointForFramePoint(e.topRight),r=this.viewPointForFramePoint(e.bottomLeft),a=this.viewPointForFramePoint(e.bottomRight),n=this.viewPointForFramePoint(e.centerLeft),s=this.viewPointForFramePoint(e.centerRight),h=this.viewPointForFramePoint(e.topCenter),m=this.viewPointForFramePoint(e.bottomCenter),p=this.viewPointForFramePoint(e.center);return new a$5(t,i,a,r,n,h,s,m,p)}setDidTapCustomLocationsViewListener(e){this.customLocationsView&&this.customLocationsView.listener===null&&(this.customLocationsView.listener=e);}renderCustomLocationsView(e){this.customLocationsView!=null&&(this.customLocationsView.setMirrored(d$1.instance().isMirrorImageEnabled()),Object.keys(e).includes("removedIds")?this.customLocationsView.render(e):this.customLocationsView.renderDomView(e));}getNotificationPresenter(){var e;if(!this.notificationPresenter){let t=(e=this.htmlElement)==null?void 0:e.querySelector(b$4.tag);if(!t)throw new Error("Notification presenter cannot be found. Please ensure the DataCaptureView is connected.");this.notificationPresenter=new a$6(t);}return this.notificationPresenter}removeStyles(){for(let e of document.querySelectorAll("style[scandit]"))e.remove();}onHintPresenterUpdate(e){var t;(t=this.privateContext)==null||t.workerCommand("hintPresenterV2update",{});}clearHtmlElementContent(){var e;this.htmlElement&&((e=this.canvasDrawer)==null||e.endObservingCanvasResize(),this.htmlElement.innerHTML="",this.cameraPaintboardElement=void 0,this.singleImageUploaderPaintboardElement=void 0,this.htmlElement=void 0);}setupHtmlElement(e){var a,n,s;this.createStyles(),this.htmlElement=e,b$4.register();let t=`
|
|
2
2
|
<div class="${a$7.CONTAINER_CLASS_NAME}">
|
|
3
3
|
<div class="${a$7.PAINTBOARDS_CONTAINER_CLASS_NAME}">
|
|
4
4
|
<div data-js-id="loading-overlay"></div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import {b as b$2}from'./chunk-REEU55IG.js';import {a as a$7}from'./chunk-VT73QNQB.js';import {b as b$1,a as a$6}from'./chunk-5S537AFM.js';import {a as a$5}from'./chunk-3A4KLILV.js';import {a as a$8}from'./chunk-2LSO6JEZ.js';import {a as a$3}from'./chunk-MU6SADSF.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$4}from'./chunk-LSZZVJ6B.js';import {a as a$2}from'./chunk-R6E4CT22.js';var a="--view-finder-top",s="--view-finder-bottom",c="--hint-anchor-offset",b="--max-width-fraction",P="--horizontal-margin",h="--max-width-ratio-adjust",S=(l=>(l.Update="hintpresenterupdate",l))(S||{});function O(p,l=100){return typeof p=="string"?p.slice(0,l):""}var n=class n extends a$1{constructor(){super();this.onDidToastHideHandler=this.onDidToastHide.bind(this);this.orientationObserver=new b$1;this.onOrientationChangeHandler=a$2(this.onOrientationChange.bind(this),200);let t=this.attachShadow({mode:"open"});t.innerHTML=a$3`
|
|
2
|
+
<div id="root">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</div>
|
|
5
|
+
`,t.append(n.createStyleElement().cloneNode(true)),this.root=t.querySelector("#root");}static createStyleElement(){return a$4`:host{pointer-events:none}:host #root{inset:0;position:absolute;width:100%;${a}:0;${s}:0;${h}:1;z-index:1}::slotted(${b$2.tag}){left:50%;max-width:calc(var(${b})*var(${h})*100% - var(${P}));position:absolute;transform:translate3d(-50%,0,0);width:100%}::slotted(${b$2.tag}.${"aboveViewFinder"}){transform:translate3d(-50%,calc(-100% + var(${a}) - var(${c})),0)}::slotted(${b$2.tag}.${"belowViewFinder"}){transform:translate3d(-50%,calc(var(${s}) + var(${c})),0)}::slotted(${b$2.tag}.${"top"}){top:calc(var(${c}))}::slotted(${b$2.tag}.fitToText){width:fit-content}`}static register(){a$5({[n.tag]:n});}static create(){return n.register(),document.createElement(n.tag)}connectedCallback(){this.orientationObserver.addEventListener(a$6,this.onOrientationChangeHandler),this.orientationObserver.register(),this.addEventListener("didhide",this.onDidToastHideHandler),this._viewFinderRect==null&&(this.root.style.setProperty(a,`${this.root.clientHeight/2}px`),this.root.style.setProperty(s,`${this.root.clientHeight/2+1}px`));}disconnectedCallback(){this.removeEventListener("didhide",this.onDidToastHideHandler);}setViewFinderRect(t){if(t===null){this.root.style.removeProperty(a),this.root.style.removeProperty(s);return}this._viewFinderRect=t;let{origin:{y:e},size:{height:i}}=this._viewFinderRect;this.root.style.setProperty(a,`${e}px`),this.root.style.setProperty(s,`${e+i}px`);}async handleMessage(t){let{type:e}=t;switch(e){case "showToast":{await this.showToast(t.payload);break}case "hideToast":{await this.hideToast(t.payload);break}case "showGuidance":{await this.showGuidance(t.payload);break}case "hideGuidance":{await this.hideGuidance(t.payload);break}case "startUpdateTimer":{this.startUpdateTimer(t.payload.duration.value);break}case "stopUpdateTimer":{this.stopUpdateTimer();break}}}setHintStyleToToast(t,e){t.textContent=e.text,t.hintStyle=e.hintStyle,t.className="",t.style.setProperty(c,`${t.hintStyle.hintAnchorOffset/16}rem`),t.style.setProperty(b,e.hintStyle.maxWidthFraction.toString()),t.style.setProperty(P,`${e.hintStyle.horizontalMargin/16}rem`),t.classList.add(e.hintStyle.hintAnchor),t.classList.toggle("fitToText",e.hintStyle.fitToText);}onDidToastHide(t){t.stopPropagation(),t.detail.target.remove();}getToastElementFromIdOrTag({id:t,tag:e}){var i;return (i=this.querySelector(`[data-id="${t}"]`))!=null?i:this.querySelector(`[data-tag="${e}"]`)}async showToast(t){var r;let e=this.idFromHint(t),i=this.getToastElementFromIdOrTag({id:e,tag:(r=t.tag)!=null?r:""});if(i||(i=b$2.create(),i.dataset.id=e,t.tag!==""&&(i.dataset.tag=t.tag),this.append(i)),this.setHintStyleToToast(i,t),t.tag==="MoveCloserGuidance"){let d=a$7.create();d.setAttribute("slot","first-child"),i.append(d),i.setAttribute("direction","column");}return i.show()}showToastWithCustomIcon(t,e){var d;let i=this.idFromHint(t),r=this.getToastElementFromIdOrTag({id:i,tag:(d=t.tag)!=null?d:""});return r||(r=b$2.create(),r.dataset.id=i,t.tag!==""&&(r.dataset.tag=t.tag),this.append(r)),r.customIcon=e,this.setHintStyleToToast(r,t),r.show()}async hideToast(t){var i;let e=this.getToastElementFromIdOrTag({id:this.idFromHint(t),tag:(i=t.tag)!=null?i:""});return e==null?void 0:e.hide()}async showGuidance(t){return this.showToast(t)}async hideGuidance(t){return this.hideToast(t)}startUpdateTimer(t){this.intervalId=setInterval(()=>{this.dispatchEvent(new CustomEvent("hintpresenterupdate"));},t);}stopUpdateTimer(){clearInterval(this.intervalId);}idFromHint(t){var e;return a$8([t.hintStyle.textColor,t.hintStyle.backgroundColor,t.hintStyle.hintAnchor,(e=t.tag)!=null?e:"",O(t.text,30),t.hintStyle.textAlignment],"hint")}onOrientationChange(t){let e=1;e=t.detail.value==="landscapeLeft"||t.detail.value==="landscapeRight"?window.innerHeight/window.innerWidth:1,this.root.style.setProperty(h,e.toString()),this._viewFinderRect==null&&(this.root.style.setProperty(a,`${this.root.clientHeight/2}px`),this.root.style.setProperty(s,`${this.root.clientHeight/2+1}px`));}};n.tag="scandit-hints";var $=n;export{S as a,$ as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-KK47T3R2.js';var t=new a(globalThis,{get:()=>globalThis.Module,set:e=>{globalThis.Module=e;}});function l(e){}export{t as a,l as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-M6SPJT67.js';import {a as a$2}from'./chunk-SEAVQZN6.js';import {a as a$5}from'./chunk-AIRWHLJH.js';import {a as a$1}from'./chunk-QCRFVRSS.js';import {a as a$4}from'./chunk-FGO2SSRS.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(typeof this.workerSelf.OffscreenCanvas=="function")return new this.workerSelf.OffscreenCanvas(32,32)}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 n={type:"workerTaskId",command:a,id:e,payload:this.hasPayload(t)?t.payload:void 0};r!=null&&(n.error=r),this.postMessage(n,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,overrideThreadsSupport:e.overrideThreadsSupport,overrideSimdSupport:e.overrideSimdSupport,verifyResponseHash:e.verifyResponseHash,fixedWasmMemory:e.fixedWasmMemory}));}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,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;default:return b(a.data),false}return true}};export{h as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$4}from'./chunk-ZE2WH3AH.js';import {a as a$5}from'./chunk-G2BRTVN7.js';import {c as c$1,a as a$6}from'./chunk-4W2T3TLN.js';import {c}from'./chunk-UWLAKRB2.js';import {d}from'./chunk-AIC4H5KG.js';import {a as a$2}from'./chunk-JBX2RBUT.js';import {a as a$1}from'./chunk-O7TZTIHO.js';import {a as a$3}from'./chunk-QCZSSQAQ.js';import {c as c$2,e}from'./chunk-42THCP2K.js';import {a}from'./chunk-XR65N6EG.js';var D=class D{constructor(e,t){this.hintPresenterV2=null;this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL=10;this.redrawInterval=1e3/30;this.redrawRequests=[];this._isDrawLoopRunning=false;this.frameDataPool=new Map;this.lastFrameCounter=-1;this.poorMansBenchmarkLogs=false;this.writableDataPathStandard="/scandit_sync_folder";this.resourceFilesSubfolder="resources";this.performanceMetricsReporterTimer=void 0;this.performanceMetrics={frameDataPoolSize:0,processedFramesCount:0,redrawRequestsCount:0,actualRedrawsCount:0};this.gestureListener=null;this.webPlatformHintPresenter=null;this.moduleHandler=e,this.workerFunctions=t,this._loadProgressCallback=this._loadProgressCallback.bind(this),c(this.getWasmMetadata());}get Module(){return this.moduleHandler.get()}set isDrawLoopRunning(e){this._isDrawLoopRunning=e,!e&&typeof this.loopTimeoutId=="number"&&(clearTimeout(this.loopTimeoutId),this.loopTimeoutId=void 0);}get isDrawLoopRunning(){return this._isDrawLoopRunning}convertToLoadableFrameData(e){let t=this.getNextFrameId();this.frameDataPool.set(t,new Uint8ClampedArray(e.getFrameData()));let s=this.lastUsedModuleMirrorAxis==null?false:this.lastUsedModuleMirrorAxis!==this.Module.Axis.None;return {frameId:t,width:e.getWidth(),height:e.getHeight(),isFrameSourceMirrored:s}}createContext(e){var m,C,f,b,h;let t=this.getModeDeserializers(),s=c$1(location);(s==="localhost"||s==="127.0.0.1")&&navigator.userAgent.includes("Electron")&&e.appName!=null&&(s+=`-${e.appName}`),this.parentDomain=e.parentDomain,this.contextDeserializer=new this.Module.DataCaptureContextDeserializer(this.writableDataPath,e.deviceId,e.context.deviceModelName,s,this.parentDomain,t,e.delayedRegistration,e.highEndBlurryRecognition,this.resourcePath);let i=this.contextDeserializer.contextFromJson(JSON.stringify(e.context));if(i==null){let r=this.contextDeserializer.getLastError();throw new Error(`Could not create the context: ${r}`)}let a=i.getView();this.context=i.getContext(),i.delete();let d=this.Module.DataCaptureContextListener.extend("DataCaptureContextListener",{didChangeStatus:(r,o)=>{this.contextDidChangeStatus(JSON.parse(o.toJson())),r.delete();},didStartObservingContext:r=>{this.didStartObservingContext(),r.delete();},didStopObservingContext:r=>{r.delete();}}),p=this.Module.DataCaptureContextFrameListener.extend("DataCaptureContextFrameListener",{onObservationStarted:r=>{r.delete();},onObservationStopped:r=>{r.delete();},onFrameProcessingStarted:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingStarted"}),o.delete(),r.delete();},onFrameProcessingFinished:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingFinished"}),o.delete(),r.delete();},onFrameSkipped:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameSkipped"}),o.delete(),r.delete();}}),g=this.Module.GestureRecognizer.extend("GestureRecognizer",{setGestureListener:(r,o)=>{var w;(w=this.gestureListener)==null||w.delete(),this.gestureListener=r.clone(),r.delete();}});(m=this.gestureRecognizer)==null||m.delete(),this.gestureRecognizer=new g;let u=new d;this.context.addListener(u),u.delete();let c=new p;this.context.addFrameListener(c),c.delete(),this.setView(a),(C=this.view)==null||C.setGestureRecognizer(this.gestureRecognizer);let M=this.Module.PlatformHintPresenter.extend("PlatformHintPresenter",{setHintPresenter:r=>{r.delete();},showToast:r=>{this.workerFunctions.postMessage({type:"showToast",payload:JSON.parse(r)});},hideToast:r=>{this.workerFunctions.postMessage({type:"hideToast",payload:JSON.parse(r)});},showGuidance:r=>{this.workerFunctions.postMessage({type:"showGuidance",payload:JSON.parse(r)});},hideGuidance:r=>{this.workerFunctions.postMessage({type:"hideGuidance",payload:JSON.parse(r)});},startUpdateTimer:r=>{this.workerFunctions.postMessage({type:"startUpdateTimer",payload:{duration:{unit:"ms",value:r}}});},stopUpdateTimer:()=>{this.workerFunctions.postMessage({type:"stopUpdateTimer"});}});(f=this.hintPresenterV2)==null||f.delete(),this.hintPresenterV2=null,(b=this.webPlatformHintPresenter)==null||b.delete(),this.webPlatformHintPresenter=null,this.webPlatformHintPresenter=new M,this.view&&(this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter),(h=this.view)==null||h.setHintPresenterV2(this.hintPresenterV2));}onTap(e){var t;(t=this.gestureListener)==null||t.onTap(JSON.stringify(e));}hintPresenterV2Update(){var e;(e=this.hintPresenterV2)==null||e.update();}startReportingPerformanceMetrics(){this.performanceMetricsReporterTimer==null&&(this.performanceMetricsReporterTimer=setInterval(()=>{this.reportPerformanceMetrics();for(let e of Object.keys(this.performanceMetrics))this.performanceMetrics[e]=0;},1e3));}async reportPerformanceMetrics(){this.workerFunctions.postMessage({type:"performanceMetricsReport",payload:{...this.performanceMetrics}});}deleteFrameData(e){this.frameDataPool.delete(e);}dispose(){var e,t,s,i;this.context.dispose(),this.frameDataPool.clear(),this.isDrawLoopRunning=false,this.lastFrameCounter=-1,(e=this.gestureRecognizer)==null||e.delete(),this.gestureRecognizer=null,(t=this.gestureListener)==null||t.delete(),this.gestureListener=null,(s=this.hintPresenterV2)==null||s.delete(),this.hintPresenterV2=null,(i=this.webPlatformHintPresenter)==null||i.delete(),this.webPlatformHintPresenter=null;}flushAnalytics(){this.context.flushAnalytics();}extractCentaurusLicense(e){return {payload:{centaurus:{licenseKey:this.Module.LicenseUtils[D.get3dPartyLicenseKeyMethodName](e)}}}}getModeDeserializers(){return new this.Module.VectorDataCaptureModeDeserializer}loadLibrary(e){return this.libraryLoadingPromise!=null?this.libraryLoadingPromise:(this.libraryLoadingPromise=this.setup(e),this.libraryLoadingPromise)}processFrame(e){var a;if(this.context==null)return {payload:e,transferables:[e.data.buffer]};let t=e.data,s=e.colorType==="GRAYSCALE"?this.Module.ImageBufferFormat.Grayscale8:this.Module.ImageBufferFormat.Rgba8888,i=this.Module.allocateUint8Array(t.byteLength);return this.Module.HEAPU8.set(t,i),(a=this.imageFrameSource)==null||a.outputFrame(i,e.width,e.height,s),{payload:e,transferables:[e.data.buffer]}}reportCameraProperties(e){this.context.setCameraProperties(e.deviceId,e.isFrontFacing,e.hasAutofocus);}requestFrameData(e){let t=this.frameDataPool.get(e);return t==null?{payload:{data:null}}:{payload:{data:t},transferables:[t.buffer]}}scheduleRedraw(e,t){this.addRedrawRequest(t),this.isDrawLoopRunning||this.startDrawLoop(e);}sendViewRefreshCommands(e){this.workerFunctions.postMessage({type:"draw",payload:e},[e.buffer]);}setFrameSource(e,t){var s;this.lastUsedModuleMirrorAxis=this.mapMirrorAxisOnModule(e),(s=this.imageFrameSource)==null||s.delete(),this.imageFrameSource=new this.Module.ImageBufferFrameSource(this.lastUsedModuleMirrorAxis,t,0),this.context.setFrameSource(this.imageFrameSource);}startDrawLoop(e){this.isDrawLoopRunning=true;let t=a=>this.redrawRequests.length>0&&this.redrawRequests[0]<=a,s=a=>{for(;this.redrawRequests.length>0&&this.redrawRequests[0]<=a;)this.redrawRequests.shift();},i=()=>{this.loopTimeoutId=setTimeout(()=>{if(!this.isDrawLoopRunning)return;let a=performance.now();if(t(a)){s(a),e.draw();let d=e.getDrawCommands();this.sendViewRefreshCommands(new Uint8Array(d));}i();},this.redrawInterval);};i();}updateContext(e){if(this.context!=null&&this.contextDeserializer!=null){e.view!=null&&!e.view.visible&&this.context.flushAnalytics();let t=this.onBeforeUpdateContextHook(e),s=this.contextDeserializer.updateContextFromJson(this.context,this.view,JSON.stringify(t.context));if(s==null){let a=this.contextDeserializer.getLastError();throw new Error(`Could not update the context: ${a}`)}this.context.delete(),this.context=s.getContext();let i=s.getView();s.delete(),i!=null&&t.view!=null&&i.setViewSize(t.view.width,t.view.height,t.view.orientation),!this.hintPresenterV2&&this.webPlatformHintPresenter&&(this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter)),i!=null&&this.hintPresenterV2&&i.setHintPresenterV2(this.hintPresenterV2),this.gestureRecognizer!=null&&(i==null||i.setGestureRecognizer(this.gestureRecognizer)),this.setView(i),a.debug("context updated",t);}}onBeforeUpdateContextHook(e){return e}onDocumentVisibilityChange(e){e==="hidden"&&this.context.flushAnalytics();}isFeatureSupported(e){return {payload:{supported:this.context.isFeatureSupported(e)}}}getViewfinderInfo(){var e,t;return {payload:{isDisplayingViewfinder:(t=(e=this.view)==null?void 0:e.isDisplayingViewfinder())!=null?t:false,rect:JSON.parse(this.view.getViewfinderRect())}}}getOpenSourceSoftwareLicenseInfo(){return {payload:{licenseText:this.Module.OpenSourceSoftwareLicenseInfo.getLicenseText()}}}getNextFrameId(){return this.lastFrameCounter++,this.lastFrameCounter>=this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL&&(this.lastFrameCounter=0),this.lastFrameCounter}getWasmDynamicLibraries(e){return this.getWasmSideModuleFileName()==null?[]:[`${e.replace(/\/[^/]*$/,"/")}${this.getWasmSideModuleFileName()}`]}getWasmCoreExpectedHash(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_HASH:globalThis.SDC_WASM_CORE_MT_HASH:e?globalThis.SDC_WASM_CORE_SIMD_HASH:""}getWasmCoreFileName(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_FILE_NAME:globalThis.SDC_WASM_CORE_MT_FILE_NAME:e?globalThis.SDC_WASM_CORE_SIMD_FILE_NAME:""}getWasmMetadata(){return globalThis.WASM_METADATA}getWasmSideModuleFileName(){return ""}_loadProgressCallback(e){this.workerFunctions.postMessage({type:"loadLibraryProgress",payload:e});}addRedrawRequest(e){this.redrawRequests.push(Math.round(performance.now())+e),this.redrawRequests.sort((t,s)=>t-s);}contextDidChangeStatus(e){e.code===260?e.message=e.message.replace("domain name",`domain name (${c$1(location)})`):e.code===265&&(e.message=e.message.replace("domain name",`domain name (${this.parentDomain})`)),this.workerFunctions.postMessage({type:"contextDidChangeStatus",payload:e});}didStartObservingContext(){this.workerFunctions.postMessage({type:"didStartObservingContext"});}mapMirrorAxisOnModule(e){switch(e){case "None":return this.Module.Axis.None;case "X":return this.Module.Axis.X;case "Y":return this.Module.Axis.Y;default:return this.Module.Axis.None}}setView(e){this.view=e,this.setViewRefreshHandler(e),e==null&&(this.isDrawLoopRunning=false,this.sendViewRefreshCommands(new Uint8Array([])));}addNativeOverlay(e){a.warn("addNativeOverlay has not been implemented for this module",e);}removeNativeOverlay(e){a.warn("removeNativeOverlay has not been implemented for this module",e);}setViewRefreshHandler(e){if(e==null||e.isViewRefreshHandlerSet)return;let t=this.Module.NeedsRedrawDelegate.extend("NeedsRedrawDelegate",{setNeedsRedrawIn:this.scheduleRedraw.bind(this,e)}),s=new t;e.setNeedsRedrawDelegate(s),e.isViewRefreshHandlerSet=true;}setupDataDecoding(){let e=this.moduleHandler.get(),t=e.DataDecoding.extend("DataDecoding",{decode(s,i){try{let a=JSON.parse(i),d=[];for(let p of a){let g=new TextDecoder(p.ianaName,{fatal:true});d.push(g.decode(s.slice(p.startIndex,p.endIndex)));}return d.join("")}catch(a){return ""}}});e.setDataDecoding(new t);}start(e,t,s){e&&t&&(this.setupDataDecoding(),this.moduleHandler.get().callMain(),this.moduleHandler.get().__emscripten_proxy_main!==void 0||s());}getWritableDataPath(e){return e!=null?(a.debug(`IndexedDB database name override in use to recover from blocked standard database: ${e}`),e):this.writableDataPathStandard}numOfMBToPages(e){return Math.ceil(1024*e*1024/64/1024)}async setup({libraryLocation:e$1,locationPath:t,writableDataPathOverride:s,overrideThreadsSupport:i,overrideSimdSupport:a$7,verifyResponseHash:d$1,referredOrigin:p,fixedWasmMemory:g}){var x;let u=false,c=false;this.writableDataPath=this.getWritableDataPath(s),this.resourcePath=`${e$1}${this.resourceFilesSubfolder}/`,globalThis.path=t;let{resolve:M,reject:m,promise:C}=new a$1,f=a$2.sdkVersion();if(f==="")throw new a$3({name:"Invalid library version",message:"Library version is not defined or empty, cannot generate proper path to library files."});let[b,h]=await Promise.all([c$2(),e()]);i!=="auto"&&(h=i==="on"),a$7!=="auto"&&(b=a$7==="on");let r=this.getWasmCoreFileName(b,h),o=d(f,e$1,r),{jsURI:w,wasmURI:R}=o,H={instantiateWasm:(l,W)=>(a$6({importObject:l,wasmURI:R,expectedHash:this.getWasmCoreExpectedHash(b,h),verifyResponseHash:d$1,successCallback:W,progressCallback:this._loadProgressCallback,errorCallback:N=>{m(N);},referredOrigin:p}),{})},y=g===null?null:new WebAssembly.Memory({initial:this.numOfMBToPages(g),maximum:this.numOfMBToPages(300),shared:h});return y!==null&&a.log(a.Level.Debug,"Fixed wasmMemory set",y),this.moduleHandler.set({...y?{wasmMemory:y}:{},mainScriptUrlOrBlob:w,canvas:(x=this.workerFunctions.getOffscreenCanvas())!=null?x:{getContext:()=>null},...H,dynamicLibraries:this.getWasmDynamicLibraries(R),locateFile:l=>e$1+l,noInitialRun:true,preRun:[async()=>{try{await a$4({writableDataPath:this.writableDataPath});}catch(l){if(l.name==="BlockedIndexedDB"){m(l.toString());return}a.log(a.Level.Debug,"No IndexedDB support, some data will not be persisted:",l);}c=true,this.start(c,u,M);}],onMainComplete:()=>{if([u,c].includes(false)){a.log(a.Level.Warn,{runtimeLoaded:u,fileSystemSynced:c},"Both runtimeLoaded and fileSystemSynced should be true when calling onMainComplete"),m("onMainComplete has been called but runtime or file system was not ready.");return}M();},onRuntimeInitialized:()=>{u=true,this.start(c,u,M);},print:l=>{a.log(a.Level.Info,l);}}),await a$5(w,f)||m(`Couldn't retrieve Scandit Data Capture library at ${w}, did you configure the path for it correctly?`),C}};D.get3dPartyLicenseKeyMethodName=atob("Z2V0QmxpbmtJZExpY2Vuc2VLZXk=");var T=D;export{T as a};
|
|
1
|
+
import {a as a$4}from'./chunk-ZE2WH3AH.js';import {a as a$5}from'./chunk-G2BRTVN7.js';import {c as c$1,a as a$6}from'./chunk-4W2T3TLN.js';import {c}from'./chunk-UWLAKRB2.js';import {d}from'./chunk-AIC4H5KG.js';import {a as a$2}from'./chunk-VBNI76IP.js';import {a as a$1}from'./chunk-O7TZTIHO.js';import {a as a$3}from'./chunk-QCZSSQAQ.js';import {c as c$2,e}from'./chunk-42THCP2K.js';import {a}from'./chunk-XR65N6EG.js';var D=class D{constructor(e,t){this.hintPresenterV2=null;this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL=10;this.redrawInterval=1e3/30;this.redrawRequests=[];this._isDrawLoopRunning=false;this.frameDataPool=new Map;this.lastFrameCounter=-1;this.poorMansBenchmarkLogs=false;this.writableDataPathStandard="/scandit_sync_folder";this.resourceFilesSubfolder="resources";this.performanceMetricsReporterTimer=void 0;this.performanceMetrics={frameDataPoolSize:0,processedFramesCount:0,redrawRequestsCount:0,actualRedrawsCount:0};this.gestureListener=null;this.webPlatformHintPresenter=null;this.moduleHandler=e,this.workerFunctions=t,this._loadProgressCallback=this._loadProgressCallback.bind(this),c(this.getWasmMetadata());}get Module(){return this.moduleHandler.get()}set isDrawLoopRunning(e){this._isDrawLoopRunning=e,!e&&typeof this.loopTimeoutId=="number"&&(clearTimeout(this.loopTimeoutId),this.loopTimeoutId=void 0);}get isDrawLoopRunning(){return this._isDrawLoopRunning}convertToLoadableFrameData(e){let t=this.getNextFrameId();this.frameDataPool.set(t,new Uint8ClampedArray(e.getFrameData()));let s=this.lastUsedModuleMirrorAxis==null?false:this.lastUsedModuleMirrorAxis!==this.Module.Axis.None;return {frameId:t,width:e.getWidth(),height:e.getHeight(),isFrameSourceMirrored:s}}createContext(e){var m,C,f,b,h;let t=this.getModeDeserializers(),s=c$1(location);(s==="localhost"||s==="127.0.0.1")&&navigator.userAgent.includes("Electron")&&e.appName!=null&&(s+=`-${e.appName}`),this.parentDomain=e.parentDomain,this.contextDeserializer=new this.Module.DataCaptureContextDeserializer(this.writableDataPath,e.deviceId,e.context.deviceModelName,s,this.parentDomain,t,e.delayedRegistration,e.highEndBlurryRecognition,this.resourcePath);let i=this.contextDeserializer.contextFromJson(JSON.stringify(e.context));if(i==null){let r=this.contextDeserializer.getLastError();throw new Error(`Could not create the context: ${r}`)}let a=i.getView();this.context=i.getContext(),i.delete();let d=this.Module.DataCaptureContextListener.extend("DataCaptureContextListener",{didChangeStatus:(r,o)=>{this.contextDidChangeStatus(JSON.parse(o.toJson())),r.delete();},didStartObservingContext:r=>{this.didStartObservingContext(),r.delete();},didStopObservingContext:r=>{r.delete();}}),p=this.Module.DataCaptureContextFrameListener.extend("DataCaptureContextFrameListener",{onObservationStarted:r=>{r.delete();},onObservationStopped:r=>{r.delete();},onFrameProcessingStarted:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingStarted"}),o.delete(),r.delete();},onFrameProcessingFinished:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingFinished"}),o.delete(),r.delete();},onFrameSkipped:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameSkipped"}),o.delete(),r.delete();}}),g=this.Module.GestureRecognizer.extend("GestureRecognizer",{setGestureListener:(r,o)=>{var w;(w=this.gestureListener)==null||w.delete(),this.gestureListener=r.clone(),r.delete();}});(m=this.gestureRecognizer)==null||m.delete(),this.gestureRecognizer=new g;let u=new d;this.context.addListener(u),u.delete();let c=new p;this.context.addFrameListener(c),c.delete(),this.setView(a),(C=this.view)==null||C.setGestureRecognizer(this.gestureRecognizer);let M=this.Module.PlatformHintPresenter.extend("PlatformHintPresenter",{setHintPresenter:r=>{r.delete();},showToast:r=>{this.workerFunctions.postMessage({type:"showToast",payload:JSON.parse(r)});},hideToast:r=>{this.workerFunctions.postMessage({type:"hideToast",payload:JSON.parse(r)});},showGuidance:r=>{this.workerFunctions.postMessage({type:"showGuidance",payload:JSON.parse(r)});},hideGuidance:r=>{this.workerFunctions.postMessage({type:"hideGuidance",payload:JSON.parse(r)});},startUpdateTimer:r=>{this.workerFunctions.postMessage({type:"startUpdateTimer",payload:{duration:{unit:"ms",value:r}}});},stopUpdateTimer:()=>{this.workerFunctions.postMessage({type:"stopUpdateTimer"});}});(f=this.hintPresenterV2)==null||f.delete(),this.hintPresenterV2=null,(b=this.webPlatformHintPresenter)==null||b.delete(),this.webPlatformHintPresenter=null,this.webPlatformHintPresenter=new M,this.view&&(this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter),(h=this.view)==null||h.setHintPresenterV2(this.hintPresenterV2));}onTap(e){var t;(t=this.gestureListener)==null||t.onTap(JSON.stringify(e));}hintPresenterV2Update(){var e;(e=this.hintPresenterV2)==null||e.update();}startReportingPerformanceMetrics(){this.performanceMetricsReporterTimer==null&&(this.performanceMetricsReporterTimer=setInterval(()=>{this.reportPerformanceMetrics();for(let e of Object.keys(this.performanceMetrics))this.performanceMetrics[e]=0;},1e3));}async reportPerformanceMetrics(){this.workerFunctions.postMessage({type:"performanceMetricsReport",payload:{...this.performanceMetrics}});}deleteFrameData(e){this.frameDataPool.delete(e);}dispose(){var e,t,s,i;this.context.dispose(),this.frameDataPool.clear(),this.isDrawLoopRunning=false,this.lastFrameCounter=-1,(e=this.gestureRecognizer)==null||e.delete(),this.gestureRecognizer=null,(t=this.gestureListener)==null||t.delete(),this.gestureListener=null,(s=this.hintPresenterV2)==null||s.delete(),this.hintPresenterV2=null,(i=this.webPlatformHintPresenter)==null||i.delete(),this.webPlatformHintPresenter=null;}flushAnalytics(){this.context.flushAnalytics();}extractCentaurusLicense(e){return {payload:{centaurus:{licenseKey:this.Module.LicenseUtils[D.get3dPartyLicenseKeyMethodName](e)}}}}getModeDeserializers(){return new this.Module.VectorDataCaptureModeDeserializer}loadLibrary(e){return this.libraryLoadingPromise!=null?this.libraryLoadingPromise:(this.libraryLoadingPromise=this.setup(e),this.libraryLoadingPromise)}processFrame(e){var a;if(this.context==null)return {payload:e,transferables:[e.data.buffer]};let t=e.data,s=e.colorType==="GRAYSCALE"?this.Module.ImageBufferFormat.Grayscale8:this.Module.ImageBufferFormat.Rgba8888,i=this.Module.allocateUint8Array(t.byteLength);return this.Module.HEAPU8.set(t,i),(a=this.imageFrameSource)==null||a.outputFrame(i,e.width,e.height,s),{payload:e,transferables:[e.data.buffer]}}reportCameraProperties(e){this.context.setCameraProperties(e.deviceId,e.isFrontFacing,e.hasAutofocus);}requestFrameData(e){let t=this.frameDataPool.get(e);return t==null?{payload:{data:null}}:{payload:{data:t},transferables:[t.buffer]}}scheduleRedraw(e,t){this.addRedrawRequest(t),this.isDrawLoopRunning||this.startDrawLoop(e);}sendViewRefreshCommands(e){this.workerFunctions.postMessage({type:"draw",payload:e},[e.buffer]);}setFrameSource(e,t){var s;this.lastUsedModuleMirrorAxis=this.mapMirrorAxisOnModule(e),(s=this.imageFrameSource)==null||s.delete(),this.imageFrameSource=new this.Module.ImageBufferFrameSource(this.lastUsedModuleMirrorAxis,t,0),this.context.setFrameSource(this.imageFrameSource);}startDrawLoop(e){this.isDrawLoopRunning=true;let t=a=>this.redrawRequests.length>0&&this.redrawRequests[0]<=a,s=a=>{for(;this.redrawRequests.length>0&&this.redrawRequests[0]<=a;)this.redrawRequests.shift();},i=()=>{this.loopTimeoutId=setTimeout(()=>{if(!this.isDrawLoopRunning)return;let a=performance.now();if(t(a)){s(a),e.draw();let d=e.getDrawCommands();this.sendViewRefreshCommands(new Uint8Array(d));}i();},this.redrawInterval);};i();}updateContext(e){if(this.context!=null&&this.contextDeserializer!=null){e.view!=null&&!e.view.visible&&this.context.flushAnalytics();let t=this.onBeforeUpdateContextHook(e),s=this.contextDeserializer.updateContextFromJson(this.context,this.view,JSON.stringify(t.context));if(s==null){let a=this.contextDeserializer.getLastError();throw new Error(`Could not update the context: ${a}`)}this.context.delete(),this.context=s.getContext();let i=s.getView();s.delete(),i!=null&&t.view!=null&&i.setViewSize(t.view.width,t.view.height,t.view.orientation),!this.hintPresenterV2&&this.webPlatformHintPresenter&&(this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter)),i!=null&&this.hintPresenterV2&&i.setHintPresenterV2(this.hintPresenterV2),this.gestureRecognizer!=null&&(i==null||i.setGestureRecognizer(this.gestureRecognizer)),this.setView(i),a.debug("context updated",t);}}onBeforeUpdateContextHook(e){return e}onDocumentVisibilityChange(e){e==="hidden"&&this.context.flushAnalytics();}isFeatureSupported(e){return {payload:{supported:this.context.isFeatureSupported(e)}}}getViewfinderInfo(){var e,t;return {payload:{isDisplayingViewfinder:(t=(e=this.view)==null?void 0:e.isDisplayingViewfinder())!=null?t:false,rect:JSON.parse(this.view.getViewfinderRect())}}}getOpenSourceSoftwareLicenseInfo(){return {payload:{licenseText:this.Module.OpenSourceSoftwareLicenseInfo.getLicenseText()}}}getNextFrameId(){return this.lastFrameCounter++,this.lastFrameCounter>=this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL&&(this.lastFrameCounter=0),this.lastFrameCounter}getWasmDynamicLibraries(e){return this.getWasmSideModuleFileName()==null?[]:[`${e.replace(/\/[^/]*$/,"/")}${this.getWasmSideModuleFileName()}`]}getWasmCoreExpectedHash(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_HASH:globalThis.SDC_WASM_CORE_MT_HASH:e?globalThis.SDC_WASM_CORE_SIMD_HASH:""}getWasmCoreFileName(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_FILE_NAME:globalThis.SDC_WASM_CORE_MT_FILE_NAME:e?globalThis.SDC_WASM_CORE_SIMD_FILE_NAME:""}getWasmMetadata(){return globalThis.WASM_METADATA}getWasmSideModuleFileName(){return ""}_loadProgressCallback(e){this.workerFunctions.postMessage({type:"loadLibraryProgress",payload:e});}addRedrawRequest(e){this.redrawRequests.push(Math.round(performance.now())+e),this.redrawRequests.sort((t,s)=>t-s);}contextDidChangeStatus(e){e.code===260?e.message=e.message.replace("domain name",`domain name (${c$1(location)})`):e.code===265&&(e.message=e.message.replace("domain name",`domain name (${this.parentDomain})`)),this.workerFunctions.postMessage({type:"contextDidChangeStatus",payload:e});}didStartObservingContext(){this.workerFunctions.postMessage({type:"didStartObservingContext"});}mapMirrorAxisOnModule(e){switch(e){case "None":return this.Module.Axis.None;case "X":return this.Module.Axis.X;case "Y":return this.Module.Axis.Y;default:return this.Module.Axis.None}}setView(e){this.view=e,this.setViewRefreshHandler(e),e==null&&(this.isDrawLoopRunning=false,this.sendViewRefreshCommands(new Uint8Array([])));}addNativeOverlay(e){a.warn("addNativeOverlay has not been implemented for this module",e);}removeNativeOverlay(e){a.warn("removeNativeOverlay has not been implemented for this module",e);}setViewRefreshHandler(e){if(e==null||e.isViewRefreshHandlerSet)return;let t=this.Module.NeedsRedrawDelegate.extend("NeedsRedrawDelegate",{setNeedsRedrawIn:this.scheduleRedraw.bind(this,e)}),s=new t;e.setNeedsRedrawDelegate(s),e.isViewRefreshHandlerSet=true;}setupDataDecoding(){let e=this.moduleHandler.get(),t=e.DataDecoding.extend("DataDecoding",{decode(s,i){try{let a=JSON.parse(i),d=[];for(let p of a){let g=new TextDecoder(p.ianaName,{fatal:true});d.push(g.decode(s.slice(p.startIndex,p.endIndex)));}return d.join("")}catch(a){return ""}}});e.setDataDecoding(new t);}start(e,t,s){e&&t&&(this.setupDataDecoding(),this.moduleHandler.get().callMain(),this.moduleHandler.get().__emscripten_proxy_main!==void 0||s());}getWritableDataPath(e){return e!=null?(a.debug(`IndexedDB database name override in use to recover from blocked standard database: ${e}`),e):this.writableDataPathStandard}numOfMBToPages(e){return Math.ceil(1024*e*1024/64/1024)}async setup({libraryLocation:e$1,locationPath:t,writableDataPathOverride:s,overrideThreadsSupport:i,overrideSimdSupport:a$7,verifyResponseHash:d$1,referredOrigin:p,fixedWasmMemory:g}){var x;let u=false,c=false;this.writableDataPath=this.getWritableDataPath(s),this.resourcePath=`${e$1}${this.resourceFilesSubfolder}/`,globalThis.path=t;let{resolve:M,reject:m,promise:C}=new a$1,f=a$2.sdkVersion();if(f==="")throw new a$3({name:"Invalid library version",message:"Library version is not defined or empty, cannot generate proper path to library files."});let[b,h]=await Promise.all([c$2(),e()]);i!=="auto"&&(h=i==="on"),a$7!=="auto"&&(b=a$7==="on");let r=this.getWasmCoreFileName(b,h),o=d(f,e$1,r),{jsURI:w,wasmURI:R}=o,H={instantiateWasm:(l,W)=>(a$6({importObject:l,wasmURI:R,expectedHash:this.getWasmCoreExpectedHash(b,h),verifyResponseHash:d$1,successCallback:W,progressCallback:this._loadProgressCallback,errorCallback:N=>{m(N);},referredOrigin:p}),{})},y=g===null?null:new WebAssembly.Memory({initial:this.numOfMBToPages(g),maximum:this.numOfMBToPages(300),shared:h});return y!==null&&a.log(a.Level.Debug,"Fixed wasmMemory set",y),this.moduleHandler.set({...y?{wasmMemory:y}:{},mainScriptUrlOrBlob:w,canvas:(x=this.workerFunctions.getOffscreenCanvas())!=null?x:{getContext:()=>null},...H,dynamicLibraries:this.getWasmDynamicLibraries(R),locateFile:l=>e$1+l,noInitialRun:true,preRun:[async()=>{try{await a$4({writableDataPath:this.writableDataPath});}catch(l){if(l.name==="BlockedIndexedDB"){m(l.toString());return}a.log(a.Level.Debug,"No IndexedDB support, some data will not be persisted:",l);}c=true,this.start(c,u,M);}],onMainComplete:()=>{if([u,c].includes(false)){a.log(a.Level.Warn,{runtimeLoaded:u,fileSystemSynced:c},"Both runtimeLoaded and fileSystemSynced should be true when calling onMainComplete"),m("onMainComplete has been called but runtime or file system was not ready.");return}M();},onRuntimeInitialized:()=>{u=true,this.start(c,u,M);},print:l=>{a.log(a.Level.Info,l);}}),await a$5(w,f)||m(`Couldn't retrieve Scandit Data Capture library at ${w}, did you configure the path for it correctly?`),C}};D.get3dPartyLicenseKeyMethodName=atob("Z2V0QmxpbmtJZExpY2Vuc2VLZXk=");var T=D;export{T as a};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {a as a$3}from'./chunk-2QT7PJFA.js';import {a as a$2}from'./chunk-QUHRBS4G.js';import {e}from'./chunk-TB4UKDDI.js';import {a as a$7,b}from'./chunk-SM5S3DDC.js';import {a as a$6}from'./chunk-3A4KLILV.js';import {a as a$4}from'./chunk-MU6SADSF.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$5}from'./chunk-LSZZVJ6B.js';var E=(e=>(e.DidShow="didshow",e.DidHide="didhide",e.WillShow="willshow",e))(E||{}),o="--text-size",s="--text-color",n="--text-alignment",r="--text-weight",a="--line-height",l="--background-color",c="--corner-radius",h="--max-lines",w="ease-in-out",i=class i 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`
|
|
2
|
+
<div class="toast">
|
|
3
|
+
<slot name="first-child"></slot>
|
|
4
|
+
<div class="left">
|
|
5
|
+
<slot name="icon"></slot>
|
|
6
|
+
</div>
|
|
7
|
+
<p class="middle">
|
|
8
|
+
<slot></slot>
|
|
9
|
+
</p>
|
|
10
|
+
</div>
|
|
11
|
+
`,t.append(i.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{${o}:1rem;${s}:#000;${r}:400;${n}:${"center"};${a}:1.5rem;${l}:#fff;${c}:.25rem;${h}:2;align-items:flex-start;background-color:var(${l});border-radius:var(${c});color:var(${s});display:flex;flex-direction:row;font-size:var(${o});font-weight:var(${r});gap:.625rem;justify-content:var(${n});line-height:var(${a});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;margin:0;padding:0;text-align:var(${n});-webkit-line-clamp:var(${h});-webkit-box-orient:vertical;align-self:center;overflow:hidden;text-shadow:0 1px 2px #${e.withAlpha(.3).toJSON()}}p.middle{text-align:var(${n})}`}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:w}))}get hideAnimation(){return new Animation(new KeyframeEffect(this,[{opacity:1},{opacity:0}],{duration:this.animationDuration,fill:"both",easing:w}))}static create(){return i.register(),document.createElement(i.tag)}static register(){a$6({[i.tag]:i});}async show(){return this.toggle(true)}async hide(){return this.toggle(false)}connectedCallback(){this.render();}async toggle(t){var m,d;let e=t?"showing":"hiding";this.currentAnimation&&this._currentAnimationDirection===e&&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=e,this.currentAnimation=t?this.showAnimation:this.hideAnimation,t&&this.dispatchEvent(new CustomEvent("willshow",{bubbles:true})),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(o,`${this.hintStyle.textSize}px`),this.toast.style.setProperty(s,`#${this.hintStyle.textColor}`),this.toast.style.setProperty(r,this.hintStyle.textWeight.toString()),this.toast.style.setProperty(n,this.hintStyle.textAlignment),this.toast.style.setProperty(a,`${this.hintStyle.lineHeight/14}`),this.toast.style.setProperty(l,`#${this.hintStyle.backgroundColor}`),this.toast.style.setProperty(c,`${this.hintStyle.cornerRadius/10}rem`),this.toast.style.setProperty(h,this.hintStyle.maxLines.toString());for(let e of this.querySelectorAll("[slot=icon]"))e.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}`)));}}};i.tag="scandit-toast-hint";var A=i;export{E as a,A as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e;(o=>{function i(){let r="7.6.1";return r}o.sdkVersion=i;})(e||(e={}));export{e as a};
|
package/build/js/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { ConfigurePhase } from './sdk.js';
|
|
|
4
4
|
export { WorkerMain } from './worker/WorkerMain.js';
|
|
5
5
|
export { Anchor, Color, ColorJSON, Direction, JSONType, MarginsWithUnit, MarginsWithUnitJSON, MeasureUnit, NumberWithUnit, NumberWithUnitJSON, Orientation, Point, PointJSON, PointWithUnit, PointWithUnitJSON, Quadrilateral, QuadrilateralJSON, Rect, RectJSON, RectWithUnit, RectWithUnitJSON, Size, SizeJSON, SizeWithAspect, SizeWithUnit, SizeWithUnitAndAspect, SizeWithUnitAndAspectJSON, SizeWithUnitJSON, SizingMode } from './Common.js';
|
|
6
6
|
export { OverrideState } from './worker/OverrideState.js';
|
|
7
|
-
import { D as DataCaptureLoader } from './Camera-
|
|
8
|
-
export { g as Camera, h as CameraAccess, e as CameraJSON, C as CameraPosition, n as CameraSettings, k as CameraSettingsFromJSON, l as CameraSettingsJSON, j as CameraSettingsJSONBase, o as Change, H as ContextStatus, G as ContextStatusJSON, u as DataCaptureComponent, t as DataCaptureComponentJSON, B as DataCaptureContext, x as DataCaptureContextCreationOptions, y as DataCaptureContextJSON, E as DataCaptureContextListener, S as DataCaptureLoaderOptions, p as DataCaptureMode, r as DataCaptureModeJSON, J as DataCaptureOverlay, N as DataCaptureView, M as DataCaptureViewConnectOptions, L as DataCaptureViewJSON, K as DataCaptureViewListener, i as DeviceCamera, F as FocusGestureStrategy, O as FrameData, a as FrameSource, d as FrameSourceJSON, c as FrameSourceListener, b as FrameSourceState, P as PrivateChangeSet, s as PrivateDataCaptureComponent, w as PrivateDataCaptureContext, v as PrivateDataCaptureContextOptions, q as PrivateDataCaptureMode, A as PrivateFrameHandler, z as PrivateFrameHandlerResponse, Q as PrivateLoadableFrameData, I as PrivateMirrorAxis, T as TorchState, f as VideoFrameResolution, V as VideoResolution, R as convertToPublicFrameData, m as isCameraFrameSource } from './Camera-
|
|
7
|
+
import { D as DataCaptureLoader } from './Camera-C_4xOv5n.js';
|
|
8
|
+
export { g as Camera, h as CameraAccess, e as CameraJSON, C as CameraPosition, n as CameraSettings, k as CameraSettingsFromJSON, l as CameraSettingsJSON, j as CameraSettingsJSONBase, o as Change, H as ContextStatus, G as ContextStatusJSON, u as DataCaptureComponent, t as DataCaptureComponentJSON, B as DataCaptureContext, x as DataCaptureContextCreationOptions, y as DataCaptureContextJSON, E as DataCaptureContextListener, S as DataCaptureLoaderOptions, p as DataCaptureMode, r as DataCaptureModeJSON, J as DataCaptureOverlay, N as DataCaptureView, M as DataCaptureViewConnectOptions, L as DataCaptureViewJSON, K as DataCaptureViewListener, i as DeviceCamera, F as FocusGestureStrategy, O as FrameData, a as FrameSource, d as FrameSourceJSON, c as FrameSourceListener, b as FrameSourceState, P as PrivateChangeSet, s as PrivateDataCaptureComponent, w as PrivateDataCaptureContext, v as PrivateDataCaptureContextOptions, q as PrivateDataCaptureMode, A as PrivateFrameHandler, z as PrivateFrameHandlerResponse, Q as PrivateLoadableFrameData, I as PrivateMirrorAxis, T as TorchState, f as VideoFrameResolution, V as VideoResolution, R as convertToPublicFrameData, m as isCameraFrameSource } from './Camera-C_4xOv5n.js';
|
|
9
9
|
export { LoadingStatus, LoadingStatusSubscriber, ProgressInfo, default as loadingStatus } from './LoadingStatus.js';
|
|
10
10
|
export { DeepMutable, DeepPartial, DistributiveKeyOf, MethodSignature, Mutable, Optional, Prettify, assert, assertUnreachable, assertUnreachableThrowException } from './tsHelper.js';
|
|
11
11
|
export { AimerViewfinder } from './AimerViewfinder.js';
|
package/build/js/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$5}from'./chunks/chunk-GC2ECHKL.js';import {a as a$1}from'./chunks/chunk-ACFJP5SR.js';export{a as DataCaptureLoader}from'./chunks/chunk-VGSPU525.js';export{a as WorkerMain}from'./chunks/chunk-
|
|
1
|
+
import {a as a$5}from'./chunks/chunk-GC2ECHKL.js';import {a as a$1}from'./chunks/chunk-ACFJP5SR.js';export{a as DataCaptureLoader}from'./chunks/chunk-VGSPU525.js';export{a as WorkerMain}from'./chunks/chunk-KK47T3R2.js';export{a as OverrideState}from'./chunks/chunk-6W7FX6LD.js';import {a as a$6}from'./chunks/chunk-AIC4H5KG.js';export{a as NotificationBuilder}from'./chunks/chunk-VBRTZG3W.js';export{c as ScanditIconBuilder,b as ScanditIconForIconType,a as ScanditIconType}from'./chunks/chunk-6TG3MN7M.js';export{a as SingleImageUploader}from'./chunks/chunk-4TDWWHP2.js';export{a as SingleImageUploaderSettings}from'./chunks/chunk-5S5BT5PK.js';export{c as CameraFOVSwitchControl,b as CameraSwitchControl,a as TorchSwitchControl}from'./chunks/chunk-FS52JIW4.js';export{a as NoViewfinder}from'./chunks/chunk-4ZMCJXZS.js';export{a as convertToPublicFrameData}from'./chunks/chunk-UHFABUTI.js';export{a as ImageFrameSource}from'./chunks/chunk-BS7MAI4E.js';export{a as LaserlineViewfinder}from'./chunks/chunk-H75G3H4R.js';export{a as PrivateNoneLocationSelection,b as RadiusLocationSelection,c as RectangularLocationSelection}from'./chunks/chunk-AKDTQZ73.js';export{a as RectangularViewfinder}from'./chunks/chunk-6NVWG2LP.js';export{b as ScanditIcon,a as ScanditIconShape}from'./chunks/chunk-27Z5CYJL.js';export{a as DataCaptureVersion}from'./chunks/chunk-VBNI76IP.js';export{a as DataCaptureView}from'./chunks/chunk-BPNTTDTU.js';import {a as a$a}from'./chunks/chunk-N5YZEC56.js';export{a as AnchorPositions}from'./chunks/chunk-EKOWJS3E.js';export{a as NotificationConfiguration}from'./chunks/chunk-KUVVZN66.js';export{a as NotificationStyle}from'./chunks/chunk-RXT3JWWR.js';import {a as a$4}from'./chunks/chunk-VJB527QZ.js';import {a as a$3}from'./chunks/chunk-GHTCNOQN.js';export{a as Localization}from'./chunks/chunk-GHTCNOQN.js';export{a as Feedback}from'./chunks/chunk-N2GWO3EX.js';export{a as Sound}from'./chunks/chunk-AUWF33RB.js';export{a as Vibration}from'./chunks/chunk-SJJGHQ52.js';export{a as AimerViewfinder}from'./chunks/chunk-26DQPDMK.js';export{a as Brush}from'./chunks/chunk-PUP3NNKU.js';export{a as Camera}from'./chunks/chunk-Q5DQ3FTE.js';export{a as CameraAccess}from'./chunks/chunk-DFFYK2ZZ.js';export{a as DataCaptureContext}from'./chunks/chunk-L3BBOGIY.js';import {a as a$b,c}from'./chunks/chunk-LISC6VSM.js';import {a as a$2}from'./chunks/chunk-NKCR7VPO.js';import {b}from'./chunks/chunk-6H6FKGVE.js';export{b as loadingStatus}from'./chunks/chunk-6H6FKGVE.js';export{a as DataCaptureContextSettings}from'./chunks/chunk-7SW2PEHB.js';export{a as ScanditHTMLElement}from'./chunks/chunk-EV4OEANA.js';export{a as assert,b as assertUnreachable,c as assertUnreachableThrowException}from'./chunks/chunk-FTD535WI.js';import {a as a$9}from'./chunks/chunk-GPJEB376.js';import {a as a$c}from'./chunks/chunk-QCZSSQAQ.js';export{a as DataCaptureError}from'./chunks/chunk-QCZSSQAQ.js';import {a as a$8}from'./chunks/chunk-UCD6YLP3.js';export{a as BrowserHelper}from'./chunks/chunk-UCD6YLP3.js';export{a as Feature}from'./chunks/chunk-NVK73TNL.js';import {a as a$7}from'./chunks/chunk-XR65N6EG.js';export{a as Logger}from'./chunks/chunk-XR65N6EG.js';export{c as CameraPosition,g as CameraSettings,e as FocusGestureStrategy,a as FrameSourceState,b as TorchState,d as VideoResolution,f as isCameraFrameSource}from'./chunks/chunk-7ELPJFJV.js';export{c as RectangularViewfinderAnimation,b as RectangularViewfinderLineStyle,a as RectangularViewfinderStyle}from'./chunks/chunk-WGLHZXRT.js';export{a as LogoStyle,c as SwipeToZoom,b as TapToFocus}from'./chunks/chunk-GX4YCYCH.js';export{q as Anchor,n as Color,p as Direction,m as MarginsWithUnit,c as MeasureUnit,d as NumberWithUnit,o as Orientation,a as Point,e as PointWithUnit,b as Quadrilateral,f as Rect,g as RectWithUnit,i as Size,j as SizeWithAspect,h as SizeWithUnit,l as SizeWithUnitAndAspect,k as SizingMode}from'./chunks/chunk-TPQTY3KB.js';export{a as ContextStatus,b as PrivateMirrorAxis}from'./chunks/chunk-WUHKODFA.js';a$1();var a=a$2;async function A(){var e;a.configurePhase="unconfigured",a.configurePromise=null,(e=a.mainDataCaptureLoader)!=null&&e.terminateDataCaptureWorker&&await a.mainDataCaptureLoader.terminateDataCaptureWorker(true);}function g({percentage:e}){for(let r of a$a.values())r.setProgressBarPercentage(e);}function B(){var i,u,f;function e(b){return ["auto","off","on"].includes(b)}let r=new URLSearchParams(window.location.search),[o="auto",s="auto",n=false]=[(i=r.get("pthreads"))==null?void 0:i.toLowerCase(),(u=r.get("simd"))==null?void 0:u.toLowerCase(),((f=r.get("forceAllPolyfills"))==null?void 0:f.toLowerCase())==="true"];return {overrideThreadsSupport:e(o)?o:"auto",overrideSimdSupport:e(s)?s:"auto",forceAllPolyfills:n}}async function I(e){if(a$b()&&typeof e.licenseDataPath!="string")throw new a$c({name:"MisconfigurationError",message:'"licenseDataPath" string is missing or not valid'});if(a$b()&&typeof e.licenseDataPath=="string"){let o=await c({licenseDataPath:e.licenseDataPath});if(o==null)throw new Error("Cannot retrieve license key for Electron");e.licenseKey=o.licenseKey;}if(e.licenseKey==null||e.licenseKey.trim().length<64)throw new a$c({name:"NoLicenseKeyError",message:"No license key provided"});if(typeof e.libraryLocation!="string")throw new a$c({name:"MisconfigurationError",message:'Option "libraryLocation" was not provided'});if(!Array.isArray(e.moduleLoaders)||e.moduleLoaders.length===0)throw new a$c({name:"MisconfigurationError",message:'Option "moduleLoaders" is missing or empty'});let r=e.moduleLoaders.map(o=>o.moduleName);if(!["BarcodeCapture","IdCapture","LabelCapture"].includes(r[0]))throw new a$c({name:"MisconfigurationError",message:'Main modules must be loaded before side modules. For example "BarcodeCapture" must be loaded before "Parser".'})}async function z(e,r){let o=new Map,s=new Map;for(let n of e)s.set(n.moduleName,n.load(r));await Promise.all(s.values());for(let[n,i]of s)o.set(n,await i);return o}async function nr(e){if(a.configurePhase!=="unconfigured"&&a.configurePromise!=null)return a.configurePromise;a$3.getInstance().updateIfMissing(a$4);async function r(){var f;a$2.configurePhase="started";let{forceAllPolyfills:o,overrideThreadsSupport:s,overrideSimdSupport:n}=B();await a$5({forceAllPolyfills:o}),await I(e);let i={overrideThreadsSupport:s,overrideSimdSupport:n,...e,libraryLocation:a$6(e.libraryLocation),logLevel:(f=e.logLevel)!=null?f:a$7.Level.Debug,verifyResponseHash:true,loadProgressNotifier:b.notify.bind(b)};a$7.setLevel(i.logLevel),a$2.userLicenseKey=i.licenseKey,a$2.libraryLocation=i.libraryLocation,b.subscribe(g);let u=a$8.checkBrowserCompatibility();if(!u.fullSupport&&!u.scannerSupport)throw new a$9(u);a$8.isSupportedIOSVersion()||a$7.log(a$7.Level.Warn,`Warning: Minimum supported iOS version is 14.6.
|
|
2
2
|
Please check the minimum system requirements here:
|
|
3
3
|
https://docs.scandit.com/system-requirements#web-sdk`),a$2.dataCaptureLoaders=await z(i.moduleLoaders,i),a$2.mainDataCaptureLoader=[...a$2.dataCaptureLoaders.entries()][0][1],a$2.configurePhase="done",b.unsubscribe(g);}return a$2.configurePromise=r().catch(o=>{throw A(),b.unsubscribe(g),o}),a$2.configurePromise}function mr(e,r){switch(a.configurePhase=e,e){case "done":r&&(a.mainDataCaptureLoader=r),a.configurePromise=Promise.resolve();break;case "unconfigured":a.configurePromise=null;break;default:throw new Error(`Invalid configure phase: ${e}`)}}
|
|
4
4
|
export{mr as __setConfigurePhase,nr as configure,A as resetConfigure};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
export { bs as AspectRatio, bu as CameraAccess, bq as CameraPosition, br as CameraResolutionConstraint, bt as DeviceCamera } from '../Camera-
|
|
2
|
+
export { bs as AspectRatio, bu as CameraAccess, bq as CameraPosition, br as CameraResolutionConstraint, bt as DeviceCamera } from '../Camera-C_4xOv5n.js';
|
|
3
3
|
import './Serializable.js';
|
|
4
4
|
import '../Common.js';
|
|
5
5
|
import './FrameReaders/WatermarkStack.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
export { bD as CameraManager, bB as CameraManagerEvent, bC as CameraManagerEventParameters, bx as CameraResolutionConstraint, by as ExtendedMediaTrackCapabilities, bz as ExtendedMediaTrackConstraintSet, bo as FrameCapture, bA as GUI, bw as MeteringMode } from '../Camera-
|
|
2
|
+
export { bD as CameraManager, bB as CameraManagerEvent, bC as CameraManagerEventParameters, bx as CameraResolutionConstraint, by as ExtendedMediaTrackCapabilities, bz as ExtendedMediaTrackConstraintSet, bo as FrameCapture, bA as GUI, bw as MeteringMode } from '../Camera-C_4xOv5n.js';
|
|
3
3
|
import '../Common.js';
|
|
4
4
|
import './Serializable.js';
|
|
5
5
|
import './FrameReaders/WatermarkStack.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
import { PrivateCanvasDrawer } from './CanvasDrawer.js';
|
|
3
3
|
import '../ScanditIcon.js';
|
|
4
|
-
import { W as PerformanceMetrics } from '../Camera-
|
|
4
|
+
import { W as PerformanceMetrics } from '../Camera-C_4xOv5n.js';
|
|
5
5
|
import './CavansDrawerAbstract.js';
|
|
6
6
|
import './DrawCommandBuffer.js';
|
|
7
7
|
import '../Common.js';
|
|
@@ -7,7 +7,7 @@ import '../ScanditIcon.js';
|
|
|
7
7
|
import '../Common.js';
|
|
8
8
|
import './Serializable.js';
|
|
9
9
|
import './utils/ScanditHTMLElement.js';
|
|
10
|
-
import '../Camera-
|
|
10
|
+
import '../Camera-C_4xOv5n.js';
|
|
11
11
|
import './FrameReaders/WatermarkStack.js';
|
|
12
12
|
import '../tsHelper.js';
|
|
13
13
|
import '../DataCaptureContextSettings.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { B as DataCaptureContext, O as FrameData } from '../Camera-
|
|
2
|
+
import { B as DataCaptureContext, O as FrameData } from '../Camera-C_4xOv5n.js';
|
|
3
3
|
import './Serializable.js';
|
|
4
4
|
import '../Common.js';
|
|
5
5
|
import './FrameReaders/WatermarkStack.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
export { bm as ColorType, bp as FrameReader } from '../../Camera-
|
|
2
|
+
export { bm as ColorType, bp as FrameReader } from '../../Camera-C_4xOv5n.js';
|
|
3
3
|
import '../Serializable.js';
|
|
4
4
|
import '../../Common.js';
|
|
5
5
|
import './WatermarkStack.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
export { bl as FrameReaderAbstract, bn as PoolCapacityOptions } from '../../Camera-
|
|
2
|
+
export { bl as FrameReaderAbstract, bn as PoolCapacityOptions } from '../../Camera-C_4xOv5n.js';
|
|
3
3
|
import './WatermarkStack.js';
|
|
4
4
|
import '../../tsHelper.js';
|
|
5
5
|
import '../Serializable.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { bl as FrameReaderAbstract, bm as ColorType, bn as PoolCapacityOptions, bo as FrameCapture } from '../../Camera-
|
|
2
|
+
import { bl as FrameReaderAbstract, bm as ColorType, bn as PoolCapacityOptions, bo as FrameCapture } from '../../Camera-C_4xOv5n.js';
|
|
3
3
|
import { WatermarkStack } from './WatermarkStack.js';
|
|
4
4
|
import { Optional } from '../../tsHelper.js';
|
|
5
5
|
import '../Serializable.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
export { bp as FrameReader, bl as FrameReaderAbstract, bm as FrameReaderType } from '../../Camera-
|
|
2
|
+
export { bp as FrameReader, bl as FrameReaderAbstract, bm as FrameReaderType } from '../../Camera-C_4xOv5n.js';
|
|
3
3
|
export { GrayScaleFrameReader } from './GrayScaleFrameReader.js';
|
|
4
4
|
import '../Serializable.js';
|
|
5
5
|
import '../../Common.js';
|
|
@@ -8,7 +8,7 @@ import '../ScanditIcon.js';
|
|
|
8
8
|
import '../Common.js';
|
|
9
9
|
import './Serializable.js';
|
|
10
10
|
import './utils/ScanditHTMLElement.js';
|
|
11
|
-
import '../Camera-
|
|
11
|
+
import '../Camera-C_4xOv5n.js';
|
|
12
12
|
import './FrameReaders/WatermarkStack.js';
|
|
13
13
|
import '../tsHelper.js';
|
|
14
14
|
import '../DataCaptureContextSettings.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { N as DataCaptureView, a as FrameSource, B as DataCaptureContext } from '../Camera-
|
|
2
|
+
import { N as DataCaptureView, a as FrameSource, B as DataCaptureContext } from '../Camera-C_4xOv5n.js';
|
|
3
3
|
import { Control, TorchSwitchControl, CameraSwitchControl, CameraFOVSwitchControl } from '../ViewControls.js';
|
|
4
4
|
import './Serializable.js';
|
|
5
5
|
import '../Common.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
import { ScanditIcon } from '../../../ScanditIcon.js';
|
|
3
3
|
import { ScanditHTMLElement } from '../../utils/ScanditHTMLElement.js';
|
|
4
|
-
import { Z as GenericHint } from '../../../Camera-
|
|
4
|
+
import { Z as GenericHint } from '../../../Camera-C_4xOv5n.js';
|
|
5
5
|
import '../../../Common.js';
|
|
6
6
|
import '../../Serializable.js';
|
|
7
7
|
import '../../FrameReaders/WatermarkStack.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as Toast,a as ToastEvents}from'../../../chunks/chunk-
|
|
1
|
+
export{b as Toast,a as ToastEvents}from'../../../chunks/chunk-REEU55IG.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import '../../../ScanditIcon.js';
|
|
3
3
|
import '../../utils/ScanditHTMLElement.js';
|
|
4
4
|
import '../../../Common.js';
|
|
5
|
-
export { U as HintPresenter, bv as HintPresenterEvents } from '../../../Camera-
|
|
5
|
+
export { U as HintPresenter, bv as HintPresenterEvents } from '../../../Camera-C_4xOv5n.js';
|
|
6
6
|
import '../../Serializable.js';
|
|
7
7
|
import '../../FrameReaders/WatermarkStack.js';
|
|
8
8
|
import '../../../tsHelper.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as HintPresenter,a as HintPresenterEvents}from'../../../chunks/chunk-
|
|
1
|
+
export{b as HintPresenter,a as HintPresenterEvents}from'../../../chunks/chunk-DUFF6WVD.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="emscripten" />
|
|
2
|
+
/**
|
|
3
|
+
* Creates a valid DOM ID from a list of values.
|
|
4
|
+
*
|
|
5
|
+
* This function takes an array of values and creates a deterministic, valid DOM ID.
|
|
6
|
+
* The resulting ID is human-readable and follows HTML5 ID rules.
|
|
7
|
+
*
|
|
8
|
+
* @param values - Array of string values to create an ID from
|
|
9
|
+
* @param prefix - Optional prefix for the ID (defaults to "id")
|
|
10
|
+
* @returns A valid DOM ID string
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* domIdFromValues(["red", "white", "center"]) // Returns "id-red-white-center"
|
|
14
|
+
* domIdFromValues(["Toast", "Move Closer!"], "hint") // Returns "hint-toast-move_closer"
|
|
15
|
+
*/
|
|
16
|
+
declare function domIdFromValues(values: string[], prefix?: string): string;
|
|
17
|
+
|
|
18
|
+
export { domIdFromValues };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as domIdFromValues}from'../../chunks/chunk-2LSO6JEZ.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as wait}from'../../chunks/chunk-UZWBB65W.js';export{a as waitTransitionEndForElement}from'../../chunks/chunk-2HTI5D6Y.js';export{b as safeAwaitAnimation,a as safeCancelAnimation}from'../../chunks/chunk-SM5S3DDC.js';export{a as throttle}from'../../chunks/chunk-T3AOBMAS.js';export{a as
|
|
1
|
+
export{a as Timeout}from'../../chunks/chunk-Q7JWDX4U.js';export{a as wait}from'../../chunks/chunk-UZWBB65W.js';export{a as waitTransitionEndForElement}from'../../chunks/chunk-2HTI5D6Y.js';export{b as safeAwaitAnimation,a as safeCancelAnimation}from'../../chunks/chunk-SM5S3DDC.js';export{a as throttle}from'../../chunks/chunk-T3AOBMAS.js';export{a as defineCustomElements}from'../../chunks/chunk-3A4KLILV.js';export{a as domIdFromValues}from'../../chunks/chunk-2LSO6JEZ.js';export{a as html}from'../../chunks/chunk-MU6SADSF.js';export{a as ScanditHTMLElement}from'../../chunks/chunk-EV4OEANA.js';export{a as clamp}from'../../chunks/chunk-L2STPTEN.js';export{a as unknownErrorToString}from'../../chunks/chunk-AIRWHLJH.js';export{a as isWorkerScope}from'../../chunks/chunk-QCRFVRSS.js';export{a as isObject}from'../../chunks/chunk-FGO2SSRS.js';export{a as Deferred}from'../../chunks/chunk-O7TZTIHO.js';export{a as css}from'../../chunks/chunk-LSZZVJ6B.js';export{a as fromEntries}from'../../chunks/chunk-RG272MAJ.js';export{a as debounce}from'../../chunks/chunk-R6E4CT22.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Size } from '../../Common.js';
|
|
3
3
|
import { Optional } from '../../tsHelper.js';
|
|
4
4
|
import '../../ScanditIcon.js';
|
|
5
|
-
import '../../Camera-
|
|
5
|
+
import '../../Camera-C_4xOv5n.js';
|
|
6
6
|
import '../Serializable.js';
|
|
7
7
|
import './ScanditHTMLElement.js';
|
|
8
8
|
import '../FrameReaders/WatermarkStack.js';
|
package/build/js/sdk.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
import { LoadingStatus } from './LoadingStatus.js';
|
|
3
3
|
import './ScanditIcon.js';
|
|
4
|
-
import { D as DataCaptureLoader } from './Camera-
|
|
4
|
+
import { D as DataCaptureLoader } from './Camera-C_4xOv5n.js';
|
|
5
5
|
import './Common.js';
|
|
6
6
|
import './private/Serializable.js';
|
|
7
7
|
import './private/utils/ScanditHTMLElement.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { X as DataCaptureEngine, Y as Module, _ as AnyDataCaptureActionMessage, $ as AugmentedWorker, a0 as ModuleHandler, a1 as DataCaptureCallbackMessage, a2 as DataCaptureActionMessageKey, a3 as EngineWorkerResponse } from '../Camera-
|
|
2
|
+
import { X as DataCaptureEngine, Y as Module, _ as AnyDataCaptureActionMessage, $ as AugmentedWorker, a0 as ModuleHandler, a1 as DataCaptureCallbackMessage, a2 as DataCaptureActionMessageKey, a3 as EngineWorkerResponse } from '../Camera-C_4xOv5n.js';
|
|
3
3
|
import '../private/Serializable.js';
|
|
4
4
|
import '../Common.js';
|
|
5
5
|
import '../private/FrameReaders/WatermarkStack.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as WorkerMain}from'../chunks/chunk-
|
|
1
|
+
export{a as WorkerMain}from'../chunks/chunk-KK47T3R2.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { X as DataCaptureEngine, Y as Module } from '../Camera-
|
|
2
|
+
import { X as DataCaptureEngine, Y as Module } from '../Camera-C_4xOv5n.js';
|
|
3
3
|
import { WorkerMain } from './WorkerMain.js';
|
|
4
4
|
import '../private/Serializable.js';
|
|
5
5
|
import '../Common.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as InlineWorker,a as workerInstance}from'../chunks/chunk-
|
|
1
|
+
export{b as InlineWorker,a as workerInstance}from'../chunks/chunk-ECRBANIT.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
export { bf as CreateContextParameters, X as DataCaptureEngine, be as LoadLibraryParameters, bi as ProcessFrameParameters, bj as ReportCameraPropertiesParameters, bh as SetFrameSourceParameters, bg as UpdateContextParameters, bk as WorkerFunctions } from '../Camera-
|
|
2
|
+
export { bf as CreateContextParameters, X as DataCaptureEngine, be as LoadLibraryParameters, bi as ProcessFrameParameters, bj as ReportCameraPropertiesParameters, bh as SetFrameSourceParameters, bg as UpdateContextParameters, bk as WorkerFunctions } from '../Camera-C_4xOv5n.js';
|
|
3
3
|
import './OverrideState.js';
|
|
4
4
|
import '../LoadingStatus.js';
|
|
5
5
|
import '../Common.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as DataCaptureEngine}from'../chunks/chunk-
|
|
1
|
+
export{a as DataCaptureEngine}from'../chunks/chunk-M6SPJT67.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
import './OverrideState.js';
|
|
3
|
-
export { D as DataCaptureLoader, S as DataCaptureLoaderOptions } from '../Camera-
|
|
3
|
+
export { D as DataCaptureLoader, S as DataCaptureLoaderOptions } from '../Camera-C_4xOv5n.js';
|
|
4
4
|
import '../logger.js';
|
|
5
5
|
import '../LoadingStatus.js';
|
|
6
6
|
import '../ScanditIcon.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
import '../Common.js';
|
|
3
|
-
export { as as AddNativeOverlayAction, _ as AnyDataCaptureActionMessage, $ as AugmentedWorker, aW as CaptureModeDeserializerInstance, ab as CreateContextDataCaptureAction, a2 as DataCaptureActionMessageKey, a1 as DataCaptureCallbackMessage, au as DataCaptureCallbackMessageKeys, aO as DataCaptureContext, aV as DataCaptureContextDeserializer, aU as DataCaptureContextDeserializerResult, aP as DataCaptureImageBufferFrameSource, aS as DataCaptureView, aM as DataCaptureWorker, af as DeleteFrameDataDataCaptureAction, aB as DidTapTrackedBarcode, aj as DisposeDataCaptureAction, aN as EmscriptenClassHandle, a3 as EngineWorkerResponse, an as ExtractCentaurusLicenseDataCaptureAction, a4 as ExtractCentaurusLicenseResponse, ak as FlushAnalyticsDataCaptureAction, Z as GenericHint, aQ as GestureListener, aR as GestureRecognizer, ar as GetOpenSourceSoftwareLicenseInfoAction, a8 as GetOpenSourceSoftwareLicenseInfoResponse, a7 as GetViewfinderInfo, aq as GetViewfinderInfoAction, b8 as GuidanceHint, b6 as GuidanceHintAnchor, b7 as GuidanceHintStyle, aI as HideGuidanceMessage, az as HideHintWorkerMessage, aG as HideToastMessage, b4 as HintAnchor, b2 as HintCornerStyle, a_ as HintFont, b1 as HintHeight, b3 as HintIcon, bc as HintPresenterV2, ap as HintPresenterV2updateAction, b5 as HintStyle, a$ as HintTextAlignment, b0 as HintWidth, ah as IsFeatureSupportedAction, ay as IsFeatureSupportedMessage, a6 as IsFeatureSupportedResponse, aT as JSONParseable, bb as LicensedFeature, aa as LoadLibraryDataCaptureAction, Y as Module, a0 as ModuleHandler, aX as ModuleMirrorAxis, aD as OnFrameProcessingFinishedMessage, aC as OnFrameProcessingStartedMessage, aE as OnFrameSkippedMessage, ao as OnTapAction, aL as PayloadForCommand, W as PerformanceMetrics, aA as PerformanceMetricsReportMessage, bd as PlatformHintPresenter, ad as ProcessFrameDataCaptureAction, at as RemoveNativeOverlayAction, al as ReportCameraPropertiesDataCaptureAction, ae as RequestFrameDataDataCaptureAction, a5 as RequestFrameDataResponse, ac as SetFrameSourceDataCaptureAction, am as SetLogLevelDataCaptureAction, aH as ShowGuidanceMessage, aw as ShowHintWorkerMessage, aF as ShowToastMessage, aJ as StartUpdateTimerMessage, aK as StopUpdateTimerMessage, av as SuccessFeedbackWorkerMessage, ba as ToastHint, b9 as ToastHintStyle, ai as UpdateContextDataCaptureAction, ax as UpdateHintWorkerMessage, aY as Vector, ag as VisibilityChangeAction, aZ as WasmFrameData, a9 as WorkerResponse } from '../Camera-
|
|
3
|
+
export { as as AddNativeOverlayAction, _ as AnyDataCaptureActionMessage, $ as AugmentedWorker, aW as CaptureModeDeserializerInstance, ab as CreateContextDataCaptureAction, a2 as DataCaptureActionMessageKey, a1 as DataCaptureCallbackMessage, au as DataCaptureCallbackMessageKeys, aO as DataCaptureContext, aV as DataCaptureContextDeserializer, aU as DataCaptureContextDeserializerResult, aP as DataCaptureImageBufferFrameSource, aS as DataCaptureView, aM as DataCaptureWorker, af as DeleteFrameDataDataCaptureAction, aB as DidTapTrackedBarcode, aj as DisposeDataCaptureAction, aN as EmscriptenClassHandle, a3 as EngineWorkerResponse, an as ExtractCentaurusLicenseDataCaptureAction, a4 as ExtractCentaurusLicenseResponse, ak as FlushAnalyticsDataCaptureAction, Z as GenericHint, aQ as GestureListener, aR as GestureRecognizer, ar as GetOpenSourceSoftwareLicenseInfoAction, a8 as GetOpenSourceSoftwareLicenseInfoResponse, a7 as GetViewfinderInfo, aq as GetViewfinderInfoAction, b8 as GuidanceHint, b6 as GuidanceHintAnchor, b7 as GuidanceHintStyle, aI as HideGuidanceMessage, az as HideHintWorkerMessage, aG as HideToastMessage, b4 as HintAnchor, b2 as HintCornerStyle, a_ as HintFont, b1 as HintHeight, b3 as HintIcon, bc as HintPresenterV2, ap as HintPresenterV2updateAction, b5 as HintStyle, a$ as HintTextAlignment, b0 as HintWidth, ah as IsFeatureSupportedAction, ay as IsFeatureSupportedMessage, a6 as IsFeatureSupportedResponse, aT as JSONParseable, bb as LicensedFeature, aa as LoadLibraryDataCaptureAction, Y as Module, a0 as ModuleHandler, aX as ModuleMirrorAxis, aD as OnFrameProcessingFinishedMessage, aC as OnFrameProcessingStartedMessage, aE as OnFrameSkippedMessage, ao as OnTapAction, aL as PayloadForCommand, W as PerformanceMetrics, aA as PerformanceMetricsReportMessage, bd as PlatformHintPresenter, ad as ProcessFrameDataCaptureAction, at as RemoveNativeOverlayAction, al as ReportCameraPropertiesDataCaptureAction, ae as RequestFrameDataDataCaptureAction, a5 as RequestFrameDataResponse, ac as SetFrameSourceDataCaptureAction, am as SetLogLevelDataCaptureAction, aH as ShowGuidanceMessage, aw as ShowHintWorkerMessage, aF as ShowToastMessage, aJ as StartUpdateTimerMessage, aK as StopUpdateTimerMessage, av as SuccessFeedbackWorkerMessage, ba as ToastHint, b9 as ToastHintStyle, ai as UpdateContextDataCaptureAction, ax as UpdateHintWorkerMessage, aY as Vector, ag as VisibilityChangeAction, aZ as WasmFrameData, a9 as WorkerResponse } from '../Camera-C_4xOv5n.js';
|
|
4
4
|
import '../LoadingStatus.js';
|
|
5
5
|
import '../logger.js';
|
|
6
6
|
import '../private/Serializable.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
export { WorkerMain } from './WorkerMain.js';
|
|
3
|
-
export { as as AddNativeOverlayAction, _ as AnyDataCaptureActionMessage, $ as AugmentedWorker, aW as CaptureModeDeserializerInstance, ab as CreateContextDataCaptureAction, bf as CreateContextParameters, a2 as DataCaptureActionMessageKey, a1 as DataCaptureCallbackMessage, au as DataCaptureCallbackMessageKeys, aO as DataCaptureContext, aV as DataCaptureContextDeserializer, aU as DataCaptureContextDeserializerResult, X as DataCaptureEngine, aP as DataCaptureImageBufferFrameSource, D as DataCaptureLoader, S as DataCaptureLoaderOptions, aS as DataCaptureView, aM as DataCaptureWorker, af as DeleteFrameDataDataCaptureAction, aB as DidTapTrackedBarcode, aj as DisposeDataCaptureAction, aN as EmscriptenClassHandle, a3 as EngineWorkerResponse, an as ExtractCentaurusLicenseDataCaptureAction, a4 as ExtractCentaurusLicenseResponse, ak as FlushAnalyticsDataCaptureAction, Z as GenericHint, aQ as GestureListener, aR as GestureRecognizer, ar as GetOpenSourceSoftwareLicenseInfoAction, a8 as GetOpenSourceSoftwareLicenseInfoResponse, a7 as GetViewfinderInfo, aq as GetViewfinderInfoAction, b8 as GuidanceHint, b6 as GuidanceHintAnchor, b7 as GuidanceHintStyle, aI as HideGuidanceMessage, az as HideHintWorkerMessage, aG as HideToastMessage, b4 as HintAnchor, b2 as HintCornerStyle, a_ as HintFont, b1 as HintHeight, b3 as HintIcon, bc as HintPresenterV2, ap as HintPresenterV2updateAction, b5 as HintStyle, a$ as HintTextAlignment, b0 as HintWidth, ah as IsFeatureSupportedAction, ay as IsFeatureSupportedMessage, a6 as IsFeatureSupportedResponse, aT as JSONParseable, bb as LicensedFeature, aa as LoadLibraryDataCaptureAction, be as LoadLibraryParameters, Y as Module, a0 as ModuleHandler, aX as ModuleMirrorAxis, aD as OnFrameProcessingFinishedMessage, aC as OnFrameProcessingStartedMessage, aE as OnFrameSkippedMessage, ao as OnTapAction, aL as PayloadForCommand, W as PerformanceMetrics, aA as PerformanceMetricsReportMessage, bd as PlatformHintPresenter, ad as ProcessFrameDataCaptureAction, bi as ProcessFrameParameters, at as RemoveNativeOverlayAction, al as ReportCameraPropertiesDataCaptureAction, bj as ReportCameraPropertiesParameters, ae as RequestFrameDataDataCaptureAction, a5 as RequestFrameDataResponse, ac as SetFrameSourceDataCaptureAction, bh as SetFrameSourceParameters, am as SetLogLevelDataCaptureAction, aH as ShowGuidanceMessage, aw as ShowHintWorkerMessage, aF as ShowToastMessage, aJ as StartUpdateTimerMessage, aK as StopUpdateTimerMessage, av as SuccessFeedbackWorkerMessage, ba as ToastHint, b9 as ToastHintStyle, ai as UpdateContextDataCaptureAction, bg as UpdateContextParameters, ax as UpdateHintWorkerMessage, aY as Vector, ag as VisibilityChangeAction, aZ as WasmFrameData, bk as WorkerFunctions, a9 as WorkerResponse } from '../Camera-
|
|
3
|
+
export { as as AddNativeOverlayAction, _ as AnyDataCaptureActionMessage, $ as AugmentedWorker, aW as CaptureModeDeserializerInstance, ab as CreateContextDataCaptureAction, bf as CreateContextParameters, a2 as DataCaptureActionMessageKey, a1 as DataCaptureCallbackMessage, au as DataCaptureCallbackMessageKeys, aO as DataCaptureContext, aV as DataCaptureContextDeserializer, aU as DataCaptureContextDeserializerResult, X as DataCaptureEngine, aP as DataCaptureImageBufferFrameSource, D as DataCaptureLoader, S as DataCaptureLoaderOptions, aS as DataCaptureView, aM as DataCaptureWorker, af as DeleteFrameDataDataCaptureAction, aB as DidTapTrackedBarcode, aj as DisposeDataCaptureAction, aN as EmscriptenClassHandle, a3 as EngineWorkerResponse, an as ExtractCentaurusLicenseDataCaptureAction, a4 as ExtractCentaurusLicenseResponse, ak as FlushAnalyticsDataCaptureAction, Z as GenericHint, aQ as GestureListener, aR as GestureRecognizer, ar as GetOpenSourceSoftwareLicenseInfoAction, a8 as GetOpenSourceSoftwareLicenseInfoResponse, a7 as GetViewfinderInfo, aq as GetViewfinderInfoAction, b8 as GuidanceHint, b6 as GuidanceHintAnchor, b7 as GuidanceHintStyle, aI as HideGuidanceMessage, az as HideHintWorkerMessage, aG as HideToastMessage, b4 as HintAnchor, b2 as HintCornerStyle, a_ as HintFont, b1 as HintHeight, b3 as HintIcon, bc as HintPresenterV2, ap as HintPresenterV2updateAction, b5 as HintStyle, a$ as HintTextAlignment, b0 as HintWidth, ah as IsFeatureSupportedAction, ay as IsFeatureSupportedMessage, a6 as IsFeatureSupportedResponse, aT as JSONParseable, bb as LicensedFeature, aa as LoadLibraryDataCaptureAction, be as LoadLibraryParameters, Y as Module, a0 as ModuleHandler, aX as ModuleMirrorAxis, aD as OnFrameProcessingFinishedMessage, aC as OnFrameProcessingStartedMessage, aE as OnFrameSkippedMessage, ao as OnTapAction, aL as PayloadForCommand, W as PerformanceMetrics, aA as PerformanceMetricsReportMessage, bd as PlatformHintPresenter, ad as ProcessFrameDataCaptureAction, bi as ProcessFrameParameters, at as RemoveNativeOverlayAction, al as ReportCameraPropertiesDataCaptureAction, bj as ReportCameraPropertiesParameters, ae as RequestFrameDataDataCaptureAction, a5 as RequestFrameDataResponse, ac as SetFrameSourceDataCaptureAction, bh as SetFrameSourceParameters, am as SetLogLevelDataCaptureAction, aH as ShowGuidanceMessage, aw as ShowHintWorkerMessage, aF as ShowToastMessage, aJ as StartUpdateTimerMessage, aK as StopUpdateTimerMessage, av as SuccessFeedbackWorkerMessage, ba as ToastHint, b9 as ToastHintStyle, ai as UpdateContextDataCaptureAction, bg as UpdateContextParameters, ax as UpdateHintWorkerMessage, aY as Vector, ag as VisibilityChangeAction, aZ as WasmFrameData, bk as WorkerFunctions, a9 as WorkerResponse } from '../Camera-C_4xOv5n.js';
|
|
4
4
|
import '../private/Serializable.js';
|
|
5
5
|
import '../Common.js';
|
|
6
6
|
import '../private/FrameReaders/WatermarkStack.js';
|
package/build/js/worker/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as DataCaptureLoader}from'../chunks/chunk-VGSPU525.js';export{a as WorkerMain}from'../chunks/chunk-
|
|
1
|
+
export{a as DataCaptureLoader}from'../chunks/chunk-VGSPU525.js';export{a as WorkerMain}from'../chunks/chunk-KK47T3R2.js';export{a as DataCaptureEngine}from'../chunks/chunk-M6SPJT67.js';export{h as GuidanceHintAnchor,i as GuidanceHintStyle,g as HintAnchor,e as HintCornerStyle,a as HintFont,d as HintHeight,f as HintIcon,b as HintTextAlignment,c as HintWidth,k as LicensedFeature,j as ToastHintStyle}from'../chunks/chunk-L7TY4UEP.js';
|
package/package.json
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import {b as b$2}from'./chunk-OARD7KIC.js';import {a as a$7}from'./chunk-VT73QNQB.js';import {b as b$1,a as a$6}from'./chunk-5S537AFM.js';import {a as a$5}from'./chunk-3A4KLILV.js';import {a as a$3}from'./chunk-MU6SADSF.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$4}from'./chunk-LSZZVJ6B.js';import {a as a$2}from'./chunk-R6E4CT22.js';var a="--view-finder-top",s="--view-finder-bottom",c="--hint-anchor-offset",b="--max-width-fraction",w="--horizontal-margin",h="--max-width-ratio-adjust",$=(l=>(l.Update="hintpresenterupdate",l))($||{});function d(p,l=100){return typeof p=="string"?p.slice(0,l):""}var n=class n extends a$1{constructor(){super();this.onDidToastHideHandler=this.onDidToastHide.bind(this);this.orientationObserver=new b$1;this.onOrientationChangeHandler=a$2(this.onOrientationChange.bind(this),200);let t=this.attachShadow({mode:"open"});t.innerHTML=a$3`
|
|
2
|
-
<div id="root">
|
|
3
|
-
<slot></slot>
|
|
4
|
-
</div>
|
|
5
|
-
`,t.append(n.createStyleElement().cloneNode(true)),this.root=t.querySelector("#root");}static createStyleElement(){return a$4`:host{pointer-events:none}:host #root{inset:0;position:absolute;width:100%;${a}:0;${s}:0;${h}:1;z-index:1}::slotted(${b$2.tag}){left:50%;max-width:calc(var(${b})*var(${h})*100% - var(${w}));position:absolute;transform:translate3d(-50%,0,0);width:100%}::slotted(${b$2.tag}.${"aboveViewFinder"}){transform:translate3d(-50%,calc(-100% + var(${a}) - var(${c})),0)}::slotted(${b$2.tag}.${"belowViewFinder"}){transform:translate3d(-50%,calc(var(${s}) + var(${c})),0)}::slotted(${b$2.tag}.${"top"}){top:calc(var(${c}))}::slotted(${b$2.tag}.fitToText){width:fit-content}`}static register(){a$5({[n.tag]:n});}static create(){return n.register(),document.createElement(n.tag)}connectedCallback(){this.orientationObserver.addEventListener(a$6,this.onOrientationChangeHandler),this.orientationObserver.register(),this.addEventListener("didhide",this.onDidToastHideHandler),this._viewFinderRect==null&&(this.root.style.setProperty(a,`${this.root.clientHeight/2}px`),this.root.style.setProperty(s,`${this.root.clientHeight/2+1}px`));}disconnectedCallback(){this.removeEventListener("didhide",this.onDidToastHideHandler);}setViewFinderRect(t){if(t===null){this.root.style.removeProperty(a),this.root.style.removeProperty(s);return}this._viewFinderRect=t;let{origin:{y:e},size:{height:i}}=this._viewFinderRect;this.root.style.setProperty(a,`${e}px`),this.root.style.setProperty(s,`${e+i}px`);}handleMessage(t){let{type:e}=t;switch(e){case "showToast":{this.showToast(t.payload);break}case "hideToast":{this.hideToast(t.payload);break}case "showGuidance":{this.showGuidance(t.payload);break}case "hideGuidance":{this.hideGuidance(t.payload);break}case "startUpdateTimer":{this.startUpdateTimer(t.payload.duration.value);break}case "stopUpdateTimer":{this.stopUpdateTimer();break}}}setHintStyleToToast(t,e){t.textContent=e.text,t.hintStyle=e.hintStyle,t.className="",t.style.setProperty(c,`${t.hintStyle.hintAnchorOffset/16}rem`),t.style.setProperty(b,e.hintStyle.maxWidthFraction.toString()),t.style.setProperty(w,`${e.hintStyle.horizontalMargin/16}rem`),t.classList.add(e.hintStyle.hintAnchor),t.classList.toggle("fitToText",e.hintStyle.fitToText);}onDidToastHide(t){t.stopPropagation(),t.detail.target.remove();}async showToast(t){let e=this.idFromHint(t),i=this.querySelector(`#${e}`);if(i||(i=b$2.create(),i.id=e,this.append(i)),this.setHintStyleToToast(i,t),t.tag==="MoveCloserGuidance"){let r=a$7.create();r.setAttribute("slot","first-child"),i.append(r),i.setAttribute("direction","column");}return i.show()}showToastWithCustomIcon(t,e){let i=this.idFromHint(t),r=this.querySelector(`#${i}`);return r||(r=b$2.create(),r.id=i,this.append(r)),r.customIcon=e,this.setHintStyleToToast(r,t),r.show()}async hideToast(t){let e=this.querySelector(`#${this.idFromHint(t)}`);if(e!=null)return e.hide()}async showGuidance(t){return this.showToast(t)}async hideGuidance(t){return this.hideToast(t)}startUpdateTimer(t){this.intervalId=setInterval(()=>{this.dispatchEvent(new CustomEvent("hintpresenterupdate"));},t);}stopUpdateTimer(){clearInterval(this.intervalId);}idFromHint(t){var e;return btoa([d(t.hintStyle.textColor),d(t.hintStyle.backgroundColor),d(t.hintStyle.hintAnchor),d((e=t.tag)!=null?e:""),d(t.text,30),d(t.hintStyle.textAlignment)].join("-")).split("+").join("-").split("/").join("_").replace(/=+$/,"")}onOrientationChange(t){let e=1;e=t.detail.value==="landscapeLeft"||t.detail.value==="landscapeRight"?window.innerHeight/window.innerWidth:1,this.root.style.setProperty(h,e.toString()),this._viewFinderRect==null&&(this.root.style.setProperty(a,`${this.root.clientHeight/2}px`),this.root.style.setProperty(s,`${this.root.clientHeight/2+1}px`));}};n.tag="scandit-hints";var S=n;export{$ as a,S as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e;(o=>{function i(){let r="7.6.0";return r}o.sdkVersion=i;})(e||(e={}));export{e as a};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import {a as a$3}from'./chunk-2QT7PJFA.js';import {a as a$2}from'./chunk-QUHRBS4G.js';import {e}from'./chunk-TB4UKDDI.js';import {a as a$7,b as b$1}from'./chunk-SM5S3DDC.js';import {a as a$6}from'./chunk-3A4KLILV.js';import {a as a$4}from'./chunk-MU6SADSF.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$5}from'./chunk-LSZZVJ6B.js';var A=(e=>(e.DidShow="didshow",e.DidHide="didhide",e.WillShow="willshow",e))(A||{}),o="--text-size",s="--text-color",n="--text-alignment",r="--text-weight",a="--line-height",l="--background-color",c="--corner-radius",h="--max-lines",b="ease-in-out",i=class i 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`
|
|
2
|
-
<div class="toast">
|
|
3
|
-
<slot name="first-child"></slot>
|
|
4
|
-
<div class="left">
|
|
5
|
-
<slot name="icon"></slot>
|
|
6
|
-
</div>
|
|
7
|
-
<p class="middle">
|
|
8
|
-
<slot></slot>
|
|
9
|
-
</p>
|
|
10
|
-
</div>
|
|
11
|
-
`,t.append(i.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{${o}:1rem;${s}:#000;${r}:400;${n}:${"center"};${a}:1.5rem;${l}:#fff;${c}:.25rem;${h}:2;align-items:flex-start;background-color:var(${l});border-radius:var(${c});color:var(${s});display:flex;flex-direction:row;font-size:var(${o});font-weight:var(${r});gap:.625rem;justify-content:var(${n});line-height:var(${a});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;margin:0;padding:0;text-align:var(${n});-webkit-line-clamp:var(${h});-webkit-box-orient:vertical;align-self:center;overflow:hidden;text-shadow:0 1px 2px #${e.withAlpha(.3).toJSON()}}p.middle{text-align:var(${n})}`}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:b}))}get hideAnimation(){return new Animation(new KeyframeEffect(this,[{opacity:1},{opacity:0}],{duration:this.animationDuration,fill:"both",easing:b}))}static create(){return i.register(),document.createElement(i.tag)}static register(){a$6({[i.tag]:i});}async show(){return this.toggle(true)}async hide(){return this.toggle(false)}connectedCallback(){this.render();}async toggle(t){var e,m;if(this.currentAnimation!=null){if(this._currentAnimationDirection===(t?"showing":"hiding"))return;a$7(this.currentAnimation);}this._currentAnimationDirection=t?"showing":"hiding",this.animationDuration=(m=(e=this.hintStyle)==null?void 0:e.isAnimatedToView)==null||m?250:0,this.currentAnimation=t?this.showAnimation:this.hideAnimation,t&&this.dispatchEvent(new CustomEvent("willshow",{bubbles:true})),this.currentAnimation.play(),await b$1(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(o,`${this.hintStyle.textSize}px`),this.toast.style.setProperty(s,`#${this.hintStyle.textColor}`),this.toast.style.setProperty(r,this.hintStyle.textWeight.toString()),this.toast.style.setProperty(n,this.hintStyle.textAlignment),this.toast.style.setProperty(a,`${this.hintStyle.lineHeight/14}`),this.toast.style.setProperty(l,`#${this.hintStyle.backgroundColor}`),this.toast.style.setProperty(c,`${this.hintStyle.cornerRadius/10}rem`),this.toast.style.setProperty(h,this.hintStyle.maxLines.toString());for(let e of this.querySelectorAll("[slot=icon]"))e.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}`)));}}};i.tag="scandit-toast-hint";var w=i;export{A as a,w as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-ESVB4WW6.js';var t=new a(globalThis,{get:()=>globalThis.Module,set:e=>{globalThis.Module=e;}});function l(e){}export{t as a,l as b};
|
|
File without changes
|
|
File without changes
|