@sekyro/web 0.1.0-rc.2 → 0.1.0-rc.20

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.
Files changed (133) hide show
  1. package/CHANGELOG.md +300 -0
  2. package/LICENSE +25 -16
  3. package/README.md +111 -60
  4. package/THIRD-PARTY-NOTICES.txt +154 -0
  5. package/dist/background-monitor-A7FKJOAG.js +1 -0
  6. package/dist/camera-trait-45MJTW4K.js +1 -0
  7. package/dist/capture-constraints-B5omafmk.d.cts +44 -0
  8. package/dist/capture-constraints-B5omafmk.d.ts +44 -0
  9. package/dist/capture-session-doc-QA4DOFRF.js +1 -0
  10. package/dist/{capture-session-v3-CAoWM8iT.d.cts → capture-session-v3-CNL-GX11.d.cts} +185 -15
  11. package/dist/{capture-session-v3-BJ8ciaWl.d.ts → capture-session-v3-DaBqN8fO.d.ts} +185 -15
  12. package/dist/chunk-5ZKQHFFW.js +1 -0
  13. package/dist/chunk-7ZCZY3ZP.js +1 -0
  14. package/dist/chunk-A3FUGHAH.js +2 -0
  15. package/dist/chunk-BPE5NSQ2.js +1 -0
  16. package/dist/chunk-CJHMFPL6.js +1 -0
  17. package/dist/chunk-CQ7SKLMC.js +1 -0
  18. package/dist/chunk-DFTCAWMP.js +1 -0
  19. package/dist/chunk-DK5YPBDQ.js +1 -0
  20. package/dist/chunk-FGOVIGGL.js +1 -0
  21. package/dist/chunk-FPXL63KZ.js +1 -0
  22. package/dist/chunk-FUHDOEBP.js +1 -0
  23. package/dist/chunk-G6LKLN4U.js +1 -0
  24. package/dist/chunk-GI3UFGRQ.js +1 -0
  25. package/dist/chunk-GT2ZLGF7.js +1 -0
  26. package/dist/chunk-IG466TOP.js +1 -0
  27. package/dist/chunk-KHR4U2SZ.js +1 -0
  28. package/dist/chunk-KZBBB5B2.js +1 -0
  29. package/dist/chunk-MXWLCDFX.js +1 -0
  30. package/dist/chunk-NJML6FMD.js +1 -0
  31. package/dist/chunk-O5WKNZ2C.js +1 -0
  32. package/dist/chunk-OKWG3PVH.js +1 -0
  33. package/dist/chunk-POIQGEZM.js +1 -0
  34. package/dist/chunk-RI3E7GBN.js +1 -0
  35. package/dist/chunk-SMKCBUJL.js +1 -0
  36. package/dist/chunk-TDLIXFDT.js +1 -0
  37. package/dist/chunk-TQB3URP2.js +1 -0
  38. package/dist/chunk-U6S7SCBY.js +1 -0
  39. package/dist/chunk-U6TYL2IJ.js +1 -0
  40. package/dist/chunk-W2WD7PR2.js +1 -0
  41. package/dist/chunk-XCKE2MJL.js +1 -0
  42. package/dist/chunk-ZLWH4RBO.js +1 -0
  43. package/dist/client/index.cjs +1 -357
  44. package/dist/client/index.d.cts +6 -37
  45. package/dist/client/index.d.ts +6 -37
  46. package/dist/client/index.js +1 -15
  47. package/dist/core/index.cjs +1 -1605
  48. package/dist/core/index.d.cts +5 -4
  49. package/dist/core/index.d.ts +5 -4
  50. package/dist/core/index.js +1 -139
  51. package/dist/core/ocr/worker.bundle.js +42 -0
  52. package/dist/core/ocr/worker.cjs +42 -0
  53. package/dist/core/ocr/worker.d.cts +84 -0
  54. package/dist/core/ocr/worker.d.ts +84 -0
  55. package/dist/core/ocr/worker.js +41 -0
  56. package/dist/core/v3/detect-worker.cjs +1 -392
  57. package/dist/core/v3/detect-worker.d.cts +1 -1
  58. package/dist/core/v3/detect-worker.d.ts +1 -1
  59. package/dist/core/v3/detect-worker.js +1 -13
  60. package/dist/create-document-capture-GJXBQMTC.js +1 -0
  61. package/dist/create-portrait-capture-MOS2D7CL.js +1 -0
  62. package/dist/create-verification-BBOUYpga.d.cts +3274 -0
  63. package/dist/create-verification-COpe2hxf.d.ts +3274 -0
  64. package/dist/{detect-worker-CKXHlXx9.d.cts → detect-worker-DclNxkZT.d.cts} +6 -0
  65. package/dist/{detect-worker-CKXHlXx9.d.ts → detect-worker-DclNxkZT.d.ts} +6 -0
  66. package/dist/detector-scanic-YCDNLCGV.js +1 -0
  67. package/dist/icao-gate-CEGvJR3q.d.ts +534 -0
  68. package/dist/icao-gate-PWBMKRGC.js +1 -0
  69. package/dist/icao-gate-l40OU6x1.d.cts +534 -0
  70. package/dist/icao-policy-BgI1Y870.d.ts +71 -0
  71. package/dist/icao-policy-C7fIdRzo.d.cts +71 -0
  72. package/dist/icao-tuning-4GGVX6B4.js +1 -0
  73. package/dist/index.cjs +1 -2636
  74. package/dist/index.d.cts +110 -5
  75. package/dist/index.d.ts +110 -5
  76. package/dist/index.js +1 -28
  77. package/dist/internal/index.cjs +1 -4166
  78. package/dist/internal/index.d.cts +365 -324
  79. package/dist/internal/index.d.ts +365 -324
  80. package/dist/internal/index.js +1 -647
  81. package/dist/keyframe-rank-YAJLYJYF.js +1 -0
  82. package/dist/landmarker-KB7LVXAU.js +1 -0
  83. package/dist/mrz-band-VYHOTDHY.js +1 -0
  84. package/dist/plan-runner-35655N4Z.js +1 -0
  85. package/dist/popup/index.cjs +1 -76
  86. package/dist/popup/index.d.cts +7 -1
  87. package/dist/popup/index.d.ts +7 -1
  88. package/dist/popup/index.js +1 -11
  89. package/dist/print-AYSCRSZB.js +1 -0
  90. package/dist/scanic-ml-stub-KW7IZHUT.js +1 -0
  91. package/dist/segmenter-USLNBX65.js +1 -0
  92. package/dist/turnstile-FATNZ4AG.js +1 -0
  93. package/dist/types-Dpfg2cO8.d.cts +1699 -0
  94. package/dist/types-Dpfg2cO8.d.ts +1699 -0
  95. package/dist/upload-file-UYXOHCRG.js +1 -0
  96. package/package.json +27 -11
  97. package/sbom.cdx.json +234 -0
  98. package/dist/capture-constraints-BujkZcfb.d.cts +0 -21
  99. package/dist/capture-constraints-BujkZcfb.d.ts +0 -21
  100. package/dist/chunk-BPYVZUJA.js +0 -852
  101. package/dist/chunk-BPYVZUJA.js.map +0 -1
  102. package/dist/chunk-LOTAJDRE.js +0 -1094
  103. package/dist/chunk-LOTAJDRE.js.map +0 -1
  104. package/dist/chunk-MWNFSNMP.js +0 -52
  105. package/dist/chunk-MWNFSNMP.js.map +0 -1
  106. package/dist/chunk-NILNKLK6.js +0 -50
  107. package/dist/chunk-NILNKLK6.js.map +0 -1
  108. package/dist/chunk-NWF46H7K.js +0 -359
  109. package/dist/chunk-NWF46H7K.js.map +0 -1
  110. package/dist/chunk-WY6U7AIK.js +0 -193
  111. package/dist/chunk-WY6U7AIK.js.map +0 -1
  112. package/dist/chunk-YVFF4Q4G.js +0 -327
  113. package/dist/chunk-YVFF4Q4G.js.map +0 -1
  114. package/dist/client/index.cjs.map +0 -1
  115. package/dist/client/index.js.map +0 -1
  116. package/dist/core/index.cjs.map +0 -1
  117. package/dist/core/index.js.map +0 -1
  118. package/dist/core/v3/detect-worker.cjs.map +0 -1
  119. package/dist/core/v3/detect-worker.js.map +0 -1
  120. package/dist/create-verification-CjLnJ0w6.d.ts +0 -348
  121. package/dist/create-verification-EnZ13uY4.d.cts +0 -348
  122. package/dist/detector-scanic-4C6IEW2K.js +0 -787
  123. package/dist/detector-scanic-4C6IEW2K.js.map +0 -1
  124. package/dist/hosted-client-BpvBqu9f.d.cts +0 -408
  125. package/dist/hosted-client-BpvBqu9f.d.ts +0 -408
  126. package/dist/index.cjs.map +0 -1
  127. package/dist/index.js.map +0 -1
  128. package/dist/internal/index.cjs.map +0 -1
  129. package/dist/internal/index.js.map +0 -1
  130. package/dist/popup/index.cjs.map +0 -1
  131. package/dist/popup/index.js.map +0 -1
  132. package/dist/scanic-ml-stub-S2OZ6HEF.js +0 -10
  133. package/dist/scanic-ml-stub-S2OZ6HEF.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,6 +1,111 @@
