@sekyro/web 0.1.0-rc.10 → 0.1.0-rc.12

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 (55) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/{capture-session-doc-GK6G7JOI.js → capture-session-doc-KW5VR4IR.js} +1 -1
  3. package/dist/{capture-session-v3-DGG2stO6.d.ts → capture-session-v3-DqUUcIU-.d.ts} +34 -3
  4. package/dist/{capture-session-v3-CmJw_bK0.d.cts → capture-session-v3-xNtY5m-7.d.cts} +34 -3
  5. package/dist/{chunk-BAGSM67V.js → chunk-4IVRXJR2.js} +1 -1
  6. package/dist/chunk-6DPFJNGL.js +1 -0
  7. package/dist/{chunk-SEC64KZ3.js → chunk-73M7LS4H.js} +1 -1
  8. package/dist/chunk-EF52BRBD.js +1 -0
  9. package/dist/chunk-GT2ZLGF7.js +1 -0
  10. package/dist/chunk-IF6YOFFO.js +1 -0
  11. package/dist/chunk-MUVEJRGK.js +1 -0
  12. package/dist/{chunk-UGMHAFEY.js → chunk-OBLQOE66.js} +1 -1
  13. package/dist/chunk-U6TYL2IJ.js +1 -0
  14. package/dist/{chunk-FFDB6LQN.js → chunk-U6YQAQBD.js} +1 -1
  15. package/dist/chunk-Y7S7LYCL.js +1 -0
  16. package/dist/chunk-YZH5PR5R.js +1 -0
  17. package/dist/client/index.cjs +1 -1
  18. package/dist/client/index.d.cts +5 -3
  19. package/dist/client/index.d.ts +5 -3
  20. package/dist/client/index.js +1 -1
  21. package/dist/core/index.cjs +1 -1
  22. package/dist/core/index.d.cts +3 -2
  23. package/dist/core/index.d.ts +3 -2
  24. package/dist/core/index.js +1 -1
  25. package/dist/{create-document-capture-IGUQP2NS.js → create-document-capture-PXOJHLWV.js} +1 -1
  26. package/dist/{create-portrait-capture-RJSFY37D.js → create-portrait-capture-C462EIB6.js} +1 -1
  27. package/dist/{create-verification-Bb20j6zk.d.ts → create-verification-CDOTGHQj.d.ts} +87 -9
  28. package/dist/{create-verification-CtqF4A9W.d.cts → create-verification-D4749F6L.d.cts} +87 -9
  29. package/dist/icao-gate-BRuIgOE2.d.cts +503 -0
  30. package/dist/icao-gate-CphntEQ2.d.ts +503 -0
  31. package/dist/index.cjs +1 -1
  32. package/dist/index.d.cts +16 -5
  33. package/dist/index.d.ts +16 -5
  34. package/dist/index.js +1 -1
  35. package/dist/internal/index.cjs +1 -1
  36. package/dist/internal/index.d.cts +17 -8
  37. package/dist/internal/index.d.ts +17 -8
  38. package/dist/internal/index.js +1 -1
  39. package/dist/{plan-runner-QCK2SOGS.js → plan-runner-2FJLUALJ.js} +1 -1
  40. package/dist/popup/index.cjs +1 -1
  41. package/dist/popup/index.d.cts +7 -1
  42. package/dist/popup/index.d.ts +7 -1
  43. package/dist/popup/index.js +1 -1
  44. package/dist/{icao-gate-terzKYD7.d.cts → types-4rgeNIlz.d.cts} +179 -498
  45. package/dist/{icao-gate-terzKYD7.d.ts → types-4rgeNIlz.d.ts} +179 -498
  46. package/package.json +1 -1
  47. package/sbom.cdx.json +7 -7
  48. package/dist/chunk-3MSUJYBO.js +0 -1
  49. package/dist/chunk-ETY6SAAZ.js +0 -1
  50. package/dist/chunk-HAO6EQTH.js +0 -1
  51. package/dist/chunk-HWAXEQD5.js +0 -1
  52. package/dist/chunk-SXZCL5NO.js +0 -1
  53. package/dist/chunk-SZ7YGNUZ.js +0 -1
  54. package/dist/chunk-WKJJEPWA.js +0 -1
  55. package/dist/chunk-XR64UFLK.js +0 -1
