@incodetech/core 2.1.0-rc.2 → 2.1.0-rc.3
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.
- package/dist/3dAvatarProvider-ChciZmjE.esm.js +28214 -0
- package/dist/{BrowserStorageProvider-D5xc7Lqo.esm.js → BrowserStorageProvider-CrrN540a.esm.js} +1 -25
- package/dist/BrowserVisibilityObserverProvider-rim9Jrz-.esm.js +25 -0
- package/dist/Face2DProvider-BeLlYBbB.esm.js +824 -0
- package/dist/FaceDetectionProvider-B78455D4.d.ts +119 -0
- package/dist/IVisibilityObserverCapability-BbWjgpiF.d.ts +12 -0
- package/dist/IWasmUtilCapability-d2XvzaCk.d.ts +145 -0
- package/dist/IpifyProvider-BRW14_uo.esm.js +51 -0
- package/dist/{Manager-B2OEDYqf.d.ts → Manager-CJ3G2zqi.d.ts} +1 -4
- package/dist/{OpenViduRecordingProvider-DF7A4ZNJ.esm.js → OpenViduRecordingProvider-B_0GKkzc.esm.js} +1 -1
- package/dist/PrivacyLensProvider-hDzaDzZ6.esm.js +339 -0
- package/dist/StateMachine-C_AY4cs7.d.ts +2 -0
- package/dist/{StreamCanvasCapture-Dr5n_iK1.esm.js → StreamCanvasCapture-Bz17q4FP.esm.js} +1 -1
- package/dist/StreamCanvasCapture-DS1TOoiH.d.ts +42 -0
- package/dist/{WasmUtilProvider-CIu373BZ.esm.js → WasmUtilProvider-ADG54T6M.esm.js} +16 -1
- package/dist/{addressSearch-BH96a3fq.esm.js → addressSearch-DJyNTg5S.esm.js} +4 -4
- package/dist/{ae-signature-CDEN8y-w.esm.js → ae-signature-DlElqFrZ.esm.js} +1 -1
- package/dist/ae-signature.d.ts +4 -3
- package/dist/ae-signature.esm.js +10 -9
- package/dist/antifraud.d.ts +4 -3
- package/dist/antifraud.esm.js +7 -6
- package/dist/{antifraudManager-DZifA5zX.esm.js → antifraudManager-BKdQoMFf.esm.js} +4 -3
- package/dist/{antifraudManager-B7WQTIdu.d.ts → antifraudManager-DpIvbrZP.d.ts} +2 -2
- package/dist/{antifraudStateMachine-DlKrK2hL.esm.js → antifraudStateMachine-C0NGnP9W.esm.js} +3 -3
- package/dist/{api-DUZwyz0o.esm.js → api-DsbUi7TO.esm.js} +21 -2
- package/dist/authentication.d.ts +19 -12
- package/dist/authentication.esm.js +33 -27
- package/dist/{authenticationManager-Dve7mGLe.d.ts → authenticationManager-CdPbNS2H.d.ts} +3 -3
- package/dist/{authenticationManager-BM4LzyV7.esm.js → authenticationManager-Dtl1vcET.esm.js} +6 -6
- package/dist/{authenticationStateMachine-Chx3ySdT.esm.js → authenticationStateMachine-D-hOlg8p.esm.js} +8 -8
- package/dist/avatar.d.ts +3 -0
- package/dist/avatar.esm.js +3 -0
- package/dist/{backCameraStream-iftkf3rd.esm.js → backCameraStream-ZyqrFyjO.esm.js} +3 -3
- package/dist/{browser-DlFgHpoC-7tbRR1aR.esm.js → browser-DlFgHpoC-qLKs75Qp.esm.js} +1 -1
- package/dist/{browserSimulation-CGjpdNA1.esm.js → browserSimulation-TsSoavQv.esm.js} +153 -1216
- package/dist/camera-DUkgmYMo.esm.js +79 -0
- package/dist/camera.d.ts +7 -1
- package/dist/camera.esm.js +4 -4
- package/dist/{StreamCanvasCapture-Ctgyx-oD.d.ts → canvas-CJUmoXSD.d.ts} +1 -41
- package/dist/certificate-issuance.d.ts +31 -30
- package/dist/certificate-issuance.esm.js +8 -7
- package/dist/{certificateIssuanceStateMachine-CLNXtXaC.esm.js → certificateIssuanceStateMachine-C07m7qtP.esm.js} +4 -4
- package/dist/clientLifecycle-Ct7h9uxx.esm.js +534 -0
- package/dist/consent.d.ts +4 -3
- package/dist/consent.esm.js +7 -6
- package/dist/{consentManager-psDCeJ0E.esm.js → consentManager-BtnPZUW4.esm.js} +4 -3
- package/dist/{consentManager-BqUGU_YD.d.ts → consentManager-DufVo9D9.d.ts} +52 -52
- package/dist/{consentStateMachine-DRsFFSHE.esm.js → consentStateMachine-DO2JqoZW.esm.js} +3 -3
- package/dist/cpf-ocr.d.ts +4 -3
- package/dist/cpf-ocr.esm.js +7 -6
- package/dist/{cpfOcrManager-BxcgxvgO.esm.js → cpfOcrManager-C4rLgKsu.esm.js} +6 -5
- package/dist/{cpfOcrManager-B2u9hMzd.d.ts → cpfOcrManager-DqZZ94Gt.d.ts} +19 -19
- package/dist/createFaceAvatar-B8pFpy6o.d.ts +401 -0
- package/dist/createFaceAvatar-BOHDKQRq.esm.js +46 -0
- package/dist/cross-document-data-match.d.ts +2 -1
- package/dist/cross-document-data-match.esm.js +6 -5
- package/dist/curp-validation.d.ts +10 -7
- package/dist/curp-validation.esm.js +7 -6
- package/dist/{curpValidationManager-BgLDw0Ub.esm.js → curpValidationManager-BafobPXC.esm.js} +4 -3
- package/dist/{curpValidationManager-Bt6CVD8b.d.ts → curpValidationManager-Co6LZAHT.d.ts} +3 -3
- package/dist/{curpValidationStateMachine-BK_wJ48C.esm.js → curpValidationStateMachine-DXTPK6vI.esm.js} +3 -3
- package/dist/custom-fields.d.ts +3 -2
- package/dist/custom-fields.esm.js +6 -5
- package/dist/custom-watchlist.d.ts +2 -1
- package/dist/custom-watchlist.esm.js +6 -5
- package/dist/{customWatchlistStateMachine-Bi4P59HM.esm.js → customWatchlistStateMachine-B4G3Chkx.esm.js} +3 -3
- package/dist/{deepsightLoader-BMmvk0X6.esm.js → deepsightLoader-DHSVD776.esm.js} +14 -13
- package/dist/{deepsightService-CEZrdiW0.esm.js → deepsightService-CDahSjGP.esm.js} +9 -38
- package/dist/deepsightService-CMB9XjES.d.ts +69 -0
- package/dist/device.d.ts +9 -1
- package/dist/device.esm.js +5 -5
- package/dist/document-capture.d.ts +175 -174
- package/dist/document-capture.esm.js +14 -13
- package/dist/document-upload.d.ts +48 -47
- package/dist/document-upload.esm.js +9 -8
- package/dist/{documentCaptureStateMachine-MpwpJO7t.esm.js → documentCaptureStateMachine-DSOX2epf.esm.js} +7 -7
- package/dist/dynamic-forms.d.ts +4 -192
- package/dist/dynamic-forms.esm.js +8 -160
- package/dist/dynamicFormsManager-BOefZbyF.esm.js +168 -0
- package/dist/dynamicFormsManager-CUYLOj9g.d.ts +239 -0
- package/dist/{dynamicFormsStateMachine-Do84A4uU.esm.js → dynamicFormsStateMachine-BXHcaocI.esm.js} +4 -4
- package/dist/ekyb.d.ts +9 -6
- package/dist/ekyb.esm.js +20 -17
- package/dist/{ekybStateMachine-nsuPOw3f.esm.js → ekybStateMachine-CCSeqjCt.esm.js} +5 -5
- package/dist/ekyc.d.ts +4 -3
- package/dist/ekyc.esm.js +9 -8
- package/dist/{ekycStateMachine-DcynX0rj.esm.js → ekycStateMachine-DkLVTOyA.esm.js} +5 -5
- package/dist/electronic-signature.d.ts +4 -3
- package/dist/electronic-signature.esm.js +9 -8
- package/dist/{electronicSignatureManager-B63aAuI5.esm.js → electronicSignatureManager-DjzUzqZj.esm.js} +50 -87
- package/dist/email.d.ts +5 -4
- package/dist/email.esm.js +9 -8
- package/dist/{emailManager-DxHjAe5u.esm.js → emailManager-B_XzEsXH.esm.js} +5 -4
- package/dist/{emailManager-C6D2u4mQ.d.ts → emailManager-fHASH6uo.d.ts} +3 -3
- package/dist/{emailStateMachine-758f34gg.esm.js → emailStateMachine-fqJ42b19.esm.js} +5 -5
- package/dist/{endpoints-BM2_j_IE.esm.js → endpoints-BzMJFAPV.esm.js} +13 -0
- package/dist/{events-DN-u67gb.esm.js → events-CqGY1yMq.esm.js} +2 -188
- package/dist/events.d.ts +2 -0
- package/dist/events.esm.js +3 -2
- package/dist/extensibility.d.ts +37 -26
- package/dist/extensibility.esm.js +74 -59
- package/dist/{externalFetch-crimxkN9.esm.js → externalFetch-CyhBfD-n.esm.js} +1 -1
- package/dist/face-match.d.ts +2 -2
- package/dist/face-match.esm.js +6 -5
- package/dist/{faceCaptureManagerFactory-BNXZchWX.esm.js → faceCaptureManagerFactory-2brKTzMb.esm.js} +25 -16
- package/dist/faceCaptureManagerFactory-CGKbf7zt.d.ts +400 -0
- package/dist/{faceCaptureSetup-Dqb09D24.esm.js → faceCaptureSetup-CDUVU1nl.esm.js} +97 -13
- package/dist/{faceMatchStateMachine-FikRaUZH.esm.js → faceMatchStateMachine-DUeUjEPx.esm.js} +3 -3
- package/dist/field-comparison.d.ts +4 -3
- package/dist/field-comparison.esm.js +6 -5
- package/dist/{fieldComparisonManager-Dic0DVgl.esm.js → fieldComparisonManager-B9W0a9A5.esm.js} +5 -4
- package/dist/{fieldComparisonManager-BXc6-DJv.d.ts → fieldComparisonManager-DdLqDeB2.d.ts} +2 -2
- package/dist/fiscal-qr.d.ts +5 -3
- package/dist/fiscal-qr.esm.js +13 -12
- package/dist/flow-events.d.ts +8 -6
- package/dist/flow.d.ts +21 -13
- package/dist/flow.esm.js +28 -19
- package/dist/{flowCompletionService-CdGDKv0z.d.ts → flowCompletionService-BIqSTZcd.d.ts} +2 -1
- package/dist/{flowCompletionService-D_CsiDZM.esm.js → flowCompletionService-qEqh_g14.esm.js} +3 -3
- package/dist/{flowServices-ar5DXv71.esm.js → flowServices-C4piblgx.esm.js} +24 -9
- package/dist/geolocation.d.ts +4 -127
- package/dist/geolocation.esm.js +8 -115
- package/dist/geolocationManager-BP2Do9O-.esm.js +123 -0
- package/dist/geolocationManager-Cs50eRlC.d.ts +156 -0
- package/dist/{geolocationStateMachine-BWjrMGS_.esm.js → geolocationStateMachine-BYfOOOG0.esm.js} +4 -4
- package/dist/{getDeviceClass-rXKlXywy.esm.js → getDeviceClass-DGGzzfqm.esm.js} +1 -1
- package/dist/getDeviceData-TrKM8NPh.esm.js +101 -0
- package/dist/government-validation.d.ts +4 -3
- package/dist/government-validation.esm.js +8 -7
- package/dist/{governmentValidationStateMachine-BoF7U1of.esm.js → governmentValidationStateMachine-CwoPPO8b.esm.js} +5 -5
- package/dist/home.d.ts +18 -15
- package/dist/home.esm.js +4 -3
- package/dist/http.esm.js +2 -2
- package/dist/id-ocr.d.ts +4 -625
- package/dist/id-ocr.esm.js +8 -84
- package/dist/id-verification.d.ts +28 -27
- package/dist/id-verification.esm.js +6 -5
- package/dist/id.d.ts +16 -11
- package/dist/id.esm.js +39 -32
- package/dist/idCaptureDefaults-DNJON8Xo.esm.js +188 -0
- package/dist/{idCaptureManager-BvGUSN2e.d.ts → idCaptureManager-BVdvfJys.d.ts} +40 -10
- package/dist/{idCaptureManager-Bm6Wm6Qv.esm.js → idCaptureManager-Bo9DCQSU.esm.js} +14 -11
- package/dist/{idCaptureStateMachine-D1YhOj6n.esm.js → idCaptureStateMachine-BeDidMLU.esm.js} +395 -382
- package/dist/idOcrManager-BkRDrpZu.esm.js +92 -0
- package/dist/idOcrManager-CJzrmM91.d.ts +641 -0
- package/dist/{idOcrStateMachine-YMCDGplq.esm.js → idOcrStateMachine-DRZc4FBl.esm.js} +5 -5
- package/dist/{idVerificationStateMachine-Bo1IYuZH.esm.js → idVerificationStateMachine-oqiERKpg.esm.js} +3 -3
- package/dist/identity-reuse.d.ts +4 -3
- package/dist/identity-reuse.esm.js +7 -6
- package/dist/{identityReuseManager-D0knIrOy.esm.js → identityReuseManager-Bu62LToE.esm.js} +4 -3
- package/dist/{identityReuseManager-DcWSvC-A.d.ts → identityReuseManager-TWKbXuvY.d.ts} +33 -33
- package/dist/{identityReuseStateMachine-CSQfZOqD.esm.js → identityReuseStateMachine-BmONeF6B.esm.js} +3 -3
- package/dist/{index-BgxYUYuD.d.ts → index-DtUlD-bz.d.ts} +2 -2
- package/dist/{index-DV134v62.d.ts → index-Icld-cKW.d.ts} +175 -295
- package/dist/index.d.ts +3 -3
- package/dist/index.esm.js +16 -13
- package/dist/{invokeOnCaptureCallback-Dzemudhk.esm.js → invokeOnCaptureCallback-v_PV_IJz.esm.js} +1 -1
- package/dist/{lib-7ZQ9BdKH.esm.js → lib-B050WTth.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +10 -7
- package/dist/mandatory-consent.esm.js +7 -6
- package/dist/{mandatoryConsentManager-Tzl5Qd35.d.ts → mandatoryConsentManager-Bmdjo14S.d.ts} +50 -50
- package/dist/{mandatoryConsentManager-Lon46nPQ.esm.js → mandatoryConsentManager-CQ3jirlZ.esm.js} +4 -3
- package/dist/{mandatoryConsentStateMachine-D_dZ7IF6.esm.js → mandatoryConsentStateMachine-DkJJLHqC.esm.js} +3 -3
- package/dist/mediaRecorderOptions-C3NAkVgK.esm.js +42 -0
- package/dist/mediapipeShared-CRAKVElv.esm.js +67 -0
- package/dist/{recordingService-CxMJP4tQ.esm.js → onDeviceFaceResults-DVBggeq8.esm.js} +71 -389
- package/dist/{openviduLazy-oAXXI9w_.esm.js → openviduLazy-BTOIauGP.esm.js} +2 -2
- package/dist/openviduLazy-Dov8oKfL.esm.js +3 -0
- package/dist/{permissionGuards-D-Z-lgNj.esm.js → permissionGuards-BR2oN573.esm.js} +1 -1
- package/dist/{permissionServices-CPDboRoE.esm.js → permissionServices-BJhGL13R.esm.js} +7 -4
- package/dist/personhood.d.ts +534 -0
- package/dist/personhood.esm.js +1494 -0
- package/dist/phone.d.ts +5 -4
- package/dist/phone.esm.js +9 -8
- package/dist/{phoneManager-TSq1Ief6.d.ts → phoneManager-BOTcjXgs.d.ts} +3 -3
- package/dist/{phoneManager-Blt4Oc2P.esm.js → phoneManager-BWlxqbyD.esm.js} +5 -4
- package/dist/{phoneStateMachine-W3c6Z8sj.esm.js → phoneStateMachine-B_V9nODs.esm.js} +5 -5
- package/dist/{qe-signature-CQLK6LKE.esm.js → qe-signature-BhFnI9pT.esm.js} +1 -1
- package/dist/qe-signature.d.ts +4 -3
- package/dist/qe-signature.esm.js +10 -9
- package/dist/recordingService-m_1xCthr.esm.js +347 -0
- package/dist/redirect-to-mobile.d.ts +4 -3
- package/dist/redirect-to-mobile.esm.js +9 -8
- package/dist/{redirectToMobileManager-DCvpKdkD.esm.js → redirectToMobileManager-BaAo9rgi.esm.js} +5 -4
- package/dist/{redirectToMobileManager-yOHAmwg-.d.ts → redirectToMobileManager-Br0KZK1G.d.ts} +2 -2
- package/dist/{redirectToMobileStateMachine-DC9z4Vfu.esm.js → redirectToMobileStateMachine-DoAnf2ql.esm.js} +10 -12
- package/dist/{runChildModule-C9G0wfVC.esm.js → runChildModule-0nQfjVVo.esm.js} +3 -3
- package/dist/selfie.d.ts +19 -12
- package/dist/selfie.esm.js +34 -28
- package/dist/{selfieManager-BRL6c_Oc.esm.js → selfieManager-D_ZFERsE.esm.js} +6 -6
- package/dist/{selfieManager-imY2dAcH.d.ts → selfieManager-R0Jw5sjb.d.ts} +3 -3
- package/dist/{selfieStateMachine-D2Q0uwDK.esm.js → selfieStateMachine-CIgeeiN9.esm.js} +4 -4
- package/dist/{session-Be_IA1e0.esm.js → session-9jIfKFCc.esm.js} +3 -3
- package/dist/session.d.ts +7 -5
- package/dist/session.esm.js +16 -14
- package/dist/{sessionInitializer-CaiGA8GP.esm.js → sessionInitializer-C_TYIgyk.esm.js} +11 -107
- package/dist/{setup-BJZAkajt.d.ts → setup-CpRnXxn8.d.ts} +16 -3
- package/dist/setup-DHc6OaHm.esm.js +562 -0
- package/dist/signature.d.ts +3 -2
- package/dist/signature.esm.js +6 -5
- package/dist/{signatureStateMachine-DAxXmMrk.esm.js → signatureStateMachine-DtoiPzys.esm.js} +3 -3
- package/dist/{stats-DntyIiGr.esm.js → stats-CYcScXcO.esm.js} +2 -2
- package/dist/stats.esm.js +3 -3
- package/dist/thumbmarkAdapter-fHBUDlAP.esm.js +1194 -0
- package/dist/{tri-CtxWthxz.esm.js → tri-BG1iJsr4.esm.js} +12 -2
- package/dist/tri.d.ts +1 -1
- package/dist/{tri.esm-CrWAulDi.esm.js → tri.esm-DUC01NgO.esm.js} +27 -23
- package/dist/tri.esm.js +2 -2
- package/dist/trust-graph.d.ts +4 -3
- package/dist/trust-graph.esm.js +4 -3
- package/dist/{types-DpTWgfKY.d.ts → types-BklZ_Wne.d.ts} +1 -1
- package/dist/{types-Dv-9WPJX.d.ts → types-BsYXnC5s.d.ts} +39 -3
- package/dist/types-CxW2e0Ar.d.ts +132 -0
- package/dist/{types-Z9wv19v2.d.ts → types-DgGlgyZT.d.ts} +1 -1
- package/dist/types-ElOJAGaM.esm.js +189 -0
- package/dist/video-C2WIj6TS.esm.js +36 -0
- package/dist/video-selfie.d.ts +351 -0
- package/dist/video-selfie.esm.js +1509 -0
- package/dist/videoSelfieSteps-7M5vxKn-.esm.js +58 -0
- package/dist/{warmup--6HA3yUR.d.ts → warmup-BJZPQIiX.d.ts} +5 -1
- package/dist/wasm.d.ts +4 -4
- package/dist/wasm.esm.js +17 -14
- package/dist/watchlist-for-business.d.ts +2 -1
- package/dist/watchlist-for-business.esm.js +6 -5
- package/dist/watchlist.d.ts +2 -1
- package/dist/watchlist.esm.js +6 -5
- package/dist/{watchlistForBusinessStateMachine-DtefJb-D.esm.js → watchlistForBusinessStateMachine-DvEunDxs.esm.js} +3 -3
- package/dist/{watchlistStateMachine-B0aIS2_n.esm.js → watchlistStateMachine-AHXVf-TB.esm.js} +3 -3
- package/dist/workflow.d.ts +230 -98
- package/dist/workflow.esm.js +123 -79
- package/dist/{xstate.esm-Dkm1jy5u.esm.js → xstate.esm-Bomq1a0z.esm.js} +41 -1
- package/package.json +16 -1
- package/dist/IpifyProvider-oZf7Ke1O.esm.js +0 -167
- package/dist/camera-x4LjGTjZ.esm.js +0 -22
- package/dist/deepsightService-ByNKY5Jv.d.ts +0 -276
- package/dist/faceCaptureManagerFactory-CL-7T_vH.d.ts +0 -731
- package/dist/getBrowser-Dv8LZyHE.esm.js +0 -8
- package/dist/openviduLazy-B_s6jnEk.esm.js +0 -3
- package/dist/setup-C7tintPc.esm.js +0 -1064
- /package/dist/{Actor-fIPLXfoi.d.ts → Actor-CGEelYtQ.d.ts} +0 -0
- /package/dist/{BrowserTimerProvider-BVgutW_b.esm.js → BrowserTimerProvider-CHloo0eQ.esm.js} +0 -0
- /package/dist/{ITimerCapability-BvH0pDwp.esm.js → ITimerCapability-pltuG1E8.esm.js} +0 -0
- /package/dist/{MotionSensorProvider-C9fPAJdS.esm.js → MotionSensorProvider-DCbId4De.esm.js} +0 -0
- /package/dist/{apiError-D-GTvFrH.esm.js → apiError-DNS2OCEX.esm.js} +0 -0
- /package/dist/{camera-biGPWlmx.d.ts → camera-CNVUo-bC.d.ts} +0 -0
- /package/dist/{canvas-7uX2izHb.esm.js → canvas-_I95hkPg.esm.js} +0 -0
- /package/dist/{chunk-BK1xu56N.esm.js → chunk-CIKcdghV.esm.js} +0 -0
- /package/dist/{cpf-xBg-DFNn.esm.js → cpf-BKaho0j_.esm.js} +0 -0
- /package/dist/{dateUtils-8dCcuArE.esm.js → dateUtils-7-tQYRNN.esm.js} +0 -0
- /package/dist/{getDeviceClass-C0zrM97a.esm.js → getDeviceClass-DavNdcxh.esm.js} +0 -0
- /package/dist/{http-CfVTgMfU.esm.js → http-BkiUT7EB.esm.js} +0 -0
- /package/dist/{index-52_qi4bd.d.ts → index-XTtxaahe.d.ts} +0 -0
- /package/dist/{otp-D87RTwrx.esm.js → otp-Bfnzf7I3.esm.js} +0 -0
- /package/dist/{otp-BHJnjEEc.d.ts → otp-M4iy57XY.d.ts} +0 -0
- /package/dist/{platform-BfoqeM61.esm.js → platform-uIVQUnJP.esm.js} +0 -0
- /package/dist/{types-BdVOWGGW.esm.js → types-CMcxlSmH.esm.js} +0 -0
- /package/dist/{types-DYZja-k9.d.ts → types-D_IceWxT.d.ts} +0 -0
- /package/dist/{types-F0IXbaCB.d.ts → types-Duy2rDxF.d.ts} +0 -0
- /package/dist/{urlUtils-8RNHyW3x.esm.js → urlUtils-BZqFU9rR.esm.js} +0 -0
package/dist/id-ocr.esm.js
CHANGED
|
@@ -1,86 +1,10 @@
|
|
|
1
|
-
import "./api-
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
6
|
-
import
|
|
1
|
+
import "./api-DsbUi7TO.esm.js";
|
|
2
|
+
import "./events-CqGY1yMq.esm.js";
|
|
3
|
+
import "./types-ElOJAGaM.esm.js";
|
|
4
|
+
import "./endpoints-BzMJFAPV.esm.js";
|
|
5
|
+
import "./xstate.esm-Bomq1a0z.esm.js";
|
|
6
|
+
import "./cpf-BKaho0j_.esm.js";
|
|
7
|
+
import { a as MIN_AGE, i as CPFFlowIds, n as OCR_FIELDS, r as getOcrFields, t as idOcrStateMachine } from "./idOcrStateMachine-DRZc4FBl.esm.js";
|
|
8
|
+
import { t as createIdOcrManager } from "./idOcrManager-BkRDrpZu.esm.js";
|
|
7
9
|
|
|
8
|
-
//#region src/modules/id-ocr/idOcrActor.ts
|
|
9
|
-
function createIdOcrActor(options) {
|
|
10
|
-
return createActor(idOcrStateMachine, { input: { config: options.config } }).start();
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
//#endregion
|
|
14
|
-
//#region src/modules/id-ocr/idOcrManager.ts
|
|
15
|
-
function mapState(snapshot) {
|
|
16
|
-
const { context } = snapshot;
|
|
17
|
-
const editableOcr = context.config.editableOcr === true;
|
|
18
|
-
if (snapshot.matches("idle")) return { status: "idle" };
|
|
19
|
-
if (snapshot.matches("loading")) return {
|
|
20
|
-
status: "loading",
|
|
21
|
-
ocrDocument: context.activeOcrDocument
|
|
22
|
-
};
|
|
23
|
-
if (snapshot.matches("readonly")) return {
|
|
24
|
-
status: "readonly",
|
|
25
|
-
formData: context.formData,
|
|
26
|
-
editableOcr,
|
|
27
|
-
ocrDocument: context.activeOcrDocument
|
|
28
|
-
};
|
|
29
|
-
if (snapshot.matches("inputting")) return {
|
|
30
|
-
status: "inputting",
|
|
31
|
-
formData: context.formData,
|
|
32
|
-
editedFields: context.editedFields,
|
|
33
|
-
editableOcr,
|
|
34
|
-
ocrDocument: context.activeOcrDocument,
|
|
35
|
-
validationErrors: context.validationErrors
|
|
36
|
-
};
|
|
37
|
-
if (snapshot.matches("submitting")) return {
|
|
38
|
-
status: "submitting",
|
|
39
|
-
ocrDocument: context.activeOcrDocument
|
|
40
|
-
};
|
|
41
|
-
if (snapshot.matches("success")) return { status: "success" };
|
|
42
|
-
if (snapshot.matches("finished")) return { status: "finished" };
|
|
43
|
-
if (snapshot.matches("error")) return {
|
|
44
|
-
status: "error",
|
|
45
|
-
error: context.error ?? "Unknown error"
|
|
46
|
-
};
|
|
47
|
-
return { status: "idle" };
|
|
48
|
-
}
|
|
49
|
-
function createApi({ actor, trackElementClicked }) {
|
|
50
|
-
return {
|
|
51
|
-
load() {
|
|
52
|
-
actor.send({ type: "LOAD" });
|
|
53
|
-
},
|
|
54
|
-
setField(field, value) {
|
|
55
|
-
actor.send({
|
|
56
|
-
type: "DATA_CHANGED",
|
|
57
|
-
field,
|
|
58
|
-
value
|
|
59
|
-
});
|
|
60
|
-
},
|
|
61
|
-
validateField(field) {
|
|
62
|
-
actor.send({
|
|
63
|
-
type: "VALIDATE_FIELD",
|
|
64
|
-
field
|
|
65
|
-
});
|
|
66
|
-
},
|
|
67
|
-
continue() {
|
|
68
|
-
actor.send({ type: "CONTINUE" });
|
|
69
|
-
trackElementClicked?.("continue");
|
|
70
|
-
},
|
|
71
|
-
retry() {
|
|
72
|
-
actor.send({ type: "RETRY" });
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
function createIdOcrManager(options) {
|
|
77
|
-
return createManager({
|
|
78
|
-
actor: createIdOcrActor(options),
|
|
79
|
-
mapState,
|
|
80
|
-
createApi,
|
|
81
|
-
instrumentation: createManagerInstrumentation(eventModuleNames.idOcr)
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
//#endregion
|
|
86
10
|
export { CPFFlowIds, MIN_AGE, OCR_FIELDS, createIdOcrManager, getOcrFields, idOcrStateMachine };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "./
|
|
3
|
-
import
|
|
1
|
+
import "./StateMachine-C_AY4cs7.js";
|
|
2
|
+
import { t as Manager } from "./Manager-CJ3G2zqi.js";
|
|
3
|
+
import "./Actor-CGEelYtQ.js";
|
|
4
|
+
import * as xstate836 from "xstate";
|
|
4
5
|
|
|
5
6
|
//#region src/modules/id-verification/types.d.ts
|
|
6
7
|
type IdVerificationConfig = {
|
|
@@ -32,26 +33,26 @@ type IdVerificationContext = {
|
|
|
32
33
|
type IdVerificationInput = {
|
|
33
34
|
config: IdVerificationConfig;
|
|
34
35
|
};
|
|
35
|
-
declare const idVerificationMachine:
|
|
36
|
+
declare const idVerificationMachine: xstate836.StateMachine<IdVerificationContext, {
|
|
36
37
|
type: "LOAD";
|
|
37
38
|
} | {
|
|
38
39
|
type: "CONTINUE";
|
|
39
40
|
}, {
|
|
40
|
-
[x: string]:
|
|
41
|
+
[x: string]: xstate836.ActorRefFromLogic<xstate836.PromiseActorLogic<ProcessIdResponse, {
|
|
41
42
|
isSecondId: boolean;
|
|
42
43
|
queueName: string;
|
|
43
|
-
},
|
|
44
|
+
}, xstate836.EventObject>> | undefined;
|
|
44
45
|
}, {
|
|
45
46
|
src: "processId";
|
|
46
|
-
logic:
|
|
47
|
+
logic: xstate836.PromiseActorLogic<ProcessIdResponse, {
|
|
47
48
|
isSecondId: boolean;
|
|
48
49
|
queueName: string;
|
|
49
|
-
},
|
|
50
|
+
}, xstate836.EventObject>;
|
|
50
51
|
id: string | undefined;
|
|
51
52
|
}, never, {
|
|
52
53
|
type: "isDocumentExpired";
|
|
53
54
|
params: unknown;
|
|
54
|
-
}, never, "idle" | "processing" | "finished" | "expired", string, IdVerificationInput,
|
|
55
|
+
}, never, "idle" | "processing" | "finished" | "expired", string, IdVerificationInput, xstate836.NonReducibleUnknown, xstate836.EventObject, xstate836.MetaObject, {
|
|
55
56
|
readonly id: "idVerification";
|
|
56
57
|
readonly initial: "idle";
|
|
57
58
|
readonly context: ({
|
|
@@ -60,50 +61,50 @@ declare const idVerificationMachine: xstate554.StateMachine<IdVerificationContex
|
|
|
60
61
|
spawn: {
|
|
61
62
|
<TSrc extends "processId">(logic: TSrc, ...[options]: {
|
|
62
63
|
src: "processId";
|
|
63
|
-
logic:
|
|
64
|
+
logic: xstate836.PromiseActorLogic<ProcessIdResponse, {
|
|
64
65
|
isSecondId: boolean;
|
|
65
66
|
queueName: string;
|
|
66
|
-
},
|
|
67
|
+
}, xstate836.EventObject>;
|
|
67
68
|
id: string | undefined;
|
|
68
69
|
} extends infer T ? T extends {
|
|
69
70
|
src: "processId";
|
|
70
|
-
logic:
|
|
71
|
+
logic: xstate836.PromiseActorLogic<ProcessIdResponse, {
|
|
71
72
|
isSecondId: boolean;
|
|
72
73
|
queueName: string;
|
|
73
|
-
},
|
|
74
|
+
}, xstate836.EventObject>;
|
|
74
75
|
id: string | undefined;
|
|
75
76
|
} ? T extends {
|
|
76
77
|
src: TSrc;
|
|
77
|
-
} ?
|
|
78
|
+
} ? xstate836.ConditionalRequired<[options?: ({
|
|
78
79
|
id?: T["id"] | undefined;
|
|
79
80
|
systemId?: string;
|
|
80
|
-
input?:
|
|
81
|
+
input?: xstate836.InputFrom<T["logic"]> | undefined;
|
|
81
82
|
syncSnapshot?: boolean;
|
|
82
|
-
} & { [K in
|
|
83
|
+
} & { [K in xstate836.RequiredActorOptions<T>]: unknown }) | undefined], xstate836.IsNotNever<xstate836.RequiredActorOptions<T>>> : never : never : never): xstate836.ActorRefFromLogic<xstate836.GetConcreteByKey<{
|
|
83
84
|
src: "processId";
|
|
84
|
-
logic:
|
|
85
|
+
logic: xstate836.PromiseActorLogic<ProcessIdResponse, {
|
|
85
86
|
isSecondId: boolean;
|
|
86
87
|
queueName: string;
|
|
87
|
-
},
|
|
88
|
+
}, xstate836.EventObject>;
|
|
88
89
|
id: string | undefined;
|
|
89
90
|
}, "src", TSrc>["logic"]>;
|
|
90
|
-
<TLogic extends
|
|
91
|
+
<TLogic extends xstate836.AnyActorLogic>(src: TLogic, ...[options]: xstate836.ConditionalRequired<[options?: ({
|
|
91
92
|
id?: never;
|
|
92
93
|
systemId?: string;
|
|
93
|
-
input?:
|
|
94
|
+
input?: xstate836.InputFrom<TLogic> | undefined;
|
|
94
95
|
syncSnapshot?: boolean;
|
|
95
|
-
} & { [K in
|
|
96
|
+
} & { [K in xstate836.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate836.IsNotNever<xstate836.RequiredLogicInput<TLogic>>>): xstate836.ActorRefFromLogic<TLogic>;
|
|
96
97
|
};
|
|
97
98
|
input: IdVerificationInput;
|
|
98
|
-
self:
|
|
99
|
+
self: xstate836.ActorRef<xstate836.MachineSnapshot<IdVerificationContext, {
|
|
99
100
|
type: "LOAD";
|
|
100
101
|
} | {
|
|
101
102
|
type: "CONTINUE";
|
|
102
|
-
}, Record<string,
|
|
103
|
+
}, Record<string, xstate836.AnyActorRef | undefined>, xstate836.StateValue, string, unknown, any, any>, {
|
|
103
104
|
type: "LOAD";
|
|
104
105
|
} | {
|
|
105
106
|
type: "CONTINUE";
|
|
106
|
-
},
|
|
107
|
+
}, xstate836.AnyEventObject>;
|
|
107
108
|
}) => {
|
|
108
109
|
config: IdVerificationConfig;
|
|
109
110
|
isSecondId: boolean;
|
|
@@ -127,15 +128,15 @@ declare const idVerificationMachine: xstate554.StateMachine<IdVerificationContex
|
|
|
127
128
|
} | {
|
|
128
129
|
type: "CONTINUE";
|
|
129
130
|
};
|
|
130
|
-
self:
|
|
131
|
+
self: xstate836.ActorRef<xstate836.MachineSnapshot<IdVerificationContext, {
|
|
131
132
|
type: "LOAD";
|
|
132
133
|
} | {
|
|
133
134
|
type: "CONTINUE";
|
|
134
|
-
}, Record<string,
|
|
135
|
+
}, Record<string, xstate836.AnyActorRef>, xstate836.StateValue, string, unknown, any, any>, {
|
|
135
136
|
type: "LOAD";
|
|
136
137
|
} | {
|
|
137
138
|
type: "CONTINUE";
|
|
138
|
-
},
|
|
139
|
+
}, xstate836.AnyEventObject>;
|
|
139
140
|
}) => {
|
|
140
141
|
isSecondId: boolean;
|
|
141
142
|
queueName: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import "./api-
|
|
2
|
-
import {
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
1
|
+
import "./api-DsbUi7TO.esm.js";
|
|
2
|
+
import { n as createManagerInstrumentation } from "./events-CqGY1yMq.esm.js";
|
|
3
|
+
import "./types-ElOJAGaM.esm.js";
|
|
4
|
+
import "./endpoints-BzMJFAPV.esm.js";
|
|
5
|
+
import { l as createManager, s as createActor } from "./xstate.esm-Bomq1a0z.esm.js";
|
|
6
|
+
import { t as idVerificationMachine } from "./idVerificationStateMachine-oqiERKpg.esm.js";
|
|
6
7
|
|
|
7
8
|
//#region src/modules/id-verification/idVerificationActor.ts
|
|
8
9
|
function createIdVerificationActor(options) {
|
package/dist/id.d.ts
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import "./warmup
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import { t as
|
|
6
|
-
import "./
|
|
7
|
-
import "./types-
|
|
8
|
-
import "./types-
|
|
9
|
-
import
|
|
10
|
-
import "./
|
|
11
|
-
import
|
|
1
|
+
import "./warmup-BJZPQIiX.js";
|
|
2
|
+
import "./StateMachine-C_AY4cs7.js";
|
|
3
|
+
import "./Manager-CJ3G2zqi.js";
|
|
4
|
+
import "./Actor-CGEelYtQ.js";
|
|
5
|
+
import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-BbWjgpiF.js";
|
|
6
|
+
import { t as CameraStream } from "./camera-CNVUo-bC.js";
|
|
7
|
+
import "./types-DgGlgyZT.js";
|
|
8
|
+
import "./types-D_IceWxT.js";
|
|
9
|
+
import "./canvas-CJUmoXSD.js";
|
|
10
|
+
import "./createFaceAvatar-B8pFpy6o.js";
|
|
11
|
+
import "./types-BsYXnC5s.js";
|
|
12
|
+
import "./IWasmUtilCapability-d2XvzaCk.js";
|
|
13
|
+
import { n as PermissionStatus, t as PermissionResult } from "./types-Duy2rDxF.js";
|
|
14
|
+
import "./StreamCanvasCapture-DS1TOoiH.js";
|
|
15
|
+
import "./deepsightService-CMB9XjES.js";
|
|
16
|
+
import { $ as MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, A as CaptureIdResponse, B as IdCaptureGeometry, C as IdCaptureOnlyMachine, D as createIdCaptureActor, E as IdCaptureActor, F as ID_ERROR_CODES, G as IdCapturedImageData, H as IdCaptureMode, I as IdCaptureConfig, J as IdErrorCode, K as IdDocumentType, L as IdCaptureContext, M as CapturedImage, N as DetectionArea, O as IdCaptureMachine, P as DetectionStatus, Q as MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, R as IdCaptureDependencies, S as createIdCaptureOnlyActor, T as CreateIdCaptureActorOptions, U as IdCaptureOnlyConfig, V as IdCaptureInput, W as IdCaptureThresholds, X as RecordingSession, Y as IdFlowStep, Z as UploadIdResponse, _ as uploadIdImage, a as IdCaptureInitResult, at as IdCaptureSettings, b as CreateIdCaptureOnlyActorOptions, c as UploadIdImageParams, d as initializeIdCapture, et as MANUAL_UPLOAD_MAX_RETRIES, f as preloadIdRecordingProvider, g as stopStream, h as stopRecording, it as DetectionOrientation, j as CaptureOnlyResponse, k as idCaptureMachine, l as UploadManualIdFileParams, m as startRecordingSession, n as IdCaptureManager, nt as ManualUploadSide, o as InitializeIdCaptureParams, p as processId, q as IdError, r as IdCaptureState, rt as ManualUploadTab, s as StartRecordingParams, t as createIdCaptureManager, tt as ManualUploadContext, u as ValidationError, v as uploadManualIdFile, w as idCaptureOnlyMachine, x as IdCaptureOnlyActor, y as validateUploadResponse, z as IdCaptureEvent } from "./idCaptureManager-BVdvfJys.js";
|
|
12
17
|
|
|
13
18
|
//#region src/modules/id/idCaptureOnlyManager.d.ts
|
|
14
19
|
type IdCaptureOnlyManager = IdCaptureManager;
|
package/dist/id.esm.js
CHANGED
|
@@ -1,35 +1,42 @@
|
|
|
1
|
-
import "./WasmUtilProvider-
|
|
2
|
-
import "./BrowserTimerProvider-
|
|
3
|
-
import "./api-
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import "./browserSimulation-
|
|
9
|
-
import "./sessionInitializer-
|
|
10
|
-
import "./
|
|
11
|
-
import "./
|
|
12
|
-
import "./
|
|
13
|
-
import
|
|
14
|
-
import "./
|
|
15
|
-
import {
|
|
16
|
-
import "./
|
|
17
|
-
import "./
|
|
18
|
-
import "./
|
|
19
|
-
import "./
|
|
20
|
-
import "./
|
|
21
|
-
import "./
|
|
22
|
-
import "./
|
|
23
|
-
import "./
|
|
24
|
-
import "./
|
|
25
|
-
import "./
|
|
26
|
-
import "./
|
|
27
|
-
import "./
|
|
28
|
-
import "./
|
|
29
|
-
import "./
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
1
|
+
import "./WasmUtilProvider-ADG54T6M.esm.js";
|
|
2
|
+
import "./BrowserTimerProvider-CHloo0eQ.esm.js";
|
|
3
|
+
import "./api-DsbUi7TO.esm.js";
|
|
4
|
+
import "./events-CqGY1yMq.esm.js";
|
|
5
|
+
import { n as eventModuleNames } from "./types-ElOJAGaM.esm.js";
|
|
6
|
+
import "./endpoints-BzMJFAPV.esm.js";
|
|
7
|
+
import "./stats-CYcScXcO.esm.js";
|
|
8
|
+
import "./browserSimulation-TsSoavQv.esm.js";
|
|
9
|
+
import "./sessionInitializer-C_TYIgyk.esm.js";
|
|
10
|
+
import "./getDeviceData-TrKM8NPh.esm.js";
|
|
11
|
+
import "./thumbmarkAdapter-fHBUDlAP.esm.js";
|
|
12
|
+
import "./IpifyProvider-BRW14_uo.esm.js";
|
|
13
|
+
import "./platform-uIVQUnJP.esm.js";
|
|
14
|
+
import "./tri-BG1iJsr4.esm.js";
|
|
15
|
+
import { a as fromPromise, r as assign, s as createActor } from "./xstate.esm-Bomq1a0z.esm.js";
|
|
16
|
+
import "./apiError-DNS2OCEX.esm.js";
|
|
17
|
+
import "./BrowserVisibilityObserverProvider-rim9Jrz-.esm.js";
|
|
18
|
+
import "./MotionSensorProvider-DCbId4De.esm.js";
|
|
19
|
+
import "./permissionServices-BJhGL13R.esm.js";
|
|
20
|
+
import "./camera-DUkgmYMo.esm.js";
|
|
21
|
+
import { t as BrowserStorageProvider } from "./BrowserStorageProvider-CrrN540a.esm.js";
|
|
22
|
+
import "./onDeviceFaceResults-DVBggeq8.esm.js";
|
|
23
|
+
import "./ITimerCapability-pltuG1E8.esm.js";
|
|
24
|
+
import "./canvas-_I95hkPg.esm.js";
|
|
25
|
+
import "./backCameraStream-ZyqrFyjO.esm.js";
|
|
26
|
+
import "./video-C2WIj6TS.esm.js";
|
|
27
|
+
import "./getDeviceClass-DavNdcxh.esm.js";
|
|
28
|
+
import "./deepsightService-CDahSjGP.esm.js";
|
|
29
|
+
import "./getDeviceClass-DGGzzfqm.esm.js";
|
|
30
|
+
import "./types-CMcxlSmH.esm.js";
|
|
31
|
+
import "./StreamCanvasCapture-Bz17q4FP.esm.js";
|
|
32
|
+
import "./permissionGuards-BR2oN573.esm.js";
|
|
33
|
+
import "./recordingService-m_1xCthr.esm.js";
|
|
34
|
+
import "./mediaRecorderOptions-C3NAkVgK.esm.js";
|
|
35
|
+
import "./session-9jIfKFCc.esm.js";
|
|
36
|
+
import { _ as MANUAL_UPLOAD_MAX_RETRIES, a as initializeIdCapture, c as startRecordingSession, d as uploadIdImage, f as uploadManualIdFile, g as MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, h as MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, l as stopRecording, m as ID_ERROR_CODES, o as preloadIdRecordingProvider, p as validateUploadResponse, s as processId, t as idCaptureMachine, u as stopStream } from "./idCaptureStateMachine-BeDidMLU.esm.js";
|
|
37
|
+
import "./idCaptureDefaults-DNJON8Xo.esm.js";
|
|
38
|
+
import { n as createIdCaptureActor, r as createIdCaptureManagerFromActor, t as createIdCaptureManager } from "./idCaptureManager-Bo9DCQSU.esm.js";
|
|
39
|
+
import { t as invokeOnCaptureCallback } from "./invokeOnCaptureCallback-v_PV_IJz.esm.js";
|
|
33
40
|
|
|
34
41
|
//#region src/modules/id/idCaptureOnlyStateMachine.ts
|
|
35
42
|
function buildSubImage(canvas) {
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { d as IdCaptureModelType, i as mlWasmJSApi_default, n as BaseWasmProvider, u as WasmPipelineType } from "./WasmUtilProvider-ADG54T6M.esm.js";
|
|
2
|
+
import { t as IncodeCanvas } from "./canvas-_I95hkPg.esm.js";
|
|
3
|
+
|
|
4
|
+
//#region ../infra/src/providers/wasm/IdCaptureProvider.ts
|
|
5
|
+
var IdCaptureProvider = class extends BaseWasmProvider {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(WasmPipelineType.IdBlurGlarePipeline);
|
|
8
|
+
this.lastProcessResult = null;
|
|
9
|
+
this.capturedCanvas = null;
|
|
10
|
+
this.originalCapturedCanvas = null;
|
|
11
|
+
}
|
|
12
|
+
async initialize(config) {
|
|
13
|
+
if (config.videoSelfie === true) {
|
|
14
|
+
this.pipelineType = WasmPipelineType.IdVideoSelfiePipeline;
|
|
15
|
+
await this.initializeBase(config, "videoSelfieId");
|
|
16
|
+
} else await this.initializeBase(config, "idCapture");
|
|
17
|
+
}
|
|
18
|
+
setCallbacks(callbacks) {
|
|
19
|
+
this.ensureInitialized();
|
|
20
|
+
const onCaptureWrapper = () => {
|
|
21
|
+
callbacks.onCapture?.();
|
|
22
|
+
};
|
|
23
|
+
mlWasmJSApi_default.setIdCaptureCallbacks(this.getPipelineType(), callbacks.onFarAway ?? (() => {}), callbacks.onDetectionStarted ?? (() => {}), callbacks.onMaskChange ? (show, mask, top, orientation) => callbacks.onMaskChange?.(show, mask, top, orientation) : () => {}, callbacks.onBlur ?? (() => {}), callbacks.onGlare ?? (() => {}), callbacks.onCapturing ?? (() => {}), callbacks.onCapture ? onCaptureWrapper : () => {}, callbacks.onBestFrame ? (blur, glare, orientation) => callbacks.onBestFrame?.(blur, glare, orientation) : () => {}, callbacks.onIdNotDetected ?? (() => {}), callbacks.onSwitchToManualCapture ?? (() => {}), callbacks.onIdTypeChange ? (idType) => callbacks.onIdTypeChange?.(idType) : () => {}, callbacks.onIdSideChange ? (side) => callbacks.onIdSideChange?.(side) : () => {}, callbacks.onCapturingCounterValueChange ? (value) => callbacks.onCapturingCounterValueChange?.(value) : () => {});
|
|
24
|
+
}
|
|
25
|
+
setThresholds(thresholds) {
|
|
26
|
+
this.ensureInitialized();
|
|
27
|
+
mlWasmJSApi_default.setIdCaptureThresholds(this.getPipelineType(), thresholds.blurThreshold, thresholds.blurChangeThreshold, thresholds.glareThreshold, thresholds.clsThreshold, thresholds.sideThreshold, thresholds.iouThreshold, thresholds.idDetectedTimeout, thresholds.autocaptureTimeout, thresholds.framesAggregationInterval);
|
|
28
|
+
}
|
|
29
|
+
setGeometry(geometry) {
|
|
30
|
+
this.ensureInitialized();
|
|
31
|
+
mlWasmJSApi_default.setIdCaptureGeometryParams(this.getPipelineType(), geometry.areaDown, geometry.areaUp, geometry.areaIOSPassportUp, geometry.areaIOSPassportDown, geometry.widthIOSUp, geometry.widthIOSDown, geometry.widthDown, geometry.widthUp, geometry.windowOuterWidth, geometry.windowOuterHeight, geometry.windowInnerWidth, geometry.windowInnerHeight);
|
|
32
|
+
}
|
|
33
|
+
setSettings(settings) {
|
|
34
|
+
this.ensureInitialized();
|
|
35
|
+
mlWasmJSApi_default.setIdCaptureConfigParams(this.getPipelineType(), settings.isFixedMask, settings.isIPhone14OrHigher, settings.idType, settings.blurCheckEnabled, settings.glareCheckEnabled, settings.faceQualityCheckEnabled, settings.iouCheckEnabled, settings.fpsLimitEnabled);
|
|
36
|
+
}
|
|
37
|
+
setModelType(modelType) {
|
|
38
|
+
this.ensureInitialized();
|
|
39
|
+
let wasmModelType;
|
|
40
|
+
switch (modelType) {
|
|
41
|
+
case "v1":
|
|
42
|
+
wasmModelType = IdCaptureModelType.IdCaptureV1x;
|
|
43
|
+
break;
|
|
44
|
+
case "v2":
|
|
45
|
+
wasmModelType = IdCaptureModelType.IdCaptureV2x;
|
|
46
|
+
break;
|
|
47
|
+
case "v3":
|
|
48
|
+
wasmModelType = IdCaptureModelType.IdCaptureV3x;
|
|
49
|
+
break;
|
|
50
|
+
default: throw new Error(`Unknown model type: ${modelType}`);
|
|
51
|
+
}
|
|
52
|
+
mlWasmJSApi_default.setIdCaptureModelType(this.getPipelineType(), wasmModelType);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Processes a frame through the WASM pipeline and stores the result.
|
|
56
|
+
*/
|
|
57
|
+
async processFrame(image) {
|
|
58
|
+
const result = await this.processFrameWasm(image);
|
|
59
|
+
const pipelineType = this.getPipelineType();
|
|
60
|
+
if (result && (pipelineType === WasmPipelineType.IdBlurGlarePipeline || pipelineType === WasmPipelineType.IdVideoSelfiePipeline)) this.lastProcessResult = result;
|
|
61
|
+
else this.lastProcessResult = null;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Gets the last process result from the most recent frame processing.
|
|
65
|
+
* @returns The last process result with quad coordinates, or null if not available
|
|
66
|
+
*/
|
|
67
|
+
getLastProcessResult() {
|
|
68
|
+
return this.lastProcessResult;
|
|
69
|
+
}
|
|
70
|
+
transformPerspective(canvas, frameRect) {
|
|
71
|
+
this.ensureInitialized();
|
|
72
|
+
const originalWidth = canvas.width();
|
|
73
|
+
const originalHeight = canvas.height();
|
|
74
|
+
try {
|
|
75
|
+
const imageData = canvas.getImageData();
|
|
76
|
+
if (!imageData) return canvas;
|
|
77
|
+
const transformedCanvas = mlWasmJSApi_default.IdPerspectiveTransform(imageData, frameRect);
|
|
78
|
+
if (transformedCanvas) {
|
|
79
|
+
const wrappedCanvas = new IncodeCanvas(transformedCanvas);
|
|
80
|
+
const wrappedWidth = wrappedCanvas.width();
|
|
81
|
+
const wrappedHeight = wrappedCanvas.height();
|
|
82
|
+
if (wrappedWidth === originalWidth && wrappedHeight === originalHeight) {
|
|
83
|
+
const croppedCanvas = this.cropCanvasToRect(wrappedCanvas, {
|
|
84
|
+
x: Math.round(frameRect.x),
|
|
85
|
+
y: Math.round(frameRect.y),
|
|
86
|
+
w: Math.round(frameRect.w),
|
|
87
|
+
h: Math.round(frameRect.h)
|
|
88
|
+
});
|
|
89
|
+
if (croppedCanvas) return croppedCanvas;
|
|
90
|
+
}
|
|
91
|
+
return wrappedCanvas;
|
|
92
|
+
}
|
|
93
|
+
return canvas;
|
|
94
|
+
} catch (_error) {
|
|
95
|
+
return canvas;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Crops a canvas to the specified rectangle region.
|
|
100
|
+
* @param canvas - The canvas to crop
|
|
101
|
+
* @param rect - The rectangle to crop to (x, y, w, h)
|
|
102
|
+
* @returns A new IncodeCanvas with the cropped region, or null if cropping fails
|
|
103
|
+
*/
|
|
104
|
+
cropCanvasToRect(canvas, rect) {
|
|
105
|
+
const canvasWidth = canvas.width();
|
|
106
|
+
const canvasHeight = canvas.height();
|
|
107
|
+
if (!canvasWidth || !canvasHeight) return null;
|
|
108
|
+
const x = Math.max(0, Math.min(rect.x, canvasWidth));
|
|
109
|
+
const y = Math.max(0, Math.min(rect.y, canvasHeight));
|
|
110
|
+
const w = Math.max(1, Math.min(rect.w, canvasWidth - x));
|
|
111
|
+
const h = Math.max(1, Math.min(rect.h, canvasHeight - y));
|
|
112
|
+
const croppedCanvasElement = document.createElement("canvas");
|
|
113
|
+
croppedCanvasElement.width = w;
|
|
114
|
+
croppedCanvasElement.height = h;
|
|
115
|
+
const ctx = croppedCanvasElement.getContext("2d");
|
|
116
|
+
if (!ctx) return null;
|
|
117
|
+
ctx.drawImage(canvas.canvas, x, y, w, h, 0, 0, w, h);
|
|
118
|
+
return new IncodeCanvas(croppedCanvasElement);
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Gets the captured canvas (transformed for preview).
|
|
122
|
+
* @returns The captured canvas, or null if not available
|
|
123
|
+
*/
|
|
124
|
+
getCapturedCanvas() {
|
|
125
|
+
return this.capturedCanvas;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Gets the original captured canvas (full frame for upload).
|
|
129
|
+
* @returns The original captured canvas, or null if not available
|
|
130
|
+
*/
|
|
131
|
+
getOriginalCapturedCanvas() {
|
|
132
|
+
return this.originalCapturedCanvas;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Sets the captured canvases (original and transformed).
|
|
136
|
+
* @param original - The original full-frame canvas (for upload)
|
|
137
|
+
* @param transformed - The transformed canvas (for preview)
|
|
138
|
+
*/
|
|
139
|
+
setCapturedCanvases(original, transformed) {
|
|
140
|
+
this.originalCapturedCanvas = original;
|
|
141
|
+
this.capturedCanvas = transformed;
|
|
142
|
+
}
|
|
143
|
+
reset() {
|
|
144
|
+
super.reset();
|
|
145
|
+
this.lastProcessResult = null;
|
|
146
|
+
this.capturedCanvas = null;
|
|
147
|
+
this.originalCapturedCanvas = null;
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region ../infra/src/wasm/idCaptureDefaults.ts
|
|
153
|
+
/**
|
|
154
|
+
* Default WASM thresholds for ID capture quality checks.
|
|
155
|
+
* Based on legacy pipelinesConfig.ts values.
|
|
156
|
+
*/
|
|
157
|
+
const DEFAULT_ID_CAPTURE_THRESHOLDS = {
|
|
158
|
+
blurThreshold: .2,
|
|
159
|
+
blurChangeThreshold: .2,
|
|
160
|
+
glareThreshold: .3,
|
|
161
|
+
clsThreshold: .98,
|
|
162
|
+
sideThreshold: .8,
|
|
163
|
+
iouThreshold: .8,
|
|
164
|
+
idDetectedTimeout: 1e4,
|
|
165
|
+
autocaptureTimeout: 5e3,
|
|
166
|
+
framesAggregationInterval: 3e3
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* Default geometry parameters for ID detection.
|
|
170
|
+
* Window dimensions must be provided at runtime.
|
|
171
|
+
*/
|
|
172
|
+
const DEFAULT_ID_CAPTURE_GEOMETRY = {
|
|
173
|
+
areaDown: 25e3,
|
|
174
|
+
areaUp: 55e3,
|
|
175
|
+
areaIOSPassportUp: 3e4,
|
|
176
|
+
areaIOSPassportDown: 2e4,
|
|
177
|
+
widthIOSUp: 160,
|
|
178
|
+
widthIOSDown: 85,
|
|
179
|
+
widthDown: 110,
|
|
180
|
+
widthUp: 205
|
|
181
|
+
};
|
|
182
|
+
/**
|
|
183
|
+
* Default model version for ID capture.
|
|
184
|
+
*/
|
|
185
|
+
const DEFAULT_ID_CAPTURE_MODEL_VERSION = "v2";
|
|
186
|
+
|
|
187
|
+
//#endregion
|
|
188
|
+
export { IdCaptureProvider as i, DEFAULT_ID_CAPTURE_MODEL_VERSION as n, DEFAULT_ID_CAPTURE_THRESHOLDS as r, DEFAULT_ID_CAPTURE_GEOMETRY as t };
|
|
@@ -1,17 +1,29 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import { t as
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-C_AY4cs7.js";
|
|
2
|
+
import { t as Manager } from "./Manager-CJ3G2zqi.js";
|
|
3
|
+
import { t as ActorRefFrom } from "./Actor-CGEelYtQ.js";
|
|
4
|
+
import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-BbWjgpiF.js";
|
|
5
|
+
import { t as CameraStream } from "./camera-CNVUo-bC.js";
|
|
6
|
+
import { t as IncodeCanvas } from "./canvas-CJUmoXSD.js";
|
|
7
|
+
import { _ as MLProviderConfig, g as IMLProviderCapability } from "./createFaceAvatar-B8pFpy6o.js";
|
|
8
|
+
import { a as RegulationTypes, n as Flow, o as TutorialIdConfig } from "./types-BsYXnC5s.js";
|
|
9
|
+
import { a as IRecordingCapability, i as IStorageCapability, o as RecordingConnection } from "./IWasmUtilCapability-d2XvzaCk.js";
|
|
10
|
+
import { n as PermissionStatus, t as PermissionResult } from "./types-Duy2rDxF.js";
|
|
11
|
+
import { t as StreamCanvasCapture } from "./StreamCanvasCapture-DS1TOoiH.js";
|
|
12
|
+
import { t as DeepsightService } from "./deepsightService-CMB9XjES.js";
|
|
8
13
|
|
|
9
14
|
//#region ../infra/src/capabilities/IIdCaptureCapability.d.ts
|
|
10
15
|
/**
|
|
11
16
|
* Configuration for ID capture provider.
|
|
12
17
|
* Extends base ML provider config with ID-capture specific options.
|
|
13
18
|
*/
|
|
14
|
-
|
|
19
|
+
interface IdCaptureConfig$1 extends MLProviderConfig {
|
|
20
|
+
/**
|
|
21
|
+
* Load the video-selfie ID workflow (`IdVideoSelfiePipeline`, the simplified
|
|
22
|
+
* ID-capture pipeline without a capturing-manager timer, used by the
|
|
23
|
+
* video-selfie flow) instead of the default blur/glare ID pipeline.
|
|
24
|
+
*/
|
|
25
|
+
videoSelfie?: boolean;
|
|
26
|
+
}
|
|
15
27
|
interface IdCaptureThresholds$1 {
|
|
16
28
|
blurThreshold: number;
|
|
17
29
|
blurChangeThreshold: number;
|
|
@@ -412,8 +424,11 @@ type IdCaptureContext = {
|
|
|
412
424
|
attemptsRemaining: number;
|
|
413
425
|
/**
|
|
414
426
|
* Number of consecutive `isDocumentExpired === true` upload responses for
|
|
415
|
-
* the current side. Reset on side
|
|
416
|
-
*
|
|
427
|
+
* the current side (V1's `expiredFirstSideAttempt`). Reset on every side
|
|
428
|
+
* change; preserved across the same-side soft-retry cycle
|
|
429
|
+
* (`expired → capture`). Compared against `config.captureAttempts`. This is
|
|
430
|
+
* a per-side local counter only — the cross-side expired-back→front redirect
|
|
431
|
+
* is bounded separately by `expiredRedirected` (see below).
|
|
417
432
|
*/
|
|
418
433
|
expiredAttempts: number;
|
|
419
434
|
/**
|
|
@@ -458,6 +473,19 @@ type IdCaptureContext = {
|
|
|
458
473
|
* the terminal "No attempts remaining" view.
|
|
459
474
|
*/
|
|
460
475
|
forceFinishAfterProcessing: boolean;
|
|
476
|
+
/**
|
|
477
|
+
* One-shot flag (V1's `expiredRedirected`). Set when an expired BACK upload
|
|
478
|
+
* in a multi-side flow sends the user back to FRONT capture for one more
|
|
479
|
+
* attempt (Figma Story #2.1 / ENG-46592). Session-global — preserved across
|
|
480
|
+
* the front/back side resets so it survives the flip cycle. Once set, any
|
|
481
|
+
* further expired upload routes straight to `expiredExhausted` instead of
|
|
482
|
+
* redirecting again, so the back→front redirect happens AT MOST ONCE per
|
|
483
|
+
* session. This is what keeps total captures within the backend's
|
|
484
|
+
* max-attempts/OCR cap (re-respects ENG-45666). Session-global: preserved
|
|
485
|
+
* across side resets and mid-flow `resetContext` restarts (like V1's
|
|
486
|
+
* localStorage flag); a fresh session starts it `false`.
|
|
487
|
+
*/
|
|
488
|
+
expiredRedirected: boolean;
|
|
461
489
|
uploadError: IdErrorCode | undefined;
|
|
462
490
|
permissionResult: PermissionResult | 'refresh' | undefined;
|
|
463
491
|
resetDetection: (() => void) | undefined;
|
|
@@ -824,6 +852,8 @@ type IdCaptureExpiredState = {
|
|
|
824
852
|
* "X attempts remaining" line on `1-9-11-id-documenterror`.
|
|
825
853
|
*/
|
|
826
854
|
attemptsRemaining: number;
|
|
855
|
+
/** Which side just expired — drives the back-specific subtitle in the UI. */
|
|
856
|
+
currentMode: IdCaptureMode;
|
|
827
857
|
};
|
|
828
858
|
type IdCaptureExpiredExhaustedState = {
|
|
829
859
|
status: 'expiredExhausted';
|