@incodetech/core 2.2.0 → 2.3.0-rc.0

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 (258) hide show
  1. package/THIRD_PARTY_NOTICES.txt +281 -0
  2. package/dist/BaseWasmProvider-Dyi6dKp1.d.ts +65 -0
  3. package/dist/{BrowserDiagnosticsCryptoProvider-B8vorxN5.esm.js → BrowserDiagnosticsCryptoProvider-C_9o3L2L.esm.js} +1 -1
  4. package/dist/{BrowserVisibilityObserverProvider-BX1BiLDK.esm.js → BrowserVisibilityObserverProvider-BrJN1B8A.esm.js} +2 -0
  5. package/dist/FaceDetectionProvider-DTetAE8H.esm.js +476 -0
  6. package/dist/FaceDetectionProvider-LdZ47bWy.d.ts +36 -0
  7. package/dist/{IIdCaptureCapability-DHTT3FC2.d.ts → IIdCaptureCapability-RNiFhvXR.d.ts} +7 -33
  8. package/dist/IWasmUtilCapability-CXXDA5l1.d.ts +159 -0
  9. package/dist/{MotionSensorProvider-DGiV77J_.esm.js → MotionSensorProvider-BgTYwg9L.esm.js} +1 -1
  10. package/dist/{deepsightService-DLVQS_RH.d.ts → StreamCanvasCapture-B3YT2Bt6.d.ts} +54 -41
  11. package/dist/{StreamCanvasCapture-D2XcXCZ4.esm.js → StreamCanvasCapture-C9jtgBdT.esm.js} +2 -2
  12. package/dist/{addressSearch-D1XpBdUS.esm.js → addressSearch-BRSu_aGA.esm.js} +1 -1
  13. package/dist/advanceableErrors-CpF2cBy6.esm.js +21 -0
  14. package/dist/ae-signature.d.ts +4 -2
  15. package/dist/ae-signature.esm.js +1 -1
  16. package/dist/antifraud.esm.js +2 -2
  17. package/dist/{antifraudManager-CQFNgSPt.esm.js → antifraudManager-Bg9ynGum.esm.js} +2 -2
  18. package/dist/{antifraudStateMachine-Bf_JVNwn.esm.js → antifraudStateMachine-BHxehiJZ.esm.js} +1 -1
  19. package/dist/{apiError-BA1d_au0.esm.js → apiError-D0v5hFyN.esm.js} +14 -2
  20. package/dist/authentication.d.ts +3 -3
  21. package/dist/authentication.esm.js +2 -2
  22. package/dist/{authenticationManager-zh9TC62P.esm.js → authenticationManager-C4B4-29g.esm.js} +5 -5
  23. package/dist/{authenticationManager-BBMGTcwW.d.ts → authenticationManager-DXTIUcma.d.ts} +7 -1
  24. package/dist/{authenticationStateMachine-xzi-vnvE.esm.js → authenticationStateMachine-DJ0zUm-A.esm.js} +6 -62
  25. package/dist/avatar.d.ts +1 -2
  26. package/dist/avatar.esm.js +1 -1
  27. package/dist/{backCameraStream-CUeYm5eu.esm.js → backCameraStream-BOtyQowf.esm.js} +83 -22
  28. package/dist/{camera-_2sXMXiF.esm.js → camera-sIa9ceW2.esm.js} +19 -1
  29. package/dist/camera.esm.js +1 -1
  30. package/dist/{canvas-E1zGkel4.esm.js → canvas-BxFzWTt-.esm.js} +19 -0
  31. package/dist/certificate-issuance.d.ts +2 -302
  32. package/dist/certificate-issuance.esm.js +3 -66
  33. package/dist/certificateIssuanceManager-Bfvkq7Cy.esm.js +69 -0
  34. package/dist/certificateIssuanceManager-DCgEidHz.d.ts +312 -0
  35. package/dist/{certificateIssuanceStateMachine-D_R92TYu.esm.js → certificateIssuanceStateMachine-BBD5h8c4.esm.js} +1 -1
  36. package/dist/consent.d.ts +1 -1
  37. package/dist/consent.esm.js +2 -2
  38. package/dist/{consentManager-BxjpLZAG.esm.js → consentManager-B5Vqdez-.esm.js} +2 -2
  39. package/dist/{consentManager-3Pbtj-RV.d.ts → consentManager-uhDPdU6i.d.ts} +4 -4
  40. package/dist/{consentStateMachine-D9D4ON8Z.esm.js → consentStateMachine-DbUmqWgV.esm.js} +1 -1
  41. package/dist/createCameraCycleOwnership-DQ5-F2oW.esm.js +826 -0
  42. package/dist/{createFaceAvatar-DQKaRise.esm.js → createFaceAvatar-BNHdeFj8.esm.js} +2 -2
  43. package/dist/createFaceAvatar-BlcTYgJv.d.ts +497 -0
  44. package/dist/cross-document-data-match.esm.js +1 -1
  45. package/dist/{crossDocumentDataMatchManager-CGT0V6RV.esm.js → crossDocumentDataMatchManager-QMOGwHXR.esm.js} +2 -2
  46. package/dist/curp-validation.d.ts +1 -1
  47. package/dist/curp-validation.esm.js +2 -2
  48. package/dist/{curpValidationManager-6Nmkn5u1.esm.js → curpValidationManager-D1ppROcF.esm.js} +2 -2
  49. package/dist/{curpValidationManager-DVGr7Fq7.d.ts → curpValidationManager-SSKNrm5Z.d.ts} +1 -1
  50. package/dist/{curpValidationStateMachine-Ds7KMacK.esm.js → curpValidationStateMachine-DvUPC_8S.esm.js} +1 -1
  51. package/dist/custom-fields.d.ts +2 -114
  52. package/dist/custom-fields.esm.js +2 -232
  53. package/dist/custom-watchlist.d.ts +2 -51
  54. package/dist/custom-watchlist.esm.js +3 -70
  55. package/dist/customFieldsManager-2j_PBq4U.esm.js +264 -0
  56. package/dist/customFieldsManager-8-W2KY4n.d.ts +141 -0
  57. package/dist/customWatchlistManager-DUVrEdw9.esm.js +73 -0
  58. package/dist/customWatchlistManager-PBWHr_oM.d.ts +64 -0
  59. package/dist/{customWatchlistStateMachine-YWSgKLbF.esm.js → customWatchlistStateMachine-qZVgkKgP.esm.js} +1 -1
  60. package/dist/{deepsightLoader--wMKWECS.esm.js → deepsightLoader-Dm7ejW4v.esm.js} +27 -71
  61. package/dist/device.d.ts +25 -2
  62. package/dist/device.esm.js +69 -7
  63. package/dist/document-capture.d.ts +2 -2
  64. package/dist/document-capture.esm.js +2 -2
  65. package/dist/{documentCaptureManager-DsQQhWry.esm.js → documentCaptureManager-DR_Wv-3H.esm.js} +2 -2
  66. package/dist/{documentCaptureManager-B3t0ydtg.d.ts → documentCaptureManager-DensIj5F.d.ts} +83 -83
  67. package/dist/{documentCaptureStateMachine-BM4Ex_5x.esm.js → documentCaptureStateMachine-CWOATHfE.esm.js} +5 -5
  68. package/dist/dynamic-forms.d.ts +1 -1
  69. package/dist/dynamic-forms.esm.js +2 -2
  70. package/dist/{dynamicFormsManager-fhK0yINk.d.ts → dynamicFormsManager-D5R_uxLQ.d.ts} +25 -3
  71. package/dist/{dynamicFormsManager-fFVIRBNv.esm.js → dynamicFormsManager-Dt98SDfV.esm.js} +16 -5
  72. package/dist/{dynamicFormsStateMachine-D6D7oEYk.esm.js → dynamicFormsStateMachine-obKr4IIp.esm.js} +35 -3
  73. package/dist/ekyb.d.ts +1 -1
  74. package/dist/ekyb.esm.js +3 -3
  75. package/dist/{ekybManager-Y3MkoXpC.esm.js → ekybManager-DNZKrKF3.esm.js} +2 -2
  76. package/dist/{ekybStateMachine-3nlnqdlr.esm.js → ekybStateMachine-DjhHQXZ8.esm.js} +3 -3
  77. package/dist/ekyc.esm.js +2 -2
  78. package/dist/{ekycManager-DgT48ky6.esm.js → ekycManager-CmQBpeiI.esm.js} +2 -2
  79. package/dist/{ekycStateMachine-CQwqiR-R.esm.js → ekycStateMachine-CmdW2gVm.esm.js} +2 -2
  80. package/dist/electronic-signature.d.ts +3 -3
  81. package/dist/electronic-signature.esm.js +2 -2
  82. package/dist/electronicSignatureManager-Ds-KEVTq.d.ts +2786 -0
  83. package/dist/{electronicSignatureManager-DGbAJ00W.esm.js → electronicSignatureManager-DzulxM4_.esm.js} +357 -51
  84. package/dist/email.esm.js +2 -2
  85. package/dist/{emailManager-BY0jeYwR.esm.js → emailManager-B5ek_UfM.esm.js} +2 -2
  86. package/dist/{emailStateMachine-Crw8QVmc.esm.js → emailStateMachine-CyPFZ7dW.esm.js} +1 -1
  87. package/dist/{endpoints-CCzL3XD_.esm.js → endpoints-D3B9mUHh.esm.js} +24 -7
  88. package/dist/{events-DYiyoSlx.esm.js → events-ijlbX_Wx.esm.js} +2 -2
  89. package/dist/events.d.ts +1 -1
  90. package/dist/events.esm.js +1 -1
  91. package/dist/extensibility.d.ts +24 -64
  92. package/dist/extensibility.esm.js +35 -29
  93. package/dist/face-match.esm.js +2 -2
  94. package/dist/{faceCaptureManagerFactory-BxWPpxyd.d.ts → faceCaptureManagerFactory-CvtqcLxs.d.ts} +87 -54
  95. package/dist/{faceCaptureManagerFactory-CVnZ0fa5.esm.js → faceCaptureManagerFactory-pCmG4MeF.esm.js} +68 -7
  96. package/dist/faceCaptureSetup-BSextack.esm.js +2106 -0
  97. package/dist/{faceMatchManager-Ri4UbNz0.esm.js → faceMatchManager-Caal2zyV.esm.js} +2 -2
  98. package/dist/{faceMatchStateMachine-20DdZ3jg.esm.js → faceMatchStateMachine-BUc5FXYy.esm.js} +1 -1
  99. package/dist/{feature-management-CPQ4qv3F.esm.js → feature-management-B0sGlozZ.esm.js} +32 -7
  100. package/dist/feature-management.d.ts +1 -1
  101. package/dist/feature-management.esm.js +1 -1
  102. package/dist/field-comparison.esm.js +1 -1
  103. package/dist/{fieldComparisonManager-Cg6kPQQx.esm.js → fieldComparisonManager-BIs6HPJG.esm.js} +2 -2
  104. package/dist/fiscal-qr.d.ts +2 -56
  105. package/dist/fiscal-qr.esm.js +2 -308
  106. package/dist/fiscalQrManager-Bp_-3LJr.esm.js +34131 -0
  107. package/dist/fiscalQrManager-CHcBJwUM.d.ts +68 -0
  108. package/dist/flow-events.d.ts +1 -1
  109. package/dist/flow.d.ts +212 -185
  110. package/dist/flow.esm.js +119 -30
  111. package/dist/{flowCompletionService-tfeoGre9.esm.js → flowCompletionService-CLtbWhSK.esm.js} +2 -2
  112. package/dist/{flowServices-f5Ruz7R9.esm.js → flowServices-B5FwukTQ.esm.js} +91 -26
  113. package/dist/geolocation.esm.js +2 -2
  114. package/dist/{geolocationManager-CH6RfqFH.esm.js → geolocationManager-DIw-xq9a.esm.js} +2 -2
  115. package/dist/{geolocationStateMachine-DmbWFely.esm.js → geolocationStateMachine-DpG0TFOU.esm.js} +3 -3
  116. package/dist/getBrowser-CBiibsL-.esm.js +19 -0
  117. package/dist/{getBrowser-DNrQeL4T.esm.js → getBrowser-Cbe1C4Tn.esm.js} +2 -1
  118. package/dist/{getDeviceClass-9y-kbVDw.esm.js → getDeviceClass-5NYZg9s6.esm.js} +2 -2
  119. package/dist/getParsedUserAgent-B2iFDql1.esm.js +1278 -0
  120. package/dist/government-validation.d.ts +2 -85
  121. package/dist/government-validation.esm.js +3 -120
  122. package/dist/governmentValidationManager-D02vT4yY.d.ts +63 -0
  123. package/dist/governmentValidationManager-TjC9iVjH.esm.js +79 -0
  124. package/dist/governmentValidationStateMachine-D1ZnEqdd.esm.js +54 -0
  125. package/dist/home.d.ts +1 -1
  126. package/dist/home.esm.js +1 -1
  127. package/dist/id-ocr.d.ts +2 -2
  128. package/dist/id-ocr.esm.js +2 -2
  129. package/dist/id-selfie-flow.d.ts +3 -2
  130. package/dist/id-selfie-flow.esm.js +11 -10
  131. package/dist/id-verification.esm.js +2 -2
  132. package/dist/id.d.ts +29 -5
  133. package/dist/id.esm.js +48 -46
  134. package/dist/idCaptureDefaults-BcxjQDI3.esm.js +484 -0
  135. package/dist/{idCaptureManager-CqrqSjJV.d.ts → idCaptureManager-CvmHOWWd.d.ts} +227 -39
  136. package/dist/{idCaptureManager-BYwTZ2H8.esm.js → idCaptureManager-Vby8oYqh.esm.js} +259 -46
  137. package/dist/{idCaptureServices-44kwQItl.esm.js → idCaptureServices-CJIxD9ep.esm.js} +342 -31
  138. package/dist/idCaptureStateMachine-CmqihkUy.esm.js +5343 -0
  139. package/dist/{idOcrManager-DXc_xRN7.d.ts → idOcrManager-BF_cXZq8.d.ts} +1 -1
  140. package/dist/{idOcrManager-BIQYQXXj.esm.js → idOcrManager-DHU22hVn.esm.js} +2 -2
  141. package/dist/{idOcrStateMachine-cSxzHpHt.esm.js → idOcrStateMachine-33UvRAHE.esm.js} +1 -1
  142. package/dist/{idVerificationManager-JpV_SAsl.esm.js → idVerificationManager-CyaixD0D.esm.js} +2 -2
  143. package/dist/{idVerificationStateMachine-nPeUNyFq.esm.js → idVerificationStateMachine-BPGrQZEm.esm.js} +1 -1
  144. package/dist/identity-reuse.esm.js +2 -2
  145. package/dist/{identityReuseManager-kNCg9AbD.esm.js → identityReuseManager-CWaNHBO3.esm.js} +2 -2
  146. package/dist/{identityReuseStateMachine-DyulxDjP.esm.js → identityReuseStateMachine-CQgnATo5.esm.js} +1 -1
  147. package/dist/{index-CLMF0QLQ.d.ts → index-DLcJT5YP.d.ts} +1 -1
  148. package/dist/index.d.ts +1 -1
  149. package/dist/index.esm.js +1 -1
  150. package/dist/{invokeOnCaptureCallback-GpvMuz9o.esm.js → invokeOnCaptureCallback-BjzPjJ_p.esm.js} +1 -1
  151. package/dist/mandatory-consent.d.ts +2 -2
  152. package/dist/mandatory-consent.esm.js +2 -2
  153. package/dist/{mandatoryConsentManager-DyPzUmsZ.d.ts → mandatoryConsentManager-CJSyhTpi.d.ts} +5 -5
  154. package/dist/{mandatoryConsentManager-B4Niyg_u.esm.js → mandatoryConsentManager-Du-m-tZ_.esm.js} +2 -2
  155. package/dist/{mandatoryConsentStateMachine-B4-1u-L8.esm.js → mandatoryConsentStateMachine-DSDAk7WZ.esm.js} +1 -1
  156. package/dist/multipartRecordingService-B3C_zlev.esm.js +594 -0
  157. package/dist/{permissionGuards-KINpmKtI.esm.js → permissionGuards-uYZYFu4J.esm.js} +1 -1
  158. package/dist/{permissionServices-UvUcOSRb.esm.js → permissionServices-Bj_fyWtv.esm.js} +5 -5
  159. package/dist/personhood.d.ts +6 -5
  160. package/dist/personhood.esm.js +10 -10
  161. package/dist/phone.esm.js +2 -2
  162. package/dist/{phoneManager-FsJ0W2Ei.esm.js → phoneManager-N1-sbrY4.esm.js} +2 -2
  163. package/dist/{phoneStateMachine-Ba0wKHyX.esm.js → phoneStateMachine-jl8LJKCo.esm.js} +1 -1
  164. package/dist/{platform-BJrm5nzZ.esm.js → platform-DkcRc9JV.esm.js} +29 -1
  165. package/dist/qe-signature.d.ts +5 -3
  166. package/dist/qe-signature.esm.js +2 -2
  167. package/dist/recordingsRepository-CCWy13M-.esm.js +72 -0
  168. package/dist/redirect-to-mobile.esm.js +2 -2
  169. package/dist/{redirectToMobileManager-y4VQB11M.esm.js → redirectToMobileManager-DsFzdTwA.esm.js} +2 -2
  170. package/dist/{redirectToMobileStateMachine-Cyv2x0PP.esm.js → redirectToMobileStateMachine-v3otpT-L.esm.js} +1 -1
  171. package/dist/{rolldown-runtime-FZ4Itg2g.esm.js → rolldown-runtime-FDOR9p9I.esm.js} +1 -19
  172. package/dist/{runChildModule-Dukuw23X.esm.js → runChildModule-TuyGE00X.esm.js} +3 -21
  173. package/dist/safeStorage-B-trhxg6.esm.js +423 -0
  174. package/dist/{sdkVersion-D1Bm59g6.esm.js → sdkVersion-CLxKvdyz.esm.js} +1 -1
  175. package/dist/selfie.d.ts +5 -5
  176. package/dist/selfie.esm.js +14 -76
  177. package/dist/{selfieErrorUtils-C2PYBVsp.esm.js → selfieErrorUtils-C77GXJH6.esm.js} +30 -4
  178. package/dist/{selfieManager-Bj6B2ZVy.esm.js → selfieManager-CihVnODO.esm.js} +5 -5
  179. package/dist/{selfieManager-DwlCppg0.d.ts → selfieManager-D1KRJ39M.d.ts} +8 -11
  180. package/dist/selfieStateMachine-fwMmNtOi.esm.js +69 -0
  181. package/dist/{session-BFdLgN4i.esm.js → session-BHIeAamR.esm.js} +4 -5
  182. package/dist/session.d.ts +21 -11
  183. package/dist/session.esm.js +5 -5
  184. package/dist/{sessionInitializer-dlfDehHk.esm.js → sessionInitializer-BLoK7SP9.esm.js} +187 -68
  185. package/dist/{setup-BgoWtvIS.d.ts → setup-Cv-JM9QC.d.ts} +63 -69
  186. package/dist/{setup-BIAtLa8k.esm.js → setup-msLybMbC.esm.js} +226 -100
  187. package/dist/signature.esm.js +2 -2
  188. package/dist/{signatureManager-Ca43yhwk.esm.js → signatureManager-ChsB-nMD.esm.js} +2 -2
  189. package/dist/{signatureStateMachine-K1LMRrxG.esm.js → signatureStateMachine-BHPwkJZS.esm.js} +1 -1
  190. package/dist/{src-0Jurt29N.esm.js → src-35ekGRzK.esm.js} +1 -1
  191. package/dist/{stats-B0nFKawG.esm.js → stats-DkK-f8JT.esm.js} +1 -1
  192. package/dist/stats.esm.js +1 -1
  193. package/dist/{trueSightService---iW2KKJ.esm.js → trueSightService-CKrrfV0Q.esm.js} +7 -7
  194. package/dist/trust-graph.esm.js +1 -1
  195. package/dist/{types-BX_XkMsQ2.d.ts → types-9_esGTPj.d.ts} +1 -1
  196. package/dist/types-BT_Oalip.d.ts +1 -0
  197. package/dist/{types-DelMqZLe.d.ts → types-BjSly8cp.d.ts} +1 -1
  198. package/dist/{types-Hmd7U0JA.d.ts → types-CM-jtjJ2.d.ts} +6 -81
  199. package/dist/{types-Bdf8_LYB2.d.ts → types-CjKBS37a2.d.ts} +303 -13
  200. package/dist/{types-DVmXIdzW.d.ts → types-D0gekt4U.d.ts} +38 -5
  201. package/dist/types-DgDvvzg0.d.ts +10 -0
  202. package/dist/{types-KPvmag_B.d.ts → types-Do5rEXij.d.ts} +7 -4
  203. package/dist/types-ZT1XFIJ8.d.ts +6 -0
  204. package/dist/video-selfie.d.ts +59 -35
  205. package/dist/video-selfie.esm.js +510 -601
  206. package/dist/{videoSelfieCameraWarmer-NEhFZvWx.esm.js → videoSelfieCameraWarmer-CB1IzZkt.esm.js} +14 -153
  207. package/dist/videoSelfieFlowModuleMachine-BUe2uACW.esm.js +32 -0
  208. package/dist/{videoSelfieStepDetector-D3oo2ofo.d.ts → videoSelfieStepDetector-5YHFe0Mq.d.ts} +21 -5
  209. package/dist/virtualCameraCheck-WOloJ-do.esm.js +48 -0
  210. package/dist/warmup-CUUnwYxe.esm.js +714 -0
  211. package/dist/warmup-Cis2p6O0.d.ts +128 -0
  212. package/dist/wasm.d.ts +30 -6
  213. package/dist/wasm.esm.js +36 -4
  214. package/dist/{wasmDsFlagSync-BqUCwLY8.esm.js → wasmDsFlagSync-B2e8p268.esm.js} +2 -2
  215. package/dist/{wasmWebClient-DM8lkb0z.esm.js → wasmWebClient-B7baE-Wf.esm.js} +358 -28
  216. package/dist/watchlist-for-business.d.ts +2 -78
  217. package/dist/watchlist-for-business.esm.js +3 -102
  218. package/dist/watchlist.esm.js +2 -2
  219. package/dist/watchlistForBusinessManager-CpuuB1J2.esm.js +107 -0
  220. package/dist/watchlistForBusinessManager-CsnJnG-C.d.ts +99 -0
  221. package/dist/{watchlistForBusinessStateMachine-CxFnlshm.esm.js → watchlistForBusinessStateMachine-DEzgjz7C.esm.js} +13 -6
  222. package/dist/{watchlistManager-LoNZH9qm.esm.js → watchlistManager-CI8BHFob.esm.js} +2 -2
  223. package/dist/{watchlistStateMachine-DIKQDoUT.esm.js → watchlistStateMachine-DvOby3a-.esm.js} +1 -1
  224. package/dist/workflow.d.ts +12 -8
  225. package/dist/workflow.esm.js +48 -39
  226. package/package.json +4 -10
  227. package/dist/BrowserStorageProvider-k-FDkC4W.esm.js +0 -67
  228. package/dist/FaceDetectionProvider-Mh6q3EbA.d.ts +0 -349
  229. package/dist/IFaceAvatarCapability-BrL19G0s.d.ts +0 -23
  230. package/dist/IStorageCapability-ORkQfK3F.d.ts +0 -242
  231. package/dist/OpenViduRecordingProvider-Du98qevC.esm.js +0 -85
  232. package/dist/createFaceAvatar-BEj18KXi.d.ts +0 -50
  233. package/dist/document-upload.d.ts +0 -325
  234. package/dist/document-upload.esm.js +0 -197
  235. package/dist/electronicSignatureManager-CcUXQZS7.d.ts +0 -1300
  236. package/dist/faceCaptureSetup-Cd-04W_X.esm.js +0 -863
  237. package/dist/getBrowser-Cb8Zgrgp.esm.js +0 -7
  238. package/dist/getParsedUserAgent-pJjATANs.esm.js +0 -1622
  239. package/dist/governmentValidationStateMachine-CK9DrZXX.esm.js +0 -226
  240. package/dist/idCaptureDefaults-WeHbQM7W.esm.js +0 -225
  241. package/dist/idCaptureStateMachine-kZ5OpdfM.esm.js +0 -3342
  242. package/dist/lib-DAyUtOTj.esm.js +0 -12420
  243. package/dist/manualReviewService-D4IkipnN.esm.js +0 -15
  244. package/dist/mediaRecorderOptions-dALSV8af.esm.js +0 -40
  245. package/dist/onDeviceFaceResults-CUHwyZT4.esm.js +0 -646
  246. package/dist/openviduLazy-CCDpFWg1.esm.js +0 -10
  247. package/dist/recordingService-3NSENVwp.esm.js +0 -329
  248. package/dist/safeStorage-Ep56I-f_.esm.js +0 -982
  249. package/dist/selfieStateMachine-CHV_WNst.esm.js +0 -55
  250. package/dist/trueSight-B_icM8r2.esm.js +0 -1
  251. package/dist/types-EELWyWpd.d.ts +0 -6
  252. package/dist/types-Vb4P9ovf.d.ts +0 -22
  253. package/dist/warmup-Dv2alr2-.d.ts +0 -82
  254. package/dist/wasmDefaults-DTUrftxR.esm.js +0 -125
  255. package/dist/{Face2DProvider-UUQt_vRC.esm.js → Face2DProvider-BF48sz5c.esm.js} +1 -1
  256. package/dist/{PrivacyLensProvider-D8PS7AJa.esm.js → PrivacyLensProvider-EwnC_C5n.esm.js} +1 -1
  257. /package/dist/{types-BfgmV7s72.d.ts → types-BfgmV7s7.d.ts} +0 -0
  258. /package/dist/{types-CJ7Yl9K-2.d.ts → types-CJ7Yl9K-.d.ts} +0 -0
