@incodetech/core 2.5.0-agentic → 2.5.0-agentic.2

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 (224) hide show
  1. package/dist/{FaceDetectionProvider-Dv9iXub0.esm.js → FaceDetectionProvider-ClZEDaLF.esm.js} +9 -9
  2. package/dist/{IIdCaptureCapability-CAxToGns.d.ts → IIdCaptureCapability-BRAZQtkM.d.ts} +1 -0
  3. package/dist/{MotionSensorProvider-X4_2eBGd.esm.js → MotionSensorProvider-BAGydZPH.esm.js} +5 -0
  4. package/dist/{WasmUtilProvider-DVFDFlIL.esm.js → WasmUtilProvider-C4x5gc1c.esm.js} +2 -2
  5. package/dist/{definitionSource-B-Z2EgJJ.esm.js → addressSearch-DBJeg_g3.esm.js} +76 -9
  6. package/dist/ae-signature.esm.js +1 -1
  7. package/dist/{phoneFormat-C3q0Ukh4.esm.js → allowedCharacters-Bnir--CN.esm.js} +1 -11
  8. package/dist/antifraud.esm.js +2 -2
  9. package/dist/{antifraudManager-BI2zr7YX.esm.js → antifraudManager-DRMBLSh7.esm.js} +3 -3
  10. package/dist/{antifraudStateMachine-TWUu8wLN.esm.js → antifraudStateMachine-Bi0m60oV.esm.js} +1 -1
  11. package/dist/{api-BNxrW8xK.esm.js → api-B58edv6M.esm.js} +0 -1
  12. package/dist/{apiError-BAfdBGxH.esm.js → apiError-CWjo9dzH.esm.js} +1 -1
  13. package/dist/{attemptCarry-DWM8lV9V.esm.js → attemptCarry-CxiYlUAO.esm.js} +1 -1
  14. package/dist/authentication.d.ts +3 -3
  15. package/dist/authentication.esm.js +2 -2
  16. package/dist/{authenticationManager-BJElkTsj.d.ts → authenticationManager-CkD0JR7Q.d.ts} +1 -1
  17. package/dist/{authenticationManager-DFzByAYo.esm.js → authenticationManager-D_qFuB3y.esm.js} +6 -6
  18. package/dist/{authenticationStateMachine-CKTOhwwc.esm.js → authenticationStateMachine-DJJWTDZS.esm.js} +3 -3
  19. package/dist/{browser-pQZA35G2-CG3C-xGt.esm.js → browser-pQZA35G2-B4Dwja1e.esm.js} +1 -1
  20. package/dist/{calendarDate-DcqGuEht.esm.js → calendarDate-D2zWfUlA.esm.js} +1 -1
  21. package/dist/camera.esm.js +1 -1
  22. package/dist/certificate-issuance.esm.js +2 -2
  23. package/dist/{certificateIssuanceManager-P44yBRop.esm.js → certificateIssuanceManager-Ctj6AJC7.esm.js} +3 -3
  24. package/dist/{certificateIssuanceStateMachine-BPBrILt6.esm.js → certificateIssuanceStateMachine-DDqN9kvL.esm.js} +1 -1
  25. package/dist/{cnpj-Bl_olpdX.esm.js → cnpj-CVq3vL39.esm.js} +1 -9
  26. package/dist/cnpj-D5cxwIe-.esm.js +9 -0
  27. package/dist/consent.d.ts +1 -1
  28. package/dist/consent.esm.js +2 -2
  29. package/dist/{consentManager-Duzd8paN.d.ts → consentManager-B0YKqYtZ.d.ts} +5 -5
  30. package/dist/{consentManager-D43w2ms-.esm.js → consentManager-CyoeiABc.esm.js} +3 -3
  31. package/dist/{consentStateMachine-CLK8PfM4.esm.js → consentStateMachine-BTUrAslr.esm.js} +1 -1
  32. package/dist/cross-document-data-match.esm.js +1 -1
  33. package/dist/{crossDocumentDataMatchManager-Cag_bcyW.esm.js → crossDocumentDataMatchManager-cmQmp7Bi.esm.js} +3 -3
  34. package/dist/curp-validation.d.ts +1 -1
  35. package/dist/curp-validation.esm.js +2 -2
  36. package/dist/{curpValidationManager-C6WmQToS.esm.js → curpValidationManager-EW44fVpH.esm.js} +3 -3
  37. package/dist/{curpValidationManager-CmL52FU8.d.ts → curpValidationManager-HOidAKvT.d.ts} +1 -1
  38. package/dist/{curpValidationStateMachine-BbJ4YAzE.esm.js → curpValidationStateMachine-BFkt90Zs.esm.js} +3 -3
  39. package/dist/custom-fields.esm.js +1 -1
  40. package/dist/custom-watchlist.esm.js +2 -2
  41. package/dist/{customFieldsManager-BBy6X9nh.esm.js → customFieldsManager-DPMBJrcH.esm.js} +4 -4
  42. package/dist/{customWatchlistManager-CtBMy2EF.esm.js → customWatchlistManager-DiYpPjZx.esm.js} +3 -3
  43. package/dist/{customWatchlistStateMachine-SS2ssNCg.esm.js → customWatchlistStateMachine-D7VxQggF.esm.js} +1 -1
  44. package/dist/{deepsightCaptureConfig-Nm_K8twx.esm.js → deepsightCaptureConfig-XPx0BN30.esm.js} +2 -2
  45. package/dist/{deepsightLoader-BInnND1H.esm.js → deepsightLoader-Bvs8HYaK.esm.js} +7 -7
  46. package/dist/definitionSource-B9WTvQb9.esm.js +30 -0
  47. package/dist/{desktopCameraElection-JNBOXqvK.esm.js → desktopCameraElection-CdrLiJTn.esm.js} +8 -8
  48. package/dist/document-capture.esm.js +2 -2
  49. package/dist/document-signature.esm.js +3 -3
  50. package/dist/{documentCaptureManager-CGDtkfWj.esm.js → documentCaptureManager-SRG6YEMh.esm.js} +3 -3
  51. package/dist/{documentCaptureStateMachine-flAt9D4q.esm.js → documentCaptureStateMachine-Bh0uyfGq.esm.js} +4 -4
  52. package/dist/{documentSignatureStateMachine-DrRyICFT.esm.js → documentSignatureStateMachine-oqU3EPca.esm.js} +4 -4
  53. package/dist/dynamic-forms.esm.js +2 -2
  54. package/dist/{dynamicFormsManager-CxLq2KzT.esm.js → dynamicFormsManager-YGL7Avp-.esm.js} +3 -3
  55. package/dist/{dynamicFormsStateMachine-By-maT_4.esm.js → dynamicFormsStateMachine-BE_WfmVE.esm.js} +3 -3
  56. package/dist/ekyb.d.ts +4 -4
  57. package/dist/ekyb.esm.js +3 -3
  58. package/dist/{ekybManager-CE19Pcdb.esm.js → ekybManager-35NxvxZK.esm.js} +3 -3
  59. package/dist/{ekybManager-BflWuTe4.d.ts → ekybManager-Cjk8pQX0.d.ts} +2 -2
  60. package/dist/{ekybStateMachine-q7JQ-x9l.esm.js → ekybStateMachine-BD4zpC3O.esm.js} +141 -10
  61. package/dist/{ekybUtils-Z9MhFAer.esm.js → ekybUtils-Dl0MU-ib.esm.js} +23 -1
  62. package/dist/ekyc-prefill.d.ts +5 -5
  63. package/dist/ekyc-prefill.esm.js +2 -2
  64. package/dist/ekyc.d.ts +3 -3
  65. package/dist/ekyc.esm.js +3 -3
  66. package/dist/{ekycManager-p3uenUEi.esm.js → ekycManager-D2K8AaMV.esm.js} +3 -3
  67. package/dist/{ekycManager-BKVQazAb.d.ts → ekycManager-DusmB-4j.d.ts} +2 -2
  68. package/dist/{ekycPrefillManager-BcLhkpp8.d.ts → ekycPrefillManager-BwmPXfhY.d.ts} +12 -12
  69. package/dist/{ekycPrefillManager-gPX3XE7u.esm.js → ekycPrefillManager-CxzjSch2.esm.js} +6 -7
  70. package/dist/ekycPrefillStateMachine-x6skDqhq.esm.js +1289 -0
  71. package/dist/{ekycStateMachine-D0NAHzS7.esm.js → ekycStateMachine-6EKndBd7.esm.js} +740 -230
  72. package/dist/{ekycUtils-DEvtEyBI.esm.js → ekycUtils-C6HZB46m.esm.js} +37 -6
  73. package/dist/electronic-signature.esm.js +1 -1
  74. package/dist/{electronicSignatureManager-C1M-Yxf2.esm.js → electronicSignatureManager-BYJHywZK.esm.js} +4 -4
  75. package/dist/email.esm.js +2 -2
  76. package/dist/{emailManager-DWnhEsUf.esm.js → emailManager-BBdRYLtH.esm.js} +3 -3
  77. package/dist/{emailStateMachine--T9PHflK.esm.js → emailStateMachine-DO7lWYvn.esm.js} +2 -2
  78. package/dist/{events-ChMS-UzR.esm.js → events-PUWyizJn.esm.js} +2 -2
  79. package/dist/events.d.ts +0 -3
  80. package/dist/events.esm.js +2 -2
  81. package/dist/extensibility.d.ts +15 -15
  82. package/dist/extensibility.esm.js +36 -36
  83. package/dist/face-match.esm.js +2 -2
  84. package/dist/{faceCaptureManagerFactory-18QW0lmV.esm.js → faceCaptureManagerFactory-CYr2rVEj.esm.js} +6 -6
  85. package/dist/{faceCaptureManagerFactory-CHqmyOjM.d.ts → faceCaptureManagerFactory-D1EJw36F.d.ts} +3 -3
  86. package/dist/{faceCaptureSetup-CFToXwHy.esm.js → faceCaptureSetup-DadLKnMf.esm.js} +20 -12
  87. package/dist/{faceMatchManager-DIStK4qi.esm.js → faceMatchManager-nBvS9z0o.esm.js} +3 -3
  88. package/dist/{faceMatchStateMachine-DagrRdo2.esm.js → faceMatchStateMachine-48O8j_Lx.esm.js} +2 -2
  89. package/dist/{feature-management-BlscKbeV.esm.js → feature-management-CUzbPq54.esm.js} +1 -1
  90. package/dist/feature-management.esm.js +1 -1
  91. package/dist/field-comparison.esm.js +1 -1
  92. package/dist/{fieldComparisonManager-BnWBtMN7.esm.js → fieldComparisonManager-B1ipvtnp.esm.js} +3 -3
  93. package/dist/fiscal-qr.esm.js +1 -1
  94. package/dist/{fiscalQrManager-BxXaLhin.esm.js → fiscalQrManager-yecjuXV4.esm.js} +3 -3
  95. package/dist/flow-events.d.ts +1 -1
  96. package/dist/flow.d.ts +7 -7
  97. package/dist/flow.esm.js +5 -5
  98. package/dist/{flowCompletionService-DNLssMAg.esm.js → flowCompletionService-BSiUcHmU.esm.js} +2 -2
  99. package/dist/{flowServices-Bzq3piUR.esm.js → flowServices-BIMnpB8Q.esm.js} +9 -9
  100. package/dist/formErrors-lSfh7Y8J.esm.js +512 -0
  101. package/dist/geolocation.esm.js +2 -2
  102. package/dist/{geolocationManager-DoLbpx5e.esm.js → geolocationManager-D7J-rLJp.esm.js} +3 -3
  103. package/dist/{geolocationStateMachine-d5_E7gAm.esm.js → geolocationStateMachine-5g2Quxbz.esm.js} +3 -3
  104. package/dist/government-validation.esm.js +2 -2
  105. package/dist/{governmentValidationManager-CaZxyEOO.esm.js → governmentValidationManager-0-L21hu6.esm.js} +3 -3
  106. package/dist/{governmentValidationStateMachine-DeHHhlcf.esm.js → governmentValidationStateMachine-BFIcq3UB.esm.js} +1 -1
  107. package/dist/home.d.ts +1 -1
  108. package/dist/home.esm.js +2 -2
  109. package/dist/http.esm.js +1 -1
  110. package/dist/id-ocr.d.ts +1 -1
  111. package/dist/id-ocr.esm.js +19 -3
  112. package/dist/id-selfie-flow.d.ts +2 -2
  113. package/dist/id-selfie-flow.esm.js +8 -8
  114. package/dist/id-verification.esm.js +2 -2
  115. package/dist/id.d.ts +3 -3
  116. package/dist/id.esm.js +3 -3
  117. package/dist/{idCaptureDefaults-R3rHuTOE.esm.js → idCaptureDefaults-CNopPetU.esm.js} +16 -6
  118. package/dist/{idCaptureManager-CgkQW3Xc.d.ts → idCaptureManager-CNFBeYgV.d.ts} +20 -5
  119. package/dist/{idCaptureManager-D_YGMeCW.esm.js → idCaptureManager-Du5jr3gJ.esm.js} +24 -18
  120. package/dist/{idCaptureServices-CP6AxsFW.esm.js → idCaptureServices-N0sn1AOF.esm.js} +5 -5
  121. package/dist/{idCaptureStateMachine-BdBtGQZP.esm.js → idCaptureStateMachine-CHk0uv1U.esm.js} +191 -44
  122. package/dist/{idOcrManager-C0C7lFGd.d.ts → idOcrManager-DflRx-_u.d.ts} +1 -1
  123. package/dist/{idOcrManager-XTbpfHoF.esm.js → idOcrManager-bjBLjrEE.esm.js} +3 -3
  124. package/dist/{idOcrStateMachine-B-00PgPh.esm.js → idOcrStateMachine-D5ifJ1B8.esm.js} +2 -2
  125. package/dist/{idVerificationManager-B4NYLlUl.esm.js → idVerificationManager-C8Ja-vKq.esm.js} +3 -3
  126. package/dist/{idVerificationStateMachine-B48Ikl-7.esm.js → idVerificationStateMachine-BMnfZZli.esm.js} +1 -1
  127. package/dist/identity-reuse.esm.js +2 -2
  128. package/dist/identity-search.esm.js +2 -2
  129. package/dist/{identityReuseManager-tFeYm_So.esm.js → identityReuseManager-B5BWAleT.esm.js} +3 -3
  130. package/dist/{identityReuseStateMachine-Ckf39qFu.esm.js → identityReuseStateMachine-Cuggm1UP.esm.js} +1 -1
  131. package/dist/{index-CoePktWH.d.ts → index-BoGlwLGK.d.ts} +1 -1
  132. package/dist/{index-CNck5TLp.d.ts → index-bsGvWr9-.d.ts} +21 -2
  133. package/dist/index.d.ts +1 -1
  134. package/dist/index.esm.js +1 -1
  135. package/dist/{invokeOnCaptureCallback-DNQX9k5e.esm.js → invokeOnCaptureCallback-D2FOfi4O.esm.js} +1 -1
  136. package/dist/kyb-checks.d.ts +3 -3
  137. package/dist/kyb-checks.esm.js +2 -2
  138. package/dist/{kybChecksManager-DP76y-Qz.esm.js → kybChecksManager-CDxP2pYP.esm.js} +2 -2
  139. package/dist/{kybChecksManager-B7Di9auB.d.ts → kybChecksManager-CKDy1mel.d.ts} +1 -1
  140. package/dist/{kybChecksStateMachine-OKLT8Zoc.esm.js → kybChecksStateMachine-ZOKNXTUx.esm.js} +176 -179
  141. package/dist/mandatory-consent.d.ts +2 -2
  142. package/dist/mandatory-consent.esm.js +2 -2
  143. package/dist/{mandatoryConsentManager-kzr5kdc_.d.ts → mandatoryConsentManager-BcxCesP5.d.ts} +6 -6
  144. package/dist/{mandatoryConsentManager-NX1lz6nk.esm.js → mandatoryConsentManager-FfgHdPYw.esm.js} +3 -3
  145. package/dist/{mandatoryConsentStateMachine-D1J2NQSI.esm.js → mandatoryConsentStateMachine-CXuYC3qR.esm.js} +1 -1
  146. package/dist/{multipartRecordingService-Cz-cWrpV.esm.js → multipartRecordingService-CFmOUGQt.esm.js} +1 -1
  147. package/dist/numericRange-2e1vw1W0.esm.js +256 -0
  148. package/dist/{permissionGuards-Cyh71hOt.esm.js → permissionGuards-CZTCRHT-.esm.js} +1 -1
  149. package/dist/{permissionServices-BrtDMB0Z.esm.js → permissionServices-Vd86JiW9.esm.js} +19 -7
  150. package/dist/phone.d.ts +1 -1
  151. package/dist/phone.esm.js +2 -2
  152. package/dist/{phoneManager-VO1HEoUZ.d.ts → phoneManager-bA-xw2TP.d.ts} +0 -8
  153. package/dist/{phoneManager-D1QPNbu0.esm.js → phoneManager-oIMdbeLG.esm.js} +5 -6
  154. package/dist/{phoneServices-DC7AuUed.esm.js → phoneServices-Dk4j3NhI.esm.js} +2 -12
  155. package/dist/{phoneStateMachine-CxCPxTIy.esm.js → phoneStateMachine-Cu3y7ewi.esm.js} +3 -8
  156. package/dist/{processFaceMatch-BQoiqLVh.esm.js → processFaceMatch-CHeI0DEt.esm.js} +1 -1
  157. package/dist/qe-signature.esm.js +1 -1
  158. package/dist/{recordingService-CSCvD2tB.esm.js → recordingService-Cg-DwTxA.esm.js} +3 -3
  159. package/dist/redirect-to-mobile.esm.js +2 -2
  160. package/dist/{redirectToMobileManager-Dcpg5GfP.esm.js → redirectToMobileManager-yYJGE47m.esm.js} +3 -3
  161. package/dist/{redirectToMobileStateMachine-BMehrtVP.esm.js → redirectToMobileStateMachine-g_NbyHrL.esm.js} +1 -1
  162. package/dist/{runChildModule-DNEmc7of.esm.js → runChildModule-Dd-tXDh2.esm.js} +2 -2
  163. package/dist/{sdkVersion-etdZfyCR.esm.js → sdkVersion-DDHH3E2F.esm.js} +1 -1
  164. package/dist/selfie.d.ts +3 -3
  165. package/dist/selfie.esm.js +11 -11
  166. package/dist/{selfieErrorUtils-DT-uhK20.esm.js → selfieErrorUtils-Dtm9bDS7.esm.js} +1 -1
  167. package/dist/{selfieManager-CdS6a7Q8.esm.js → selfieManager-BYJPzJW1.esm.js} +6 -6
  168. package/dist/{selfieManager-DrBYj5kA.d.ts → selfieManager-CqDlUy6B.d.ts} +1 -1
  169. package/dist/{selfieStateMachine-ChCl3nyf.esm.js → selfieStateMachine-DGg7S9O6.esm.js} +3 -3
  170. package/dist/{session-VXYuRYzb.esm.js → session-B49EJzZg.esm.js} +5 -5
  171. package/dist/session.d.ts +1 -1
  172. package/dist/session.esm.js +5 -5
  173. package/dist/{sessionInitializer-BT_CmYcX.esm.js → sessionInitializer-CaY5gnUl.esm.js} +11 -11
  174. package/dist/{setup-BXrgDdfx.esm.js → setup-B7SDCbtu.esm.js} +13 -13
  175. package/dist/{setup-rcXgYUcY.d.ts → setup-CTnxQSQW.d.ts} +1 -1
  176. package/dist/signature.esm.js +2 -2
  177. package/dist/{signatureManager-B737Gkvk.esm.js → signatureManager-DRUflksL.esm.js} +3 -3
  178. package/dist/{signatureStateMachine-B-QG7fk0.esm.js → signatureStateMachine-BQZenxel.esm.js} +1 -1
  179. package/dist/{stats-CrqhpKkP.esm.js → stats-DHu3li6G.esm.js} +1 -1
  180. package/dist/stats.esm.js +1 -1
  181. package/dist/{tri-BD9z6z0w.esm.js → tri-DBB-iiN3.esm.js} +8 -25
  182. package/dist/tri.d.ts +1 -1
  183. package/dist/{tri.esm-DYdFtcDH.esm.js → tri.esm-CftnGf9w.esm.js} +187 -177
  184. package/dist/tri.esm.js +1 -1
  185. package/dist/trueSight-Dg3TSVN7.esm.js +1 -0
  186. package/dist/{trueSightService-BwyLhIAo.esm.js → trueSightService-BWDGk571.esm.js} +5 -7
  187. package/dist/trust-graph.esm.js +3 -3
  188. package/dist/{trustGraphStateMachine-BxvReuo1.esm.js → trustGraphStateMachine-0Ehwried.esm.js} +1 -1
  189. package/dist/{types-4Re9FSOw.d.ts → types-BZsmNYom.d.ts} +3 -4
  190. package/dist/types-BinnzVrL.d.ts +6 -0
  191. package/dist/{types-BgRHw-dR.d.ts → types-BwMpWCVG.d.ts} +6 -2
  192. package/dist/{types-b0l9b83G.d.ts → types-D-FEM1rT.d.ts} +26 -10
  193. package/dist/{textRules-D4NRinKY.d.ts → types-D6Q1D1kx.d.ts} +1 -9
  194. package/dist/{types-CBQN04Rh.esm.js → types-DLsivQsu.esm.js} +0 -3
  195. package/dist/{types-CTaL0XJz.d.ts → types-DWqO7owj.d.ts} +2 -24
  196. package/dist/{types-CEGG70FK.d.ts → types-HHgsFhZn.d.ts} +1 -1
  197. package/dist/{types-C1056-J1.d.ts → types-LbccjQYX.d.ts} +1 -1
  198. package/dist/{types-DHpz4Y37.d.ts → types-PnJXvTkV.d.ts} +1 -1
  199. package/dist/{types-B-PIc0en.d.ts → types-g3NuVCT9.d.ts} +40 -37
  200. package/dist/{types-DEa3taWc.d.ts → types-tOSLpcSa.d.ts} +16 -2
  201. package/dist/video-selfie.d.ts +14 -6
  202. package/dist/video-selfie.esm.js +12 -9
  203. package/dist/{videoSelfieCameraWarmer-DgRlU_8q.esm.js → videoSelfieCameraWarmer-DFhlGeRd.esm.js} +27 -8
  204. package/dist/{videoSelfieStepDetector-DC_Qh7qI.d.ts → videoSelfieStepDetector-CxOc3kSI.d.ts} +3 -3
  205. package/dist/{warmup-BN8dG2KX.esm.js → warmup-ClZxXOkg.esm.js} +1 -1
  206. package/dist/wasm.d.ts +2 -2
  207. package/dist/wasm.esm.js +3 -3
  208. package/dist/{wasmDsFlagSync-DwBfTlgB.esm.js → wasmDsFlagSync-Bw-P5OG1.esm.js} +1 -1
  209. package/dist/{wasmWebClient-B2P6Vlvv.esm.js → wasmWebClient-BLtlzQhv.esm.js} +9 -9
  210. package/dist/watchlist-for-business.esm.js +2 -2
  211. package/dist/watchlist.esm.js +2 -2
  212. package/dist/{watchlistForBusinessManager-DxeSH80T.esm.js → watchlistForBusinessManager-d8kdf35n.esm.js} +3 -3
  213. package/dist/{watchlistForBusinessStateMachine-BC9UWLuZ.esm.js → watchlistForBusinessStateMachine-Y9wFmuMH.esm.js} +4 -3
  214. package/dist/{watchlistManager-BHzmC9OC.esm.js → watchlistManager-D1BVrd3H.esm.js} +3 -3
  215. package/dist/{watchlistStateMachine-Bxzn16iJ.esm.js → watchlistStateMachine-Da4p0sTE.esm.js} +1 -1
  216. package/dist/workflow.d.ts +1 -1
  217. package/dist/workflow.esm.js +42 -42
  218. package/package.json +3 -3
  219. package/dist/addressSearch-BKlynuBr.esm.js +0 -71
  220. package/dist/ekycPrefillStateMachine-SBnBKPGA.esm.js +0 -685
  221. package/dist/ekycRules-BH_Ll_0A.esm.js +0 -482
  222. package/dist/idOcrCpfUtils-D5Gwskxu.esm.js +0 -18
  223. package/dist/trueSight-BymJD5cW.esm.js +0 -1
  224. package/dist/types-BtrJ5fkm.d.ts +0 -6