1
- export { C as CaptureChannel, a as CaptureError, b as CaptureErrorKind, c as CaptureState, d as CapturedArtifacts, D as DEFAULT_API_ORIGIN, G as GateHint, e as GateUpdate, L as LivenessCaptureEvents, f as LivenessCaptureHandle, g as LivenessCaptureOptions, R as ReasonCode, S as SdkFailureReason, V as Verification, h as VerificationEvents, i as VerificationLocale, j as VerificationOptions, k as VerificationResult, l as VerificationStatus, m as createLivenessCapture, n as createVerification } from './create-verification-EnZ13uY4.cjs';
1
+ import { D as DocumentCaptureOptions, a as DocumentCaptureHandle, P as PortraitCaptureOptions, b as PortraitCaptureHandle } from './create-verification-BBOUYpga.cjs';
2
+ export { A as AcceptedDocumentsLike, C as CameraFacing, c as CaptureChannel, d as CaptureEngineId, e as CaptureError, f as CaptureErrorDetail, g as CaptureErrorKind, h as CaptureErrorPhase, i as CaptureState, j as CapturedArtifacts, k as CapturedDocument, l as CapturedPortrait, m as ChoiceOptionSnapshot, n as ChoiceSnapshot, o as ChoiceStepHandle, p as ContactChoiceSnapshot, q as ContactChoiceStepHandle, r as DEFAULT_API_ORIGIN, s as DOCUMENT_TYPE_ORDER, t as DeriveStepEnv, u as DocumentCaptureEvents, v as DocumentCaptureState, w as DocumentFeedback, x as DocumentFeedbackKey, y as DocumentGateUpdate, z as DocumentGuide, B as DocumentGuideMeasure, E as DocumentLiveMrzOptions, F as DocumentMrzUpdate, G as DocumentPoint, H as DocumentQuad, I as DocumentReticle, J as DocumentScanPhase, K as DocumentScanUpdate, L as DocumentSide, M as DocumentSnapshot, N as DocumentStepHandle, O as EidSnapshot, Q as EidStepHandle, R as EmailOtpSnapshot, S as EmailOtpStepHandle, T as EmailSource, U as GateHint, V as GateUpdate, W as ISSUER_CODES, X as IdentitySummarySnapshot, Y as IdentitySummaryStepHandle, Z as InLaneSwitch, _ as LivePhotoGateUpdate, $ as LivePhotoPlan, a0 as LivenessAssetsStatus, a1 as LivenessCaptureEvents, a2 as LivenessCaptureHandle, a3 as LivenessCaptureOptions, a4 as LivenessSnapshot, a5 as LivenessStartOptions, a6 as LivenessStepHandle, a7 as MethodSnapshot, a8 as MethodStepHandle, a9 as MobileRequiredSnapshot, aa as MobileRequiredStepHandle, ab as OtpChannel, ac as OtpNumberSource, ad as PLATFORM_UNSUPPORTED, ae as PhoneOtpSnapshot, af as PhoneOtpStepHandle, ag as PhotoSourceState, ah as PlanChoiceSnapshot, ai as PortraitCaptureEvents, aj as PortraitCaptureState, ak as PortraitGateUpdate, al as PortraitSnapshot, am as PortraitStartOptions, an as PortraitStepHandle, ao as PreloadLivenessAssetsOptions, ap as ProcessingSnapshot, aq as ProcessingStepHandle, ar as ReasonCode, as as RegistrySnapshot, at as RegistrySource, au as RegistryStepHandle, av as ResultDisplay, aw as ResultSnapshot, ax as ResultStepHandle, ay as SdkFailureReason, az as StepAttempts, aA as StepContext, aB as StepSnapshot, aC as UnsupportedReason, aD as UnsupportedSnapshot, aE as UnsupportedStepHandle, aF as Verification, aG as VerificationBusy, aH as VerificationEvents, aI as VerificationLocale, aJ as VerificationOptions, aK as VerificationResult, aL as VerificationStatus, aM as VerificationStep, aN as WEB_IDENTITY_METHODS, aO as acceptedIssuers, aP as acceptedTypesFor, aQ as cameraUnavailableCauseOf, aR as createLivenessCapture, aS as createVerification, aT as deriveStep, aU as flagOf, aV as getLivenessAssetsStatus, aW as laneOf, aX as otherOptions, aY as preloadLivenessAssets, aZ as releaseLivenessAssets, a_ as resolveAcceptedDocuments, a$ as sectionOf, b0 as subscribeLivenessAssets } from './create-verification-BBOUYpga.cjs';
3
+ import { aG as ScreenRampColour } from './types-Dpfg2cO8.cjs';
4
+ export { A as AcceptedDocumentType, aH as AgeEstimationReason, aI as CameraUnavailableCause, aJ as CaptureIssueReport, b as CaptureMode, aK as CaptureProvenance, f as CheckReason, g as CheckState, h as CheckType, k as ContactChannel, D as DecisionReason, n as DocReason, E as EidAfterPass, p as EidAuthInput, q as EidReason, s as EmailOtpReason, t as FaceMatchReason, H as HostedAcceptedDocuments, aL as HostedBranding, aM as HostedBrandingColorKey, u as HostedCaptureTuning, v as HostedConsentView, w as HostedDocumentCaptureTuning, x as HostedDocumentScanTuning, y as HostedDocumentsView, z as HostedEidView, B as HostedEmailOtpView, G as HostedFlowRef, I as HostedIcaoPolicy, J as HostedIntegrity, K as HostedLivePhotoTuning, aN as HostedLivenessCaptureTuning, L as HostedNativeCaptureTuning, M as HostedOcrTuning, N as HostedOtpView, O as HostedPlanView, P as HostedPortraitPendingFix, Q as HostedPortraitView, R as HostedSessionView, S as HostedStepView, T as HostedVoiceLocale, U as HostedVoiceView, aO as IcaoCaptureTuning, V as IcaoCriterion, W as IcaoReportEntry, X as IdentityConfirmDecision, Y as IdentityMethod, Z as IdentitySummarySource, _ as IdentitySummaryView, a1 as LivenessReason, a2 as MatchReason, a4 as MethodChoiceView, a5 as NationalEidOption, a6 as NfcChipReason, a7 as NfcStepView, a8 as OtpChoiceView, a9 as PhoneCountryRule, aa as PhoneFormat, ac as PhoneOtpReason, ad as PhotoSource, ae as PhotoSourcePick, af as PlanAttempts, ag as PlanChoiceKind, ah as PlanChoiceOption, ai as PlanChoiceView, aj as PlanSectionView, ak as PlanStepView, al as PolicyFailureReason, an as PopulationReason, ao as PortraitFix, ap as PortraitFixReviewInput, aq as PortraitIcaoInput, ar as PortraitIcaoReason, as as PortraitOutputFormat, aw as ResolvedCaptureMode, aP as RetakeHint, aQ as ScreenRampChallenge, aR as ScreenRampRendered, aS as ScreenRampReport, ax as SessionFailureReason, ay as SessionOutcome, az as SessionStatus, aC as StepSection, aE as VerificationAssurance, aF as VerificationLevel } from './types-Dpfg2cO8.cjs';
2
5
  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 { C as CheckReason, a as CheckState, b as CheckType, D as DocReason, F as FaceMatchReason, H as HostedOtpView, c as HostedSessionView, d as HostedStepView, L as LivenessReason, P as PhoneOtpReason, e as PopulationReason, S as SessionOutcome, f as SessionStatus } from './hosted-client-BpvBqu9f.cjs';
