@scandit/web-datacapture-core 8.2.0 → 8.3.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY.txt +0 -1
- package/build/electron/common.cjs +1 -1
- package/build/electron/constants.cjs +1 -1
- package/build/electron/main.cjs +1 -1
- package/build/electron/preload.cjs +1 -1
- package/build/js/{Camera-DhGjpcjv.d.ts → Camera-BnPnXqAt.d.ts} +1 -1
- package/build/js/Camera.d.ts +1 -1
- package/build/js/Camera.js +1 -1
- package/build/js/CameraRelated.d.ts +1 -1
- package/build/js/{DataCaptureContext-Dvdr7st4.d.ts → DataCaptureContext-LM_Re1B4.d.ts} +42 -4
- package/build/js/DataCaptureContext.d.ts +4 -2
- package/build/js/DataCaptureContext.js +1 -1
- package/build/js/DataCaptureContextRelated.d.ts +5 -3
- package/build/js/DataCaptureVersion.js +1 -1
- package/build/js/DataCaptureView.d.ts +5 -3
- package/build/js/DataCaptureView.js +1 -1
- package/build/js/Feedback.js +1 -1
- package/build/js/FrameData.d.ts +4 -2
- package/build/js/ImageFrameSource.d.ts +1 -1
- package/build/js/ImageFrameSource.js +1 -1
- package/build/js/NotificationPresenter/index.d.ts +4 -2
- package/build/js/NotificationPresenter/private/ConcreteNotificationPresenter.d.ts +4 -2
- package/build/js/NotificationPresenter/private/presets.d.ts +4 -2
- package/build/js/ScanditIcon.js +1 -1
- package/build/js/ScanditIconBuilder.js +1 -1
- package/build/js/SingleImageUploader.d.ts +1 -1
- package/build/js/Sound.js +1 -1
- package/build/js/Vibration.js +1 -1
- package/build/js/browserHelper.d.ts +10 -0
- package/build/js/browserHelper.js +1 -1
- package/build/js/chunks/{chunk-UQVVJP5Z.js → chunk-2OCDIZIS.js} +1 -1
- package/build/js/chunks/{chunk-QFSNPY5Y.js → chunk-2SGKGZ6F.js} +1 -1
- package/build/js/chunks/{chunk-O7EM4VIM.js → chunk-33ZWDLU7.js} +1 -1
- package/build/js/chunks/{chunk-3MKSI2DV.js → chunk-6IM6NGGI.js} +1 -1
- package/build/js/chunks/{chunk-WVVNJRUA.js → chunk-7EGT56UE.js} +1 -1
- package/build/js/chunks/chunk-7JVAQ2A3.js +1 -0
- package/build/js/chunks/{chunk-MX6NS4FA.js → chunk-7ZU6DPLL.js} +1 -1
- package/build/js/chunks/{chunk-7HYFN4JO.js → chunk-A3ZT7PJA.js} +1 -1
- package/build/js/chunks/chunk-A5G2NHT2.js +1 -0
- package/build/js/chunks/{chunk-DGIQ3GF7.js → chunk-ARODHCN7.js} +1 -1
- package/build/js/chunks/chunk-BQO4QYI6.js +1 -0
- package/build/js/chunks/{chunk-QUWP3ILW.js → chunk-BSX3V75N.js} +1 -1
- package/build/js/chunks/chunk-BV63CXZF.js +1 -0
- package/build/js/chunks/{chunk-SFS4ELLN.js → chunk-DQ5X7FNV.js} +1 -1
- package/build/js/chunks/chunk-DZE2EYSZ.js +1 -0
- package/build/js/chunks/{chunk-SYGWA3T6.js → chunk-E7IMQECS.js} +1 -1
- package/build/js/chunks/{chunk-VSROWPI6.js → chunk-FCXZZH3O.js} +1 -1
- package/build/js/chunks/{chunk-O4HDBWKK.js → chunk-FMOB7R2T.js} +1 -1
- package/build/js/chunks/{chunk-U7ETOWGJ.js → chunk-GS7VZDY5.js} +1 -1
- package/build/js/chunks/{chunk-NXW6JP4X.js → chunk-H7FKC2FI.js} +1 -1
- package/build/js/chunks/{chunk-NXAYIU7F.js → chunk-IASACVTH.js} +1 -1
- package/build/js/chunks/chunk-IVQL2BYY.js +1 -0
- package/build/js/chunks/chunk-KUAZYGPM.js +1 -0
- package/build/js/chunks/{chunk-DTREAYZQ.js → chunk-KVRNF3VA.js} +1 -1
- package/build/js/chunks/{chunk-UERKPMRV.js → chunk-L66S4DN2.js} +1 -1
- package/build/js/chunks/chunk-M2ZQCUEL.js +1 -0
- package/build/js/chunks/{chunk-YE2GYNRP.js → chunk-NMXQDQYI.js} +1 -1
- package/build/js/chunks/{chunk-BBOKPRKO.js → chunk-O5D4KVS5.js} +1 -1
- package/build/js/chunks/{chunk-GLSB4QTY.js → chunk-OCKYBUXO.js} +1 -1
- package/build/js/chunks/{chunk-XYZYNUX3.js → chunk-RXDVYEE5.js} +1 -1
- package/build/js/chunks/{chunk-QUBJJDLC.js → chunk-RYXKMXTY.js} +1 -1
- package/build/js/chunks/{chunk-RP4YFAF2.js → chunk-SSTFVERQ.js} +1 -1
- package/build/js/chunks/{chunk-7OFC24NE.js → chunk-SX5ZLP2O.js} +1 -1
- package/build/js/chunks/{chunk-V2OKMBZD.js → chunk-UJYGOVXB.js} +1 -1
- package/build/js/chunks/chunk-W3X3ZRQZ.js +1 -0
- package/build/js/chunks/chunk-WBYBTOBZ.js +1 -0
- package/build/js/chunks/{chunk-JCP7NQPV.js → chunk-WFKB322J.js} +1 -1
- package/build/js/chunks/{chunk-VJ7ZYB4V.js → chunk-WJOT37ST.js} +1 -1
- package/build/js/chunks/{chunk-I4F6XB6S.js → chunk-XVH5A2QH.js} +1 -1
- package/build/js/chunks/{chunk-4J3Y5IIL.js → chunk-XW3Z6KKS.js} +1 -1
- package/build/js/chunks/{chunk-QPR2YHD4.js → chunk-YJNJGCAN.js} +1 -1
- package/build/js/chunks/chunk-YMM2PV73.js +6 -0
- package/build/js/chunks/chunk-YONR3EGV.js +2 -0
- package/build/js/chunks/{chunk-6EEMWSEO.js → chunk-YP53ND2Q.js} +1 -1
- package/build/js/chunks/{chunk-NT5WI2PS.js → chunk-YUZDO2PC.js} +1 -1
- package/build/js/chunks/{chunk-ZWO2PAO7.js → chunk-YXXMWHFX.js} +1 -1
- package/build/js/controls/CameraFOVSwitchControl.d.ts +4 -2
- package/build/js/controls/CameraFOVSwitchControl.js +1 -1
- package/build/js/controls/CameraSwitchControl.d.ts +4 -2
- package/build/js/controls/CameraSwitchControl.js +1 -1
- package/build/js/controls/TorchSwitchControl.d.ts +4 -2
- package/build/js/controls/TorchSwitchControl.js +1 -1
- package/build/js/controls/common.d.ts +4 -2
- package/build/js/controls/index.d.ts +4 -2
- package/build/js/controls/index.js +1 -1
- package/build/js/defaults/DefaultsCamera.d.ts +4 -2
- package/build/js/defaults/DefaultsCameraSettings.d.ts +1 -1
- package/build/js/defaults/DefaultsDataCaptureView.js +1 -1
- package/build/js/index.d.ts +5 -3
- package/build/js/index.js +1 -1
- package/build/js/moduleLoader.d.ts +4 -2
- package/build/js/private/AdditionalLayerPosition.d.ts +6 -0
- package/build/js/private/AdditionalLayerPosition.js +1 -0
- package/build/js/private/BatteryInterface.d.ts +81 -0
- package/build/js/private/BatteryInterface.js +1 -0
- package/build/js/private/CameraAccess.d.ts +1 -1
- package/build/js/private/CameraAccess.js +1 -1
- package/build/js/private/CameraManager.d.ts +5 -3
- package/build/js/private/CameraManager.js +1 -1
- package/build/js/private/CameraPool.d.ts +4 -2
- package/build/js/private/CanvasDrawerWithMetrics.d.ts +4 -2
- package/build/js/private/CoreModuleLicenseTextProvider.d.ts +4 -2
- package/build/js/private/CoreModuleLicenseTextProvider.js +1 -1
- package/build/js/private/CustomLocationsView.js +1 -1
- package/build/js/private/DataCaptureContextRelated.d.ts +4 -2
- package/build/js/private/FrameReaders/FrameReader.d.ts +4 -2
- package/build/js/private/FrameReaders/FrameReader.js +1 -1
- package/build/js/private/FrameReaders/FrameReaderAbstract.d.ts +4 -2
- package/build/js/private/FrameReaders/GrayScaleFrameReader.d.ts +4 -2
- package/build/js/private/FrameReaders/GrayScaleFrameReader.js +1 -1
- package/build/js/private/FrameReaders/index.d.ts +4 -2
- package/build/js/private/FrameReaders/index.js +1 -1
- package/build/js/private/NormalizedModuleLoaderOptions.d.ts +4 -2
- package/build/js/private/OrientationObserver.js +1 -1
- package/build/js/private/SingleImageUploaderView.d.ts +4 -2
- package/build/js/private/SingleImageUploaderView.js +1 -1
- package/build/js/private/ViewControls+related.js +1 -1
- package/build/js/private/ViewControls_related.d.ts +4 -2
- package/build/js/private/ViewStyles.js +1 -1
- package/build/js/private/ViewsRegistry.d.ts +4 -2
- package/build/js/private/customHowler.d.ts +27 -0
- package/build/js/private/customHowler.js +1 -0
- package/build/js/private/hybridDesktopPlatformHelpers.js +1 -1
- package/build/js/private/ui/atoms/AimerSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ArrowDownSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ArrowLeftSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ArrowRightSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ArrowUpSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ArrowsUp.js +1 -1
- package/build/js/private/ui/atoms/Backdrop.js +1 -1
- package/build/js/private/ui/atoms/CalendarExclamationMarkSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/CameraFOVUltrawideSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/CameraFOVWideSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/CameraSwitchReverseSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/CameraSwitchSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/Card.js +1 -1
- package/build/js/private/ui/atoms/CardList.js +1 -1
- package/build/js/private/ui/atoms/CheckSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ChevronDownSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ChevronLeftSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ChevronRightSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ChevronUpSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/CrossSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/DeleteSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/Dot5xSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ExclamationMarkSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/GlassSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/HandLensCheckSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/KeyboardSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/LowStockSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/OnexSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/PauseSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/PrinterSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ProgressBar.js +1 -1
- package/build/js/private/ui/atoms/QuestionMarkSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/RestartSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/RoundedCheckSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/RoundedCrossSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/RoundedExclamationMarkSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ScanSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ShutterButton.js +1 -1
- package/build/js/private/ui/atoms/SlashSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/StarFilledSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/StarHalfFilledSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/StarOutlinedSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/SvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ToPickSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/Toast.d.ts +4 -2
- package/build/js/private/ui/atoms/Toast.js +1 -1
- package/build/js/private/ui/atoms/TorchOffSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/TorchOnSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/TwoxSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/WrongItemSvgIcon.js +1 -1
- package/build/js/private/ui/molecules/CameraFOVSwitchButton.js +1 -1
- package/build/js/private/ui/molecules/CameraSwitchButton.js +1 -1
- package/build/js/private/ui/molecules/ControlsLayout.js +1 -1
- package/build/js/private/ui/molecules/HintPresenter.d.ts +4 -2
- package/build/js/private/ui/molecules/HintPresenter.js +1 -1
- package/build/js/private/ui/molecules/LoadingOverlay.js +1 -1
- package/build/js/private/ui/molecules/TorchSwitchIconButton.d.ts +1 -1
- package/build/js/private/ui/molecules/TorchSwitchIconButton.js +1 -1
- package/build/js/private/utils/index.js +1 -1
- package/build/js/private/utils/polyfillLoader.js +1 -1
- package/build/js/private/utils/replaceImagesInViewUtils.d.ts +4 -2
- package/build/js/private/utils/warnMultithreadingUnavailable.js +1 -1
- package/build/js/worker/ImageConverterForwarder.d.ts +4 -2
- package/build/js/worker/ViewInfoHelper.d.ts +4 -2
- package/build/js/worker/WorkerMain.d.ts +4 -2
- package/build/js/worker/WorkerMain.js +1 -1
- package/build/js/worker/coreCapture.inlineWorker.d.ts +4 -2
- package/build/js/worker/coreCapture.inlineWorker.js +1 -1
- package/build/js/worker/dataCaptureEngine.d.ts +4 -2
- package/build/js/worker/dataCaptureEngine.js +1 -1
- package/build/js/worker/dataCaptureLoader.d.ts +4 -2
- package/build/js/worker/dataCaptureLoader.js +1 -1
- package/build/js/worker/dataCaptureWorkerRelated.d.ts +4 -2
- package/build/js/worker/dataCaptureWorkerRelated.js +1 -1
- package/build/js/worker/index.d.ts +4 -2
- package/build/js/worker/index.js +1 -1
- package/package.json +6 -6
- package/build/js/chunks/chunk-A225YZFY.js +0 -2
- package/build/js/chunks/chunk-ACF5LYP7.js +0 -1
- package/build/js/chunks/chunk-DSFN65OM.js +0 -1
- package/build/js/chunks/chunk-ECPEKYII.js +0 -1
- package/build/js/chunks/chunk-FQYVZGCE.js +0 -1
- package/build/js/chunks/chunk-LH2NI5UL.js +0 -2
- package/build/js/chunks/chunk-OFNPZ4HM.js +0 -6
- package/build/js/chunks/chunk-UOQFOEG6.js +0 -1
- package/build/js/chunks/chunk-XG6VNDVQ.js +0 -1
- /package/build/js/chunks/{chunk-TU2LKPHV.js → chunk-FHNMZZV2.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$3}from'./chunk-
|
|
1
|
+
import {a as a$3}from'./chunk-UJYGOVXB.js';import {a as a$5}from'./chunk-GHTCNOQN.js';import {a as a$1}from'./chunk-UWBNF47P.js';import {a}from'./chunk-EV4OEANA.js';import {a as a$2}from'./chunk-3A4KLILV.js';import {a as a$4}from'./chunk-LSZZVJ6B.js';var c="scandit-loading-overlay",t=class t extends a{constructor(){super();this._progressBar=null;this._label=null;let e=this.attachShadow({mode:"open"});e.innerHTML=a$1`<div class="loading-overlay"><label for="scandit-progress" class="message">Loading...</label><scandit-progress-bar id="scandit-progress" min="0" max="100"></scandit-progress-bar></div>`,e.append(t.createStyleElement().cloneNode(true));}set progress(e){this._progressBar&&(this._progressBar.value=e);}set message(e){this._label&&(this._label.textContent=e);}get message(){var e,r;return (r=(e=this._label)==null?void 0:e.textContent)!=null?r:""}static create(){return t.register(),document.createElement(t.tag)}static register(){a$2({[c]:t,[a$3.tag]:a$3});}static createStyleElement(){return a$4`@media (prefers-color-scheme:dark){.loading-overlay{--foreground-color:#fff;--background-color:#000000e6}}@media (prefers-color-scheme:light){.loading-overlay{--foreground-color:#000;--background-color:#ffffffe6}}${a$3.tag}{max-width:15rem}.loading-overlay{align-items:center;background-color:var(--background-color);display:flex;flex-direction:column;height:100%;justify-content:center;position:absolute;width:100%;z-index:1}:host([hidden]){display:none}.loading-overlay .message{color:var(--foreground-color);font-family:Open Sans,sans-serif;margin-bottom:1rem;text-align:center}`}connectedCallback(){var e,r;this._progressBar=(e=this.shadowRoot)==null?void 0:e.querySelector(a$3.tag),this._label=(r=this.shadowRoot)==null?void 0:r.querySelector("label"),this.message=a$5.getInstance().get("core.view.loading");}show(){this.removeAttribute("hidden");}hide(){this.setAttribute("hidden","");}};t.tag=c;var d=t;export{d as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$9}from'./chunk-GS7VZDY5.js';import {b as b$2}from'./chunk-RYXKMXTY.js';import {a as a$a}from'./chunk-ARODHCN7.js';import {a as a$j}from'./chunk-A5G2NHT2.js';import {b,a as a$4}from'./chunk-RXDVYEE5.js';import {a as a$h}from'./chunk-IVQL2BYY.js';import {a as a$b}from'./chunk-TPHGDMKG.js';import {a as a$f}from'./chunk-GPPCTFZF.js';import {a as a$l}from'./chunk-Y7V35LNT.js';import {b as b$1}from'./chunk-24MGHMOY.js';import {a as a$e}from'./chunk-KVRNF3VA.js';import {a as a$g}from'./chunk-XIAF6V7E.js';import {a as a$c}from'./chunk-KYNYQBNF.js';import {a as a$7}from'./chunk-RSQRPDVQ.js';import {a}from'./chunk-2OCDIZIS.js';import {a as a$6}from'./chunk-IJQG3OU6.js';import {a as a$8}from'./chunk-I6SWF3FQ.js';import {a as a$o}from'./chunk-LFJUGRQV.js';import {a as a$3}from'./chunk-N5YZEC56.js';import {a as a$2}from'./chunk-VJB527QZ.js';import {a as a$1}from'./chunk-GHTCNOQN.js';import {a as a$d}from'./chunk-UWBNF47P.js';import {g}from'./chunk-E7IMQECS.js';import {a as a$5}from'./chunk-KAFNKP6O.js';import {a as a$n}from'./chunk-E4XJ4GKD.js';import {a as a$k}from'./chunk-QOCHMKNY.js';import {a as a$i}from'./chunk-XR65N6EG.js';import {a as a$m}from'./chunk-WUHKODFA.js';var P="core.camera.recovery",K;K=a$o;var L=class L{constructor(){this.focusGesture=a.focusGesture;this.zoomGesture=a.zoomGesture;this._scanAreaMargins=a.scanAreaMargins;this._pointOfInterest=a.pointOfInterest;this._logoStyle=a.logoStyle;this._logoAnchor=a.logoAnchor;this._logoOffset=a.logoOffset;this._context=null;this.overlays=new Set;this.controls=new Set;this.frameSourceListener={didChangeState:this.onFrameSourceChange.bind(this)};this._previewCamera=null;this.isConnected=false;this.controlsElement=void 0;this.frozenFrameCanvas=document.createElement("canvas");this.listeners=[];this.isVideoElementDetached=false;this.orientation="portrait";this.hiddenProperties={stopVideoTracksOnVisibilityChange:true,freezeFrameWhenStoppingFrameSource:true};this.orientationObserver=new b;this.onOrientationChangeListener=this.onOrientationChange.bind(this);this.onHintPresenterUpdateHandler=this.onHintPresenterUpdate.bind(this);this.onViewFinderUpdateRequestedHandler=this.onViewFinderUpdateRequested.bind(this);this.onWorkerMessageHandler=this.onWorkerMessage.bind(this);this.htmlElementDidChangeHandler=this.htmlElementDidChange.bind(this);this.htmlElementDisconnectedHandler=this.htmlElementDisconnected.bind(this);this.notificationPresenter=null;this[K]={attachAdditionalLayer:this.attachAdditionalLayer.bind(this)};this.visibilityListener=this.onVisibilityChange.bind(this),this.cameraRecoveryListener=this.cameraRecovery.bind(this),a$1.getInstance().updateIfMissing(a$2);}get videoElement(){return g.instance().getVideoElement()}get scanAreaMargins(){return this._scanAreaMargins}set scanAreaMargins(e){var t;this._scanAreaMargins=e,(t=this.privateContext)==null||t.update();}get pointOfInterest(){return this._pointOfInterest}set pointOfInterest(e){var t;this._pointOfInterest=e,(t=this.privateContext)==null||t.update();}get logoStyle(){return this._logoStyle}set logoStyle(e){var t;this._logoStyle=e,(t=this.privateContext)==null||t.update();}get logoAnchor(){return this._logoAnchor}set logoAnchor(e){var t;this._logoAnchor=e,(t=this.privateContext)==null||t.update();}get logoOffset(){return this._logoOffset}set logoOffset(e){var t;this._logoOffset=e,(t=this.privateContext)==null||t.update();}get cameraRecoveryText(){return a$1.getInstance().get(P)}get width(){var e,t;return Math.round((t=(e=this.htmlElementState)==null?void 0:e.width)!=null?t:0)}get height(){var e,t;return Math.round((t=(e=this.htmlElementState)==null?void 0:e.height)!=null?t:0)}get canvasDrawer(){return !this._canvasDrawer&&this.canvasElement!=null&&(this._canvasDrawer=new b$1(this.canvasElement),this._canvasDrawer.startObservingCanvasResize()),this._canvasDrawer}get privateContext(){return this._context}static async forContext(e){let t=new L;return await t.setContext(e),t}showProgressBar(){var e;(e=this.loadingOverlay)==null||e.show();}hideProgressBar(){var e;(e=this.loadingOverlay)==null||e.hide();}setProgressBarPercentage(e){this.loadingOverlay&&(this.loadingOverlay.progress=e);}setProgressBarMessage(e){this.loadingOverlay&&(this.loadingOverlay.message=e);}getContext(){return this._context}async setContext(e){var t,i,a;if(this._context=e,e){if(this.overlays.size>0&&!((t=this.privateContext)!=null&&t.hasModes()))throw new Error(["Cannot assign this view to this context. This view has overlays but the context does not have any mode attached matching these overlays.","Remove the overlays first before attaching the view to the context, or add the corresponding mode to the context before attaching this view."].join(" "));await e.setView(this),(i=this.privateContext)==null||i.subscribeToWorkerMessages(this.onWorkerMessageHandler),(a=this._context)!=null&&a.frameSource&&await this.onFrameSourceChange(this._context.frameSource);}}connectToElement(e,t){var i,a,r,n;this.isConnected||(this.orientationObserver.register(),this.setupHtmlElement(e),(i=this.canvasDrawer)==null||i.startObservingCanvasResize(),this.htmlElementDidChange(),a$3.add(this),this.orientation=this.orientationObserver.orientation.value,this.orientationObserver.addEventListener(a$4,this.onOrientationChangeListener),(a=this.hintPresenter)==null||a.addEventListener("hintpresenterupdate",this.onHintPresenterUpdateHandler),(r=this.hintPresenter)==null||r.addEventListener("hintpresenterviewfinderupdaterequested",this.onViewFinderUpdateRequestedHandler),this.localizationSubscription=a$1.getInstance().subscribe(s=>{s[P]!=null&&(this.cameraRecoveryElement.textContent=s[P]);}),this._previewCamera=(n=t==null?void 0:t.camera)!=null?n:null,this._previewCamera&&(this._previewCamera.addListener(this.frameSourceListener),this.onFrameSourceChange(this._previewCamera)),this.updateControls(),this.isConnected=true);}detachFromElement(){var e,t,i,a,r,n,s,h;if(this.isConnected){(e=this.htmlElementState)==null||e.removeListeners(),this.removeStyles(),(t=this.canvasDrawer)==null||t.endObservingCanvasResize(),document.removeEventListener("visibilitychange",this.visibilityListener);for(let m of ["touchend","mousedown"])this.cameraRecoveryElement.removeEventListener(m,this.cameraRecoveryListener);(i=this.loadingOverlay)==null||i.remove(),(a=this.customLocationsView)==null||a.unmount(),this.notificationPresenter=null,this.htmlElementDidChange(),(r=this.gestureRecognizer)==null||r.removeAllListeners(),this.clearHtmlElementContent(),a$3.delete(this),this.orientationObserver.unregister(),this.orientationObserver.removeEventListener(a$4,this.onOrientationChangeListener),(n=this.hintPresenter)==null||n.removeEventListener("hintpresenterupdate",this.onHintPresenterUpdateHandler),(s=this.hintPresenter)==null||s.removeEventListener("hintpresenterviewfinderupdaterequested",this.onViewFinderUpdateRequestedHandler),(h=this.localizationSubscription)==null||h.cancel(),g.instance().disconnectedCallback(),this._previewCamera&&(this._previewCamera.removeListener(this.frameSourceListener),this._previewCamera=null);for(let m of this.controls)this.removeControl(m);this.isConnected=false;}}async addOverlay(e){var t;this.overlays.has(e)||(this.overlays.add(e),await((t=this.privateContext)==null?void 0:t.update([{type:"addOverlay",newValue:e,view:this}])));}async removeOverlay(e){var t;this.overlays.has(e)&&(await((t=this.privateContext)==null?void 0:t.update([{type:"removeOverlay",newValue:e,view:this}])),this.overlays.delete(e));}addListener(e){this.listeners.includes(e)||this.listeners.push(e);}removeListener(e){this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}viewPointForFramePoint(e){var u,V,D,R,F,A,M,I;let t={width:(V=(u=this.htmlElementState)==null?void 0:u.width)!=null?V:0,height:(R=(D=this.htmlElementState)==null?void 0:D.height)!=null?R:0},i={width:(A=(F=this.videoElement)==null?void 0:F.videoWidth)!=null?A:0,height:(I=(M=this.videoElement)==null?void 0:M.videoHeight)!=null?I:0},a=t.width/t.height,r=i.width/i.height,n=a>r?t.width/i.width:t.height/i.height,s={x:e.x*n,y:e.y*n},h=(i.width*n-t.width)/2,m=(i.height*n-t.height)/2;return new a$5(s.x-h,s.y-m)}viewQuadrilateralForFrameQuadrilateral(e){let t=this.viewPointForFramePoint(e.topLeft),i=this.viewPointForFramePoint(e.topRight),a=this.viewPointForFramePoint(e.bottomLeft),r=this.viewPointForFramePoint(e.bottomRight);return new a$6(t,i,r,a)}addControl(e){this.controls.has(e)||(this.controls.add(e),e.install(this).then(t=>{var i;t&&((i=this.privateContext)==null||i.update([{type:"addControl",newValue:e}]));}));}removeControl(e){var t;this.controls.has(e)&&(e.remove(true),this.controls.delete(e),(t=this.privateContext)==null||t.update([{type:"removeControl",newValue:e}]));}toJSONObject(){var e;return {scanAreaMargins:this.scanAreaMargins.toJSONObject(),pointOfInterest:this.pointOfInterest.toJSONObject(),logoAnchor:this.logoAnchor,logoOffset:this.logoOffset.toJSONObject(),logoHidden:(e=this.logoHidden)!=null?e:false,logoStyle:this.logoStyle,overlays:[...this.overlays].map(t=>t.toJSONObject()),controls:[...this.controls].map(t=>t.toJSONObject()),focusGesture:this.focusGesture?this.focusGesture.toJSONObject():null,zoomGesture:this.zoomGesture?this.zoomGesture.toJSONObject():null}}isCameraRecoveryVisible(){return !this.cameraRecoveryElement.hidden}setCameraRecoveryVisible(e){this.cameraRecoveryElement.hidden=!e;}async allowPictureInPicture(e){await g.instance().allowPictureInPicture(e);}viewAnchorPositionsForFrameAnchorPositions(e){let t=this.viewPointForFramePoint(e.topLeft),i=this.viewPointForFramePoint(e.topRight),a=this.viewPointForFramePoint(e.bottomLeft),r=this.viewPointForFramePoint(e.bottomRight),n=this.viewPointForFramePoint(e.centerLeft),s=this.viewPointForFramePoint(e.centerRight),h=this.viewPointForFramePoint(e.topCenter),m=this.viewPointForFramePoint(e.bottomCenter),u=this.viewPointForFramePoint(e.center);return new a$7(t,i,r,a,n,h,s,m,u)}setDidTapCustomLocationsViewListener(e){this.customLocationsView&&this.customLocationsView.listener===null&&(this.customLocationsView.listener=e);}renderCustomLocationsView(e){this.customLocationsView!=null&&(this.customLocationsView.setMirrored(g.instance().isMirrorImageEnabled()),Object.keys(e).includes("removedIds")?this.customLocationsView.render(e):this.customLocationsView.renderDomView(e));}getNotificationPresenter(){var e;if(!this.notificationPresenter){let t=(e=this.htmlElement)==null?void 0:e.querySelector(b$2.tag);if(!t)throw new Error("Notification presenter cannot be found. Please ensure the DataCaptureView is connected.");this.notificationPresenter=new a$8(t);}return this.notificationPresenter}removeStyles(){for(let e of document.querySelectorAll("style[scandit]"))e.remove();}onHintPresenterUpdate(e){var t;(t=this.privateContext)==null||t.workerCommand("hintPresenterV2update",{});}async onViewFinderUpdateRequested(e){var i;let t=await((i=this.privateContext)==null?void 0:i.workerCommand("getViewfinderInfo",{}));t!=null&&this.updateHintPresenterViewFinderRect(t.rect);}clearHtmlElementContent(){var e;this.htmlElement&&((e=this.canvasDrawer)==null||e.endObservingCanvasResize(),this.htmlElement.innerHTML="",this.cameraPaintboardElement=void 0,this.singleImageUploaderPaintboardElement=void 0,this.htmlElement=void 0);}setupHtmlElement(e){var r,n,s;this.createStyles(),this.htmlElement=e,b$2.register(),a$9.register(),a$a.register();let t=a$d`<div class="${a$b.CONTAINER_CLASS_NAME}" role="main" aria-label="Data capture view"><div class="${a$b.PAINTBOARDS_CONTAINER_CLASS_NAME}"><div data-js-id="loading-overlay"></div><div class="${a$b.PAINTBOARD_CLASS_NAME}" data-js-id="camera-paintboard"><div data-js-id="video-container"></div><img class="${a$b.FROZEN_FRAME}" data-js-id="frozen-frame" alt="Last captured camera frame shown while camera is on standby" hidden /><canvas></canvas><div data-js-id="${a$c.CUSTOM_VIEW_CONTAINER}"></div><${b$2.tag}></${b$2.tag}><${a$9.tag}></${a$9.tag}><div class="${a$b.CAMERA_RECOVERY_CLASS_NAME}" role="alert" aria-live="polite" aria-atomic="true" hidden>${this.cameraRecoveryText}</div><div class="${a$b.ERROR_CLASS_NAME}" role="alert" aria-live="assertive" aria-atomic="true" hidden></div></div><div class="${a$b.PAINTBOARD_CLASS_NAME}" data-js-id="singleimage-paintboard"></div></div></div>`;this.htmlElement.innerHTML=t,g.instance().connectedCallback(this.htmlElement.querySelector('[data-js-id="video-container"]')),this.isVideoElementDetached=false,this.hintPresenter=this.htmlElement.querySelector(b$2.tag),this.notificationPresenter=this.hintPresenter?new a$8(this.hintPresenter):null,this.loadingOverlay&&this.loadingOverlay.remove(),this.loadingOverlay=a$a.create(),this.loadingOverlay.hide(),(r=this.htmlElement.querySelector('[data-js-id="loading-overlay"]'))==null||r.replaceWith(this.loadingOverlay),this.customLocationsView&&this.customLocationsView.unmount(),this.customLocationsView=new a$e,this.customLocationsView.mount(this.htmlElement.querySelector(`[data-js-id="${a$c.CUSTOM_VIEW_CONTAINER}"]`)),this.customLocationsView.mapViewAnchorPositionsForFramePoint=h=>this.viewAnchorPositionsForFrameAnchorPositions(h),this.containerElement=this.htmlElement.querySelector(`.${a$b.CONTAINER_CLASS_NAME}`),this.cameraPaintboardElement=this.containerElement.querySelector('[data-js-id="camera-paintboard"]'),this.singleImageUploaderPaintboardElement=this.containerElement.querySelector('[data-js-id="singleimage-paintboard"]');let i=this.cameraPaintboardElement.querySelector("canvas");this.canvasElement==null?this.canvasElement=i:i.replaceWith(this.canvasElement);let a=this.cameraPaintboardElement.querySelector('[data-js-id="frozen-frame"]');this.frozenFrame==null?this.frozenFrame=a:a.replaceWith(this.frozenFrame),this.controlsElement=this.cameraPaintboardElement.querySelector(a$9.tag),this.cameraRecoveryElement=this.cameraPaintboardElement.querySelector(`.${a$b.CAMERA_RECOVERY_CLASS_NAME}`),this.errorElement=this.cameraPaintboardElement.querySelector(`.${a$b.ERROR_CLASS_NAME}`),this.lastFrameSourceState!=null&&((s=(n=this._context)==null?void 0:n.frameSource)==null||s.switchToDesiredState(this.lastFrameSourceState)),document.addEventListener("visibilitychange",this.visibilityListener);for(let h of ["touchend","mousedown"])this.cameraRecoveryElement.addEventListener(h,this.cameraRecoveryListener);this.htmlElementState&&this.htmlElementState.removeListeners(),this.htmlElementState=new a$f(this.htmlElement),this.htmlElementState.onStateChanged(this.htmlElementDidChangeHandler),this.htmlElementState.onDisconnected(this.htmlElementDisconnectedHandler),this.gestureRecognizer=new a$g(this.htmlElement),this.gestureRecognizer.addListener({onTap:async h=>{var m;(m=this.privateContext)==null||m.workerCommand("onTap",{point:h.toJSONObject()});}});}setupHtmlElementSingleImageUploader(e){var i;if(this.singleImageUploaderPaintboardElement==null)return;this.singleImageUploaderView&&this.singleImageUploaderView.unmount(),this.singleImageUploaderView=new a$h(e),this.singleImageUploaderView.mount(this.containerElement.querySelector('[data-js-id="singleimage-paintboard"]'));let t=(i=this._context)==null?void 0:i.frameSource;this.singleImageUploaderView.onInputCheck(a=>{t.getCurrentState()!=="starting"&&a.preventDefault();}),this.singleImageUploaderView.onBeforeFileRead(()=>{t._context&&this.singleImageUploaderView&&(this.singleImageUploaderView.canUploadFile=t._context.hasEnabledMode());}),this.singleImageUploaderView.onImageLoadError(()=>{t.currentState="starting",a$i.log(a$i.Level.Error,"Could not load image from selected file");}),this.singleImageUploaderView.onFileReaderError(a=>{var n,s;let r=a.target;t.currentState="starting",a$i.log(a$i.Level.Error,`Error while reading the file: ${(s=(n=r.error)==null?void 0:n.toString())!=null?s:""}`);}),this.singleImageUploaderView.onCaptureReady(async a=>{await t.processUploadedFileCapture(a);}),this.singleImageUploaderView.setButtonState(t.getCurrentState()==="starting"?"enabled":"disabled"),t.addView(this.singleImageUploaderView);}setupHtmlElementVisibility(e){this.cameraPaintboardElement!=null&&(this.cameraPaintboardElement.hidden=e!=="camera"),this.singleImageUploaderPaintboardElement!=null&&(this.singleImageUploaderPaintboardElement.hidden=e!=="singleImageUploader");}createStyles(){if(document.querySelector("style[scandit]")===null){let e=a$j();for(let[t,i]of Object.entries(e))i.setAttribute("scandit",`data-capture-sdk-${t}`),document.head.append(i);}}async onOrientationChange(e){var t,i;this.orientation=e.detail.value,await((i=this.privateContext)==null?void 0:i.update([{type:"viewChange",newValue:{...(t=this.htmlElementState)==null?void 0:t.toJSONObject(),orientation:this.orientation}}]));}htmlElementDidChange(){var i,a;if(!this.htmlElementState)return;let e=this.htmlElementState,t=e.toJSONObject();if(!a$f.areEquivalentJSONStates(this.lastHtmlElementState,t)){this.orientation=this.orientationObserver.orientation.value,(i=this.privateContext)==null||i.update([{type:"viewChange",newValue:{...e.toJSONObject(),orientation:this.orientation}}]),this.lastHtmlElementState=t,(a=this.canvasDrawer)==null||a.updateCanvasSizeAttributes(this.width,this.height),this.handleVideoDisplay(t.visible);for(let r of this.listeners)typeof r.didChangeSize=="function"&&r.didChangeSize(this,new a$k(t.size.width.value,t.size.height.value),this.orientation);}}async htmlElementDisconnected(){var e,t,i,a,r,n;g.instance().disconnectedCallback(),this.lastFrameSourceState=(t=(e=this._context)==null?void 0:e.frameSource)==null?void 0:t.getCurrentState(),await((a=(i=this._context)==null?void 0:i.frameSource)==null?void 0:a.switchToDesiredState("off")),await((n=this.privateContext)==null?void 0:n.update([{type:"viewChange",newValue:{...(r=this.htmlElementState)==null?void 0:r.toJSONObject(),orientation:this.orientation}}])),this.isConnected=false;}attachAdditionalLayer(e,t){var i;t==="above-controls"&&((i=this.controlsElement)==null||i.insertAdjacentElement("afterend",e));}handleVideoDisplay(e){this.videoElement==null||this.cameraPaintboardElement==null||(!e&&!this.isVideoElementDetached?(this.videoElement.width=0,this.videoElement.height=0,this.videoElement.style.opacity="0",this.videoElement.style.visibility="hidden",document.body.append(this.videoElement),this.isVideoElementDetached=true):e&&this.isVideoElementDetached&&(this.cameraPaintboardElement.insertAdjacentElement("afterbegin",this.videoElement),this.isVideoElementDetached=false,this.videoElement.style.removeProperty("visibility"),this.videoElement.removeAttribute("width"),this.videoElement.removeAttribute("height"),this.videoElement.style.removeProperty("opacity")));}isCanvasDrawerWithMetrics(e){return e instanceof a$l}onWorkerMessage(e){var t,i;switch(e.type){case "draw":{this.drawEngineCommands(e.payload);break}case "performanceMetricsReport":{let a=this._canvasDrawer;a!=null&&this.isCanvasDrawerWithMetrics(a)&&a.setPerformanceMetrics(e.payload);break}case "contextDidChangeStatus":{let a=a$m.fromJSON(e.payload);(t=this.loadingOverlay)==null||t.hide(),a.isValid?(this.clearError(),this.setVideoElementOpacity("1")):this.displayError(a);break}case "viewSizeChanged":{let a=e.payload;if(a==null)return;this.onSDCViewSizeChangedCallback(a);break}default:{(i=this.hintPresenter)==null||i.handleMessage(e);break}}}onSDCViewSizeChangedCallback(e){this.updateHintPresenterViewFinderRect(e.viewFinderRect);}updateHintPresenterViewFinderRect(e){var t;(t=this.hintPresenter)==null||t.setViewFinderRect(new a$n(new a$5(e.origin.x,e.origin.y),new a$k(e.size.width,e.size.height)));}drawEngineCommands(e){var t;(t=this.canvasDrawer)==null||t.draw(e);}displayError(e){this.errorElement.textContent=`Error ${e.code}: ${e.message}`,this.errorElement.hidden=false;}clearError(){this.errorElement.textContent="",this.errorElement.hidden=true;}updateControls(){var e;for(let t of this.controls)(e=t.update)==null||e.call(t,this);}async onFrameSourceChange(e){let t=e==null?void 0:e.type;if(this.setupHtmlElementVisibility(t),t==="camera"){let i=e==null?void 0:e.getCurrentState();i!=null&&await this.onCameraStateChanged(i);}else t==="singleImageUploader"&&this.setupHtmlElementSingleImageUploader(e.settings);}async onCameraStateChanged(e){var t;switch((t=this.cameraPaintboardElement)==null||t.classList.toggle(a$b.PAINTBOARD_CLASS_NAME_STATE_ON,e==="on"),e){case "stopping":{this.hiddenProperties.freezeFrameWhenStoppingFrameSource&&this.freezeFrame(),this.setVideoElementOpacity("0");return}case "starting":case "bootingUp":case "wakingUp":{if(!this.htmlElement){a$i.error("cannot set frame source stream before connecting view to an HTML element");return}this.videoElement&&(g.instance().gui.isCameraRecoveryVisible=this.isCameraRecoveryVisible.bind(this),g.instance().gui.setCameraRecoveryVisible=this.setCameraRecoveryVisible.bind(this),this.setVideoElementOpacity("0"));return}case "off":{this.setVideoElementOpacity("0"),this.updateControls();return}case "on":{await g.instance().waitForCapabilities(),this.updateControls(),this.unfreezeFrame(),this.setVideoElementOpacity("1");break}case "goingToSleep":{this.freezeFrame();break}}}setVideoElementOpacity(e){this.videoElement&&(this.videoElement.style.opacity=e),this.canvasElement&&(this.canvasElement.style.opacity=e);}onSingleImageUploaderSettingsChange(e){this.setupHtmlElementSingleImageUploader(e);}setHiddenProperty(e,t){this.hiddenProperties[e]=t;}async onVisibilityChange(){var t,i;let e=(t=this.videoElement)==null?void 0:t.srcObject;if(this.hiddenProperties.stopVideoTracksOnVisibilityChange&&(document.visibilityState==="hidden"&&g.instance().stopVideoTracks(),document.visibilityState==="visible"&&g.instance().activeCamera!=null&&e!=null))if(!e.active||(i=e.getVideoTracks()[0])!=null&&i.muted)try{a$i.debug('Detected visibility change ("visible") event with inactive video source, try to reinitialize camera'),await g.instance().reinitializeCamera();}catch{}else a$i.debug('Detected visibility change ("visible") event with active video source, replay video'),g.instance().playVideo();}async cameraRecovery(e){e.preventDefault(),g.instance().activeCamera=g.instance().selectedCamera,await g.instance().reinitializeCamera();}freezeFrame(){var i;if(!this.frozenFrame)return;let e=g.instance().getCurrentFrame();if(!e)return;let t=new ImageData(e.data,e.width,e.height);this.frozenFrameCanvas.width=t.width,this.frozenFrameCanvas.height=t.height,this.frozenFrame.width=t.width,this.frozenFrame.height=t.height,(i=this.frozenFrameCanvas.getContext("2d"))==null||i.putImageData(t,0,0),this.frozenFrame.src=this.frozenFrameCanvas.toDataURL("image/jpeg",.4),this.frozenFrame.classList.toggle(a$b.MIRRORED_CLASS_NAME,g.instance().isMirrorImageEnabled()),this.frozenFrame.hidden=false;}unfreezeFrame(){this.frozenFrame&&(this.frozenFrame.src="",this.frozenFrame.hidden=true);}},B=L;export{B as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-33ZWDLU7.js';import {a as a$2}from'./chunk-UWBNF47P.js';import {a as a$1}from'./chunk-3A4KLILV.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`<style>${e.tag}{display:flex}</style><svg width="${this.size}" height="${this.heightForViewbox(32,32)}" viewBox="0 0 32 32" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M16.625 15C15.8656 15 15.25 15.6156 15.25 16.375C15.25 17.1344 15.8656 17.75 16.625 17.75C17.3844 17.75 18 17.1344 18 16.375C18 15.6156 17.3844 15 16.625 15ZM12.5 16.375C12.5 14.0968 14.3468 12.25 16.625 12.25C18.9032 12.25 20.75 14.0968 20.75 16.375C20.75 18.6532 18.9032 20.5 16.625 20.5C14.3468 20.5 12.5 18.6532 12.5 16.375Z" fill="${this.fill}"/><path fill-rule="evenodd" clip-rule="evenodd" d="M22.5277 13.2223C23.0647 13.7592 23.9353 13.7592 24.4723 13.2223C25.0092 12.6853 25.0092 11.8147 24.4723 11.2777L24.0695 10.875H24.875C25.6344 10.875 26.25 11.4906 26.25 12.25V21.875C26.25 22.6344 25.6344 23.25 24.875 23.25H16.625C15.8656 23.25 15.25 23.8656 15.25 24.625C15.25 25.3844 15.8656 26 16.625 26H24.875C27.1532 26 29 24.1532 29 21.875V12.25C29 9.97183 27.1532 8.125 24.875 8.125H24.0695L24.4723 7.72227C25.0092 7.1853 25.0092 6.3147 24.4723 5.77773C23.9353 5.24076 23.0647 5.24076 22.5277 5.77773L19.7777 8.52773C19.5199 8.78559 19.375 9.13533 19.375 9.5C19.375 9.86467 19.5199 10.2144 19.7777 10.4723L22.5277 13.2223Z" fill="${this.fill}"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12.5 7.4375C12.5 7.0578 12.8078 6.75 13.1875 6.75H19.375C20.1344 6.75 20.75 6.13439 20.75 5.375C20.75 4.61561 20.1344 4 19.375 4H13.1875C11.289 4 9.75 5.53902 9.75 7.4375C9.75 7.8172 9.4422 8.125 9.0625 8.125H8.375C6.09683 8.125 4.25 9.97183 4.25 12.25V21.875C4.25 24.1532 6.09683 26 8.375 26H9.18046L8.77773 26.4027C8.24076 26.9397 8.24076 27.8103 8.77773 28.3473C9.3147 28.8842 10.1853 28.8842 10.7223 28.3473L13.4723 25.5973C14.0092 25.0603 14.0092 24.1897 13.4723 23.6527L10.7223 20.9027C10.1853 20.3658 9.3147 20.3658 8.77773 20.9027C8.24076 21.4397 8.24076 22.3103 8.77773 22.8473L9.18046 23.25H8.375C7.61561 23.25 7 22.6344 7 21.875V12.25C7 11.4906 7.61561 10.875 8.375 10.875H9.0625C10.961 10.875 12.5 9.33598 12.5 7.4375Z" fill="${this.fill}"/></svg>`}};e.tag="scandit-camera-switch-reverse-icon";var C=e;export{C as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-KUAZYGPM.js';import {a}from'./chunk-XR65N6EG.js';var l=new Map;l.set("default",()=>import('../assets/beepSound.js'));var e=class e{constructor(r){this.resource=null;this.resource=r;}static get defaultSound(){return e._defaultSound instanceof e||(e._defaultSound=new e("default")),e._defaultSound}toJSONObject(){return this.resource!==null?{resource:this.resource}:{}}async play(){var r,o,i;if(this.resource==null||this.resource===""){a.warn("Sound resource is null or empty string. Cannot be played.");return}if(!this.audio){let a=await((i=(o=(r=l.get(this.resource))==null?void 0:r())==null?void 0:o.then(t=>(t==null?void 0:t.beepSound)||this.resource))!=null?i:Promise.resolve(this.resource));this.audio=new a$1({src:a,html5:true});}this.audio.play();}};e._defaultSound=null;var s=e;export{s as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-FMOB7R2T.js';import {a as a$1}from'./chunk-SGL5J2CI.js';var h=(t=>(t.ArrowDown="arrowDown",t.ArrowLeft="arrowLeft",t.ArrowRight="arrowRight",t.ArrowUp="arrowUp",t.CameraSwitch="cameraSwitch",t.Checkmark="checkMark",t.ChevronDown="chevronDown",t.ChevronLeft="chevronLeft",t.ChevronRight="chevronRight",t.ChevronUp="chevronUp",t.Delete="delete",t.DotFiveX="dotFiveX",t.ExclamationMark="exclamationMark",t.ExpiredItem="expiredItem",t.FragileItem="fragileItem",t.InspectItem="inspectItem",t.Keyboard="keyboard",t.LowStock="lowStock",t.OneX="oneX",t.Print="print",t.QuestionMark="questionMark",t.Restart="restart",t.Slash="slash",t.StarFilled="starFilled",t.StarHalfFilled="starHalfFilled",t.StarOutlined="starOutlined",t.ToPick="toPick",t.TwoX="twoX",t.WrongItem="wrongItem",t.XMark="xMark",t.Pause="pause",t))(h||{}),l={arrowDown:import('../private/ui/atoms/ArrowDownSvgIcon.js').then(o=>o.ArrowDownSvgIcon),arrowLeft:import('../private/ui/atoms/ArrowLeftSvgIcon.js').then(o=>o.ArrowLeftSvgIcon),arrowRight:import('../private/ui/atoms/ArrowRightSvgIcon.js').then(o=>o.ArrowRightSvgIcon),arrowUp:import('../private/ui/atoms/ArrowUpSvgIcon.js').then(o=>o.ArrowUpSvgIcon),cameraSwitch:import('../private/ui/atoms/CameraSwitchSvgIcon.js').then(o=>o.CameraSwitchSvgIcon),checkMark:import('../private/ui/atoms/CheckSvgIcon.js').then(o=>o.CheckSvgIcon),chevronDown:import('../private/ui/atoms/ChevronDownSvgIcon.js').then(o=>o.ChevronDownSvgIcon),chevronLeft:import('../private/ui/atoms/ChevronLeftSvgIcon.js').then(o=>o.ChevronLeftSvgIcon),chevronRight:import('../private/ui/atoms/ChevronRightSvgIcon.js').then(o=>o.ChevronRightSvgIcon),chevronUp:import('../private/ui/atoms/ChevronUpSvgIcon.js').then(o=>o.ChevronUpSvgIcon),delete:import('../private/ui/atoms/DeleteSvgIcon.js').then(o=>o.DeleteSvgIcon),dotFiveX:import('../private/ui/atoms/Dot5xSvgIcon.js').then(o=>o.Dot5xSvgIcon),exclamationMark:import('../private/ui/atoms/ExclamationMarkSvgIcon.js').then(o=>o.ExclamationMarkSvgIcon),expiredItem:import('../private/ui/atoms/CalendarExclamationMarkSvgIcon.js').then(o=>o.CalendarExclamationMarkSvgIcon),fragileItem:import('../private/ui/atoms/GlassSvgIcon.js').then(o=>o.GlassSvgIcon),inspectItem:import('../private/ui/atoms/HandLensCheckSvgIcon.js').then(o=>o.HandLensCheckSvgIcon),keyboard:import('../private/ui/atoms/KeyboardSvgIcon.js').then(o=>o.KeyboardSvgIcon),lowStock:import('../private/ui/atoms/LowStockSvgIcon.js').then(o=>o.LowStockSvgIcon),oneX:import('../private/ui/atoms/OnexSvgIcon.js').then(o=>o.OnexSvgIcon),print:import('../private/ui/atoms/PrinterSvgIcon.js').then(o=>o.PrinterSvgIcon),questionMark:import('../private/ui/atoms/QuestionMarkSvgIcon.js').then(o=>o.QuestionMarkSvgIcon),restart:import('../private/ui/atoms/RestartSvgIcon.js').then(o=>o.RestartSvgIcon),slash:import('../private/ui/atoms/SlashSvgIcon.js').then(o=>o.SlashSvgIcon),starFilled:import('../private/ui/atoms/StarFilledSvgIcon.js').then(o=>o.StarFilledSvgIcon),starHalfFilled:import('../private/ui/atoms/StarHalfFilledSvgIcon.js').then(o=>o.StarHalfFilledSvgIcon),starOutlined:import('../private/ui/atoms/StarOutlinedSvgIcon.js').then(o=>o.StarOutlinedSvgIcon),toPick:import('../private/ui/atoms/ToPickSvgIcon.js').then(o=>o.ToPickSvgIcon),twoX:import('../private/ui/atoms/TwoxSvgIcon.js').then(o=>o.TwoxSvgIcon),wrongItem:import('../private/ui/atoms/WrongItemSvgIcon.js').then(o=>o.WrongItemSvgIcon),xMark:import('../private/ui/atoms/CrossSvgIcon.js').then(o=>o.CrossSvgIcon),pause:import('../private/ui/atoms/PauseSvgIcon.js').then(o=>o.PauseSvgIcon)},a=class{constructor(){this.iconName=null;this.backgroundShape=null;this.iconColor=a$1.fromHex("#fff");this.backgroundStrokeWidth=0;this.width=32;this.height=32;this.iconSize=null;}withIcon(r){return this.iconName=r,this}withBackgroundShape(r){return this.backgroundShape=r,this}withIconColor(r){return this.iconColor=r,this}withBackgroundColor(r){return this.backgroundColor=r,this}withBackgroundStrokeColor(r){return this.backgroundStrokeColor=r,this}withBackgroundStrokeWidth(r){return this.backgroundStrokeWidth=r,this}async build(){let r=b.create();r.backgroundStrokeWidth=this.backgroundStrokeWidth,r.backgroundShape=this.backgroundShape,this.backgroundColor!=null&&(r.backgroundColor=this.backgroundColor),this.backgroundStrokeColor!=null&&(r.backgroundStrokeColor=this.backgroundStrokeColor);let n=null;if(this.iconName!=null){let e=await l[this.iconName];e.register(),n=e.create(),r.append(n);}return r.width=this.width,r.height=this.height,r.iconColor=this.iconColor,n!=null&&this.iconSize!=null&&(n.size=this.iconSize),r}withIconSize(r){return this.iconSize=r,this}withWidth(r){return this.width=r,this}withHeight(r){return this.height=r,this}};export{h as a,l as b,a as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=(o=>(o.AboveControls="above-controls",o))(e||{});export{e as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$4}from'./chunk-3A7LM5JG.js';import {a}from'./chunk-
|
|
1
|
+
import {a as a$4}from'./chunk-3A7LM5JG.js';import {b,a as a$3}from'./chunk-SK6L34IF.js';import {a}from'./chunk-NQF3GUK2.js';import {a as a$2}from'./chunk-QHBIT2WY.js';import {d}from'./chunk-YUZDO2PC.js';import {a as a$6}from'./chunk-ZKROZLQ4.js';import {a as a$a}from'./chunk-KAFNKP6O.js';import {a as a$9}from'./chunk-E4XJ4GKD.js';import {a as a$b}from'./chunk-QOCHMKNY.js';import {b as b$3}from'./chunk-FTD535WI.js';import {a as a$5}from'./chunk-R6E4CT22.js';import {a as a$7,b as b$2}from'./chunk-CX2R2XQK.js';import {a as a$c}from'./chunk-4BP7D26M.js';import {b as b$1}from'./chunk-YONR3EGV.js';import {a as a$1}from'./chunk-XR65N6EG.js';import {a as a$8}from'./chunk-QCZSSQAQ.js';var N=`
|
|
2
2
|
attribute vec2 a_position;
|
|
3
3
|
varying vec2 v_texcoord;
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-SGL5J2CI.js';import {a}from'./chunk-UWBNF47P.js';import {a as a$
|
|
1
|
+
import {a as a$2}from'./chunk-SGL5J2CI.js';import {a}from'./chunk-UWBNF47P.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$3}from'./chunk-3A4KLILV.js';import {a as a$4}from'./chunk-LSZZVJ6B.js';var s=a`<div role="listitem"><slot></slot></div>`,r=class r extends a$1{constructor(){super();let o=this.attachShadow({mode:"open"});o.innerHTML=s,o.append(r.createStyleElement().cloneNode(true));}set haloGlow(o){this.toggleAttribute("halo-glow",o);}get haloGlow(){return this.hasAttribute("halo-glow")}set border(o){this.toggleAttribute("border",o);}get border(){return this.hasAttribute("border")}set backgroundColor(o){this.style.setProperty("--background-color",`#${o.toJSON()}`);}get backgroundColor(){return a$2.fromHex(this.style.getPropertyValue("--background-color"))}set borderColor(o){this.style.setProperty("--border-color",`#${o.toJSON()}`);}get borderColor(){return a$2.fromHex(this.style.getPropertyValue("--border-color"))}static create(){return r.register(),document.createElement(r.tag)}static register(){a$3({[r.tag]:r});}static createStyleElement(){return a$4`@keyframes gradientShift{0%{background-position-x:100%}50%{background-position-x:0}to{background-position-x:100%}}:host{--corner-radius:0.75rem;--background-color:#ffffffe6;--border-color:#0000;--glow-max-width:1rem;--glow-horizontal-edge:min(5%,var(--glow-max-width));--glow-vertical-edge:min(20%,var(--glow-max-width));--glow-horizontal-start:calc(100% - var(--glow-horizontal-edge));--glow-vertical-start:calc(100% - var(--glow-vertical-edge));--card-min-height:5rem;--card-max-height:100px;backdrop-filter:saturate(180%) blur(20px);background-color:var(--background-color);border:1px solid var(--border-color);border-radius:var(--corner-radius);box-shadow:0 2px 6px 0 #12161926;box-sizing:border-box;display:block;font-family:SF Pro Text,sans-serif;max-height:var(--card-max-height);min-height:var(--card-min-height);min-width:200px;overflow:hidden;position:relative}:host>div[role=listitem]{height:100%;max-height:var(--card-max-height);min-height:var(--card-min-height);position:relative}:host([halo-glow])>div:before{animation:gradientShift 8s ease-in-out .2s infinite;background:linear-gradient(90deg,#ffd89b,#ff6f91 20%,#a566ff 45%,#64f6ff 70%,#ffd89b);background-size:300% 300%;border-radius:var(--corner-radius);content:"";filter:blur(30px);inset:0;mask:linear-gradient(to right,#000 0,#0000 var(--glow-horizontal-edge),#0000 var(--glow-horizontal-start),#000 100%),linear-gradient(to bottom,#000 0,#0000 var(--glow-vertical-edge),#0000 var(--glow-vertical-start),#000 100%);mask-composite:intersect;-webkit-mask:linear-gradient(to right,#000 0,#0000 var(--glow-horizontal-edge),#0000 var(--glow-horizontal-start),#000 100%),linear-gradient(to bottom,#000 0,#0000 var(--glow-vertical-edge),#0000 var(--glow-vertical-start),#000 100%);-webkit-mask-composite:source-over;opacity:1;position:absolute;transition:opacity .3s ease;z-index:0}:host([halo-glow])>div:before{opacity:.75}:host([halo-glow][border])>div:before{opacity:.75!important}:host(:not([halo-glow]))>div:before{animation:none;mask:none;-webkit-mask:none;opacity:0}:host([border]){--border-color:#d92121}:host(:not([border])){--border-color:#0000}`}};r.tag="scandit-basic-card";var n=r;export{n as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {e}from'./chunk-TTGJAMI2.js';import {a as a$2}from'./chunk-SGL5J2CI.js';import {a as a$1}from'./chunk-UWBNF47P.js';import {a
|
|
1
|
+
import {e}from'./chunk-TTGJAMI2.js';import {a as a$2}from'./chunk-SGL5J2CI.js';import {a as a$1}from'./chunk-UWBNF47P.js';import {a}from'./chunk-EV4OEANA.js';import {a as a$3}from'./chunk-3A4KLILV.js';import {a as a$4}from'./chunk-LSZZVJ6B.js';var v=(e=>(e.Circle="circle",e.Square="square",e))(v||{}),c="--width",l="--height",h="--background-color",d="--stroke-color",p="--stroke-width",n=class n extends a{constructor(){super();this.onSlotChangeListener=this.onSlotChange.bind(this);let e=this.attachShadow({mode:"open"});e.innerHTML=a$1`<div class="container shape-none"><slot></div>`,this.containerElement=e.querySelector(".container"),this.setStylePropertyValue(c,"32px"),this.setStylePropertyValue(l,"32px"),this.setStylePropertyValue(h,"transparent"),this.setStylePropertyValue(d,"#fff"),this.setStylePropertyValue(p,"0px"),e.append(n.createStyleElement().cloneNode(true));}get iconColor(){var o,r;let e=(o=this.shadowRoot)==null?void 0:o.querySelector("slot"),t=(r=e==null?void 0:e.assignedElements())!=null?r:[];return a$2.fromHex(t[0].fill)}set iconColor(e){this.render({propChanged:"iconcolor",value:`#${e.toJSON()}`});}get backgroundColor(){return a$2.fromHex(this.getStylePropertyValue(h))}set backgroundColor(e){this.render({propChanged:"backgroundcolor",value:`#${e.toJSON()}`});}get backgroundStrokeColor(){return a$2.fromHex(this.getStylePropertyValue(d))}set backgroundStrokeColor(e){this.render({propChanged:"backgroundstrokecolor",value:`#${e.toJSON()}`});}get backgroundStrokeWidth(){let e=this.getStylePropertyValue(p);return Number.parseInt(e,10)}set backgroundStrokeWidth(e){this.render({propChanged:"backgroundstrokewidth",value:String(e)});}get backgroundShape(){var t;let e=(t=/shape-(.*)/.exec(this.containerElement.classList.value))==null?void 0:t[1];return e!=null&&e!=="none"?e:null}set backgroundShape(e){this.render({propChanged:"backgroundshape",value:e!=null?e:"none"});}set width(e){this.render({propChanged:"width",value:String(e)}),this.updateIconSizeProperty(e,this.height);}get width(){let e=this.getStylePropertyValue(c).replace("px","");return Number.parseInt(e,10)}set height(e){this.render({propChanged:"height",value:String(e)}),this.updateIconSizeProperty(this.width,e);}get height(){let e=this.getStylePropertyValue(l).replace("px","");return Number.parseInt(e,10)}static create(){return n.register(),document.createElement(n.tag)}static register(){a$3({[n.tag]:n});}static createStyleElement(){return a$4`:host{display:inline-block;--width:32px;--height:32px;--background-color:#0000;--stroke-color:#fff;--stroke-width:0px}:host([hidden]){display:none}.container{background-color:var(--background-color);box-shadow:0 1px 2px 0 #${e.withAlpha(.3).toJSON()};height:calc(var(--height) - var(--stroke-width));outline:var(--stroke-width) solid var(--stroke-color);position:relative;width:calc(var(--width) - var(--stroke-width))}.container.shape-${"circle"}{border-radius:50%}.container.shape-${"square"}{border-radius:0}.container.shape-none{box-shadow:unset}::slotted(*){left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}`}onSlotChange(){this.updateIconSizeProperty(this.width,this.height);}connectedCallback(){var t;let e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot");e==null||e.addEventListener("slotchange",this.onSlotChangeListener);}disconnectedCallback(){var t;let e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot");e==null||e.removeEventListener("slotchange",this.onSlotChangeListener);}render({propChanged:e,value:t}){switch(e){case "width":{this.setStylePropertyValue(c,`${t}px`);break}case "height":{this.setStylePropertyValue(l,`${t}px`);break}case "backgroundstrokewidth":{this.setStylePropertyValue(p,`${t}px`);break}case "backgroundstrokecolor":{this.setStylePropertyValue(d,t);break}case "backgroundcolor":{this.setStylePropertyValue(h,t);break}case "iconcolor":{this.updateFillIconColor(a$2.fromHex(t));break}case "backgroundshape":{let o=t;this.containerElement.classList.toggle("shape-circle",o==="circle"),this.containerElement.classList.toggle("shape-square",o==="square"),this.containerElement.classList.toggle("shape-none",o==="none");break}}}attributeChangedCallback(e,t,o){this.render({propChanged:e,value:o});}getStylePropertyValue(e){return this.containerElement.style.getPropertyValue(e)}setStylePropertyValue(e,t){this.containerElement.style.setProperty(e,t);}updateIconSizeProperty(e,t){var a,u;let o=(a=this.shadowRoot)==null?void 0:a.querySelector("slot"),r=(u=o==null?void 0:o.assignedElements())!=null?u:[],s=Math.min(e,t);for(let C of r)C.size=s/2;}setIconSize(e){var r,s;let t=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"),o=(s=t==null?void 0:t.assignedElements())!=null?s:[];for(let a of o)a.size=e;}updateFillIconColor(e){var r,s;let t=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"),o=(s=t==null?void 0:t.assignedElements())!=null?s:[];for(let a of o)a.fill=`#${e.toJSON()}`;}};n.tag="scandit-icon-container",n.observedAttributes=["width","height","backgroundstrokecolor","backgroundcolor","backgroundstrokewidth","iconcolor","backgroundshape"];var y=n;export{v as a,y as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-UWBNF47P.js';import {a
|
|
1
|
+
import {a as a$1}from'./chunk-UWBNF47P.js';import {a}from'./chunk-EV4OEANA.js';import {a as a$2}from'./chunk-3A4KLILV.js';import {a as a$3}from'./chunk-LSZZVJ6B.js';var t=class t extends a{constructor(){super();let e=this.attachShadow({mode:"open"});e.innerHTML=a$1`<div class="controls-grid"><div class="top-left"><slot name="topLeft"></slot></div><div class="top-center"><slot name="topCenter"></slot></div><div class="top-right"><slot name="topRight"></slot></div><div class="center-left"><slot name="centerLeft"></slot></div><div class="center"><slot name="center"></slot></div><div class="center-right"><slot name="centerRight"></slot></div><div class="bottom-left"><slot name="bottomLeft"></slot></div><div class="bottom-center"><slot name="bottomCenter"></slot></div><div class="bottom-right"><slot name="bottomRight"></slot></div><slot></slot></div>`,e.append(t.createStyleElement().cloneNode(true));}static create(){return document.createElement(t.tag)}static register(){a$2({[t.tag]:t});}static createStyleElement(){return a$3`:host{height:100%;inset:0;pointer-events:none;position:absolute;width:100%}.controls-grid{box-sizing:border-box;display:grid;gap:0;grid-template-columns:1fr auto 1fr;grid-template-rows:1fr auto 1fr;height:100%;inset:0;padding:0;position:relative;width:100%}.top-left{grid-column:1;justify-self:start;padding:24px 0 0 16px}.top-center,.top-left{align-self:start;display:flex;flex-direction:column;gap:16px;grid-row:1;pointer-events:auto}.top-center{grid-column:2;justify-self:center;padding:24px 0 0}.top-right{align-self:start;display:flex;flex-direction:column;gap:16px;grid-column:3;grid-row:1;justify-self:end;padding:24px 16px 0 0;pointer-events:auto}.center-left{grid-column:1;justify-self:start;padding:0 0 0 16px}.center,.center-left{align-self:center;display:flex;flex-direction:column;gap:16px;grid-row:2;pointer-events:auto}.center{grid-column:2;justify-self:center;padding:0}.center-right{align-self:center;display:flex;flex-direction:column;gap:16px;grid-column:3;grid-row:2;justify-self:end;padding:0 16px 0 0;pointer-events:auto}.bottom-left{grid-column:1;justify-self:start;padding:0 0 24px 16px}.bottom-center,.bottom-left{align-self:end;display:flex;flex-direction:column-reverse;gap:16px;grid-row:3;pointer-events:auto}.bottom-center{grid-column:2;justify-self:center;padding:0 0 24px}.bottom-right{align-self:end;display:flex;flex-direction:column-reverse;gap:16px;grid-column:3;grid-row:3;justify-self:end;padding:0 24px 24px 0;pointer-events:auto}`}};t.tag="scandit-controls-layout";var s=t;export{s as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-XW3Z6KKS.js';import {d}from'./chunk-YUZDO2PC.js';import {f,g}from'./chunk-3D2HNEVH.js';var u=class{constructor(){this.type="camera";this.customImages={idle:"",pressed:""};this.cameraSwitchButton=void 0;this.CameraSwitchButtonClass=void 0;this.currentFrameSource=null;this.view=void 0;this.onCameraSwitched=this.handleCameraSwitched.bind(this);this.isTransitioning=false;}get idleImage(){return this.customImages.idle}set idleImage(t){this.customImages.idle=t,this.applyCustomImagesToButton();}get pressedImage(){return this.customImages.pressed}set pressedImage(t){this.customImages.pressed=t,this.applyCustomImagesToButton();}toJSONObject(){return {type:this.type}}async install(t){var i,r,s;this.CameraSwitchButtonClass||(this.CameraSwitchButtonClass=await import('../private/ui/molecules/CameraSwitchButton.js').then(l=>l.CameraSwitchButton),(i=this.CameraSwitchButtonClass)==null||i.register()),this.view=t,this.currentFrameSource=(s=(r=t.getContext())==null?void 0:r.frameSource)!=null?s:null,this.cameraSwitchButton=this.CameraSwitchButtonClass.create(),this.cameraSwitchButton.slot="topRight",this.cameraSwitchButton.hidden=true,this.cameraSwitchButton.addEventListener("camera-switched",this.onCameraSwitched);let e=t.controlsElement;e&&e.append(this.cameraSwitchButton),this.applyCustomImagesToButton();let a=await this.canShow();return this.updateButtonVisibility(a),true}remove(t){t&&this.cameraSwitchButton&&(this.cameraSwitchButton.removeEventListener("camera-switched",this.onCameraSwitched),this.cameraSwitchButton.remove(),this.cameraSwitchButton=null,this.currentFrameSource=null,this.view=void 0);}async update(t){var a,i;this.currentFrameSource=(i=(a=t.getContext())==null?void 0:a.frameSource)!=null?i:null,this.view=t;let e=await this.canShow();this.updateButtonVisibility(e);}updateButtonVisibility(t){this.cameraSwitchButton&&(this.cameraSwitchButton.hidden=!t);}applyCustomImagesToButton(){if(!this.cameraSwitchButton)return;this.customImages.idle||this.customImages.pressed?this.cameraSwitchButton.setCustomImages(this.customImages):this.cameraSwitchButton.useCustomImages=false;}async canShow(){if(!f(this.currentFrameSource)||this.currentFrameSource.getCurrentState()!=="on")return false;try{return (await d.getCameras(false,true)).length>1}catch{return false}}handleCameraSwitched(t){let{currentMode:e}=t.detail,a=e==="back"?"front":"back";this.cameraSwitchButton.mode=a,this.handleCameraSwitch();}async handleCameraSwitch(){if(this.isTransitioning)return;let t=await this.getNextDeviceCamera();t&&await this.switchCameras(t);}async getNextDeviceCamera(){var r;let t=await a.getAll(false,true),e=this.currentFrameSource?this.currentFrameSource:null,a$1=e==null?void 0:e.deviceId,i=t.findIndex(s=>s.deviceId===a$1);return i>-1?(r=t[i+1])!=null?r:t[0]:t.length>0?t[0]:null}async switchCameras(t){var s;this.isTransitioning=true;let e=(s=this.view)==null?void 0:s.getContext(),a=e==null?void 0:e.frameSource,i,r;a!=null&&(i=new g(a.settings),r=a.desiredState),await(a==null?void 0:a.switchToDesiredState("off")),i!=null&&await t.applySettings(i),await(e==null?void 0:e.setFrameSource(t)),await(e==null?void 0:e.frameSource).switchToDesiredState(r!=null?r:"on"),this.isTransitioning=false;}};export{u as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-R6SUMD5F.js';import {b}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-R6SUMD5F.js';import {b}from'./chunk-YONR3EGV.js';var n=class e{constructor(t,o=a.defaultVibrationPattern){this.type=t,this.pattern=o;let r=b.getSupportedVibrationMethod();r&&(this._vibrate=r.bind(navigator));}static get defaultVibration(){return new e("default")}static withPattern(t){return new e("default",t)}toJSONObject(){return {type:this.type}}vibrate(){var t;return (t=this._vibrate)==null?void 0:t.call(this,this.pattern)}};export{n as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {c,a as a$1,b}from'./chunk-JFRSUCMO.js';import {a as a$3}from'./chunk-EQRBQJYM.js';import {a as a$2}from'./chunk-GHTCNOQN.js';import {e}from'./chunk-E7IMQECS.js';import {b as b$1}from'./chunk-YONR3EGV.js';import {a as a$4}from'./chunk-XR65N6EG.js';var a=class a{constructor(e){this.canUploadFile=false;this._mounted=false;this._loading=false;this._htmlRoot=void 0;this._canvas=void 0;this._onInputCheck=void 0;this._onBeforeFileRead=void 0;this._onImageLoadError=void 0;this._onFileReaderError=void 0;this._onCaptureReady=void 0;this._resizedImageSizeLimit=1440;this._inputElement=void 0;this._buttonElement=void 0;this._informationElement=void 0;this._chooseImageText="";this._localizationSubscription=void 0;this._onLocalizationUpdated=this.onLocalizationUpdated.bind(this);this._settings=e;}get canvas(){return this._canvas||(this._canvas=document.createElement("canvas")),this._canvas}get canvasContext(){return this._canvasContext||(this._canvasContext=this.canvas.getContext("2d",{willReadFrequently:true})),this._canvasContext}mount(e){var _,f;if(this._mounted)return;if(!document.head.querySelector(`[data-component=${a.componentName}]`)){let r=document.createElement("style");r.dataset.component=a.componentName,r.textContent=c,document.head.append(r);}let t=document.createElement("div");t.className=a$1.SINGLE_IMAGE_UPLOADER_CONTAINER,Object.assign(t.style,b.SINGLE_IMAGE_UPLOADER_CONTAINER_STYLE,this._settings.containerStyle),e.append(t);let{iconElement:n,iconStyle:s,informationElement:i,informationStyle:l,buttonElement:d,buttonStyle:h,onlyCameraCapture:p}=this._settings;Object.assign(n.style,b.SINGLE_IMAGE_UPLOADER_ICON_STYLE,s,{maxWidth:"100px",maxHeight:"100px"}),t.append(n),i.hasAttribute(a.DEFAULT_DOM_ATTRIBUTE)&&(Object.assign(i.style,b.SINGLE_IMAGE_UPLOADER_INFORMATION_STYLE,l),i.textContent=a$2.getInstance().get("core.singleImageUploader.title")),t.append(i);let o=document.createElement("input");o.type="file",p?(o.accept="image/*",o.capture="environment",o.dataset.onlyCaptureOnMobile="environment"):o.accept=b$1.isAndroid()&&((_=b$1.getUserAgentInfo().getBrowser().name)!=null&&_.toLowerCase().includes("chrome"))?"image/*;capture=camera":"image/*",o.addEventListener("change",r=>{this.onFileUpload(r);}),o.addEventListener("click",r=>{var m;(m=this._onInputCheck)==null||m.call(this,r);}),o.addEventListener("keydown",r=>{var m;(m=this._onInputCheck)==null||m.call(this,r);});let g=document.createElement("label");g.append(o),d.hasAttribute(a.DEFAULT_DOM_ATTRIBUTE)&&Object.assign(d.style,b.SINGLE_IMAGE_UPLOADER_BUTTON_STYLE,h),g.append(d),t.append(g);let E=document.createRange().createContextualFragment(atob(a$3)).firstElementChild;Object.assign(E.style,{position:"absolute",bottom:"1em",right:"1em",width:"10em"}),t.append(E),this._htmlRoot=t,this._mounted=true,this._inputElement=o,this._buttonElement=d,this._chooseImageText=(f=d.textContent)!=null?f:"",this._informationElement=i,this._localizationSubscription=a$2.getInstance().subscribe(this._onLocalizationUpdated);}unmount(){var e,t,n;this._mounted&&((e=this._htmlRoot)==null||e.remove(),(t=document.head.querySelector(`[data-component=${a.componentName}]`))==null||t.remove(),(n=this._localizationSubscription)==null||n.cancel(),this._mounted=false);}setButtonState(e){this._inputElement&&(this._inputElement.disabled=e==="disabled");}getButtonState(){return this._inputElement?this._inputElement.disabled?"disabled":"enabled":"disabled"}onInputCheck(e){this._onInputCheck=e;}onBeforeFileRead(e){this._onBeforeFileRead=e;}onImageLoadError(e){this._onImageLoadError=e;}onFileReaderError(e){this._onFileReaderError=e;}onCaptureReady(e){this._onCaptureReady=e;}onAfterImageProcessed(){this.setLoading(false);}onLocalizationUpdated(){var e,t;(e=this._buttonElement)!=null&&e.hasAttribute(a.DEFAULT_DOM_ATTRIBUTE)&&(this._buttonElement.textContent=a$2.getInstance().get("core.singleImageUploader.button")),(t=this._informationElement)!=null&&t.hasAttribute(a.DEFAULT_DOM_ATTRIBUTE)&&(this._informationElement.textContent=a$2.getInstance().get("core.singleImageUploader.title"));}setLoading(e){this._buttonElement&&(this.setButtonState(e?"disabled":"enabled"),this._buttonElement.textContent=e?"...":this._chooseImageText,this._loading=e);}getResizedImageDimensions(e,t){return e<=this._resizedImageSizeLimit&&t<=this._resizedImageSizeLimit?{width:e,height:t}:e>t?{width:this._resizedImageSizeLimit,height:Math.round(t/e*this._resizedImageSizeLimit)}:{width:Math.round(e/t*this._resizedImageSizeLimit),height:this._resizedImageSizeLimit}}onImageLoad(e$1){var i;let{height:t,width:n}=this.getResizedImageDimensions(e$1.naturalWidth,e$1.naturalHeight);this.canvasContext.canvas.width=n,this.canvasContext.canvas.height=t,this.canvasContext.drawImage(e$1,0,0,n,t);let s={data:this.canvasContext.getImageData(0,0,n,t).data,frameId:e(),width:n,height:t};(i=this._onCaptureReady)==null||i.call(this,s);}onFileReaderLoad(e,t,n){e.value="",t.result!=null&&(n.addEventListener("load",()=>{this.onImageLoad(n);},{once:true}),n.addEventListener("error",s=>{var i;(i=this._onImageLoadError)==null||i.call(this,s),this.setLoading(false);},{once:true}),n.src=t.result);}async onFileUpload(e){var d;this.setLoading(true);let t=e.currentTarget,{files:n}=t;if(n==null||n.length===0){this.setLoading(false);return}let s=(d=this._onBeforeFileRead)==null?void 0:d.call(this,e);if(s instanceof Promise&&await s,!this.canUploadFile){t.value="",a$4.warn("Can't upload file, no capture mode enabled."),this.setLoading(false);return}let i=new Image,l=new FileReader;l.addEventListener("load",()=>{this.onFileReaderLoad(t,l,i);}),l.addEventListener("error",h=>{var p;(p=this._onFileReaderError)==null||p.call(this,h),this.setLoading(false);}),l.readAsDataURL(n[0]);}};a.componentName="SingleImageUploaderView",a.DEFAULT_DOM_ATTRIBUTE="data-scandit-default";var T=a;export{T as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-XR65N6EG.js';var d="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA",a=class{constructor(){this.pool=[];this.poolSize=10;this.isUnlocked=false;}obtain(){return this.pool.length>0?this.pool.pop():new Audio}release(o){o._unlocked&&this.pool.length<this.poolSize&&this.pool.push(o);}unlock(){if(!this.isUnlocked){this.isUnlocked=true;for(let o=0;o<this.poolSize;o++){let e=new Audio;e.src=d,e.play().then(()=>{e.pause(),e.currentTime=0,e._unlocked=true,this.pool.push(e);}).catch(()=>{this.pool.push(e);});}}}},u=new a,l=["touchstart","touchend","click","keydown"];function r(){if(typeof document>"u")return;let i=()=>{u.unlock(),l.forEach(o=>{document.removeEventListener(o,i,true);});};l.forEach(o=>{document.addEventListener(o,i,true);});}r();var c=class{constructor(o){this.sounds=[];this.poolSize=5;this.src=Array.isArray(o.src)?o.src[0]:o.src;}play(){let o=this.getInactiveSound(),e=o.audio;e.src!==this.src&&(e.src=this.src),e.currentTime=0,o.playing=true;let n=()=>{o.playing=false,e.removeEventListener("ended",n);};e.addEventListener("ended",n),e.play().catch(t=>{o.playing=false,e.removeEventListener("ended",n),t instanceof DOMException&&(t.name==="NotAllowedError"?a$1.warn("Sound playback blocked by autoplay policy."):t.name!=="AbortError"&&a$1.warn(`Sound playback failed: ${t.name} - ${t.message}`));});}getInactiveSound(){for(let e of this.sounds)if(!e.playing&&e.audio.paused)return e;if(this.sounds.length<this.poolSize){let n={audio:u.obtain(),playing:false};return this.sounds.push(n),n}let o=this.sounds[0];return o.playing&&(o.audio.pause(),o.playing=false),o}};export{c as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$3}from'./chunk-XIAF6V7E.js';import {b,a as a$2}from'./chunk-KYNYQBNF.js';import {a as a$
|
|
1
|
+
import {a as a$3}from'./chunk-XIAF6V7E.js';import {b,a as a$2}from'./chunk-KYNYQBNF.js';import {a as a$4}from'./chunk-KAFNKP6O.js';import {a as a$1}from'./chunk-QOCHMKNY.js';var z={bottomLeft:"bottomRight",bottomRight:"bottomLeft",topLeft:"topRight",topRight:"topLeft",centerLeft:"centerRight",centerRight:"centerLeft",center:"center",topCenter:"topCenter",bottomCenter:"bottomCenter"},a=class a{constructor(){this.listener=null;this._mounted=false;this._mirrored=false;this._cachedSize=new a$1(0,0);this.resizeObserver=null;this.mapViewAnchorPositionsForFramePoint=t=>t;}get size(){return this._cachedSize}setMirrored(t){this._mounted&&(this._mirrored=t);}mount(t){var n;if(this._mounted)return;if(!document.head.querySelector(`[data-component=${a.componentName}]`)){let i=document.createElement("style");i.dataset.component=a.componentName,i.append(document.createTextNode(b)),document.head.append(i);}let r=document.createElement("div");r.classList.add(a$2.CUSTOM_VIEW_CONTAINER),(n=t.parentNode)==null||n.replaceChild(r,t),this._htmlRoot=r,this.gestureRecognizer=new a$3(this._htmlRoot),this.gestureRecognizer.addListener({onTap:(i,o)=>{var s,e;let m=(s=o.target.dataset.identifier)!=null?s:"";m!==""&&((e=this.listener)==null||e.didTapView(Number.parseInt(m,10)));}}),this.resizeObserver=new ResizeObserver(([i])=>{this._cachedSize=new a$1(i.contentRect.width,i.contentRect.height);}),this.resizeObserver.observe(this._htmlRoot),this._cachedSize=new a$1(this._htmlRoot.clientWidth,this._htmlRoot.clientHeight),this._mounted=true;}unmount(){var t,r,n,i;this._mounted&&(this.removeChildren(),(t=this.gestureRecognizer)==null||t.removeAllListeners(),(r=this.resizeObserver)==null||r.disconnect(),(n=this._htmlRoot)==null||n.remove(),this._htmlRoot=null,this.gestureRecognizer=null,(i=document.head.querySelector(`[data-component=${a.componentName}]`))==null||i.remove(),this.listener=null,this._mounted=false);}render(t){var n,i,o,m,s;if(t.elements.length===0){this.removeChildren();return}for(let e of t.removedIds)(i=(n=this._htmlRoot)==null?void 0:n.querySelector(`#${a.elementSelectorPrefix}${e}`))==null||i.remove();let r=document.createDocumentFragment();for(let e of t.elements){let c=`${a.elementSelectorPrefix}${e.identifier}`,p=(o=this._htmlRoot)==null?void 0:o.querySelector(`#${c}`),l=p;if(p==null&&(l=new Image(e.view.options.size.width,e.view.options.size.height),l.id=c,l.dataset.identifier=String(e.identifier),r.append(l)),l){l.src=e.view.data;let h=this.mapViewAnchorPositionsForFramePoint(e.anchorPositions)[this._mirrored?z[e.anchor]:e.anchor];this._mirrored&&(h=a$4.mirrorX(h,this.size));let{x:u,y:P}=this.adjustCoordinatesWithOffset(h,{elementSize:e.view.options.size,offset:e.offset}),v=(m=e.view.options.scale)!=null?m:1;l.style.scale=`${v}`,l.style.transform=`translate3d(${u/v}px, ${P/v}px, 0px)`;}}(s=this._htmlRoot)==null||s.append(r);}renderDomView(t){var n,i;if(t.elements.length===0){this.removeChildren();return}let r=document.createDocumentFragment();for(let o of t.elements){let m=`${a.elementSelectorPrefix}${o.identifier}`,s=(n=this._htmlRoot)==null?void 0:n.querySelector(`#${m}`),{view:e}=o;if(e!=null){e.id=m,s&&s!==e&&s.replaceWith(e);let c=this.mapViewAnchorPositionsForFramePoint(o.anchorPositions)[this._mirrored?z[o.anchor]:o.anchor];this._mirrored&&(c=a$4.mirrorX(c,this.size));let{width:p,height:l}=e.getBoundingClientRect(),{x:h,y:u}=this.adjustCoordinatesWithOffset(c,{elementSize:{width:p,height:l},offset:o.offset});e.style.position="absolute",e.style.transform=`translate3d(calc(${h}px - 50%), calc(${u}px - 50%), 0px)`,r.append(e);}}(i=this._htmlRoot)==null||i.append(r);}removeChildren(){var t;for(;(t=this._htmlRoot)!=null&&t.firstChild;)this._htmlRoot.firstChild.remove();}adjustCoordinatesWithOffset(t,r){let n=t,{elementSize:i,offset:o}=r,m=t.x-i.width/2,s=t.y-i.height/2;return o.x.unit==="pixel"&&(n=new a$4(m+o.x.value,s+o.y.value)),o.x.unit==="fraction"&&(n=new a$4(m+i.width*o.x.value,s+i.height*o.y.value)),n}};a.componentName="CustomLocationsView",a.elementSelectorPrefix="scandit-view-";var S=a;export{S as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-YONR3EGV.js';var p=[119,101,98,107,105,116,84,114,97,110,115,112,111,114,116,68,117,112,108,101,120,67,104,97,110,110,101,108],s=[53,65,41,124,75,47,108,120,50,48,115,62,66,60,107,57],c=[111,74,88,52,51,101,51,112,66,79,38,88,40,65,36,94],t=String.fromCodePoint,n=t.apply(String,p);t.apply(String,s);t.apply(String,c);function l(){return globalThis.location.hostname==="localhost"||globalThis.location.hostname==="127.0.0.1"||globalThis.location.hostname===""}function r(o){let e=o;if(e!=null&&typeof e.getAppInfo=="function"&&typeof e.getKey=="function")return e}function m(){let{name:o=""}=b.getUserAgentInfo().getBrowser();return o==="Electron"&&typeof r(window[n])=="object"&&l()}async function y(){var o;return (o=r(window[n]))==null?void 0:o.getAppInfo()}async function A(o){var e;return (e=r(window[n]))==null?void 0:e.getKey(o)}export{m as a,y as b,A as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$4}from'./chunk-DN32UPQC.js';import {a as a$8}from'./chunk-DZKTI5AJ.js';import {a as a$9}from'./chunk-G2BRTVN7.js';import {c as c$1,a as a$a}from'./chunk-4W2T3TLN.js';import {c}from'./chunk-UWLAKRB2.js';import {a as a$1}from'./chunk-CAUB35PV.js';import {a as a$2}from'./chunk-QIWPWOQG.js';import {a}from'./chunk-GQ7A6533.js';import {a as a$6}from'./chunk-7JVAQ2A3.js';import {d}from'./chunk-AIC4H5KG.js';import {a as a$5}from'./chunk-O7TZTIHO.js';import {a as a$3}from'./chunk-XR65N6EG.js';import {a as a$7}from'./chunk-QCZSSQAQ.js';var P=class P{constructor(e,t){this.hintPresenterV2=null;this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL=5;this.redrawInterval=1e3/30;this.redrawRequests=[];this._isDrawLoopRunning=false;this.frameDataPool=new Map;this.lastFrameColorType="RGBA";this.lastFrameId=null;this.poorMansBenchmarkLogs=false;this.writableDataPathStandard="/scandit_sync_folder";this.resourceFilesSubfolder="resources";this.performanceMetricsReporterTimer=void 0;this.lastMetricsReportTime=0;this.metricsReportInterval=1e3;this.performanceMetrics={frameDataPoolSize:0,cameraOutputFrames:0,redrawRequestsCount:0,actualRedrawsCount:0,frameProcessingStartedCount:0,frameProcessedCount:0,frameSkippedCount:0};this.frameProcessingStartedCount=0;this.frameProcessingFinishedCount=0;this.gestureListener=null;this.webPlatformHintPresenter=null;this.deviceInstance=null;this.deviceInfo=null;this.lastViewInfo=new a(null);this.lastFrameProcessingStartedCount=0;this.lastFrameProcessingFinishedCount=0;this.moduleHandler=e,this.workerFunctions=t,this._loadProgressCallback=this._loadProgressCallback.bind(this),c(this.getWasmMetadata());}get Module(){return this.moduleHandler.get()}set isDrawLoopRunning(e){this._isDrawLoopRunning=e,!e&&typeof this.loopTimeoutId=="number"&&(clearTimeout(this.loopTimeoutId),this.loopTimeoutId=void 0);}get isDrawLoopRunning(){return this._isDrawLoopRunning}prepareFrameForListener(e){let t=this.lastFrameId;if(this.frameDataPool.size>=this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL){let l=this.frameDataPool.keys().next().value;l!=null&&this.frameDataPool.delete(l);}let r=e.getFrameData(),i=new Uint8ClampedArray(r);this.frameDataPool.set(t,{data:i,colorType:this.lastFrameColorType,frameId:t,width:e.getWidth(),height:e.getHeight()});let n=this.lastUsedModuleMirrorAxis==null?false:this.lastUsedModuleMirrorAxis!==this.Module.Axis.None;return {frameId:t,width:e.getWidth(),height:e.getHeight(),isFrameSourceMirrored:n,colorType:this.lastFrameColorType}}createContext(e){var f,m,C,b,y;let t=this.getModeDeserializers(),r=c$1(location);(r==="localhost"||r==="127.0.0.1")&&navigator.userAgent.includes("Electron")&&e.appName!=null&&(r+=`-${e.appName}`),this.parentDomain=e.parentDomain,this.contextDeserializer=new this.Module.DataCaptureContextDeserializer(this.writableDataPath,e.deviceId,e.context.deviceModelName,r,this.parentDomain,t,e.delayedRegistration,e.highEndBlurryRecognition,this.resourcePath);let i=this.contextDeserializer.contextFromJson(JSON.stringify(e.context));if(i==null){let a=this.contextDeserializer.getLastError();throw new Error(`Could not create the context: ${a}`)}let n=i.getView();this.context=i.getContext(),i.delete(),this.setupDeviceInterface(e.isTablet,e.batteryInfo);let l=this.Module.DataCaptureContextListener.extend("DataCaptureContextListener",{didChangeStatus:(a,o)=>{this.contextDidChangeStatus(JSON.parse(o.toJson())),a.delete();},didStartObservingContext:a=>{this.didStartObservingContext(),a.delete();},didStopObservingContext:a=>{a.delete();}}),c=this.Module.DataCaptureContextFrameListener.extend("DataCaptureContextFrameListener",{onObservationStarted:a=>{a.delete();},onObservationStopped:a=>{a.delete();},onFrameProcessingStarted:(a,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingStarted"}),o.delete(),a.delete();},onFrameProcessingFinished:(a,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingFinished"}),o.delete(),a.delete();},onFrameSkipped:(a,o)=>{this.workerFunctions.postMessage({type:"onFrameSkipped"}),o.delete(),a.delete();}}),h=this.Module.GestureRecognizer.extend("GestureRecognizer",{setGestureListener:(a,o)=>{var w;(w=this.gestureListener)==null||w.delete(),this.gestureListener=a.clone(),a.delete();}});(f=this.gestureRecognizer)==null||f.delete(),this.gestureRecognizer=new h;let g=new l;this.context.addListener(g),g.delete();let u=new c;this.context.addFrameListener(u),u.delete(),this.setView(n),(m=this.view)==null||m.setGestureRecognizer(this.gestureRecognizer);let p=this.Module.PlatformHintPresenter.extend("PlatformHintPresenter",{setHintPresenter:a=>{a.delete();},showToast:a=>{this.workerFunctions.postMessage({type:"showToast",payload:JSON.parse(a)});},hideToast:a=>{this.workerFunctions.postMessage({type:"hideToast",payload:JSON.parse(a)});},showGuidance:a=>{this.workerFunctions.postMessage({type:"showGuidance",payload:JSON.parse(a)});},hideGuidance:a=>{this.workerFunctions.postMessage({type:"hideGuidance",payload:JSON.parse(a)});},startUpdateTimer:a=>{this.workerFunctions.postMessage({type:"startUpdateTimer",payload:{duration:{unit:"ms",value:a}}});},stopUpdateTimer:()=>{this.workerFunctions.postMessage({type:"stopUpdateTimer"});}});(C=this.hintPresenterV2)==null||C.delete(),this.hintPresenterV2=null,(b=this.webPlatformHintPresenter)==null||b.delete(),this.webPlatformHintPresenter=null,this.webPlatformHintPresenter=new p,this.view&&(this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter),(y=this.view)==null||y.setHintPresenterV2(this.hintPresenterV2)),this.webImageConverterInstance=this.getImageConverterInstance({quality:1}),this.Module.ImageConverter.setInstance(this.webImageConverterInstance);}convertToJPEGResult(e,t){this.webImageConverterInstance instanceof a$1&&this.webImageConverterInstance.onConvertToJPEGResult(e,t);}getImageConverterInstance(e){return this.workerFunctions.getOffscreenCanvas()!=null?new a$2(e):new a$1(this.workerFunctions,e)}onTap(e){var t;(t=this.gestureListener)==null||t.onTap(JSON.stringify(e));}hintPresenterV2Update(){var e;(e=this.hintPresenterV2)==null||e.update();}startReportingPerformanceMetrics(){this.performanceMetricsReporterTimer==null&&(this.lastMetricsReportTime=performance.now(),this.scheduleMetricsReporting());}scheduleMetricsReporting(){this.performanceMetricsReporterTimer=setTimeout(()=>{this.checkAndReportMetrics();},100);}checkAndReportMetrics(){let e=performance.now();e-this.lastMetricsReportTime>=this.metricsReportInterval&&(this.reportPerformanceMetrics(),this.performanceMetrics.cameraOutputFrames=0,this.performanceMetrics.redrawRequestsCount=0,this.performanceMetrics.actualRedrawsCount=0,this.lastMetricsReportTime=e),this._isDrawLoopRunning&&this.scheduleMetricsReporting();}async reportPerformanceMetrics(){let e=this.frameProcessingStartedCount-this.lastFrameProcessingStartedCount,r=this.frameProcessingFinishedCount-this.lastFrameProcessingFinishedCount;this.lastFrameProcessingStartedCount=this.frameProcessingStartedCount,this.lastFrameProcessingFinishedCount=this.frameProcessingFinishedCount;let i={cameraOutputFrames:this.performanceMetrics.cameraOutputFrames,redrawRequestsCount:this.performanceMetrics.redrawRequestsCount,actualRedrawsCount:this.performanceMetrics.actualRedrawsCount,frameDataPoolSize:this.performanceMetrics.frameDataPoolSize,frameProcessingStartedCount:e,frameProcessedCount:r,frameSkippedCount:this.performanceMetrics.frameSkippedCount};this.workerFunctions.postMessage({type:"performanceMetricsReport",payload:i});}deleteFrameData(e){this.frameDataPool.delete(e);}dispose(){var e,t,r,i,n;this.context.dispose(),this.frameDataPool.clear(),this.isDrawLoopRunning=false,this.cleanupMetricsReporting(),(e=this.gestureRecognizer)==null||e.delete(),this.gestureRecognizer=null,(t=this.gestureListener)==null||t.delete(),this.gestureListener=null,(r=this.hintPresenterV2)==null||r.delete(),this.hintPresenterV2=null,(i=this.webPlatformHintPresenter)==null||i.delete(),this.webPlatformHintPresenter=null,(n=this.deviceInstance)==null||n.delete(),this.deviceInstance=null,this.deviceInfo=null;}cleanupMetricsReporting(){this.performanceMetricsReporterTimer!=null&&(typeof this.performanceMetricsReporterTimer=="number"?cancelAnimationFrame(this.performanceMetricsReporterTimer):clearTimeout(this.performanceMetricsReporterTimer),this.performanceMetricsReporterTimer=void 0);}flushAnalytics(){this.context.flushAnalytics();}extractCentaurusLicense(e){return {payload:{centaurus:{licenseKey:this.Module.LicenseUtils[P.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 n;if(this.context==null)return a$3.debug("[processFrame] Context is null, returning frame without processing"),{payload:e,transferables:[e.data.buffer]};this.lastFrameId=e.frameId;let t=e.data,r=e.colorType==="GRAYSCALE"?this.Module.ImageBufferFormat.Grayscale8:this.Module.ImageBufferFormat.Rgba8888;this.lastFrameColorType=e.colorType==="GRAYSCALE"?"GRAYSCALE":"RGBA";let i=this.Module.allocateUint8Array(t.byteLength);return this.Module.HEAPU8.set(t,i),(n=this.imageFrameSource)==null||n.outputFrame(i,e.width,e.height,r),{payload:e,transferables:[e.data.buffer]}}reportCameraProperties(e){this.context.setCameraProperties(e.deviceId,e.isFrontFacing,e.hasAutofocus);}requestFrameData(e){let t=this.frameDataPool.get(e);if(t==null)return {payload:{data:null,frameId:null,colorType:null}};if(t.data.buffer.byteLength===0)return this.frameDataPool.delete(e),{payload:{data:null,frameId:null,colorType:null}};let r=t.data;t.colorType==="GRAYSCALE"&&(r=a$4(t.data,t.width,t.height));let i={payload:{data:r,frameId:t.frameId,colorType:t.colorType},transferables:[r.buffer]};return this.frameDataPool.delete(e),i}scheduleRedraw(e,t){this.addRedrawRequest(t),this.isDrawLoopRunning||this.startDrawLoop(e);}sendViewRefreshCommands(e){this.workerFunctions.postMessage({type:"draw",payload:e},[e.buffer]);}setFrameSource(e,t){var r;this.lastUsedModuleMirrorAxis=this.mapMirrorAxisOnModule(e),(r=this.imageFrameSource)==null||r.delete(),this.imageFrameSource=new this.Module.ImageBufferFrameSource(this.lastUsedModuleMirrorAxis,t,0),this.context.setFrameSource(this.imageFrameSource);}startDrawLoop(e){this.isDrawLoopRunning=true;let t=n=>this.redrawRequests.length>0&&this.redrawRequests[0]<=n,r=n=>{for(;this.redrawRequests.length>0&&this.redrawRequests[0]<=n;)this.redrawRequests.shift();},i=()=>{this.loopTimeoutId=setTimeout(()=>{if(!this.isDrawLoopRunning)return;let n=performance.now();if(t(n)){r(n),e.draw();let l=e.getDrawCommands();this.sendViewRefreshCommands(new Uint8Array(l));}i();},this.redrawInterval);};i();}updateContext(e){if(this.context!=null&&this.contextDeserializer!=null){e.view!=null&&!e.view.visible&&this.context.flushAnalytics();let t=this.onBeforeUpdateContextHook(e),r=this.contextDeserializer.updateContextFromJson(this.context,this.view,JSON.stringify(t.context));if(r==null){let n=this.contextDeserializer.getLastError();throw new Error(`Could not update the context: ${n}`)}this.context.delete(),this.context=r.getContext();let i=r.getView();r.delete(),i!=null&&t.view!=null&&(i.setViewSize(t.view.width,t.view.height,t.view.orientation),i.draw()),!this.hintPresenterV2&&this.webPlatformHintPresenter&&(this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter)),i!=null&&this.hintPresenterV2&&i.setHintPresenterV2(this.hintPresenterV2),this.gestureRecognizer!=null&&(i==null||i.setGestureRecognizer(this.gestureRecognizer)),this.setView(i),this.notifyMainThreadOnViewInfoChanged(i),a$3.debug("context updated",t);}}notifyMainThreadOnViewInfoChanged(e){let t=this.getViewInfo(e);this.lastViewInfo.isSame(t)||(this.lastViewInfo.update(t),this.workerFunctions.postMessage({type:"viewSizeChanged",payload:t}));}getViewInfo(e){if(e!=null)try{let t=JSON.parse(e.getViewInfo());if(t!=null){let r=this.getOrientationFromNumber(t.orientation);return {...t,orientation:r}}}catch(t){a$3.error("Failed to get view size",t);}return null}getOrientationFromNumber(e){switch(e){case 90:return "landscapeRight";case 180:return "portraitUpsideDown";case 270:return "landscapeLeft";default:return "portrait"}}onBeforeUpdateContextHook(e){return e}onDocumentVisibilityChange(e){e==="hidden"&&this.context.flushAnalytics();}isFeatureSupported(e){return {payload:{supported:this.context.isFeatureSupported(e)}}}getViewfinderInfo(){var e,t;return {payload:{isDisplayingViewfinder:(t=(e=this.view)==null?void 0:e.isDisplayingViewfinder())!=null?t:false,rect:JSON.parse(this.view.getViewfinderRect())}}}getOpenSourceSoftwareLicenseInfo(){return {payload:{licenseText:this.Module.OpenSourceSoftwareLicenseInfo.getLicenseText()}}}getWasmDynamicLibraries(e){return this.getWasmSideModuleFileName()==null?[]:[`${e.replace(/\/[^/]*$/,"/")}${this.getWasmSideModuleFileName()}`]}getWasmCoreExpectedHash(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_HASH:globalThis.SDC_WASM_CORE_MT_HASH:e?globalThis.SDC_WASM_CORE_SIMD_HASH:""}getWasmCoreFileName(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_FILE_NAME:globalThis.SDC_WASM_CORE_MT_FILE_NAME:e?globalThis.SDC_WASM_CORE_SIMD_FILE_NAME:""}getWasmMetadata(){return globalThis.WASM_METADATA}getWasmSideModuleFileName(){return ""}_loadProgressCallback(e){this.workerFunctions.postMessage({type:"loadLibraryProgress",payload:e});}addRedrawRequest(e){this.redrawRequests.push(Math.round(performance.now())+e),this.redrawRequests.sort((t,r)=>t-r);}contextDidChangeStatus(e){e.code===260?e.message=e.message.replace("domain name",`domain name (${c$1(location)})`):e.code===265&&(e.message=e.message.replace("domain name",`domain name (${this.parentDomain})`)),this.workerFunctions.postMessage({type:"contextDidChangeStatus",payload:e});}didStartObservingContext(){this.workerFunctions.postMessage({type:"didStartObservingContext"});}mapMirrorAxisOnModule(e){switch(e){case "None":return this.Module.Axis.None;case "X":return this.Module.Axis.X;case "Y":return this.Module.Axis.Y;default:return this.Module.Axis.None}}setView(e){this.view=e,this.setViewRefreshHandler(e),e==null&&(this.isDrawLoopRunning=false,this.sendViewRefreshCommands(new Uint8Array([])));}addNativeOverlay(e){a$3.warn("addNativeOverlay has not been implemented for this module",e);}removeNativeOverlay(e){a$3.warn("removeNativeOverlay has not been implemented for this module",e);}setViewRefreshHandler(e){if(e==null||e.isViewRefreshHandlerSet)return;let t=this.Module.NeedsRedrawDelegate.extend("NeedsRedrawDelegate",{setNeedsRedrawIn:this.scheduleRedraw.bind(this,e)}),r=new t;e.setNeedsRedrawDelegate(r),e.isViewRefreshHandlerSet=true;}setupDataDecoding(){let e=this.moduleHandler.get(),t=e.DataDecoding.extend("DataDecoding",{decode(r,i){try{let n=JSON.parse(i),l=[];for(let c of n){let h=new TextDecoder(c.ianaName,{fatal:true});l.push(h.decode(r.slice(c.startIndex,c.endIndex)));}return l.join("")}catch{return ""}}});e.setDataDecoding(new t);}getBatteryData(){var t,r;let e=(r=(t=this.deviceInfo)==null?void 0:t.batteryInfo)==null?void 0:r.percentage;if(e!=null)return {percentage:e}}isTablet(){var e,t;return (t=(e=this.deviceInfo)==null?void 0:e.isTablet)!=null?t:false}setupDeviceInterface(e,t){this.deviceInfo={isTablet:e,batteryInfo:t};let r=this.moduleHandler.get(),i=r.DeviceInterface.extend("DeviceInterface",{getBatteryData:this.getBatteryData.bind(this),isTablet:this.isTablet.bind(this)});this.deviceInstance=new i,r.DeviceHolder.setCurrentDevice(this.deviceInstance);}updateBatteryInfo(e){this.deviceInfo&&(this.deviceInfo.batteryInfo=e);}start(e,t,r){e&&t&&(this.setupDataDecoding(),this.moduleHandler.get().callMain(),this.moduleHandler.get().__emscripten_proxy_main!==void 0||r());}getWritableDataPath(e){return e!=null?(a$3.debug(`IndexedDB database name override in use to recover from blocked standard database: ${e}`),e):this.writableDataPathStandard}numOfMBToPages(e){return Math.ceil(1024*e*1024/64/1024)}async setup({libraryLocation:e,locationPath:t,writableDataPathOverride:r,indexedDBTimeoutMs:i,verifyResponseHash:n,referredOrigin:l,fixedWasmMemory:c,simdSupport:h,threadsSupport:g}){var v;let u=false,p=false;this.writableDataPath=this.getWritableDataPath(r),this.resourcePath=`${e}${this.resourceFilesSubfolder}/`,globalThis.path=t;let{resolve:f,reject:m,promise:C}=new a$5,b=a$6.sdkVersion();if(b==="")throw new a$7({name:"Invalid library version",message:"Library version is not defined or empty, cannot generate proper path to library files."});let y=this.getWasmCoreFileName(h,g),a=d(b,e,y),{jsURI:o,wasmURI:w}=a,W={instantiateWasm:(d,H)=>(a$a({importObject:d,wasmURI:w,expectedHash:this.getWasmCoreExpectedHash(h,g),verifyResponseHash:n,successCallback:H,progressCallback:this._loadProgressCallback,errorCallback:N=>{m(N);},referredOrigin:l}),{})},M=c===null?null:new WebAssembly.Memory({initial:this.numOfMBToPages(c),maximum:this.numOfMBToPages(300),shared:g});return M!==null&&a$3.log(a$3.Level.Debug,"Fixed wasmMemory set",M),this.moduleHandler.set({...M?{wasmMemory:M}:{},mainScriptUrlOrBlob:o,canvas:(v=this.workerFunctions.getOffscreenCanvas())!=null?v:{getContext:()=>null},...W,dynamicLibraries:this.getWasmDynamicLibraries(w),locateFile:d=>e+d,noInitialRun:true,preRun:[async()=>{try{await a$8({writableDataPath:this.writableDataPath,indexedDBTimeoutMs:i});}catch(d){if(d.name==="BlockedIndexedDB"){m(d.toString());return}a$3.log(a$3.Level.Debug,"No IndexedDB support, some data will not be persisted:",d);}p=true,this.start(p,u,f);}],onMainComplete:()=>{if([u,p].includes(false)){a$3.log(a$3.Level.Warn,{runtimeLoaded:u,fileSystemSynced:p},"Both runtimeLoaded and fileSystemSynced should be true when calling onMainComplete"),m("onMainComplete has been called but runtime or file system was not ready.");return}f();},onRuntimeInitialized:()=>{u=true,this.start(p,u,f);},print:d=>{a$3.info(d);}}),await a$9(o,b)||m(`Couldn't retrieve Scandit Data Capture library at ${o}, did you configure the path for it correctly?`),C}};P.get3dPartyLicenseKeyMethodName=atob("Z2V0QmxpbmtJZExpY2Vuc2VLZXk=");var V=P;export{V as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-33ZWDLU7.js';import {a as a$2}from'./chunk-UWBNF47P.js';import {a as a$1}from'./chunk-3A4KLILV.js';var t=class t extends a{static create(){return document.createElement(t.tag)}static register(){a$1({[t.tag]:t});}render(){return a$2`<style>${t.tag}{display:flex}${t.tag}[shadow] svg{filter:drop-shadow(0px 1px 2px rgba(18, 22, 25, .3))}</style><svg width="${this.size}" height="${this.heightForViewbox(32,32)}" viewBox="0 0 32 32" fill="none"><path d="M12.9997 28C12.8536 27.9995 12.7094 27.9669 12.5773 27.9046C12.4451 27.8422 12.3283 27.7517 12.235 27.6393C12.1416 27.5269 12.0741 27.3954 12.0371 27.2541C12.0002 27.1127 11.9947 26.965 12.021 26.8213L13.8077 16.9987H9.00765C8.85299 17.0003 8.70007 16.9659 8.56102 16.8981C8.42197 16.8304 8.3006 16.7312 8.20654 16.6084C8.11248 16.4856 8.0483 16.3426 8.01911 16.1907C7.98991 16.0388 7.99649 15.8822 8.03832 15.7333L9.61432 9.95733L7.29299 7.63733C7.10539 7.44974 7 7.1953 7 6.93C7 6.6647 7.10539 6.41026 7.29299 6.22267C7.48058 6.03507 7.73502 5.92968 8.00032 5.92968C8.26562 5.92968 8.52006 6.03507 8.70765 6.22267L24.2637 21.7773C24.3619 21.8689 24.4407 21.9793 24.4954 22.1019C24.55 22.2246 24.5794 22.357 24.5818 22.4913C24.5841 22.6256 24.5594 22.7589 24.5092 22.8835C24.4589 23.008 24.384 23.1211 24.289 23.2161C24.1941 23.311 24.081 23.3859 23.9565 23.4362C23.8319 23.4865 23.6986 23.5112 23.5643 23.5088C23.43 23.5064 23.2976 23.477 23.1749 23.4224C23.0523 23.3677 22.9419 23.2889 22.8503 23.1907L19.1863 19.528L13.8357 27.5533C13.7442 27.6912 13.6199 27.8042 13.474 27.8822C13.3281 27.9601 13.1651 28.0006 12.9997 28ZM21.4503 16.1333L10.829 5.512L11.041 4.73867C11.0984 4.5266 11.2241 4.33934 11.3985 4.20583C11.573 4.07232 11.7866 3.99998 12.0063 4H18.9997C19.1547 4.00132 19.3073 4.03804 19.446 4.10737C19.5846 4.17669 19.7056 4.27678 19.7997 4.4C19.893 4.52382 19.9564 4.66766 19.9846 4.82015C20.0128 4.97265 20.0052 5.12962 19.9623 5.27867L18.333 11H22.9997C23.1807 11.0003 23.3583 11.0496 23.5136 11.1427C23.6689 11.2357 23.7961 11.3691 23.8817 11.5287C23.9673 11.6883 24.0081 11.868 23.9998 12.0489C23.9914 12.2298 23.9342 12.405 23.8343 12.556L21.453 16.1333H21.4503Z" fill="${this.fill}"/></svg>`}};t.tag="scandit-torch-off-icon";var o=t;export{o as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-YONR3EGV.js';import {a}from'./chunk-XR65N6EG.js';async function c(l){if(!b.isAnimationApiSupported()||l)try{l?a.debug("Force loading animation polyfill as requested."):a.debug("Web Animation API not fully supported, you might need to add https://www.npmjs.com/package/web-animations-js polyfill to see some animations.");let{polyfill:o}=await import('../private/utils/AnimationSimplePolyfill.js');o();}catch(o){a.warn("Error importing AnimationSimplePolyfill.js, the Animation API will not be polyfilled. This is not a problem for most browsers, but it might be a problem for older browsers like Chrome 75<",o);}}async function d(l){if(typeof globalThis.structuredClone!="function"||l)try{l?a.debug("Force loading structuredClone polyfill as requested."):a.debug("structuredClone API not supported, loading polyfill for older browsers.");let{structuredClonePolyfill:o}=await import('../private/utils/structuredClonePolyfill.js');o();}catch(o){a.warn("Error importing structuredClonePolyfill.js, the structuredClone API will not be polyfilled. This might cause issues in older browsers.",o);}}async function u(l){if(!(typeof globalThis<"u"&&"cookieStore"in globalThis&&globalThis.cookieStore!=null&&!l))try{l?a.debug("Force loading CookieStore polyfill as requested."):a.debug("CookieStore API not supported, loading polyfill for older browsers.");let{installCookieStorePolyfill:o}=await import('../private/utils/cookieStorePolyfill.js');o();}catch(o){a.warn("Error importing cookieStorePolyfill.js, the CookieStore API will not be polyfilled. This might cause issues with cookie management in older browsers.",o);}}async function y(l={}){let{forceAnimationPolyfill:o=false,forceStructuredClonePolyfill:t=false,forceCookieStorePolyfill:n=false,forceAllPolyfills:i=false}=l,s=i||o,a=i||t,f=i||n;await Promise.all([c(s),d(a),u(f)]);}
|
|
2
2
|
export{y as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {e}from'./chunk-
|
|
1
|
+
import {e}from'./chunk-E7IMQECS.js';import {a as a$1}from'./chunk-XR65N6EG.js';import {a}from'./chunk-QCZSSQAQ.js';var m=class i{constructor(){this.type="imageFrameSource";this._listeners=new Set;this._currentState="off";this._desiredState="off";this._context=null;this._imageData=null;}get desiredState(){return this._desiredState}get context(){return this._context}set context(e){this._context=e;}get currentState(){return this._currentState}static async fromFile(e){let r=URL.createObjectURL(e),t=new Image;t.src=r;try{await t.decode();}catch{throw new a({name:"InvalidImageError",message:"Submitted file is not an image"})}finally{URL.revokeObjectURL(r);}return i.fromImage(t)}static async fromImage(e){let r=new i;try{await e.decode();}catch{throw new a({name:"InvalidImageError",message:"Submitted image cannot be decoded"})}let t=r.getCanvasAndContext(e.width,e.height);return t.drawImage(e,0,0),r._imageData=t.getImageData(0,0,e.width,e.height,{colorSpace:"srgb"}),r}static async fromImageData(e){let r=new i,t=r.getCanvasAndContext(e.width,e.height);try{t.putImageData(e,0,0);}catch(n){throw new a({name:"InvalidImageError",message:`Submitted image data does not seem valid (details: ${n})`})}return r._imageData=e,r}async switchToDesiredState(e){if(e==="on"){if(this.currentState==="on")return}else if(this.currentState==="off")return;if(this._desiredState=e,e==="off"){await this.setCurrentState("off");return}return this._imageData==null?(a$1.log(a$1.Level.Warn,"No image data to process."),this.processSubmittedImage({data:new Uint8ClampedArray(0),width:0,height:0,colorSpace:"srgb"})):this.processSubmittedImage(this._imageData)}addListener(e){e!=null&&this._listeners.add(e);}removeListener(e){e!=null&&this._listeners.delete(e);}toJSONObject(){return {type:this.type}}getCurrentState(){return this._currentState}getCanvasAndContext(e,r){let t=document.createElement("canvas");t.width=e,t.height=r;let n=t.getContext("2d");if(n==null)throw new a({name:"ImageFrameSourceError",message:"Could not generate a canvas context to get image data"});return n}async setCurrentState(e){if(e!==this._currentState)return this._currentState=e,this.notifyListeners(),this.notifyContext({type:"frameSourceState",newValue:e})}async notifyContext(e){if(this._context)return this._context.update([e])}notifyListeners(){for(let e of this._listeners)e.didChangeState&&e.didChangeState(this,this.currentState);}async processSubmittedImage(e$1){var t;await this.setCurrentState("on");let r={data:e$1.data,width:e$1.width,height:e$1.height,frameId:e()};await((t=this._context)==null?void 0:t.sendFrameToProcessor(r)),await this.setCurrentState("off");}};export{m as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-R6E4CT22.js';import {b}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-R6E4CT22.js';import {b}from'./chunk-YONR3EGV.js';import {a as a$1}from'./chunk-XR65N6EG.js';var d="orientationchange",n={"portrait-primary":{type:"portrait-primary",angle:0,value:"portrait"},"portrait-secondary":{type:"portrait-secondary",angle:180,value:"portraitUpsideDown"},"landscape-primary":{type:"landscape-primary",angle:90,value:"landscapeLeft"},"landscape-secondary":{type:"landscape-secondary",angle:270,value:"landscapeRight"}},l=class extends EventTarget{constructor(){super(...arguments);this.orientation={value:"portrait",type:"portrait-primary",angle:0};this._landscapeOrientationMediaQuery=null;this.screenOrientationChangeListener=this.onScreenOrientationChange.bind(this);this.landscapeOrientationMediaQueryChangeListener=this.onLandscapeOrientationMediaQueryChange.bind(this);this.windowResizeListener=a(this.handleWindowResize.bind(this),700);this.lastWidth=null;this.lastHeight=null;}get landscapeOrientationMediaQuery(){return this._landscapeOrientationMediaQuery===null&&(this._landscapeOrientationMediaQuery=globalThis.matchMedia("(orientation: landscape)")),this._landscapeOrientationMediaQuery}get isIosPwaMode(){return b.isIOS()&&(b.isPwaDisplayMode("standalone")||b.isPwaDisplayMode("fullscreen")||b.isPwaDisplayMode("minimal-ui"))}register(){var e,i;this.isScreenOrientationApiSupported()&&!this.isIosPwaMode?(screen.orientation.addEventListener("change",this.screenOrientationChangeListener),this.onScreenOrientationChange()):this.isIosPwaMode?((e=globalThis.addEventListener)==null||e.call(globalThis,"resize",this.windowResizeListener),this.handleWindowResize()):((i=this.landscapeOrientationMediaQuery)==null||i.addEventListener("change",this.landscapeOrientationMediaQueryChangeListener),this.onLandscapeOrientationMediaQueryChange(new MediaQueryListEvent("change",{matches:this.landscapeOrientationMediaQuery.matches})));}unregister(){globalThis.removeEventListener("resize",this.windowResizeListener),this.isScreenOrientationApiSupported()&&screen.orientation.removeEventListener("change",this.screenOrientationChangeListener),this.landscapeOrientationMediaQuery.removeEventListener("change",this.landscapeOrientationMediaQueryChangeListener);}isScreenOrientationApiSupported(){return "screen"in globalThis&&"orientation"in screen&&typeof screen.orientation.addEventListener=="function"}dispatchOrientationChangeEvent(e){this.dispatchEvent(new CustomEvent(d,{detail:e}));}onScreenOrientationChange(){this.orientation=n[screen.orientation.type],this.dispatchOrientationChangeEvent(this.orientation);}onLandscapeOrientationMediaQueryChange(e){let i=e;this.orientation=i.matches?n["landscape-primary"]:n["portrait-primary"],this.dispatchOrientationChangeEvent(this.orientation);}handleWindowResize(){let e=globalThis.innerWidth,i=globalThis.innerHeight,r=this.lastWidth===null||this.lastHeight===null;if(!r&&e===this.lastWidth&&i===this.lastHeight)return;let a=e>i?n["landscape-primary"]:n["portrait-primary"];(r||this.orientation.value!==a.value)&&(a$1.debug("OrientationObserver: dispatching orientation change event",{newOrientation:a,currentOrientation:this.orientation}),this.orientation=a,this.dispatchOrientationChangeEvent(this.orientation)),this.lastWidth=e,this.lastHeight=i;}};export{d as a,l as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b as b$1}from'./chunk-
|
|
1
|
+
import {b as b$1}from'./chunk-XVH5A2QH.js';import {a as a$5}from'./chunk-2SGKGZ6F.js';import {a as a$6}from'./chunk-2LSO6JEZ.js';import {a as a$2}from'./chunk-UWBNF47P.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$4}from'./chunk-3A4KLILV.js';import {a as a$3}from'./chunk-LSZZVJ6B.js';var s="--view-finder-top",d="--view-finder-bottom",c="--hint-anchor-offset",T="--max-width-fraction",w="--horizontal-margin",f="--max-width-ratio-adjust",b=(t=>(t.Update="hintpresenterupdate",t.ViewFinderUpdateRequested="hintpresenterviewfinderupdaterequested",t))(b||{});function S(l,h=100){return typeof l=="string"?l.slice(0,h):""}var a=class a extends a$1{constructor(){super();this.onDidToastHideHandler=this.onDidToastHide.bind(this);let t=this.attachShadow({mode:"open"});t.innerHTML=a$2`<div id="root"><slot></slot></div>`,t.append(a.createStyleElement().cloneNode(true)),this.root=t.querySelector("#root");}static createStyleElement(){return a$3`:host{pointer-events:none}:host #root{inset:0;position:absolute;width:100%;${s}:0;${d}:0;${f}:1;z-index:1}::slotted(${b$1.tag}){left:50%;max-width:calc(var(${T})*var(${f})*100% - var(${w}));position:absolute;transform:translate(-50%);width:100%}::slotted(${b$1.tag}.${"aboveViewFinder"}){transform:translate(-50%,calc(-100% + var(${s}) - var(${c})))}::slotted(${b$1.tag}.${"belowViewFinder"}){transform:translate(-50%,calc(var(${d}) + var(${c})))}::slotted(${b$1.tag}.${"top"}){top:calc(var(${c}))}::slotted(${b$1.tag}.${"center"}){top:50%;transform:translate(-50%,-50%)}::slotted(${b$1.tag}.fitToText){width:fit-content}`}static register(){a$4({[a.tag]:a});}static create(){return a.register(),document.createElement(a.tag)}connectedCallback(){this.addEventListener("didhide",this.onDidToastHideHandler),this._viewFinderRect==null&&(this.root.style.setProperty(s,`${this.root.clientHeight/2}px`),this.root.style.setProperty(d,`${this.root.clientHeight/2+1}px`));}disconnectedCallback(){this.removeEventListener("didhide",this.onDidToastHideHandler);}setViewFinderRect(t){if(t===null){this.root.style.removeProperty(s),this.root.style.removeProperty(d);return}this._viewFinderRect=t;let{origin:{y:e},size:{height:i}}=this._viewFinderRect;this.root.style.setProperty(s,`${e}px`),this.root.style.setProperty(d,`${e+i}px`);}async handleMessage(t){let{type:e}=t;switch(e){case "showToast":{await this.showToast(t.payload);break}case "hideToast":{await this.hideToast(t.payload);break}case "showGuidance":{await this.showGuidance(t.payload);break}case "hideGuidance":{await this.hideGuidance(t.payload);break}case "startUpdateTimer":{this.startUpdateTimer(t.payload.duration.value);break}case "stopUpdateTimer":{this.stopUpdateTimer();break}}}setHintStyleToToast(t,e){t.textContent=e.text,t.hintStyle=e.hintStyle,t.className="",t.style.setProperty(c,`${t.hintStyle.hintAnchorOffset/16}rem`),t.style.setProperty(T,e.hintStyle.maxWidthFraction.toString()),t.style.setProperty(w,`${e.hintStyle.horizontalMargin/16}rem`),t.classList.add(e.hintStyle.hintAnchor),t.classList.toggle("fitToText",e.hintStyle.fitToText);}onDidToastHide(t){t.stopPropagation(),t.detail.target.remove();}getToastElementFromIdOrTag({id:t,tag:e}){var i;return (i=this.querySelector(`[data-id="${t}"]`))!=null?i:this.querySelector(`[data-tag="${e}"]`)}async showToast(t){var r;this.ensureViewFinderRectIsSet();let e=this.idFromHint(t),i=this.getToastElementFromIdOrTag({id:e,tag:(r=t.tag)!=null?r:""});if(i||(i=b$1.create(),i.dataset.id=e,t.tag!==""&&(i.dataset.tag=t.tag),this.append(i)),this.setHintStyleToToast(i,t),t.tag==="MoveCloserGuidance"){let n=a$5.create();n.setAttribute("slot","first-child"),i.append(n),i.setAttribute("direction","column");}return i.show()}showToastWithCustomIcon(t,e){var n;let i=this.idFromHint(t),r=this.getToastElementFromIdOrTag({id:i,tag:(n=t.tag)!=null?n:""});return r||(r=b$1.create(),r.dataset.id=i,t.tag!==""&&(r.dataset.tag=t.tag),this.append(r)),r.customIcon=e,this.setHintStyleToToast(r,t),r.show()}async hideToast(t){var i;let e=this.getToastElementFromIdOrTag({id:this.idFromHint(t),tag:(i=t.tag)!=null?i:""});return e==null?void 0:e.hide()}async showGuidance(t){return this.showToast(t)}async hideGuidance(t){return this.hideToast(t)}startUpdateTimer(t){this.intervalId=setInterval(()=>{this.dispatchEvent(new CustomEvent("hintpresenterupdate"));},t);}stopUpdateTimer(){clearInterval(this.intervalId);}ensureViewFinderRectIsSet(){(this._viewFinderRect==null||this._viewFinderRect.origin.x===0&&this._viewFinderRect.origin.y===0)&&this.dispatchEvent(new CustomEvent("hintpresenterviewfinderupdaterequested"));}idFromHint(t){var e;return a$6([t.hintStyle.textColor,t.hintStyle.backgroundColor,t.hintStyle.hintAnchor,(e=t.tag)!=null?e:"",S(t.text,30),t.hintStyle.textAlignment],"hint")}};a.tag="scandit-hints";var H=a;export{b as a,H as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-33ZWDLU7.js';import {a as a$2}from'./chunk-UWBNF47P.js';import {a as a$1}from'./chunk-3A4KLILV.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`<style>${e.tag}{display:flex}</style><svg width="${this.size}" height="${this.heightForViewbox(32,32)}" viewBox="0 0 32 32" fill="none"><rect opacity="0.5" width="32" height="32" rx="16" fill="white"/><path d="M12.2881 21.1436C12.8965 21.1436 13.3066 20.7334 13.3066 20.1113V12.1406C13.3066 11.4297 12.8691 10.9854 12.1377 10.9854C11.7139 10.9854 11.3857 11.0469 10.9072 11.375L8.95215 12.7285C8.63086 12.9541 8.50781 13.1865 8.50781 13.501C8.50781 13.9385 8.81543 14.2393 9.23242 14.2393C9.44434 14.2393 9.58789 14.1914 9.7793 14.0547L11.2217 13.0498H11.2627V20.1113C11.2627 20.7334 11.6797 21.1436 12.2881 21.1436ZM16.9023 20.3164C17.2441 20.3164 17.4014 20.1865 17.6816 19.9131L19.3633 18.2451L21.0381 19.9062C21.3184 20.1865 21.4824 20.3164 21.8174 20.3164C22.2617 20.3164 22.6377 19.9746 22.6377 19.5234C22.6377 19.2158 22.4873 19.0176 22.2549 18.7852L20.5254 17.0488L22.2549 15.3057C22.4873 15.0732 22.6377 14.875 22.6377 14.5674C22.6377 14.1162 22.2617 13.7744 21.8174 13.7744C21.4824 13.7744 21.3184 13.9043 21.0381 14.1846L19.3633 15.8457L17.6885 14.1846C17.4082 13.9043 17.251 13.7744 16.9092 13.7744C16.4648 13.7744 16.0889 14.1162 16.0889 14.5674C16.0889 14.8818 16.2393 15.0732 16.4717 15.3057L18.1943 17.0488L16.4717 18.7852C16.2324 19.0244 16.0889 19.2158 16.0889 19.5234C16.0889 19.9814 16.458 20.3164 16.9023 20.3164Z" fill="white"/></svg>`}};e.tag="scandit-camera-fov-wide-icon";var r=e;export{r as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-33ZWDLU7.js';import {a as a$2}from'./chunk-UWBNF47P.js';import {a as a$1}from'./chunk-3A4KLILV.js';var t=class t extends a{static create(){return document.createElement(t.tag)}static register(){a$1({[t.tag]:t});}render(){return a$2`<style>${t.tag}{display:flex}${t.tag}[shadow] svg{filter:drop-shadow(0px 1px 2px rgba(18, 22, 25, .3))}</style><svg width="${this.size}" height="${this.heightForViewbox(32,32)}" viewBox="0 0 32 32" fill="none"><path d="M23.0072 11.0026H18.3321L19.9687 5.27515C20.0113 5.12618 20.0187 4.96936 19.9903 4.81705C19.9619 4.66475 19.8985 4.52112 19.8051 4.39748C19.7118 4.27385 19.5909 4.17359 19.4522 4.10462C19.3135 4.03564 19.1606 3.99983 19.0057 4H12.0031C11.7834 3.9999 11.5699 4.07207 11.3954 4.20538C11.2209 4.33868 11.095 4.52571 11.0374 4.73761L8.03623 15.7378C7.99509 15.8864 7.98889 16.0426 8.01812 16.1941C8.04735 16.3456 8.11122 16.4882 8.20472 16.6109C8.29823 16.7336 8.41884 16.833 8.55714 16.9014C8.69543 16.9697 8.84766 17.0052 9.00192 17.0049H13.8037L12.0191 26.83C11.9767 27.0569 12.0142 27.2915 12.1251 27.494C12.236 27.6964 12.4135 27.8543 12.6276 27.9408C12.8416 28.0273 13.0789 28.0372 13.2994 27.9687C13.5198 27.9002 13.7098 27.7575 13.8371 27.5649L23.8409 12.5592C23.9417 12.4085 23.9997 12.2331 24.0085 12.052C24.0174 11.8708 23.9769 11.6906 23.8912 11.5307C23.8056 11.3708 23.6781 11.2372 23.5224 11.1442C23.3667 11.0512 23.1886 11.0023 23.0072 11.0026Z" fill="${this.fill}"/></svg>`}};t.tag="scandit-torch-on-icon";var r=t;export{r as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b,a as a$3,c,f as f$1}from'./chunk-TTGJAMI2.js';import {a as a$2}from'./chunk-UWBNF47P.js';import {a as a$
|
|
1
|
+
import {b,a as a$3,c,f as f$1}from'./chunk-TTGJAMI2.js';import {a as a$2}from'./chunk-UWBNF47P.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$5}from'./chunk-3A4KLILV.js';import {a as a$4}from'./chunk-LSZZVJ6B.js';var v="scandit-progress-bar",n="aria-valuenow",f="aria-valuemin",w="aria-valuemax",a=class a extends a$1{constructor(){super();let e=this.attachShadow({mode:"open"});e.innerHTML=a$2`<div id="scandit-progress" role="progressbar" aria-valuemin="0" aria-valuemax="100">`,e.append(a.createStyleElement().cloneNode(true)),this.progress=e.querySelector("#scandit-progress");}static get observedAttributes(){return ["value","min","max"]}static createStyleElement(){return a$4`:host{display:inline-block;--indeterminate-bubble-width:35%;--accent-color:#${b.toJSON()};--start-gradient-color:#${a$3.toJSON()};--end-gradient-color:#${c.toJSON()};--secondary-color:#${f$1.toJSON()};width:100%}:host [role=progressbar]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:.5rem;overflow:hidden;position:relative}:host [role=progressbar]:after,:host [role=progressbar]:before{background:var(--accent-color);border-radius:.5rem;content:" ";height:.5rem;left:0;position:absolute;top:0}:host([variant=gradient]) [role=progressbar]:after,:host([variant=gradient]) [role=progressbar]:before{background:linear-gradient(90deg,var(--start-gradient-color) 0,var(--end-gradient-color) 100%)}:host(:focus-visible){border-radius:.5rem;outline-color:var(--accent-color);outline-offset:5px}:host [role=progressbar]:not([aria-valuenow]):after{animation:indeterminate-progress-bar 2.5s ease infinite;width:var(--indeterminate-bubble-width);z-index:1}:host [role=progressbar][aria-valuenow]:after{animation:none;width:0}:host [role=progressbar][aria-valuenow]:before{background-color:var(--accent-color);border-radius:.5rem;transition:width .3s linear;width:calc(var(--aria-valuenow)*1%)}:host [role=progressbar]{background-color:var(--secondary-color);border-radius:.5rem}@keyframes indeterminate-progress-bar{0%{left:0}50%{left:calc(100% - var(--indeterminate-bubble-width))}}`}get min(){var r;let e=(r=this.getAttribute("min"))!=null?r:0;return Number(e)}get max(){var r;let e=(r=this.getAttribute("max"))!=null?r:1;return Number(e)}set max(e){e!==null&&this.setAttribute("max",String(e));}get value(){let e=this.getAttribute("value");return e==null||e===""?null:Number(e)}set value(e){if(e==null){this.removeAttribute("value");return}e>=this.min&&e<=this.max&&this.setAttribute("value",String(e));}static create(){return a.register(),document.createElement(a.tag)}static register(){a$5({[a.tag]:a});}attributeChangedCallback(){this.update();}connectedCallback(){this.update();}update(){let{min:e,max:r,value:i,progress:t}=this;if(t==null||t.setAttribute(f,e.toString()),t==null||t.setAttribute(w,r.toString()),i==null){t==null||t.removeAttribute(n),t==null||t.removeAttribute("style");return}if(i>=e&&i<=r){let h=(i-e)/(r-e)*100,o=String(h);t==null||t.setAttribute(n,o),t==null||t.setAttribute("style",`--${n}: ${o}`);}}};a.tag=v;var g=a;export{g as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a=class n{constructor(){this.batteryManager=null;this.currentBatteryPercentage=null;this.batteryChangeListeners=new Set;this.handleOnLevelChange=this.onLevelChange.bind(this);}static async create(){let e=new n;return await e.initializeBatteryManager(),e}addBatteryChangeListener(e){this.batteryChangeListeners.add(e);}removeBatteryChangeListener(e){this.batteryChangeListeners.delete(e);}dispose(){this.batteryManager&&(this.batteryManager.removeEventListener("levelchange",this.handleOnLevelChange),this.batteryChangeListeners.clear(),this.batteryManager=null,this.currentBatteryPercentage=null);}notifyBatteryChange(){let e=this.getBatteryInfo();for(let t of this.batteryChangeListeners)t(e);}onLevelChange(){var e,t;this.currentBatteryPercentage=Math.round(((t=(e=this.batteryManager)==null?void 0:e.level)!=null?t:0)*100),this.notifyBatteryChange();}getBatteryInfo(){return {percentage:this.currentBatteryPercentage}}async initializeBatteryManager(){if(typeof navigator>"u")return;let e=navigator;if(!(!e.getBattery||typeof e.getBattery!="function"))try{this.batteryManager=await e.getBattery(),this.currentBatteryPercentage=Math.round(this.batteryManager.level*100),this.batteryManager.addEventListener("levelchange",this.handleOnLevelChange),this.notifyBatteryChange();}catch{this.batteryManager=null;}}};export{a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-YXXMWHFX.js';var t=new a(globalThis,{get:()=>globalThis.Module,set:e=>{globalThis.Module=e;}});function l(e){}export{t as a,l as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var o=(a=>(a.Body="body",a.Footnote="footnote",a))(o||{}),s=(t=>(t.Start="start",t.Center="center",t.End="end",t))(s||{}),i=(t=>(t.Normal="normal",t.Wider="wider",t.FitText="fitText",t))(i||{}),p=(a=>(a.Normal="normal",a.Taller="taller",a))(p||{}),d=(a=>(a.Square="square",a.Rounded="rounded",a))(d||{}),c=(t=>(t.None="none",t.Check="check",t.ExclamationMark="exclamationMark",t))(c||{}),m=(n=>(n.Top="top",n.Center="center",n.AboveViewFinder="aboveViewFinder",n.BelowViewFinder="belowViewFinder",n))(m||{}),
|
|
1
|
+
var o=(a=>(a.Body="body",a.Footnote="footnote",a))(o||{}),s=(t=>(t.Start="start",t.Center="center",t.End="end",t))(s||{}),i=(t=>(t.Normal="normal",t.Wider="wider",t.FitText="fitText",t))(i||{}),p=(a=>(a.Normal="normal",a.Taller="taller",a))(p||{}),d=(a=>(a.Square="square",a.Rounded="rounded",a))(d||{}),c=(t=>(t.None="none",t.Check="check",t.ExclamationMark="exclamationMark",t))(c||{}),m=(n=>(n.Top="top",n.Center="center",n.AboveViewFinder="aboveViewFinder",n.BelowViewFinder="belowViewFinder",n))(m||{}),u=(a=>(a.AboveViewFinder="aboveViewFinder",a.BelowViewFinder="belowViewFinder",a))(u||{}),l=(t=>(t.BlackOnWhite="blackOnWhite",t.WhiteOnBlack="whiteOnBlack",t.Transparent="transparent",t))(l||{}),C=(r=>(r.Success="success",r.Error="error",r.Warning="warning",r.Info="info",r.Notification="notification",r))(C||{}),g=(e=>(e[e.Ocr=0]="Ocr",e[e.HideLogo=1]="HideLogo",e[e.ShowTestLicenseMessage=2]="ShowTestLicenseMessage",e[e.AugmentedReality=5]="AugmentedReality",e[e.ActivityPingStatsAddon=8]="ActivityPingStatsAddon",e[e.ActivityPing=9]="ActivityPing",e[e.Registration=10]="Registration",e[e.Parser=11]="Parser",e[e.BarcodeCapture=14]="BarcodeCapture",e[e.Analytics=17]="Analytics",e[e.AnalyticsBatchMode=18]="AnalyticsBatchMode",e[e.AnalyticsScanContent=19]="AnalyticsScanContent",e[e.AnalyticsOnlineVerification=20]="AnalyticsOnlineVerification",e[e.SparkScan=21]="SparkScan",e[e.AamvaIdBarcodeVerification=22]="AamvaIdBarcodeVerification",e[e.MappingForTracking=23]="MappingForTracking",e[e.BarcodeFind=24]="BarcodeFind",e[e.MandatoryRegistration=25]="MandatoryRegistration",e[e.FeatureTracking=26]="FeatureTracking",e[e.IdCaptureViz=27]="IdCaptureViz",e[e.IdCaptureMrz=28]="IdCaptureMrz",e[e.IdCaptureBarcode=29]="IdCaptureBarcode",e[e.BarcodeSelectionAimToScan=30]="BarcodeSelectionAimToScan",e[e.BarcodeSelectionTapToScan=31]="BarcodeSelectionTapToScan",e[e.BarcodeCount=32]="BarcodeCount",e[e.BarcodePick=33]="BarcodePick",e[e.IdVerificationDataComparison=34]="IdVerificationDataComparison",e[e.SmartLabelBarcode=35]="SmartLabelBarcode",e[e.SmartLabelText=36]="SmartLabelText",e[e.VoidedIdDetection=37]="VoidedIdDetection",e[e.BarcodeArFull=38]="BarcodeArFull",e[e.BarcodeSequence=39]="BarcodeSequence",e))(g||{});export{o as a,s as b,i as c,p as d,d as e,c as f,m as g,u as h,l as i,C as j,g as k};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-33ZWDLU7.js';import {a as a$3}from'./chunk-UWBNF47P.js';import {a as a$2}from'./chunk-3A4KLILV.js';var t=class t extends a$1{static create(){return document.createElement(t.tag)}static register(){a$2({[t.tag]:t});}render(){return a$3`<style>${t.tag}{display:flex}</style><svg width="${this.size}" height="${this.heightForViewbox(32,32)}" viewBox="0 0 32 32" fill="none"><rect opacity="0.5" width="32" height="32" rx="16" fill="white"/><path d="M7.98828 21.082C8.59668 21.082 9.08887 20.5898 9.08887 19.9814C9.08887 19.3662 8.59668 18.8809 7.98828 18.8809C7.37305 18.8809 6.8877 19.3662 6.8877 19.9814C6.8877 20.5898 7.37305 21.082 7.98828 21.082Z" fill="white"/><path d="M14.3662 21.2188C16.6152 21.2188 18.1807 19.7969 18.1807 17.6914C18.1807 15.8115 16.8408 14.4854 14.9541 14.4854C13.9492 14.4854 13.1426 14.8818 12.7393 15.5176H12.6982L12.9307 12.7764H16.8271C17.3467 12.7764 17.6748 12.4551 17.6748 11.9561C17.6748 11.457 17.3398 11.1357 16.8271 11.1357H12.5C11.7002 11.1357 11.2695 11.4707 11.2012 12.3047L10.9141 15.9209C10.9072 15.9551 10.9072 15.9756 10.9072 16.0029C10.8799 16.5566 11.2012 17.0283 11.8779 17.0283C12.3359 17.0283 12.541 16.9258 12.9443 16.5498C13.293 16.2148 13.7852 15.9619 14.373 15.9619C15.4463 15.9619 16.2119 16.7002 16.2119 17.7393C16.2119 18.8057 15.4395 19.5781 14.3662 19.5781C13.4775 19.5781 12.8965 19.1475 12.541 18.4365C12.3086 18.0674 12.0488 17.9238 11.6387 17.9238C11.1055 17.9238 10.7773 18.2383 10.7773 18.7646C10.7773 19.0107 10.8389 19.2227 10.9414 19.4414C11.4336 20.4873 12.8008 21.2188 14.3662 21.2188Z" fill="white"/><path d="M19.9307 21.1436C20.2861 21.1436 20.4844 21.0273 20.7578 20.6035L22.1865 18.457H22.2275L23.6836 20.6377C23.9092 20.9795 24.1006 21.1436 24.4902 21.1436C25.0303 21.1436 25.4404 20.8018 25.4404 20.2617C25.4404 20.043 25.3721 19.8516 25.2217 19.6465L23.5195 17.2949L25.1943 15.0596C25.3857 14.8135 25.4609 14.6152 25.4609 14.3691C25.4609 13.8633 25.085 13.5215 24.5244 13.5215C24.1553 13.5215 23.9434 13.6855 23.6768 14.1025L22.3369 16.1465H22.2959L20.9287 14.0889C20.6621 13.665 20.4502 13.5215 20.0469 13.5215C19.5 13.5215 19.0898 13.8975 19.0898 14.3965C19.0898 14.6289 19.1582 14.8271 19.3018 15.0186L21.0107 17.3496L19.2949 19.6465C19.1035 19.8994 19.0283 20.0908 19.0283 20.3301C19.0283 20.8086 19.4043 21.1436 19.9307 21.1436Z" fill="white"/></svg>`}};t.tag="scandit-camera-fov-ultrawide-icon";var a=t;export{a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$3}from'./chunk-
|
|
1
|
+
import {a as a$3}from'./chunk-YP53ND2Q.js';import {a as a$2}from'./chunk-6IM6NGGI.js';import {e as e$1}from'./chunk-TTGJAMI2.js';import {a as a$7,b}from'./chunk-EQ6V4W5K.js';import {a as a$4}from'./chunk-UWBNF47P.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$6}from'./chunk-3A4KLILV.js';import {a as a$5}from'./chunk-LSZZVJ6B.js';var w=(t=>(t.DidShow="didshow",t.DidHide="didhide",t))(w||{}),s="--text-size",r="--text-color",i="--text-alignment",a="--text-weight",l="--line-height",c="--background-color",h="--corner-radius",o="--max-lines",A="ease-in-out",e=class e extends a$1{constructor(){super();this.toast=null;this._hintStyle=null;this._customIcon=null;this.currentAnimation=null;this.animationDuration=250;this._currentAnimationDirection=null;let t=this.attachShadow({mode:"open"});this._exclamationIcon=a$2.create(),this._checkIcon=a$3.create(),this._exclamationIcon.size=24,this._checkIcon.size=24,t.innerHTML=a$4`<div class="toast"><slot name="first-child"></slot><div class="left"><slot name="icon"></slot></div><p class="middle"><slot></slot></p></div>`,t.append(e.createStyleElement().cloneNode(true)),this.toast=t.querySelector(".toast");}static createStyleElement(){return a$5`:host{display:inline-block;font-family:SF Pro Display,sans-serif}:host([hidden]){display:none}.toast{${s}:1rem;${r}:#000;${a}:400;${i}:${"center"};${l}:1.5rem;${c}:#fff;${h}:.25rem;${o}:2;align-items:flex-start;background-color:var(${c});border-radius:var(${h});color:var(${r});display:flex;flex-direction:row;font-size:var(${s});font-weight:var(${a});gap:.625rem;justify-content:var(${i});line-height:var(${l});padding:.75rem 1rem}:host([direction=column]) .toast{align-items:center;flex-direction:column}:host([direction=row]) .toast{align-items:center;flex-direction:row}.toast .left{align-self:flex-start;display:flex}.toast.icon-${"none"} .left{display:none}.toast p.middle{display:inline-block;display:-webkit-box;line-clamp:var(${o});-webkit-line-clamp:var(${o});margin:0;padding:0;text-align:var(${i});-webkit-box-orient:vertical;align-self:center;overflow:hidden;text-shadow:0 1px 2px #${e$1.withAlpha(.3).toJSON()}}p.middle{text-align:var(${i})}`}get hintStyle(){return this._hintStyle}set hintStyle(t){this._hintStyle=t,this.render();}get customIcon(){return this._customIcon}set customIcon(t){this._customIcon=t,this.render();}get showAnimation(){return new Animation(new KeyframeEffect(this,[{opacity:0},{opacity:1}],{duration:this.animationDuration,fill:"both",easing:A}))}get hideAnimation(){return new Animation(new KeyframeEffect(this,[{opacity:1},{opacity:0}],{duration:this.animationDuration,fill:"both",easing:A}))}static create(){return e.register(),document.createElement(e.tag)}static register(){a$6({[e.tag]:e});}async show(){return this.toggle(true)}async hide(){return this.toggle(false)}connectedCallback(){this.render();}async toggle(t){var m,d;let n=t?"showing":"hiding";this.currentAnimation&&this._currentAnimationDirection===n&&this.currentAnimation.playState==="running"||(this.currentAnimation&&a$7(this.currentAnimation),this.animationDuration=(d=(m=this.hintStyle)==null?void 0:m.isAnimatedToView)==null||d?250:0,this._currentAnimationDirection=n,this.currentAnimation=t?this.showAnimation:this.hideAnimation,this.currentAnimation.play(),await b(this.currentAnimation),this.dispatchEvent(new CustomEvent(t?"didshow":"didhide",{bubbles:true,detail:{target:this}})),this.currentAnimation=null,this._currentAnimationDirection=null);}render(){var t;if(!(!this.toast||!this.hintStyle)){this.toast.className="toast",this.toast.style.setProperty(s,`${this.hintStyle.textSize}px`),this.toast.style.setProperty(r,`#${this.hintStyle.textColor}`),this.toast.style.setProperty(a,this.hintStyle.textWeight.toString()),this.toast.style.setProperty(i,this.hintStyle.textAlignment),this.toast.style.setProperty(l,`${this.hintStyle.lineHeight/14}`),this.toast.style.setProperty(c,`#${this.hintStyle.backgroundColor}`),this.toast.style.setProperty(h,`${this.hintStyle.cornerRadius/10}rem`),this.toast.style.setProperty(o,this.hintStyle.maxLines.toString());for(let n of this.querySelectorAll("[slot=icon]"))n.remove();this._customIcon?(this._customIcon.setAttribute("slot","icon"),this.append(this._customIcon),this.toast.classList.remove("icon-none")):(this.toast.classList.toggle("icon-none",this.hintStyle.hintIcon==="none"),this.hintStyle.hintIcon==="check"?(this._checkIcon.setAttribute("slot","icon"),this.append(this._checkIcon)):this.hintStyle.hintIcon==="exclamationMark"&&(this._exclamationIcon.setAttribute("slot","icon"),this.append(this._exclamationIcon)),this.hintStyle.iconColor&&((t=this.querySelector("[slot=icon]"))==null||t.setAttribute("fill",`#${this.hintStyle.iconColor}`)));}}};e.tag="scandit-toast-hint";var I=e;export{w as a,I as b};
|