@@ -1,3 +1,105 @@
1
+ //#region ../infra/src/wasm/wasmAssets.ts
2
+ const WASM_MODEL_FILES = {
3
+ idCapture: "id_capture_2_01_fp16.ortmodelv2",
4
+ idFiqa: "id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2",
5
+ idFaceDetector: "id_facedetector_v2_1_fp16.ortmodelv2",
6
+ barcode: "barcode_enhance_896x224_fp16.ortmodelv2",
7
+ selfie: "selfie_bf_angles_192x192_opset9_fp16.ortmodelv2",
8
+ faceAttributes: "face_attributes_v1_3_fp16.ortmodelv2",
9
+ faceOcclusion: "face_occlusion_v0_2_fp16.ortmodelv2",
10
+ mlsRegressor: "mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2",
11
+ liveness: "ondevice_physical_liveness_v2_1_fp16.ortmodelv2",
12
+ ageEstimation: "age_estimation_v2_2_2_fp16.ortmodelv2"
13
+ };
14
+ const WASM_PIPELINE_MODEL_NAMES = {
15
+ selfie: [
16
+ "selfie",
17
+ "faceAttributes",
18
+ "mlsRegressor",
19
+ "faceOcclusion"
20
+ ],
21
+ onDeviceSelfie: [
22
+ "selfie",
23
+ "faceAttributes",
24
+ "mlsRegressor",
25
+ "faceOcclusion",
26
+ "liveness",
27
+ "ageEstimation"
28
+ ],
29
+ idCapture: ["idCapture", "idFiqa"],
30
+ videoSelfie: [
31
+ "selfie",
32
+ "faceAttributes",
33
+ "mlsRegressor",
34
+ "faceOcclusion"
35
+ ],
36
+ videoSelfieId: ["idCapture"]
37
+ };
38
+ const WASM_PIPELINE_LAZY_MODEL_NAMES = {
39
+ selfie: [],
40
+ onDeviceSelfie: [],
41
+ idCapture: ["barcode"],
42
+ videoSelfie: [],
43
+ videoSelfieId: []
44
+ };
45
+ /**
46
+ * Models a pipeline's Core workflow profiles can use but that a pre-existing
47
+ * self-hosted configuration is NOT required to supply. Deliberately not part of
48
+ * `defineWasm`'s required set: adding a model to a released pipeline's required
49
+ * list is a breaking change for every self-hoster following the published
50
+ * WASM-Configuration walkthrough. When an optional model is absent, warmup skips
51
+ * the Core profile that needs it instead of failing.
52
+ */
53
+ const WASM_PIPELINE_OPTIONAL_MODEL_NAMES = {
54
+ selfie: [],
55
+ onDeviceSelfie: [],
56
+ idCapture: ["idFaceDetector"],
57
+ videoSelfie: [],
58
+ videoSelfieId: []
59
+ };
60
+ const MODEL_VARIANT_DIRECTORIES = ["current", "legacy"];
61
+ /**
62
+ * ml-wasm-kit publishes every model twice under a release's `models/`
63
+ * directory: `models/current/` pairs with the SIMD binary, `models/legacy/`
64
+ * with the non-SIMD fallback. Both URLs are built up front so the loader can
65
+ * pick one after the SIMD probe without rewriting strings — a base path is not
66
+ * required to contain a `models` segment, and the CDN answers a variant-less
67
+ * model path with a 200 HTML placeholder rather than a 404.
68
+ */
69
+ function buildModelVariantSources(modelsBasePath, fileName) {
70
+ let base = modelsBasePath;
71
+ while (base.endsWith("/")) base = base.slice(0, -1);
72
+ const lastSegment = base.slice(base.lastIndexOf("/") + 1);
73
+ if (MODEL_VARIANT_DIRECTORIES.includes(lastSegment)) return `${base}/${fileName}`;
74
+ return {
75
+ current: `${base}/current/${fileName}`,
76
+ legacy: `${base}/legacy/${fileName}`
77
+ };
78
+ }
79
+ const WASM_PIPELINE_MODELS = {
80
+ selfie: WASM_PIPELINE_MODEL_NAMES.selfie.map((model) => WASM_MODEL_FILES[model]),
81
+ onDeviceSelfie: WASM_PIPELINE_MODEL_NAMES.onDeviceSelfie.map((model) => WASM_MODEL_FILES[model]),
82
+ idCapture: WASM_PIPELINE_MODEL_NAMES.idCapture.map((model) => WASM_MODEL_FILES[model]),
83
+ videoSelfie: WASM_PIPELINE_MODEL_NAMES.videoSelfie.map((model) => WASM_MODEL_FILES[model]),
84
+ videoSelfieId: WASM_PIPELINE_MODEL_NAMES.videoSelfieId.map((model) => WASM_MODEL_FILES[model])
85
+ };
86
+ async function resolveWasmSource(source, kind) {
87
+ if (source instanceof Uint8Array) return source;
88
+ if (source instanceof ArrayBuffer) return new Uint8Array(source);
89
+ let response;
90
+ try {
91
+ response = await fetch(source);
92
+ } catch (error) {
93
+ const detail = error instanceof Error ? error.message : String(error);
94
+ throw new Error(`[Incode SDK] Could not load the WASM ${kind} at ${source}: ${detail}`);
95
+ }
96
+ if (!response.ok) throw new Error(`[Incode SDK] Could not load the WASM ${kind} at ${source}: ${response.status} ${response.statusText}`);
97
+ return new Uint8Array(await response.arrayBuffer());
98
+ }
99
+ function missingWasmModelError(fileName, pipeline) {
100
+ return /* @__PURE__ */ new Error(`[Incode SDK] The "${pipeline}" pipeline needs ${fileName}, but the self-hosted WASM configuration does not provide it.`);
101
+ }
102
+ //#endregion
1
103
  //#region ../infra/src/wasm/wasmPathUtils.ts
