@incodetech/core 0.0.0-dev-20260409-a38d5e8 → 0.0.0-dev-20260409-089e5c6

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 (137) hide show
  1. package/dist/BrowserStorageProvider-ByxoNfxC.esm.js +55 -0
  2. package/dist/{OpenViduRecordingProvider-Bn2meybK.esm.js → OpenViduRecordingProvider-JatjSE3h.esm.js} +1 -1
  3. package/dist/{WasmUtilProvider-BpZSvZbg.esm.js → WasmUtilProvider-DRh0wrlm.esm.js} +1 -1
  4. package/dist/{addressSearch-DOFI7lwy.esm.js → addressSearch-CDdN30un.esm.js} +4 -4
  5. package/dist/antifraud.d.ts +1 -1
  6. package/dist/antifraud.esm.js +4 -37
  7. package/dist/antifraudStateMachine-C1AgS0nL.esm.js +39 -0
  8. package/dist/authentication.d.ts +11 -11
  9. package/dist/authentication.esm.js +22 -19
  10. package/dist/{authenticationManager-C2mk36yK.d.ts → authenticationManager-DYFYx68i.d.ts} +2 -2
  11. package/dist/authenticationManager-UaO9UTN7.esm.js +67 -0
  12. package/dist/{authenticationManager-C7dL_avf.esm.js → authenticationStateMachine-DWI65EwK.esm.js} +7 -67
  13. package/dist/{backCameraStream-tabTmwDS.esm.js → backCameraStream-BihRmMzc.esm.js} +3 -3
  14. package/dist/camera.d.ts +1 -1
  15. package/dist/camera.esm.js +3 -3
  16. package/dist/consent.d.ts +57 -57
  17. package/dist/consent.esm.js +4 -149
  18. package/dist/consentStateMachine-CpRu2hF0.esm.js +151 -0
  19. package/dist/cross-document-data-match.d.ts +1 -1
  20. package/dist/cross-document-data-match.esm.js +4 -4
  21. package/dist/curp-validation.d.ts +5 -5
  22. package/dist/curp-validation.esm.js +4 -417
  23. package/dist/curpValidationStateMachine-Czzgv2W1.esm.js +419 -0
  24. package/dist/{deepsightLoader-Cj6SyUQ-.esm.js → deepsightLoader-jIgoauFK.esm.js} +10 -10
  25. package/dist/{deepsightService-BjgXl5hs.esm.js → deepsightService-D4mM8yJ2.esm.js} +5 -5
  26. package/dist/{deepsightService-ByD6uIs7.d.ts → deepsightService-DAeakjDd.d.ts} +2 -2
  27. package/dist/device.esm.js +3 -3
  28. package/dist/document-capture.d.ts +75 -73
  29. package/dist/document-capture.esm.js +8 -403
  30. package/dist/document-upload.d.ts +50 -50
  31. package/dist/document-upload.esm.js +7 -7
  32. package/dist/documentCaptureStateMachine-XbpsHzh5.esm.js +403 -0
  33. package/dist/ekyb.d.ts +3 -3
  34. package/dist/ekyb.esm.js +10 -655
  35. package/dist/ekybStateMachine-BDuCae6s.esm.js +653 -0
  36. package/dist/ekyc.d.ts +3 -3
  37. package/dist/ekyc.esm.js +6 -10614
  38. package/dist/ekycStateMachine-BN4KBDYY.esm.js +10615 -0
  39. package/dist/email.d.ts +3 -3
  40. package/dist/email.esm.js +6 -5
  41. package/dist/emailManager-CAeo59lD.esm.js +238 -0
  42. package/dist/{emailManager-CU_hzrsl.d.ts → emailManager-CZYfcu0n.d.ts} +4 -3
  43. package/dist/{emailManager-_9R4vm6g.esm.js → emailStateMachine-Bqwe_sQS.esm.js} +6 -239
  44. package/dist/{events-DlHrOIRc.esm.js → events-CZ2ka3pu.esm.js} +8 -1
  45. package/dist/events.d.ts +1 -0
  46. package/dist/events.esm.js +2 -2
  47. package/dist/extensibility.d.ts +15 -15
  48. package/dist/extensibility.esm.js +33 -26
  49. package/dist/face-match.d.ts +7 -6
  50. package/dist/face-match.esm.js +8 -129
  51. package/dist/faceCaptureManagerFactory-D8zlMTvd.esm.js +117 -0
  52. package/dist/{faceCaptureManagerFactory-Da_-ohdg.d.ts → faceCaptureManagerFactory-DS-6yCya.d.ts} +8 -8
  53. package/dist/{faceCaptureSetup-CaVWkjvE.esm.js → faceCaptureSetup-1M6uUEjK.esm.js} +5 -119
  54. package/dist/faceMatchStateMachine-D3DuP_ya.esm.js +127 -0
  55. package/dist/flow.d.ts +8 -13
  56. package/dist/flow.esm.js +10 -29
  57. package/dist/{flowCompletionService-B5JemmC6.esm.js → flowCompletionService-W6bj7Xd3.esm.js} +2 -2
  58. package/dist/{flowServices-p22wrYPf.esm.js → flowServices-C4tjBD8q.esm.js} +3 -3
  59. package/dist/geolocation.d.ts +7 -6
  60. package/dist/geolocation.esm.js +7 -105
  61. package/dist/geolocationStateMachine-Bj2LkGwy.esm.js +105 -0
  62. package/dist/{getDeviceClass-DEzz4cmY.esm.js → getDeviceClass-BoiWvKAc.esm.js} +1 -1
  63. package/dist/government-validation.d.ts +2 -2
  64. package/dist/government-validation.esm.js +5 -269
  65. package/dist/governmentValidationStateMachine-W1CzRjVw.esm.js +271 -0
  66. package/dist/http.esm.js +1 -1
  67. package/dist/id.d.ts +10 -10
  68. package/dist/id.esm.js +22 -20
  69. package/dist/idCaptureManager-BcS8fgW4.esm.js +335 -0
  70. package/dist/{idCaptureManager-CV08v1e3.d.ts → idCaptureManager-oR6YPYHj.d.ts} +7 -7
  71. package/dist/{idCaptureManager-dyZzKv8L.esm.js → idCaptureStateMachine-MAzfM_2O.esm.js} +17 -346
  72. package/dist/identity-reuse.d.ts +530 -0
  73. package/dist/identity-reuse.esm.js +273 -0
  74. package/dist/index.d.ts +2 -2
  75. package/dist/index.esm.js +8 -8
  76. package/dist/{lib-Bavz2qmt.esm.js → lib-CxDxnzRd.esm.js} +1 -1
  77. package/dist/mandatory-consent.d.ts +55 -55
  78. package/dist/mandatory-consent.esm.js +4 -124
  79. package/dist/mandatoryConsentStateMachine-BMKi26Re.esm.js +126 -0
  80. package/dist/{openviduLazy-vhrVZCr_.esm.js → openviduLazy-B8tinh9W.esm.js} +2 -2
  81. package/dist/openviduLazy-CItjpMfL.esm.js +3 -0
  82. package/dist/{permissionServices-Cskq32Yd.esm.js → permissionServices-Cj120WaT.esm.js} +2 -2
  83. package/dist/phone.d.ts +3 -3
  84. package/dist/phone.esm.js +6 -5
  85. package/dist/phoneManager-Bvj6Jr4o.esm.js +258 -0
  86. package/dist/{phoneManager-ulJuGvJ8.d.ts → phoneManager-CCMCkyYr.d.ts} +2 -2
  87. package/dist/{phoneManager-DerdUfd4.esm.js → phoneStateMachine-B1t1Z-Dd.esm.js} +5 -258
  88. package/dist/{recordingService-483wQ6kR.esm.js → recordingService-8I_-hhNI.esm.js} +14 -68
  89. package/dist/redirect-to-mobile.d.ts +2 -2
  90. package/dist/redirect-to-mobile.esm.js +5 -247
  91. package/dist/redirectToMobileStateMachine-BVP1KcoO.esm.js +249 -0
  92. package/dist/runChildModule-B5DEiOS7.esm.js +27 -0
  93. package/dist/selfie.d.ts +11 -11
  94. package/dist/selfie.esm.js +22 -19
  95. package/dist/selfieManager-B6x3O5Ns.esm.js +60 -0
  96. package/dist/{selfieManager-DCRP7X75.d.ts → selfieManager-gizt3Zha.d.ts} +2 -2
  97. package/dist/selfieStateMachine-DHPSBFj0.esm.js +56 -0
  98. package/dist/{session-CUh77zj3.esm.js → session-DoI-X9FK.esm.js} +4 -4
  99. package/dist/session.d.ts +1 -1
  100. package/dist/session.esm.js +6 -6
  101. package/dist/{setup-XpxfZgKn.esm.js → setup-Bh2S53NT.esm.js} +6 -5
  102. package/dist/{setup-DpHakxsC.d.ts → setup-Bz3Ffaoc.d.ts} +1 -1
  103. package/dist/signature.d.ts +4 -3
  104. package/dist/signature.esm.js +6 -189
  105. package/dist/signatureStateMachine-Cv7yPuEf.esm.js +189 -0
  106. package/dist/{stats-DHDoqSBV.esm.js → stats-wkQyDFV3.esm.js} +1 -1
  107. package/dist/stats.esm.js +2 -2
  108. package/dist/types-BdEM5Jj7.d.ts +35 -0
  109. package/dist/{types-2OPf1pyv.d.ts → types-CdlQrTiZ.d.ts} +1 -1
  110. package/dist/{types-CVJVQ7fp.d.ts → types-m43DfiSx.d.ts} +1 -1
  111. package/dist/wasm.d.ts +2 -2
  112. package/dist/wasm.esm.js +8 -8
  113. package/dist/workflow.d.ts +813 -0
  114. package/dist/workflow.esm.js +600 -0
  115. package/package.json +11 -3
  116. package/dist/openviduLazy-BIPHozOu.esm.js +0 -3
  117. package/dist/selfieManager-DeOcNel4.esm.js +0 -110
  118. /package/dist/{Actor-Ba71-_30.d.ts → Actor-BkPcZGke.d.ts} +0 -0
  119. /package/dist/{BaseWasmProvider-D-s_6M5H.esm.js → BaseWasmProvider-C73c2nV9.esm.js} +0 -0
  120. /package/dist/{BrowserEnvironmentProvider-DaHeLJQw.esm.js → BrowserEnvironmentProvider-lxn4oxXn.esm.js} +0 -0
  121. /package/dist/{BrowserTimerProvider-BhD2MlHg.esm.js → BrowserTimerProvider-CSdm7__S.esm.js} +0 -0
  122. /package/dist/{ITimerCapability-oixwa6nj.esm.js → ITimerCapability-DAIaq369.esm.js} +0 -0
  123. /package/dist/{Manager-BN2g_I8W.d.ts → Manager-Bcnemkyi.d.ts} +0 -0
  124. /package/dist/{MotionSensorProvider-CodM3e0E.esm.js → MotionSensorProvider-BLnFo6My.esm.js} +0 -0
  125. /package/dist/{StateMachine-BoJsfMvg.d.ts → StateMachine-DIeoDJ7r.d.ts} +0 -0
  126. /package/dist/{api-DzpnV6O7.esm.js → api-CqKwkjJ3.esm.js} +0 -0
  127. /package/dist/{browserSimulation-B4ubb2OL.esm.js → browserSimulation-7W5-A3RV.esm.js} +0 -0
  128. /package/dist/{camera-DmkFpf5N.esm.js → camera-B-5traWf.esm.js} +0 -0
  129. /package/dist/{camera-1eeGnAaL.d.ts → camera-CgnuDuxy.d.ts} +0 -0
  130. /package/dist/{chunk-DsxENsBR.esm.js → chunk-Qw4qVmMx.esm.js} +0 -0
  131. /package/dist/{displayErrors-BZLX7idb.d.ts → displayErrors-C9-VaqmS.d.ts} +0 -0
  132. /package/dist/{flowCompletionService-D-3YCHyO.d.ts → flowCompletionService-CPLdZxe-.d.ts} +0 -0
  133. /package/dist/{getBrowser-Dtyt9J_h.esm.js → getBrowser-DJkbzQ5t.esm.js} +0 -0
  134. /package/dist/{platform-Dv7a2fv-.esm.js → platform-BfoqeM61.esm.js} +0 -0
  135. /package/dist/{types-D_QfFKxT.d.ts → types-CxU9jTRl.d.ts} +0 -0
  136. /package/dist/{warmup-CIj_wEV_.d.ts → warmup-Cs0uqxUW.d.ts} +0 -0
  137. /package/dist/{xstate.esm-Bv55-lJ4.esm.js → xstate.esm-D7D6CGwY.esm.js} +0 -0
