@incodetech/core 2.5.0-rc.7 → 2.5.0-rc.9

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 (189) hide show
  1. package/dist/{FaceDetectionProvider-Cqw51GCf.esm.js → FaceDetectionProvider-CULA-ZlQ.esm.js} +9 -9
  2. package/dist/{WasmUtilProvider-BW_4YKrg.esm.js → WasmUtilProvider-Zld-DCOM.esm.js} +2 -2
  3. package/dist/{addressSearch-BGHyclUd.esm.js → addressSearch-BTo2kH5N.esm.js} +1 -1
  4. package/dist/ae-signature.esm.js +1 -1
  5. package/dist/antifraud.esm.js +2 -2
  6. package/dist/{antifraudManager-CE2Cxfqy.esm.js → antifraudManager-TwVzUgUe.esm.js} +3 -3
  7. package/dist/{antifraudStateMachine-BpeuH5Wx.esm.js → antifraudStateMachine-CFkvyDFG.esm.js} +1 -1
  8. package/dist/{api-BMLJdwd_.esm.js → api-jplFqPcE.esm.js} +2 -0
  9. package/dist/{apiError-B0e6kXC-.esm.js → apiError-DXXBBE6F.esm.js} +1 -1
  10. package/dist/{attemptCarry-Dp2xFl7A.esm.js → attemptCarry-Dew-8qhm.esm.js} +1 -1
  11. package/dist/authentication.d.ts +3 -3
  12. package/dist/authentication.esm.js +2 -2
  13. package/dist/{authenticationManager-D0C0AG-A.esm.js → authenticationManager-BwmeU1g6.esm.js} +6 -6
  14. package/dist/{authenticationManager-DWFnFadt.d.ts → authenticationManager-D65y6VFI.d.ts} +1 -1
  15. package/dist/{authenticationStateMachine-B9eVbcfC.esm.js → authenticationStateMachine-DLHUaz60.esm.js} +3 -3
  16. package/dist/camera.esm.js +1 -1
  17. package/dist/certificate-issuance.esm.js +2 -2
  18. package/dist/{certificateIssuanceManager-BQ74_sGE.esm.js → certificateIssuanceManager-CfKhx7Uk.esm.js} +3 -3
  19. package/dist/{certificateIssuanceStateMachine-Cm3b9OoM.esm.js → certificateIssuanceStateMachine-4NpYY6ct.esm.js} +1 -1
  20. package/dist/consent.d.ts +1 -1
  21. package/dist/consent.esm.js +2 -2
  22. package/dist/{consentManager-DEC34vhb.esm.js → consentManager-BaQJnQ8U.esm.js} +3 -3
  23. package/dist/{consentManager-DlvhoJYc.d.ts → consentManager-Duzd8paN.d.ts} +4 -4
  24. package/dist/{consentStateMachine-D0Nh_LD7.esm.js → consentStateMachine-Bl6TbzJW.esm.js} +1 -1
  25. package/dist/cross-document-data-match.esm.js +1 -1
  26. package/dist/{crossDocumentDataMatchManager-BHRsIIYY.esm.js → crossDocumentDataMatchManager-DhrMB_iS.esm.js} +3 -3
  27. package/dist/curp-validation.d.ts +1 -1
  28. package/dist/curp-validation.esm.js +2 -2
  29. package/dist/{curpValidationManager-nIJpoMnT.esm.js → curpValidationManager-DYfD1Res.esm.js} +3 -3
  30. package/dist/{curpValidationManager-Ci2iVuog.d.ts → curpValidationManager-DgUZySoq.d.ts} +1 -1
  31. package/dist/{curpValidationStateMachine-4MAvdROS.esm.js → curpValidationStateMachine-Bv_PYQq8.esm.js} +2 -2
  32. package/dist/custom-fields.esm.js +1 -1
  33. package/dist/custom-watchlist.esm.js +2 -2
  34. package/dist/{customFieldsManager-BGCfq1Z3.esm.js → customFieldsManager-BYw2qjWs.esm.js} +3 -3
  35. package/dist/{customWatchlistManager-B5rEcjyh.esm.js → customWatchlistManager-BMG12VEa.esm.js} +3 -3
  36. package/dist/{customWatchlistStateMachine-5DmmGqzB.esm.js → customWatchlistStateMachine-BuooJa9X.esm.js} +1 -1
  37. package/dist/{deepsightLoader-Dspegfs_.esm.js → deepsightLoader-xvfR27Y-.esm.js} +5 -5
  38. package/dist/{desktopCameraElection-h7SmDXmW.esm.js → desktopCameraElection-DB1qKIpL.esm.js} +4 -4
  39. package/dist/document-capture.d.ts +1 -1
  40. package/dist/document-capture.esm.js +2 -2
  41. package/dist/document-signature.d.ts +123 -0
  42. package/dist/document-signature.esm.js +149 -0
  43. package/dist/{documentCaptureManager-CoGcEiMK.d.ts → documentCaptureManager-BZBmcOKI.d.ts} +1 -1
  44. package/dist/{documentCaptureManager-DODC4eUX.esm.js → documentCaptureManager-CoeAixg2.esm.js} +3 -3
  45. package/dist/{documentCaptureStateMachine-B4CPAJrT.esm.js → documentCaptureStateMachine-CzZ-fz0I.esm.js} +4 -4
  46. package/dist/documentSignatureStateMachine-2goFPkF9.esm.js +219 -0
  47. package/dist/dynamic-forms.esm.js +2 -2
  48. package/dist/{dynamicFormsManager-B2WpJRIy.esm.js → dynamicFormsManager-9ofnJYMp.esm.js} +3 -3
  49. package/dist/{dynamicFormsStateMachine-DwH_DeuQ.esm.js → dynamicFormsStateMachine-Bc2omduf.esm.js} +2 -2
  50. package/dist/ekyb.d.ts +1 -1
  51. package/dist/ekyb.esm.js +2 -2
  52. package/dist/{ekybManager-D6-cLZnV.esm.js → ekybManager-BTP6KU74.esm.js} +3 -3
  53. package/dist/{ekybStateMachine-Xpc40REP.esm.js → ekybStateMachine-Qo_lJINj.esm.js} +3 -3
  54. package/dist/ekyc-prefill.d.ts +1 -1
  55. package/dist/ekyc-prefill.esm.js +2 -2
  56. package/dist/ekyc.esm.js +2 -2
  57. package/dist/{ekycManager-DWuONuie.esm.js → ekycManager-DeocHrn-.esm.js} +3 -3
  58. package/dist/{ekycPrefillManager-BJzn8Pc4.esm.js → ekycPrefillManager-BKNsBlAd.esm.js} +1 -1
  59. package/dist/{ekycPrefillManager-DOTl3Y2w.d.ts → ekycPrefillManager-BcLhkpp8.d.ts} +4 -4
  60. package/dist/{ekycPrefillStateMachine-COPqGv1-.esm.js → ekycPrefillStateMachine-BlzAkl6Z.esm.js} +2 -2
  61. package/dist/{ekycStateMachine-BsclGsmE.esm.js → ekycStateMachine-mB4i5_03.esm.js} +2 -2
  62. package/dist/electronic-signature.esm.js +1 -1
  63. package/dist/{electronicSignatureManager-BGUA13HH.esm.js → electronicSignatureManager-Cz5IVRrS.esm.js} +4 -4
  64. package/dist/email.esm.js +2 -2
  65. package/dist/{emailManager-DJfqy42G.esm.js → emailManager-CFPz1wdm.esm.js} +3 -3
  66. package/dist/{emailStateMachine-Ba4dmk3l.esm.js → emailStateMachine-_fNnmAC7.esm.js} +2 -2
  67. package/dist/{events-C2lGiIT1.esm.js → events-C3sjvrjL.esm.js} +2 -2
  68. package/dist/events.d.ts +1 -0
  69. package/dist/events.esm.js +2 -2
  70. package/dist/extensibility.d.ts +12 -12
  71. package/dist/extensibility.esm.js +36 -36
  72. package/dist/face-match.esm.js +2 -2
  73. package/dist/{faceCaptureManagerFactory-BznzTujd.esm.js → faceCaptureManagerFactory-9S1PFGZR.esm.js} +5 -5
  74. package/dist/{faceCaptureManagerFactory-DLFzd1nq.d.ts → faceCaptureManagerFactory-lVe9Pv_9.d.ts} +3 -3
  75. package/dist/{faceCaptureSetup-CTXrfKbx.esm.js → faceCaptureSetup-DD2KKDDP.esm.js} +11 -11
  76. package/dist/{faceMatchManager-BFLHLTGE.esm.js → faceMatchManager-k87nK4mq.esm.js} +3 -3
  77. package/dist/{faceMatchStateMachine-Bjjv_w-a.esm.js → faceMatchStateMachine-C4jjFiCT.esm.js} +2 -2
  78. package/dist/{feature-management-DqGvBwck.esm.js → feature-management-DcIymJ6v.esm.js} +1 -1
  79. package/dist/feature-management.esm.js +1 -1
  80. package/dist/field-comparison.esm.js +1 -1
  81. package/dist/{fieldComparisonManager-CPQEHk24.esm.js → fieldComparisonManager-ZUiwGMJc.esm.js} +3 -3
  82. package/dist/fiscal-qr.esm.js +1 -1
  83. package/dist/{fiscalQrManager-Ej11Z_Qk.esm.js → fiscalQrManager-CldPP6Os.esm.js} +3 -3
  84. package/dist/flow-events.d.ts +1 -1
  85. package/dist/flow.d.ts +5 -5
  86. package/dist/flow.esm.js +5 -5
  87. package/dist/{flowCompletionService-CEJARiEn.esm.js → flowCompletionService-C5PPfrn0.esm.js} +2 -2
  88. package/dist/{flowServices-C0lKeHmE.esm.js → flowServices-DOmupXL_.esm.js} +8 -8
  89. package/dist/geolocation.esm.js +2 -2
  90. package/dist/{geolocationManager-CK2LxvRM.esm.js → geolocationManager-qptzzmj-.esm.js} +3 -3
  91. package/dist/{geolocationStateMachine-y509TvfW.esm.js → geolocationStateMachine-Dudf-80i.esm.js} +3 -3
  92. package/dist/government-validation.esm.js +2 -2
  93. package/dist/{governmentValidationManager-Dr5zg44a.esm.js → governmentValidationManager-B4ArAcGg.esm.js} +3 -3
  94. package/dist/{governmentValidationStateMachine-BmgcBddx.esm.js → governmentValidationStateMachine-axGh-8TD.esm.js} +1 -1
  95. package/dist/home.d.ts +1 -1
  96. package/dist/home.esm.js +2 -2
  97. package/dist/http.esm.js +1 -1
  98. package/dist/id-ocr.esm.js +2 -2
  99. package/dist/id-selfie-flow.d.ts +1 -1
  100. package/dist/id-selfie-flow.esm.js +8 -8
  101. package/dist/id-verification.esm.js +2 -2
  102. package/dist/id.d.ts +2 -2
  103. package/dist/id.esm.js +3 -3
  104. package/dist/{idCaptureDefaults-CRn9jT4K.esm.js → idCaptureDefaults-5e-Qy2v4.esm.js} +3 -3
  105. package/dist/{idCaptureManager-CmZwGDkd.esm.js → idCaptureManager-BBZ-fE8k.esm.js} +9 -9
  106. package/dist/{idCaptureManager-DBVw9Etw.d.ts → idCaptureManager-DkDj5gHx.d.ts} +2 -2
  107. package/dist/{idCaptureServices-DHmVtq3F.esm.js → idCaptureServices-ClgxfwHz.esm.js} +5 -5
  108. package/dist/{idCaptureStateMachine-q5IuCdS6.esm.js → idCaptureStateMachine-C8qqFRhO.esm.js} +18 -18
  109. package/dist/{idOcrManager-CUqaGVGx.esm.js → idOcrManager-BNKDn2kw.esm.js} +3 -3
  110. package/dist/{idOcrStateMachine-8PmK-51A.esm.js → idOcrStateMachine-Cu0mWUbo.esm.js} +1 -1
  111. package/dist/{idVerificationManager-BCJSTVib.esm.js → idVerificationManager-BOtnxdC3.esm.js} +3 -3
  112. package/dist/{idVerificationStateMachine-XRiYohGp.esm.js → idVerificationStateMachine-B8eWoP7-.esm.js} +1 -1
  113. package/dist/identity-reuse.d.ts +1 -1
  114. package/dist/identity-reuse.esm.js +2 -2
  115. package/dist/identity-search.esm.js +2 -2
  116. package/dist/{identityReuseManager-BX6Xwekg.esm.js → identityReuseManager-BJye1oP7.esm.js} +3 -3
  117. package/dist/{identityReuseManager-C40ngKeM.d.ts → identityReuseManager-CZ-qJ_Aa.d.ts} +4 -4
  118. package/dist/{identityReuseStateMachine-X1jzn8C5.esm.js → identityReuseStateMachine-Dt8zs3Qj.esm.js} +1 -1
  119. package/dist/{index-DxYNO94y.d.ts → index-C0WIMlJE.d.ts} +1 -1
  120. package/dist/index.esm.js +1 -1
  121. package/dist/{invokeOnCaptureCallback-lXP41N7b.esm.js → invokeOnCaptureCallback-DNQX9k5e.esm.js} +1 -1
  122. package/dist/kyb-checks.esm.js +2 -2
  123. package/dist/{kybChecksManager-k_RFvulr.esm.js → kybChecksManager-BV24DWDC.esm.js} +1 -1
  124. package/dist/{kybChecksStateMachine-DHUPRZvs.esm.js → kybChecksStateMachine-DwggsxpC.esm.js} +2 -2
  125. package/dist/mandatory-consent.d.ts +2 -2
  126. package/dist/mandatory-consent.esm.js +2 -2
  127. package/dist/{mandatoryConsentManager-D76rLUsm.d.ts → mandatoryConsentManager-CpriEr0q.d.ts} +5 -5
  128. package/dist/{mandatoryConsentManager-FKRF94TQ.esm.js → mandatoryConsentManager-DN1AwCQx.esm.js} +3 -3
  129. package/dist/{mandatoryConsentStateMachine-CSF03QyH.esm.js → mandatoryConsentStateMachine-CLQm6Ad-.esm.js} +1 -1
  130. package/dist/{multipartRecordingService-UQ06vyEa.esm.js → multipartRecordingService-DmBEbIol.esm.js} +1 -1
  131. package/dist/{permissionGuards-CR0Z10rU.esm.js → permissionGuards-BdXXkHJD.esm.js} +1 -1
  132. package/dist/{permissionServices-BMQItC9y.esm.js → permissionServices-BP78L2b7.esm.js} +1 -1
  133. package/dist/phone.esm.js +2 -2
  134. package/dist/{phoneManager-xOrux05n.esm.js → phoneManager-Dbwc_IFU.esm.js} +3 -3
  135. package/dist/{phoneServices-3DueJr0O.esm.js → phoneServices-DX65S3qe.esm.js} +1 -1
  136. package/dist/{phoneStateMachine-Bn9WlZnH.esm.js → phoneStateMachine-Bpy7TZWN.esm.js} +2 -2
  137. package/dist/{processFaceMatch-BwjIWIbi.esm.js → processFaceMatch-BSCDDCky.esm.js} +1 -1
  138. package/dist/qe-signature.esm.js +1 -1
  139. package/dist/{recordingService-DE9YedlD.esm.js → recordingService-CAKIalaG.esm.js} +2 -2
  140. package/dist/redirect-to-mobile.esm.js +2 -2
  141. package/dist/{redirectToMobileManager-PWuwwVbb.esm.js → redirectToMobileManager-f8V6eC1M.esm.js} +3 -3
  142. package/dist/{redirectToMobileStateMachine-DHpg32uO.esm.js → redirectToMobileStateMachine-lXoxB7XV.esm.js} +1 -1
  143. package/dist/{runChildModule-C8rhZjmW.esm.js → runChildModule-Cs7EbMRC.esm.js} +2 -2
  144. package/dist/{sdkVersion-Drwh3iUL.esm.js → sdkVersion-xHk2JHAu.esm.js} +1 -1
  145. package/dist/selfie.d.ts +3 -3
  146. package/dist/selfie.esm.js +11 -11
  147. package/dist/{selfieErrorUtils-FBmUZldI.esm.js → selfieErrorUtils-Dk8TTsfz.esm.js} +1 -1
  148. package/dist/{selfieManager-DwJsXQtP.esm.js → selfieManager-BXOfatQv.esm.js} +6 -6
  149. package/dist/{selfieManager-CvWeyYup.d.ts → selfieManager-DoRM58fT.d.ts} +1 -1
  150. package/dist/{selfieStateMachine-02NklomH.esm.js → selfieStateMachine-CpHs4tHZ.esm.js} +3 -3
  151. package/dist/{session-N7-6DM4w.esm.js → session-BWEoesEq.esm.js} +4 -4
  152. package/dist/session.d.ts +1 -1
  153. package/dist/session.esm.js +5 -5
  154. package/dist/{sessionInitializer-B1hTpJ_t.esm.js → sessionInitializer-Dt2SmeKI.esm.js} +9 -9
  155. package/dist/{setup-RudevH0l.esm.js → setup-MHq3iI37.esm.js} +11 -11
  156. package/dist/signature.esm.js +2 -2
  157. package/dist/{signatureManager-DIXqYmUN.esm.js → signatureManager-Cvee768u.esm.js} +3 -3
  158. package/dist/{signatureStateMachine-B7yC0mK9.esm.js → signatureStateMachine-CVv3ZeY5.esm.js} +1 -1
  159. package/dist/{stats-ummJank2.esm.js → stats-BYIXomqT.esm.js} +1 -1
  160. package/dist/stats.esm.js +1 -1
  161. package/dist/{trueSightService-CbJ23CkU.esm.js → trueSightService-DunNbPd5.esm.js} +6 -5
  162. package/dist/trust-graph.esm.js +2 -2
  163. package/dist/{types-Ddc4Tr_f.d.ts → types-B2DGXHe6.d.ts} +2 -0
  164. package/dist/types-BNkzXOXE.d.ts +45 -0
  165. package/dist/{types-DJPU3W2M.d.ts → types-BkWUNheX.d.ts} +1 -1
  166. package/dist/types-C2uJrJrS.d.ts +6 -0
  167. package/dist/{types-DYYMdAGv.esm.js → types-CBQN04Rh.esm.js} +2 -1
  168. package/dist/{types-DFP7eSle.d.ts → types-Crg7oL-l.d.ts} +1 -1
  169. package/dist/{types-CYrtpEe5.d.ts → types-DqCEOLF8.d.ts} +1 -1
  170. package/dist/{types-BRmwbyAu.d.ts → types-x5MQKskR.d.ts} +1 -1
  171. package/dist/video-selfie.d.ts +1 -1
  172. package/dist/video-selfie.esm.js +7 -7
  173. package/dist/{videoSelfieCameraWarmer-DLwY4IGT.esm.js → videoSelfieCameraWarmer-DI-qK8jX.esm.js} +6 -6
  174. package/dist/{videoSelfieStepDetector-DStjqQQm.d.ts → videoSelfieStepDetector-CYvhxbG2.d.ts} +2 -2
  175. package/dist/{warmup-BZOMg303.esm.js → warmup-DSMYbd2y.esm.js} +1 -1
  176. package/dist/wasm.d.ts +1 -1
  177. package/dist/wasm.esm.js +3 -3
  178. package/dist/{wasmDsFlagSync-BHm1d2gA.esm.js → wasmDsFlagSync-njcRLdEP.esm.js} +1 -1
  179. package/dist/{wasmWebClient-CyLCM31e.esm.js → wasmWebClient-CNVO0T2g.esm.js} +9 -9
  180. package/dist/watchlist-for-business.esm.js +2 -2
  181. package/dist/watchlist.esm.js +2 -2
  182. package/dist/{watchlistForBusinessManager-CCzx7A5X.esm.js → watchlistForBusinessManager-B3CoCZlU.esm.js} +3 -3
  183. package/dist/{watchlistForBusinessStateMachine-DPS6rkl6.esm.js → watchlistForBusinessStateMachine-ClSxGCmw.esm.js} +1 -1
  184. package/dist/{watchlistManager-DDMrwI-3.esm.js → watchlistManager-X0oD_RE9.esm.js} +3 -3
  185. package/dist/{watchlistStateMachine-BuJHQJ_p.esm.js → watchlistStateMachine-DubBSexb.esm.js} +1 -1
  186. package/dist/workflow.d.ts +1 -1
  187. package/dist/workflow.esm.js +39 -37
  188. package/package.json +6 -1
  189. package/dist/types-Bc1-m6MR.d.ts +0 -6