2
104
  function deriveSiblingJsPath(wasmPath) {
3
105
  const index = wasmPath.lastIndexOf(".wasm");
@@ -106,12 +208,191 @@ var SemaphoreProvider = class {
106
208
  }
107
209
  };
108
210
  //#endregion
211
+ //#region ../infra/src/wasm/wasmStorageFallback.ts
212
+ /**
213
+ * SDK-local compatibility fallback for ml-wasm-kit releases whose embind
214
+ * storage lookups let browser `SecurityError`s escape into JavaScript.
215
+ *
216
+ * The fallback shadows only a denied `window.localStorage` or
217
+ * `window.sessionStorage` property. Available storage and absent/deleted
218
+ * globals are left untouched. A coordinator stored under `Symbol.for(...)`
219
+ * shares the memory stores and leases across multiple bundled SDK copies.
220
+ */
221
+ const STORAGE_NAMES = ["localStorage", "sessionStorage"];
222
+ const COORDINATOR_KEY = Symbol.for("@incodetech/infra/wasm-storage-fallback/v1");
223
+ const COORDINATOR_VERSION = 1;
224
+ const INSTALL_ERROR = "[Incode SDK] Unable to install the WASM in-memory storage fallback.";
225
+ let probeSequence = 0;
226
+ function createMemoryStorage() {
227
+ const values = /* @__PURE__ */ new Map();
228
+ return {
229
+ get length() {
230
+ return values.size;
231
+ },
232
+ clear() {
233
+ values.clear();
234
+ },
235
+ getItem(key) {
236
+ return values.get(String(key)) ?? null;
237
+ },
238
+ key(index) {
239
+ return Array.from(values.keys())[Number(index)] ?? null;
240
+ },
241
+ removeItem(key) {
242
+ values.delete(String(key));
243
+ },
244
+ setItem(key, value) {
245
+ values.set(String(key), String(value));
246
+ }
247
+ };
248
+ }
249
+ function isDeniedStorageError(error) {
250
+ if (typeof error !== "object" || error === null || !("name" in error)) return false;
251
+ const name = Reflect.get(error, "name");
252
+ return name === "SecurityError" || name === "QuotaExceededError";
253
+ }
254
+ function probeStorage(name) {
255
+ const descriptor = Object.getOwnPropertyDescriptor(window, name);
256
+ let storage;
257
+ try {
258
+ storage = window[name];
259
+ } catch (error) {
260
+ if (isDeniedStorageError(error)) return {
261
+ status: "denied",
262
+ descriptor
263
+ };
264
+ throw error;
265
+ }
266
+ if (storage == null) return { status: "absent" };
267
+ probeSequence += 1;
268
+ const key = `__incode_wasm_storage_probe_${Date.now()}_${probeSequence}`;
269
+ try {
270
+ storage.setItem(key, key);
271
+ if (storage.getItem(key) !== key) throw new DOMException("Storage probe did not retain its value.", "SecurityError");
272
+ storage.removeItem(key);
273
+ return { status: "available" };
274
+ } catch (error) {
275
+ try {
276
+ storage.removeItem(key);
277
+ } catch {}
278
+ if (isDeniedStorageError(error)) return {
279
+ status: "denied",
280
+ descriptor
281
+ };
282
+ throw error;
283
+ }
284
+ }
285
+ function isCoordinator(value) {
286
+ return typeof value === "object" && value !== null && Reflect.get(value, "version") === COORDINATOR_VERSION && Reflect.get(value, "leases") instanceof Set && Reflect.get(value, "shadows") instanceof Map;
287
+ }
288
+ function readCoordinator() {
289
+ const value = Reflect.get(window, COORDINATOR_KEY);
290
+ if (value === void 0) return null;
291
+ if (!isCoordinator(value)) throw new Error(INSTALL_ERROR);
292
+ return value;
293
+ }
294
+ function restoreShadow(name, shadow) {
295
+ if (Object.getOwnPropertyDescriptor(window, name)?.get !== shadow.installedGetter) return;
296
+ if (shadow.originalDescriptor) Object.defineProperty(window, name, shadow.originalDescriptor);
297
+ else Reflect.deleteProperty(window, name);
298
+ }
299
+ function installDeniedShadows(coordinator) {
300
+ const installed = [];
301
+ try {
302
+ for (const name of STORAGE_NAMES) {
303
+ if (coordinator.shadows.has(name)) continue;
304
+ const probe = probeStorage(name);
305
+ if (probe.status !== "denied") continue;
306
+ if (probe.descriptor && !probe.descriptor.configurable) throw new Error(INSTALL_ERROR);
307
+ const memory = createMemoryStorage();
308
+ const installedGetter = () => memory;
309
+ const shadow = {
310
+ originalDescriptor: probe.descriptor,
311
+ installedGetter,
312
+ memory
313
+ };
314
+ Object.defineProperty(window, name, {
315
+ configurable: true,
316
+ enumerable: probe.descriptor?.enumerable ?? true,
317
+ get: installedGetter
318
+ });
319
+ coordinator.shadows.set(name, shadow);
320
+ installed.push(name);
321
+ }
322
+ return installed;
323
+ } catch (error) {
324
+ for (const name of installed.reverse()) {
325
+ const shadow = coordinator.shadows.get(name);
326
+ coordinator.shadows.delete(name);
327
+ if (shadow) {
328
+ restoreShadow(name, shadow);
329
+ shadow.memory.clear();
330
+ }
331
+ }
332
+ throw error;
333
+ }
334
+ }
335
+ function restoreCoordinator(coordinator) {
336
+ let firstError;
337
+ for (const [name, shadow] of coordinator.shadows) {
338
+ try {
339
+ restoreShadow(name, shadow);
340
+ } catch (error) {
341
+ firstError ??= error;
342
+ }
343
+ shadow.memory.clear();
344
+ }
345
+ coordinator.shadows.clear();
346
+ if (Reflect.get(window, COORDINATOR_KEY) === coordinator) Reflect.deleteProperty(window, COORDINATOR_KEY);
347
+ if (firstError !== void 0) throw firstError;
348
+ }
349
+ /**
350
+ * Acquires a shared fallback lease when storage access is denied.
351
+ *
352
+ * The caller must retain the lease for the complete native-handle lifetime;
353
+ * ml-wasm-kit performs storage lookups during constructors and later calls.
354
+ */
355
+ function acquireWasmStorageFallback() {
356
+ if (typeof window === "undefined") return null;
357
+ let coordinator = readCoordinator();
358
+ const created = coordinator === null;
359
+ coordinator ??= {
360
+ version: COORDINATOR_VERSION,
361
+ leases: /* @__PURE__ */ new Set(),
362
+ shadows: /* @__PURE__ */ new Map()
363
+ };
364
+ if (created) Object.defineProperty(window, COORDINATOR_KEY, {
365
+ configurable: true,
366
+ enumerable: false,
367
+ value: coordinator
368
+ });
369
+ try {
370
+ installDeniedShadows(coordinator);
371
+ } catch (error) {
372
+ if (created) Reflect.deleteProperty(window, COORDINATOR_KEY);
373
+ throw error;
374
+ }
375
+ if (coordinator.shadows.size === 0) {
376
+ if (created) Reflect.deleteProperty(window, COORDINATOR_KEY);
377
+ return null;
378
+ }
379
+ const token = Symbol("wasm-storage-fallback-lease");
380
+ coordinator.leases.add(token);
381
+ let released = false;
382
+ return { release() {
383
+ if (released) return;
384
+ released = true;
385
+ coordinator.leases.delete(token);
386
+ if (coordinator.leases.size === 0) restoreCoordinator(coordinator);
387
+ } };
388
+ }
389
+ //#endregion
109
390
  //#region ../infra/src/wasm/apiUtilities.ts