@@ -1,191 +1,8 @@
1
- import { t as api } from "./api-DzpnV6O7.esm.js";
2
- import { _ as endpoints, m as addEvent, n as eventModuleNames, o as createManagerInstrumentation, r as eventScreenNames } from "./events-DlHrOIRc.esm.js";
3
- import { a as createActor, i as fromPromise, n as assign, o as createManager, t as setup } from "./xstate.esm-Bv55-lJ4.esm.js";
1
+ import "./api-CqKwkjJ3.esm.js";
2
+ import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CZ2ka3pu.esm.js";
3
+ import { a as createActor, o as createManager } from "./xstate.esm-D7D6CGwY.esm.js";
4
+ import { t as signatureMachine } from "./signatureStateMachine-Cv7yPuEf.esm.js";
4
5
 
5
- //#region src/modules/signature/signatureServices.ts
6
- /**
7
- * Uploads a signature image to the Omni API.
8
- * Uses JSON + base64 when `sendBase64` is true, otherwise sends raw JPEG bytes.
9
- * Throws on failure.
10
- */
11
- async function addSignature(params, signal) {
12
- const { image, type, sendBase64 = false } = params;
13
- const url = sendBase64 ? endpoints.addSignatureV2 : endpoints.addSignature;
14
- const body = sendBase64 ? { base64Image: image } : image;
15
- const res = await api.post(url, body, {
16
- signal,
17
- headers: { "Content-Type": sendBase64 ? "application/json" : "image/jpeg" },
18
- query: { type }
19
- });
20
- if (!res.ok) throw new Error(`POST ${url} failed: ${res.status} ${res.statusText}`);
21
- return res.data;
22
- }
23
- /**
24
- * Uploads a initials image to the Omni API.
25
- * Uses JSON + base64 when `sendBase64` is true, otherwise sends raw JPEG bytes.
26
- * Throws on failure.
27
- */
28
- async function addInitials(params, signal) {
29
- const { image, type, sendBase64 = false } = params;
30
- const url = endpoints.addInitials;
31
- const body = sendBase64 ? { base64Image: image } : image;
32
- const res = await api.post(url, body, {
33
- signal,
34
- headers: { "Content-Type": sendBase64 ? "application/json" : "image/jpeg" },
35
- query: { type }
36
- });
37
- if (!res.ok) throw new Error(`POST ${url} failed: ${res.status} ${res.statusText}`);
38
- return res.data;
39
- }
40
-
41
- //#endregion
42
- //#region src/modules/signature/signatureStateMachine.ts
43
- function emptyCaptureState() {
44
- return {
45
- image: void 0,
46
- isValid: false,
47
- error: void 0,
48
- signatureSubmitResult: void 0,
49
- initialsSubmitResult: void 0
50
- };
51
- }
52
- const signatureMachine = setup({
53
- types: {
54
- context: {},
55
- events: {},
56
- input: {}
57
- },
58
- actors: {
59
- submitInitials: fromPromise(async ({ input, signal }) => addInitials({
60
- image: input.image,
61
- type: input.type,
62
- sendBase64: input.sendBase64
63
- }, signal)),
64
- submitSignature: fromPromise(async ({ input, signal }) => addSignature({
65
- image: input.image,
66
- type: input.type,
67
- sendBase64: input.sendBase64
68
- }, signal))
69
- },
70
- actions: {
71
- setSignatureValidity: assign(({ event }) => {
72
- return {
73
- isValid: event.isValid,
74
- error: void 0
75
- };
76
- }),
77
- assignImageForSubmit: assign(({ event }) => {
78
- return {
79
- image: event.image,
80
- error: void 0
81
- };
82
- }),
83
- setInitialsSubmitResult: assign(({ event }) => ({
84
- initialsSubmitResult: event.output,
85
- error: void 0
86
- })),
87
- setSignatureSubmitResult: assign(({ event }) => ({
88
- signatureSubmitResult: event.output,
89
- error: void 0
90
- })),
91
- setErrorFromInvoke: assign(({ event }) => {
92
- const error = event.error;
93
- return { error: error instanceof Error ? error.message : typeof error === "string" ? error : "Something went wrong" };
94
- }),
95
- clearError: assign({ error: () => void 0 }),
96
- resetContext: assign({
97
- isValid: () => false,
98
- image: () => void 0,
99
- error: () => void 0
100
- }),
101
- trackSubmitAttempt: () => {
102
- addEvent({
103
- code: "continue",
104
- module: eventModuleNames.signature,
105
- screen: eventScreenNames.signatureInput
106
- });
107
- },
108
- trackError: ({ context }) => {
109
- addEvent({
110
- code: "verificationError",
111
- module: eventModuleNames.signature,
112
- payload: context.error ? { error: context.error } : void 0
113
- });
114
- }
115
- },
116
- guards: { canContinue: ({ context, event }) => context.isValid && event.type === "CONTINUE" && !!event.image }
117
- }).createMachine({
118
- id: "signature",
119
- initial: "idle",
120
- context: ({ input }) => ({
121
- config: input.config,
122
- ...emptyCaptureState()
123
- }),
124
- states: {
125
- idle: { on: { LOAD: "captureInitials" } },
126
- captureInitials: { on: {
127
- SIGNATURE_CHANGED: { actions: "setSignatureValidity" },
128
- CONTINUE: {
129
- target: "submittingInitials",
130
- guard: "canContinue",
131
- actions: "assignImageForSubmit"
132
- }
133
- } },
134
- submittingInitials: {
135
- entry: "trackSubmitAttempt",
136
- invoke: {
137
- id: "submitInitials",
138
- src: "submitInitials",
139
- input: ({ context }) => ({
140
- image: context.image,
141
- type: context.config.type,
142
- sendBase64: context.config.sendBase64 ?? false
143
- }),
144
- onDone: {
145
- target: "captureSignature",
146
- actions: ["setInitialsSubmitResult", "resetContext"]
147
- },
148
- onError: {
149
- target: "error",
150
- actions: ["setErrorFromInvoke"]
151
- }
152
- }
153
- },
154
- captureSignature: { on: {
155
- SIGNATURE_CHANGED: { actions: "setSignatureValidity" },
156
- CONTINUE: {
157
- target: "submittingSignature",
158
- guard: "canContinue",
159
- actions: "assignImageForSubmit"
160
- }
161
- } },
162
- submittingSignature: {
163
- entry: "trackSubmitAttempt",
164
- invoke: {
165
- id: "submitSignature",
166
- src: "submitSignature",
167
- input: ({ context }) => ({
168
- image: context.image,
169
- type: context.config.type,
170
- sendBase64: context.config.sendBase64 ?? false
171
- }),
172
- onDone: {
173
- target: "success",
174
- actions: "setSignatureSubmitResult"
175
- },
176
- onError: {
177
- target: "error",
178
- actions: ["setErrorFromInvoke"]
179
- }
180
- }
181
- },
182
- success: { after: { 3e3: "finished" } },
183
- finished: { type: "final" },
184
- error: { entry: "trackError" }
185
- }
186
- });
187
-
188
- //#endregion
189
6
  //#region src/modules/signature/signatureActor.ts
