@incodetech/core 0.0.0-dev-20260910-30fb659a → 0.0.0-dev-20260911-d4e8be9f

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 (69) hide show
  1. package/dist/{BrowserDiagnosticsCryptoProvider-BCbOmuXk.esm.js → BrowserDiagnosticsCryptoProvider-DGdx3emH.esm.js} +1 -1
  2. package/dist/{MotionSensorProvider-nnSH-kVd.esm.js → MotionSensorProvider-Vlyhbcty.esm.js} +1 -1
  3. package/dist/ae-signature.esm.js +1 -1
  4. package/dist/{apiError-CaZfzHR5.esm.js → apiError-DsGq8I1L.esm.js} +1 -1
  5. package/dist/authentication.esm.js +2 -2
  6. package/dist/{authenticationManager-DGbFYQEa.esm.js → authenticationManager-C1kut8FN.esm.js} +4 -4
  7. package/dist/{authenticationStateMachine-ChM9tVwT.esm.js → authenticationStateMachine-CTCuMCty.esm.js} +2 -2
  8. package/dist/camera.esm.js +1 -1
  9. package/dist/{deepsightLoader-CgAY2Xik.esm.js → deepsightLoader-HcpfFvrJ.esm.js} +5 -5
  10. package/dist/document-capture.d.ts +1 -1
  11. package/dist/document-capture.esm.js +2 -2
  12. package/dist/{documentCaptureManager-BqY_B0Ii.esm.js → documentCaptureManager-BTpHZMgW.esm.js} +1 -1
  13. package/dist/{documentCaptureManager-DD0qtFdE.d.ts → documentCaptureManager-DensIj5F.d.ts} +1 -1
  14. package/dist/{documentCaptureStateMachine-D_9dw5b1.esm.js → documentCaptureStateMachine-CPizkpcg.esm.js} +2 -2
  15. package/dist/dynamic-forms.esm.js +2 -2
  16. package/dist/{dynamicFormsManager-DbJ2sx60.esm.js → dynamicFormsManager-CIODOItK.esm.js} +1 -1
  17. package/dist/{dynamicFormsStateMachine-DdOXUivK.esm.js → dynamicFormsStateMachine-Dz0LqEEn.esm.js} +1 -1
  18. package/dist/ekyb.esm.js +3 -3
  19. package/dist/{ekybManager-DQb_i9cC.esm.js → ekybManager-BQb_E24w.esm.js} +1 -1
  20. package/dist/{ekybStateMachine-CbK8tAgd.esm.js → ekybStateMachine-Dzf-Pbdt.esm.js} +1 -1
  21. package/dist/electronic-signature.esm.js +1 -1
  22. package/dist/{electronicSignatureManager-BO07Vfiv.esm.js → electronicSignatureManager-Bf6B6pEU.esm.js} +1 -1
  23. package/dist/extensibility.d.ts +3 -3
  24. package/dist/extensibility.esm.js +12 -12
  25. package/dist/{faceCaptureManagerFactory-DgAdH1KT.esm.js → faceCaptureManagerFactory-CoWc6zH_.esm.js} +3 -3
  26. package/dist/{faceCaptureSetup-DdCkYn9V.esm.js → faceCaptureSetup-C209BNIm.esm.js} +3 -3
  27. package/dist/{feature-management-B1auhoHt.esm.js → feature-management-DJHtBpsz.esm.js} +1 -1
  28. package/dist/feature-management.esm.js +1 -1
  29. package/dist/flow.d.ts +193 -187
  30. package/dist/flow.esm.js +4 -4
  31. package/dist/{flowCompletionService-DJNQBnYX.esm.js → flowCompletionService-CTbI_iTT.esm.js} +1 -1
  32. package/dist/{flowServices-B6Dn_OP0.esm.js → flowServices-Nv0vz_a6.esm.js} +30 -5
  33. package/dist/geolocation.esm.js +2 -2
  34. package/dist/{geolocationManager-B9Fpz7LU.esm.js → geolocationManager-C4qEcTWe.esm.js} +1 -1
  35. package/dist/{geolocationStateMachine-iLoEsywE.esm.js → geolocationStateMachine-DIZOaCem.esm.js} +1 -1
  36. package/dist/id-selfie-flow.esm.js +8 -8
  37. package/dist/id.esm.js +4 -4
  38. package/dist/{idCaptureDefaults-R53rpPfW.esm.js → idCaptureDefaults-DO_iW674.esm.js} +3 -2
  39. package/dist/{idCaptureManager-CvDHZ2YE.esm.js → idCaptureManager-oNVoPND4.esm.js} +5 -5
  40. package/dist/{idCaptureServices-D_mcjCtz.esm.js → idCaptureServices-0b3RJwM_.esm.js} +4 -4
  41. package/dist/{idCaptureStateMachine-CL_f4BrG.esm.js → idCaptureStateMachine-CBELAdUH.esm.js} +9 -9
  42. package/dist/identity-reuse.d.ts +1 -1
  43. package/dist/{identityReuseManager-BFDI7iFK.d.ts → identityReuseManager-v2TH5g7e.d.ts} +4 -4
  44. package/dist/index.esm.js +1 -1
  45. package/dist/mandatory-consent.d.ts +1 -1
  46. package/dist/{mandatoryConsentManager-CSh8HjSF.d.ts → mandatoryConsentManager-BxrRrlBs.d.ts} +4 -4
  47. package/dist/{onDeviceFaceResults-BtD_Dij3.esm.js → onDeviceFaceResults-C10QzrYa.esm.js} +6 -53
  48. package/dist/{permissionGuards-BHw_SD3h.esm.js → permissionGuards-DxbvOoZJ.esm.js} +1 -1
  49. package/dist/{permissionServices-J5S1dEIf.esm.js → permissionServices-f7nBnW5P.esm.js} +2 -2
  50. package/dist/personhood.esm.js +6 -6
  51. package/dist/qe-signature.esm.js +1 -1
  52. package/dist/{runChildModule-DL_BwJt5.esm.js → runChildModule-BvxjSxjZ.esm.js} +1 -1
  53. package/dist/safeStorage-Dp9m6aOh.esm.js +422 -0
  54. package/dist/{sdkVersion-CeUGP0Pv.esm.js → sdkVersion-BRy4YQdU.esm.js} +1 -1
  55. package/dist/selfie.esm.js +6 -6
  56. package/dist/{selfieManager-CiVA7398.esm.js → selfieManager-C680J2y6.esm.js} +4 -4
  57. package/dist/{selfieStateMachine-BCbLR8OJ.esm.js → selfieStateMachine-CV3OsU5z.esm.js} +2 -2
  58. package/dist/{session-B-b1IjuR.esm.js → session-BxzK5bo1.esm.js} +3 -3
  59. package/dist/session.esm.js +4 -4
  60. package/dist/{sessionInitializer-Gw37lpQ_.esm.js → sessionInitializer-BpyJ5y2B.esm.js} +82 -14
  61. package/dist/{setup-CxO2a0J_.esm.js → setup-BQ5-0CB6.esm.js} +6 -5
  62. package/dist/{trueSightService-BTf2KSpq.esm.js → trueSightService-CGUA9dm6.esm.js} +2 -2
  63. package/dist/video-selfie.esm.js +5 -5
  64. package/dist/{videoSelfieCameraWarmer-C0GHxpmK.esm.js → videoSelfieCameraWarmer-Dn4l6XzJ.esm.js} +4 -4
  65. package/dist/{safeStorage-0bZuUtSP.esm.js → warmup-BOM-sD-6.esm.js} +14 -434
  66. package/dist/wasm.esm.js +2 -2
  67. package/dist/{wasmDsFlagSync-CyCdsfox.esm.js → wasmDsFlagSync-C3k_VK9o.esm.js} +1 -1
  68. package/dist/workflow.esm.js +15 -15
  69. package/package.json +1 -1
