@scandit/web-datacapture-barcode 7.0.0-beta.1 → 7.0.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 (47) hide show
  1. package/build/js/BarcodeCaptureSettings.js +1 -1
  2. package/build/js/chunks/{chunk-ZDTUEAKJ.js → chunk-3EXZIU37.js} +3 -3
  3. package/build/js/chunks/chunk-5AWKCU7L.js +15 -0
  4. package/build/js/chunks/{chunk-ALOQUGSU.js → chunk-6UMT6EAO.js} +1 -1
  5. package/build/js/chunks/{chunk-X5RHQLWP.js → chunk-APIYP6ZL.js} +2 -2
  6. package/build/js/chunks/chunk-JMUNN3HX.js +3 -0
  7. package/build/js/chunks/{chunk-NDT5RS4B.js → chunk-NL3O64AI.js} +7 -6
  8. package/build/js/chunks/chunk-OBHOWMW5.js +6 -0
  9. package/build/js/chunks/{chunk-URV3CVLG.js → chunk-POA365GO.js} +1 -1
  10. package/build/js/chunks/chunk-T6L75N3D.js +3 -0
  11. package/build/js/chunks/chunk-VXMLFKGN.js +5 -0
  12. package/build/js/chunks/{chunk-6VT7IT5G.js → chunk-ZEFZKKYO.js} +8 -5
  13. package/build/js/chunks/chunk-ZZQDT5ZB.js +6 -0
  14. package/build/js/index.js +10 -10
  15. package/build/js/moduleLoader.js +1 -1
  16. package/build/js/spark/SparkScanAnalyticsManager.d.ts +8 -1
  17. package/build/js/spark/SparkScanAnalyticsManager.js +1 -1
  18. package/build/js/spark/SparkScanSettings.js +1 -1
  19. package/build/js/spark/index.js +5 -5
  20. package/build/js/spark/ui/SparkScanView.js +1 -1
  21. package/build/js/spark/ui/SparkScanViewMiniPreview.js +1 -1
  22. package/build/js/spark/ui/SparkScanViewPresenter.js +1 -1
  23. package/build/js/spark/ui/SparkScanViewToolbar.js +1 -1
  24. package/build/js/spark/ui/SparkScanViewTriggerButton.js +1 -1
  25. package/build/js/spark/ui/index.js +6 -6
  26. package/build/js/worker/BarcodeCaptureWorkerManager.js +1 -1
  27. package/build/js/worker/WorkerMain.js +1 -1
  28. package/build/js/worker/dataCapture.inlineWorker.js +1 -1
  29. package/build/js/worker/dataCaptureEngine.js +1 -1
  30. package/package.json +2 -2
  31. package/sdc-lib/scandit-datacapture-sdk-barcode-pthreads.js +1 -1
  32. package/sdc-lib/scandit-datacapture-sdk-barcode-pthreads.wasm +0 -0
  33. package/sdc-lib/scandit-datacapture-sdk-barcode-pthreads.worker.js +1 -1
  34. package/sdc-lib/scandit-datacapture-sdk-barcode-simd-pthreads.js +1 -1
  35. package/sdc-lib/scandit-datacapture-sdk-barcode-simd-pthreads.wasm +0 -0
  36. package/sdc-lib/scandit-datacapture-sdk-barcode-simd-pthreads.worker.js +1 -1
  37. package/sdc-lib/scandit-datacapture-sdk-barcode-simd.js +1 -1
  38. package/sdc-lib/scandit-datacapture-sdk-barcode-simd.wasm +0 -0
  39. package/sdc-lib/scandit-datacapture-sdk-barcode.js +1 -1
  40. package/sdc-lib/scandit-datacapture-sdk-barcode.wasm +0 -0
  41. package/build/js/chunks/chunk-CLMAF253.js +0 -15
  42. package/build/js/chunks/chunk-EMJS3UT7.js +0 -3
  43. package/build/js/chunks/chunk-GOVBKIEO.js +0 -5
  44. package/build/js/chunks/chunk-WMVYFKGM.js +0 -3
  45. package/build/js/chunks/chunk-XFKSWDGT.js +0 -6
  46. package/build/js/chunks/chunk-XGYKHOFE.js +0 -6
  47. /package/build/js/chunks/{chunk-NK2XCY5M.js → chunk-YVLXLEDF.js} +0 -0
@@ -1 +1 @@
1
- export { a as BarcodeCaptureSettings } from './chunks/chunk-XGYKHOFE.js';
1
+ export { a as BarcodeCaptureSettings } from './chunks/chunk-OBHOWMW5.js';
@@ -1,11 +1,11 @@
1
- import { a as a$1 } from './chunk-NK2XCY5M.js';
1
+ import { a as a$1 } from './chunk-YVLXLEDF.js';
2
2
  import { a as a$2 } from './chunk-TBXQSBKX.js';
3
- import { b } from './chunk-NDT5RS4B.js';
3
+ import { b } from './chunk-NL3O64AI.js';
4
4
  import { a as a$6 } from './chunk-FJ4SOETD.js';
5
5
  import { a as a$5, c, e, f, g, h, i, j, k, b as b$1, d as d$2 } from './chunk-DVHTYKDX.js';
6
6
  import { m, j as j$1, i as i$1, d as d$1, c as c$1, k as k$1, l, f as f$1, b as b$2, e as e$1, g as g$1 } from './chunk-Y6DC25EF.js';
7
7
  import { d } from './chunk-YBD5JYCX.js';
8
- import { a as a$3 } from './chunk-CLMAF253.js';
8
+ import { a as a$3 } from './chunk-5AWKCU7L.js';
9
9
  import { a as a$4 } from './chunk-4EGODYYJ.js';
10
10
  import { a } from './chunk-PTJJ3JDE.js';
11
11
  import { Point, CameraPosition, Color } from '@scandit/web-datacapture-core';
@@ -0,0 +1,15 @@
1
+ import { a as a$2 } from './chunk-OTZPCIBD.js';
2
+ import { a as a$3 } from './chunk-X2KFZW3W.js';
3
+ import { a } from './chunk-QCD3RIT4.js';
4
+ import { b as b$2, c as c$1 } from './chunk-SZUPDKV5.js';
5
+ import { a as a$4 } from './chunk-VTHL2LZD.js';
6
+ import { b } from './chunk-JMUNN3HX.js';
7
+ import { a as a$1, c, b as b$1 } from './chunk-PTJJ3JDE.js';
8
+ import { a as a$5 } from './chunk-DP5UA6QA.js';
9
+ import { b as b$3 } from './chunk-XCZGCZ5K.js';
10
+ import { DataCaptureView, Anchor, LogoStyle, CameraAccess, Camera, isCameraFrameSource, CameraPosition, FrameSourceState, Color, TorchState, Logger, NumberWithUnit, RadiusLocationSelection } from '@scandit/web-datacapture-core';
11
+ import { Timeout } from '@scandit/web-datacapture-core/build/js/private/utils/timeout.js';
12
+
13
+ var P=class O{constructor(a$4,e,t,i){this.cameras=[];this.preferenceManager=new a(localStorage);this.defaultSuccessBrush=a$1.defaultSuccessBrush();this.defaultErrorBrush=a$1.defaultErrorBrush();this.sparkScanView=a$4,this.context=e,this.sparkScan=t,this.sparkScanViewSettings=i,this.stateManager=new a$2(this.sparkScanViewSettings,this.preferenceManager),this.feedbackManager=a$3.withDefaults(i.soundEnabled,i.hapticEnabled),this.analyticsManager=b.forContext(e),this.triggerButtonCollapseTimeout=new Timeout(this.sparkScanViewSettings.triggerButtonCollapseTimeout,async()=>{this.stateManager.state!=="idle"&&await this.switchToIdleState({sessionStopReason:"timeout"});}),this.inactiveStateTimeout=new Timeout(i.inactiveStateTimeout,async()=>{this.stateManager.state!=="inactive"&&!this.stateManager.holdingToScan&&await this.switchToInactiveState({sessionStopReason:"timeout"});}),this.switchToIdleState();}get portraitOrientationTriggerButtonTranslateX(){var a;return (a=this.stateManager.portraitOrientationTriggerButtonTranslateX)!=null?a:window.innerWidth-90-16}get portraitOrientationTriggerButtonTranslateY(){var a;return (a=this.stateManager.portraitOrientationTriggerButtonTranslateY)!=null?a:window.innerHeight/2}get landscapeOrientationTriggerButtonTranslateX(){var a;return (a=this.stateManager.landscapeOrientationTriggerButtonTranslateX)!=null?a:window.innerWidth-90-16}get landscapeOrientationTriggerButtonTranslateY(){var a;return (a=this.stateManager.landscapeOrientationTriggerButtonTranslateY)!=null?a:window.innerHeight/2}get portraitOrientationMiniPreviewTranslateX(){var a;return (a=this.stateManager.portraitOrientationMiniPreviewTranslateX)!=null?a:window.innerWidth-225-16}get portraitOrientationMiniPreviewTranslateY(){var a;return (a=this.stateManager.portraitOrientationMiniPreviewTranslateY)!=null?a:16}get landscapeOrientationMiniPreviewTranslateX(){var a;return (a=this.stateManager.landscapeOrientationMiniPreviewTranslateX)!=null?a:16}get landscapeOrientationMiniPreviewTranslateY(){var a;return (a=this.stateManager.landscapeOrientationMiniPreviewTranslateY)!=null?a:16}static forView(a,e,t,i){return new O(a,e,t,i)}async prepareScanning(a){var t;this.context.addListener(this),this.dataCaptureView=await DataCaptureView.forContext(this.context),this.dataCaptureView.logoAnchor=Anchor.BottomCenter,this.dataCaptureView.logoStyle=LogoStyle.Minimal,this.dataCaptureView.setHiddenProperty("stopVideoTracksOnVisibilityChange",!1),this.dataCaptureView.setHiddenProperty("freezeFrameWhenStoppingFrameSource",!1),this.dataCaptureView.connectToElement(a);let e=await CameraAccess.getCameras();this.cameras=e.map(i=>Camera.fromDeviceCamera(i)),this.camera=isCameraFrameSource(this.context.frameSource)?this.context.frameSource:(t=this.cameras.find(i=>i.position===CameraPosition.WorldFacing))!=null?t:Camera.default,await this.camera.applySettings(a$4.recommendedCameraSettings),await this.context.setFrameSource(this.camera),await this.camera.switchToDesiredState(FrameSourceState.Standby),this.sparkScanView.setTorchAvailable(await this.camera.isTorchAvailable()),this.sparkScanView.setZoomAvailable(this.camera.isZoomAvailable()),await this.context.addMode(this.sparkScan),this.sparkScan.addListener(this),this.sparkScanOverlay=await a$5.withSparkScanForView(this.sparkScan,this.dataCaptureView),await this.sparkScanOverlay.setShouldRemoveLocationsAfterScan(this.stateManager.scanningBehavior==="continuous"),this.analyticsManager.startSession({cameraPosition:this.camera.position,handMode:"right",hapticEnabled:this.sparkScanViewSettings.hapticEnabled,scanningMode:this.stateManager.scanningMode,soundEnabled:this.sparkScanViewSettings.soundEnabled,torchState:this.camera.getDesiredTorchState()}),await this.applyPreferences();}async startScanning(){await this.switchToActiveState();}async pauseScanning(){await this.switchToInactiveState({sessionStopReason:"user"});}async stopScanning(a){var e;await this.sparkScan.setEnabled(!1),this.sparkScan.removeListener(this),await((e=this.camera)==null?void 0:e.switchToDesiredState(FrameSourceState.Off)),await this.context.dispose(),this.dataCaptureView.detachFromElement(),this.context.removeListener(this),await this.context.dispose(),this.analyticsManager.setSessionStopReason(a.sessionStopReason);}async onTriggerButtonTap(){switch(this.stateManager.state){case"Initial":return;case"idle":case"inactive":case"error":{await this.switchToActiveState({barcodeFeedback:new c(Color.fromRGBA(0,0,0,0),this.defaultSuccessBrush,this.feedbackManager.tapFeedback)});return}case"active":await(this.stateManager.continuousModeEnabled?this.switchToInactiveState({sessionStopReason:"user",barcodeFeedback:new c(Color.fromRGBA(0,0,0,0),this.defaultSuccessBrush,this.feedbackManager.tapFeedback)}):this.switchToActiveState({barcodeFeedback:new c(Color.fromRGBA(0,0,0,0),this.defaultSuccessBrush,this.feedbackManager.tapFeedback)}));}}async onTriggerButtonLongPressStart(){var a;this.sparkScanViewSettings.holdToScanEnabled&&(this.scanningBehaviorCache=this.stateManager.scanningBehavior,this.stateManager.scanningBehavior="continuous",this.stateManager.holdingToScan=!0,await((a=this.sparkScanOverlay)==null?void 0:a.setShouldRemoveLocationsAfterScan(!0)),await this.switchToActiveState({barcodeFeedback:new c(Color.fromRGBA(0,0,0,0),this.defaultSuccessBrush,this.feedbackManager.tapFeedback)}));}async onTriggerButtonLongPressEnd(){var a,e;this.sparkScanViewSettings.holdToScanEnabled&&this.stateManager.state!=="error"&&(this.stateManager.scanningBehavior=(a=this.scanningBehaviorCache)!=null?a:"single",this.stateManager.holdingToScan=!1,await((e=this.sparkScanOverlay)==null?void 0:e.setShouldRemoveLocationsAfterScan(this.stateManager.continuousModeEnabled)),await this.switchToInactiveState({sessionStopReason:"user",barcodeFeedback:new b$1("",0,Color.fromRGBA(0,0,0,0),this.defaultErrorBrush,this.feedbackManager.noFeedback)}));}async onClickOutside(){this.stateManager.idleState||await this.switchToIdleState();}async onVisibilityChange(){await this.switchToIdleState();}async onTargetModeButtonTap(a,e=this.feedbackManager.tapFeedback,t=!0){var c,h,p;let i=String(a),r={true:a&&this.stateManager.scanningMode instanceof b$2,false:!a&&this.stateManager.scanningMode instanceof c$1}[i];r&&(this.stateManager.scanningMode=this.stateManager.scanningMode.changeMode()),this.enableTargetMode(a,this.stateManager.zoomFactor),await((c=this.sparkScanOverlay)==null?void 0:c.setShouldDrawViewfinder(a)),e.emit(),this.stateManager.state!=="idle"&&this.stateManager.state!=="error"&&(this.triggerButtonCollapseTimeout.start(),this.inactiveStateTimeout.start()),this.sparkScanView.targetModeButtonTapped(a,t),r&&((p=(h=this.listener)==null?void 0:h.didChangeScanningMode)==null||p.call(h,this.stateManager.scanningMode),this.analyticsManager.setScanningMode(this.stateManager.scanningMode));}async onScanningBehaviorButtonTap(a,e=this.feedbackManager.tapFeedback,t=!0){var i;e.emit(),this.stateManager.scanningMode=this.stateManager.scanningMode.copyWith(a?"continuous":"single"),await((i=this.sparkScanOverlay)==null?void 0:i.setShouldRemoveLocationsAfterScan(a)),this.stateManager.state!=="idle"&&this.stateManager.state!=="error"&&(this.triggerButtonCollapseTimeout.start(),this.inactiveStateTimeout.start()),this.sparkScanView.scanningBehaviorButtonTapped(a,t),this.analyticsManager.setScanningMode(this.stateManager.scanningMode);}async onBarcodeFindButtonTap(){var a,e;await this.switchToIdleState({sessionStopReason:"user"}),(e=(a=this.listener)==null?void 0:a.didTapBarcodeFindButton)==null||e.call(a,this.sparkScanView),this.restartTimeouts();}async onCameraSwitchButtonTap(){if(this.feedbackManager.emitTapFeedback(),this.restartTimeouts(),!this.camera||this.stateManager.state==="error")return;let a={[CameraPosition.WorldFacing]:CameraPosition.UserFacing,[CameraPosition.UserFacing]:CameraPosition.WorldFacing}[this.camera.position],e=this.cameras.find(t=>t.position===a);e&&(await this.camera.switchToDesiredState(FrameSourceState.Off),await e.applySettings(this.camera.settings),await this.context.setFrameSource(e),await e.switchToDesiredState(FrameSourceState.On),this.sparkScanView.cameraSwitchButtonTapped(await e.isTorchAvailable(),a),this.analyticsManager.setCameraPosition(a),this.camera=e);}async onTorchButtonTap(a,e=this.feedbackManager.tapFeedback,t=!0){var i;e.emit(),this.stateManager.torchState=a?TorchState.On:TorchState.Off,((i=this.camera)==null?void 0:i.getCurrentState())===FrameSourceState.On&&await this.camera.setDesiredTorchState(this.stateManager.torchState),this.stateManager.state!=="idle"&&this.stateManager.state!=="error"&&(this.triggerButtonCollapseTimeout.start(),this.inactiveStateTimeout.start()),this.sparkScanView.torchButtonTapped(a,t),this.analyticsManager.setTorchState(this.stateManager.torchState);}restartTimeouts(){for(let a of [this.triggerButtonCollapseTimeout,this.inactiveStateTimeout,this.resumeCapturingTimeout])(a==null?void 0:a.running)===!0&&a.start();}async onMiniPreviewCloseButtonTap(){await this.switchToIdleState({sessionStopReason:"user"});}onMiniPreviewResizeButtonTap(){this.stateManager.state!=="idle"&&this.stateManager.state!=="error"&&(this.feedbackManager.emitTapFeedback(),this.triggerButtonCollapseTimeout.start(),this.inactiveStateTimeout.start());}async onMiniPreviewZoomButtonTap(a){this.feedbackManager.emitTapFeedback(),this.stateManager.zoomFactor=a,this.camera&&(this.camera.settings.zoomFactor=a,await this.camera.applySettings(this.camera.settings)),this.stateManager.state!=="idle"&&this.stateManager.state!=="error"&&(this.triggerButtonCollapseTimeout.start(),this.inactiveStateTimeout.start()),this.enableTargetModeHiddenProperties(this.stateManager.targetModeEnabled,a);}async onMiniPreviewDrag(a,e){switch(this.stateManager.state==="active"&&await this.sparkScan.setEnabled(!1),e){case"landscape-primary":case"landscape-secondary":{this.stateManager.landscapeOrientationMiniPreviewTranslateX=a.x,this.stateManager.landscapeOrientationMiniPreviewTranslateY=a.y;break}case"portrait-primary":case"portrait-secondary":{this.stateManager.portraitOrientationMiniPreviewTranslateX=a.x,this.stateManager.portraitOrientationMiniPreviewTranslateY=a.y;break}}this.restartTimeouts();}onMiniPreviewPointerMove(){this.restartTimeouts();}async onMiniPreviewPointerUp(){await this.switchToActiveState();}async onMiniPreviewDragEnd(){this.stateManager.state==="active"&&await this.sparkScan.setEnabled(!0);}onTriggerButtonDrag(a,e){switch(e){case"landscape-primary":case"landscape-secondary":{this.stateManager.landscapeOrientationTriggerButtonTranslateX=a.x,this.stateManager.landscapeOrientationTriggerButtonTranslateY=a.y;break}case"portrait-primary":case"portrait-secondary":{this.stateManager.portraitOrientationTriggerButtonTranslateX=a.x,this.stateManager.portraitOrientationTriggerButtonTranslateY=a.y;break}}}async onOrientationChange(){this.stateManager.state==="error"&&await this.switchToInactiveState({sessionStopReason:"user"});}async didScan(a,e){if(!e.newlyRecognizedBarcode)return;let t=this.sparkScanView.feedbackDelegate.getFeedbackForBarcode(e.newlyRecognizedBarcode);t instanceof b$1?await this.switchToErrorState({barcodeFeedback:t}):t instanceof c&&await(this.stateManager.continuousModeEnabled?this.switchToActiveState({barcodeFeedback:t}):this.switchToInactiveState({sessionStopReason:"user",barcodeFeedback:t})),this.restartTimeouts();}didChangeFrameSource(a,e){var t;if(isCameraFrameSource(e))this.camera=e;else {let i=(t=e==null?void 0:e.toJSONObject().type)!=null?t:"unknown";Logger.log(Logger.Level.Warn,`SparkScanView instances require a camera frame source to work, but a frame source of type "${i}" was found.`);}}setListener(a){this.listener=a;}brushForFeedback(a){return a.brush}async switchToIdleState(a={}){var e,t,i;this.feedbackManager.emitTapFeedback(),await((e=this.sparkScanOverlay)==null?void 0:e.overlayReadyForDraw()),this.setState("idle"),await this.sparkScan.setEnabled(!1),await((t=this.camera)==null?void 0:t.switchToDesiredState(FrameSourceState.Standby)),this.triggerButtonCollapseTimeout.stop(),this.inactiveStateTimeout.stop(),(i=this.resumeCapturingTimeout)==null||i.stop(),this.sparkScanView.switchToIdleState(),a.sessionStopReason!=null&&this.analyticsManager.setSessionStopReason(a.sessionStopReason);}async switchToActiveState(a={}){var t,i,r,n,c$1,h,p;let e=this.stateManager.state;this.setState("active"),await((t=this.camera)==null?void 0:t.switchToDesiredState(FrameSourceState.On)),await((i=this.camera)==null?void 0:i.setDesiredTorchState(this.stateManager.torchState)),await this.sparkScan.setEnabled(!0),a.barcodeFeedback&&await((r=this.sparkScanOverlay)==null?void 0:r.setBrush(this.brushForFeedback(a.barcodeFeedback))),await((n=this.sparkScanOverlay)==null?void 0:n.setShouldRemoveLocationsAfterScan(this.stateManager.continuousModeEnabled)),await((c$1=this.sparkScanOverlay)==null?void 0:c$1.overlayReadyForDraw()),this.feedbackManager.emitBarcodeFeedback(a.barcodeFeedback),this.stateManager.holdingToScan||this.inactiveStateTimeout.start(),this.triggerButtonCollapseTimeout.stop(),(h=this.resumeCapturingTimeout)==null||h.stop(),await this.sparkScanView.switchToActiveState(this.sparkScanViewSettings.visualFeedbackEnabled&&a.barcodeFeedback instanceof c,this.stateManager.scanningBehavior,(p=a.barcodeFeedback)==null?void 0:p.visualFeedbackColor,this.stateManager.zoomedIn&&e!=="active");}async switchToInactiveState(a){var e,t,i,r,n,c$1;this.setState("inactive"),a.barcodeFeedback&&await((e=this.sparkScanOverlay)==null?void 0:e.setBrush(this.brushForFeedback(a.barcodeFeedback))),await this.sparkScan.setEnabled(!1),await(a.barcodeFeedback instanceof c&&this.stateManager.scanningMode.previewBehavior==="persistent"?(t=this.sparkScanOverlay)==null?void 0:t.setShouldRemoveLocationsAfterScan(!0):(i=this.camera)==null?void 0:i.switchToDesiredState(FrameSourceState.Standby)),this.feedbackManager.emitBarcodeFeedback(a.barcodeFeedback),await((r=this.sparkScanOverlay)==null?void 0:r.overlayReadyForDraw()),this.triggerButtonCollapseTimeout.start(),this.inactiveStateTimeout.stop(),(n=this.resumeCapturingTimeout)==null||n.stop(),await this.sparkScanView.switchToInactiveState(this.sparkScanViewSettings.visualFeedbackEnabled&&a.barcodeFeedback instanceof c,this.stateManager.scanningBehavior,this.stateManager.previewBehavior,(c$1=a.barcodeFeedback)==null?void 0:c$1.visualFeedbackColor),this.analyticsManager.setSessionStopReason(a.sessionStopReason);}async switchToErrorState(a){var t,i,r,n;let e=a.barcodeFeedback.resumeCapturingDelay>0;e&&(this.setState("error"),this.stateManager.scanningBehavior="single",await this.sparkScan.setEnabled(!1),await((t=this.camera)==null?void 0:t.switchToDesiredState(FrameSourceState.Standby)),this.resumeCapturingTimeout=new Timeout(a.barcodeFeedback.resumeCapturingDelay,async()=>{this.stateManager.state!=="active"&&await this.switchToActiveState();}),this.resumeCapturingTimeout.start()),await((i=this.sparkScanOverlay)==null?void 0:i.setErrorBrush(a.barcodeFeedback.brush)),await((r=this.sparkScanOverlay)==null?void 0:r.overlayReadyForDraw()),await((n=this.sparkScanOverlay)==null?void 0:n.setShouldRemoveLocationsAfterScan(a.barcodeFeedback.resumeCapturingDelay===0)),await this.sparkScan.workerCommand("sparkScanEmitErrorFeedback",{shouldRemoveBrush:!e}),this.feedbackManager.emitBarcodeFeedback(a.barcodeFeedback),this.triggerButtonCollapseTimeout.stop(),this.inactiveStateTimeout.stop(),await this.sparkScanView.switchToErrorState(a.barcodeFeedback,this.sparkScanViewSettings.visualFeedbackEnabled);}enableTargetModeLocationSelection(a){var r;let e=a?b$3.SparkScan.SparkScanSettings.targetModeLocationSelection.radius:b$3.SparkScan.SparkScanSettings.locationSelection.radius,t=a?b$3.SparkScan.SparkScanSettings.targetModeLocationSelection.unit:b$3.SparkScan.SparkScanSettings.locationSelection.unit,i=new NumberWithUnit(e,t);this.sparkScan.settings.locationSelection=new RadiusLocationSelection(i),(r=this.sparkScanOverlay)==null||r.setRadius(i);}enableTargetModeScanIntention(a){this.sparkScan.settings.scanIntention=a?"manual":"smart";}enableTargetModeHiddenProperties(a,e){a?this.sparkScan.settings.enableTargetModeHiddenProperties(e===this.sparkScanViewSettings.zoomFactorOut?1:2):this.sparkScan.settings.disableTargetModeHiddenProperties();}enableTargetMode(a,e){this.enableTargetModeLocationSelection(a),this.enableTargetModeScanIntention(a),this.enableTargetModeHiddenProperties(a,e);}async applyPreferences(){await this.onTargetModeButtonTap(this.stateManager.targetModeEnabled,this.feedbackManager.noFeedback,!1),await this.onScanningBehaviorButtonTap(this.stateManager.continuousModeEnabled,this.feedbackManager.noFeedback,!1),await this.onTorchButtonTap(this.stateManager.torchEnabled,this.feedbackManager.noFeedback,!1);}setState(a){var e,t;a!==this.stateManager.state&&(this.stateManager.state=a,(t=(e=this.listener)==null?void 0:e.didChangeViewState)==null||t.call(e,a));}};
14
+
15
+ export { P as a };
@@ -1,4 +1,4 @@
1
- import { a } from './chunk-X5RHQLWP.js';
1
+ import { a } from './chunk-APIYP6ZL.js';
2
2
  import { a as a$1 } from './chunk-KQ3LRAYO.js';
