import { n as WasmPipeline } from "./warmup-Dv2alr2-.js"; import { a as MLProviderConfig, n as IRecordingCapability, t as IStorageCapability } from "./IStorageCapability-ORkQfK3F.js"; import { t as AvatarAssetsOverrides } from "./IFaceAvatarCapability-BrL19G0s.js"; import { n as Flow, s as SelfieConcealmentOption } from "./types-KPvmag_B.js"; //#region ../infra/src/capabilities/IWasmUtilCapability.d.ts type WasmUtilConfig = MLProviderConfig & { pipelines?: WasmPipeline[]; }; type VirtualCameraCheckOutput = { canvas: HTMLCanvasElement | null; itr: boolean | null; skipped: boolean | null; }; type IWasmUtilCapability = { /** * Whether the provider has been initialized and is ready to be used. */ readonly initialized: boolean; /** * Initializes the provider with the given configuration. * If WASM was already warmed up via `warmupWasm()`, this returns almost instantly. * @param config - Provider configuration including WASM paths */ initialize(config: WasmUtilConfig): Promise; /** * Encrypts a base64 image using the WASM utility API. * @param image - Base64 image string (no data URL prefix) * @returns Encrypted string */ encryptImage(image: string): string; setSdkVersion(version: string): void; setSdkPlatform(platform: string): void; setDeviceInfo(deviceInfo: object, overrideExisting?: boolean): void; setBrowserInfo(browserInfo: object, overrideExisting?: boolean): void; setCameraInfo(cameraInfo: object, overrideExisting?: boolean): void; setMotionStatus(status: string): void; setBackgroundMode(backgroundMode: boolean): void; /** * Enables on-device mode: the native WASM module skips full fingerprint * collection and keeps only the device-detection DTO. Additive; default off. */ setOnDeviceMode(enabled: boolean): void; setZc(zc: string): void; setInspectorOpened(opened: boolean): void; /** * Returns whether the DevTools inspector has been detected as open. * Safe to call before WASM initialization (returns the in-memory flag). */ getInspectorOpened(): boolean; /** * Toggles the WASM module's production mode. When `true`, the native module * suppresses its verbose debug logging/console output. */ setProductionMode(productionMode: boolean): Promise; getMetadata(): string; analyzeFrame(image: ImageData): Promise; getCheck(): string; /** * Gets the current pipeline state. Must be called before setMotionStatus(), * getCheck(), setBackgroundMode(), and getMetadata() for proper metadata generation. */ getPipelineState(): string; estimatePerformance(): string; isVirtualCamera(label: string | null): boolean; prc(): Promise; poc(output: VirtualCameraCheckOutput): Promise; rsp(): Promise; ssl(): void; stl(): void; osv(): void; oev(): void; ckvcks(data: ArrayBuffer): void; getVersions(): Promise; /** * Disposes of resources and resets initialization state. */ dispose(): Promise; }; //#endregion //#region src/internal/faceCapture/types.d.ts type CameraResolution = { width?: number; height?: number; }; /** * Rich captured face payload delivered via `onCapture` in the selfie * captureOnly flow. */ type FaceCapturedImageData = { imageBase64: string; blob: Blob; url: string; metadata: string; /** * Populated when local video recording is active * (`enableFaceRecording === true` with `LocalRecordingService`). * `undefined` when video recording is disabled, when the provider is * OpenVidu (remote server-side recording), or when video assembly fails. * * Delivered as raw base64 (not encrypted via WASM `ens()` like the regular * flow). Integrators receiving this are responsible for handling it as * sensitive biometric data. */ videoBase64: string | undefined; }; /** * Payload delivered to `SelfieCaptureOnlyConfig.onCapture`. */ type FaceCaptureOnlyResponse = { image: FaceCapturedImageData; }; type BaseFaceCaptureConfig = { showTutorial: boolean; showPreview?: boolean; assistedOnboarding?: boolean; enableFaceRecording?: boolean; autoCaptureTimeout: number; captureAttempts?: number; numberOfAttempts?: number; validateLenses?: boolean; validateFaceMask?: boolean; validateHeadCover?: boolean; validateClosedEyes?: boolean; validateBrightness?: boolean; deepsightLiveness?: 'SINGLE_FRAME' | 'MULTIMODAL' | 'VIDEOLIVENESS'; cameraResolution?: CameraResolution; ageAssurance?: boolean; recording?: { capability?: IRecordingCapability; }; ds?: Flow['ds']; /** * When true, face analysis runs on-device via the OnDevice WASM workflow * (6 models) and only the results JSON is submitted to the backend * (`/omni/add/face-results`). Recording is skipped entirely. Used by both * SELFIE and AUTHENTICATION modules. * * **Requires E2EE.** The on-device face-results endpoint is only served on * the E2EE-provisioned host. Configure `setup()` with the dedicated E2EE * `apiURL` and `encryption: true` — see the `encryption` option on * `SetupOptions`. Without it, `/omni/add/face-results` will fail. */ onDeviceFaceResultsSubmissionEnabled?: boolean; /** * Cosmetic-only face concealment for the capture screen. The backend sends * this single option on the SELFIE/AUTHENTICATION node config; the SDK derives * which avatar (if any) conceals the live preview from it. A **display** change * only — autocapture, quality, liveness, age and upload keep running on the * real frames. The heavy avatar runtime (MediaPipe + three) is lazy-loaded only * when an avatar is selected. * - `OPTION_NONE` (or absent) — the live video, no avatar. * - `OPTION_SILHOUETTE` — frosted-glass WebGL lens over the real video. * - `OPTION_2D` — stylized 2D face (also the personhood avatar). * - `OPTION_3D` — 3D VRM character. * See docs/features/FACE_AVATAR.md. */ selfieConcealmentOption?: SelfieConcealmentOption; /** * Optional overrides for where the avatar runtime assets (MediaPipe wasm, * face-landmarker model, `.vrm`) are fetched from. Defaults to the bundled CDN * layout. Only relevant when `selfieConcealmentOption` selects an avatar. */ avatarAssets?: AvatarAssetsOverrides; }; type FaceCaptureDependencies = { storage: IStorageCapability; getWasmUtil: () => Promise; trackCaptureAttemptFinished?: (payload: { logs: string; }) => void; }; type DetectionStatus = 'idle' | 'detecting' | 'noFace' | 'tooManyFaces' | 'tooClose' | 'tooFar' | 'blur' | 'dark' | 'tooBright' | 'faceAngle' | 'lookAtCamera' | 'headWear' | 'lenses' | 'eyesClosed' | 'faceMask' | 'faceOcclusion' | 'centerFace' | 'moveLeft' | 'moveRight' | 'manualCapture' | 'success' | 'error' | 'capturing' | 'getReady' | 'getReadyFinished' | 'offline'; declare const FACE_ERROR_CODES: { readonly FACE_OCCLUDED: "FACE_OCCLUDED"; readonly LIVENESS: "LIVENESS_ERROR"; readonly BRIGHTNESS: "BRIGHTNESS_ERROR"; readonly LENSES: "LENSES_ERROR"; readonly MASK: "MASK_ERROR"; readonly CLOSED_EYES: "CLOSED_EYES_ERROR"; readonly HEAD_COVER: "HEAD_COVER_ERROR"; readonly SERVER: "SERVER_ERROR"; readonly FACE_NOT_FOUND: "FACE_NOT_FOUND"; readonly MULTIPLE_FACES: "MULTIPLE_FACES"; readonly TOO_BLURRY: "TOO_BLURRY_ERROR"; readonly TOO_DARK: "TOO_DARK_ERROR"; readonly USER_IS_NOT_RECOGNIZED: "USER_IS_NOT_RECOGNIZED"; readonly SPOOF_ATTEMPT_DETECTED: "SPOOF_ATTEMPT_DETECTED"; readonly FACE_TOO_DARK: "FACE_TOO_DARK"; readonly LENSES_DETECTED: "LENSES_DETECTED"; readonly FACE_MASK_DETECTED: "FACE_MASK_DETECTED"; readonly CLOSED_EYES_DETECTED: "CLOSED_EYES_DETECTED"; readonly HEAD_COVER_DETECTED: "HEAD_COVER_DETECTED"; readonly FACE_CROPPING_FAILED: "FACE_CROPPING_FAILED"; readonly FACE_TOO_SMALL: "FACE_TOO_SMALL"; readonly FACE_TOO_BLURRY: "FACE_TOO_BLURRY"; readonly BAD_PHOTO_QUALITY: "BAD_PHOTO_QUALITY"; readonly PROCESSING_ERROR: "PROCESSING_ERROR"; readonly BAD_REQUEST: "BAD_REQUEST"; readonly NONEXISTENT_CUSTOMER: "NONEXISTENT_CUSTOMER"; readonly HINT_NOT_PROVIDED: "HINT_NOT_PROVIDED"; readonly SELFIE_IMAGE_LOW_QUALITY: "SELFIE_IMAGE_LOW_QUALITY"; readonly NO_MORE_ATTEMPTS: "NO_MORE_ATTEMPTS"; }; type FaceErrorCode = (typeof FACE_ERROR_CODES)[keyof typeof FACE_ERROR_CODES]; //#endregion export { FaceCapturedImageData as a, VirtualCameraCheckOutput as c, FaceCaptureOnlyResponse as i, WasmUtilConfig as l, DetectionStatus as n, FaceErrorCode as o, FaceCaptureDependencies as r, IWasmUtilCapability as s, BaseFaceCaptureConfig as t };