@@ -1,28 +1,28 @@
1
- import { l as BrowserStorageProvider } from "./setup-CxO2a0J_.esm.js";
1
+ import { l as BrowserStorageProvider } from "./setup-BQ5-0CB6.esm.js";
2
2
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
3
- import { s as exposeExperimentOnce } from "./feature-management-B1auhoHt.esm.js";
3
+ import { s as exposeExperimentOnce } from "./feature-management-DJHtBpsz.esm.js";
4
4
  import { n as revokeObjectURL } from "./IBrowserEnvironmentCapability-DEaRRk-R.esm.js";
5
5
  import { r as getToken, t as api } from "./api-Bx3gKW_y.esm.js";
6
- import { c as trueSightHintTransition, l as trueSightLog, r as noteTrueSightCaptureActivity } from "./trueSightService-BTf2KSpq.esm.js";
6
+ import { c as trueSightHintTransition, l as trueSightLog, r as noteTrueSightCaptureActivity } from "./trueSightService-CGUA9dm6.esm.js";
7
7
  import { n as eventModuleNames, s as recordExperimentAssignmentOnce } from "./events-ijlbX_Wx.esm.js";
8
- import { t as getDisableIpify } from "./sessionInitializer-Gw37lpQ_.esm.js";
8
+ import { t as getDisableIpify } from "./sessionInitializer-BpyJ5y2B.esm.js";
9
9
  import { t as endpoints } from "./endpoints-D3B9mUHh.esm.js";
10
10
  import { t as addDeviceStats } from "./stats-DkK-f8JT.esm.js";
11
11
  import { a as isIOS, s as isIPad, t as isAndroid, u as isMacOsSafari } from "./platform-DkcRc9JV.esm.js";
12
- import "./session-B-b1IjuR.esm.js";
12
+ import "./session-BxzK5bo1.esm.js";
13
13
  import { c as not, i as assign, l as raise, n as enqueueActions, o as and, r as sendTo, t as setup } from "./xstate.esm-BuFLFuzz.esm.js";
14
14
  import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
15
15
  import { n as getUrlSearchParam, t as buildUrlWithSearchParams } from "./urlUtils-D6phjq1-.esm.js";
16
- import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-J5S1dEIf.esm.js";
16
+ import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-f7nBnW5P.esm.js";
17
17
  import { t as sleep } from "./ITimerCapability-DgdDzp8G.esm.js";
18
18
  import { t as IncodeCanvas } from "./canvas-E1zGkel4.esm.js";
19
19
  import { a as StreamCanvasProcessingSession } from "./recordingsRepository-CCWy13M-.esm.js";
20
20
  import { t as getBrowser } from "./getBrowser-Cbe1C4Tn.esm.js";
21
21
  import { n as getWindowDimensions } from "./getDeviceClass-CeBiEayS.esm.js";
22
22
  import { t as StreamCanvasCapture } from "./StreamCanvasCapture-D2XcXCZ4.esm.js";
