@incodetech/core 2.0.1-rc.0 → 2.1.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BrowserStorageProvider-CuOW1Er2.esm.js → BrowserStorageProvider-BpJM-gIl.esm.js} +8 -1
- package/dist/{IpifyProvider-D7jx52AL.esm.js → IpifyProvider-D4LWD15E.esm.js} +28 -0
- package/dist/{MotionSensorProvider-4v7xkqAp.esm.js → MotionSensorProvider-Bx7Mpzt0.esm.js} +63 -13
- package/dist/{OpenViduRecordingProvider-CMu6XVdc.esm.js → OpenViduRecordingProvider-O4GjBseO.esm.js} +1 -1
- package/dist/StateMachine-BC_nGvrc.d.ts +2 -0
- package/dist/StreamCanvasCapture-ImiDQdVA.esm.js +118 -0
- package/dist/StreamCanvasCapture-yyl20qd9.d.ts +152 -0
- package/dist/{BaseWasmProvider-C_DLEI40.esm.js → WasmUtilProvider-CiEN7Gjn.esm.js} +183 -11
- package/dist/{addressSearch-BpTbTWCa.esm.js → addressSearch-DvmWXKZg.esm.js} +63 -57
- package/dist/{ae-signature-DDDZmWXj.esm.js → ae-signature-BFZta3TZ.esm.js} +1 -1
- package/dist/ae-signature.d.ts +3 -3
- package/dist/ae-signature.esm.js +6 -5
- package/dist/antifraud.d.ts +5 -46
- package/dist/antifraud.esm.js +6 -43
- package/dist/antifraudManager-CkV4u-LE.esm.js +55 -0
- package/dist/antifraudManager-CznnhyvD.d.ts +63 -0
- package/dist/{antifraudStateMachine-O0TMf6yc.esm.js → antifraudStateMachine-Ccrb-Jxc.esm.js} +2 -2
- package/dist/apiError-B-j-gyDx.esm.js +51 -0
- package/dist/authentication.d.ts +13 -11
- package/dist/authentication.esm.js +26 -22
- package/dist/{authenticationManager-C83GNIhl.d.ts → authenticationManager-CIVY80H9.d.ts} +4 -4
- package/dist/{authenticationManager-5M-fKzXx.esm.js → authenticationManager-ZNotsWnC.esm.js} +6 -6
- package/dist/{authenticationStateMachine-BMZqatiF.esm.js → authenticationStateMachine-DksVbF_H.esm.js} +21 -9
- package/dist/{backCameraStream-DMdMeGk2.esm.js → backCameraStream-D7Wo4Nbx.esm.js} +95 -7
- package/dist/{session-CGtQJJzB.esm.js → browserSimulation-B1dWiXp7.esm.js} +61 -476
- package/dist/camera.d.ts +4 -3
- package/dist/camera.esm.js +4 -3
- package/dist/canvas-SKcRBxsk.esm.js +230 -0
- package/dist/consent.d.ts +4 -398
- package/dist/consent.esm.js +6 -77
- package/dist/consentManager-BLd51QiW.d.ts +419 -0
- package/dist/consentManager-BYo9Nu1r.esm.js +90 -0
- package/dist/{consentStateMachine-CCT-B60O.esm.js → consentStateMachine-BG3yL8aC.esm.js} +9 -6
- package/dist/cpf-ocr.d.ts +4 -199
- package/dist/cpf-ocr.esm.js +8 -177
- package/dist/cpfOcrManager-BnieFXuG.d.ts +216 -0
- package/dist/cpfOcrManager-sSKegxox.esm.js +190 -0
- package/dist/cross-document-data-match.d.ts +1 -1
- package/dist/cross-document-data-match.esm.js +4 -4
- package/dist/curp-validation.d.ts +8 -158
- package/dist/curp-validation.esm.js +6 -108
- package/dist/curpValidationManager-CFem6zP9.esm.js +122 -0
- package/dist/curpValidationManager-RttixpIc.d.ts +184 -0
- package/dist/{curpValidationStateMachine-CitWLr2c.esm.js → curpValidationStateMachine-B7V_qp66.esm.js} +20 -13
- package/dist/custom-fields.d.ts +2 -2
- package/dist/custom-fields.esm.js +4 -4
- package/dist/custom-watchlist.d.ts +1 -1
- package/dist/custom-watchlist.esm.js +4 -41
- package/dist/customWatchlistStateMachine-HmFybXLX.esm.js +50 -0
- package/dist/{deepsightLoader-Cm4JIT_z.esm.js → deepsightLoader-65k1Appi.esm.js} +19 -10
- package/dist/{deepsightService-CEVxzehb.d.ts → deepsightService-B7ShOkWL.d.ts} +8 -160
- package/dist/deepsightService-CrHmvx8X.esm.js +276 -0
- package/dist/device.esm.js +4 -3
- package/dist/document-capture.d.ts +992 -83
- package/dist/document-capture.esm.js +34 -8
- package/dist/document-upload.d.ts +47 -47
- package/dist/document-upload.esm.js +7 -7
- package/dist/{documentCaptureStateMachine-BqzTDy9k.esm.js → documentCaptureStateMachine-WYV1r9le.esm.js} +90 -6
- package/dist/dynamic-forms.d.ts +20 -5
- package/dist/dynamic-forms.esm.js +150 -61
- package/dist/ekyb.d.ts +32 -13
- package/dist/ekyb.esm.js +25 -15
- package/dist/{ekybStateMachine-BR2let5f.esm.js → ekybStateMachine-aYixw2sL.esm.js} +319 -207
- package/dist/ekyc.d.ts +10 -78
- package/dist/ekyc.esm.js +17 -12
- package/dist/{ekycStateMachine-oeO0Iekd.esm.js → ekycStateMachine-CXbpaJJn.esm.js} +201 -113
- package/dist/electronic-signature.d.ts +3 -3
- package/dist/electronic-signature.esm.js +5 -4
- package/dist/{electronicSignatureManager-D9OHzTpG.esm.js → electronicSignatureManager-BaECdJ1u.esm.js} +91 -23
- package/dist/email.d.ts +4 -3
- package/dist/email.esm.js +6 -5
- package/dist/{emailManager-wAV0LE-H.esm.js → emailManager--D5G3ChB.esm.js} +30 -7
- package/dist/{emailManager-DIfnS5g1.d.ts → emailManager-lAzDoQOs.d.ts} +66 -8
- package/dist/{emailStateMachine-DOf4j58N.esm.js → emailStateMachine-CxTOMAjC.esm.js} +46 -11
- package/dist/{endpoints-CnN3SyDa.esm.js → endpoints-BeTK0Mlt.esm.js} +6 -3
- package/dist/{events-D6-e4vok.esm.js → events-Dvvriq9l.esm.js} +3 -1
- package/dist/events.d.ts +2 -0
- package/dist/events.esm.js +1 -1
- package/dist/extensibility.d.ts +32 -16
- package/dist/extensibility.esm.js +55 -33
- package/dist/face-match.d.ts +32 -2
- package/dist/face-match.esm.js +5 -5
- package/dist/{faceCaptureManagerFactory-yqtpxjnN.d.ts → faceCaptureManagerFactory-C_hRHx8a.d.ts} +35 -11
- package/dist/{faceCaptureManagerFactory-Dh2PdGlF.esm.js → faceCaptureManagerFactory-kqbUqtrr.esm.js} +21 -5
- package/dist/{faceCaptureSetup-B3faSpYA.esm.js → faceCaptureSetup-CtvHWd3x.esm.js} +68 -183
- package/dist/{faceMatchStateMachine-DNFrxTFS.esm.js → faceMatchStateMachine-DdGXUBnx.esm.js} +60 -6
- package/dist/field-comparison.d.ts +4 -0
- package/dist/field-comparison.esm.js +7 -0
- package/dist/fieldComparisonManager-Bu5TaSr3.d.ts +76 -0
- package/dist/fieldComparisonManager-COGI2ARD.esm.js +162 -0
- package/dist/fiscal-qr.d.ts +59 -0
- package/dist/fiscal-qr.esm.js +323 -0
- package/dist/flow-events.d.ts +6 -5
- package/dist/flow.d.ts +23 -15
- package/dist/flow.esm.js +63 -17
- package/dist/flowCompletionService-BdR2cGgB.d.ts +19 -0
- package/dist/flowCompletionService-DdGojV9K.esm.js +20 -0
- package/dist/{flowServices-DG3IdWw6.esm.js → flowServices-BTuHLHVr.esm.js} +10 -5
- package/dist/geolocation.d.ts +4 -4
- package/dist/geolocation.esm.js +6 -6
- package/dist/{geolocationStateMachine-asasuHY2.esm.js → geolocationStateMachine-Dvh7X0wF.esm.js} +5 -5
- package/dist/getBrowser-C8DP7oTB.esm.js +8 -0
- package/dist/{getBrowser-BSXUTWXw.esm.js → getDeviceClass-C0olyNFS.esm.js} +1 -8
- package/dist/{getDeviceClass-BSntT9_j.esm.js → getDeviceClass-C8Do2qYu.esm.js} +1 -1
- package/dist/government-validation.d.ts +28 -8
- package/dist/government-validation.esm.js +19 -8
- package/dist/{governmentValidationStateMachine-BDDYrJTo.esm.js → governmentValidationStateMachine-DcJ-BfsC.esm.js} +35 -77
- package/dist/home.d.ts +15 -14
- package/dist/home.esm.js +2 -2
- package/dist/http-Cai3IoLS.esm.js +0 -0
- package/dist/http.esm.js +1 -0
- package/dist/id-ocr.d.ts +54 -54
- package/dist/id-ocr.esm.js +5 -5
- package/dist/id-verification.d.ts +27 -27
- package/dist/id-verification.esm.js +4 -4
- package/dist/id.d.ts +12 -10
- package/dist/id.esm.js +36 -26
- package/dist/{idCaptureManager-Fyd0eam-.d.ts → idCaptureManager-D-QYESvF.d.ts} +28 -14
- package/dist/{idCaptureManager-ZPkD7Gjk.esm.js → idCaptureManager-DGVv5l1_.esm.js} +22 -7
- package/dist/{idCaptureStateMachine-BK0bPHoc.esm.js → idCaptureStateMachine-DHi7HydI.esm.js} +172 -123
- package/dist/{idOcrStateMachine-YbjjC_Gg.esm.js → idOcrStateMachine-CDQ5d_VM.esm.js} +4 -4
- package/dist/{idVerificationStateMachine-xbw9HP1Z.esm.js → idVerificationStateMachine-kRxwImzO.esm.js} +2 -2
- package/dist/identity-reuse.d.ts +4 -530
- package/dist/identity-reuse.esm.js +8 -274
- package/dist/identityReuseManager-C6n_97dw.esm.js +95 -0
- package/dist/identityReuseManager-DwLtVzUn.d.ts +428 -0
- package/dist/identityReuseStateMachine-BfE5YiEr.esm.js +148 -0
- package/dist/{index-BcRG8rtJ.d.ts → index-B5hPA0Bg.d.ts} +2 -2
- package/dist/{index-DZoqeAo9.d.ts → index-B9NysVDB.d.ts} +469 -195
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +10 -8
- package/dist/{invokeOnCaptureCallback-rc6kBHo5.esm.js → invokeOnCaptureCallback-ygByVdnn.esm.js} +1 -1
- package/dist/{lib-BB0B_qQX.esm.js → lib-BY67lgbq.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +8 -412
- package/dist/mandatory-consent.esm.js +6 -76
- package/dist/mandatoryConsentManager-H6D18cZB.esm.js +89 -0
- package/dist/mandatoryConsentManager-KfIlURRY.d.ts +429 -0
- package/dist/{mandatoryConsentStateMachine-Cnco1jvn.esm.js → mandatoryConsentStateMachine-DtQNW1ji.esm.js} +6 -6
- package/dist/openviduLazy-B8L--0oe.esm.js +3 -0
- package/dist/{openviduLazy-Cok70ZSg.esm.js → openviduLazy-Dh14JNJc.esm.js} +2 -2
- package/dist/otp-CGMdUzBC.esm.js +33 -0
- package/dist/otp-DF5A0sFx.d.ts +8 -0
- package/dist/permissionGuards-C1ispV96.esm.js +23 -0
- package/dist/permissionServices-CG3bMSfG.esm.js +130 -0
- package/dist/phone.d.ts +4 -3
- package/dist/phone.esm.js +6 -5
- package/dist/{phoneManager-DAJbGhlY.esm.js → phoneManager-BmF-0Ez4.esm.js} +30 -7
- package/dist/{phoneManager-B6M30hKE.d.ts → phoneManager-fPmIBYQK.d.ts} +65 -7
- package/dist/{phoneStateMachine-CuPARRaT.esm.js → phoneStateMachine-BiV0yoEx.esm.js} +46 -11
- package/dist/{qe-signature-DFo_Cc-I.esm.js → qe-signature-CUYPcHVo.esm.js} +1 -1
- package/dist/qe-signature.d.ts +3 -3
- package/dist/qe-signature.esm.js +6 -5
- package/dist/{recordingService-Ig2UgbLv.esm.js → recordingService-Bn9EdCmz.esm.js} +197 -179
- package/dist/redirect-to-mobile.d.ts +6 -104
- package/dist/redirect-to-mobile.esm.js +6 -99
- package/dist/redirectToMobileManager-BNe3IzC_.d.ts +178 -0
- package/dist/redirectToMobileManager-Dy3t7o0C.esm.js +159 -0
- package/dist/{redirectToMobileStateMachine-BOEqe46A.esm.js → redirectToMobileStateMachine-DyAdRxfP.esm.js} +28 -19
- package/dist/{runChildModule-CqqwqAkW.esm.js → runChildModule-CuoHZ1cx.esm.js} +35 -3
- package/dist/selfie.d.ts +13 -11
- package/dist/selfie.esm.js +27 -23
- package/dist/{selfieManager-Duisl7qN.esm.js → selfieManager-BjCoKRy0.esm.js} +6 -6
- package/dist/{selfieManager-D0lSgd-J.d.ts → selfieManager-dUbKRzOh.d.ts} +4 -4
- package/dist/{selfieStateMachine-D76whWEf.esm.js → selfieStateMachine-b4F2q9zw.esm.js} +5 -3
- package/dist/session-DoVb-OcB.esm.js +152 -0
- package/dist/session.d.ts +37 -5
- package/dist/session.esm.js +12 -7
- package/dist/sessionInitializer-B8H5MsXM.esm.js +366 -0
- package/dist/{setup-C5AITV8m.d.ts → setup-BbkprdVv.d.ts} +57 -6
- package/dist/{setup-DsM8IG7k.esm.js → setup-BqEfrdja.esm.js} +162 -24
- package/dist/signature.d.ts +2 -2
- package/dist/signature.esm.js +4 -4
- package/dist/{signatureStateMachine-B5-QVUve.esm.js → signatureStateMachine-C5qqYLRz.esm.js} +3 -3
- package/dist/stats-BMNUG1AU.esm.js +41 -0
- package/dist/stats.d.ts +13 -2
- package/dist/stats.esm.js +3 -2
- package/dist/trust-graph.d.ts +33 -4
- package/dist/trust-graph.esm.js +21 -15
- package/dist/{types-CFV9G_7j.d.ts → types-Bj9hdFjU.d.ts} +1 -1
- package/dist/{types-BP1m8VRw.d.ts → types-DOUhndhT.d.ts} +14 -2
- package/dist/types-DsnEVMhr.esm.js +34 -0
- package/dist/types-DvGZI7BF.d.ts +131 -0
- package/dist/{types-B06Ypu2F.d.ts → types-NuT8ftBV.d.ts} +1 -1
- package/dist/types-ya0LN_MX.d.ts +5 -0
- package/dist/{warmup-CEcppFiS.d.ts → warmup-Dg8Lh-50.d.ts} +8 -0
- package/dist/wasm.d.ts +6 -4
- package/dist/wasm.esm.js +11 -9
- package/dist/watchlist-for-business.d.ts +1 -1
- package/dist/watchlist-for-business.esm.js +5 -73
- package/dist/watchlist.d.ts +1 -1
- package/dist/watchlist.esm.js +4 -41
- package/dist/watchlistForBusinessStateMachine-DMl8j2Ov.esm.js +74 -0
- package/dist/watchlistStateMachine-DmQlqI6L.esm.js +50 -0
- package/dist/workflow.d.ts +153 -100
- package/dist/workflow.esm.js +156 -80
- package/package.json +19 -1
- package/dist/StateMachine-BCQrZJhf.d.ts +0 -2
- package/dist/WasmUtilProvider-j98OJf-S.esm.js +0 -114
- package/dist/browserSimulation-gxD8cSpM.esm.js +0 -20
- package/dist/deepsightService-O74l4Y__.esm.js +0 -489
- package/dist/displayErrors-DqJ_IbsG.d.ts +0 -39
- package/dist/flowCompletionService-DhkT4SRY.d.ts +0 -10
- package/dist/flowCompletionService-P54yzGvA.esm.js +0 -13
- package/dist/openviduLazy-Cm0XFh_v.esm.js +0 -3
- package/dist/permissionServices-D_i6nzEw.esm.js +0 -50
- package/dist/stats-CIfiPzb1.esm.js +0 -16
- package/dist/types-CAD4va6a.d.ts +0 -5
- package/dist/watchlistServices-DMbUhkBX.esm.js +0 -12
- /package/dist/{Actor-CI32dTbG.d.ts → Actor-Y0_Fj-KL.d.ts} +0 -0
- /package/dist/{ITimerCapability-C67ZRskg.esm.js → ITimerCapability-CB0I1Uf2.esm.js} +0 -0
- /package/dist/{Manager-C8PrhBOx.d.ts → Manager-BHn8wH8K.d.ts} +0 -0
- /package/dist/{camera-PA2Ljri3.esm.js → camera-DJWm3V4g.esm.js} +0 -0
- /package/dist/{camera-DBSxa6ML.d.ts → camera-SRBpPq2X.d.ts} +0 -0
- /package/dist/{chunk-CRF6K_H_.esm.js → chunk-CMUKZ2uL.esm.js} +0 -0
- /package/dist/{cpf-PPz2Njto.esm.js → cpf-BRzggV8G.esm.js} +0 -0
- /package/dist/{dateUtils-UoN5xswP.esm.js → dateUtils-AksLQmgV.esm.js} +0 -0
- /package/dist/{platform-CfrjKhmi.esm.js → platform-SKvEfCBh.esm.js} +0 -0
- /package/dist/{xstate.esm-B70JrNqo.esm.js → xstate.esm-C9wncMQa.esm.js} +0 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { t as Manager } from "./Manager-BHn8wH8K.js";
|
|
2
|
+
import { t as ActorRefFrom } from "./Actor-Y0_Fj-KL.js";
|
|
3
|
+
import { i as FlowModuleConfig } from "./types-DOUhndhT.js";
|
|
4
|
+
|
|
5
|
+
//#region src/modules/curp-validation/types.d.ts
|
|
6
|
+
type CurpValidationConfig = FlowModuleConfig['CURP_VALIDATION'] & {
|
|
7
|
+
/** Maximum validation retries before auto-advancing. @default 1 */
|
|
8
|
+
maxRetries?: number;
|
|
9
|
+
/** Whether to attempt OCR pre-fill on load. @default true */
|
|
10
|
+
prefillFromOcr?: boolean;
|
|
11
|
+
};
|
|
12
|
+
/** CURP generation form data */
|
|
13
|
+
type GenerateCurpForm = {
|
|
14
|
+
name: string;
|
|
15
|
+
firstLastName: string;
|
|
16
|
+
secondLastName: string;
|
|
17
|
+
gender: 'H' | 'M' | 'X' | '';
|
|
18
|
+
birthDate: string;
|
|
19
|
+
birthState: string;
|
|
20
|
+
};
|
|
21
|
+
type GenerateCurpFieldType = 'text' | 'date' | 'dropdown';
|
|
22
|
+
/**
|
|
23
|
+
* Discriminated union of validation rules supported across both CURP screens.
|
|
24
|
+
* `required` is used by Generate-CURP fields; `curpFormat` is used by the
|
|
25
|
+
* single-field CURP entry.
|
|
26
|
+
*/
|
|
27
|
+
type CurpValidationRule = {
|
|
28
|
+
type: 'required';
|
|
29
|
+
} | {
|
|
30
|
+
type: 'curpFormat';
|
|
31
|
+
};
|
|
32
|
+
type GenerateCurpFieldDef = {
|
|
33
|
+
key: keyof GenerateCurpForm;
|
|
34
|
+
labelKey: string;
|
|
35
|
+
type: GenerateCurpFieldType;
|
|
36
|
+
required: boolean;
|
|
37
|
+
autoComplete?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Validation rules evaluated by the state machine on blur (per-field) and
|
|
40
|
+
* on submit (full form). Required fields should include `{ type: 'required' }`.
|
|
41
|
+
* Optional fields (e.g. `secondLastName`) omit this entirely.
|
|
42
|
+
*/
|
|
43
|
+
validation?: CurpValidationRule[];
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Configuration for the single CURP-entry field on the gateway screen.
|
|
47
|
+
* Intentionally has no `required` rule: the user can leave it empty and
|
|
48
|
+
* use the "I don't have my CURP" escape-hatch button instead.
|
|
49
|
+
*/
|
|
50
|
+
type EnterCurpFieldDef = {
|
|
51
|
+
key: 'curp';
|
|
52
|
+
labelKey: string;
|
|
53
|
+
validation?: CurpValidationRule[];
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Map of field-key → i18n error key currently displayed for that field.
|
|
57
|
+
* Empty/undefined means no errors are currently shown. The state machine
|
|
58
|
+
* is the single source of truth for which entries exist here — UI must
|
|
59
|
+
* render this map as-is without further gating.
|
|
60
|
+
*/
|
|
61
|
+
type CurpValidationErrors = Partial<Record<string, string>>;
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/modules/curp-validation/curpValidationStateMachine.d.ts
|
|
64
|
+
|
|
65
|
+
declare const curpValidationMachine: any;
|
|
66
|
+
type CurpValidationMachine = typeof curpValidationMachine;
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/modules/curp-validation/curpValidationActor.d.ts
|
|
69
|
+
type CreateCurpValidationActorOptions = {
|
|
70
|
+
config: CurpValidationConfig;
|
|
71
|
+
};
|
|
72
|
+
type CurpValidationActor = ActorRefFrom<CurpValidationMachine>;
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/modules/curp-validation/curpValidationManager.d.ts
|
|
75
|
+
type CurpValidationIdleState = {
|
|
76
|
+
status: 'idle';
|
|
77
|
+
};
|
|
78
|
+
type CurpValidationLoadingState = {
|
|
79
|
+
status: 'loading';
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* State exposed to UI for the CURP entry gateway screen.
|
|
83
|
+
*
|
|
84
|
+
* `isValid` is **derived** from `validationErrors`: it is `true` whenever
|
|
85
|
+
* no errors are currently displayed (including the initial empty render).
|
|
86
|
+
* The UI must not treat `isValid` as "the form would pass full validation
|
|
87
|
+
* right now" — that was the old pessimistic semantic. Use the absence of
|
|
88
|
+
* errors plus an additional `curp.length === 0` no-op guard on the submit
|
|
89
|
+
* button instead.
|
|
90
|
+
*/
|
|
91
|
+
type CurpValidationEnterCurpState = {
|
|
92
|
+
status: 'enterCurp';
|
|
93
|
+
curp: string;
|
|
94
|
+
isValid: boolean;
|
|
95
|
+
validationErrors?: CurpValidationErrors;
|
|
96
|
+
};
|
|
97
|
+
type CurpValidationVerifyingState = {
|
|
98
|
+
status: 'verifying';
|
|
99
|
+
};
|
|
100
|
+
type CurpValidationSuccessState = {
|
|
101
|
+
status: 'success';
|
|
102
|
+
};
|
|
103
|
+
type CurpValidationFailureState = {
|
|
104
|
+
status: 'failure';
|
|
105
|
+
retriesLeft: number;
|
|
106
|
+
/** True for auto OCR-prefilled failures; UI shows "Verify manually". */
|
|
107
|
+
fromAutoVerify: boolean;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* State exposed to UI for the multi-field Generate CURP form.
|
|
111
|
+
*
|
|
112
|
+
* `isValid` is derived: `true` when no errors are currently displayed.
|
|
113
|
+
* Validation runs on blur (single field) and on submit (full form);
|
|
114
|
+
* `validationErrors` reflects exactly what should be rendered next
|
|
115
|
+
* to each input.
|
|
116
|
+
*/
|
|
117
|
+
type CurpValidationGenerateCurpState = {
|
|
118
|
+
status: 'generateCurp';
|
|
119
|
+
form: GenerateCurpForm;
|
|
120
|
+
isValid: boolean;
|
|
121
|
+
validationErrors?: CurpValidationErrors;
|
|
122
|
+
};
|
|
123
|
+
type CurpValidationGeneratingState = {
|
|
124
|
+
status: 'generating';
|
|
125
|
+
};
|
|
126
|
+
type CurpValidationConfirmCurpState = {
|
|
127
|
+
status: 'confirmCurp';
|
|
128
|
+
curp: string;
|
|
129
|
+
};
|
|
130
|
+
type CurpValidationGenerateErrorState = {
|
|
131
|
+
status: 'generateError';
|
|
132
|
+
retriesLeft: number;
|
|
133
|
+
};
|
|
134
|
+
type CurpValidationFinishedState = {
|
|
135
|
+
status: 'finished';
|
|
136
|
+
};
|
|
137
|
+
type CurpValidationClosedState = {
|
|
138
|
+
status: 'closed';
|
|
139
|
+
};
|
|
140
|
+
type CurpValidationState = CurpValidationIdleState | CurpValidationLoadingState | CurpValidationEnterCurpState | CurpValidationVerifyingState | CurpValidationSuccessState | CurpValidationFailureState | CurpValidationGenerateCurpState | CurpValidationGeneratingState | CurpValidationConfirmCurpState | CurpValidationGenerateErrorState | CurpValidationFinishedState | CurpValidationClosedState;
|
|
141
|
+
declare function createCurpValidationManager(options: CreateCurpValidationActorOptions): Manager<CurpValidationState> & {
|
|
142
|
+
load(): void;
|
|
143
|
+
setCurp(curp: string): void;
|
|
144
|
+
/**
|
|
145
|
+
* Triggers single-field on-blur validation. The state machine routes
|
|
146
|
+
* the event to the validator for the currently active screen and
|
|
147
|
+
* updates the corresponding `validationErrors` map. Sending a field
|
|
148
|
+
* key that does not belong to the active screen is a no-op.
|
|
149
|
+
*/
|
|
150
|
+
validateField(field: "curp" | keyof GenerateCurpForm): void;
|
|
151
|
+
verify(): void;
|
|
152
|
+
switchToGenerate(): void;
|
|
153
|
+
setGenerateForm(form: Partial<GenerateCurpForm>): void;
|
|
154
|
+
generate(): void;
|
|
155
|
+
confirmGenerated(): void;
|
|
156
|
+
retry(): void;
|
|
157
|
+
close(): void;
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* Creates a CURP-validation manager from a pre-built actor.
|
|
161
|
+
* Use this when overriding the machine via `.provide()` for custom backends
|
|
162
|
+
* or for story-isolation testing.
|
|
163
|
+
*/
|
|
164
|
+
declare function createCurpValidationManagerFromActor(actor: CurpValidationActor): Manager<CurpValidationState> & {
|
|
165
|
+
load(): void;
|
|
166
|
+
setCurp(curp: string): void;
|
|
167
|
+
/**
|
|
168
|
+
* Triggers single-field on-blur validation. The state machine routes
|
|
169
|
+
* the event to the validator for the currently active screen and
|
|
170
|
+
* updates the corresponding `validationErrors` map. Sending a field
|
|
171
|
+
* key that does not belong to the active screen is a no-op.
|
|
172
|
+
*/
|
|
173
|
+
validateField(field: "curp" | keyof GenerateCurpForm): void;
|
|
174
|
+
verify(): void;
|
|
175
|
+
switchToGenerate(): void;
|
|
176
|
+
setGenerateForm(form: Partial<GenerateCurpForm>): void;
|
|
177
|
+
generate(): void;
|
|
178
|
+
confirmGenerated(): void;
|
|
179
|
+
retry(): void;
|
|
180
|
+
close(): void;
|
|
181
|
+
};
|
|
182
|
+
type CurpValidationManager = ReturnType<typeof createCurpValidationManager>;
|
|
183
|
+
//#endregion
|
|
184
|
+
export { CurpValidationActor as a, CurpValidationErrors as c, GenerateCurpFieldDef as d, GenerateCurpFieldType as f, createCurpValidationManagerFromActor as i, CurpValidationRule as l, CurpValidationState as n, curpValidationMachine as o, GenerateCurpForm as p, createCurpValidationManager as r, CurpValidationConfig as s, CurpValidationManager as t, EnterCurpFieldDef as u };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as api } from "./api-CESGtpbH.esm.js";
|
|
2
|
-
import { t as endpoints } from "./endpoints-
|
|
3
|
-
import { a as fromPromise, r as assign, t as setup } from "./xstate.esm-
|
|
2
|
+
import { t as endpoints } from "./endpoints-BeTK0Mlt.esm.js";
|
|
3
|
+
import { a as fromPromise, r as assign, t as setup } from "./xstate.esm-C9wncMQa.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/curp-validation/curpValidationUtils.ts
|
|
6
6
|
const CURP_PATTERN = /^([A-Z][AEIOUX][A-Z]{2}\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])[HMX](?:AS|B[CS]|C[CLMSH]|D[FG]|G[TR]|HG|JC|M[CNS]|N[ETL]|OC|PL|Q[TR]|S[PLR]|T[CSL]|VZ|YN|ZS)[B-DF-HJ-NP-TV-Z]{3}[A-Z\d])(\d)$/;
|
|
@@ -196,6 +196,7 @@ const GENERATE_CURP_FIELDS = [
|
|
|
196
196
|
labelKey: "curp.labels.firstLast",
|
|
197
197
|
type: "text",
|
|
198
198
|
required: true,
|
|
199
|
+
autoComplete: "family-name",
|
|
199
200
|
validation: [{ type: "required" }]
|
|
200
201
|
},
|
|
201
202
|
{
|
|
@@ -216,6 +217,7 @@ const GENERATE_CURP_FIELDS = [
|
|
|
216
217
|
labelKey: "curp.labels.dob",
|
|
217
218
|
type: "date",
|
|
218
219
|
required: true,
|
|
220
|
+
autoComplete: "bday",
|
|
219
221
|
validation: [{ type: "required" }]
|
|
220
222
|
},
|
|
221
223
|
{
|
|
@@ -392,6 +394,8 @@ const curpValidationMachine = setup({
|
|
|
392
394
|
decrementRetries: assign(({ context }) => ({ retriesLeft: Math.max(0, context.retriesLeft - 1) })),
|
|
393
395
|
setFromGenerate: assign({ fromGenerate: () => true }),
|
|
394
396
|
clearFromGenerate: assign({ fromGenerate: () => false }),
|
|
397
|
+
setAutoVerify: assign({ fromAutoVerify: () => true }),
|
|
398
|
+
clearAutoVerify: assign({ fromAutoVerify: () => false }),
|
|
395
399
|
setError: assign(({ event }) => ({ error: String(event.error) }))
|
|
396
400
|
},
|
|
397
401
|
guards: {
|
|
@@ -426,7 +430,8 @@ const curpValidationMachine = setup({
|
|
|
426
430
|
retriesLeft: input.config.maxRetries ?? 1,
|
|
427
431
|
generatedCurp: void 0,
|
|
428
432
|
error: void 0,
|
|
429
|
-
fromGenerate: false
|
|
433
|
+
fromGenerate: false,
|
|
434
|
+
fromAutoVerify: false
|
|
430
435
|
}),
|
|
431
436
|
states: {
|
|
432
437
|
idle: { on: {
|
|
@@ -443,7 +448,7 @@ const curpValidationMachine = setup({
|
|
|
443
448
|
onDone: [{
|
|
444
449
|
target: "verifying",
|
|
445
450
|
guard: "hasOcrCurp",
|
|
446
|
-
actions: "setCurpFromOcr"
|
|
451
|
+
actions: ["setCurpFromOcr", "setAutoVerify"]
|
|
447
452
|
}, { target: "enterCurp" }],
|
|
448
453
|
onError: { target: "enterCurp" }
|
|
449
454
|
},
|
|
@@ -469,7 +474,8 @@ const curpValidationMachine = setup({
|
|
|
469
474
|
entry: "computeEnterCurpValidationResult",
|
|
470
475
|
always: [{
|
|
471
476
|
guard: "shouldVerify",
|
|
472
|
-
target: "#curpValidation.verifying"
|
|
477
|
+
target: "#curpValidation.verifying",
|
|
478
|
+
actions: "clearAutoVerify"
|
|
473
479
|
}, { target: "inputting" }]
|
|
474
480
|
}
|
|
475
481
|
},
|
|
@@ -483,13 +489,10 @@ const curpValidationMachine = setup({
|
|
|
483
489
|
onDone: [{
|
|
484
490
|
target: "success",
|
|
485
491
|
guard: "isVerifySuccess"
|
|
486
|
-
}, {
|
|
487
|
-
target: "failure",
|
|
488
|
-
actions: "decrementRetries"
|
|
489
|
-
}],
|
|
492
|
+
}, { target: "failure" }],
|
|
490
493
|
onError: {
|
|
491
494
|
target: "failure",
|
|
492
|
-
actions:
|
|
495
|
+
actions: "setError"
|
|
493
496
|
}
|
|
494
497
|
},
|
|
495
498
|
on: { CLOSE: "closed" }
|
|
@@ -502,11 +505,12 @@ const curpValidationMachine = setup({
|
|
|
502
505
|
on: {
|
|
503
506
|
RETRY: [{
|
|
504
507
|
target: "generateCurp",
|
|
505
|
-
guard: ({ context }) => context.retriesLeft > 0 && context.fromGenerate
|
|
508
|
+
guard: ({ context }) => context.retriesLeft > 0 && context.fromGenerate,
|
|
509
|
+
actions: "decrementRetries"
|
|
506
510
|
}, {
|
|
507
511
|
target: "enterCurp",
|
|
508
512
|
guard: ({ context }) => context.retriesLeft > 0 && !context.fromGenerate,
|
|
509
|
-
actions: "clearFromGenerate"
|
|
513
|
+
actions: ["decrementRetries", "clearFromGenerate"]
|
|
510
514
|
}],
|
|
511
515
|
CLOSE: "closed"
|
|
512
516
|
},
|
|
@@ -569,7 +573,10 @@ const curpValidationMachine = setup({
|
|
|
569
573
|
on: { CLOSE: "closed" }
|
|
570
574
|
},
|
|
571
575
|
confirmCurp: { on: {
|
|
572
|
-
CONFIRM: {
|
|
576
|
+
CONFIRM: {
|
|
577
|
+
target: "verifying",
|
|
578
|
+
actions: "clearAutoVerify"
|
|
579
|
+
},
|
|
573
580
|
CLOSE: "closed"
|
|
574
581
|
} },
|
|
575
582
|
generateError: {
|
package/dist/custom-fields.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Manager } from "./Manager-
|
|
2
|
-
import "./Actor-
|
|
1
|
+
import { t as Manager } from "./Manager-BHn8wH8K.js";
|
|
2
|
+
import "./Actor-Y0_Fj-KL.js";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/custom-fields/types.d.ts
|
|
5
5
|
type CustomFieldType = 'INTEGER' | 'DOUBLE' | 'BOOLEAN' | 'STRING' | 'DATE';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as api } from "./api-CESGtpbH.esm.js";
|
|
2
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
3
|
-
import { t as endpoints } from "./endpoints-
|
|
4
|
-
import { a as fromPromise, c as createManager, r as assign, s as createActor, t as setup } from "./xstate.esm-
|
|
5
|
-
import { t as isoDateToMs } from "./dateUtils-
|
|
2
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dvvriq9l.esm.js";
|
|
3
|
+
import { t as endpoints } from "./endpoints-BeTK0Mlt.esm.js";
|
|
4
|
+
import { a as fromPromise, c as createManager, r as assign, s as createActor, t as setup } from "./xstate.esm-C9wncMQa.esm.js";
|
|
5
|
+
import { t as isoDateToMs } from "./dateUtils-AksLQmgV.esm.js";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/custom-fields/customFieldsServices.ts
|
|
8
8
|
async function submitCustomFields(params, signal) {
|
|
@@ -1,46 +1,9 @@
|
|
|
1
1
|
import "./api-CESGtpbH.esm.js";
|
|
2
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
3
|
-
import "./endpoints-
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
2
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dvvriq9l.esm.js";
|
|
3
|
+
import "./endpoints-BeTK0Mlt.esm.js";
|
|
4
|
+
import { c as createManager, s as createActor } from "./xstate.esm-C9wncMQa.esm.js";
|
|
5
|
+
import { t as customWatchlistMachine } from "./customWatchlistStateMachine-HmFybXLX.esm.js";
|
|
6
6
|
|
|
7
|
-
//#region src/modules/custom-watchlist/customWatchlistStateMachine.ts
|
|
8
|
-
const customWatchlistMachine = setup({
|
|
9
|
-
types: {
|
|
10
|
-
context: {},
|
|
11
|
-
events: {}
|
|
12
|
-
},
|
|
13
|
-
actors: { processWatchlist: fromPromise(async ({ signal }) => {
|
|
14
|
-
await processWatchlist(signal);
|
|
15
|
-
}) },
|
|
16
|
-
actions: {
|
|
17
|
-
markSuccess: assign({ result: "success" }),
|
|
18
|
-
markSkipped: assign({ result: "skipped" })
|
|
19
|
-
}
|
|
20
|
-
}).createMachine({
|
|
21
|
-
id: "customWatchlist",
|
|
22
|
-
initial: "idle",
|
|
23
|
-
context: { result: null },
|
|
24
|
-
states: {
|
|
25
|
-
idle: { on: { LOAD: { target: "processing" } } },
|
|
26
|
-
processing: { invoke: {
|
|
27
|
-
id: "processWatchlist",
|
|
28
|
-
src: "processWatchlist",
|
|
29
|
-
onDone: { target: "success" },
|
|
30
|
-
onError: {
|
|
31
|
-
target: "finished",
|
|
32
|
-
actions: "markSkipped"
|
|
33
|
-
}
|
|
34
|
-
} },
|
|
35
|
-
success: { after: { 3e3: {
|
|
36
|
-
target: "finished",
|
|
37
|
-
actions: "markSuccess"
|
|
38
|
-
} } },
|
|
39
|
-
finished: { type: "final" }
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
//#endregion
|
|
44
7
|
//#region src/modules/custom-watchlist/customWatchlistActor.ts
|
|
45
8
|
function createCustomWatchlistActor() {
|
|
46
9
|
return createActor(customWatchlistMachine).start();
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { t as api } from "./api-CESGtpbH.esm.js";
|
|
2
|
+
import { t as endpoints } from "./endpoints-BeTK0Mlt.esm.js";
|
|
3
|
+
import { a as fromPromise, r as assign, t as setup } from "./xstate.esm-C9wncMQa.esm.js";
|
|
4
|
+
|
|
5
|
+
//#region src/modules/custom-watchlist/customWatchlistServices.ts
|
|
6
|
+
async function processWatchlist(signal) {
|
|
7
|
+
const res = await api.post(endpoints.processWatchlist, {}, { signal });
|
|
8
|
+
if (!res.ok) throw new Error(`POST ${endpoints.processWatchlist} failed: ${res.status} ${res.statusText}`);
|
|
9
|
+
return res.data;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/modules/custom-watchlist/customWatchlistStateMachine.ts
|
|
14
|
+
const customWatchlistMachine = setup({
|
|
15
|
+
types: {
|
|
16
|
+
context: {},
|
|
17
|
+
events: {}
|
|
18
|
+
},
|
|
19
|
+
actors: { processWatchlist: fromPromise(async ({ signal }) => {
|
|
20
|
+
await processWatchlist(signal);
|
|
21
|
+
}) },
|
|
22
|
+
actions: {
|
|
23
|
+
markSuccess: assign({ result: "success" }),
|
|
24
|
+
markSkipped: assign({ result: "skipped" })
|
|
25
|
+
}
|
|
26
|
+
}).createMachine({
|
|
27
|
+
id: "customWatchlist",
|
|
28
|
+
initial: "idle",
|
|
29
|
+
context: { result: null },
|
|
30
|
+
states: {
|
|
31
|
+
idle: { on: { LOAD: { target: "processing" } } },
|
|
32
|
+
processing: { invoke: {
|
|
33
|
+
id: "processWatchlist",
|
|
34
|
+
src: "processWatchlist",
|
|
35
|
+
onDone: { target: "success" },
|
|
36
|
+
onError: {
|
|
37
|
+
target: "finished",
|
|
38
|
+
actions: "markSkipped"
|
|
39
|
+
}
|
|
40
|
+
} },
|
|
41
|
+
success: { after: { 3e3: {
|
|
42
|
+
target: "finished",
|
|
43
|
+
actions: "markSuccess"
|
|
44
|
+
} } },
|
|
45
|
+
finished: { type: "final" }
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
export { customWatchlistMachine as t };
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { t as WasmUtilProvider } from "./WasmUtilProvider-j98OJf-S.esm.js";
|
|
1
|
+
import { t as WasmUtilProvider } from "./WasmUtilProvider-CiEN7Gjn.esm.js";
|
|
3
2
|
import "./api-CESGtpbH.esm.js";
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import
|
|
8
|
-
import "./
|
|
9
|
-
import "./
|
|
10
|
-
import { t as MotionSensorProvider } from "./MotionSensorProvider-
|
|
3
|
+
import "./endpoints-BeTK0Mlt.esm.js";
|
|
4
|
+
import "./stats-BMNUG1AU.esm.js";
|
|
5
|
+
import { r as BrowserEnvironmentProvider, t as IpifyProvider } from "./IpifyProvider-D4LWD15E.esm.js";
|
|
6
|
+
import "./browserSimulation-B1dWiXp7.esm.js";
|
|
7
|
+
import "./platform-SKvEfCBh.esm.js";
|
|
8
|
+
import "./getBrowser-C8DP7oTB.esm.js";
|
|
9
|
+
import { t as MotionSensorProvider } from "./MotionSensorProvider-Bx7Mpzt0.esm.js";
|
|
10
|
+
import "./camera-DJWm3V4g.esm.js";
|
|
11
|
+
import "./canvas-SKcRBxsk.esm.js";
|
|
12
|
+
import { t as createDeepsightService } from "./deepsightService-CrHmvx8X.esm.js";
|
|
13
|
+
import "./getDeviceClass-C0olyNFS.esm.js";
|
|
11
14
|
|
|
12
15
|
//#region ../infra/src/providers/browser/VisibilityProvider.ts
|
|
13
16
|
var VisibilityProvider = class {
|
|
@@ -30,11 +33,17 @@ var VisibilityProvider = class {
|
|
|
30
33
|
}
|
|
31
34
|
};
|
|
32
35
|
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/internal/deepsight/wasmDsFlag.ts
|
|
38
|
+
async function setWasmDsFlag(storage, enabled) {
|
|
39
|
+
await storage.set("ds", enabled ? 1 : 0);
|
|
40
|
+
}
|
|
41
|
+
|
|
33
42
|
//#endregion
|
|
34
43
|
//#region src/internal/deepsight/deepsightLoader.ts
|
|
35
44
|
const SDK_VERSION = "2.0.0";
|
|
36
45
|
async function loadDeepsightSession(options) {
|
|
37
|
-
await options.storage
|
|
46
|
+
await setWasmDsFlag(options.storage, options.ds === true);
|
|
38
47
|
const service = createDeepsightService({
|
|
39
48
|
sdkVersion: SDK_VERSION,
|
|
40
49
|
wasmUtil: await WasmUtilProvider.getInstance(),
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { n as WasmPipeline } from "./warmup-
|
|
2
|
-
import { t as CameraStream } from "./camera-DBSxa6ML.js";
|
|
1
|
+
import { n as WasmPipeline } from "./warmup-Dg8Lh-50.js";
|
|
3
2
|
|
|
4
3
|
//#region ../infra/src/capabilities/IRecordingCapability.d.ts
|
|
5
4
|
type RecordingPublisher = {
|
|
@@ -178,6 +177,11 @@ type IWasmUtilCapability = {
|
|
|
178
177
|
isVirtualCamera(label: string | null): boolean;
|
|
179
178
|
prc(): Promise<void>;
|
|
180
179
|
poc(output: VirtualCameraCheckOutput): Promise<void>;
|
|
180
|
+
rsp(): Promise<void>;
|
|
181
|
+
ssl(): void;
|
|
182
|
+
stl(): void;
|
|
183
|
+
osv(): void;
|
|
184
|
+
oev(): void;
|
|
181
185
|
ckvcks(data: ArrayBuffer): void;
|
|
182
186
|
getVersions(): Promise<unknown>;
|
|
183
187
|
/**
|
|
@@ -186,166 +190,9 @@ type IWasmUtilCapability = {
|
|
|
186
190
|
dispose(): Promise<void>;
|
|
187
191
|
};
|
|
188
192
|
//#endregion
|
|
189
|
-
//#region ../infra/src/media/canvas.d.ts
|
|
190
|
-
/**
|
|
191
|
-
* Class representing a canvas element for image capture and manipulation.
|
|
192
|
-
*/
|
|
193
|
-
declare class IncodeCanvas {
|
|
194
|
-
canvas: HTMLCanvasElement;
|
|
195
|
-
private base64Image;
|
|
196
|
-
private blobData;
|
|
197
|
-
/**
|
|
198
|
-
* Creates an {@link IncodeCanvas} from a raw {@link ImageData} frame.
|
|
199
|
-
* @param imageData - Frame pixels in RGBA format
|
|
200
|
-
* @returns An {@link IncodeCanvas} containing the provided pixels
|
|
201
|
-
*/
|
|
202
|
-
static fromImageData(imageData: ImageData): IncodeCanvas;
|
|
203
|
-
/**
|
|
204
|
-
* Create a new canvas element.
|
|
205
|
-
* @param canvas_ - The canvas element to clone.
|
|
206
|
-
*/
|
|
207
|
-
constructor(canvas_: HTMLCanvasElement);
|
|
208
|
-
/**
|
|
209
|
-
* Check if the current canvas is valid.
|
|
210
|
-
*/
|
|
211
|
-
private checkCanvas;
|
|
212
|
-
/**
|
|
213
|
-
* Disposes of resources, including revoking object URLs to prevent memory leaks.
|
|
214
|
-
*/
|
|
215
|
-
dispose(): void;
|
|
216
|
-
/**
|
|
217
|
-
* Release the data stored by IncodeCanvas.
|
|
218
|
-
*/
|
|
219
|
-
release(): void;
|
|
220
|
-
/**
|
|
221
|
-
* Revokes the object URL if one exists, preventing memory leaks.
|
|
222
|
-
* Use this when you no longer need the preview image URL.
|
|
223
|
-
*/
|
|
224
|
-
revokeObjectURL(): void;
|
|
225
|
-
/**
|
|
226
|
-
* Get the width of the canvas.
|
|
227
|
-
*/
|
|
228
|
-
width(): number | null;
|
|
229
|
-
/**
|
|
230
|
-
* Get the height of the canvas.
|
|
231
|
-
*/
|
|
232
|
-
height(): number | null;
|
|
233
|
-
/**
|
|
234
|
-
* Set the width of the canvas.
|
|
235
|
-
*/
|
|
236
|
-
setWidth(width: number): void;
|
|
237
|
-
/**
|
|
238
|
-
* Set the height of the canvas.
|
|
239
|
-
*/
|
|
240
|
-
setHeight(height: number): void;
|
|
241
|
-
/**
|
|
242
|
-
* Clone the current canvas.
|
|
243
|
-
*/
|
|
244
|
-
clone(): IncodeCanvas | null;
|
|
245
|
-
/**
|
|
246
|
-
* Deep clone the current IncodeCanvas including blob data.
|
|
247
|
-
*/
|
|
248
|
-
deepClone(): Promise<IncodeCanvas | null>;
|
|
249
|
-
/**
|
|
250
|
-
* Returns the drawing context on the canvas.
|
|
251
|
-
*/
|
|
252
|
-
getContext(contextId: '2d', contextAttributes?: CanvasRenderingContext2DSettings): CanvasRenderingContext2D | null;
|
|
253
|
-
/**
|
|
254
|
-
* Retrieves the image data from the canvas.
|
|
255
|
-
*/
|
|
256
|
-
getImageData(): ImageData | null;
|
|
257
|
-
/**
|
|
258
|
-
* Updates the base64 representation of the current canvas image.
|
|
259
|
-
*/
|
|
260
|
-
updateBase64Image(jpegQuality?: number): void;
|
|
261
|
-
/**
|
|
262
|
-
* Converts the current canvas element to a base64 string.
|
|
263
|
-
*/
|
|
264
|
-
getBase64Image(jpegQuality?: number, includeDataURLPrefix?: boolean): string | null;
|
|
265
|
-
/**
|
|
266
|
-
* Sets the base64 representation of the current canvas image.
|
|
267
|
-
*/
|
|
268
|
-
setBase64Image(base64Image: string | null): void;
|
|
269
|
-
/**
|
|
270
|
-
* Updates the Blob representation of the current canvas image.
|
|
271
|
-
*/
|
|
272
|
-
updateBlob(jpegQuality?: number, includeDataURLPrefix?: boolean): void;
|
|
273
|
-
/**
|
|
274
|
-
* Converts a base64 string to a Blob and creates a URL for it.
|
|
275
|
-
*/
|
|
276
|
-
static base64ToBlob(base64: string): {
|
|
277
|
-
blob: Blob;
|
|
278
|
-
url: string;
|
|
279
|
-
} | null;
|
|
280
|
-
/**
|
|
281
|
-
* Retrieves the Blob data and its URL from the current canvas.
|
|
282
|
-
*/
|
|
283
|
-
getBlobData(jpegQuality?: number, includeDataURLPrefix?: boolean): {
|
|
284
|
-
blob: Blob;
|
|
285
|
-
url: string;
|
|
286
|
-
} | null;
|
|
287
|
-
/**
|
|
288
|
-
* Sets the Blob data of the current canvas image.
|
|
289
|
-
*/
|
|
290
|
-
setBlobData(blobData: {
|
|
291
|
-
blob: Blob;
|
|
292
|
-
url: string;
|
|
293
|
-
}): Promise<void>;
|
|
294
|
-
/**
|
|
295
|
-
* Returns a resized canvas according to video element size.
|
|
296
|
-
*/
|
|
297
|
-
getResizedCanvas(videoElementWidth: number, videoElementHeight: number): IncodeCanvas | null;
|
|
298
|
-
}
|
|
299
|
-
//#endregion
|
|
300
|
-
//#region ../infra/src/media/StreamCanvasCapture.d.ts
|
|
301
|
-
type StreamCanvasCaptureOptions = {
|
|
302
|
-
fps?: number;
|
|
303
|
-
width?: number;
|
|
304
|
-
height?: number;
|
|
305
|
-
};
|
|
306
|
-
type StreamCanvasCaptureEventMap = {
|
|
307
|
-
frame: Event;
|
|
308
|
-
};
|
|
309
|
-
declare class StreamCanvasCapture {
|
|
310
|
-
private video;
|
|
311
|
-
private canvas;
|
|
312
|
-
private ctx;
|
|
313
|
-
private rafId;
|
|
314
|
-
private lastFrameTimeSeconds;
|
|
315
|
-
private lastTickTimeMs;
|
|
316
|
-
private hasFrame;
|
|
317
|
-
private disposed;
|
|
318
|
-
private eventTarget;
|
|
319
|
-
constructor(stream: CameraStream, options?: StreamCanvasCaptureOptions);
|
|
320
|
-
addEventListener(type: keyof StreamCanvasCaptureEventMap, listener: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions): void;
|
|
321
|
-
removeEventListener(type: keyof StreamCanvasCaptureEventMap, listener: EventListenerOrEventListenerObject | null, options?: boolean | EventListenerOptions): void;
|
|
322
|
-
/**
|
|
323
|
-
* Returns the latest cached frame as an {@link IncodeCanvas}.
|
|
324
|
-
*/
|
|
325
|
-
getLatestCanvas(): IncodeCanvas | null;
|
|
326
|
-
/**
|
|
327
|
-
* Returns the latest cached frame as raw {@link ImageData}.
|
|
328
|
-
*/
|
|
329
|
-
getLatestFrame(): ImageData | null;
|
|
330
|
-
/**
|
|
331
|
-
* Disposes internal resources and stops the capture loop.
|
|
332
|
-
*/
|
|
333
|
-
dispose(): void;
|
|
334
|
-
private rafLoop;
|
|
335
|
-
private tick;
|
|
336
|
-
}
|
|
337
|
-
//#endregion
|
|
338
193
|
//#region ../infra/src/capabilities/IMotionSensorCapability.d.ts
|
|
339
194
|
type MotionStatus = 'PASS' | 'FAIL' | 'UNCLEAR';
|
|
340
195
|
type MotionPermissionState = 'granted' | 'denied' | 'not-required';
|
|
341
|
-
type IMotionSensorCapability = {
|
|
342
|
-
requestPermission(): Promise<MotionPermissionState>;
|
|
343
|
-
start(): Promise<void>;
|
|
344
|
-
stop(): void;
|
|
345
|
-
check(): MotionStatus;
|
|
346
|
-
readonly isRunning: boolean;
|
|
347
|
-
readonly hasPermission: boolean;
|
|
348
|
-
};
|
|
349
196
|
//#endregion
|
|
350
197
|
//#region src/internal/deepsight/metadataService.d.ts
|
|
351
198
|
type MetadataService = {
|
|
@@ -391,6 +238,7 @@ type DeepsightService = {
|
|
|
391
238
|
initialize(disableIpify?: boolean): Promise<void>;
|
|
392
239
|
requestMotionPermission(): Promise<'granted' | 'denied' | 'not-required'>;
|
|
393
240
|
startMotionSensors(): Promise<void>;
|
|
241
|
+
primeWasmMotionSensor(): Promise<void>;
|
|
394
242
|
stopMotionSensors(): void;
|
|
395
243
|
checkVirtualCamera(videoTrack: MediaStreamTrack): Promise<boolean>;
|
|
396
244
|
performVirtualCameraCheck(sessionToken: string | null, source: FrameSource): Promise<void>;
|
|
@@ -409,4 +257,4 @@ type DeepsightPrcCheckParams = {
|
|
|
409
257
|
constraints: MediaStreamConstraints;
|
|
410
258
|
};
|
|
411
259
|
//#endregion
|
|
412
|
-
export {
|
|
260
|
+
export { IMLProviderCapability as a, IRecordingCapability as c, WasmUtilConfig as i, RecordingConnection as l, IWasmUtilCapability as n, MLProviderConfig as o, VirtualCameraCheckOutput as r, IStorageCapability as s, DeepsightService as t };
|