@incodetech/core 2.4.1-agentic.11 → 2.4.1-agentic.12

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 (216) hide show
  1. package/dist/{CameraCompositor-ppyMYVoY.esm.js → CameraCompositor-C7N1N61V.esm.js} +55 -1
  2. package/dist/{FaceDetectionProvider-2NzWDbV8.esm.js → FaceDetectionProvider-WtuJ6QBK.esm.js} +16 -11
  3. package/dist/{IWasmUtilCapability-BRn0wz8v.d.ts → IWasmUtilCapability-XcOtT1TP.d.ts} +5 -4
  4. package/dist/{MultipartRecordingProvider-CduV32Qa.esm.js → MultipartRecordingProvider-BtMQZEbg.esm.js} +1 -1
  5. package/dist/{StreamCanvasCapture-ixfy84ys.d.ts → StreamCanvasCapture-BnBfA6fb.d.ts} +24 -2
  6. package/dist/{StreamCanvasCapture-C9jtgBdT.esm.js → StreamCanvasCapture-CXd87trH.esm.js} +18 -3
  7. package/dist/{WasmUtilProvider-DdhAHHw4.esm.js → WasmUtilProvider-D5RMElzw.esm.js} +7 -0
  8. package/dist/{WorkerEncoderRecordingProvider-CsDED9UU.esm.js → WorkerEncoderRecordingProvider-BO7urYwT.esm.js} +1 -1
  9. package/dist/{addressSearch-Rxm1K67A.esm.js → addressSearch-BzAy6lhp.esm.js} +2 -4
  10. package/dist/ae-signature.esm.js +1 -1
  11. package/dist/antifraud.esm.js +2 -2
  12. package/dist/{antifraudManager-DKNOi9-z.esm.js → antifraudManager-Bw5nw5fh.esm.js} +3 -3
  13. package/dist/{antifraudStateMachine-BJ6PmCsw.esm.js → antifraudStateMachine-kOfsaAuT.esm.js} +2 -4
  14. package/dist/{api-CZpuJuZl.esm.js → api-DSZSaaWr.esm.js} +2 -0
  15. package/dist/{apiError-BamZ815u.esm.js → apiError-BDuL1wTs.esm.js} +1 -1
  16. package/dist/{attemptCarry-BecGGZK8.esm.js → attemptCarry-QFQkA3na.esm.js} +1 -1
  17. package/dist/authentication.d.ts +3 -3
  18. package/dist/authentication.esm.js +2 -2
  19. package/dist/{authenticationManager-yBVGiIf_.esm.js → authenticationManager-B0SioAdd.esm.js} +6 -6
  20. package/dist/{authenticationManager-DRaugLgH.d.ts → authenticationManager-eYcurNiS.d.ts} +1 -1
  21. package/dist/{authenticationStateMachine-DPqTOJPp.esm.js → authenticationStateMachine-n1OrhPTv.esm.js} +3 -3
  22. package/dist/{backCameraStream-DS1oDiUq.esm.js → backCameraStream-6qVHvj76.esm.js} +2 -2
  23. package/dist/{browser-pQZA35G2-DxIBykpe.esm.js → browser-pQZA35G2-CG3C-xGt.esm.js} +1 -1
  24. package/dist/calendarDate-DcqGuEht.esm.js +35 -0
  25. package/dist/camera-9yYDUOsO.d.ts +5 -0
  26. package/dist/{camera-E_Kcre4O.esm.js → camera-CJKApt0x.esm.js} +10 -3
  27. package/dist/camera.d.ts +2 -2
  28. package/dist/camera.esm.js +1 -1
  29. package/dist/certificate-issuance.esm.js +2 -2
  30. package/dist/{certificateIssuanceManager-Dxl9UwR0.esm.js → certificateIssuanceManager-DPT8E9zV.esm.js} +3 -3
  31. package/dist/{certificateIssuanceStateMachine-CM4q71h1.esm.js → certificateIssuanceStateMachine-BwDb3ezx.esm.js} +1 -1
  32. package/dist/consent.d.ts +1 -1
  33. package/dist/consent.esm.js +2 -2
  34. package/dist/{consentManager-B2F_VeAo.d.ts → consentManager-B0YKqYtZ.d.ts} +9 -9
  35. package/dist/{consentManager-BPocwpm2.esm.js → consentManager-DRMJ3O4r.esm.js} +3 -3
  36. package/dist/{consentStateMachine-DgiIcT9q.esm.js → consentStateMachine-Br0JbW7k.esm.js} +4 -7
  37. package/dist/cross-document-data-match.esm.js +1 -1
  38. package/dist/{crossDocumentDataMatchManager-BfA29Aji.esm.js → crossDocumentDataMatchManager-BIQ-SYcR.esm.js} +3 -4
  39. package/dist/curp-validation.d.ts +1 -1
  40. package/dist/curp-validation.esm.js +2 -2
  41. package/dist/{curpValidationManager-CbvBDoE1.esm.js → curpValidationManager-BKUDQ55W.esm.js} +3 -3
  42. package/dist/{curpValidationManager-Ci2iVuog.d.ts → curpValidationManager-DgUZySoq.d.ts} +1 -1
  43. package/dist/{curpValidationStateMachine-BQ8XK2Y3.esm.js → curpValidationStateMachine-BwUBkyyi.esm.js} +13 -14
  44. package/dist/custom-fields.esm.js +1 -1
  45. package/dist/custom-watchlist.esm.js +2 -2
  46. package/dist/{customFieldsManager-BRqSCR9R.esm.js → customFieldsManager-CPhONu5i.esm.js} +12 -16
  47. package/dist/{customWatchlistManager-Bd1ooIDB.esm.js → customWatchlistManager-cN57usIW.esm.js} +3 -3
  48. package/dist/{customWatchlistStateMachine-r8nGhyo1.esm.js → customWatchlistStateMachine-C1Xq1ugl.esm.js} +2 -4
  49. package/dist/{deepsightLoader-CEY2mSPM.esm.js → deepsightLoader-ClCQCdeL.esm.js} +5 -5
  50. package/dist/{desktopCameraElection-enVPfRsQ.esm.js → desktopCameraElection-btFONYx6.esm.js} +22 -10
  51. package/dist/device.d.ts +3 -3
  52. package/dist/device.esm.js +15 -15
  53. package/dist/document-capture.d.ts +2 -2
  54. package/dist/document-capture.esm.js +2 -2
  55. package/dist/document-signature.d.ts +123 -0
  56. package/dist/document-signature.esm.js +149 -0
  57. package/dist/{documentCaptureManager-C11k5BO-.esm.js → documentCaptureManager-5I3lKDVW.esm.js} +3 -3
  58. package/dist/{documentCaptureManager-BZBmcOKI.d.ts → documentCaptureManager-BkaPpoKy.d.ts} +1 -1
  59. package/dist/{documentCaptureStateMachine-g0gfL0_1.esm.js → documentCaptureStateMachine-jtQHasPA.esm.js} +7 -10
  60. package/dist/documentSignatureStateMachine-DKtU0H-F.esm.js +218 -0
  61. package/dist/dynamic-forms.esm.js +2 -2
  62. package/dist/{dynamicFormsManager-BmfCZ2zV.esm.js → dynamicFormsManager-B6Bv32wU.esm.js} +3 -3
  63. package/dist/{dynamicFormsStateMachine-B-eYytau.esm.js → dynamicFormsStateMachine-Kauq2oB-.esm.js} +10 -11
  64. package/dist/ekyb.d.ts +1 -1
  65. package/dist/ekyb.esm.js +2 -2
  66. package/dist/{ekybManager-BPaMfbgw.esm.js → ekybManager-wi135kG-.esm.js} +3 -3
  67. package/dist/{ekybStateMachine-C_lEw4I7.esm.js → ekybStateMachine-Vjb6_mFt.esm.js} +4 -6
  68. package/dist/ekyc-prefill.d.ts +1 -1
  69. package/dist/ekyc-prefill.esm.js +2 -2
  70. package/dist/ekyc.esm.js +3 -3
  71. package/dist/{ekycManager-nRT0rxei.esm.js → ekycManager-DWCL912J.esm.js} +3 -3
  72. package/dist/{ekycPrefillManager-DOTl3Y2w.d.ts → ekycPrefillManager-BcLhkpp8.d.ts} +4 -4
  73. package/dist/{ekycPrefillManager-CCtbmrFd.esm.js → ekycPrefillManager-C27Cu6rn.esm.js} +1 -1
  74. package/dist/{ekycPrefillStateMachine-XpxgCAoC.esm.js → ekycPrefillStateMachine-DqXvupSw.esm.js} +4 -6
  75. package/dist/{ekycRules-DXP2hqVw.esm.js → ekycRules-1hyjJ6bw.esm.js} +7 -4
  76. package/dist/{ekycStateMachine-nwJRel2s.esm.js → ekycStateMachine-DjiGyQtm.esm.js} +149 -13
  77. package/dist/{ekycUtils-FcqA6oU4.esm.js → ekycUtils-D9ui9Ztp.esm.js} +5 -0
  78. package/dist/electronic-signature.esm.js +1 -1
  79. package/dist/{electronicSignatureManager-M2O2VDks.esm.js → electronicSignatureManager-BHnxFx7u.esm.js} +8 -16
  80. package/dist/email.esm.js +2 -2
  81. package/dist/{emailManager-Co4jarT1.esm.js → emailManager-CfvR6pQN.esm.js} +3 -3
  82. package/dist/{emailStateMachine-CTEaYncs.esm.js → emailStateMachine-C4FouMzc.esm.js} +3 -5
  83. package/dist/{events-CP3yOzAl.esm.js → events-CsPmTidH.esm.js} +2 -2
  84. package/dist/events.d.ts +1 -0
  85. package/dist/events.esm.js +2 -2
  86. package/dist/extensibility.d.ts +14 -14
  87. package/dist/extensibility.esm.js +36 -36
  88. package/dist/face-match.esm.js +2 -2
  89. package/dist/{faceCaptureManagerFactory-3Or5qfbA.esm.js → faceCaptureManagerFactory-BjVIUTMM.esm.js} +5 -5
  90. package/dist/{faceCaptureManagerFactory-CRGajjZ4.d.ts → faceCaptureManagerFactory-DhDPxxp-.d.ts} +12 -6
  91. package/dist/{faceCaptureSetup-Cf87i0rT.esm.js → faceCaptureSetup-q33e6ah9.esm.js} +26 -15
  92. package/dist/{faceMatchManager-CGmNGbov.esm.js → faceMatchManager-CsPFaja4.esm.js} +3 -3
  93. package/dist/{faceMatchStateMachine-BuHt7kec.esm.js → faceMatchStateMachine-Co2S7iN8.esm.js} +8 -19
  94. package/dist/{feature-management-DG016L6E.esm.js → feature-management-BhRKAG--.esm.js} +3 -2
  95. package/dist/feature-management.esm.js +1 -1
  96. package/dist/field-comparison.esm.js +1 -1
  97. package/dist/{fieldComparisonManager-VgCU4X96.esm.js → fieldComparisonManager-Chn80m_n.esm.js} +4 -6
  98. package/dist/fiscal-qr.esm.js +1 -1
  99. package/dist/{fiscalQrManager-DOLq45ph.esm.js → fiscalQrManager-CpX6MOy_.esm.js} +6 -7
  100. package/dist/flow-events.d.ts +1 -1
  101. package/dist/flow.d.ts +6 -6
  102. package/dist/flow.esm.js +5 -5
  103. package/dist/{flowCompletionService-BpeAbbXc.esm.js → flowCompletionService-E_6ChYsV.esm.js} +2 -2
  104. package/dist/{flowServices-rDg1bAMs.esm.js → flowServices-C23o7MqO.esm.js} +10 -9
  105. package/dist/geolocation.esm.js +2 -2
  106. package/dist/{geolocationManager-T8m4lqvF.esm.js → geolocationManager-dgMVi0ed.esm.js} +3 -3
  107. package/dist/{geolocationStateMachine-NWmA1Dtn.esm.js → geolocationStateMachine-CCVd9xGh.esm.js} +6 -8
  108. package/dist/{getDeviceClass-DoIWuKI8.esm.js → getDeviceClass-Dcy9erbl.esm.js} +1 -1
  109. package/dist/government-validation.esm.js +2 -2
  110. package/dist/{governmentValidationManager-6JQQkzha.esm.js → governmentValidationManager-D2KGYDws.esm.js} +3 -3
  111. package/dist/{governmentValidationStateMachine-wBunpfQ9.esm.js → governmentValidationStateMachine-DRG-5jwQ.esm.js} +2 -4
  112. package/dist/home.d.ts +1 -1
  113. package/dist/home.esm.js +2 -2
  114. package/dist/http.esm.js +1 -1
  115. package/dist/id-ocr.d.ts +1 -1
  116. package/dist/id-ocr.esm.js +2 -2
  117. package/dist/id-selfie-flow.d.ts +2 -2
  118. package/dist/id-selfie-flow.esm.js +10 -10
  119. package/dist/id-verification.esm.js +2 -2
  120. package/dist/id.d.ts +3 -3
  121. package/dist/id.esm.js +3 -3
  122. package/dist/{idCaptureDefaults-Cjesf5i9.esm.js → idCaptureDefaults-BivjtJka.esm.js} +1 -1
  123. package/dist/{idCaptureManager-5-ReVgbB.esm.js → idCaptureManager-B_deOVCC.esm.js} +12 -14
  124. package/dist/{idCaptureManager-Cqx2y_fC.d.ts → idCaptureManager-DzAMWmRO.d.ts} +12 -5
  125. package/dist/{idCaptureServices-exB6I9lV.esm.js → idCaptureServices-BFCsusKB.esm.js} +17 -25
  126. package/dist/{idCaptureStateMachine-DQ14d3GR.esm.js → idCaptureStateMachine--CMATkG9.esm.js} +49 -56
  127. package/dist/{idOcrManager-im7VfJQi.esm.js → idOcrManager-C-_bzBSX.esm.js} +3 -3
  128. package/dist/{idOcrManager-C0C7lFGd.d.ts → idOcrManager-DflRx-_u.d.ts} +1 -1
  129. package/dist/{idOcrStateMachine-B832arAl.esm.js → idOcrStateMachine-BNtBkAXC.esm.js} +10 -7
  130. package/dist/{idVerificationManager-PMGM4hXY.esm.js → idVerificationManager-CdvGdtg2.esm.js} +3 -3
  131. package/dist/{idVerificationStateMachine-DeeugC00.esm.js → idVerificationStateMachine-mozw0CIg.esm.js} +2 -4
  132. package/dist/identity-reuse.esm.js +2 -2
  133. package/dist/identity-search.esm.js +3 -4
  134. package/dist/{identityReuseManager-CjFZ7WRa.esm.js → identityReuseManager-Z1Re4UGd.esm.js} +3 -3
  135. package/dist/{identityReuseStateMachine-CLFjPp13.esm.js → identityReuseStateMachine-C_3fSFCw.esm.js} +3 -7
  136. package/dist/{index-DxYNO94y.d.ts → index-C0WIMlJE.d.ts} +1 -1
  137. package/dist/{index-DM43R87x.d.ts → index-CNck5TLp.d.ts} +1 -1
  138. package/dist/index.d.ts +1 -1
  139. package/dist/index.esm.js +1 -1
  140. package/dist/{invokeOnCaptureCallback-lXP41N7b.esm.js → invokeOnCaptureCallback-DNQX9k5e.esm.js} +1 -1
  141. package/dist/kyb-checks.esm.js +2 -2
  142. package/dist/{kybChecksManager-CZfdCkLC.esm.js → kybChecksManager-D-mVF14T.esm.js} +1 -1
  143. package/dist/{kybChecksStateMachine-DkWxSU4L.esm.js → kybChecksStateMachine-BARZh9GN.esm.js} +5 -9
  144. package/dist/mandatory-consent.d.ts +2 -2
  145. package/dist/mandatory-consent.esm.js +2 -2
  146. package/dist/{mandatoryConsentManager-Dh3pBhOe.esm.js → mandatoryConsentManager-CKzzbbRe.esm.js} +3 -3
  147. package/dist/{mandatoryConsentManager-Bh1asNJh.d.ts → mandatoryConsentManager-D6tBmPDy.d.ts} +8 -8
  148. package/dist/{mandatoryConsentStateMachine-BjuI72HZ.esm.js → mandatoryConsentStateMachine-DpK7fg3E.esm.js} +4 -7
  149. package/dist/{mediaRecorderOptions-g1TwTlhd.esm.js → mediaRecorderOptions-Di_V9TnZ.esm.js} +1 -1
  150. package/dist/{multipartRecordingService-WgK8ieRI.esm.js → multipartRecordingService-CEtaAPz4.esm.js} +2 -2
  151. package/dist/{permissionGuards-D-4_VU7-.esm.js → permissionGuards-BJIaHxvI.esm.js} +1 -1
  152. package/dist/{permissionServices-DpccEnzE.esm.js → permissionServices-6Mdq1hDk.esm.js} +8 -5
  153. package/dist/phone.esm.js +2 -2
  154. package/dist/{phoneManager-rA7updqF.esm.js → phoneManager-D8-l6-0y.esm.js} +3 -3
  155. package/dist/{phoneServices-CFXcwCFr.esm.js → phoneServices-C9lFIuCM.esm.js} +3 -7
  156. package/dist/{phoneStateMachine-DKdY2Scx.esm.js → phoneStateMachine-CGLBgJJR.esm.js} +2 -2
  157. package/dist/{platform-aPh7gTWh.esm.js → platform-GIg4uPWe.esm.js} +1 -4
  158. package/dist/{processFaceMatch-B_DkDTE5.esm.js → processFaceMatch-B1Mhqkep.esm.js} +1 -1
  159. package/dist/qe-signature.esm.js +1 -1
  160. package/dist/{recordingService-DxiwS8TV.esm.js → recordingService-CLGnDCDl.esm.js} +7 -6
  161. package/dist/redirect-to-mobile.esm.js +2 -2
  162. package/dist/{redirectToMobileManager-DTB_pWuS.esm.js → redirectToMobileManager-Djb_daci.esm.js} +3 -3
  163. package/dist/{redirectToMobileStateMachine-nP9DM01_.esm.js → redirectToMobileStateMachine-BCyQFlpn.esm.js} +7 -17
  164. package/dist/{runChildModule-CXLcOcXN.esm.js → runChildModule-DF2c6TxC.esm.js} +2 -2
  165. package/dist/{sdkVersion-fqxsdqFZ.esm.js → sdkVersion-B5_kVegT.esm.js} +1 -1
  166. package/dist/selfie.d.ts +5 -5
  167. package/dist/selfie.esm.js +11 -11
  168. package/dist/{selfieErrorUtils-MOfYdGPz.esm.js → selfieErrorUtils-BVuv5qO7.esm.js} +1 -1
  169. package/dist/{selfieManager-DihwheJ6.d.ts → selfieManager-C5a6Fw6W.d.ts} +1 -1
  170. package/dist/{selfieManager-Dq8tIqGd.esm.js → selfieManager-Dnb5h3qV.esm.js} +6 -6
  171. package/dist/{selfieStateMachine-BZVDQB8R.esm.js → selfieStateMachine-BT69FLFb.esm.js} +3 -3
  172. package/dist/{session-C7x_iJ-p.esm.js → session-OCc4b-Iv.esm.js} +4 -4
  173. package/dist/session.d.ts +1 -1
  174. package/dist/session.esm.js +5 -5
  175. package/dist/{sessionInitializer-k-hKIBg8.esm.js → sessionInitializer-BUUpdBy6.esm.js} +11 -13
  176. package/dist/{setup-CpXbdA1X.d.ts → setup-BpD7lYSf.d.ts} +5 -4
  177. package/dist/{setup-BRbhjHiU.esm.js → setup-CJMohzTE.esm.js} +10 -10
  178. package/dist/signature.esm.js +2 -2
  179. package/dist/{signatureManager-BgAja97K.esm.js → signatureManager-B6dRieBV.esm.js} +3 -3
  180. package/dist/{signatureStateMachine-CVPmvU2p.esm.js → signatureStateMachine-DSW5-ZO0.esm.js} +3 -5
  181. package/dist/{stats-DoByUnTa.esm.js → stats-VqHbD5rn.esm.js} +1 -1
  182. package/dist/stats.esm.js +1 -1
  183. package/dist/{tri-CI2exudk.esm.js → tri-B5Yh5glk.esm.js} +2 -2
  184. package/dist/tri.d.ts +1 -1
  185. package/dist/tri.esm-DYdFtcDH.esm.js +3105 -0
  186. package/dist/tri.esm.js +1 -1
  187. package/dist/{trueSightService-DhW2O8mB.esm.js → trueSightService-D9D2IdEj.esm.js} +6 -7
  188. package/dist/trust-graph.esm.js +2 -2
  189. package/dist/{types-Ddc4Tr_f.d.ts → types-B2DGXHe6.d.ts} +2 -0
  190. package/dist/{types-Cpdum4vi.d.ts → types-BBHnkH6S.d.ts} +4 -4
  191. package/dist/types-BNkzXOXE.d.ts +45 -0
  192. package/dist/{types-DJPU3W2M.d.ts → types-BkWUNheX.d.ts} +1 -1
  193. package/dist/types-C2uJrJrS.d.ts +6 -0
  194. package/dist/{types-DYYMdAGv.esm.js → types-CBQN04Rh.esm.js} +2 -1
  195. package/dist/{types-CyNndVAT.d.ts → types-CaVUb1DL.d.ts} +1 -1
  196. package/dist/{types-DFP7eSle.d.ts → types-Crg7oL-l.d.ts} +1 -1
  197. package/dist/{types-9wlf1-GE.d.ts → types-x5MQKskR.d.ts} +4 -2
  198. package/dist/video-selfie.d.ts +2 -2
  199. package/dist/video-selfie.esm.js +9 -9
  200. package/dist/{videoSelfieCameraWarmer-YwO_uP-b.esm.js → videoSelfieCameraWarmer-CYEHPKK6.esm.js} +9 -9
  201. package/dist/{videoSelfieStepDetector-DRrh4P0A.d.ts → videoSelfieStepDetector-DGXi_TXk.d.ts} +18 -8
  202. package/dist/wasm.d.ts +1 -1
  203. package/dist/wasm.esm.js +1 -1
  204. package/dist/{wasmDsFlagSync-D_6e8W62.esm.js → wasmDsFlagSync-BNttW5Sm.esm.js} +1 -1
  205. package/dist/watchlist-for-business.esm.js +2 -2
  206. package/dist/watchlist.esm.js +2 -2
  207. package/dist/{watchlistForBusinessManager-BH6M4kqA.esm.js → watchlistForBusinessManager-CfLnsL8p.esm.js} +3 -3
  208. package/dist/{watchlistForBusinessStateMachine-BMWm5mcP.esm.js → watchlistForBusinessStateMachine-EzlC_4I4.esm.js} +9 -6
  209. package/dist/{watchlistManager-BDaVjzLW.esm.js → watchlistManager-CGXbemnp.esm.js} +3 -3
  210. package/dist/{watchlistStateMachine-Cx-6QAvu.esm.js → watchlistStateMachine-CsNEmiXL.esm.js} +2 -4
  211. package/dist/workflow.d.ts +1 -1
  212. package/dist/workflow.esm.js +40 -38
  213. package/package.json +6 -1
  214. package/dist/camera-9wWD-pwg.d.ts +0 -4
  215. package/dist/tri.esm-CxLWmTZk.esm.js +0 -2287
  216. package/dist/types-CE1jkHw3.d.ts +0 -6
