@incodetech/core 0.0.0-dev-20260409-a38d5e8 → 0.0.0-dev-20260409-09dfd52
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-CXaS5Ooj.esm.js +55 -0
- package/dist/{OpenViduRecordingProvider-Bn2meybK.esm.js → OpenViduRecordingProvider-D_cVAwYQ.esm.js} +1 -1
- package/dist/{WasmUtilProvider-BpZSvZbg.esm.js → WasmUtilProvider-mWSXzp7b.esm.js} +1 -1
- package/dist/{addressSearch-DOFI7lwy.esm.js → addressSearch-C26OZIx0.esm.js} +4 -4
- package/dist/antifraud.d.ts +1 -1
- package/dist/antifraud.esm.js +4 -37
- package/dist/antifraudStateMachine-B74mO8vr.esm.js +39 -0
- package/dist/authentication.d.ts +11 -11
- package/dist/authentication.esm.js +22 -19
- package/dist/authenticationManager-BBQHippG.esm.js +67 -0
- package/dist/{authenticationManager-C2mk36yK.d.ts → authenticationManager-DOTo1EYF.d.ts} +2 -2
- package/dist/{authenticationManager-C7dL_avf.esm.js → authenticationStateMachine-DCJ0ArAt.esm.js} +7 -67
- package/dist/{backCameraStream-tabTmwDS.esm.js → backCameraStream-D9g2wyil.esm.js} +3 -3
- package/dist/camera.d.ts +1 -1
- package/dist/camera.esm.js +3 -3
- package/dist/consent.d.ts +55 -55
- package/dist/consent.esm.js +4 -149
- package/dist/consentStateMachine-DIdJXJW0.esm.js +151 -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 +5 -5
- package/dist/curp-validation.esm.js +4 -417
- package/dist/curpValidationStateMachine-Dp5WB6__.esm.js +419 -0
- package/dist/{deepsightLoader-Cj6SyUQ-.esm.js → deepsightLoader-CaULV07H.esm.js} +10 -10
- package/dist/{deepsightService-ByD6uIs7.d.ts → deepsightService-S-tU77m-.d.ts} +2 -2
- package/dist/{deepsightService-BjgXl5hs.esm.js → deepsightService-rPGLH8Xp.esm.js} +5 -5
- package/dist/device.esm.js +3 -3
- package/dist/document-capture.d.ts +80 -78
- package/dist/document-capture.esm.js +8 -403
- package/dist/document-upload.d.ts +53 -53
- package/dist/document-upload.esm.js +7 -7
- package/dist/documentCaptureStateMachine-ByYOCKz5.esm.js +403 -0
- package/dist/ekyb.d.ts +3 -3
- package/dist/ekyb.esm.js +10 -655
- package/dist/ekybStateMachine-DRku_YmR.esm.js +653 -0
- package/dist/ekyc.d.ts +3 -3
- package/dist/ekyc.esm.js +6 -10614
- package/dist/ekycStateMachine-CSWaaWVl.esm.js +10615 -0
- package/dist/email.d.ts +3 -3
- package/dist/email.esm.js +6 -5
- package/dist/{emailManager-CU_hzrsl.d.ts → emailManager-D6CHM2QO.d.ts} +4 -3
- package/dist/emailManager-DByjyeY8.esm.js +238 -0
- package/dist/{emailManager-_9R4vm6g.esm.js → emailStateMachine-BoIkeCw5.esm.js} +6 -239
- package/dist/{events-DlHrOIRc.esm.js → events-W91zLpx4.esm.js} +5 -1
- package/dist/events.esm.js +2 -2
- package/dist/extensibility.d.ts +15 -15
- package/dist/extensibility.esm.js +33 -26
- package/dist/face-match.d.ts +7 -6
- package/dist/face-match.esm.js +8 -129
- package/dist/faceCaptureManagerFactory-Bspg2Tyf.esm.js +117 -0
- package/dist/{faceCaptureManagerFactory-Da_-ohdg.d.ts → faceCaptureManagerFactory-P2yy30KU.d.ts} +8 -8
- package/dist/{faceCaptureSetup-CaVWkjvE.esm.js → faceCaptureSetup-CQevz86q.esm.js} +5 -119
- package/dist/faceMatchStateMachine-CLterVEC.esm.js +127 -0
- package/dist/flow.d.ts +8 -13
- package/dist/flow.esm.js +10 -29
- package/dist/{flowCompletionService-B5JemmC6.esm.js → flowCompletionService-DZSDUXus.esm.js} +2 -2
- package/dist/{flowServices-p22wrYPf.esm.js → flowServices-YATk0fgY.esm.js} +3 -3
- package/dist/geolocation.d.ts +7 -6
- package/dist/geolocation.esm.js +7 -105
- package/dist/geolocationStateMachine-CRRUCl9K.esm.js +105 -0
- package/dist/{getDeviceClass-DEzz4cmY.esm.js → getDeviceClass-DBF-ExLR.esm.js} +1 -1
- package/dist/government-validation.d.ts +2 -2
- package/dist/government-validation.esm.js +5 -269
- package/dist/governmentValidationStateMachine-C_iPX9VE.esm.js +271 -0
- package/dist/http.esm.js +1 -1
- package/dist/id.d.ts +10 -10
- package/dist/id.esm.js +22 -20
- package/dist/idCaptureManager-CJfatzuY.esm.js +335 -0
- package/dist/{idCaptureManager-CV08v1e3.d.ts → idCaptureManager-CbZvdr9y.d.ts} +7 -7
- package/dist/{idCaptureManager-dyZzKv8L.esm.js → idCaptureStateMachine-gf-Q9piu.esm.js} +17 -346
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +8 -8
- package/dist/{lib-Bavz2qmt.esm.js → lib-BzVJ-zxG.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +55 -55
- package/dist/mandatory-consent.esm.js +4 -124
- package/dist/mandatoryConsentStateMachine-BZNBJ1fK.esm.js +126 -0
- package/dist/{openviduLazy-vhrVZCr_.esm.js → openviduLazy-CLg_-u0m.esm.js} +2 -2
- package/dist/openviduLazy-rFXBtZVZ.esm.js +3 -0
- package/dist/{permissionServices-Cskq32Yd.esm.js → permissionServices-Cisv73eQ.esm.js} +2 -2
- package/dist/phone.d.ts +3 -3
- package/dist/phone.esm.js +6 -5
- package/dist/phoneManager-DhC4obPF.esm.js +258 -0
- package/dist/{phoneManager-ulJuGvJ8.d.ts → phoneManager-Zwr-qCnC.d.ts} +2 -2
- package/dist/{phoneManager-DerdUfd4.esm.js → phoneStateMachine-Cc_w4tC0.esm.js} +5 -258
- package/dist/{recordingService-483wQ6kR.esm.js → recordingService-CCfxUY7-.esm.js} +14 -68
- package/dist/redirect-to-mobile.d.ts +2 -2
- package/dist/redirect-to-mobile.esm.js +5 -247
- package/dist/redirectToMobileStateMachine-vOe27Ufw.esm.js +249 -0
- package/dist/runChildModule-DVC4JEjp.esm.js +27 -0
- package/dist/selfie.d.ts +11 -11
- package/dist/selfie.esm.js +22 -19
- package/dist/selfieManager-CorEST5h.esm.js +60 -0
- package/dist/{selfieManager-DCRP7X75.d.ts → selfieManager-DNwfxieF.d.ts} +2 -2
- package/dist/selfieStateMachine-3b19ON1z.esm.js +56 -0
- package/dist/{session-CUh77zj3.esm.js → session-B_rKSRql.esm.js} +4 -4
- package/dist/session.d.ts +1 -1
- package/dist/session.esm.js +6 -6
- package/dist/{setup-DpHakxsC.d.ts → setup-BYqwVLiv.d.ts} +1 -1
- package/dist/{setup-XpxfZgKn.esm.js → setup-DLvhsDol.esm.js} +6 -5
- package/dist/signature.d.ts +4 -3
- package/dist/signature.esm.js +6 -189
- package/dist/signatureStateMachine-CU92zCXU.esm.js +189 -0
- package/dist/{stats-DHDoqSBV.esm.js → stats-gFD2351t.esm.js} +1 -1
- package/dist/stats.esm.js +2 -2
- package/dist/{types-2OPf1pyv.d.ts → types-CYJ0Ish6.d.ts} +1 -1
- package/dist/types-CjsEZRcz.d.ts +35 -0
- package/dist/{types-CVJVQ7fp.d.ts → types-DU8HmI5U.d.ts} +1 -1
- package/dist/wasm.d.ts +2 -2
- package/dist/wasm.esm.js +8 -8
- package/dist/workflow.d.ts +813 -0
- package/dist/workflow.esm.js +600 -0
- package/package.json +7 -3
- package/dist/openviduLazy-BIPHozOu.esm.js +0 -3
- package/dist/selfieManager-DeOcNel4.esm.js +0 -110
- /package/dist/{Actor-Ba71-_30.d.ts → Actor-DbWH1K6E.d.ts} +0 -0
- /package/dist/{BaseWasmProvider-D-s_6M5H.esm.js → BaseWasmProvider-DoYDYH1z.esm.js} +0 -0
- /package/dist/{BrowserEnvironmentProvider-DaHeLJQw.esm.js → BrowserEnvironmentProvider-BtKLxTx4.esm.js} +0 -0
- /package/dist/{BrowserTimerProvider-BhD2MlHg.esm.js → BrowserTimerProvider-v7bpbrAk.esm.js} +0 -0
- /package/dist/{ITimerCapability-oixwa6nj.esm.js → ITimerCapability-BZO_FsCo.esm.js} +0 -0
- /package/dist/{Manager-BN2g_I8W.d.ts → Manager-DcPMRgTm.d.ts} +0 -0
- /package/dist/{MotionSensorProvider-CodM3e0E.esm.js → MotionSensorProvider-D90R4qwV.esm.js} +0 -0
- /package/dist/{StateMachine-BoJsfMvg.d.ts → StateMachine-BBuIgsHT.d.ts} +0 -0
- /package/dist/{api-DzpnV6O7.esm.js → api-aa9Mx20l.esm.js} +0 -0
- /package/dist/{browserSimulation-B4ubb2OL.esm.js → browserSimulation-DFqGKQAD.esm.js} +0 -0
- /package/dist/{camera-1eeGnAaL.d.ts → camera-DATT31my.d.ts} +0 -0
- /package/dist/{camera-DmkFpf5N.esm.js → camera-DpPQS_-5.esm.js} +0 -0
- /package/dist/{chunk-DsxENsBR.esm.js → chunk-YGHKo4MY.esm.js} +0 -0
- /package/dist/{displayErrors-BZLX7idb.d.ts → displayErrors-xrg0ejaS.d.ts} +0 -0
- /package/dist/{flowCompletionService-D-3YCHyO.d.ts → flowCompletionService-gxt5reFV.d.ts} +0 -0
- /package/dist/{getBrowser-Dtyt9J_h.esm.js → getBrowser-DCcD7H-M.esm.js} +0 -0
- /package/dist/{platform-Dv7a2fv-.esm.js → platform-DctkySJU.esm.js} +0 -0
- /package/dist/{types-D_QfFKxT.d.ts → types-CIjb0FKu.d.ts} +0 -0
- /package/dist/{warmup-CIj_wEV_.d.ts → warmup-Ckb1hN85.d.ts} +0 -0
- /package/dist/{xstate.esm-Bv55-lJ4.esm.js → xstate.esm-B7FPE6br.esm.js} +0 -0
|
@@ -1,407 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { a as createActor,
|
|
4
|
-
import
|
|
5
|
-
import "./platform-
|
|
6
|
-
import "./ITimerCapability-
|
|
7
|
-
import
|
|
1
|
+
import "./api-aa9Mx20l.esm.js";
|
|
2
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-W91zLpx4.esm.js";
|
|
3
|
+
import { a as createActor, o as createManager } from "./xstate.esm-B7FPE6br.esm.js";
|
|
4
|
+
import "./camera-DpPQS_-5.esm.js";
|
|
5
|
+
import "./platform-DctkySJU.esm.js";
|
|
6
|
+
import "./ITimerCapability-BZO_FsCo.esm.js";
|
|
7
|
+
import "./backCameraStream-D9g2wyil.esm.js";
|
|
8
|
+
import { n as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-ByYOCKz5.esm.js";
|
|
8
9
|
|
|
9
|
-
//#region src/modules/document-capture/types.ts
|
|
10
|
-
const PROCESSING_TYPE_MAP = {
|
|
11
|
-
processV5CLogbook: "v5cMultiPageLogbook",
|
|
12
|
-
processCirculationCard: "circulationCard",
|
|
13
|
-
processFinanceSettlement: "financeSettlement",
|
|
14
|
-
processCarInvoice: "carInvoice",
|
|
15
|
-
asyncProcessCarInvoice: "carInvoice",
|
|
16
|
-
asyncProcessCirculationCard: "circulationCard",
|
|
17
|
-
capture: "addressStatement"
|
|
18
|
-
};
|
|
19
|
-
const MULTI_PAGE_TYPES = [
|
|
20
|
-
"v5cMultiPageLogbook",
|
|
21
|
-
"circulationCard",
|
|
22
|
-
"financeSettlement"
|
|
23
|
-
];
|
|
24
|
-
const DEFAULT_MAX_FILE_SIZE = 10 * 1024 * 1024;
|
|
25
|
-
const DEFAULT_CAPTURE_ATTEMPTS = 3;
|
|
26
|
-
const OTHER_DOCUMENT_TYPES = new Set([
|
|
27
|
-
"otherDocument1",
|
|
28
|
-
"otherDocument2",
|
|
29
|
-
"otherDocument3"
|
|
30
|
-
]);
|
|
31
|
-
const DOCUMENT_CAPTURE_ERROR_CODES = {
|
|
32
|
-
FILE_TOO_LARGE: "FILE_TOO_LARGE",
|
|
33
|
-
UPLOAD_FAILED: "UPLOAD_FAILED"
|
|
34
|
-
};
|
|
35
|
-
const DOCUMENT_CAPTURE_FINALIZE_ERROR_CODES = { UNEXPECTED_ERROR: "UNEXPECTED_ERROR" };
|
|
36
|
-
|
|
37
|
-
//#endregion
|
|
38
|
-
//#region src/modules/document-capture/documentCaptureUploadService.ts
|
|
39
|
-
function isMultiPageDocumentType(processingType) {
|
|
40
|
-
return MULTI_PAGE_TYPES.includes(processingType);
|
|
41
|
-
}
|
|
42
|
-
function normalizeProcessingType(processingType) {
|
|
43
|
-
return PROCESSING_TYPE_MAP[processingType] ?? processingType;
|
|
44
|
-
}
|
|
45
|
-
function buildUrl(baseUrl, type, format) {
|
|
46
|
-
return `${baseUrl}?type=${encodeURIComponent(type)}&format=${format}`;
|
|
47
|
-
}
|
|
48
|
-
function resolveUploadUrl(processingType, fileFormat) {
|
|
49
|
-
const format = fileFormat === "application/pdf" ? "pdf" : "image";
|
|
50
|
-
const resolvedType = normalizeProcessingType(processingType);
|
|
51
|
-
if (isMultiPageDocumentType(resolvedType)) return buildUrl(endpoints.documentV3, resolvedType, format);
|
|
52
|
-
if (resolvedType === "carInvoice") return buildUrl(endpoints.cfdi, resolvedType, format);
|
|
53
|
-
if (OTHER_DOCUMENT_TYPES.has(resolvedType)) return buildUrl(endpoints.addDocument, resolvedType, format);
|
|
54
|
-
if (resolvedType === "addressStatement" || !resolvedType) return buildUrl(endpoints.addressStatement, resolvedType || "addressStatement", format);
|
|
55
|
-
return buildUrl(endpoints.addressStatement, processingType, format);
|
|
56
|
-
}
|
|
57
|
-
async function uploadDocumentCapture({ base64Image, processingType, fileFormat, onProgress, signal }) {
|
|
58
|
-
const url = resolveUploadUrl(processingType, fileFormat);
|
|
59
|
-
const rawBase64 = base64Image.includes(",") ? base64Image.split(",")[1] : base64Image;
|
|
60
|
-
const response = await api.post(url, { base64Image: rawBase64 }, {
|
|
61
|
-
signal,
|
|
62
|
-
onUploadProgress: onProgress
|
|
63
|
-
});
|
|
64
|
-
if (!response.ok) throw new Error(`Document upload failed: ${response.status}`);
|
|
65
|
-
if (!(response.data.success || response.data.status === "SUCCESS" || response.data.status === "ADD_NEXT_PAGE" || response.data.status === "OPTIONAL_PAGE_CAPTURE")) throw new Error("Document upload rejected by server");
|
|
66
|
-
return response.data;
|
|
67
|
-
}
|
|
68
|
-
function resolveMultiPageDocumentType(processingType) {
|
|
69
|
-
const resolvedType = normalizeProcessingType(processingType);
|
|
70
|
-
return isMultiPageDocumentType(resolvedType) ? resolvedType : null;
|
|
71
|
-
}
|
|
72
|
-
async function finalizeDocument({ processingType, signal }) {
|
|
73
|
-
const type = resolveMultiPageDocumentType(processingType);
|
|
74
|
-
if (!type) throw new Error(`finalizeDocument only supports multi-page types (${MULTI_PAGE_TYPES.join(", ")})`);
|
|
75
|
-
const response = await api.post(endpoints.finalizeDocument, { type }, { signal });
|
|
76
|
-
if (!response.ok) throw new Error(`Document finalize failed: ${response.status}`);
|
|
77
|
-
const data = response.data;
|
|
78
|
-
if (!data) throw new Error("Document finalize rejected by server");
|
|
79
|
-
if (!(data.success || data.status === "SUCCESS")) {
|
|
80
|
-
const serverStatus = typeof data.status === "string" ? data.status : "unknown";
|
|
81
|
-
throw new Error(`Document finalize rejected by server (status: ${serverStatus})`);
|
|
82
|
-
}
|
|
83
|
-
return data;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
//#endregion
|
|
87
|
-
//#region src/modules/document-capture/documentCaptureStateMachine.ts
|
|
88
|
-
const documentCaptureMachine = setup({
|
|
89
|
-
types: {
|
|
90
|
-
context: {},
|
|
91
|
-
events: {},
|
|
92
|
-
input: {}
|
|
93
|
-
},
|
|
94
|
-
actors: {
|
|
95
|
-
initCamera: fromPromise(async () => {
|
|
96
|
-
const { stream } = await getBackCameraStream(void 0);
|
|
97
|
-
return stream;
|
|
98
|
-
}),
|
|
99
|
-
uploadDocument: fromPromise(async ({ input, signal }) => {
|
|
100
|
-
return uploadDocumentCapture({
|
|
101
|
-
base64Image: input.capturedDocument.imageBase64,
|
|
102
|
-
processingType: input.processingType,
|
|
103
|
-
fileFormat: input.capturedDocument.fileType,
|
|
104
|
-
onProgress: input.onProgress,
|
|
105
|
-
signal
|
|
106
|
-
});
|
|
107
|
-
}),
|
|
108
|
-
finalizeDocumentRequest: fromPromise(async ({ input, signal }) => {
|
|
109
|
-
return finalizeDocument({
|
|
110
|
-
processingType: input.processingType,
|
|
111
|
-
signal
|
|
112
|
-
});
|
|
113
|
-
})
|
|
114
|
-
},
|
|
115
|
-
actions: {
|
|
116
|
-
setStream: assign(({ event }) => ({ stream: event.output })),
|
|
117
|
-
setCapturedDocument: assign(({ event }) => {
|
|
118
|
-
const e = event;
|
|
119
|
-
return {
|
|
120
|
-
capturedDocument: {
|
|
121
|
-
imageBase64: e.imageBase64,
|
|
122
|
-
file: e.file,
|
|
123
|
-
fileType: e.fileType
|
|
124
|
-
},
|
|
125
|
-
error: void 0
|
|
126
|
-
};
|
|
127
|
-
}),
|
|
128
|
-
setFileTooLargeError: assign({ error: () => DOCUMENT_CAPTURE_ERROR_CODES.FILE_TOO_LARGE }),
|
|
129
|
-
setProgress: assign(({ event }) => ({ progress: event.progress })),
|
|
130
|
-
setUploadError: assign({ error: () => DOCUMENT_CAPTURE_ERROR_CODES.UPLOAD_FAILED }),
|
|
131
|
-
setFinalizeError: assign({ error: () => DOCUMENT_CAPTURE_FINALIZE_ERROR_CODES.UNEXPECTED_ERROR }),
|
|
132
|
-
decrementAttemptsRemaining: assign(({ context }) => ({ attemptsRemaining: context.attemptsRemaining - 1 })),
|
|
133
|
-
setCaptureMethodFile: assign({ captureMethod: () => "file" }),
|
|
134
|
-
setCaptureMethodCamera: assign({ captureMethod: () => "camera" }),
|
|
135
|
-
setCaptureMethodGallery: assign({ captureMethod: () => "gallery" }),
|
|
136
|
-
clearCapturedDocument: assign({
|
|
137
|
-
capturedDocument: () => void 0,
|
|
138
|
-
captureMethod: () => void 0,
|
|
139
|
-
progress: () => 0,
|
|
140
|
-
error: () => void 0
|
|
141
|
-
}),
|
|
142
|
-
clearCapturedDocumentGalleryRetake: assign({
|
|
143
|
-
capturedDocument: () => void 0,
|
|
144
|
-
progress: () => 0,
|
|
145
|
-
error: () => void 0
|
|
146
|
-
}),
|
|
147
|
-
setNextPageType: assign(({ context, event }) => {
|
|
148
|
-
const { status } = event.output;
|
|
149
|
-
if (context.captureMethod === "file" && context.capturedDocument?.fileType === "application/pdf") return { nextPageType: "none" };
|
|
150
|
-
return { nextPageType: status === "ADD_NEXT_PAGE" ? "required" : status === "OPTIONAL_PAGE_CAPTURE" ? "optional" : "none" };
|
|
151
|
-
}),
|
|
152
|
-
clearForNextPage: assign(({ context }) => ({
|
|
153
|
-
capturedDocument: void 0,
|
|
154
|
-
progress: 0,
|
|
155
|
-
error: void 0,
|
|
156
|
-
pageNumber: context.pageNumber + 1,
|
|
157
|
-
nextPageType: "none",
|
|
158
|
-
captureMethod: void 0
|
|
159
|
-
})),
|
|
160
|
-
clearError: assign({ error: () => void 0 }),
|
|
161
|
-
resetProgress: assign({ progress: () => 0 }),
|
|
162
|
-
stopStream: assign(({ context }) => {
|
|
163
|
-
if (context.stream) stopCameraStream(context.stream);
|
|
164
|
-
return { stream: void 0 };
|
|
165
|
-
})
|
|
166
|
-
},
|
|
167
|
-
guards: {
|
|
168
|
-
allowSkip: ({ context }) => context.config.allowSkipDocumentCapture && context.pageNumber === 1,
|
|
169
|
-
fileSizeOk: ({ context, event }) => {
|
|
170
|
-
return event.file.size <= context.config.maxFileSize;
|
|
171
|
-
},
|
|
172
|
-
canRetryCamera: ({ context }) => context.attemptsRemaining > 0 && context.captureMethod === "camera",
|
|
173
|
-
canRetryFile: ({ context }) => context.attemptsRemaining > 0 && context.captureMethod !== "camera",
|
|
174
|
-
canRetryNextDocumentCapture: ({ context }) => context.attemptsRemaining > 0 && context.nextPageType === "optional",
|
|
175
|
-
attemptsExhausted: ({ context }) => context.attemptsRemaining <= 0,
|
|
176
|
-
isCameraMode: ({ context }) => context.config.captureMode === "camera",
|
|
177
|
-
isCaptureMethodCamera: ({ context }) => context.captureMethod === "camera",
|
|
178
|
-
isCaptureMethodGallery: ({ context }) => context.captureMethod === "gallery",
|
|
179
|
-
isCaptureMethodFile: ({ context }) => context.captureMethod === "file",
|
|
180
|
-
isNextPageOptional: ({ context }) => context.nextPageType === "optional",
|
|
181
|
-
isNextPageRequired: ({ context }) => context.nextPageType === "required",
|
|
182
|
-
canFinalizeOptionalPages: ({ context }) => context.nextPageType === "optional" && resolveMultiPageDocumentType(context.config.processingType) !== null,
|
|
183
|
-
fileSizeOkForGallery: ({ context, event }) => {
|
|
184
|
-
return event.file.size <= context.config.maxFileSize && context.captureMethod === "gallery";
|
|
185
|
-
},
|
|
186
|
-
fileSizeOkForNonGallery: ({ context, event }) => {
|
|
187
|
-
return event.file.size <= context.config.maxFileSize && context.captureMethod !== "gallery";
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}).createMachine({
|
|
191
|
-
id: "documentCapture",
|
|
192
|
-
initial: "tutorial",
|
|
193
|
-
context: ({ input }) => {
|
|
194
|
-
const { processingType = "addressStatement", captureMode = "camera", allowSkipDocumentCapture = false, captureAttempts = DEFAULT_CAPTURE_ATTEMPTS, sendBase64 = false, maxFileSize = DEFAULT_MAX_FILE_SIZE, title, text, step2Title, step2Text } = input.config;
|
|
195
|
-
return {
|
|
196
|
-
config: {
|
|
197
|
-
processingType,
|
|
198
|
-
captureMode,
|
|
199
|
-
allowSkipDocumentCapture,
|
|
200
|
-
captureAttempts,
|
|
201
|
-
sendBase64,
|
|
202
|
-
maxFileSize,
|
|
203
|
-
title,
|
|
204
|
-
text,
|
|
205
|
-
step2Title,
|
|
206
|
-
step2Text
|
|
207
|
-
},
|
|
208
|
-
stream: void 0,
|
|
209
|
-
capturedDocument: void 0,
|
|
210
|
-
captureMethod: void 0,
|
|
211
|
-
progress: 0,
|
|
212
|
-
error: void 0,
|
|
213
|
-
attemptsRemaining: captureAttempts,
|
|
214
|
-
pageNumber: 1,
|
|
215
|
-
nextPageType: "none"
|
|
216
|
-
};
|
|
217
|
-
},
|
|
218
|
-
states: {
|
|
219
|
-
tutorial: { on: {
|
|
220
|
-
CAPTURE: [{
|
|
221
|
-
target: "initCamera",
|
|
222
|
-
guard: "isCameraMode"
|
|
223
|
-
}, { target: "capturing" }],
|
|
224
|
-
FILE_SELECTED: [{
|
|
225
|
-
target: "preview",
|
|
226
|
-
guard: "fileSizeOk",
|
|
227
|
-
actions: ["setCapturedDocument", "setCaptureMethodFile"]
|
|
228
|
-
}, {
|
|
229
|
-
target: "tutorial",
|
|
230
|
-
actions: "setFileTooLargeError"
|
|
231
|
-
}],
|
|
232
|
-
SKIP: {
|
|
233
|
-
target: "finished",
|
|
234
|
-
guard: "allowSkip"
|
|
235
|
-
},
|
|
236
|
-
CLOSE: { target: "closed" }
|
|
237
|
-
} },
|
|
238
|
-
initCamera: {
|
|
239
|
-
invoke: {
|
|
240
|
-
id: "initCamera",
|
|
241
|
-
src: "initCamera",
|
|
242
|
-
input: void 0,
|
|
243
|
-
onDone: {
|
|
244
|
-
target: "capturing",
|
|
245
|
-
actions: "setStream"
|
|
246
|
-
},
|
|
247
|
-
onError: {
|
|
248
|
-
target: "failure",
|
|
249
|
-
actions: "setUploadError"
|
|
250
|
-
}
|
|
251
|
-
},
|
|
252
|
-
on: { CLOSE: { target: "closed" } }
|
|
253
|
-
},
|
|
254
|
-
capturing: { on: {
|
|
255
|
-
FILE_SELECTED: [
|
|
256
|
-
{
|
|
257
|
-
target: "preview",
|
|
258
|
-
guard: "fileSizeOkForGallery",
|
|
259
|
-
actions: "setCapturedDocument"
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
target: "preview",
|
|
263
|
-
guard: "fileSizeOkForNonGallery",
|
|
264
|
-
actions: ["setCapturedDocument", "setCaptureMethodCamera"]
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
target: "capturing",
|
|
268
|
-
actions: "setFileTooLargeError"
|
|
269
|
-
}
|
|
270
|
-
],
|
|
271
|
-
CLOSE: {
|
|
272
|
-
target: "closed",
|
|
273
|
-
actions: "stopStream"
|
|
274
|
-
}
|
|
275
|
-
} },
|
|
276
|
-
preview: { on: {
|
|
277
|
-
ACCEPT: {
|
|
278
|
-
target: "uploading",
|
|
279
|
-
actions: "resetProgress"
|
|
280
|
-
},
|
|
281
|
-
RETAKE: [
|
|
282
|
-
{
|
|
283
|
-
target: "tutorial",
|
|
284
|
-
guard: "isCaptureMethodFile",
|
|
285
|
-
actions: "clearCapturedDocument"
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
target: "capturing",
|
|
289
|
-
guard: "isCaptureMethodGallery",
|
|
290
|
-
actions: "clearCapturedDocumentGalleryRetake"
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
target: "capturing",
|
|
294
|
-
actions: "clearCapturedDocument"
|
|
295
|
-
}
|
|
296
|
-
],
|
|
297
|
-
CLOSE: {
|
|
298
|
-
target: "closed",
|
|
299
|
-
actions: "stopStream"
|
|
300
|
-
}
|
|
301
|
-
} },
|
|
302
|
-
uploading: {
|
|
303
|
-
invoke: {
|
|
304
|
-
id: "uploadDocument",
|
|
305
|
-
src: "uploadDocument",
|
|
306
|
-
input: ({ context, self }) => {
|
|
307
|
-
if (!context.capturedDocument) throw new Error("No captured document to upload");
|
|
308
|
-
return {
|
|
309
|
-
capturedDocument: context.capturedDocument,
|
|
310
|
-
processingType: context.config.processingType,
|
|
311
|
-
onProgress: (progress) => {
|
|
312
|
-
self.send({
|
|
313
|
-
type: "UPLOAD_PROGRESS",
|
|
314
|
-
progress
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
};
|
|
318
|
-
},
|
|
319
|
-
onDone: {
|
|
320
|
-
target: "success",
|
|
321
|
-
actions: ["setNextPageType", "stopStream"]
|
|
322
|
-
},
|
|
323
|
-
onError: {
|
|
324
|
-
target: "failure",
|
|
325
|
-
actions: [
|
|
326
|
-
"setUploadError",
|
|
327
|
-
"decrementAttemptsRemaining",
|
|
328
|
-
"stopStream"
|
|
329
|
-
]
|
|
330
|
-
}
|
|
331
|
-
},
|
|
332
|
-
on: { UPLOAD_PROGRESS: { actions: "setProgress" } }
|
|
333
|
-
},
|
|
334
|
-
success: { on: {
|
|
335
|
-
CONTINUE: [
|
|
336
|
-
{
|
|
337
|
-
target: "nextPage",
|
|
338
|
-
guard: "isNextPageOptional"
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
target: "nextPage",
|
|
342
|
-
guard: "isNextPageRequired"
|
|
343
|
-
},
|
|
344
|
-
{ target: "finished" }
|
|
345
|
-
],
|
|
346
|
-
CLOSE: { target: "closed" }
|
|
347
|
-
} },
|
|
348
|
-
nextPage: { on: {
|
|
349
|
-
NEXT_PAGE_CAMERA: {
|
|
350
|
-
target: "initCamera",
|
|
351
|
-
actions: ["clearForNextPage", "setCaptureMethodCamera"]
|
|
352
|
-
},
|
|
353
|
-
NEXT_PAGE_PHOTO_LIBRARY: {
|
|
354
|
-
target: "capturing",
|
|
355
|
-
actions: ["clearForNextPage", "setCaptureMethodGallery"]
|
|
356
|
-
},
|
|
357
|
-
ALL_PAGES_CAPTURED: [{
|
|
358
|
-
target: "finalizing",
|
|
359
|
-
guard: "canFinalizeOptionalPages"
|
|
360
|
-
}, { target: "finished" }],
|
|
361
|
-
CLOSE: { target: "closed" }
|
|
362
|
-
} },
|
|
363
|
-
finalizing: { invoke: {
|
|
364
|
-
id: "finalizeDocument",
|
|
365
|
-
src: "finalizeDocumentRequest",
|
|
366
|
-
input: ({ context }) => ({ processingType: context.config.processingType }),
|
|
367
|
-
onDone: { target: "finished" },
|
|
368
|
-
onError: {
|
|
369
|
-
target: "failure",
|
|
370
|
-
actions: ["setFinalizeError", "decrementAttemptsRemaining"]
|
|
371
|
-
}
|
|
372
|
-
} },
|
|
373
|
-
failure: {
|
|
374
|
-
on: {
|
|
375
|
-
RETRY: [
|
|
376
|
-
{
|
|
377
|
-
target: "nextPage",
|
|
378
|
-
guard: "canRetryNextDocumentCapture",
|
|
379
|
-
actions: ["clearError", "clearCapturedDocument"]
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
target: "initCamera",
|
|
383
|
-
guard: "canRetryCamera",
|
|
384
|
-
actions: ["clearError", "clearCapturedDocument"]
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
target: "tutorial",
|
|
388
|
-
guard: "canRetryFile",
|
|
389
|
-
actions: ["clearError", "clearCapturedDocument"]
|
|
390
|
-
}
|
|
391
|
-
],
|
|
392
|
-
CLOSE: { target: "closed" }
|
|
393
|
-
},
|
|
394
|
-
after: { 3e3: {
|
|
395
|
-
target: "finished",
|
|
396
|
-
guard: "attemptsExhausted"
|
|
397
|
-
} }
|
|
398
|
-
},
|
|
399
|
-
finished: { type: "final" },
|
|
400
|
-
closed: { type: "final" }
|
|
401
|
-
}
|
|
402
|
-
});
|
|
403
|
-
|
|
404
|
-
//#endregion
|
|
405
10
|
//#region src/modules/document-capture/documentCaptureActor.ts
|
|
406
11
|
function createDocumentCaptureActor(options) {
|
|
407
12
|
return createActor(documentCaptureMachine, { input: { config: options.config } }).start();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as Manager } from "./Manager-
|
|
2
|
-
import "./Actor-
|
|
3
|
-
import "./camera-
|
|
4
|
-
import { n as DocumentUploadContext, r as DocumentUploadInput, t as DocumentUploadConfig } from "./types-
|
|
5
|
-
import * as
|
|
1
|
+
import { t as Manager } from "./Manager-DcPMRgTm.js";
|
|
2
|
+
import "./Actor-DbWH1K6E.js";
|
|
3
|
+
import "./camera-DATT31my.js";
|
|
4
|
+
import { n as DocumentUploadContext, r as DocumentUploadInput, t as DocumentUploadConfig } from "./types-CYJ0Ish6.js";
|
|
5
|
+
import * as xstate0 from "xstate";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/document-upload/documentUploadStateMachine.d.ts
|
|
8
|
-
declare const documentUploadMachine:
|
|
8
|
+
declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext, {
|
|
9
9
|
type: "START";
|
|
10
10
|
} | {
|
|
11
11
|
type: "CAPTURE";
|
|
@@ -18,52 +18,52 @@ declare const documentUploadMachine: xstate529.StateMachine<DocumentUploadContex
|
|
|
18
18
|
} | {
|
|
19
19
|
type: "CLOSE";
|
|
20
20
|
}, {
|
|
21
|
-
[x: string]:
|
|
21
|
+
[x: string]: xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>> | xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<void, {
|
|
22
22
|
imageBase64: string;
|
|
23
23
|
documentType: string;
|
|
24
24
|
onProgress: (progress: number) => void;
|
|
25
|
-
},
|
|
26
|
-
},
|
|
25
|
+
}, xstate0.EventObject>> | undefined;
|
|
26
|
+
}, xstate0.Values<{
|
|
27
27
|
initCamera: {
|
|
28
28
|
src: "initCamera";
|
|
29
|
-
logic:
|
|
29
|
+
logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
|
|
30
30
|
id: string | undefined;
|
|
31
31
|
};
|
|
32
32
|
uploadDocument: {
|
|
33
33
|
src: "uploadDocument";
|
|
34
|
-
logic:
|
|
34
|
+
logic: xstate0.PromiseActorLogic<void, {
|
|
35
35
|
imageBase64: string;
|
|
36
36
|
documentType: string;
|
|
37
37
|
onProgress: (progress: number) => void;
|
|
38
|
-
},
|
|
38
|
+
}, xstate0.EventObject>;
|
|
39
39
|
id: string | undefined;
|
|
40
40
|
};
|
|
41
|
-
}>,
|
|
42
|
-
setError: {
|
|
43
|
-
type: "setError";
|
|
44
|
-
params: xstate529.NonReducibleUnknown;
|
|
45
|
-
};
|
|
46
|
-
clearError: {
|
|
47
|
-
type: "clearError";
|
|
48
|
-
params: xstate529.NonReducibleUnknown;
|
|
49
|
-
};
|
|
41
|
+
}>, xstate0.Values<{
|
|
50
42
|
setStream: {
|
|
51
43
|
type: "setStream";
|
|
52
|
-
params:
|
|
44
|
+
params: xstate0.NonReducibleUnknown;
|
|
45
|
+
};
|
|
46
|
+
setImageAndClearError: {
|
|
47
|
+
type: "setImageAndClearError";
|
|
48
|
+
params: xstate0.NonReducibleUnknown;
|
|
53
49
|
};
|
|
54
50
|
setProgress: {
|
|
55
51
|
type: "setProgress";
|
|
56
|
-
params:
|
|
52
|
+
params: xstate0.NonReducibleUnknown;
|
|
53
|
+
};
|
|
54
|
+
setError: {
|
|
55
|
+
type: "setError";
|
|
56
|
+
params: xstate0.NonReducibleUnknown;
|
|
57
|
+
};
|
|
58
|
+
clearError: {
|
|
59
|
+
type: "clearError";
|
|
60
|
+
params: xstate0.NonReducibleUnknown;
|
|
57
61
|
};
|
|
58
62
|
stopStream: {
|
|
59
63
|
type: "stopStream";
|
|
60
|
-
params:
|
|
61
|
-
};
|
|
62
|
-
setImageAndClearError: {
|
|
63
|
-
type: "setImageAndClearError";
|
|
64
|
-
params: xstate529.NonReducibleUnknown;
|
|
64
|
+
params: xstate0.NonReducibleUnknown;
|
|
65
65
|
};
|
|
66
|
-
}>, never, never, "error" | "
|
|
66
|
+
}>, never, never, "error" | "initCamera" | "idle" | "capturing" | "closed" | "uploading" | "finished", string, DocumentUploadInput, xstate0.NonReducibleUnknown, xstate0.EventObject, xstate0.MetaObject, {
|
|
67
67
|
readonly id: "documentUpload";
|
|
68
68
|
readonly initial: "idle";
|
|
69
69
|
readonly context: ({
|
|
@@ -72,67 +72,67 @@ declare const documentUploadMachine: xstate529.StateMachine<DocumentUploadContex
|
|
|
72
72
|
spawn: {
|
|
73
73
|
<TSrc extends "initCamera" | "uploadDocument">(logic: TSrc, ...[options]: ({
|
|
74
74
|
src: "initCamera";
|
|
75
|
-
logic:
|
|
75
|
+
logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
|
|
76
76
|
id: string | undefined;
|
|
77
77
|
} extends infer T ? T extends {
|
|
78
78
|
src: "initCamera";
|
|
79
|
-
logic:
|
|
79
|
+
logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
|
|
80
80
|
id: string | undefined;
|
|
81
81
|
} ? T extends {
|
|
82
82
|
src: TSrc;
|
|
83
|
-
} ?
|
|
83
|
+
} ? xstate0.ConditionalRequired<[options?: ({
|
|
84
84
|
id?: T["id"] | undefined;
|
|
85
85
|
systemId?: string;
|
|
86
|
-
input?:
|
|
86
|
+
input?: xstate0.InputFrom<T["logic"]> | undefined;
|
|
87
87
|
syncSnapshot?: boolean;
|
|
88
|
-
} & { [K in
|
|
88
|
+
} & { [K in xstate0.RequiredActorOptions<T>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
89
89
|
src: "uploadDocument";
|
|
90
|
-
logic:
|
|
90
|
+
logic: xstate0.PromiseActorLogic<void, {
|
|
91
91
|
imageBase64: string;
|
|
92
92
|
documentType: string;
|
|
93
93
|
onProgress: (progress: number) => void;
|
|
94
|
-
},
|
|
94
|
+
}, xstate0.EventObject>;
|
|
95
95
|
id: string | undefined;
|
|
96
96
|
} extends infer T_1 ? T_1 extends {
|
|
97
97
|
src: "uploadDocument";
|
|
98
|
-
logic:
|
|
98
|
+
logic: xstate0.PromiseActorLogic<void, {
|
|
99
99
|
imageBase64: string;
|
|
100
100
|
documentType: string;
|
|
101
101
|
onProgress: (progress: number) => void;
|
|
102
|
-
},
|
|
102
|
+
}, xstate0.EventObject>;
|
|
103
103
|
id: string | undefined;
|
|
104
104
|
} ? T_1 extends {
|
|
105
105
|
src: TSrc;
|
|
106
|
-
} ?
|
|
106
|
+
} ? xstate0.ConditionalRequired<[options?: ({
|
|
107
107
|
id?: T_1["id"] | undefined;
|
|
108
108
|
systemId?: string;
|
|
109
|
-
input?:
|
|
109
|
+
input?: xstate0.InputFrom<T_1["logic"]> | undefined;
|
|
110
110
|
syncSnapshot?: boolean;
|
|
111
|
-
} & { [K_1 in
|
|
111
|
+
} & { [K_1 in xstate0.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredActorOptions<T_1>>> : never : never : never)): xstate0.ActorRefFromLogic<xstate0.GetConcreteByKey<xstate0.Values<{
|
|
112
112
|
initCamera: {
|
|
113
113
|
src: "initCamera";
|
|
114
|
-
logic:
|
|
114
|
+
logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
|
|
115
115
|
id: string | undefined;
|
|
116
116
|
};
|
|
117
117
|
uploadDocument: {
|
|
118
118
|
src: "uploadDocument";
|
|
119
|
-
logic:
|
|
119
|
+
logic: xstate0.PromiseActorLogic<void, {
|
|
120
120
|
imageBase64: string;
|
|
121
121
|
documentType: string;
|
|
122
122
|
onProgress: (progress: number) => void;
|
|
123
|
-
},
|
|
123
|
+
}, xstate0.EventObject>;
|
|
124
124
|
id: string | undefined;
|
|
125
125
|
};
|
|
126
126
|
}>, "src", TSrc>["logic"]>;
|
|
127
|
-
<TLogic extends
|
|
127
|
+
<TLogic extends xstate0.AnyActorLogic>(src: TLogic, ...[options]: xstate0.ConditionalRequired<[options?: ({
|
|
128
128
|
id?: never;
|
|
129
129
|
systemId?: string;
|
|
130
|
-
input?:
|
|
130
|
+
input?: xstate0.InputFrom<TLogic> | undefined;
|
|
131
131
|
syncSnapshot?: boolean;
|
|
132
|
-
} & { [K in
|
|
132
|
+
} & { [K in xstate0.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredLogicInput<TLogic>>>): xstate0.ActorRefFromLogic<TLogic>;
|
|
133
133
|
};
|
|
134
134
|
input: DocumentUploadInput;
|
|
135
|
-
self:
|
|
135
|
+
self: xstate0.ActorRef<xstate0.MachineSnapshot<DocumentUploadContext, {
|
|
136
136
|
type: "START";
|
|
137
137
|
} | {
|
|
138
138
|
type: "CAPTURE";
|
|
@@ -144,7 +144,7 @@ declare const documentUploadMachine: xstate529.StateMachine<DocumentUploadContex
|
|
|
144
144
|
type: "RETRY";
|
|
145
145
|
} | {
|
|
146
146
|
type: "CLOSE";
|
|
147
|
-
}, Record<string,
|
|
147
|
+
}, Record<string, xstate0.AnyActorRef | undefined>, xstate0.StateValue, string, unknown, any, any>, {
|
|
148
148
|
type: "START";
|
|
149
149
|
} | {
|
|
150
150
|
type: "CAPTURE";
|
|
@@ -156,7 +156,7 @@ declare const documentUploadMachine: xstate529.StateMachine<DocumentUploadContex
|
|
|
156
156
|
type: "RETRY";
|
|
157
157
|
} | {
|
|
158
158
|
type: "CLOSE";
|
|
159
|
-
},
|
|
159
|
+
}, xstate0.AnyEventObject>;
|
|
160
160
|
}) => {
|
|
161
161
|
config: DocumentUploadConfig;
|
|
162
162
|
stream: undefined;
|
|
@@ -226,7 +226,7 @@ declare const documentUploadMachine: xstate529.StateMachine<DocumentUploadContex
|
|
|
226
226
|
} | {
|
|
227
227
|
type: "CLOSE";
|
|
228
228
|
};
|
|
229
|
-
self:
|
|
229
|
+
self: xstate0.ActorRef<xstate0.MachineSnapshot<DocumentUploadContext, {
|
|
230
230
|
type: "START";
|
|
231
231
|
} | {
|
|
232
232
|
type: "CAPTURE";
|
|
@@ -238,7 +238,7 @@ declare const documentUploadMachine: xstate529.StateMachine<DocumentUploadContex
|
|
|
238
238
|
type: "RETRY";
|
|
239
239
|
} | {
|
|
240
240
|
type: "CLOSE";
|
|
241
|
-
}, Record<string,
|
|
241
|
+
}, Record<string, xstate0.AnyActorRef>, xstate0.StateValue, string, unknown, any, any>, {
|
|
242
242
|
type: "START";
|
|
243
243
|
} | {
|
|
244
244
|
type: "CAPTURE";
|
|
@@ -250,7 +250,7 @@ declare const documentUploadMachine: xstate529.StateMachine<DocumentUploadContex
|
|
|
250
250
|
type: "RETRY";
|
|
251
251
|
} | {
|
|
252
252
|
type: "CLOSE";
|
|
253
|
-
},
|
|
253
|
+
}, xstate0.AnyEventObject>;
|
|
254
254
|
}) => {
|
|
255
255
|
imageBase64: string;
|
|
256
256
|
documentType: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as api } from "./api-
|
|
2
|
-
import { _ as endpoints, n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
3
|
-
import { a as createActor, i as fromPromise, n as assign, o as createManager, t as setup } from "./xstate.esm-
|
|
4
|
-
import { i as stopCameraStream } from "./camera-
|
|
5
|
-
import "./platform-
|
|
6
|
-
import "./ITimerCapability-
|
|
7
|
-
import { t as getBackCameraStream } from "./backCameraStream-
|
|
1
|
+
import { t as api } from "./api-aa9Mx20l.esm.js";
|
|
2
|
+
import { _ as endpoints, n as eventModuleNames, o as createManagerInstrumentation } from "./events-W91zLpx4.esm.js";
|
|
3
|
+
import { a as createActor, i as fromPromise, n as assign, o as createManager, t as setup } from "./xstate.esm-B7FPE6br.esm.js";
|
|
4
|
+
import { i as stopCameraStream } from "./camera-DpPQS_-5.esm.js";
|
|
5
|
+
import "./platform-DctkySJU.esm.js";
|
|
6
|
+
import "./ITimerCapability-BZO_FsCo.esm.js";
|
|
7
|
+
import { t as getBackCameraStream } from "./backCameraStream-D9g2wyil.esm.js";
|
|
8
8
|
|
|
9
9
|
//#region src/modules/document-upload/documentUploadServices.ts
|
|
10
10
|
async function uploadDocument({ imageBase64, documentType, onProgress, signal }) {
|