190
7
  function createSignatureActor(options) {
191
8
  return createActor(signatureMachine, { input: { config: options.config } }).start();
@@ -200,14 +17,14 @@ function mapState(snapshot) {
200
17
  if (typedSnapshot.matches("captureInitials")) return {
201
18
  status: "capture",
202
19
  title: context.config.title,
203
- subtitle: context.config.subtitle,
20
+ subtitle: context.config.subTitle,
204
21
  phase: "initials",
205
22
  canContinue: context.isValid
206
23
  };
207
24
  if (typedSnapshot.matches("captureSignature")) return {
208
25
  status: "capture",
209
26
  title: context.config.title,
210
- subtitle: context.config.subtitle,
27
+ subtitle: context.config.subTitle,
211
28
  phase: "signature",
212
29
  canContinue: context.isValid
213
30
  };
@@ -0,0 +1,189 @@
1
+ import { t as api } from "./api-CqKwkjJ3.esm.js";
2
+ import { _ as endpoints, m as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-CZ2ka3pu.esm.js";
3
+ import { i as fromPromise, n as assign, t as setup } from "./xstate.esm-D7D6CGwY.esm.js";
4
+
5
+ //#region src/modules/signature/signatureServices.ts
6
+ /**
7
+ * Uploads a signature image to the Omni API.
8
+ * Uses JSON + base64 when `sendBase64` is true, otherwise sends raw JPEG bytes.
9
+ * Throws on failure.
10
+ */
11
+ async function addSignature(params, signal) {
12
+ const { image, type, sendBase64 = false } = params;
13
+ const url = sendBase64 ? endpoints.addSignatureV2 : endpoints.addSignature;
14
+ const body = sendBase64 ? { base64Image: image } : image;
15
+ const res = await api.post(url, body, {
16
+ signal,
17
+ headers: { "Content-Type": sendBase64 ? "application/json" : "image/jpeg" },
18
+ query: { type }
19
+ });
20
+ if (!res.ok) throw new Error(`POST ${url} failed: ${res.status} ${res.statusText}`);
21
+ return res.data;
22
+ }
23
+ /**
24
+ * Uploads a initials image to the Omni API.
25
+ * Uses JSON + base64 when `sendBase64` is true, otherwise sends raw JPEG bytes.
26
+ * Throws on failure.
27
+ */
28
+ async function addInitials(params, signal) {
29
+ const { image, type, sendBase64 = false } = params;
30
+ const url = endpoints.addInitials;
31
+ const body = sendBase64 ? { base64Image: image } : image;
32
+ const res = await api.post(url, body, {
33
+ signal,
34
+ headers: { "Content-Type": sendBase64 ? "application/json" : "image/jpeg" },
35
+ query: { type }
36
+ });
37
+ if (!res.ok) throw new Error(`POST ${url} failed: ${res.status} ${res.statusText}`);
38
+ return res.data;
39
+ }
40
+
41
+ //#endregion
42
+ //#region src/modules/signature/signatureStateMachine.ts
43
+ function emptyCaptureState() {
44
+ return {
45
+ image: void 0,
46
+ isValid: false,
47
+ error: void 0,
48
+ signatureSubmitResult: void 0,
49
+ initialsSubmitResult: void 0
50
+ };
51
+ }
52
+ const signatureMachine = setup({
53
+ types: {
54
+ context: {},
55
+ events: {},
56
+ input: {}
57
+ },
58
+ actors: {
59
+ submitInitials: fromPromise(async ({ input, signal }) => addInitials({
60
+ image: input.image,
61
+ type: input.type,
62
+ sendBase64: input.sendBase64
63
+ }, signal)),
64
+ submitSignature: fromPromise(async ({ input, signal }) => addSignature({
65
+ image: input.image,
66
+ type: input.type,
67
+ sendBase64: input.sendBase64
68
+ }, signal))
69
+ },
70
+ actions: {
71
+ setSignatureValidity: assign(({ event }) => {
72
+ return {
73
+ isValid: event.isValid,
74
+ error: void 0
75
+ };
76
+ }),
77
+ assignImageForSubmit: assign(({ event }) => {
78
+ return {
79
+ image: event.image,
80
+ error: void 0
81
+ };
82
+ }),
83
+ setInitialsSubmitResult: assign(({ event }) => ({
84
+ initialsSubmitResult: event.output,
85
+ error: void 0
86
+ })),
87
+ setSignatureSubmitResult: assign(({ event }) => ({
88
+ signatureSubmitResult: event.output,
89
+ error: void 0
90
+ })),
91
+ setErrorFromInvoke: assign(({ event }) => {
92
+ const error = event.error;
93
+ return { error: error instanceof Error ? error.message : typeof error === "string" ? error : "Something went wrong" };
94
+ }),
95
+ clearError: assign({ error: () => void 0 }),
96
+ resetContext: assign({
97
+ isValid: () => false,
98
+ image: () => void 0,
99
+ error: () => void 0
100
+ }),
101
+ trackSubmitAttempt: () => {
102
+ addEvent({
103
+ code: "continue",
104
+ module: eventModuleNames.signature,
105
+ screen: eventScreenNames.signatureInput
106
+ });
107
+ },
108
+ trackError: ({ context }) => {
109
+ addEvent({
110
+ code: "verificationError",
111
+ module: eventModuleNames.signature,
112
+ payload: context.error ? { error: context.error } : void 0
113
+ });
114
+ }
115
+ },
116
+ guards: { canContinue: ({ context, event }) => context.isValid && event.type === "CONTINUE" && !!event.image }
117
+ }).createMachine({
118
+ id: "signature",
119
+ initial: "idle",
120
+ context: ({ input }) => ({
121
+ config: input.config,
122
+ ...emptyCaptureState()
123
+ }),
124
+ states: {
125
+ idle: { on: { LOAD: "captureInitials" } },
126
+ captureInitials: { on: {
127
+ SIGNATURE_CHANGED: { actions: "setSignatureValidity" },
128
+ CONTINUE: {
129
+ target: "submittingInitials",
130
+ guard: "canContinue",
131
+ actions: "assignImageForSubmit"
132
+ }
133
+ } },
134
+ submittingInitials: {
135
+ entry: "trackSubmitAttempt",
136
+ invoke: {
137
+ id: "submitInitials",
138
+ src: "submitInitials",
139
+ input: ({ context }) => ({
140
+ image: context.image,
141
+ type: context.config.type,
142
+ sendBase64: context.config.sendBase64 ?? false
143
+ }),
144
+ onDone: {
145
+ target: "captureSignature",
146
+ actions: ["setInitialsSubmitResult", "resetContext"]
147
+ },
148
+ onError: {
149
+ target: "error",
150
+ actions: ["setErrorFromInvoke"]
151
+ }
152
+ }
153
+ },
154
+ captureSignature: { on: {
155
+ SIGNATURE_CHANGED: { actions: "setSignatureValidity" },
156
+ CONTINUE: {
157
+ target: "submittingSignature",
158
+ guard: "canContinue",
159
+ actions: "assignImageForSubmit"
160
+ }
161
+ } },
162
+ submittingSignature: {
163
+ entry: "trackSubmitAttempt",
164
+ invoke: {
165
+ id: "submitSignature",
166
+ src: "submitSignature",
167
+ input: ({ context }) => ({
168
+ image: context.image,
169
+ type: context.config.type,
170
+ sendBase64: context.config.sendBase64 ?? false
171
+ }),
172
+ onDone: {
173
+ target: "success",
174
+ actions: "setSignatureSubmitResult"
175
+ },
176
+ onError: {
177
+ target: "error",
178
+ actions: ["setErrorFromInvoke"]
179
+ }
180
+ }
181
+ },
182
+ success: { after: { 3e3: "finished" } },
183
+ finished: { type: "final" },
184
+ error: { entry: "trackError" }
185
+ }
186
+ });
187
+
188
+ //#endregion
189
+ export { signatureMachine as t };
@@ -1,4 +1,4 @@
1
- import { t as api } from "./api-DzpnV6O7.esm.js";
1
+ import { t as api } from "./api-CqKwkjJ3.esm.js";
2
2
 
3
3
  //#region src/modules/stats/statsServices.ts
4
4
  /**
package/dist/stats.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./api-DzpnV6O7.esm.js";
2
- import { t as addDeviceStats } from "./stats-DHDoqSBV.esm.js";
1
+ import "./api-CqKwkjJ3.esm.js";
2
+ import { t as addDeviceStats } from "./stats-wkQyDFV3.esm.js";
3
3
 
4
4
  export { addDeviceStats };
@@ -0,0 +1,35 @@
1
+ import { t as AnyStateMachine } from "./StateMachine-DIeoDJ7r.js";
2
+
3
+ //#region src/internal/orchestration/types.d.ts
4
+ /** Eager module: a pre-imported state machine. */
5
+ type EagerModule = AnyStateMachine;
6
+ /** Lazy module: a function that dynamically imports a state machine. */
7
+ type LazyModule = () => Promise<AnyStateMachine>;
8
+ /** A module entry in the registry — either eager (pre-loaded) or lazy (dynamically loaded). */
9
+ type ModuleEntry = EagerModule | LazyModule;
10
+ /**
11
+ * Registry mapping module keys to state machines.
12
+ * Used by Flow (eager-only) — all entries are AnyStateMachine.
13
+ */
14
+ type ModuleRegistry = {
15
+ [key: string]: AnyStateMachine | undefined;
16
+ };
17
+ /**
18
+ * Extended registry supporting both eager and lazy module entries.
19
+ * Used by Workflow — entries can be pre-loaded machines or dynamic import functions.
20
+ */
21
+ type WorkflowModuleRegistry = {
22
+ [key: string]: ModuleEntry | undefined;
23
+ };
24
+ type RunChildModuleInput = {
25
+ machine: AnyStateMachine | undefined;
26
+ config: unknown;
27
+ };
28
+ type RunChildModuleEvent = {
29
+ type: 'MODULE_COMPLETE';
30
+ } | {
31
+ type: 'MODULE_ERROR';
32
+ error: unknown;
33
+ };
34
+ //#endregion
35
+ export { WorkflowModuleRegistry as i, RunChildModuleEvent as n, RunChildModuleInput as r, ModuleRegistry as t };
@@ -1,4 +1,4 @@
1
- import { t as CameraStream } from "./camera-1eeGnAaL.js";
1
+ import { t as CameraStream } from "./camera-CgnuDuxy.js";
2
2
 
3
3
  //#region src/modules/document-upload/types.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { t as DocumentUploadConfig } from "./types-2OPf1pyv.js";
1
+ import { t as DocumentUploadConfig } from "./types-CdlQrTiZ.js";
2
2
 
3
3
  //#region src/modules/flow/types.d.ts
4
4
  type EmptyConfig = Record<string, never>;
package/dist/wasm.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { n as WasmPipeline, r as warmupWasm, t as WarmupConfig } from "./warmup-CIj_wEV_.js";
2
- import { n as WasmConfig, o as setWasmConfig, r as initializeWasmUtil } from "./setup-DpHakxsC.js";
1
+ import { n as WasmPipeline, r as warmupWasm, t as WarmupConfig } from "./warmup-Cs0uqxUW.js";
2
+ import { n as WasmConfig, o as setWasmConfig, r as initializeWasmUtil } from "./setup-Bz3Ffaoc.js";
3
3
 
4
4
  //#region ../infra/src/wasm/wasmDefaults.d.ts
5
5
  /** The WASM version bundled and tested with this SDK release. */
package/dist/wasm.esm.js CHANGED
@@ -1,10 +1,10 @@
1
- import { c as resolveWasmConfig, i as setWasmConfig, o as DEFAULT_WASM_VERSION, s as buildDefaultWasmConfig, t as initializeWasmUtil } from "./setup-XpxfZgKn.esm.js";
2
- import { n as warmupWasm } from "./BaseWasmProvider-D-s_6M5H.esm.js";
3
- import "./WasmUtilProvider-BpZSvZbg.esm.js";
4
- import "./api-DzpnV6O7.esm.js";
5
- import "./events-DlHrOIRc.esm.js";
6
- import "./session-CUh77zj3.esm.js";
7
- import "./BrowserEnvironmentProvider-DaHeLJQw.esm.js";
8
- import "./browserSimulation-B4ubb2OL.esm.js";
1
+ import { c as resolveWasmConfig, i as setWasmConfig, o as DEFAULT_WASM_VERSION, s as buildDefaultWasmConfig, t as initializeWasmUtil } from "./setup-Bh2S53NT.esm.js";
2
+ import { n as warmupWasm } from "./BaseWasmProvider-C73c2nV9.esm.js";
3
+ import "./WasmUtilProvider-DRh0wrlm.esm.js";
4
+ import "./api-CqKwkjJ3.esm.js";
5
+ import "./events-CZ2ka3pu.esm.js";
6
+ import "./session-DoI-X9FK.esm.js";
7
+ import "./BrowserEnvironmentProvider-lxn4oxXn.esm.js";
8
+ import "./browserSimulation-7W5-A3RV.esm.js";
9
9
 
10
10
  export { DEFAULT_WASM_VERSION, buildDefaultWasmConfig, initializeWasmUtil, resolveWasmConfig, setWasmConfig, warmupWasm };