@scandit/web-datacapture-core 7.5.0 → 7.6.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.
Files changed (184) hide show
  1. package/build/electron/main.cjs +1 -1
  2. package/build/electron/main.js +1 -1
  3. package/build/js/{Camera-BoUtNCzS.d.ts → Camera-DYYZ5vW1.d.ts} +44 -32
  4. package/build/js/Camera.d.ts +1 -1
  5. package/build/js/Camera.js +1 -1
  6. package/build/js/CameraAccess.d.ts +1 -1
  7. package/build/js/CameraAccess.js +1 -1
  8. package/build/js/CameraRelated.d.ts +1 -1
  9. package/build/js/DataCaptureContext.d.ts +2 -2
  10. package/build/js/DataCaptureContext.js +1 -1
  11. package/build/js/DataCaptureContextRelated.d.ts +1 -1
  12. package/build/js/DataCaptureVersion.js +1 -1
  13. package/build/js/DataCaptureView.d.ts +1 -1
  14. package/build/js/DataCaptureView.js +1 -1
  15. package/build/js/Defaults.d.ts +1 -1
  16. package/build/js/Feedback.js +1 -1
  17. package/build/js/FrameData.d.ts +1 -1
  18. package/build/js/ImageFrameSource.d.ts +1 -1
  19. package/build/js/Localization.js +1 -1
  20. package/build/js/NotificationPresenter/index.d.ts +1 -1
  21. package/build/js/NotificationPresenter/private/ConcreteNotificationPresenter.d.ts +1 -1
  22. package/build/js/NotificationPresenter/private/presets.d.ts +1 -1
  23. package/build/js/ScanditIcon.js +1 -1
  24. package/build/js/ScanditIconBuilder.js +1 -1
  25. package/build/js/SingleImageUploader.d.ts +1 -1
  26. package/build/js/Sound.js +1 -1
  27. package/build/js/Vibration.js +1 -1
  28. package/build/js/browserHelper.js +1 -1
  29. package/build/js/chunks/chunk-26YPQCXW.js +5 -0
  30. package/build/js/chunks/{chunk-L3SHJKNC.js → chunk-2T36DQ52.js} +1 -1
  31. package/build/js/chunks/{chunk-KCNXUTBL.js → chunk-34HLD6AY.js} +1 -1
  32. package/build/js/chunks/{chunk-R6YWFAMT.js → chunk-4W2T3TLN.js} +1 -1
  33. package/build/js/chunks/{chunk-YZPUMXQ2.js → chunk-5QETTOSS.js} +1 -1
  34. package/build/js/chunks/chunk-6G52QHDH.js +4 -0
  35. package/build/js/chunks/{chunk-TCJPGGHY.js → chunk-7B2VPGLP.js} +1 -1
  36. package/build/js/chunks/chunk-ACFJP5SR.js +1 -0
  37. package/build/js/chunks/{chunk-6X73W3EO.js → chunk-AUWF33RB.js} +1 -1
  38. package/build/js/chunks/chunk-BMMGUF55.js +1 -0
  39. package/build/js/chunks/{chunk-IYYM2J7I.js → chunk-CVRIZLTM.js} +1 -1
  40. package/build/js/chunks/chunk-DT4PRB74.js +1 -0
  41. package/build/js/chunks/{chunk-4D2BPF6X.js → chunk-E67SHSCO.js} +1 -1
  42. package/build/js/chunks/{chunk-DFRROFGN.js → chunk-EPP3SBHK.js} +1 -1
  43. package/build/js/chunks/{chunk-NPIPIS7X.js → chunk-FUNKO4DC.js} +1 -1
  44. package/build/js/chunks/chunk-FZWKZSE4.js +1 -0
  45. package/build/js/chunks/{chunk-FRG4HXJT.js → chunk-G2BRTVN7.js} +1 -1
  46. package/build/js/chunks/chunk-GHTCNOQN.js +1 -0
  47. package/build/js/chunks/{chunk-UUGROS73.js → chunk-I2LMKSHH.js} +1 -1
  48. package/build/js/chunks/{chunk-2XJKSSK4.js → chunk-JDX5TFXN.js} +1 -1
  49. package/build/js/chunks/{chunk-CMG3PSOW.js → chunk-LLU62JKU.js} +1 -1
  50. package/build/js/chunks/chunk-MCAVCIZT.js +1 -0
  51. package/build/js/chunks/chunk-MUJ7NKAY.js +1 -0
  52. package/build/js/chunks/{chunk-72A5262S.js → chunk-NA6AZIR5.js} +1 -1
  53. package/build/js/chunks/chunk-NKCR7VPO.js +1 -0
  54. package/build/js/chunks/{chunk-EKY4M37S.js → chunk-NKYVY76A.js} +1 -1
  55. package/build/js/chunks/chunk-O2SM24G4.js +1 -0
  56. package/build/js/chunks/chunk-PAZQUCPC.js +6 -0
  57. package/build/js/chunks/chunk-RG272MAJ.js +1 -0
  58. package/build/js/chunks/{chunk-FPCLZS52.js → chunk-RWDRTV7B.js} +1 -1
  59. package/build/js/chunks/chunk-SEAVQZN6.js +1 -0
  60. package/build/js/chunks/chunk-SHODT6PR.js +21 -0
  61. package/build/js/chunks/{chunk-HNUWDILZ.js → chunk-TAMEEK7W.js} +1 -1
  62. package/build/js/chunks/chunk-TR3NGINC.js +1 -0
  63. package/build/js/chunks/chunk-UWLAKRB2.js +2 -0
  64. package/build/js/chunks/chunk-VQ2HNQ6B.js +1 -0
  65. package/build/js/chunks/chunk-WAUGWWV3.js +1 -0
  66. package/build/js/chunks/{chunk-BH742UD7.js → chunk-WSTE2OZY.js} +1 -1
  67. package/build/js/chunks/{chunk-43NA46NY.js → chunk-ZC7QACB2.js} +1 -1
  68. package/build/js/chunks/{chunk-FFTRSHP6.js → chunk-ZF7CDMAC.js} +1 -1
  69. package/build/js/global.d.d.ts +5 -2
  70. package/build/js/index.d.ts +5 -4
  71. package/build/js/index.js +3 -3
  72. package/build/js/private/CameraAccess.d.ts +1 -1
  73. package/build/js/private/CameraAccess.js +1 -1
  74. package/build/js/private/CameraManager.d.ts +1 -1
  75. package/build/js/private/CameraManager.js +1 -1
  76. package/build/js/private/CanvasDrawerWithMetrics.d.ts +1 -1
  77. package/build/js/private/CoreModuleLicenseTextProvider.d.ts +1 -1
  78. package/build/js/private/CoreModuleLicenseTextProvider.js +1 -1
  79. package/build/js/private/DataCaptureContextRelated.d.ts +1 -1
  80. package/build/js/private/FrameReaders/FrameReader.d.ts +1 -1
  81. package/build/js/private/FrameReaders/FrameReaderAbstract.d.ts +1 -1
  82. package/build/js/private/FrameReaders/GrayScaleFrameReader.d.ts +1 -1
  83. package/build/js/private/FrameReaders/GrayScaleFrameReader.js +1 -1
  84. package/build/js/private/FrameReaders/index.d.ts +1 -1
  85. package/build/js/private/FrameReaders/index.js +1 -1
  86. package/build/js/private/NormalizedConfigureOptions.d.ts +6 -5
  87. package/build/js/private/SingleImageUploaderView.d.ts +1 -1
  88. package/build/js/private/SingleImageUploaderView.js +1 -1
  89. package/build/js/private/ViewControls+related.js +1 -1
  90. package/build/js/private/ViewControls_related.d.ts +1 -1
  91. package/build/js/private/ViewStyles.js +1 -1
  92. package/build/js/private/ViewsRegistry.d.ts +1 -1
  93. package/build/js/private/hybridDesktopPlatformHelpers.js +1 -1
  94. package/build/js/private/ui/atoms/AimerSvgIcon.js +1 -1
  95. package/build/js/private/ui/atoms/ArrowDownSvgIcon.js +1 -1
  96. package/build/js/private/ui/atoms/ArrowLeftSvgIcon.js +1 -1
  97. package/build/js/private/ui/atoms/ArrowRightSvgIcon.js +1 -1
  98. package/build/js/private/ui/atoms/ArrowUpSvgIcon.js +1 -1
  99. package/build/js/private/ui/atoms/ArrowsUp.js +1 -1
  100. package/build/js/private/ui/atoms/Backdrop.js +1 -1
  101. package/build/js/private/ui/atoms/CalendarExclamationMarkSvgIcon.js +1 -1
  102. package/build/js/private/ui/atoms/CameraSwitchReverseSvgIcon.js +1 -1
  103. package/build/js/private/ui/atoms/CameraSwitchSvgIcon.js +1 -1
  104. package/build/js/private/ui/atoms/Card.d.ts +2 -0
  105. package/build/js/private/ui/atoms/Card.js +1 -1
  106. package/build/js/private/ui/atoms/CardList.js +1 -1
  107. package/build/js/private/ui/atoms/CheckSvgIcon.js +1 -1
  108. package/build/js/private/ui/atoms/ChevronDownSvgIcon.js +1 -1
  109. package/build/js/private/ui/atoms/ChevronLeftSvgIcon.js +1 -1
  110. package/build/js/private/ui/atoms/ChevronRightSvgIcon.js +1 -1
  111. package/build/js/private/ui/atoms/ChevronUpSvgIcon.js +1 -1
  112. package/build/js/private/ui/atoms/CrossSvgIcon.js +1 -1
  113. package/build/js/private/ui/atoms/Dot5xSvgIcon.js +1 -1
  114. package/build/js/private/ui/atoms/ExclamationMarkSvgIcon.js +1 -1
  115. package/build/js/private/ui/atoms/GlassSvgIcon.js +1 -1
  116. package/build/js/private/ui/atoms/HandLensCheckSvgIcon.js +1 -1
  117. package/build/js/private/ui/atoms/KeyboardSvgIcon.js +1 -1
  118. package/build/js/private/ui/atoms/LowStockSvgIcon.js +1 -1
  119. package/build/js/private/ui/atoms/OnexSvgIcon.js +1 -1
  120. package/build/js/private/ui/atoms/PrinterSvgIcon.js +1 -1
  121. package/build/js/private/ui/atoms/ProgressBar.js +1 -1
  122. package/build/js/private/ui/atoms/QuestionMarkSvgIcon.js +1 -1
  123. package/build/js/private/ui/atoms/RestartSvgIcon.js +1 -1
  124. package/build/js/private/ui/atoms/RoundedCheckSvgIcon.js +1 -1
  125. package/build/js/private/ui/atoms/RoundedCrossSvgIcon.js +1 -1
  126. package/build/js/private/ui/atoms/RoundedExclamationMarkSvgIcon.js +1 -1
  127. package/build/js/private/ui/atoms/ShutterButton.js +2 -2
  128. package/build/js/private/ui/atoms/StarFilledSvgIcon.js +1 -1
  129. package/build/js/private/ui/atoms/StarHalfFilledSvgIcon.js +1 -1
  130. package/build/js/private/ui/atoms/StarOutlinedSvgIcon.js +1 -1
  131. package/build/js/private/ui/atoms/SvgIcon.js +1 -1
  132. package/build/js/private/ui/atoms/ToPickSvgIcon.js +1 -1
  133. package/build/js/private/ui/atoms/Toast.d.ts +1 -1
  134. package/build/js/private/ui/atoms/Toast.js +1 -1
  135. package/build/js/private/ui/atoms/TwoxSvgIcon.js +1 -1
  136. package/build/js/private/ui/atoms/WrongItemSvgIcon.js +1 -1
  137. package/build/js/private/ui/molecules/HintPresenter.d.ts +1 -1
  138. package/build/js/private/ui/molecules/HintPresenter.js +1 -1
  139. package/build/js/private/ui/molecules/LoadingOverlay.js +1 -1
  140. package/build/js/private/utils/finalizationRegistryPolyfill.d.ts +13 -0
  141. package/build/js/private/utils/finalizationRegistryPolyfill.js +1 -0
  142. package/build/js/private/utils/fromEntries.d.ts +14 -0
  143. package/build/js/private/utils/fromEntries.js +1 -0
  144. package/build/js/private/utils/globalThisPolyfill.d.ts +15 -0
  145. package/build/js/private/utils/globalThisPolyfill.js +1 -0
  146. package/build/js/private/utils/index.d.ts +1 -0
  147. package/build/js/private/utils/index.js +1 -1
  148. package/build/js/private/utils/replaceImagesInViewUtils.d.ts +1 -1
  149. package/build/js/private/utils/warnMultithreadingUnavailable.js +1 -1
  150. package/build/js/sdk.d.ts +22 -7
  151. package/build/js/sdk.js +1 -1
  152. package/build/js/worker/WorkerMain.d.ts +1 -1
  153. package/build/js/worker/WorkerMain.js +1 -1
  154. package/build/js/worker/coreCapture.inlineWorker.d.ts +1 -1
  155. package/build/js/worker/coreCapture.inlineWorker.js +1 -1
  156. package/build/js/worker/dataCaptureEngine.d.ts +1 -1
  157. package/build/js/worker/dataCaptureEngine.js +1 -1
  158. package/build/js/worker/dataCaptureLoader.d.ts +1 -1
  159. package/build/js/worker/dataCaptureWorkerRelated.d.ts +1 -1
  160. package/build/js/worker/finalizationRegistryPolyfill.test.d.ts +1 -0
  161. package/build/js/worker/finalizationRegistryPolyfill.test.js +1 -0
  162. package/build/js/worker/helper.js +1 -1
  163. package/build/js/worker/helperFetch.js +1 -1
  164. package/build/js/worker/importWasmScript.js +1 -1
  165. package/build/js/worker/index.d.ts +1 -1
  166. package/build/js/worker/index.js +1 -1
  167. package/package.json +1 -1
  168. package/build/js/chunks/chunk-2Q5FZVGV.js +0 -1
  169. package/build/js/chunks/chunk-3RIR7ALE.js +0 -1
  170. package/build/js/chunks/chunk-46WJFV3I.js +0 -1
  171. package/build/js/chunks/chunk-7CQVGY6N.js +0 -1
  172. package/build/js/chunks/chunk-7XQ3GHYH.js +0 -1
  173. package/build/js/chunks/chunk-B5JOQVFY.js +0 -2
  174. package/build/js/chunks/chunk-IDPD4BN6.js +0 -1
  175. package/build/js/chunks/chunk-J3PS3NRY.js +0 -21
  176. package/build/js/chunks/chunk-MFAA3FMX.js +0 -1
  177. package/build/js/chunks/chunk-NMROJLGQ.js +0 -1
  178. package/build/js/chunks/chunk-OFNRGDFQ.js +0 -4
  179. package/build/js/chunks/chunk-PFC2HW6V.js +0 -5
  180. package/build/js/chunks/chunk-RMKJUHZW.js +0 -6
  181. package/build/js/chunks/chunk-TPU3JUZL.js +0 -1
  182. package/build/js/chunks/chunk-TTB5EF75.js +0 -1
  183. package/build/js/chunks/chunk-UGUDXT2N.js +0 -1
  184. /package/build/js/chunks/{chunk-ZQFWULUQ.js → chunk-2DXPVHBJ.js} +0 -0
