@incodetech/core 0.0.0-dev-20260423-427a341 → 0.0.0-dev-20260423-672ea74

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 (160) hide show
  1. package/dist/{OpenViduRecordingProvider-3SvbmWdi.esm.js → OpenViduRecordingProvider-7PqRexCU.esm.js} +1 -1
  2. package/dist/{WasmUtilProvider-DmbBSMl1.esm.js → WasmUtilProvider-3sS7TzsG.esm.js} +1 -1
  3. package/dist/{addressSearch-BvpzLWr4.esm.js → addressSearch-CMO_-Isa.esm.js} +4 -4
  4. package/dist/{ae-signature-21vUGDha.esm.js → ae-signature-C07fpdHw.esm.js} +1 -1
  5. package/dist/ae-signature.d.ts +3 -3
  6. package/dist/ae-signature.esm.js +5 -5
  7. package/dist/antifraud.d.ts +1 -1
  8. package/dist/antifraud.esm.js +4 -4
  9. package/dist/{antifraudStateMachine-CIa-IPvP.esm.js → antifraudStateMachine-BOUj16Hj.esm.js} +3 -3
  10. package/dist/authentication.d.ts +11 -11
  11. package/dist/authentication.esm.js +22 -22
  12. package/dist/{authenticationManager-Bv9qL5fe.d.ts → authenticationManager-CGn-1c-V.d.ts} +2 -2
  13. package/dist/{authenticationManager-WLXkr-r0.esm.js → authenticationManager-URLydvU9.esm.js} +6 -6
  14. package/dist/{authenticationStateMachine-BifJqMei.esm.js → authenticationStateMachine-D8N6ERZa.esm.js} +6 -6
  15. package/dist/{backCameraStream-DSwtYHuO.esm.js → backCameraStream-CrljCJ-Q.esm.js} +3 -3
  16. package/dist/camera.d.ts +1 -1
  17. package/dist/camera.esm.js +3 -3
  18. package/dist/consent.d.ts +55 -55
  19. package/dist/consent.esm.js +4 -4
  20. package/dist/{consentStateMachine-DqiR30gw.esm.js → consentStateMachine-Fa4KYzzn.esm.js} +3 -3
  21. package/dist/cpf-DEcHUluo.esm.js +38 -0
  22. package/dist/cross-document-data-match.d.ts +1 -1
  23. package/dist/cross-document-data-match.esm.js +4 -4
  24. package/dist/curp-validation.d.ts +5 -5
  25. package/dist/curp-validation.esm.js +4 -4
  26. package/dist/{curpValidationStateMachine-Bp-V13CB.esm.js → curpValidationStateMachine-oXdccErv.esm.js} +3 -3
  27. package/dist/custom-fields.d.ts +2 -2
  28. package/dist/custom-fields.esm.js +3 -3
  29. package/dist/custom-watchlist.d.ts +1 -1
  30. package/dist/custom-watchlist.esm.js +4 -4
  31. package/dist/{deepsightLoader-BTrehKGp.esm.js → deepsightLoader-QMFaZ2jE.esm.js} +10 -10
  32. package/dist/{deepsightService-BknZgccc.d.ts → deepsightService-BAbwxVdZ.d.ts} +2 -2
  33. package/dist/{deepsightService-B0Z-9gmQ.esm.js → deepsightService-BFLmC3ua.esm.js} +5 -5
  34. package/dist/device.esm.js +3 -3
  35. package/dist/document-capture.d.ts +70 -70
  36. package/dist/document-capture.esm.js +8 -8
  37. package/dist/document-upload.d.ts +44 -44
  38. package/dist/document-upload.esm.js +7 -7
  39. package/dist/{documentCaptureStateMachine-CtMhD27q.esm.js → documentCaptureStateMachine-B8bi2Kh4.esm.js} +5 -5
  40. package/dist/ekyb.d.ts +3 -3
  41. package/dist/ekyb.esm.js +10 -10
  42. package/dist/{ekybStateMachine-Bn-pLTcp.esm.js → ekybStateMachine-DruS8yRg.esm.js} +5 -5
  43. package/dist/ekyc.d.ts +3 -3
  44. package/dist/ekyc.esm.js +7 -6
  45. package/dist/{ekycStateMachine-Nmn0Alq9.esm.js → ekycStateMachine-U3ivS4-5.esm.js} +5 -38
  46. package/dist/electronic-signature.d.ts +3 -3
  47. package/dist/electronic-signature.esm.js +4 -4
  48. package/dist/{electronicSignatureManager-DAkg8MF6.esm.js → electronicSignatureManager-CWJyes3f.esm.js} +3 -3
  49. package/dist/email.d.ts +3 -3
  50. package/dist/email.esm.js +6 -6
  51. package/dist/{emailManager-q2qVoNbM.d.ts → emailManager-CCrXrAU3.d.ts} +2 -2
  52. package/dist/{emailManager-o6B6AYuE.esm.js → emailManager-y8HVFngo.esm.js} +3 -3
  53. package/dist/{emailStateMachine-B5M_HlVm.esm.js → emailStateMachine-bLpj4LRr.esm.js} +4 -4
  54. package/dist/{events-Deg_qfet.esm.js → events-BYuumPiB.esm.js} +6 -2
  55. package/dist/events.d.ts +1 -0
  56. package/dist/events.esm.js +2 -2
  57. package/dist/extensibility.d.ts +15 -15
  58. package/dist/extensibility.esm.js +33 -33
  59. package/dist/face-match.d.ts +1 -1
  60. package/dist/face-match.esm.js +4 -4
  61. package/dist/{faceCaptureManagerFactory-Bq_skXK4.esm.js → faceCaptureManagerFactory-0bTuXnNo.esm.js} +2 -2
  62. package/dist/{faceCaptureManagerFactory-DAQqd0EL.d.ts → faceCaptureManagerFactory-B9SCeUbN.d.ts} +8 -8
  63. package/dist/{faceCaptureSetup-C9RqcwR9.esm.js → faceCaptureSetup-BLsm9VU9.esm.js} +4 -4
  64. package/dist/{faceMatchStateMachine-DCh79GWp.esm.js → faceMatchStateMachine-CB5JYxiV.esm.js} +3 -3
  65. package/dist/flow.d.ts +8 -8
  66. package/dist/flow.esm.js +9 -9
  67. package/dist/{flowCompletionService-BnZC_DV0.esm.js → flowCompletionService-B0ua9_Oo.esm.js} +2 -2
  68. package/dist/{flowServices-s0CiH0WO.esm.js → flowServices-ngHx2Tal.esm.js} +3 -3
  69. package/dist/geolocation.d.ts +2 -2
  70. package/dist/geolocation.esm.js +5 -5
  71. package/dist/{geolocationStateMachine-CxQCX2NJ.esm.js → geolocationStateMachine-Cc2eFVZU.esm.js} +4 -4
  72. package/dist/{getDeviceClass-DStKSj3Q.esm.js → getDeviceClass-B_Y-Y-zj.esm.js} +1 -1
  73. package/dist/government-validation.d.ts +2 -2
  74. package/dist/government-validation.esm.js +5 -5
  75. package/dist/{governmentValidationStateMachine-L7nwlJPw.esm.js → governmentValidationStateMachine-wvZ5ysEM.esm.js} +4 -4
  76. package/dist/home.d.ts +14 -14
  77. package/dist/home.esm.js +3 -3
  78. package/dist/http.esm.js +1 -1
  79. package/dist/id-ocr.d.ts +627 -0
  80. package/dist/id-ocr.esm.js +459 -0
  81. package/dist/id.d.ts +10 -10
  82. package/dist/id.esm.js +22 -22
  83. package/dist/{idCaptureManager-C2L4R8rT.d.ts → idCaptureManager-B_dajBGr.d.ts} +7 -7
  84. package/dist/{idCaptureManager-Cuq1R8jW.esm.js → idCaptureManager-DvJEDPBW.esm.js} +4 -4
  85. package/dist/{idCaptureStateMachine-B1eBofuq.esm.js → idCaptureStateMachine-CgddydGJ.esm.js} +16 -16
  86. package/dist/identity-reuse.d.ts +49 -49
  87. package/dist/identity-reuse.esm.js +3 -3
  88. package/dist/{index-DMN6Upfk.d.ts → index-BbYUSiBn.d.ts} +120 -120
  89. package/dist/index.d.ts +2 -2
  90. package/dist/index.esm.js +8 -8
  91. package/dist/{lib-DP0jsq7O.esm.js → lib-Db1XxJuS.esm.js} +1 -1
  92. package/dist/mandatory-consent.d.ts +52 -52
  93. package/dist/mandatory-consent.esm.js +4 -4
  94. package/dist/{mandatoryConsentStateMachine-Bjqy6QyQ.esm.js → mandatoryConsentStateMachine-0bZm4vNr.esm.js} +3 -3
  95. package/dist/openviduLazy-ClEZ-Z5M.esm.js +3 -0
  96. package/dist/{openviduLazy-CYviBULf.esm.js → openviduLazy-sruV5sxi.esm.js} +2 -2
  97. package/dist/{permissionServices-BJJE4sgW.esm.js → permissionServices-BdE8_Evq.esm.js} +2 -2
  98. package/dist/phone.d.ts +3 -3
  99. package/dist/phone.esm.js +6 -6
  100. package/dist/{phoneManager-C4QrFxRg.esm.js → phoneManager-CfoEpjeM.esm.js} +3 -3
  101. package/dist/{phoneManager-DBwE-qB0.d.ts → phoneManager-Da8QkPv7.d.ts} +2 -2
  102. package/dist/{phoneStateMachine-CMbJx57_.esm.js → phoneStateMachine-u-A2hOxu.esm.js} +4 -4
  103. package/dist/{qe-signature-D7Ou3WtG.esm.js → qe-signature-DhBKlGUH.esm.js} +1 -1
  104. package/dist/qe-signature.d.ts +3 -3
  105. package/dist/qe-signature.esm.js +5 -5
  106. package/dist/{recordingService-CtcIvA3E.esm.js → recordingService-CpbeUNqo.esm.js} +13 -13
  107. package/dist/redirect-to-mobile.d.ts +2 -2
  108. package/dist/redirect-to-mobile.esm.js +5 -5
  109. package/dist/{redirectToMobileStateMachine-CtWjarUj.esm.js → redirectToMobileStateMachine-BMXJRSAC.esm.js} +4 -4
  110. package/dist/{runChildModule-DM84wxzE.esm.js → runChildModule-DHxT1RV0.esm.js} +1 -1
  111. package/dist/selfie.d.ts +11 -11
  112. package/dist/selfie.esm.js +22 -22
  113. package/dist/{selfieManager-CoyIn3Zl.esm.js → selfieManager-CkmC58-2.esm.js} +6 -6
  114. package/dist/{selfieManager-Cfp4MKMu.d.ts → selfieManager-dLehZvQm.d.ts} +2 -2
  115. package/dist/{selfieStateMachine-CsI9YnHz.esm.js → selfieStateMachine-BusOHMBN.esm.js} +3 -3
  116. package/dist/{session-CrOl1xma.esm.js → session-CEsW15cJ.esm.js} +4 -4
  117. package/dist/session.d.ts +1 -1
  118. package/dist/session.esm.js +6 -6
  119. package/dist/{setup-BFXhW7cP.esm.js → setup-BvlIJVhZ.esm.js} +5 -5
  120. package/dist/{setup-VJbRmBIU.d.ts → setup-v-TAsAN2.d.ts} +1 -1
  121. package/dist/signature.d.ts +2 -2
  122. package/dist/signature.esm.js +4 -4
  123. package/dist/{signatureStateMachine-yaoE2OEY.esm.js → signatureStateMachine-D6E5ZdHV.esm.js} +3 -3
  124. package/dist/{stats-BEwRvZG4.esm.js → stats-DE05K1o9.esm.js} +1 -1
  125. package/dist/stats.esm.js +2 -2
  126. package/dist/{types-CgZVig-j.d.ts → types-BelKmTqU.d.ts} +5 -1
  127. package/dist/{types-BINKuP3l.d.ts → types-BxjVn8Ry.d.ts} +1 -1
  128. package/dist/{types-BmHAVvm0.d.ts → types-DZ7Qw6Yc.d.ts} +1 -1
  129. package/dist/wasm.d.ts +2 -2
  130. package/dist/wasm.esm.js +8 -8
  131. package/dist/watchlist-for-business.d.ts +1 -1
  132. package/dist/watchlist-for-business.esm.js +3 -3
  133. package/dist/watchlist.d.ts +1 -1
  134. package/dist/watchlist.esm.js +4 -4
  135. package/dist/{watchlistServices-D2I0AZb-.esm.js → watchlistServices-BW1w845W.esm.js} +2 -2
  136. package/dist/workflow.d.ts +116 -116
  137. package/dist/workflow.esm.js +45 -44
  138. package/package.json +5 -1
  139. package/dist/openviduLazy-7pgMhjPB.esm.js +0 -3
  140. /package/dist/{Actor-B-9T-DlO.d.ts → Actor-gwS4PQSi.d.ts} +0 -0
  141. /package/dist/{BaseWasmProvider-Cf3MNlAN.esm.js → BaseWasmProvider-DsxKeFBt.esm.js} +0 -0
  142. /package/dist/{BrowserStorageProvider-Drw72wvG.esm.js → BrowserStorageProvider-D99-O_Kf.esm.js} +0 -0
  143. /package/dist/{BrowserTimerProvider-Dav3_fFy.esm.js → BrowserTimerProvider-Dl6dq0R8.esm.js} +0 -0
  144. /package/dist/{ITimerCapability-BriAkEyj.esm.js → ITimerCapability-DUFfKzTs.esm.js} +0 -0
  145. /package/dist/{IpifyProvider-j8lI27Fq.esm.js → IpifyProvider-BRMpdf22.esm.js} +0 -0
  146. /package/dist/{Manager-BCd4NBhe.d.ts → Manager-BmmucBrC.d.ts} +0 -0
  147. /package/dist/{MotionSensorProvider-DYYBm_bL.esm.js → MotionSensorProvider-Qfs1LN2o.esm.js} +0 -0
  148. /package/dist/{StateMachine-BNiyEj7J.d.ts → StateMachine-B1c7OspS.d.ts} +0 -0
  149. /package/dist/{api-CzVamIBG.esm.js → api-Bv7xXuMw.esm.js} +0 -0
  150. /package/dist/{browserSimulation-C4a2KVIY.esm.js → browserSimulation-CB1iKoSy.esm.js} +0 -0
  151. /package/dist/{camera-DaD3X_7m.esm.js → camera-BEKg9OFz.esm.js} +0 -0
  152. /package/dist/{camera-BZfRhPh2.d.ts → camera-CXfeCsaz.d.ts} +0 -0
  153. /package/dist/{chunk-DZf7laLq.esm.js → chunk-BPmmK_1R.esm.js} +0 -0
  154. /package/dist/{displayErrors-YTUUYe7G.d.ts → displayErrors-DT-jBLuo.d.ts} +0 -0
  155. /package/dist/{flowCompletionService-MFzwlktR.d.ts → flowCompletionService-BxOJeebo.d.ts} +0 -0
  156. /package/dist/{getBrowser-DxB_n8-W.esm.js → getBrowser-COVIk8a4.esm.js} +0 -0
  157. /package/dist/{platform-CTBj7PrA.esm.js → platform-bAk6j4kV.esm.js} +0 -0
  158. /package/dist/{types-CZwSG43_.d.ts → types-nURQ3pMv.d.ts} +0 -0
  159. /package/dist/{warmup-BR9x_9iz.d.ts → warmup-SnxLgQsT.d.ts} +0 -0
  160. /package/dist/{xstate.esm-BXNheqIe.esm.js → xstate.esm-DGcAhoQP.esm.js} +0 -0