5
- import './capture-session-v3-CAoWM8iT.cjs';
6
- import './detect-worker-CKXHlXx9.cjs';
6
+ export { H as HostedApiError, a as HostedErrorDetails, b as HostedErrorIssue, K as KNOWN_CODES, c as KnownCode, i as icaoPolicyOf, d as isKnownCode } from './icao-policy-C7fIdRzo.cjs';
7
+ export { c as HeadPose, I as IcaoCoachKey, d as IcaoCriterionState, e as IcaoGateCriterion, f as IcaoGateSummary, g as IcaoGateUpdate } from './icao-gate-l40OU6x1.cjs';
8
+ import './detect-worker-DclNxkZT.cjs';
9
+ import './capture-session-v3-CNL-GX11.cjs';
10
+
11
+ /** Each colour holds for 400 ms (the service measures the mean chroma per segment). */
12
+ declare const SCREEN_RAMP_SEGMENT_MS = 400;
13
+ /** The layer returns to transparent at 2,000 ms on the clip timeline (before the 2,500 ms clip ends). */
14
+ declare const SCREEN_RAMP_END_MS = 2000;
15
+ /** The closed palette, in the order the backend lists it. */
16
+ declare const SCREEN_RAMP_COLOURS: readonly ScreenRampColour[];
17
+ /** The CSS colour of a palette entry (`rgb(r, g, b)`). */
18
+ declare function screenRampColourValue(colour: ScreenRampColour): string;
19
+
20
+ /** Camera permission as the Permissions API reports it; `'unknown'` where it cannot tell. */
21
+ type CameraPermissionState = "granted" | "prompt" | "denied" | "unknown";
22
+ /** One-shot camera permission read. */
23
+ declare function queryCameraPermission(): Promise<CameraPermissionState>;
24
+ /**
25
+ * Subscribe to camera-permission changes; returns the unsubscribe function.
26
+ * Unlike {@link subscribeLivenessAssets}, it DOES emit the current state first
27
+ * (as soon as the Permissions API answers — asynchronously, `'unknown'` where
28
+ * unsupported), then on every change. Not a `useSyncExternalStore` source:
29
+ * there is no synchronous snapshot — drive a `useState` from it.
30
+ */
31
+ declare function subscribeCameraPermission(listener: (state: CameraPermissionState) => void): () => void;
32
+ /**
33
+ * Whether a front/back choice makes sense: phones and tablets (UA, incl. iPadOS's
34
+ * desktop UA) always have both; otherwise ≥ 2 `videoinput` devices. Before a
35
+ * permission was ever granted some desktops report a single placeholder — the
36
+ * in-capture switch remains available either way.
37
+ */
38
+ declare function hasMultipleCameras(): Promise<boolean>;
39
+
40
+ /** The document type of an ID number. @public */
41
+ type IdNumberType = "national_id" | "passport" | "residence_permit";
42
+ /** An ID number: the document type, the issuing country (ISO alpha-2) and the number. @public */
43
+ interface IdNumber {
44
+ type: IdNumberType;
45
+ /** ISO 3166-1 alpha-2 (alpha-3 accepted by {@link isValidIdNumber}). */
46
+ issuingCountry: string;
47
+ number: string;
48
+ }
49
+
50
+ /** A step action refused its input before any network call (nothing was submitted or billed). */
51
+ declare class InvalidInputError extends Error {
52
+ /**
53
+ * The refused input: `phone`, `code`, `idNumber` (the registry step's
54
+ * `submitIdNumber`) or `nni` (the deprecated `submitNni`, and the eID identifier).
55
+ */
56
+ readonly field: "phone" | "code" | "idNumber" | "nni";
57
+ readonly kind: "format" | "check_digit";
58
+ constructor(field: "phone" | "code" | "idNumber" | "nni", kind: "format" | "check_digit");
59
+ }
60
+ /**
61
+ * An OTP step action refused its input before any network call (Plan 8; nothing
62
+ * was submitted or billed): the phone OTP `channel` choice is `required`
63
+ * (several channels offered, none chosen) or `unavailable` (not one of the
64
+ * step's channels), or the email OTP `email` address has a bad `format`.
65
+ */
66
+ declare class OtpInputError extends Error {
67
+ readonly field: "channel" | "email";
68
+ readonly kind: "format" | "required" | "unavailable";
69
+ constructor(field: "channel" | "email", kind: "format" | "required" | "unavailable");
70
+ }
71
+
72
+ /**
73
+ * `true` when the number passes its issuing country's rule after normalizing (an MR
74
+ * national ID: 10 digits whose value is 1 mod 97; any other row: 1 to 40 letters,
75
+ * digits, spaces or hyphens). `issuingCountry` is alpha-2 or alpha-3; an unknown
76
+ * country uses the generic rule.
77
+ */
78
+ declare function isValidIdNumber(id: IdNumber): boolean;
79
+ /**
80
+ * @deprecated Use `isValidIdNumber({ type: "national_id", issuingCountry: "MR", number })`.
81
+ * `true` for exactly 10 ASCII digits whose value is 1 (mod 97), the Mauritanian national ID rule.
82
+ */
83
+ declare function isValidNni(nni: string): boolean;
84
+ /** Strip spaces and dashes; map Arabic-Indic (U+0660–0669) and extended (U+06F0–06F9) digits to ASCII. */
85
+ declare function normalizeDigits(input: string): string;
86
+ /** @deprecated Use {@link normalizeDigits} (the same function; it also serves OTP and eID codes). */
87
+ declare function normalizeNni(input: string): string;
88
+
89
+ /**
90
+ * The guided rear-camera document scanner for identity cards (ID-1 or ID-2),
91
+ * residence permits and passport data pages of any issuing country. Live camera
92
+ * only; `captured` delivers an upload-ready JPEG per face. The engine loads on
93
+ * the first `start()`.
94
+ */
95
+ declare function createDocumentCapture(options: DocumentCaptureOptions): DocumentCaptureHandle;
96
+ /** Prefetch the document engine (call when the document step mounts). */
97
+ declare function warmDocumentCapture(): void;
98
+
99
+ /**
100
+ * The ICAO portrait capture for sessions whose selfie is ICAO-checked
101
+ * (`icaoPolicyOf(view)` not null; pass its `policy`): front camera (a self capture), live
102
+ * per-criterion coaching (pose, eyes against the person's own baseline, mouth,
103
+ * framing, lighting, background, glare, resolution, sharpness) and an
104
+ * automatic full-resolution still once every criterion has held. The server
105
+ * re-checks every criterion. The engine loads on the first `start()`.
106
+ */
107
+ declare function createPortraitCapture(options: PortraitCaptureOptions): PortraitCaptureHandle;
108
+ /** Prefetch the portrait engine (call when the portrait step mounts). */
109
+ declare function warmPortraitCapture(): void;
110
+
111
+ export { type CameraPermissionState, DocumentCaptureHandle, DocumentCaptureOptions, type IdNumber, type IdNumberType, InvalidInputError, OtpInputError, PortraitCaptureHandle, PortraitCaptureOptions, SCREEN_RAMP_COLOURS, SCREEN_RAMP_END_MS, SCREEN_RAMP_SEGMENT_MS, ScreenRampColour, createDocumentCapture, createPortraitCapture, hasMultipleCameras, isValidIdNumber, isValidNni, normalizeDigits, normalizeNni, queryCameraPermission, screenRampColourValue, subscribeCameraPermission, warmDocumentCapture, warmPortraitCapture };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,111 @@
1
- export { C as CaptureChannel, a as CaptureError, b as CaptureErrorKind, c as CaptureState, d as CapturedArtifacts, D as DEFAULT_API_ORIGIN, G as GateHint, e as GateUpdate, L as LivenessCaptureEvents, f as LivenessCaptureHandle, g as LivenessCaptureOptions, R as ReasonCode, S as SdkFailureReason, V as Verification, h as VerificationEvents, i as VerificationLocale, j as VerificationOptions, k as VerificationResult, l as VerificationStatus, m as createLivenessCapture, n as createVerification } from './create-verification-CjLnJ0w6.js';
1
+ import { D as DocumentCaptureOptions, a as DocumentCaptureHandle, P as PortraitCaptureOptions, b as PortraitCaptureHandle } from './create-verification-COpe2hxf.js';
2
+ export { A as AcceptedDocumentsLike, C as CameraFacing, c as CaptureChannel, d as CaptureEngineId, e as CaptureError, f as CaptureErrorDetail, g as CaptureErrorKind, h as CaptureErrorPhase, i as CaptureState, j as CapturedArtifacts, k as CapturedDocument, l as CapturedPortrait, m as ChoiceOptionSnapshot, n as ChoiceSnapshot, o as ChoiceStepHandle, p as ContactChoiceSnapshot, q as ContactChoiceStepHandle, r as DEFAULT_API_ORIGIN, s as DOCUMENT_TYPE_ORDER, t as DeriveStepEnv, u as DocumentCaptureEvents, v as DocumentCaptureState, w as DocumentFeedback, x as DocumentFeedbackKey, y as DocumentGateUpdate, z as DocumentGuide, B as DocumentGuideMeasure, E as DocumentLiveMrzOptions, F as DocumentMrzUpdate, G as DocumentPoint, H as DocumentQuad, I as DocumentReticle, J as DocumentScanPhase, K as DocumentScanUpdate, L as DocumentSide, M as DocumentSnapshot, N as DocumentStepHandle, O as EidSnapshot, Q as EidStepHandle, R as EmailOtpSnapshot, S as EmailOtpStepHandle, T as EmailSource, U as GateHint, V as GateUpdate, W as ISSUER_CODES, X as IdentitySummarySnapshot, Y as IdentitySummaryStepHandle, Z as InLaneSwitch, _ as LivePhotoGateUpdate, $ as LivePhotoPlan, a0 as LivenessAssetsStatus, a1 as LivenessCaptureEvents, a2 as LivenessCaptureHandle, a3 as LivenessCaptureOptions, a4 as LivenessSnapshot, a5 as LivenessStartOptions, a6 as LivenessStepHandle, a7 as MethodSnapshot, a8 as MethodStepHandle, a9 as MobileRequiredSnapshot, aa as MobileRequiredStepHandle, ab as OtpChannel, ac as OtpNumberSource, ad as PLATFORM_UNSUPPORTED, ae as PhoneOtpSnapshot, af as PhoneOtpStepHandle, ag as PhotoSourceState, ah as PlanChoiceSnapshot, ai as PortraitCaptureEvents, aj as PortraitCaptureState, ak as PortraitGateUpdate, al as PortraitSnapshot, am as PortraitStartOptions, an as PortraitStepHandle, ao as PreloadLivenessAssetsOptions, ap as ProcessingSnapshot, aq as ProcessingStepHandle, ar as ReasonCode, as as RegistrySnapshot, at as RegistrySource, au as RegistryStepHandle, av as ResultDisplay, aw as ResultSnapshot, ax as ResultStepHandle, ay as SdkFailureReason, az as StepAttempts, aA as StepContext, aB as StepSnapshot, aC as UnsupportedReason, aD as UnsupportedSnapshot, aE as UnsupportedStepHandle, aF as Verification, aG as VerificationBusy, aH as VerificationEvents, aI as VerificationLocale, aJ as VerificationOptions, aK as VerificationResult, aL as VerificationStatus, aM as VerificationStep, aN as WEB_IDENTITY_METHODS, aO as acceptedIssuers, aP as acceptedTypesFor, aQ as cameraUnavailableCauseOf, aR as createLivenessCapture, aS as createVerification, aT as deriveStep, aU as flagOf, aV as getLivenessAssetsStatus, aW as laneOf, aX as otherOptions, aY as preloadLivenessAssets, aZ as releaseLivenessAssets, a_ as resolveAcceptedDocuments, a$ as sectionOf, b0 as subscribeLivenessAssets } from './create-verification-COpe2hxf.js';
3
+ import { aG as ScreenRampColour } from './types-Dpfg2cO8.js';
4
+ export { A as AcceptedDocumentType, aH as AgeEstimationReason, aI as CameraUnavailableCause, aJ as CaptureIssueReport, b as CaptureMode, aK as CaptureProvenance, f as CheckReason, g as CheckState, h as CheckType, k as ContactChannel, D as DecisionReason, n as DocReason, E as EidAfterPass, p as EidAuthInput, q as EidReason, s as EmailOtpReason, t as FaceMatchReason, H as HostedAcceptedDocuments, aL as HostedBranding, aM as HostedBrandingColorKey, u as HostedCaptureTuning, v as HostedConsentView, w as HostedDocumentCaptureTuning, x as HostedDocumentScanTuning, y as HostedDocumentsView, z as HostedEidView, B as HostedEmailOtpView, G as HostedFlowRef, I as HostedIcaoPolicy, J as HostedIntegrity, K as HostedLivePhotoTuning, aN as HostedLivenessCaptureTuning, L as HostedNativeCaptureTuning, M as HostedOcrTuning, N as HostedOtpView, O as HostedPlanView, P as HostedPortraitPendingFix, Q as HostedPortraitView, R as HostedSessionView, S as HostedStepView, T as HostedVoiceLocale, U as HostedVoiceView, aO as IcaoCaptureTuning, V as IcaoCriterion, W as IcaoReportEntry, X as IdentityConfirmDecision, Y as IdentityMethod, Z as IdentitySummarySource, _ as IdentitySummaryView, a1 as LivenessReason, a2 as MatchReason, a4 as MethodChoiceView, a5 as NationalEidOption, a6 as NfcChipReason, a7 as NfcStepView, a8 as OtpChoiceView, a9 as PhoneCountryRule, aa as PhoneFormat, ac as PhoneOtpReason, ad as PhotoSource, ae as PhotoSourcePick, af as PlanAttempts, ag as PlanChoiceKind, ah as PlanChoiceOption, ai as PlanChoiceView, aj as PlanSectionView, ak as PlanStepView, al as PolicyFailureReason, an as PopulationReason, ao as PortraitFix, ap as PortraitFixReviewInput, aq as PortraitIcaoInput, ar as PortraitIcaoReason, as as PortraitOutputFormat, aw as ResolvedCaptureMode, aP as RetakeHint, aQ as ScreenRampChallenge, aR as ScreenRampRendered, aS as ScreenRampReport, ax as SessionFailureReason, ay as SessionOutcome, az as SessionStatus, aC as StepSection, aE as VerificationAssurance, aF as VerificationLevel } from './types-Dpfg2cO8.js';
2
5
  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 { C as CheckReason, a as CheckState, b as CheckType, D as DocReason, F as FaceMatchReason, H as HostedOtpView, c as HostedSessionView, d as HostedStepView, L as LivenessReason, P as PhoneOtpReason, e as PopulationReason, S as SessionOutcome, f as SessionStatus } from './hosted-client-BpvBqu9f.js';
