@scandit/web-datacapture-barcode 8.6.0-beta.1 → 8.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/build/js/{BarcodeArMode-D1D82tXQ.d.ts → BarcodeArMode-KtDRsTYm.d.ts} +1 -1
  2. package/build/js/BarcodeCaptureWorkerManager-ZfiS6RXC.js +1 -0
  3. package/build/js/{SparkScan-DJSLIr1F.d.ts → SparkScan-Cqq70mCV.d.ts} +1 -1
  4. package/build/js/{SparkScanSettings-C6heTRHy.d.ts → SparkScanSettings-Vp9xrjc-.d.ts} +5 -2
  5. package/build/js/{SparkScanView-Ca5H_6lT.d.ts → SparkScanView-D3QZs23s.d.ts} +1 -1
  6. package/build/js/{SparkScanViewPresenter-iBLQ63pl.d.ts → SparkScanViewPresenter-B3_WS-oD.d.ts} +2 -2
  7. package/build/js/{dataCaptureWorkerRelated-CLcrOCqV.d.ts → dataCaptureWorkerRelated-DCtM_1Ae.d.ts} +1 -1
  8. package/build/js/{index-CJ6S6C6z.d.ts → index-Co5DndWE.d.ts} +3 -3
  9. package/build/js/{index-BQubBIYz.d.ts → index-D5TKa6KC.d.ts} +2 -2
  10. package/build/js/index.d.ts +4 -4
  11. package/build/js/moduleLoader.js +1 -1
  12. package/build/js/private/smartScanIntentionHelper.d.ts +2 -2
  13. package/build/js/spark/SparkScan.d.ts +1 -1
  14. package/build/js/spark/SparkScan.js +1 -1
  15. package/build/js/spark/SparkScanOverlay.d.ts +1 -1
  16. package/build/js/spark/SparkScanSettings.d.ts +1 -1
  17. package/build/js/spark/SparkScanSettings.js +1 -1
  18. package/build/js/spark/index.d.ts +4 -4
  19. package/build/js/spark/ui/SparkScanOverlayManager.d.ts +2 -1
  20. package/build/js/spark/ui/SparkScanOverlayManager.js +1 -1
  21. package/build/js/spark/ui/SparkScanView.d.ts +1 -1
  22. package/build/js/spark/ui/SparkScanViewPresenter.d.ts +1 -1
  23. package/build/js/spark/ui/SparkScanViewUiListener.d.ts +1 -1
  24. package/build/js/spark/ui/index.d.ts +3 -3
  25. package/build/js/umd/index.js +1 -1
  26. package/build/js/worker/BarcodeArMode.d.ts +1 -1
  27. package/build/js/worker/BarcodeBatchMode.d.ts +1 -1
  28. package/build/js/worker/BarcodeCaptureMode.d.ts +1 -1
  29. package/build/js/worker/BarcodeCaptureWorkerManager.d.ts +1 -1
  30. package/build/js/worker/BarcodeCaptureWorkerManager.js +1 -1
  31. package/build/js/worker/BarcodeFindMode.d.ts +1 -1
  32. package/build/js/worker/SparkScanMode.d.ts +1 -1
  33. package/build/js/worker/WorkerMain.d.ts +2 -2
  34. package/build/js/worker/dataCaptureEngine.d.ts +1 -1
  35. package/build/js/worker/dataCaptureEngine.js +1 -1
  36. package/build/js/worker/dataCaptureWorkerRelated.d.ts +1 -1
  37. package/build/js/worker/index.d.ts +1 -1
  38. package/package.json +2 -2
  39. package/sdc-lib/barcode-worker-8.6.0.js +6 -0
  40. package/sdc-lib/scandit-datacapture-sdk-barcode-pthreads.js +1 -1
  41. package/sdc-lib/scandit-datacapture-sdk-barcode-pthreads.wasm +0 -0
  42. package/sdc-lib/scandit-datacapture-sdk-barcode-simd-pthreads.js +1 -1
  43. package/sdc-lib/scandit-datacapture-sdk-barcode-simd-pthreads.wasm +0 -0
  44. package/sdc-lib/scandit-datacapture-sdk-barcode-simd.js +1 -1
  45. package/sdc-lib/scandit-datacapture-sdk-barcode-simd.wasm +0 -0
  46. package/sdc-lib/scandit-datacapture-sdk-barcode.js +1 -1
  47. package/sdc-lib/scandit-datacapture-sdk-barcode.wasm +0 -0
  48. package/build/js/BarcodeCaptureWorkerManager-9BBiSAdI.js +0 -1
  49. package/sdc-lib/barcode-worker-8.6.0-beta.1.js +0 -6
@@ -2,7 +2,7 @@ import { n as BarcodeArSettingsJSON } from "./BarcodeArSettings-CDjBEQBe.js";
2
2
  import { r as BarcodeFindItemJSON } from "./BarcodeFindItem-B-Z3k7wI.js";
3
3
  import { n as BarcodeFindSettingsJSON } from "./BarcodeFindSettings-B_STCRxz.js";
4
4
  import { n as BarcodeFindBasicOverlayJSON } from "./BarcodeFindBasicOverlay-o6FxUPuD.js";
5
- import { H as Module$1, ct as JSONParseable, h as BarcodeCaptureModule, lt as WasmFrameData, st as CaptureModeDeserializerInstance, z as DataCaptureCallbackMessage$1 } from "./dataCaptureWorkerRelated-CLcrOCqV.js";
5
+ import { H as Module$1, ct as JSONParseable, h as BarcodeCaptureModule, lt as WasmFrameData, st as CaptureModeDeserializerInstance, z as DataCaptureCallbackMessage$1 } from "./dataCaptureWorkerRelated-DCtM_1Ae.js";
6
6
  import { t as Property } from "./PropertyBehaviorSubject-C6JRRRVs.js";
7
7
  import { DataCaptureEngine } from "@scandit/web-datacapture-core/build/js/worker/index.js";
8
8
  import { ModuleHandler, Vector, WorkerFunctions } from "@scandit/web-datacapture-core/build/js/worker/index";