@@ -0,0 +1,459 @@
1
+ import { t as api } from "./api-Bv7xXuMw.esm.js";
2
+ import { _ as endpoints, n as eventModuleNames, o as createManagerInstrumentation, v as getTimestamp } from "./events-BYuumPiB.esm.js";
3
+ import { a as createActor, i as fromPromise, n as assign, o as createManager, t as setup } from "./xstate.esm-DGcAhoQP.esm.js";
4
+ import { t as validateCPF } from "./cpf-DEcHUluo.esm.js";
5
+
6
+ //#region ../infra/src/providers/browser/DateFormattingProvider.ts
7
+ var DateFormattingProvider = class {
8
+ utcToIsoDateString(value) {
9
+ if (value === void 0 || value === null || value === "") return "";
10
+ const date = new Date(value);
11
+ if (Number.isNaN(date.getTime())) return "";
12
+ return `${date.getUTCFullYear()}-${String(date.getUTCMonth() + 1).padStart(2, "0")}-${String(date.getUTCDate()).padStart(2, "0")}`;
13
+ }
14
+ parseIsoDateStringToEpochMs(value) {
15
+ return Date.parse(value);
16
+ }
17
+ getAgeInYears(birthDate, referenceEpochMs) {
18
+ const now = new Date(referenceEpochMs);
19
+ const birth = new Date(birthDate);
20
+ let age = now.getFullYear() - birth.getFullYear();
21
+ const monthDiff = now.getMonth() - birth.getMonth();
22
+ if (monthDiff < 0 || monthDiff === 0 && now.getDate() < birth.getDate()) age--;
23
+ return age;
24
+ }
25
+ };
26
+
27
+ //#endregion
28
+ //#region src/modules/id-ocr/idOcrUtils.ts
29
+ const dateFormattingInstance$1 = new DateFormattingProvider();
30
+ const resolveFullName = (data) => {
31
+ if (data.name?.fullName) return data.name.fullName;
32
+ const joined = [
33
+ data.name?.givenName ?? data.givenName ?? data.firstName,
34
+ data.name?.paternalLastName ?? data.fathersSurname,
35
+ data.name?.maternalLastName ?? data.mothersSurname
36
+ ].filter(Boolean).join(" ").trim();
37
+ if (joined) return joined;
38
+ return data.fullNameMrz ?? "";
39
+ };
40
+ const mapOcrResponseToFormData = (data) => ({
41
+ name: resolveFullName(data),
42
+ firstName: data.firstName ?? data.givenName ?? data.name?.givenName ?? "",
43
+ lastName: data.fathersSurname ?? data.name?.paternalLastName ?? "",
44
+ paternalLastName: data.fathersSurname ?? data.name?.paternalLastName ?? "",
45
+ maternalLastName: data.mothersSurname ?? data.name?.maternalLastName ?? "",
46
+ birthDate: dateFormattingInstance$1.utcToIsoDateString(data.birthDate),
47
+ gender: data.gender ?? "",
48
+ address: data.address ?? "",
49
+ documentNumber: data.documentNumber ?? "",
50
+ personalNumber: data.personalNumber ?? "",
51
+ curp: data.curp ?? "",
52
+ issuingCountry: data.issuingCountry ?? "",
53
+ expireAt: data.expireAt,
54
+ email: ""
55
+ });
56
+ const mapUpdateOcrDataForApi = (params) => {
57
+ const working = { ...params };
58
+ const nameTrimmed = working.name?.trim();
59
+ if (nameTrimmed) working.name = nameTrimmed;
60
+ if (nameTrimmed && !working.firstName?.trim() && !working.paternalLastName?.trim() && !working.maternalLastName?.trim()) {
61
+ const tokens = nameTrimmed.split(/\s+/).filter(Boolean);
62
+ if (tokens.length === 3) {
63
+ working.firstName = tokens[0];
64
+ working.paternalLastName = tokens[1];
65
+ working.maternalLastName = tokens[2];
66
+ }
67
+ }
68
+ const body = {};
69
+ for (const key of Object.keys(working)) {
70
+ const raw = working[key];
71
+ if (raw === void 0) continue;
72
+ if (key === "birthDate") {
73
+ body[key] = dateFormattingInstance$1.parseIsoDateStringToEpochMs(raw);
74
+ continue;
75
+ }
76
+ body[key] = typeof raw === "string" ? raw.trim() : raw;
77
+ }
78
+ return body;
79
+ };
80
+
81
+ //#endregion
82
+ //#region src/modules/id-ocr/idOcrServices.ts
83
+ /** Fetch ID OCR data. Throws on failure. */
84
+ async function getOcrData(signal, isSecondId) {
85
+ const url = isSecondId ? endpoints.ocrDataSecondId : endpoints.ocrData;
86
+ const res = await api.get(url, { signal });
87
+ if (!res.ok) throw new Error(`GET ${url} failed: ${res.status} ${res.statusText}`);
88
+ return res.data;
89
+ }
90
+ /** Updates ID OCR data if OCR data is editable. Throws on failure. */
91
+ async function updateOcrData(params, signal, isSecondId) {
92
+ const url = isSecondId ? endpoints.updateEditableOcrDataSecondId : endpoints.updateEditableOcrData;
93
+ const res = await api.put(url, mapUpdateOcrDataForApi(params), { signal });
94
+ if (!res.ok) throw new Error(`PUT failed: ${url} failed: ${res.status} ${res.statusText}`);
95
+ return res.data;
96
+ }
97
+
98
+ //#endregion
99
+ //#region src/modules/id-ocr/idOcrConsts.ts
100
+ const MIN_AGE = 18;
101
+ const CPFFlowIds = [
102
+ "65985b7ec335fa20effa547b",
103
+ "657b823ddb312196b5dd30f8",
104
+ "659843c207413e34c407fc1d",
105
+ "657c8b7a188817b6ec04b26c",
106
+ "6793bba8845d50f53f5fb910",
107
+ "679826a35ec9927c65407873",
108
+ "6838c03fae866c13e63fbaf4",
109
+ "681a14fb37a49f2319cbf359",
110
+ "68e5318406c77c2b6993ed8f",
111
+ "68e531531a6892418eecd21f",
112
+ "68e5314706c77c2b6993eb99"
113
+ ];
114
+
115
+ //#endregion
116
+ //#region src/modules/id-ocr/idOcrFields.ts
117
+ const CPF_ONLY_OCR_FIELDS = [{
118
+ key: "documentNumber",
119
+ labelKey: "userData.cpf",
120
+ type: "text",
121
+ validation: [{ type: "required" }, { type: "cpf" }],
122
+ required: true
123
+ }];
124
+ const OCR_FIELDS = [
125
+ {
126
+ key: "name",
127
+ labelKey: "userData.fullName",
128
+ type: "text",
129
+ validation: [{ type: "required" }],
130
+ required: true
131
+ },
132
+ {
133
+ key: "birthDate",
134
+ labelKey: "userData.dateOfBirth",
135
+ type: "date",
136
+ validation: [{ type: "required" }, {
137
+ type: "minAge",
138
+ years: MIN_AGE
139
+ }],
140
+ required: true
141
+ },
142
+ {
143
+ key: "gender",
144
+ labelKey: "userData.sex",
145
+ type: "radio",
146
+ options: [{
147
+ label: "common.male",
148
+ value: "M"
149
+ }, {
150
+ label: "common.female",
151
+ value: "F"
152
+ }],
153
+ required: false
154
+ },
155
+ {
156
+ key: "address",
157
+ labelKey: "userData.address",
158
+ type: "text",
159
+ validation: [{ type: "required" }],
160
+ required: true
161
+ },
162
+ {
163
+ key: "issuingCountry",
164
+ labelKey: "userData.issuingCountry",
165
+ type: "text",
166
+ validation: [{ type: "required" }],
167
+ required: true
168
+ },
169
+ {
170
+ key: "documentNumber",
171
+ labelKey: "userData.documentNumber",
172
+ type: "text",
173
+ required: true
174
+ }
175
+ ];
176
+ const getOcrFields = (config) => {
177
+ const { flowId } = config;
178
+ if (flowId && CPFFlowIds.includes(flowId)) return CPF_ONLY_OCR_FIELDS;
179
+ return OCR_FIELDS;
180
+ };
181
+
182
+ //#endregion
183
+ //#region src/modules/id-ocr/idOcrValidators.ts
184
+ const dateFormattingInstance = new DateFormattingProvider();
185
+ const createValidators = () => {
186
+ return {
187
+ required: (value, _) => !value.trim() ? "modifiableOCR.cantBeEmpty" : void 0,
188
+ minAge: (value, rule) => {
189
+ if (!value.trim() || rule.type !== "minAge") return void 0;
190
+ return dateFormattingInstance.getAgeInYears(value, getTimestamp()) < rule.years ? "modifiableOCR.ageRange" : void 0;
191
+ },
192
+ cpf: (value, rule) => {
193
+ if (rule.type !== "cpf" || !value.trim()) return void 0;
194
+ return validateCPF(value) ? void 0 : "verification.errors.invalidTaxId";
195
+ }
196
+ };
197
+ };
198
+ const normalizeFieldValue = (value) => typeof value === "string" ? value.trim() : String(value ?? "");
199
+ const validateFieldValue = (value, field, validators) => {
200
+ if (!field.validation) return void 0;
201
+ for (const rule of field.validation) {
202
+ const error = validators[rule.type](value, rule);
203
+ if (error) return error;
204
+ }
205
+ };
206
+ const validateOcrForm = (data, fields) => {
207
+ const validators = createValidators();
208
+ return fields.reduce((errors, field) => {
209
+ const error = validateFieldValue(normalizeFieldValue(data[field.key]), field, validators);
210
+ if (error) errors[field.key] = error;
211
+ return errors;
212
+ }, {});
213
+ };
214
+ const validateOcrField = (data, fieldKey, fields) => {
215
+ const field = fields.find((field$1) => field$1.key === fieldKey);
216
+ if (!field) return void 0;
217
+ const validators = createValidators();
218
+ return validateFieldValue(normalizeFieldValue(data[field.key]), field, validators);
219
+ };
220
+
221
+ //#endregion
222
+ //#region src/modules/id-ocr/idOcrStateMachine.ts
223
+ const emptyOcrData = () => ({});
224
+ const idOcrStateMachine = setup({
225
+ types: {
226
+ context: {},
227
+ events: {},
228
+ input: {}
229
+ },
230
+ actors: {
231
+ getOcrData: fromPromise(async ({ input, signal }) => getOcrData(signal, input.isSecondId)),
232
+ updateOcrData: fromPromise(async ({ input, signal }) => updateOcrData(input.params, signal, input.isSecondId))
233
+ },
234
+ actions: {
235
+ setInitialData: assign(({ event }) => {
236
+ const raw = event.output;
237
+ return {
238
+ formData: mapOcrResponseToFormData(raw),
239
+ editedFields: {},
240
+ validationErrors: void 0,
241
+ error: void 0
242
+ };
243
+ }),
244
+ updateField: assign(({ context, event }) => {
245
+ const { field, value } = event;
246
+ return {
247
+ formData: {
248
+ ...context.formData,
249
+ [field]: value
250
+ },
251
+ editedFields: {
252
+ ...context.editedFields,
253
+ [field]: value
254
+ }
255
+ };
256
+ }),
257
+ clearFieldValidationError: assign(({ context, event }) => {
258
+ if (event.type !== "DATA_CHANGED") return {};
259
+ const { field } = event;
260
+ const errs = context.validationErrors;
261
+ if (!errs?.[field]) return {};
262
+ const next = { ...errs };
263
+ delete next[field];
264
+ return { validationErrors: Object.keys(next).length > 0 ? next : void 0 };
265
+ }),
266
+ setOcrValidationErrors: assign(({ context }) => ({ validationErrors: validateOcrForm(context.formData, getOcrFields(context.config)) })),
267
+ validateFormField: assign(({ context, event }) => {
268
+ if (event.type !== "VALIDATE_FIELD") return {};
269
+ const { field } = event;
270
+ const message = validateOcrField(context.formData, field, getOcrFields(context.config));
271
+ const next = { ...context.validationErrors ?? {} };
272
+ if (message) next[field] = message;
273
+ else delete next[field];
274
+ return { validationErrors: Object.keys(next).length > 0 ? next : void 0 };
275
+ }),
276
+ setError: assign(({ event }) => ({ error: String(event.error) })),
277
+ beginSecondIdOcrPhase: assign(() => ({
278
+ activeOcrDocument: "second",
279
+ editedFields: {},
280
+ validationErrors: void 0
281
+ })),
282
+ resetForRetry: assign(() => ({
283
+ activeOcrDocument: "first",
284
+ formData: emptyOcrData(),
285
+ editedFields: {},
286
+ error: void 0,
287
+ validationErrors: void 0
288
+ })),
289
+ computeValidationResult: assign(({ context }) => ({ validationErrors: validateOcrForm(context.formData, getOcrFields(context.config)) }))
290
+ },
291
+ guards: {
292
+ isOcrEditable: ({ context }) => context.config.editableOcr === true,
293
+ shouldLoadSecondOcrAfterFirst: ({ context }) => context.config.secondId === true && context.activeOcrDocument === "first",
294
+ isOcrFormValid: ({ context }) => Object.keys(context.validationErrors ?? {}).length === 0,
295
+ shouldSubmit: ({ context }) => Object.keys(context.validationErrors ?? {}).length === 0 && Object.keys(context.editedFields).length > 0,
296
+ shouldProceedWithoutSubmitToSecondId: ({ context }) => Object.keys(context.validationErrors ?? {}).length === 0 && Object.keys(context.editedFields).length === 0 && context.config.secondId === true && context.activeOcrDocument === "first"
297
+ }
298
+ }).createMachine({
299
+ id: "idOcr",
300
+ initial: "idle",
301
+ context: ({ input }) => {
302
+ const data = emptyOcrData();
303
+ return {
304
+ config: input.config,
305
+ formData: data,
306
+ editedFields: {},
307
+ activeOcrDocument: "first"
308
+ };
309
+ },
310
+ states: {
311
+ idle: { on: { LOAD: [{ target: "loading" }] } },
312
+ loading: { invoke: {
313
+ src: "getOcrData",
314
+ input: ({ context }) => ({ isSecondId: context.activeOcrDocument === "second" }),
315
+ onDone: [{
316
+ target: "inputting",
317
+ guard: "isOcrEditable",
318
+ actions: "setInitialData"
319
+ }, {
320
+ target: "readonly",
321
+ actions: "setInitialData"
322
+ }],
323
+ onError: {
324
+ target: "error",
325
+ actions: "setError"
326
+ }
327
+ } },
328
+ readonly: { on: { CONTINUE: [{
329
+ target: "loading",
330
+ guard: "shouldLoadSecondOcrAfterFirst",
331
+ actions: "beginSecondIdOcrPhase"
332
+ }, { target: "finished" }] } },
333
+ inputting: { on: {
334
+ DATA_CHANGED: { actions: ["updateField", "clearFieldValidationError"] },
335
+ VALIDATE_FIELD: { actions: "validateFormField" },
336
+ CONTINUE: { target: "validatingContinue" }
337
+ } },
338
+ validatingContinue: {
339
+ entry: "computeValidationResult",
340
+ always: [
341
+ {
342
+ guard: "shouldSubmit",
343
+ target: "submitting"
344
+ },
345
+ {
346
+ guard: "shouldProceedWithoutSubmitToSecondId",
347
+ target: "loading",
348
+ actions: "beginSecondIdOcrPhase"
349
+ },
350
+ {
351
+ guard: "isOcrFormValid",
352
+ target: "finished"
353
+ },
354
+ { target: "inputting" }
355
+ ]
356
+ },
357
+ submitting: { invoke: {
358
+ src: "updateOcrData",
359
+ input: ({ context }) => ({
360
+ params: context.editedFields,
361
+ isSecondId: context.activeOcrDocument === "second"
362
+ }),
363
+ onDone: [{
364
+ target: "loading",
365
+ guard: "shouldLoadSecondOcrAfterFirst",
366
+ actions: "beginSecondIdOcrPhase"
367
+ }, { target: "finished" }],
368
+ onError: {
369
+ target: "error",
370
+ actions: "setError"
371
+ }
372
+ } },
373
+ finished: { type: "final" },
374
+ error: { on: { RESET: {
375
+ target: "idle",
376
+ actions: "resetForRetry"
377
+ } } }
378
+ }
379
+ });
380
+
381
+ //#endregion
382
+ //#region src/modules/id-ocr/idOcrActor.ts
383
+ function createIdOcrActor(options) {
384
+ return createActor(idOcrStateMachine, { input: { config: options.config } }).start();
385
+ }
386
+
387
+ //#endregion
388
+ //#region src/modules/id-ocr/idOcrManager.ts
389
+ function mapState(snapshot) {
390
+ const { context } = snapshot;
391
+ const editableOcr = context.config.editableOcr === true;
392
+ if (snapshot.matches("idle")) return { status: "idle" };
393
+ if (snapshot.matches("loading")) return {
394
+ status: "loading",
395
+ ocrDocument: context.activeOcrDocument
396
+ };
397
+ if (snapshot.matches("readonly")) return {
398
+ status: "readonly",
399
+ formData: context.formData,
400
+ editableOcr,
401
+ ocrDocument: context.activeOcrDocument
402
+ };
403
+ if (snapshot.matches("inputting")) return {
404
+ status: "inputting",
405
+ formData: context.formData,
406
+ diff: context.editedFields,
407
+ editableOcr,
408
+ ocrDocument: context.activeOcrDocument,
409
+ validationErrors: context.validationErrors
410
+ };
411
+ if (snapshot.matches("submitting")) return {
412
+ status: "submitting",
413
+ ocrDocument: context.activeOcrDocument
414
+ };
415
+ if (snapshot.matches("finished")) return { status: "finished" };
416
+ if (snapshot.matches("error")) return {
417
+ status: "error",
418
+ error: context.error ?? "Unknown error"
419
+ };
420
+ return { status: "idle" };
421
+ }
422
+ function createApi({ actor, trackElementClicked }) {
423
+ return {
424
+ load() {
425
+ actor.send({ type: "LOAD" });
426
+ },
427
+ setField(field, value) {
428
+ actor.send({
429
+ type: "DATA_CHANGED",
430
+ field,
431
+ value
432
+ });
433
+ },
434
+ validateField(field) {
435
+ actor.send({
436
+ type: "VALIDATE_FIELD",
437
+ field
438
+ });
439
+ },
440
+ continue() {
441
+ actor.send({ type: "CONTINUE" });
442
+ trackElementClicked?.("continue");
443
+ },
444
+ reset() {
445
+ actor.send({ type: "RESET" });
446
+ }
447
+ };
448
+ }
449
+ function createIdOcrManager(options) {
450
+ return createManager({
451
+ actor: createIdOcrActor(options),
452
+ mapState,
453
+ createApi,
454
+ instrumentation: createManagerInstrumentation(eventModuleNames.idOcr)
455
+ });
456
+ }
457
+
458
+ //#endregion
459
+ export { CPFFlowIds, MIN_AGE, OCR_FIELDS, createIdOcrManager, getOcrFields, idOcrStateMachine };
package/dist/id.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import "./warmup-BR9x_9iz.js";
2
- import "./Manager-BCd4NBhe.js";
3
- import "./Actor-B-9T-DlO.js";
4
- import "./StateMachine-BNiyEj7J.js";
5
- import { t as CameraStream } from "./camera-BZfRhPh2.js";
6
- import "./types-BINKuP3l.js";
7
- import "./types-CgZVig-j.js";
8
- import "./deepsightService-BknZgccc.js";
9
- import { n as PermissionStatus, t as PermissionResult } from "./types-CZwSG43_.js";
10
- import { A as IdCaptureConfig, B as IdErrorCode, C as IdCaptureMachine, D as DetectionArea, E as CapturedImage, F as IdCaptureInput, G as ManualUploadContext, H as MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, I as IdCaptureMode, J as RecordingSession, K as ManualUploadSide, L as IdCaptureThresholds, M as IdCaptureDependencies, N as IdCaptureEvent, O as DetectionStatus, P as IdCaptureGeometry, R as IdDocumentType, S as createIdCaptureActor, T as CaptureIdResponse, U as MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, V as IdFlowStep, W as MANUAL_UPLOAD_MAX_RETRIES, X as DetectionOrientation, Y as UploadIdResponse, Z as IdCaptureSettings, _ as uploadIdImage, a as IdCaptureInitResult, b as CreateIdCaptureActorOptions, c as UploadIdImageParams, d as initializeIdCapture, f as preloadIdRecordingProvider, g as stopStream, h as stopRecording, j as IdCaptureContext, k as ID_ERROR_CODES, l as UploadManualIdFileParams, m as startRecordingSession, n as IdCaptureState, o as InitializeIdCaptureParams, p as processId, q as ManualUploadTab, r as createIdCaptureManager, s as StartRecordingParams, t as IdCaptureManager, u as ValidationError, v as uploadManualIdFile, w as idCaptureMachine, x as IdCaptureActor, y as validateUploadResponse, z as IdError } from "./idCaptureManager-C2L4R8rT.js";
1
+ import "./warmup-SnxLgQsT.js";
2
+ import "./Manager-BmmucBrC.js";
3
+ import "./Actor-gwS4PQSi.js";
4
+ import "./StateMachine-B1c7OspS.js";
5
+ import { t as CameraStream } from "./camera-CXfeCsaz.js";
6
+ import "./types-BxjVn8Ry.js";
7
+ import "./types-BelKmTqU.js";
8
+ import "./deepsightService-BAbwxVdZ.js";
9
+ import { n as PermissionStatus, t as PermissionResult } from "./types-nURQ3pMv.js";
10
+ import { A as IdCaptureConfig, B as IdErrorCode, C as IdCaptureMachine, D as DetectionArea, E as CapturedImage, F as IdCaptureInput, G as ManualUploadContext, H as MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, I as IdCaptureMode, J as RecordingSession, K as ManualUploadSide, L as IdCaptureThresholds, M as IdCaptureDependencies, N as IdCaptureEvent, O as DetectionStatus, P as IdCaptureGeometry, R as IdDocumentType, S as createIdCaptureActor, T as CaptureIdResponse, U as MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, V as IdFlowStep, W as MANUAL_UPLOAD_MAX_RETRIES, X as DetectionOrientation, Y as UploadIdResponse, Z as IdCaptureSettings, _ as uploadIdImage, a as IdCaptureInitResult, b as CreateIdCaptureActorOptions, c as UploadIdImageParams, d as initializeIdCapture, f as preloadIdRecordingProvider, g as stopStream, h as stopRecording, j as IdCaptureContext, k as ID_ERROR_CODES, l as UploadManualIdFileParams, m as startRecordingSession, n as IdCaptureState, o as InitializeIdCaptureParams, p as processId, q as ManualUploadTab, r as createIdCaptureManager, s as StartRecordingParams, t as IdCaptureManager, u as ValidationError, v as uploadManualIdFile, w as idCaptureMachine, x as IdCaptureActor, y as validateUploadResponse, z as IdError } from "./idCaptureManager-B_dajBGr.js";
11
11
  export { CameraStream, CaptureIdResponse, CapturedImage, type CreateIdCaptureActorOptions, DetectionArea, DetectionOrientation, DetectionStatus, ID_ERROR_CODES, type IdCaptureActor, IdCaptureConfig, type IdCaptureContext, IdCaptureDependencies, type IdCaptureEvent, IdCaptureGeometry, IdCaptureInitResult, type IdCaptureInput, type IdCaptureMachine, type IdCaptureManager, IdCaptureMode, IdCaptureSettings, type IdCaptureState, IdCaptureThresholds, IdDocumentType, IdError, IdErrorCode, IdFlowStep, InitializeIdCaptureParams, MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, MANUAL_UPLOAD_MAX_RETRIES, ManualUploadContext, ManualUploadSide, ManualUploadTab, PermissionResult, PermissionStatus, RecordingSession, StartRecordingParams, UploadIdImageParams, UploadIdResponse, UploadManualIdFileParams, ValidationError, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, preloadIdRecordingProvider, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, uploadManualIdFile, validateUploadResponse };
