@incodetech/web 2.0.1 → 2.1.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. package/dist/ae-signature/ae-signature.es.js +15 -13
  2. package/dist/ae-signature/styles.css +3 -17
  3. package/dist/ae-signature/styles2.css +15 -5
  4. package/dist/aligndevicelottie-DY_bX_p8.js +12769 -0
  5. package/dist/antifraud/antifraud.es.js +23 -16
  6. package/dist/authentication/authentication.es.js +42 -27
  7. package/dist/autoFocusTitle-BzkUiELM.js +29 -0
  8. package/dist/{back-horizontal-hint-B8Brxh3U.js → back-horizontal-hint-D_8LptLm.js} +26 -26
  9. package/dist/back-tutorial-vb1MxlrT.js +14597 -0
  10. package/dist/{back-vertical-hint-BBo36dxn.js → back-vertical-hint-C1evxxq2.js} +27 -27
  11. package/dist/backdevicelottie-HypPqBz7.js +16690 -0
  12. package/dist/base.css +1258 -104
  13. package/dist/blurdevicelottie-CBXtBFiJ.js +15951 -0
  14. package/dist/bottomSheet-F1GJfQx_.js +39 -0
  15. package/dist/browser-ponyfill-CLLvZCVg.js +441 -0
  16. package/dist/button-CM_hgyIP.js +35 -0
  17. package/dist/checkbox-BoeLHKgp.js +96 -0
  18. package/dist/consent/consent.es.js +89 -73
  19. package/dist/consent/styles.css +35 -22
  20. package/dist/countrySelector-mSWyHSy4.js +60 -0
  21. package/dist/cpf-ocr/cpf-ocr.es.js +2 -0
  22. package/dist/cpfOcr-MtpRztkG.js +92 -0
  23. package/dist/cpfOcr-jJkYCfsX.js +2 -0
  24. package/dist/cross-document-data-match/cross-document-data-match.es.js +20 -16
  25. package/dist/curp-validation/curp-validation.es.js +247 -203
  26. package/dist/customFields-DXXt9HGM.js +140 -0
  27. package/dist/customWatchlist-DsW04UF6.js +36 -0
  28. package/dist/dateInputComposed-C_mh4XBg.js +69 -0
  29. package/dist/dateInputComposed-Cy6a7ymh.js +1 -0
  30. package/dist/defineProperty-mefzVtTv.js +39 -0
  31. package/dist/document-capture/document-capture.es.js +2 -0
  32. package/dist/document-capture/styles.css +2 -5
  33. package/dist/documentCapture-8ypBJehw.js +2 -0
  34. package/dist/documentCapture-BDV_921m.js +880 -0
  35. package/dist/dropdownComposed-CEWBSdGl.js +1 -0
  36. package/dist/dropdownComposed-_fgAlo_C.js +380 -0
  37. package/dist/dynamic-forms/styles.css +25 -13
  38. package/dist/dynamicForms-DyfnsS7E.js +352 -0
  39. package/dist/ekyb/ekyb.es.js +2 -2
  40. package/dist/ekyb/styles.css +2 -0
  41. package/dist/ekybModule-CIPGmCvD.js +279 -0
  42. package/dist/ekybModule-DFoYpheB.js +2 -0
  43. package/dist/ekyc/ekyc.es.js +2 -2
  44. package/dist/ekyc/styles.css +9 -7
  45. package/dist/ekycModule-BGzwgjl1.js +2 -0
  46. package/dist/ekycModule-BuTaC5ct.js +257 -0
  47. package/dist/electronic-signature/electronic-signature.es.js +2 -2
  48. package/dist/electronic-signature-B-Q7M0wK.js +430 -0
  49. package/dist/email/email.es.js +199 -66
  50. package/dist/emailInput-KZmhjOdZ.js +39 -0
  51. package/dist/errorIcon-DJRZpd8j.js +26 -0
  52. package/dist/expiredId-Q1t6aVpk.js +85 -0
  53. package/dist/extensibility-Cs3KQQdC.js +3070 -0
  54. package/dist/extensibility.es.js +26 -25
  55. package/dist/face-match/face-match.es.js +2 -2
  56. package/dist/face-match/styles.css +0 -4
  57. package/dist/faceMatch--RDHJe4t.js +343 -0
  58. package/dist/faceMatch-yEKPYaym.js +2 -0
  59. package/dist/field-comparison/field-comparison.es.js +2 -0
  60. package/dist/field-comparison/styles.css +16 -0
  61. package/dist/fieldComparison-CAF86bTC.js +88 -0
  62. package/dist/fieldComparison-D0an7T_g.js +2 -0
  63. package/dist/fiscal-qr/fiscal-qr.es.js +224 -0
  64. package/dist/fiscal-qr/styles.css +71 -0
  65. package/dist/{flip-animation-CgwRsEmK.js → flip-animation-BGRvygw9.js} +4221 -4221
  66. package/dist/flow/flow.es.js +619 -484
  67. package/dist/flow/styles.css +378 -418
  68. package/dist/{front-horizontal-hint-DGGGi8e1.js → front-horizontal-hint-Uf5bHCsd.js} +70 -70
  69. package/dist/{front-vertical-hint-CNr5mE6Q.js → front-vertical-hint-DdWNA45v.js} +81 -81
  70. package/dist/frontdevicelottie-CLqitJhG.js +17314 -0
  71. package/dist/geolocation/geolocation.es.js +486 -395
  72. package/dist/glaredevicelottie-BS04U6Fc.js +14478 -0
  73. package/dist/governmentValidation/governmentValidation.es.js +166 -93
  74. package/dist/governmentValidation/styles.css +0 -17
  75. package/dist/homeScreen-BZnIEDrV.js +264 -0
  76. package/dist/hooks-Da_yP_Dr.js +149 -0
  77. package/dist/i18n-CoCO2ZuN.js +2971 -0
  78. package/dist/icons-Dbs9ZfYM.js +360 -0
  79. package/dist/id/id.es.js +583 -414
  80. package/dist/id/styles.css +59 -43
  81. package/dist/id-laser-h-DX8UbVNH.js +467 -0
  82. package/dist/id-laser-v-DhnHdjlB.js +490 -0
  83. package/dist/id-tutorial-lj4iKtYT.js +13165 -0
  84. package/dist/id-verification/id-verification.es.js +21 -17
  85. package/dist/idOcr-CjGbb4dB.js +123 -0
  86. package/dist/identity-reuse/identity-reuse.es.js +311 -182
  87. package/dist/identity-reuse/styles.css +134 -80
  88. package/dist/incode-logo-57XFniXU.js +4 -0
  89. package/dist/incodeComponent-wfnHlnXx.js +63 -0
  90. package/dist/incodeModule-BUDoTwT9.js +13 -0
  91. package/dist/index.es.js +17 -13
  92. package/dist/inputComposed-BEn7_nZd.js +1 -0
  93. package/dist/inputComposed-CQ4AsvZg.js +99 -0
  94. package/dist/loadingIcon-B0ysgiNq.js +148 -0
  95. package/dist/lottie_light-Dp9Bz3mf.js +9031 -0
  96. package/dist/mandatoryConsent-r0PQHmv-.js +107 -0
  97. package/dist/modal-nTSaG7nB.js +139 -0
  98. package/dist/modal.hooks-D2xhIuHA.js +195 -0
  99. package/dist/numberedStep-CEtwZqLp.js +13 -0
  100. package/dist/optionAccessibleLabel-CnA-mNAU.js +202 -0
  101. package/dist/otpInput-_JmtVwa0.js +195 -0
  102. package/dist/page-DxGQj7Gk.js +71 -0
  103. package/dist/{passport-horizontal-hint-Bgquwtac.js → passport-horizontal-hint-Bbm2mvSn.js} +55 -55
  104. package/dist/{passport-tutorial-DwRwtPVX.js → passport-tutorial-zT1ZoA-D.js} +7096 -7084
  105. package/dist/{passport-vertical-hint-BT1D5BrW.js → passport-vertical-hint-DJbCtBiM.js} +49 -49
  106. package/dist/pdf-BZA70WbM.js +22398 -0
  107. package/dist/pdfViewer-BK-yVIve.js +114 -0
  108. package/dist/phone/phone.es.js +214 -70
  109. package/dist/phoneInputComposed-DjNdsmPE.js +12142 -0
  110. package/dist/processing-BM-wT-1W.js +8 -0
  111. package/dist/qe-signature/qe-signature.es.js +15 -13
  112. package/dist/radioGroupComposed-BNuaopVr.js +215 -0
  113. package/dist/redirect-to-mobile/redirect-to-mobile.es.js +2774 -0
  114. package/dist/redirect-to-mobile/styles.css +19 -269
  115. package/dist/registerIncodeElement-77NGCDsy.js +11 -0
  116. package/dist/requiredLabelHint-DEadtiwx.js +17 -0
  117. package/dist/richText-Cf9aMOCk.js +3153 -0
  118. package/dist/rolldown-runtime--E5BIlTp.js +33 -0
  119. package/dist/selfie/selfie.es.js +54 -37
  120. package/dist/selfie/styles.css +0 -4
  121. package/dist/selfieTutorial-CtruLyO2.js +2689 -0
  122. package/dist/signature/signature.es.js +778 -405
  123. package/dist/snackbar-CxepGC3e.js +16 -0
  124. package/dist/spinner-B6RxGFrI.js +1 -0
  125. package/dist/spinner-D8a_2LvW.js +42 -0
  126. package/dist/statusPage-DMYPUwRZ.js +28 -0
  127. package/dist/successIcon-BAyDPT7I.js +30 -0
  128. package/dist/tabs-C8npVBbk.js +103 -0
  129. package/dist/themes/dark.css +5 -0
  130. package/dist/themes/light.css +4 -0
  131. package/dist/transitionSpinner-DRRz-NV8.js +26 -0
  132. package/dist/{tutorial-9vHAHvMK.js → tutorial-D1qaY2Tm.js} +1105 -856
  133. package/dist/types/ae-signature.d.ts +4 -1
  134. package/dist/types/antifraud.d.ts +9 -3
  135. package/dist/types/authentication.d.ts +4 -1
  136. package/dist/types/consent.d.ts +4 -1
  137. package/dist/types/cpf-ocr.d.ts +12 -0
  138. package/dist/types/cross-document-data-match.d.ts +4 -1
  139. package/dist/types/curp-validation.d.ts +9 -3
  140. package/dist/types/document-capture.d.ts +37 -0
  141. package/dist/types/ekyb.d.ts +4 -1
  142. package/dist/types/ekyc.d.ts +4 -1
  143. package/dist/types/electronic-signature.d.ts +4 -1
  144. package/dist/types/email.d.ts +4 -1
  145. package/dist/types/extensibility.d.ts +40 -15
  146. package/dist/types/face-match.d.ts +4 -1
  147. package/dist/types/field-comparison.d.ts +38 -0
  148. package/dist/types/fiscal-qr.d.ts +43 -0
  149. package/dist/types/flow.d.ts +5 -2
  150. package/dist/types/geolocation.d.ts +4 -1
  151. package/dist/types/governmentValidation.d.ts +4 -1
  152. package/dist/types/id-verification.d.ts +4 -1
  153. package/dist/types/id.d.ts +4 -1
  154. package/dist/types/identity-reuse.d.ts +4 -1
  155. package/dist/types/index.d.ts +26 -2
  156. package/dist/types/phone.d.ts +4 -1
  157. package/dist/types/qe-signature.d.ts +4 -1
  158. package/dist/types/redirect-to-mobile.d.ts +17 -0
  159. package/dist/types/selfie.d.ts +4 -1
  160. package/dist/types/signature.d.ts +4 -1
  161. package/dist/types/watchlist.d.ts +4 -1
  162. package/dist/types/workflow.d.ts +55 -11
  163. package/dist/typography-YLgHHuao.js +45 -0
  164. package/dist/uiConfig-D2_wawvr.js +25 -0
  165. package/dist/useModuleLoader-CeJ2jL25.js +672 -0
  166. package/dist/vendor-preact-DThS2ZQ_.js +955 -0
  167. package/dist/verificationResult-Do5SpZ6X.js +64 -0
  168. package/dist/verifiedByIncode-DjXOdCml.js +103 -0
  169. package/dist/watchlist/watchlist.es.js +31 -28
  170. package/dist/watchlistForBusiness-BFFXC9d-.js +80 -0
  171. package/dist/workflow/styles.css +449 -427
  172. package/dist/workflow/workflow.es.js +268 -182
  173. package/package.json +32 -10
  174. package/dist/aligndevicelottie-DoV8xKjh.js +0 -12757
  175. package/dist/autoFocusTitle-QexamZ4i.js +0 -16
  176. package/dist/back-tutorial-1NOQobGO.js +0 -14585
  177. package/dist/backdevicelottie-C_ceuqY7.js +0 -16678
  178. package/dist/blurdevicelottie-UO14Y0WC.js +0 -15939
  179. package/dist/bottomSheet-DE_8TFEC.js +0 -31
  180. package/dist/browser-ponyfill-jOkuz57z.js +0 -299
  181. package/dist/button-DcCUEn2n.js +0 -24
  182. package/dist/checkbox-Cl57ltq_.js +0 -85
  183. package/dist/countrySelector-CE-JgIsv.js +0 -58
  184. package/dist/cpfOcr-D_tbwbvh.js +0 -78
  185. package/dist/customFields-CW38fQUv.js +0 -127
  186. package/dist/customWatchlist-D9_yjEQd.js +0 -33
  187. package/dist/dateInputComposed-BpAGsjN6.js +0 -55
  188. package/dist/dateInputComposed-DU3o6PAV.js +0 -1
  189. package/dist/defineProperty-Dh8nSJpJ.js +0 -39
  190. package/dist/documentCapture-xX-JT7ZY.js +0 -763
  191. package/dist/dropdownComposed-DFRBG22E.js +0 -284
  192. package/dist/dropdownComposed-DwTzc2YU.js +0 -1
  193. package/dist/dynamicForms-CJP1Ia6Q.js +0 -262
  194. package/dist/ekybModule-BSs7mndb.js +0 -280
  195. package/dist/ekybModule-D9M3E2Gm.js +0 -2
  196. package/dist/ekycModule-CU9pt5YN.js +0 -246
  197. package/dist/ekycModule-CZw9cLno.js +0 -2
  198. package/dist/electronic-signature-COYXjGdd.js +0 -410
  199. package/dist/emailInput-DppGf9pv.js +0 -37
  200. package/dist/expiredId-BnmzE8T3.js +0 -70
  201. package/dist/extensibility-CzEJfRwo.js +0 -2586
  202. package/dist/faceMatch-B8j0g0Yo.js +0 -2
  203. package/dist/faceMatch-BV8UD7tj.js +0 -201
  204. package/dist/frontdevicelottie-Bu6f9fDE.js +0 -17302
  205. package/dist/glaredevicelottie-B10axYs_.js +0 -14466
  206. package/dist/homeScreen-DnP1jw9A.js +0 -227
  207. package/dist/hooks-BVnGysT7.js +0 -80
  208. package/dist/i18n-9s4OSqwi.js +0 -2010
  209. package/dist/icons-Cc7zwchP.js +0 -310
  210. package/dist/id-laser-h-mBAzHVOK.js +0 -467
  211. package/dist/id-laser-v-CrFg4bcJ.js +0 -483
  212. package/dist/id-tutorial-BCr42Pnn.js +0 -13153
  213. package/dist/idOcr-CCjfWQvH.js +0 -94
  214. package/dist/incode-logo-DX016usY.js +0 -4
  215. package/dist/incodeComponent-C1o4M0ZK.js +0 -50
  216. package/dist/incodeModule-BqCjVgEI.js +0 -18
  217. package/dist/inputComposed-APSw8C7o.js +0 -89
  218. package/dist/inputComposed-XYrarFxS.js +0 -1
  219. package/dist/loadingIcon-BN5YRQUb.js +0 -104
  220. package/dist/mandatoryConsent-DssKMC3v.js +0 -100
  221. package/dist/modal-NMxsQHAO.js +0 -135
  222. package/dist/modal.hooks-CAjcIFZK.js +0 -126
  223. package/dist/numberedStep-CT-alrK5.js +0 -11
  224. package/dist/optionAccessibleLabel-CzEeX3Q4.js +0 -140
  225. package/dist/otpInput-DqRA_egd.js +0 -145
  226. package/dist/page-C1yT4DLb.js +0 -69
  227. package/dist/pdf-BurGZ08w.js +0 -14967
  228. package/dist/pdfViewer-BGBNL1Ea.js +0 -63
  229. package/dist/phoneInputComposed-bvWhGLFZ.js +0 -11206
  230. package/dist/processing-G_y3o32b.js +0 -6
  231. package/dist/radioGroupComposed-BbmvxmD2.js +0 -177
  232. package/dist/redirectToMobile-C3k1gloW.js +0 -1514
  233. package/dist/requiredLabelHint-BLwgqozE.js +0 -13
  234. package/dist/richText-DbJ5sl2n.js +0 -1973
  235. package/dist/rolldown-runtime-CYMK-g2i.js +0 -20
  236. package/dist/selfieTutorial-BgrlUMXP.js +0 -2677
  237. package/dist/snackbar-BDp8x7Cv.js +0 -14
  238. package/dist/spinner-B4dcie2T.js +0 -1
  239. package/dist/spinner-CKnjVHxw.js +0 -39
  240. package/dist/statusPage-CUI7ApcU.js +0 -28
  241. package/dist/successIcon-DbILeIz_.js +0 -28
  242. package/dist/tabs-DaPyP71c.js +0 -78
  243. package/dist/transitionSpinner-PIEPU2Vx.js +0 -17
  244. package/dist/types/cpf-ocr/styles.d.ts +0 -1
  245. package/dist/types/document-capture/styles.d.ts +0 -1
  246. package/dist/types/redirect-to-mobile/styles.d.ts +0 -1
  247. package/dist/typography-CxjaknHN.js +0 -28
  248. package/dist/uiConfig-CwpQ-IM6.js +0 -20
  249. package/dist/useModuleLoader-BFiVA41N.js +0 -432
  250. package/dist/vendor-preact-D6SntenC.js +0 -958
  251. package/dist/verificationResult-BrVbUJ4U.js +0 -97
  252. package/dist/verifiedByIncode-ChZBpqNy.js +0 -101
  253. package/dist/watchlistForBusiness-BcSNtHCV.js +0 -77
