@incodetech/core 2.4.0 → 2.4.1-agentic

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 (228) hide show
  1. package/dist/{FaceDetectionProvider-DcPOC2gS.esm.js → FaceDetectionProvider-B83VmClw.esm.js} +29 -64
  2. package/dist/IBrowserEnvironmentCapability-D7JG7ML3.esm.js +16 -0
  3. package/dist/IGeolocationCapability-r49Qo7rR.d.ts +10 -0
  4. package/dist/{IWasmUtilCapability-GF2n7sfm.d.ts → IWasmUtilCapability-Cqiaxydi.d.ts} +31 -4
  5. package/dist/{PhoneValidationProvider-SZiOS0jB.esm.js → PhoneValidationProvider-Co4zk2en.esm.js} +7 -0
  6. package/dist/{StreamCanvasCapture-7JRf-2ck.d.ts → StreamCanvasCapture-C3xNfOsv.d.ts} +12 -3
  7. package/dist/{WasmUtilProvider-DtJuBdt-.esm.js → WasmUtilProvider-GTkoJyFY.esm.js} +75 -22
  8. package/dist/{addressSearch-DPjIKJrX.esm.js → addressSearch-41sMcnJk.esm.js} +72 -31
  9. package/dist/{advanceableErrors-q_pfU3Cn.esm.js → advanceableErrors-k-U-cL5m.esm.js} +1 -2
  10. package/dist/ae-signature.esm.js +1 -1
  11. package/dist/antifraud.esm.js +2 -2
  12. package/dist/{antifraudManager-CaweCYnY.esm.js → antifraudManager-CQ08atTC.esm.js} +2 -2
  13. package/dist/{antifraudStateMachine-DRl0UVyA.esm.js → antifraudStateMachine-BcsUTTIr.esm.js} +1 -1
  14. package/dist/{api-Cz90EHyu.esm.js → api-BO8JA7Pf.esm.js} +6 -5
  15. package/dist/{apiError-DPwFas2f.esm.js → apiError-CfuIvnUy.esm.js} +1 -1
  16. package/dist/attemptCarry-BjTJ6bMQ.esm.js +45 -0
  17. package/dist/authentication.d.ts +3 -3
  18. package/dist/authentication.esm.js +2 -2
  19. package/dist/{authenticationManager-BIZC55Bi.d.ts → authenticationManager-C-cOki0Y.d.ts} +1 -1
  20. package/dist/{authenticationManager-2Lr5V_7p.esm.js → authenticationManager-DvmklBTE.esm.js} +5 -5
  21. package/dist/{authenticationStateMachine-C99B0GFP.esm.js → authenticationStateMachine-BL2ptOA0.esm.js} +3 -3
  22. package/dist/{backCameraStream-CMvXj4X4.esm.js → backCameraStream-C5_NNfUN.esm.js} +3 -43
  23. package/dist/{browser-DlFgHpoC-DnyrCR8r.esm.js → browser-pQZA35G2-DtkAf6sn.esm.js} +161 -150
  24. package/dist/{camera-sIa9ceW2.esm.js → camera-E_Kcre4O.esm.js} +15 -23
  25. package/dist/camera.esm.js +1 -1
  26. package/dist/certificate-issuance.esm.js +2 -2
  27. package/dist/{certificateIssuanceManager-BfeMv2PU.esm.js → certificateIssuanceManager-CM0fuqDC.esm.js} +2 -2
  28. package/dist/{certificateIssuanceStateMachine-Frgjbjw8.esm.js → certificateIssuanceStateMachine-kksIUOPD.esm.js} +2 -2
  29. package/dist/cnpj-Co1ottYN.esm.js +77 -0
  30. package/dist/connectivity-HSl0diCx.esm.js +133 -0
  31. package/dist/consent.d.ts +1 -1
  32. package/dist/consent.esm.js +2 -2
  33. package/dist/{consentManager-CvEu8h_W.esm.js → consentManager-CBwFozhv.esm.js} +4 -3
  34. package/dist/{consentManager-Cv_0QKLD.d.ts → consentManager-_q9yJUku.d.ts} +14 -7
  35. package/dist/{consentStateMachine-DJTgN_-1.esm.js → consentStateMachine-CpmRAcr2.esm.js} +20 -7
  36. package/dist/cross-document-data-match.esm.js +1 -1
  37. package/dist/{crossDocumentDataMatchManager-Cu141CE8.esm.js → crossDocumentDataMatchManager-64O8t10a.esm.js} +2 -2
  38. package/dist/curp-validation.d.ts +1 -1
  39. package/dist/curp-validation.esm.js +2 -2
  40. package/dist/{curpValidationManager-B-z9q5V3.esm.js → curpValidationManager-CLgJQcx0.esm.js} +3 -2
  41. package/dist/{curpValidationManager-C9sqoh9n.d.ts → curpValidationManager-CXpFE-Mv.d.ts} +1 -1
  42. package/dist/{curpValidationStateMachine-vDEFLMPw.esm.js → curpValidationStateMachine-Bx9YhVkJ.esm.js} +28 -20
  43. package/dist/custom-fields.esm.js +1 -1
  44. package/dist/custom-watchlist.esm.js +2 -2
  45. package/dist/{customFieldsManager-D1ex2cFM.esm.js → customFieldsManager-DWt_0YtJ.esm.js} +2 -2
  46. package/dist/{customWatchlistManager-CTI-SGk0.esm.js → customWatchlistManager-D8o-2Nej.esm.js} +2 -2
  47. package/dist/{customWatchlistStateMachine-hmRd0f2I.esm.js → customWatchlistStateMachine-Sbi6DIcK.esm.js} +1 -1
  48. package/dist/{deepsightLoader-DeNvGU3c.esm.js → deepsightLoader-DMxtowCm.esm.js} +6 -28
  49. package/dist/{deepsightService-CKTYDIXD.esm.js → deepsightService-twg3bXqY.esm.js} +20 -59
  50. package/dist/{createCameraCycleOwnership-Dj_LHUvN.esm.js → desktopCameraElection-kHY2IDJi.esm.js} +177 -40
  51. package/dist/device.esm.js +2 -2
  52. package/dist/document-capture.d.ts +2 -2
  53. package/dist/document-capture.esm.js +2 -2
  54. package/dist/{documentCaptureManager-DkyDtm3Y.d.ts → documentCaptureManager-6tnnDkMX.d.ts} +14 -2
  55. package/dist/{documentCaptureManager-DUJwpKC5.esm.js → documentCaptureManager-CMSC_Mhd.esm.js} +26 -19
  56. package/dist/{documentCaptureStateMachine-B8i7GnLh.esm.js → documentCaptureStateMachine-BCwD5Rto.esm.js} +43 -35
  57. package/dist/dynamic-forms.d.ts +2 -2
  58. package/dist/dynamic-forms.esm.js +2 -2
  59. package/dist/{dynamicFormsManager-C0dHs1ty.d.ts → dynamicFormsManager-9kwY8Bf5.d.ts} +1 -1
  60. package/dist/{dynamicFormsManager-DiKYjcF3.esm.js → dynamicFormsManager-DU6W1e20.esm.js} +2 -2
  61. package/dist/{dynamicFormsStateMachine-DEI45xYW.esm.js → dynamicFormsStateMachine-C8Z7k3vo.esm.js} +2 -2
  62. package/dist/ekyb.d.ts +4 -4
  63. package/dist/ekyb.esm.js +3 -3
  64. package/dist/{ekybManager-BaZ_7CEu.d.ts → ekybManager-TB6ZG5lX.d.ts} +2 -2
  65. package/dist/{ekybManager-8WLkNcqg.esm.js → ekybManager-TGfqyjuu.esm.js} +2 -2
  66. package/dist/{ekybStateMachine-BLRT45Ex.esm.js → ekybStateMachine-DBgFuEPK.esm.js} +26 -44
  67. package/dist/ekyc.d.ts +3 -3
  68. package/dist/ekyc.esm.js +3 -3
  69. package/dist/{ekycManager-DW-ynodd.d.ts → ekycManager-BSQteIfC.d.ts} +1 -1
  70. package/dist/{ekycManager-BO-Lui3t.esm.js → ekycManager-C2cgG2Pl.esm.js} +2 -2
  71. package/dist/ekycStateMachine-CuNF7z4O.esm.js +7505 -0
  72. package/dist/ekycUtils-BFncpC4F.esm.js +1401 -0
  73. package/dist/electronic-signature.esm.js +1 -1
  74. package/dist/{electronicSignatureManager-CcIMOb_Y.esm.js → electronicSignatureManager-C7pqXsRm.esm.js} +4 -4
  75. package/dist/email.esm.js +2 -2
  76. package/dist/{emailManager-ButFktRm.esm.js → emailManager-FH_CP0cT.esm.js} +2 -2
  77. package/dist/{emailStateMachine-BXtlC0NV.esm.js → emailStateMachine-Cx-uTaBV.esm.js} +32 -20
  78. package/dist/{events-Du2A4-Qr.esm.js → events-CQteqXfy.esm.js} +2 -2
  79. package/dist/events.esm.js +1 -1
  80. package/dist/extensibility.d.ts +34 -20
  81. package/dist/extensibility.esm.js +34 -34
  82. package/dist/{externalFetch-DrR9xshk.esm.js → externalFetch-CQY41QT1.esm.js} +4 -1
  83. package/dist/face-match.d.ts +1 -1
  84. package/dist/face-match.esm.js +2 -2
  85. package/dist/{faceCaptureManagerFactory-1hzeS_rB.d.ts → faceCaptureManagerFactory-C-xKdj-d.d.ts} +71 -66
  86. package/dist/{faceCaptureManagerFactory-BlGvXzXA.esm.js → faceCaptureManagerFactory-CBm05KnT.esm.js} +4 -4
  87. package/dist/{faceCaptureSetup-TY8RXc2N.esm.js → faceCaptureSetup-BQjCbL51.esm.js} +82 -64
  88. package/dist/{faceMatchManager-DWFUQjMQ.esm.js → faceMatchManager-B2zp7yP4.esm.js} +2 -2
  89. package/dist/{faceMatchManager-DIgG-UFS.d.ts → faceMatchManager-Z4UDLwAv.d.ts} +16 -7
  90. package/dist/{faceMatchStateMachine-CUCvlydD.esm.js → faceMatchStateMachine-ByTMQCUC.esm.js} +40 -27
  91. package/dist/{feature-management-B5rR10uS.esm.js → feature-management-DjAG5lsJ.esm.js} +1 -1
  92. package/dist/feature-management.esm.js +1 -1
  93. package/dist/field-comparison.esm.js +1 -1
  94. package/dist/{fieldComparisonManager-v3knTYV_.esm.js → fieldComparisonManager-CC0vKmpf.esm.js} +2 -2
  95. package/dist/fiscal-qr.esm.js +1 -1
  96. package/dist/{fiscalQrManager-Dt9fHG7h.esm.js → fiscalQrManager-Be-r4oZj.esm.js} +4 -4
  97. package/dist/flow-events.d.ts +1 -1
  98. package/dist/flow.d.ts +10 -10
  99. package/dist/flow.esm.js +8 -11
  100. package/dist/{flowCompletionService-BDI5QpfR.esm.js → flowCompletionService-ChMU2v79.esm.js} +2 -2
  101. package/dist/{flowServices-roD0oIQL.esm.js → flowServices-g2tVWsJl.esm.js} +8 -50
  102. package/dist/geolocation.d.ts +1 -1
  103. package/dist/geolocation.esm.js +2 -2
  104. package/dist/{geolocationManager-Dn24g1fl.d.ts → geolocationManager-6e1i9UIR.d.ts} +15 -17
  105. package/dist/{geolocationManager-DnONzWL5.esm.js → geolocationManager-DLbvZwUB.esm.js} +6 -8
  106. package/dist/{geolocationStateMachine-eWy_G4Os.esm.js → geolocationStateMachine-CAJVongM.esm.js} +12 -8
  107. package/dist/{getDeviceClass-bsWdEDxP.esm.js → getDeviceClass-DoIWuKI8.esm.js} +1 -1
  108. package/dist/government-validation.esm.js +2 -2
  109. package/dist/{governmentValidationManager-BtXWHICu.esm.js → governmentValidationManager-CkX9TEkh.esm.js} +2 -2
  110. package/dist/{governmentValidationStateMachine-COL-Vs48.esm.js → governmentValidationStateMachine-PTPCP26N.esm.js} +1 -1
  111. package/dist/home.d.ts +1 -1
  112. package/dist/home.esm.js +1 -1
  113. package/dist/http.esm.js +1 -1
  114. package/dist/id-ocr.esm.js +2 -2
  115. package/dist/id-selfie-flow.d.ts +1 -1
  116. package/dist/id-selfie-flow.esm.js +9 -9
  117. package/dist/id-verification.esm.js +2 -2
  118. package/dist/id.d.ts +3 -16
  119. package/dist/id.esm.js +3 -3
  120. package/dist/{idCaptureDefaults-BGsG2OAs.esm.js → idCaptureDefaults-MSQoqScU.esm.js} +3 -3
  121. package/dist/{idCaptureManager-0M02hSuC.d.ts → idCaptureManager-DzTfQ1Am.d.ts} +66 -5
  122. package/dist/{idCaptureManager-BrfYjCm_.esm.js → idCaptureManager-zZdTcpG1.esm.js} +63 -17
  123. package/dist/{idCaptureServices-BSj6EH2l.esm.js → idCaptureServices-8OHinO0N.esm.js} +9 -9
  124. package/dist/{idCaptureStateMachine-dXKBYHQp.esm.js → idCaptureStateMachine-B3G6XoDG.esm.js} +914 -536
  125. package/dist/{idOcrManager-D3-HNMXP.esm.js → idOcrManager-B64-fjWg.esm.js} +2 -2
  126. package/dist/{idOcrStateMachine-DyENX6Ki.esm.js → idOcrStateMachine-B1aZnobs.esm.js} +2 -2
  127. package/dist/{idVerificationManager-iWz7Avkr.esm.js → idVerificationManager-_Kebv-Ue.esm.js} +2 -2
  128. package/dist/{idVerificationStateMachine-CL1kUdBe.esm.js → idVerificationStateMachine-DQn6c84z.esm.js} +1 -1
  129. package/dist/identity-reuse.esm.js +2 -2
  130. package/dist/{identityReuseManager-CD1ucp1d.esm.js → identityReuseManager-DDXkNVZi.esm.js} +2 -2
  131. package/dist/{identityReuseStateMachine-DfV81wQC.esm.js → identityReuseStateMachine-Bcnkbjf8.esm.js} +1 -1
  132. package/dist/{index-BKOWUhxG.d.ts → index-DEfwds5y.d.ts} +55 -8
  133. package/dist/{index-CKQ9QBZP.d.ts → index-DMDAk85K.d.ts} +1 -1
  134. package/dist/index.d.ts +1 -1
  135. package/dist/index.esm.js +1 -1
  136. package/dist/{invokeOnCaptureCallback-DYrkOXO6.esm.js → invokeOnCaptureCallback-CXIBwBeE.esm.js} +1 -1
  137. package/dist/mandatory-consent.d.ts +2 -2
  138. package/dist/mandatory-consent.esm.js +2 -2
  139. package/dist/{mandatoryConsentManager-Cwqx1nK7.esm.js → mandatoryConsentManager-43W5d_8G.esm.js} +4 -3
  140. package/dist/{mandatoryConsentManager-BQ43yndC.d.ts → mandatoryConsentManager-xx3mY-xw.d.ts} +11 -4
  141. package/dist/{mandatoryConsentStateMachine-pXWqAHo_.esm.js → mandatoryConsentStateMachine-CVlgdlnt.esm.js} +20 -7
  142. package/dist/{multipartRecordingService-CLwrF5wD.esm.js → multipartRecordingService-DMBxHKS2.esm.js} +3 -13
  143. package/dist/nationalIds-B91f_RuB.esm.js +99 -0
  144. package/dist/{permissionGuards-gcy3U0SL.esm.js → permissionGuards-B3OPL8Si.esm.js} +1 -1
  145. package/dist/{permissionServices-Ca-tSNhT.esm.js → permissionServices-DnBAN_hW.esm.js} +4 -4
  146. package/dist/phone-number.d.ts +7 -1
  147. package/dist/phone-number.esm.js +15 -2
  148. package/dist/phone.d.ts +1 -1
  149. package/dist/phone.esm.js +2 -2
  150. package/dist/{phoneManager-BO-LTih5.d.ts → phoneManager-6nrJkvkG.d.ts} +5 -0
  151. package/dist/{phoneManager-KKUq-Vgo.esm.js → phoneManager-C6jut_pz.esm.js} +3 -3
  152. package/dist/{phoneStateMachine-D2QWS2cu.esm.js → phoneStateMachine-T1-drWfG.esm.js} +37 -25
  153. package/dist/{phoneValidation-DnBcNUNh.esm.js → phoneValidation-OggtfjRt.esm.js} +1 -2
  154. package/dist/{platform-DkcRc9JV.esm.js → platform-aPh7gTWh.esm.js} +15 -1
  155. package/dist/processFaceMatch-BWme3kVV.esm.js +21 -0
  156. package/dist/qe-signature.esm.js +1 -1
  157. package/dist/redirect-to-mobile.d.ts +2 -2
  158. package/dist/redirect-to-mobile.esm.js +2 -2
  159. package/dist/{redirectToMobileManager-uHW3dyuQ.esm.js → redirectToMobileManager-BJXC6Kx9.esm.js} +4 -3
  160. package/dist/{redirectToMobileManager-CVsvpVbQ.d.ts → redirectToMobileManager-Dm9ctRCC.d.ts} +3 -1
  161. package/dist/{redirectToMobileStateMachine-b-H-ipGM.esm.js → redirectToMobileStateMachine-BBMAc2Gb.esm.js} +27 -6
  162. package/dist/{runChildModule-BF_atgNx.esm.js → runChildModule-DPHTqSdF.esm.js} +3 -3
  163. package/dist/{sdkVersion-CsIbltJF.esm.js → sdkVersion-C3_P-Qbq.esm.js} +1 -1
  164. package/dist/selfie.d.ts +4 -4
  165. package/dist/selfie.esm.js +10 -10
  166. package/dist/{selfieErrorUtils-BY0-YbPW.esm.js → selfieErrorUtils-BL0BLMnp.esm.js} +1 -1
  167. package/dist/{selfieManager-BJdNu_nd.d.ts → selfieManager-BMmpUii2.d.ts} +1 -1
  168. package/dist/{selfieManager-vAAwzsHk.esm.js → selfieManager-Cbliomv7.esm.js} +5 -5
  169. package/dist/{selfieStateMachine-BFVp3ElQ.esm.js → selfieStateMachine-B5m_Kn0O.esm.js} +3 -3
  170. package/dist/{session-CpwfoVdH.esm.js → session-DAaAewMX.esm.js} +77 -9
  171. package/dist/session.d.ts +96 -10
  172. package/dist/session.esm.js +7 -6
  173. package/dist/{sessionInitializer-BTjYgE-V.esm.js → sessionInitializer-CWFT4dfw.esm.js} +402 -202
  174. package/dist/{setup-BInNAvQw.esm.js → setup-CDAKwTr7.esm.js} +32 -19
  175. package/dist/{setup-YPKTUCY5.d.ts → setup-D9qt8YVU.d.ts} +2 -2
  176. package/dist/signature.esm.js +2 -2
  177. package/dist/{signatureManager-f_dPAGXn.esm.js → signatureManager-BeEVCcsC.esm.js} +2 -2
  178. package/dist/{signatureStateMachine-C-nUq_oq.esm.js → signatureStateMachine-_1c1vSid.esm.js} +1 -1
  179. package/dist/{stats-BEvexnKC.esm.js → stats-BpMz-hTP.esm.js} +1 -1
  180. package/dist/stats.esm.js +1 -1
  181. package/dist/{tri-xzRLIIMN.esm.js → tri-BajQnjbf.esm.js} +142 -8
  182. package/dist/tri.d.ts +1 -1
  183. package/dist/tri.esm-CzTNi5Q_.esm.js +3826 -0
  184. package/dist/tri.esm.js +1 -1
  185. package/dist/{trueSightService-BMT-TubT.esm.js → trueSightService-BujtUIW6.esm.js} +19 -10
  186. package/dist/trust-graph.esm.js +1 -1
  187. package/dist/{types-yPH8lAH-.d.ts → types--3HDl2SF.d.ts} +2 -2
  188. package/dist/types-B2FK_wYb.d.ts +249 -0
  189. package/dist/types-B9C8W01q.d.ts +34 -0
  190. package/dist/{types-0L-eFDmr.d.ts → types-C397LhmN.d.ts} +1 -1
  191. package/dist/types-D9r3zRfY.d.ts +6 -0
  192. package/dist/{types-DPIDuhut.d.ts → types-DNVzoRvi.d.ts} +2 -1
  193. package/dist/{types-B6HsSzpk.d.ts → types-DuD8TRJU.d.ts} +3 -2
  194. package/dist/{types-Ckir_BEs.d.ts → types-PTZHRhGX.d.ts} +1 -1
  195. package/dist/{types-DUnFZ08M.d.ts → types-ZTZelfbM.d.ts} +2 -2
  196. package/dist/{types-CK8Jbjkp.d.ts → types-e8fCsvvk.d.ts} +1 -1
  197. package/dist/{types-BAxn7MpY.d.ts → types-xEEWCx1j.d.ts} +123 -48
  198. package/dist/{urlUtils-6jsE6rKp.esm.js → urlUtils-eYiyWjh0.esm.js} +4 -1
  199. package/dist/video-selfie.d.ts +8 -8
  200. package/dist/video-selfie.esm.js +95 -22
  201. package/dist/{videoSelfieCameraWarmer-D1xA0u8y.esm.js → videoSelfieCameraWarmer-DjkPpoj_.esm.js} +18 -21
  202. package/dist/{videoSelfieStepDetector-CGsTltqB.d.ts → videoSelfieStepDetector-RfSmlFFW.d.ts} +9 -4
  203. package/dist/{warmup-BElYWRh7.esm.js → warmup-BkfxQZsC.esm.js} +175 -11
  204. package/dist/wasm.d.ts +2 -2
  205. package/dist/wasm.esm.js +3 -3
  206. package/dist/{wasmDsFlagSync-CYj5LL9z.esm.js → wasmDsFlagSync-BhU5H2oR.esm.js} +1 -1
  207. package/dist/wasmMetadataVersionSync-U8EFUr1T.esm.js +27 -0
  208. package/dist/{wasmWebClient-BjZw_7OB.esm.js → wasmWebClient-DTj9auyA.esm.js} +43 -17
  209. package/dist/watchlist-for-business.d.ts +2 -1
  210. package/dist/watchlist-for-business.esm.js +2 -2
  211. package/dist/watchlist.esm.js +2 -2
  212. package/dist/{watchlistForBusinessManager-CZZOFkGl.esm.js → watchlistForBusinessManager-CVay6-9A.esm.js} +37 -7
  213. package/dist/{watchlistForBusinessManager-B3GDPZrr.d.ts → watchlistForBusinessManager-DX2AyM4Y.d.ts} +54 -18
  214. package/dist/watchlistForBusinessStateMachine-DA6K5na4.esm.js +166 -0
  215. package/dist/{watchlistManager-DXtX94SN.esm.js → watchlistManager-B8gQ_rw3.esm.js} +2 -2
  216. package/dist/{watchlistStateMachine-McALifag.esm.js → watchlistStateMachine-CSi_ZhtT.esm.js} +1 -1
  217. package/dist/workflow.d.ts +5 -2
  218. package/dist/workflow.esm.js +57 -47
  219. package/package.json +2 -1
  220. package/dist/IBrowserEnvironmentCapability-DEaRRk-R.esm.js +0 -9
  221. package/dist/ekycStateMachine-CDnI_NRq.esm.js +0 -1443
  222. package/dist/ekycUtils-zY8CdKJL.esm.js +0 -300
  223. package/dist/thumbmark.esm-CRc0cYvz.esm.js +0 -1242
  224. package/dist/tri.esm-BIjHhBJ2.esm.js +0 -2620
  225. package/dist/types-BvLo3U4u.d.ts +0 -134
  226. package/dist/types-zOgZqMni.d.ts +0 -6
  227. package/dist/watchlistForBusinessStateMachine-B66E7jud.esm.js +0 -78
  228. /package/dist/{types-BSBzhHRH2.d.ts → types-BSBzhHRH.d.ts} +0 -0