package/dist/id.esm.js CHANGED
@@ -1,24 +1,24 @@
1
- import "./BaseWasmProvider-Cf3MNlAN.esm.js";
2
- import "./api-CzVamIBG.esm.js";
3
- import "./events-Deg_qfet.esm.js";
4
- import "./session-CrOl1xma.esm.js";
5
- import "./IpifyProvider-j8lI27Fq.esm.js";
6
- import "./browserSimulation-C4a2KVIY.esm.js";
7
- import "./xstate.esm-BXNheqIe.esm.js";
8
- import "./BrowserStorageProvider-Drw72wvG.esm.js";
9
- import "./recordingService-CtcIvA3E.esm.js";
10
- import "./deepsightService-B0Z-9gmQ.esm.js";
11
- import "./permissionServices-BJJE4sgW.esm.js";
12
- import "./camera-DaD3X_7m.esm.js";
13
- import "./getBrowser-DxB_n8-W.esm.js";
14
- import "./stats-BEwRvZG4.esm.js";
15
- import "./MotionSensorProvider-DYYBm_bL.esm.js";
16
- import "./platform-CTBj7PrA.esm.js";
17
- import "./ITimerCapability-BriAkEyj.esm.js";
18
- import "./backCameraStream-DSwtYHuO.esm.js";
19
- import "./getDeviceClass-DStKSj3Q.esm.js";
20
- import "./BrowserTimerProvider-Dav3_fFy.esm.js";
21
- import { a as startRecordingSession, c as uploadIdImage, d as ID_ERROR_CODES, f as MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, i as processId, l as uploadManualIdFile, m as MANUAL_UPLOAD_MAX_RETRIES, n as initializeIdCapture, o as stopRecording, p as MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, r as preloadIdRecordingProvider, s as stopStream, t as idCaptureMachine, u as validateUploadResponse } from "./idCaptureStateMachine-B1eBofuq.esm.js";
22
- import { r as createIdCaptureActor, t as createIdCaptureManager } from "./idCaptureManager-Cuq1R8jW.esm.js";
1
+ import "./BaseWasmProvider-DsxKeFBt.esm.js";
2
+ import "./api-Bv7xXuMw.esm.js";
3
+ import "./events-BYuumPiB.esm.js";
4
+ import "./session-CEsW15cJ.esm.js";
5
+ import "./IpifyProvider-BRMpdf22.esm.js";
6
+ import "./browserSimulation-CB1iKoSy.esm.js";
7
+ import "./xstate.esm-DGcAhoQP.esm.js";
8
+ import "./BrowserStorageProvider-D99-O_Kf.esm.js";
9
+ import "./recordingService-CpbeUNqo.esm.js";
10
+ import "./deepsightService-BFLmC3ua.esm.js";
11
+ import "./permissionServices-BdE8_Evq.esm.js";
12
+ import "./camera-BEKg9OFz.esm.js";
13
+ import "./getBrowser-COVIk8a4.esm.js";
14
+ import "./stats-DE05K1o9.esm.js";
15
+ import "./MotionSensorProvider-Qfs1LN2o.esm.js";
16
+ import "./platform-bAk6j4kV.esm.js";
17
+ import "./ITimerCapability-DUFfKzTs.esm.js";
18
+ import "./backCameraStream-CrljCJ-Q.esm.js";
19
+ import "./getDeviceClass-B_Y-Y-zj.esm.js";
20
+ import "./BrowserTimerProvider-Dl6dq0R8.esm.js";
21
+ import { a as startRecordingSession, c as uploadIdImage, d as ID_ERROR_CODES, f as MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, i as processId, l as uploadManualIdFile, m as MANUAL_UPLOAD_MAX_RETRIES, n as initializeIdCapture, o as stopRecording, p as MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, r as preloadIdRecordingProvider, s as stopStream, t as idCaptureMachine, u as validateUploadResponse } from "./idCaptureStateMachine-CgddydGJ.esm.js";
22
+ import { r as createIdCaptureActor, t as createIdCaptureManager } from "./idCaptureManager-DvJEDPBW.esm.js";
23
23
 