3
3
  import { unknownErrorToString } from '@scandit/web-datacapture-core/build/js/private/utils/unknownErrorToString.js';
4
4
  import { WorkerMain } from '@scandit/web-datacapture-core/build/js/worker/index.js';
@@ -2,9 +2,9 @@ import { a } from './chunk-YQVJWYOP.js';
2
2
  import { a as a$3 } from './chunk-JMWBOJQR.js';
3
3
  import { a as a$2 } from './chunk-INRFTFPK.js';
4
4
  import { a as a$1 } from './chunk-ZLYZOIU3.js';
5
- import { a as a$4 } from './chunk-WMVYFKGM.js';
5
+ import { a as a$4 } from './chunk-T6L75N3D.js';
6
6
  import { DataCaptureEngine } from '@scandit/web-datacapture-core/build/js/worker/index.js';
7
7
 
8
- var d=class extends DataCaptureEngine{constructor(e,r){super(e,r);}getModeDeserializers(){this.barcodeCaptureMode=new a(this,this.Module,this.workerFunctions),this.barcodeBatchMode=new a$1(this,this.Module,this.workerFunctions),this.sparkScanMode=new a$2(this,this.Module,this.workerFunctions),this.barcodeFindMode=new a$3(this,this.Module,this.workerFunctions);let e=super.getModeDeserializers();return e.push_back(this.barcodeCaptureMode.getCaptureDeserializer()),e.push_back(this.barcodeBatchMode.getBatchDeserializer()),e.push_back(this.sparkScanMode.getSparkScanDeserializer()),e}getWasmSideModuleFileName(){return ""}getWasmCoreFileName(e,r){return r?e?"scandit-datacapture-sdk-barcode-simd-pthreads.wasm":"scandit-datacapture-sdk-barcode-pthreads.wasm":e?"scandit-datacapture-sdk-barcode-simd.wasm":"scandit-datacapture-sdk-barcode.wasm"}getWasmCoreExpectedHash(e,r){return r?e?"99199cb117df04a50028dc6d73ad9a838de785d6d572687f83ad65effb405c32":"3c6192322e2d4438d580e8b03490fd3b22d884968ac24537c9fdecf5fb8713f9":e?"a102d50840288945cac8c9723a0f3946ec3f951c83c5711343ef4381311f407b":"701df3e4f85f82c24d54acdce0af2aec84d997e6c4493a7f23af08b24d667b9c"}getWasmMetadata(){return a$4}};
8
+ var d=class extends DataCaptureEngine{constructor(e,r){super(e,r);}getModeDeserializers(){this.barcodeCaptureMode=new a(this,this.Module,this.workerFunctions),this.barcodeBatchMode=new a$1(this,this.Module,this.workerFunctions),this.sparkScanMode=new a$2(this,this.Module,this.workerFunctions),this.barcodeFindMode=new a$3(this,this.Module,this.workerFunctions);let e=super.getModeDeserializers();return e.push_back(this.barcodeCaptureMode.getCaptureDeserializer()),e.push_back(this.barcodeBatchMode.getBatchDeserializer()),e.push_back(this.sparkScanMode.getSparkScanDeserializer()),e}getWasmSideModuleFileName(){return ""}getWasmCoreFileName(e,r){return r?e?"scandit-datacapture-sdk-barcode-simd-pthreads.wasm":"scandit-datacapture-sdk-barcode-pthreads.wasm":e?"scandit-datacapture-sdk-barcode-simd.wasm":"scandit-datacapture-sdk-barcode.wasm"}getWasmCoreExpectedHash(e,r){return r?e?"f158ddbcbaf519430f67072a843628a250fe0a0e4089369ebc6242b7dc1db4f8":"2e15106b5958443377b8f14ea9ebee5e2eab015e9061749900b16e6c46c3a653":e?"ce6ac1878290b06fc9782429a0da5f8c5dda32662b5ee9634402021d9cef590c":"cb3203ac8d18b08947974f71da2856fd268b7257668686f68170fd17e1d402ad"}getWasmMetadata(){return a$4}};
9
9
 
10
10
  export { d as a };
@@ -0,0 +1,3 @@
1
+ var r=(t=>(t.User="user",t.Timeout="timeout",t))(r||{}),a=class o{constructor(e){this.context=e;}static forContext(e){return new o(e)}startSession(e){this.setTorchState(e.torchState),this.setScanningMode(e.scanningMode),this.setSoundEnabled(e.soundEnabled),this.setHapticEnabled(e.hapticEnabled),this.setHandMode(e.handMode),this.setCameraPosition(e.cameraPosition);}setTorchState(e){this.setProperty({key:"torch_state",value:e});}setScanningMode(e){var t;this.setProperty({key:"scanning_mode",value:(t=e==null?void 0:e.toAnalyticsJSONObject())!=null?t:null});}setSoundEnabled(e){this.setProperty({key:"sound_enabled",value:e!=null?e:null});}setHapticEnabled(e){this.setProperty({key:"haptic_enabled",value:e!=null?e:null});}setHandMode(e){this.setProperty({key:"hand_mode",value:e});}setSessionStopReason(e){this.setProperty({key:"session_stop_reason",value:e});}setCameraPosition(e){this.setProperty({key:"camera_position",value:e});}setProperty(e){this.context.workerCommand("sparkScanAnalyticsManagerPropertyChanged",{property:e});}};
2
+
3
+ export { r as a, a as b };
@@ -1,16 +1,17 @@
1
1
  import { a as a$3 } from './chunk-K4MHNZXA.js';
2
- import { a as a$4 } from './chunk-6VT7IT5G.js';
2
+ import { a as a$4 } from './chunk-ZEFZKKYO.js';
3
3
  import { b, a as a$6 } from './chunk-FJ4SOETD.js';
4
4
  import { b as b$1 } from './chunk-5DP5VNWQ.js';
5
5
  import { a as a$5, b as b$3 } from './chunk-OPL5NVVM.js';
6
- import { g as g$1 } from './chunk-3A6GSH7S.js';
6
+ import { g as g$2 } from './chunk-3A6GSH7S.js';
7
+ import { g as g$1 } from './chunk-DVHTYKDX.js';
7
8
  import { a as a$2 } from './chunk-DTO5ICFV.js';
8
9
  import { j, i, f as f$1, a, g, m } from './chunk-Y6DC25EF.js';
9
10
  import { b as b$2, a as a$1, e, c } from './chunk-YBD5JYCX.js';
10
11
  import { Point } from '@scandit/web-datacapture-core';
11
12
  import { ScanditHTMLElement, defineCustomElements, html, Timeout } from '@scandit/web-datacapture-core/build/js/private/utils/index.js';
12
13
 