@@ -1,10 +1,11 @@
1
- import { aZ as DocCatalogEntry, a_ as LiveMrzTuning, a$ as TextLockTuning, b0 as OcrEngineClient, b1 as DocAssistReport, b2 as ReadyInfo, b3 as LoadFailure, b4 as OcrEngineOptions, b5 as SubmitRuntime, a1 as LivenessCaptureOptions, a0 as LivenessCaptureHandle, aJ as VerificationStep, aH as VerificationResult, ay as StepSnapshot, Y as LivePhotoGateUpdate, b6 as HostedClientLike } from '../create-verification-CtqF4A9W.cjs';
2
- export { b7 as ANALYSIS_LONG_EDGE, b8 as ASPECT_BANDS, b9 as AttestationError, ba as BLUR_REFUSE_SHARPNESS_MAX, bb as BlurStatus, bc as CAPTURE_CANDIDATE_SPACING_MS, bd as CAPTURE_EXTRA_CANDIDATES, be as CLIP_MIME_ALLOWLIST, bf as CaptureEngine, bg as CaptureSessionDoc, bh as CaptureSessionDocEvents, bi as CaptureSessionDocOptions, bj as DOC_ANALYSIS_DEFAULTS, bk as DOC_CADENCE_HZ, bl as DOC_CAMERA_TUNING_DEFAULTS, bm as DOC_CATALOG, bn as DOC_DETECT_WIDTH, bo as DOC_FEEDBACK_STATES, bp as DOC_GATE_V1_DEFAULTS, bq as DOC_SHUTTER_DEFAULTS, br as DeviceReadHint, bs as DocArtifacts, bt as DocAssist, bu as DocAssistEngine, bv as DocAssistTick, bw as DocCameraTuning, bx as DocCaptureReport, by as DocCaptureVia, bz as DocChecksPayload, bA as DocEngineLike, bB as DocFeedbackAggregator, bC as DocFeedbackKey, bD as DocFeedbackState, bE as DocFormat, bF as DocFrameAnalysis, bG as DocFrameMeasures, bH as DocGateQuality, bI as DocGateThresholds, bJ as DocGateTick, bK as DocGateTickInput, bL as DocGateV1, bM as DocQuad, bN as DocQuadPoint, bO as DocShutterReason, bP as DocShutterTuning, bQ as DocSide, bR as DocumentCaptureController, bS as DocumentCaptureInternals, bT as EMPTY_GUIDE_METRICS, bU as EncodedDocument, bV as FLIP_FILL_MIN, bW as FLIP_GAP_MS, bX as FLIP_TIMEOUT_MS, bY as FocusCaps, bZ as FramingStatus, b_ as GUIDE_LOCK_DEFAULTS, b$ as GlareStatus, c0 as GrabbedFrame, c1 as GuideBlocker, c2 as GuideLock, c3 as GuideLockTick, c4 as GuideLockTuning, c5 as GuideMetrics, c6 as GuideRect, c7 as INFERENCE_RETRY_ATTEMPTS, c8 as INFERENCE_RETRY_DEFAULT_S, U as ISSUER_CODES, c9 as LANDMARKER_MODEL, ca as LENS_STORAGE_KEY, cb as LENS_TRY_MAX, cc as LIVE_MRZ_DEFAULTS, cd as LIVE_PHOTO_IDLE_MS, ce as LIVE_PHOTO_MAX_HZ, cf as LandmarkedFace, cg as LandmarkerLike, ch as LensKind, ci as LensSource, cj as LightingStatus, ck as LiveMrzCapture, cl as LiveMrzState, cm as LivePhotoGate, cn as LivePhotoKit, co as LivePhotoKitInternals, cp as LivePhotoKitOptions, cq as LivePhotoStill, cr as LivenessCaptureInternalHandle, cs as LivenessCaptureInternals, ct as LivenessFlowDeps, cu as LivenessFlowOutcome, cv as MANUAL_SHUTTER_MS, cw as MR_DOC_CATALOG, cx as NO_REPORT_MS, cy as OpenDocCameraDeps, cz as PORTRAIT_JPEG_QUALITY, cA as PRELOAD_BLAZE_INIT_TIMEOUT_MS, cB as PRELOAD_BUDGET_MS, cC as PROCESSING_POLL_DELAY_MS, cD as PROCESSING_POLL_MAX, cE as PortraitCaptureController, cF as PortraitCaptureInternals, cG as REGISTRY_RETRY_DELAY_MS, cH as ReticleType, cI as SAME_FACE_MAX_DROPS, cJ as ScanEvent, cK as ScanLayout, cL as ScanNotice, cM as ScanPhase, cN as ScanReport, cO as ScanSide, cP as ScanState, cQ as SubmitExecutor, cR as TEXT_LOCK_DEFAULTS, cS as TRANSPORT_REPLAY_ATTEMPTS, cT as TRANSPORT_REPLAY_DELAY_MS, cU as VerificationInternals, cV as analyzeDocFrame, cW as analyzeGuide, cX as aspectBand, cY as aspectFits, cZ as buildDeviceReadHint, c_ as coverPointToVideo, c$ as createDocumentCaptureInternal, d0 as createFaceLandmarker, d1 as createLivePhotoKit, d2 as createLivenessCaptureInternal, d3 as createPortraitCaptureInternal, d4 as createVerificationInternal, d5 as docZoomFor, d6 as encodeDocumentImage, d7 as facesOf, d8 as feedbackVoteOf, d9 as focusOk, da as guideQuad, db as guideRegionInFrame, dc as initialScanState, dd as lensKindOf, de as mapEngineState, df as mapErrorKind, dg as mapGuidanceHint, dh as nextScanState, di as observePortraitFrame, dj as openDocCamera, dk as passportBandOf, dl as portraitMatchStep, dm as preloadedDetectorFactory, dn as quadAreaFrac, dp as quadBounds, dq as quadIou, dr as quadTiltRatio, ds as randomUuid, dt as rankBackCameras, du as readStoredLens, dv as resetLivenessAssetsForTests, dw as resolveDocCameraTuning, dx as resolveDocShutterTuning, dy as resolveGuideLockTuning, dz as runLivenessFlow, dA as runSubmission, dB as scannerFormatFor, dC as setPreloadLoaderForTests, dD as settledHint, dE as singleShotFocusAt, dF as specularFraction, dG as supportsFocusMode, dH as warmDocDetector, dI as writeStoredLens } from '../create-verification-CtqF4A9W.cjs';
1
+ import { a_ as DocCatalogEntry, a$ as LiveMrzTuning, b0 as TextLockTuning, b1 as OcrEngineClient, b2 as DocAssistReport, b3 as ReadyInfo, b4 as LoadFailure, b5 as OcrEngineOptions, b6 as SubmitRuntime, a1 as LivenessCaptureOptions, a0 as LivenessCaptureHandle, aJ as VerificationStep, aH as VerificationResult, ay as StepSnapshot, Y as LivePhotoGateUpdate, b7 as HostedClientLike } from '../create-verification-D4749F6L.cjs';
2
+ export { b8 as ANALYSIS_LONG_EDGE, b9 as ASPECT_BANDS, ba as AttestationError, bb as BLUR_REFUSE_SHARPNESS_MAX, bc as BlurStatus, bd as CAPTURE_CANDIDATE_SPACING_MS, be as CAPTURE_EXTRA_CANDIDATES, bf as CLIP_MIME_ALLOWLIST, bg as CaptureEngine, bh as CaptureSessionDoc, bi as CaptureSessionDocEvents, bj as CaptureSessionDocOptions, bk as DOC_ANALYSIS_DEFAULTS, bl as DOC_CADENCE_HZ, bm as DOC_CAMERA_TUNING_DEFAULTS, bn as DOC_CATALOG, bo as DOC_DETECT_WIDTH, bp as DOC_FEEDBACK_STATES, bq as DOC_GATE_V1_DEFAULTS, br as DOC_SHUTTER_DEFAULTS, bs as DeviceReadHint, bt as DocArtifacts, bu as DocAssist, bv as DocAssistEngine, bw as DocAssistTick, bx as DocCameraTuning, by as DocCaptureReport, bz as DocCaptureVia, bA as DocChecksPayload, bB as DocEngineLike, bC as DocFeedbackAggregator, bD as DocFeedbackKey, bE as DocFeedbackState, bF as DocFormat, bG as DocFrameAnalysis, bH as DocFrameMeasures, bI as DocGateQuality, bJ as DocGateThresholds, bK as DocGateTick, bL as DocGateTickInput, bM as DocGateV1, bN as DocQuad, bO as DocQuadPoint, bP as DocShutterReason, bQ as DocShutterTuning, bR as DocSide, bS as DocumentCaptureController, bT as DocumentCaptureInternals, bU as EMPTY_GUIDE_METRICS, bV as EncodedDocument, bW as FLIP_FILL_MIN, bX as FLIP_GAP_MS, bY as FLIP_TIMEOUT_MS, bZ as FocusCaps, b_ as FramingStatus, b$ as GUIDE_LOCK_DEFAULTS, c0 as GlareStatus, c1 as GrabbedFrame, c2 as GuideBlocker, c3 as GuideLock, c4 as GuideLockTick, c5 as GuideLockTuning, c6 as GuideMetrics, c7 as GuideRect, c8 as INFERENCE_RETRY_ATTEMPTS, c9 as INFERENCE_RETRY_DEFAULT_S, U as ISSUER_CODES, ca as LANDMARKER_MODEL, cb as LENS_STORAGE_KEY, cc as LENS_TRY_MAX, cd as LIVE_MRZ_DEFAULTS, ce as LIVE_PHOTO_IDLE_MS, cf as LIVE_PHOTO_MAX_HZ, cg as LandmarkedFace, ch as LandmarkerLike, ci as LensKind, cj as LensSource, ck as LightingStatus, cl as LiveMrzCapture, cm as LiveMrzState, cn as LivePhotoGate, co as LivePhotoKit, cp as LivePhotoKitInternals, cq as LivePhotoKitOptions, cr as LivePhotoStill, cs as LivenessCaptureInternalHandle, ct as LivenessCaptureInternals, cu as LivenessFlowDeps, cv as LivenessFlowOutcome, cw as MANUAL_SHUTTER_MS, cx as MR_DOC_CATALOG, cy as NO_REPORT_MS, cz as OpenDocCameraDeps, cA as PORTRAIT_JPEG_QUALITY, cB as PRELOAD_BLAZE_INIT_TIMEOUT_MS, cC as PRELOAD_BUDGET_MS, cD as PROCESSING_POLL_DELAY_MS, cE as PROCESSING_POLL_MAX, cF as PortraitCaptureController, cG as PortraitCaptureInternals, cH as REGISTRY_RETRY_DELAY_MS, cI as ReticleType, cJ as SAME_FACE_MAX_DROPS, cK as ScanEvent, cL as ScanLayout, cM as ScanNotice, cN as ScanPhase, cO as ScanReport, cP as ScanSide, cQ as ScanState, cR as SubmitExecutor, cS as TEXT_LOCK_DEFAULTS, cT as TRANSPORT_REPLAY_ATTEMPTS, cU as TRANSPORT_REPLAY_DELAY_MS, cV as VerificationInternals, cW as analyzeDocFrame, cX as analyzeGuide, cY as aspectBand, cZ as aspectFits, c_ as buildDeviceReadHint, c$ as coverPointToVideo, d0 as createDocumentCaptureInternal, d1 as createFaceLandmarker, d2 as createLivePhotoKit, d3 as createLivenessCaptureInternal, d4 as createPortraitCaptureInternal, d5 as createVerificationInternal, d6 as docZoomFor, d7 as encodeDocumentImage, d8 as facesOf, d9 as feedbackVoteOf, da as focusOk, db as guideQuad, dc as guideRegionInFrame, dd as initialScanState, de as lensKindOf, df as mapEngineState, dg as mapErrorKind, dh as mapGuidanceHint, di as nextScanState, dj as observePortraitFrame, dk as openDocCamera, dl as passportBandOf, dm as portraitMatchStep, dn as preloadedDetectorFactory, dp as quadAreaFrac, dq as quadBounds, dr as quadIou, ds as quadTiltRatio, dt as randomUuid, du as rankBackCameras, dv as readStoredLens, dw as resetLivenessAssetsForTests, dx as resolveDocCameraTuning, dy as resolveDocShutterTuning, dz as resolveGuideLockTuning, dA as runLivenessFlow, dB as runSubmission, dC as scannerFormatFor, dD as setPreloadLoaderForTests, dE as settledHint, dF as singleShotFocusAt, dG as specularFraction, dH as supportsFocusMode, dI as warmDocDetector, dJ as writeStoredLens } from '../create-verification-D4749F6L.cjs';
3
3
  export { C as CENTERED_FACTOR, a as CIRCLE_RADIUS_FACTOR, F as FormFactor, I as IN_CIRCLE_FACTOR, d as detectFormFactor, c as detectIsMobile } from '../capture-constraints-B5omafmk.cjs';
4
- import { B as HostedSessionView, c as CheckType, a as CheckReason, a7 as PlanStepView } from '../icao-gate-terzKYD7.cjs';
5
- export { ag as BackgroundStats, ah as Box, ai as CLIPPED_LUMA, aj as FaceGeometry, ak as FaceLighting, H as HeadPose, al as ICAO_CANVAS, am as ICAO_FALLBACK, an as ICAO_GATE_CRITERIA, ao as ICAO_SHARP_REF, K as IcaoCaptureTuning, L as IcaoCoachKey, N as IcaoCriterionState, ap as IcaoFrameObservation, aq as IcaoGate, O as IcaoGateCriterion, ar as IcaoGateOptions, P as IcaoGateSummary, Q as IcaoGateUpdate, as as IcaoJudgedCriterion, at as IcaoMeasures, au as IcaoPixelStats, av as IcaoProfile, aw as LumaPlane, ax as Point, ay as RegionStats, az as ResolvedIcaoTuning, aA as backgroundStats, aB as createIcaoGate, aC as eyeLineRoll, aD as eyeOpenness, aE as eyeSpecular, aF as faceGeometry, aG as faceLighting, aH as faceSharpness, aI as icaoPixelStats, aJ as icaoWindow, aK as judgeIcao, aL as lumaPlane, aM as percentile, aN as portraitCropRegion, aO as poseFromMatrix, aP as regionStats, aQ as resolveIcaoTuning, aR as scoreFrame, aS as windowOverflow } from '../icao-gate-terzKYD7.cjs';
4
+ import { H as HostedSessionView, e as CheckType, k as CheckReason, ae as PlanStepView } from '../types-4rgeNIlz.cjs';
5
+ export { at as ICAO_FALLBACK, Y as IcaoCaptureTuning, au as IcaoProfile, R as ResolvedIcaoTuning, av as resolveIcaoTuning } from '../types-4rgeNIlz.cjs';
6
+ export { B as BackgroundStats, e as Box, C as CLIPPED_LUMA, F as FaceGeometry, f as FaceLighting, H as HeadPose, g as ICAO_CANVAS, h as ICAO_GATE_CRITERIA, i as ICAO_SHARP_REF, I as IcaoCoachKey, a as IcaoCriterionState, j as IcaoFrameObservation, k as IcaoGate, b as IcaoGateCriterion, l as IcaoGateOptions, c as IcaoGateSummary, d as IcaoGateUpdate, m as IcaoJudgedCriterion, n as IcaoMeasures, o as IcaoPixelStats, L as LumaPlane, P as Point, R as RegionStats, p as backgroundStats, q as createIcaoGate, r as eyeLineRoll, s as eyeOpenness, t as eyeSpecular, u as faceGeometry, v as faceLighting, w as faceSharpness, x as icaoPixelStats, y as icaoWindow, z as judgeIcao, A as lumaPlane, D as percentile, E as portraitCropRegion, G as poseFromMatrix, J as regionStats, K as scoreFrame, M as windowOverflow } from '../icao-gate-BRuIgOE2.cjs';
6
7
  import '../detect-worker-DclNxkZT.cjs';
7
- import '../capture-session-v3-CmJw_bK0.cjs';
8
+ import '../capture-session-v3-xNtY5m-7.cjs';
8
9
 
9
10
  type DocumentTypeId = DocCatalogEntry["docType"];
10
11
  /** Same shape as the hosted view's `acceptedDocuments`. */
@@ -322,7 +323,7 @@ declare function isExecutable(step: Pick<PlanStepView, "state"> | undefined): bo
322
323
  declare function isTerminalView(view: Pick<HostedSessionView, "status">): boolean;
323
324
  /** The step `plan.current` names while it can still be submitted (the backend's frontier). */
324
325
  declare function frontierStep(view: HostedSessionView): PlanStepView | undefined;
325
- /** The plan step of a check type (check types are unique on a session's path). */
326
+ /** The first plan step of a check type (a step-up lists two `face_match` nodes: see {@link matchAfterLiveness}). */
326
327
  declare function stepOf(view: HostedSessionView, checkType: CheckType): PlanStepView | undefined;