5
- import './capture-session-v3-BJ8ciaWl.js';
6
- import './detect-worker-CKXHlXx9.js';
6
+ export { H as HostedApiError, a as HostedErrorDetails, b as HostedErrorIssue, K as KNOWN_CODES, c as KnownCode, i as icaoPolicyOf, d as isKnownCode } from './icao-policy-BgI1Y870.js';
7
+ export { c as HeadPose, I as IcaoCoachKey, d as IcaoCriterionState, e as IcaoGateCriterion, f as IcaoGateSummary, g as IcaoGateUpdate } from './icao-gate-CEGvJR3q.js';
8
+ import './detect-worker-DclNxkZT.js';
9
+ import './capture-session-v3-DaBqN8fO.js';
10
+
11
+ /** Each colour holds for 400 ms (the service measures the mean chroma per segment). */
12
+ declare const SCREEN_RAMP_SEGMENT_MS = 400;
13
+ /** The layer returns to transparent at 2,000 ms on the clip timeline (before the 2,500 ms clip ends). */
14
+ declare const SCREEN_RAMP_END_MS = 2000;
15
+ /** The closed palette, in the order the backend lists it. */
16
+ declare const SCREEN_RAMP_COLOURS: readonly ScreenRampColour[];
17
+ /** The CSS colour of a palette entry (`rgb(r, g, b)`). */
18
+ declare function screenRampColourValue(colour: ScreenRampColour): string;
19
+
20
+ /** Camera permission as the Permissions API reports it; `'unknown'` where it cannot tell. */
21
+ type CameraPermissionState = "granted" | "prompt" | "denied" | "unknown";
22
+ /** One-shot camera permission read. */
23
+ declare function queryCameraPermission(): Promise<CameraPermissionState>;
24
+ /**
25
+ * Subscribe to camera-permission changes; returns the unsubscribe function.
26
+ * Unlike {@link subscribeLivenessAssets}, it DOES emit the current state first
27
+ * (as soon as the Permissions API answers — asynchronously, `'unknown'` where
28
+ * unsupported), then on every change. Not a `useSyncExternalStore` source:
29
+ * there is no synchronous snapshot — drive a `useState` from it.
30
+ */
31
+ declare function subscribeCameraPermission(listener: (state: CameraPermissionState) => void): () => void;
32
+ /**
33
+ * Whether a front/back choice makes sense: phones and tablets (UA, incl. iPadOS's
34
+ * desktop UA) always have both; otherwise ≥ 2 `videoinput` devices. Before a
35
+ * permission was ever granted some desktops report a single placeholder — the
36
+ * in-capture switch remains available either way.
37
+ */
38
+ declare function hasMultipleCameras(): Promise<boolean>;
39
+
40
+ /** The document type of an ID number. @public */
41
+ type IdNumberType = "national_id" | "passport" | "residence_permit";
42
+ /** An ID number: the document type, the issuing country (ISO alpha-2) and the number. @public */
43
+ interface IdNumber {
44
+ type: IdNumberType;
45
+ /** ISO 3166-1 alpha-2 (alpha-3 accepted by {@link isValidIdNumber}). */
46
+ issuingCountry: string;
47
+ number: string;
48
+ }
49
+
50
+ /** A step action refused its input before any network call (nothing was submitted or billed). */
51
+ declare class InvalidInputError extends Error {
52
+ /**
53
+ * The refused input: `phone`, `code`, `idNumber` (the registry step's
54
+ * `submitIdNumber`) or `nni` (the deprecated `submitNni`, and the eID identifier).
55
+ */
56
+ readonly field: "phone" | "code" | "idNumber" | "nni";
57
+ readonly kind: "format" | "check_digit";
58
+ constructor(field: "phone" | "code" | "idNumber" | "nni", kind: "format" | "check_digit");
59
+ }
60
+ /**
61
+ * An OTP step action refused its input before any network call (Plan 8; nothing
62
+ * was submitted or billed): the phone OTP `channel` choice is `required`
63
+ * (several channels offered, none chosen) or `unavailable` (not one of the
64
+ * step's channels), or the email OTP `email` address has a bad `format`.
65
+ */
66
+ declare class OtpInputError extends Error {
67
+ readonly field: "channel" | "email";
68
+ readonly kind: "format" | "required" | "unavailable";
69
+ constructor(field: "channel" | "email", kind: "format" | "required" | "unavailable");
70
+ }
71
+
72
+ /**
73
+ * `true` when the number passes its issuing country's rule after normalizing (an MR
74
+ * national ID: 10 digits whose value is 1 mod 97; any other row: 1 to 40 letters,
75
+ * digits, spaces or hyphens). `issuingCountry` is alpha-2 or alpha-3; an unknown
76
+ * country uses the generic rule.
77
+ */
78
+ declare function isValidIdNumber(id: IdNumber): boolean;
79
+ /**
80
+ * @deprecated Use `isValidIdNumber({ type: "national_id", issuingCountry: "MR", number })`.
81
+ * `true` for exactly 10 ASCII digits whose value is 1 (mod 97), the Mauritanian national ID rule.
82
+ */
83
+ declare function isValidNni(nni: string): boolean;
84
+ /** Strip spaces and dashes; map Arabic-Indic (U+0660–0669) and extended (U+06F0–06F9) digits to ASCII. */
85
+ declare function normalizeDigits(input: string): string;
86
+ /** @deprecated Use {@link normalizeDigits} (the same function; it also serves OTP and eID codes). */
87
+ declare function normalizeNni(input: string): string;
88
+
89
+ /**
90
+ * The guided rear-camera document scanner for identity cards (ID-1 or ID-2),
91
+ * residence permits and passport data pages of any issuing country. Live camera
92
+ * only; `captured` delivers an upload-ready JPEG per face. The engine loads on
93
+ * the first `start()`.
94
+ */
95
+ declare function createDocumentCapture(options: DocumentCaptureOptions): DocumentCaptureHandle;
96
+ /** Prefetch the document engine (call when the document step mounts). */
97
+ declare function warmDocumentCapture(): void;
98
+
99
+ /**
100
+ * The ICAO portrait capture for sessions whose selfie is ICAO-checked
101
+ * (`icaoPolicyOf(view)` not null; pass its `policy`): front camera (a self capture), live
102
+ * per-criterion coaching (pose, eyes against the person's own baseline, mouth,
103
+ * framing, lighting, background, glare, resolution, sharpness) and an
104
+ * automatic full-resolution still once every criterion has held. The server
105
+ * re-checks every criterion. The engine loads on the first `start()`.
106
+ */
107
+ declare function createPortraitCapture(options: PortraitCaptureOptions): PortraitCaptureHandle;
108
+ /** Prefetch the portrait engine (call when the portrait step mounts). */
109
+ declare function warmPortraitCapture(): void;
110
+
111
+ export { type CameraPermissionState, DocumentCaptureHandle, DocumentCaptureOptions, type IdNumber, type IdNumberType, InvalidInputError, OtpInputError, PortraitCaptureHandle, PortraitCaptureOptions, SCREEN_RAMP_COLOURS, SCREEN_RAMP_END_MS, SCREEN_RAMP_SEGMENT_MS, ScreenRampColour, createDocumentCapture, createPortraitCapture, hasMultipleCameras, isValidIdNumber, isValidNni, normalizeDigits, normalizeNni, queryCameraPermission, screenRampColourValue, subscribeCameraPermission, warmDocumentCapture, warmPortraitCapture };
package/dist/index.js CHANGED
@@ -1,28 +1 @@
1
- import {
2
- SEKYRO_EVENTS,
3
- openHosted
4
- } from "./chunk-NILNKLK6.js";
5
- import {
6
- DEFAULT_API_ORIGIN,
7
- createLivenessCapture,
8
- createVerification
9
- } from "./chunk-BPYVZUJA.js";
10
- import "./chunk-LOTAJDRE.js";
11
- import {
12
- HostedApiError,
13
- KNOWN_CODES,
14
- isKnownCode
15
- } from "./chunk-YVFF4Q4G.js";
16
- import "./chunk-NWF46H7K.js";
17
- import "./chunk-MWNFSNMP.js";
18
- export {
19
- DEFAULT_API_ORIGIN,
20
- HostedApiError,
21
- KNOWN_CODES,
22
- SEKYRO_EVENTS,
23
- createLivenessCapture,
24
- createVerification,
25
- isKnownCode,
26
- openHosted
27
- };
28
- //# sourceMappingURL=index.js.map
1
+ import{a as ee,c as te}from"./chunk-U6TYL2IJ.js";import{a as Y,f as z,h as W,i as f,j as y,k as h,l as P,m as R,n as J,o as q,p as Q,q as X,r as j,t as $}from"./chunk-KZBBB5B2.js";import{C,D as S}from"./chunk-5ZKQHFFW.js";import{e as G,f as U,g as B,h as F,o as K}from"./chunk-W2WD7PR2.js";import{b as x,c as b,d as V}from"./chunk-GT2ZLGF7.js";import{g as O,h as I,i as N,j as T}from"./chunk-FGOVIGGL.js";import"./chunk-FUHDOEBP.js";import"./chunk-POIQGEZM.js";import"./chunk-CQ7SKLMC.js";import"./chunk-FPXL63KZ.js";import{a as w,b as k,c as _,h as Z}from"./chunk-NJML6FMD.js";import"./chunk-ZLWH4RBO.js";import"./chunk-OKWG3PVH.js";function oe(e){if(e==="permission")return"denied";if(e==="notfound"||e==="insecure"||e==="unsupported")return"no_camera"}var re=/^[A-Z0-9][A-Z0-9 -]{0,39}$/,ne=Object.freeze({normalize:e=>e.trim().toUpperCase().replace(/\s+/g," "),check:e=>re.test(e),registrySources:Object.freeze([]),describe:"number must be 1 to 40 letters, digits, spaces or hyphens"});function ie(e){return typeof e=="string"&&/^\d{10}$/.test(e)&&Number(e)%97===1}var ae=Object.freeze({normalize:e=>e.trim(),check:e=>ie(e),registrySources:Object.freeze(["MR.anrpts"]),describe:"number must be the 10-digit Mauritanian national ID number with a valid check digit"}),se=Object.freeze({"MR:national_id":ae});function m(e,t){return se[`${e.toUpperCase()}:${t}`]??ne}var pe=Object.freeze({MRT:"MR"});function v(e,t){let r=e.trim().toUpperCase();return m(pe[r]??r,t)}function ue(e){let t=v(e.issuingCountry,e.type);return t.check(t.normalize(e.number))}function de(e){return m("MR","national_id").check(e)}function g(e){let t="";for(let r of e){let n=r.codePointAt(0)??0;n>=1632&&n<=1641?t+=String(n-1632):n>=1776&&n<=1785?t+=String(n-1776):r!==" "&&r!=="-"&&r!==" "&&(t+=r)}return t}function ce(e){return g(e)}var Le=f,Oe=y,Ie=h,Ne=P,Te=R;var M=()=>import("./create-document-capture-GJXBQMTC.js");function E(e){let t=null,r=null,n=!1,u=null,l=null,d=[],i=(o,s)=>{o.off=s.on(o.event,o.handler)},a=()=>(r??(r=M().then(o=>{if(n)return null;let s=o.createDocumentCaptureInternal(e,{}).handle;for(let c of d)c.removed||i(c,s);return u!==null&&s.setSide(u),l!==null&&s.setGuide(l.guide),t=s,s})),r),p=()=>a().catch(()=>{if(r=null,!n)for(let o of d)!o.removed&&o.event==="error"&&o.handler({kind:"generic",retryable:!0});return null});return{get state(){return t?.state??"idle"},on:(o,s)=>{let c={event:o,handler:s,off:null,removed:!1};return d.push(c),t!==null&&i(c,t),()=>{c.removed=!0,c.off?.()}},start:async()=>{let o=await p();o!==null&&!n&&await o.start()},retry:()=>{t!==null?t.retry():p().then(o=>o?.start())},setSide:o=>{t!==null?t.setSide(o):u=o},shutter:()=>t?.shutter(),setTorch:o=>t?.setTorch(o),focusAt:(o,s)=>t?.focusAt(o,s),setGuide:o=>{t!==null?t.setGuide(o):l={guide:o}},destroy:()=>{n=!0,t?.destroy(),t=null,d.length=0}}}function H(){M().then(e=>e.warmDocumentCapture()).catch(()=>{})}function Ue(e){return E(e)}function Be(){H()}var D=()=>import("./create-portrait-capture-MOS2D7CL.js");function A(e){let t=null,r=null,n=!1,u=[],l=(i,a)=>{i.off=a.on(i.event,i.handler)},d=()=>(r??(r=D().then(i=>{if(n)return null;let a=i.createPortraitCaptureInternal(e).handle;for(let p of u)p.removed||l(p,a);return t=a,a})),r);return{get state(){return t?.state??"idle"},get captureMode(){return t?.captureMode??"self"},get facingMode(){return t?.facingMode??"user"},on:(i,a)=>{let p={event:i,handler:a,off:null,removed:!1};return u.push(p),t!==null&&l(p,t),()=>{p.removed=!0,p.off?.()}},start:async i=>{let a=await d();a!==null&&!n&&await a.start(i)},retry:()=>{t!==null?t.retry():d().then(i=>i?.start())},switchCamera:()=>t?.switchCamera()??!1,destroy:()=>{n=!0,t?.destroy(),t=null,u.length=0}}}function L(){D().then(e=>e.warmPortraitCapture()).catch(()=>{})}function _e(e){return A(e)}function Ze(){L()}export{Y as DEFAULT_API_ORIGIN,Le as DOCUMENT_TYPE_ORDER,_ as HostedApiError,W as ISSUER_CODES,C as InvalidInputError,w as KNOWN_CODES,S as OtpInputError,q as PLATFORM_UNSUPPORTED,N as SCREEN_RAMP_COLOURS,I as SCREEN_RAMP_END_MS,O as SCREEN_RAMP_SEGMENT_MS,ee as SEKYRO_EVENTS,J as WEB_IDENTITY_METHODS,Ie as acceptedIssuers,Oe as acceptedTypesFor,oe as cameraUnavailableCauseOf,Ue as createDocumentCapture,K as createLivenessCapture,_e as createPortraitCapture,z as createVerification,$ as deriveStep,Te as flagOf,U as getLivenessAssetsStatus,V as hasMultipleCameras,Z as icaoPolicyOf,k as isKnownCode,ue as isValidIdNumber,de as isValidNni,X as laneOf,g as normalizeDigits,ce as normalizeNni,te as openHosted,j as otherOptions,G as preloadLivenessAssets,x as queryCameraPermission,F as releaseLivenessAssets,Ne as resolveAcceptedDocuments,T as screenRampColourValue,Q as sectionOf,b as subscribeCameraPermission,B as subscribeLivenessAssets,Be as warmDocumentCapture,Ze as warmPortraitCapture};