24
24
  export { ID_ERROR_CODES, MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, MANUAL_UPLOAD_MAX_RETRIES, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, preloadIdRecordingProvider, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, uploadManualIdFile, validateUploadResponse };
@@ -1,10 +1,10 @@
1
- import { t as Manager } from "./Manager-BCd4NBhe.js";
2
- import { t as ActorRefFrom } from "./Actor-B-9T-DlO.js";
3
- import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-BNiyEj7J.js";
4
- import { t as CameraStream } from "./camera-BZfRhPh2.js";
5
- import { a as RegulationTypes, n as Flow, o as TutorialIdConfig } from "./types-CgZVig-j.js";
6
- import { c as IMLProviderCapability, d as IRecordingCapability, f as RecordingConnection, i as IncodeCanvas, l as MLProviderConfig, n as IMotionSensorCapability, r as StreamCanvasCapture, t as DeepsightService, u as IStorageCapability } from "./deepsightService-BknZgccc.js";
7
- import { n as PermissionStatus, t as PermissionResult } from "./types-CZwSG43_.js";
1
+ import { t as Manager } from "./Manager-BmmucBrC.js";
2
+ import { t as ActorRefFrom } from "./Actor-gwS4PQSi.js";
3
+ import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-B1c7OspS.js";
4
+ import { t as CameraStream } from "./camera-CXfeCsaz.js";
5
+ import { a as RegulationTypes, n as Flow, o as TutorialIdConfig } from "./types-BelKmTqU.js";
6
+ import { c as IMLProviderCapability, d as IRecordingCapability, f as RecordingConnection, i as IncodeCanvas, l as MLProviderConfig, n as IMotionSensorCapability, r as StreamCanvasCapture, t as DeepsightService, u as IStorageCapability } from "./deepsightService-BAbwxVdZ.js";
7
+ import { n as PermissionStatus, t as PermissionResult } from "./types-nURQ3pMv.js";
8
8
 