327
328
  /**
328
329
  * Map the session view to the public result:
@@ -337,9 +338,17 @@ declare function stepOf(view: HostedSessionView, checkType: CheckType): PlanStep
337
338
  * `review` with nothing executable left → `review`; otherwise `unavailable`
338
339
  * (a non-biometric frontier the SDK cannot drive, or still processing).
339
340
  */
340
- declare function mapSessionResult(view: HostedSessionView, opts: {
341
+ declare function mapSessionResult(view: HostedSessionView, opts: ResultOptions): VerificationResult;
342
+ /**
343
+ * Options of {@link mapSessionResult}: `autoRetry` (the host's opt-out of re-captures) and
344
+ * `previous`, the view the capture was submitted against (when the caller has it): a parked
345
+ * step whose `attempts.used` did not grow was VOIDED by the backend (a capture retake that
346
+ * costs nothing), so it is a retake whatever its reason.
347
+ */
348
+ interface ResultOptions {
341
349
  autoRetry: boolean;
342
- }): VerificationResult;
350
+ previous?: HostedSessionView;
351
+ }
343
352
 
344
353
  declare const TURNSTILE_SCRIPT_SRC = "https://challenges.cloudflare.com/turnstile/v0/api.js";
345
354
  /** Bound on a single execute round-trip (challenge fetch + solve). */
@@ -1,10 +1,11 @@
1
- import { aZ as DocCatalogEntry, a_ as LiveMrzTuning, a$ as TextLockTuning, b0 as OcrEngineClient, b1 as DocAssistReport, b2 as ReadyInfo, b3 as LoadFailure, b4 as OcrEngineOptions, b5 as SubmitRuntime, a1 as LivenessCaptureOptions, a0 as LivenessCaptureHandle, aJ as VerificationStep, aH as VerificationResult, ay as StepSnapshot, Y as LivePhotoGateUpdate, b6 as HostedClientLike } from '../create-verification-Bb20j6zk.js';
2
- export { b7 as ANALYSIS_LONG_EDGE, b8 as ASPECT_BANDS, b9 as AttestationError, ba as BLUR_REFUSE_SHARPNESS_MAX, bb as BlurStatus, bc as CAPTURE_CANDIDATE_SPACING_MS, bd as CAPTURE_EXTRA_CANDIDATES, be as CLIP_MIME_ALLOWLIST, bf as CaptureEngine, bg as CaptureSessionDoc, bh as CaptureSessionDocEvents, bi as CaptureSessionDocOptions, bj as DOC_ANALYSIS_DEFAULTS, bk as DOC_CADENCE_HZ, bl as DOC_CAMERA_TUNING_DEFAULTS, bm as DOC_CATALOG, bn as DOC_DETECT_WIDTH, bo as DOC_FEEDBACK_STATES, bp as DOC_GATE_V1_DEFAULTS, bq as DOC_SHUTTER_DEFAULTS, br as DeviceReadHint, bs as DocArtifacts, bt as DocAssist, bu as DocAssistEngine, bv as DocAssistTick, bw as DocCameraTuning, bx as DocCaptureReport, by as DocCaptureVia, bz as DocChecksPayload, bA as DocEngineLike, bB as DocFeedbackAggregator, bC as DocFeedbackKey, bD as DocFeedbackState, bE as DocFormat, bF as DocFrameAnalysis, bG as DocFrameMeasures, bH as DocGateQuality, bI as DocGateThresholds, bJ as DocGateTick, bK as DocGateTickInput, bL as DocGateV1, bM as DocQuad, bN as DocQuadPoint, bO as DocShutterReason, bP as DocShutterTuning, bQ as DocSide, bR as DocumentCaptureController, bS as DocumentCaptureInternals, bT as EMPTY_GUIDE_METRICS, bU as EncodedDocument, bV as FLIP_FILL_MIN, bW as FLIP_GAP_MS, bX as FLIP_TIMEOUT_MS, bY as FocusCaps, bZ as FramingStatus, b_ as GUIDE_LOCK_DEFAULTS, b$ as GlareStatus, c0 as GrabbedFrame, c1 as GuideBlocker, c2 as GuideLock, c3 as GuideLockTick, c4 as GuideLockTuning, c5 as GuideMetrics, c6 as GuideRect, c7 as INFERENCE_RETRY_ATTEMPTS, c8 as INFERENCE_RETRY_DEFAULT_S, U as ISSUER_CODES, c9 as LANDMARKER_MODEL, ca as LENS_STORAGE_KEY, cb as LENS_TRY_MAX, cc as LIVE_MRZ_DEFAULTS, cd as LIVE_PHOTO_IDLE_MS, ce as LIVE_PHOTO_MAX_HZ, cf as LandmarkedFace, cg as LandmarkerLike, ch as LensKind, ci as LensSource, cj as LightingStatus, ck as LiveMrzCapture, cl as LiveMrzState, cm as LivePhotoGate, cn as LivePhotoKit, co as LivePhotoKitInternals, cp as LivePhotoKitOptions, cq as LivePhotoStill, cr as LivenessCaptureInternalHandle, cs as LivenessCaptureInternals, ct as LivenessFlowDeps, cu as LivenessFlowOutcome, cv as MANUAL_SHUTTER_MS, cw as MR_DOC_CATALOG, cx as NO_REPORT_MS, cy as OpenDocCameraDeps, cz as PORTRAIT_JPEG_QUALITY, cA as PRELOAD_BLAZE_INIT_TIMEOUT_MS, cB as PRELOAD_BUDGET_MS, cC as PROCESSING_POLL_DELAY_MS, cD as PROCESSING_POLL_MAX, cE as PortraitCaptureController, cF as PortraitCaptureInternals, cG as REGISTRY_RETRY_DELAY_MS, cH as ReticleType, cI as SAME_FACE_MAX_DROPS, cJ as ScanEvent, cK as ScanLayout, cL as ScanNotice, cM as ScanPhase, cN as ScanReport, cO as ScanSide, cP as ScanState, cQ as SubmitExecutor, cR as TEXT_LOCK_DEFAULTS, cS as TRANSPORT_REPLAY_ATTEMPTS, cT as TRANSPORT_REPLAY_DELAY_MS, cU as VerificationInternals, cV as analyzeDocFrame, cW as analyzeGuide, cX as aspectBand, cY as aspectFits, cZ as buildDeviceReadHint, c_ as coverPointToVideo, c$ as createDocumentCaptureInternal, d0 as createFaceLandmarker, d1 as createLivePhotoKit, d2 as createLivenessCaptureInternal, d3 as createPortraitCaptureInternal, d4 as createVerificationInternal, d5 as docZoomFor, d6 as encodeDocumentImage, d7 as facesOf, d8 as feedbackVoteOf, d9 as focusOk, da as guideQuad, db as guideRegionInFrame, dc as initialScanState, dd as lensKindOf, de as mapEngineState, df as mapErrorKind, dg as mapGuidanceHint, dh as nextScanState, di as observePortraitFrame, dj as openDocCamera, dk as passportBandOf, dl as portraitMatchStep, dm as preloadedDetectorFactory, dn as quadAreaFrac, dp as quadBounds, dq as quadIou, dr as quadTiltRatio, ds as randomUuid, dt as rankBackCameras, du as readStoredLens, dv as resetLivenessAssetsForTests, dw as resolveDocCameraTuning, dx as resolveDocShutterTuning, dy as resolveGuideLockTuning, dz as runLivenessFlow, dA as runSubmission, dB as scannerFormatFor, dC as setPreloadLoaderForTests, dD as settledHint, dE as singleShotFocusAt, dF as specularFraction, dG as supportsFocusMode, dH as warmDocDetector, dI as writeStoredLens } from '../create-verification-Bb20j6zk.js';
1
+ import { a_ as DocCatalogEntry, a$ as LiveMrzTuning, b0 as TextLockTuning, b1 as OcrEngineClient, b2 as DocAssistReport, b3 as ReadyInfo, b4 as LoadFailure, b5 as OcrEngineOptions, b6 as SubmitRuntime, a1 as LivenessCaptureOptions, a0 as LivenessCaptureHandle, aJ as VerificationStep, aH as VerificationResult, ay as StepSnapshot, Y as LivePhotoGateUpdate, b7 as HostedClientLike } from '../create-verification-CDOTGHQj.js';
2
+ export { b8 as ANALYSIS_LONG_EDGE, b9 as ASPECT_BANDS, ba as AttestationError, bb as BLUR_REFUSE_SHARPNESS_MAX, bc as BlurStatus, bd as CAPTURE_CANDIDATE_SPACING_MS, be as CAPTURE_EXTRA_CANDIDATES, bf as CLIP_MIME_ALLOWLIST, bg as CaptureEngine, bh as CaptureSessionDoc, bi as CaptureSessionDocEvents, bj as CaptureSessionDocOptions, bk as DOC_ANALYSIS_DEFAULTS, bl as DOC_CADENCE_HZ, bm as DOC_CAMERA_TUNING_DEFAULTS, bn as DOC_CATALOG, bo as DOC_DETECT_WIDTH, bp as DOC_FEEDBACK_STATES, bq as DOC_GATE_V1_DEFAULTS, br as DOC_SHUTTER_DEFAULTS, bs as DeviceReadHint, bt as DocArtifacts, bu as DocAssist, bv as DocAssistEngine, bw as DocAssistTick, bx as DocCameraTuning, by as DocCaptureReport, bz as DocCaptureVia, bA as DocChecksPayload, bB as DocEngineLike, bC as DocFeedbackAggregator, bD as DocFeedbackKey, bE as DocFeedbackState, bF as DocFormat, bG as DocFrameAnalysis, bH as DocFrameMeasures, bI as DocGateQuality, bJ as DocGateThresholds, bK as DocGateTick, bL as DocGateTickInput, bM as DocGateV1, bN as DocQuad, bO as DocQuadPoint, bP as DocShutterReason, bQ as DocShutterTuning, bR as DocSide, bS as DocumentCaptureController, bT as DocumentCaptureInternals, bU as EMPTY_GUIDE_METRICS, bV as EncodedDocument, bW as FLIP_FILL_MIN, bX as FLIP_GAP_MS, bY as FLIP_TIMEOUT_MS, bZ as FocusCaps, b_ as FramingStatus, b$ as GUIDE_LOCK_DEFAULTS, c0 as GlareStatus, c1 as GrabbedFrame, c2 as GuideBlocker, c3 as GuideLock, c4 as GuideLockTick, c5 as GuideLockTuning, c6 as GuideMetrics, c7 as GuideRect, c8 as INFERENCE_RETRY_ATTEMPTS, c9 as INFERENCE_RETRY_DEFAULT_S, U as ISSUER_CODES, ca as LANDMARKER_MODEL, cb as LENS_STORAGE_KEY, cc as LENS_TRY_MAX, cd as LIVE_MRZ_DEFAULTS, ce as LIVE_PHOTO_IDLE_MS, cf as LIVE_PHOTO_MAX_HZ, cg as LandmarkedFace, ch as LandmarkerLike, ci as LensKind, cj as LensSource, ck as LightingStatus, cl as LiveMrzCapture, cm as LiveMrzState, cn as LivePhotoGate, co as LivePhotoKit, cp as LivePhotoKitInternals, cq as LivePhotoKitOptions, cr as LivePhotoStill, cs as LivenessCaptureInternalHandle, ct as LivenessCaptureInternals, cu as LivenessFlowDeps, cv as LivenessFlowOutcome, cw as MANUAL_SHUTTER_MS, cx as MR_DOC_CATALOG, cy as NO_REPORT_MS, cz as OpenDocCameraDeps, cA as PORTRAIT_JPEG_QUALITY, cB as PRELOAD_BLAZE_INIT_TIMEOUT_MS, cC as PRELOAD_BUDGET_MS, cD as PROCESSING_POLL_DELAY_MS, cE as PROCESSING_POLL_MAX, cF as PortraitCaptureController, cG as PortraitCaptureInternals, cH as REGISTRY_RETRY_DELAY_MS, cI as ReticleType, cJ as SAME_FACE_MAX_DROPS, cK as ScanEvent, cL as ScanLayout, cM as ScanNotice, cN as ScanPhase, cO as ScanReport, cP as ScanSide, cQ as ScanState, cR as SubmitExecutor, cS as TEXT_LOCK_DEFAULTS, cT as TRANSPORT_REPLAY_ATTEMPTS, cU as TRANSPORT_REPLAY_DELAY_MS, cV as VerificationInternals, cW as analyzeDocFrame, cX as analyzeGuide, cY as aspectBand, cZ as aspectFits, c_ as buildDeviceReadHint, c$ as coverPointToVideo, d0 as createDocumentCaptureInternal, d1 as createFaceLandmarker, d2 as createLivePhotoKit, d3 as createLivenessCaptureInternal, d4 as createPortraitCaptureInternal, d5 as createVerificationInternal, d6 as docZoomFor, d7 as encodeDocumentImage, d8 as facesOf, d9 as feedbackVoteOf, da as focusOk, db as guideQuad, dc as guideRegionInFrame, dd as initialScanState, de as lensKindOf, df as mapEngineState, dg as mapErrorKind, dh as mapGuidanceHint, di as nextScanState, dj as observePortraitFrame, dk as openDocCamera, dl as passportBandOf, dm as portraitMatchStep, dn as preloadedDetectorFactory, dp as quadAreaFrac, dq as quadBounds, dr as quadIou, ds as quadTiltRatio, dt as randomUuid, du as rankBackCameras, dv as readStoredLens, dw as resetLivenessAssetsForTests, dx as resolveDocCameraTuning, dy as resolveDocShutterTuning, dz as resolveGuideLockTuning, dA as runLivenessFlow, dB as runSubmission, dC as scannerFormatFor, dD as setPreloadLoaderForTests, dE as settledHint, dF as singleShotFocusAt, dG as specularFraction, dH as supportsFocusMode, dI as warmDocDetector, dJ as writeStoredLens } from '../create-verification-CDOTGHQj.js';
3
3
  export { C as CENTERED_FACTOR, a as CIRCLE_RADIUS_FACTOR, F as FormFactor, I as IN_CIRCLE_FACTOR, d as detectFormFactor, c as detectIsMobile } from '../capture-constraints-B5omafmk.js';