@@ -0,0 +1 @@
1
+ import{DataCaptureLoader as e}from"@scandit/web-datacapture-core";var t=`barcode-worker-8.6.0.js`;function n(e){try{var n=e.endsWith(`/`)?e:e+`/`;return new URL(t,n).href}catch(n){var r=n instanceof Error?n.message:String(n);throw Error(`Invalid worker URL: `+e+`/`+t+` (`+r+`)`)}}function r(e){try{return new URL(e).origin===location.origin}catch(n){var t=n instanceof Error?n.message:String(n);return console.warn(`Could not determine origin for worker URL "`+e+`": `+t+`. Defaulting to cross-origin path.`),!1}}function i(e,t){/javascript|ecmascript/i.test(e.type)||(e=new Blob([e],{type:`application/javascript`}));var n=URL.createObjectURL(e),r=new Worker(n,{name:t});return setTimeout(function(){URL.revokeObjectURL(n)},0),r}async function a(e){if(!e||!e.libraryLocation)throw Error(`ExternalWorker requires options.libraryLocation`);var t=n(e.libraryLocation);try{var a=await fetch(t,r(t)?{}:{mode:`cors`});if(!a.ok)throw Error(`Failed to load worker script: `+t+` (status `+a.status+`)`);var o=await a.blob();return r(t)?new Worker(t,{name:e.name}):i(o,e.name)}catch(e){throw e instanceof Error&&e.message.startsWith(`Failed to load worker script:`)?e:Error(`Failed to load worker script: `+t+` (`+(e instanceof Error?e.message:e)+`)`)}}var o=class t extends e{constructor(...e){super(...e),this._name=`BarcodeCapture`}get dataCaptureWorker(){if(!this._dataCaptureWorker)throw Error(`Worker not initialized. Use BarcodeCaptureWorkerManager.create() to instantiate.`);return this._dataCaptureWorker}get name(){return this._name}async createDataCaptureWorker(){return await a({name:this.name,libraryLocation:this.libraryLocation})}static async create(e){let n=new t(e);return n._dataCaptureWorker=await n.createDataCaptureWorker(),n.addWorkerMessageListener(),await n.workerCommand(`setLogLevel`,{level:n.logLevel}),await n.load(),n}async workerCommand(e,t,n){return new Promise((r,i)=>{let a=this.workerCommandId++;this.workerTasks.set(a,{resolve:r,reject:i,command:e});let o={...t,command:e,id:a};this.dataCaptureWorker.postMessage(o,n)})}};export{o as t};
@@ -1,5 +1,5 @@
1
1
  import { t as SparkScanSession } from "./SparkScanSession-CI6W5VK1.js";
2
- import { n as SparkScanSettingsJSON, t as SparkScanSettings } from "./SparkScanSettings-C6heTRHy.js";
2
+ import { n as SparkScanSettingsJSON, t as SparkScanSettings } from "./SparkScanSettings-Vp9xrjc-.js";
3
3
  import { DataCaptureContext, DataCaptureMode, DataCaptureModeJSON, FrameData } from "@scandit/web-datacapture-core";
4
4
  import { Serializable } from "@scandit/web-datacapture-core/build/js/private/Serializable";
5
5
  //#region src/main/spark/SparkScan.d.ts
@@ -2,7 +2,7 @@ import { a as CompositeType, s as Symbology } from "./Barcode-DNvaiOyn.js";
2
2
  import { n as SymbologySettingsJSON, t as SymbologySettings } from "./SymbologySettings-BGlJWvRh.js";
3
3
  import { t as ScanIntention } from "./ScanIntention-BGrIZvQ0.js";
4
4
  import { t as SelectionMode } from "./SelectionMode-BJr-FYzy.js";
5
- import { JSONType, LocationSelectionJSON } from "@scandit/web-datacapture-core";
5
+ import { JSONType, LocationSelectionJSON, Optional } from "@scandit/web-datacapture-core";
6
6
  import { Serializable } from "@scandit/web-datacapture-core/build/js/private/Serializable";
7
7
  //#region src/main/spark/SparkScanSettings.d.ts