@@ -1 +1 @@
1
- var e,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,p={};((e,n)=>{for(var a in n)t(e,a,{get:n[a],enumerable:!0})})(p,{register:()=>u,unregister:()=>f}),module.exports=(e=p,((e,p,s,o)=>{if(p&&"object"==typeof p||"function"==typeof p)for(let i of a(p))r.call(e,i)||i===s||t(e,i,{get:()=>p[i],enumerable:!(o=n(p,i))||o.enumerable});return e})(t({},"__esModule",{value:!0}),e));var s=String.fromCodePoint,o=(s.apply(String,[119,101,98,107,105,116,84,114,97,110,115,112,111,114,116,68,117,112,108,101,120,67,104,97,110,110,101,108]),s.apply(String,[53,65,41,124,75,47,108,120,50,48,115,62,66,60,107,57])),i=s.apply(String,[111,74,88,52,51,101,51,112,66,79,38,88,40,65,36,94]);function c(e,t){return async function(n,a){if(function(e,t){if(null==e)return!1;const n=new URL(e.url);return t.senderId===o&&"localhost"===n.hostname||""===n.hostname}(n.senderFrame,a))switch(a.type){case"get-license-key":if(null!=a.payload)try{const r=await async function(e,t){const{fs:n,crypto:a,path:r,app:p}=e,[s,o]=t.publicKey.split(":"),i=r.join(p.getAppPath(),t.licenseDataPath);return function(e,t,n){const r=a.createDecipheriv("aes-256-cbc",t,n);let p=r.update(e,"hex","utf8");return p+=r.final("utf8"),p}((await n.readFile(i)).toString("utf8"),Buffer.from(s,"base64"),Buffer.from(o,"base64"))}(e,{licenseDataPath:a.payload.licenseDataPath,publicKey:t});n.sender.send(i,{type:a.type,senderId:a.senderId,payload:{licenseKey:r??""}})}catch(e){n.sender.send(i,{type:a.type,senderId:a.senderId,payload:{error:e}})}break;case"get-app-info":try{const t=await async function(e){const{fs:t,path:n,app:a}=e;let r=process.cwd();a.isPackaged&&(r=a.getAppPath());const p=await t.readFile(n.join(r,"package.json"),"utf8"),s=JSON.parse(p);return{appId:s.build?.appId??s.appId,name:s.name,version:s.version}}(e);n.sender.send(i,{type:a.type,senderId:a.senderId,payload:{isPackaged:e.app.isPackaged,version:t.version??e.app.getVersion(),appName:t.name??e.app.getName(),appId:t.appId??""}})}catch(e){n.sender.send(i,{type:a.type,senderId:a.senderId,payload:{error:e}})}}}}var d=null,l=null;function u(e,t){l=e,d=c(e,t),l.ipcMain.on(i,d)}function f(){null!=d&&null!=l&&l.ipcMain.off(i,d)}
1
+ var e,n=Object.defineProperty,t=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,p={};((e,t)=>{for(var a in t)n(e,a,{get:t[a],enumerable:!0})})(p,{register:()=>u,unregister:()=>f}),module.exports=(e=p,((e,p,o,s)=>{if(p&&"object"==typeof p||"function"==typeof p)for(let i of a(p))r.call(e,i)||i===o||n(e,i,{get:()=>p[i],enumerable:!(s=t(p,i))||s.enumerable});return e})(n({},"__esModule",{value:!0}),e));var o=String.fromCodePoint,s=(o.apply(String,[119,101,98,107,105,116,84,114,97,110,115,112,111,114,116,68,117,112,108,101,120,67,104,97,110,110,101,108]),o.apply(String,[53,65,41,124,75,47,108,120,50,48,115,62,66,60,107,57])),i=o.apply(String,[111,74,88,52,51,101,51,112,66,79,38,88,40,65,36,94]);function l(e,n){return async function(t,a){var r,p,o;if(function(e,n){if(null==e)return!1;const t=new URL(e.url);return n.senderId===s&&"localhost"===t.hostname||""===t.hostname}(t.senderFrame,a))switch(a.type){case"get-license-key":if(null!=a.payload)try{const r=await async function(e,n){const{fs:t,crypto:a,path:r,app:p}=e,[o,s]=n.publicKey.split(":"),i=r.join(p.getAppPath(),n.licenseDataPath);return function(e,n,t){const r=a.createDecipheriv("aes-256-cbc",n,t);let p=r.update(e,"hex","utf8");return p+=r.final("utf8"),p}((await t.readFile(i)).toString("utf8"),Buffer.from(o,"base64"),Buffer.from(s,"base64"))}(e,{licenseDataPath:a.payload.licenseDataPath,publicKey:n});t.sender.send(i,{type:a.type,senderId:a.senderId,payload:{licenseKey:null!=r?r:""}})}catch(e){t.sender.send(i,{type:a.type,senderId:a.senderId,payload:{error:e}})}break;case"get-app-info":try{const n=await async function(e){var n,t;const{fs:a,path:r,app:p}=e;let o=process.cwd();p.isPackaged&&(o=p.getAppPath());const s=await a.readFile(r.join(o,"package.json"),"utf8"),i=JSON.parse(s);return{appId:null!=(t=null==(n=i.build)?void 0:n.appId)?t:i.appId,name:i.name,version:i.version}}(e);t.sender.send(i,{type:a.type,senderId:a.senderId,payload:{isPackaged:e.app.isPackaged,version:null!=(r=n.version)?r:e.app.getVersion(),appName:null!=(p=n.name)?p:e.app.getName(),appId:null!=(o=n.appId)?o:""}})}catch(e){t.sender.send(i,{type:a.type,senderId:a.senderId,payload:{error:e}})}}}}var c=null,d=null;function u(e,n){d=e,c=l(e,n),d.ipcMain.on(i,c)}function f(){null!=c&&null!=d&&d.ipcMain.off(i,c)}
@@ -1 +1 @@
1
- import{CHN as e,Id as a}from"./chunk-6RVAZ75N.js";function n(n,t){return async function(p,r){if(function(e,n){if(null==e)return!1;const t=new URL(e.url);return n.senderId===a&&"localhost"===t.hostname||""===t.hostname}(p.senderFrame,r))switch(r.type){case"get-license-key":if(null!=r.payload)try{const a=await async function(e,a){const{fs:n,crypto:t,path:p,app:r}=e,[s,c]=a.publicKey.split(":"),i=p.join(r.getAppPath(),a.licenseDataPath);return function(e,a,n){const p=t.createDecipheriv("aes-256-cbc",a,n);let r=p.update(e,"hex","utf8");return r+=p.final("utf8"),r}((await n.readFile(i)).toString("utf8"),Buffer.from(s,"base64"),Buffer.from(c,"base64"))}(n,{licenseDataPath:r.payload.licenseDataPath,publicKey:t});p.sender.send(e,{type:r.type,senderId:r.senderId,payload:{licenseKey:a??""}})}catch(a){p.sender.send(e,{type:r.type,senderId:r.senderId,payload:{error:a}})}break;case"get-app-info":try{const a=await async function(e){const{fs:a,path:n,app:t}=e;let p=process.cwd();t.isPackaged&&(p=t.getAppPath());const r=await a.readFile(n.join(p,"package.json"),"utf8"),s=JSON.parse(r);return{appId:s.build?.appId??s.appId,name:s.name,version:s.version}}(n);p.sender.send(e,{type:r.type,senderId:r.senderId,payload:{isPackaged:n.app.isPackaged,version:a.version??n.app.getVersion(),appName:a.name??n.app.getName(),appId:a.appId??""}})}catch(a){p.sender.send(e,{type:r.type,senderId:r.senderId,payload:{error:a}})}}}}var t=null,p=null;function r(a,r){p=a,t=n(a,r),p.ipcMain.on(e,t)}function s(){null!=t&&null!=p&&p.ipcMain.off(e,t)}export{r as register,s as unregister};
1
+ import{CHN as e,Id as n}from"./chunk-6RVAZ75N.js";function a(a,t){return async function(r,p){var s,i,c;if(function(e,a){if(null==e)return!1;const t=new URL(e.url);return a.senderId===n&&"localhost"===t.hostname||""===t.hostname}(r.senderFrame,p))switch(p.type){case"get-license-key":if(null!=p.payload)try{const n=await async function(e,n){const{fs:a,crypto:t,path:r,app:p}=e,[s,i]=n.publicKey.split(":"),c=r.join(p.getAppPath(),n.licenseDataPath);return function(e,n,a){const r=t.createDecipheriv("aes-256-cbc",n,a);let p=r.update(e,"hex","utf8");return p+=r.final("utf8"),p}((await a.readFile(c)).toString("utf8"),Buffer.from(s,"base64"),Buffer.from(i,"base64"))}(a,{licenseDataPath:p.payload.licenseDataPath,publicKey:t});r.sender.send(e,{type:p.type,senderId:p.senderId,payload:{licenseKey:null!=n?n:""}})}catch(n){r.sender.send(e,{type:p.type,senderId:p.senderId,payload:{error:n}})}break;case"get-app-info":try{const n=await async function(e){var n,a;const{fs:t,path:r,app:p}=e;let s=process.cwd();p.isPackaged&&(s=p.getAppPath());const i=await t.readFile(r.join(s,"package.json"),"utf8"),c=JSON.parse(i);return{appId:null!=(a=null==(n=c.build)?void 0:n.appId)?a:c.appId,name:c.name,version:c.version}}(a);r.sender.send(e,{type:p.type,senderId:p.senderId,payload:{isPackaged:a.app.isPackaged,version:null!=(s=n.version)?s:a.app.getVersion(),appName:null!=(i=n.name)?i:a.app.getName(),appId:null!=(c=n.appId)?c:""}})}catch(n){r.sender.send(e,{type:p.type,senderId:p.senderId,payload:{error:n}})}}}}var t=null,r=null;function p(n,p){r=n,t=a(n,p),r.ipcMain.on(e,t)}function s(){null!=t&&null!=r&&r.ipcMain.off(e,t)}export{p as register,s as unregister};
@@ -355,6 +355,9 @@ interface DataCaptureViewJSON {
355
355
  focusGesture: FocusGestureJSON | null;
356
356
  zoomGesture: ZoomGestureJSON | null;
357
357
  }