4
- import { B as HostedSessionView, c as CheckType, a as CheckReason, a7 as PlanStepView } from '../icao-gate-terzKYD7.js';
5
- export { ag as BackgroundStats, ah as Box, ai as CLIPPED_LUMA, aj as FaceGeometry, ak as FaceLighting, H as HeadPose, al as ICAO_CANVAS, am as ICAO_FALLBACK, an as ICAO_GATE_CRITERIA, ao as ICAO_SHARP_REF, K as IcaoCaptureTuning, L as IcaoCoachKey, N as IcaoCriterionState, ap as IcaoFrameObservation, aq as IcaoGate, O as IcaoGateCriterion, ar as IcaoGateOptions, P as IcaoGateSummary, Q as IcaoGateUpdate, as as IcaoJudgedCriterion, at as IcaoMeasures, au as IcaoPixelStats, av as IcaoProfile, aw as LumaPlane, ax as Point, ay as RegionStats, az as ResolvedIcaoTuning, aA as backgroundStats, aB as createIcaoGate, aC as eyeLineRoll, aD as eyeOpenness, aE as eyeSpecular, aF as faceGeometry, aG as faceLighting, aH as faceSharpness, aI as icaoPixelStats, aJ as icaoWindow, aK as judgeIcao, aL as lumaPlane, aM as percentile, aN as portraitCropRegion, aO as poseFromMatrix, aP as regionStats, aQ as resolveIcaoTuning, aR as scoreFrame, aS as windowOverflow } from '../icao-gate-terzKYD7.js';
4
+ import { H as HostedSessionView, e as CheckType, k as CheckReason, ae as PlanStepView } from '../types-4rgeNIlz.js';
5
+ export { at as ICAO_FALLBACK, Y as IcaoCaptureTuning, au as IcaoProfile, R as ResolvedIcaoTuning, av as resolveIcaoTuning } from '../types-4rgeNIlz.js';
6
+ export { B as BackgroundStats, e as Box, C as CLIPPED_LUMA, F as FaceGeometry, f as FaceLighting, H as HeadPose, g as ICAO_CANVAS, h as ICAO_GATE_CRITERIA, i as ICAO_SHARP_REF, I as IcaoCoachKey, a as IcaoCriterionState, j as IcaoFrameObservation, k as IcaoGate, b as IcaoGateCriterion, l as IcaoGateOptions, c as IcaoGateSummary, d as IcaoGateUpdate, m as IcaoJudgedCriterion, n as IcaoMeasures, o as IcaoPixelStats, L as LumaPlane, P as Point, R as RegionStats, p as backgroundStats, q as createIcaoGate, r as eyeLineRoll, s as eyeOpenness, t as eyeSpecular, u as faceGeometry, v as faceLighting, w as faceSharpness, x as icaoPixelStats, y as icaoWindow, z as judgeIcao, A as lumaPlane, D as percentile, E as portraitCropRegion, G as poseFromMatrix, J as regionStats, K as scoreFrame, M as windowOverflow } from '../icao-gate-CphntEQ2.js';
6
7
  import '../detect-worker-DclNxkZT.js';
7
- import '../capture-session-v3-DGG2stO6.js';
8
+ import '../capture-session-v3-DqUUcIU-.js';
8
9
 
9
10
  type DocumentTypeId = DocCatalogEntry["docType"];
10
11
  /** Same shape as the hosted view's `acceptedDocuments`. */
@@ -322,7 +323,7 @@ declare function isExecutable(step: Pick<PlanStepView, "state"> | undefined): bo
322
323
  declare function isTerminalView(view: Pick<HostedSessionView, "status">): boolean;
323
324
  /** The step `plan.current` names while it can still be submitted (the backend's frontier). */
324
325
  declare function frontierStep(view: HostedSessionView): PlanStepView | undefined;
325
- /** The plan step of a check type (check types are unique on a session's path). */
326
+ /** The first plan step of a check type (a step-up lists two `face_match` nodes: see {@link matchAfterLiveness}). */
326
327
  declare function stepOf(view: HostedSessionView, checkType: CheckType): PlanStepView | undefined;
327
328
  /**
328
329
  * Map the session view to the public result:
@@ -337,9 +338,17 @@ declare function stepOf(view: HostedSessionView, checkType: CheckType): PlanStep
337
338
  * `review` with nothing executable left → `review`; otherwise `unavailable`
338
339
  * (a non-biometric frontier the SDK cannot drive, or still processing).
339
340
  */
340
- declare function mapSessionResult(view: HostedSessionView, opts: {
341
+ declare function mapSessionResult(view: HostedSessionView, opts: ResultOptions): VerificationResult;
342
+ /**
343
+ * Options of {@link mapSessionResult}: `autoRetry` (the host's opt-out of re-captures) and
344
+ * `previous`, the view the capture was submitted against (when the caller has it): a parked
345
+ * step whose `attempts.used` did not grow was VOIDED by the backend (a capture retake that
346
+ * costs nothing), so it is a retake whatever its reason.
347
+ */
348
+ interface ResultOptions {
341
349
  autoRetry: boolean;
342
- }): VerificationResult;
350
+ previous?: HostedSessionView;
351
+ }
343
352
 
344
353
  declare const TURNSTILE_SCRIPT_SRC = "https://challenges.cloudflare.com/turnstile/v0/api.js";
345
354
  /** Bound on a single execute round-trip (challenge fetch + solve). */