8
8
  interface SparkScanSettingsJSON {
@@ -17,12 +17,15 @@ interface SparkScanSettingsJSON {
17
17
  declare class SparkScanSettings implements Serializable<SparkScanSettingsJSON> {
18
18
  codeDuplicateFilter: number;
19
19
  enabledCompositeTypes: CompositeType[];
20
- scanIntention?: ScanIntention;
21
20
  selectionMode?: SelectionMode;
21
+ private _scanIntention?;
22
+ private _scanIntentionExplicitlySet;
22
23
  private locationSelection;
23
24
  private properties;
24
25
  private symbologies;
25
26
  constructor();
27
+ get scanIntention(): Optional<ScanIntention>;
28
+ set scanIntention(scanIntention: Optional<ScanIntention>);
26
29
  get enabledSymbologies(): Symbology[];
27
30
  private get compositeTypeDescriptions();
28
31
  settingsForSymbology(symbology: Symbology): SymbologySettings;
@@ -1,4 +1,4 @@
1
- import { t as SparkScan } from "./SparkScan-DJSLIr1F.js";
1
+ import { t as SparkScan } from "./SparkScan-Cqq70mCV.js";
2
2
  import { t as SparkScanScanningMode } from "./SparkScanScanningMode-OfggiH2E.js";
3
3
  import { t as SparkScanViewState } from "./SparkScanViewState-DQ4Mf4ZI.js";
4
4
  import { t as SparkScanFeedbackDelegate } from "./SparkScanFeedbackDelegate-qMCBitM8.js";
@@ -1,7 +1,7 @@
1
1
  import { t as SelectionMode } from "./SelectionMode-BJr-FYzy.js";
2
2
  import { t as SparkScanSession } from "./SparkScanSession-CI6W5VK1.js";
3
- import { n as SparkScanDelegate, r as SparkScanListener, t as SparkScan } from "./SparkScan-DJSLIr1F.js";
4
- import { n as SparkScanViewUiListener, t as SparkScanView } from "./SparkScanView-Ca5H_6lT.js";
3
+ import { n as SparkScanDelegate, r as SparkScanListener, t as SparkScan } from "./SparkScan-Cqq70mCV.js";
4
+ import { n as SparkScanViewUiListener, t as SparkScanView } from "./SparkScanView-D3QZs23s.js";
5
5
  import { t as SparkScanViewSettings } from "./SparkScanViewSettings-D5HpDX8Z.js";
6
6
  import { n as SparkScanTimeoutManagerDelegate } from "./SparkScanTimeoutManager-010BnuQP.js";
7
7
  import { n as SparkScanViewSessionStopReason } from "./SparkScanAnalyticsManager-CQU_edU0.js";
@@ -8,7 +8,7 @@ import { n as BarcodeFindSessionJSON } from "./BarcodeFindSession-Dl0aK2JX.js";
8
8
  import { n as BarcodeFindSettingsJSON } from "./BarcodeFindSettings-B_STCRxz.js";
9
9
  import { n as BarcodeFindBasicOverlayJSON } from "./BarcodeFindBasicOverlay-o6FxUPuD.js";
10
10
  import { n as SparkScanSessionJSON } from "./SparkScanSession-CI6W5VK1.js";
11
- import "./index-CJ6S6C6z.js";
11
+ import "./index-Co5DndWE.js";
12
12
  import { t as Property } from "./PropertyBehaviorSubject-C6JRRRVs.js";
13
13
  import { PrivateLoadableFrameData } from "@scandit/web-datacapture-core";
14
14
  import { AnyDataCaptureActionMessage, DataCaptureActionMessageKey, DataCaptureCallbackMessage, DataCaptureCallbackMessageKeys, Module, WorkerResponse } from "@scandit/web-datacapture-core/build/js/worker/index";
@@ -1,7 +1,7 @@
1
1
  import "./SparkScanSession-CI6W5VK1.js";
2
- import "./SparkScanSettings-C6heTRHy.js";
3
- import "./SparkScan-DJSLIr1F.js";
2
+ import "./SparkScanSettings-Vp9xrjc-.js";
3
+ import "./SparkScan-Cqq70mCV.js";
4
4
  import "./SparkScanScanningMode-OfggiH2E.js";
5
5
  import "./SparkScanBarcodeFeedback-Dt25wQTc.js";
6
6
  import "./SparkScanFeedbackDelegate-qMCBitM8.js";
7
- import "./index-BQubBIYz.js";
7
+ import "./index-D5TKa6KC.js";
@@ -1,12 +1,12 @@
1
1
  import "./SparkScanToastSettings-DmruiKQ3.js";
2
- import "./SparkScanView-Ca5H_6lT.js";
2
+ import "./SparkScanView-D3QZs23s.js";
3
3
  import "./SparkScanViewSettings-D5HpDX8Z.js";
4
4
  import "./SparkScanViewFeedbackManager-DYKsRfY-.js";
5
5
  import "./SparkScanViewIcon-Drh2Iain.js";
6
6
  import "./SparkScanViewToast-DdHGQi9D.js";
7
7
  import "./SparkScanViewToolbar-DLdMXvsM.js";
8
8
  import "./SparkScanViewMiniPreview-CXYokFio.js";
9
- import "./SparkScanViewPresenter-iBLQ63pl.js";
9
+ import "./SparkScanViewPresenter-B3_WS-oD.js";
10
10
  import "./SparkScanViewStateManager-Rf2Ftt8s.js";
11
11
  import "./SparkScanViewTriggerButton-0C1PbogB.js";
12
12
  import "./SparkScanViewVisualFeedback-BdYJS-hA.js";
@@ -55,16 +55,16 @@ import "./find/index.js";
55
55
  import { Translations } from "./translations.js";
56
56
  import { BarcodeCaptureLoaderOptions, barcodeCaptureLoader } from "./moduleLoader.js";
57
57
  import { n as SparkScanSessionJSON, t as SparkScanSession } from "./SparkScanSession-CI6W5VK1.js";
58
- import { n as SparkScanSettingsJSON, t as SparkScanSettings } from "./SparkScanSettings-C6heTRHy.js";
59
- import { r as SparkScanListener, t as SparkScan } from "./SparkScan-DJSLIr1F.js";
58
+ import { n as SparkScanSettingsJSON, t as SparkScanSettings } from "./SparkScanSettings-Vp9xrjc-.js";
59
+ import { r as SparkScanListener, t as SparkScan } from "./SparkScan-Cqq70mCV.js";
60
60
  import { t as SparkScanPreviewBehavior } from "./SparkScanPreviewBehavior-D_gxTRwy.js";
61
61
  import { t as SparkScanScanningBehavior } from "./SparkScanScanningBehavior-CqzNsaaK.js";
62
62
  import { a as SparkScanScanningModeTarget, r as SparkScanScanningModeDefault, t as SparkScanScanningMode } from "./SparkScanScanningMode-OfggiH2E.js";
63
63
  import { t as SparkScanToastSettings } from "./SparkScanToastSettings-DmruiKQ3.js";
64
64
  import { t as SparkScanViewState } from "./SparkScanViewState-DQ4Mf4ZI.js";
65
- import { n as SparkScanViewUiListener, t as SparkScanView } from "./SparkScanView-Ca5H_6lT.js";
65
+ import { n as SparkScanViewUiListener, t as SparkScanView } from "./SparkScanView-D3QZs23s.js";
66
66
  import { a as SparkScanBarcodeSuccessFeedback, r as SparkScanBarcodeFeedback, t as SparkScanBarcodeErrorFeedback } from "./SparkScanBarcodeFeedback-Dt25wQTc.js";
67
67
  import { t as SparkScanFeedbackDelegate } from "./SparkScanFeedbackDelegate-qMCBitM8.js";
68
68
  import { t as SparkScanViewSettings } from "./SparkScanViewSettings-D5HpDX8Z.js";
69
- import "./index-CJ6S6C6z.js";
69
+ import "./index-Co5DndWE.js";
70
70
  export { ArucoDictionary, ArucoDictionaryJSON, ArucoDictionaryPreset, ArucoMarker, ArucoMarkerJSON, Barcode, BarcodeAr, type BarcodeArAnnotation, type BarcodeArAnnotationAnchor, type BarcodeArAnnotationProvider, BarcodeArAnnotationTrigger, BarcodeArCircleHighlight, BarcodeArCircleHighlightPreset, BarcodeArFeedback, type BarcodeArHighlight, type BarcodeArHighlightProvider, BarcodeArInfoAnnotation, BarcodeArInfoAnnotationAnchor, BarcodeArInfoAnnotationBodyComponent, BarcodeArInfoAnnotationFooter, BarcodeArInfoAnnotationHeader, BarcodeArInfoAnnotationWidthPreset, type BarcodeArListener, BarcodeArPopoverAnnotation, BarcodeArPopoverAnnotationAnchor, BarcodeArPopoverAnnotationButton, BarcodeArRectangleHighlight, BarcodeArResponsiveAnnotation, BarcodeArSession, BarcodeArSettings, BarcodeArStatusIconAnnotation, BarcodeArStatusIconAnnotationAnchor, BarcodeArView, BarcodeArViewSettings, type BarcodeArViewUiListener, BarcodeBatch, BarcodeBatchAdvancedOverlay, BarcodeBatchAdvancedOverlayJSON, BarcodeBatchAdvancedOverlayListener, BarcodeBatchBasicOverlay, BarcodeBatchBasicOverlayJSON, BarcodeBatchBasicOverlayListener, BarcodeBatchBasicOverlayStyle, BarcodeBatchListener, BarcodeBatchSession, BarcodeBatchSessionJSON, BarcodeBatchSettings, BarcodeBatchSettingsJSON, BarcodeCapture, BarcodeCaptureFeedback, BarcodeCaptureFeedbackJSON, BarcodeCaptureListener, BarcodeCaptureLoaderOptions, BarcodeCaptureOverlay, BarcodeCaptureOverlayJSON, BarcodeCaptureSession, BarcodeCaptureSessionJSON, BarcodeCaptureSettings, BarcodeCaptureSettingsJSON, BarcodeFind, BarcodeFindItem, BarcodeFindItemContent, BarcodeFindItemJSON, BarcodeFindItemSearchOptions, BarcodeFindListener, BarcodeFindSettings, BarcodeFindSettingsJSON, BarcodeFindTransformer, BarcodeFindView, BarcodeFindViewSettings, BarcodeFindViewSettingsJSON, BarcodeFindViewUiListener, BarcodeJSON, BarcodeStatusIconContainer, Checksum, CompositeFlag, CompositeType, EncodingRange, EncodingRangeJSON, LocalizedOnlyBarcode, LocalizedOnlyBarcodeJSON, PrivateBarcodeBatch, PrivateBarcodeCapture, PrivateBarcodeFindListener, PrivateCompositeTypeDescription, PrivateRange, PrivateTrackedBarcodeView, PrivateTrackedBarcodeViewOptions, Range, RangeJSON, ScanIntention, SelectionMode, SparkScan, SparkScanBarcodeErrorFeedback, SparkScanBarcodeFeedback, SparkScanBarcodeSuccessFeedback, type SparkScanFeedbackDelegate, type SparkScanListener, SparkScanMiniPreviewSize, SparkScanPreviewBehavior, SparkScanScanningBehavior, SparkScanScanningMode, SparkScanScanningModeDefault, SparkScanScanningModeTarget, SparkScanSession, type SparkScanSessionJSON, SparkScanSettings, type SparkScanSettingsJSON, SparkScanToastSettings, SparkScanView, SparkScanViewSettings, SparkScanViewState, type SparkScanViewUiListener, StructuredAppendData, StructuredAppendDataJSON, Symbology, SymbologyDescription, SymbologyDescriptionJSON, SymbologySettings, SymbologySettingsJSON, TrackedBarcode, TrackedBarcodeJSON, TrackedBarcodeView, TrackedBarcodeViewJSON, TrackedBarcodeViewOptions, type Translations, barcodeCaptureLoader };
@@ -1 +1 @@
1
- import{translations as e}from"./translations.js";import{t}from"./BarcodeCaptureWorkerManager-9BBiSAdI.js";import{Localization as n}from"@scandit/web-datacapture-core";import{normalizeLibraryLocation as r}from"@scandit/web-datacapture-core/build/js/private/Helper.js";function i(i){return n.getInstance().updateIfMissing({...e}),i!=null&&i.libraryLocation&&(i.libraryLocation=r(i.libraryLocation)),{moduleName:`BarcodeCapture`,load:async e=>{let n=e;return await t.create({...n,libraryLocation:(i==null?void 0:i.libraryLocation)??n.libraryLocation,highEndBlurryRecognition:(i==null?void 0:i.highEndBlurryRecognition)??!1})}}}export{i as barcodeCaptureLoader};
1
+ import{translations as e}from"./translations.js";import{t}from"./BarcodeCaptureWorkerManager-ZfiS6RXC.js";import{Localization as n}from"@scandit/web-datacapture-core";import{normalizeLibraryLocation as r}from"@scandit/web-datacapture-core/build/js/private/Helper.js";function i(i){return n.getInstance().updateIfMissing({...e}),i!=null&&i.libraryLocation&&(i.libraryLocation=r(i.libraryLocation)),{moduleName:`BarcodeCapture`,load:async e=>{let n=e;return await t.create({...n,libraryLocation:(i==null?void 0:i.libraryLocation)??n.libraryLocation,highEndBlurryRecognition:(i==null?void 0:i.highEndBlurryRecognition)??!1})}}}export{i as barcodeCaptureLoader};
@@ -1,5 +1,5 @@
1
1
  import { t as ScanIntention } from "../ScanIntention-BGrIZvQ0.js";
2
- import { DataCaptureContext } from "@scandit/web-datacapture-core";
2
+ import { DataCaptureContext, Optional } from "@scandit/web-datacapture-core";
3
3
  //#region src/main/private/smartScanIntentionHelper.d.ts
4
4
  /**
5
5
  * Ensures that scanIntention is downgraded to Manual if the device
@@ -10,7 +10,7 @@ import { DataCaptureContext } from "@scandit/web-datacapture-core";
10
10
  * @returns The settings object with potentially modified scanIntention
11
11
  */
12
12
  declare function ensureSmartScanIntentionSupport<T extends {
13
- scanIntention?: ScanIntention;
13
+ scanIntention?: Optional<ScanIntention>;
14
14
  }>(settings: T, capabilityInfo: (typeof DataCaptureContext)["capabilityInfo"] | undefined): T;
15
15
  //#endregion
16
16
  export { ensureSmartScanIntentionSupport };
@@ -1,2 +1,2 @@
1
- import { n as SparkScanDelegate, r as SparkScanListener, t as SparkScan } from "../SparkScan-DJSLIr1F.js";
1
+ import { n as SparkScanDelegate, r as SparkScanListener, t as SparkScan } from "../SparkScan-Cqq70mCV.js";
2
2
  export { SparkScan, SparkScanDelegate, SparkScanListener };
@@ -1 +1 @@
1
- import"../ScanIntention.js";import{ensureSmartScanIntentionSupport as e}from"../private/smartScanIntentionHelper.js";import"../SelectionMode.js";import{defaultSparkScan as t}from"../defaults/DefaultsSparkScan.js";import{SparkScanSession as n}from"./SparkScanSession.js";import{CameraSettings as r,DataCaptureContext as i,Logger as a,convertToPublicFrameData as o}from"@scandit/web-datacapture-core";var s=class s{constructor(){this.type=`sparkScan`,this._synchronousFrameFlow=!1,this._isEnabled=!0,this._isSuppressed=null,this._context=null,this.listeners=new Set,this.__modeViewListener=null,this.allowedRemainingWorkerMessages=new Set,this.workerMessageListener=this.onWorkerMessage.bind(this)}static get recommendedCameraSettings(){return r.fromJSON(t.CameraSettings.settings)}get context(){return this._context}static forSettings(e){let t=new s;return t.settings=e,t}isEnabled(){return this._isEnabled}async setEnabled(e){this._isSuppressed=null,this._isEnabled=e,await this.notifyContext()}isSuppressed(){return this._isSuppressed===!0}async setResultSuppressionEnabled(e){this._isSuppressed=e,await this.notifyContext()}async applySettings(e){var t;return this.settings=e,(t=this.__modeViewListener)==null||t.call(this,e),this.notifyContext()}_setModeViewListener(e){this.__modeViewListener=e,e&&e(this.settings)}addListener(e){this.listeners.add(e)}removeListener(e){this.listeners.delete(e)}toJSONObject(){let e={type:this.type,enabled:this._isEnabled,settings:this.settings.toJSONObject()};return this._isSuppressed!==null&&(e.isSuppressed=this._isSuppressed),e}async selectItemWithSmartScanSelection(){await this.workerCommand(`sparkScanSelectItemWithSmartScanSelection`,{})}setDelegate(e){this.delegate=e}async workerCommand(e,t){this.context&&await this.context.workerCommand(e,t)}attachedToContext(e){this._context=e,this._context.subscribeToWorkerMessages(this.workerMessageListener)}async detachedFromContext(){var e;await this.workerCommand(`sparkScanModeRemove`,{}),(e=this._context)==null||e.unsubscribeToWorkerMessages(this.workerMessageListener),this._context=null}sendClearFrameDataRequest(e){queueMicrotask(()=>{var t;(t=this.context)==null||t.workerCommand(`deleteFrameData`,{frameId:e})})}async onDidScan(e){if(this.context==null)return;let{frameData:t}=e.payload;if(this._isSuppressed){this.sendClearFrameDataRequest(t.frameId),this.allowedRemainingWorkerMessages.clear();return}if(!this._isEnabled){this.sendClearFrameDataRequest(t.frameId),this.allowedRemainingWorkerMessages.clear();return}this.allowedRemainingWorkerMessages.add(`successFeedback`);let r=[],i=n.fromJSON(e.payload.session);for(let e of this.listeners)if(e.didScan)try{let n=e.didScan(this,i,o(t,this.context));n instanceof Promise&&await n}catch(e){r.push(e)}this.sendClearFrameDataRequest(t.frameId),this.allowedRemainingWorkerMessages.add(`sparkScanDidUpdateSession`);for(let e of r)a.error(e)}onDidUpdateSession(e){if(!this._isEnabled&&!this.allowedRemainingWorkerMessages.has(e.type))return;this.allowedRemainingWorkerMessages.delete(e.type);let t=n.fromJSON(e.payload);for(let e of this.listeners){var r;(r=e.didUpdateSession)==null||r.call(e,this,t)}}async onWorkerMessage(e){switch(e.type){case`sparkScanDidScan`:await this.onDidScan(e);break;case`sparkScanDidUpdateSession`:this.onDidUpdateSession(e);break;case`sparkScanSwitchedToSmartScanSelection`:var t;(t=this.delegate)==null||t.onSwitchedToSmartScanSelection();break;case`sparkScanSwitchedAwayFromSmartScanSelection`:var n;(n=this.delegate)==null||n.onSwitchedAwayFromSmartScanSelection();break;default:}}async notifyContext(){this.context&&(this.settings.selectionMode===`auto`&&(this.settings.scanIntention=`smart`),this.settings=e(this.settings,i.capabilityInfo),await this.context.update())}};export{s as SparkScan};
1
+ import{defaultSparkScan as e}from"../defaults/DefaultsSparkScan.js";import{SparkScanSession as t}from"./SparkScanSession.js";import{CameraSettings as n,DataCaptureContext as r,Logger as i,convertToPublicFrameData as a}from"@scandit/web-datacapture-core";var o=class o{constructor(){this.type=`sparkScan`,this._synchronousFrameFlow=!1,this._isEnabled=!0,this._isSuppressed=null,this._context=null,this.listeners=new Set,this.__modeViewListener=null,this.allowedRemainingWorkerMessages=new Set,this.workerMessageListener=this.onWorkerMessage.bind(this)}static get recommendedCameraSettings(){return n.fromJSON(e.CameraSettings.settings)}get context(){return this._context}static forSettings(e){let t=new o;return t.settings=e,t}isEnabled(){return this._isEnabled}async setEnabled(e){this._isSuppressed=null,this._isEnabled=e,await this.notifyContext()}isSuppressed(){return this._isSuppressed===!0}async setResultSuppressionEnabled(e){this._isSuppressed=e,await this.notifyContext()}async applySettings(e){var t;return this.settings=e,(t=this.__modeViewListener)==null||t.call(this,e),this.notifyContext()}_setModeViewListener(e){this.__modeViewListener=e,e&&e(this.settings)}addListener(e){this.listeners.add(e)}removeListener(e){this.listeners.delete(e)}toJSONObject(){let e={type:this.type,enabled:this._isEnabled,settings:this.settings.toJSONObject()};return this._isSuppressed!==null&&(e.isSuppressed=this._isSuppressed),e}async selectItemWithSmartScanSelection(){await this.workerCommand(`sparkScanSelectItemWithSmartScanSelection`,{})}setDelegate(e){this.delegate=e}async workerCommand(e,t){this.context&&await this.context.workerCommand(e,t)}attachedToContext(e){this._context=e,this._context.subscribeToWorkerMessages(this.workerMessageListener)}async detachedFromContext(){var e;await this.workerCommand(`sparkScanModeRemove`,{}),(e=this._context)==null||e.unsubscribeToWorkerMessages(this.workerMessageListener),this._context=null}sendClearFrameDataRequest(e){queueMicrotask(()=>{var t;(t=this.context)==null||t.workerCommand(`deleteFrameData`,{frameId:e})})}async onDidScan(e){if(this.context==null)return;let{frameData:n}=e.payload;if(this._isSuppressed){this.sendClearFrameDataRequest(n.frameId),this.allowedRemainingWorkerMessages.clear();return}if(!this._isEnabled){this.sendClearFrameDataRequest(n.frameId),this.allowedRemainingWorkerMessages.clear();return}this.allowedRemainingWorkerMessages.add(`successFeedback`);let r=[],o=t.fromJSON(e.payload.session);for(let e of this.listeners)if(e.didScan)try{let t=e.didScan(this,o,a(n,this.context));t instanceof Promise&&await t}catch(e){r.push(e)}this.sendClearFrameDataRequest(n.frameId),this.allowedRemainingWorkerMessages.add(`sparkScanDidUpdateSession`);for(let e of r)i.error(e)}onDidUpdateSession(e){if(!this._isEnabled&&!this.allowedRemainingWorkerMessages.has(e.type))return;this.allowedRemainingWorkerMessages.delete(e.type);let n=t.fromJSON(e.payload);for(let e of this.listeners){var r;(r=e.didUpdateSession)==null||r.call(e,this,n)}}async onWorkerMessage(e){switch(e.type){case`sparkScanDidScan`:await this.onDidScan(e);break;case`sparkScanDidUpdateSession`:this.onDidUpdateSession(e);break;case`sparkScanSwitchedToSmartScanSelection`:var t;(t=this.delegate)==null||t.onSwitchedToSmartScanSelection();break;case`sparkScanSwitchedAwayFromSmartScanSelection`:var n;(n=this.delegate)==null||n.onSwitchedAwayFromSmartScanSelection();break;default:}}async notifyContext(){this.context&&(this.settings._resolveScanIntention(r.capabilityInfo),await this.context.update())}};export{o as SparkScan};
@@ -1,5 +1,5 @@
1
1
  import { t as SparkScanOverlayStyle } from "../SparkScanOverlayStyle-z5snxb98.js";
2
- import { t as SparkScan } from "../SparkScan-DJSLIr1F.js";
2
+ import { t as SparkScan } from "../SparkScan-Cqq70mCV.js";
3
3
  import { SparkScanTargetAimerViewfinderJSON } from "./SparkScanTargetAimerViewfinder.js";
4
4
  import { Brush, BrushJSON, DataCaptureOverlay, DataCaptureView, NumberWithUnit } from "@scandit/web-datacapture-core";
5
5
  import { Serializable } from "@scandit/web-datacapture-core/build/js/private/Serializable";
@@ -1,2 +1,2 @@
1
- import { n as SparkScanSettingsJSON, t as SparkScanSettings } from "../SparkScanSettings-C6heTRHy.js";
1
+ import { n as SparkScanSettingsJSON, t as SparkScanSettings } from "../SparkScanSettings-Vp9xrjc-.js";
2
2
  export { SparkScanSettings, SparkScanSettingsJSON };
@@ -1 +1 @@
1
- import{defaultSymbologies as e}from"../defaults/DefaultsSymbologies.js";import"../ScanIntention.js";import"../SelectionMode.js";import{defaultSparkScan as t}from"../defaults/DefaultsSparkScan.js";import{NumberWithUnit as n,RadiusLocationSelection as r}from"@scandit/web-datacapture-core";var i=class{constructor(){this.codeDuplicateFilter=t.SparkScanSettings.codeDuplicateFilter,this.enabledCompositeTypes=[],this.scanIntention=`manual`,this.selectionMode=`off`,this.locationSelection=new r(new n(t.SparkScanSettings.locationSelection.radius,t.SparkScanSettings.locationSelection.unit)),this.properties={},this.symbologies={}}get enabledSymbologies(){return Object.keys(this.symbologies).filter(e=>{var t;return(t=this.symbologies[e])==null?void 0:t.isEnabled})}get compositeTypeDescriptions(){return e.CompositeTypeDescriptions.reduce((e,t)=>(e[t.types[0]]=t,e),{})}settingsForSymbology(t){if(!this.symbologies[t]){let n=e.SymbologySettings[t];n._symbology=t,this.symbologies[t]=n}return this.symbologies[t]}setProperty(e,t){this.properties[e]=t}getProperty(e){return this.properties[e]}enableSymbologies(e){for(let t of e)this.enableSymbology(t,!0)}enableSymbology(e,t){this.settingsForSymbology(e).isEnabled=t}enableSymbologiesForCompositeTypes(e){for(let t of e)this.enableSymbologies(this.compositeTypeDescriptions[t].symbologies)}toJSONObject(){let e={},t=Object.keys(this.symbologies);return{codeDuplicateFilter:this.codeDuplicateFilter,enabledCompositeTypes:[...this.enabledCompositeTypes],locationSelection:this.locationSelection.toJSONObject(),properties:{...this.properties},symbologies:t.reduce((e,t)=>{var n;let r=(n=this.symbologies[t])==null?void 0:n.toJSONObject();return r&&(e[t]=r),e},e),scanIntention:this.scanIntention??null,selectionMode:this.selectionMode??null}}};export{i as SparkScanSettings};
1
+ import{defaultSymbologies as e}from"../defaults/DefaultsSymbologies.js";import"../ScanIntention.js";import{ensureSmartScanIntentionSupport as t}from"../private/smartScanIntentionHelper.js";import"../SelectionMode.js";import{defaultSparkScan as n}from"../defaults/DefaultsSparkScan.js";import{NumberWithUnit as r,RadiusLocationSelection as i}from"@scandit/web-datacapture-core";const a=`manual`;var o=class{constructor(){this.codeDuplicateFilter=n.SparkScanSettings.codeDuplicateFilter,this.enabledCompositeTypes=[],this.selectionMode=`off`,this._scanIntention=a,this._scanIntentionExplicitlySet=!1,this.locationSelection=new i(new r(n.SparkScanSettings.locationSelection.radius,n.SparkScanSettings.locationSelection.unit)),this.properties={},this.symbologies={}}get scanIntention(){return this._scanIntention}set scanIntention(e){this._scanIntention=e??void 0,this._scanIntentionExplicitlySet=e!=null}_resolveScanIntention(e){this._scanIntentionExplicitlySet||(this._scanIntention=this.selectionMode===`auto`?`smart`:a),this._scanIntention=t({scanIntention:this._scanIntention},e).scanIntention}get enabledSymbologies(){return Object.keys(this.symbologies).filter(e=>{var t;return(t=this.symbologies[e])==null?void 0:t.isEnabled})}get compositeTypeDescriptions(){return e.CompositeTypeDescriptions.reduce((e,t)=>(e[t.types[0]]=t,e),{})}settingsForSymbology(t){if(!this.symbologies[t]){let n=e.SymbologySettings[t];n._symbology=t,this.symbologies[t]=n}return this.symbologies[t]}setProperty(e,t){this.properties[e]=t}getProperty(e){return this.properties[e]}enableSymbologies(e){for(let t of e)this.enableSymbology(t,!0)}enableSymbology(e,t){this.settingsForSymbology(e).isEnabled=t}enableSymbologiesForCompositeTypes(e){for(let t of e)this.enableSymbologies(this.compositeTypeDescriptions[t].symbologies)}toJSONObject(){let e={},t=Object.keys(this.symbologies);return{codeDuplicateFilter:this.codeDuplicateFilter,enabledCompositeTypes:[...this.enabledCompositeTypes],locationSelection:this.locationSelection.toJSONObject(),properties:{...this.properties},symbologies:t.reduce((e,t)=>{var n;let r=(n=this.symbologies[t])==null?void 0:n.toJSONObject();return r&&(e[t]=r),e},e),scanIntention:this.scanIntention??null,selectionMode:this.selectionMode??null}}};export{o as SparkScanSettings};
@@ -1,15 +1,15 @@
1
1
  import { t as SparkScanMiniPreviewSize } from "../SparkScanMiniPreviewSize-1kgiK7Y2.js";
2
2
  import { n as SparkScanSessionJSON, t as SparkScanSession } from "../SparkScanSession-CI6W5VK1.js";
3
- import { n as SparkScanSettingsJSON, t as SparkScanSettings } from "../SparkScanSettings-C6heTRHy.js";
4
- import { r as SparkScanListener, t as SparkScan } from "../SparkScan-DJSLIr1F.js";
3
+ import { n as SparkScanSettingsJSON, t as SparkScanSettings } from "../SparkScanSettings-Vp9xrjc-.js";
4
+ import { r as SparkScanListener, t as SparkScan } from "../SparkScan-Cqq70mCV.js";
5
5
  import { t as SparkScanPreviewBehavior } from "../SparkScanPreviewBehavior-D_gxTRwy.js";
6
6
  import { t as SparkScanScanningBehavior } from "../SparkScanScanningBehavior-CqzNsaaK.js";
7
7
  import { a as SparkScanScanningModeTarget, r as SparkScanScanningModeDefault, t as SparkScanScanningMode } from "../SparkScanScanningMode-OfggiH2E.js";
8
8
  import { t as SparkScanToastSettings } from "../SparkScanToastSettings-DmruiKQ3.js";
9
9
  import { t as SparkScanViewState } from "../SparkScanViewState-DQ4Mf4ZI.js";
10
- import { n as SparkScanViewUiListener, t as SparkScanView } from "../SparkScanView-Ca5H_6lT.js";
10
+ import { n as SparkScanViewUiListener, t as SparkScanView } from "../SparkScanView-D3QZs23s.js";
11
11
  import { a as SparkScanBarcodeSuccessFeedback, r as SparkScanBarcodeFeedback, t as SparkScanBarcodeErrorFeedback } from "../SparkScanBarcodeFeedback-Dt25wQTc.js";
12
12
  import { t as SparkScanFeedbackDelegate } from "../SparkScanFeedbackDelegate-qMCBitM8.js";
13
13
  import { t as SparkScanViewSettings } from "../SparkScanViewSettings-D5HpDX8Z.js";
14
- import "../index-CJ6S6C6z.js";
14
+ import "../index-Co5DndWE.js";
15
15
  export { SparkScan, SparkScanBarcodeErrorFeedback, SparkScanBarcodeFeedback, SparkScanBarcodeSuccessFeedback, type SparkScanFeedbackDelegate, type SparkScanListener, SparkScanMiniPreviewSize, SparkScanPreviewBehavior, SparkScanScanningBehavior, SparkScanScanningMode, SparkScanScanningModeDefault, SparkScanScanningModeTarget, SparkScanSession, type SparkScanSessionJSON, SparkScanSettings, type SparkScanSettingsJSON, SparkScanToastSettings, SparkScanView, SparkScanViewSettings, SparkScanViewState, type SparkScanViewUiListener };
@@ -1,4 +1,4 @@
1
- import { t as SparkScan } from "../../SparkScan-DJSLIr1F.js";
1
+ import { t as SparkScan } from "../../SparkScan-Cqq70mCV.js";
2
2
  import { t as SparkScanScanningBehavior } from "../../SparkScanScanningBehavior-CqzNsaaK.js";
3
3
  import { t as SparkScanViewState } from "../../SparkScanViewState-DQ4Mf4ZI.js";
4
4
  import { r as SparkScanBarcodeFeedback, t as SparkScanBarcodeErrorFeedback } from "../../SparkScanBarcodeFeedback-Dt25wQTc.js";
@@ -9,6 +9,7 @@ declare class SparkScanOverlayManager {
9
9
  private settings;
10
10
  private sparkScanOverlay?;
11
11
  private smartScanSelectionOverlay?;
12
+ private sparkScan?;
12
13
  private lastSelectedBrushFromFeedback?;
13
14
  constructor(settings: SparkScanViewSettings);
14
15
  setViewSettings(settings: SparkScanViewSettings): void;
@@ -1 +1 @@
1
- import"../SparkScanScanningBehavior.js";import{SparkScanBarcodeFeedback as e,SparkScanBarcodeSuccessFeedback as t}from"../SparkScanBarcodeFeedback.js";import{SmartScanSelectionOverlay as n}from"../../private/SmartScanSelectionOverlay.js";import{SparkScanOverlay as r}from"../SparkScanOverlay.js";import"./SparkScanViewState.js";import{Brush as i,Color as a}from"@scandit/web-datacapture-core";var o=class o{constructor(e){this.settings=e}setViewSettings(e){var t;this.settings=e,(t=this.smartScanSelectionOverlay)==null||t.setBrush(this.selectionCandidateBrush())}get isReady(){return this.sparkScanOverlay!=null&&this.smartScanSelectionOverlay!=null}async prepareScanning(t,i,a){this.lastSelectedBrushFromFeedback=void 0,this.sparkScanOverlay=await r.withSparkScanForView(t,i),await this.sparkScanOverlay.setShouldRemoveLocationsAfterScan(a===`continuous`),this.smartScanSelectionOverlay=n.forMode(t),this.smartScanSelectionOverlay.setBrush(this.selectionCandidateBrush()),this.smartScanSelectionOverlay.setSelectedBrush(e.defaultSuccessBrush()),this.smartScanSelectionOverlay.setErrorBrush(this.sparkScanOverlay.getErrorBrush())}async onSwitchToActiveState(e,t,n){var r;if(n&&await this.setBrushToOverlays(this.brushForFeedback(n)),await((r=this.sparkScanOverlay)==null?void 0:r.setShouldRemoveLocationsAfterScan(t)),e===`active`){var i;await((i=this.sparkScanOverlay)==null?void 0:i.overlayReadyForDraw())}else{var a;await((a=this.sparkScanOverlay)==null?void 0:a.discardEnqueuedData())}}async onSwitchToIdleState(){var e;await((e=this.sparkScanOverlay)==null?void 0:e.overlayReadyForDraw())}async setBrushForFeedback(e){let t=this.brushForFeedback(e);this.lastSelectedBrushFromFeedback=t,await this.setBrushToOverlays(t)}async overlayReadyForDraw(){var e;await((e=this.sparkScanOverlay)==null?void 0:e.overlayReadyForDraw())}async onSwitchToErrorState(e){var t,n,r,i;(t=this.smartScanSelectionOverlay)==null||t.setErrorBrush(e.brush),await((n=this.sparkScanOverlay)==null?void 0:n.setErrorBrush(e.brush)),await((r=this.sparkScanOverlay)==null?void 0:r.overlayReadyForDraw()),await((i=this.sparkScanOverlay)==null?void 0:i.setShouldRemoveLocationsAfterScan(e.resumeCapturingDelay===0))}async onSwitchedToSmartScanSelection(e){this.sparkScanOverlay&&this.smartScanSelectionOverlay&&(this.lastSelectedBrushFromFeedback&&this.smartScanSelectionOverlay.setSelectedBrush(this.lastSelectedBrushFromFeedback),await(e==null?void 0:e.removeOverlay(this.sparkScanOverlay)),await(e==null?void 0:e.addOverlay(this.smartScanSelectionOverlay)))}async onSwitchedAwayFromSmartScanSelection(e){this.sparkScanOverlay&&this.smartScanSelectionOverlay&&(await(e==null?void 0:e.removeOverlay(this.smartScanSelectionOverlay)),await(e==null?void 0:e.addOverlay(this.sparkScanOverlay)))}async setShouldRemoveLocationsAfterScan(e){var t;await((t=this.sparkScanOverlay)==null?void 0:t.setShouldRemoveLocationsAfterScan(e))}async setShouldDrawViewfinder(e){var t;await((t=this.sparkScanOverlay)==null?void 0:t.setShouldDrawViewfinder(e))}setRadius(e){var t;(t=this.sparkScanOverlay)==null||t.setRadius(e)}async setBrushToOverlays(e){var t,n,r;(t=this.smartScanSelectionOverlay)==null||t.setBrush(this.selectionCandidateBrush()),(n=this.smartScanSelectionOverlay)==null||n.setSelectedBrush(e),await((r=this.sparkScanOverlay)==null?void 0:r.setBrush(e))}selectionCandidateBrush(){return this.settings.selectionModeCandidateBrush??o.defaultSelectionModeCandidateBrush()}static defaultSelectionModeCandidateBrush(){return new i(a.fromRGBA(0,0,0,0),a.fromRGBA(0,255,255,1),3)}brushForFeedback(e){return e instanceof t,e.brush}};export{o as SparkScanOverlayManager};
1
+ import"../SparkScanScanningBehavior.js";import{SparkScanBarcodeFeedback as e,SparkScanBarcodeSuccessFeedback as t}from"../SparkScanBarcodeFeedback.js";import{SmartScanSelectionOverlay as n}from"../../private/SmartScanSelectionOverlay.js";import{SparkScanOverlay as r}from"../SparkScanOverlay.js";import"./SparkScanViewState.js";import{Brush as i,Color as a,Logger as o}from"@scandit/web-datacapture-core";var s=class s{constructor(e){this.settings=e}setViewSettings(e){var t,n;this.settings=e,(t=this.smartScanSelectionOverlay)==null||t.setBrush(this.selectionCandidateBrush()),(n=this.sparkScan)==null||n.notifyContext().catch(e=>{o.warn(`SparkScanOverlayManager setViewSettings context sync failed:`,e)})}get isReady(){return this.sparkScanOverlay!=null&&this.smartScanSelectionOverlay!=null}async prepareScanning(t,i,a){this.lastSelectedBrushFromFeedback=void 0,this.sparkScan=t,this.sparkScanOverlay=await r.withSparkScanForView(t,i),await this.sparkScanOverlay.setShouldRemoveLocationsAfterScan(a===`continuous`),this.smartScanSelectionOverlay=n.forMode(t),this.smartScanSelectionOverlay.setBrush(this.selectionCandidateBrush()),this.smartScanSelectionOverlay.setSelectedBrush(e.defaultSuccessBrush()),this.smartScanSelectionOverlay.setErrorBrush(this.sparkScanOverlay.getErrorBrush())}async onSwitchToActiveState(e,t,n){var r;if(n&&await this.setBrushToOverlays(this.brushForFeedback(n)),await((r=this.sparkScanOverlay)==null?void 0:r.setShouldRemoveLocationsAfterScan(t)),e===`active`){var i;await((i=this.sparkScanOverlay)==null?void 0:i.overlayReadyForDraw())}else{var a;await((a=this.sparkScanOverlay)==null?void 0:a.discardEnqueuedData())}}async onSwitchToIdleState(){var e;await((e=this.sparkScanOverlay)==null?void 0:e.overlayReadyForDraw())}async setBrushForFeedback(e){let t=this.brushForFeedback(e);this.lastSelectedBrushFromFeedback=t,await this.setBrushToOverlays(t)}async overlayReadyForDraw(){var e;await((e=this.sparkScanOverlay)==null?void 0:e.overlayReadyForDraw())}async onSwitchToErrorState(e){var t,n,r,i;(t=this.smartScanSelectionOverlay)==null||t.setErrorBrush(e.brush),await((n=this.sparkScanOverlay)==null?void 0:n.setErrorBrush(e.brush)),await((r=this.sparkScanOverlay)==null?void 0:r.overlayReadyForDraw()),await((i=this.sparkScanOverlay)==null?void 0:i.setShouldRemoveLocationsAfterScan(e.resumeCapturingDelay===0))}async onSwitchedToSmartScanSelection(e){this.sparkScanOverlay&&this.smartScanSelectionOverlay&&(this.lastSelectedBrushFromFeedback&&this.smartScanSelectionOverlay.setSelectedBrush(this.lastSelectedBrushFromFeedback),await(e==null?void 0:e.removeOverlay(this.sparkScanOverlay)),await(e==null?void 0:e.removeOverlay(this.smartScanSelectionOverlay)),await(e==null?void 0:e.addOverlay(this.smartScanSelectionOverlay)))}async onSwitchedAwayFromSmartScanSelection(e){this.sparkScanOverlay&&this.smartScanSelectionOverlay&&(await(e==null?void 0:e.removeOverlay(this.smartScanSelectionOverlay)),await(e==null?void 0:e.addOverlay(this.sparkScanOverlay)))}async setShouldRemoveLocationsAfterScan(e){var t;await((t=this.sparkScanOverlay)==null?void 0:t.setShouldRemoveLocationsAfterScan(e))}async setShouldDrawViewfinder(e){var t;await((t=this.sparkScanOverlay)==null?void 0:t.setShouldDrawViewfinder(e))}setRadius(e){var t;(t=this.sparkScanOverlay)==null||t.setRadius(e)}async setBrushToOverlays(e){var t,n,r;(t=this.smartScanSelectionOverlay)==null||t.setBrush(this.selectionCandidateBrush()),(n=this.smartScanSelectionOverlay)==null||n.setSelectedBrush(e),await((r=this.sparkScanOverlay)==null?void 0:r.setBrush(e))}selectionCandidateBrush(){return this.settings.selectionModeCandidateBrush??s.defaultSelectionModeCandidateBrush()}static defaultSelectionModeCandidateBrush(){return new i(a.fromRGBA(0,0,0,0),a.fromRGBA(0,255,255,1),3)}brushForFeedback(e){return e instanceof t,e.brush}};export{s as SparkScanOverlayManager};
@@ -1,2 +1,2 @@
1
- import { t as SparkScanView } from "../../SparkScanView-Ca5H_6lT.js";
1
+ import { t as SparkScanView } from "../../SparkScanView-D3QZs23s.js";
2
2
  export { SparkScanView };
@@ -1,2 +1,2 @@
1
- import { t as SparkScanViewPresenter } from "../../SparkScanViewPresenter-iBLQ63pl.js";
1
+ import { t as SparkScanViewPresenter } from "../../SparkScanViewPresenter-B3_WS-oD.js";
2
2
  export { SparkScanViewPresenter };
@@ -1,2 +1,2 @@
1
- import { n as SparkScanViewUiListener } from "../../SparkScanView-Ca5H_6lT.js";
1
+ import { n as SparkScanViewUiListener } from "../../SparkScanView-D3QZs23s.js";
2
2
  export { SparkScanViewUiListener };
@@ -1,7 +1,7 @@
1
1
  import { t as SparkScanMiniPreviewSize } from "../../SparkScanMiniPreviewSize-1kgiK7Y2.js";
2
2
  import { n as SparkScanToastSettingsJSON, t as SparkScanToastSettings } from "../../SparkScanToastSettings-DmruiKQ3.js";
3
3
  import { t as SparkScanViewState } from "../../SparkScanViewState-DQ4Mf4ZI.js";
4
- import { n as SparkScanViewUiListener, t as SparkScanView } from "../../SparkScanView-Ca5H_6lT.js";
4
+ import { n as SparkScanViewUiListener, t as SparkScanView } from "../../SparkScanView-D3QZs23s.js";
5
5
  import { n as SparkScanViewSettingsJSON, t as SparkScanViewSettings } from "../../SparkScanViewSettings-D5HpDX8Z.js";
6
6
  import { t as SparkScanViewFeedbackManager } from "../../SparkScanViewFeedbackManager-DYKsRfY-.js";
7
7
  import { t as SparkScanViewIcon } from "../../SparkScanViewIcon-Drh2Iain.js";
@@ -9,9 +9,9 @@ import { n as SparkScanViewToastType, t as SparkScanViewToast } from "../../Spar
9
9
  import { t as SparkScanViewToolbar } from "../../SparkScanViewToolbar-DLdMXvsM.js";
10
10
  import { n as SparkScanViewMiniPreviewButtonType, t as SparkScanViewMiniPreview } from "../../SparkScanViewMiniPreview-CXYokFio.js";
11
11
  import { n as SparkScanViewPreferenceManager, t as SparkScanViewPreference } from "../../SparkScanViewPreferenceManager-BzTXb_KR.js";
12
- import { t as SparkScanViewPresenter } from "../../SparkScanViewPresenter-iBLQ63pl.js";
12
+ import { t as SparkScanViewPresenter } from "../../SparkScanViewPresenter-B3_WS-oD.js";
13
13
  import { t as SparkScanViewStateManager } from "../../SparkScanViewStateManager-Rf2Ftt8s.js";
14
14
  import { t as SparkScanViewTriggerButton } from "../../SparkScanViewTriggerButton-0C1PbogB.js";
15
15
  import { t as SparkScanViewVisualFeedback } from "../../SparkScanViewVisualFeedback-BdYJS-hA.js";
16
- import "../../index-BQubBIYz.js";
16
+ import "../../index-D5TKa6KC.js";
17
17
  export { SparkScanMiniPreviewSize, SparkScanToastSettings, SparkScanToastSettingsJSON, SparkScanView, SparkScanViewFeedbackManager, SparkScanViewIcon, SparkScanViewMiniPreview, SparkScanViewMiniPreviewButtonType, SparkScanViewPreference, SparkScanViewPreferenceManager, SparkScanViewPresenter, SparkScanViewSettings, SparkScanViewSettingsJSON, SparkScanViewState, SparkScanViewStateManager, SparkScanViewToast, SparkScanViewToastType, SparkScanViewToolbar, SparkScanViewTriggerButton, SparkScanViewUiListener, SparkScanViewVisualFeedback };