@@ -1,432 +0,0 @@
1
- import { i as e, r as t } from "./i18n-9s4OSqwi.js";
2
- import { _ as n, l as r, p as i, v as a } from "./vendor-preact-D6SntenC.js";
3
- import { t as o } from "./uiConfig-CwpQ-IM6.js";
4
- import { t as s } from "./button-DcCUEn2n.js";
5
- import { initializeWasmUtil as c, resolveWasmConfig as l, setWasmConfig as u, upgradeToWasmHttpClient as d, warmupWasm as f } from "@incodetech/core/wasm";
6
- import { getDeviceClass as p } from "@incodetech/core/device";
7
- import { createOrchestratedFlowManager as m, getFlow as h, getRequiredWasmPipelines as g } from "@incodetech/core/flow";
8
- import { initializeSession as _ } from "@incodetech/core/session";
9
- import { api as v } from "@incodetech/core/http";
10
- //#region src/styles/generatePalette.ts
11
- function y(e) {
12
- let t = e.replace("#", "");
13
- t.length === 3 && (t = t.split("").map((e) => e + e).join(""));
14
- let n = /^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
15
- if (!n) return null;
16
- let r = Number.parseInt(n[1], 16) / 255, i = Number.parseInt(n[2], 16) / 255, a = Number.parseInt(n[3], 16) / 255, o = Math.max(r, i, a), s = Math.min(r, i, a), c = 0, l = 0, u = (o + s) / 2;
17
- if (o !== s) {
18
- let e = o - s;
19
- switch (l = u > .5 ? e / (2 - o - s) : e / (o + s), o) {
20
- case r:
21
- c = ((i - a) / e + (i < a ? 6 : 0)) / 6;
22
- break;
23
- case i:
24
- c = ((a - r) / e + 2) / 6;
25
- break;
26
- case a:
27
- c = ((r - i) / e + 4) / 6;
28
- break;
29
- }
30
- }
31
- return {
32
- h: c * 360,
33
- s: l * 100,
34
- l: u * 100
35
- };
36
- }
37
- function b(e, t, n) {
38
- let r = e / 360, i = t / 100, a = n / 100, o, s, c;
39
- if (i === 0) o = s = c = a;
40
- else {
41
- let e = (e, t, n) => (n < 0 && (n += 1), n > 1 && --n, n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e), t = a < .5 ? a * (1 + i) : a + i - a * i, n = 2 * a - t;
42
- o = e(n, t, r + 1 / 3), s = e(n, t, r), c = e(n, t, r - 1 / 3);
43
- }
44
- let l = (e) => {
45
- let t = Math.round(e * 255).toString(16);
46
- return t.length === 1 ? `0${t}` : t;
47
- };
48
- return `#${l(o)}${l(s)}${l(c)}`;
49
- }
50
- function ee(e) {
51
- let t = y(e);
52
- if (!t) throw Error(`Invalid color format: ${e}`);
53
- return {
54
- 50: b(t.h, t.s, 95),
55
- 200: b(t.h, t.s, 80),
56
- 300: b(t.h, t.s, 65),
57
- 400: b(t.h, t.s, Math.min(100, t.l + 10)),
58
- 500: e,
59
- 600: b(t.h, t.s, Math.max(0, t.l - 10)),
60
- 900: b(t.h, t.s, 20)
61
- };
62
- }
63
- //#endregion
64
- //#region src/styles/applyTheme.ts
65
- function x(e, t) {
66
- if (typeof document > "u") return;
67
- let n = ee(e), r = document.getElementById("incode-theme");
68
- r || (r = document.createElement("style"), r.id = "incode-theme", document.head.appendChild(r));
69
- let i = t || "#ffffff", a = `
70
- :root,
71
- :host {
72
- --primitive-color-brand-50: ${n[50]};
73
- --primitive-color-brand-200: ${n[200]};
74
- --primitive-color-brand-300: ${n[300]};
75
- --primitive-color-brand-400: ${n[400]};
76
- --primitive-color-brand-500: ${n[500]};
77
- --primitive-color-brand-600: ${n[600]};
78
- --primitive-color-brand-900: ${n[900]};
79
- --button-primary-text-default: ${i};
80
- }
81
- `;
82
- r.textContent = a;
83
- }
84
- //#endregion
85
- //#region src/styles/fetchTheme.ts
86
- async function S() {
87
- return (await v.get("/omni/asset/fetch-all")).data;
88
- }
89
- var C = /* @__PURE__ */ new Map();
90
- async function w(e) {
91
- if (e.startsWith("data:")) return e;
92
- let t = C.get(e);
93
- if (t) return t;
94
- let n = await (await fetch(e)).blob(), r = await new Promise((e, t) => {
95
- let r = new FileReader();
96
- r.onloadend = () => e(r.result), r.onerror = t, r.readAsDataURL(n);
97
- });
98
- return C.set(e, r), r;
99
- }
100
- async function T() {
101
- let e = await S();
102
- if (!e.theme) throw Error("Theme URL not found in assets response");
103
- let t = e.theme, n = t.startsWith("http://") || t.startsWith("https://"), r;
104
- if (n) {
105
- let e = await fetch(t);
106
- if (!e.ok) throw Error(`Failed to fetch theme: ${e.statusText}`);
107
- r = await e.json();
108
- } else r = (await v.get(t)).data;
109
- let i = e["logo.png"] || e["logo.svg"] || e["logo.jpg"] || e["logo.jpeg"] || e["logo.webp"] || r.logo, a = i;
110
- return i && (a = await w(i)), {
111
- ...r,
112
- logo: a
113
- };
114
- }
115
- async function E() {
116
- let e = await T();
117
- return e.main && x(e.main, e.buttonColor), e;
118
- }
119
- //#endregion
120
- //#region src/modules/flow/flowInit.ts
121
- var D = () => import("./id/id.es.js").then((e) => e.Id), O = () => import("./homeScreen-DnP1jw9A.js").then((e) => e.HomeScreen), k, te = new Set(["IP_ADDRESS", "TRUST_GRAPH"]);
122
- function A(e) {
123
- if (e === "IP_ADDRESS") return () => import("@incodetech/core/flow").then((e) => e.noOpFlowModuleMachine);
124
- if (e === "TRUST_GRAPH") return () => import("@incodetech/core/trust-graph").then((e) => e.trustGraphMachine);
125
- if (e === "REDIRECT_TO_MOBILE") return () => import("@incodetech/core/redirect-to-mobile").then((e) => e.redirectToMobileMachine);
126
- if (e === "PHONE") return () => import("@incodetech/core/phone").then((e) => e.phoneMachine);
127
- if (e === "EMAIL") return () => import("@incodetech/core/email").then((e) => e.emailMachine);
128
- if (e === "SELFIE") return () => import("@incodetech/core/selfie").then((e) => e.selfieMachine);
129
- if (e === "AUTHENTICATION") return () => import("@incodetech/core/authentication").then((e) => e.authenticationMachine);
130
- if (e === "ID" || e === "TUTORIAL_ID" || e === "SECOND_ID") return () => import("@incodetech/core/id").then((e) => e.idCaptureMachine);
131
- if (e === "ID_OCR") return () => import("@incodetech/core/id-ocr").then((e) => e.idOcrStateMachine);
132
- if (e === "CPF_OCR") return () => import("@incodetech/core/cpf-ocr").then((e) => e.cpfOcrMachine);
133
- if (e === "FACE_MATCH") return () => import("@incodetech/core/face-match").then((e) => e.faceMatchMachine);
134
- if (e === "CURP_VALIDATION") return () => import("@incodetech/core/curp-validation").then((e) => e.curpValidationMachine);
135
- if (e === "GOVT_VALIDATION_PROVISIONING") return () => import("@incodetech/core/government-validation").then((e) => e.governmentValidationMachine);
136
- if (e === "GEOLOCATION") return () => import("@incodetech/core/geolocation").then((e) => e.geolocationMachine);
137
- if (e === "EXTERNAL_VERIFICATION") return () => import("@incodetech/core/ekyc").then((e) => e.ekycMachine);
138
- if (e === "EKYB") return () => import("@incodetech/core/ekyb").then((e) => e.ekybMachine);
139
- if (e === "DOCUMENT_CAPTURE" || e === "ADDRESS") return () => import("@incodetech/core/document-capture").then((e) => e.documentCaptureMachine);
140
- if (e === "COMBINED_CONSENT") return () => import("@incodetech/core/consent").then((e) => e.consentMachine);
141
- if (e === "MANDATORY_CONSENT") return () => import("@incodetech/core/mandatory-consent").then((e) => e.mandatoryConsentMachine);
142
- if (e === "SIGNATURE") return () => import("@incodetech/core/signature").then((e) => e.signatureMachine);
143
- if (e === "ANTIFRAUD") return () => import("@incodetech/core/antifraud").then((e) => e.antifraudMachine);
144
- if (e === "CUSTOM_FIELDS") return () => import("@incodetech/core/custom-fields").then((e) => e.customFieldsMachine);
145
- if (e === "WATCHLIST") return () => import("@incodetech/core/watchlist").then((e) => e.watchlistMachine);
146
- if (e === "WATCHLIST_BUSINESS") return () => import("@incodetech/core/watchlist-for-business").then((e) => e.watchlistForBusinessMachine);
147
- if (e === "INCODE_WATCHLIST") return () => import("@incodetech/core/custom-watchlist").then((e) => e.customWatchlistMachine);
148
- if (e === "AE_SIGNATURE") return () => import("@incodetech/core/ae-signature").then((e) => e.aeSignatureMachine);
149
- if (e === "QE_SIGNATURE") return () => import("@incodetech/core/qe-signature").then((e) => e.qeSignatureMachine);
150
- if (e === "CROSS_DOCUMENT_DATA_MATCH") return () => import("@incodetech/core/cross-document-data-match").then((e) => e.crossDocumentDataMatchMachine);
151
- if (e === "DYNAMIC_FORMS") return () => import("@incodetech/core/dynamic-forms").then((e) => e.dynamicFormsMachine);
152
- }
153
- function j(e) {
154
- let t = {};
155
- for (let n of e) {
156
- let e = n.key;
157
- if (t[e]) continue;
158
- let r = A(e);
159
- r && (t[e] = r);
160
- }
161
- return t;
162
- }
163
- var M = {
164
- REDIRECT_TO_MOBILE: () => import("./redirectToMobile-C3k1gloW.js").then((e) => e.RedirectToMobile),
165
- PHONE: () => import("./phone/phone.es.js").then((e) => e.Phone),
166
- EMAIL: () => import("./email/email.es.js").then((e) => e.Email),
167
- SELFIE: () => import("./selfie/selfie.es.js").then((e) => e.Selfie),
168
- AUTHENTICATION: () => import("./authentication/authentication.es.js").then((e) => e.Authentication),
169
- ID: D,
170
- ID_CAPTURE: D,
171
- TUTORIAL_ID: D,
172
- SECOND_ID: D,
173
- FACE_MATCH: () => import("./faceMatch-B8j0g0Yo.js").then((e) => e.FaceMatch),
174
- CURP_VALIDATION: () => import("./curp-validation/curp-validation.es.js").then((e) => e.CurpValidation),
175
- GOVT_VALIDATION_PROVISIONING: () => import("./governmentValidation/governmentValidation.es.js").then((e) => e.GovernmentValidation),
176
- GEOLOCATION: () => import("./geolocation/geolocation.es.js").then((e) => e.Geolocation),
177
- EXTERNAL_VERIFICATION: () => import("./ekycModule-CZw9cLno.js").then((e) => e.EkycModule),
178
- EKYB: () => import("./ekybModule-D9M3E2Gm.js").then((e) => e.EkybModule),
179
- DOCUMENT_CAPTURE: () => import("./documentCapture-xX-JT7ZY.js").then((e) => e.DocumentCapture),
180
- ADDRESS: () => import("./documentCapture-xX-JT7ZY.js").then((e) => e.DocumentCapture),
181
- COMBINED_CONSENT: () => import("./consent/consent.es.js").then((e) => e.Consent),
182
- MANDATORY_CONSENT: () => import("./mandatoryConsent-DssKMC3v.js").then((e) => e.MandatoryConsent),
183
- SIGNATURE: () => import("./signature/signature.es.js").then((e) => e.Signature),
184
- ID_OCR: () => import("./idOcr-CCjfWQvH.js").then((e) => e.IdOcr),
185
- CPF_OCR: () => import("./cpfOcr-D_tbwbvh.js").then((e) => e.CpfOcr),
186
- ANTIFRAUD: () => import("./antifraud/antifraud.es.js").then((e) => e.Antifraud),
187
- CUSTOM_FIELDS: () => import("./customFields-CW38fQUv.js").then((e) => e.CustomFields),
188
- WATCHLIST: () => import("./watchlist/watchlist.es.js").then((e) => e.Watchlist),
189
- WATCHLIST_BUSINESS: () => import("./watchlistForBusiness-BcSNtHCV.js").then((e) => e.WatchlistForBusiness),
190
- INCODE_WATCHLIST: () => import("./customWatchlist-D9_yjEQd.js").then((e) => e.CustomWatchlist),
191
- AE_SIGNATURE: () => import("./ae-signature/ae-signature.es.js").then((e) => e.AeSignature),
192
- QE_SIGNATURE: () => import("./qe-signature/qe-signature.es.js").then((e) => e.QeSignature),
193
- CROSS_DOCUMENT_DATA_MATCH: () => import("./cross-document-data-match/cross-document-data-match.es.js").then((e) => e.CrossDocumentDataMatch),
194
- DYNAMIC_FORMS: () => import("./dynamicForms-CJP1Ia6Q.js").then((e) => e.DynamicForms)
195
- };
196
- function N() {
197
- return O();
198
- }
199
- function P() {
200
- k || (k = N(), k.catch(() => {
201
- k = void 0;
202
- }));
203
- }
204
- var F;
205
- function I() {
206
- if (F) return;
207
- let e = M.REDIRECT_TO_MOBILE, t = A("REDIRECT_TO_MOBILE"), n = [];
208
- e && n.push(e()), t && n.push(t()), F = Promise.all(n), F.catch(() => {
209
- F = void 0;
210
- });
211
- }
212
- function L(e = {}) {
213
- let t = {}, n = e.isDesktop ?? p() === "desktop", { enableHome: r, ...i } = e;
214
- return m({
215
- enableHome: r,
216
- getFlow: async (e) => {
217
- let r = await h(e, {
218
- ...i,
219
- isDesktop: n
220
- }), a = j(r.flowModules ?? []);
221
- for (let e of Object.keys(t)) delete t[e];
222
- return Object.assign(t, a), r;
223
- },
224
- lazyModules: t
225
- });
226
- }
227
- async function R(n) {
228
- await _({ token: n.token }), t(e(n.lang ? { lang: n.lang } : void 0));
229
- }
230
- async function z(e) {
231
- let { token: t, lang: n, flowManager: r } = e;
232
- await R({
233
- token: t,
234
- lang: n
235
- }), r.load();
236
- }
237
- async function B() {
238
- try {
239
- let e = await E(), t = {
240
- logoSrc: e.logo,
241
- subtitle: e.subtitle,
242
- hideFooterBranding: e.hideFooterBranding
243
- };
244
- return o(t), {
245
- theme: e,
246
- uiConfig: t
247
- };
248
- } catch {
249
- return {};
250
- }
251
- }
252
- function V(e, t) {
253
- if (e.currentStep === "REDIRECT_TO_MOBILE") return;
254
- let n = g(e.flow);
255
- if (n.length > 0) {
256
- let e = l({
257
- ...t ?? {},
258
- pipelines: n
259
- }), r = {
260
- ...e,
261
- pipelines: e.pipelines ? [...e.pipelines] : void 0
262
- };
263
- u(r), f(e).then(() => c(r)).then(() => d(r)).catch((e) => {
264
- console.error("WASM warmup failed:", e);
265
- });
266
- }
267
- }
268
- function H(e) {
269
- let t = e.currentStep;
270
- if (t) {
271
- let e = M[t];
272
- e && e().catch(() => {});
273
- }
274
- }
275
- //#endregion
276
- //#region src/modules/flow/unsupportedModule.tsx
277
- var U = ({ moduleKey: e, onNext: t }) => /* @__PURE__ */ a("section", {
278
- class: "IncodeUnsupportedModule",
279
- "aria-live": "polite",
280
- children: /* @__PURE__ */ a("div", {
281
- class: "IncodeUnsupportedModuleContent",
282
- children: [
283
- /* @__PURE__ */ a("h2", {
284
- class: "IncodeUnsupportedModuleTitle",
285
- children: "Module not available"
286
- }),
287
- /* @__PURE__ */ a("p", {
288
- class: "IncodeUnsupportedModuleMessage",
289
- children: [
290
- "The \"",
291
- e,
292
- "\" module is not yet supported in this version."
293
- ]
294
- }),
295
- /* @__PURE__ */ a(s, {
296
- onClick: t,
297
- class: "IncodeUnsupportedModuleButton",
298
- "data-testid": "unsupported-module-next-button",
299
- children: "Next"
300
- })
301
- ]
302
- })
303
- }), W = () => null, G = () => Promise.resolve(W), K = new Set(["IDENTITY_SEARCH"]);
304
- //#endregion
305
- //#region src/modules/flow/useModuleLoader.ts
306
- function q(e, t) {
307
- return e instanceof Error ? e.message : t;
308
- }
309
- var J = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap();
310
- function X(e) {
311
- return e;
312
- }
313
- function Z(e) {
314
- if (e) return J.get(X(e));
315
- }
316
- function ne(e) {
317
- let t = X(e), n = J.get(t);
318
- if (n) return Promise.resolve(n);
319
- let r = Y.get(t);
320
- if (r) return r;
321
- let i = e().then((e) => (J.set(t, e), Y.delete(t), e)).catch((e) => {
322
- throw Y.delete(t), e;
323
- });
324
- return Y.set(t, i), i;
325
- }
326
- function Q(e) {
327
- if (!e) return { status: "idle" };
328
- let t = Z(e);
329
- return t ? {
330
- status: "loaded",
331
- Component: t
332
- } : { status: "loading" };
333
- }
334
- function re(e, t, n) {
335
- if (e) return t[e] ?? (n?.has(e) ? G : void 0);
336
- }
337
- function $(e) {
338
- let { loader: t, onLoading: a, onLoaded: o, onError: s } = e, [c, l] = i(() => Q(t)), u = r(t), d = r(a), f = r(o), p = r(s);
339
- return n(() => {
340
- d.current = a, f.current = o, p.current = s;
341
- }, [
342
- a,
343
- o,
344
- s
345
- ]), u.current !== t && (u.current = t, l(Q(t))), n(() => {
346
- if (!t) return;
347
- if (Z(t)) {
348
- f.current?.();
349
- return;
350
- }
351
- d.current?.();
352
- let e = !1;
353
- return ne(t).then((t) => {
354
- e || (l({
355
- status: "loaded",
356
- Component: t
357
- }), f.current?.());
358
- }).catch((t) => {
359
- if (!e) {
360
- let e = q(t, "Failed to load component");
361
- l({
362
- status: "error",
363
- error: e
364
- }), p.current?.(e);
365
- }
366
- }), () => {
367
- e = !0;
368
- };
369
- }, [t]), c;
370
- }
371
- function ie(e) {
372
- let { moduleKey: t, modules: r, headlessModuleKeys: a, onModuleLoading: o, onModuleLoaded: s, onError: c } = e, [l, u] = i(void 0), d = re(t, r, a), f = $({
373
- loader: d,
374
- onLoading: t ? () => o?.(t) : void 0,
375
- onLoaded: t ? () => s?.(t) : void 0,
376
- onError: t ? (e) => c?.(`Failed to load ${t}: ${e}`) : void 0
377
- });
378
- return n(() => {
379
- if (!t) {
380
- u(void 0);
381
- return;
382
- }
383
- u(d ? void 0 : t);
384
- }, [d, t]), t ? l ? {
385
- status: "unsupported",
386
- moduleKey: l
387
- } : f.status === "idle" || f.status === "loading" ? {
388
- status: "loading",
389
- moduleKey: t
390
- } : f.status === "error" ? {
391
- status: "error",
392
- moduleKey: t,
393
- error: f.error
394
- } : {
395
- status: "loaded",
396
- moduleKey: t,
397
- Component: f.Component
398
- } : { status: "idle" };
399
- }
400
- function ae(e) {
401
- let { moduleKey: t, modules: n } = e, r = t ? n[t] : void 0, i = $({ loader: r });
402
- return r != null && i.status === "loaded";
403
- }
404
- function oe(e) {
405
- typeof requestIdleCallback < "u" ? requestIdleCallback(() => {
406
- e();
407
- }) : setTimeout(e, 0);
408
- }
409
- function se(e, t, i, a) {
410
- let o = r(/* @__PURE__ */ new Set());
411
- n(() => {
412
- if (a && t < e.length - 1) {
413
- let n = e[t + 1];
414
- if (n && !o.current.has(n)) {
415
- o.current.add(n);
416
- let e = i[n];
417
- e && oe(() => {
418
- e().catch(() => {
419
- o.current.delete(n);
420
- });
421
- });
422
- }
423
- }
424
- }, [
425
- e,
426
- t,
427
- i,
428
- a
429
- ]);
430
- }
431
- //#endregion
432
- export { U as a, L as c, H as d, P as f, E as g, V as h, K as i, B as l, R as m, ae as n, te as o, I as p, se as r, M as s, ie as t, z as u };