@@ -1 +1 @@
1
- import{c as _e,d as Le,e as Re,g as Se,h as Te,i as ce}from"../chunk-WKJJEPWA.js";import{a as Bt,b as wt,c as zt,d as Vt,e as Xt,f as Zt,g as Jt,h as Qt,i as jt,j as ae,l as se,n as Ee,o as me}from"../chunk-SEC64KZ3.js";import{b as pe,c as ie,d as ne}from"../chunk-CJHMFPL6.js";import"../chunk-RI3E7GBN.js";import{a as d,b as M,c as F,d as N,e as v}from"../chunk-O5WKNZ2C.js";import{A as yt,B as ft,C as ut,D as Ot,E as At,F as It,G as xt,H as Ct,I as Pt,J as Dt,a as We,b as ke,c as Ke,d as Je,e as Qe,f as je,g as qe,h as $e,i as et,j as tt,k as rt,l as ot,m as pt,n as it,o as nt,p as at,q as st,r as Et,s as mt,t as _t,u as Lt,v as Rt,w as St,x as Tt,y as ct,z as lt}from"../chunk-UGMHAFEY.js";import{a as Ye,b as He}from"../chunk-SMKCBUJL.js";import{a as Be,b as we,c as ze,d as Ve,e as Xe,f as Ze}from"../chunk-MXWLCDFX.js";import{a as k,b as Fe,c as Ne,d as ve,e as ge,f as be,g as Ge,h as he,i as Ue,j as K,k as B,l as w,m as Z,n as J,o as Q,p as j,q,r as $,s as ee,t as te,u as re,x as oe}from"../chunk-FFDB6LQN.js";import{a as g,b,c as G,d as h,e as U,f as Y,g as H,h as W,i as z,j as V,l as X}from"../chunk-G6LKLN4U.js";import{a as xe,b as Ce,c as Pe,d as De,e as de,f as Me}from"../chunk-TDLIXFDT.js";import{a as dt,b as Mt,c as Ft,d as Nt,e as vt,f as gt,g as bt,h as Gt,i as ht,j as Ut,k as Yt,l as Ht,m as Wt}from"../chunk-7ZCZY3ZP.js";import{a as kt,b as Kt}from"../chunk-BPE5NSQ2.js";import"../chunk-GI3UFGRQ.js";import{b as ye,c as fe,d as ue,e as Oe,g as Ae,h as qt,i as $t,j as er,k as tr,l as rr,m as or,s as Ie}from"../chunk-3MSUJYBO.js";import{b as S,h as T,i as c,j as l,k as y,m as f,o as u,p as O,q as A,r as I,s as x,t as C,u as P,v as D}from"../chunk-XR64UFLK.js";import{a as i,b as n,c as a,d as s,i as E,j as m,k as _,l as L,m as R}from"../chunk-ETY6SAAZ.js";import"../chunk-HAO6EQTH.js";import"../chunk-SZ7YGNUZ.js";import{c as e,d as t,f as r,g as o,h as p}from"../chunk-FUHDOEBP.js";import"../chunk-POIQGEZM.js";import"../chunk-FHJ7HO3M.js";import"../chunk-FPXL63KZ.js";import"../chunk-HWAXEQD5.js";import"../chunk-BAGSM67V.js";import"../chunk-OKWG3PVH.js";import{a as le}from"../chunk-DFTCAWMP.js";import"../chunk-DK5YPBDQ.js";export{ae as ANALYSIS_LONG_EDGE,xe as ASPECT_BANDS,C as AttestationError,Ge as BLUR_REFUSE_SHARPNESS_MAX,Dt as CAPTURE_CANDIDATE_SPACING_MS,Pt as CAPTURE_EXTRA_CANDIDATES,p as CENTERED_FACTOR,r as CIRCLE_RADIUS_FACTOR,Bt as CLIPPED_LUMA,u as CLIP_MIME_ALLOWLIST,xt as CaptureSessionDoc,$t as DOCUMENT_TYPE_ORDER,Je as DOC_ANALYSIS_DEFAULTS,Ot as DOC_CADENCE_HZ,$e as DOC_CAMERA_TUNING_DEFAULTS,de as DOC_CATALOG,Be as DOC_DETECT_WIDTH,We as DOC_FEEDBACK_STATES,we as DOC_GATE_V1_DEFAULTS,At as DOC_SHUTTER_DEFAULTS,X as DocAssist,Ke as DocFeedbackAggregator,Ze as DocGateV1,Rt as EMPTY_GUIDE_METRICS,Ne as FLIP_FILL_MIN,Fe as FLIP_GAP_MS,ve as FLIP_TIMEOUT_MS,lt as GUIDE_LOCK_DEFAULTS,ft as GuideLock,Nt as ICAO_CANVAS,kt as ICAO_FALLBACK,Gt as ICAO_GATE_CRITERIA,wt as ICAO_SHARP_REF,I as INFERENCE_RETRY_ATTEMPTS,x as INFERENCE_RETRY_DEFAULT_S,o as IN_CIRCLE_FACTOR,qt as ISSUER_CODES,pe as LANDMARKER_MODEL,ot as LENS_STORAGE_KEY,_t as LENS_TRY_MAX,V as LIVE_MRZ_DEFAULTS,Le as LIVE_PHOTO_IDLE_MS,_e as LIVE_PHOTO_MAX_HZ,ge as MANUAL_SHUTTER_MS,Ye as MRZ_BAND_DEFAULTS,De as MR_DOC_CATALOG,be as NO_REPORT_MS,le as OCR_ASSET_SET,Te as OTP_RESEND_COOLDOWN_MS,se as PORTRAIT_JPEG_QUALITY,i as PRELOAD_BLAZE_INIT_TIMEOUT_MS,n as PRELOAD_BUDGET_MS,Se as PROCESSING_BACKOFF_MS,fe as PROCESSING_POLL_DELAY_MS,ue as PROCESSING_POLL_MAX,G as REGION_PAD,ye as REGISTRY_RETRY_DELAY_MS,S as RETRYABLE_REASONS,re as SAME_FACE_MAX_DROPS,g as SHARPNESS_LONG_EDGE,z as TEXT_LOCK_DEFAULTS,O as TRANSPORT_REPLAY_ATTEMPTS,A as TRANSPORT_REPLAY_DELAY_MS,M as TURNSTILE_EXECUTE_TIMEOUT_MS,d as TURNSTILE_SCRIPT_SRC,Q as WEB_OCR_ENGINE,tr as acceptedIssuers,er as acceptedTypesFor,qe as analyzeDocFrame,Tt as analyzeGuide,Ce as aspectBand,Pe as aspectFits,Jt as backgroundStats,$ as browserFamily,Z as buildDeviceReadHint,B as classifyCardSide,K as classifyCardSideWith,st as coverPointToVideo,oe as createDocumentCaptureInternal,ne as createFaceLandmarker,Wt as createIcaoGate,Re as createLivePhotoKit,R as createLivenessCaptureInternal,me as createPortraitCaptureInternal,ce as createStepRunner,Ae as createVerificationInternal,U as cropImage,e as detectFormFactor,t as detectIsMobile,He as detectMrzBand,Et as docZoomFor,k as encodeDocumentImage,v as executeTurnstile,Ft as eyeLineRoll,Ut as eyeOpenness,Zt as eyeSpecular,dt as faceGeometry,Xt as faceLighting,Qt as faceSharpness,ie as facesOf,ke as feedbackVoteOf,or as flagOf,mt as focusOk,te as formatMismatch,l as frontierStep,ct as guideQuad,St as guideRegionInFrame,jt as icaoPixelStats,vt as icaoWindow,he as initialScanState,T as isExecutable,c as isTerminalView,ht as judgeIcao,tt as lensKindOf,ee as liveMrzWireReport,N as loadTurnstile,zt as lumaPlane,_ as mapEngineState,L as mapErrorKind,m as mapGuidanceHint,f as mapSessionResult,W as measureBitmapSharpness,H as measureRegionSharpness,Ue as nextScanState,Ee as observePortraitFrame,Lt as openDocCamera,Ct as passportBandOf,Yt as percentile,b as photoSharpness,bt as portraitCropRegion,Ie as portraitMatchStep,Mt as poseFromMatrix,E as preloadedDetectorFactory,ze as quadAreaFrac,Xe as quadBounds,Ve as quadIou,je as quadTiltRatio,Oe as randomUuid,rt as rankBackCameras,pt as readStoredLens,Vt as regionStats,s as resetLivenessAssetsForTests,F as resetTurnstileForTests,Y as resizeLongEdge,rr as resolveAcceptedDocuments,et as resolveDocCameraTuning,It as resolveDocShutterTuning,yt as resolveGuideLockTuning,Kt as resolveIcaoTuning,j as resolveWebOcrPlan,D as runLivenessFlow,P as runSubmission,Me as scannerFormatFor,Ht as scoreFrame,a as setPreloadLoaderForTests,J as settledHint,at as singleShotFocusAt,Qe as specularFraction,q as startWebOcr,y as stepOf,h as stillRegionOf,w as stillToImageData,nt as supportsFocusMode,ut as warmDocDetector,gt as windowOverflow,it as writeStoredLens};
1
+ import{c as _e,d as Le,e as Re,g as Se,h as Te,i as ce}from"../chunk-6DPFJNGL.js";import{a as Bt,b as wt,c as zt,d as Vt,e as Xt,f as Zt,g as Jt,h as Qt,i as jt,j as ae,l as se,n as Ee,o as me}from"../chunk-73M7LS4H.js";import{b as pe,c as ie,d as ne}from"../chunk-CJHMFPL6.js";import"../chunk-RI3E7GBN.js";import{a as d,b as M,c as F,d as N,e as v}from"../chunk-O5WKNZ2C.js";import{A as yt,B as ft,C as ut,D as Ot,E as At,F as It,G as xt,H as Ct,I as Pt,J as Dt,a as We,b as ke,c as Ke,d as Je,e as Qe,f as je,g as qe,h as $e,i as et,j as tt,k as rt,l as ot,m as pt,n as it,o as nt,p as at,q as st,r as Et,s as mt,t as _t,u as Lt,v as Rt,w as St,x as Tt,y as ct,z as lt}from"../chunk-OBLQOE66.js";import{a as Ye,b as He}from"../chunk-SMKCBUJL.js";import{a as Be,b as we,c as ze,d as Ve,e as Xe,f as Ze}from"../chunk-MXWLCDFX.js";import{a as k,b as Fe,c as Ne,d as ve,e as ge,f as be,g as Ge,h as he,i as Ue,j as K,k as B,l as w,m as Z,n as J,o as Q,p as j,q,r as $,s as ee,t as te,u as re,x as oe}from"../chunk-U6YQAQBD.js";import{a as g,b,c as G,d as h,e as U,f as Y,g as H,h as W,i as z,j as V,l as X}from"../chunk-G6LKLN4U.js";import{a as xe,b as Ce,c as Pe,d as De,e as de,f as Me}from"../chunk-TDLIXFDT.js";import{a as dt,b as Mt,c as Ft,d as Nt,e as vt,f as gt,g as bt,h as Gt,i as ht,j as Ut,k as Yt,l as Ht,m as Wt}from"../chunk-7ZCZY3ZP.js";import{a as kt,b as Kt}from"../chunk-BPE5NSQ2.js";import"../chunk-GI3UFGRQ.js";import{b as ye,c as fe,d as ue,e as Oe,g as Ae,h as qt,i as $t,j as er,k as tr,l as rr,m as or,s as Ie}from"../chunk-Y7S7LYCL.js";import{b as S,h as T,i as c,j as l,k as y,m as f,o as u,p as O,q as A,r as I,s as x,t as C,u as P,v as D}from"../chunk-IF6YOFFO.js";import{a as i,b as n,c as a,d as s,i as E,j as m,k as _,l as L,m as R}from"../chunk-EF52BRBD.js";import"../chunk-GT2ZLGF7.js";import"../chunk-YZH5PR5R.js";import{c as e,d as t,f as r,g as o,h as p}from"../chunk-FUHDOEBP.js";import"../chunk-POIQGEZM.js";import"../chunk-FHJ7HO3M.js";import"../chunk-FPXL63KZ.js";import"../chunk-MUVEJRGK.js";import"../chunk-4IVRXJR2.js";import"../chunk-OKWG3PVH.js";import{a as le}from"../chunk-DFTCAWMP.js";import"../chunk-DK5YPBDQ.js";export{ae as ANALYSIS_LONG_EDGE,xe as ASPECT_BANDS,C as AttestationError,Ge as BLUR_REFUSE_SHARPNESS_MAX,Dt as CAPTURE_CANDIDATE_SPACING_MS,Pt as CAPTURE_EXTRA_CANDIDATES,p as CENTERED_FACTOR,r as CIRCLE_RADIUS_FACTOR,Bt as CLIPPED_LUMA,u as CLIP_MIME_ALLOWLIST,xt as CaptureSessionDoc,$t as DOCUMENT_TYPE_ORDER,Je as DOC_ANALYSIS_DEFAULTS,Ot as DOC_CADENCE_HZ,$e as DOC_CAMERA_TUNING_DEFAULTS,de as DOC_CATALOG,Be as DOC_DETECT_WIDTH,We as DOC_FEEDBACK_STATES,we as DOC_GATE_V1_DEFAULTS,At as DOC_SHUTTER_DEFAULTS,X as DocAssist,Ke as DocFeedbackAggregator,Ze as DocGateV1,Rt as EMPTY_GUIDE_METRICS,Ne as FLIP_FILL_MIN,Fe as FLIP_GAP_MS,ve as FLIP_TIMEOUT_MS,lt as GUIDE_LOCK_DEFAULTS,ft as GuideLock,Nt as ICAO_CANVAS,kt as ICAO_FALLBACK,Gt as ICAO_GATE_CRITERIA,wt as ICAO_SHARP_REF,I as INFERENCE_RETRY_ATTEMPTS,x as INFERENCE_RETRY_DEFAULT_S,o as IN_CIRCLE_FACTOR,qt as ISSUER_CODES,pe as LANDMARKER_MODEL,ot as LENS_STORAGE_KEY,_t as LENS_TRY_MAX,V as LIVE_MRZ_DEFAULTS,Le as LIVE_PHOTO_IDLE_MS,_e as LIVE_PHOTO_MAX_HZ,ge as MANUAL_SHUTTER_MS,Ye as MRZ_BAND_DEFAULTS,De as MR_DOC_CATALOG,be as NO_REPORT_MS,le as OCR_ASSET_SET,Te as OTP_RESEND_COOLDOWN_MS,se as PORTRAIT_JPEG_QUALITY,i as PRELOAD_BLAZE_INIT_TIMEOUT_MS,n as PRELOAD_BUDGET_MS,Se as PROCESSING_BACKOFF_MS,fe as PROCESSING_POLL_DELAY_MS,ue as PROCESSING_POLL_MAX,G as REGION_PAD,ye as REGISTRY_RETRY_DELAY_MS,S as RETRYABLE_REASONS,re as SAME_FACE_MAX_DROPS,g as SHARPNESS_LONG_EDGE,z as TEXT_LOCK_DEFAULTS,O as TRANSPORT_REPLAY_ATTEMPTS,A as TRANSPORT_REPLAY_DELAY_MS,M as TURNSTILE_EXECUTE_TIMEOUT_MS,d as TURNSTILE_SCRIPT_SRC,Q as WEB_OCR_ENGINE,tr as acceptedIssuers,er as acceptedTypesFor,qe as analyzeDocFrame,Tt as analyzeGuide,Ce as aspectBand,Pe as aspectFits,Jt as backgroundStats,$ as browserFamily,Z as buildDeviceReadHint,B as classifyCardSide,K as classifyCardSideWith,st as coverPointToVideo,oe as createDocumentCaptureInternal,ne as createFaceLandmarker,Wt as createIcaoGate,Re as createLivePhotoKit,R as createLivenessCaptureInternal,me as createPortraitCaptureInternal,ce as createStepRunner,Ae as createVerificationInternal,U as cropImage,e as detectFormFactor,t as detectIsMobile,He as detectMrzBand,Et as docZoomFor,k as encodeDocumentImage,v as executeTurnstile,Ft as eyeLineRoll,Ut as eyeOpenness,Zt as eyeSpecular,dt as faceGeometry,Xt as faceLighting,Qt as faceSharpness,ie as facesOf,ke as feedbackVoteOf,or as flagOf,mt as focusOk,te as formatMismatch,l as frontierStep,ct as guideQuad,St as guideRegionInFrame,jt as icaoPixelStats,vt as icaoWindow,he as initialScanState,T as isExecutable,c as isTerminalView,ht as judgeIcao,tt as lensKindOf,ee as liveMrzWireReport,N as loadTurnstile,zt as lumaPlane,_ as mapEngineState,L as mapErrorKind,m as mapGuidanceHint,f as mapSessionResult,W as measureBitmapSharpness,H as measureRegionSharpness,Ue as nextScanState,Ee as observePortraitFrame,Lt as openDocCamera,Ct as passportBandOf,Yt as percentile,b as photoSharpness,bt as portraitCropRegion,Ie as portraitMatchStep,Mt as poseFromMatrix,E as preloadedDetectorFactory,ze as quadAreaFrac,Xe as quadBounds,Ve as quadIou,je as quadTiltRatio,Oe as randomUuid,rt as rankBackCameras,pt as readStoredLens,Vt as regionStats,s as resetLivenessAssetsForTests,F as resetTurnstileForTests,Y as resizeLongEdge,rr as resolveAcceptedDocuments,et as resolveDocCameraTuning,It as resolveDocShutterTuning,yt as resolveGuideLockTuning,Kt as resolveIcaoTuning,j as resolveWebOcrPlan,D as runLivenessFlow,P as runSubmission,Me as scannerFormatFor,Ht as scoreFrame,a as setPreloadLoaderForTests,J as settledHint,at as singleShotFocusAt,Qe as specularFraction,q as startWebOcr,y as stepOf,h as stillRegionOf,w as stillToImageData,nt as supportsFocusMode,ut as warmDocDetector,gt as windowOverflow,it as writeStoredLens};
@@ -1 +1 @@
1
- import{e as _}from"./chunk-A3FUGHAH.js";import{a as O,b as B,e as F,f as w,i as U}from"./chunk-WKJJEPWA.js";import{o as A}from"./chunk-SEC64KZ3.js";import"./chunk-CJHMFPL6.js";import"./chunk-RI3E7GBN.js";import{A as T,F as x,i as L}from"./chunk-UGMHAFEY.js";import"./chunk-SMKCBUJL.js";import"./chunk-MXWLCDFX.js";import{x as V}from"./chunk-FFDB6LQN.js";import"./chunk-G6LKLN4U.js";import"./chunk-TDLIXFDT.js";import"./chunk-7ZCZY3ZP.js";import"./chunk-BPE5NSQ2.js";import"./chunk-GI3UFGRQ.js";import{a as M,n as I}from"./chunk-XR64UFLK.js";import"./chunk-ETY6SAAZ.js";import"./chunk-HAO6EQTH.js";import"./chunk-SZ7YGNUZ.js";import"./chunk-FUHDOEBP.js";import"./chunk-POIQGEZM.js";import"./chunk-FHJ7HO3M.js";import"./chunk-FPXL63KZ.js";import{g as H}from"./chunk-HWAXEQD5.js";import"./chunk-BAGSM67V.js";import"./chunk-OKWG3PVH.js";import"./chunk-DFTCAWMP.js";import"./chunk-DK5YPBDQ.js";function K(e){let a=null,c=Promise.resolve(),u=!1,g=null,y=null,C=null,h=!1,m=()=>{a?.controller.handle.destroy(),a=null},k=()=>{let i=e.currentView(),s=i===null?null:w(i,{isMobile:e.isMobile()});return s?.kind==="portrait"?s:null},P=async(i,s)=>{if(e.destroyed())return;s.setFlowState("uploading"),u=!1;let d=null;try{await e.runner().submit("portrait_icao",async(n,r)=>{if(d===null){let p=await I(n,"image","image/jpeg",i.image.size,{engine:"portrait"});await n.uploadToSpaces(p.uploadUrl,i.image,"image/jpeg"),d=(await n.completeMedia(p.key)).key}s.setFlowState("checking");let l={media:{portrait:d},gate:H(i.gate),...i.tuningVersion!==void 0?{tuningVersion:i.tuningVersion}:{}};return n.submitCheck("portrait_icao",l,{idempotencyKey:r})},()=>{g=d})}catch{u=!0}if(s.setFlowState("done"),e.destroyed())return;let t=k();(t===null||t.phase!=="capture")&&a?.controller===s&&m(),e.runner().republish()},b=i=>e.runner().submit("face_match",(s,d)=>s.submitCheck("face_match",g!==null?{imageKey:g}:{},{idempotencyKey:d})).then(()=>{},()=>{u=!0,i()});return{bind:(i,s)=>{if(i.phase==="match")return m(),y!==i.attemptsRemaining&&!u&&(y=i.attemptsRemaining,b(s)),{...i,uploadFailed:u,resubmit:()=>(u=!1,y=i.attemptsRemaining,s(),b(s)),capture:()=>{throw new Error("the portrait was already accepted")}};y=null;let d=e.keptPortraitInput?.()??null;return d!==null&&(h||d!==C&&i.report===null&&i.reason===void 0&&!i.retakeOnly)?(h||(C=d,h=!0,e.runner().submit("portrait_icao",(t,n)=>t.submitCheck("portrait_icao",d,{idempotencyKey:n}),()=>{g=d.media.portrait}).catch(()=>{}).finally(()=>{h=!1,s()})),{kind:"processing",key:"processing",context:i.context,section:i.section,stalled:!1,refresh:()=>Promise.resolve()}):{...i,uploadFailed:u,resubmit:()=>Promise.resolve(),capture:t=>{if(a!==null&&a.video===t.video)return a.controller.handle;m(),u=!1;let n=A({video:t.video,tuning:i.tuning,tuningVersion:i.tuningVersion,...i.icao!=null?{policy:i.icao.policy}:{},...t.keepScreenAwake!==void 0?{keepScreenAwake:t.keepScreenAwake}:{},...t.assetBaseUrl!==void 0?{assetBaseUrl:t.assetBaseUrl}:{}},e.internals,()=>e.destroyed()?"self":M(e.currentView()));return a={video:t.video,controller:n},n.handle.on("captured",r=>{c=c.then(()=>P(r,n)).catch(()=>{})}),n.handle}}},destroy:m}}function j(e){let a=e;if(typeof a.apiOrigin!="string"||typeof a.sessionToken!="string")return;let c=`${a.apiOrigin}/api/v2/hosted/capture-reports`,u=a.sessionToken;return g=>{try{fetch(c,{method:"POST",headers:{"content-type":"application/json","x-session-token":u},body:JSON.stringify({reports:g}),keepalive:!0}).catch(()=>{})}catch{}}}function E(e){let a=e.apiOrigin;return _("sdk",typeof a=="string"&&/staging|sandbox|localhost/.test(a)?"sandbox":"live")}function ue(e){let a=null,c=null,u=null,g=Promise.resolve(),y=()=>{u?.flow.handle.destroy(),u=null},C=async(t,n)=>{if(e.destroyed())return;n.setFlowState("uploading");let r=null,l,p=!1;try{await a.submit("doc_ocr",async(S,z)=>{if(r===null){let R=await I(S,"image","image/jpeg",t.image.size,{engine:"document"});await S.uploadToSpaces(R.uploadUrl,t.image,"image/jpeg"),r=(await S.completeMedia(R.key)).key}return n.setFlowState("checking"),l===void 0&&(l=n.takeDeviceRead(t)),S.submitCheck("doc_ocr",{imageKey:r,side:t.side,...l!==null?{deviceRead:l}:{}},{idempotencyKey:z})})}catch{p=!0}finally{n.setFlowState("done")}if(e.destroyed())return;if(p){n.settle(t.side,{ok:!1,issue:"technical"});return}let v=e.currentView(),o=v===null?null:w(v,{isMobile:e.isMobile()});if(o?.kind!=="document"){n.settle(t.side,{ok:!0}),u?.flow===n?y():n.handle.destroy();return}if(o.reason==="document_type_not_accepted"){c=null,u?.flow===n&&y(),a.republish();return}t.side==="single"||o.acceptedSides.includes(t.side)||o.reason==="side_missing"?(n.settle(t.side,{ok:!0}),c?.documentType!=="passport"&&n.handle.setSide(o.side)):n.settle(t.side,{ok:!1,issue:"reread"})},h=(t,n)=>({...t,issuer:c?.issuer??null,documentType:c?.documentType??null,captureSide:c===null?null:c.documentType==="passport"?"single":t.side,selectDocument:(r,l)=>{if(!B(t.documents).includes(r)||!O(t.documents,r).includes(l))throw new RangeError(`${l} from ${r} is not accepted`);(c?.issuer!==r||c.documentType!==l)&&y(),c={issuer:r,documentType:l},n()},capture:r=>{if(c===null)throw new Error("selectDocument() first");if(u!==null&&u.video===r.video)return u.flow.handle;y();let l=c,p=l.documentType==="passport"?"single":t.acceptedSides.length>0?t.side:void 0,v=V({video:r.video,documentType:l.documentType,issuer:l.issuer,...p!==void 0?{side:p}:{},...r.keepScreenAwake!==void 0?{keepScreenAwake:r.keepScreenAwake}:{},...r.liveMrz!==void 0?{liveMrz:r.liveMrz}:{}},{...e.documentInternals??{},...(()=>{let o=e.currentView()?.capture?.document,f=e.documentInternals?.blurRefuseSharpnessMax??o?.scan?.blurRefuseSharpnessMax;return{engineOptions:{camera:L(o?.camera),shutter:x(o?.scan),guideLock:T(o?.guide),...e.documentInternals?.engineOptions??{}},...typeof f=="number"&&Number.isFinite(f)&&f>=0&&f<=1?{blurRefuseSharpnessMax:f}:{}}})(),deferRead:!0,...(()=>{let o=e.currentView();if(o===null||e.documentInternals?.webOcr!==void 0)return{};let f=j(e.runtime.client);return{webOcr:{captureDocument:o.capture?.document,salt:o.sessionId,baseUrl:E(e.runtime.client),...f!==void 0?{reports:f}:{}}}})()});return u={video:r.video,flow:v},v.handle.on("captured",o=>{g=g.then(()=>C(o,v)).catch(()=>{})}),v.handle}}),m=null,k=null,P=new Set,b=e.runtime.client;e.runtime.client=new Proxy(b,{get(t,n){if(n==="submitCheck")return(k??t).submitCheck.bind(k??t);let r=Reflect.get(t,n);return typeof r=="function"?r.bind(t):r}});let D=()=>{m?.destroy(),m=null,k=null},i=t=>{let n=e.currentView(),r=n===null?null:w(n,{isMobile:e.isMobile()});if(n===null||r?.kind!=="liveness"||r.livePhoto?.icao!==!0)return;if(m===null){let o=F({tuning:n.capture?.icao??null,tuningVersion:n.capture?.tuningVersion??null,...r.icao!=null?{policy:r.icao.policy}:{},still:r.livePhoto.still,...t.assetBaseUrl!==void 0?{assetBaseUrl:t.assetBaseUrl}:{}},e.livePhotoInternals);m=o,k=o.decorate(b),o.onGate(f=>{for(let S of P)S(f)})}let l=m,p=e.baseCapture??{},v=p.engineOptions?.telemetry;return{...p,engineOptions:{...p.engineOptions??{},measureQuality:l.engineOptions.measureQuality,telemetry:o=>{v?.(o),l.engineOptions.telemetry(o)}}}},s=K({keptPortraitInput:()=>m?.lastPortraitInput()??null,runner:()=>a,currentView:e.currentView,destroyed:e.destroyed,isMobile:e.isMobile,...e.portraitInternals!==void 0?{internals:e.portraitInternals}:{}}),d=U({...e,bindDocument:h,bindPortrait:s.bind,onLivePhoto:t=>(P.add(t),()=>P.delete(t))});return a=d,{...d,captureInternals:i,destroy:()=>{y(),s.destroy(),D(),P.clear()}}}export{ue as createPlanRunner,E as sdkAssetBase};
1
+ import{e as _}from"./chunk-A3FUGHAH.js";import{a as O,b as B,e as F,f as w,i as U}from"./chunk-6DPFJNGL.js";import{o as A}from"./chunk-73M7LS4H.js";import"./chunk-CJHMFPL6.js";import"./chunk-RI3E7GBN.js";import{A as T,F as x,i as L}from"./chunk-OBLQOE66.js";import"./chunk-SMKCBUJL.js";import"./chunk-MXWLCDFX.js";import{x as V}from"./chunk-U6YQAQBD.js";import"./chunk-G6LKLN4U.js";import"./chunk-TDLIXFDT.js";import"./chunk-7ZCZY3ZP.js";import"./chunk-BPE5NSQ2.js";import"./chunk-GI3UFGRQ.js";import{a as M,n as I}from"./chunk-IF6YOFFO.js";import"./chunk-EF52BRBD.js";import"./chunk-GT2ZLGF7.js";import"./chunk-YZH5PR5R.js";import"./chunk-FUHDOEBP.js";import"./chunk-POIQGEZM.js";import"./chunk-FHJ7HO3M.js";import"./chunk-FPXL63KZ.js";import{g as H}from"./chunk-MUVEJRGK.js";import"./chunk-4IVRXJR2.js";import"./chunk-OKWG3PVH.js";import"./chunk-DFTCAWMP.js";import"./chunk-DK5YPBDQ.js";function K(e){let a=null,c=Promise.resolve(),u=!1,g=null,y=null,C=null,h=!1,m=()=>{a?.controller.handle.destroy(),a=null},k=()=>{let i=e.currentView(),s=i===null?null:w(i,{isMobile:e.isMobile()});return s?.kind==="portrait"?s:null},P=async(i,s)=>{if(e.destroyed())return;s.setFlowState("uploading"),u=!1;let d=null;try{await e.runner().submit("portrait_icao",async(n,r)=>{if(d===null){let p=await I(n,"image","image/jpeg",i.image.size,{engine:"portrait"});await n.uploadToSpaces(p.uploadUrl,i.image,"image/jpeg"),d=(await n.completeMedia(p.key)).key}s.setFlowState("checking");let l={media:{portrait:d},gate:H(i.gate),...i.tuningVersion!==void 0?{tuningVersion:i.tuningVersion}:{}};return n.submitCheck("portrait_icao",l,{idempotencyKey:r})},()=>{g=d})}catch{u=!0}if(s.setFlowState("done"),e.destroyed())return;let t=k();(t===null||t.phase!=="capture")&&a?.controller===s&&m(),e.runner().republish()},b=i=>e.runner().submit("face_match",(s,d)=>s.submitCheck("face_match",g!==null?{imageKey:g}:{},{idempotencyKey:d})).then(()=>{},()=>{u=!0,i()});return{bind:(i,s)=>{if(i.phase==="match")return m(),y!==i.attemptsRemaining&&!u&&(y=i.attemptsRemaining,b(s)),{...i,uploadFailed:u,resubmit:()=>(u=!1,y=i.attemptsRemaining,s(),b(s)),capture:()=>{throw new Error("the portrait was already accepted")}};y=null;let d=e.keptPortraitInput?.()??null;return d!==null&&(h||d!==C&&i.report===null&&i.reason===void 0&&!i.retakeOnly)?(h||(C=d,h=!0,e.runner().submit("portrait_icao",(t,n)=>t.submitCheck("portrait_icao",d,{idempotencyKey:n}),()=>{g=d.media.portrait}).catch(()=>{}).finally(()=>{h=!1,s()})),{kind:"processing",key:"processing",context:i.context,section:i.section,stalled:!1,refresh:()=>Promise.resolve()}):{...i,uploadFailed:u,resubmit:()=>Promise.resolve(),capture:t=>{if(a!==null&&a.video===t.video)return a.controller.handle;m(),u=!1;let n=A({video:t.video,tuning:i.tuning,tuningVersion:i.tuningVersion,...i.icao!=null?{policy:i.icao.policy}:{},...t.keepScreenAwake!==void 0?{keepScreenAwake:t.keepScreenAwake}:{},...t.assetBaseUrl!==void 0?{assetBaseUrl:t.assetBaseUrl}:{}},e.internals,()=>e.destroyed()?"self":M(e.currentView()));return a={video:t.video,controller:n},n.handle.on("captured",r=>{c=c.then(()=>P(r,n)).catch(()=>{})}),n.handle}}},destroy:m}}function j(e){let a=e;if(typeof a.apiOrigin!="string"||typeof a.sessionToken!="string")return;let c=`${a.apiOrigin}/api/v2/hosted/capture-reports`,u=a.sessionToken;return g=>{try{fetch(c,{method:"POST",headers:{"content-type":"application/json","x-session-token":u},body:JSON.stringify({reports:g}),keepalive:!0}).catch(()=>{})}catch{}}}function E(e){let a=e.apiOrigin;return _("sdk",typeof a=="string"&&/staging|sandbox|localhost/.test(a)?"sandbox":"live")}function ue(e){let a=null,c=null,u=null,g=Promise.resolve(),y=()=>{u?.flow.handle.destroy(),u=null},C=async(t,n)=>{if(e.destroyed())return;n.setFlowState("uploading");let r=null,l,p=!1;try{await a.submit("doc_ocr",async(S,z)=>{if(r===null){let R=await I(S,"image","image/jpeg",t.image.size,{engine:"document"});await S.uploadToSpaces(R.uploadUrl,t.image,"image/jpeg"),r=(await S.completeMedia(R.key)).key}return n.setFlowState("checking"),l===void 0&&(l=n.takeDeviceRead(t)),S.submitCheck("doc_ocr",{imageKey:r,side:t.side,...l!==null?{deviceRead:l}:{}},{idempotencyKey:z})})}catch{p=!0}finally{n.setFlowState("done")}if(e.destroyed())return;if(p){n.settle(t.side,{ok:!1,issue:"technical"});return}let v=e.currentView(),o=v===null?null:w(v,{isMobile:e.isMobile()});if(o?.kind!=="document"){n.settle(t.side,{ok:!0}),u?.flow===n?y():n.handle.destroy();return}if(o.reason==="document_type_not_accepted"){c=null,u?.flow===n&&y(),a.republish();return}t.side==="single"||o.acceptedSides.includes(t.side)||o.reason==="side_missing"?(n.settle(t.side,{ok:!0}),c?.documentType!=="passport"&&n.handle.setSide(o.side)):n.settle(t.side,{ok:!1,issue:"reread"})},h=(t,n)=>({...t,issuer:c?.issuer??null,documentType:c?.documentType??null,captureSide:c===null?null:c.documentType==="passport"?"single":t.side,selectDocument:(r,l)=>{if(!B(t.documents).includes(r)||!O(t.documents,r).includes(l))throw new RangeError(`${l} from ${r} is not accepted`);(c?.issuer!==r||c.documentType!==l)&&y(),c={issuer:r,documentType:l},n()},capture:r=>{if(c===null)throw new Error("selectDocument() first");if(u!==null&&u.video===r.video)return u.flow.handle;y();let l=c,p=l.documentType==="passport"?"single":t.acceptedSides.length>0?t.side:void 0,v=V({video:r.video,documentType:l.documentType,issuer:l.issuer,...p!==void 0?{side:p}:{},...r.keepScreenAwake!==void 0?{keepScreenAwake:r.keepScreenAwake}:{},...r.liveMrz!==void 0?{liveMrz:r.liveMrz}:{}},{...e.documentInternals??{},...(()=>{let o=e.currentView()?.capture?.document,f=e.documentInternals?.blurRefuseSharpnessMax??o?.scan?.blurRefuseSharpnessMax;return{engineOptions:{camera:L(o?.camera),shutter:x(o?.scan),guideLock:T(o?.guide),...e.documentInternals?.engineOptions??{}},...typeof f=="number"&&Number.isFinite(f)&&f>=0&&f<=1?{blurRefuseSharpnessMax:f}:{}}})(),deferRead:!0,...(()=>{let o=e.currentView();if(o===null||e.documentInternals?.webOcr!==void 0)return{};let f=j(e.runtime.client);return{webOcr:{captureDocument:o.capture?.document,salt:o.sessionId,baseUrl:E(e.runtime.client),...f!==void 0?{reports:f}:{}}}})()});return u={video:r.video,flow:v},v.handle.on("captured",o=>{g=g.then(()=>C(o,v)).catch(()=>{})}),v.handle}}),m=null,k=null,P=new Set,b=e.runtime.client;e.runtime.client=new Proxy(b,{get(t,n){if(n==="submitCheck")return(k??t).submitCheck.bind(k??t);let r=Reflect.get(t,n);return typeof r=="function"?r.bind(t):r}});let D=()=>{m?.destroy(),m=null,k=null},i=t=>{let n=e.currentView(),r=n===null?null:w(n,{isMobile:e.isMobile()});if(n===null||r?.kind!=="liveness"||r.livePhoto?.icao!==!0)return;if(m===null){let o=F({tuning:n.capture?.icao??null,tuningVersion:n.capture?.tuningVersion??null,...r.icao!=null?{policy:r.icao.policy}:{},still:r.livePhoto.still,...t.assetBaseUrl!==void 0?{assetBaseUrl:t.assetBaseUrl}:{}},e.livePhotoInternals);m=o,k=o.decorate(b),o.onGate(f=>{for(let S of P)S(f)})}let l=m,p=e.baseCapture??{},v=p.engineOptions?.telemetry;return{...p,engineOptions:{...p.engineOptions??{},measureQuality:l.engineOptions.measureQuality,telemetry:o=>{v?.(o),l.engineOptions.telemetry(o)}}}},s=K({keptPortraitInput:()=>m?.lastPortraitInput()??null,runner:()=>a,currentView:e.currentView,destroyed:e.destroyed,isMobile:e.isMobile,...e.portraitInternals!==void 0?{internals:e.portraitInternals}:{}}),d=U({...e,bindDocument:h,bindPortrait:s.bind,onLivePhoto:t=>(P.add(t),()=>P.delete(t))});return a=d,{...d,captureInternals:i,destroy:()=>{y(),s.destroy(),D(),P.clear()}}}export{ue as createPlanRunner,E as sdkAssetBase};
@@ -1 +1 @@
1
- "use strict";var s=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var f=(n,e)=>{for(var t in e)s(n,t,{get:e[t],enumerable:!0})},y=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of E(e))!l.call(n,o)&&o!==t&&s(n,o,{get:()=>e[o],enumerable:!(r=a(e,o))||r.enumerable});return n};var k=n=>y(s({},"__esModule",{value:!0}),n);var m={};f(m,{SEKYRO_EVENTS:()=>i,open:()=>p,openHosted:()=>x});module.exports=k(m);var i=["session.completed","session.failed","session.review_pending","session.expired","session.cancelled"],S="sekyro-verify",g="width=480,height=720,noopener=false",w=new Set(i);function O(n){if(n===null||typeof n!="object")return!1;let e=n;return e.source==="sekyro"&&e.version===1&&typeof e.sessionId=="string"&&typeof e.event=="string"&&w.has(e.event)}function p(n){let e=new URL(n.hostedUrl).origin,t=window.open(n.hostedUrl,S,g);if(!t)return{error:"popup_blocked"};let r=o=>{if(o.source!==t||o.origin!==e||!O(o.data))return;let{source:d,version:c,event:v,sessionId:u}=o.data;n.onEvent({source:d,version:c,event:v,sessionId:u})};return window.addEventListener("message",r),{close(){window.removeEventListener("message",r),t.close()}}}function x(n,e){return e.mode==="redirect"?(window.location.assign(n),{close(){}}):p({hostedUrl:n,onEvent:e.onEvent??(()=>{})})}0&&(module.exports={SEKYRO_EVENTS,open,openHosted});
1
+ "use strict";var s=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var S=(n,e)=>{for(var t in e)s(n,t,{get:e[t],enumerable:!0})},k=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of f(e))!y.call(n,o)&&o!==t&&s(n,o,{get:()=>e[o],enumerable:!(r=E(e,o))||r.enumerable});return n};var g=n=>k(s({},"__esModule",{value:!0}),n);var h={};S(h,{SEKYRO_EVENTS:()=>d,open:()=>c,openHosted:()=>_});module.exports=g(h);var d=["session.completed","session.failed","session.review_pending","session.expired","session.cancelled"],w=new Set([0,1,2,3]),O="sekyro-verify",N="width=480,height=720,noopener=false",x=new Set(d);function m(n){if(n===null||typeof n!="object")return!1;let e=n;return e.source==="sekyro"&&e.version===1&&typeof e.sessionId=="string"&&typeof e.event=="string"&&x.has(e.event)}function c(n){let e=new URL(n.hostedUrl).origin,t=window.open(n.hostedUrl,O,N);if(!t)return{error:"popup_blocked"};let r=o=>{if(o.source!==t||o.origin!==e||!m(o.data))return;let{source:l,version:v,event:u,sessionId:a,level:i}=o.data,p={source:l,version:v,event:u,sessionId:a};w.has(i)&&(p.level=i),n.onEvent(p)};return window.addEventListener("message",r),{close(){window.removeEventListener("message",r),t.close()}}}function _(n,e){return e.mode==="redirect"?(window.location.assign(n),{close(){}}):c({hostedUrl:n,onEvent:e.onEvent??(()=>{})})}0&&(module.exports={SEKYRO_EVENTS,open,openHosted});
@@ -2,12 +2,18 @@
2
2
  declare const SEKYRO_EVENTS: readonly ["session.completed", "session.failed", "session.review_pending", "session.expired", "session.cancelled"];