23
- import { n as needsMotionPrimeOnlyFromPermission, r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-BHw_SD3h.esm.js";
23
+ import { n as needsMotionPrimeOnlyFromPermission, r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-DxbvOoZJ.esm.js";
24
24
  import { r as flagIdManualReview, t as imageFileToDataUrl } from "./imageFile-CLaua6xO.esm.js";
25
- import { _ as CAPTURE_OPTIMIZING, c as startRecordingSession, d as uploadIdImage, f as uploadManualIdFile, g as resolveIdCaptureThresholds, i as pauseRecordingForAttempt, l as stopRecording, m as ID_ERROR_CODES, o as prepareRecordingForCameraRetry, p as validateUploadResponse, r as initializeIdCapture, s as processId, t as addBarcode, u as stopStream, v as OPTIMIZING_WATCHDOG_MARGIN_MS, y as getIdCameraStream } from "./idCaptureServices-D_mcjCtz.esm.js";
25
+ import { _ as CAPTURE_OPTIMIZING, c as startRecordingSession, d as uploadIdImage, f as uploadManualIdFile, g as resolveIdCaptureThresholds, i as pauseRecordingForAttempt, l as stopRecording, m as ID_ERROR_CODES, o as prepareRecordingForCameraRetry, p as validateUploadResponse, r as initializeIdCapture, s as processId, t as addBarcode, u as stopStream, v as OPTIMIZING_WATCHDOG_MARGIN_MS, y as getIdCameraStream } from "./idCaptureServices-0b3RJwM_.esm.js";
26
26
  //#region src/modules/id/digitalUpload/digitalUploadErrors.ts
27
27
  const TERMINAL_FAIL_REASONS = /* @__PURE__ */ new Set(["DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED", "ID_TYPE_UNACCEPTABLE"]);
28
28
  function isKnownFailReason(reason) {
@@ -2133,7 +2133,7 @@ const startRecordingActor = fromPromise(async ({ input }) => {
2133
2133
  });
2134
2134
  const initializeDeepsightSessionActor = fromPromise(async ({ input }) => {
2135
2135
  if (!input.dependencies) return;
2136
- const { loadDeepsightSession } = await import("./deepsightLoader-CgAY2Xik.esm.js");
2136
+ const { loadDeepsightSession } = await import("./deepsightLoader-HcpfFvrJ.esm.js");
2137
2137
  return loadDeepsightSession({
2138
2138
  ds: input.ds,
2139
2139
  storage: input.dependencies.storage,
@@ -1,2 +1,2 @@
1
- import { c as identityReuseMachine, d as ReusableDocument, f as SubmitResponse, i as createIdentityReuseManagerFromActor, l as FetchDocumentsResponse, n as IdentityReuseState, o as SCAN_NEW_DOCUMENT, r as createIdentityReuseManager, s as SelectedDocumentId, t as IdentityReuseManager, u as IdentityReuseConfig } from "./identityReuseManager-BFDI7iFK.js";
1
+ import { c as identityReuseMachine, d as ReusableDocument, f as SubmitResponse, i as createIdentityReuseManagerFromActor, l as FetchDocumentsResponse, n as IdentityReuseState, o as SCAN_NEW_DOCUMENT, r as createIdentityReuseManager, s as SelectedDocumentId, t as IdentityReuseManager, u as IdentityReuseConfig } from "./identityReuseManager-v2TH5g7e.js";
2
2
  export { type FetchDocumentsResponse, type IdentityReuseConfig, type IdentityReuseManager, type IdentityReuseState, type ReusableDocument, SCAN_NEW_DOCUMENT, type SelectedDocumentId, type SubmitResponse, createIdentityReuseManager, createIdentityReuseManagerFromActor, identityReuseMachine };
@@ -108,14 +108,14 @@ declare const identityReuseMachine: StateMachine<IdentityReuseContext, {
108
108
  type: "setError";
109
109
  params: NonReducibleUnknown;
110
110
  };
111
- setSelectedDocument: {
112
- type: "setSelectedDocument";
113
- params: NonReducibleUnknown;
114
- };
115
111
  clearError: {
116
112
  type: "clearError";
117
113
  params: NonReducibleUnknown;
118
114
  };
115
+ setSelectedDocument: {
116
+ type: "setSelectedDocument";
117
+ params: NonReducibleUnknown;
118
+ };
119
119
  }>, Values<{
120
120
  hasDocuments: {
121
121
  type: "hasDocuments";
package/dist/index.esm.js CHANGED
@@ -1,2 +1,2 @@
1
- import { i as reset, r as isConfigured, s as setup } from "./setup-CxO2a0J_.esm.js";
1
+ import { i as reset, r as isConfigured, s as setup } from "./setup-BQ5-0CB6.esm.js";
2
2
  export { isConfigured, reset, setup };
@@ -1,3 +1,3 @@
1
1
  import { r as MandatoryConsentConfig } from "./types-DJ2OM9rw.js";
2
- import { a as MandatoryConsentActor, i as createMandatoryConsentManagerFromActor, n as MandatoryConsentState, o as mandatoryConsentMachine, r as createMandatoryConsentManager, t as MandatoryConsentManager } from "./mandatoryConsentManager-CSh8HjSF.js";
2
+ import { a as MandatoryConsentActor, i as createMandatoryConsentManagerFromActor, n as MandatoryConsentState, o as mandatoryConsentMachine, r as createMandatoryConsentManager, t as MandatoryConsentManager } from "./mandatoryConsentManager-BxrRrlBs.js";
3
3
  export { type MandatoryConsentActor, type MandatoryConsentConfig, type MandatoryConsentManager, type MandatoryConsentState, createMandatoryConsentManager, createMandatoryConsentManagerFromActor, mandatoryConsentMachine };
@@ -57,14 +57,14 @@ declare const mandatoryConsentMachine: StateMachine<MandatoryConsentContext, {
57
57
  type: "setError";
58
58
  params: NonReducibleUnknown;
59
59
  };
60
- clearError: {
61
- type: "clearError";
62
- params: NonReducibleUnknown;
63
- };
64
60
  toggleSigned: {
65
61
  type: "toggleSigned";
66
62
  params: NonReducibleUnknown;
67
63
  };
64
+ clearError: {
65
+ type: "clearError";
66
+ params: NonReducibleUnknown;
67
+ };
68
68
  resetContext: {
69
69
  type: "resetContext";
70
70
  params: NonReducibleUnknown;
@@ -1,8 +1,9 @@
1
- import { t as ensureWasmPipelines } from "./setup-CxO2a0J_.esm.js";
2
- import { i as BaseWasmProvider, l as wasmRuntime } from "./safeStorage-0bZuUtSP.esm.js";
1
+ import { t as ensureWasmPipelines } from "./setup-BQ5-0CB6.esm.js";
2
+ import { s as wasmRuntime } from "./warmup-BOM-sD-6.esm.js";
3
+ import { i as BaseWasmProvider } from "./safeStorage-Dp9m6aOh.esm.js";
3
4
  import { r as getToken } from "./api-Bx3gKW_y.esm.js";
4
- import { c as trueSightHintTransition, l as trueSightLog, r as noteTrueSightCaptureActivity } from "./trueSightService-BTf2KSpq.esm.js";
5
- import "./sessionInitializer-Gw37lpQ_.esm.js";
5
+ import { c as trueSightHintTransition, l as trueSightLog, r as noteTrueSightCaptureActivity } from "./trueSightService-CGUA9dm6.esm.js";
6
+ import { v as yieldUntilNextPaint } from "./sessionInitializer-BpyJ5y2B.esm.js";
6
7
  import { t as addDeviceStats } from "./stats-DkK-f8JT.esm.js";
7
8
  import { c as isIPhone14OrHigher, i as isDesktop } from "./platform-DkcRc9JV.esm.js";
8
9
  import { a as stopCameraStream, r as requestCameraAccess } from "./camera-_2sXMXiF.esm.js";
@@ -10,54 +11,6 @@ import { t as sleep } from "./ITimerCapability-DgdDzp8G.esm.js";
10
11
  import { t as IncodeCanvas } from "./canvas-E1zGkel4.esm.js";
11
12
  import { a as StreamCanvasProcessingSession, n as startRecording, r as stopRecording$1, t as createRecordingSession } from "./recordingsRepository-CCWy13M-.esm.js";
12
13
  import { i as hasBackCamera, n as getBackCameraStream, r as getDesktopCameraStream, t as ensureFrontCameraStream } from "./backCameraStream-DE_5qY04.esm.js";
13
- //#region ../infra/src/scheduling/yieldUntilNextPaint.ts
14
- /**
15
- * Resolves after the browser has had a chance to commit and paint a queued
16
- * render.
17
- *
18
- * Strategy:
19
- * - `requestAnimationFrame` callbacks fire BEFORE the paint of the frame
20
- * they belong to (per the HTML5 "update the rendering" step). If we
21
- * resolve the promise inside a rAF callback, the await-continuation
22
- * runs as a microtask immediately after the callback returns — still
23
- * before the paint phase of that frame. A caller that then blocks the
24
- * main thread (e.g. synchronous WASM `processPhoto`) starves the paint.
25
- * - We therefore chain rAF → setTimeout: the rAF fires before frame N's
26
- * paint, the setTimeout runs as a macrotask scheduled after frame N's
27
- * "update the rendering" step, which the browser will only get to once
28
- * the paint actually lands. By the time setTimeout fires, the paint
29
- * for the queued render is on screen.
30
- * - In environments where rAF never ticks (jsdom, happy-dom, backgrounded
31
- * tabs), a parallel `setTimeout` fallback at 100 ms resolves instead.
32
- * 100 ms is comfortably longer than two real-browser frames so rAF +
33
- * setTimeout wins reliably in any foregrounded browser. (An earlier
34
- * implementation raced rAF against a `MessageChannel` macrotask, but
35
- * MessageChannel drains immediately after the current task's
36
- * microtasks — before the next paint — so it resolved the promise too
37
- * early and defeated the whole point of the helper.)
38
- *
39
- * Lives in infra because it touches browser APIs (`requestAnimationFrame`,
40
- * `setTimeout`) that the architecture rules forbid from core. Core modules
41
- * that need to yield to the browser render loop should import this helper
42
- * directly via its file path.
43
- */
44
- function yieldUntilNextPaint() {
45
- return new Promise((resolve) => {
46
- let resolved = false;
47
- const done = () => {
48
- if (resolved) return;
49
- resolved = true;
50
- resolve();
51
- };
52
- if (typeof requestAnimationFrame === "function") requestAnimationFrame(() => {
53
- requestAnimationFrame(() => {
54
- setTimeout(done, 0);
55
- });
56
- });
57
- setTimeout(done, 100);
58
- });
59
- }
60
- //#endregion
61
14
  //#region ../infra/src/wasm/faceProcessingWasmApi.ts
62
15
  var FaceProcessingWasmApi = class {
63
16
  constructor(runtime = wasmRuntime) {
@@ -516,7 +469,7 @@ async function stopRecording(session) {
516
469
  }
517
470
  }
518
471
  async function initializeDeepsightSession(options) {
519
- const { loadDeepsightSession } = await import("./deepsightLoader-CgAY2Xik.esm.js");
472
+ const { loadDeepsightSession } = await import("./deepsightLoader-HcpfFvrJ.esm.js");
520
473
  return loadDeepsightSession({
521
474
  ds: options.ds,
522
475
  storage: options.storage
@@ -1,4 +1,4 @@
1
- import { a as isWasmMotionPrimedForModule } from "./permissionServices-J5S1dEIf.esm.js";
1
+ import { a as isWasmMotionPrimedForModule } from "./permissionServices-f7nBnW5P.esm.js";
2
2
  //#region src/internal/permissions/permissionGuards.ts
3
3
  function resolveStoredPermissionResult(fromEvent, fromContext) {
4
4
  if (fromEvent === "granted" || fromEvent === "denied" || fromEvent === "prompt" || fromEvent === "refresh") return fromEvent;
@@ -1,6 +1,6 @@
1
- import { r as WasmUtilProvider } from "./safeStorage-0bZuUtSP.esm.js";
1
+ import { r as WasmUtilProvider } from "./safeStorage-Dp9m6aOh.esm.js";
2
2
  import { n as isAndroidWebView } from "./platform-DkcRc9JV.esm.js";
3
- import { t as MotionSensorProvider } from "./MotionSensorProvider-nnSH-kVd.esm.js";
3
+ import { t as MotionSensorProvider } from "./MotionSensorProvider-Vlyhbcty.esm.js";
4
4
  import { a as stopCameraStream, o as clearCameraGrantedInDocument, r as requestCameraAccess, s as isCameraGrantedInDocument } from "./camera-_2sXMXiF.esm.js";
5
5
  //#region ../infra/src/media/permissions.ts
6
6
  async function queryPermission(name) {
@@ -1,17 +1,17 @@
1
- import { l as BrowserStorageProvider } from "./setup-CxO2a0J_.esm.js";
2
- import { r as WasmUtilProvider } from "./safeStorage-0bZuUtSP.esm.js";
1
+ import { l as BrowserStorageProvider } from "./setup-BQ5-0CB6.esm.js";
2
+ import { r as WasmUtilProvider } from "./safeStorage-Dp9m6aOh.esm.js";
3
3
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
4
4
  import { t as api } from "./api-Bx3gKW_y.esm.js";
5
- import { C as createApi$1, v as randomUUID, y as getStoredHttpConfig } from "./trueSightService-BTf2KSpq.esm.js";
5
+ import { C as createApi$1, v as randomUUID, y as getStoredHttpConfig } from "./trueSightService-CGUA9dm6.esm.js";
6
6
  import { n as eventModuleNames } from "./events-ijlbX_Wx.esm.js";
7
- import { _ as getThumbmarkId, m as isBrowserSimulation, n as getFingerprintEnabled, v as getDeviceFingerprintInfo, y as BrowserEnvironmentProvider } from "./sessionInitializer-Gw37lpQ_.esm.js";
7
+ import { _ as getThumbmarkId, b as BrowserEnvironmentProvider, m as isBrowserSimulation, n as getFingerprintEnabled, y as getDeviceFingerprintInfo } from "./sessionInitializer-BpyJ5y2B.esm.js";
8
8
  import { t as endpoints } from "./endpoints-D3B9mUHh.esm.js";
9
9
  import { i as assign, s as createActor, t as setup, u as createManager } from "./xstate.esm-BuFLFuzz.esm.js";
10
10
  import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
11
11
  import { a as stopCameraStream, r as requestCameraAccess } from "./camera-_2sXMXiF.esm.js";
12
- import { i as requestPermission, t as checkPermission } from "./permissionServices-J5S1dEIf.esm.js";
13
- import { f as stopStream, l as startDetection, p as FaceDetectionProvider, s as initializeDeepsightSession } from "./onDeviceFaceResults-BtD_Dij3.esm.js";
12
+ import { i as requestPermission, t as checkPermission } from "./permissionServices-f7nBnW5P.esm.js";
14
13
  import { t as sleep } from "./ITimerCapability-DgdDzp8G.esm.js";
14
+ import { f as stopStream, l as startDetection, p as FaceDetectionProvider, s as initializeDeepsightSession } from "./onDeviceFaceResults-C10QzrYa.esm.js";
15
15
  import { t as StreamCanvasCapture } from "./StreamCanvasCapture-D2XcXCZ4.esm.js";
16
16
  //#region src/modules/personhood/personhoodServices.ts
17
17
  /**
@@ -1,4 +1,4 @@
1
- import { a as NAMIRIAL_QES_CONSENT_KEYS, c as areAllConsented, o as NAMIRIAL_QES_PROVIDER_CODE, r as electronicSignatureMachine, s as QE_CONSENT_KEYS, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-BO07Vfiv.esm.js";
1
+ import { a as NAMIRIAL_QES_CONSENT_KEYS, c as areAllConsented, o as NAMIRIAL_QES_PROVIDER_CODE, r as electronicSignatureMachine, s as QE_CONSENT_KEYS, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-Bf6B6pEU.esm.js";
2
2
  //#region src/modules/qe-signature/index.ts
3
3
  function createQeSignatureManager(options) {
4
4
  return createElectronicSignatureManager({ config: {
@@ -1,5 +1,5 @@
1
1
  import { t as getTimestamp } from "./IBrowserEnvironmentCapability-DEaRRk-R.esm.js";
2
- import { a as notifyTrueSightManagerStopped, i as notifyTrueSightFlowEvent } from "./trueSightService-BTf2KSpq.esm.js";
2
+ import { a as notifyTrueSightManagerStopped, i as notifyTrueSightFlowEvent } from "./trueSightService-CGUA9dm6.esm.js";
3
3
  import { C as createEventBus } from "./events-ijlbX_Wx.esm.js";
4
4
  import { s as createActor } from "./xstate.esm-BuFLFuzz.esm.js";
5
5
  import { t as fromCallback } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
@@ -0,0 +1,422 @@
1
+ import { c as wasmCallWrapper, s as ML_CALL_MAX_POLLS } from "./wasmWebClient-BJCaFeBL.esm.js";
2
+ import { a as waitForWasm, n as getWasmStatus, o as warmupWasm, r as isWasmReady, s as wasmRuntime } from "./warmup-BOM-sD-6.esm.js";
3
+ //#region ../infra/src/wasm/utilityWasmApi.ts
4
+ /**
5
+ * Utility / metadata domain facade over {@link WasmRuntime}.
6
+ *
7
+ * Holds no WASM state — the runtime owns every handle and buffer. The one
8
+ * qualification: it owns exactly two JS-side flags that the C++ side does not
9
+ * persist and that must be replayed into it at call time —
10
+ *
11
+ * - `dsEnabled_` (deepsight) is passed as an argument on every
12
+ * `prc`/`poc`/`rsp`/`ssl` call;
13
+ * - `inspectorOpened_` is pushed into C++ inside {@link getMetadata}, right
14
+ * before reading the metadata, because `setInspectorOpened` may legitimately be
15
+ * called before WASM is initialized.
16
+ *
17
+ * Both are deliberately **unguarded** setters: they never throw, so the SDK can
18
+ * record them during setup and have them honored once WASM comes up.
19
+ *
20
+ * `prc`/`poc`/`rsp` are the only methods here that hold the ML semaphore.
21
+ * `ssl`/`stl`/`osv`/`oev`/`ckvcks` and everything else are unlocked **by design**
22
+ * (decision D6) — never add locking.
23
+ *
24
+ * Method names, argument order and the pre-initialization error strings are
25
+ * copied verbatim from the mirrored upstream `wasmApi.ts` so a WASM version bump
26
+ * stays a diff against upstream (`docs/processes/WASM_VERSION_MIGRATION.md`).
27
+ * `setSdkPlatform`'s message says "device type" on purpose — do not "fix" it.
28
+ */
29
+ var UtilityWasmApi = class {
30
+ constructor(runtime = wasmRuntime) {
31
+ this.runtime = runtime;
32
+ this.inspectorOpened_ = false;
33
+ this.dsEnabled_ = false;
34
+ }
35
+ ens(image) {
36
+ return this.runtime.requireUtilityApi("Unable to encrypt the image, cpp API hasn't been initialized").ens(image);
37
+ }
38
+ isVirtualCamera(label) {
39
+ const utilityApi = this.runtime.requireUtilityApi("Unable to check if the camera is virtual, cpp API hasn't been initialized");
40
+ if (label) return utilityApi.isVirtualCamera(label);
41
+ return false;
42
+ }
43
+ estimatePerformance() {
44
+ return this.runtime.requireUtilityApi("Unable to estimate performance, cpp API hasn't been initialized").estimatePerformance();
45
+ }
46
+ async analyzeFrame(image) {
47
+ const message = "Unable to analyze the frame, cpp API hasn't been initialized";
48
+ this.runtime.requireUtilityApi(message);
49
+ await this.runtime.allocateImageBuffers(image.width, image.height);
50
+ this.runtime.writeFrame(image);
51
+ this.runtime.requireUtilityApi(message).analyzeFrame();
52
+ }
53
+ /**
54
+ * Sets the native (C++) utility API's production mode. When `true`, the WASM
55
+ * module suppresses its verbose debug logging; when `false`, it emits it.
56
+ *
57
+ * @param productionMode - `true` to silence WASM logs, `false` to emit them.
58
+ * @throws If the WASM C++ API has not been initialized yet.
59
+ */
60
+ async setProductionMode(productionMode) {
61
+ this.runtime.requireUtilityApi("Unable to set production mode, cpp API hasn't been initialized").setProductionMode(productionMode);
62
+ }
63
+ setSdkVersion(sdkVersion) {
64
+ this.runtime.requireUtilityApi("Unable to set sdk version, cpp API hasn't been initialized").setSdkVersion(sdkVersion);
65
+ }
66
+ setSdkPlatform(sdkPlatform) {
67
+ this.runtime.requireUtilityApi("Unable to set device type, cpp API hasn't been initialized").setSdkPlatform(sdkPlatform);
68
+ }
69
+ setDeviceInfo(deviceInfo, overrideExisting = true) {
70
+ this.runtime.requireUtilityApi("Unable to set device info, cpp API hasn't been initialized").setDeviceInfo(deviceInfo, overrideExisting);
71
+ }
72
+ setBrowserInfo(browserInfo, overrideExisting = true) {
73
+ this.runtime.requireUtilityApi("Unable to set browser info, cpp API hasn't been initialized").setBrowserInfo(browserInfo, overrideExisting);
74
+ }
75
+ setCameraInfo(cameraInfo, overrideExisting = true) {
76
+ this.runtime.requireUtilityApi("Unable to set camera info, cpp API hasn't been initialized").setCameraInfo(cameraInfo, overrideExisting);
77
+ }
78
+ setZc(zc) {
79
+ this.runtime.requireUtilityApi("Unable to set zc, cpp API hasn't been initialized").setZc(zc);
80
+ }
81
+ setMotionStatus(motionStatus) {
82
+ this.runtime.requireUtilityApi("Unable to set motion status, cpp API hasn't been initialized").setMotionStatus(motionStatus);
83
+ }
84
+ setInspectorOpened(inspectorOpened) {
85
+ this.inspectorOpened_ = inspectorOpened;
86
+ }
87
+ getInspectorOpened() {
88
+ return this.inspectorOpened_;
89
+ }
90
+ setBackgroundMode(backgroundMode) {
91
+ this.runtime.requireUtilityApi("Unable to set background mode, cpp API hasn't been initialized").setBackgroundMode(backgroundMode);
92
+ }
93
+ setDsEnabled(enabled) {
94
+ this.dsEnabled_ = enabled;
95
+ }
96
+ getCheck() {
97
+ return this.runtime.requireUtilityApi("Unable to get check, cpp API hasn't been initialized").getCheck();
98
+ }
99
+ getMetadata() {
100
+ const utilityApi = this.runtime.requireUtilityApi("Unable to get metadata, cpp API hasn't been initialized");
101
+ utilityApi.setInspectorOpened(this.inspectorOpened_);
102
+ return utilityApi.getMetadata();
103
+ }
104
+ async prc() {
105
+ const message = "Unable to prc, cpp API hasn't been initialized";
106
+ this.runtime.requireUtilityApi(message);
107
+ await wasmCallWrapper(this.runtime.mlCallSemaphore, () => this.runtime.requireUtilityApi(message).prc(this.dsEnabled_, false), true, {
108
+ maxPolls: ML_CALL_MAX_POLLS,
109
+ label: "prc"
110
+ });
111
+ }
112
+ async poc(output) {
113
+ const message = "Unable to poc, cpp API hasn't been initialized";
114
+ this.runtime.requireUtilityApi(message);
115
+ await wasmCallWrapper(this.runtime.mlCallSemaphore, () => this.runtime.requireUtilityApi(message).poc(this.dsEnabled_, output), true, {
116
+ maxPolls: ML_CALL_MAX_POLLS,
117
+ label: "poc"
118
+ });
119
+ }
120
+ async rsp() {
121
+ const message = "Unable to rsp, cpp API hasn't been initialized";
122
+ this.runtime.requireUtilityApi(message);
123
+ await wasmCallWrapper(this.runtime.mlCallSemaphore, () => this.runtime.requireUtilityApi(message).rsp(this.dsEnabled_), true, {
124
+ maxPolls: ML_CALL_MAX_POLLS,
125
+ label: "rsp"
126
+ });
127
+ }
128
+ ssl() {
129
+ this.runtime.requireUtilityApi("Unable to ssl, cpp API hasn't been initialized").ssl(this.dsEnabled_);
130
+ }
131
+ stl() {
132
+ this.runtime.requireUtilityApi("Unable to stl, cpp API hasn't been initialized").stl();
133
+ }
134
+ osv() {
135
+ this.runtime.requireUtilityApi("Unable to set sensor beginning timestamp, cpp API hasn't been initialized").osv();
136
+ }
137
+ oev() {
138
+ this.runtime.requireUtilityApi("Unable to set sensor ending timestamp, cpp API hasn't been initialized").oev();
139
+ }
140
+ ckvcks(data) {
141
+ this.runtime.requireUtilityApi("Unable to ckvcks, cpp API hasn't been initialized").ckvcks(data);
142
+ }
143
+ /**
144
+ * Clear all states, not related to ml pipelines
145
+ */
146
+ resetOther() {
147
+ this.runtime.requireUtilityApi("Unable to reset other states, cpp API hasn't been initialized").resetOther();
148
+ }
149
+ /**
150
+ * Full reset. Pipelines first, then the non-pipeline state — the order the
151
+ * mirrored upstream wrapper uses.
152
+ */
153
+ reset() {
154
+ this.runtime.resetAllPipelines();
155
+ this.resetOther();
156
+ }
157
+ };
158
+ const utilityWasmApi = new UtilityWasmApi();
159
+ //#endregion
160
+ //#region ../infra/src/providers/wasm/BaseWasmProvider.ts
161
+ /**
162
+ * Base provider class that abstracts common WASM functionality.
163
+ * This serves as a foundation for specific ML capability providers
164
+ * like FaceDetectionProvider and IdCaptureProvider.
165
+ */
166
+ var BaseWasmProvider = class {
167
+ /**
168
+ * Creates a new BaseWasmProvider
169
+ * @param pipelineType - The WASM pipeline type this provider uses
170
+ */
171
+ constructor(pipelineType) {
172
+ this._isInitialized = false;
173
+ this.pipelineType = pipelineType;
174
+ }
175
+ /**
176
+ * Returns whether this provider has been initialized.
177
+ */
178
+ get initialized() {
179
+ return this._isInitialized;
180
+ }
181
+ getPipelineType() {
182
+ if (this.pipelineType === void 0) throw new Error(`${this.constructor.name} has no pipeline type configured.`);
183
+ return this.pipelineType;
184
+ }
185
+ /**
186
+ * Initializes the provider by ensuring WASM is loaded
187
+ * @param config - Provider configuration
188
+ * @param pipeline - The pipeline type to warm up ('selfie', 'idCapture', etc.)
189
+ */
190
+ async initializeBase(config, pipeline) {
191
+ if (this._isInitialized) return;
192
+ const status = getWasmStatus();
193
+ if (status.isLoading || isWasmReady() || status.error) {
194
+ if (!(status.isLoading && status.loadedPipelines.includes(pipeline))) await waitForWasm();
195
+ if (this.pipelineType !== void 0 && !getWasmStatus().loadedPipelines.includes(pipeline)) throw new Error(`WASM pipeline "${pipeline}" is not loaded.`);
196
+ } else {
197
+ if (!config.wasmPath || !config.glueCodePath && !config.loadGlue) throw new Error("WASM path and glue code path are required. Call warmupWasm() first.");
198
+ await warmupWasm({
199
+ ...config,
200
+ wasmPath: config.wasmPath,
201
+ glueCodePath: config.glueCodePath ?? "",
202
+ pipelines: [pipeline]
203
+ });
204
+ }
205
+ this._isInitialized = true;
206
+ }
207
+ /**
208
+ * Ensures the provider is initialized before performing operations.
209
+ * @throws Error if not initialized
210
+ */
211
+ ensureInitialized() {
212
+ if (!this._isInitialized) throw new Error(`${this.constructor.name} not initialized. Call initialize() first.`);
213
+ }
214
+ /**
215
+ * Processes a frame through the WASM pipeline
216
+ * @param image - Image data to process
217
+ * @returns The pipeline result (type depends on pipeline - WASM returns any)
218
+ */
219
+ async processFrameWasm(image) {
220
+ this.ensureInitialized();
221
+ const pipelineType = this.getPipelineType();
222
+ await wasmRuntime.allocateImageBuffers(image.width, image.height);
223
+ await wasmRuntime.handleDetectionCallAndUpdateState(pipelineType);
224
+ return await wasmRuntime.process(image, pipelineType);
225
+ }
226
+ /**
227
+ * Resets the pipeline to its initial state.
228
+ * Safe to call even if not initialized (no-op in that case).
229
+ */
230
+ reset() {
231
+ if (this._isInitialized && this.pipelineType !== void 0) wasmRuntime.resetPipeline(this.pipelineType);
232
+ }
233
+ /**
234
+ * Disposes of resources and resets initialization state.
235
+ * Safe to call even if not initialized.
236
+ */
237
+ async dispose() {
238
+ this.reset();
239
+ this._isInitialized = false;
240
+ }
241
+ };
242
+ //#endregion
243
+ //#region ../infra/src/providers/wasm/WasmUtilProvider.ts
244
+ var WasmUtilProvider = class WasmUtilProvider extends BaseWasmProvider {
245
+ static async getInstance() {
246
+ if (WasmUtilProvider.instance) return WasmUtilProvider.instance;
247
+ if (WasmUtilProvider.initPromise) return WasmUtilProvider.initPromise;
248
+ WasmUtilProvider.initPromise = (async () => {
249
+ const instance = new WasmUtilProvider();
250
+ await instance.initializeBase({}, "selfie");
251
+ WasmUtilProvider.instance = instance;
252
+ return instance;
253
+ })();
254
+ return WasmUtilProvider.initPromise;
255
+ }
256
+ static resetInstance() {
257
+ WasmUtilProvider.instance = void 0;
258
+ WasmUtilProvider.initPromise = void 0;
259
+ }
260
+ constructor() {
261
+ super(void 0);
262
+ }
263
+ async initialize(config) {
264
+ if (this.initialized) return;
265
+ const pipeline = config.pipelines?.[0] ?? "selfie";
266
+ await this.initializeBase(config, pipeline);
267
+ }
268
+ async processFrame(_image) {
269
+ throw new Error("WasmUtilProvider does not support frame processing. Use encryptImage() instead.");
270
+ }
271
+ encryptImage(image) {
272
+ this.ensureInitialized();
273
+ return utilityWasmApi.ens(image);
274
+ }
275
+ setSdkVersion(version) {
276
+ this.ensureInitialized();
277
+ utilityWasmApi.setSdkVersion(version);
278
+ }
279
+ setSdkPlatform(platform) {
280
+ this.ensureInitialized();
281
+ utilityWasmApi.setSdkPlatform(platform);
282
+ }
283
+ setDeviceInfo(deviceInfo, overrideExisting = true) {
284
+ this.ensureInitialized();
285
+ utilityWasmApi.setDeviceInfo(deviceInfo, overrideExisting);
286
+ }
287
+ setBrowserInfo(browserInfo, overrideExisting = true) {
288
+ this.ensureInitialized();
289
+ utilityWasmApi.setBrowserInfo(browserInfo, overrideExisting);
290
+ }
291
+ setCameraInfo(cameraInfo, overrideExisting = true) {
292
+ this.ensureInitialized();
293
+ utilityWasmApi.setCameraInfo(cameraInfo, overrideExisting);
294
+ }
295
+ setMotionStatus(status) {
296
+ this.ensureInitialized();
297
+ utilityWasmApi.setMotionStatus(status);
298
+ }
299
+ setBackgroundMode(backgroundMode) {
300
+ this.ensureInitialized();
301
+ utilityWasmApi.setBackgroundMode(backgroundMode);
302
+ }
303
+ setOnDeviceMode(enabled) {
304
+ this.ensureInitialized();
305
+ wasmRuntime.setOnDeviceMode(enabled);
306
+ }
307
+ setZc(zc) {
308
+ this.ensureInitialized();
309
+ utilityWasmApi.setZc(zc);
310
+ }
311
+ setInspectorOpened(opened) {
312
+ this.ensureInitialized();
313
+ utilityWasmApi.setInspectorOpened(opened);
314
+ }
315
+ getInspectorOpened() {
316
+ return utilityWasmApi.getInspectorOpened();
317
+ }
318
+ /**
319
+ * Toggles the WASM module's production mode. When `true`, the native module
320
+ * suppresses its verbose debug logging/console output; when `false`, those
321
+ * logs are emitted. The SDK forces this to `true` by default and only flips
322
+ * it off when the caller opts in via `setup({ wasm: { showLogs: true } })`.
323
+ *
324
+ * @param productionMode - `true` to silence WASM logs, `false` to emit them.
325
+ */
326
+ async setProductionMode(productionMode) {
327
+ this.ensureInitialized();
328
+ await utilityWasmApi.setProductionMode(productionMode);
329
+ }
330
+ getMetadata() {
331
+ this.ensureInitialized();
332
+ return utilityWasmApi.getMetadata();
333
+ }
334
+ async analyzeFrame(image) {
335
+ this.ensureInitialized();
336
+ await utilityWasmApi.analyzeFrame(image);
337
+ }
338
+ getCheck() {
339
+ this.ensureInitialized();
340
+ return utilityWasmApi.getCheck();
341
+ }
342
+ getPipelineState() {
343
+ this.ensureInitialized();
344
+ return wasmRuntime.getPipelineState();
345
+ }
346
+ estimatePerformance() {
347
+ this.ensureInitialized();
348
+ return utilityWasmApi.estimatePerformance();
349
+ }
350
+ isVirtualCamera(label) {
351
+ this.ensureInitialized();
352
+ return utilityWasmApi.isVirtualCamera(label);
353
+ }
354
+ async prc() {
355
+ this.ensureInitialized();
356
+ await utilityWasmApi.prc();
357
+ }
358
+ async poc(output) {
359
+ this.ensureInitialized();
360
+ await utilityWasmApi.poc(output);
361
+ }
362
+ async rsp() {
363
+ this.ensureInitialized();
364
+ await utilityWasmApi.rsp();
365
+ }
366
+ ssl() {
367
+ this.ensureInitialized();
368
+ utilityWasmApi.ssl();
369
+ }
370
+ stl() {
371
+ this.ensureInitialized();
372
+ utilityWasmApi.stl();
373
+ }
374
+ osv() {
375
+ this.ensureInitialized();
376
+ utilityWasmApi.osv();
377
+ }
378
+ oev() {
379
+ this.ensureInitialized();
380
+ utilityWasmApi.oev();
381
+ }
382
+ ckvcks(data) {
383
+ this.ensureInitialized();
384
+ utilityWasmApi.ckvcks(data);
385
+ }
386
+ };
387
+ //#endregion
388
+ //#region ../infra/src/storage/safeStorage.ts
389
+ /**
390
+ * Storage resolvers that tolerate hosts which make Web Storage unreachable.
391
+ *
392
+ * Two hostile shapes occur in the field, and they fail differently:
393
+ *
394
+ * 1. **Deleted bare global** — a page mitigates self-XSS with
395
+ * `delete window.localStorage` and keeps a module-private reference. Since
396
+ * `window` *is* the global object, the identifier stops resolving: a bare
397
+ * read throws `ReferenceError`. `typeof` is the only safe probe, because it
398
+ * is the one operator that tolerates an unresolvable identifier.
399
+ * 2. **Blocked storage** — a webview or a cross-origin/partitioned context
400
+ * makes the accessor itself throw (`SecurityError`). Here `typeof` is *not*
401
+ * enough: it invokes the getter, so the throw escapes the guard.
402
+ *
403
+ * Handling only one shape leaves the other live, so always go through these
404
+ * resolvers instead of touching the globals directly. A `null` return means
405
+ * "no storage in this host" — callers degrade, they do not throw.
406
+ */
407
+ function resolveLocalStorage() {
408
+ try {
409
+ return typeof localStorage === "undefined" ? null : localStorage;
410
+ } catch {
411
+ return null;
412
+ }
413
+ }
414
+ function resolveSessionStorage() {
415
+ try {
416
+ return typeof sessionStorage === "undefined" ? null : sessionStorage;
417
+ } catch {
418
+ return null;
419
+ }
420
+ }
421
+ //#endregion
422
+ export { utilityWasmApi as a, BaseWasmProvider as i, resolveSessionStorage as n, WasmUtilProvider as r, resolveLocalStorage as t };