@@ -0,0 +1,123 @@
1
+ import { i as ActorRefFrom } from "./spawn-COZKetCS.js";
2
+ import { t as Manager } from "./Manager-DufwKlav.js";
3
+ import "./Actor-DqjOqDfU.js";
4
+ import { i as SignatureMethod, n as SignatureDocument, r as SignatureDocumentFormat, t as DocumentSignatureConfig } from "./types-BNkzXOXE.js";
5
+ //#region src/modules/document-signature/documentSignatureStateMachine.d.ts
6
+ type DocumentSignatureErrorCode = 'NO_DOCUMENTS' | 'LOAD_FAILED';
7
+ declare const documentSignatureMachine: any;
8
+ type DocumentSignatureMachine = typeof documentSignatureMachine;
9
+ //#endregion
10
+ //#region src/modules/document-signature/documentSignatureActor.d.ts
11
+ type CreateDocumentSignatureActorOptions = {
12
+ config: DocumentSignatureConfig;
13
+ };
14
+ type DocumentSignatureActor = ActorRefFrom<DocumentSignatureMachine>;
15
+ //#endregion
16
+ //#region src/modules/document-signature/documentSignatureManager.d.ts
17
+ /** Fields shared by every screen that shows the documents. */
18
+ type DocumentSignatureReadingFields = {
19
+ title: string | undefined;
20
+ subtitle: string | undefined;
21
+ consentText: string | undefined;
22
+ documents: SignatureDocument[];
23
+ /** Documents the user has scrolled to the end, by id. */
24
+ reachedEndIds: string[];
25
+ /** True when every document has been scrolled to its end. */
26
+ allRead: boolean;
27
+ /** True when the Sign button is enabled. */
28
+ canSign: boolean;
29
+ };
30
+ type DocumentSignatureSheetFields = {
31
+ method: SignatureMethod;
32
+ typedName: string;
33
+ maxTypedNameLength: number;
34
+ canSubmit: boolean;
35
+ };
36
+ type DocumentSignatureState = {
37
+ status: 'idle';
38
+ } | {
39
+ status: 'loading';
40
+ } | ({
41
+ status: 'reading';
42
+ } & DocumentSignatureReadingFields) | ({
43
+ status: 'signing';
44
+ } & DocumentSignatureReadingFields & DocumentSignatureSheetFields) | ({
45
+ status: 'submitting';
46
+ } & DocumentSignatureReadingFields & DocumentSignatureSheetFields) | {
47
+ status: 'signed';
48
+ documents: SignatureDocument[];
49
+ /** True when the screen shows download links and waits for `continue()`. */
50
+ hasDownloads: boolean;
51
+ } | {
52
+ status: 'signFailed';
53
+ } | {
54
+ status: 'finished';
55
+ } | {
56
+ status: 'error';
57
+ error: DocumentSignatureErrorCode;
58
+ };
59
+ declare function createDocumentSignatureManager(options: CreateDocumentSignatureActorOptions): Manager<DocumentSignatureState> & {
60
+ /** Loads the session's documents. */
61
+ load(): void;
62
+ /**
63
+ * Reports that a document's end is on screen. Repeated calls are ignored.
64
+ * Pass `scrolled: true` when the user scrolled there: then reaching the last
65
+ * end opens the sign sheet.
66
+ */
67
+ reachedEnd(documentId: string, scrolled?: boolean): void;
68
+ /** Opens the sign sheet. Ignored until `canSign` is true. */
69
+ openSign(): void;
70
+ /** Closes the sign sheet without signing. */
71
+ closeSign(): void;
72
+ /** Switches between drawing and typing the name. */
73
+ selectMethod(method: SignatureMethod): void;
74
+ /** Reports the total stroke length, in CSS pixels, of the drawn signature. */
75
+ setDrawing(inkLength: number): void;
76
+ /** Updates the typed name. */
77
+ setTypedName(typedName: string): void;
78
+ /**
79
+ * Signs every document. For a drawn signature, pass the PNG as base64
80
+ * without the `data:` prefix. For a typed name, call it without arguments.
81
+ */
82
+ submit(signatureBase64?: string): void;
83
+ /** After a failed sign or a failed load, loads the documents again. */
84
+ retry(): void;
85
+ /** Leaves the signed screen and finishes the module. Only needed when it shows download links. */
86
+ continue(): void;
87
+ };
88
+ /**
89
+ * Creates a Document Signature manager from a pre-built actor.
90
+ * Use it when you override the machine with `.provide()`.
91
+ */
92
+ declare function createDocumentSignatureManagerFromActor(actor: DocumentSignatureActor): Manager<DocumentSignatureState> & {
93
+ /** Loads the session's documents. */
94
+ load(): void;
95
+ /**
96
+ * Reports that a document's end is on screen. Repeated calls are ignored.
97
+ * Pass `scrolled: true` when the user scrolled there: then reaching the last
98
+ * end opens the sign sheet.
99
+ */
100
+ reachedEnd(documentId: string, scrolled?: boolean): void;
101
+ /** Opens the sign sheet. Ignored until `canSign` is true. */
102
+ openSign(): void;
103
+ /** Closes the sign sheet without signing. */
104
+ closeSign(): void;
105
+ /** Switches between drawing and typing the name. */
106
+ selectMethod(method: SignatureMethod): void;
107
+ /** Reports the total stroke length, in CSS pixels, of the drawn signature. */
108
+ setDrawing(inkLength: number): void;
109
+ /** Updates the typed name. */
110
+ setTypedName(typedName: string): void;
111
+ /**
112
+ * Signs every document. For a drawn signature, pass the PNG as base64
113
+ * without the `data:` prefix. For a typed name, call it without arguments.
114
+ */
115
+ submit(signatureBase64?: string): void;
116
+ /** After a failed sign or a failed load, loads the documents again. */
117
+ retry(): void;
118
+ /** Leaves the signed screen and finishes the module. Only needed when it shows download links. */
119
+ continue(): void;
120
+ };
121
+ type DocumentSignatureManager = ReturnType<typeof createDocumentSignatureManager>;
122
+ //#endregion
123
+ export { type DocumentSignatureActor, type DocumentSignatureConfig, type DocumentSignatureErrorCode, type DocumentSignatureManager, type DocumentSignatureReadingFields, type DocumentSignatureSheetFields, type DocumentSignatureState, type SignatureDocument, type SignatureDocumentFormat, type SignatureMethod, createDocumentSignatureManager, createDocumentSignatureManagerFromActor, documentSignatureMachine };
@@ -0,0 +1,149 @@
1
+ import { n as eventModuleNames } from "./types-CBQN04Rh.esm.js";
2
+ import { t as createManagerInstrumentation } from "./events-CsPmTidH.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-DKtU0H-F.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 };
@@ -1,9 +1,9 @@
1
- import { n as eventModuleNames } from "./types-DYYMdAGv.esm.js";
2
- import { t as createManagerInstrumentation } from "./events-CP3yOzAl.esm.js";
1
+ import { n as eventModuleNames } from "./types-CBQN04Rh.esm.js";
2
+ import { t as createManagerInstrumentation } from "./events-CsPmTidH.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-g0gfL0_1.esm.js";
6
+ import { n as DEFAULT_MAX_FILE_SIZE, r as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-jtQHasPA.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();
@@ -3,7 +3,7 @@ import "./xstate.cjs-D6Ur0X1F.js";
3
3
  import { t as Manager } from "./Manager-DufwKlav.js";
4
4
  import "./Actor-DqjOqDfU.js";
5
5
  import { n as PermissionStatus, t as PermissionResult } from "./types-BEwVKkLJ.js";
6
- import { a as DocumentCaptureErrorCode, c as DocumentType, d as FinalizeDocumentResponse, i as DocumentCaptureContext, l as DocumentUploadResponse, o as DocumentCaptureInput, r as DocumentCaptureConfig, s as DocumentCaptureNextPageType, t as CapturedDocument, u as DocumentUploadStatus } from "./types-CyNndVAT.js";
6
+ import { a as DocumentCaptureErrorCode, c as DocumentType, d as FinalizeDocumentResponse, i as DocumentCaptureContext, l as DocumentUploadResponse, o as DocumentCaptureInput, r as DocumentCaptureConfig, s as DocumentCaptureNextPageType, t as CapturedDocument, u as DocumentUploadStatus } from "./types-CaVUb1DL.js";
7
7
  //#region src/modules/document-capture/documentCaptureStateMachine.d.ts
8
8
  declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
9
9
  type: "CAPTURE";
@@ -1,11 +1,11 @@
1
- import { t as api, u as endpoints } from "./api-CZpuJuZl.esm.js";
1
+ import { t as api, u as endpoints } from "./api-DSZSaaWr.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
- import { a as stopCameraStream } from "./camera-E_Kcre4O.esm.js";
5
- import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-DpccEnzE.esm.js";
6
- import { r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-D-4_VU7-.esm.js";
7
- import { t as carryAttempts } from "./attemptCarry-BecGGZK8.esm.js";
8
- import { n as getBackCameraStream } from "./backCameraStream-DS1oDiUq.esm.js";
4
+ import { a as stopCameraStream } from "./camera-CJKApt0x.esm.js";
5
+ import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-6Mdq1hDk.esm.js";
6
+ import { r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-BJIaHxvI.esm.js";
7
+ import { t as carryAttempts } from "./attemptCarry-QFQkA3na.esm.js";
8
+ import { n as getBackCameraStream } from "./backCameraStream-6qVHvj76.esm.js";
9
9
  //#region src/modules/document-capture/types.ts
10
10
  const PROCESSING_TYPE_MAP = {
11
11
  processV5CLogbook: "v5cMultiPageLogbook",
@@ -109,7 +109,6 @@ async function uploadDocumentCapture({ file, base64Image, sendBase64 = false, pr
109
109
  signal,
110
110
  onUploadProgress: onProgress
111
111
  });
112
- if (!response.ok) throw new Error(`Document upload failed: ${response.status}`);
113
112
  if (!(response.data.success || response.data.status === "SUCCESS" || response.data.status === "ADD_NEXT_PAGE" || response.data.status === "OPTIONAL_PAGE_CAPTURE")) throw new DocumentUploadRejectedError("Document upload rejected by server", response.data.status);
114
113
  return response.data;
115
114
  }
@@ -120,9 +119,7 @@ function resolveMultiPageDocumentType(processingType) {
120
119
  async function finalizeDocument({ processingType, signal }) {
121
120
  const type = resolveMultiPageDocumentType(processingType);
122
121
  if (!type) throw new Error(`finalizeDocument only supports multi-page types (${MULTI_PAGE_TYPES.join(", ")})`);
123
- const response = await api.post(endpoints.finalizeDocument, { type }, { signal });
124
- if (!response.ok) throw new Error(`Document finalize failed: ${response.status}`);
125
- const data = response.data;
122
+ const data = (await api.post(endpoints.finalizeDocument, { type }, { signal })).data;
126
123
  if (!data) throw new Error("Document finalize rejected by server");
127
124
  if (!(data.success || data.status === "SUCCESS")) throw new DocumentUploadRejectedError(`Document finalize rejected by server (status: ${data.status ?? "unknown"})`, data.status);
128
125
  return data;
@@ -0,0 +1,218 @@
1
+ import { n as eventModuleNames, v as addEvent } from "./types-CBQN04Rh.esm.js";
2
+ import { t as api, u as endpoints } from "./api-DSZSaaWr.esm.js";
3
+ import "./events-CsPmTidH.esm.js";
4
+ import { i as toIncodeApiError } from "./apiError-BDuL1wTs.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
+ setInkLength: assign(({ event }) => ({ inkLength: event.inkLength })),
101
+ setTypedName: assign(({ event }) => ({ typedName: event.typedName })),
102
+ setSignatureImage: assign(({ event }) => ({ signatureBase64: event.signatureBase64 })),
103
+ setNoDocumentsError: assign({ error: () => "NO_DOCUMENTS" }),
104
+ setLoadError: assign({ error: () => "LOAD_FAILED" })
105
+ },
106
+ guards: {
107
+ outputIsSigned: ({ event }) => isSigned(outputOf(event)),
108
+ outputIsEmpty: ({ event }) => outputOf(event).length === 0,
109
+ isFirstReachedEnd: ({ context, event }) => isFirstReachedEnd(context, event),
110
+ finishesReading: ({ context, event }) => event.scrolled === true && isFirstReachedEnd(context, event) && context.documents.every((d) => d.documentId === event.documentId || context.reachedEndIds.includes(d.documentId)),
111
+ hasNoDownloads: ({ context }) => !hasDownloads(context),
112
+ canOpenSign: ({ context }) => canOpenSign(context),
113
+ isTypeMethod: ({ event }) => event.method === "type",
114
+ canSubmit: ({ context, event }) => canSubmitSignature(context) && (context.method === "type" || !!event.signatureBase64)
115
+ }
116
+ }).createMachine({
117
+ id: "documentSignature",
118
+ initial: "idle",
119
+ context: ({ input }) => ({
120
+ config: input.config,
121
+ documents: [],
122
+ reachedEndIds: [],
123
+ method: "draw",
124
+ inkLength: 0,
125
+ typedName: "",
126
+ signatureBase64: void 0,
127
+ error: void 0
128
+ }),
129
+ states: {
130
+ idle: { on: { LOAD: "loading" } },
131
+ loading: { invoke: {
132
+ src: "getDocuments",
133
+ onDone: [
134
+ {
135
+ target: "signed",
136
+ guard: "outputIsSigned",
137
+ actions: "setDocuments"
138
+ },
139
+ {
140
+ target: "error",
141
+ guard: "outputIsEmpty",
142
+ actions: "setNoDocumentsError"
143
+ },
144
+ {
145
+ target: "reading",
146
+ actions: "setDocuments"
147
+ }
148
+ ],
149
+ onError: {
150
+ target: "error",
151
+ actions: "setLoadError"
152
+ }
153
+ } },
154
+ reading: { on: {
155
+ DOCUMENT_REACHED_END: [{
156
+ target: "signing",
157
+ guard: "finishesReading",
158
+ actions: [
159
+ "addReachedEnd",
160
+ "trackReachedEnd",
161
+ "resetSignatureInput"
162
+ ]
163
+ }, {
164
+ guard: "isFirstReachedEnd",
165
+ actions: ["addReachedEnd", "trackReachedEnd"]
166
+ }],
167
+ OPEN_SIGN: {
168
+ target: "signing",
169
+ guard: "canOpenSign",
170
+ actions: "resetSignatureInput"
171
+ }
172
+ } },
173
+ signing: { on: {
174
+ CLOSE_SIGN: "reading",
175
+ SELECT_METHOD: [{
176
+ guard: "isTypeMethod",
177
+ actions: ["setMethod", "trackTypedSelected"]
178
+ }, { actions: "setMethod" }],
179
+ DRAWING_CHANGED: { actions: "setInkLength" },
180
+ TYPED_NAME_CHANGED: { actions: "setTypedName" },
181
+ SUBMIT: {
182
+ target: "submitting",
183
+ guard: "canSubmit",
184
+ actions: "setSignatureImage"
185
+ }
186
+ } },
187
+ submitting: { invoke: {
188
+ src: "signDocuments",
189
+ input: ({ context }) => {
190
+ const documentIds = context.documents.map((d) => d.documentId);
191
+ return context.method === "type" ? {
192
+ documentIds,
193
+ typedName: context.typedName.trim()
194
+ } : {
195
+ documentIds,
196
+ signatureBase64: context.signatureBase64 ?? ""
197
+ };
198
+ },
199
+ onDone: {
200
+ target: "signed",
201
+ actions: "setSignedDocuments"
202
+ },
203
+ onError: "signFailed"
204
+ } },
205
+ signFailed: { on: { RETRY: "loading" } },
206
+ signed: {
207
+ after: { [SIGNED_DISPLAY_MS]: {
208
+ target: "finished",
209
+ guard: "hasNoDownloads"
210
+ } },
211
+ on: { CONTINUE: "finished" }
212
+ },
213
+ finished: { type: "final" },
214
+ error: { on: { RETRY: "loading" } }
215
+ }
216
+ });
217
+ //#endregion
218
+ 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-B-eYytau.esm.js";
2
- import { t as createDynamicFormsManager } from "./dynamicFormsManager-BmfCZ2zV.esm.js";
1
+ import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-Kauq2oB-.esm.js";
2
+ import { t as createDynamicFormsManager } from "./dynamicFormsManager-B6Bv32wU.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-CP3yOzAl.esm.js";
1
+ import { n as eventModuleNames } from "./types-CBQN04Rh.esm.js";
2
+ import { t as createManagerInstrumentation } from "./events-CsPmTidH.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-B-eYytau.esm.js";
6
+ import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-Kauq2oB-.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,7 +1,8 @@
1
- import { t as api, u as endpoints } from "./api-CZpuJuZl.esm.js";
2
- import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-BamZ815u.esm.js";
1
+ import { t as api, u as endpoints } from "./api-DSZSaaWr.esm.js";
2
+ import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-BDuL1wTs.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
+ import { n as calendarDateError } from "./calendarDate-DcqGuEht.esm.js";
5
6
  import { t as isoDateToMs } from "./dateUtils-CvG0FvK8.esm.js";
6
7
  //#region src/modules/dynamic-forms/dynamicFormsFields.ts
7
8
  function getEffectiveType(question) {
@@ -38,7 +39,9 @@ const VALIDATORS = {
38
39
  formatViaAnswerValidity: ({ questionId, answerValidity }, rule) => answerValidity[questionId] === false ? rule.errorKey : void 0
39
40
  };
40
41
  const normalizeValue = (value) => typeof value === "string" ? value : String(value ?? "");
41
- function evaluateRules(input, rules) {
42
+ function evaluateRules(input, rules, inputType) {
43
+ const dateError = inputType === "DATE" ? calendarDateError(input.value.trim()) : void 0;
44
+ if (dateError) return dateError;
42
45
  for (const rule of rules) {
43
46
  const error = rule.type === "required" ? VALIDATORS.required(input) : VALIDATORS.formatViaAnswerValidity(input, rule);
44
47
  if (error) return error;
@@ -51,7 +54,7 @@ function validateScreenForm(answers, fields, answerValidity) {
51
54
  value: normalizeValue(answers[field.questionId]),
52
55
  questionId: field.questionId,
53
56
  answerValidity
54
- }, field.validation);
57
+ }, field.validation, field.inputType);
55
58
  if (error) errors[field.questionId] = error;
56
59
  return errors;
57
60
  }, {});
@@ -64,15 +67,13 @@ function validateScreenField(answers, questionId, fields, answerValidity) {
64
67
  value: normalizeValue(answers[questionId]),
65
68
  questionId,
66
69
  answerValidity
67
- }, field.validation);
70
+ }, field.validation, field.inputType);
68
71
  }