@@ -0,0 +1,149 @@
1
+ import { n as eventModuleNames } from "./types-CBQN04Rh.esm.js";
2
+ import { t as createManagerInstrumentation } from "./events-C3sjvrjL.esm.js";
3
+ import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
4
+ import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
5
+ import { a as hasReadAll, i as hasDownloads, n as canSubmitSignature, r as documentSignatureMachine, t as canOpenSign } from "./documentSignatureStateMachine-2goFPkF9.esm.js";
6
+ //#region src/modules/document-signature/documentSignatureActor.ts
7
+ function createDocumentSignatureActor(options) {
8
+ return createActor(documentSignatureMachine, { input: { config: options.config } }).start();
9
+ }
10
+ //#endregion
11
+ //#region src/modules/document-signature/documentSignatureManager.ts
12
+ function readingFields(context) {
13
+ return {
14
+ title: context.config.title,
15
+ subtitle: context.config.subTitle,
16
+ consentText: context.config.consentText,
17
+ documents: context.documents,
18
+ reachedEndIds: context.reachedEndIds,
19
+ allRead: hasReadAll(context),
20
+ canSign: canOpenSign(context)
21
+ };
22
+ }
23
+ function sheetFields(context) {
24
+ return {
25
+ method: context.method,
26
+ typedName: context.typedName,
27
+ maxTypedNameLength: 100,
28
+ canSubmit: canSubmitSignature(context)
29
+ };
30
+ }
31
+ function mapState(snapshot) {
32
+ const typed = snapshot;
33
+ const { context } = typed;
34
+ if (typed.matches("loading")) return { status: "loading" };
35
+ if (typed.matches("reading")) return {
36
+ status: "reading",
37
+ ...readingFields(context)
38
+ };
39
+ if (typed.matches("signing")) return {
40
+ status: "signing",
41
+ ...readingFields(context),
42
+ ...sheetFields(context)
43
+ };
44
+ if (typed.matches("submitting")) return {
45
+ status: "submitting",
46
+ ...readingFields(context),
47
+ ...sheetFields(context)
48
+ };
49
+ if (typed.matches("signed")) return {
50
+ status: "signed",
51
+ documents: context.documents,
52
+ hasDownloads: hasDownloads(context)
53
+ };
54
+ if (typed.matches("signFailed")) return { status: "signFailed" };
55
+ if (typed.matches("finished")) return { status: "finished" };
56
+ if (typed.matches("error")) return {
57
+ status: "error",
58
+ error: context.error ?? "LOAD_FAILED"
59
+ };
60
+ return { status: "idle" };
61
+ }
62
+ function createApi({ actor, trackElementClicked }) {
63
+ return {
64
+ /** Loads the session's documents. */
65
+ load() {
66
+ actor.send({ type: "LOAD" });
67
+ },
68
+ /**
69
+ * Reports that a document's end is on screen. Repeated calls are ignored.
70
+ * Pass `scrolled: true` when the user scrolled there: then reaching the last
71
+ * end opens the sign sheet.
72
+ */
73
+ reachedEnd(documentId, scrolled = false) {
74
+ actor.send({
75
+ type: "DOCUMENT_REACHED_END",
76
+ documentId,
77
+ scrolled
78
+ });
79
+ },
80
+ /** Opens the sign sheet. Ignored until `canSign` is true. */
81
+ openSign() {
82
+ trackElementClicked?.("sign");
83
+ actor.send({ type: "OPEN_SIGN" });
84
+ },
85
+ /** Closes the sign sheet without signing. */
86
+ closeSign() {
87
+ actor.send({ type: "CLOSE_SIGN" });
88
+ },
89
+ /** Switches between drawing and typing the name. */
90
+ selectMethod(method) {
91
+ actor.send({
92
+ type: "SELECT_METHOD",
93
+ method
94
+ });
95
+ },
96
+ /** Reports the total stroke length, in CSS pixels, of the drawn signature. */
97
+ setDrawing(inkLength) {
98
+ actor.send({
99
+ type: "DRAWING_CHANGED",
100
+ inkLength
101
+ });
102
+ },
103
+ /** Updates the typed name. */
104
+ setTypedName(typedName) {
105
+ actor.send({
106
+ type: "TYPED_NAME_CHANGED",
107
+ typedName
108
+ });
109
+ },
110
+ /**
111
+ * Signs every document. For a drawn signature, pass the PNG as base64
112
+ * without the `data:` prefix. For a typed name, call it without arguments.
113
+ */
114
+ submit(signatureBase64) {
115
+ trackElementClicked?.("confirmAndSign");
116
+ actor.send({
117
+ type: "SUBMIT",
118
+ signatureBase64
119
+ });
120
+ },
121
+ /** After a failed sign or a failed load, loads the documents again. */
122
+ retry() {
123
+ trackElementClicked?.("tryAgain");
124
+ actor.send({ type: "RETRY" });
125
+ },
126
+ /** Leaves the signed screen and finishes the module. Only needed when it shows download links. */
127
+ continue() {
128
+ trackElementClicked?.("continue");
129
+ actor.send({ type: "CONTINUE" });
130
+ }
131
+ };
132
+ }
133
+ function createDocumentSignatureManager(options) {
134
+ return createDocumentSignatureManagerFromActor(createDocumentSignatureActor(options));
135
+ }
136
+ /**
137
+ * Creates a Document Signature manager from a pre-built actor.
138
+ * Use it when you override the machine with `.provide()`.
139
+ */
140
+ function createDocumentSignatureManagerFromActor(actor) {
141
+ return createManager({
142
+ actor,
143
+ mapState,
144
+ createApi,
145
+ instrumentation: createManagerInstrumentation(eventModuleNames.documentSignature)
146
+ });
147
+ }
148
+ //#endregion
149
+ export { createDocumentSignatureManager, createDocumentSignatureManagerFromActor, documentSignatureMachine };
@@ -263,7 +263,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
263
263
  type: "fileSizeOkForNonGallery";