@@ -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 { t as kybChecksMachine } from "./kybChecksStateMachine-OKLT8Zoc.esm.js";
3
+ import { n as toKybErrors, t as kybChecksMachine } from "./kybChecksStateMachine-ZOKNXTUx.esm.js";
4
4
  //#region src/modules/kyb-checks/kybChecksActor.ts
5
5
  /** Creates and starts a KYB Checks actor, idle until `LOAD`. */
6
6
  function createKybChecksActor(options = {}) {
@@ -18,7 +18,7 @@ function mapState(snapshot) {
18
18
  title: context.prepared?.title,
19
19
  sections: context.prepared?.sections ?? [],
20
20
  values: context.values,
21
- errors: context.errors,
21
+ errors: toKybErrors(context.form, context.errors),
22
22
  isRefetching,
23
23
  canSubmit: !!context.form?.submit && !isRefetching,
24
24
  unsupportedModules: context.form?.context.unsupportedModules ?? []
@@ -1,7 +1,7 @@
1
1
  import { i as ActorRefFrom } from "./spawn-COZKetCS.js";
2
2
  import { t as Manager } from "./Manager-DufwKlav.js";
3
3
  import "./Actor-DqjOqDfU.js";
4
- import { a as KybChecksSection, c as KybFieldValue, d as KybText, f as KybUnsupportedModule, i as KybChecksResult, l as KybFieldValues, n as KybChecksConfig, r as KybChecksErrorKind, s as KybFieldErrors } from "./types-CTaL0XJz.js";
4
+ import { a as KybChecksSection, c as KybFieldValue, d as KybUnsupportedModule, i as KybChecksResult, l as KybFieldValues, n as KybChecksConfig, r as KybChecksErrorKind, s as KybFieldErrors, u as KybText } from "./types-DWqO7owj.js";
5
5
  //#region src/modules/kyb-checks/kybChecksStateMachine.d.ts
6
6
  declare const kybChecksMachine: any;
7
7
  type KybChecksMachine = typeof kybChecksMachine;
@@ -1,11 +1,12 @@
1
- import { t as api, u as endpoints } from "./api-BNxrW8xK.esm.js";
2
- import { i as toIncodeApiError, t as IncodeApiError } from "./apiError-BAfdBGxH.esm.js";
3
- import { n as loadPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
1
+ import { t as getLocalIsoDate } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
2
+ import { t as api, u as endpoints } from "./api-B58edv6M.esm.js";
3
+ import { i as toIncodeApiError, t as IncodeApiError } from "./apiError-CWjo9dzH.esm.js";
4
+ import { n as loadPhoneValidation, t as getPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
4
5
  import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
5
6
  import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
6
7
  import { t as usStateOptions } from "./usStates-CwOQ2kAx.esm.js";
7
- import { n as checkSupport, r as DYNAMIC_REQUIRED_KEY, t as resolveForm } from "./resolveForm-DaaQSVWp.esm.js";
8
- import { n as hasAllowedCharacters, t as formatPhoneE164 } from "./phoneFormat-C3q0Ukh4.esm.js";
8
+ import { n as checkSupport, t as resolveForm } from "./resolveForm-DaaQSVWp.esm.js";
9
+ import { a as e164, c as setFieldValue, d as createFormRegistry, f as supportedIds, i as oneOfRequired, l as validateAllValues, n as requiredError, o as allowedCharacters, p as buildPayload, r as trim, s as phoneDeps, t as STRUCTURE_MESSAGES } from "./formErrors-lSfh7Y8J.esm.js";
9
10
  function isSupportedSchema(form) {
10
11
  return String(form.schemaVersion).split(".")[0] === "1";
11
12
  }
@@ -17,11 +18,6 @@ function formFields(form) {
17
18
  function findField(form, name) {
18
19
  return formFields(form).find((field) => field.name === name);
19
20
  }
20
- /** Blank text, or a list with no non-blank entry. */
21
- function isBlank(value) {
22
- if (Array.isArray(value)) return value.every((v) => v.trim() === "");
23
- return value === void 0 || value.trim() === "";
24
- }
25
21
  //#endregion
26
22
  //#region src/modules/kyb-checks/kybChecksDefinition.ts
27
23
  const KYB_CHECKS_MODULE = "kybChecks";
@@ -50,20 +46,30 @@ const KINDS = {
50
46
  list: "list"
51
47
  };
52
48
  const KEYBOARDS = /* @__PURE__ */ new Set(["url", "email"]);
53
- const TRANSFORMS = /* @__PURE__ */ new Set(["trim", "e164"]);
54
- const KYB_CHECKS_SUPPORTED_IDS = {
49
+ /**
50
+ * The only ids the adapter produces, with their kernel implementations: KYB
51
+ * Checks validates and builds its request with these, and nothing else, so
52
+ * the kernel's other rules, the vocabulary and the postal tables stay out of
53
+ * its bundle. A served construct with no id here is left out by the adapter.
54
+ * There are no default messages: every served rule carries its own, and a
55
+ * rule without one falls back to its id, as before.
56
+ */
57
+ const KYB_CHECKS_REGISTRY = createFormRegistry({
55
58
  schemaVersions: [1],
56
59
  vocabulary: "1.3",
57
- kinds: new Set(Object.values(KINDS)),
58
- groups: /* @__PURE__ */ new Set([...Object.values(GROUPS), OTHER_GROUP]),
59
- rules: /* @__PURE__ */ new Set(["allowedCharacters"]),
60
- transforms: TRANSFORMS,
61
- groupRules: /* @__PURE__ */ new Set(["oneOfRequired"]),
62
- optionLists: /* @__PURE__ */ new Set(["US_STATES"]),
63
- conditions: /* @__PURE__ */ new Set(),
64
- prefillSources: /* @__PURE__ */ new Set(),
65
- flags: /* @__PURE__ */ new Set(["payload.omitWhenEmpty"])
66
- };
60
+ kinds: Object.values(KINDS),
61
+ groups: [...Object.values(GROUPS), OTHER_GROUP],
62
+ rules: [allowedCharacters],
63
+ transforms: [trim, e164],
64
+ groupRules: [oneOfRequired],
65
+ optionLists: { US_STATES: usStateOptions.map((option) => option.value) },
66
+ flags: ["payload.omitWhenEmpty"],
67
+ required: requiredError,
68
+ structure: STRUCTURE_MESSAGES
69
+ });
70
+ /** Request transforms the adapter keeps from a served field. */
71
+ const TRANSFORMS = new Set(KYB_CHECKS_REGISTRY.transforms.keys());
72
+ const KYB_CHECKS_SUPPORTED_IDS = supportedIds(KYB_CHECKS_REGISTRY);
67
73
  /** A served regex of the one shape `allowedCharacters` can express: `^[…]{1,n}$` or `^[…]+$`. */
68
74
  const CHARACTER_CLASS_REGEX = /^\^\[([^\]]+)\](?:\{[01],(\d+)\}|\+)\$$/;
69
75
  /**
@@ -175,6 +181,16 @@ function toGroupRules(form, names) {
175
181
  });
176
182
  }
177
183
  /**
184
+ * `submit.static` without the keys a served field writes. The backend sends
185
+ * the country both ways, with the same value; the field's value is the one
186
+ * the user chose (CK1 decision K11), and the kernel reports two writers of
187
+ * one key as a definition error.
188
+ */
189
+ function staticKeys(form, fields) {
190
+ const written = new Set(fields.filter((field) => !field.payload?.omit).map((field) => field.payload?.key ?? field.name));
191
+ return Object.fromEntries(Object.entries(form.submit?.static ?? {}).filter(([key]) => !written.has(key)));
192
+ }
193
+ /**
178
194
  * The served form as a form definition, plus what the definition has no slot
179
195
  * for. Steps are flattened: the backend always sends one.
180
196
  */
@@ -208,7 +224,7 @@ function toKybChecksDefinition(form) {
208
224
  sections,
209
225
  fields,
210
226
  ...groupRules.length > 0 && { groupRules },
211
- submit: { static: form.submit?.static ?? {} }
227
+ submit: { static: staticKeys(form, fields) }
212
228
  },
213
229
  layout: {
214
230
  title: form.steps[0]?.title,
@@ -218,51 +234,28 @@ function toKybChecksDefinition(form) {
218
234
  }
219
235
  //#endregion
220
236
  //#region src/modules/kyb-checks/kybChecksFields.ts
237
+ /**
238
+ * KYB Checks on the forms kernel: checks and resolves the definition the
239
+ * adapter builds and projects it to `KybFieldDef`s. Values are validated with
240
+ * the kernel's `validateForm` and the request body is the kernel's
241
+ * `buildPayload`, both with `KYB_CHECKS_REGISTRY`; this file only maps their
242
+ * errors to the module's `KybText`s.
243
+ */
244
+ /** A phone the input itself reports as malformed. */
221
245
  const PHONE_FORMAT_ERROR = {
222
246
  key: "kyb.errors.phoneNumberFormat",
223
247
  text: "Enter a valid phone number"
224
248
  };
225
- const INVALID_CHARACTERS = {
226
- key: "verification.errors.invalidCharacters",
227
- text: "Use only the allowed characters"
228
- };
229
249
  const ALL_GROUPS_ON = Object.fromEntries([...KYB_CHECKS_SUPPORTED_IDS.groups].map((group) => [group, true]));
230
250
  const TYPES = {
231
251
  choice: "dropdown",
232
252
  phone: "phone",
233
253
  list: "list"
234
254
  };
235
- const toText = (text, fallback) => text ? {
236
- key: text.key,
237
- text: text.text ?? fallback.text
238
- } : fallback;
239
255
  const fromFormText = (text) => ({
240
256
  key: text.key,
241
257
  text: text.text ?? ""
242
258
  });
243
- function projectRules(rules, required, maxLength) {
244
- const validation = required ? [{ type: "required" }] : [];
245
- let lengthMessage;
246
- for (const rule of rules ?? []) {
247
- if (rule.id !== "allowedCharacters") continue;
248
- const params = rule.params ?? {};
249
- const message = toText(rule.message, INVALID_CHARACTERS);
250
- validation.push({
251
- type: "allowedCharacters",
252
- classes: params.classes ?? [],
253
- extra: typeof params.extra === "string" ? params.extra : "",
254
- ascii: params.ascii === true,
255
- message
256
- });
257
- lengthMessage ??= message;
258
- }
259
- if (maxLength !== void 0 && lengthMessage) validation.push({
260
- type: "maxLength",
261
- max: maxLength,
262
- message: lengthMessage
263
- });
264
- return validation;
265
- }
266
259
  function projectField(resolved, layout, country) {
267
260
  const { field, required, phoneLocked } = resolved;
268
261
  const type = TYPES[field.kind] ?? "text";
@@ -290,20 +283,37 @@ function projectField(resolved, layout, country) {
290
283
  },
291
284
  ...served?.readonly && { readonly: true },
292
285
  ...served?.refetchOnChange && { refetchOnChange: served.refetchOnChange },
293
- initialValue: served?.value ?? (type === "list" ? [] : ""),
294
- validation: projectRules(field.rules, required, maxLength)
286
+ initialValue: served?.value ?? (type === "list" ? [] : "")
295
287
  };
296
288
  }
297
- const preparedForms = /* @__PURE__ */ new WeakMap();
298
289
  /**
299
- * The served form on the forms kernel: translated to a definition, checked,
300
- * resolved with every group on and projected. `undefined` when this build
301
- * can't render it: a newer schema major, or an adapter output that fails
302
- * `checkSupport`, which would be a bug in the adapter.
290
+ * The English text of every message the definition carries (rule and group
291
+ * rule messages), by key, for a key i18nexus doesn't have.
303
292
  */
304
- function prepareKybChecksForm(form) {
293
+ function messageTexts(definition) {
294
+ const texts = /* @__PURE__ */ new Map([[PHONE_FORMAT_ERROR.key, PHONE_FORMAT_ERROR.text]]);
295
+ const add = (text) => {
296
+ if (text?.text && !texts.has(text.key)) texts.set(text.key, text.text);
297
+ };
298
+ for (const field of definition.fields) for (const rule of field.rules ?? []) add(rule.message);
299
+ for (const rule of definition.groupRules ?? []) add(rule.message);
300
+ return texts;
301
+ }
302
+ /**
303
+ * Each field's first served rule text, by field name. A served pattern also
304
+ * caps the field's length, so a value that is too long falls back to it, as
305
+ * the module's own check did.
306
+ */
307
+ function lengthTexts(definition) {
308
+ return new Map(definition.fields.flatMap((field) => {
309
+ const text = field.rules?.find((rule) => rule.message?.text)?.message?.text;
310
+ return field.input?.maxLength !== void 0 && text ? [[field.name, text]] : [];
311
+ }));
312
+ }
313
+ const preparedForms = /* @__PURE__ */ new WeakMap();
314
+ function prepared(form) {
305
315
  if (preparedForms.has(form)) return preparedForms.get(form) ?? void 0;
306
- let prepared = null;
316
+ let result = null;
307
317
  if (isSupportedSchema(form)) {
308
318
  const { definition, layout } = toKybChecksDefinition(form);
309
319
  const support = checkSupport(definition, KYB_CHECKS_SUPPORTED_IDS);
@@ -314,21 +324,50 @@ function prepareKybChecksForm(form) {
314
324
  ...section.title && { title: fromFormText(section.title) },
315
325
  fields: resolved.fields.filter((field) => field.field.section === section.id).map((field) => projectField(field, layout, definition.country))
316
326
  }));
317
- const formRules = resolved.groupRules.map(({ rule, fields }) => ({
318
- type: "oneOfRequired",
319
- fields: [...fields],
320
- message: fromFormText(rule.message ?? { key: rule.id })
321
- }));
322
- prepared = {
323
- submit: toSubmitPlan(definition),
324
- title: layout.title,
325
- sections,
326
- formRules
327
+ result = {
328
+ view: {
329
+ title: layout.title,
330
+ sections
331
+ },
332
+ definition,
333
+ check: {
334
+ form: resolved,
335
+ registry: KYB_CHECKS_REGISTRY,
336
+ env: () => ({
337
+ country: definition.country ?? "",
338
+ today: getLocalIsoDate(),
339
+ deps: phoneDeps()
340
+ }),
341
+ invalidFormatError: { key: PHONE_FORMAT_ERROR.key }
342
+ },
343
+ fieldsByName: new Map(sections.flatMap((section) => section.fields.map((field) => [field.name, field]))),
344
+ texts: messageTexts(definition),
345
+ lengthTexts: lengthTexts(definition)
327
346
  };
328
347
  } else console.warn("[kyb-checks] Unsupported form definition", support.problems);
329
348
  }
330
- preparedForms.set(form, prepared);
331
- return prepared ?? void 0;
349
+ preparedForms.set(form, result);
350
+ return result ?? void 0;
351
+ }
352
+ /**
353
+ * The served form on the forms kernel: translated to a definition, checked,
354
+ * resolved with every group on and projected. `undefined` when this build
355
+ * can't render it: a newer schema major, or an adapter output that fails
356
+ * `checkSupport`, which would be a bug in the adapter.
357
+ */
358
+ function prepareKybChecksForm(form) {
359
+ return prepared(form)?.view;
360
+ }
361
+ /** What the kernel checks the form's values against. */
362
+ function kybChecksFormCheck(form) {
363
+ return prepared(form)?.check;
364
+ }
365
+ /**
366
+ * Whether the form shows a phone locked to its country. Its country check
367
+ * needs the phone rules, so a submit waits for them first.
368
+ */
369
+ function hasLockedPhone(form) {
370
+ return !!prepared(form)?.check.form.fields.some((field) => field.phoneLocked);
332
371
  }
333
372
  function sectionFields(prepared) {
334
373
  return prepared.sections.flatMap((section) => section.fields);
@@ -363,99 +402,49 @@ function carryOverValues(prepared, before, previous, invalidFormats) {
363
402
  invalidFormats: stillInvalid
364
403
  };
365
404
  }
366
- function requiredMessage(field) {
367
- return {
368
- key: DYNAMIC_REQUIRED_KEY,
369
- text: `${field.labelText} is required`,
370
- params: { fieldName: {
371
- key: field.label,
372
- text: field.labelText
373
- } }
374
- };
375
- }
376
- function failsRule(rule, value) {
377
- if (rule.type === "required") return isBlank(value);
378
- const entries = (Array.isArray(value) ? value : [value]).map((entry) => entry.trim()).filter((entry) => entry !== "");
379
- if (rule.type === "maxLength") return entries.some((entry) => entry.length > rule.max);
380
- return entries.some((entry) => !hasAllowedCharacters(entry, rule.classes, rule.extra, rule.ascii));
381
- }
382
- /** The first failing rule's message for a field, in rule order. */
383
- function validateField(field, values, invalidFormats = {}) {
384
- const value = values[field.name] ?? field.initialValue;
385
- for (const rule of field.validation) if (failsRule(rule, value)) return rule.type === "required" ? requiredMessage(field) : rule.message;
386
- if (invalidFormats[field.name] && !isBlank(value)) return PHONE_FORMAT_ERROR;
387
- }
388
405
  /**
389
- * Errors for the whole form. A form-level rule is shown on the first field it
390
- * names, unless that field already has an error.
406
+ * A kernel error as a `KybText`: params as text, and the served English text
407
+ * as fallback. A value that is too long gets the field's served pattern text
408
+ * (its `lengthText`), which also capped the length.
391
409
  */
392
- function validateForm(prepared, values, invalidFormats = {}) {
393
- const errors = {};
394
- for (const field of sectionFields(prepared)) {
395
- const error = validateField(field, values, invalidFormats);
396
- if (error) errors[field.name] = error;
397
- }
398
- for (const rule of prepared.formRules) {
399
- const [target] = rule.fields;
400
- const allBlank = rule.fields.every((name) => isBlank(values[name]));
401
- if (target && !errors[target] && allBlank) errors[target] = rule.message;
402
- }
403
- return errors;
404
- }
405
- function applyTransforms(value, transforms, country) {
406
- let current = value;
407
- for (const transform of transforms) if (transform === "trim") current = Array.isArray(current) ? current.map((entry) => entry.trim()) : current.trim();
408
- else if (transform === "e164" && typeof current === "string") current = current ? formatPhoneE164(current, country ?? "") : current;
409
- return current;
410
+ function toKybText(error, field, texts, lengthText) {
411
+ const params = error.params ? Object.fromEntries(Object.entries(error.params).map(([name, value]) => [name, Array.isArray(value) ? value.join(", ") : String(value)])) : void 0;
412
+ const tooLong = typeof error.params?.maxLength === "number";
413
+ const text = error.key === "verification.errors.fieldRequiredDynamic" && field ? `${field.labelText} is required` : texts.get(error.key) ?? (tooLong ? lengthText : void 0) ?? "";
414
+ return {
415
+ key: error.key,
416
+ text,
417
+ ...params && { params }
418
+ };
410
419
  }
420
+ const kybErrors = /* @__PURE__ */ new WeakMap();
421
+ const NO_TEXTS = /* @__PURE__ */ new Map();
411
422
  /**
412
- * The request body the definition describes, in the module's own terms.
413
- * `submit.static` wins over a field with the same key: the backend sends the
414
- * country both ways, with the same value. The catalog compiler rejects two
415
- * fields writing one key, but a served form is never compiled, so a later
416
- * field whose key an earlier field already writes is left out, with a warning.
423
+ * The module's errors for the UI and headless hosts. The required message's
424
+ * `fieldName` is the field's label key; show the field's `labelText` when it
425
+ * has no translation. Mapped once per errors object, so it keeps its identity
426
+ * between snapshots.
417
427
  */
418
- function toSubmitPlan(definition) {
419
- const staticKeys = new Set(Object.keys(definition.submit.static ?? {}));
420
- const claimed = /* @__PURE__ */ new Set();
421
- const fields = [];
422
- for (const field of definition.fields) {
423
- if (field.payload?.omit) continue;
424
- const key = field.payload?.key ?? field.name;
425
- if (staticKeys.has(key)) continue;
426
- if (claimed.has(key)) {
427
- console.warn(`[kyb-checks] Not sending field "${field.name}": request key "${key}" is already written`);
428
- continue;
429
- }
430
- claimed.add(key);
431
- fields.push({
432
- name: field.name,
433
- key,
434
- transforms: (field.payload?.transforms ?? []).map((t) => t.id),
435
- omitWhenEmpty: field.payload?.omitWhenEmpty === true,
436
- isList: field.kind === "list"
437
- });
438
- }
439
- return {
440
- static: { ...definition.submit.static },
441
- country: definition.country,
442
- fields
443
- };
428
+ function toKybErrors(form, errors) {
429
+ const known = kybErrors.get(errors);
430
+ if (known) return known;
431
+ const entry = form ? prepared(form) : void 0;
432
+ const mapped = Object.fromEntries(Object.entries(errors).map(([name, error]) => [name, toKybText(error, entry?.fieldsByName.get(name), entry?.texts ?? NO_TEXTS, entry?.lengthTexts.get(name))]));
433
+ kybErrors.set(errors, mapped);
434
+ return mapped;
444
435
  }
445
436
  /**
446
- * The `POST /omni/kyb` body: `submit.static`, then each field's value under
447
- * its request key after its transforms. List fields drop blank entries, and
448
- * a field marked `omitWhenEmpty` is left out when it's empty.
437
+ * The `POST /omni/kyb` body: the kernel's request body for the definition.
438
+ * Empty values are left out, list entries that are blank are dropped, and
439
+ * `submit.static` keys follow the fields. A served form the compiler never
440
+ * saw can still repeat a request key; the first writer wins, with a warning.
449
441
  */
450
- function buildSubmitBody(submit, values) {
451
- const body = { ...submit.static };
452
- for (const field of submit.fields) {
453
- let value = applyTransforms(values[field.name] ?? (field.isList ? [] : ""), field.transforms, submit.country);
454
- if (Array.isArray(value)) value = value.filter((entry) => entry.trim() !== "");
455
- if (field.omitWhenEmpty && isBlank(value)) continue;
456
- body[field.key] = value;
457
- }
458
- return body;
442
+ function buildKybChecksBody(form, values) {
443
+ const check = prepared(form)?.check;
444
+ if (!check) return {};
445
+ const { body, problems } = buildPayload(check.form, values, check.registry, check.env());
446
+ if (problems.length > 0) console.warn("[kyb-checks] Request body problems", problems);
447
+ return { ...body };
459
448
  }
460
449
  //#endregion
461
450
  //#region src/modules/kyb-checks/kybChecksServices.ts
@@ -512,9 +501,12 @@ const kybChecksMachine = setup({
512
501
  },
513
502
  actors: {
514
503
  fetchForm: fromPromise(async ({ input, signal }) => fetchKybForm(input.country, signal)),
504
+ loadPhoneRules: fromPromise(async () => {
505
+ await loadPhoneValidation();
506
+ }),
515
507
  submit: fromPromise(async ({ input, signal }) => {
516
508
  await loadPhoneValidation();
517
- return submitKyb(buildSubmitBody(input.submit, input.values), signal);
509
+ return submitKyb(buildKybChecksBody(input.form, input.values), signal);
518
510
  })
519
511
  },
520
512
  actions: {
@@ -533,23 +525,18 @@ const kybChecksMachine = setup({
533
525
  };
534
526
  }),
535
527
  setFieldValue: assign(({ context, event }) => {
536
- const { name, value, isValid } = event;
537
- const invalidFormats = { ...context.invalidFormats };
538
- if (isValid === false) invalidFormats[name] = true;
539
- else delete invalidFormats[name];
540
- const errors = { ...context.errors };
541
- delete errors[name];
542
- return {
543
- values: {
544
- ...context.values,
545
- [name]: value
546
- },
547
- errors,
548
- invalidFormats
549
- };
528
+ const check = context.form && kybChecksFormCheck(context.form);
529
+ const set = event;
530
+ return check ? setFieldValue(context, set, check) : { values: {
531
+ ...context.values,
532
+ [set.name]: set.value
533
+ } };
550
534
  }),
551
535
  setCountryFromEvent: assign(({ event }) => ({ country: String(event.value) })),
552
- validateAll: assign(({ context }) => ({ errors: context.prepared ? validateForm(context.prepared, context.values, context.invalidFormats) : {} })),
536
+ validateAll: assign(({ context }) => {
537
+ const check = context.form && kybChecksFormCheck(context.form);
538
+ return { errors: check ? validateAllValues(context, check) : {} };
539
+ }),
553
540
  setLoadError: assign(({ event }) => ({
554
541
  errorKind: "load",
555
542
  canRetry: true,
@@ -577,6 +564,7 @@ const kybChecksMachine = setup({
577
564
  const { name, value } = event;
578
565
  return findField(context.form, name)?.refetchOnChange === COUNTRY_PARAM && typeof value === "string" && value !== "" && value !== context.country;
579
566
  },
567
+ waitsForPhoneRules: ({ context }) => !!context.form && hasLockedPhone(context.form) && !getPhoneValidation(),
580
568
  hasNoErrors: ({ context }) => Object.keys(context.errors).length === 0 && !!context.form?.submit,
581
569
  failedLoadingFirstForm: ({ context }) => context.errorKind === "load" && context.form === void 0,
582
570
  failedLoading: ({ context }) => context.errorKind === "load",
@@ -630,7 +618,16 @@ const kybChecksMachine = setup({
630
618
  target: "refetching",
631
619
  actions: ["setFieldValue", "setCountryFromEvent"]
632
620
  }, { actions: "setFieldValue" }],
633
- SUBMIT: "validating"
621
+ SUBMIT: [{
622
+ guard: "waitsForPhoneRules",
623
+ target: "loadingPhoneRules"
624
+ }, { target: "validating" }]
625
+ } },
626
+ loadingPhoneRules: { invoke: {
627
+ id: "loadPhoneRules",
628
+ src: "loadPhoneRules",
629
+ onDone: { target: "validating" },
630
+ onError: { target: "validating" }
634
631
  } },
635
632
  refetching: {
636
633
  invoke: {
@@ -671,7 +668,7 @@ const kybChecksMachine = setup({
671
668
  id: "submit",
672
669
  src: "submit",
673
670
  input: ({ context }) => ({
674
- submit: context.prepared?.submit,
671
+ form: context.form,
675
672
  values: context.values
676
673
  }),
677
674
  onDone: {
@@ -713,4 +710,4 @@ const kybChecksMachine = setup({
713
710
  }
714
711
  });
715
712
  //#endregion
716
- export { kybChecksMachine as t };
713
+ export { toKybErrors as n, kybChecksMachine as t };
@@ -1,3 +1,3 @@
1
- import { r as MandatoryConsentConfig } from "./types-C1056-J1.js";
2
- import { a as MandatoryConsentActor, i as createMandatoryConsentManagerFromActor, n as MandatoryConsentState, o as mandatoryConsentMachine, r as createMandatoryConsentManager, t as MandatoryConsentManager } from "./mandatoryConsentManager-kzr5kdc_.js";
1
+ import { r as MandatoryConsentConfig } from "./types-LbccjQYX.js";
2
+ import { a as MandatoryConsentActor, i as createMandatoryConsentManagerFromActor, n as MandatoryConsentState, o as mandatoryConsentMachine, r as createMandatoryConsentManager, t as MandatoryConsentManager } from "./mandatoryConsentManager-BcxCesP5.js";
3
3
  export { type MandatoryConsentActor, type MandatoryConsentConfig, type MandatoryConsentManager, type MandatoryConsentState, createMandatoryConsentManager, createMandatoryConsentManagerFromActor, mandatoryConsentMachine };
@@ -1,3 +1,3 @@
1
- import { t as mandatoryConsentMachine } from "./mandatoryConsentStateMachine-D1J2NQSI.esm.js";
2
- import { n as createMandatoryConsentManagerFromActor, t as createMandatoryConsentManager } from "./mandatoryConsentManager-NX1lz6nk.esm.js";
1
+ import { t as mandatoryConsentMachine } from "./mandatoryConsentStateMachine-CXuYC3qR.esm.js";
2
+ import { n as createMandatoryConsentManagerFromActor, t as createMandatoryConsentManager } from "./mandatoryConsentManager-FfgHdPYw.esm.js";
3
3
  export { createMandatoryConsentManager, createMandatoryConsentManagerFromActor, mandatoryConsentMachine };
@@ -2,7 +2,7 @@ import { A as MachineSnapshot, O as PromiseActorLogic, S as RequiredLogicInput,
2
2
  import "./xstate.cjs-D6Ur0X1F.js";
3
3
  import { t as Manager } from "./Manager-DufwKlav.js";
4
4
  import "./Actor-DqjOqDfU.js";
5
- import { n as MandatoryConsent, r as MandatoryConsentConfig, t as FetchMandatoryConsentResponse } from "./types-C1056-J1.js";
5
+ import { n as MandatoryConsent, r as MandatoryConsentConfig, t as FetchMandatoryConsentResponse } from "./types-LbccjQYX.js";
6
6
  //#region src/modules/mandatory-consent/mandatoryConsentStateMachine.d.ts
7
7
  type MandatoryConsentContext = {
8
8
  config: MandatoryConsentConfig;
@@ -66,14 +66,14 @@ declare const mandatoryConsentMachine: StateMachine<MandatoryConsentContext, {
66
66
  type: "setLoadError";
67
67
  params: NonReducibleUnknown;
68
68
  };
69
- resetContext: {
70
- type: "resetContext";
71
- params: NonReducibleUnknown;
72
- };
73
69
  toggleSigned: {
74
70
  type: "toggleSigned";
75
71
  params: NonReducibleUnknown;
76
72
  };
73
+ resetContext: {
74
+ type: "resetContext";
75
+ params: NonReducibleUnknown;
76
+ };
77
77
  }>, Values<{
78
78
  canSubmit: {
79
79
  type: "canSubmit";
@@ -83,7 +83,7 @@ declare const mandatoryConsentMachine: StateMachine<MandatoryConsentContext, {
83
83
  type: "hasConsent";
84
84
  params: unknown;
85
85
  };
86
- }>, never, "error" | "idle" | "closed" | "finished" | "loading" | "submitting" | "display", string, MandatoryConsentInput, NonReducibleUnknown, EventObject, MetaObject, {
86
+ }>, never, "error" | "idle" | "closed" | "finished" | "submitting" | "loading" | "display", string, MandatoryConsentInput, NonReducibleUnknown, EventObject, MetaObject, {
87
87
  readonly id: "mandatoryConsent";
88
88
  readonly initial: "idle";
89
89
  readonly context: ({ input }: {
@@ -1,8 +1,8 @@
1
- import { n as eventModuleNames } from "./types-CBQN04Rh.esm.js";
2
- import { t as createManagerInstrumentation } from "./events-ChMS-UzR.esm.js";
1
+ import { n as eventModuleNames } from "./types-DLsivQsu.esm.js";
2
+ import { t as createManagerInstrumentation } from "./events-PUWyizJn.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 mandatoryConsentMachine } from "./mandatoryConsentStateMachine-D1J2NQSI.esm.js";
5
+ import { t as mandatoryConsentMachine } from "./mandatoryConsentStateMachine-CXuYC3qR.esm.js";
6
6
  //#region src/modules/mandatory-consent/mandatoryConsentActor.ts
7
7
  function createMandatoryConsentActor(options) {
8
8
  return createActor(mandatoryConsentMachine, { input: { config: options.config } }).start();
@@ -1,4 +1,4 @@
1
- import { t as api, u as endpoints } from "./api-BNxrW8xK.esm.js";
1
+ import { t as api, u as endpoints } from "./api-B58edv6M.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
  //#region src/modules/mandatory-consent/mandatoryConsentServices.ts
@@ -1,5 +1,5 @@
1
1
  import { n as __exportAll } from "./rolldown-runtime-B-1-B7_t.esm.js";
2
- import { t as api, u as endpoints } from "./api-BNxrW8xK.esm.js";
2
+ import { t as api, u as endpoints } from "./api-B58edv6M.esm.js";
3
3
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
4
4
  import { t as BrowserNetworkStatusProvider } from "./BrowserNetworkStatusProvider-BrDXBEDd.esm.js";
5
5
  import { t as MultipartRecordingProvider } from "./MultipartRecordingProvider-BtMQZEbg.esm.js";