69
72
  //#endregion
70
73
  //#region src/modules/dynamic-forms/dynamicFormsServices.ts
71
74
  async function fetchForms(flowId, signal) {
72
75
  const url = `${endpoints.moduleConfig}?id=${encodeURIComponent(flowId)}&moduleKey=DYNAMIC_FORMS`;
73
- const res = await api.get(url, { signal });
74
- if (!res.ok) throw new Error(`GET ${endpoints.moduleConfig} failed: ${res.status} ${res.statusText}`);
75
- return res.data;
76
+ return (await api.get(url, { signal })).data;
76
77
  }
77
78
  /**
78
79
  * Fetches Form Pre-fill values resolved from the interview. Keyed by session
@@ -80,9 +81,7 @@ async function fetchForms(flowId, signal) {
80
81
  * `prefillSource`. A failure throws — the machine degrades to a blank form.
81
82
  */
82
83
  async function fetchPrefill(signal) {
83
- const res = await api.get(endpoints.dynamicFormsPrefill, { signal });
84
- if (!res.ok) throw new Error(`GET ${endpoints.dynamicFormsPrefill} failed: ${res.status} ${res.statusText}`);
85
- return res.data;
84
+ return (await api.get(endpoints.dynamicFormsPrefill, { signal })).data;
86
85
  }
87
86
  async function submitFormAnswer(params, signal) {
88
87
  try {
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-C_lEw4I7.esm.js";
3
- import { t as createEkybManager } from "./ekybManager-BPaMfbgw.esm.js";
2
+ import { t as ekybMachine } from "./ekybStateMachine-Vjb6_mFt.esm.js";
3
+ import { t as createEkybManager } from "./ekybManager-wi135kG-.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-CP3yOzAl.esm.js";
1
+ import { n as eventModuleNames } from "./types-CBQN04Rh.esm.js";
2
+ import { t as createManagerInstrumentation } from "./events-CsPmTidH.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-C_lEw4I7.esm.js";
6
+ import { t as ekybMachine } from "./ekybStateMachine-Vjb6_mFt.esm.js";
7
7
  //#region src/modules/ekyb/ekybActor.ts
8
8
  /**
9
9
  * Creates and starts an eKYB actor.