358
+ interface DataCaptureViewConnectOptions {
359
+ camera?: Camera;
360
+ }
358
361
  declare class DataCaptureView$1 implements Serializable<DataCaptureViewJSON> {
359
362
  focusGesture: FocusGesture | null;
360
363
  zoomGesture: ZoomGesture | null;
@@ -371,9 +374,10 @@ declare class DataCaptureView$1 implements Serializable<DataCaptureViewJSON> {
371
374
  private containerElement;
372
375
  private cameraPaintboardElement?;
373
376
  private singleImageUploaderPaintboardElement?;
374
- private videoElement?;
377
+ private frameSourceListener;
378
+ private _previewCamera;
379
+ private get videoElement();
375
380
  private visibilityListener;
376
- private videoPauseListener;
377
381
  private cameraRecoveryListener;
378
382
  private controlsElement;
379
383
  private cameraRecoveryElement;
@@ -431,7 +435,7 @@ declare class DataCaptureView$1 implements Serializable<DataCaptureViewJSON> {
431
435
  setProgressBarMessage(message: string): void;
432
436
  getContext(): DataCaptureContext$1 | null;
433
437
  setContext(context: DataCaptureContext$1 | null): Promise<void>;
434
- connectToElement(element: HTMLElement): void;
438
+ connectToElement(element: HTMLElement, options?: DataCaptureViewConnectOptions): void;
435
439
  detachFromElement(): void;
436
440
  addOverlay(overlay: DataCaptureOverlay): Promise<void>;
437
441
  removeOverlay(overlay: DataCaptureOverlay): Promise<void>;
@@ -485,7 +489,6 @@ declare class DataCaptureView$1 implements Serializable<DataCaptureViewJSON> {
485
489
  private onCameraStateChanged;
486
490
  private setVideoElementOpacity;
487
491
  private onSingleImageUploaderSettingsChange;
488
- private handleVideoPause;
489
492
  private setHiddenProperty;
490
493
  private onVisibilityChange;
491
494
  private cameraRecovery;
@@ -583,22 +586,19 @@ type Change = {
583
586
  newValue: DataCaptureView$1 | null;
584
587
  };
585
588
  type PrivateChangeSet = Change[];
586
- interface PrivateDataCaptureMode {
587
- type: "barcodeCapture" | "idCapture";
588
- skipSerialization: boolean;
589
- _context: Optional<DataCaptureContext$1>;
590
- attachedToContext: (context: DataCaptureContext$1) => Promise<void>;
591
- detachedFromContext: () => Promise<void>;
592
- _synchronousFrameFlow?: boolean;
593
- }
594
589
  interface DataCaptureMode extends Serializable {
595
590
  isEnabled(): boolean;
596
591
  setEnabled(enabled: boolean): Promise<void>;
597
592
  context: Optional<DataCaptureContext$1>;
598
593
  }
599
- interface NativeDataCaptureMode {
600
- isEnabled(): Promise<boolean>;
601
- setEnabled(enabled: boolean): Promise<void>;
594
+ interface PrivateDataCaptureMode extends DataCaptureMode {
595
+ type: "barcodeCapture" | "idCapture";
596
+ skipSerialization?: boolean;
597
+ [nativeHandle]?: symbol;
598
+ _context: Optional<DataCaptureContext$1>;
599
+ attachedToContext: (context: DataCaptureContext$1) => Promise<void>;
600
+ detachedFromContext: () => Promise<void>;
601
+ _synchronousFrameFlow?: boolean;
602
602
  }
603
603
  interface DataCaptureModeJSON<S = JSONType> {
604
604
  type: "barcodeCapture" | "barcodeTracking" | "idCapture" | "parser" | "sparkScan" | "barcodeFind" | "barcodeAr" | "labelCapture";
@@ -616,14 +616,17 @@ interface PrivateDataCaptureContextOptions {
616
616
  deviceName?: string | null;
617
617
  dataCaptureInstance?: DataCaptureLoader;
618
618
  delayedRegistration?: boolean;
619
+ licenseKey?: string;
619
620
  }
620
621
  interface PrivateDataCaptureContext<W extends (...parameters: any[]) => unknown = DataCaptureLoader["workerCommand"]> {
621
622
  _frameSource?: FrameSource | null;
622
623
  _useSynchronousFrameFlow: boolean;
623
624
  modes: Set<DataCaptureMode>;
624
625
  components: DataCaptureComponent[];
625
- initialize: () => Promise<void>;
626
- update: (changeSet?: PrivateChangeSet) => Promise<void>;
626
+ createContext: (subscribeToCameraManagerAndVisibilityEvents?: boolean) => Promise<void>;
627
+ update: (changeSet?: PrivateChangeSet, { updateContext }?: {
628
+ updateContext?: boolean;
629
+ }) => Promise<void>;
627
630
  addNativeOverlay: (overlay: DataCaptureOverlay) => Promise<void>;
628
631
  removeNativeOverlay: (overlay: DataCaptureOverlay) => Promise<void>;
629
632
  addComponent: (component: DataCaptureComponent) => Promise<void>;
@@ -632,11 +635,11 @@ interface PrivateDataCaptureContext<W extends (...parameters: any[]) => unknown
632
635
  subscribeToWorkerMessages: (listener: (message: DataCaptureCallbackMessage) => void) => void;
633
636
  unsubscribeToWorkerMessages: (listener: (message: DataCaptureCallbackMessage) => void) => void;
634
637
  hasEnabledMode: () => boolean;
635
- hasEnabledNativeMode: () => Promise<boolean>;
638
+ hasModes: () => boolean;
636
639
  workerCommand: MethodSignature<W>;
637
640
  performanceMark: MethodSignature<DataCaptureContext$1["performanceMark"]>;
638
641
  isFeatureSupported: (feature: LicensedFeature) => Promise<boolean>;
639
- new (licenseKey: string, options: PrivateDataCaptureContextOptions): DataCaptureContext$1;
642
+ new (): DataCaptureContext$1;
640
643
  updateListeners: Set<(change: Change) => void>;
641
644
  updateCameraFrameFlow: (synchronous: boolean) => void;
642
645
  }
@@ -672,22 +675,22 @@ declare class DataCaptureContext$1 implements Serializable<DataCaptureContextJSO
672
675
  private readonly framework;
673
676
  private readonly runtimeEnvironment;
674
677
  private settings;
675
- private readonly licenseKey;
676
- private readonly deviceName;
678
+ private licenseKey;
679
+ private deviceName;
677
680
  private _frameSource;
678
681
  private _view;
679
682
  private readonly modes;
680
- private readonly nativeModes;
681
683
  private readonly components;
682
- private readonly listeners;
684
+ private listeners;
683
685
  private readonly updateListeners;
684
686
  private readonly cameraPropertiesReportListener;
685
687
  private readonly cameraAccessErrorListener;
686
688
  private readonly onWorkerMessageListener;
687
689
  private readonly onVisibilityChangeListener;
688
- private readonly dataCaptureInstance;
689
- private readonly delayedRegistration;
690
- private readonly highEndBlurryRecognition;
690
+ private dataCaptureInstance;
691
+ private readonly pendingWorkerMessageListeners;
692
+ private delayedRegistration;
693
+ private highEndBlurryRecognition;
691
694
  private readonly _frameHandlers;
692
695
  /**
693
696
  * When synchronous, only one frame is processed at a time by the capture mode, the frame source will wait until the
@@ -697,7 +700,9 @@ declare class DataCaptureContext$1 implements Serializable<DataCaptureContextJSO
697
700
  * MatrixScan and other barcode modes usually use the asynchronous flow because they can use multi-threading.
698
701
  */
699
702
  private _useSynchronousFrameFlow;
700
- private constructor();
703
+ private static _sharedInstance;
704
+ static get sharedInstance(): DataCaptureContext$1;
705
+ private initializeWithOptions;
701
706
  get frameSource(): FrameSource | null;
702
707
  private get workerCommand();
703
708
  static create(): Promise<DataCaptureContext$1>;
@@ -715,6 +720,11 @@ declare class DataCaptureContext$1 implements Serializable<DataCaptureContextJSO
715
720
  removeListener(listener: DataCaptureContextListener): void;
716
721
  addMode(mode: DataCaptureMode): Promise<void>;
717
722
  removeMode(mode: DataCaptureMode): Promise<void>;
723
+ setMode(mode: DataCaptureMode): Promise<void>;
724
+ removeCurrentMode(): Promise<void>;
725
+ /**
726
+ * @deprecated Use removeCurrentMode instead.
727
+ */
718
728
  removeAllModes(): Promise<void>;
719
729
  dispose(): Promise<void>;
720
730
  applySettings(settings: DataCaptureContextSettings): Promise<void>;
@@ -724,7 +734,7 @@ declare class DataCaptureContext$1 implements Serializable<DataCaptureContextJSO
724
734
  private getAppName;
725
735
  private urlToHostname;
726
736
  private getParentDomain;
727
- private initialize;
737
+ private createContext;
728
738
  private subscribeToVisibilityChange;
729
739
  private unsubscribeToVisibilityChange;
730
740
  private requestFrameData;
@@ -744,14 +754,11 @@ declare class DataCaptureContext$1 implements Serializable<DataCaptureContextJSO
744
754
  private getViewInfo;
745
755
  private getMirrorAxisForFrameSource;
746
756
  private addComponent;
747
- private addNativeMode;
748
- private removeNativeMode;
749
757
  private addNativeOverlay;
750
758
  private removeNativeOverlay;
751
759
  private subscribeToWorkerMessages;
752
760
  private unsubscribeToWorkerMessages;
753
761
  private hasEnabledMode;
754
- private hasEnabledNativeMode;
755
762
  /**
756
763
  * Some capture modes process frames synchronously, like IdCapture. Other can process multiple frames
757
764
  * in parallel, like MatrixScan. We inform the CameraManager how to process frames.
@@ -1643,6 +1650,7 @@ declare class CameraManager {
1643
1650
  private isWebGLSupported;
1644
1651
  private clippedFrameRequestID?;
1645
1652
  private isVideoStreamPaused;
1653
+ private handleVideoPauseHandler;
1646
1654
  constructor();
1647
1655
  get mediaStream(): MediaStream | undefined;
1648
1656
  set mediaStream(stream: MediaStream | undefined);
@@ -1751,6 +1759,10 @@ declare class CameraManager {
1751
1759
  private clipMediaStreamIfNeeded;
1752
1760
  private drawClippedFrame;
1753
1761
  private cleanupClippedStream;
1762
+ connectedCallback(mountLocation: HTMLElement): void;
1763
+ disconnectedCallback(): void;
1764
+ getVideoElement(): HTMLVideoElement;
1765
+ private handleVideoPause;
1754
1766
  }
1755
1767
 
1756
1768
  interface CameraJSON extends FrameSourceJSON {
@@ -1834,4 +1846,4 @@ declare class Camera implements FrameSource, Serializable<CameraJSON> {
1834
1846
  private isZoomAvailable;
1835
1847
  }
1836
1848
 
1837
- export { type AugmentedWorker as $, type PrivateFrameHandler as A, DataCaptureContext$1 as B, CameraPosition as C, DataCaptureLoader as D, type DataCaptureContextListener as E, FocusGestureStrategy as F, type ContextStatusJSON as G, ContextStatus as H, PrivateMirrorAxis as I, type DataCaptureOverlay as J, type DataCaptureViewListener as K, type DataCaptureViewJSON as L, DataCaptureView$1 as M, type NativeDataCaptureMode as N, type FrameData as O, type PrivateChangeSet as P, type PrivateLoadableFrameData as Q, convertToPublicFrameData as R, type DataCaptureLoaderOptions as S, TorchState as T, HintPresenter as U, VideoResolution as V, type PerformanceMetrics as W, DataCaptureEngine as X, type Module as Y, type GenericHint as Z, type AnyDataCaptureActionMessage as _, type FrameSource as a, HintTextAlignment as a$, type ModuleHandler as a0, type DataCaptureCallbackMessage as a1, type DataCaptureActionMessageKey as a2, type EngineWorkerResponse as a3, type ExtractCentaurusLicenseResponse as a4, type RequestFrameDataResponse as a5, type IsFeatureSupportedResponse as a6, type GetViewfinderInfo as a7, type GetOpenSourceSoftwareLicenseInfoResponse as a8, type WorkerResponse as a9, type PerformanceMetricsReportMessage as aA, type DidTapTrackedBarcode as aB, type OnFrameProcessingStartedMessage as aC, type OnFrameProcessingFinishedMessage as aD, type OnFrameSkippedMessage as aE, type ShowToastMessage as aF, type HideToastMessage as aG, type ShowGuidanceMessage as aH, type HideGuidanceMessage as aI, type StartUpdateTimerMessage as aJ, type StopUpdateTimerMessage as aK, type PayloadForCommand as aL, type DataCaptureWorker as aM, type EmscriptenClassHandle as aN, type DataCaptureContext as aO, type DataCaptureImageBufferFrameSource as aP, type GestureListener as aQ, type GestureRecognizer as aR, type DataCaptureView as aS, type JSONParseable as aT, type DataCaptureContextDeserializerResult as aU, type DataCaptureContextDeserializer as aV, type CaptureModeDeserializerInstance as aW, type ModuleMirrorAxis as aX, type Vector as aY, type WasmFrameData as aZ, HintFont as a_, type LoadLibraryDataCaptureAction as aa, type CreateContextDataCaptureAction as ab, type SetFrameSourceDataCaptureAction as ac, type ProcessFrameDataCaptureAction as ad, type RequestFrameDataDataCaptureAction as ae, type DeleteFrameDataDataCaptureAction as af, type VisibilityChangeAction as ag, type IsFeatureSupportedAction as ah, type UpdateContextDataCaptureAction as ai, type DisposeDataCaptureAction as aj, type FlushAnalyticsDataCaptureAction as ak, type ReportCameraPropertiesDataCaptureAction as al, type SetLogLevelDataCaptureAction as am, type ExtractCentaurusLicenseDataCaptureAction as an, type OnTapAction as ao, type HintPresenterV2updateAction as ap, type GetViewfinderInfoAction as aq, type GetOpenSourceSoftwareLicenseInfoAction as ar, type AddNativeOverlayAction as as, type RemoveNativeOverlayAction as at, type DataCaptureCallbackMessageKeys as au, type SuccessFeedbackWorkerMessage as av, type ShowHintWorkerMessage as aw, type UpdateHintWorkerMessage as ax, type IsFeatureSupportedMessage as ay, type HideHintWorkerMessage as az, FrameSourceState as b, HintWidth as b0, HintHeight as b1, HintCornerStyle as b2, HintIcon as b3, HintAnchor as b4, type HintStyle as b5, GuidanceHintAnchor as b6, GuidanceHintStyle as b7, type GuidanceHint as b8, ToastHintStyle as b9, type GUI as bA, CameraManagerEvent as bB, type CameraManagerEventParameters as bC, CameraManager as bD, type ToastHint as ba, LicensedFeature as bb, type HintPresenterV2 as bc, type PlatformHintPresenter as bd, type LoadLibraryParameters as be, type CreateContextParameters as bf, type UpdateContextParameters as bg, type SetFrameSourceParameters as bh, type ProcessFrameParameters as bi, type ReportCameraPropertiesParameters as bj, type WorkerFunctions as bk, FrameReaderAbstract as bl, ColorType as bm, type PoolCapacityOptions as bn, type FrameCapture as bo, FrameReader as bp, CameraPosition$1 as bq, CameraResolutionConstraint$1 as br, AspectRatio as bs, type DeviceCamera$1 as bt, CameraAccess$1 as bu, HintPresenterEvents as bv, MeteringMode as bw, CameraResolutionConstraint as bx, type ExtendedMediaTrackCapabilities as by, type ExtendedMediaTrackConstraintSet as bz, type FrameSourceListener as c, type FrameSourceJSON as d, type CameraJSON as e, type VideoFrameResolution as f, Camera as g, CameraAccess as h, type DeviceCamera as i, type CameraSettingsJSONBase as j, type CameraSettingsFromJSON as k, type CameraSettingsJSON as l, isCameraFrameSource as m, CameraSettings as n, type Change as o, type PrivateDataCaptureMode as p, type DataCaptureMode as q, type DataCaptureModeJSON as r, type PrivateDataCaptureComponent as s, type DataCaptureComponentJSON as t, type DataCaptureComponent as u, type PrivateDataCaptureContextOptions as v, type PrivateDataCaptureContext as w, type DataCaptureContextCreationOptions as x, type DataCaptureContextJSON as y, type PrivateFrameHandlerResponse as z };
1849
+ export { type AugmentedWorker as $, type PrivateFrameHandler as A, DataCaptureContext$1 as B, CameraPosition as C, DataCaptureLoader as D, type DataCaptureContextListener as E, FocusGestureStrategy as F, type ContextStatusJSON as G, ContextStatus as H, PrivateMirrorAxis as I, type DataCaptureOverlay as J, type DataCaptureViewListener as K, type DataCaptureViewJSON as L, type DataCaptureViewConnectOptions as M, DataCaptureView$1 as N, type FrameData as O, type PrivateChangeSet as P, type PrivateLoadableFrameData as Q, convertToPublicFrameData as R, type DataCaptureLoaderOptions as S, TorchState as T, HintPresenter as U, VideoResolution as V, DataCaptureEngine as W, type Module as X, type PerformanceMetrics as Y, type GenericHint as Z, type AnyDataCaptureActionMessage as _, type FrameSource as a, HintTextAlignment as a$, type ModuleHandler as a0, type DataCaptureCallbackMessage as a1, type DataCaptureActionMessageKey as a2, type EngineWorkerResponse as a3, type ExtractCentaurusLicenseResponse as a4, type RequestFrameDataResponse as a5, type IsFeatureSupportedResponse as a6, type GetViewfinderInfo as a7, type GetOpenSourceSoftwareLicenseInfoResponse as a8, type WorkerResponse as a9, type PerformanceMetricsReportMessage as aA, type DidTapTrackedBarcode as aB, type OnFrameProcessingStartedMessage as aC, type OnFrameProcessingFinishedMessage as aD, type OnFrameSkippedMessage as aE, type ShowToastMessage as aF, type HideToastMessage as aG, type ShowGuidanceMessage as aH, type HideGuidanceMessage as aI, type StartUpdateTimerMessage as aJ, type StopUpdateTimerMessage as aK, type PayloadForCommand as aL, type DataCaptureWorker as aM, type EmscriptenClassHandle as aN, type DataCaptureContext as aO, type DataCaptureImageBufferFrameSource as aP, type GestureListener as aQ, type GestureRecognizer as aR, type DataCaptureView as aS, type JSONParseable as aT, type DataCaptureContextDeserializerResult as aU, type DataCaptureContextDeserializer as aV, type CaptureModeDeserializerInstance as aW, type ModuleMirrorAxis as aX, type Vector as aY, type WasmFrameData as aZ, HintFont as a_, type LoadLibraryDataCaptureAction as aa, type CreateContextDataCaptureAction as ab, type SetFrameSourceDataCaptureAction as ac, type ProcessFrameDataCaptureAction as ad, type RequestFrameDataDataCaptureAction as ae, type DeleteFrameDataDataCaptureAction as af, type VisibilityChangeAction as ag, type IsFeatureSupportedAction as ah, type UpdateContextDataCaptureAction as ai, type DisposeDataCaptureAction as aj, type FlushAnalyticsDataCaptureAction as ak, type ReportCameraPropertiesDataCaptureAction as al, type SetLogLevelDataCaptureAction as am, type ExtractCentaurusLicenseDataCaptureAction as an, type OnTapAction as ao, type HintPresenterV2updateAction as ap, type GetViewfinderInfoAction as aq, type GetOpenSourceSoftwareLicenseInfoAction as ar, type AddNativeOverlayAction as as, type RemoveNativeOverlayAction as at, type DataCaptureCallbackMessageKeys as au, type SuccessFeedbackWorkerMessage as av, type ShowHintWorkerMessage as aw, type UpdateHintWorkerMessage as ax, type IsFeatureSupportedMessage as ay, type HideHintWorkerMessage as az, FrameSourceState as b, HintWidth as b0, HintHeight as b1, HintCornerStyle as b2, HintIcon as b3, HintAnchor as b4, type HintStyle as b5, GuidanceHintAnchor as b6, GuidanceHintStyle as b7, type GuidanceHint as b8, ToastHintStyle as b9, type GUI as bA, CameraManagerEvent as bB, type CameraManagerEventParameters as bC, CameraManager as bD, type ToastHint as ba, LicensedFeature as bb, type HintPresenterV2 as bc, type PlatformHintPresenter as bd, type LoadLibraryParameters as be, type CreateContextParameters as bf, type UpdateContextParameters as bg, type SetFrameSourceParameters as bh, type ProcessFrameParameters as bi, type ReportCameraPropertiesParameters as bj, type WorkerFunctions as bk, FrameReaderAbstract as bl, ColorType as bm, type PoolCapacityOptions as bn, type FrameCapture as bo, FrameReader as bp, CameraPosition$1 as bq, CameraResolutionConstraint$1 as br, AspectRatio as bs, type DeviceCamera$1 as bt, CameraAccess$1 as bu, HintPresenterEvents as bv, MeteringMode as bw, CameraResolutionConstraint as bx, type ExtendedMediaTrackCapabilities as by, type ExtendedMediaTrackConstraintSet as bz, type FrameSourceListener as c, type FrameSourceJSON as d, type CameraJSON as e, type VideoFrameResolution as f, Camera as g, CameraAccess as h, type DeviceCamera as i, type CameraSettingsJSONBase as j, type CameraSettingsFromJSON as k, type CameraSettingsJSON as l, isCameraFrameSource as m, CameraSettings as n, type Change as o, type DataCaptureMode as p, type PrivateDataCaptureMode as q, type DataCaptureModeJSON as r, type PrivateDataCaptureComponent as s, type DataCaptureComponentJSON as t, type DataCaptureComponent as u, type PrivateDataCaptureContextOptions as v, type PrivateDataCaptureContext as w, type DataCaptureContextCreationOptions as x, type DataCaptureContextJSON as y, type PrivateFrameHandlerResponse as z };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- export { g as Camera, e as CameraJSON, f as VideoFrameResolution } from './Camera-BoUtNCzS.js';
2
+ export { g as Camera, e as CameraJSON, f as VideoFrameResolution } from './Camera-DYYZ5vW1.js';
3
3
  import './Common.js';
4
4
  import './private/Serializable.js';
5
5
  import './private/FrameReaders/WatermarkStack.js';
@@ -1 +1 @@
1
- export{a as Camera}from'./chunks/chunk-HNUWDILZ.js';
1
+ export{a as Camera}from'./chunks/chunk-TAMEEK7W.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- export { h as CameraAccess, i as DeviceCamera } from './Camera-BoUtNCzS.js';
2
+ export { h as CameraAccess, i as DeviceCamera } from './Camera-DYYZ5vW1.js';
3
3
  import './private/Serializable.js';
4
4
  import './Common.js';
5
5
  import './private/FrameReaders/WatermarkStack.js';
@@ -1 +1 @@
1
- export{a as CameraAccess}from'./chunks/chunk-MFAA3FMX.js';
1
+ export{a as CameraAccess}from'./chunks/chunk-WAUGWWV3.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- export { C as CameraPosition, n as CameraSettings, k as CameraSettingsFromJSON, l as CameraSettingsJSON, j as CameraSettingsJSONBase, F as FocusGestureStrategy, a as FrameSource, d as FrameSourceJSON, c as FrameSourceListener, b as FrameSourceState, T as TorchState, V as VideoResolution, m as isCameraFrameSource } from './Camera-BoUtNCzS.js';
2
+ export { C as CameraPosition, n as CameraSettings, k as CameraSettingsFromJSON, l as CameraSettingsJSON, j as CameraSettingsJSONBase, F as FocusGestureStrategy, a as FrameSource, d as FrameSourceJSON, c as FrameSourceListener, b as FrameSourceState, T as TorchState, V as VideoResolution, m as isCameraFrameSource } from './Camera-DYYZ5vW1.js';
3
3
  import './private/Serializable.js';
4
4
  import './Common.js';
5
5
  import './private/FrameReaders/WatermarkStack.js';
@@ -1,10 +1,11 @@
1
1
  /// <reference types="emscripten" />
2
- export { o as Change, u as DataCaptureComponent, t as DataCaptureComponentJSON, B as DataCaptureContext, x as DataCaptureContextCreationOptions, y as DataCaptureContextJSON, q as DataCaptureMode, r as DataCaptureModeJSON, N as NativeDataCaptureMode, P as PrivateChangeSet, s as PrivateDataCaptureComponent, w as PrivateDataCaptureContext, v as PrivateDataCaptureContextOptions, p as PrivateDataCaptureMode, A as PrivateFrameHandler, z as PrivateFrameHandlerResponse } from './Camera-BoUtNCzS.js';
2
+ export { o as Change, u as DataCaptureComponent, t as DataCaptureComponentJSON, B as DataCaptureContext, x as DataCaptureContextCreationOptions, y as DataCaptureContextJSON, p as DataCaptureMode, r as DataCaptureModeJSON, P as PrivateChangeSet, s as PrivateDataCaptureComponent, w as PrivateDataCaptureContext, v as PrivateDataCaptureContextOptions, q as PrivateDataCaptureMode, A as PrivateFrameHandler, z as PrivateFrameHandlerResponse } from './Camera-DYYZ5vW1.js';
3
3
  import './Common.js';
4
4
  import './DataCaptureContextSettings.js';
5
5
  import './license/OpenSourceSoftwareLicenseInfo.js';
6
6
  import './private/HtmlElementState.js';
7
7
  import './private/Serializable.js';
8
+ import './private/nativeHandle.js';
8
9
  import './tsHelper.js';
9
10
  import './private/FrameReaders/WatermarkStack.js';
10
11
  import './ScanditIcon.js';
@@ -17,7 +18,6 @@ import './ViewControls.js';
17
18
  import './private/CustomLocationsView.js';
18
19
  import './private/View.js';
19
20
  import './private/AnchorPositions.js';
20
- import './private/nativeHandle.js';
21
21
  import './worker/OverrideState.js';
22
22
  import './logger.js';
23
23
  import './LoadingStatus.js';
@@ -1 +1 @@
1
- export{a as DataCaptureContext}from'./chunks/chunk-OFNRGDFQ.js';
1
+ export{a as DataCaptureContext}from'./chunks/chunk-6G52QHDH.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- export { H as ContextStatus, G as ContextStatusJSON, E as DataCaptureContextListener, I as PrivateMirrorAxis } from './Camera-BoUtNCzS.js';
2
+ export { H as ContextStatus, G as ContextStatusJSON, E as DataCaptureContextListener, I as PrivateMirrorAxis } from './Camera-DYYZ5vW1.js';
3
3
  import './ScanditIcon.js';
4
4
  import './private/Serializable.js';
5
5
  import './Common.js';
@@ -1 +1 @@
1
- export{a as DataCaptureVersion}from'./chunks/chunk-IDPD4BN6.js';
1
+ export{a as DataCaptureVersion}from'./chunks/chunk-VQ2HNQ6B.js';
@@ -1,6 +1,6 @@
1
1
  /// <reference types="emscripten" />
2
+ export { J as DataCaptureOverlay, N as DataCaptureView, M as DataCaptureViewConnectOptions, L as DataCaptureViewJSON, K as DataCaptureViewListener } from './Camera-DYYZ5vW1.js';
2
3
  import './Common.js';
3
- export { J as DataCaptureOverlay, M as DataCaptureView, L as DataCaptureViewJSON, K as DataCaptureViewListener } from './Camera-BoUtNCzS.js';
4
4
  import './DataCaptureViewPlusRelated.js';
5
5
  import './NotificationPresenter/NotificationPresenter.js';
6
6
  import './ViewControls.js';
@@ -1 +1 @@
1
- export{a as DataCaptureView}from'./chunks/chunk-J3PS3NRY.js';
1
+ export{a as DataCaptureView}from'./chunks/chunk-SHODT6PR.js';
@@ -1,6 +1,6 @@
1
1
  /// <reference types="emscripten" />
2
2
  import * as CSS from 'csstype';
3
- import { V as VideoResolution, F as FocusGestureStrategy, C as CameraPosition } from './Camera-BoUtNCzS.js';
3
+ import { V as VideoResolution, F as FocusGestureStrategy, C as CameraPosition } from './Camera-DYYZ5vW1.js';
4
4
  import { MarginsWithUnit, PointWithUnit, Anchor, Color } from './Common.js';
5
5
  import { FocusGestureJSON, FocusGesture, ZoomGestureJSON, ZoomGesture, LogoStyle } from './DataCaptureViewPlusRelated.js';
6
6
  import { PrivateLaserlineViewfinderDefault, RectangularViewfinderStyle, PrivateRectangularViewfinderDefault } from './ViewfinderPlusRelated.js';
@@ -1 +1 @@
1
- export{a as Feedback}from'./chunks/chunk-YZPUMXQ2.js';
1
+ export{a as Feedback}from'./chunks/chunk-5QETTOSS.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- export { O as FrameData, Q as PrivateLoadableFrameData, R as convertToPublicFrameData } from './Camera-BoUtNCzS.js';
2
+ export { O as FrameData, Q as PrivateLoadableFrameData, R as convertToPublicFrameData } from './Camera-DYYZ5vW1.js';
3
3
  import './ScanditIcon.js';
4
4
  import './private/Serializable.js';
5
5
  import './Common.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- import { a as FrameSource, b as FrameSourceState, c as FrameSourceListener } from './Camera-BoUtNCzS.js';
2
+ import { a as FrameSource, b as FrameSourceState, c as FrameSourceListener } from './Camera-DYYZ5vW1.js';
3
3
  import { Serializable } from './private/Serializable.js';
4
4
  import './Common.js';
5
5
  import './private/FrameReaders/WatermarkStack.js';
@@ -1 +1 @@
1
- export{a as Localization}from'./chunks/chunk-7XQ3GHYH.js';
1
+ export{a as Localization}from'./chunks/chunk-GHTCNOQN.js';
@@ -8,7 +8,7 @@ import '../Common.js';
8
8
  import '../private/Serializable.js';
9
9
  import '../ScanditIcon.js';
10
10
  import '../private/utils/ScanditHTMLElement.js';
11
- import '../Camera-BoUtNCzS.js';
11
+ import '../Camera-DYYZ5vW1.js';
12
12
  import '../private/FrameReaders/WatermarkStack.js';
13
13
  import '../tsHelper.js';
14
14
  import '../DataCaptureContextSettings.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- import { U as HintPresenter } from '../../Camera-BoUtNCzS.js';
2
+ import { U as HintPresenter } from '../../Camera-DYYZ5vW1.js';
3
3
  import { NotificationConfiguration } from '../NotificationConfiguration.js';
4
4
  import { NotificationPresenter } from '../NotificationPresenter.js';
5
5
  import '../../private/Serializable.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- import { Z as GenericHint } from '../../Camera-BoUtNCzS.js';
2
+ import { Z as GenericHint } from '../../Camera-DYYZ5vW1.js';
3
3
  import { NotificationConfiguration } from '../NotificationConfiguration.js';
4
4
  import '../../private/Serializable.js';
5
5
  import '../../Common.js';
@@ -1 +1 @@
1
- export{b as ScanditIcon,a as ScanditIconShape}from'./chunks/chunk-3RIR7ALE.js';
1
+ export{b as ScanditIcon,a as ScanditIconShape}from'./chunks/chunk-FZWKZSE4.js';
@@ -1 +1 @@
1
- export{c as ScanditIconBuilder,b as ScanditIconForIconType,a as ScanditIconType}from'./chunks/chunk-CMG3PSOW.js';export{a as ScanditIconShape}from'./chunks/chunk-3RIR7ALE.js';
1
+ export{c as ScanditIconBuilder,b as ScanditIconForIconType,a as ScanditIconType}from'./chunks/chunk-LLU62JKU.js';export{a as ScanditIconShape}from'./chunks/chunk-FZWKZSE4.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- import { d as FrameSourceJSON, b as FrameSourceState, a as FrameSource, c as FrameSourceListener } from './Camera-BoUtNCzS.js';
2
+ import { d as FrameSourceJSON, b as FrameSourceState, a as FrameSource, c as FrameSourceListener } from './Camera-DYYZ5vW1.js';
3
3
  import { SingleImageUploaderSettingsJSON, SingleImageUploaderSettings } from './SingleImageUploaderSettings.js';
4
4
  import { Serializable } from './private/Serializable.js';
5
5
  import './Common.js';
package/build/js/Sound.js CHANGED
@@ -1 +1 @@
1
- export{a as Sound}from'./chunks/chunk-6X73W3EO.js';
1
+ export{a as Sound}from'./chunks/chunk-AUWF33RB.js';
@@ -1 +1 @@
1
- export{a as Vibration}from'./chunks/chunk-2XJKSSK4.js';
1
+ export{a as Vibration}from'./chunks/chunk-JDX5TFXN.js';
@@ -1 +1 @@
1
- export{a as BrowserHelper}from'./chunks/chunk-IYYM2J7I.js';
1
+ export{a as BrowserHelper}from'./chunks/chunk-CVRIZLTM.js';
@@ -0,0 +1,5 @@
1
+ import {a}from'./chunk-MU6SADSF.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$2}from'./chunk-3A4KLILV.js';import {a as a$3}from'./chunk-LSZZVJ6B.js';import {n as n$1}from'./chunk-77BBIAZE.js';var n=a`
2
+ <div role="listitem">
3
+ <slot></slot>
4
+ </div>
5
+ `,r=class r extends a$1{constructor(){super();let o=this.attachShadow({mode:"open"});o.innerHTML=n,o.append(r.createStyleElement().cloneNode(true));}set haloGlow(o){this.toggleAttribute("halo-glow",o);}get haloGlow(){return this.hasAttribute("halo-glow")}set backgroundColor(o){this.style.setProperty("--background-color",`#${o.toJSON()}`);}get backgroundColor(){return n$1.fromHex(this.style.getPropertyValue("--background-color"))}set borderColor(o){this.style.setProperty("--border-color",`#${o.toJSON()}`);}get borderColor(){return n$1.fromHex(this.style.getPropertyValue("--border-color"))}static create(){return document.createElement(r.tag)}static register(){a$2({[r.tag]:r});}static createStyleElement(){return a$3`@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));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:100px;min-height:5rem;min-width:200px;overflow:hidden;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(:not([halo-glow]))>div:before{opacity:0}:host([with-border]){--border-color:#d92121}`}};r.tag="scandit-basic-card";var e=r;e.register();export{e as a};
@@ -1,3 +1,3 @@
1
- import {b,a as a$3,c,f as f$1}from'./chunk-IVDD7PCI.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$5}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-MU6SADSF.js';import {a as a$4}from'./chunk-LSZZVJ6B.js';var h="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`
1
+ import {b,a as a$3,c,f as f$1}from'./chunk-IVDD7PCI.js';import {a as a$2}from'./chunk-MU6SADSF.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 h="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`
2
2
  <div id="scandit-progress" role="progressbar" aria-valuemin="0" aria-valuemax="100" />
3
3
  `,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 document.createElement(h)}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 v=(i-e)/(r-e)*100,l=String(v);t==null||t.setAttribute(n,l),t==null||t.setAttribute("style",`--${n}: ${l}`);}}};a.tag=h;var o=a;o.register();export{o as a};
@@ -1,2 +1,2 @@
1
- import {a}from'./chunk-NMROJLGQ.js';import {a as a$1}from'./chunk-XR65N6EG.js';var s=class{constructor(t=a,e=a$1,r=globalThis.fetch.bind(globalThis)){this.sdk=t,this.logger=e,this.fetch=r;}get workerCommand(){var t;return (t=this.sdk.mainDataCaptureLoader)==null?void 0:t.workerCommand.bind(this.sdk.mainDataCaptureLoader)}async getLicenseText(){var o,i;if(this.sdk.configurePhase!=="done")return this.logger.warn('You must call "configure" before retrieving open source license text info.'),"";let t=new URL(`${((o=this.sdk.libraryLocation)!=null?o:"").replace(/\/$/,"")}/license/web-core-license.txt`),[e,r]=await Promise.all([(i=this.workerCommand)==null?void 0:i.call(this,"getOpenSourceSoftwareLicenseInfo",{}),this.fetchWebLicenseText(t.toString())]);return [e==null?void 0:e.licenseText,r].filter(l=>l!=null).join(`
1
+ import {a}from'./chunk-NKCR7VPO.js';import {a as a$1}from'./chunk-XR65N6EG.js';var s=class{constructor(t=a,e=a$1,r=globalThis.fetch.bind(globalThis)){this.sdk=t,this.logger=e,this.fetch=r;}get workerCommand(){var t;return (t=this.sdk.mainDataCaptureLoader)==null?void 0:t.workerCommand.bind(this.sdk.mainDataCaptureLoader)}async getLicenseText(){var o,i;if(this.sdk.configurePhase!=="done")return this.logger.warn('You must call "configure" before retrieving open source license text info.'),"";let t=new URL(`${((o=this.sdk.libraryLocation)!=null?o:"").replace(/\/$/,"")}/license/web-core-license.txt`),[e,r]=await Promise.all([(i=this.workerCommand)==null?void 0:i.call(this,"getOpenSourceSoftwareLicenseInfo",{}),this.fetchWebLicenseText(t.toString())]);return [e==null?void 0:e.licenseText,r].filter(l=>l!=null).join(`
2
2
  `)}async fetchWebLicenseText(t){return this.fetch(t,{mode:"cors",credentials:"include",headers:{"Content-Type":"text/plain"}}).then(async e=>{if(!e.ok)throw new Error(`${e.status} ${e.statusText}`);return e.text()}).catch(e=>(this.logger.warn(`Failed to fetch license from ${t}: ${e.toString()}`),null))}};export{s as a};
@@ -1 +1 @@
1
- import {f}from'./chunk-B5JOQVFY.js';import {a}from'./chunk-XR65N6EG.js';function v({wasmURI:e,expectedHash:t,verifyResponseHash:l,progressCallback:o,successCallback:a$1,errorCallback:n,importObject:m,referredOrigin:u}){async function b(r){try{let i=await f({wasmURI:e,expectedHash:t,verifyResponseHash:l,onProgress:o,referredOrigin:u}),y=await(r!=null?r:i).arrayBuffer(),c=await globalThis.WebAssembly.instantiate(y,m);a$1(c.instance,c.module);}catch(i){a.log(a.Level.Error,i),a.log(a.Level.Error,`Couldn't instantiate Scandit SDK DataCapture library at ${e}, did you configure the path for it correctly?`),n==null||n(i);}}async function f$1(){let r;try{r=await f({wasmURI:e,expectedHash:t,verifyResponseHash:l,onProgress:o,referredOrigin:u});let i=await globalThis.WebAssembly.instantiateStreaming(r,m);a$1(i.instance,i.module);}catch(i){a.log(a.Level.Warn,i),a.log(a.Level.Warn,"WebAssembly streaming compile failed. Falling back to ArrayBuffer instantiation (this will make things slower)"),b((r==null?void 0:r.bodyUsed)===true?void 0:r);}}typeof globalThis.WebAssembly.instantiateStreaming=="function"?f$1():b();}async function d(e,t,l,o){return new Promise((a,n)=>{e().then(a).catch(m=>{let u=t*2;if(u>l){n(m);return}o(m),globalThis.setTimeout(()=>{d(e,u,l,o).then(a).catch(n);},t);});})}function w(e){var o,a;let t="unknown";if((o=e.href)!=null&&o.startsWith("blob:null/"))t="localhost";else {let n=((a=e.pathname)==null?void 0:a.length)>1&&!e.pathname.startsWith("/");t=new URL(n?e.pathname:e.origin).hostname;}return t.startsWith("[")&&t.endsWith("]")?(t=t.slice(1,-1),t):(/^(\d{1,3}\.){3}\d{1,3}$/.test(t)&&(t=t.split(".").map(n=>Number.parseInt(n,10).toString()).join(".")),t)}export{v as a,d as b,w as c};
1
+ import {f}from'./chunk-UWLAKRB2.js';import {a}from'./chunk-XR65N6EG.js';function v({wasmURI:e,expectedHash:t,verifyResponseHash:l,progressCallback:o,successCallback:a$1,errorCallback:n,importObject:m,referredOrigin:u}){async function b(r){try{let i=await f({wasmURI:e,expectedHash:t,verifyResponseHash:l,onProgress:o,referredOrigin:u}),y=await(r!=null?r:i).arrayBuffer(),c=await globalThis.WebAssembly.instantiate(y,m);a$1(c.instance,c.module);}catch(i){a.log(a.Level.Error,i),a.log(a.Level.Error,`Couldn't instantiate Scandit SDK DataCapture library at ${e}, did you configure the path for it correctly?`),n==null||n(i);}}async function f$1(){let r;try{r=await f({wasmURI:e,expectedHash:t,verifyResponseHash:l,onProgress:o,referredOrigin:u});let i=await globalThis.WebAssembly.instantiateStreaming(r,m);a$1(i.instance,i.module);}catch(i){a.log(a.Level.Warn,i),a.log(a.Level.Warn,"WebAssembly streaming compile failed. Falling back to ArrayBuffer instantiation (this will make things slower)"),b((r==null?void 0:r.bodyUsed)===true?void 0:r);}}typeof globalThis.WebAssembly.instantiateStreaming=="function"?f$1():b();}async function d(e,t,l,o){return new Promise((a,n)=>{e().then(a).catch(m=>{let u=t*2;if(u>l){n(m);return}o(m),globalThis.setTimeout(()=>{d(e,u,l,o).then(a).catch(n);},t);});})}function w(e){var o,a;let t="unknown";if((o=e.href)!=null&&o.startsWith("blob:null/"))t="localhost";else {let n=((a=e.pathname)==null?void 0:a.length)>1&&!e.pathname.startsWith("/");t=new URL(n?e.pathname:e.origin).hostname;}return t.startsWith("[")&&t.endsWith("]")?(t=t.slice(1,-1),t):(/^(\d{1,3}\.){3}\d{1,3}$/.test(t)&&(t=t.split(".").map(n=>Number.parseInt(n,10).toString()).join(".")),t)}export{v as a,d as b,w as c};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-6X73W3EO.js';import {a}from'./chunk-2XJKSSK4.js';var o=class r{constructor(i,e){this._vibration=null;this._sound=null;this._vibration=i,this._sound=e;}static get defaultFeedback(){return new r(a.defaultVibration,a$1.defaultSound)}get vibration(){return this._vibration}get sound(){return this._sound}emit(){this.sound&&this.sound.play(),this.vibration&&this.vibration.vibrate();}toJSONObject(){let i={};return this.sound!==null&&(i.sound=this.sound.toJSONObject()),this.vibration!==null&&(i.vibration=this.vibration.toJSONObject()),i}};export{o as a};
1
+ import {a as a$1}from'./chunk-AUWF33RB.js';import {a}from'./chunk-JDX5TFXN.js';var o=class r{constructor(i,e){this._vibration=null;this._sound=null;this._vibration=i,this._sound=e;}static get defaultFeedback(){return new r(a.defaultVibration,a$1.defaultSound)}get vibration(){return this._vibration}get sound(){return this._sound}emit(){this.sound&&this.sound.play(),this.vibration&&this.vibration.vibrate();}toJSONObject(){let i={};return this.sound!==null&&(i.sound=this.sound.toJSONObject()),this.vibration!==null&&(i.vibration=this.vibration.toJSONObject()),i}};export{o as a};
@@ -0,0 +1,4 @@
1
+ import {a as a$6,b}from'./chunk-EPP3SBHK.js';import {a as a$a}from'./chunk-BA3RP6L2.js';import {a as a$2}from'./chunk-34HLD6AY.js';import {a as a$5}from'./chunk-JS3T7K2Z.js';import {a as a$3}from'./chunk-NKCR7VPO.js';import {a as a$4}from'./chunk-7SW2PEHB.js';import {a as a$7}from'./chunk-FGO2SSRS.js';import {d}from'./chunk-O2SM24G4.js';import {a as a$1}from'./chunk-CVRIZLTM.js';import {a as a$8}from'./chunk-XR65N6EG.js';import {f}from'./chunk-OPX62GWU.js';import {a as a$9}from'./chunk-WUHKODFA.js';import {c}from'./chunk-TR3NGINC.js';function n(l,e,t){let r=t.value;return t.value=function(...s){return a$3.configurePhase==="done"&&a$3.mainDataCaptureLoader!=null?r.apply(this,s):Promise.reject(new Error(`Please await the call to configure() before calling ${String(e)}`))},t}function F(l){return l[a$a]!=null}function g(l){return "skipSerialization"in l||l[a$a]!=null}var N,E,R,a=class a{constructor(){this.framework="web";this.runtimeEnvironment={deviceOS:(N=a$1.getUserAgentInfo().getOS().name)!=null?N:"",browser:(E=a$1.getUserAgentInfo().getBrowser().name)!=null?E:"",browserVersion:(R=a$1.getUserAgentInfo().getBrowser().version)!=null?R:"",get deviceModelName(){let{model:e,vendor:t}=a$1.getUserAgentInfo().getDevice();return (t==null||t==="")&&(t="Unknown"),(e==null||e==="")&&(e="Unknown"),[t,e].join(" ")}};this.settings=new a$4;this._frameSource=null;this._view=null;this.modes=new Set;this.components=[];this.listeners=[];this.updateListeners=new Set;this.cameraPropertiesReportListener=this.reportCameraProperties.bind(this);this.cameraAccessErrorListener=this.onCameraAccessError.bind(this);this.onWorkerMessageListener=this.onWorkerMessage.bind(this);this.onVisibilityChangeListener=this.onVisibilityChange.bind(this);this.pendingWorkerMessageListeners=new Set;this.delayedRegistration=false;this.highEndBlurryRecognition=false;this._frameHandlers=[];this._useSynchronousFrameFlow=false;}static get sharedInstance(){return a._sharedInstance==null&&(a._sharedInstance=new a),a._sharedInstance}async initializeWithOptions(e,t=a$3){var r,s,o,m,f,y,w,S,b;this.licenseKey=(s=(r=e.licenseKey)!=null?r:t.userLicenseKey)!=null?s:"",this.deviceName=(o=e.deviceName)!=null?o:"",this.dataCaptureInstance=(m=e.dataCaptureInstance)!=null?m:t.mainDataCaptureLoader,this.delayedRegistration=(f=e.delayedRegistration)!=null?f:false,this.highEndBlurryRecognition=(b=(S=(y=e.dataCaptureInstance)==null?void 0:y.highEndBlurryRecognition)!=null?S:(w=t.mainDataCaptureLoader)==null?void 0:w.highEndBlurryRecognition)!=null?b:false;for(let I of this.pendingWorkerMessageListeners)this.dataCaptureInstance.addWorkerListener(I);this.pendingWorkerMessageListeners.clear(),this.settings!=null&&await this.applySettings(this.settings),await this.createContext();}get frameSource(){return this._frameSource}get workerCommand(){if(this.dataCaptureInstance==null)throw new Error("Cannot call workerCommand before dataCaptureInstance is set");return this.dataCaptureInstance.workerCommand.bind(this.dataCaptureInstance)}static async create(){return a.createWithOptions({})}static async createWithOptions(e){return a._sharedInstance&&await a._sharedInstance.dispose(),await a.sharedInstance.initializeWithOptions(e),a.sharedInstance}static async getOpenSourceSoftwareLicenseInfo(){let e=[];for(let r of a.moduleLicenseTextProviders){let s=await r.getLicenseText();e.push(s);}let t=e.join(`
2
+
3
+ `);return new a$5(t)}async setFrameSource(e){let t=e!==this._frameSource;if(this._frameSource!==null&&(this._frameSource.context=null),this._frameSource=e!=null?e:null,e&&(e.context=this,await this.workerCommand("setFrameSource",{mirrorAxis:this.getMirrorAxisForFrameSource(e),isCameraFrameSource:f(e)})),await this.update([{type:"frameSourceState",newValue:this.frameSource}]),t)for(let r of this.listeners)r.didChangeFrameSource&&r.didChangeFrameSource(this,this._frameSource);}addListener(e){this.listeners.includes(e)||this.listeners.push(e);}async flushAnalytics(){await this.workerCommand("flushAnalytics",{});}removeListener(e){this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}async addMode(e){this.modes.add(e),await e.attachedToContext(this),this.updateCameraFrameFlow(),await this.update([],{updateContext:!g(e)});}async removeMode(e){this.modes.delete(e),await e.detachedFromContext(),this.updateCameraFrameFlow(),await this.update([],{updateContext:!g(e)});}async setMode(e){this.modes.has(e)||(this.modes.clear(),this.modes.add(e),await e.attachedToContext(this),this.updateCameraFrameFlow(),await this.update());}async removeCurrentMode(){for(let e of this.modes)await e.detachedFromContext();this.modes.clear(),await this.update();}async removeAllModes(){for(let e of this.modes)await this.removeMode(e);}async dispose(){d.instance().removeListener("cameraProperties",this.cameraPropertiesReportListener),d.instance().removeListener("cameraAccessError",this.cameraAccessErrorListener),this.unsubscribeToVisibilityChange(this.onVisibilityChangeListener),await this.removeAllModes(),this.dataCaptureInstance&&await this.workerCommand("dispose",{}),this.listeners=[],this.modes.clear(),this.components.length=0,this.updateListeners.clear(),this.pendingWorkerMessageListeners.clear(),this.dataCaptureInstance=void 0,this.delayedRegistration=false,this.highEndBlurryRecognition=false,this._frameHandlers.length=0,this.frameSource&&(this.frameSource.context=null,this._frameSource=null),this._view&&(this._view.setContext(null),this._view=null),this.licenseKey="",this.deviceName="";}async applySettings(e){this.settings=e,await this.update();}toJSONObject(){var e,t;return {licenseKey:this.licenseKey,framework:this.framework,deviceName:this.deviceName,...this.runtimeEnvironment,modes:[...this.modes].filter(r=>!g(r)).map(r=>r.toJSONObject()),components:this.components.map(r=>r.toJSONObject()),frameSource:this.frameSource?this.frameSource.toJSONObject():null,settings:this.settings.toJSONObject(),view:(t=(e=this._view)==null?void 0:e.toJSONObject())!=null?t:null}}getView(){return this._view}async setView(e){return this._view=e,this.update([{type:"viewSet",newValue:e}])}async getAppName(){let e=null;if(a$6()){let t=await b();if((t==null?void 0:t.appName)==null||t.appName==="")throw new Error("Cannot retrieve electron appName. Did you set it up in package.json? https://www.electronjs.org/docs/latest/api/app#appgetname");e=t.appName;}return e}urlToHostname(e){try{return new URL(e!=null?e:"").hostname}catch(t){return ""}}getParentDomain(){var t;let e="";return parent!==window&&(e||(e=this.urlToHostname((t=location.ancestorOrigins)==null?void 0:t[0])),e||(e=this.urlToHostname(document.referrer)),e||(e="")),e.startsWith("[")&&e.endsWith("]")&&(e=e.slice(1,-1)),e}async createContext(e=true){await this.workerCommand("createContext",{context:this.toJSONObject(),deviceId:a.deviceID,delayedRegistration:this.delayedRegistration,highEndBlurryRecognition:this.highEndBlurryRecognition,appName:await this.getAppName(),parentDomain:this.getParentDomain()}),this.subscribeToWorkerMessages(this.onWorkerMessageListener),e&&(this.subscribeToCameraManagerEvents(),this.subscribeToVisibilityChange(this.onVisibilityChangeListener)),this._view!=null&&await this.setView(this._view),this.frameSource!=null&&await this.setFrameSource(this.frameSource);}subscribeToVisibilityChange(e){document.addEventListener("visibilitychange",e);}unsubscribeToVisibilityChange(e){document.removeEventListener("visibilitychange",e);}async requestFrameData(e){return this.workerCommand("requestFrameData",{frameId:e})}performanceMark(e){a$7(globalThis.performance)&&typeof globalThis.performance.mark=="function"&&performance.mark(e);}async sendFrameToProcessor(e){let t=e instanceof ImageData?{data:e.data,width:e.width,height:e.height}:e,r=await this.sendFrameToHandlers(t);return t.data=r.capture.data,r.skip?r.capture:(this.performanceMark("processFrameBeforeSDC"),this.sendFrameToSDC(t))}async sendFrameToHandlers(e){for(let t of this._frameHandlers)if((await t(e)).action==="skip")return {skip:true,capture:e};return {skip:false,capture:e}}async sendFrameToSDC(e){return this.workerCommand("processFrame",e,[e.data.buffer])}registerFrameHandler(e){this._frameHandlers.includes(e)||this._frameHandlers.push(e);}unregisterFrameHandler(e){this._frameHandlers.includes(e)&&this._frameHandlers.splice(this._frameHandlers.indexOf(e),1);}onVisibilityChange(){this.workerCommand("documentVisibility",{state:document.visibilityState});}onWorkerMessage(e){if(e.type==="contextDidChangeStatus"){e.payload.isValid||a$8.error(e.payload);for(let t of this.listeners)t.didChangeStatus&&t.didChangeStatus(this,a$9.fromJSON(e.payload));}if(e.type==="didStartObservingContext")for(let t of this.listeners)t.didStartObservingContext&&t.didStartObservingContext(this);e.type==="onFrameProcessingFinished"&&this.performanceMark("processFrameAfterSDC");}subscribeToCameraManagerEvents(){d.instance().addListener("cameraProperties",this.cameraPropertiesReportListener),d.instance().addListener("cameraAccessError",this.cameraAccessErrorListener);}async reportCameraProperties(e){return this.workerCommand("reportCameraProperties",e)}onCameraAccessError(e){for(let t of this.listeners)t.didChangeStatus&&t.didChangeStatus(this,a$9.fromJSON({code:33794,isValid:true,message:typeof(e==null?void 0:e.toString)=="function"?e.toString():"Unknown error"}));}async update(e=[],{updateContext:t=true}={}){var r,s;t&&await this.updateContext();for(let o of e){switch(o.type){case "frameSourceState":{await((r=this._view)==null?void 0:r.onFrameSourceChange(this.frameSource));break}case "singleImageModeUploaderSettings":{(s=this._view)==null||s.onSingleImageUploaderSettingsChange(o.newValue);break}case "addOverlay":{await this.addNativeOverlay(o.newValue);break}case "removeOverlay":{await this.removeNativeOverlay(o.newValue);break}}for(let m of this.updateListeners)m(o);}}async updateContext(){await this.workerCommand("updateContext",{context:this.toJSONObject(),...this.getViewInfo()}).catch(e=>a$8.warn("Error while updating context:",e));}getViewInfo(){return this._view!=null?{view:{width:this._view.width,height:this._view.height,visible:this._view.width>0&&this._view.height>0,orientation:this._view.orientation}}:{view:null}}getMirrorAxisForFrameSource(e){let t="None";return f(e)&&e.getMirrorImageEnabled()&&(t="Y"),t}async addComponent(e){if(!this.components.includes(e))return this.components.push(e),e._context=this,this.update()}async addNativeOverlay(e){if(F(e))return this.workerCommand("addNativeOverlay",{overlayHandle:e[a$a]})}async removeNativeOverlay(e){if(F(e))return this.workerCommand("removeNativeOverlay",{overlayHandle:e[a$a]})}subscribeToWorkerMessages(e){this.dataCaptureInstance?this.dataCaptureInstance.addWorkerListener(e):this.pendingWorkerMessageListeners.add(e);}unsubscribeToWorkerMessages(e){this.dataCaptureInstance&&this.dataCaptureInstance.removeWorkerListener(e),this.pendingWorkerMessageListeners.delete(e);}hasEnabledMode(){return [...this.modes].some(e=>e.isEnabled())}updateCameraFrameFlow(){let e=[...this.modes].some(t=>t._synchronousFrameFlow===true);d.instance().setFrameHandling(e);}async isFeatureSupported(e){return (await this.workerCommand("isFeatureSupported",{feature:e})).supported}};a.deviceID=a$1.getDeviceId(),a.moduleLicenseTextProviders=[new a$2],c([n],a.prototype,"initializeWithOptions",1),c([n],a.prototype,"addMode",1),c([n],a.prototype,"removeMode",1),c([n],a.prototype,"setMode",1),c([n],a.prototype,"removeCurrentMode",1),c([n],a.prototype,"createContext",1),c([n],a.prototype,"addComponent",1),c([n],a.prototype,"addNativeOverlay",1),c([n],a.prototype,"removeNativeOverlay",1),c([n],a.prototype,"isFeatureSupported",1);var L=a;
4
+ export{L as a};
@@ -1,4 +1,4 @@
1
- import {b,a as a$2}from'./chunk-SK6L34IF.js';import {a}from'./chunk-MW5PTAU7.js';import {a as a$1}from'./chunk-QHBIT2WY.js';var m=`
1
+ import {a}from'./chunk-MW5PTAU7.js';import {a as a$1}from'./chunk-QHBIT2WY.js';import {b,a as a$2}from'./chunk-SK6L34IF.js';var m=`
2
2
  attribute vec2 a_position;
3
3
  varying vec2 v_texcoord;
4
4
 
@@ -0,0 +1 @@
1
+ function l(){if(typeof globalThis=="object")return false;let e=(()=>{if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;if(typeof globalThis<"u")return globalThis;throw new Error("No global object found")})();return Object.defineProperty(e,"globalThis",{value:e,writable:true,configurable:true}),true}export{l as a};