@@ -1,31 +1,10 @@
1
- import { t as WasmUtilProvider } from "./WasmUtilProvider-DtJuBdt-.esm.js";
2
- import { u as trueSightLog } from "./trueSightService-BMT-TubT.esm.js";
3
- import { t as SDK_VERSION } from "./sdkVersion-CsIbltJF.esm.js";
4
- import { _ as IpifyProvider, b as BrowserEnvironmentProvider, n as getFingerprintEnabled, t as getDisableIpify } from "./sessionInitializer-BTjYgE-V.esm.js";
5
- import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-CYj5LL9z.esm.js";
1
+ import { t as WasmUtilProvider } from "./WasmUtilProvider-GTkoJyFY.esm.js";
2
+ import { u as trueSightLog } from "./trueSightService-BujtUIW6.esm.js";
3
+ import { t as SDK_VERSION } from "./sdkVersion-C3_P-Qbq.esm.js";
4
+ import { b as IpifyProvider, n as getFingerprintEnabled, t as getDisableIpify, x as BrowserEnvironmentProvider } from "./sessionInitializer-CWFT4dfw.esm.js";
5
+ import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-BhU5H2oR.esm.js";
6
6
  import { t as MotionSensorProvider } from "./MotionSensorProvider-DYxh8TjR.esm.js";
