@incodetech/core 0.0.0-dev-20260702-cc2ced08 → 0.0.0-dev-20260702-a1566880
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-3yqmC0fd.esm.js → 3dAvatarProvider-CVwSAzDw.esm.js} +1 -1
- package/dist/{Face2DProvider-C-fAuV-p.esm.js → Face2DProvider-BuWoUgFl.esm.js} +1 -1
- package/dist/{FaceDetectionProvider-B4SVWfK7.d.ts → FaceDetectionProvider-C723Vh4J.d.ts} +2 -2
- package/dist/{IWasmUtilCapability-Dpg64Qr2.d.ts → IWasmUtilCapability-DCe8akKn.d.ts} +2 -2
- package/dist/{OpenViduRecordingProvider-DmA__QfK.esm.js → OpenViduRecordingProvider-CK6A5kiU.esm.js} +1 -1
- package/dist/{StreamCanvasCapture-BqaiJxNa.d.ts → StreamCanvasCapture-DHDxv6hH.d.ts} +2 -2
- package/dist/ae-signature.d.ts +3 -3
- package/dist/antifraud.d.ts +3 -3
- package/dist/{antifraudManager-DcraYd6r.d.ts → antifraudManager-0tq22vID.d.ts} +2 -2
- package/dist/authentication.d.ts +18 -18
- package/dist/authentication.esm.js +7 -7
- package/dist/{authenticationManager-BVM5Czih.esm.js → authenticationManager-C3fe4lGI.esm.js} +2 -2
- package/dist/{authenticationManager-BwUutUMI.d.ts → authenticationManager-DYeRtXSb.d.ts} +3 -3
- package/dist/{authenticationStateMachine-BUb8hzFa.esm.js → authenticationStateMachine-CYois9xB.esm.js} +2 -2
- package/dist/avatar.d.ts +2 -2
- package/dist/avatar.esm.js +1 -1
- package/dist/camera.d.ts +1 -1
- package/dist/certificate-issuance.d.ts +30 -30
- package/dist/consent.d.ts +3 -3
- package/dist/{consentManager-BvDJp7BI.d.ts → consentManager-CMa6xRhY.d.ts} +49 -49
- package/dist/cpf-ocr.d.ts +3 -3
- package/dist/{cpfOcrManager-CLrn17Kf.d.ts → cpfOcrManager-D7VCqCRS.d.ts} +19 -19
- package/dist/{createFaceAvatar-CiNyvRNO.esm.js → createFaceAvatar-97WdPBmX.esm.js} +3 -3
- package/dist/{createFaceAvatar-tloe__L_.d.ts → createFaceAvatar-DNMSIcRb.d.ts} +1 -1
- package/dist/cross-document-data-match.d.ts +1 -1
- package/dist/curp-validation.d.ts +9 -9
- package/dist/{curpValidationManager-Bd_J27C3.d.ts → curpValidationManager-DcnaKhq7.d.ts} +3 -3
- package/dist/custom-fields.d.ts +2 -2
- package/dist/custom-watchlist.d.ts +1 -1
- package/dist/document-capture.d.ts +178 -178
- package/dist/document-upload.d.ts +50 -50
- package/dist/dynamic-forms.d.ts +2 -2
- package/dist/ekyb.d.ts +8 -8
- package/dist/ekyb.esm.js +4 -4
- package/dist/{ekybStateMachine-BzMz39iQ.esm.js → ekybStateMachine-DP7isX-i.esm.js} +1 -1
- package/dist/ekyc.d.ts +3 -3
- package/dist/electronic-signature.d.ts +3 -3
- package/dist/email.d.ts +4 -4
- package/dist/{emailManager-DB7-HTVr.d.ts → emailManager-D5kHN_Zj.d.ts} +3 -3
- package/dist/extensibility.d.ts +33 -32
- package/dist/extensibility.esm.js +18 -16
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +1 -1
- package/dist/{faceCaptureManagerFactory-BbFl762r.esm.js → faceCaptureManagerFactory-D65wC0Oy.esm.js} +1 -1
- package/dist/{faceCaptureManagerFactory-CyZP_Q9V.d.ts → faceCaptureManagerFactory-D6uM60D6.d.ts} +12 -12
- package/dist/{faceCaptureSetup-CIkrBLYz.esm.js → faceCaptureSetup-DRgLc1RU.esm.js} +3 -3
- package/dist/field-comparison.d.ts +3 -3
- package/dist/{fieldComparisonManager-CjIY3Y1d.d.ts → fieldComparisonManager-brjMzIRO.d.ts} +2 -2
- package/dist/fiscal-qr.d.ts +4 -4
- package/dist/fiscal-qr.esm.js +1 -1
- package/dist/flow-events.d.ts +8 -8
- package/dist/flow.d.ts +13 -13
- package/dist/flow.esm.js +5 -5
- package/dist/{flowServices-DsAOXwDS.esm.js → flowServices-DhmBfwaK.esm.js} +1 -1
- package/dist/geolocation.d.ts +2 -2
- package/dist/geolocation.esm.js +1 -1
- package/dist/government-validation.d.ts +3 -3
- package/dist/government-validation.esm.js +1 -1
- package/dist/home.d.ts +17 -17
- package/dist/http.esm.js +1 -1
- package/dist/id-ocr.d.ts +3 -625
- package/dist/id-ocr.esm.js +5 -82
- package/dist/id-verification.d.ts +27 -27
- package/dist/id-verification.esm.js +1 -1
- package/dist/id.d.ts +15 -15
- package/dist/id.esm.js +7 -7
- package/dist/{idCaptureManager-TBCF4TGa.esm.js → idCaptureManager-C3WMK4_f.esm.js} +1 -1
- package/dist/{idCaptureManager-fvEYwU_l.d.ts → idCaptureManager-D9RZ93td.d.ts} +11 -11
- package/dist/{idCaptureStateMachine-K6LgInsG.esm.js → idCaptureStateMachine-Dr676DwS.esm.js} +5 -5
- package/dist/idOcrManager-D_RlFzxU.esm.js +92 -0
- package/dist/idOcrManager-DuKkC_F0.d.ts +641 -0
- package/dist/identity-reuse.d.ts +3 -3
- package/dist/{identityReuseManager-DHveeduR.d.ts → identityReuseManager-jK7-qoNl.d.ts} +33 -33
- package/dist/{index-CpQYJA2K.d.ts → index-Cd55zTCb.d.ts} +2 -2
- package/dist/{index-BR5R9zI_.d.ts → index-hyzrMFYW.d.ts} +169 -169
- package/dist/index.d.ts +3 -3
- package/dist/index.esm.js +3 -3
- package/dist/mandatory-consent.d.ts +9 -9
- package/dist/{mandatoryConsentManager-BMFzCwXR.d.ts → mandatoryConsentManager-sgRmypIp.d.ts} +53 -53
- package/dist/{onDeviceFaceResults-DlErdHcT.esm.js → onDeviceFaceResults-IJDRqtYI.esm.js} +2 -2
- package/dist/openviduLazy-jPgABwrt.esm.js +3 -0
- package/dist/{openviduLazy-BXDnVFe2.esm.js → openviduLazy-wEojM41w.esm.js} +1 -1
- package/dist/personhood.d.ts +15 -15
- package/dist/personhood.esm.js +1 -1
- package/dist/phone.d.ts +4 -4
- package/dist/{phoneManager-DWBrSRZq.d.ts → phoneManager-DPDc0FVX.d.ts} +3 -3
- package/dist/qe-signature.d.ts +3 -3
- package/dist/qe-signature.esm.js +1 -1
- package/dist/{recordingService-D8zRQbVb.esm.js → recordingService-4pOlb2SG.esm.js} +3 -3
- package/dist/redirect-to-mobile.d.ts +3 -3
- package/dist/redirect-to-mobile.esm.js +2 -2
- package/dist/{redirectToMobileManager-DIc_xDDn.esm.js → redirectToMobileManager-Be0DwbuH.esm.js} +1 -1
- package/dist/{redirectToMobileManager-slUK-Ttt.d.ts → redirectToMobileManager-f6wLXbkN.d.ts} +2 -2
- package/dist/selfie.d.ts +18 -18
- package/dist/selfie.esm.js +8 -8
- package/dist/{selfieManager-CjFFQTKK.esm.js → selfieManager-By-EP_q4.esm.js} +2 -2
- package/dist/{selfieManager-CARwc0rJ.d.ts → selfieManager-CQuIQApd.d.ts} +3 -3
- package/dist/{selfieStateMachine-2UJDOv3d.esm.js → selfieStateMachine-Dn3Vh_z_.esm.js} +2 -2
- package/dist/session.d.ts +7 -7
- package/dist/session.esm.js +3 -3
- package/dist/{sessionInitializer-C0YhqeiX.esm.js → sessionInitializer-COrA-YBy.esm.js} +2 -2
- package/dist/{setup-B0dyRJVg.d.ts → setup-Da51UnII.d.ts} +2 -2
- package/dist/{setup-3W6rhIxJ.esm.js → setup-q7YrDt0W.esm.js} +2 -2
- package/dist/signature.d.ts +2 -2
- package/dist/signature.esm.js +1 -1
- package/dist/{tri-D6YWLiyE.esm.js → tri-QAWxUCoY.esm.js} +1 -1
- package/dist/tri.d.ts +1 -1
- package/dist/{tri.esm-Q8X11Udu.esm.js → tri.esm-B47NPJjh.esm.js} +1 -1
- package/dist/tri.esm.js +1 -1
- package/dist/trust-graph.d.ts +3 -3
- package/dist/{types-B4nBoeCd.d.ts → types-BBSIY1G3.d.ts} +3 -3
- package/dist/{types-Bl8JJxqM.d.ts → types-B_YCuHZx.d.ts} +1 -1
- package/dist/{types-BoOrY6Kj.d.ts → types-Cyi3gwPK.d.ts} +2 -2
- package/dist/{types-DHIl-AtE.d.ts → types-DW6z_vgY.d.ts} +1 -1
- package/dist/video-selfie.d.ts +12 -12
- package/dist/video-selfie.esm.js +4 -4
- package/dist/wasm.d.ts +3 -3
- package/dist/wasm.esm.js +3 -3
- package/dist/watchlist-for-business.d.ts +1 -1
- package/dist/watchlist-for-business.esm.js +1 -1
- package/dist/watchlist.d.ts +1 -1
- package/dist/watchlist.esm.js +1 -1
- package/dist/workflow.d.ts +115 -115
- package/dist/workflow.esm.js +23 -23
- package/package.json +1 -1
- package/dist/openviduLazy-lAZzee_g.esm.js +0 -3
- /package/dist/{Actor-Du_LU0S4.d.ts → Actor-DYjXVMQm.d.ts} +0 -0
- /package/dist/{IVisibilityObserverCapability-D8EjWdOj.d.ts → IVisibilityObserverCapability-BxPj7hsu.d.ts} +0 -0
- /package/dist/{Manager-BUc6OqO5.d.ts → Manager-BylDhZIB.d.ts} +0 -0
- /package/dist/{PrivacyLensProvider-D3KyqFh7.esm.js → PrivacyLensProvider-CZnkF34Z.esm.js} +0 -0
- /package/dist/{browser-DlFgHpoC-D0saHs_w.esm.js → browser-DlFgHpoC-BieMg30k.esm.js} +0 -0
- /package/dist/{camera-DtXTDZWt.d.ts → camera-CWO06Lu5.d.ts} +0 -0
- /package/dist/{canvas-Dcq7XIdx.d.ts → canvas-pLrXU1id.d.ts} +0 -0
- /package/dist/{deepsightLoader-C2P7w1dA.esm.js → deepsightLoader-BrK1yV0-.esm.js} +0 -0
- /package/dist/{deepsightService-DMGqYUMO.d.ts → deepsightService-6J67NoN9.d.ts} +0 -0
- /package/dist/{faceMatchStateMachine-CDx5ZRhv.esm.js → faceMatchStateMachine-BLL5aQX6.esm.js} +0 -0
- /package/dist/{flowCompletionService-BqDrPtNh.esm.js → flowCompletionService-C4ciNLxe.esm.js} +0 -0
- /package/dist/{flowCompletionService-CY9Cb5V1.d.ts → flowCompletionService-DWsYur5b.d.ts} +0 -0
- /package/dist/{geolocationStateMachine-BYfOOOG0.esm.js → geolocationStateMachine-Vs5GfQ8l.esm.js} +0 -0
- /package/dist/{governmentValidationStateMachine-yCQaD7zl.esm.js → governmentValidationStateMachine-EKSIq4v9.esm.js} +0 -0
- /package/dist/{http-C6s60xSe.esm.js → http-CBbBcnBa.esm.js} +0 -0
- /package/dist/{idOcrStateMachine-6vUdYjRV.esm.js → idOcrStateMachine-DLz_gexF.esm.js} +0 -0
- /package/dist/{idVerificationStateMachine-cT7LtSYe.esm.js → idVerificationStateMachine-BOz1v4AY.esm.js} +0 -0
- /package/dist/{index-CCG6MnCO.d.ts → index-BAyZ8_iI.d.ts} +0 -0
- /package/dist/{invokeOnCaptureCallback-DrpXOwkG.esm.js → invokeOnCaptureCallback-uZ42DiUz.esm.js} +0 -0
- /package/dist/{lib-TRTXfron.esm.js → lib-Bjd6nOLG.esm.js} +0 -0
- /package/dist/{mediapipeShared-yKDdOf_V.esm.js → mediapipeShared-Bcmkzs3x.esm.js} +0 -0
- /package/dist/{otp-DyNGp0Po.d.ts → otp-DZSnImi6.d.ts} +0 -0
- /package/dist/{qe-signature-D5gwX-fY.esm.js → qe-signature-mU2bJh-u.esm.js} +0 -0
- /package/dist/{redirectToMobileStateMachine-H-iEztA6.esm.js → redirectToMobileStateMachine-DaZBdvQA.esm.js} +0 -0
- /package/dist/{runChildModule-Wr_2wB1m.esm.js → runChildModule-D-rDy5jB.esm.js} +0 -0
- /package/dist/{signatureStateMachine-c-HlL0-y.esm.js → signatureStateMachine-DWob8P45.esm.js} +0 -0
- /package/dist/{types-CYK29a4w.d.ts → types-BOiKESZY.d.ts} +0 -0
- /package/dist/{types-BXkFotpx.d.ts → types-CTnn7kUK.d.ts} +0 -0
- /package/dist/{warmup-DzJ0I4Kv.d.ts → warmup-CZ80odyW.d.ts} +0 -0
- /package/dist/{watchlistForBusinessStateMachine-DNaxGviI.esm.js → watchlistForBusinessStateMachine-Do3drRT5.esm.js} +0 -0
- /package/dist/{watchlistStateMachine-DPLVxv_x.esm.js → watchlistStateMachine-D6A4O5rK.esm.js} +0 -0
package/dist/id-ocr.esm.js
CHANGED
|
@@ -1,87 +1,10 @@
|
|
|
1
1
|
import "./api-DsbUi7TO.esm.js";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import "./events-CqGY1yMq.esm.js";
|
|
3
|
+
import "./types-ElOJAGaM.esm.js";
|
|
4
4
|
import "./endpoints-BzMJFAPV.esm.js";
|
|
5
|
-
import
|
|
5
|
+
import "./xstate.esm-Bomq1a0z.esm.js";
|
|
6
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-
|
|
7
|
+
import { a as MIN_AGE, i as CPFFlowIds, n as OCR_FIELDS, r as getOcrFields, t as idOcrStateMachine } from "./idOcrStateMachine-DLz_gexF.esm.js";
|
|
8
|
+
import { t as createIdOcrManager } from "./idOcrManager-D_RlFzxU.esm.js";
|
|
8
9
|
|
|
9
|
-
//#region src/modules/id-ocr/idOcrActor.ts
|
|
10
|
-
function createIdOcrActor(options) {
|
|
11
|
-
return createActor(idOcrStateMachine, { input: { config: options.config } }).start();
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region src/modules/id-ocr/idOcrManager.ts
|
|
16
|
-
function mapState(snapshot) {
|
|
17
|
-
const { context } = snapshot;
|
|
18
|
-
const editableOcr = context.config.editableOcr === true;
|
|
19
|
-
if (snapshot.matches("idle")) return { status: "idle" };
|
|
20
|
-
if (snapshot.matches("loading")) return {
|
|
21
|
-
status: "loading",
|
|
22
|
-
ocrDocument: context.activeOcrDocument
|
|
23
|
-
};
|
|
24
|
-
if (snapshot.matches("readonly")) return {
|
|
25
|
-
status: "readonly",
|
|
26
|
-
formData: context.formData,
|
|
27
|
-
editableOcr,
|
|
28
|
-
ocrDocument: context.activeOcrDocument
|
|
29
|
-
};
|
|
30
|
-
if (snapshot.matches("inputting")) return {
|
|
31
|
-
status: "inputting",
|
|
32
|
-
formData: context.formData,
|
|
33
|
-
editedFields: context.editedFields,
|
|
34
|
-
editableOcr,
|
|
35
|
-
ocrDocument: context.activeOcrDocument,
|
|
36
|
-
validationErrors: context.validationErrors
|
|
37
|
-
};
|
|
38
|
-
if (snapshot.matches("submitting")) return {
|
|
39
|
-
status: "submitting",
|
|
40
|
-
ocrDocument: context.activeOcrDocument
|
|
41
|
-
};
|
|
42
|
-
if (snapshot.matches("success")) return { status: "success" };
|
|
43
|
-
if (snapshot.matches("finished")) return { status: "finished" };
|
|
44
|
-
if (snapshot.matches("error")) return {
|
|
45
|
-
status: "error",
|
|
46
|
-
error: context.error ?? "Unknown error"
|
|
47
|
-
};
|
|
48
|
-
return { status: "idle" };
|
|
49
|
-
}
|
|
50
|
-
function createApi({ actor, trackElementClicked }) {
|
|
51
|
-
return {
|
|
52
|
-
load() {
|
|
53
|
-
actor.send({ type: "LOAD" });
|
|
54
|
-
},
|
|
55
|
-
setField(field, value) {
|
|
56
|
-
actor.send({
|
|
57
|
-
type: "DATA_CHANGED",
|
|
58
|
-
field,
|
|
59
|
-
value
|
|
60
|
-
});
|
|
61
|
-
},
|
|
62
|
-
validateField(field) {
|
|
63
|
-
actor.send({
|
|
64
|
-
type: "VALIDATE_FIELD",
|
|
65
|
-
field
|
|
66
|
-
});
|
|
67
|
-
},
|
|
68
|
-
continue() {
|
|
69
|
-
actor.send({ type: "CONTINUE" });
|
|
70
|
-
trackElementClicked?.("continue");
|
|
71
|
-
},
|
|
72
|
-
retry() {
|
|
73
|
-
actor.send({ type: "RETRY" });
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
function createIdOcrManager(options) {
|
|
78
|
-
return createManager({
|
|
79
|
-
actor: createIdOcrActor(options),
|
|
80
|
-
mapState,
|
|
81
|
-
createApi,
|
|
82
|
-
instrumentation: createManagerInstrumentation(eventModuleNames.idOcr)
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
//#endregion
|
|
87
10
|
export { CPFFlowIds, MIN_AGE, OCR_FIELDS, createIdOcrManager, getOcrFields, idOcrStateMachine };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as Manager } from "./Manager-
|
|
2
|
-
import "./Actor-
|
|
3
|
-
import * as
|
|
1
|
+
import { t as Manager } from "./Manager-BylDhZIB.js";
|
|
2
|
+
import "./Actor-DYjXVMQm.js";
|
|
3
|
+
import * as xstate1489 from "xstate";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/id-verification/types.d.ts
|
|
6
6
|
type IdVerificationConfig = {
|
|
@@ -32,26 +32,26 @@ type IdVerificationContext = {
|
|
|
32
32
|
type IdVerificationInput = {
|
|
33
33
|
config: IdVerificationConfig;
|
|
34
34
|
};
|
|
35
|
-
declare const idVerificationMachine:
|
|
35
|
+
declare const idVerificationMachine: xstate1489.StateMachine<IdVerificationContext, {
|
|
36
36
|
type: "LOAD";
|
|
37
37
|
} | {
|
|
38
38
|
type: "CONTINUE";
|
|
39
39
|
}, {
|
|
40
|
-
[x: string]:
|
|
40
|
+
[x: string]: xstate1489.ActorRefFromLogic<xstate1489.PromiseActorLogic<ProcessIdResponse, {
|
|
41
41
|
isSecondId: boolean;
|
|
42
42
|
queueName: string;
|
|
43
|
-
},
|
|
43
|
+
}, xstate1489.EventObject>> | undefined;
|
|
44
44
|
}, {
|
|
45
45
|
src: "processId";
|
|
46
|
-
logic:
|
|
46
|
+
logic: xstate1489.PromiseActorLogic<ProcessIdResponse, {
|
|
47
47
|
isSecondId: boolean;
|
|
48
48
|
queueName: string;
|
|
49
|
-
},
|
|
49
|
+
}, xstate1489.EventObject>;
|
|
50
50
|
id: string | undefined;
|
|
51
51
|
}, never, {
|
|
52
52
|
type: "isDocumentExpired";
|
|
53
53
|
params: unknown;
|
|
54
|
-
}, never, "idle" | "processing" | "finished" | "expired", string, IdVerificationInput,
|
|
54
|
+
}, never, "idle" | "processing" | "finished" | "expired", string, IdVerificationInput, xstate1489.NonReducibleUnknown, xstate1489.EventObject, xstate1489.MetaObject, {
|
|
55
55
|
readonly id: "idVerification";
|
|
56
56
|
readonly initial: "idle";
|
|
57
57
|
readonly context: ({
|
|
@@ -60,50 +60,50 @@ declare const idVerificationMachine: xstate1404.StateMachine<IdVerificationConte
|
|
|
60
60
|
spawn: {
|
|
61
61
|
<TSrc extends "processId">(logic: TSrc, ...[options]: {
|
|
62
62
|
src: "processId";
|
|
63
|
-
logic:
|
|
63
|
+
logic: xstate1489.PromiseActorLogic<ProcessIdResponse, {
|
|
64
64
|
isSecondId: boolean;
|
|
65
65
|
queueName: string;
|
|
66
|
-
},
|
|
66
|
+
}, xstate1489.EventObject>;
|
|
67
67
|
id: string | undefined;
|
|
68
68
|
} extends infer T ? T extends {
|
|
69
69
|
src: "processId";
|
|
70
|
-
logic:
|
|
70
|
+
logic: xstate1489.PromiseActorLogic<ProcessIdResponse, {
|
|
71
71
|
isSecondId: boolean;
|
|
72
72
|
queueName: string;
|
|
73
|
-
},
|
|
73
|
+
}, xstate1489.EventObject>;
|
|
74
74
|
id: string | undefined;
|
|
75
75
|
} ? T extends {
|
|
76
76
|
src: TSrc;
|
|
77
|
-
} ?
|
|
77
|
+
} ? xstate1489.ConditionalRequired<[options?: ({
|
|
78
78
|
id?: T["id"] | undefined;
|
|
79
79
|
systemId?: string;
|
|
80
|
-
input?:
|
|
80
|
+
input?: xstate1489.InputFrom<T["logic"]> | undefined;
|
|
81
81
|
syncSnapshot?: boolean;
|
|
82
|
-
} & { [K in
|
|
82
|
+
} & { [K in xstate1489.RequiredActorOptions<T>]: unknown }) | undefined], xstate1489.IsNotNever<xstate1489.RequiredActorOptions<T>>> : never : never : never): xstate1489.ActorRefFromLogic<xstate1489.GetConcreteByKey<{
|
|
83
83
|
src: "processId";
|
|
84
|
-
logic:
|
|
84
|
+
logic: xstate1489.PromiseActorLogic<ProcessIdResponse, {
|
|
85
85
|
isSecondId: boolean;
|
|
86
86
|
queueName: string;
|
|
87
|
-
},
|
|
87
|
+
}, xstate1489.EventObject>;
|
|
88
88
|
id: string | undefined;
|
|
89
89
|
}, "src", TSrc>["logic"]>;
|
|
90
|
-
<TLogic extends
|
|
90
|
+
<TLogic extends xstate1489.AnyActorLogic>(src: TLogic, ...[options]: xstate1489.ConditionalRequired<[options?: ({
|
|
91
91
|
id?: never;
|
|
92
92
|
systemId?: string;
|
|
93
|
-
input?:
|
|
93
|
+
input?: xstate1489.InputFrom<TLogic> | undefined;
|
|
94
94
|
syncSnapshot?: boolean;
|
|
95
|
-
} & { [K in
|
|
95
|
+
} & { [K in xstate1489.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate1489.IsNotNever<xstate1489.RequiredLogicInput<TLogic>>>): xstate1489.ActorRefFromLogic<TLogic>;
|
|
96
96
|
};
|
|
97
97
|
input: IdVerificationInput;
|
|
98
|
-
self:
|
|
98
|
+
self: xstate1489.ActorRef<xstate1489.MachineSnapshot<IdVerificationContext, {
|
|
99
99
|
type: "LOAD";
|
|
100
100
|
} | {
|
|
101
101
|
type: "CONTINUE";
|
|
102
|
-
}, Record<string,
|
|
102
|
+
}, Record<string, xstate1489.AnyActorRef | undefined>, xstate1489.StateValue, string, unknown, any, any>, {
|
|
103
103
|
type: "LOAD";
|
|
104
104
|
} | {
|
|
105
105
|
type: "CONTINUE";
|
|
106
|
-
},
|
|
106
|
+
}, xstate1489.AnyEventObject>;
|
|
107
107
|
}) => {
|
|
108
108
|
config: IdVerificationConfig;
|
|
109
109
|
isSecondId: boolean;
|
|
@@ -127,15 +127,15 @@ declare const idVerificationMachine: xstate1404.StateMachine<IdVerificationConte
|
|
|
127
127
|
} | {
|
|
128
128
|
type: "CONTINUE";
|
|
129
129
|
};
|
|
130
|
-
self:
|
|
130
|
+
self: xstate1489.ActorRef<xstate1489.MachineSnapshot<IdVerificationContext, {
|
|
131
131
|
type: "LOAD";
|
|
132
132
|
} | {
|
|
133
133
|
type: "CONTINUE";
|
|
134
|
-
}, Record<string,
|
|
134
|
+
}, Record<string, xstate1489.AnyActorRef>, xstate1489.StateValue, string, unknown, any, any>, {
|
|
135
135
|
type: "LOAD";
|
|
136
136
|
} | {
|
|
137
137
|
type: "CONTINUE";
|
|
138
|
-
},
|
|
138
|
+
}, xstate1489.AnyEventObject>;
|
|
139
139
|
}) => {
|
|
140
140
|
isSecondId: boolean;
|
|
141
141
|
queueName: string;
|
|
@@ -3,7 +3,7 @@ import { n as createManagerInstrumentation } from "./events-CqGY1yMq.esm.js";
|
|
|
3
3
|
import "./types-ElOJAGaM.esm.js";
|
|
4
4
|
import "./endpoints-BzMJFAPV.esm.js";
|
|
5
5
|
import { l as createManager, s as createActor } from "./xstate.esm-Bomq1a0z.esm.js";
|
|
6
|
-
import { t as idVerificationMachine } from "./idVerificationStateMachine-
|
|
6
|
+
import { t as idVerificationMachine } from "./idVerificationStateMachine-BOz1v4AY.esm.js";
|
|
7
7
|
|
|
8
8
|
//#region src/modules/id-verification/idVerificationActor.ts
|
|
9
9
|
function createIdVerificationActor(options) {
|
package/dist/id.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import "./warmup-
|
|
2
|
-
import "./Manager-
|
|
3
|
-
import "./Actor-
|
|
4
|
-
import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-
|
|
5
|
-
import { t as CameraStream } from "./camera-
|
|
6
|
-
import "./types-
|
|
7
|
-
import "./types-
|
|
8
|
-
import "./canvas-
|
|
9
|
-
import "./createFaceAvatar-
|
|
10
|
-
import "./types-
|
|
11
|
-
import "./IWasmUtilCapability-
|
|
12
|
-
import { n as PermissionStatus, t as PermissionResult } from "./types-
|
|
13
|
-
import "./StreamCanvasCapture-
|
|
14
|
-
import "./deepsightService-
|
|
15
|
-
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-
|
|
1
|
+
import "./warmup-CZ80odyW.js";
|
|
2
|
+
import "./Manager-BylDhZIB.js";
|
|
3
|
+
import "./Actor-DYjXVMQm.js";
|
|
4
|
+
import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-BxPj7hsu.js";
|
|
5
|
+
import { t as CameraStream } from "./camera-CWO06Lu5.js";
|
|
6
|
+
import "./types-B_YCuHZx.js";
|
|
7
|
+
import "./types-CTnn7kUK.js";
|
|
8
|
+
import "./canvas-pLrXU1id.js";
|
|
9
|
+
import "./createFaceAvatar-DNMSIcRb.js";
|
|
10
|
+
import "./types-Cyi3gwPK.js";
|
|
11
|
+
import "./IWasmUtilCapability-DCe8akKn.js";
|
|
12
|
+
import { n as PermissionStatus, t as PermissionResult } from "./types-BOiKESZY.js";
|
|
13
|
+
import "./StreamCanvasCapture-DHDxv6hH.js";
|
|
14
|
+
import "./deepsightService-6J67NoN9.js";
|
|
15
|
+
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-D9RZ93td.js";
|
|
16
16
|
|
|
17
17
|
//#region src/modules/id/idCaptureOnlyManager.d.ts
|
|
18
18
|
type IdCaptureOnlyManager = IdCaptureManager;
|
package/dist/id.esm.js
CHANGED
|
@@ -6,12 +6,12 @@ import { n as eventModuleNames } from "./types-ElOJAGaM.esm.js";
|
|
|
6
6
|
import "./endpoints-BzMJFAPV.esm.js";
|
|
7
7
|
import "./stats-CYcScXcO.esm.js";
|
|
8
8
|
import "./browserSimulation-TsSoavQv.esm.js";
|
|
9
|
-
import "./sessionInitializer-
|
|
9
|
+
import "./sessionInitializer-COrA-YBy.esm.js";
|
|
10
10
|
import "./getDeviceData-TrKM8NPh.esm.js";
|
|
11
11
|
import "./thumbmarkAdapter-fHBUDlAP.esm.js";
|
|
12
12
|
import "./IpifyProvider-BRW14_uo.esm.js";
|
|
13
13
|
import "./platform-uIVQUnJP.esm.js";
|
|
14
|
-
import "./tri-
|
|
14
|
+
import "./tri-QAWxUCoY.esm.js";
|
|
15
15
|
import { a as fromPromise, r as assign, s as createActor } from "./xstate.esm-Bomq1a0z.esm.js";
|
|
16
16
|
import "./apiError-C7SFQTB2.esm.js";
|
|
17
17
|
import "./BrowserVisibilityObserverProvider-rim9Jrz-.esm.js";
|
|
@@ -19,7 +19,7 @@ import "./MotionSensorProvider-DCbId4De.esm.js";
|
|
|
19
19
|
import "./permissionServices-BJhGL13R.esm.js";
|
|
20
20
|
import "./camera-DUkgmYMo.esm.js";
|
|
21
21
|
import { t as BrowserStorageProvider } from "./BrowserStorageProvider-CrrN540a.esm.js";
|
|
22
|
-
import "./onDeviceFaceResults-
|
|
22
|
+
import "./onDeviceFaceResults-IJDRqtYI.esm.js";
|
|
23
23
|
import "./ITimerCapability-pltuG1E8.esm.js";
|
|
24
24
|
import "./canvas-_I95hkPg.esm.js";
|
|
25
25
|
import "./backCameraStream-ZyqrFyjO.esm.js";
|
|
@@ -30,13 +30,13 @@ import "./getDeviceClass-DGGzzfqm.esm.js";
|
|
|
30
30
|
import "./types-CMcxlSmH.esm.js";
|
|
31
31
|
import "./StreamCanvasCapture-Bz17q4FP.esm.js";
|
|
32
32
|
import "./permissionGuards-BR2oN573.esm.js";
|
|
33
|
-
import "./recordingService-
|
|
33
|
+
import "./recordingService-4pOlb2SG.esm.js";
|
|
34
34
|
import "./mediaRecorderOptions-C3NAkVgK.esm.js";
|
|
35
35
|
import "./session-D4m9r-7U.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-
|
|
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-Dr676DwS.esm.js";
|
|
37
37
|
import "./idCaptureDefaults-GTCesE6K.esm.js";
|
|
38
|
-
import { n as createIdCaptureActor, r as createIdCaptureManagerFromActor, t as createIdCaptureManager } from "./idCaptureManager-
|
|
39
|
-
import { t as invokeOnCaptureCallback } from "./invokeOnCaptureCallback-
|
|
38
|
+
import { n as createIdCaptureActor, r as createIdCaptureManagerFromActor, t as createIdCaptureManager } from "./idCaptureManager-C3WMK4_f.esm.js";
|
|
39
|
+
import { t as invokeOnCaptureCallback } from "./invokeOnCaptureCallback-uZ42DiUz.esm.js";
|
|
40
40
|
|
|
41
41
|
//#region src/modules/id/idCaptureOnlyStateMachine.ts
|
|
42
42
|
function buildSubImage(canvas) {
|
|
@@ -4,7 +4,7 @@ import { l as createManager, s as createActor } from "./xstate.esm-Bomq1a0z.esm.
|
|
|
4
4
|
import { n as setWasmDsFlagSync, t as BrowserVisibilityObserverProvider } from "./BrowserVisibilityObserverProvider-rim9Jrz-.esm.js";
|
|
5
5
|
import { o as resetWasmMotionPrimedForModule, r as primeMotionFromUserGestureIfNeeded } from "./permissionServices-BJhGL13R.esm.js";
|
|
6
6
|
import { t as BrowserStorageProvider } from "./BrowserStorageProvider-CrrN540a.esm.js";
|
|
7
|
-
import { i as mapIdManualUploadScreenName, n as getManualUploadTabs, r as MAX_EXPIRED_FIRST_SIDE_ATTEMPTS, t as idCaptureMachine, v as mapDigitalIdScreenName } from "./idCaptureStateMachine-
|
|
7
|
+
import { i as mapIdManualUploadScreenName, n as getManualUploadTabs, r as MAX_EXPIRED_FIRST_SIDE_ATTEMPTS, t as idCaptureMachine, v as mapDigitalIdScreenName } from "./idCaptureStateMachine-Dr676DwS.esm.js";
|
|
8
8
|
|
|
9
9
|
//#region src/internal/idCapture/idCaptureManagerFactory.ts
|
|
10
10
|
function getPermissionStatus(snapshot) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { n as AnyStateMachine, r as StateMachine, t as Manager } from "./Manager-
|
|
2
|
-
import { t as ActorRefFrom } from "./Actor-
|
|
3
|
-
import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-
|
|
4
|
-
import { t as CameraStream } from "./camera-
|
|
5
|
-
import { t as IncodeCanvas } from "./canvas-
|
|
6
|
-
import { _ as MLProviderConfig, g as IMLProviderCapability } from "./createFaceAvatar-
|
|
7
|
-
import { a as RegulationTypes, n as Flow, o as TutorialIdConfig } from "./types-
|
|
8
|
-
import { a as IRecordingCapability, i as IStorageCapability, o as RecordingConnection } from "./IWasmUtilCapability-
|
|
9
|
-
import { n as PermissionStatus, t as PermissionResult } from "./types-
|
|
10
|
-
import { t as StreamCanvasCapture } from "./StreamCanvasCapture-
|
|
11
|
-
import { t as DeepsightService } from "./deepsightService-
|
|
1
|
+
import { n as AnyStateMachine, r as StateMachine, t as Manager } from "./Manager-BylDhZIB.js";
|
|
2
|
+
import { t as ActorRefFrom } from "./Actor-DYjXVMQm.js";
|
|
3
|
+
import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-BxPj7hsu.js";
|
|
4
|
+
import { t as CameraStream } from "./camera-CWO06Lu5.js";
|
|
5
|
+
import { t as IncodeCanvas } from "./canvas-pLrXU1id.js";
|
|
6
|
+
import { _ as MLProviderConfig, g as IMLProviderCapability } from "./createFaceAvatar-DNMSIcRb.js";
|
|
7
|
+
import { a as RegulationTypes, n as Flow, o as TutorialIdConfig } from "./types-Cyi3gwPK.js";
|
|
8
|
+
import { a as IRecordingCapability, i as IStorageCapability, o as RecordingConnection } from "./IWasmUtilCapability-DCe8akKn.js";
|
|
9
|
+
import { n as PermissionStatus, t as PermissionResult } from "./types-BOiKESZY.js";
|
|
10
|
+
import { t as StreamCanvasCapture } from "./StreamCanvasCapture-DHDxv6hH.js";
|
|
11
|
+
import { t as DeepsightService } from "./deepsightService-6J67NoN9.js";
|
|
12
12
|
|
|
13
13
|
//#region ../infra/src/capabilities/IIdCaptureCapability.d.ts
|
|
14
14
|
/**
|
package/dist/{idCaptureStateMachine-K6LgInsG.esm.js → idCaptureStateMachine-Dr676DwS.esm.js}
RENAMED
|
@@ -3,18 +3,18 @@ import { r as getToken, t as api } from "./api-DsbUi7TO.esm.js";
|
|
|
3
3
|
import { v as revokeObjectURL } from "./events-CqGY1yMq.esm.js";
|
|
4
4
|
import { t as endpoints } from "./endpoints-BzMJFAPV.esm.js";
|
|
5
5
|
import { t as addDeviceStats } from "./stats-CYcScXcO.esm.js";
|
|
6
|
-
import { t as getDisableIpify } from "./sessionInitializer-
|
|
6
|
+
import { t as getDisableIpify } from "./sessionInitializer-COrA-YBy.esm.js";
|
|
7
7
|
import { n as isDesktop } from "./platform-uIVQUnJP.esm.js";
|
|
8
8
|
import { a as fromPromise, c as not, i as fromCallback, n as sendTo, o as and, r as assign, t as setup } from "./xstate.esm-Bomq1a0z.esm.js";
|
|
9
9
|
import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-BJhGL13R.esm.js";
|
|
10
|
-
import { _ as stopRecording$1, g as startRecording, h as createRecordingSession, y as StreamCanvasProcessingSession } from "./onDeviceFaceResults-
|
|
10
|
+
import { _ as stopRecording$1, g as startRecording, h as createRecordingSession, y as StreamCanvasProcessingSession } from "./onDeviceFaceResults-IJDRqtYI.esm.js";
|
|
11
11
|
import { t as IncodeCanvas } from "./canvas-_I95hkPg.esm.js";
|
|
12
12
|
import { n as getBackCameraStream } from "./backCameraStream-ZyqrFyjO.esm.js";
|
|
13
13
|
import { n as getWindowDimensions } from "./getDeviceClass-DavNdcxh.esm.js";
|
|
14
14
|
import { t as getDeviceClass } from "./getDeviceClass-DGGzzfqm.esm.js";
|
|
15
15
|
import { t as StreamCanvasCapture } from "./StreamCanvasCapture-Bz17q4FP.esm.js";
|
|
16
16
|
import { n as needsMotionPrimeOnlyFromPermission, r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-BR2oN573.esm.js";
|
|
17
|
-
import { i as flagIdManualReview, n as preloadOpenViduProvider } from "./recordingService-
|
|
17
|
+
import { i as flagIdManualReview, n as preloadOpenViduProvider } from "./recordingService-4pOlb2SG.esm.js";
|
|
18
18
|
import { i as IdCaptureProvider, n as DEFAULT_ID_CAPTURE_MODEL_VERSION, r as DEFAULT_ID_CAPTURE_THRESHOLDS } from "./idCaptureDefaults-GTCesE6K.esm.js";
|
|
19
19
|
|
|
20
20
|
//#region src/modules/id/digitalUpload/digitalUploadErrors.ts
|
|
@@ -680,7 +680,7 @@ function preloadIdRecordingProvider(config) {
|
|
|
680
680
|
preloadOpenViduProvider();
|
|
681
681
|
}
|
|
682
682
|
async function createOpenViduRecordingProvider() {
|
|
683
|
-
const { OpenViduRecordingProvider } = await import("./OpenViduRecordingProvider-
|
|
683
|
+
const { OpenViduRecordingProvider } = await import("./OpenViduRecordingProvider-CK6A5kiU.esm.js");
|
|
684
684
|
return new OpenViduRecordingProvider();
|
|
685
685
|
}
|
|
686
686
|
async function startRecordingSession(params) {
|
|
@@ -1662,7 +1662,7 @@ const startRecordingActor = fromPromise(async ({ input }) => {
|
|
|
1662
1662
|
});
|
|
1663
1663
|
const initializeDeepsightSessionActor = fromPromise(async ({ input }) => {
|
|
1664
1664
|
if (!input.dependencies) return;
|
|
1665
|
-
const { loadDeepsightSession } = await import("./deepsightLoader-
|
|
1665
|
+
const { loadDeepsightSession } = await import("./deepsightLoader-BrK1yV0-.esm.js");
|
|
1666
1666
|
return loadDeepsightSession({
|
|
1667
1667
|
ds: input.ds,
|
|
1668
1668
|
storage: input.dependencies.storage,
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { n as createManagerInstrumentation } from "./events-CqGY1yMq.esm.js";
|
|
2
|
+
import { n as eventModuleNames } from "./types-ElOJAGaM.esm.js";
|
|
3
|
+
import { l as createManager, s as createActor } from "./xstate.esm-Bomq1a0z.esm.js";
|
|
4
|
+
import { t as idOcrStateMachine } from "./idOcrStateMachine-DLz_gexF.esm.js";
|
|
5
|
+
|
|
6
|
+
//#region src/modules/id-ocr/idOcrActor.ts
|
|
7
|
+
function createIdOcrActor(options) {
|
|
8
|
+
return createActor(idOcrStateMachine, { input: { config: options.config } }).start();
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/modules/id-ocr/idOcrManager.ts
|
|
13
|
+
function mapState(snapshot) {
|
|
14
|
+
const { context } = snapshot;
|
|
15
|
+
const editableOcr = context.config.editableOcr === true;
|
|
16
|
+
if (snapshot.matches("idle")) return { status: "idle" };
|
|
17
|
+
if (snapshot.matches("loading")) return {
|
|
18
|
+
status: "loading",
|
|
19
|
+
ocrDocument: context.activeOcrDocument
|
|
20
|
+
};
|
|
21
|
+
if (snapshot.matches("readonly")) return {
|
|
22
|
+
status: "readonly",
|
|
23
|
+
formData: context.formData,
|
|
24
|
+
editableOcr,
|
|
25
|
+
ocrDocument: context.activeOcrDocument
|
|
26
|
+
};
|
|
27
|
+
if (snapshot.matches("inputting")) return {
|
|
28
|
+
status: "inputting",
|
|
29
|
+
formData: context.formData,
|
|
30
|
+
editedFields: context.editedFields,
|
|
31
|
+
editableOcr,
|
|
32
|
+
ocrDocument: context.activeOcrDocument,
|
|
33
|
+
validationErrors: context.validationErrors
|
|
34
|
+
};
|
|
35
|
+
if (snapshot.matches("submitting")) return {
|
|
36
|
+
status: "submitting",
|
|
37
|
+
ocrDocument: context.activeOcrDocument
|
|
38
|
+
};
|
|
39
|
+
if (snapshot.matches("success")) return { status: "success" };
|
|
40
|
+
if (snapshot.matches("finished")) return { status: "finished" };
|
|
41
|
+
if (snapshot.matches("error")) return {
|
|
42
|
+
status: "error",
|
|
43
|
+
error: context.error ?? "Unknown error"
|
|
44
|
+
};
|
|
45
|
+
return { status: "idle" };
|
|
46
|
+
}
|
|
47
|
+
function createApi({ actor, trackElementClicked }) {
|
|
48
|
+
return {
|
|
49
|
+
load() {
|
|
50
|
+
actor.send({ type: "LOAD" });
|
|
51
|
+
},
|
|
52
|
+
setField(field, value) {
|
|
53
|
+
actor.send({
|
|
54
|
+
type: "DATA_CHANGED",
|
|
55
|
+
field,
|
|
56
|
+
value
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
validateField(field) {
|
|
60
|
+
actor.send({
|
|
61
|
+
type: "VALIDATE_FIELD",
|
|
62
|
+
field
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
continue() {
|
|
66
|
+
actor.send({ type: "CONTINUE" });
|
|
67
|
+
trackElementClicked?.("continue");
|
|
68
|
+
},
|
|
69
|
+
retry() {
|
|
70
|
+
actor.send({ type: "RETRY" });
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function createIdOcrManager(options) {
|
|
75
|
+
return createIdOcrManagerFromActor(createIdOcrActor(options));
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Creates an ID-OCR manager from a pre-built actor.
|
|
79
|
+
* Use this when overriding the machine via `.provide()` for custom backends
|
|
80
|
+
* or for story-isolation testing.
|
|
81
|
+
*/
|
|
82
|
+
function createIdOcrManagerFromActor(actor) {
|
|
83
|
+
return createManager({
|
|
84
|
+
actor,
|
|
85
|
+
mapState,
|
|
86
|
+
createApi,
|
|
87
|
+
instrumentation: createManagerInstrumentation(eventModuleNames.idOcr)
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
//#endregion
|
|
92
|
+
export { createIdOcrManagerFromActor as n, createIdOcrManager as t };
|