9
9
  //#region ../infra/src/capabilities/IIdCaptureCapability.d.ts
10
10
  /**
@@ -1,7 +1,7 @@
1
- import { n as eventModuleNames, o as createManagerInstrumentation, r as eventScreenNames } from "./events-Deg_qfet.esm.js";
2
- import { a as createActor, o as createManager } from "./xstate.esm-BXNheqIe.esm.js";
3
- import { t as BrowserStorageProvider } from "./BrowserStorageProvider-Drw72wvG.esm.js";
4
- import { t as idCaptureMachine } from "./idCaptureStateMachine-B1eBofuq.esm.js";
1
+ import { n as eventModuleNames, o as createManagerInstrumentation, r as eventScreenNames } from "./events-BYuumPiB.esm.js";
2
+ import { a as createActor, o as createManager } from "./xstate.esm-DGcAhoQP.esm.js";
3
+ import { t as BrowserStorageProvider } from "./BrowserStorageProvider-D99-O_Kf.esm.js";
4
+ import { t as idCaptureMachine } from "./idCaptureStateMachine-CgddydGJ.esm.js";
5
5
 
6
6
  //#region src/modules/id/idCaptureActor.ts
7
7
  function createIdCaptureActor(options) {
@@ -1,17 +1,17 @@
1
- import { a as IdCaptureModelType, i as WasmPipelineType, r as mlWasmJSApi_default, t as BaseWasmProvider } from "./BaseWasmProvider-Cf3MNlAN.esm.js";
2
- import { r as getToken, t as api } from "./api-CzVamIBG.esm.js";
3
- import { _ as endpoints, v as revokeObjectURL } from "./events-Deg_qfet.esm.js";
4
- import { t as getDisableIpify } from "./session-CrOl1xma.esm.js";
5
- import { i as fromPromise, n as assign, r as fromCallback, t as setup } from "./xstate.esm-BXNheqIe.esm.js";
6
- import { _ as StreamCanvasCapture, d as createRecordingSession, f as startRecording, g as flagIdManualReview, m as StreamCanvasProcessingSession, n as preloadOpenViduProvider, p as stopRecording$1 } from "./recordingService-CtcIvA3E.esm.js";
7
- import { n as IncodeCanvas } from "./deepsightService-B0Z-9gmQ.esm.js";
8
- import { n as requestPermission, r as clearCameraPermissionCache, t as checkPermission } from "./permissionServices-BJJE4sgW.esm.js";
9
- import { r as getWindowDimensions } from "./getBrowser-DxB_n8-W.esm.js";
10
- import { t as addDeviceStats } from "./stats-BEwRvZG4.esm.js";
11
- import { n as isDesktop } from "./platform-CTBj7PrA.esm.js";
12
- import { t as getBackCameraStream } from "./backCameraStream-DSwtYHuO.esm.js";
13
- import { t as getDeviceClass } from "./getDeviceClass-DStKSj3Q.esm.js";
14
- import { t as BrowserTimerProvider } from "./BrowserTimerProvider-Dav3_fFy.esm.js";
1
+ import { a as IdCaptureModelType, i as WasmPipelineType, r as mlWasmJSApi_default, t as BaseWasmProvider } from "./BaseWasmProvider-DsxKeFBt.esm.js";
2
+ import { r as getToken, t as api } from "./api-Bv7xXuMw.esm.js";
3
+ import { _ as endpoints, y as revokeObjectURL } from "./events-BYuumPiB.esm.js";
4
+ import { t as getDisableIpify } from "./session-CEsW15cJ.esm.js";
5
+ import { i as fromPromise, n as assign, r as fromCallback, t as setup } from "./xstate.esm-DGcAhoQP.esm.js";
6
+ import { _ as StreamCanvasCapture, d as createRecordingSession, f as startRecording, g as flagIdManualReview, m as StreamCanvasProcessingSession, n as preloadOpenViduProvider, p as stopRecording$1 } from "./recordingService-CpbeUNqo.esm.js";
7
+ import { n as IncodeCanvas } from "./deepsightService-BFLmC3ua.esm.js";
8
+ import { n as requestPermission, r as clearCameraPermissionCache, t as checkPermission } from "./permissionServices-BdE8_Evq.esm.js";
9
+ import { r as getWindowDimensions } from "./getBrowser-COVIk8a4.esm.js";
10
+ import { t as addDeviceStats } from "./stats-DE05K1o9.esm.js";
11
+ import { n as isDesktop } from "./platform-bAk6j4kV.esm.js";
12
+ import { t as getBackCameraStream } from "./backCameraStream-CrljCJ-Q.esm.js";
13
+ import { t as getDeviceClass } from "./getDeviceClass-B_Y-Y-zj.esm.js";
14
+ import { t as BrowserTimerProvider } from "./BrowserTimerProvider-Dl6dq0R8.esm.js";
15
15
 
16
16
  //#region src/modules/id/idCaptureHelpers.ts
17
17
  /**
@@ -429,7 +429,7 @@ function preloadIdRecordingProvider(config) {
429
429
  preloadOpenViduProvider();
430
430
  }
431
431
  async function createOpenViduRecordingProvider() {
432
- const { OpenViduRecordingProvider } = await import("./OpenViduRecordingProvider-3SvbmWdi.esm.js");
432
+ const { OpenViduRecordingProvider } = await import("./OpenViduRecordingProvider-7PqRexCU.esm.js");
433
433
  return new OpenViduRecordingProvider();
434
434
  }
435
435
  async function startRecordingSession(params) {
@@ -841,7 +841,7 @@ const checkMotionSensorActor = fromCallback(({ input, sendBack }) => {
841
841
  });
842
842
  const initializeDeepsightSessionActor = fromPromise(async ({ input }) => {
843
843
  if (!input.dependencies) return;
844
- const { loadDeepsightSession } = await import("./deepsightLoader-BTrehKGp.esm.js");
844
+ const { loadDeepsightSession } = await import("./deepsightLoader-QMFaZ2jE.esm.js");
845
845
  return loadDeepsightSession({
846
846
  ds: input.ds,
847
847
  storage: input.dependencies.storage,