110
391
  /**
111
392
  * Shared WASM module loader.
112
393
  *
113
394
  * The pinned `webLib.wasm` (see `wasmDefaults.ts`) bundles BOTH the ML pipeline
114
- * APIs (used by `mlWasmJSApi.ts`) AND a C++ `WebClient` HTTP client (used by
395
+ * APIs (loaded by `WasmRuntime.ts`) AND a C++ `WebClient` HTTP client (used by
115
396
  * `wasmWebClient.ts`). Both consumers must share a single instantiated
116
397
  * `wasmModule` — calling the glue `Module()` factory twice would re-instantiate
117
398
  * the WASM heap and produce divergent state.
@@ -130,7 +411,7 @@ var SemaphoreProvider = class {
130
411
  if (typeof window !== "undefined" && window.wasmArrayBuffer === void 0) window.wasmArrayBuffer = null;
131
412
  let loadPromise = null;
132
413
  let loadedResult = null;
133
- async function importGlue(glueCodePath) {
414
+ async function importGlueAt(glueCodePath) {
134
415
  const mod = await import(
135
416
  /* @vite-ignore */
136
417
  /* webpackIgnore: true */
@@ -139,15 +420,18 @@ async function importGlue(glueCodePath) {
139
420
  if (typeof mod.Module !== "function") throw new Error(`WASM glue at ${glueCodePath} did not export a Module factory`);
140
421
  return mod.Module;
141
422
  }