3
3
  /** One SDK event name — webhook-catalog terminal names + `session.cancelled`. */
4
4
  type SekyroEventName = (typeof SEKYRO_EVENTS)[number];
5
- /** The frozen postMessage payload: event name + sessionId ONLY. */
5
+ /** The frozen postMessage payload: event name + sessionId, plus the level when known. */
6
6
  interface SekyroEvent {
7
7
  source: "sekyro";
8
8
  version: 1;
9
9
  event: SekyroEventName;
10
10
  sessionId: string;
11
+ /**
12
+ * What the session proved (`1` live person, `2` identity, `3` corroborated,
13
+ * `0` rejected), on a terminal event when the hosted page knows it. A
14
+ * display hint only: confirm server-side.
15
+ */
16
+ level?: 0 | 1 | 2 | 3;
11
17
  }
12
18
  interface OpenOptions {
13
19
  /** The `hosted_url` returned by `POST /api/v2/sessions` (create result). */
@@ -2,12 +2,18 @@
2
2
  declare const SEKYRO_EVENTS: readonly ["session.completed", "session.failed", "session.review_pending", "session.expired", "session.cancelled"];
3
3
  /** One SDK event name — webhook-catalog terminal names + `session.cancelled`. */
4
4
  type SekyroEventName = (typeof SEKYRO_EVENTS)[number];
5
- /** The frozen postMessage payload: event name + sessionId ONLY. */
5
+ /** The frozen postMessage payload: event name + sessionId, plus the level when known. */
6
6
  interface SekyroEvent {
7
7
  source: "sekyro";
8
8
  version: 1;
9
9
  event: SekyroEventName;
10
10
  sessionId: string;
11
+ /**
12
+ * What the session proved (`1` live person, `2` identity, `3` corroborated,
13
+ * `0` rejected), on a terminal event when the hosted page knows it. A
14
+ * display hint only: confirm server-side.
15
+ */
16
+ level?: 0 | 1 | 2 | 3;
11
17
  }
12
18
  interface OpenOptions {
13
19
  /** The `hosted_url` returned by `POST /api/v2/sessions` (create result). */
@@ -1 +1 @@
1
- import{a,b,c}from"../chunk-SXZCL5NO.js";export{a as SEKYRO_EVENTS,b as open,c as openHosted};
1
+ import{a,b,c}from"../chunk-U6TYL2IJ.js";export{a as SEKYRO_EVENTS,b as open,c as openHosted};