@incodetech/core 0.0.0-dev-20260928-d449de76 → 0.0.0-dev-20260928-85249f77
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/{BrowserDiagnosticsCryptoProvider-BxLmnzbY.esm.js → BrowserDiagnosticsCryptoProvider-BuzqvbhN.esm.js} +6 -24
- package/dist/{FaceDetectionProvider-77zt0tCn.esm.js → FaceDetectionProvider-CSjiXOo7.esm.js} +7 -7
- package/dist/{MotionSensorProvider-Bti5f6op.esm.js → MotionSensorProvider-1Ul_1GPn.esm.js} +1 -1
- package/dist/ae-signature.esm.js +1 -1
- package/dist/{apiError-CVZFxc4X.esm.js → apiError-DmDlw1pl.esm.js} +1 -1
- package/dist/authentication.d.ts +2 -2
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-D35zv0qP.esm.js → authenticationManager-B9l6NeDe.esm.js} +4 -4
- package/dist/{authenticationManager-B-MR_-Si.d.ts → authenticationManager-DE40FMUU.d.ts} +1 -1
- package/dist/{authenticationStateMachine-DQbw3VYf.esm.js → authenticationStateMachine-BGme0djA.esm.js} +3 -3
- package/dist/camera.esm.js +1 -1
- package/dist/{createCameraCycleOwnership-BjoMVvya.esm.js → createCameraCycleOwnership-P1AtkhRJ.esm.js} +6 -1
- package/dist/{deepsightLoader-ClylxZuC.esm.js → deepsightLoader-BY2NIp7n.esm.js} +6 -6
- package/dist/document-capture.esm.js +2 -2
- package/dist/{documentCaptureManager-7e1RLKhG.esm.js → documentCaptureManager-DRAn04PI.esm.js} +1 -1
- package/dist/{documentCaptureStateMachine-DyJb_vDQ.esm.js → documentCaptureStateMachine-BS9VBtqN.esm.js} +2 -2
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-BnRKBNqF.esm.js → dynamicFormsManager-CTJzsDqC.esm.js} +1 -1
- package/dist/{dynamicFormsStateMachine-DQh2tLEr.esm.js → dynamicFormsStateMachine-8oOTouxq.esm.js} +1 -1
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-BJUHQsVR.esm.js → ekybManager-CKNCVYs7.esm.js} +1 -1
- package/dist/{ekybStateMachine-Fhv6c1JX.esm.js → ekybStateMachine-BDQHv558.esm.js} +1 -1
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-BLdgwGKf.esm.js → electronicSignatureManager-BbgLJk1x.esm.js} +1 -1
- package/dist/extensibility.d.ts +6 -6
- package/dist/extensibility.esm.js +12 -12
- package/dist/{faceCaptureManagerFactory-CAkRa1Vu.esm.js → faceCaptureManagerFactory-DG4z3rkR.esm.js} +3 -3
- package/dist/{faceCaptureManagerFactory-BgbP5N1j.d.ts → faceCaptureManagerFactory-s0Vhw_wP.d.ts} +80 -40
- package/dist/{faceCaptureSetup-BOIbMZWB.esm.js → faceCaptureSetup-GzW2oNiM.esm.js} +261 -58
- package/dist/{feature-management-D-nhq6Q-.esm.js → feature-management-02JHuEhD.esm.js} +1 -1
- package/dist/feature-management.esm.js +1 -1
- package/dist/flow.esm.js +3 -3
- package/dist/{flowCompletionService-CfnSNZpx.esm.js → flowCompletionService-BAg6qc6d.esm.js} +1 -1
- package/dist/{flowServices-kv6AwJVI.esm.js → flowServices-Dc-EUuwB.esm.js} +5 -5
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-FV2ACKQu.esm.js → geolocationManager-v0LZK1kW.esm.js} +1 -1
- package/dist/{geolocationStateMachine-BKJQDQCI.esm.js → geolocationStateMachine-DfdsEj7L.esm.js} +1 -1
- package/dist/id-selfie-flow.esm.js +9 -10
- package/dist/id.d.ts +2 -2
- package/dist/id.esm.js +4 -4
- package/dist/{idCaptureDefaults-rHijHG6W.esm.js → idCaptureDefaults-Ba-m1uO3.esm.js} +3 -3
- package/dist/{idCaptureManager-CxE8iY2e.esm.js → idCaptureManager-Bfrj7DvH.esm.js} +5 -5
- package/dist/{idCaptureManager-BwBffPUe.d.ts → idCaptureManager-DfHdJLmj.d.ts} +23 -5
- package/dist/{idCaptureServices-hjIxL5UQ.esm.js → idCaptureServices-DKeVf0Gu.esm.js} +59 -12
- package/dist/{idCaptureStateMachine-CboEYER9.esm.js → idCaptureStateMachine-BL3MnDOu.esm.js} +221 -76
- package/dist/identity-reuse.d.ts +1 -1
- package/dist/{identityReuseManager-D7EOLZ_p.d.ts → identityReuseManager-D0-4bAeK.d.ts} +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/mandatory-consent.d.ts +1 -1
- package/dist/{mandatoryConsentManager-03Ni34bN.d.ts → mandatoryConsentManager-S94mjtTG.d.ts} +4 -4
- package/dist/{multipartRecordingService-Dw0scizg.esm.js → multipartRecordingService-mwKFTlhR.esm.js} +42 -1
- package/dist/{permissionGuards-DAyjPT2R.esm.js → permissionGuards-DS36X5Hh.esm.js} +1 -1
- package/dist/{permissionServices-DIaG8BlW.esm.js → permissionServices-B9IqVf3c.esm.js} +2 -2
- package/dist/qe-signature.esm.js +1 -1
- package/dist/{runChildModule-CQqEw9sd.esm.js → runChildModule-DQbERvPv.esm.js} +1 -1
- package/dist/{safeStorage-C511Hltw.esm.js → safeStorage-Q_iUpxa8.esm.js} +1 -1
- package/dist/{sdkVersion-BH-4qglw.esm.js → sdkVersion-kGZmwBhf.esm.js} +1 -1
- package/dist/selfie.d.ts +2 -2
- package/dist/selfie.esm.js +7 -7
- package/dist/{selfieManager-DWxNxmjQ.esm.js → selfieManager-B-F-lrAH.esm.js} +4 -4
- package/dist/{selfieManager-oSsnyvBl.d.ts → selfieManager-PVc2k2Oq.d.ts} +1 -1
- package/dist/{selfieStateMachine-Bk9bTMzN.esm.js → selfieStateMachine--KjoErrq.esm.js} +2 -2
- package/dist/{session-kzJNzFd9.esm.js → session-Bb5KuwEu.esm.js} +3 -3
- package/dist/session.esm.js +4 -4
- package/dist/{sessionInitializer-CVH-SfI7.esm.js → sessionInitializer-D-gzxDwN.esm.js} +4 -4
- package/dist/{setup-CHHZ8BBM.d.ts → setup-BdeKbA9K.d.ts} +4 -17
- package/dist/{setup-H1Je4Kt9.esm.js → setup-Cb7Ws1HA.esm.js} +8 -58
- package/dist/{tri-4RsGrIt6.esm.js → tri-xzRLIIMN.esm.js} +0 -10
- package/dist/tri.esm.js +1 -1
- package/dist/{trueSightService-DbgU08hx.esm.js → trueSightService-D8dk4ZID.esm.js} +16 -554
- package/dist/video-selfie.esm.js +5 -5
- package/dist/{videoSelfieCameraWarmer-C9g_e9lx.esm.js → videoSelfieCameraWarmer-CkdLS8NK.esm.js} +5 -5
- package/dist/{warmup-REsua-sF.esm.js → warmup-DLq_t-Zu.esm.js} +5 -0
- package/dist/wasm.d.ts +1 -1
- package/dist/wasm.esm.js +3 -3
- package/dist/{wasmDsFlagSync-Czjlp68o.esm.js → wasmDsFlagSync-DyNj8RY_.esm.js} +1 -1
- package/dist/workflow.esm.js +15 -15
- package/package.json +3 -8
- package/dist/FaceDetectionProvider-Di1DmZu1.d.ts +0 -36
- package/dist/StreamCanvasProcessingSession-CBnbTnOr.esm.js +0 -42
- package/dist/personhood.d.ts +0 -537
- package/dist/personhood.esm.js +0 -1574
- package/dist/types-CfuWgAi-.d.ts +0 -1
package/dist/id.esm.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as eventModuleNames } from "./events-ijlbX_Wx.esm.js";
|
|
2
2
|
import { i as assign, s as createActor } from "./xstate.esm-Bg3FuvIs.esm.js";
|
|
3
3
|
import { n as fromPromise } from "./xstate-actors.esm-Ccyzgxj1.esm.js";
|
|
4
|
-
import { a as isRedirectFlowType, c as createIdCaptureOnlyDeliveryActor, d as renderWallet, f as createDeviceWalletManager, h as resolveWalletPlatform, i as DIGITAL_ID_REGISTRY, l as createIdProtectedCaptureController, n as provideIdProtectedCaptureController, o as resolveDigitalIdImplementation, r as DIGITAL_ID_DOCUMENT_TYPES, s as attachIdProtectedCaptureController, t as idCaptureMachine } from "./idCaptureStateMachine-
|
|
5
|
-
import { n as createIdCaptureActor, r as createIdCaptureManagerFromActor, t as createIdCaptureManager } from "./idCaptureManager-
|
|
6
|
-
import { a as getRealQualityValue, c as
|
|
4
|
+
import { a as isRedirectFlowType, c as createIdCaptureOnlyDeliveryActor, d as renderWallet, f as createDeviceWalletManager, h as resolveWalletPlatform, i as DIGITAL_ID_REGISTRY, l as createIdProtectedCaptureController, n as provideIdProtectedCaptureController, o as resolveDigitalIdImplementation, r as DIGITAL_ID_DOCUMENT_TYPES, s as attachIdProtectedCaptureController, t as idCaptureMachine } from "./idCaptureStateMachine-BL3MnDOu.esm.js";
|
|
5
|
+
import { n as createIdCaptureActor, r as createIdCaptureManagerFromActor, t as createIdCaptureManager } from "./idCaptureManager-Bfrj7DvH.esm.js";
|
|
6
|
+
import { _ as ID_ERROR_CODES, a as getRealQualityValue, b as resolveIdCaptureThresholds, c as pauseRecordingForAttempt, d as resumeRecordingAfterPause, f as startRecordingSession, g as validateUploadResponse, h as uploadIdImage, i as finalizeRecordingSession, l as prepareRecordingForCameraRetry, m as stopStream, n as barcodeToBase64, o as initializeIdCapture, p as stopRecording, r as disposeRecordingSession, s as isSuspendableRecordingSession, t as addBarcode, u as processId } from "./idCaptureServices-DKeVf0Gu.esm.js";
|
|
7
7
|
import { t as invokeOnCaptureCallback } from "./invokeOnCaptureCallback-BjzPjJ_p.esm.js";
|
|
8
8
|
//#region src/modules/id/deviceWallet/deviceWalletErrors.ts
|
|
9
9
|
/**
|
|
@@ -212,4 +212,4 @@ function createIdCaptureOnlyManager(options) {
|
|
|
212
212
|
return createIdCaptureOnlyManagerFromActor(createIdCaptureOnlyActor(options), options.config);
|
|
213
213
|
}
|
|
214
214
|
//#endregion
|
|
215
|
-
export { DEVICE_WALLET_ERROR_KEYS, DIGITAL_ID_DOCUMENT_TYPES, DIGITAL_ID_REGISTRY, ID_ERROR_CODES, addBarcode, barcodeToBase64, createDeviceWalletManager, createIdCaptureActor, createIdCaptureManager, createIdCaptureOnlyActor, createIdCaptureOnlyManager, createIdCaptureOnlyManagerFromActor, disposeRecordingSession, finalizeRecordingSession, getRealQualityValue, idCaptureMachine, idCaptureOnlyMachine, initializeIdCapture, isRedirectFlowType, pauseRecordingForAttempt, prepareRecordingForCameraRetry, processId, renderWallet, resolveDigitalIdImplementation, resolveWalletPlatform, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
|
|
215
|
+
export { DEVICE_WALLET_ERROR_KEYS, DIGITAL_ID_DOCUMENT_TYPES, DIGITAL_ID_REGISTRY, ID_ERROR_CODES, addBarcode, barcodeToBase64, createDeviceWalletManager, createIdCaptureActor, createIdCaptureManager, createIdCaptureOnlyActor, createIdCaptureOnlyManager, createIdCaptureOnlyManagerFromActor, disposeRecordingSession, finalizeRecordingSession, getRealQualityValue, idCaptureMachine, idCaptureOnlyMachine, initializeIdCapture, isRedirectFlowType, isSuspendableRecordingSession, pauseRecordingForAttempt, prepareRecordingForCameraRetry, processId, renderWallet, resolveDigitalIdImplementation, resolveWalletPlatform, resumeRecordingAfterPause, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { b as resolveWasmSource, p as WASM_MODEL_FILES } from "./wasmWebClient-DPPQlS-U.esm.js";
|
|
2
|
-
import {
|
|
3
|
-
import { s as wasmRuntime, t as getResolvedModelSource } from "./warmup-
|
|
4
|
-
import { i as BaseWasmProvider } from "./safeStorage-
|
|
2
|
+
import { E as getBarcodeEnhanceModelUrl } from "./trueSightService-D8dk4ZID.esm.js";
|
|
3
|
+
import { s as wasmRuntime, t as getResolvedModelSource } from "./warmup-DLq_t-Zu.esm.js";
|
|
4
|
+
import { i as BaseWasmProvider } from "./safeStorage-Q_iUpxa8.esm.js";
|
|
5
5
|
import { t as IncodeCanvas } from "./canvas-BxFzWTt-.esm.js";
|
|
6
6
|
//#region ../infra/src/wasm/idCaptureWasmApi.ts
|
|
7
7
|
var IdCaptureWasmApi = class {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { l as BrowserStorageProvider } from "./setup-
|
|
1
|
+
import { l as BrowserStorageProvider } from "./setup-Cb7Ws1HA.esm.js";
|
|
2
2
|
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-ijlbX_Wx.esm.js";
|
|
3
3
|
import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
|
|
4
4
|
import { s as createActor, u as createManager } from "./xstate.esm-Bg3FuvIs.esm.js";
|
|
5
|
-
import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-
|
|
5
|
+
import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-DyNj8RY_.esm.js";
|
|
6
6
|
import { t as BrowserVisibilityObserverProvider } from "./BrowserVisibilityObserverProvider-BrJN1B8A.esm.js";
|
|
7
|
-
import { c as resetWasmMotionPrimedForModule, o as requiresMotionPermissionUserGesture, r as primeMotionFromUserGestureIfNeeded } from "./permissionServices-
|
|
7
|
+
import { c as resetWasmMotionPrimedForModule, o as requiresMotionPermissionUserGesture, r as primeMotionFromUserGestureIfNeeded } from "./permissionServices-B9IqVf3c.esm.js";
|
|
8
8
|
import { t as getDeviceClass } from "./getDeviceClass-5NYZg9s6.esm.js";
|
|
9
|
-
import { l as createIdProtectedCaptureController, m as mapDeviceWalletScreenName, n as provideIdProtectedCaptureController, p as BrowserDigitalCredentialsProvider, t as idCaptureMachine, u as findIdProtectedCaptureController } from "./idCaptureStateMachine-
|
|
10
|
-
import {
|
|
9
|
+
import { l as createIdProtectedCaptureController, m as mapDeviceWalletScreenName, n as provideIdProtectedCaptureController, p as BrowserDigitalCredentialsProvider, t as idCaptureMachine, u as findIdProtectedCaptureController } from "./idCaptureStateMachine-BL3MnDOu.esm.js";
|
|
10
|
+
import { b as resolveIdCaptureThresholds, v as resolveCaptureOptimizingTreatment, y as resolveCountdownStepMs } from "./idCaptureServices-DKeVf0Gu.esm.js";
|
|
11
11
|
//#region src/modules/id/digitalUpload/instrumentation.ts
|
|
12
12
|
const TERMINAL_REASONS = /* @__PURE__ */ new Set(["DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED", "ID_TYPE_UNACCEPTABLE"]);
|
|
13
13
|
function isHoldingState(value) {
|
|
@@ -8,7 +8,6 @@ import { a as RegulationTypes } from "./types-BuR0sro5.js";
|
|
|
8
8
|
import { n as VirtualCameraCheckOutput, r as WasmUtilConfig, t as IWasmUtilCapability } from "./IWasmUtilCapability-VC40Kx9N.js";
|
|
9
9
|
import { n as PermissionStatus } from "./types-BEwVKkLJ.js";
|
|
10
10
|
import { t as BaseWasmProvider } from "./BaseWasmProvider-BL9wIRnN.js";
|
|
11
|
-
import "./types-CfuWgAi-.js";
|
|
12
11
|
import { n as DeepsightService } from "./StreamCanvasCapture-CeBBJ_RC.js";
|
|
13
12
|
import { t as CameraStream } from "./camera-9wWD-pwg.js";
|
|
14
13
|
import { i as Pdf417DecodeResult, n as IIdCaptureCapability, t as DetectionOrientation } from "./IIdCaptureCapability-DBsv9-7M.js";
|
|
@@ -123,15 +122,34 @@ type StartRecordingParams = {
|
|
|
123
122
|
declare function startRecordingSession(params: StartRecordingParams): Promise<object | undefined>;
|
|
124
123
|
declare function pauseRecordingForAttempt(session: object): void;
|
|
125
124
|
declare function prepareRecordingForCameraRetry(session: object): void;
|
|
125
|
+
/**
|
|
126
|
+
* Resumes a recording paused with `pauseRecordingForAttempt` while its camera
|
|
127
|
+
* clone is still attached (no source replacement pending). Returns whether the
|
|
128
|
+
* recorder is recording again.
|
|
129
|
+
*/
|
|
130
|
+
declare function resumeRecordingAfterPause(session: object): boolean;
|
|
131
|
+
/**
|
|
132
|
+
* True only for a live SDK-managed multipart session. A session that has
|
|
133
|
+
* already been finalized or disposed is no longer in the registry, so callers
|
|
134
|
+
* use this to avoid resuming or re-pausing a torn-down recording.
|
|
135
|
+
*/
|
|
136
|
+
declare function isSuspendableRecordingSession(session: object): boolean;
|
|
126
137
|
type FinalizedIdRecording = Readonly<{
|
|
127
138
|
recordingId?: string | null;
|
|
128
139
|
}>;
|
|
129
140
|
/**
|
|
130
|
-
*
|
|
131
|
-
*
|
|
141
|
+
* Completes an ID recording: drains the multipart upload and releases the
|
|
142
|
+
* compositor. The camera clone ends synchronously, before this function
|
|
143
|
+
* returns its promise, so a step that ends mid-attempt never pins the camera
|
|
144
|
+
* while the upload finishes (ENG-56648). The composite canvas stays alive until
|
|
145
|
+
* the recorder has emitted its final chunk.
|
|
132
146
|
*/
|
|
133
147
|
declare function finalizeRecordingSession(session: object): Promise<FinalizedIdRecording>;
|
|
134
|
-
/**
|
|
148
|
+
/**
|
|
149
|
+
* Teardown for an attempt released before finalization. The camera clone ends
|
|
150
|
+
* synchronously, before this function returns; the upload completes in the
|
|
151
|
+
* background with whatever was recorded.
|
|
152
|
+
*/
|
|
135
153
|
declare function disposeRecordingSession(session: object): void;
|
|
136
154
|
declare function stopRecording(session: object): void;
|
|
137
155
|
declare function processId(isSecondId?: boolean, queueName?: string, signal?: AbortSignal): Promise<{
|
|
@@ -747,4 +765,4 @@ declare function createIdCaptureManager(options: CreateIdCaptureActorOptions): M
|
|
|
747
765
|
deviceWalletUseAnotherMethod(): void;
|
|
748
766
|
};
|
|
749
767
|
//#endregion
|
|
750
|
-
export { barcodeToBase64 as A,
|
|
768
|
+
export { barcodeToBase64 as A, startRecordingSession as B, FinalizedIdRecording as C, UploadIdImageParams as D, StartRecordingParams as E, isSuspendableRecordingSession as F, WasmUtilProvider as G, stopStream as H, pauseRecordingForAttempt as I, prepareRecordingForCameraRetry as L, finalizeRecordingSession as M, getRealQualityValue as N, ValidationError as O, initializeIdCapture as P, processId as R, AddBarcodeParams as S, InitializeIdCaptureParams as T, uploadIdImage as U, stopRecording as V, validateUploadResponse as W, CreateIdCaptureActorOptions as _, RenderWalletError as a, IdCaptureMachine as b, DeviceWalletManager as c, CreateDeviceWalletActorOptions as d, CreateIdCaptureOnlyActorOptions as f, idCaptureOnlyMachine as g, IdCaptureOnlyMachine as h, createIdCaptureManagerFromActor as i, disposeRecordingSession as j, addBarcode as k, DeviceWalletState as l, createIdCaptureOnlyActor as m, IdCaptureManager as n, RenderWalletParams as o, IdCaptureOnlyActor as p, IdCaptureState as r, renderWallet as s, createIdCaptureManager as t, createDeviceWalletManager as u, IdCaptureActor as v, IdCaptureInitResult as w, idCaptureMachine as x, createIdCaptureActor as y, resumeRecordingAfterPause as z };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { t as ensureWasmPipelines } from "./setup-
|
|
2
|
-
import { i as numberParam, n as defineExperimentParams, t as booleanParam, u as resolveExperimentOnce } from "./feature-management-
|
|
1
|
+
import { t as ensureWasmPipelines } from "./setup-Cb7Ws1HA.esm.js";
|
|
2
|
+
import { i as numberParam, n as defineExperimentParams, t as booleanParam, u as resolveExperimentOnce } from "./feature-management-02JHuEhD.esm.js";
|
|
3
3
|
import { t as api } from "./api-Bx3gKW_y.esm.js";
|
|
4
4
|
import { t as endpoints } from "./endpoints-B-3Q-LUw.esm.js";
|
|
5
5
|
import { i as isDesktop } from "./platform-DkcRc9JV.esm.js";
|
|
6
6
|
import { i as assign, t as setup } from "./xstate.esm-Bg3FuvIs.esm.js";
|
|
7
7
|
import { n as fromPromise } from "./xstate-actors.esm-Ccyzgxj1.esm.js";
|
|
8
|
-
import { l as queryCameraPermission } from "./permissionServices-
|
|
8
|
+
import { l as queryCameraPermission } from "./permissionServices-B9IqVf3c.esm.js";
|
|
9
|
+
import { i as createRecordingCompositor, n as WorkerEncoderRecordingProvider, t as MultipartRecordingService } from "./multipartRecordingService-mwKFTlhR.esm.js";
|
|
9
10
|
import { n as getBackCameraStream, o as isBackFacingTrack } from "./backCameraStream-CMvXj4X4.esm.js";
|
|
10
11
|
import { t as getDeviceClass } from "./getDeviceClass-5NYZg9s6.esm.js";
|
|
11
|
-
import {
|
|
12
|
-
import { n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider } from "./idCaptureDefaults-rHijHG6W.esm.js";
|
|
12
|
+
import { n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider } from "./idCaptureDefaults-Ba-m1uO3.esm.js";
|
|
13
13
|
//#region src/internal/camera/cameraServices.ts
|
|
14
14
|
function createCameraServices(camera) {
|
|
15
15
|
return {
|
|
@@ -585,6 +585,7 @@ function createMultipartSessionHandle(service, compositor, recordingSource) {
|
|
|
585
585
|
needsVideoSourceReplacement: false,
|
|
586
586
|
recorderPaused: false,
|
|
587
587
|
recordingSource,
|
|
588
|
+
audioSource: recordingSource.getAudioTracks(),
|
|
588
589
|
service
|
|
589
590
|
});
|
|
590
591
|
return session;
|
|
@@ -629,21 +630,62 @@ function prepareRecordingForCameraRetry(session) {
|
|
|
629
630
|
const multipartSession = multipartIdSessions.get(session);
|
|
630
631
|
if (!multipartSession) return;
|
|
631
632
|
if (!multipartSession.recorderPaused) multipartSession.recorderPaused = multipartSession.service.pause();
|
|
632
|
-
multipartSession
|
|
633
|
-
multipartSession.recordingSource.getVideoTracks().forEach((track) => track.stop());
|
|
633
|
+
releaseCameraClone(multipartSession, { keepAudio: true });
|
|
634
634
|
multipartSession.needsVideoSourceReplacement = true;
|
|
635
635
|
}
|
|
636
636
|
/**
|
|
637
|
-
*
|
|
638
|
-
*
|
|
637
|
+
* Resumes a recording paused with `pauseRecordingForAttempt` while its camera
|
|
638
|
+
* clone is still attached (no source replacement pending). Returns whether the
|
|
639
|
+
* recorder is recording again.
|
|
640
|
+
*/
|
|
641
|
+
function resumeRecordingAfterPause(session) {
|
|
642
|
+
const multipartSession = multipartIdSessions.get(session);
|
|
643
|
+
if (!multipartSession || multipartSession.needsVideoSourceReplacement) return false;
|
|
644
|
+
if (!multipartSession.recorderPaused) return true;
|
|
645
|
+
if (!multipartSession.service.resume()) return false;
|
|
646
|
+
multipartSession.recorderPaused = false;
|
|
647
|
+
return true;
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* True only for a live SDK-managed multipart session. A session that has
|
|
651
|
+
* already been finalized or disposed is no longer in the registry, so callers
|
|
652
|
+
* use this to avoid resuming or re-pausing a torn-down recording.
|
|
653
|
+
*/
|
|
654
|
+
function isSuspendableRecordingSession(session) {
|
|
655
|
+
return multipartIdSessions.has(session);
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* Ends the compositor's camera clone on the calling thread. The composite
|
|
659
|
+
* stream and its upload stay alive; only the tracks that pin the physical
|
|
660
|
+
* camera end. `keepAudio` preserves the compositor's audio track across a
|
|
661
|
+
* video-source swap. Every release path must call this before any async work
|
|
662
|
+
* so no camera clone can overlap a PRC or POC camera switch (ENG-47407) or pin
|
|
663
|
+
* the device for the next module (ENG-56648).
|
|
664
|
+
*/
|
|
665
|
+
function releaseCameraClone(multipartSession, options) {
|
|
666
|
+
try {
|
|
667
|
+
multipartSession.compositor.pause();
|
|
668
|
+
} catch {}
|
|
669
|
+
const tracks = options.keepAudio ? multipartSession.recordingSource.getVideoTracks() : /* @__PURE__ */ new Set([...multipartSession.recordingSource.getTracks(), ...multipartSession.audioSource]);
|
|
670
|
+
for (const track of tracks) try {
|
|
671
|
+
track.stop();
|
|
672
|
+
} catch {}
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* Completes an ID recording: drains the multipart upload and releases the
|
|
676
|
+
* compositor. The camera clone ends synchronously, before this function
|
|
677
|
+
* returns its promise, so a step that ends mid-attempt never pins the camera
|
|
678
|
+
* while the upload finishes (ENG-56648). The composite canvas stays alive until
|
|
679
|
+
* the recorder has emitted its final chunk.
|
|
639
680
|
*/
|
|
640
681
|
async function finalizeRecordingSession(session) {
|
|
641
682
|
const existing = idRecordingFinalizations.get(session);
|
|
642
683
|
if (existing) return existing;
|
|
643
684
|
const multipartSession = multipartIdSessions.get(session);
|
|
644
685
|
if (!multipartSession) return {};
|
|
686
|
+
multipartIdSessions.delete(session);
|
|
687
|
+
releaseCameraClone(multipartSession, { keepAudio: false });
|
|
645
688
|
const finalization = (async () => {
|
|
646
|
-
multipartIdSessions.delete(session);
|
|
647
689
|
try {
|
|
648
690
|
return await multipartSession.service.stop();
|
|
649
691
|
} finally {
|
|
@@ -653,11 +695,16 @@ async function finalizeRecordingSession(session) {
|
|
|
653
695
|
idRecordingFinalizations.set(session, finalization);
|
|
654
696
|
return finalization;
|
|
655
697
|
}
|
|
656
|
-
/**
|
|
698
|
+
/**
|
|
699
|
+
* Teardown for an attempt released before finalization. The camera clone ends
|
|
700
|
+
* synchronously, before this function returns; the upload completes in the
|
|
701
|
+
* background with whatever was recorded.
|
|
702
|
+
*/
|
|
657
703
|
function disposeRecordingSession(session) {
|
|
658
704
|
const multipartSession = multipartIdSessions.get(session);
|
|
659
705
|
if (multipartSession) {
|
|
660
706
|
multipartIdSessions.delete(session);
|
|
707
|
+
releaseCameraClone(multipartSession, { keepAudio: false });
|
|
661
708
|
const finalization = multipartSession.service.stop().finally(() => multipartSession.compositor.stop());
|
|
662
709
|
idRecordingFinalizations.set(session, finalization);
|
|
663
710
|
finalization.catch(() => {});
|
|
@@ -714,4 +761,4 @@ async function addBarcode(params) {
|
|
|
714
761
|
return res.data;
|
|
715
762
|
}
|
|
716
763
|
//#endregion
|
|
717
|
-
export {
|
|
764
|
+
export { getIdCameraStream as C, OPTIMIZING_WATCHDOG_MARGIN_MS as S, ID_ERROR_CODES as _, getRealQualityValue as a, resolveIdCaptureThresholds as b, pauseRecordingForAttempt as c, resumeRecordingAfterPause as d, startRecordingSession as f, validateUploadResponse as g, uploadIdImage as h, finalizeRecordingSession as i, prepareRecordingForCameraRetry as l, stopStream as m, barcodeToBase64 as n, initializeIdCapture as o, stopRecording as p, disposeRecordingSession as r, isSuspendableRecordingSession as s, addBarcode as t, processId as u, resolveCaptureOptimizingTreatment as v, CAPTURE_OPTIMIZING as x, resolveCountdownStepMs as y };
|