264
264
  params: unknown;
265
265
  };
266
- }>, never, "uploading" | "closed" | "success" | "finished" | "capturing" | "failure" | "initCamera" | "tutorial" | "preview" | "nextPage" | "finalizing" | {
266
+ }>, never, "uploading" | "closed" | "success" | "finished" | "initCamera" | "tutorial" | "capturing" | "preview" | "failure" | "nextPage" | "finalizing" | {
267
267
  permissions: "idle" | "denied" | "waitingForUser" | "requesting" | "learnMore";
268
268
  }, string, DocumentCaptureInput, NonReducibleUnknown, EventObject, MetaObject, {
269
269
  readonly id: "documentCapture";
@@ -1,9 +1,9 @@
1
- import { n as eventModuleNames } from "./types-DYYMdAGv.esm.js";
2
- import { t as createManagerInstrumentation } from "./events-C2lGiIT1.esm.js";
1
+ import { n as eventModuleNames } from "./types-CBQN04Rh.esm.js";
2
+ import { t as createManagerInstrumentation } from "./events-C3sjvrjL.esm.js";
3
3
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
4
4
  import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
5
5
  import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
6
- import { n as DEFAULT_MAX_FILE_SIZE, r as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-B4CPAJrT.esm.js";
6
+ import { n as DEFAULT_MAX_FILE_SIZE, r as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-CzZ-fz0I.esm.js";
7
7
  //#region src/modules/document-capture/documentCaptureActor.ts
8
8
  function createDocumentCaptureActor(options) {
9
9
  return createActor(documentCaptureMachine, { input: { config: options.config } }).start();
@@ -1,10 +1,10 @@
1
- import { t as api, u as endpoints } from "./api-BMLJdwd_.esm.js";
1
+ import { t as api, u as endpoints } from "./api-jplFqPcE.esm.js";
2
2
  import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
3
3
  import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
4
4
  import { a as stopCameraStream } from "./camera-wzsqfd3B.esm.js";
5
- import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-BMQItC9y.esm.js";
6
- import { r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-CR0Z10rU.esm.js";
7
- import { t as carryAttempts } from "./attemptCarry-Dp2xFl7A.esm.js";
5
+ import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-BP78L2b7.esm.js";
6
+ import { r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-BdXXkHJD.esm.js";
7
+ import { t as carryAttempts } from "./attemptCarry-Dew-8qhm.esm.js";
8
8
  import { n as getBackCameraStream } from "./backCameraStream-Bn9Z5wM5.esm.js";
9
9
  //#region src/modules/document-capture/types.ts
10
10
  const PROCESSING_TYPE_MAP = {
@@ -0,0 +1,219 @@
1
+ import { n as eventModuleNames, v as addEvent } from "./types-CBQN04Rh.esm.js";
2
+ import { t as api, u as endpoints } from "./api-jplFqPcE.esm.js";
3
+ import "./events-C3sjvrjL.esm.js";
4
+ import { i as toIncodeApiError } from "./apiError-DXXBBE6F.esm.js";
5
+ import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
6
+ import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
7
+ //#region src/modules/document-signature/documentSignatureServices.ts
8
+ /** Lists the session's documents in display order. Throws on failure. */
9
+ async function getDocuments(signal) {
10
+ try {
11
+ return [...(await api.get(endpoints.documentSignatureDocuments, { signal })).data.documents].sort((a, b) => a.order - b.order);
12
+ } catch (error) {
13
+ toIncodeApiError(endpoints.documentSignatureDocuments, error);
14
+ }
15
+ }
16
+ /** Signs every listed document with one signature. Idempotent on the backend. Throws on failure. */
17
+ async function signDocuments(body, signal) {
18
+ try {
19
+ return (await api.post(endpoints.documentSignatureSign, body, { signal })).data;
20
+ } catch (error) {
21
+ toIncodeApiError(endpoints.documentSignatureSign, error);
22
+ }
23
+ }
24
+ /** How long the signed screen stays before the module finishes, when it has no download links. */
25
+ const SIGNED_DISPLAY_MS = 1500;
26
+ const SCREEN = "documentSignature";
27
+ function track(code, payload = {}) {
28
+ addEvent({
29
+ code,
30
+ module: eventModuleNames.documentSignature,
31
+ screen: SCREEN,
32
+ payload
33
+ });
34
+ }
35
+ function isTypedNameValid(name) {
36
+ const trimmed = name.trim();
37
+ return trimmed.length > 1 && trimmed.length <= 100 && !/[\r\n]/.test(trimmed);
38
+ }
39
+ const isSigned = (documents) => documents.some((d) => Boolean(d.signatureId));
40
+ /** True when the user has scrolled every document to its end. */
41
+ function hasReadAll(context) {
42
+ return context.documents.every((d) => context.reachedEndIds.includes(d.documentId));
43
+ }
44
+ /** True when the user may open the sign sheet. */
45
+ function canOpenSign(context) {
46
+ return context.config.requireScrollToEnd === false || hasReadAll(context);
47
+ }
48
+ /** True when the signed screen shows download links, so the user leaves it with Continue. */
49
+ function hasDownloads(context) {
50
+ return context.config.allowDownload === true && context.documents.some((d) => Boolean(d.signedUrl));
51
+ }
52
+ /** True when the current signature input is complete enough to submit. */
53
+ function canSubmitSignature(context) {
54
+ return context.method === "draw" ? context.inkLength >= 60 : isTypedNameValid(context.typedName);
55
+ }
56
+ function isFirstReachedEnd(context, event) {
57
+ const { documentId } = event;
58
+ return !context.reachedEndIds.includes(documentId) && context.documents.some((d) => d.documentId === documentId);
59
+ }
60
+ const outputOf = (event) => event.output;
61
+ const documentSignatureMachine = setup({
62
+ types: {
63
+ context: {},
64
+ events: {},
65
+ input: {}
66
+ },
67
+ actors: {
68
+ getDocuments: fromPromise(({ signal }) => getDocuments(signal)),
69
+ signDocuments: fromPromise(({ input, signal }) => signDocuments(input, signal))
70
+ },
71
+ actions: {
72
+ setDocuments: assign(({ context, event }) => {
73
+ const documents = outputOf(event);
74
+ return {
75
+ documents,
76
+ reachedEndIds: context.reachedEndIds.filter((id) => documents.some((d) => d.documentId === id))
77
+ };
78
+ }),
79
+ setSignedDocuments: assign(({ event }) => ({ documents: outputOf(event).documents })),
80
+ addReachedEnd: assign(({ context, event }) => {
81
+ const { documentId } = event;
82
+ return { reachedEndIds: [...context.reachedEndIds, documentId] };
83
+ }),
84
+ trackReachedEnd: ({ event }) => {
85
+ const { documentId } = event;
86
+ track("documentSignatureReachedEnd", { documentId });
87
+ },
88
+ resetSignatureInput: assign({
89
+ method: () => "draw",
90
+ inkLength: () => 0,
91
+ typedName: () => "",
92
+ signatureBase64: () => void 0
93
+ }),
94
+ setMethod: assign(({ event }) => ({
95
+ method: event.method,
96
+ inkLength: 0,
97
+ typedName: ""
98
+ })),
99
+ trackTypedSelected: () => track("documentSignatureTypedSignatureSelected"),
100
+ trackSignTapped: () => track("documentSignatureSignTapped"),
101
+ setInkLength: assign(({ event }) => ({ inkLength: event.inkLength })),
102
+ setTypedName: assign(({ event }) => ({ typedName: event.typedName })),
103
+ setSignatureImage: assign(({ event }) => ({ signatureBase64: event.signatureBase64 })),
104
+ setNoDocumentsError: assign({ error: () => "NO_DOCUMENTS" }),
105
+ setLoadError: assign({ error: () => "LOAD_FAILED" })
106
+ },
107
+ guards: {
108
+ outputIsSigned: ({ event }) => isSigned(outputOf(event)),
109
+ outputIsEmpty: ({ event }) => outputOf(event).length === 0,
110
+ isFirstReachedEnd: ({ context, event }) => isFirstReachedEnd(context, event),
111
+ finishesReading: ({ context, event }) => event.scrolled === true && isFirstReachedEnd(context, event) && context.documents.every((d) => d.documentId === event.documentId || context.reachedEndIds.includes(d.documentId)),
112
+ hasNoDownloads: ({ context }) => !hasDownloads(context),
113
+ canOpenSign: ({ context }) => canOpenSign(context),
114
+ isTypeMethod: ({ event }) => event.method === "type",
115
+ canSubmit: ({ context, event }) => canSubmitSignature(context) && (context.method === "type" || !!event.signatureBase64)
116
+ }
117
+ }).createMachine({
118
+ id: "documentSignature",
119
+ initial: "idle",
120
+ context: ({ input }) => ({
121
+ config: input.config,
122
+ documents: [],
123
+ reachedEndIds: [],
124
+ method: "draw",
125
+ inkLength: 0,
126
+ typedName: "",
127
+ signatureBase64: void 0,
128
+ error: void 0
129
+ }),
130
+ states: {
131
+ idle: { on: { LOAD: "loading" } },
132
+ loading: { invoke: {
133
+ src: "getDocuments",
134
+ onDone: [
135
+ {
136
+ target: "signed",
137
+ guard: "outputIsSigned",
138
+ actions: "setDocuments"
139
+ },
140
+ {
141
+ target: "error",
142
+ guard: "outputIsEmpty",
143
+ actions: "setNoDocumentsError"
144
+ },
145
+ {
146
+ target: "reading",
147
+ actions: "setDocuments"
148
+ }
149
+ ],
150
+ onError: {
151
+ target: "error",
152
+ actions: "setLoadError"
153
+ }
154
+ } },
155
+ reading: { on: {
156
+ DOCUMENT_REACHED_END: [{
157
+ target: "signing",
158
+ guard: "finishesReading",
159
+ actions: [
160
+ "addReachedEnd",
161
+ "trackReachedEnd",
162
+ "resetSignatureInput"
163
+ ]
164
+ }, {
165
+ guard: "isFirstReachedEnd",
166
+ actions: ["addReachedEnd", "trackReachedEnd"]
167
+ }],
168
+ OPEN_SIGN: {
169
+ target: "signing",
170
+ guard: "canOpenSign",
171
+ actions: ["resetSignatureInput", "trackSignTapped"]
172
+ }
173
+ } },
174
+ signing: { on: {
175
+ CLOSE_SIGN: "reading",
176
+ SELECT_METHOD: [{
177
+ guard: "isTypeMethod",
178
+ actions: ["setMethod", "trackTypedSelected"]
179
+ }, { actions: "setMethod" }],
180
+ DRAWING_CHANGED: { actions: "setInkLength" },
181
+ TYPED_NAME_CHANGED: { actions: "setTypedName" },
182
+ SUBMIT: {
183
+ target: "submitting",
184
+ guard: "canSubmit",
185
+ actions: "setSignatureImage"
186
+ }
187
+ } },
188
+ submitting: { invoke: {
189
+ src: "signDocuments",
190
+ input: ({ context }) => {
191
+ const documentIds = context.documents.map((d) => d.documentId);
192
+ return context.method === "type" ? {
193
+ documentIds,
194
+ typedName: context.typedName.trim()
195
+ } : {
196
+ documentIds,
197
+ signatureBase64: context.signatureBase64 ?? ""
198
+ };
199
+ },
200
+ onDone: {
201
+ target: "signed",
202
+ actions: "setSignedDocuments"
203
+ },
204
+ onError: "signFailed"
205
+ } },
206
+ signFailed: { on: { RETRY: "loading" } },
207
+ signed: {
208
+ after: { [SIGNED_DISPLAY_MS]: {
209
+ target: "finished",
210
+ guard: "hasNoDownloads"
211
+ } },
212
+ on: { CONTINUE: "finished" }
213
+ },
214
+ finished: { type: "final" },
215
+ error: { on: { RETRY: "loading" } }
216
+ }
217
+ });
218
+ //#endregion
219
+ export { hasReadAll as a, hasDownloads as i, canSubmitSignature as n, documentSignatureMachine as r, canOpenSign as t };
@@ -1,3 +1,3 @@
1
- import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-DwH_DeuQ.esm.js";
2
- import { t as createDynamicFormsManager } from "./dynamicFormsManager-B2WpJRIy.esm.js";
1
+ import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-Bc2omduf.esm.js";
2
+ import { t as createDynamicFormsManager } from "./dynamicFormsManager-9ofnJYMp.esm.js";
3
3
  export { createDynamicFormsManager, dynamicFormsMachine };
@@ -1,9 +1,9 @@
1
- import { n as eventModuleNames } from "./types-DYYMdAGv.esm.js";
2
- import { t as createManagerInstrumentation } from "./events-C2lGiIT1.esm.js";
1
+ import { n as eventModuleNames } from "./types-CBQN04Rh.esm.js";
2
+ import { t as createManagerInstrumentation } from "./events-C3sjvrjL.esm.js";
3
3
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
4
4
  import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
5
5
  import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
6
- import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-DwH_DeuQ.esm.js";
6
+ import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-Bc2omduf.esm.js";
7
7
  //#region src/modules/dynamic-forms/dynamicFormsActor.ts
8
8
  function createDynamicFormsActor(options) {
9
9
  return createActor(dynamicFormsMachine, { input: { config: options.config } }).start();
@@ -1,5 +1,5 @@
1
- import { t as api, u as endpoints } from "./api-BMLJdwd_.esm.js";
2
- import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-B0e6kXC-.esm.js";
1
+ import { t as api, u as endpoints } from "./api-jplFqPcE.esm.js";
2
+ import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-DXXBBE6F.esm.js";
3
3
  import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
4
4
  import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
5
5
  import { t as isoDateToMs } from "./dateUtils-CvG0FvK8.esm.js";
package/dist/ekyb.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./xstate.cjs-D6Ur0X1F.js";
2
2
  import { n as AddressSuggestion } from "./textRules-D4NRinKY.js";
3
- import { i as FlowModuleConfig } from "./types-Ddc4Tr_f.js";
3
+ import { i as FlowModuleConfig } from "./types-B2DGXHe6.js";
4
4
  import { a as EkybValidationError, n as EkybCountry, o as EkybValidationErrors, r as EkybFieldDef, s as UboEntry, t as EkybConfig } from "./types-BgRHw-dR.js";
5
5
  import { n as EkybState, o as ekybMachine, r as createEkybManager, t as EkybManager } from "./ekybManager-BflWuTe4.js";
6
6
  //#region src/modules/ekyb/ekybServices.d.ts
package/dist/ekyb.esm.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { c as ALL_COUNTRIES, f as SUPPORTED_COUNTRIES, l as DEV_ONLY_COUNTRIES, m as isSupportedCountry, o as toEkybConfig } from "./ekybUtils-Cw8Ta9Qi.esm.js";
2
- import { t as ekybMachine } from "./ekybStateMachine-Xpc40REP.esm.js";
3
- import { t as createEkybManager } from "./ekybManager-D6-cLZnV.esm.js";
2
+ import { t as ekybMachine } from "./ekybStateMachine-Qo_lJINj.esm.js";
3
+ import { t as createEkybManager } from "./ekybManager-BTP6KU74.esm.js";
4
4
  export { ALL_COUNTRIES, DEV_ONLY_COUNTRIES, SUPPORTED_COUNTRIES, createEkybManager, ekybMachine, isSupportedCountry, toEkybConfig };
@@ -1,9 +1,9 @@
1
- import { n as eventModuleNames } from "./types-DYYMdAGv.esm.js";
2
- import { t as createManagerInstrumentation } from "./events-C2lGiIT1.esm.js";
1
+ import { n as eventModuleNames } from "./types-CBQN04Rh.esm.js";
2
+ import { t as createManagerInstrumentation } from "./events-C3sjvrjL.esm.js";
3
3
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
4
4
  import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
5
5
  import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
6
- import { t as ekybMachine } from "./ekybStateMachine-Xpc40REP.esm.js";
6
+ import { t as ekybMachine } from "./ekybStateMachine-Qo_lJINj.esm.js";
7
7
  //#region src/modules/ekyb/ekybActor.ts
8
8
  /**
9
9
  * Creates and starts an eKYB actor.
@@ -1,5 +1,5 @@
1
- import { t as api, u as endpoints } from "./api-BMLJdwd_.esm.js";
2
- import { n as getFlow } from "./flowServices-C0lKeHmE.esm.js";
1
+ import { t as api, u as endpoints } from "./api-jplFqPcE.esm.js";
2
+ import { n as getFlow } from "./flowServices-DOmupXL_.esm.js";
3
3
  import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
4
4
  import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
5
5
  import { a as sortModulesByOrder, c as ALL_COUNTRIES, d as FIELD_ORDER, i as requiresAddressValidation, m as isSupportedCountry, n as hasAtLeastOneAddressField, o as toEkybConfig, p as UBO_FIELD_LABELS, r as isFieldOptional, s as ADDRESS_FIELDS, u as FIELD_NAME_MAPPING } from "./ekybUtils-Cw8Ta9Qi.esm.js";
@@ -7,7 +7,7 @@ import { t as usStateOptions } from "./usStates-CwOQ2kAx.esm.js";
7
7
  import { n as requiresCnpjValidation, r as validateCNPJ } from "./cnpj-Bl_olpdX.esm.js";
8
8
  import { a as getPostalCodeMaxLength, c as fillFromSuggestion, i as getPostalCodeErrorParams, l as getStreetLevelErrorForSuggestion, n as formatPostalCode, o as validatePostalCode, r as getPostalCodeErrorKey, s as STREET_LEVEL_REQUIRED_ERROR, t as createBundledDefinitionSource, u as keepSuggestedStateInOptions } from "./definitionSource-Nw0YCbpe.esm.js";
9
9
  import { n as checkSupport, r as DYNAMIC_REQUIRED_KEY, t as resolveForm } from "./resolveForm-DaaQSVWp.esm.js";
10
- import { r as isFormDefinitionsEnabled, t as debounceSearchActor } from "./addressSearch-BGHyclUd.esm.js";
10
+ import { r as isFormDefinitionsEnabled, t as debounceSearchActor } from "./addressSearch-BTo2kH5N.esm.js";
11
11
  //#region src/modules/ekyb/ekybValidators.ts
12
12
  const createValidators = () => ({
13
13
  required: (value, _rule, field) => {
@@ -1,6 +1,6 @@
1
1
  import { a as EkycFormValues, c as EkycValidationErrors, s as EkycValidationError } from "./types-DEa3taWc.js";
2
2
  import { a as EkycPrefillFieldDef, c as EkycPrefillModuleConfig, i as EkycPrefillErrorKind, l as EkycPrefillServedField, n as EkycPrefillConfigField, s as EkycPrefillInputFormat, t as EkycPrefillConfig } from "./types-B-PIc0en.js";
3
- import { a as EkycPrefillFormState, c as EkycPrefillManager, d as EkycPrefillSubmittingState, f as createEkycPrefillManager, h as ekycPrefillMachine, i as EkycPrefillFinishedState, l as EkycPrefillMisconfiguredState, n as EkycPrefillClosedState, o as EkycPrefillIdleState, r as EkycPrefillErrorState, s as EkycPrefillLimitReachedState, t as EkycPrefillAnyOfState, u as EkycPrefillState } from "./ekycPrefillManager-DOTl3Y2w.js";
3
+ import { a as EkycPrefillFormState, c as EkycPrefillManager, d as EkycPrefillSubmittingState, f as createEkycPrefillManager, h as ekycPrefillMachine, i as EkycPrefillFinishedState, l as EkycPrefillMisconfiguredState, n as EkycPrefillClosedState, o as EkycPrefillIdleState, r as EkycPrefillErrorState, s as EkycPrefillLimitReachedState, t as EkycPrefillAnyOfState, u as EkycPrefillState } from "./ekycPrefillManager-BcLhkpp8.js";
4
4
  //#region src/modules/ekyc-prefill/ekycPrefillConfig.d.ts
5
5
  /**
6
6
  * Normalizes the served `EKYC_PREFILL` configuration. Idempotent, so a
@@ -1,3 +1,3 @@
1
- import { i as toEkycPrefillConfig, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-COPqGv1-.esm.js";
2
- import { t as createEkycPrefillManager } from "./ekycPrefillManager-BJzn8Pc4.esm.js";
1
+ import { i as toEkycPrefillConfig, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-BlzAkl6Z.esm.js";
2
+ import { t as createEkycPrefillManager } from "./ekycPrefillManager-BKNsBlAd.esm.js";
3
3
  export { createEkycPrefillManager, ekycPrefillMachine, toEkycPrefillConfig };
package/dist/ekyc.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as ekycMachine } from "./ekycStateMachine-BsclGsmE.esm.js";
1
+ import { t as ekycMachine } from "./ekycStateMachine-mB4i5_03.esm.js";
2
2
  import { l as toEkycConfig } from "./ekycUtils-FcqA6oU4.esm.js";
3
- import { t as createEkycManager } from "./ekycManager-DWuONuie.esm.js";
3
+ import { t as createEkycManager } from "./ekycManager-DeocHrn-.esm.js";
4
4
  export { createEkycManager, ekycMachine, toEkycConfig };
@@ -1,9 +1,9 @@
1
- import { n as eventModuleNames } from "./types-DYYMdAGv.esm.js";
2
- import { t as createManagerInstrumentation } from "./events-C2lGiIT1.esm.js";
1
+ import { n as eventModuleNames } from "./types-CBQN04Rh.esm.js";
2
+ import { t as createManagerInstrumentation } from "./events-C3sjvrjL.esm.js";
3
3
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
4
4
  import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
5
5
  import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
6
- import { i as isStepValid, n as buildEkycSteps, r as clampStepIndex, t as ekycMachine } from "./ekycStateMachine-BsclGsmE.esm.js";
6
+ import { i as isStepValid, n as buildEkycSteps, r as clampStepIndex, t as ekycMachine } from "./ekycStateMachine-mB4i5_03.esm.js";
7
7
  //#region src/modules/ekyc/ekycActor.ts
8
8
  /**
9
9
  * Creates and starts an eKYC actor.
@@ -1,6 +1,6 @@
1
1
  import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
2
2
  import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
3
- import { n as isAnyOfMissing, r as validateForm, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-COPqGv1-.esm.js";
3
+ import { n as isAnyOfMissing, r as validateForm, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-BlzAkl6Z.esm.js";
4
4
  //#region src/modules/ekyc-prefill/ekycPrefillActor.ts
5
5
  /** Creates and starts an eKYC Pre-fill actor, idle until `LOAD`. */
6
6
  function createEkycPrefillActor(options = {}) {
@@ -45,10 +45,6 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
45
45
  id: string | undefined;
46
46
  };
47
47
  }>, Values<{
48
- clearError: {
49
- type: "clearError";
50
- params: NonReducibleUnknown;
51
- };
52
48
  applyForm: {
53
49
  type: "applyForm";
54
50
  params: NonReducibleUnknown;
@@ -81,6 +77,10 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
81
77
  type: "setSubmitError";
82
78
  params: NonReducibleUnknown;
83
79
  };
80
+ clearError: {
81
+ type: "clearError";
82
+ params: NonReducibleUnknown;
83
+ };
84
84
  }>, Values<{
85
85
  isValid: {
86
86
  type: "isValid";
@@ -1,5 +1,5 @@
1
- import { t as api, u as endpoints } from "./api-BMLJdwd_.esm.js";
2
- import { i as toIncodeApiError } from "./apiError-B0e6kXC-.esm.js";
1
+ import { t as api, u as endpoints } from "./api-jplFqPcE.esm.js";
2
+ import { i as toIncodeApiError } from "./apiError-DXXBBE6F.esm.js";
3
3
  import { n as loadPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
4
4
  import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
5
5
  import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
@@ -1,4 +1,4 @@
1
- import { t as api, u as endpoints } from "./api-BMLJdwd_.esm.js";
1
+ import { t as api, u as endpoints } from "./api-jplFqPcE.esm.js";
2
2
  import { t as getPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
3
3
  import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
4
4
  import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
@@ -6,7 +6,7 @@ import { a as formatPhoneNational, c as oneOfRequiredErrorKey, i as cleanName, l
6
6
  import { n as usStates, t as usStateOptions } from "./usStates-CwOQ2kAx.esm.js";
7
7
  import { a as getPostalCodeMaxLength, c as fillFromSuggestion, l as getStreetLevelErrorForSuggestion, n as formatPostalCode, t as createBundledDefinitionSource, u as keepSuggestedStateInOptions } from "./definitionSource-Nw0YCbpe.esm.js";
8
8
  import { n as checkSupport, t as resolveForm } from "./resolveForm-DaaQSVWp.esm.js";
9
- import { n as searchAddress, r as isFormDefinitionsEnabled, t as debounceSearchActor } from "./addressSearch-BGHyclUd.esm.js";
9
+ import { n as searchAddress, r as isFormDefinitionsEnabled, t as debounceSearchActor } from "./addressSearch-BTo2kH5N.esm.js";
10
10
  import { C as TAX_ID_SOURCES, S as STREET_SOURCES, _ as MIDDLE_NAME_SOURCES, a as getEKYCFields, b as POSTAL_CODE_SOURCES, c as resolveEkycSource, d as APARTMENT_SOURCES, f as CITY_SOURCES, g as HOUSE_NO_SOURCES, h as EMAIL_SOURCES, i as getEKYCDisplayModes, l as toEkycConfig, m as COUNTRY_SELECTOR_DISABLED_SOURCES, o as isFieldOptional, p as COUNTRY_CODE_OMITTED_SOURCES, r as getEKYCCountry, s as mapToEKYCvalue, t as EKYC_GROUP_KEYS, u as ADDRESS_STATE_SOURCES, v as NAME_SOURCES, w as VOCABULARY, x as STATE_CODE_HINTS, y as ONE_OF_REQUIRED_GROUPS } from "./ekycUtils-FcqA6oU4.esm.js";
11
11
  import { t as DateFormattingProvider } from "./DateFormattingProvider-DPq9zco-.esm.js";
12
12
  import { t as formatPhoneE164 } from "./phoneFormat-C3q0Ukh4.esm.js";
@@ -1,2 +1,2 @@
1
- import { a as NAMIRIAL_QES_CONSENT_KEYS, c as areAllConsented, i as AE_CONSENT_KEYS, l as getConsentKeys, n as createElectronicSignatureManagerFromActor, o as NAMIRIAL_QES_PROVIDER_CODE, r as electronicSignatureMachine, s as QE_CONSENT_KEYS, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-BGUA13HH.esm.js";
1
+ import { a as NAMIRIAL_QES_CONSENT_KEYS, c as areAllConsented, i as AE_CONSENT_KEYS, l as getConsentKeys, n as createElectronicSignatureManagerFromActor, o as NAMIRIAL_QES_PROVIDER_CODE, r as electronicSignatureMachine, s as QE_CONSENT_KEYS, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-Cz5IVRrS.esm.js";
2
2
  export { AE_CONSENT_KEYS, NAMIRIAL_QES_CONSENT_KEYS, NAMIRIAL_QES_PROVIDER_CODE, QE_CONSENT_KEYS, areAllConsented, createElectronicSignatureManager, createElectronicSignatureManagerFromActor, electronicSignatureMachine, getConsentKeys, getDefaultConsentChecks };
@@ -1,8 +1,8 @@
1
- import { n as eventModuleNames } from "./types-DYYMdAGv.esm.js";
2
- import { t as api, u as endpoints } from "./api-BMLJdwd_.esm.js";
3
- import { t as createManagerInstrumentation } from "./events-C2lGiIT1.esm.js";
1
+ import { n as eventModuleNames } from "./types-CBQN04Rh.esm.js";
2
+ import { t as api, u as endpoints } from "./api-jplFqPcE.esm.js";
3
+ import { t as createManagerInstrumentation } from "./events-C3sjvrjL.esm.js";
4
4
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
5
- import { i as toIncodeApiError, n as isConnectivityError, t as IncodeApiError } from "./apiError-B0e6kXC-.esm.js";
5
+ import { i as toIncodeApiError, n as isConnectivityError, t as IncodeApiError } from "./apiError-DXXBBE6F.esm.js";
6
6
  import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
7
7
  import { i as assign, s as createActor, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
8
8
  import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
package/dist/email.esm.js CHANGED
@@ -1,3 +1,3 @@
1
- import { t as emailMachine } from "./emailStateMachine-Ba4dmk3l.esm.js";
2
- import { t as createEmailManager } from "./emailManager-DJfqy42G.esm.js";
1
+ import { t as emailMachine } from "./emailStateMachine-_fNnmAC7.esm.js";
2
+ import { t as createEmailManager } from "./emailManager-CFPz1wdm.esm.js";
3
3
  export { createEmailManager, emailMachine };
@@ -1,8 +1,8 @@
1
- import { n as eventModuleNames } from "./types-DYYMdAGv.esm.js";
2
- import { t as createManagerInstrumentation } from "./events-C2lGiIT1.esm.js";
1
+ import { n as eventModuleNames } from "./types-CBQN04Rh.esm.js";
2
+ import { t as createManagerInstrumentation } from "./events-C3sjvrjL.esm.js";
3
3
  import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
4
4
  import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
5
- import { t as emailMachine } from "./emailStateMachine-Ba4dmk3l.esm.js";
5
+ import { t as emailMachine } from "./emailStateMachine-_fNnmAC7.esm.js";
6
6
  import { n as isOtpComplete } from "./otp-D2k3PeSL.esm.js";
7
7
  //#region src/modules/email/emailActor.ts
8
8
  function createEmailActor(options) {
@@ -1,8 +1,8 @@
1
- import { t as api, u as endpoints } from "./api-BMLJdwd_.esm.js";
1
+ import { t as api, u as endpoints } from "./api-jplFqPcE.esm.js";
2
2
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
3
3
  import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
4
4
  import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-BCcwgosu.esm.js";
5
- import { t as carryAttempts } from "./attemptCarry-Dp2xFl7A.esm.js";
5
+ import { t as carryAttempts } from "./attemptCarry-Dew-8qhm.esm.js";
6
6
  import { n as isOtpComplete, t as computeOtpValidationErrors } from "./otp-D2k3PeSL.esm.js";
7
7
  //#region src/modules/email/emailServices.ts
8
8
  function getEmailServerFailureReason(error, invalidStatus) {