7
- import { t as createDeepsightService } from "./deepsightService-CKTYDIXD.esm.js";
8
- //#region ../infra/src/providers/browser/VisibilityProvider.ts
9
- var VisibilityProvider = class {
10
- constructor() {
11
- this._wasBackgrounded = false;
12
- this.visibilityChangeHandler = this.onVisibilityChange.bind(this);
13
- document.addEventListener("visibilitychange", this.visibilityChangeHandler);
14
- }
15
- get wasBackgrounded() {
16
- return this._wasBackgrounded;
17
- }
18
- reset() {
19
- this._wasBackgrounded = false;
20
- }
21
- cleanup() {
22
- document.removeEventListener("visibilitychange", this.visibilityChangeHandler);
23
- }
24
- onVisibilityChange() {
25
- if (document.hidden) this._wasBackgrounded = true;
26
- }
27
- };
28
- //#endregion
7
+ import { t as createDeepsightService } from "./deepsightService-twg3bXqY.esm.js";
29
8
  //#region src/internal/deepsight/deepsightLoader.ts
30
9
  async function loadDeepsightSession(options) {
31
10
  try {
@@ -40,7 +19,6 @@ async function loadDeepsightSessionInternal(options) {
40
19
  const service = createDeepsightService({
41
20
  sdkVersion: SDK_VERSION,
42
21
  wasmUtil: await WasmUtilProvider.getInstance(),
43
- visibility: new VisibilityProvider(),
44
22
  browserEnv: new BrowserEnvironmentProvider(),
45
23
  motionSensor: new MotionSensorProvider(),
46
24
  ipLookup: new IpifyProvider()
@@ -1,14 +1,9 @@
1
- import { t as api } from "./api-Cz90EHyu.esm.js";
2
- import { h as isBrowserSimulation, v as getThumbmarkId, x as fingerprintSignalsReporter } from "./sessionInitializer-BTjYgE-V.esm.js";
3
- import { t as addDeviceStats } from "./stats-BEvexnKC.esm.js";
1
+ import { S as fingerprintSignalsReporter, _ as isBrowserSimulation } from "./sessionInitializer-CWFT4dfw.esm.js";
4
2
  import { t as getParsedUserAgent } from "./getParsedUserAgent-DhQPeKqw.esm.js";
5
3
  import { t as getUserAgent } from "./getBrowser-CBiibsL-.esm.js";
6
- import { i as requestCameraAccess, o as stopCameraStream } from "./camera-sIa9ceW2.esm.js";
7
- import { t as IncodeCanvas } from "./canvas-BxFzWTt-.esm.js";
8
- import { t as createHiddenVideoElement } from "./video-BtSWtHy1.esm.js";
9
4
  import { t as getDeviceInfo } from "./getDeviceClass-CeBiEayS.esm.js";
10
5
  //#region src/internal/deepsight/metadataService.ts
11
- function createMetadataService(wasmUtil, visibility, browserEnv, ipLookup) {
6
+ function createMetadataService(wasmUtil, browserEnv, ipLookup) {
12
7
  return {
13
8
  async initialize(sdkVersion, disableIpify = false, disableFingerprint = false) {
14
9
  wasmUtil.setSdkPlatform("WEBAPP");
@@ -18,11 +13,7 @@ function createMetadataService(wasmUtil, visibility, browserEnv, ipLookup) {
18
13
  const isMobile = /Android|iPhone|iPad|iPod/i.test(ua);
19
14
  const deviceInfo = getDeviceInfo();
20
15
  let fingerprintHash = "";
21
- if (!disableFingerprint) try {
22
- fingerprintHash = await getThumbmarkId();
23
- } catch {
24
- fingerprintHash = browserEnv.generateCanvasFingerprint();
25
- }
16
+ if (!disableFingerprint) fingerprintHash = browserEnv.generateCanvasFingerprint();
26
17
  const ip = disableIpify ? "" : await ipLookup.getIp();
27
18
  const screenDimensions = browserEnv.getScreenDimensions();
28
19
  const model = [parsedUa.device.vendor, parsedUa.device.model].filter(Boolean).join(" ");
@@ -31,6 +22,7 @@ function createMetadataService(wasmUtil, visibility, browserEnv, ipLookup) {
31
22
  model,
32
23
  os: parsedUa.os.name ?? "",
33
24
  osVersion: parsedUa.os.version ?? "",
25
+ osVer: parsedUa.os.version ?? "",
34
26
  screenDimensions,
35
27
  numTouchPoints: deviceInfo.maxTouchPoints,
36
28
  fingerprintHash,
@@ -84,10 +76,7 @@ function createMetadataService(wasmUtil, visibility, browserEnv, ipLookup) {
84
76
  setMotionStatus(status) {
85
77
  wasmUtil.setMotionStatus(status);
86
78
  },
87
- setBackgroundMode(backgroundMode) {
88
- wasmUtil.setBackgroundMode(backgroundMode || visibility.wasBackgrounded);
89
- visibility.reset();
90
- },
79
+ setBackgroundMode(_backgroundMode) {},
91
80
  estimatePerformance() {
92
81
  return wasmUtil.estimatePerformance();
93
82
  },
@@ -137,53 +126,34 @@ const frameSources = {
137
126
  selfie: "SELFIE"
138
127
  };
139
128
  /**
140
- * Sends the analyzed frame image to the backend for logging.
141
- */
142
- async function logFrame({ source, base64Image, token }) {
143
- try {
144
- return (await api.post("/omni/log/frame/v2", { base64Image }, {
145
- query: { source },
146
- headers: { "X-Incode-Hardware-Id": token }
147
- })).data;
148
- } catch {
149
- return;
150
- }
151
- }
152
- /**
153
- * Runs the WASM virtual camera check and handles logging and stats.
129
+ * Runs the native post-capture check (`poc`).
130
+ *
131
+ * Since ml-wasm-kit v2.14.53 (ADR 0008, single-run IAD) the binding keeps its
132
+ * output argument for arity but never writes into it: the post-capture
133
+ * verdicts travel only inside the signed capture metadata that the protected
134
+ * upload carries. The JavaScript verdict this function used to derive from
135
+ * that output — the `/omni/log/frame/v2` frame upload, the
136
+ * `virtualCameraDetected` device stat and `setZc` — is gone with it (the same
137
+ * removal ms-incodesmile-web made in ENG-58409). The name is kept so the
138
+ * protected attempts' POC step reads the same.
154
139
  */
155
- async function runVirtualCameraCheck({ wasmUtil, source, token }) {
156
- const output = {
140
+ async function runVirtualCameraCheck({ wasmUtil }) {
141
+ await wasmUtil.poc({
157
142
  canvas: null,
158
143
  itr: null,
159
144
  skipped: null
160
- };
161
- await wasmUtil.poc(output);
162
- if (output.skipped !== false) return;
163
- if (output.canvas && token) {
164
- const base64Image = new IncodeCanvas(output.canvas).getBase64Image();
165
- if (base64Image) logFrame({
166
- source,
167
- base64Image,
168
- token
169
- });
170
- }
171
- if (output.itr === true) {
172
- addDeviceStats({ virtualCameraDetected: true });
173
- wasmUtil.setZc("FAIL");
174
- } else if (output.itr === false) wasmUtil.setZc("PASS");
145
+ });
175
146
  }
176
147
  //#endregion
177
148
  //#region src/internal/deepsight/deepsightService.ts
178
149
  function createDeepsightService(config) {
179
- const metadata = createMetadataService(config.wasmUtil, config.visibility, config.browserEnv, config.ipLookup);
150
+ const metadata = createMetadataService(config.wasmUtil, config.browserEnv, config.ipLookup);
180
151
  const motion = createMotionStatusService(config.motionSensor);
181
152
  const finalizeCaptureMetadata = () => {
182
153
  metadata.preparePipelineState();
183
154
  const motionStatus = motion.check();
184
155
  metadata.setMotionStatus(motionStatus);
185
156
  metadata.getCheck();
186
- metadata.setBackgroundMode(false);
187
157
  };
188
158
  return {
189
159
  metadata,
@@ -212,16 +182,7 @@ function createDeepsightService(config) {
212
182
  token: sessionToken
213
183
  });
214
184
  },
215
- async performPrcCheck(params) {
216
- const prcStream = await requestCameraAccess(params.constraints);
217
- const hiddenVideo = createHiddenVideoElement(prcStream);
218
- try {
219
- await config.wasmUtil.prc();
220
- } finally {
221
- hiddenVideo.dispose();
222
- stopCameraStream(prcStream);
223
- }
224
- },
185
+ async performPrcCheck(_params) {},
225
186
  async analyzeFrame(imageData) {
226
187
  await motion.start();
227
188
  await metadata.analyzeFrame(imageData);
@@ -1,7 +1,12 @@
1
- import { t as getTimestamp } from "./IBrowserEnvironmentCapability-DEaRRk-R.esm.js";
2
- import { c as wasmRuntime, l as CAMERA_CYCLE_OWNERSHIP_DOMAIN, u as getCameraCycleOwnershipDomain } from "./warmup-BElYWRh7.esm.js";
3
- import { t as api, u as endpoints } from "./api-Cz90EHyu.esm.js";
1
+ import { n as getTimestamp } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
2
+ import { d as getCameraCycleOwnershipDomain, l as wasmRuntime, u as CAMERA_CYCLE_OWNERSHIP_DOMAIN } from "./warmup-BkfxQZsC.esm.js";
3
+ import { i as utilityWasmApi } from "./WasmUtilProvider-GTkoJyFY.esm.js";
4
+ import { t as api, u as endpoints } from "./api-BO8JA7Pf.esm.js";
4
5
  import { t as fromCallback } from "./xstate-actors.esm-8Gzepa_A.esm.js";
6
+ import { l as markCameraGrantedInDocument, n as enumerateVideoDevices, o as clearCameraGrantedInDocument, s as isCameraDenialErrorName } from "./camera-E_Kcre4O.esm.js";
7
+ import { l as queryCameraPermission } from "./permissionServices-DnBAN_hW.esm.js";
8
+ import { a as selectBestBackDevice, r as isBackCameraLabel } from "./backCameraStream-C5_NNfUN.esm.js";
9
+ import { t as getDeviceClass } from "./getDeviceClass-DoIWuKI8.esm.js";
5
10
  //#region ../infra/src/capabilities/ICameraCycleCapability.ts
6
11
  /**
7
12
  * Fixed protected-endpoint identifiers owned by ml-wasm-kit.
@@ -30,6 +35,57 @@ async function flagIdManualReview() {
30
35
  } catch {}
31
36
  }
32
37
  //#endregion
38
+ //#region ../infra/src/media/cameraCycleFailure.ts
39
+ /**
40
+ * Reads the `DOMException`-style name of what the kit's camera step handed to
41
+ * `onCameraFailed`. The kit forwards the browser's rejection unchanged on every
42
+ * branch but one, so this is the error's own `name` when it has one. The
43
+ * exception is the unnamed iPad front-camera failure; see
44
+ * {@link classifyCameraCycleFailure}. That value has no name, so this returns
45
+ * `undefined` for it.
46
+ */
47
+ function cameraCycleFailureName(error) {
48
+ if (typeof error !== "object" || error === null) return;
49
+ const { name } = error;
50
+ return typeof name === "string" && name.length > 0 ? name : void 0;
51
+ }
52
+ /**
53
+ * True for the value the kit's iPad front-camera branch reports for every
54
+ * `getUserMedia` rejection. `InitialStreamAcquisition::formatFailureForHost`
55
+ * copies the error's own enumerable properties into a plain object tagged
56
+ * `type: 'permissionDenied'`, which drops the prototype `name` getter. A busy
57
+ * camera and a real denial therefore look the same, and the branch never
58
+ * retries.
59
+ */
60
+ function isUnnamedIpadCameraFailure(error) {
61
+ return typeof error === "object" && error !== null && cameraCycleFailureName(error) === void 0 && error.type === "permissionDenied";
62
+ }
63
+ /** How long a permission query may take before the failure counts as unknown. */
64
+ const PERMISSION_QUERY_TIMEOUT_MS = 1e3;
65
+ async function queryWithTimeout(query) {
66
+ let timer;
67
+ try {
68
+ return await Promise.race([query(), new Promise((resolve) => {
69
+ timer = setTimeout(() => resolve("prompt"), PERMISSION_QUERY_TIMEOUT_MS);
70
+ })]);
71
+ } finally {
72
+ clearTimeout(timer);
73
+ }
74
+ }
75
+ /**
76
+ * Resolves what an `onCameraFailed` value means before anyone routes on it.
77
+ * Named failures pass through unchanged. For the unnamed iPad front-camera
78
+ * failure, the browser's camera permission decides: `denied` becomes a
79
+ * `NotAllowedError`, so the permission screen handles it. Anything else stays
80
+ * unnamed and takes the generic, retryable error path. The SDK's own
81
+ * permission step succeeded moments before the camera step, so a failure there
82
+ * is far more likely a busy or over-constrained camera than a denial.
83
+ */
84
+ async function classifyCameraCycleFailure(error, query = queryCameraPermission) {
85
+ if (!isUnnamedIpadCameraFailure(error)) return error;
86
+ return await queryWithTimeout(query) === "denied" ? new DOMException("Camera permission denied", "NotAllowedError") : error;
87
+ }
88
+ //#endregion
33
89
  //#region ../infra/src/providers/wasm/CameraCycleProvider.ts
34
90
  function asRecord(value) {
35
91
  return typeof value === "object" && value !== null ? value : null;
@@ -123,12 +179,45 @@ function sanitizeProtectedResponse(request, raw) {
123
179
  }
124
180
  }
125
181
  var CameraCycleProvider = class {
126
- constructor(runtime = wasmRuntime) {
182
+ constructor(runtime = wasmRuntime, deepsightFlag = utilityWasmApi) {
127
183
  this.runtime = runtime;
184
+ this.deepsightFlag = deepsightFlag;
128
185
  this[CAMERA_CYCLE_OWNERSHIP_DOMAIN] = getCameraCycleOwnershipDomain(runtime);
129
186
  }
130
- adoptStream(stream, constraints, options) {
131
- return this.runtime.adoptCameraStream(stream, constraints, options);
187
+ /**
188
+ * Fills `ds` from the SDK's deepsight flag — the JS-side `dsEnabled_` the
189
+ * utility facade replays into every `poc`/`rsp` call — unless the caller set
190
+ * it, so the in-step pre-capture IAD sees the flag `prc` used to receive.
191
+ *
192
+ * A failure is held until the step settles and classified first
193
+ * (`classifyCameraCycleFailure`): the unnamed iPad front-camera failure
194
+ * becomes a `NotAllowedError` only when the browser reports the camera
195
+ * permission as denied.
196
+ *
197
+ * Also feeds the document camera-grant memo, which `getUserMedia` paths feed
198
+ * through `trackCameraAcquisition` and the kit cannot: READY marks the grant,
199
+ * a permission denial clears it, any other failure leaves it untouched.
200
+ */
201
+ async startCameraCycle(options, callbacks) {
202
+ const step = {};
203
+ await this.runtime.startCameraCycle({
204
+ ...options,
205
+ ds: options.ds ?? this.deepsightFlag.getDsEnabled()
206
+ }, {
207
+ onNewFrame: callbacks.onNewFrame,
208
+ onFirstFrame: callbacks.onFirstFrame,
209
+ onCameraReady: (audioStream) => {
210
+ markCameraGrantedInDocument();
211
+ callbacks.onCameraReady(audioStream);
212
+ },
213
+ onCameraFailed: (error) => {
214
+ step.failure ??= { error };
215
+ }
216
+ });
217
+ if (!step.failure) return;
218
+ const error = await classifyCameraCycleFailure(step.failure.error);
219
+ if (isCameraDenialErrorName(cameraCycleFailureName(error))) clearCameraGrantedInDocument();
220
+ callbacks.onCameraFailed(error);
132
221
  }
133
222
  setWorkflowConsuming(workflow, consuming) {
134
223
  if (consuming && (workflow === 2 || workflow === 3)) throw new Error("[Incode SDK] Protected still capture is unavailable for video-selfie workflows.");
@@ -205,7 +294,7 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
205
294
  let pendingReadyStream = null;
206
295
  let pendingDeliveryEvent = null;
207
296
  let visibilityGeneration = 0;
208
- let unadoptedStream = input.streamSource.kind === "preAcquired" ? input.streamSource.stream : null;
297
+ let hostStream = null;
209
298
  let resourcesReleased = false;
210
299
  let cycleTransferred = false;
211
300
  let commandQueue = Promise.resolve();
@@ -223,9 +312,8 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
223
312
  if (startupStartedAt === void 0 || !input.onStartupTiming) return;
224
313
  try {
225
314
  input.onStartupTiming({
226
- acquireMs: startupTiming.acquireMs ?? 0,
227
- adoptMs: startupTiming.adoptMs ?? 0,
228
- prcMs: startupTiming.prcMs ?? 0,
315
+ cameraStepMs: startupTiming.cameraStepMs ?? 0,
316
+ ...startupTiming.firstFrameMs === void 0 ? {} : { firstFrameMs: startupTiming.firstFrameMs },
229
317
  displayStreamMs: startupTiming.displayStreamMs ?? 0,
230
318
  configureMs: startupTiming.configureMs ?? 0,
231
319
  recorderMs: startupTiming.recorderMs ?? 0,
@@ -237,12 +325,13 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
237
325
  const sendParent = (event) => {
238
326
  sendBack(event);
239
327
  };
240
- const releaseRawStream = (stream) => {
328
+ const stopTracks = (stream) => {
329
+ if (!stream) return;
241
330
  try {
242
- input.releaseUnadoptedStream(stream);
331
+ stream.getTracks().forEach((track) => track.stop());
243
332
  } catch {}
244
333
  };
245
- const reportFailure = (stage, code, http = {}) => {
334
+ const reportFailure = (stage, code, details = {}) => {
246
335
  if (!active) return;
247
336
  sendParent({
248
337
  type: "PROTECTED_ATTEMPT_FAILED",
@@ -250,7 +339,7 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
250
339
  failure: {
251
340
  stage,
252
341
  code,
253
- ...http
342
+ ...details
254
343
  }
255
344
  });
256
345
  };
@@ -272,8 +361,8 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
272
361
  postPocDisplayStream = null;
273
362
  pendingDeliveryEvent = null;
274
363
  finalizeDeferred = false;
275
- if (unadoptedStream) releaseRawStream(unadoptedStream);
276
- unadoptedStream = null;
364
+ stopTracks(hostStream);
365
+ hostStream = null;
277
366
  if (cycleTransferred) input.cycleOwnership.releaseByAttempt();
278
367
  else input.cycleOwnership.releaseByController();
279
368
  };
@@ -283,8 +372,8 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
283
372
  ready = false;
284
373
  releaseResources();
285
374
  };
286
- const failClosed = (stage, code) => {
287
- reportFailure(stage, code);
375
+ const failClosed = (stage, code, details = {}) => {
376
+ reportFailure(stage, code, details);
288
377
  deactivate();
289
378
  };
290
379
  const stopConsuming = () => {
@@ -345,38 +434,52 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
345
434
  let stage = "acquire";
346
435
  try {
347
436
  startupStartedAt = now();
348
- const acquisitionStartedAt = now();
349
- const acquired = input.streamSource.kind === "preAcquired" ? {
350
- stream: input.streamSource.stream,
351
- constraints: input.streamSource.constraints
352
- } : await input.streamSource.acquire(abortController.signal);
353
- startupTiming.acquireMs = Math.max(0, now() - acquisitionStartedAt);
437
+ const cameraStepStartedAt = now();
438
+ const options = await input.cameraStep();
354
439
  if (!active || abortController.signal.aborted) {
355
- releaseRawStream(acquired.stream);
440
+ stopTracks(options.hs);
356
441
  return;
357
442
  }
358
- unadoptedStream = acquired.stream;
359
- stage = "adopt";
360
- if (input.beforeAdopt) {
361
- await input.beforeAdopt(acquired.stream);
362
- if (!active || abortController.signal.aborted) return;
443
+ hostStream = options.hs ?? null;
444
+ if (input.preflight) {
445
+ stage = "configure";
446
+ input.preflight();
447
+ stage = "acquire";
448
+ }
449
+ const step = { outcome: null };
450
+ await input.cycle.startCameraCycle(options, {
451
+ onFirstFrame: () => {
452
+ startupTiming.firstFrameMs ??= Math.max(0, now() - cameraStepStartedAt);
453
+ },
454
+ onCameraReady: (audioStream) => {
455
+ stopTracks(audioStream);
456
+ step.outcome ??= { ready: true };
457
+ },
458
+ onCameraFailed: (error) => {
459
+ step.outcome ??= {
460
+ ready: false,
461
+ error
462
+ };
463
+ }
464
+ });
465
+ startupTiming.cameraStepMs = Math.max(0, now() - cameraStepStartedAt);
466
+ if (!active) return;
467
+ if (step.outcome === null) throw new Error("protected camera step ended without an outcome");
468
+ if (!step.outcome.ready) {
469
+ failClosed("acquire", "protected-attempt-acquire-failed", { errorName: cameraCycleFailureName(step.outcome.error) });
470
+ return;
363
471
  }
364
- const adoption = measure(() => input.cycle.adoptStream(acquired.stream, acquired.constraints, input.captureOptions));
365
- startupTiming.adoptMs = adoption.durationMs;
366
- if (!adoption.value) throw new Error("protected camera stream adoption was rejected");
367
- unadoptedStream = null;
368
472
  input.cycleOwnership.transferToAttempt();
369
473
  cycleTransferred = true;
370
- stage = "prc";
371
- const prcStartedAt = now();
372
- await input.runPrc();
373
- startupTiming.prcMs = Math.max(0, now() - prcStartedAt);
374
- if (!active) return;
375
474
  const displayStreamResult = measure(() => input.cycle.getUnprotectedStream());
376
475
  startupTiming.displayStreamMs = displayStreamResult.durationMs;
377
476
  const displayStream = displayStreamResult.value;
378
477
  if (!displayStream) throw new Error("protected camera cycle did not provide a stream");
379
478
  stage = "configure";
479
+ if (input.afterReady) {
480
+ await input.afterReady(displayStream);
481
+ if (!active) return;
482
+ }
380
483
  const configureStartedAt = now();
381
484
  await input.configureWorkflow();
382
485
  startupTiming.configureMs = Math.max(0, now() - configureStartedAt);
@@ -833,4 +936,38 @@ function createCameraCycleOwnership(cycle) {
833
936
  };
834
937
  }
835
938
  //#endregion
836
- export { flagIdManualReview as a, flagFaceManualReview as i, runProtectedAttempt as n, PROTECTED_CAPTURE_TARGET as o, cameraCycleProvider as r, createCameraCycleOwnership as t };
939
+ //#region src/internal/camera/desktopCameraElection.ts
940
+ /**
941
+ * Picks the exact camera the kit's camera step should open on desktop.
942
+ *
943
+ * On desktop, ml-wasm-kit ignores the facing preference and always requests
944
+ * `facingMode: 'user'` (`InitialStreamConstraints::desktopVideoSpec`), but it
945
+ * honours an exact device id (`di`). Electing the device here restores the
946
+ * ENG-47583 host corrections without JavaScript opening a camera:
947
+ * - a rear capture pins the best back-labelled device, so a Surface opens its
948
+ * rear camera for ID (#543);
949
+ * - a front capture pins the first device not labelled as a back camera, but
950
+ * only when a back camera exists, so the browser cannot hand the rear camera
951
+ * back for a selfie after an ID capture (#551).
952
+ *
953
+ * Returns `''`, which leaves the choice to the kit, off desktop, when labels
954
+ * are unavailable, or when nothing needs pinning. Labels are available here
955
+ * because the SDK's permission step runs before every capture. Like #551,
956
+ * "first non-back device" can pick a Windows Hello IR sensor on machines that
957
+ * expose one; that tradeoff is unchanged.
958
+ */
959
+ async function electDesktopCameraDevice(facing) {
960
+ if (getDeviceClass() !== "desktop") return "";
961
+ let devices;
962
+ try {
963
+ devices = await enumerateVideoDevices();
964
+ } catch {
965
+ return "";
966
+ }
967
+ const backDevices = devices.filter((device) => isBackCameraLabel(device.label));
968
+ if (backDevices.length === 0) return "";
969
+ if (facing === "environment") return selectBestBackDevice(backDevices).deviceId;
970
+ return devices.find((device) => device.label !== "" && !isBackCameraLabel(device.label))?.deviceId ?? "";
971
+ }
972
+ //#endregion
973
+ export { flagFaceManualReview as a, cameraCycleProvider as i, createCameraCycleOwnership as n, flagIdManualReview as o, runProtectedAttempt as r, PROTECTED_CAPTURE_TARGET as s, electDesktopCameraDevice as t };
@@ -1,8 +1,8 @@
1
- import { a as isIOS, f as isTabletWithoutAndroid, l as isIslandBrowser, n as isAndroidWebView, o as isIOSWebView, r as isBraveBrowser, s as isIPad } from "./platform-DkcRc9JV.esm.js";
1
+ import { a as isIOS, l as isIslandBrowser, n as isAndroidWebView, o as isIOSWebView, p as isTabletWithoutAndroid, r as isBraveBrowser, s as isIPad } from "./platform-aPh7gTWh.esm.js";
2
2
  import { n as getUserAgentBrands, t as getUserAgent } from "./getBrowser-CBiibsL-.esm.js";
3
3
  import { t as getBrowser } from "./getBrowser-Cbe1C4Tn.esm.js";
4
4
  import { t as getDeviceInfo } from "./getDeviceClass-CeBiEayS.esm.js";
5
- import { t as getDeviceClass } from "./getDeviceClass-bsWdEDxP.esm.js";
5
+ import { t as getDeviceClass } from "./getDeviceClass-DoIWuKI8.esm.js";
6
6
  //#region src/internal/device/browserSupportClassification.ts
7
7
  /**
8
8
  * Third-party in-app browsers. These are real WebViews — `isAndroidWebView` and
@@ -1,3 +1,3 @@
1
- import { a as DocumentCaptureErrorCode, c as DocumentType, n as DOCUMENT_CAPTURE_ERROR_CODES, r as DocumentCaptureConfig, s as DocumentCaptureNextPageType } from "./types-DUnFZ08M.js";
2
- import { a as DocumentCaptureActor, i as createDocumentCaptureManagerFromActor, n as DocumentCaptureState, o as documentCaptureMachine, r as createDocumentCaptureManager, t as DocumentCaptureManager } from "./documentCaptureManager-DkyDtm3Y.js";
1
+ import { a as DocumentCaptureErrorCode, c as DocumentType, n as DOCUMENT_CAPTURE_ERROR_CODES, r as DocumentCaptureConfig, s as DocumentCaptureNextPageType } from "./types-ZTZelfbM.js";
2
+ import { a as DocumentCaptureActor, i as createDocumentCaptureManagerFromActor, n as DocumentCaptureState, o as documentCaptureMachine, r as createDocumentCaptureManager, t as DocumentCaptureManager } from "./documentCaptureManager-6tnnDkMX.js";
3
3
  export { DOCUMENT_CAPTURE_ERROR_CODES, type DocumentCaptureActor, type DocumentCaptureConfig, type DocumentCaptureErrorCode, type DocumentCaptureManager, type DocumentCaptureNextPageType, type DocumentCaptureState, type DocumentType, createDocumentCaptureManager, createDocumentCaptureManagerFromActor, documentCaptureMachine };
@@ -1,3 +1,3 @@
1
- import { r as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-B8i7GnLh.esm.js";
2
- import { n as createDocumentCaptureManagerFromActor, t as createDocumentCaptureManager } from "./documentCaptureManager-DUJwpKC5.esm.js";
1
+ import { r as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-BCwD5Rto.esm.js";
2
+ import { n as createDocumentCaptureManagerFromActor, t as createDocumentCaptureManager } from "./documentCaptureManager-CMSC_Mhd.esm.js";
3
3
  export { DOCUMENT_CAPTURE_ERROR_CODES, createDocumentCaptureManager, createDocumentCaptureManagerFromActor, documentCaptureMachine };
@@ -2,7 +2,7 @@ import { A as StateMachine, C as StateValue, D as PromiseActorLogic, a as ActorR
2
2
  import { t as Manager } from "./Manager-C9T5amUN.js";
3
3
  import "./Actor-DpTj5PFb.js";
4
4
  import { n as PermissionStatus, t as PermissionResult } from "./types-BEwVKkLJ.js";
5
- import { a as DocumentCaptureErrorCode, c as DocumentType, i as DocumentCaptureContext, l as DocumentUploadResponse, o as DocumentCaptureInput, r as DocumentCaptureConfig, s as DocumentCaptureNextPageType, t as CapturedDocument, u as FinalizeDocumentResponse } from "./types-DUnFZ08M.js";
5
+ import { a as DocumentCaptureErrorCode, c as DocumentType, i as DocumentCaptureContext, l as DocumentUploadResponse, o as DocumentCaptureInput, r as DocumentCaptureConfig, s as DocumentCaptureNextPageType, t as CapturedDocument, u as FinalizeDocumentResponse } from "./types-ZTZelfbM.js";
6
6
  //#region src/modules/document-capture/documentCaptureStateMachine.d.ts
7
7
  declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
8
8
  type: "CAPTURE";
@@ -192,6 +192,10 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
192
192
  params: NonReducibleUnknown;
193
193
  };
194
194
  }>, Values<{
195
+ isOutOfAttempts: {
196
+ type: "isOutOfAttempts";
197
+ params: unknown;
198
+ };
195
199
  allowSkip: {
196
200
  type: "allowSkip";
197
201
  params: unknown;
@@ -260,7 +264,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
260
264
  readonly on: {
261
265
  readonly CLOSE: ".closed";
262
266
  };
263
- readonly context: ({ input }: {
267
+ readonly context: ({ input, self }: {
264
268
  spawn: {
265
269
  <TSrc extends "uploadDocument" | "requestPermission" | "checkPermission" | "initCamera" | "finalizeDocumentRequest">(logic: TSrc, ...[options]: ({
266
270
  src: "uploadDocument";
@@ -524,6 +528,10 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
524
528
  };
525
529
  readonly states: {
526
530
  readonly tutorial: {
531
+ readonly always: {
532
+ readonly target: "finished";
533
+ readonly guard: "isOutOfAttempts";
534
+ };
527
535
  readonly on: {
528
536
  readonly OPEN_METHOD_SELECTION: {
529
537
  readonly actions: "openMethodSelection";
@@ -1951,6 +1959,8 @@ type DocumentCaptureCapturingState = {
1951
1959
  pageNumber: number;
1952
1960
  /** Resolved max upload size in bytes (defaults to 10MB when unconfigured). */
1953
1961
  maxFileSize: number;
1962
+ title: string | undefined;
1963
+ text: string | undefined;
1954
1964
  };
1955
1965
  type DocumentCapturePreviewState = {
1956
1966
  status: 'preview';
@@ -1985,6 +1995,8 @@ type DocumentCaptureClosedState = {
1985
1995
  };
1986
1996
  type DocumentCaptureNextPageState = {
1987
1997
  status: 'nextPage';
1998
+ title: string | undefined;
1999
+ text: string | undefined;
1988
2000
  imageBase64: string;
1989
2001
  fileType: string;
1990
2002
  fileName: string;
@@ -1,7 +1,7 @@
1
- import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Du2A4-Qr.esm.js";
1
+ import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CQteqXfy.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
3
  import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
4
- import { n as DEFAULT_MAX_FILE_SIZE, r as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-B8i7GnLh.esm.js";
4
+ import { n as DEFAULT_MAX_FILE_SIZE, r as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-BCwD5Rto.esm.js";
5
5
  //#region src/modules/document-capture/documentCaptureActor.ts
6
6
  function createDocumentCaptureActor(options) {
7
7
  return createActor(documentCaptureMachine, { input: { config: options.config } }).start();
@@ -90,25 +90,30 @@ function getPermissionStatus(snapshot) {
90
90
  if (snapshot.matches({ permissions: "idle" })) return "checking";
91
91
  return "idle";
92
92
  }
93
+ function getPageCopy(config, pageNumber) {
94
+ return pageNumber > 1 ? {
95
+ title: config.step2Title,
96
+ text: config.step2Text
97
+ } : {
98
+ title: config.title,
99
+ text: config.text
100
+ };
101
+ }
93
102
  function mapState(snapshot) {
94
103
  const typedSnapshot = snapshot;
95
104
  const { context } = typedSnapshot;
96
- if (typedSnapshot.matches("tutorial")) {
97
- const isSecondPage = context.pageNumber > 1;
98
- return {
99
- status: "tutorial",
100
- title: isSecondPage ? context.config.step2Title ?? context.config.title : context.config.title,
101
- text: isSecondPage ? context.config.step2Text ?? context.config.text : context.config.text,
102
- allowSkipDocumentCapture: context.config.allowSkipDocumentCapture && context.pageNumber === 1,
103
- onlyCapture: context.config.onlyCapture,
104
- onlyUpload: context.config.onlyUpload,
105
- methodSelectionOpen: context.methodSelectionOpen,
106
- onlyPdf: context.config.onlyPdf,
107
- error: context.error,
108
- pageNumber: context.pageNumber,
109
- maxFileSize: context.config.maxFileSize
110
- };
111
- }
105
+ if (typedSnapshot.matches("tutorial")) return {
106
+ status: "tutorial",
107
+ ...getPageCopy(context.config, context.pageNumber),
108
+ allowSkipDocumentCapture: context.config.allowSkipDocumentCapture && context.pageNumber === 1,
109
+ onlyCapture: context.config.onlyCapture,
110
+ onlyUpload: context.config.onlyUpload,
111
+ methodSelectionOpen: context.methodSelectionOpen,
112
+ onlyPdf: context.config.onlyPdf,
113
+ error: context.error,
114
+ pageNumber: context.pageNumber,
115
+ maxFileSize: context.config.maxFileSize
116
+ };
112
117
  if (typedSnapshot.matches("permissions")) return {
113
118
  status: "permissions",
114
119
  permissionStatus: getPermissionStatus(typedSnapshot)
@@ -124,7 +129,8 @@ function mapState(snapshot) {
124
129
  onlyPdf: context.config.onlyPdf,
125
130
  error: context.error,
126
131
  pageNumber: context.pageNumber,
127
- maxFileSize: context.config.maxFileSize
132
+ maxFileSize: context.config.maxFileSize,
133
+ ...getPageCopy(context.config, context.pageNumber)
128
134
  };
129
135
  if (typedSnapshot.matches("preview")) return {
130
136
  status: "preview",
@@ -155,6 +161,7 @@ function mapState(snapshot) {
155
161
  if (typedSnapshot.matches("closed")) return { status: "closed" };
156
162
  if (typedSnapshot.matches("nextPage")) return {
157
163
  status: "nextPage",
164
+ ...getPageCopy(context.config, context.pageNumber + 1),
158
165
  imageBase64: context.capturedDocument?.imageBase64 ?? "",
159
166
  fileType: context.capturedDocument?.fileType ?? "",
160
167
  fileName: context.capturedDocument?.file.name ?? "",