13
- var V=(n=>(n.ResizeButton="resizeButton",n.ZoomButton="zoomButton",n.TorchButton="torchButton",n.CloseButton="closeButton",n))(V||{}),M=1200,f=class extends ScanditHTMLElement{constructor(){super(...arguments);this.resizeButtonTapListener=this.onResizeButtonTap.bind(this);this.zoomButtonTapListener=this.onZoomButtonTap.bind(this);this.torchButtonTapListener=this.onTorchButtonTap.bind(this);this.closeButtonTapListener=this.onCloseButtonTap.bind(this);this.pointerDownListener=this.onPointerDown.bind(this);this.longPressStartListener=this.onLongPressStart.bind(this);this.toolbarVisibilityChangeListener=this.onToolbarVisibilityChange.bind(this);this.longPressEndListener=this.onLongPressEnd.bind(this);this.dragEndListener=this.onDragEnd.bind(this);this.fadeOutAnimation=new Animation(new KeyframeEffect(this,[{opacity:1},{opacity:0}],{duration:500,fill:"both"}));this.replayFadeOutTimeout=null;this.dragController=new b(this);this.longPressController=new b$1(this);}get visible(){return this.hasAttribute("visible")}set visible(t){this.toggleAttribute("visible",t);}get size(){return this.expanded?"expanded":"regular"}set size(t){this.toggleAttribute("expanded",t==="expanded");let i=this.getNextTranslate();this.dragController.translateTo(i,!1).then(async()=>this.dragController.repositionIfOutOfBounds());}get expanded(){return this.hasAttribute("expanded")}get[a](){var t;return Number((t=this.getAttribute(a))!=null?t:"1")}set[a](t){this.setAttribute(a,String(t));}get darkened(){return this.hasAttribute("darkened")}set darkened(t){this.toggleAttribute("darkened",t);}get orientation(){var t;return (t=this.getAttribute("orientation"))!=null?t:"portrait-primary"}set orientation(t){this.setAttribute("orientation",t);}get[g](){return this.hasAttribute(g)}set[g](t){this.toggleAttribute(g,t);}get[j](){return this.hasAttribute(j)}set[j](t){this.toggleAttribute(j,t);}get[i](){return this.hasAttribute(i)}set[i](t){this.toggleAttribute(i,t);}get[f$1](){return this.hasAttribute(f$1)}set[f$1](t){this.toggleAttribute(f$1,t);}get[m](){return this.hasAttribute(m)}set[m](t){this.toggleAttribute(m,t);}get cover(){return this.hasAttribute("cover")}set cover(t){this.toggleAttribute("cover",t);}get pressed(){return this.hasAttribute("pressed")}set pressed(t){this.toggleAttribute("pressed",t);}static create(){return defineCustomElements({[b$2]:this,[a$1]:a$2,[e]:a$3,[c]:a$4}),document.createElement(b$2)}showToast(t,i,n){this.toast.show(t,i,n);}hideToast(){this.toast.hide();}zoomIn(){this.zoomButton&&(this[a]=2,this.zoomButton.textContent="2x",this.showToast("warning","2x zoom",1e3));}zoomOut(){this.zoomButton&&(this[a]=1,this.zoomButton.textContent="1x",this.showToast("info","1x zoom",1e3));}async fadeOut(){try{this.fadeOutAnimation.play(),await this.fadeOutAnimation.finished,this.visible=!1;}catch(t){}}cancelFadeOut(){var t;(t=this.replayFadeOutTimeout)==null||t.stop(),this.fadeOutAnimation.cancel();}async rewindAnimation(){var t,i;(((t=this.replayFadeOutTimeout)==null?void 0:t.running)===!0||this.fadeOutAnimation.playState!=="idle")&&(this.cancelFadeOut(),(i=this.replayFadeOutTimeout)==null||i.start());}translateTo(t){this.dragController.translateTo(t,!1);}render(){var t,i$1,n,u,c$1,v,B;this.innerHTML=html`
14
+ var M=(n=>(n.ResizeButton="resizeButton",n.ZoomButton="zoomButton",n.TorchButton="torchButton",n.CloseButton="closeButton",n))(M||{}),H=1200,f=class extends ScanditHTMLElement{constructor(){super(...arguments);this.resizeButtonTapListener=this.onResizeButtonTap.bind(this);this.zoomButtonTapListener=this.onZoomButtonTap.bind(this);this.torchButtonTapListener=this.onTorchButtonTap.bind(this);this.closeButtonTapListener=this.onCloseButtonTap.bind(this);this.pointerDownListener=this.onPointerDown.bind(this);this.longPressStartListener=this.onLongPressStart.bind(this);this.toolbarVisibilityChangeListener=this.onToolbarVisibilityChange.bind(this);this.longPressEndListener=this.onLongPressEnd.bind(this);this.dragEndListener=this.onDragEnd.bind(this);this.fadeOutAnimation=new Animation(new KeyframeEffect(this,[{opacity:1},{opacity:0}],{duration:500,fill:"both"}));this.replayFadeOutTimeout=null;this.dragController=new b(this);this.longPressController=new b$1(this);}get visible(){return this.hasAttribute("visible")}set visible(t){this.toggleAttribute("visible",t);}get size(){return this.expanded?"expanded":"regular"}set size(t){this.toggleAttribute("expanded",t==="expanded");let i=this.getNextTranslate();this.dragController.translateTo(i,!1).then(async()=>this.dragController.repositionIfOutOfBounds());}get expanded(){return this.hasAttribute("expanded")}get[a](){var t;return Number((t=this.getAttribute(a))!=null?t:"1")}set[a](t){this.setAttribute(a,String(t));}get darkened(){return this.hasAttribute("darkened")}set darkened(t){this.toggleAttribute("darkened",t);}get orientation(){var t;return (t=this.getAttribute("orientation"))!=null?t:"portrait-primary"}set orientation(t){this.setAttribute("orientation",t);}get[g](){return this.hasAttribute(g)}set[g](t){this.toggleAttribute(g,t);}get[j](){return this.hasAttribute(j)}set[j](t){this.toggleAttribute(j,t);}get[i](){return this.hasAttribute(i)}set[i](t){this.toggleAttribute(i,t);}get[f$1](){return this.hasAttribute(f$1)}set[f$1](t){this.toggleAttribute(f$1,t);}get[m](){return this.hasAttribute(m)}set[m](t){this.toggleAttribute(m,t);}get cover(){return this.hasAttribute("cover")}set cover(t){this.toggleAttribute("cover",t);}get pressed(){return this.hasAttribute("pressed")}set pressed(t){this.toggleAttribute("pressed",t);}static create(){return defineCustomElements({[b$2]:this,[a$1]:a$2,[e]:a$3,[c]:a$4}),document.createElement(b$2)}showToast(t,i,n){this.toast.show(t,i,n);}hideToast(){this.toast.hide();}zoomIn(){this.zoomButton&&(this[a]=2,this.zoomButton.textContent="2x",this.showToast("warning","2x zoom",1e3));}zoomOut(){this.zoomButton&&(this[a]=1,this.zoomButton.textContent="1x",this.showToast("info","1x zoom",1e3));}async fadeOut(){try{this.fadeOutAnimation.play(),await this.fadeOutAnimation.finished,this.visible=!1;}catch(t){}}cancelFadeOut(){var t;(t=this.replayFadeOutTimeout)==null||t.stop(),this.fadeOutAnimation.cancel();}async rewindAnimation(){var t,i;(((t=this.replayFadeOutTimeout)==null?void 0:t.running)===!0||this.fadeOutAnimation.playState!=="idle")&&(this.cancelFadeOut(),(i=this.replayFadeOutTimeout)==null||i.start());}translateTo(t){this.dragController.translateTo(t,!1);}render(){var t,i$1,n,u,c$1,v,B;this.innerHTML=html`
14
15
  <spark-scan-view-toast></spark-scan-view-toast>
15
16
  <div id="host"></div>
16
17
  <div id="controls">
@@ -42,7 +43,7 @@ var V=(n=>(n.ResizeButton="resizeButton",n.ZoomButton="zoomButton",n.TorchButton
42
43
  top: 0;
43
44
  left: 0;
44
45
  display: none;
45
- background: black;
46
+ background: var(${g$1});
46
47
  border-radius: 16px;
47
48
  filter: drop-shadow(0px 2px 6px #${a$5.toJSON()})
48
49
  drop-shadow(0px 1px 2px #${b$3.toJSON()});
@@ -219,6 +220,6 @@ var V=(n=>(n.ResizeButton="resizeButton",n.ZoomButton="zoomButton",n.TorchButton
219
220
  opacity: 0.3;
220
221
  }
221
222
  </style>
222
- `,this.toast=this.querySelector("spark-scan-view-toast"),this.host=this.querySelector("#host"),this.resizeButton=this.querySelector("#resizeButton"),(t=this.resizeButton)==null||t.addEventListener("pointerup",this.resizeButtonTapListener),this.resizeButtonIcon=(i$1=this.resizeButton)==null?void 0:i$1.querySelector("spark-scan-view-icon"),this.zoomButton=this.querySelector("#zoomButton"),(n=this.zoomButton)==null||n.addEventListener("pointerup",this.zoomButtonTapListener),this.torchButton=this.querySelector("#torchButton"),(u=this.torchButton)==null||u.addEventListener("pointerup",this.torchButtonTapListener),this.torchButtonIcon=(c$1=this.torchButton)==null?void 0:c$1.querySelector("spark-scan-view-icon"),this.closeButton=this.querySelector("#closeButton"),(v=this.closeButton)==null||v.addEventListener("pointerup",this.closeButtonTapListener),this.toolbar=this.querySelector(c),(B=this.toolbar)==null||B.addEventListener("toolbarvisibilitychange",this.toolbarVisibilityChangeListener),this.buttonContainerList=this.querySelector("#button-container-list");}onResizeButtonTap(t){t.stopPropagation(),this.size={regular:"expanded",expanded:"regular"}[this.size],this.resizeButtonIcon&&(this.resizeButtonIcon.icon=this.expanded?"shrink":"expand"),this.dispatchEvent(new CustomEvent(g$1,{detail:{tapped:"resizeButton",expanded:this.expanded}}));}onZoomButtonTap(t){switch(t.stopPropagation(),this[a]){case 1:{this.zoomIn();break}case 2:{this.zoomOut();break}}this.dispatchEvent(new CustomEvent(g$1,{detail:{tapped:"zoomButton",zoomFactor:this[a]}}));}onTorchButtonTap(t){t.stopPropagation(),this[g]=!this[g],this.torchButtonIcon&&(this.torchButtonIcon.icon=this[g]?"torchOn":"torchOff"),this.dispatchEvent(new CustomEvent(g$1,{detail:{tapped:"torchButton",enabled:this[g]}}));}onCloseButtonTap(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent(g$1,{detail:{tapped:"closeButton"}}));}onPointerDown(){this.dragController.draggable=!1,this.rewindAnimation();}onLongPressStart(){this.dragController.draggable=!0,this.pressed=!0;}onLongPressEnd(){this.pressed=!1;}onDragEnd(t){t instanceof a$6&&(this.lastKnownTranslate=t.point);}onToolbarVisibilityChange(){this.cover=!this.toolbar||this.toolbar.hidden;}connectedCallback(){var t;this.replayFadeOutTimeout=new Timeout(M,async()=>{await this.fadeOut();}),this.render(),this.addEventListener("pointerdown",this.pointerDownListener),this.addEventListener("longpressstart",this.longPressStartListener),this.addEventListener("longpressend",this.longPressEndListener),this.addEventListener("dragend",this.dragEndListener),this.dragController.connect(),this.longPressController.connect(),this.buttonContainerList&&((t=this.toolbar)!=null&&t.firstElementChild)&&(this.longPressController.elementsAllowedToTriggerLongPressEvents.add(this.buttonContainerList),this.longPressController.elementsAllowedToTriggerLongPressEvents.add(this.toolbar.firstElementChild)),this.dragController.margin=new Point(16,16);}disconnectedCallback(){var t,i,n,u,c,v;(t=this.resizeButton)==null||t.removeEventListener("pointerup",this.resizeButtonTapListener),(i=this.zoomButton)==null||i.removeEventListener("pointerup",this.zoomButtonTapListener),(n=this.torchButton)==null||n.removeEventListener("pointerup",this.torchButtonTapListener),(u=this.closeButton)==null||u.removeEventListener("pointerup",this.closeButtonTapListener),(c=this.toolbar)==null||c.removeEventListener("toolbarvisibilitychange",this.toolbarVisibilityChangeListener),this.removeEventListener("pointerdown",this.pointerDownListener),this.removeEventListener("longpressstart",this.longPressStartListener),this.removeEventListener("longpressend",this.longPressEndListener),this.removeEventListener("dragend",this.dragEndListener),this.fadeOutAnimation.cancel(),(v=this.replayFadeOutTimeout)==null||v.stop(),this.dragController.disconnect(),this.longPressController.disconnect();}getNextTranslate(){var i;if(this.size==="regular")return (i=this.lastKnownTranslate)!=null?i:this.dragController.translate;this.lastKnownTranslate=this.dragController.translate;let t=this.dragController.translate;return (this.orientation==="portrait-primary"||this.orientation==="portrait-secondary")&&this.dragController.translate.x>16&&(t=new Point(16,t.y)),(this.orientation==="landscape-primary"||this.orientation==="landscape-secondary")&&this.dragController.translate.x>window.innerWidth-this.clientWidth-16&&(t=new Point(window.innerWidth-this.clientWidth-16,t.y)),this.dragController.translate.y>window.innerHeight-this.clientHeight-16&&(t=new Point(t.x,window.innerHeight-this.clientHeight-16)),t}};f.observedAttributes=[j,i,f$1];
223
+ `,this.toast=this.querySelector("spark-scan-view-toast"),this.host=this.querySelector("#host"),this.resizeButton=this.querySelector("#resizeButton"),(t=this.resizeButton)==null||t.addEventListener("pointerup",this.resizeButtonTapListener),this.resizeButtonIcon=(i$1=this.resizeButton)==null?void 0:i$1.querySelector("spark-scan-view-icon"),this.zoomButton=this.querySelector("#zoomButton"),(n=this.zoomButton)==null||n.addEventListener("pointerup",this.zoomButtonTapListener),this.torchButton=this.querySelector("#torchButton"),(u=this.torchButton)==null||u.addEventListener("pointerup",this.torchButtonTapListener),this.torchButtonIcon=(c$1=this.torchButton)==null?void 0:c$1.querySelector("spark-scan-view-icon"),this.closeButton=this.querySelector("#closeButton"),(v=this.closeButton)==null||v.addEventListener("pointerup",this.closeButtonTapListener),this.toolbar=this.querySelector(c),(B=this.toolbar)==null||B.addEventListener("toolbarvisibilitychange",this.toolbarVisibilityChangeListener),this.buttonContainerList=this.querySelector("#button-container-list");}onResizeButtonTap(t){t.stopPropagation(),this.size={regular:"expanded",expanded:"regular"}[this.size],this.resizeButtonIcon&&(this.resizeButtonIcon.icon=this.expanded?"shrink":"expand"),this.dispatchEvent(new CustomEvent(g$2,{detail:{tapped:"resizeButton",expanded:this.expanded}}));}onZoomButtonTap(t){switch(t.stopPropagation(),this[a]){case 1:{this.zoomIn();break}case 2:{this.zoomOut();break}}this.dispatchEvent(new CustomEvent(g$2,{detail:{tapped:"zoomButton",zoomFactor:this[a]}}));}onTorchButtonTap(t){t.stopPropagation(),this[g]=!this[g],this.torchButtonIcon&&(this.torchButtonIcon.icon=this[g]?"torchOn":"torchOff"),this.dispatchEvent(new CustomEvent(g$2,{detail:{tapped:"torchButton",enabled:this[g]}}));}onCloseButtonTap(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent(g$2,{detail:{tapped:"closeButton"}}));}onPointerDown(){this.dragController.draggable=!1,this.rewindAnimation();}onLongPressStart(){this.dragController.draggable=!0,this.pressed=!0;}onLongPressEnd(){this.pressed=!1;}onDragEnd(t){t instanceof a$6&&(this.lastKnownTranslate=t.point);}onToolbarVisibilityChange(){this.cover=!this.toolbar||this.toolbar.hidden;}connectedCallback(){var t;this.replayFadeOutTimeout=new Timeout(H,async()=>{await this.fadeOut();}),this.render(),this.addEventListener("pointerdown",this.pointerDownListener),this.addEventListener("longpressstart",this.longPressStartListener),this.addEventListener("longpressend",this.longPressEndListener),this.addEventListener("dragend",this.dragEndListener),this.dragController.connect(),this.longPressController.connect(),this.buttonContainerList&&((t=this.toolbar)!=null&&t.firstElementChild)&&(this.longPressController.elementsAllowedToTriggerLongPressEvents.add(this.buttonContainerList),this.longPressController.elementsAllowedToTriggerLongPressEvents.add(this.toolbar.firstElementChild)),this.dragController.margin=new Point(16,16);}disconnectedCallback(){var t,i,n,u,c,v;(t=this.resizeButton)==null||t.removeEventListener("pointerup",this.resizeButtonTapListener),(i=this.zoomButton)==null||i.removeEventListener("pointerup",this.zoomButtonTapListener),(n=this.torchButton)==null||n.removeEventListener("pointerup",this.torchButtonTapListener),(u=this.closeButton)==null||u.removeEventListener("pointerup",this.closeButtonTapListener),(c=this.toolbar)==null||c.removeEventListener("toolbarvisibilitychange",this.toolbarVisibilityChangeListener),this.removeEventListener("pointerdown",this.pointerDownListener),this.removeEventListener("longpressstart",this.longPressStartListener),this.removeEventListener("longpressend",this.longPressEndListener),this.removeEventListener("dragend",this.dragEndListener),this.fadeOutAnimation.cancel(),(v=this.replayFadeOutTimeout)==null||v.stop(),this.dragController.disconnect(),this.longPressController.disconnect();}getNextTranslate(){var i;if(this.size==="regular")return (i=this.lastKnownTranslate)!=null?i:this.dragController.translate;this.lastKnownTranslate=this.dragController.translate;let t=this.dragController.translate;return (this.orientation==="portrait-primary"||this.orientation==="portrait-secondary")&&this.dragController.translate.x>16&&(t=new Point(16,t.y)),(this.orientation==="landscape-primary"||this.orientation==="landscape-secondary")&&this.dragController.translate.x>window.innerWidth-this.clientWidth-16&&(t=new Point(window.innerWidth-this.clientWidth-16,t.y)),this.dragController.translate.y>window.innerHeight-this.clientHeight-16&&(t=new Point(t.x,window.innerHeight-this.clientHeight-16)),t}};f.observedAttributes=[j,i,f$1];
223
224
 
224
- export { V as a, f as b };
225
+ export { M as a, f as b };
@@ -0,0 +1,6 @@
1
+ import { b } from './chunk-XCZGCZ5K.js';
2
+ import { PrivateNoneLocationSelection } from '@scandit/web-datacapture-core';
3
+
4
+ var p=class{constructor(){this.codeDuplicateFilter=b.BarcodeCapture.BarcodeCaptureSettings.codeDuplicateFilter;this.locationSelection=null;this.enabledCompositeTypes=[];this.scanIntention="manual";this.properties={};this.symbologies={};}get enabledSymbologies(){return Object.keys(this.symbologies).filter(e=>{var o;return (o=this.symbologies[e])==null?void 0:o.isEnabled})}get compositeTypeDescriptions(){return b.CompositeTypeDescriptions.reduce((e,o)=>(e[o.types[0]]=o,e),{})}settingsForSymbology(e){if(!this.symbologies[e]){let o=b.SymbologySettings[e];o._symbology=e,this.symbologies[e]=o;}return this.symbologies[e]}setProperty(e,o){this.properties[e]=o;}getProperty(e){return this.properties[e]}enableSymbologies(e){for(let o of e)this.enableSymbology(o,!0);}enableSymbology(e,o){this.settingsForSymbology(e).isEnabled=o;}enableSymbologiesForCompositeTypes(e){for(let o of e)this.enableSymbologies(this.compositeTypeDescriptions[o].symbologies);}toJSONObject(){var o,i,s;let e={};return {codeDuplicateFilter:this.codeDuplicateFilter,enabledCompositeTypes:[...this.enabledCompositeTypes],locationSelection:(i=(o=this.locationSelection)==null?void 0:o.toJSONObject())!=null?i:PrivateNoneLocationSelection,properties:{...this.properties},symbologies:Object.keys(this.symbologies).reduce((n,l)=>{var y;let r=(y=this.symbologies[l])==null?void 0:y.toJSONObject();return r&&(n[l]=r),n},e),scanIntention:(s=this.scanIntention)!=null?s:null}}};
5
+
6
+ export { p as a };
@@ -1,4 +1,4 @@
1
- import { a as a$1 } from './chunk-GOVBKIEO.js';
1
+ import { a as a$1 } from './chunk-VXMLFKGN.js';
2
2
  import { a } from './chunk-LKZBVQXD.js';
3
3
  import { Localization } from '@scandit/web-datacapture-core';
4
4
 
@@ -0,0 +1,3 @@
1
+ var c={"scandit-datacapture-sdk-barcode-pthreads.wasm":{bytes:7033774},"scandit-datacapture-sdk-barcode-simd-pthreads.wasm":{bytes:7180211},"scandit-datacapture-sdk-barcode-simd.wasm":{bytes:7534917},"scandit-datacapture-sdk-barcode.wasm":{bytes:7353667}};
2
+
3
+ export { c as a };
@@ -0,0 +1,5 @@
1
+ import { DataCaptureLoader, Logger } from '@scandit/web-datacapture-core';
2
+
3
+ function i(r){let e=URL.createObjectURL(new Blob(['"use strict";(()=>{var u={"scandit-datacapture-sdk-barcode-pthreads.wasm":{bytes:7033774},"scandit-datacapture-sdk-barcode-simd-pthreads.wasm":{bytes:7180211},"scandit-datacapture-sdk-barcode-simd.wasm":{bytes:7534917},"scandit-datacapture-sdk-barcode.wasm":{bytes:7353667}};function k(t){return typeof t=="object"&&t!=null}function D(t){if(typeof t=="string")return t;if(k(t)){if(typeof t.message=="string")return t.message}else if(typeof t?.toString=="function")return t.toString();return"unknown error"}var c;(t=>{(o=>(o.Debug="debug",o.Info="info",o.Warn="warn",o.Error="error",o.Quiet="quiet"))(t.Level||(t.Level={}));let e=new Map([["debug",1],["info",2],["warn",3],["error",4],["quiet",5]]),r="debug";function a(o){r=o}t.setLevel=a;function i(o,...p){if(!(e.get(r)>e.get(o)))switch(o){case"debug":{console.debug(...p);break}case"info":{console.log(...p);break}case"warn":{console.warn(...p);break}case"error":{console.error(...p);break}}}t.log=i;function s(...o){i("warn",...o)}t.warn=s;function n(...o){i("debug",...o)}t.debug=n;function d(...o){i("info",...o)}t.info=d;function l(...o){i("error",...o)}t.error=l})(c||(c={}));var J=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t);var $=function(t,e){this[0]=t,this[1]=e},Q=(t,e,r)=>{var a=(n,d,l,o)=>{try{var p=r[n](d),b=(d=p.value)instanceof $,h=p.done;Promise.resolve(b?d[0]:d).then(m=>b?a(n==="return"?n:"next",d[1]?{done:m.done,value:m.value}:m,l,o):l({value:m,done:h})).catch(m=>a("throw",m,l,o))}catch(m){o(m)}},i=n=>s[n]=d=>new Promise((l,o)=>a(n,d,l,o)),s={};return r=r.apply(t,e),s[J("asyncIterator")]=()=>s,i("next"),i("throw"),i("return"),s},ee=(t,e,r)=>(e=t[J("asyncIterator")])?e.call(t):(t=t[J("iterator")](),e={},r=(a,i)=>(i=t[a])&&(e[a]=s=>new Promise((n,d,l)=>(s=i.call(t,s),l=s.done,Promise.resolve(s.value).then(o=>n({value:o,done:l}),d)))),r("next"),r("return"),e);var te={};function Oe(t){return[...new Uint8Array(t)].map(e=>{let r=e.toString(16);return r.length===1?`0${r}`:r}).join("")}function Le(t){return Q(this,null,function*(){let e=t.getReader();try{for(;;){let{done:r,value:a}=yield new $(e.read());if(r)return;yield a}}finally{e.releaseLock()}})}async function Be(t){let e=[],r=0,a=0;try{for(var i=ee(Le(t)),s,n,d;s=!(n=await i.next()).done;s=!1){let o=n.value;e.push(o),r+=o.length}}catch(o){d=[o]}finally{try{s&&(n=i.return)&&await n.call(i)}finally{if(d)throw d[0]}}let l=new Uint8Array(r);for(let o of e)l.set(o,a),a+=o.length;return l.buffer}var Te=(t=>(t.VALID="VALID",t.INVALID="INVALID",t.NOT_VERIFIABLE="NOT_VERIFIABLE",t))(Te||{});async function Ie(t,e,r){if(typeof crypto.subtle.digest!="function")return c.log(c.Level.Warn,`Insecure context (see https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts): The hash of the Scandit Data Capture library WASM file found at ${r} could not be verified`),"NOT_VERIFIABLE";try{let a=t instanceof Promise?await t:t,i=await crypto.subtle.digest("SHA-256",a),s=Oe(i);return e==null?(c.log(c.Level.Warn,"The library hash is not defined or empty, cannot correctly verify integrity."),"NOT_VERIFIABLE"):s===e?(c.log(c.Level.Debug,`Data Capture library WASM integrity found at ${r} has been verified correctly.`),"VALID"):(c.log(c.Level.Warn,`The Scandit Data Capture library WASM file found at ${r} seems invalid: expected file hash doesn\'t match (received: ${s}, expected: ${e}). Please ensure the correct Scandit Data Capture file (with correct version) is retrieved.`),"INVALID")}catch(a){return c.log(c.Level.Warn,"Wasm response could not be verified",a),"NOT_VERIFIABLE"}}var j=new Map([["br",4.4],["gzip",2.9],["none",1]]);function Ae(t){var e;let r="content-encoding";if(t==null||t.get(r)==null)return j.get("none");let a=new Set(((e=t.get(r))!=null?e:"").split(",").map(i=>i.trim()));for(let[i,s]of j)if(a.has(i))return s;return j.get("none")}function We(t){var e,r;if(t==null)return 0;let a=(e=Ae(t))!=null?e:1,i=Number.parseInt((r=t.get("content-length"))!=null?r:"0",10);return Number.isNaN(i)?0:Math.floor(i*a*100)/100}function Ee(t){let{pathname:e}=new URL(t);for(let[r,a]of Object.entries(te))if(e.endsWith(r))return a.bytes;return 0}function re(t){te=t}var Re=(t,e)=>{let r=We(e);return r===0?Ee(t):r};function Ne(t,e,r,{onProgress:a,onError:i,onComplete:s}){if(!e.body)return[e];let n=Re(t,e.headers),d=0,l=0,[o,p]=r?e.body.tee():[e.body],b=o.pipeThrough(new TransformStream({async transform(h,m){try{d+=h.length,l=Number((d/n*100).toFixed(2)),n>0&&h.length>0&&l<100?a?.({percentage:l,loadedBytes:d,privateUri:t}):n===0&&h.length>0&&a?.({percentage:null,loadedBytes:d,privateUri:t}),m.enqueue(h)}catch(f){m.error(f),i?.({error:f})}},flush(h){a?.({percentage:100,loadedBytes:d,privateUri:t}),s?.({percentage:100,loadedBytes:d,privateUri:t}),h.terminate()}}));return[new Response(b,{headers:new Headers(e.headers),status:e.status,statusText:e.statusText}),p]}async function G({wasmURI:t,expectedHash:e,verifyResponseHash:r,onProgress:a,onComplete:i,onError:s,referredOrigin:n}){let d=await fetch(t,{referrerPolicy:"origin",referrer:n??""});if(!d.ok)throw new Error(`HTTP status code is not ok: ${d.status}, ${d.statusText}`);let[l,o]=Ne(t,d,r,{onProgress:a,onError:s,onComplete:i});return o!=null&&Ie(Be(o),e,t),l}function ae({wasmURI:t,expectedHash:e,verifyResponseHash:r,progressCallback:a,successCallback:i,importObject:s,referredOrigin:n}){async function d(o){try{let p=await G({wasmURI:t,expectedHash:e,verifyResponseHash:r,onProgress:a,referredOrigin:n}),b=await(o??p).arrayBuffer(),h=await globalThis.WebAssembly.instantiate(b,s);i(h.instance,h.module)}catch(p){c.log(c.Level.Error,p),c.log(c.Level.Error,`Couldn\'t instantiate Scandit SDK DataCapture library at ${t}, did you configure the path for it correctly?`)}}async function l(){let o;try{o=await G({wasmURI:t,expectedHash:e,verifyResponseHash:r,onProgress:a,referredOrigin:n});let p=await globalThis.WebAssembly.instantiateStreaming(o,s);i(p.instance,p.module)}catch(p){c.log(c.Level.Warn,p),c.log(c.Level.Warn,"WebAssembly streaming compile failed. Falling back to ArrayBuffer instantiation (this will make things slower)"),d(o?.bodyUsed===!0?void 0:o)}}typeof globalThis.WebAssembly.instantiateStreaming=="function"?l():d()}async function q(t,e,r,a){return new Promise((i,s)=>{t().then(i).catch(n=>{let d=e*2;if(d>r){s(n);return}a(n),globalThis.setTimeout(()=>{q(t,d,r,a).then(i).catch(s)},e)})})}function K(t){var e,r;let a="";if((e=t.href)!=null&&e.startsWith("blob:null/"))a="localhost";else{let i=((r=t.pathname)==null?void 0:r.length)>1&&!t.pathname.startsWith("/");a=new URL(i?t.pathname:t.origin).hostname}return a.startsWith("[")&&a.endsWith("]")&&(a=a.slice(1,-1)),a}async function ie(t,e){async function r(){return importScripts(t)}try{await q(r,250,4e3,i=>{c.log(c.Level.Warn,i),c.log(c.Level.Warn,`Couldn\'t retrieve Scandit Data Capture library at ${t}, retrying...`)}),self.Module.mainScriptUrlOrBlob=t;let a=globalThis.SDC_WASM_JS_VERSION;return a!==e&&c.log(c.Level.Warn,`The Scandit Data Capture library JS file found at ${t} seems invalid: expected version doesn\'t match (received: ${a}, expected: ${e}). Please ensure the correct Scandit Data Capture file (with correct version) is retrieved.`),!0}catch(a){return c.log(c.Level.Error,a),!1}}var L=class se extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,se.prototype),this.name=e.name}toString(){return`${this.name}: ${this.message}`}};var B=Promise.resolve(),T=!1,X=!1,P,C={writableDataPathPreload:"",writableDataPath:"",preloading:!1};async function _e(){let t="FILE_DATA",e,r,a,i,s;function n(){clearTimeout(s),a.result.close(),i.result.close(),e(0)}function d(){try{let l=[],o=a.result.transaction(t,"readonly");o.addEventListener("error",n),o.addEventListener("abort",n);let p=o.objectStore(t).openCursor();p.onsuccess=()=>{let b=p.result;if(b==null)try{let h=0,m=i.result.transaction(t,"readwrite"),f=m.objectStore(t);m.addEventListener("error",n),m.addEventListener("abort",n),m.oncomplete=()=>{clearTimeout(s),a.result.close(),i.result.close(),e(h)};for(let y of l){let v=f.count(y.primaryKey);v.onsuccess=()=>{v.result===0&&(++h,f.add(y.value,y.primaryKey))},clearTimeout(s),s=globalThis.setTimeout(()=>{c.log(c.Level.Warn,"IndexedDB database is blocked! Resetting Scandit Data Capture library..."),r(new L({name:"BlockedIndexedDB",message:"IndexedDB database is blocked"}))},500)}}catch(h){n.call({error:h})}else{let{writableDataPathPreload:h,writableDataPath:m}=C;l.push({value:b.value,primaryKey:b.primaryKey.toString().replace(`${h}/`,`${m}/`)}),b.continue()}},p.onerror=n}catch(l){n.call({error:l})}}return new Promise((l,o)=>{let{writableDataPathPreload:p,writableDataPath:b}=C;e=l,r=o,a=indexedDB.open(p),a.onupgradeneeded=()=>{try{a.result.createObjectStore(t)}catch{}},a.onsuccess=()=>{if(!Array.from(a.result.objectStoreNames).includes(t)){l(0);return}i=indexedDB.open(b),i.onupgradeneeded=()=>{try{i.result.createObjectStore(t)}catch{}},i.onsuccess=()=>{d()},i.onblocked=i.onerror=n},a.onblocked=a.onerror=n})}async function ne(t,e){let{preloading:r}=C;if(P!=null){if(T=!0,!r&&t){let a=await _e();if(!e&&a===0){T=!1;return}}await new Promise((a,i)=>{P?.(t,s=>{if(T=!1,s!=null){i(s);return}a()})})}}async function oe(t,e=!1,r=!1){return(!X||r)&&(T?(X=!0,B=B.then(async()=>(X=!1,ne(t,e)))):B=ne(t,e)),B}async function de(t){C=t,P=FS.syncfs,FS.syncfs=(e,r)=>{let a=r,i=s=>{a(s)};oe(e).then(i).catch(i)};try{FS.mkdir(C.writableDataPath)}catch(e){if(e.code!=="EEXIST")throw P=void 0,e}return FS.mount(IDBFS,{},C.writableDataPath),oe(!0,!0)}function He(t){return/^https?:\\/\\/(?:[^./]*\\.)*cdn.jsdelivr.net\\//.test(t)?{result:!0,cdnBaseURL:"https://cdn.jsdelivr.net/npm/"}:/^https?:\\/\\/(?:[^./]*\\.)*unpkg.com\\//.test(t)?{result:!0,cdnBaseURL:"https://unpkg.com/"}:{result:!1,cdnBaseURL:""}}function ze(t){let e=/@scandit\\/web-datacapture-[a-z]+/i.exec(t);return e?e[0]:null}function ce(t,e,r){let a=e,i=He(a);if(i.result){let n=ze(a);n!=null&&(a=`${i.cdnBaseURL}${n}@${t}/sdc-lib/`)}let s=r.replace(".wasm","");return i.result?{jsURI:`${a}${s}.js`,wasmURI:`${a}${s}.wasm`}:{jsURI:`${a}${s}.js?v=${t}`,wasmURI:`${a}${s}.wasm?v=${t}`}}var I;(t=>{function e(){return"7.0.0"}t.sdkVersion=e})(I||(I={}));var le=class{constructor(){this.promise=new Promise((t,e)=>{this.reject=e,this.resolve=t})}};var Ve=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),Ue=()=>(async t=>{try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(t)}catch{return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]));function Je(){return typeof crossOriginIsolated>"u"?!1:crossOriginIsolated}function $e(){try{return new WebAssembly.Memory({initial:1,maximum:1,shared:!0}).buffer.constructor.name==="SharedArrayBuffer"}catch{return!1}}async function ue(){return Ve()}async function je(){if(!await Ue())return!1;let t=null;try{t=new Worker(URL.createObjectURL(new Blob([\'postMessage("Worker" in self);\'],{type:"text/javascript"})),{name:"nestedWorkerTest"})}catch{return!1}return new Promise(e=>{if(t==null){e(!1);return}t.onmessage=r=>{t?.terminate(),e(r.data)}})}async function pe(){let t=await je();return Je()&&$e()&&t}var he=class me{constructor(e,r){this.hintPresenterV2=null,this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL=10,this.redrawInterval=1e3/30,this.redrawRequests=[],this._isDrawLoopRunning=!1,this.frameDataPool=new Map,this.lastFrameCounter=-1,this.poorMansBenchmarkLogs=!1,this.writableDataPathPreload="/scandit_sync_folder_preload",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=r,this._loadProgressCallback=this._loadProgressCallback.bind(this),re(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 r=this.getNextFrameId();this.frameDataPool.set(r,new Uint8ClampedArray(e.getFrameData()));let a=this.lastUsedModuleMirrorAxis==null?!1:this.lastUsedModuleMirrorAxis!==this.Module.Axis.None;return{frameId:r,width:e.getWidth(),height:e.getHeight(),isFrameSourceMirrored:a}}createContext(e){var r,a,i,s,n;let d=this.getModeDeserializers(),l=K(location);(l==="localhost"||l==="127.0.0.1")&&navigator.userAgent.includes("Electron")&&e.appName!=null&&(l+=`-${e.appName}`),this.parentDomain=e.parentDomain,this.contextDeserializer=new this.Module.DataCaptureContextDeserializer(this.writableDataPath,e.deviceId,e.context.deviceModelName,l,this.parentDomain,d,e.delayedRegistration,e.highEndBlurryRecognition,this.resourcePath);let o=this.contextDeserializer.contextFromJson(JSON.stringify(e.context));if(o==null){let g=this.contextDeserializer.getLastError();throw new Error(`Could not create the context: ${g}`)}let p=o.getView();this.context=o.getContext(),o.delete();let b=this.Module.DataCaptureContextListener.extend("DataCaptureContextListener",{didChangeStatus:(g,F)=>{this.contextDidChangeStatus(JSON.parse(F.toJson()))},didStartObservingContext:()=>{this.didStartObservingContext()}}),h=this.Module.DataCaptureContextFrameListener.extend("DataCaptureContextFrameListener",{onObservationStarted:g=>{},onObservationStopped:g=>{},onFrameProcessingStarted:(g,F)=>{this.workerFunctions.postMessage({type:"onFrameProcessingStarted"})},onFrameProcessingFinished:(g,F)=>{this.workerFunctions.postMessage({type:"onFrameProcessingFinished"})},onFrameSkipped:(g,F)=>{this.workerFunctions.postMessage({type:"onFrameSkipped"})}}),m=this.Module.GestureRecognizer.extend("GestureRecognizer",{setGestureListener:(g,F)=>{var M;(M=this.gestureListener)==null||M.delete(),this.gestureListener=g.clone()}});(r=this.gestureRecognizer)==null||r.delete(),this.gestureRecognizer=new m;let f=new b;this.context.addListener(f),f.delete();let y=new h;this.context.addFrameListener(y),y.delete(),this.setView(p),(a=this.view)==null||a.setGestureRecognizer(this.gestureRecognizer);let v=this.Module.PlatformHintPresenter.extend("PlatformHintPresenter",{setHintPresenter:g=>{},showToast:g=>{this.workerFunctions.postMessage({type:"showToast",payload:JSON.parse(g)})},hideToast:g=>{this.workerFunctions.postMessage({type:"hideToast",payload:JSON.parse(g)})},showGuidance:g=>{this.workerFunctions.postMessage({type:"showGuidance",payload:JSON.parse(g)})},hideGuidance:g=>{this.workerFunctions.postMessage({type:"hideGuidance",payload:JSON.parse(g)})},startUpdateTimer:g=>{this.workerFunctions.postMessage({type:"startUpdateTimer",payload:{duration:{unit:"ms",value:g}}})},stopUpdateTimer:()=>{this.workerFunctions.postMessage({type:"stopUpdateTimer"})}});(i=this.hintPresenterV2)==null||i.delete(),(s=this.webPlatformHintPresenter)==null||s.delete(),this.webPlatformHintPresenter=new v,this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter),(n=this.view)==null||n.setHintPresenterV2(this.hintPresenterV2)}onTap(e){var r;(r=this.gestureListener)==null||r.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,r;this.context.dispose(),this.frameDataPool.clear(),this.isDrawLoopRunning=!1,this.lastFrameCounter=-1,(e=this.gestureRecognizer)==null||e.delete(),this.gestureRecognizer=null,(r=this.gestureListener)==null||r.delete(),this.gestureListener=null}flushAnalytics(){this.context.flushAnalytics()}extractCentaurusLicense(e){return{payload:{centaurus:{licenseKey:this.Module.LicenseUtils[me.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 r;if(this.context==null)return{payload:e,transferables:[e.data.buffer]};let a=e.data,i=e.colorType==="GRAYSCALE"?this.Module.ImageBufferFormat.Grayscale8:this.Module.ImageBufferFormat.Rgba8888,s=this.Module.allocateUint8Array(a.byteLength);return this.Module.HEAPU8.set(a,s),(r=this.imageFrameSource)==null||r.outputFrame(s,e.width,e.height,i),{payload:e,transferables:[e.data.buffer]}}reportCameraProperties(e){this.context.setCameraProperties(e.deviceId,e.isFrontFacing,e.hasAutofocus)}requestFrameData(e){let r=this.frameDataPool.get(e);return r==null?{payload:{data:null}}:{payload:{data:r},transferables:[r.buffer]}}scheduleRedraw(e,r){this.addRedrawRequest(r),this.isDrawLoopRunning||this.startDrawLoop(e)}sendViewRefreshCommands(e){this.workerFunctions.postMessage({type:"draw",payload:e},[e.buffer])}setFrameSource(e,r){var a;this.lastUsedModuleMirrorAxis=this.mapMirrorAxisOnModule(e),(a=this.imageFrameSource)==null||a.delete(),this.imageFrameSource=new this.Module.ImageBufferFrameSource(this.lastUsedModuleMirrorAxis,r,0),this.context.setFrameSource(this.imageFrameSource)}startDrawLoop(e){this.isDrawLoopRunning=!0;let r=s=>this.redrawRequests.length>0&&this.redrawRequests[0]<=s,a=s=>{for(;this.redrawRequests.length>0&&this.redrawRequests[0]<=s;)this.redrawRequests.shift()},i=()=>{this.loopTimeoutId=setTimeout(()=>{if(!this.isDrawLoopRunning)return;let s=performance.now();if(r(s)){a(s),e.draw();let n=e.getDrawCommands();this.sendViewRefreshCommands(new Uint8Array(n))}i()},this.redrawInterval)};i()}updateContext(e){if(this.context!=null&&this.contextDeserializer!=null){e.view!=null&&!e.view.visible&&this.context.flushAnalytics();let r=this.contextDeserializer.updateContextFromJson(this.context,this.view,JSON.stringify(e.context));if(r==null){let i=this.contextDeserializer.getLastError();throw new Error(`Could not update the context: ${i}`)}this.context.delete(),this.context=r.getContext();let a=r.getView();r.delete(),a!=null&&e.view!=null&&a.setViewSize(e.view.width,e.view.height,e.view.orientation),this.hintPresenterV2!=null&&a?.setHintPresenterV2(this.hintPresenterV2),this.gestureRecognizer!=null&&a?.setGestureRecognizer(this.gestureRecognizer),this.setView(a),c.log(c.Level.Debug,"context updated",e)}}onDocumentVisibilityChange(e){e==="hidden"&&this.context.flushAnalytics()}isFeatureSupported(e){return{payload:{supported:this.context.isFeatureSupported(e)}}}getViewfinderInfo(){var e,r;return{payload:{isDisplayingViewfinder:(r=(e=this.view)==null?void 0:e.isDisplayingViewfinder())!=null?r:!1,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,r){return r?e?"f158ddbcbaf519430f67072a843628a250fe0a0e4089369ebc6242b7dc1db4f8":"2e15106b5958443377b8f14ea9ebee5e2eab015e9061749900b16e6c46c3a653":e?"ce6ac1878290b06fc9782429a0da5f8c5dda32662b5ee9634402021d9cef590c":""}getWasmCoreFileName(e,r){return r?e?"scandit-datacapture-sdk-barcode-simd-pthreads.wasm":"scandit-datacapture-sdk-barcode-pthreads.wasm":e?"scandit-datacapture-sdk-barcode-simd.wasm":""}getWasmMetadata(){return u}getWasmSideModuleFileName(){return""}_loadProgressCallback(e){this.workerFunctions.postMessage({type:"loadLibraryProgress",payload:e})}addRedrawRequest(e){this.redrawRequests.push(Math.round(performance.now())+e),this.redrawRequests.sort((r,a)=>r-a)}contextDidChangeStatus(e){e.code===260?e.message=e.message.replace("domain name",`domain name (${K(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=!1,this.sendViewRefreshCommands(new Uint8Array([])))}setViewRefreshHandler(e){if(e==null||e.isViewRefreshHandlerSet)return;let r=this.Module.NeedsRedrawDelegate.extend("NeedsRedrawDelegate",{setNeedsRedrawIn:this.scheduleRedraw.bind(this,e)}),a=new r;e.setNeedsRedrawDelegate(a),e.isViewRefreshHandlerSet=!0}setupDataDecoding(){let e=this.moduleHandler.get(),r=e.DataDecoding.extend("DataDecoding",{decode(a,i){try{let s=JSON.parse(i),n=[];for(let d of s){let l=new TextDecoder(d.ianaName,{fatal:!0});n.push(l.decode(a.slice(d.startIndex,d.endIndex)))}return n.join("")}catch{return""}}});e.setDataDecoding(new r)}start(e,r,a){e&&r&&(this.setupDataDecoding(),this.moduleHandler.get().callMain(),typeof this.moduleHandler.get().PThread=="object"||a())}getWritableDataPath(e,r){return e?this.writableDataPathPreload:r!=null?(c.log(c.Level.Debug,`IndexedDB database name override in use to recover from blocked standard database: ${r}`),r):this.writableDataPathStandard}async setup({libraryLocation:e,locationPath:r,preloadEngine:a,writableDataPathOverride:i,overrideThreadsSupport:s,overrideSimdSupport:n,verifyResponseHash:d,referredOrigin:l}){var o;let p=!1,b=!1;this.writableDataPath=this.getWritableDataPath(a,i),this.resourcePath=`${e}${this.resourceFilesSubfolder}/`,globalThis.path=r;let{resolve:h,reject:m,promise:f}=new le,y=I.sdkVersion();if(y==="")throw new L({name:"Invalid library version",message:"Library version is not defined or empty, cannot generate proper path to library files."});let[v,g]=await Promise.all([ue(),pe()]);s!=="auto"&&(g=s==="on"),n!=="auto"&&(v=n==="on");let F=ce(y,e,this.getWasmCoreFileName(v,g)),{jsURI:M,wasmURI:Z}=F,De={instantiateWasm:(w,Pe)=>(ae({importObject:w,wasmURI:Z,expectedHash:this.getWasmCoreExpectedHash(v,g),verifyResponseHash:d,successCallback:Pe,progressCallback:this._loadProgressCallback,referredOrigin:l}),{})};return this.moduleHandler.set({mainScriptUrlOrBlob:M,canvas:(o=this.workerFunctions.getOffscreenCanvas())!=null?o:{getContext:()=>null},...De,dynamicLibraries:this.getWasmDynamicLibraries(Z),locateFile:w=>e+w,noInitialRun:!0,preRun:[async()=>{try{await de({writableDataPathPreload:this.writableDataPathPreload,writableDataPath:this.writableDataPath,preloading:a})}catch(w){if(w.name==="BlockedIndexedDB"){m(w.toString());return}c.log(c.Level.Debug,"No IndexedDB support, some data will not be persisted:",w)}b=!0,this.start(b,p,h)}],onMainComplete:()=>{if([p,b].includes(!1)){c.log(c.Level.Warn,{runtimeLoaded:p,fileSystemSynced:b},"Both runtimeLoaded and fileSystemSynced should be true when calling onMainComplete"),m("onMainComplete has been called but runtime or file system was not ready.");return}h()},onRuntimeInitialized:()=>{p=!0,this.start(b,p,h)},print:w=>{c.log(c.Level.Info,w)}}),await ie(M,y)||m(`Couldn\'t retrieve Scandit Data Capture library at ${M}, did you configure the path for it correctly?`),f}};he.get3dPartyLicenseKeyMethodName=atob("Z2V0QmxpbmtJZExpY2Vuc2VLZXk=");var x=he;function ge(t){console.warn("Reached unexpected case",t)}function be(t){return typeof t=="object"&&t!=null&&t.document==null&&"addEventListener"in t&&typeof t.importScripts=="function"}var Y=class{constructor(t,e){this.onMessageListener=this.onMessage.bind(this),this.workerSelf=t,this.dataCaptureInstance=new x(e,{postMessage:this.postMessage.bind(this),getOffscreenCanvas:this.getOffscreenCanvas.bind(this)}),be(t)&&this.listenToMessages()}listenToMessages(){this.workerSelf.addEventListener("message",this.onMessageListener),this.workerSelf.addEventListener("error",t=>{c.log(c.Level.Error,t)}),this.workerSelf.addEventListener("messageerror",t=>{c.log(c.Level.Error,t)})}postMessage(t,e){this.workerSelf.postMessage(t,e??[])}getOffscreenCanvas(){if(typeof this.workerSelf.OffscreenCanvas=="function")return new this.workerSelf.OffscreenCanvas(32,32)}hasPayload(t){return k(t)&&"payload"in t}hasTransferables(t){return k(t)&&Array.isArray(t.transferables)}async respondWith(t,e,r){let a=null,i;try{i=r(),i instanceof Promise&&(i=await i)}catch(n){i=void 0,a=D(n)}let s={type:"workerTaskId",command:t,id:e,payload:this.hasPayload(i)?i.payload:void 0};a!=null&&(s.error=a),this.postMessage(s,this.hasTransferables(i)?i.transferables:[])}onMessage(t){switch(t.data.command){case"loadLibrary":{{let{data:e}=t;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.loadLibrary({libraryLocation:e.libraryLocation,locationPath:e.locationPath,referredOrigin:e.referredOrigin,preloadEngine:e.preloadEngine,writableDataPathOverride:e.writableDataPathOverride,overrideThreadsSupport:e.overrideThreadsSupport,overrideSimdSupport:e.overrideSimdSupport,verifyResponseHash:e.verifyResponseHash}))}break}case"onTap":{{let{data:e}=t;this.respondWith(e.command,e.id,async()=>{this.dataCaptureInstance.onTap(e.point)})}break}case"hintPresenterV2update":{{let{data:e}=t;this.respondWith(e.command,e.id,async()=>{this.dataCaptureInstance.hintPresenterV2Update()})}break}case"createContext":{{let{data:e}=t;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}=t;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.setFrameSource(e.mirrorAxis,e.isCameraFrameSource))}break}case"processFrame":{{let{data:e}=t;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}=t;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.requestFrameData(e.frameId))}break}case"deleteFrameData":{{let{data:e}=t;this.respondWith(e.command,e.id,()=>{this.dataCaptureInstance.deleteFrameData(e.frameId)})}break}case"updateContext":{{let{data:e}=t;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.updateContext(e))}break}case"dispose":{this.respondWith(t.data.command,t.data.id,()=>this.dataCaptureInstance.dispose());break}case"flushAnalytics":{this.respondWith(t.data.command,t.data.id,()=>{this.dataCaptureInstance.flushAnalytics()});break}case"reportCameraProperties":{{let{data:e}=t;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.reportCameraProperties(e))}break}case"setLogLevel":{{let{data:e}=t;this.respondWith(e.command,e.id,()=>{c.setLevel(e.level)})}break}case"extractCentaurusLicense":{{let{data:e}=t;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.extractCentaurusLicense(e.licenseKey))}break}case"documentVisibility":{{let{data:e}=t;this.respondWith(e.command,e.id,()=>{this.dataCaptureInstance.onDocumentVisibilityChange(e.state)})}break}case"isFeatureSupported":{{let{data:e}=t;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.isFeatureSupported(e.feature))}break}case"getViewfinderInfo":{{let{data:e}=t;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.getViewfinderInfo())}break}case"getOpenSourceSoftwareLicenseInfo":{{let{data:e}=t;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.getOpenSourceSoftwareLicenseInfo())}break}default:return ge(t.data),!1}return!0}};var fe=(t=>(t.Body="body",t.Footnote="footnote",t))(fe||{}),A=(t=>(t.Start="start",t.Center="center",t.End="end",t))(A||{}),ye=(t=>(t.Normal="normal",t.Wider="wider",t.FitText="fitText",t))(ye||{}),Se=(t=>(t.Normal="normal",t.Taller="taller",t))(Se||{}),we=(t=>(t.Square="square",t.Rounded="rounded",t))(we||{}),W=(t=>(t.None="none",t.Check="check",t.ExclamationMark="exclamationMark",t))(W||{}),E=(t=>(t.Top="top",t.AboveViewFinder="aboveViewFinder",t.BelowViewFinder="belowViewFinder",t))(E||{}),ve=(t=>(t.AboveViewFinder="aboveViewFinder",t.BelowViewFinder="belowViewFinder",t))(ve||{}),Fe=(t=>(t.BlackOnWhite="blackOnWhite",t.WhiteOnBlack="whiteOnBlack",t.Transparent="transparent",t))(Fe||{}),O=(t=>(t.Success="success",t.Error="error",t.Warning="warning",t.Info="info",t.Notification="notification",t))(O||{}),Me=(t=>(t[t.Ocr=0]="Ocr",t[t.HideLogo=1]="HideLogo",t[t.ShowTestLicenseMessage=2]="ShowTestLicenseMessage",t[t.AugmentedReality=5]="AugmentedReality",t[t.ActivityPingStatsAddon=8]="ActivityPingStatsAddon",t[t.ActivityPing=9]="ActivityPing",t[t.Registration=10]="Registration",t[t.Parser=11]="Parser",t[t.BarcodeCapture=14]="BarcodeCapture",t[t.Analytics=17]="Analytics",t[t.AnalyticsBatchMode=18]="AnalyticsBatchMode",t[t.AnalyticsScanContent=19]="AnalyticsScanContent",t[t.AnalyticsOnlineVerification=20]="AnalyticsOnlineVerification",t[t.SparkScan=21]="SparkScan",t[t.AamvaIdBarcodeVerification=22]="AamvaIdBarcodeVerification",t[t.MappingForTracking=23]="MappingForTracking",t[t.BarcodeFind=24]="BarcodeFind",t[t.MandatoryRegistration=25]="MandatoryRegistration",t[t.FeatureTracking=26]="FeatureTracking",t[t.IdCaptureViz=27]="IdCaptureViz",t[t.IdCaptureMrz=28]="IdCaptureMrz",t[t.IdCaptureBarcode=29]="IdCaptureBarcode",t[t.BarcodeSelectionAimToScan=30]="BarcodeSelectionAimToScan",t[t.BarcodeSelectionTapToScan=31]="BarcodeSelectionTapToScan",t[t.BarcodeCount=32]="BarcodeCount",t[t.BarcodePick=33]="BarcodePick",t[t.IdVerificationDataComparison=34]="IdVerificationDataComparison",t[t.SmartLabelBarcode=35]="SmartLabelBarcode",t[t.SmartLabelText=36]="SmartLabelText",t[t.VoidedIdDetection=37]="VoidedIdDetection",t[t.BarcodeArFull=38]="BarcodeArFull",t))(Me||{});var R=class{constructor(e,r,a){this.captureListenerSet=!1;this.coreEngine=e,this.Module=r,this.workerFunctions=a,this.setup()}barcodeCaptureDidUpdateSession(e){this.workerFunctions.postMessage({type:"barcodeCaptureDidUpdateSession",payload:JSON.parse(e.toJson())})}barcodeBatchDidUpdateSession(e){this.workerFunctions.postMessage({type:"barcodeBatchDidUpdateSession",payload:JSON.parse(e.toJson())})}getCaptureDeserializer(){return this.barcodeCaptureDeserializer}getTrackingDeserializer(){return this.barcodeBatchDeserializer}setup(){let e=this.Module.BarcodeCaptureListener.extend("BarcodeCaptureListener",{didScan:(n,d,l)=>{this.barcodeCaptureDidScan(d,l)},didUpdateSession:(n,d)=>{this.barcodeCaptureDidUpdateSession(d)}}),r=this.Module.Feedback.extend("Feedback",{emit:()=>{this.successFeedback()}}),a=new e,i=new r,s=this.Module.BarcodeCaptureDeserializerListener.extend("BarcodeCaptureDeserializerListener",{onModeDeserializationFinished:(n,d)=>{d.addListener(a,1),d.setSuccessFeedback(i)},onModeDeserializationStarted(){},onSettingsDeserializationStarted(){},onSettingsDeserializationFinished(){}});this.barcodeCaptureDeserializer=new this.Module.BarcodeCaptureDeserializer,this.barcodeCaptureDeserializer.setListener(new s)}successFeedback(){this.workerFunctions.postMessage({type:"successFeedback"})}barcodeCaptureDidScan(e,r){let a=this.coreEngine.convertToLoadableFrameData(r);this.workerFunctions.postMessage({type:"barcodeCaptureDidScan",payload:{session:JSON.parse(e.toJson()),frameData:a}})}};function Ge(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Ce(t){return t}var N=class{constructor(e,r,a){this.barcodeFind=null;this.basicOverlay=null;this.transparentGuidanceHintStyle={backgroundColor:"00000000",cornerRadius:4,fitToText:!1,isAnimatedToView:!1,textAlignment:A.Center,hintIcon:W.None,hintAnchor:E.AboveViewFinder,hintAnchorOffset:-12,horizontalMargin:0,iconColor:"00000000",lineHeight:-1,maxLines:1,maxWidthFraction:.8,textColor:"ffffffff",textSize:15,textWeight:600};this.customerTransformation=Ce;this.coreEngine=e,this.Module=r,this.workerFunctions=a}async forSettings(e){this.barcodeFind?.delete(),this.barcodeFind=new this.Module.BarcodeFind(this.coreEngine.context,JSON.stringify(e));let r=this.Module.Feedback.extend("Feedback",{emit:()=>{this.listUpdatedFeedback()}}),a=this.Module.Feedback.extend("Feedback",{emit:()=>{this.barcodeFindFeedback()}}),i=this.Module.BarcodeFindTransformer.extend("BarcodeFindTransformer",{transformBarcodeData:n=>this.customerTransformation(n)}),s=this.Module.BarcodeFindListener.extend("BarcodeFindListener",{didUpdateSession:(n,d,l)=>{let o=this.coreEngine.convertToLoadableFrameData(l);this.workerFunctions.postMessage({type:"barcodeFindDidUpdateSession",payload:{session:JSON.parse(d.toJson()),frameData:o}})},onSearchPaused:n=>{let d=[];for(let l=0;l<n.size();l++)d.push(n.get(l));this.workerFunctions.postMessage({type:"barcodeFindSearchPaused",payload:{foundItems:d}})},onSearchStopped:n=>{let d=[];for(let l=0;l<n.size();l++)d.push(n.get(l));this.workerFunctions.postMessage({type:"barcodeFindSearchStopped",payload:{foundItems:d}})},onSearchStarted:()=>{this.workerFunctions.postMessage({type:"barcodeFindSearchStarted",payload:{}})}});this.barcodeFind.setBarcodeFindTransformer(new i),this.barcodeFind.addListener(new s,1),this.barcodeFind.setItemListUpdatedFeedback(new r),this.barcodeFind.setFeedback(new a),this.Module.addBarcodeFindToContext(this.coreEngine.context,this.barcodeFind)}barcodeFindFeedback(){this.workerFunctions.postMessage({type:"barcodeFindFeedback",payload:{}})}start(){this.barcodeFind?.start()}stop(){this.barcodeFind?.stop()}pause(){this.barcodeFind?.pause()}setEnabled(e){this.barcodeFind?.setEnabled(e)}setItemList(e){this.barcodeFind?.setItemList(JSON.stringify(e))}async removeMode(){this.barcodeFind!=null&&this.Module.removeBarcodeFindFromContext(this.coreEngine.context,this.barcodeFind)}addBasicOverlay(){this.basicOverlay?.delete(),this.basicOverlay=null,this.barcodeFind!=null&&(this.basicOverlay=new this.Module.BarcodeFindBasicOverlay(this.barcodeFind)),this.coreEngine.view!=null&&this.basicOverlay!=null&&(this.basicOverlay.setGuidanceHandler(this.createWebFindGuidanceHandler()),this.Module.addBarcodeFindBasicOverlayToView(this.coreEngine.view,this.basicOverlay))}removeBasicOverlay(){this.coreEngine.view!=null&&this.basicOverlay!=null&&this.Module.removeBarcodeFindBasicOverlayFromView(this.coreEngine.view,this.basicOverlay)}async applySettings(e){this.barcodeFind?.applySettings(JSON.stringify(e))}updateBasicOverlay(e){let r=Object.entries(e).filter(([a,i])=>a!=="type");for(let[a,i]of r){let s=`set${Ge(a)}`;this.basicOverlay!=null&&typeof this.basicOverlay[s]=="function"&&i!=null&&this.basicOverlay[s](i)}}setTransformerFunction(e){this.customerTransformation=e??Ce}successFeedback(){this.workerFunctions.postMessage({type:"successFeedback"})}listUpdatedFeedback(){this.workerFunctions.postMessage({type:"barcodeFindListUpdatedFeedback",payload:{}})}setToast(e,r){let a=this.coreEngine.hintPresenterV2;e?a?.showToast(JSON.stringify(r)):a?.hideToast(r.tag)}setGuidance(e,r,a){let i={tag:a,text:r,hintStyle:this.transparentGuidanceHintStyle};this.workerFunctions.postMessage({type:e?"showGuidance":"hideGuidance",payload:i})}createWebFindGuidanceHandler(){let e=this.Module.BarcodeFindGuidanceHandler.extend("BarcodeFindGuidanceHandler",{setInitialGuidance:(r,a)=>{this.setGuidance(r,a,"InitialGuidance")},setMoveCloserGuidance:(r,a)=>{this.setGuidance(!1,a,"InitialGuidance"),this.setGuidance(r,a,"MoveCloserGuidance")},setAllItemsFound:(r,a)=>{let i={text:a,toastHintStyle:O.Success,tag:"AllItemsFound"};this.setToast(r,i)},setTapShutterToPause:(r,a)=>{this.setGuidance(!1,a,"InitialGuidance"),this.setGuidance(r,a,"TapShutterToPause")},setTapShutterToResume:(r,a)=>{this.setGuidance(!1,a,"InitialGuidance"),this.setGuidance(r,a,"TapShutterResume")},setItemListUpdated:(r,a)=>{let i={text:a,toastHintStyle:O.Info,tag:"ItemListUpdated"};this.setToast(r,i)}});return new e}};var _=class{constructor(e,r,a){this.trackingListenerSet=!1;this.coreEngine=e,this.Module=r,this.workerFunctions=a,this.setup()}barcodeBatchDidUpdateSession(e){this.workerFunctions.postMessage({type:"barcodeBatchDidUpdateSession",payload:JSON.parse(e.toJson())})}getBatchDeserializer(){return this.barcodeBatchDeserializer}setup(){let e=this.Module.BarcodeBatchListener.extend("BarcodeTrackingListener",{didUpdateSession:(a,i)=>{this.barcodeBatchDidUpdateSession(i)},onTrackedBarcodeTapped:(a,i)=>{this.onTrackedBarcodeTapped(i)}}),r=this.Module.BarcodeBatchDeserializerListener.extend("BarcodeTrackingDeserializerListener",{onModeDeserializationFinished:(a,i)=>{this.trackingListenerSet||(i.addListener(new e,1),this.trackingListenerSet=!0)},onModeDeserializationStarted(){},onSettingsDeserializationStarted(){},onSettingsDeserializationFinished(){}});this.barcodeBatchDeserializer=new this.Module.BarcodeBatchDeserializer,this.barcodeBatchDeserializer.setListener(new r)}onTrackedBarcodeTapped(e){this.workerFunctions.postMessage({type:"didTapTrackedBarcode",payload:JSON.parse(e.toJson())})}};var S=class{constructor(e){this.subscribers=new Set;this.property={key:e,value:null}}addSubscriber(e){this.subscribers.add(e),e.onPropertyChanged?.(this.property)}removeSubscriber(e){this.subscribers.delete(e)}setProperty(e){if(this.property.value!==e.value){this.property={key:this.property.key,value:e.value};for(let r of this.subscribers)r.onPropertyChanged?.(this.property)}}};var qe={torch_state:new S("torch_state"),scanning_mode:new S("scanning_mode"),sound_enabled:new S("sound_enabled"),haptic_enabled:new S("haptic_enabled"),hand_mode:new S("hand_mode"),session_stop_reason:new S("session_stop_reason"),camera_position:new S("camera_position")},H=class{getBehaviorSubject(e){return qe[e]}};var z=class{constructor(e,r,a){this.captureListenerSet=!1;this.propertyPushSource=new H;this.coreEngine=e,this.Module=r,this.workerFunctions=a,this.setup()}sparkScanDidUpdateSession(e){this.workerFunctions.postMessage({type:"sparkScanDidUpdateSession",payload:JSON.parse(e.toJson())})}getSparkScanDeserializer(){return this.sparkScanDeserializer}setup(){let e=this.Module.SparkScanListener.extend("SparkScanListener",{didScan:(i,s,n)=>{this.sparkScanDidScan(s,n)},didUpdateSession:(i,s)=>{this.sparkScanDidUpdateSession(s)}}),r=this.Module.Feedback.extend("Feedback",{emit:()=>{this.successFeedback()}}),a=this.Module.SparkScanDeserializerListener.extend("SparkScanDeserializerListener",{onModeDeserializationFinished:(i,s)=>{this.captureListenerSet||(s.addListener(new e,1),s.setSuccessFeedback(new r),s.setPropertyPushSource(this.propertyPushSource),this.captureListenerSet=!0)},onModeDeserializationStarted(){},onSettingsDeserializationStarted(){},onSettingsDeserializationFinished(){},onOverlayDeserializationStarted(){},onOverlayDeserializationFinished:(i,s,n)=>{this.sparkScanOverlay?.delete(),this.sparkScanOverlay=s.clone()}});this.sparkScanDeserializer=new this.Module.SparkScanDeserializer,this.sparkScanDeserializer.setListener(new a)}emitErrorFeedback(e){this.sparkScanOverlay?.onErrorFeedbackEmitted(e)}overlayReadyForDraw(){this.sparkScanOverlay?.onReadyForNewData()}analyticsManagerPropertyChanged(e){this.propertyPushSource.getBehaviorSubject(e.key).setProperty(e)}successFeedback(){this.workerFunctions.postMessage({type:"successFeedback"})}sparkScanDidScan(e,r){let a=this.coreEngine.convertToLoadableFrameData(r);this.workerFunctions.postMessage({type:"sparkScanDidScan",payload:{session:JSON.parse(e.toJson()),frameData:a}})}};var V=class extends x{constructor(e,r){super(e,r)}getModeDeserializers(){this.barcodeCaptureMode=new R(this,this.Module,this.workerFunctions),this.barcodeBatchMode=new _(this,this.Module,this.workerFunctions),this.sparkScanMode=new z(this,this.Module,this.workerFunctions),this.barcodeFindMode=new N(this,this.Module,this.workerFunctions);let e=super.getModeDeserializers();return e.push_back(this.barcodeCaptureMode.getCaptureDeserializer()),e.push_back(this.barcodeBatchMode.getBatchDeserializer()),e.push_back(this.sparkScanMode.getSparkScanDeserializer()),e}getWasmSideModuleFileName(){return""}getWasmCoreFileName(e,r){return r?e?"scandit-datacapture-sdk-barcode-simd-pthreads.wasm":"scandit-datacapture-sdk-barcode-pthreads.wasm":e?"scandit-datacapture-sdk-barcode-simd.wasm":"scandit-datacapture-sdk-barcode.wasm"}getWasmCoreExpectedHash(e,r){return r?e?"f158ddbcbaf519430f67072a843628a250fe0a0e4089369ebc6242b7dc1db4f8":"2e15106b5958443377b8f14ea9ebee5e2eab015e9061749900b16e6c46c3a653":e?"ce6ac1878290b06fc9782429a0da5f8c5dda32662b5ee9634402021d9cef590c":"cb3203ac8d18b08947974f71da2856fd268b7257668686f68170fd17e1d402ad"}getWasmMetadata(){return u}};function Ke(t){return(r=>/^[$A-Z_a-z][\\w$]*\\s*\\(.*\\)\\s*\\{/.test(r)&&!r.startsWith("function"))(t)?`function ${t}`:t}var Xe=["fetch","XMLHttpRequest","eval","Function","self","globalThis","Module","importScripts","this","console","window","document","import","Worker","ServiceWorker"];function Ye(t){return Xe.map(r=>new RegExp(`\\\\b${r}\\\\b`,"g")).some(r=>r.test(t))}function ke(t){if(t==null)return null;let e=Ke(t);if(Ye(e))throw new Error("Function should be pure. Shouldn\'t introduce side effects, or rely on global scope");let r=`\'use strict\';\n return (${e});`;try{return new Function(r)()}catch{return null}}var U=class extends Y{constructor(e,r){super(e,r),this.dataCaptureInstance=new V(r,{postMessage:this.postMessage.bind(this),getOffscreenCanvas:this.getOffscreenCanvas.bind(this)})}async respondWith(e,r,a){let i=null,s;try{s=a(),s instanceof Promise&&(s=await s)}catch(d){s=void 0,i=D(d)}let n={type:"workerTaskId",command:e,id:r,payload:this.hasPayload(s)?s.payload:void 0};i!=null&&(n.error=i),this.postMessage(n,this.hasTransferables(s)?s.transferables:[])}onMessage(e){switch(e.data.command){case"sparkScanEmitErrorFeedback":{let{data:r}=e;return this.respondWith(r.command,r.id,()=>{this.dataCaptureInstance.sparkScanMode.emitErrorFeedback(r.shouldRemoveBrush)}),!0}case"sparkScanOverlayReadyForDraw":{let{data:r}=e;return this.respondWith(r.command,r.id,()=>{this.dataCaptureInstance.sparkScanMode.overlayReadyForDraw()}),!0}case"sparkScanAnalyticsManagerPropertyChanged":{let{data:r}=e;return this.respondWith(r.command,r.id,async()=>{this.dataCaptureInstance.sparkScanMode.analyticsManagerPropertyChanged(r.property)}),!0}case"barcodeFindForSettings":{let{data:r}=e;return this.respondWith(r.command,r.id,async()=>this.dataCaptureInstance.barcodeFindMode.forSettings(r.settings)),!0}case"barcodeFindModeRemove":{let{data:r}=e;return this.respondWith(r.command,r.id,async()=>this.dataCaptureInstance.barcodeFindMode.removeMode()),!0}case"barcodeFindSearchStart":return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeFindMode.start()}),!0;case"barcodeFindSearchPause":return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeFindMode.pause()}),!0;case"barcodeFindSearchStop":return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeFindMode.stop()}),!0;case"barcodeFindSetItemList":{let{data:r}=e;return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeFindMode.setItemList(r.itemList)}),!0}case"barcodeFindSetEnabled":{let{data:r}=e;return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeFindMode.setEnabled(r.enabled)}),!0}case"barcodeFindApplySettings":{let{data:r}=e;return this.respondWith(r.command,r.id,async()=>this.dataCaptureInstance.barcodeFindMode.applySettings(r.settings)),!0}case"barcodeFindAddBasicOverlay":{let{data:r}=e;return this.respondWith(r.command,r.id,async()=>{this.dataCaptureInstance.barcodeFindMode.addBasicOverlay()}),!0}case"barcodeFindRemoveBasicOverlay":{let{data:r}=e;return this.respondWith(r.command,r.id,async()=>{this.dataCaptureInstance.barcodeFindMode.removeBasicOverlay()}),!0}case"barcodeFindUpdateBasicOverlay":{let{data:r}=e;return this.respondWith(r.command,r.id,async()=>{this.dataCaptureInstance.barcodeFindMode.updateBasicOverlay(r.jsonOverlay)}),!0}case"barcodeFindSetTransformerFunction":{let{data:r}=e;return this.respondWith(r.command,r.id,async()=>{let a=ke(r.functionAsString);this.dataCaptureInstance.barcodeFindMode.setTransformerFunction(a)}),!0}default:return super.onMessage(e)}}};var Kr=new U(globalThis,{get:()=>globalThis.Module,set:t=>{globalThis.Module=t}});function Xr(t){}})();\n'],{type:"application/javascript"})),t=new Worker(e,r);return URL.revokeObjectURL(e),t}var n=class r extends DataCaptureLoader{get dataCaptureWorker(){return (this._dataCaptureWorker)!=null||(this._dataCaptureWorker=i({name:this.name})),this._dataCaptureWorker}get name(){return `BarcodeCapture${this.isPreloadEngine?" (preload)":""}`}static async create(e){var a;let t=new r(e);return await t.workerCommand("setLogLevel",{level:(a=e.logLevel)!=null?a:Logger.Level.Debug}),await t.load(),t}async workerCommand(e,t,a){return new Promise((o,d)=>{let s=this.workerCommandId++;this.workerTasks.set(s,{resolve:o,reject:d,command:e});let c={...t,command:e,id:s};this.dataCaptureWorker.postMessage(c,a);})}};
4
+
5
+ export { n as a };
@@ -1,13 +1,13 @@
1
1
  import { b as b$1, a as a$2 } from './chunk-3A6GSH7S.js';
2
2
  import { h, i, g as g$1 } from './chunk-DVHTYKDX.js';
3
3
  import { a as a$1 } from './chunk-DTO5ICFV.js';
4
- import { d, c, k as k$1, l, e, b } from './chunk-Y6DC25EF.js';
4
+ import { d, c, k, l, e, b } from './chunk-Y6DC25EF.js';
5
5
  import { c as c$1, a } from './chunk-YBD5JYCX.js';
6
6
  import { ScanditHTMLElement, defineCustomElements, html } from '@scandit/web-datacapture-core/build/js/private/utils/index.js';
7
7
 
8
- var g=class g extends ScanditHTMLElement{constructor(){super(...arguments);this.targetModeButtonTapListener=this.onTargetModeButtonTap.bind(this);this.scanningBehaviorButtonTapListener=this.onScanningBehaviorButtonTap.bind(this);this.barcodeFindButtonTapListener=this.onBarcodeFindButtonTap.bind(this);this.cameraSwitchButtonTapListener=this.onCameraSwitchButtonTap.bind(this);this.computedStyle=getComputedStyle(this);}get[d](){return this.hasAttribute(d)}set[d](t){this.toggleAttribute(d,t);}get[c](){return this.hasAttribute(c)}set[c](t){this.toggleAttribute(c,t);}get[k$1](){return this.hasAttribute(k$1)}set[k$1](t){this.toggleAttribute(k$1,t);}get[l](){return this.hasAttribute(l)}set[l](t){this.toggleAttribute(l,t);}get[e](){return this.hasAttribute(e)}set[e](t){this.toggleAttribute(e,t),this.targetModeButtonIcon&&(this.targetModeButtonIcon.fill=t?this.computedStyle.getPropertyValue(h):this.computedStyle.getPropertyValue(i));}get[b](){var t;return (t=this.getAttribute(b))!=null?t:"single"}set[b](t){this.setAttribute(b,t),this.scanningBehaviorButtonIcon&&(this.scanningBehaviorButtonIcon.fill=t==="continuous"?this.computedStyle.getPropertyValue(h):this.computedStyle.getPropertyValue(i));}get visibleModeButtonCount(){return [k$1].reduce((n,i)=>this[i]===!0?n+1:n,0)}get visibleButtonCount(){return g.observedAttributes.reduce((t,n)=>this[n]===!0?t+1:t,0)}static create(){return defineCustomElements({[c$1]:this,[a]:a$1}),document.createElement(c$1)}enableCameraSwitchButton(t){this.cameraSwitchButtonIcon&&(this.cameraSwitchButtonIcon.fill=t?this.computedStyle.getPropertyValue(h):this.computedStyle.getPropertyValue(i));}render(){var i$1,B,m,S,w,T,y;let t=this[e]?this.computedStyle.getPropertyValue(h):this.computedStyle.getPropertyValue(i),n=this[b]==="continuous"?this.computedStyle.getPropertyValue(h):this.computedStyle.getPropertyValue(i);this.innerHTML=html`
8
+ var g=class g extends ScanditHTMLElement{constructor(){super(...arguments);this.targetModeButtonTapListener=this.onTargetModeButtonTap.bind(this);this.scanningBehaviorButtonTapListener=this.onScanningBehaviorButtonTap.bind(this);this.barcodeFindButtonTapListener=this.onBarcodeFindButtonTap.bind(this);this.cameraSwitchButtonTapListener=this.onCameraSwitchButtonTap.bind(this);this.computedStyle=getComputedStyle(this);}get[d](){return this.hasAttribute(d)}set[d](t){this.toggleAttribute(d,t);}get[c](){return this.hasAttribute(c)}set[c](t){this.toggleAttribute(c,t);}get[k](){return this.hasAttribute(k)}set[k](t){this.toggleAttribute(k,t);}get[l](){return this.hasAttribute(l)}set[l](t){this.toggleAttribute(l,t);}get[e](){return this.hasAttribute(e)}set[e](t){this.toggleAttribute(e,t),this.targetModeButtonIcon&&(this.targetModeButtonIcon.fill=t?this.computedStyle.getPropertyValue(h):this.computedStyle.getPropertyValue(i));}get[b](){var t;return (t=this.getAttribute(b))!=null?t:"single"}set[b](t){this.setAttribute(b,t),this.scanningBehaviorButtonIcon&&(this.scanningBehaviorButtonIcon.fill=t==="continuous"?this.computedStyle.getPropertyValue(h):this.computedStyle.getPropertyValue(i));}get visibleModeButtonCount(){return [k].reduce((n,i)=>this[i]===!0?n+1:n,0)}get visibleButtonCount(){return g.observedAttributes.reduce((t,n)=>this[n]===!0?t+1:t,0)}static create(){return defineCustomElements({[c$1]:this,[a]:a$1}),document.createElement(c$1)}enableCameraSwitchButton(t){this.cameraSwitchButtonIcon&&(this.cameraSwitchButtonIcon.fill=t?this.computedStyle.getPropertyValue(h):this.computedStyle.getPropertyValue(i));}render(){var i$1,B,m,S,w,T,y;let t=this[e]?this.computedStyle.getPropertyValue(h):this.computedStyle.getPropertyValue(i),n=this[b]==="continuous"?this.computedStyle.getPropertyValue(h):this.computedStyle.getPropertyValue(i);this.innerHTML=html`
9
9
  <div class="${c$1}">
10
- ${this[k$1]?html`<button
10
+ ${this[k]?html`<button
11
11
  id="barcodeFindButton"
12
12
  class="${c$1}__button ${c$1}__button--mode"
13
13
  >
@@ -47,6 +47,7 @@ var g=class g extends ScanditHTMLElement{constructor(){super(...arguments);this.
47
47
  padding: 6.75px 12px;
48
48
  background: var(${g$1});
49
49
  gap: 12px;
50
+ overflow-x: scroll;
50
51
  -ms-overflow-style: none;
51
52
  scrollbar-width: none;
52
53
  -webkit-overflow-scrolling: touch;
@@ -63,6 +64,7 @@ var g=class g extends ScanditHTMLElement{constructor(){super(...arguments);this.
63
64
  display: flex;
64
65
  justify-content: center;
65
66
  align-items: center;
67
+ flex-shrink: 0;
66
68
  width: 40px;
67
69
  height: 40px;
68
70
  border: none;
@@ -73,6 +75,7 @@ var g=class g extends ScanditHTMLElement{constructor(){super(...arguments);this.
73
75
  .${c$1}__separator {
74
76
  width: 1px;
75
77
  height: 32px;
78
+ flex-shrink: 0;
76
79
  background: var(${i});
77
80
  }
78
81
 
@@ -103,6 +106,6 @@ var g=class g extends ScanditHTMLElement{constructor(){super(...arguments);this.
103
106
  clip-path: path("M 16,0 L 16,16 L 0,16 C 0,16 16,16 16,-2 Z");
104
107
  }
105
108
  </style>
106
- `,this.targetModeButton=this.querySelector("#targetModeButton"),(i$1=this.targetModeButton)==null||i$1.addEventListener("pointerup",this.targetModeButtonTapListener),this.targetModeButtonIcon=(B=this.targetModeButton)==null?void 0:B.querySelector(a),this.scanningBehaviorButton=this.querySelector("#scanningBehaviorButton"),(m=this.scanningBehaviorButton)==null||m.addEventListener("pointerup",this.scanningBehaviorButtonTapListener),this.scanningBehaviorButtonIcon=(S=this.scanningBehaviorButton)==null?void 0:S.querySelector(a),this.barcodeFindButton=this.querySelector("#barcodeFindButton"),(w=this.barcodeFindButton)==null||w.addEventListener("pointerup",this.barcodeFindButtonTapListener),this.cameraSwitchButton=this.querySelector("#cameraSwitchButton"),(T=this.cameraSwitchButton)==null||T.addEventListener("pointerup",this.cameraSwitchButtonTapListener),this.cameraSwitchButtonIcon=(y=this.cameraSwitchButton)==null?void 0:y.querySelector(a);}connectedCallback(){this[d]=!0,this[l]=!0,this.render();}disconnectedCallback(){var t,n,i;(t=this.targetModeButton)==null||t.removeEventListener("pointerup",this.targetModeButtonTapListener),(n=this.scanningBehaviorButton)==null||n.removeEventListener("pointerup",this.scanningBehaviorButtonTapListener),(i=this.cameraSwitchButton)==null||i.removeEventListener("pointerup",this.cameraSwitchButtonTapListener);}attributeChangedCallback(t,n,i){if(i!==n){this.render();let B=this.hidden;this.hidden=this.visibleModeButtonCount+this.visibleButtonCount===0,this.hidden!==B&&this.dispatchEvent(new CustomEvent(b$1));}}onTargetModeButtonTap(t){t.stopPropagation(),this[e]=!this[e],this.dispatchEvent(new CustomEvent(a$2,{bubbles:!0,detail:{tapped:"targetModeButton",enabled:this[e]}}));}onScanningBehaviorButtonTap(t){t.stopPropagation(),this[b]=this[b]==="continuous"?"single":"continuous",this.dispatchEvent(new CustomEvent(a$2,{bubbles:!0,detail:{tapped:"scanningBehaviorButton",enabled:this[b]==="continuous"}}));}onBarcodeFindButtonTap(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent(a$2,{bubbles:!0,detail:{tapped:"barcodeFindButton"}}));}onCameraSwitchButtonTap(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent(a$2,{bubbles:!0,detail:{tapped:"cameraSwitchButton"}}));}};g.observedAttributes=[d,c,k$1,l];var k=g;
109
+ `,this.targetModeButton=this.querySelector("#targetModeButton"),(i$1=this.targetModeButton)==null||i$1.addEventListener("pointerup",this.targetModeButtonTapListener),this.targetModeButtonIcon=(B=this.targetModeButton)==null?void 0:B.querySelector(a),this.scanningBehaviorButton=this.querySelector("#scanningBehaviorButton"),(m=this.scanningBehaviorButton)==null||m.addEventListener("pointerup",this.scanningBehaviorButtonTapListener),this.scanningBehaviorButtonIcon=(S=this.scanningBehaviorButton)==null?void 0:S.querySelector(a),this.barcodeFindButton=this.querySelector("#barcodeFindButton"),(w=this.barcodeFindButton)==null||w.addEventListener("pointerup",this.barcodeFindButtonTapListener),this.cameraSwitchButton=this.querySelector("#cameraSwitchButton"),(T=this.cameraSwitchButton)==null||T.addEventListener("pointerup",this.cameraSwitchButtonTapListener),this.cameraSwitchButtonIcon=(y=this.cameraSwitchButton)==null?void 0:y.querySelector(a);}connectedCallback(){this[d]=!0,this[l]=!0,this.render();}disconnectedCallback(){var t,n,i;(t=this.targetModeButton)==null||t.removeEventListener("pointerup",this.targetModeButtonTapListener),(n=this.scanningBehaviorButton)==null||n.removeEventListener("pointerup",this.scanningBehaviorButtonTapListener),(i=this.cameraSwitchButton)==null||i.removeEventListener("pointerup",this.cameraSwitchButtonTapListener);}attributeChangedCallback(t,n,i){if(i!==n){this.render();let B=this.hidden;this.hidden=this.visibleModeButtonCount+this.visibleButtonCount===0,this.hidden!==B&&this.dispatchEvent(new CustomEvent(b$1));}}onTargetModeButtonTap(t){t.stopPropagation(),this[e]=!this[e],this.dispatchEvent(new CustomEvent(a$2,{bubbles:!0,detail:{tapped:"targetModeButton",enabled:this[e]}}));}onScanningBehaviorButtonTap(t){t.stopPropagation(),this[b]=this[b]==="continuous"?"single":"continuous",this.dispatchEvent(new CustomEvent(a$2,{bubbles:!0,detail:{tapped:"scanningBehaviorButton",enabled:this[b]==="continuous"}}));}onBarcodeFindButtonTap(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent(a$2,{bubbles:!0,detail:{tapped:"barcodeFindButton"}}));}onCameraSwitchButtonTap(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent(a$2,{bubbles:!0,detail:{tapped:"cameraSwitchButton"}}));}};g.observedAttributes=[d,c,k,l];var E=g;
107
110
 
108
- export { k as a };
111
+ export { E as a };
@@ -0,0 +1,6 @@
1
+ import { b } from './chunk-XCZGCZ5K.js';
2
+ import { RadiusLocationSelection, NumberWithUnit } from '@scandit/web-datacapture-core';
3
+
4
+ var a=class{constructor(){this.codeDuplicateFilter=b.SparkScan.SparkScanSettings.codeDuplicateFilter;this.scanIntention="manual";this.locationSelection=new RadiusLocationSelection(new NumberWithUnit(b.SparkScan.SparkScanSettings.locationSelection.radius,b.SparkScan.SparkScanSettings.locationSelection.unit));this.properties={};this.symbologies={};this.enableTargetModeHiddenProperties(1);}get enabledSymbologies(){return Object.keys(this.symbologies).filter(o=>{var i;return (i=this.symbologies[o])==null?void 0:i.isEnabled})}settingsForSymbology(e){if(!this.symbologies[e]){let o=b.SymbologySettings[e];o._symbology=e,this.symbologies[e]=o;}return this.symbologies[e]}setProperty(e,o){this.properties[e]=o;}getProperty(e){return this.properties[e]}enableSymbologies(e){for(let o of e)this.enableSymbology(o,!0);}enableSymbology(e,o){this.settingsForSymbology(e).isEnabled=o;}toJSONObject(){var i;let e={},o=Object.keys(this.symbologies);return {codeDuplicateFilter:this.codeDuplicateFilter,locationSelection:this.locationSelection.toJSONObject(),properties:{...this.properties},symbologies:o.reduce((n,r)=>{var S;let s=(S=this.symbologies[r])==null?void 0:S.toJSONObject();return s&&(n[r]=s),n},e),scanIntention:(i=this.scanIntention)!=null?i:null}}enableTargetModeHiddenProperties(e){var i;let o=(i={1:b.SparkScan.SparkScanSettings.hiddenProperties.zoom1x,2:b.SparkScan.SparkScanSettings.hiddenProperties.zoom2x}[e])!=null?i:{};for(let[n,r]of Object.entries(o))this.setProperty(n,r);}disableTargetModeHiddenProperties(){let e={...b.SparkScan.SparkScanSettings.hiddenProperties.zoom1x,...b.SparkScan.SparkScanSettings.hiddenProperties.zoom2x};for(let[o]of Object.entries(e))this.setProperty(o,void 0);}};
5
+
6
+ export { a };
package/build/js/index.js CHANGED
@@ -1,22 +1,22 @@
1
- export { a as SparkScanView } from './chunks/chunk-ZDTUEAKJ.js';
2
- export { a as SparkScanViewSettings } from './chunks/chunk-4EGODYYJ.js';
1
+ export { a as SparkScanView } from './chunks/chunk-3EXZIU37.js';
3
2
  export { a as SparkScanViewState } from './chunks/chunk-L6IZLBEM.js';
3
+ export { a as SparkScanViewSettings } from './chunks/chunk-4EGODYYJ.js';
4
4
  export { a as SparkScanToastSettings } from './chunks/chunk-BRRT6GC7.js';
5
- export { a as SparkScanSettings } from './chunks/chunk-XFKSWDGT.js';
6
- export { b as SparkScanBarcodeErrorFeedback, a as SparkScanBarcodeFeedback, c as SparkScanBarcodeSuccessFeedback } from './chunks/chunk-PTJJ3JDE.js';
7
- export { a as SparkScanPreviewBehavior } from './chunks/chunk-DFK7AQTK.js';
8
5
  export { a as SparkScanScanningBehavior } from './chunks/chunk-IMYBB4ZA.js';
9
6
  export { a as SparkScanScanningMode, b as SparkScanScanningModeDefault, c as SparkScanScanningModeTarget } from './chunks/chunk-SZUPDKV5.js';
10
- export { a as BarcodeFindSettings } from './chunks/chunk-CYUXFHBE.js';
11
- export { a as BarcodeFindView } from './chunks/chunk-WIIZ53ZJ.js';
7
+ export { a as SparkScanSettings } from './chunks/chunk-ZZQDT5ZB.js';
12
8
  export { a as SparkScan } from './chunks/chunk-VTHL2LZD.js';
13
9
  export { a as SparkScanSession } from './chunks/chunk-QHNNJFNX.js';
14
- export { a as barcodeCaptureLoader } from './chunks/chunk-URV3CVLG.js';
10
+ export { b as SparkScanBarcodeErrorFeedback, a as SparkScanBarcodeFeedback, c as SparkScanBarcodeSuccessFeedback } from './chunks/chunk-PTJJ3JDE.js';
11
+ export { a as SparkScanPreviewBehavior } from './chunks/chunk-DFK7AQTK.js';
12
+ export { a as BarcodeFindSettings } from './chunks/chunk-CYUXFHBE.js';
13
+ export { a as BarcodeFindView } from './chunks/chunk-WIIZ53ZJ.js';
14
+ export { a as barcodeCaptureLoader } from './chunks/chunk-POA365GO.js';
15
15
  export { a as BarcodeFind } from './chunks/chunk-ECL3JBWQ.js';
16
16
  export { a as BarcodeFindItem, c as BarcodeFindItemContent, b as BarcodeFindItemSearchOptions } from './chunks/chunk-HTKUJZG2.js';
17
- export { a as ScanIntention } from './chunks/chunk-NH3EDXZZ.js';
18
17
  export { b as BarcodeCaptureOverlay, a as BarcodeCaptureOverlayStyle } from './chunks/chunk-XM2UJIDT.js';
19
- export { a as BarcodeCaptureSettings } from './chunks/chunk-XGYKHOFE.js';
18
+ export { a as BarcodeCaptureSettings } from './chunks/chunk-OBHOWMW5.js';
19
+ export { a as ScanIntention } from './chunks/chunk-NH3EDXZZ.js';
20
20
  export { a as BarcodeBatch } from './chunks/chunk-42SQROQE.js';
21
21
  export { a as BarcodeBatchAdvancedOverlay } from './chunks/chunk-HNWVLPRV.js';
22
22
  export { a as TrackedBarcodeView } from './chunks/chunk-WTBGDD52.js';
@@ -1 +1 @@
1
- export { a as barcodeCaptureLoader } from './chunks/chunk-URV3CVLG.js';
1
+ export { a as barcodeCaptureLoader } from './chunks/chunk-POA365GO.js';
@@ -13,7 +13,14 @@ declare class SparkScanAnalyticsManager {
13
13
  private context;
14
14
  private constructor();
15
15
  static forContext(context: DataCaptureContext): SparkScanAnalyticsManager;
16
- startSession(): void;
16
+ startSession(options: {
17
+ torchState: TorchState;
18
+ scanningMode: SparkScanScanningMode;
19
+ soundEnabled: boolean;
20
+ hapticEnabled: boolean;
21
+ handMode: SparkScanViewHandMode;
22
+ cameraPosition: CameraPosition;
23
+ }): void;
17
24
  setTorchState(torchState: TorchState | null): void;
18
25
  setScanningMode(scanningMode: SparkScanScanningMode | null): void;
19
26
  setSoundEnabled(soundEnabled: boolean | null): void;
@@ -1 +1 @@
1
- export { b as SparkScanAnalyticsManager, a as SparkScanViewSessionStopReason } from '../chunks/chunk-EMJS3UT7.js';
1
+ export { b as SparkScanAnalyticsManager, a as SparkScanViewSessionStopReason } from '../chunks/chunk-JMUNN3HX.js';
@@ -1 +1 @@
1
- export { a as SparkScanSettings } from '../chunks/chunk-XFKSWDGT.js';
1
+ export { a as SparkScanSettings } from '../chunks/chunk-ZZQDT5ZB.js';
@@ -1,12 +1,12 @@
1
- export { a as SparkScanView } from '../chunks/chunk-ZDTUEAKJ.js';
2
- export { a as SparkScanViewSettings } from '../chunks/chunk-4EGODYYJ.js';
1
+ export { a as SparkScanView } from '../chunks/chunk-3EXZIU37.js';
3
2
  export { a as SparkScanViewState } from '../chunks/chunk-L6IZLBEM.js';
3
+ export { a as SparkScanViewSettings } from '../chunks/chunk-4EGODYYJ.js';
4
4
  export { a as SparkScanToastSettings } from '../chunks/chunk-BRRT6GC7.js';
5
- export { a as SparkScanSettings } from '../chunks/chunk-XFKSWDGT.js';
6
- export { b as SparkScanBarcodeErrorFeedback, a as SparkScanBarcodeFeedback, c as SparkScanBarcodeSuccessFeedback } from '../chunks/chunk-PTJJ3JDE.js';
7
- export { a as SparkScanPreviewBehavior } from '../chunks/chunk-DFK7AQTK.js';
8
5
  export { a as SparkScanScanningBehavior } from '../chunks/chunk-IMYBB4ZA.js';
9
6
  export { a as SparkScanScanningMode, b as SparkScanScanningModeDefault, c as SparkScanScanningModeTarget } from '../chunks/chunk-SZUPDKV5.js';
7
+ export { a as SparkScanSettings } from '../chunks/chunk-ZZQDT5ZB.js';
10
8
  export { a as SparkScan } from '../chunks/chunk-VTHL2LZD.js';
11
9
  export { a as SparkScanSession } from '../chunks/chunk-QHNNJFNX.js';
10
+ export { b as SparkScanBarcodeErrorFeedback, a as SparkScanBarcodeFeedback, c as SparkScanBarcodeSuccessFeedback } from '../chunks/chunk-PTJJ3JDE.js';
11
+ export { a as SparkScanPreviewBehavior } from '../chunks/chunk-DFK7AQTK.js';
12
12
  export { a as SparkScanMiniPreviewSize } from '../chunks/chunk-MVDPXLVX.js';
@@ -1 +1 @@
1
- export { a as SparkScanView } from '../../chunks/chunk-ZDTUEAKJ.js';
1
+ export { a as SparkScanView } from '../../chunks/chunk-3EXZIU37.js';
@@ -1 +1 @@
1
- export { b as SparkScanViewMiniPreview, a as SparkScanViewMiniPreviewButtonType } from '../../chunks/chunk-NDT5RS4B.js';
1
+ export { b as SparkScanViewMiniPreview, a as SparkScanViewMiniPreviewButtonType } from '../../chunks/chunk-NL3O64AI.js';
@@ -1 +1 @@
1
- export { a as SparkScanViewPresenter } from '../../chunks/chunk-CLMAF253.js';
1
+ export { a as SparkScanViewPresenter } from '../../chunks/chunk-5AWKCU7L.js';
@@ -1 +1 @@
1
- export { a as SparkScanViewToolbar } from '../../chunks/chunk-6VT7IT5G.js';
1
+ export { a as SparkScanViewToolbar } from '../../chunks/chunk-ZEFZKKYO.js';
@@ -1 +1 @@
1
- export { a as SparkScanViewTriggerButton } from '../../chunks/chunk-NK2XCY5M.js';
1
+ export { a as SparkScanViewTriggerButton } from '../../chunks/chunk-YVLXLEDF.js';
@@ -1,15 +1,15 @@
1
- export { a as SparkScanView } from '../../chunks/chunk-ZDTUEAKJ.js';
2
- export { a as SparkScanViewTriggerButton } from '../../chunks/chunk-NK2XCY5M.js';
1
+ export { a as SparkScanView } from '../../chunks/chunk-3EXZIU37.js';
2
+ export { a as SparkScanViewTriggerButton } from '../../chunks/chunk-YVLXLEDF.js';
3
3
  export { a as SparkScanViewVisualFeedback } from '../../chunks/chunk-TBXQSBKX.js';
4
- export { b as SparkScanViewMiniPreview, a as SparkScanViewMiniPreviewButtonType } from '../../chunks/chunk-NDT5RS4B.js';
4
+ export { b as SparkScanViewMiniPreview, a as SparkScanViewMiniPreviewButtonType } from '../../chunks/chunk-NL3O64AI.js';
5
5
  export { a as SparkScanViewToast } from '../../chunks/chunk-K4MHNZXA.js';
6
- export { a as SparkScanViewToolbar } from '../../chunks/chunk-6VT7IT5G.js';
6
+ export { a as SparkScanViewToolbar } from '../../chunks/chunk-ZEFZKKYO.js';
7
7
  export { a as SparkScanViewIcon } from '../../chunks/chunk-DTO5ICFV.js';
8
- export { a as SparkScanViewPresenter } from '../../chunks/chunk-CLMAF253.js';
8
+ export { a as SparkScanViewPresenter } from '../../chunks/chunk-5AWKCU7L.js';
9
9
  export { a as SparkScanViewStateManager } from '../../chunks/chunk-OTZPCIBD.js';
10
+ export { a as SparkScanViewState } from '../../chunks/chunk-L6IZLBEM.js';
10
11
  export { a as SparkScanViewFeedbackManager } from '../../chunks/chunk-X2KFZW3W.js';
11
12
  export { a as SparkScanViewPreferenceManager } from '../../chunks/chunk-QCD3RIT4.js';
12
13
  export { a as SparkScanViewSettings } from '../../chunks/chunk-4EGODYYJ.js';
13
- export { a as SparkScanViewState } from '../../chunks/chunk-L6IZLBEM.js';
14
14
  export { a as SparkScanToastSettings } from '../../chunks/chunk-BRRT6GC7.js';
15
15
  export { a as SparkScanMiniPreviewSize } from '../../chunks/chunk-MVDPXLVX.js';
@@ -1 +1 @@
1
- export { a as BarcodeCaptureWorkerManager } from '../chunks/chunk-GOVBKIEO.js';
1
+ export { a as BarcodeCaptureWorkerManager } from '../chunks/chunk-VXMLFKGN.js';
@@ -1 +1 @@
1
- export { a as WorkerMain } from '../chunks/chunk-ALOQUGSU.js';
1
+ export { a as WorkerMain } from '../chunks/chunk-6UMT6EAO.js';
@@ -1,4 +1,4 @@
1
- import { a } from '../chunks/chunk-ALOQUGSU.js';
1
+ import { a } from '../chunks/chunk-6UMT6EAO.js';
2
2
 
3
3
  new a(globalThis,{get:()=>globalThis.Module,set:e=>{globalThis.Module=e;}});function n(e){}
4
4
 
@@ -1 +1 @@
1
- export { a as DataCaptureEngine } from '../chunks/chunk-X5RHQLWP.js';
1
+ export { a as DataCaptureEngine } from '../chunks/chunk-APIYP6ZL.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scandit/web-datacapture-barcode",
3
- "version": "7.0.0-beta.1",
3
+ "version": "7.0.0",
4
4
  "description": "Scandit Data Capture SDK for the Web",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "sideEffects": false,
@@ -102,7 +102,7 @@
102
102
  ]
103
103
  },
104
104
  "peerDependencies": {
105
- "@scandit/web-datacapture-core": "7.0.0-beta.1"
105
+ "@scandit/web-datacapture-core": "7.0.0"
106
106
  },
107
107
  "dependencies": {
108
108
  "@types/emscripten": "^1.39.13"