@sekyro/web 0.1.0-rc.7 → 0.1.0-rc.8
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/CHANGELOG.md +87 -0
- package/LICENSE +25 -16
- package/README.md +3 -5
- package/THIRD-PARTY-NOTICES.txt +154 -0
- package/dist/background-monitor-A7FKJOAG.js +1 -0
- package/dist/capture-session-doc-YBE3UMJJ.js +1 -0
- package/dist/{capture-session-v3-Okq0EQHG.d.ts → capture-session-v3-CQK-G-qX.d.ts} +72 -3
- package/dist/{capture-session-v3-UQU_WjO2.d.cts → capture-session-v3-Dvob-uH2.d.cts} +72 -3
- package/dist/chunk-4RS2YIL4.js +1 -0
- package/dist/chunk-7V2M6Y2W.js +1 -0
- package/dist/chunk-7ZCZY3ZP.js +1 -0
- package/dist/chunk-A3FUGHAH.js +2 -0
- package/dist/chunk-BPE5NSQ2.js +1 -0
- package/dist/chunk-CJHMFPL6.js +1 -0
- package/dist/chunk-DFTCAWMP.js +1 -0
- package/dist/chunk-DK5YPBDQ.js +1 -0
- package/dist/chunk-DQWW4OCK.js +1 -0
- package/dist/chunk-FHJ7HO3M.js +1 -0
- package/dist/chunk-G6LKLN4U.js +1 -0
- package/dist/chunk-GI3UFGRQ.js +1 -0
- package/dist/{chunk-IYUOYINS.js → chunk-LQ7C44JG.js} +1 -1
- package/dist/chunk-M43ET4NJ.js +1 -0
- package/dist/chunk-MXWLCDFX.js +1 -0
- package/dist/chunk-MY6EXEL2.js +1 -0
- package/dist/chunk-O5WKNZ2C.js +1 -0
- package/dist/chunk-OKWG3PVH.js +1 -0
- package/dist/chunk-POIQGEZM.js +1 -0
- package/dist/chunk-RI3E7GBN.js +1 -0
- package/dist/chunk-RNRFHUJA.js +1 -0
- package/dist/chunk-RVHAKRAI.js +1 -0
- package/dist/chunk-SMKCBUJL.js +1 -0
- package/dist/chunk-TDLIXFDT.js +1 -0
- package/dist/chunk-XLN5OT25.js +1 -0
- package/dist/chunk-YDQBVWXG.js +1 -0
- package/dist/chunk-YPG7CB4O.js +1 -0
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +13 -3
- package/dist/client/index.d.ts +13 -3
- package/dist/client/index.js +1 -1
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +1 -1
- package/dist/core/ocr/worker.bundle.js +42 -0
- package/dist/core/ocr/worker.cjs +42 -0
- package/dist/core/ocr/worker.d.cts +84 -0
- package/dist/core/ocr/worker.d.ts +84 -0
- package/dist/core/ocr/worker.js +41 -0
- package/dist/core/v3/detect-worker.cjs +1 -1
- package/dist/core/v3/detect-worker.d.cts +1 -1
- package/dist/core/v3/detect-worker.d.ts +1 -1
- package/dist/core/v3/detect-worker.js +1 -1
- package/dist/create-document-capture-T4APHJMY.js +1 -0
- package/dist/create-portrait-capture-B57GE5FU.js +1 -0
- package/dist/create-verification-C0AVIcVW.d.ts +2787 -0
- package/dist/create-verification-DoFpgzok.d.cts +2787 -0
- package/dist/{detect-worker-CKXHlXx9.d.cts → detect-worker-DclNxkZT.d.cts} +6 -0
- package/dist/{detect-worker-CKXHlXx9.d.ts → detect-worker-DclNxkZT.d.ts} +6 -0
- package/dist/detector-scanic-YCDNLCGV.js +1 -0
- package/dist/icao-gate-D8qm1O2t.d.cts +1655 -0
- package/dist/icao-gate-D8qm1O2t.d.ts +1655 -0
- package/dist/icao-gate-PWBMKRGC.js +1 -0
- package/dist/icao-tuning-4GGVX6B4.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +52 -6
- package/dist/index.d.ts +52 -6
- package/dist/index.js +1 -1
- package/dist/internal/index.cjs +1 -1
- package/dist/internal/index.d.cts +345 -308
- package/dist/internal/index.d.ts +345 -308
- package/dist/internal/index.js +1 -1
- package/dist/keyframe-rank-YAJLYJYF.js +1 -0
- package/dist/landmarker-KB7LVXAU.js +1 -0
- package/dist/mrz-band-VYHOTDHY.js +1 -0
- package/dist/plan-runner-UBK4B4CG.js +1 -0
- package/dist/segmenter-USLNBX65.js +1 -0
- package/dist/turnstile-FATNZ4AG.js +1 -0
- package/package.json +22 -4
- package/sbom.cdx.json +8 -8
- package/dist/chunk-B45J4KC3.js +0 -1
- package/dist/chunk-BMA36W2W.js +0 -1
- package/dist/chunk-P7ECRN47.js +0 -1
- package/dist/chunk-YOB4ZTYN.js +0 -1
- package/dist/chunk-YQBK6OIM.js +0 -1
- package/dist/create-verification-C2JhOO6Y.d.cts +0 -533
- package/dist/create-verification-CGazwtAh.d.ts +0 -533
- package/dist/detector-scanic-VQFFXKTL.js +0 -1
- package/dist/hosted-client-kBeq-mnJ.d.cts +0 -602
- package/dist/hosted-client-kBeq-mnJ.d.ts +0 -602
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { D as DocumentCaptureOptions, a as DocumentCaptureHandle, P as PortraitCaptureOptions, b as PortraitCaptureHandle } from './create-verification-DoFpgzok.cjs';
|
|
2
|
+
export { A as AcceptedDocumentsLike, C as CameraFacing, c as CaptureChannel, d as CaptureEngineId, e as CaptureError, f as CaptureErrorKind, g as CaptureState, h as CapturedArtifacts, i as CapturedDocument, j as CapturedPortrait, k as ContactChoiceSnapshot, l as ContactChoiceStepHandle, m as DEFAULT_API_ORIGIN, n as DOCUMENT_TYPE_ORDER, o as DeriveStepEnv, p as DocumentCaptureEvents, q as DocumentCaptureState, r as DocumentFeedback, s as DocumentFeedbackKey, t as DocumentGateUpdate, u as DocumentGuide, v as DocumentGuideMeasure, w as DocumentLiveMrzOptions, x as DocumentMrzUpdate, y as DocumentPoint, z as DocumentQuad, B as DocumentReticle, E as DocumentScanPhase, F as DocumentScanUpdate, G as DocumentSide, H as DocumentSnapshot, I as DocumentStepHandle, J as EidSnapshot, K as EidStepHandle, L as EmailOtpSnapshot, M as EmailOtpStepHandle, N as EmailSource, O as GateHint, Q as GateUpdate, R as ISSUER_CODES, S as IdentitySummarySnapshot, T as IdentitySummaryStepHandle, U as LivePhotoGateUpdate, V as LivePhotoPlan, W as LivenessAssetsStatus, X as LivenessCaptureEvents, Y as LivenessCaptureHandle, Z as LivenessCaptureOptions, _ as LivenessSnapshot, $ as LivenessStartOptions, a0 as LivenessStepHandle, a1 as MethodSnapshot, a2 as MethodStepHandle, a3 as MobileRequiredSnapshot, a4 as MobileRequiredStepHandle, a5 as OtpChannel, a6 as OtpNumberSource, a7 as PLATFORM_UNSUPPORTED, a8 as PhoneOtpSnapshot, a9 as PhoneOtpStepHandle, aa as PortraitCaptureEvents, ab as PortraitCaptureState, ac as PortraitGateUpdate, ad as PortraitSnapshot, ae as PortraitStepHandle, af as PreloadLivenessAssetsOptions, ag as ProcessingSnapshot, ah as ProcessingStepHandle, ai as ReasonCode, aj as RegistrySnapshot, ak as RegistrySource, al as RegistryStepHandle, am as ResultDisplay, an as ResultSnapshot, ao as ResultStepHandle, ap as SdkFailureReason, aq as StepAttempts, ar as StepContext, as as StepSnapshot, at as UnsupportedReason, au as UnsupportedSnapshot, av as UnsupportedStepHandle, aw as Verification, ax as VerificationBusy, ay as VerificationEvents, az as VerificationLocale, aA as VerificationOptions, aB as VerificationResult, aC as VerificationStatus, aD as VerificationStep, aE as WEB_IDENTITY_METHODS, aF as acceptedIssuers, aG as acceptedTypesFor, aH as createLivenessCapture, aI as createVerification, aJ as deriveStep, aK as flagOf, aL as getLivenessAssetsStatus, aM as preloadLivenessAssets, aN as releaseLivenessAssets, aO as resolveAcceptedDocuments, aP as sectionOf, aQ as subscribeLivenessAssets } from './create-verification-DoFpgzok.cjs';
|
|
2
3
|
export { OpenHostedOptions, PopupBlocked, PopupHandle, SEKYRO_EVENTS, SekyroEvent, SekyroEventName, openHosted } from './popup/index.cjs';
|
|
3
|
-
export { HostedApiError, KNOWN_CODES, KnownCode, isKnownCode } from './client/index.cjs';
|
|
4
|
-
export { A as AcceptedDocumentType, C as CheckReason, a as CheckState, b as CheckType, D as DecisionReason,
|
|
5
|
-
import './detect-worker-
|
|
6
|
-
import './capture-session-v3-
|
|
4
|
+
export { HostedApiError, KNOWN_CODES, KnownCode, icaoPolicyOf, isKnownCode } from './client/index.cjs';
|
|
5
|
+
export { A as AcceptedDocumentType, C as CheckReason, a as CheckState, b as CheckType, c as ContactChannel, D as DecisionReason, d as DocReason, E as EidAfterPass, e as EidAuthInput, f as EidReason, g as EmailOtpReason, F as FaceMatchReason, H as HeadPose, h as HostedAcceptedDocuments, i as HostedBranding, j as HostedBrandingColorKey, k as HostedCaptureTuning, l as HostedDocumentCaptureTuning, m as HostedDocumentScanTuning, n as HostedEidView, o as HostedEmailOtpView, p as HostedIcaoPolicy, q as HostedIntegrity, r as HostedLivePhotoTuning, s as HostedNativeCaptureTuning, t as HostedOcrTuning, u as HostedOtpView, v as HostedPortraitView, w as HostedSessionView, x as HostedStepView, y as HostedVoiceLocale, z as HostedVoiceView, I as IcaoCaptureTuning, B as IcaoCoachKey, G as IcaoCriterion, J as IcaoCriterionState, K as IcaoGateCriterion, L as IcaoGateSummary, M as IcaoGateUpdate, N as IcaoReportEntry, O as IdentityConfirmDecision, P as IdentityMethod, Q as IdentitySummarySource, R as IdentitySummaryView, S as LivenessReason, T as MatchReason, U as MethodChoiceView, V as NationalEidOption, W as NfcChipReason, X as NfcStepView, Y as OtpChoiceView, Z as PhoneOtpReason, _ as PolicyFailureReason, $ as PopulationReason, a0 as PortraitIcaoInput, a1 as PortraitIcaoReason, a2 as SessionFailureReason, a3 as SessionOutcome, a4 as SessionStatus, a5 as StepSection } from './icao-gate-D8qm1O2t.cjs';
|
|
6
|
+
import './detect-worker-DclNxkZT.cjs';
|
|
7
|
+
import './capture-session-v3-Dvob-uH2.cjs';
|
|
7
8
|
|
|
8
9
|
/** Camera permission as the Permissions API reports it; `'unknown'` where it cannot tell. */
|
|
9
10
|
type CameraPermissionState = "granted" | "prompt" | "denied" | "unknown";
|
|
@@ -25,4 +26,49 @@ declare function subscribeCameraPermission(listener: (state: CameraPermissionSta
|
|
|
25
26
|
*/
|
|
26
27
|
declare function hasMultipleCameras(): Promise<boolean>;
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
/** A step action refused its input before any network call (nothing was submitted or billed). */
|
|
30
|
+
declare class InvalidInputError extends Error {
|
|
31
|
+
readonly field: "phone" | "code" | "nni";
|
|
32
|
+
readonly kind: "format" | "check_digit";
|
|
33
|
+
constructor(field: "phone" | "code" | "nni", kind: "format" | "check_digit");
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* An OTP step action refused its input before any network call (Plan 8; nothing
|
|
37
|
+
* was submitted or billed): the phone OTP `channel` choice is `required`
|
|
38
|
+
* (several channels offered, none chosen) or `unavailable` (not one of the
|
|
39
|
+
* step's channels), or the email OTP `email` address has a bad `format`.
|
|
40
|
+
*/
|
|
41
|
+
declare class OtpInputError extends Error {
|
|
42
|
+
readonly field: "channel" | "email";
|
|
43
|
+
readonly kind: "format" | "required" | "unavailable";
|
|
44
|
+
constructor(field: "channel" | "email", kind: "format" | "required" | "unavailable");
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** `true` for exactly 10 ASCII digits whose value ≡ 1 (mod 97). */
|
|
48
|
+
declare function isValidNni(nni: string): boolean;
|
|
49
|
+
/** Strip spaces and dashes; map Arabic-Indic (U+0660–0669) and extended (U+06F0–06F9) digits to ASCII. */
|
|
50
|
+
declare function normalizeNni(input: string): string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The guided rear-camera document scanner for identity cards (ID-1 or ID-2),
|
|
54
|
+
* residence permits and passport data pages of any issuing country. Live camera
|
|
55
|
+
* only; `captured` delivers an upload-ready JPEG per face. The engine loads on
|
|
56
|
+
* the first `start()`.
|
|
57
|
+
*/
|
|
58
|
+
declare function createDocumentCapture(options: DocumentCaptureOptions): DocumentCaptureHandle;
|
|
59
|
+
/** Prefetch the document engine (call when the document step mounts). */
|
|
60
|
+
declare function warmDocumentCapture(): void;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The ICAO portrait capture for sessions whose selfie is ICAO-checked
|
|
64
|
+
* (`icaoPolicyOf(view)` not null; pass its `policy`): front camera, live
|
|
65
|
+
* per-criterion coaching (pose, eyes against the person's own baseline, mouth,
|
|
66
|
+
* framing, lighting, background, glare, resolution, sharpness) and an
|
|
67
|
+
* automatic full-resolution still once every criterion has held. The server
|
|
68
|
+
* re-checks every criterion. The engine loads on the first `start()`.
|
|
69
|
+
*/
|
|
70
|
+
declare function createPortraitCapture(options: PortraitCaptureOptions): PortraitCaptureHandle;
|
|
71
|
+
/** Prefetch the portrait engine (call when the portrait step mounts). */
|
|
72
|
+
declare function warmPortraitCapture(): void;
|
|
73
|
+
|
|
74
|
+
export { type CameraPermissionState, DocumentCaptureHandle, DocumentCaptureOptions, InvalidInputError, OtpInputError, PortraitCaptureHandle, PortraitCaptureOptions, createDocumentCapture, createPortraitCapture, hasMultipleCameras, isValidNni, normalizeNni, queryCameraPermission, subscribeCameraPermission, warmDocumentCapture, warmPortraitCapture };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { D as DocumentCaptureOptions, a as DocumentCaptureHandle, P as PortraitCaptureOptions, b as PortraitCaptureHandle } from './create-verification-C0AVIcVW.js';
|
|
2
|
+
export { A as AcceptedDocumentsLike, C as CameraFacing, c as CaptureChannel, d as CaptureEngineId, e as CaptureError, f as CaptureErrorKind, g as CaptureState, h as CapturedArtifacts, i as CapturedDocument, j as CapturedPortrait, k as ContactChoiceSnapshot, l as ContactChoiceStepHandle, m as DEFAULT_API_ORIGIN, n as DOCUMENT_TYPE_ORDER, o as DeriveStepEnv, p as DocumentCaptureEvents, q as DocumentCaptureState, r as DocumentFeedback, s as DocumentFeedbackKey, t as DocumentGateUpdate, u as DocumentGuide, v as DocumentGuideMeasure, w as DocumentLiveMrzOptions, x as DocumentMrzUpdate, y as DocumentPoint, z as DocumentQuad, B as DocumentReticle, E as DocumentScanPhase, F as DocumentScanUpdate, G as DocumentSide, H as DocumentSnapshot, I as DocumentStepHandle, J as EidSnapshot, K as EidStepHandle, L as EmailOtpSnapshot, M as EmailOtpStepHandle, N as EmailSource, O as GateHint, Q as GateUpdate, R as ISSUER_CODES, S as IdentitySummarySnapshot, T as IdentitySummaryStepHandle, U as LivePhotoGateUpdate, V as LivePhotoPlan, W as LivenessAssetsStatus, X as LivenessCaptureEvents, Y as LivenessCaptureHandle, Z as LivenessCaptureOptions, _ as LivenessSnapshot, $ as LivenessStartOptions, a0 as LivenessStepHandle, a1 as MethodSnapshot, a2 as MethodStepHandle, a3 as MobileRequiredSnapshot, a4 as MobileRequiredStepHandle, a5 as OtpChannel, a6 as OtpNumberSource, a7 as PLATFORM_UNSUPPORTED, a8 as PhoneOtpSnapshot, a9 as PhoneOtpStepHandle, aa as PortraitCaptureEvents, ab as PortraitCaptureState, ac as PortraitGateUpdate, ad as PortraitSnapshot, ae as PortraitStepHandle, af as PreloadLivenessAssetsOptions, ag as ProcessingSnapshot, ah as ProcessingStepHandle, ai as ReasonCode, aj as RegistrySnapshot, ak as RegistrySource, al as RegistryStepHandle, am as ResultDisplay, an as ResultSnapshot, ao as ResultStepHandle, ap as SdkFailureReason, aq as StepAttempts, ar as StepContext, as as StepSnapshot, at as UnsupportedReason, au as UnsupportedSnapshot, av as UnsupportedStepHandle, aw as Verification, ax as VerificationBusy, ay as VerificationEvents, az as VerificationLocale, aA as VerificationOptions, aB as VerificationResult, aC as VerificationStatus, aD as VerificationStep, aE as WEB_IDENTITY_METHODS, aF as acceptedIssuers, aG as acceptedTypesFor, aH as createLivenessCapture, aI as createVerification, aJ as deriveStep, aK as flagOf, aL as getLivenessAssetsStatus, aM as preloadLivenessAssets, aN as releaseLivenessAssets, aO as resolveAcceptedDocuments, aP as sectionOf, aQ as subscribeLivenessAssets } from './create-verification-C0AVIcVW.js';
|
|
2
3
|
export { OpenHostedOptions, PopupBlocked, PopupHandle, SEKYRO_EVENTS, SekyroEvent, SekyroEventName, openHosted } from './popup/index.js';
|
|
3
|
-
export { HostedApiError, KNOWN_CODES, KnownCode, isKnownCode } from './client/index.js';
|
|
4
|
-
export { A as AcceptedDocumentType, C as CheckReason, a as CheckState, b as CheckType, D as DecisionReason,
|
|
5
|
-
import './detect-worker-
|
|
6
|
-
import './capture-session-v3-
|
|
4
|
+
export { HostedApiError, KNOWN_CODES, KnownCode, icaoPolicyOf, isKnownCode } from './client/index.js';
|
|
5
|
+
export { A as AcceptedDocumentType, C as CheckReason, a as CheckState, b as CheckType, c as ContactChannel, D as DecisionReason, d as DocReason, E as EidAfterPass, e as EidAuthInput, f as EidReason, g as EmailOtpReason, F as FaceMatchReason, H as HeadPose, h as HostedAcceptedDocuments, i as HostedBranding, j as HostedBrandingColorKey, k as HostedCaptureTuning, l as HostedDocumentCaptureTuning, m as HostedDocumentScanTuning, n as HostedEidView, o as HostedEmailOtpView, p as HostedIcaoPolicy, q as HostedIntegrity, r as HostedLivePhotoTuning, s as HostedNativeCaptureTuning, t as HostedOcrTuning, u as HostedOtpView, v as HostedPortraitView, w as HostedSessionView, x as HostedStepView, y as HostedVoiceLocale, z as HostedVoiceView, I as IcaoCaptureTuning, B as IcaoCoachKey, G as IcaoCriterion, J as IcaoCriterionState, K as IcaoGateCriterion, L as IcaoGateSummary, M as IcaoGateUpdate, N as IcaoReportEntry, O as IdentityConfirmDecision, P as IdentityMethod, Q as IdentitySummarySource, R as IdentitySummaryView, S as LivenessReason, T as MatchReason, U as MethodChoiceView, V as NationalEidOption, W as NfcChipReason, X as NfcStepView, Y as OtpChoiceView, Z as PhoneOtpReason, _ as PolicyFailureReason, $ as PopulationReason, a0 as PortraitIcaoInput, a1 as PortraitIcaoReason, a2 as SessionFailureReason, a3 as SessionOutcome, a4 as SessionStatus, a5 as StepSection } from './icao-gate-D8qm1O2t.js';
|
|
6
|
+
import './detect-worker-DclNxkZT.js';
|
|
7
|
+
import './capture-session-v3-CQK-G-qX.js';
|
|
7
8
|
|
|
8
9
|
/** Camera permission as the Permissions API reports it; `'unknown'` where it cannot tell. */
|
|
9
10
|
type CameraPermissionState = "granted" | "prompt" | "denied" | "unknown";
|
|
@@ -25,4 +26,49 @@ declare function subscribeCameraPermission(listener: (state: CameraPermissionSta
|
|
|
25
26
|
*/
|
|
26
27
|
declare function hasMultipleCameras(): Promise<boolean>;
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
/** A step action refused its input before any network call (nothing was submitted or billed). */
|
|
30
|
+
declare class InvalidInputError extends Error {
|
|
31
|
+
readonly field: "phone" | "code" | "nni";
|
|
32
|
+
readonly kind: "format" | "check_digit";
|
|
33
|
+
constructor(field: "phone" | "code" | "nni", kind: "format" | "check_digit");
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* An OTP step action refused its input before any network call (Plan 8; nothing
|
|
37
|
+
* was submitted or billed): the phone OTP `channel` choice is `required`
|
|
38
|
+
* (several channels offered, none chosen) or `unavailable` (not one of the
|
|
39
|
+
* step's channels), or the email OTP `email` address has a bad `format`.
|
|
40
|
+
*/
|
|
41
|
+
declare class OtpInputError extends Error {
|
|
42
|
+
readonly field: "channel" | "email";
|
|
43
|
+
readonly kind: "format" | "required" | "unavailable";
|
|
44
|
+
constructor(field: "channel" | "email", kind: "format" | "required" | "unavailable");
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** `true` for exactly 10 ASCII digits whose value ≡ 1 (mod 97). */
|
|
48
|
+
declare function isValidNni(nni: string): boolean;
|
|
49
|
+
/** Strip spaces and dashes; map Arabic-Indic (U+0660–0669) and extended (U+06F0–06F9) digits to ASCII. */
|
|
50
|
+
declare function normalizeNni(input: string): string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The guided rear-camera document scanner for identity cards (ID-1 or ID-2),
|
|
54
|
+
* residence permits and passport data pages of any issuing country. Live camera
|
|
55
|
+
* only; `captured` delivers an upload-ready JPEG per face. The engine loads on
|
|
56
|
+
* the first `start()`.
|
|
57
|
+
*/
|
|
58
|
+
declare function createDocumentCapture(options: DocumentCaptureOptions): DocumentCaptureHandle;
|
|
59
|
+
/** Prefetch the document engine (call when the document step mounts). */
|
|
60
|
+
declare function warmDocumentCapture(): void;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The ICAO portrait capture for sessions whose selfie is ICAO-checked
|
|
64
|
+
* (`icaoPolicyOf(view)` not null; pass its `policy`): front camera, live
|
|
65
|
+
* per-criterion coaching (pose, eyes against the person's own baseline, mouth,
|
|
66
|
+
* framing, lighting, background, glare, resolution, sharpness) and an
|
|
67
|
+
* automatic full-resolution still once every criterion has held. The server
|
|
68
|
+
* re-checks every criterion. The engine loads on the first `start()`.
|
|
69
|
+
*/
|
|
70
|
+
declare function createPortraitCapture(options: PortraitCaptureOptions): PortraitCaptureHandle;
|
|
71
|
+
/** Prefetch the portrait engine (call when the portrait step mounts). */
|
|
72
|
+
declare function warmPortraitCapture(): void;
|
|
73
|
+
|
|
74
|
+
export { type CameraPermissionState, DocumentCaptureHandle, DocumentCaptureOptions, InvalidInputError, OtpInputError, PortraitCaptureHandle, PortraitCaptureOptions, createDocumentCapture, createPortraitCapture, hasMultipleCameras, isValidNni, normalizeNni, queryCameraPermission, subscribeCameraPermission, warmDocumentCapture, warmPortraitCapture };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as K,c as q}from"./chunk-SXZCL5NO.js";import{a as M,f as b,h as G,i as f,j as C,k as S,l as v,m as D,n as U,o as z,p as F,r as _}from"./chunk-XLN5OT25.js";import{s as m,t as y}from"./chunk-YDQBVWXG.js";import{e as L,f as R,g as I,h as A,n as w}from"./chunk-RVHAKRAI.js";import"./chunk-7V2M6Y2W.js";import"./chunk-DQWW4OCK.js";import"./chunk-POIQGEZM.js";import"./chunk-FHJ7HO3M.js";import"./chunk-FPXL63KZ.js";import{a as T,b as V,c as k,f as N}from"./chunk-4RS2YIL4.js";import"./chunk-LQ7C44JG.js";import"./chunk-OKWG3PVH.js";async function P(){try{return typeof navigator>"u"||typeof navigator.permissions?.query!="function"?null:await navigator.permissions.query({name:"camera"})}catch{return null}}function l(t){return t==="granted"||t==="prompt"||t==="denied"?t:"unknown"}async function B(){let t=await P();return t===null?"unknown":l(t.state)}function Y(t){let e=!1,o=null,r=()=>{!e&&o!==null&&t(l(o.state))};return P().then(i=>{e||(o=i,t(i===null?"unknown":l(i.state)),i?.addEventListener?.("change",r))}),()=>{e=!0,o?.removeEventListener?.("change",r)}}async function W(){if(typeof navigator>"u")return!1;let t=String(navigator.userAgent??"");if(/Android|iPhone|iPad|iPod/i.test(t)||/Macintosh/.test(t)&&(navigator.maxTouchPoints??0)>1)return!0;try{return(await navigator.mediaDevices?.enumerateDevices?.()??[]).filter(o=>o.kind==="videoinput").length>=2}catch{return!1}}function Q(t){return/^\d{10}$/.test(t)&&Number(t)%97===1}function $(t){let e="";for(let o of t){let r=o.codePointAt(0)??0;r>=1632&&r<=1641?e+=String(r-1632):r>=1776&&r<=1785?e+=String(r-1776):o!==" "&&o!=="-"&&o!=="\xA0"&&(e+=o)}return e}var pe=f,ue=C,ce=S,de=v,le=D;var h=()=>import("./create-document-capture-T4APHJMY.js");function H(t){let e=null,o=null,r=!1,i=null,c=null,d=[],a=(n,s)=>{n.off=s.on(n.event,n.handler)},p=()=>(o??(o=h().then(n=>{if(r)return null;let s=n.createDocumentCaptureInternal(t,{}).handle;for(let u of d)u.removed||a(u,s);return i!==null&&s.setSide(i),c!==null&&s.setGuide(c.guide),e=s,s})),o);return{get state(){return e?.state??"idle"},on:(n,s)=>{let u={event:n,handler:s,off:null,removed:!1};return d.push(u),e!==null&&a(u,e),()=>{u.removed=!0,u.off?.()}},start:async()=>{let n=await p();n!==null&&!r&&await n.start()},retry:()=>{e!==null?e.retry():p().then(n=>n?.start())},setSide:n=>{e!==null?e.setSide(n):i=n},shutter:()=>e?.shutter(),setTorch:n=>e?.setTorch(n),focusAt:(n,s)=>e?.focusAt(n,s),setGuide:n=>{e!==null?e.setGuide(n):c={guide:n}},destroy:()=>{r=!0,e?.destroy(),e=null,d.length=0}}}function g(){h().then(t=>t.warmDocumentCapture()).catch(()=>{})}function Se(t){return H(t)}function ve(){g()}var E=()=>import("./create-portrait-capture-B57GE5FU.js");function x(t){let e=null,o=null,r=!1,i=[],c=(a,p)=>{a.off=p.on(a.event,a.handler)},d=()=>(o??(o=E().then(a=>{if(r)return null;let p=a.createPortraitCaptureInternal(t).handle;for(let n of i)n.removed||c(n,p);return e=p,p})),o);return{get state(){return e?.state??"idle"},on:(a,p)=>{let n={event:a,handler:p,off:null,removed:!1};return i.push(n),e!==null&&c(n,e),()=>{n.removed=!0,n.off?.()}},start:async()=>{let a=await d();a!==null&&!r&&await a.start()},retry:()=>{e!==null?e.retry():d().then(a=>a?.start())},destroy:()=>{r=!0,e?.destroy(),e=null,i.length=0}}}function O(){E().then(t=>t.warmPortraitCapture()).catch(()=>{})}function ge(t){return x(t)}function Ee(){O()}export{M as DEFAULT_API_ORIGIN,pe as DOCUMENT_TYPE_ORDER,k as HostedApiError,G as ISSUER_CODES,m as InvalidInputError,T as KNOWN_CODES,y as OtpInputError,z as PLATFORM_UNSUPPORTED,K as SEKYRO_EVENTS,U as WEB_IDENTITY_METHODS,ce as acceptedIssuers,ue as acceptedTypesFor,Se as createDocumentCapture,w as createLivenessCapture,ge as createPortraitCapture,b as createVerification,_ as deriveStep,le as flagOf,R as getLivenessAssetsStatus,W as hasMultipleCameras,N as icaoPolicyOf,V as isKnownCode,Q as isValidNni,$ as normalizeNni,q as openHosted,L as preloadLivenessAssets,B as queryCameraPermission,A as releaseLivenessAssets,de as resolveAcceptedDocuments,F as sectionOf,Y as subscribeCameraPermission,I as subscribeLivenessAssets,ve as warmDocumentCapture,Ee as warmPortraitCapture};
|