142
- async function fetchWasmBinary(libPath) {
143
- const response = await fetch(libPath);
144
- if (!response.ok) throw new Error(`Failed to fetch WASM binary at ${libPath}: ${response.status} ${response.statusText}`);
145
- const buffer = await response.arrayBuffer();
146
- return new Uint8Array(buffer);
423
+ async function resolveGlue(loader, glueCodePath) {
424
+ if (loader) {
425
+ const module = await loader();
426
+ if (typeof module.Module !== "function") throw new Error("[Incode SDK] WASM glue module did not export a Module factory.");
427
+ return module.Module;
428
+ }
429
+ if (!glueCodePath) throw new Error("WASM glue code is required");
430
+ return await importGlueAt(glueCodePath);
147
431
  }
148
432
  async function instantiate(factory, libPath) {
149
- window.wasmArrayBuffer = await fetchWasmBinary(libPath);
150
- return await factory();
433
+ window.wasmArrayBuffer = await resolveWasmSource(libPath, "binary");
434
+ return await factory({ wasmBinary: window.wasmArrayBuffer });
151
435
  }
152
436
  /**
153
437
  * Load the WASM module, memoized. Subsequent calls return the same instance.
@@ -161,11 +445,13 @@ async function loadWasmModule(config) {
161
445
  if (loadedResult) return loadedResult;
162
446
  if (loadPromise) return loadPromise;
163
447
  loadPromise = (async () => {
448
+ let storageFallbackLease = null;
164
449
  try {
450
+ storageFallbackLease = acquireWasmStorageFallback();
165
451
  const wantSimd = config.useSimd !== false;
166
452
  const simdBinary = config.wasmSimdPath ?? config.wasmPath;
167
453
  if (wantSimd && simdBinary !== config.wasmPath) try {
168
- const simdFactory = await importGlue(config.glueCodeSimdPath ?? deriveSiblingJsPath(simdBinary));
454
+ const simdFactory = await resolveGlue(config.loadGlueSimd, typeof simdBinary === "string" ? config.glueCodeSimdPath || deriveSiblingJsPath(simdBinary) : config.glueCodeSimdPath);
169
455
  window.Module = simdFactory;
170
456
  const result = {
171
457
  wasmModule: await instantiate(simdFactory, simdBinary),
@@ -176,7 +462,7 @@ async function loadWasmModule(config) {
176
462
  } catch (simdError) {
177
463
  console.warn("[Incode SDK] SIMD WASM load failed, falling back to non-SIMD", simdError);
178
464
  }
179
- const nonSimdFactory = await importGlue(config.glueCodePath);
465
+ const nonSimdFactory = await resolveGlue(config.loadGlue, config.glueCodePath);
180
466
  window.Module = nonSimdFactory;
181
467
  const result = {
182
468
  wasmModule: await instantiate(nonSimdFactory, config.wasmPath),
@@ -187,16 +473,66 @@ async function loadWasmModule(config) {
187
473
  } catch (error) {
188
474
  loadPromise = null;
189
475
  throw error;
476
+ } finally {
477
+ storageFallbackLease?.release();
190
478
  }
191
479
  })();
192
480
  return loadPromise;
193
481
  }
194
482
  //#endregion
195
483
  //#region ../infra/src/wasm/wasmCallUtils.ts
196
- async function wasmCallWrapper(concurrency, wasmMethod, useSemaphore = true, ...args) {
484
+ /**
485
+ * Poll bound applied to the ML long-poll call sites (`prc` / `poc` / `rsp` in
486
+ * `utilityWasmApi.ts`).
487
+ *
488
+ * Count-based, not deadline-based: the poll loop yields with `setTimeout(0)`,
489
+ * which background tabs throttle to >= 1s per tick, so a wall-clock deadline
490
+ * would false-trip whenever the user backgrounds the page. A count bounds the
491
+ * number of C++ invocations regardless of how slowly the event loop turns.
492
+ *
493
+ * 3000 is deliberately generous. `prc` alone burns ~750 idle polls waiting on
494
+ * the ~3s of camera frames the C++ side needs before it reports done, so the
495
+ * bound sits well above the legitimate worst case. It exists to break a
496
+ * permanently stuck poll that would otherwise hold the ML semaphore forever and
497
+ * freeze detection — not to enforce a latency budget.
498
+ */
499
+ const ML_CALL_MAX_POLLS = 3e3;
500
+ /**
501
+ * Thrown when a bounded {@link wasmCallWrapper} poll exhausts `maxPolls` without
502
+ * the C++ method reporting completion.
503
+ *
504
+ * The semaphore is always released before this surfaces — the lock is held in a
505
+ * `withLock` `finally` — so a timeout frees the ML slot for the next caller
506
+ * instead of deadlocking it.
507
+ */
508
+ var WasmPollTimeoutError = class extends Error {
509
+ constructor(polls, label) {
510
+ super(`[Incode SDK] WASM call ${label ?? "poll"} did not complete after ${polls} polls`);
511
+ this.name = "WasmPollTimeoutError";
512
+ this.polls = polls;
513
+ this.label = label;
514
+ }
515
+ };
516
+ /**
517
+ * Busy-polls an iterative WASM method until it returns `true`, optionally under
518
+ * a concurrency lock.
519
+ *
520
+ * @param concurrency - semaphore used when `useSemaphore` is true.
521
+ * @param wasmMethod - zero-arg closure over the C++ call; `false` means "call me
522
+ * again", `true` means done. Bind any arguments in the closure.
523
+ * @param useSemaphore - `false` bypasses the lock (caller already holds one, or
524
+ * is provably the only caller).
525
+ * @param options - see {@link WasmPollOptions}. `maxPolls` omitted = unbounded.
526
+ * @throws {WasmPollTimeoutError} when `maxPolls` is exhausted.
527
+ */
528
+ async function wasmCallWrapper(concurrency, wasmMethod, useSemaphore = true, options = {}) {
529
+ const { maxPolls, label } = options;
197
530
  const innerCall = async () => {
531
+ let polls = 0;
198
532
  while (true) {
199
- if (wasmMethod(...args)) return;
533
+ polls++;
534
+ if (wasmMethod()) return;
535
+ if (maxPolls !== void 0 && polls >= maxPolls) throw new WasmPollTimeoutError(polls, label);
200
536
  await new Promise((resolve) => setTimeout(resolve, 0));
201
537
  }
202
538
  };
@@ -212,8 +548,9 @@ async function wasmCallWrapper(concurrency, wasmMethod, useSemaphore = true, ...
212
548
  * JavaScript bridge for the C++ `WebClient` exposed by `webLib.wasm`.
213
549
  *
214
550
  * The pinned WASM bundle ships a `WebClient` class alongside the ML pipeline
215
- * APIs. This module instantiates it once (sharing the singleton `wasmModule`
216
- * with `mlWasmJSApi`) and exposes a small TypeScript-friendly surface that
551
+ * APIs. This module instantiates it once — sharing the one memoized
552
+ * `wasmModule` from `apiUtilities.ts` that `WasmRuntime` also holds as its
553
+ * `wasmModule` field — and exposes a small TypeScript-friendly surface that
217
554
  * `createWasmApi` can drive.
218
555
  *
219
556
  * Concurrency model mirrors the legacy implementation:
@@ -273,27 +610,20 @@ const toStringRecord = (obj) => {
273
610
  /**
274
611
  * Loads the shared WASM module (if not already loaded) and instantiates the
275
612
  * C++ `WebClient`. Idempotent — repeated calls reuse the existing instance.
276
- *
277
- * `glueCodeSimdPath` is paired with `wasmSimdPath` (`webLibSimd.js` for
278
- * `webLibSimd.wasm`). Pass `''` to derive it automatically from
279
- * `wasmSimdPath` by replacing the `.wasm` extension with `.js`.
280
613
  */
281
- async function initializeWasmWebClient(wasmPath, wasmSimdPath, glueCodePath, glueCodeSimdPath, useSimd) {
614
+ async function initializeWasmWebClient(config) {
282
615
  if (webClientApi) return;
283
616
  if (initPromise) return initPromise;
284
617
  initPromise = (async () => {
618
+ let acquiredStorageFallbackLease = null;
285
619
  try {
286
- const { wasmModule } = await loadWasmModule({
287
- wasmPath,
288
- wasmSimdPath,
289
- glueCodePath,
290
- glueCodeSimdPath: glueCodeSimdPath || void 0,
291
- useSimd
292
- });
620
+ acquiredStorageFallbackLease = acquireWasmStorageFallback();
621
+ const { wasmModule } = await loadWasmModule(config);
293
622
  if (!isWebClientWasm(wasmModule)) throw new Error("WASM module does not expose a WebClient class. Update webLib.wasm to a build that includes WebClient.");
294
623
  webClientApi = new wasmModule.WebClient();
295
624
  } catch (error) {
296
625
  initPromise = null;
626
+ acquiredStorageFallbackLease?.release();
297
627
  throw error;
298
628
  }
299
629
  })();
@@ -404,4 +734,4 @@ function ensureReady() {
404
734
  return webClientApi;
405
735
  }
406
736
  //#endregion
407
- export { setWebApiHttpTransport as a, loadWasmModule as c, initializeWasmWebClient as i, SemaphoreProvider as l, createWebApiHostAdapter as n, setupWasmConnection as o, executeWasmRequest as r, wasmCallWrapper as s, WasmWebClientError as t, deriveSiblingJsPath as u };
737
+ export { WASM_PIPELINE_OPTIONAL_MODEL_NAMES as _, setWebApiHttpTransport as a, resolveWasmSource as b, wasmCallWrapper as c, SemaphoreProvider as d, deriveSiblingJsPath as f, WASM_PIPELINE_MODEL_NAMES as g, WASM_PIPELINE_MODELS as h, initializeWasmWebClient as i, loadWasmModule as l, WASM_PIPELINE_LAZY_MODEL_NAMES as m, createWebApiHostAdapter as n, setupWasmConnection as o, WASM_MODEL_FILES as p, executeWasmRequest as r, ML_CALL_MAX_POLLS as s, WasmWebClientError as t, acquireWasmStorageFallback as u, buildModelVariantSources as v, missingWasmModelError as y };
@@ -1,78 +1,2 @@
1
- import { t as Manager } from "./Manager-CQQ99QOI.js";
2
- //#region src/modules/watchlist-for-business/watchlistForBusinessManager.d.ts
3
- /** Waiting for `load()` to be called. */
4
- type WatchlistForBusinessIdleState = {
5
- status: 'idle';
6
- };
7
- /** Form is ready — use `setCountry()`, `setBusinessName()`, and `submit()`. */
8
- type WatchlistForBusinessFormState = {
9
- status: 'form';
10
- country: string;
11
- businessName: string;
12
- isValid: boolean;
13
- };
14
- /** API request in flight. */
15
- type WatchlistForBusinessSubmittingState = {
16
- status: 'submitting';
17
- };
18
- /**
19
- * API succeeded — success screen visible for ~3 s before transitioning
20
- * to `finished`.
21
- */
22
- type WatchlistForBusinessSuccessState = {
23
- status: 'success';
24
- };
25
- /** Module complete. Fires regardless of API outcome (fire-and-forget). */
26
- type WatchlistForBusinessFinishedState = {
27
- status: 'finished';
28
- };
29
- /**
30
- * Discriminated union of all possible watchlist-for-business manager states.
31
- */
32
- type WatchlistForBusinessState = WatchlistForBusinessIdleState | WatchlistForBusinessFormState | WatchlistForBusinessSubmittingState | WatchlistForBusinessSuccessState | WatchlistForBusinessFinishedState;
33
- /**
34
- * Creates a watchlist-for-business manager for headless or UI-driven usage.
35
- *
36
- * On API error the module completes silently (fire-and-forget).
37
- *
38
- * @example Headless usage
39
- * ```typescript
40
- * import { createWatchlistForBusinessManager } from '@incodetech/core/watchlist-for-business';
41
- *
42
- * const manager = createWatchlistForBusinessManager();
43
- * manager.subscribe((state) => {
44
- * if (state.status === 'finished') console.log('Done');
45
- * });
46
- * manager.load();
47
- * manager.setCountry('MX');
48
- * manager.setBusinessName('Acme Corp');
49
- * manager.submit();
50
- * manager.stop();
51
- * ```
52
- */
53
- declare function createWatchlistForBusinessManager(): Manager<WatchlistForBusinessState> & {
54
- /** Transitions from `idle` to the form. Must be called before any other method. */
55
- load(): void;
56
- /** Updates the selected country code (ISO 3166-1 alpha-2). */
57
- setCountry(country: string): void;
58
- /** Updates the business name field and recomputes validity. */
59
- setBusinessName(value: string): void;
60
- /** Submits the form. Only transitions when `isValid` is true. */
61
- submit(): void;
62
- };
63
- type WatchlistForBusinessManager = ReturnType<typeof createWatchlistForBusinessManager>;
64
- //#endregion
65
- //#region src/modules/watchlist-for-business/watchlistForBusinessStateMachine.d.ts
66
- declare const watchlistForBusinessMachine: any;
67
- //#endregion
68
- //#region src/modules/watchlist-for-business/types.d.ts
69
- /**
70
- * Configuration for the watchlist-for-business module.
71
- *
72
- * No server-side configuration is required — the module collects
73
- * country and business name from the user and submits them to the
74
- * business watchlist endpoint.
75
- */
76
- type WatchlistForBusinessConfig = Record<string, never>;
77
- //#endregion
78
- export { type WatchlistForBusinessConfig, type WatchlistForBusinessFinishedState, type WatchlistForBusinessFormState, type WatchlistForBusinessManager, type WatchlistForBusinessState, createWatchlistForBusinessManager, watchlistForBusinessMachine };
1
+ import { a as createWatchlistForBusinessManager, c as WatchlistForBusinessValidationErrors, i as WatchlistForBusinessState, l as WatchlistForBusinessActor, n as WatchlistForBusinessFormState, o as createWatchlistForBusinessManagerFromActor, r as WatchlistForBusinessManager, s as WatchlistForBusinessConfig, t as WatchlistForBusinessFinishedState, u as watchlistForBusinessMachine } from "./watchlistForBusinessManager-CsnJnG-C.js";
2
+ export { type WatchlistForBusinessActor, type WatchlistForBusinessConfig, type WatchlistForBusinessFinishedState, type WatchlistForBusinessFormState, type WatchlistForBusinessManager, type WatchlistForBusinessState, type WatchlistForBusinessValidationErrors, createWatchlistForBusinessManager, createWatchlistForBusinessManagerFromActor, watchlistForBusinessMachine };
@@ -1,102 +1,3 @@
1
- import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-DYiyoSlx.esm.js";
2
- import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
- import { s as createActor, u as createManager } from "./xstate.esm-BuFLFuzz.esm.js";
4
- import { t as watchlistForBusinessMachine } from "./watchlistForBusinessStateMachine-CxFnlshm.esm.js";
5
- //#region src/modules/watchlist-for-business/watchlistForBusinessActor.ts
6
- function createWatchlistForBusinessActor() {
7
- return createActor(watchlistForBusinessMachine).start();
8
- }
9
- //#endregion
10
- //#region src/modules/watchlist-for-business/watchlistForBusinessManager.ts
11
- /**
12
- * Maps a Watchlist-for-Business state-machine snapshot to the exact Figma
13
- * "Tracked Events" screen name. Source: Watchlist for Business Figma
14
- * file (`https://www.figma.com/design/BfHifNPAvPTpBlnMEDfg4J/Watchlist-for-Business---Latest-Design?node-id=3031-82920`).
15
- * Family is `watchlist.*`, shared with global watchlist and custom
16
- * watchlist — each manager keeps its own module token per the
17
- * AdSign/QSign precedent.
18
- *
19
- * `idle` and `finished` are intentionally unmapped — the Figma canvas does
20
- * not define screens for them; `finished` collapses into `moduleClosed`.
21
- */
22
- function getWatchlistForBusinessScreenName(snapshot) {
23
- const stateName = topLevelStateName(snapshot.value);
24
- if (stateName === void 0) return void 0;
25
- switch (stateName) {
26
- case "form": return snapshot.context.isValid ? "watchlist.filled" : "watchlist.default";
27
- case "submitting": return "watchlist.processing";
28
- case "success": return "watchlist.success";
29
- default: return;
30
- }
31
- }
32
- function mapState(snapshot) {
33
- const typedSnapshot = snapshot;
34
- const { context } = typedSnapshot;
35
- if (typedSnapshot.matches("form")) return {
36
- status: "form",
37
- country: context.country,
38
- businessName: context.businessName,
39
- isValid: context.isValid
40
- };
41
- if (typedSnapshot.matches("submitting")) return { status: "submitting" };
42
- if (typedSnapshot.matches("success")) return { status: "success" };
43
- if (typedSnapshot.matches("finished")) return { status: "finished" };
44
- return { status: "idle" };
45
- }
46
- function createApi({ actor, trackElementClicked }) {
47
- return {
48
- /** Transitions from `idle` to the form. Must be called before any other method. */
49
- load() {
50
- actor.send({ type: "LOAD" });
51
- },
52
- /** Updates the selected country code (ISO 3166-1 alpha-2). */
53
- setCountry(country) {
54
- actor.send({
55
- type: "SET_COUNTRY",
56
- country
57
- });
58
- },
59
- /** Updates the business name field and recomputes validity. */
60
- setBusinessName(value) {
61
- actor.send({
62
- type: "SET_BUSINESS_NAME",
63
- value
64
- });
65
- },
66
- /** Submits the form. Only transitions when `isValid` is true. */
67
- submit() {
68
- trackElementClicked?.("submit");
69
- actor.send({ type: "SUBMIT" });
70
- }
71
- };
72
- }
73
- /**
74
- * Creates a watchlist-for-business manager for headless or UI-driven usage.
75
- *
76
- * On API error the module completes silently (fire-and-forget).
77
- *
78
- * @example Headless usage
79
- * ```typescript
80
- * import { createWatchlistForBusinessManager } from '@incodetech/core/watchlist-for-business';
81
- *
82
- * const manager = createWatchlistForBusinessManager();
83
- * manager.subscribe((state) => {
84
- * if (state.status === 'finished') console.log('Done');
85
- * });
86
- * manager.load();
87
- * manager.setCountry('MX');
88
- * manager.setBusinessName('Acme Corp');
89
- * manager.submit();
90
- * manager.stop();
91
- * ```
92
- */
93
- function createWatchlistForBusinessManager() {
94
- return createManager({
95
- actor: createWatchlistForBusinessActor(),
96
- mapState,
97
- createApi,
98
- instrumentation: createManagerInstrumentation(eventModuleNames.watchlistForBusiness, { getEventScreenName: getWatchlistForBusinessScreenName })
99
- });
100
- }
101
- //#endregion
102
- export { createWatchlistForBusinessManager, watchlistForBusinessMachine };
1
+ import { t as watchlistForBusinessMachine } from "./watchlistForBusinessStateMachine-DEzgjz7C.esm.js";
2
+ import { n as createWatchlistForBusinessManagerFromActor, t as createWatchlistForBusinessManager } from "./watchlistForBusinessManager-CpuuB1J2.esm.js";
3
+ export { createWatchlistForBusinessManager, createWatchlistForBusinessManagerFromActor, watchlistForBusinessMachine };
@@ -1,3 +1,3 @@
1
- import { t as watchlistMachine } from "./watchlistStateMachine-DIKQDoUT.esm.js";
2
- import { t as createWatchlistManager } from "./watchlistManager-LoNZH9qm.esm.js";
1
+ import { t as watchlistMachine } from "./watchlistStateMachine-DvOby3a-.esm.js";
2
+ import { t as createWatchlistManager } from "./watchlistManager-CI8BHFob.esm.js";
3
3
  export { createWatchlistManager, watchlistMachine };