@sekyro/web 0.1.0-rc.34 → 0.1.0-rc.36

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 (48) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{capture-session-doc-GCL2FYQH.js → capture-session-doc-LKMMJG4H.js} +1 -1
  3. package/dist/{capture-session-v3-BS2Rl4Kp.d.cts → capture-session-v3-DaRhtwrC.d.cts} +1 -1
  4. package/dist/{capture-session-v3-CYh0Jmyf.d.ts → capture-session-v3-_JtEhXUz.d.ts} +1 -1
  5. package/dist/{chunk-UVZ5R4CI.js → chunk-2J6R5JOJ.js} +1 -1
  6. package/dist/{chunk-CHWTIUYK.js → chunk-AIRC3HT7.js} +1 -1
  7. package/dist/{chunk-DSNJ2ERA.js → chunk-EF4VD4GD.js} +1 -1
  8. package/dist/{chunk-AJPVHUZR.js → chunk-H2ZUHMIC.js} +2 -2
  9. package/dist/{chunk-JFTEP2WJ.js → chunk-K7ICBHSZ.js} +1 -1
  10. package/dist/{chunk-M3KW2MY3.js → chunk-KCUXJT7L.js} +1 -1
  11. package/dist/{chunk-7KI6HWCZ.js → chunk-NMPMXAH3.js} +1 -1
  12. package/dist/chunk-VZGTOE22.js +1 -0
  13. package/dist/chunk-W42RLLAC.js +1 -0
  14. package/dist/chunk-XFATG7QI.js +1 -0
  15. package/dist/{chunk-NXNQQXYJ.js → chunk-XON3UNG3.js} +1 -1
  16. package/dist/client/index.cjs +1 -1
  17. package/dist/client/index.d.cts +3 -3
  18. package/dist/client/index.d.ts +3 -3
  19. package/dist/client/index.js +1 -1
  20. package/dist/core/index.cjs +1 -1
  21. package/dist/core/index.d.cts +3 -3
  22. package/dist/core/index.d.ts +3 -3
  23. package/dist/core/index.js +1 -1
  24. package/dist/create-document-capture-PG6NLCPH.js +1 -0
  25. package/dist/{create-verification-YC-R5v_z.d.ts → create-verification-Bda1l0t0.d.ts} +8 -3
  26. package/dist/{create-verification-DmK48vdr.d.cts → create-verification-C58r4HV-.d.cts} +8 -3
  27. package/dist/{detector-scanic-QVQVJI3C.js → detector-scanic-GGIKCF6B.js} +1 -1
  28. package/dist/{icao-gate-Dj4kIwna.d.cts → icao-gate-67SejsPE.d.cts} +14 -3
  29. package/dist/{icao-gate-BGhxz9O2.d.ts → icao-gate-CjdvLXEu.d.ts} +14 -3
  30. package/dist/{icao-policy-D4QqzA0b.d.cts → icao-policy-CJsmf9Vh.d.cts} +2 -2
  31. package/dist/{icao-policy-D48k64KJ.d.ts → icao-policy-COdRM4m_.d.ts} +2 -2
  32. package/dist/index.cjs +3 -3
  33. package/dist/index.d.cts +7 -7
  34. package/dist/index.d.ts +7 -7
  35. package/dist/index.js +1 -1
  36. package/dist/internal/index.cjs +2 -2
  37. package/dist/internal/index.d.cts +6 -6
  38. package/dist/internal/index.d.ts +6 -6
  39. package/dist/internal/index.js +1 -1
  40. package/dist/{plan-runner-HBUVNDGH.js → plan-runner-BZ7LODPB.js} +1 -1
  41. package/dist/{types-BjzuJVOc.d.cts → types-BOfzAhqF.d.cts} +9 -0
  42. package/dist/{types-BjzuJVOc.d.ts → types-BOfzAhqF.d.ts} +9 -0
  43. package/package.json +1 -1
  44. package/sbom.cdx.json +19 -19
  45. package/dist/chunk-ERCKQV6V.js +0 -1
  46. package/dist/chunk-LTMDEMCV.js +0 -1
  47. package/dist/chunk-Y5C4YJQT.js +0 -1
  48. package/dist/create-document-capture-IMDGCTMM.js +0 -1
@@ -1,12 +1,12 @@
1
- import { bc as SubmitRuntime, a9 as LivenessCaptureOptions, a8 as LivenessCaptureHandle, aX as VerificationStep, aV as VerificationResult, aM as StepSnapshot, a4 as LivePhotoGateUpdate, bd as HostedClientLike, be as DocCatalogEntry, bf as DeviceTier, bg as LiveMrzTuning, bh as TextLockTuning, bi as OcrEngineClient, bj as DocAssistReport, bk as ReadyInfo, bl as LoadFailure, bm as OcrEngineOptions } from '../create-verification-DmK48vdr.cjs';
2
- export { bn as ANALYSIS_LONG_EDGE, bo as ASPECT_BANDS, bp as AttestationError, bq as BLUR_REFUSE_SHARPNESS_MAX, br as BlurStatus, bs as CAPTURE_CANDIDATE_SPACING_MS, bt as CAPTURE_EXTRA_CANDIDATES, bu as CHALLENGE_EXECUTE_TIMEOUT_MS, bv as CHALLENGE_READY_TIMEOUT_MS, bw as CLIP_MIME_ALLOWLIST, bx as CaptureEngine, by as CaptureSessionDoc, bz as CaptureSessionDocEvents, bA as CaptureSessionDocOptions, bB as ChallengeAction, bC as ChallengeError, m as ChallengeErrorCode, bD as DOC_ANALYSIS_DEFAULTS, bE as DOC_BLACK_FRAME_LUMA, bF as DOC_BLACK_FRAME_TICKS, bG as DOC_CADENCE_HZ, bH as DOC_CAMERA_TUNING_DEFAULTS, bI as DOC_CATALOG, bJ as DOC_DETECT_WIDTH, bK as DOC_FEEDBACK_STATES, bL as DOC_FIRST_FRAME_MS, bM as DOC_GATE_V1_DEFAULTS, bN as DOC_SHUTTER_DEFAULTS, bO as DeviceReadHint, bP as DocArtifacts, bQ as DocAssist, bR as DocAssistEngine, bS as DocAssistTick, bT as DocCameraTuning, bU as DocCaptureReport, bV as DocCaptureVia, bW as DocChecksPayload, bX as DocEngineLike, bY as DocFeedbackAggregator, bZ as DocFeedbackKey, b_ as DocFeedbackState, b$ as DocFormat, c0 as DocFrameAnalysis, c1 as DocFrameMeasures, c2 as DocGateQuality, c3 as DocGateThresholds, c4 as DocGateTick, c5 as DocGateTickInput, c6 as DocGateV1, c7 as DocQuad, c8 as DocQuadPoint, c9 as DocShutterReason, ca as DocShutterTuning, cb as DocSide, cc as DocumentCaptureController, cd as DocumentCaptureInternals, ce as EMPTY_GUIDE_METRICS, cf as EncodedDocument, cg as ExecuteChallengeOptions, ch as FLIP_FILL_MIN, ci as FLIP_GAP_MS, cj as FLIP_TIMEOUT_MS, ck as FocusCaps, cl as FramingStatus, cm as GUIDE_LOCK_DEFAULTS, cn as GlareStatus, co as GrabbedFrame, cp as GuideBlocker, cq as GuideLock, cr as GuideLockTick, cs as GuideLockTuning, ct as GuideMetrics, cu as GuideRect, cv as INFERENCE_RETRY_ATTEMPTS, cw as INFERENCE_RETRY_DEFAULT_S, a0 as ISSUER_CODES, cx as LANDMARKER_MODEL, cy as LENS_STORAGE_KEY, cz as LIVE_MRZ_DEFAULTS, cA as LIVE_PHOTO_IDLE_MS, cB as LIVE_PHOTO_MAX_HZ, cC as LandmarkedFace, cD as LandmarkerLike, cE as LensSource, cF as LightingStatus, cG as LiveMrzCapture, cH as LiveMrzState, cI as LivePhotoGate, cJ as LivePhotoKit, cK as LivePhotoKitInternals, cL as LivePhotoKitOptions, cM as LivePhotoStill, cN as LivenessCaptureInternalHandle, cO as LivenessCaptureInternals, cP as LivenessFlowDeps, cQ as LivenessFlowOutcome, cR as MANUAL_SHUTTER_MS, cS as MR_DOC_CATALOG, cT as NO_REPORT_MS, cU as OpenDocCameraDeps, cV as PORTRAIT_JPEG_QUALITY, cW as PRELOAD_BLAZE_INIT_TIMEOUT_MS, cX as PRELOAD_BUDGET_MS, cY as PROCESSING_POLL_DELAY_MS, cZ as PROCESSING_POLL_MAX, c_ as PortraitCaptureController, c$ as PortraitCaptureInternals, d0 as REGISTRY_RETRY_DELAY_MS, d1 as ReticleType, d2 as SAME_FACE_MAX_DROPS, d3 as ScanEvent, d4 as ScanLayout, d5 as ScanNotice, d6 as ScanPhase, d7 as ScanReport, d8 as ScanSide, d9 as ScanState, da as SubmitExecutor, db as TEXT_LOCK_DEFAULTS, dc as TRANSPORT_REPLAY_ATTEMPTS, dd as TRANSPORT_REPLAY_DELAY_MS, de as VerificationInternals, df as analyzeDocFrame, dg as analyzeGuide, dh as aspectBand, di as aspectFits, dj as buildDeviceReadHint, dk as coverPointToVideo, dl as createDocumentCaptureInternal, dm as createFaceLandmarker, dn as createLivePhotoKit, dp as createLivenessCaptureInternal, dq as createPortraitCaptureInternal, dr as createVerificationInternal, ds as docZoomFor, dt as encodeDocumentImage, du as executeChallenge, dv as facesOf, dw as feedbackVoteOf, dx as focusOk, dy as guideQuad, dz as guideRegionInFrame, dA as initialScanState, dB as mapEngineState, dC as mapErrorKind, dD as mapGuidanceHint, dE as nextScanState, dF as observePortraitFrame, dG as openDocCamera, dH as passportBandOf, dI as portraitMatchStep, dJ as preloadedDetectorFactory, dK as quadAreaFrac, dL as quadBounds, dM as quadIou, dN as quadTiltRatio, dO as randomUuid, dP as readStoredLens, dQ as resetChallengeFrameForTests, dR as resetLivenessAssetsForTests, dS as resolveDocCameraTuning, dT as resolveDocShutterTuning, dU as resolveGuideLockTuning, dV as runLivenessFlow, dW as runSubmission, dX as scannerFormatFor, dY as setPreloadLoaderForTests, dZ as settledHint, d_ as singleShotFocusAt, d$ as specularFraction, e0 as supportsFocusMode, e1 as warmDocDetector, e2 as writeStoredLens } from '../create-verification-DmK48vdr.cjs';
1
+ import { bc as SubmitRuntime, a9 as LivenessCaptureOptions, a8 as LivenessCaptureHandle, aX as VerificationStep, aV as VerificationResult, aM as StepSnapshot, a4 as LivePhotoGateUpdate, bd as HostedClientLike, be as DocCatalogEntry, bf as DeviceTier, bg as LiveMrzTuning, bh as TextLockTuning, bi as OcrEngineClient, bj as DocAssistReport, bk as ReadyInfo, bl as LoadFailure, bm as OcrEngineOptions } from '../create-verification-C58r4HV-.cjs';
2
+ export { bn as ANALYSIS_LONG_EDGE, bo as ASPECT_BANDS, bp as AttestationError, bq as BLUR_REFUSE_SHARPNESS_MAX, br as BlurStatus, bs as CAPTURE_CANDIDATE_SPACING_MS, bt as CAPTURE_EXTRA_CANDIDATES, bu as CHALLENGE_EXECUTE_TIMEOUT_MS, bv as CHALLENGE_READY_TIMEOUT_MS, bw as CLIP_MIME_ALLOWLIST, bx as CaptureEngine, by as CaptureSessionDoc, bz as CaptureSessionDocEvents, bA as CaptureSessionDocOptions, bB as ChallengeAction, bC as ChallengeError, m as ChallengeErrorCode, bD as DOC_ANALYSIS_DEFAULTS, bE as DOC_BLACK_FRAME_LUMA, bF as DOC_BLACK_FRAME_TICKS, bG as DOC_CADENCE_HZ, bH as DOC_CAMERA_TUNING_DEFAULTS, bI as DOC_CATALOG, bJ as DOC_DETECT_WIDTH, bK as DOC_FEEDBACK_STATES, bL as DOC_FIRST_FRAME_MS, bM as DOC_GATE_V1_DEFAULTS, bN as DOC_SHUTTER_DEFAULTS, bO as DeviceReadHint, bP as DocArtifacts, bQ as DocAssist, bR as DocAssistEngine, bS as DocAssistTick, bT as DocCameraTuning, bU as DocCaptureReport, bV as DocCaptureVia, bW as DocChecksPayload, bX as DocEngineLike, bY as DocFeedbackAggregator, bZ as DocFeedbackKey, b_ as DocFeedbackState, b$ as DocFormat, c0 as DocFrameAnalysis, c1 as DocFrameMeasures, c2 as DocGateQuality, c3 as DocGateThresholds, c4 as DocGateTick, c5 as DocGateTickInput, c6 as DocGateV1, c7 as DocQuad, c8 as DocQuadPoint, c9 as DocShutterReason, ca as DocShutterTuning, cb as DocSide, cc as DocumentCaptureController, cd as DocumentCaptureInternals, ce as EMPTY_GUIDE_METRICS, cf as EncodedDocument, cg as ExecuteChallengeOptions, ch as FLIP_FILL_MIN, ci as FLIP_GAP_MS, cj as FLIP_TIMEOUT_MS, ck as FocusCaps, cl as FramingStatus, cm as GUIDE_LOCK_DEFAULTS, cn as GlareStatus, co as GrabbedFrame, cp as GuideBlocker, cq as GuideLock, cr as GuideLockTick, cs as GuideLockTuning, ct as GuideMetrics, cu as GuideRect, cv as INFERENCE_RETRY_ATTEMPTS, cw as INFERENCE_RETRY_DEFAULT_S, a0 as ISSUER_CODES, cx as LANDMARKER_MODEL, cy as LENS_STORAGE_KEY, cz as LIVE_MRZ_DEFAULTS, cA as LIVE_PHOTO_IDLE_MS, cB as LIVE_PHOTO_MAX_HZ, cC as LandmarkedFace, cD as LandmarkerLike, cE as LensSource, cF as LightingStatus, cG as LiveMrzCapture, cH as LiveMrzState, cI as LivePhotoGate, cJ as LivePhotoKit, cK as LivePhotoKitInternals, cL as LivePhotoKitOptions, cM as LivePhotoStill, cN as LivenessCaptureInternalHandle, cO as LivenessCaptureInternals, cP as LivenessFlowDeps, cQ as LivenessFlowOutcome, cR as MANUAL_SHUTTER_MS, cS as MR_DOC_CATALOG, cT as NO_REPORT_MS, cU as OpenDocCameraDeps, cV as PORTRAIT_JPEG_QUALITY, cW as PRELOAD_BLAZE_INIT_TIMEOUT_MS, cX as PRELOAD_BUDGET_MS, cY as PROCESSING_POLL_DELAY_MS, cZ as PROCESSING_POLL_MAX, c_ as PortraitCaptureController, c$ as PortraitCaptureInternals, d0 as REGISTRY_RETRY_DELAY_MS, d1 as ReticleType, d2 as SAME_FACE_MAX_DROPS, d3 as ScanEvent, d4 as ScanLayout, d5 as ScanNotice, d6 as ScanPhase, d7 as ScanReport, d8 as ScanSide, d9 as ScanState, da as SubmitExecutor, db as TEXT_LOCK_DEFAULTS, dc as TRANSPORT_REPLAY_ATTEMPTS, dd as TRANSPORT_REPLAY_DELAY_MS, de as VerificationInternals, df as analyzeDocFrame, dg as analyzeGuide, dh as aspectBand, di as aspectFits, dj as buildDeviceReadHint, dk as coverPointToVideo, dl as createDocumentCaptureInternal, dm as createFaceLandmarker, dn as createLivePhotoKit, dp as createLivenessCaptureInternal, dq as createPortraitCaptureInternal, dr as createVerificationInternal, ds as docZoomFor, dt as encodeDocumentImage, du as executeChallenge, dv as facesOf, dw as feedbackVoteOf, dx as focusOk, dy as guideQuad, dz as guideRegionInFrame, dA as initialScanState, dB as mapEngineState, dC as mapErrorKind, dD as mapGuidanceHint, dE as nextScanState, dF as observePortraitFrame, dG as openDocCamera, dH as passportBandOf, dI as portraitMatchStep, dJ as preloadedDetectorFactory, dK as quadAreaFrac, dL as quadBounds, dM as quadIou, dN as quadTiltRatio, dO as randomUuid, dP as readStoredLens, dQ as resetChallengeFrameForTests, dR as resetLivenessAssetsForTests, dS as resolveDocCameraTuning, dT as resolveDocShutterTuning, dU as resolveGuideLockTuning, dV as runLivenessFlow, dW as runSubmission, dX as scannerFormatFor, dY as setPreloadLoaderForTests, dZ as settledHint, d_ as singleShotFocusAt, d$ as specularFraction, e0 as supportsFocusMode, e1 as warmDocDetector, e2 as writeStoredLens } from '../create-verification-C58r4HV-.cjs';
3
3
  export { O as OCR_ASSET_SET } from '../assets.generated-DpkbvoII.cjs';
4
4
  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-CVqpMNGA.cjs';
5
- import { a9 as HostedSessionView, h as CheckType, aG as PlanStepView } from '../types-BjzuJVOc.cjs';
6
- export { bs as ICAO_FALLBACK, bm as IcaoCaptureTuning, bt as IcaoProfile, bu as ResolvedIcaoTuning, bv as resolveIcaoTuning } from '../types-BjzuJVOc.cjs';
7
- export { B as BackgroundStats, h as Box, C as CLIPPED_LUMA, F as FaceGeometry, i as FaceLighting, c as HeadPose, j as ICAO_CANVAS, k as ICAO_GATE_CRITERIA, l as ICAO_SHARP_REF, I as IcaoCoachKey, d as IcaoCriterionState, m as IcaoFrameObservation, n as IcaoGate, e as IcaoGateCriterion, o as IcaoGateOptions, p as IcaoGateScores, f as IcaoGateSummary, g as IcaoGateUpdate, q as IcaoJudgedCriterion, r as IcaoMeasures, t as IcaoMouthScores, u as IcaoPixelStats, L as LumaPlane, P as Point, R as RegionStats, v as backgroundStats, w as createIcaoGate, x as eyeLineRoll, y as eyeOpenness, z as eyeSpecular, A as faceGeometry, D as faceLighting, E as faceSharpness, G as icaoPixelStats, J as icaoWindow, K as judgeIcao, N as lumaPlane, O as percentile, Q as portraitCropRegion, T as poseFromMatrix, V as regionStats, W as scoreFrame, X as windowOverflow } from '../icao-gate-Dj4kIwna.cjs';
5
+ import { a9 as HostedSessionView, h as CheckType, aG as PlanStepView } from '../types-BOfzAhqF.cjs';
6
+ export { bs as ICAO_FALLBACK, bm as IcaoCaptureTuning, bt as IcaoProfile, bu as ResolvedIcaoTuning, bv as resolveIcaoTuning } from '../types-BOfzAhqF.cjs';
7
+ export { B as BackgroundStats, h as Box, C as CLIPPED_LUMA, F as FaceGeometry, i as FaceLighting, c as HeadPose, j as ICAO_CANVAS, k as ICAO_GATE_CRITERIA, l as ICAO_SHARP_REF, I as IcaoCoachKey, d as IcaoCriterionState, m as IcaoFrameObservation, n as IcaoGate, e as IcaoGateCriterion, o as IcaoGateOptions, p as IcaoGateScores, f as IcaoGateSummary, g as IcaoGateUpdate, q as IcaoJudgedCriterion, r as IcaoMeasures, t as IcaoMouthScores, u as IcaoPixelStats, L as LumaPlane, P as Point, R as RegionStats, v as backgroundStats, w as createIcaoGate, x as eyeLineRoll, y as eyeOpenness, z as eyeSpecular, A as faceGeometry, D as faceLighting, E as faceSharpness, G as icaoPixelStats, J as icaoWindow, K as judgeIcao, N as lumaPlane, O as percentile, Q as portraitCropRegion, T as poseFromMatrix, V as regionStats, W as scoreFrame, X as windowOverflow } from '../icao-gate-67SejsPE.cjs';
8
8
  import '../detect-worker-CHqsPJoM.cjs';
9
- import '../capture-session-v3-BS2Rl4Kp.cjs';
9
+ import '../capture-session-v3-DaRhtwrC.cjs';
10
10
 
11
11
  /** `processing` re-reads (1+2+4+8+15 = 30 s, spec §6.5), then `stalled`. */
12
12
  declare const PROCESSING_BACKOFF_MS: readonly number[];
@@ -1,12 +1,12 @@
1
- import { bc as SubmitRuntime, a9 as LivenessCaptureOptions, a8 as LivenessCaptureHandle, aX as VerificationStep, aV as VerificationResult, aM as StepSnapshot, a4 as LivePhotoGateUpdate, bd as HostedClientLike, be as DocCatalogEntry, bf as DeviceTier, bg as LiveMrzTuning, bh as TextLockTuning, bi as OcrEngineClient, bj as DocAssistReport, bk as ReadyInfo, bl as LoadFailure, bm as OcrEngineOptions } from '../create-verification-YC-R5v_z.js';
2
- export { bn as ANALYSIS_LONG_EDGE, bo as ASPECT_BANDS, bp as AttestationError, bq as BLUR_REFUSE_SHARPNESS_MAX, br as BlurStatus, bs as CAPTURE_CANDIDATE_SPACING_MS, bt as CAPTURE_EXTRA_CANDIDATES, bu as CHALLENGE_EXECUTE_TIMEOUT_MS, bv as CHALLENGE_READY_TIMEOUT_MS, bw as CLIP_MIME_ALLOWLIST, bx as CaptureEngine, by as CaptureSessionDoc, bz as CaptureSessionDocEvents, bA as CaptureSessionDocOptions, bB as ChallengeAction, bC as ChallengeError, m as ChallengeErrorCode, bD as DOC_ANALYSIS_DEFAULTS, bE as DOC_BLACK_FRAME_LUMA, bF as DOC_BLACK_FRAME_TICKS, bG as DOC_CADENCE_HZ, bH as DOC_CAMERA_TUNING_DEFAULTS, bI as DOC_CATALOG, bJ as DOC_DETECT_WIDTH, bK as DOC_FEEDBACK_STATES, bL as DOC_FIRST_FRAME_MS, bM as DOC_GATE_V1_DEFAULTS, bN as DOC_SHUTTER_DEFAULTS, bO as DeviceReadHint, bP as DocArtifacts, bQ as DocAssist, bR as DocAssistEngine, bS as DocAssistTick, bT as DocCameraTuning, bU as DocCaptureReport, bV as DocCaptureVia, bW as DocChecksPayload, bX as DocEngineLike, bY as DocFeedbackAggregator, bZ as DocFeedbackKey, b_ as DocFeedbackState, b$ as DocFormat, c0 as DocFrameAnalysis, c1 as DocFrameMeasures, c2 as DocGateQuality, c3 as DocGateThresholds, c4 as DocGateTick, c5 as DocGateTickInput, c6 as DocGateV1, c7 as DocQuad, c8 as DocQuadPoint, c9 as DocShutterReason, ca as DocShutterTuning, cb as DocSide, cc as DocumentCaptureController, cd as DocumentCaptureInternals, ce as EMPTY_GUIDE_METRICS, cf as EncodedDocument, cg as ExecuteChallengeOptions, ch as FLIP_FILL_MIN, ci as FLIP_GAP_MS, cj as FLIP_TIMEOUT_MS, ck as FocusCaps, cl as FramingStatus, cm as GUIDE_LOCK_DEFAULTS, cn as GlareStatus, co as GrabbedFrame, cp as GuideBlocker, cq as GuideLock, cr as GuideLockTick, cs as GuideLockTuning, ct as GuideMetrics, cu as GuideRect, cv as INFERENCE_RETRY_ATTEMPTS, cw as INFERENCE_RETRY_DEFAULT_S, a0 as ISSUER_CODES, cx as LANDMARKER_MODEL, cy as LENS_STORAGE_KEY, cz as LIVE_MRZ_DEFAULTS, cA as LIVE_PHOTO_IDLE_MS, cB as LIVE_PHOTO_MAX_HZ, cC as LandmarkedFace, cD as LandmarkerLike, cE as LensSource, cF as LightingStatus, cG as LiveMrzCapture, cH as LiveMrzState, cI as LivePhotoGate, cJ as LivePhotoKit, cK as LivePhotoKitInternals, cL as LivePhotoKitOptions, cM as LivePhotoStill, cN as LivenessCaptureInternalHandle, cO as LivenessCaptureInternals, cP as LivenessFlowDeps, cQ as LivenessFlowOutcome, cR as MANUAL_SHUTTER_MS, cS as MR_DOC_CATALOG, cT as NO_REPORT_MS, cU as OpenDocCameraDeps, cV as PORTRAIT_JPEG_QUALITY, cW as PRELOAD_BLAZE_INIT_TIMEOUT_MS, cX as PRELOAD_BUDGET_MS, cY as PROCESSING_POLL_DELAY_MS, cZ as PROCESSING_POLL_MAX, c_ as PortraitCaptureController, c$ as PortraitCaptureInternals, d0 as REGISTRY_RETRY_DELAY_MS, d1 as ReticleType, d2 as SAME_FACE_MAX_DROPS, d3 as ScanEvent, d4 as ScanLayout, d5 as ScanNotice, d6 as ScanPhase, d7 as ScanReport, d8 as ScanSide, d9 as ScanState, da as SubmitExecutor, db as TEXT_LOCK_DEFAULTS, dc as TRANSPORT_REPLAY_ATTEMPTS, dd as TRANSPORT_REPLAY_DELAY_MS, de as VerificationInternals, df as analyzeDocFrame, dg as analyzeGuide, dh as aspectBand, di as aspectFits, dj as buildDeviceReadHint, dk as coverPointToVideo, dl as createDocumentCaptureInternal, dm as createFaceLandmarker, dn as createLivePhotoKit, dp as createLivenessCaptureInternal, dq as createPortraitCaptureInternal, dr as createVerificationInternal, ds as docZoomFor, dt as encodeDocumentImage, du as executeChallenge, dv as facesOf, dw as feedbackVoteOf, dx as focusOk, dy as guideQuad, dz as guideRegionInFrame, dA as initialScanState, dB as mapEngineState, dC as mapErrorKind, dD as mapGuidanceHint, dE as nextScanState, dF as observePortraitFrame, dG as openDocCamera, dH as passportBandOf, dI as portraitMatchStep, dJ as preloadedDetectorFactory, dK as quadAreaFrac, dL as quadBounds, dM as quadIou, dN as quadTiltRatio, dO as randomUuid, dP as readStoredLens, dQ as resetChallengeFrameForTests, dR as resetLivenessAssetsForTests, dS as resolveDocCameraTuning, dT as resolveDocShutterTuning, dU as resolveGuideLockTuning, dV as runLivenessFlow, dW as runSubmission, dX as scannerFormatFor, dY as setPreloadLoaderForTests, dZ as settledHint, d_ as singleShotFocusAt, d$ as specularFraction, e0 as supportsFocusMode, e1 as warmDocDetector, e2 as writeStoredLens } from '../create-verification-YC-R5v_z.js';
1
+ import { bc as SubmitRuntime, a9 as LivenessCaptureOptions, a8 as LivenessCaptureHandle, aX as VerificationStep, aV as VerificationResult, aM as StepSnapshot, a4 as LivePhotoGateUpdate, bd as HostedClientLike, be as DocCatalogEntry, bf as DeviceTier, bg as LiveMrzTuning, bh as TextLockTuning, bi as OcrEngineClient, bj as DocAssistReport, bk as ReadyInfo, bl as LoadFailure, bm as OcrEngineOptions } from '../create-verification-Bda1l0t0.js';
2
+ export { bn as ANALYSIS_LONG_EDGE, bo as ASPECT_BANDS, bp as AttestationError, bq as BLUR_REFUSE_SHARPNESS_MAX, br as BlurStatus, bs as CAPTURE_CANDIDATE_SPACING_MS, bt as CAPTURE_EXTRA_CANDIDATES, bu as CHALLENGE_EXECUTE_TIMEOUT_MS, bv as CHALLENGE_READY_TIMEOUT_MS, bw as CLIP_MIME_ALLOWLIST, bx as CaptureEngine, by as CaptureSessionDoc, bz as CaptureSessionDocEvents, bA as CaptureSessionDocOptions, bB as ChallengeAction, bC as ChallengeError, m as ChallengeErrorCode, bD as DOC_ANALYSIS_DEFAULTS, bE as DOC_BLACK_FRAME_LUMA, bF as DOC_BLACK_FRAME_TICKS, bG as DOC_CADENCE_HZ, bH as DOC_CAMERA_TUNING_DEFAULTS, bI as DOC_CATALOG, bJ as DOC_DETECT_WIDTH, bK as DOC_FEEDBACK_STATES, bL as DOC_FIRST_FRAME_MS, bM as DOC_GATE_V1_DEFAULTS, bN as DOC_SHUTTER_DEFAULTS, bO as DeviceReadHint, bP as DocArtifacts, bQ as DocAssist, bR as DocAssistEngine, bS as DocAssistTick, bT as DocCameraTuning, bU as DocCaptureReport, bV as DocCaptureVia, bW as DocChecksPayload, bX as DocEngineLike, bY as DocFeedbackAggregator, bZ as DocFeedbackKey, b_ as DocFeedbackState, b$ as DocFormat, c0 as DocFrameAnalysis, c1 as DocFrameMeasures, c2 as DocGateQuality, c3 as DocGateThresholds, c4 as DocGateTick, c5 as DocGateTickInput, c6 as DocGateV1, c7 as DocQuad, c8 as DocQuadPoint, c9 as DocShutterReason, ca as DocShutterTuning, cb as DocSide, cc as DocumentCaptureController, cd as DocumentCaptureInternals, ce as EMPTY_GUIDE_METRICS, cf as EncodedDocument, cg as ExecuteChallengeOptions, ch as FLIP_FILL_MIN, ci as FLIP_GAP_MS, cj as FLIP_TIMEOUT_MS, ck as FocusCaps, cl as FramingStatus, cm as GUIDE_LOCK_DEFAULTS, cn as GlareStatus, co as GrabbedFrame, cp as GuideBlocker, cq as GuideLock, cr as GuideLockTick, cs as GuideLockTuning, ct as GuideMetrics, cu as GuideRect, cv as INFERENCE_RETRY_ATTEMPTS, cw as INFERENCE_RETRY_DEFAULT_S, a0 as ISSUER_CODES, cx as LANDMARKER_MODEL, cy as LENS_STORAGE_KEY, cz as LIVE_MRZ_DEFAULTS, cA as LIVE_PHOTO_IDLE_MS, cB as LIVE_PHOTO_MAX_HZ, cC as LandmarkedFace, cD as LandmarkerLike, cE as LensSource, cF as LightingStatus, cG as LiveMrzCapture, cH as LiveMrzState, cI as LivePhotoGate, cJ as LivePhotoKit, cK as LivePhotoKitInternals, cL as LivePhotoKitOptions, cM as LivePhotoStill, cN as LivenessCaptureInternalHandle, cO as LivenessCaptureInternals, cP as LivenessFlowDeps, cQ as LivenessFlowOutcome, cR as MANUAL_SHUTTER_MS, cS as MR_DOC_CATALOG, cT as NO_REPORT_MS, cU as OpenDocCameraDeps, cV as PORTRAIT_JPEG_QUALITY, cW as PRELOAD_BLAZE_INIT_TIMEOUT_MS, cX as PRELOAD_BUDGET_MS, cY as PROCESSING_POLL_DELAY_MS, cZ as PROCESSING_POLL_MAX, c_ as PortraitCaptureController, c$ as PortraitCaptureInternals, d0 as REGISTRY_RETRY_DELAY_MS, d1 as ReticleType, d2 as SAME_FACE_MAX_DROPS, d3 as ScanEvent, d4 as ScanLayout, d5 as ScanNotice, d6 as ScanPhase, d7 as ScanReport, d8 as ScanSide, d9 as ScanState, da as SubmitExecutor, db as TEXT_LOCK_DEFAULTS, dc as TRANSPORT_REPLAY_ATTEMPTS, dd as TRANSPORT_REPLAY_DELAY_MS, de as VerificationInternals, df as analyzeDocFrame, dg as analyzeGuide, dh as aspectBand, di as aspectFits, dj as buildDeviceReadHint, dk as coverPointToVideo, dl as createDocumentCaptureInternal, dm as createFaceLandmarker, dn as createLivePhotoKit, dp as createLivenessCaptureInternal, dq as createPortraitCaptureInternal, dr as createVerificationInternal, ds as docZoomFor, dt as encodeDocumentImage, du as executeChallenge, dv as facesOf, dw as feedbackVoteOf, dx as focusOk, dy as guideQuad, dz as guideRegionInFrame, dA as initialScanState, dB as mapEngineState, dC as mapErrorKind, dD as mapGuidanceHint, dE as nextScanState, dF as observePortraitFrame, dG as openDocCamera, dH as passportBandOf, dI as portraitMatchStep, dJ as preloadedDetectorFactory, dK as quadAreaFrac, dL as quadBounds, dM as quadIou, dN as quadTiltRatio, dO as randomUuid, dP as readStoredLens, dQ as resetChallengeFrameForTests, dR as resetLivenessAssetsForTests, dS as resolveDocCameraTuning, dT as resolveDocShutterTuning, dU as resolveGuideLockTuning, dV as runLivenessFlow, dW as runSubmission, dX as scannerFormatFor, dY as setPreloadLoaderForTests, dZ as settledHint, d_ as singleShotFocusAt, d$ as specularFraction, e0 as supportsFocusMode, e1 as warmDocDetector, e2 as writeStoredLens } from '../create-verification-Bda1l0t0.js';
3
3
  export { O as OCR_ASSET_SET } from '../assets.generated-DpkbvoII.js';
4
4
  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-CVqpMNGA.js';
5
- import { a9 as HostedSessionView, h as CheckType, aG as PlanStepView } from '../types-BjzuJVOc.js';
6
- export { bs as ICAO_FALLBACK, bm as IcaoCaptureTuning, bt as IcaoProfile, bu as ResolvedIcaoTuning, bv as resolveIcaoTuning } from '../types-BjzuJVOc.js';
7
- export { B as BackgroundStats, h as Box, C as CLIPPED_LUMA, F as FaceGeometry, i as FaceLighting, c as HeadPose, j as ICAO_CANVAS, k as ICAO_GATE_CRITERIA, l as ICAO_SHARP_REF, I as IcaoCoachKey, d as IcaoCriterionState, m as IcaoFrameObservation, n as IcaoGate, e as IcaoGateCriterion, o as IcaoGateOptions, p as IcaoGateScores, f as IcaoGateSummary, g as IcaoGateUpdate, q as IcaoJudgedCriterion, r as IcaoMeasures, t as IcaoMouthScores, u as IcaoPixelStats, L as LumaPlane, P as Point, R as RegionStats, v as backgroundStats, w as createIcaoGate, x as eyeLineRoll, y as eyeOpenness, z as eyeSpecular, A as faceGeometry, D as faceLighting, E as faceSharpness, G as icaoPixelStats, J as icaoWindow, K as judgeIcao, N as lumaPlane, O as percentile, Q as portraitCropRegion, T as poseFromMatrix, V as regionStats, W as scoreFrame, X as windowOverflow } from '../icao-gate-BGhxz9O2.js';
5
+ import { a9 as HostedSessionView, h as CheckType, aG as PlanStepView } from '../types-BOfzAhqF.js';
6
+ export { bs as ICAO_FALLBACK, bm as IcaoCaptureTuning, bt as IcaoProfile, bu as ResolvedIcaoTuning, bv as resolveIcaoTuning } from '../types-BOfzAhqF.js';
7
+ export { B as BackgroundStats, h as Box, C as CLIPPED_LUMA, F as FaceGeometry, i as FaceLighting, c as HeadPose, j as ICAO_CANVAS, k as ICAO_GATE_CRITERIA, l as ICAO_SHARP_REF, I as IcaoCoachKey, d as IcaoCriterionState, m as IcaoFrameObservation, n as IcaoGate, e as IcaoGateCriterion, o as IcaoGateOptions, p as IcaoGateScores, f as IcaoGateSummary, g as IcaoGateUpdate, q as IcaoJudgedCriterion, r as IcaoMeasures, t as IcaoMouthScores, u as IcaoPixelStats, L as LumaPlane, P as Point, R as RegionStats, v as backgroundStats, w as createIcaoGate, x as eyeLineRoll, y as eyeOpenness, z as eyeSpecular, A as faceGeometry, D as faceLighting, E as faceSharpness, G as icaoPixelStats, J as icaoWindow, K as judgeIcao, N as lumaPlane, O as percentile, Q as portraitCropRegion, T as poseFromMatrix, V as regionStats, W as scoreFrame, X as windowOverflow } from '../icao-gate-CjdvLXEu.js';
8
8
  import '../detect-worker-CHqsPJoM.js';
9
- import '../capture-session-v3-CYh0Jmyf.js';
9
+ import '../capture-session-v3-_JtEhXUz.js';
10
10
 
11
11
  /** `processing` re-reads (1+2+4+8+15 = 30 s, spec §6.5), then `stalled`. */
12
12
  declare const PROCESSING_BACKOFF_MS: readonly number[];
@@ -1 +1 @@
1
- import{c as me,d as _e,e as Le,h as le,i as ce,j as Se}from"../chunk-ERCKQV6V.js";import{a as W,b as ve,c as ge,d as he,e as Ge,f as be,g as He,h as Ye,i as Ue,j as k,k as K,l as w,m as X,n as Z,o as J,p as Q,q as j,r as q,s as $,t as ee,u as te,x as re}from"../chunk-DSNJ2ERA.js";import{a as Bt,b as Vt,c as Xt,d as Zt,e as Jt,f as Qt,g as jt,h as qt,i as $t,j as ne,k as ie,m as se,n as Ee}from"../chunk-VWGKUQ3C.js";import{a as Ft,b as Nt,c as vt,d as gt,e as ht,f as Gt,g as bt,h as Ht,i as Yt,j as Ut,k as Wt,l as kt,m as Kt}from"../chunk-53POX7U4.js";import{a as wt,b as zt}from"../chunk-33KKMPJ5.js";import{b as oe,c as pe,d as ae}from"../chunk-CJHMFPL6.js";import"../chunk-RI3E7GBN.js";import"../chunk-GI3UFGRQ.js";import{a as P,b as d,c as M,d as F,e as N}from"../chunk-ZVD6VHM2.js";import{A as Ct,B as At,C as Ot,D as xt,E as It,F as ut,G as Dt,H as Pt,I as dt,J as Mt,a as Ke,b as we,c as ze,d as je,e as qe,f as $e,g as et,h as tt,i as rt,j as ot,k as pt,l as at,m as nt,n as it,o as st,p as Et,q as mt,r as _t,s as Lt,t as lt,u as ct,v as St,w as Rt,x as yt,y as Tt,z as ft}from"../chunk-M3KW2MY3.js";import{a as v,b as g,c as h,d as G,e as b,f as H,g as Y,h as U,i as z,j as B,l as V}from"../chunk-JULJQOVT.js";import{a as We,b as ke}from"../chunk-SMKCBUJL.js";import{a as Be,b as Ve,c as Xe,d as Ze,e as Je,f as Qe}from"../chunk-NXNQQXYJ.js";import{b as De,c as Pe,d as de,e as Me,f as Fe,g as Ne}from"../chunk-LTMDEMCV.js";import{b as ye,c as Te,d as fe,e as Ce,g as Ae,h as er,i as tr,j as rr,k as or,l as pr,m as ar,z as Oe}from"../chunk-AJPVHUZR.js";import{A as I,C as u,D,i as c,j as S,k as R,l as y,o as T,v as f,w as C,x as A,y as O,z as x}from"../chunk-JFTEP2WJ.js";import{a,b as n,c as i,d as s,i as E,j as m,k as _,l as L,n as l}from"../chunk-7KI6HWCZ.js";import"../chunk-7QZWBDI5.js";import"../chunk-UVZ5R4CI.js";import"../chunk-SX7TUC3V.js";import"../chunk-POIQGEZM.js";import{p as xe,q as Ie,r as ue}from"../chunk-CPUECYAJ.js";import"../chunk-FPXL63KZ.js";import"../chunk-Y5C4YJQT.js";import{c as e,d as t,f as r,g as o,h as p}from"../chunk-TSA6GHUG.js";import"../chunk-CHWTIUYK.js";import"../chunk-FSSMUAKC.js";import{a as Re}from"../chunk-QB62OPX5.js";import"../chunk-ISMVEF7H.js";export{ne as ANALYSIS_LONG_EDGE,De as ASPECT_BANDS,I as AttestationError,He as BLUR_REFUSE_SHARPNESS_MAX,Mt as CAPTURE_CANDIDATE_SPACING_MS,dt as CAPTURE_EXTRA_CANDIDATES,p as CENTERED_FACTOR,M as CHALLENGE_EXECUTE_TIMEOUT_MS,d as CHALLENGE_READY_TIMEOUT_MS,r as CIRCLE_RADIUS_FACTOR,Bt as CLIPPED_LUMA,f as CLIP_MIME_ALLOWLIST,Dt as CaptureSessionDoc,P as ChallengeError,tr as DOCUMENT_TYPE_ORDER,je as DOC_ANALYSIS_DEFAULTS,At as DOC_BLACK_FRAME_LUMA,Ot as DOC_BLACK_FRAME_TICKS,xt as DOC_CADENCE_HZ,tt as DOC_CAMERA_TUNING_DEFAULTS,Me as DOC_CATALOG,Be as DOC_DETECT_WIDTH,Ke as DOC_FEEDBACK_STATES,Ct as DOC_FIRST_FRAME_MS,Ve as DOC_GATE_V1_DEFAULTS,It as DOC_SHUTTER_DEFAULTS,V as DocAssist,ze as DocFeedbackAggregator,Qe as DocGateV1,Lt as EMPTY_GUIDE_METRICS,ge as FLIP_FILL_MIN,ve as FLIP_GAP_MS,he as FLIP_TIMEOUT_MS,Rt as GUIDE_LOCK_DEFAULTS,Tt as GuideLock,gt as ICAO_CANVAS,wt as ICAO_FALLBACK,Ht as ICAO_GATE_CRITERIA,Vt as ICAO_SHARP_REF,O as INFERENCE_RETRY_ATTEMPTS,x as INFERENCE_RETRY_DEFAULT_S,o as IN_CIRCLE_FACTOR,er as ISSUER_CODES,oe as LANDMARKER_MODEL,ot as LENS_STORAGE_KEY,xe as LENS_TRY_MAX,B as LIVE_MRZ_DEFAULTS,_e as LIVE_PHOTO_IDLE_MS,me as LIVE_PHOTO_MAX_HZ,Ge as MANUAL_SHUTTER_MS,We as MRZ_BAND_DEFAULTS,Fe as MR_DOC_CATALOG,be as NO_REPORT_MS,Re as OCR_ASSET_SET,ce as OTP_RESEND_COOLDOWN_MS,ie as PORTRAIT_JPEG_QUALITY,a as PRELOAD_BLAZE_INIT_TIMEOUT_MS,n as PRELOAD_BUDGET_MS,le as PROCESSING_BACKOFF_MS,Te as PROCESSING_POLL_DELAY_MS,fe as PROCESSING_POLL_MAX,h as REGION_PAD,ye as REGISTRY_RETRY_DELAY_MS,te as SAME_FACE_MAX_DROPS,v as SHARPNESS_LONG_EDGE,z as TEXT_LOCK_DEFAULTS,C as TRANSPORT_REPLAY_ATTEMPTS,A as TRANSPORT_REPLAY_DELAY_MS,J as WEB_OCR_ENGINE,or as acceptedIssuers,rr as acceptedTypesFor,et as analyzeDocFrame,ct as analyzeGuide,Pe as aspectBand,de as aspectFits,jt as backgroundStats,q as browserFamily,X as buildDeviceReadHint,K as classifyCardSide,k as classifyCardSideWith,st as coverPointToVideo,re as createDocumentCaptureInternal,ae as createFaceLandmarker,Kt as createIcaoGate,Le as createLivePhotoKit,l as createLivenessCaptureInternal,Ee as createPortraitCaptureInternal,Se as createStepRunner,Ae as createVerificationInternal,b as cropImage,e as detectFormFactor,t as detectIsMobile,ke as detectMrzBand,Et as docZoomFor,W as encodeDocumentImage,N as executeChallenge,vt as eyeLineRoll,Ut as eyeOpenness,Qt as eyeSpecular,Ft as faceGeometry,Jt as faceLighting,qt as faceSharpness,pe as facesOf,we as feedbackVoteOf,ar as flagOf,mt as focusOk,ee as formatMismatch,R as frontierStep,St as guideQuad,lt as guideRegionInFrame,$t as icaoPixelStats,ht as icaoWindow,Ye as initialScanState,c as isExecutable,S as isTerminalView,Yt as judgeIcao,Ie as lensKindOf,$ as liveMrzWireReport,Xt as lumaPlane,_ as mapEngineState,L as mapErrorKind,m as mapGuidanceHint,T as mapSessionResult,U as measureBitmapSharpness,Y as measureRegionSharpness,Ue as nextScanState,se as observePortraitFrame,_t as openDocCamera,Pt as passportBandOf,Wt as percentile,g as photoSharpness,bt as portraitCropRegion,Oe as portraitMatchStep,Nt as poseFromMatrix,E as preloadedDetectorFactory,Xe as quadAreaFrac,Je as quadBounds,Ze as quadIou,$e as quadTiltRatio,Ce as randomUuid,ue as rankBackCameras,pt as readStoredLens,Zt as regionStats,F as resetChallengeFrameForTests,s as resetLivenessAssetsForTests,H as resizeLongEdge,pr as resolveAcceptedDocuments,rt as resolveDocCameraTuning,ut as resolveDocShutterTuning,yt as resolveGuideLockTuning,zt as resolveIcaoTuning,Q as resolveWebOcrPlan,D as runLivenessFlow,u as runSubmission,Ne as scannerFormatFor,kt as scoreFrame,i as setPreloadLoaderForTests,Z as settledHint,it as singleShotFocusAt,qe as specularFraction,j as startWebOcr,y as stepOf,G as stillRegionOf,w as stillToImageData,nt as supportsFocusMode,ft as warmDocDetector,Gt as windowOverflow,at as writeStoredLens};
1
+ import{c as me,d as _e,e as Le,h as le,i as ce,j as Se}from"../chunk-W42RLLAC.js";import{a as W,b as ve,c as ge,d as he,e as Ge,f as be,g as He,h as Ye,i as Ue,j as k,k as K,l as w,m as X,n as Z,o as J,p as Q,q as j,r as q,s as $,t as ee,u as te,x as re}from"../chunk-EF4VD4GD.js";import{a as Bt,b as Vt,c as Xt,d as Zt,e as Jt,f as Qt,g as jt,h as qt,i as $t,j as ne,k as ie,m as se,n as Ee}from"../chunk-VWGKUQ3C.js";import{a as Ft,b as Nt,c as vt,d as gt,e as ht,f as Gt,g as bt,h as Ht,i as Yt,j as Ut,k as Wt,l as kt,m as Kt}from"../chunk-53POX7U4.js";import{a as wt,b as zt}from"../chunk-33KKMPJ5.js";import{b as oe,c as pe,d as ae}from"../chunk-CJHMFPL6.js";import"../chunk-RI3E7GBN.js";import"../chunk-GI3UFGRQ.js";import{a as P,b as d,c as M,d as F,e as N}from"../chunk-ZVD6VHM2.js";import{A as Ct,B as At,C as Ot,D as xt,E as It,F as ut,G as Dt,H as Pt,I as dt,J as Mt,a as Ke,b as we,c as ze,d as je,e as qe,f as $e,g as et,h as tt,i as rt,j as ot,k as pt,l as at,m as nt,n as it,o as st,p as Et,q as mt,r as _t,s as Lt,t as lt,u as ct,v as St,w as Rt,x as yt,y as Tt,z as ft}from"../chunk-KCUXJT7L.js";import{a as v,b as g,c as h,d as G,e as b,f as H,g as Y,h as U,i as z,j as B,l as V}from"../chunk-JULJQOVT.js";import{a as We,b as ke}from"../chunk-SMKCBUJL.js";import{a as Be,b as Ve,c as Xe,d as Ze,e as Je,f as Qe}from"../chunk-XON3UNG3.js";import{b as De,c as Pe,d as de,e as Me,f as Fe,g as Ne}from"../chunk-XFATG7QI.js";import{b as ye,c as Te,d as fe,e as Ce,g as Ae,h as er,i as tr,j as rr,k as or,l as pr,m as ar,z as Oe}from"../chunk-H2ZUHMIC.js";import{A as I,C as u,D,i as c,j as S,k as R,l as y,o as T,v as f,w as C,x as A,y as O,z as x}from"../chunk-K7ICBHSZ.js";import{a,b as n,c as i,d as s,i as E,j as m,k as _,l as L,n as l}from"../chunk-NMPMXAH3.js";import"../chunk-7QZWBDI5.js";import"../chunk-2J6R5JOJ.js";import"../chunk-SX7TUC3V.js";import"../chunk-POIQGEZM.js";import{p as xe,q as Ie,r as ue}from"../chunk-CPUECYAJ.js";import"../chunk-FPXL63KZ.js";import"../chunk-VZGTOE22.js";import{c as e,d as t,f as r,g as o,h as p}from"../chunk-TSA6GHUG.js";import"../chunk-AIRC3HT7.js";import"../chunk-FSSMUAKC.js";import{a as Re}from"../chunk-QB62OPX5.js";import"../chunk-ISMVEF7H.js";export{ne as ANALYSIS_LONG_EDGE,De as ASPECT_BANDS,I as AttestationError,He as BLUR_REFUSE_SHARPNESS_MAX,Mt as CAPTURE_CANDIDATE_SPACING_MS,dt as CAPTURE_EXTRA_CANDIDATES,p as CENTERED_FACTOR,M as CHALLENGE_EXECUTE_TIMEOUT_MS,d as CHALLENGE_READY_TIMEOUT_MS,r as CIRCLE_RADIUS_FACTOR,Bt as CLIPPED_LUMA,f as CLIP_MIME_ALLOWLIST,Dt as CaptureSessionDoc,P as ChallengeError,tr as DOCUMENT_TYPE_ORDER,je as DOC_ANALYSIS_DEFAULTS,At as DOC_BLACK_FRAME_LUMA,Ot as DOC_BLACK_FRAME_TICKS,xt as DOC_CADENCE_HZ,tt as DOC_CAMERA_TUNING_DEFAULTS,Me as DOC_CATALOG,Be as DOC_DETECT_WIDTH,Ke as DOC_FEEDBACK_STATES,Ct as DOC_FIRST_FRAME_MS,Ve as DOC_GATE_V1_DEFAULTS,It as DOC_SHUTTER_DEFAULTS,V as DocAssist,ze as DocFeedbackAggregator,Qe as DocGateV1,Lt as EMPTY_GUIDE_METRICS,ge as FLIP_FILL_MIN,ve as FLIP_GAP_MS,he as FLIP_TIMEOUT_MS,Rt as GUIDE_LOCK_DEFAULTS,Tt as GuideLock,gt as ICAO_CANVAS,wt as ICAO_FALLBACK,Ht as ICAO_GATE_CRITERIA,Vt as ICAO_SHARP_REF,O as INFERENCE_RETRY_ATTEMPTS,x as INFERENCE_RETRY_DEFAULT_S,o as IN_CIRCLE_FACTOR,er as ISSUER_CODES,oe as LANDMARKER_MODEL,ot as LENS_STORAGE_KEY,xe as LENS_TRY_MAX,B as LIVE_MRZ_DEFAULTS,_e as LIVE_PHOTO_IDLE_MS,me as LIVE_PHOTO_MAX_HZ,Ge as MANUAL_SHUTTER_MS,We as MRZ_BAND_DEFAULTS,Fe as MR_DOC_CATALOG,be as NO_REPORT_MS,Re as OCR_ASSET_SET,ce as OTP_RESEND_COOLDOWN_MS,ie as PORTRAIT_JPEG_QUALITY,a as PRELOAD_BLAZE_INIT_TIMEOUT_MS,n as PRELOAD_BUDGET_MS,le as PROCESSING_BACKOFF_MS,Te as PROCESSING_POLL_DELAY_MS,fe as PROCESSING_POLL_MAX,h as REGION_PAD,ye as REGISTRY_RETRY_DELAY_MS,te as SAME_FACE_MAX_DROPS,v as SHARPNESS_LONG_EDGE,z as TEXT_LOCK_DEFAULTS,C as TRANSPORT_REPLAY_ATTEMPTS,A as TRANSPORT_REPLAY_DELAY_MS,J as WEB_OCR_ENGINE,or as acceptedIssuers,rr as acceptedTypesFor,et as analyzeDocFrame,ct as analyzeGuide,Pe as aspectBand,de as aspectFits,jt as backgroundStats,q as browserFamily,X as buildDeviceReadHint,K as classifyCardSide,k as classifyCardSideWith,st as coverPointToVideo,re as createDocumentCaptureInternal,ae as createFaceLandmarker,Kt as createIcaoGate,Le as createLivePhotoKit,l as createLivenessCaptureInternal,Ee as createPortraitCaptureInternal,Se as createStepRunner,Ae as createVerificationInternal,b as cropImage,e as detectFormFactor,t as detectIsMobile,ke as detectMrzBand,Et as docZoomFor,W as encodeDocumentImage,N as executeChallenge,vt as eyeLineRoll,Ut as eyeOpenness,Qt as eyeSpecular,Ft as faceGeometry,Jt as faceLighting,qt as faceSharpness,pe as facesOf,we as feedbackVoteOf,ar as flagOf,mt as focusOk,ee as formatMismatch,R as frontierStep,St as guideQuad,lt as guideRegionInFrame,$t as icaoPixelStats,ht as icaoWindow,Ye as initialScanState,c as isExecutable,S as isTerminalView,Yt as judgeIcao,Ie as lensKindOf,$ as liveMrzWireReport,Xt as lumaPlane,_ as mapEngineState,L as mapErrorKind,m as mapGuidanceHint,T as mapSessionResult,U as measureBitmapSharpness,Y as measureRegionSharpness,Ue as nextScanState,se as observePortraitFrame,_t as openDocCamera,Pt as passportBandOf,Wt as percentile,g as photoSharpness,bt as portraitCropRegion,Oe as portraitMatchStep,Nt as poseFromMatrix,E as preloadedDetectorFactory,Xe as quadAreaFrac,Je as quadBounds,Ze as quadIou,$e as quadTiltRatio,Ce as randomUuid,ue as rankBackCameras,pt as readStoredLens,Zt as regionStats,F as resetChallengeFrameForTests,s as resetLivenessAssetsForTests,H as resizeLongEdge,pr as resolveAcceptedDocuments,rt as resolveDocCameraTuning,ut as resolveDocShutterTuning,yt as resolveGuideLockTuning,zt as resolveIcaoTuning,Q as resolveWebOcrPlan,D as runLivenessFlow,u as runSubmission,Ne as scannerFormatFor,kt as scoreFrame,i as setPreloadLoaderForTests,Z as settledHint,it as singleShotFocusAt,qe as specularFraction,j as startWebOcr,y as stepOf,G as stillRegionOf,w as stillToImageData,nt as supportsFocusMode,ft as warmDocDetector,Gt as windowOverflow,at as writeStoredLens};
@@ -1 +1 @@
1
- import{d as ie}from"./chunk-BD4KIQQD.js";import"./chunk-JLVZ35QK.js";import{a as ee,b as te,e as oe,f as K,g as O,j as ae}from"./chunk-ERCKQV6V.js";import{x as Z}from"./chunk-DSNJ2ERA.js";import{n as re}from"./chunk-VWGKUQ3C.js";import"./chunk-53POX7U4.js";import"./chunk-33KKMPJ5.js";import"./chunk-CJHMFPL6.js";import"./chunk-RI3E7GBN.js";import"./chunk-GI3UFGRQ.js";import{F as Y,i as W,x as X}from"./chunk-M3KW2MY3.js";import"./chunk-JULJQOVT.js";import"./chunk-SMKCBUJL.js";import"./chunk-NXNQQXYJ.js";import"./chunk-LTMDEMCV.js";import{b as j,c as q,r as Q,t as J,u as L}from"./chunk-JFTEP2WJ.js";import"./chunk-7KI6HWCZ.js";import"./chunk-7QZWBDI5.js";import"./chunk-UVZ5R4CI.js";import{b as N}from"./chunk-SX7TUC3V.js";import"./chunk-POIQGEZM.js";import"./chunk-CPUECYAJ.js";import"./chunk-FPXL63KZ.js";import{c as x,i as ne}from"./chunk-Y5C4YJQT.js";import"./chunk-TSA6GHUG.js";import{a as z}from"./chunk-CHWTIUYK.js";import"./chunk-FSSMUAKC.js";import"./chunk-QB62OPX5.js";import"./chunk-ISMVEF7H.js";var he=2e4,we=new Set(["media_type_unsupported","media_type_mismatch"]),le=new Set(["document_upload_not_allowed","portrait_source_not_allowed","uploaded_media_not_allowed"]);function se(e){let r=null,a=Promise.resolve(),c=!1,m=null,y=null,w=!1,C=null,I=!1,D=!1,M=()=>{r?.controller.handle.destroy(),r=null},n=()=>{let s=e.currentView(),t=s===null?null:O(s,{isMobile:e.isMobile()});return t?.kind==="portrait"?t:null},l=()=>{if(e.destroyed())return"self";let s=e.currentView(),t=s===null?void 0:K(s);return t==="self"||t==="assisted"?t:t==="choice"&&e.captureModeSwitch!==void 0?e.captureModeSwitch.pick()??"self":e.cameraMode?.()??J(t??Q(s),null)},p=e.captureModeSwitch,h=p===void 0?void 0:{session:()=>{let s=e.currentView();return s!==null&&K(s)==="choice"?"choice":l()},onModeChange:s=>p.choose(s)},v=async(s,t)=>{if(e.destroyed())return;let u=l();t.setFlowState("uploading"),c=!1;let o=null;try{await e.runner().submit("portrait_icao",async(d,S)=>{if(o===null){let f=await L(d,"image","image/jpeg",s.image.size,{engine:"portrait"});await d.uploadToSpaces(f.uploadUrl,s.image,"image/jpeg"),o=(await d.completeMedia(f.key)).key}t.setFlowState("checking");let P={media:{portrait:o},gate:ne(s.gate),...s.tuningVersion!==void 0?{tuningVersion:s.tuningVersion}:{},source:"camera",capture:{mode:u,facingMode:s.facingMode}};return d.submitCheck("portrait_icao",P,{idempotencyKey:S})})}catch(d){c=!0,d instanceof x&&le.has(d.code)&&await e.refreshView?.().catch(()=>{})}if(t.setFlowState("done"),e.destroyed())return;let i=n();(i===null||i.phase!=="capture")&&r?.controller===t&&M(),e.runner().republish()},F=s=>e.runner().submit("face_match",(t,u)=>t.submitCheck("face_match",e.runner().faceProbeSkipped()?{simulatedCapture:!0}:{},{idempotencyKey:u})).then(()=>{},()=>{c=!0,s()}),b=null,k=async s=>{let t=n();if(t===null||t.phase!=="capture"||!t.photo.uploadOffered)throw new RangeError("upload_not_offered");let{prepareUploadFile:u}=await import("./upload-file-EGXXM6TQ.js"),o=await u(s,e.uploadInternals);if(e.destroyed())return;M(),c=!1;let i=null;try{await e.runner().submit("portrait_icao",async(d,S)=>{if(i===null){let f=await d.presign("image",o.contentType,o.blob.size,{source:"upload"});await d.uploadToSpaces(f.uploadUrl,o.blob,o.contentType),i=(await d.completeMedia(f.key)).key}let P={media:{portrait:i},source:"upload"};return d.submitCheck("portrait_icao",P,{idempotencyKey:S})})}catch(d){throw d instanceof x&&we.has(d.code)?new TypeError("unsupported_file"):(d instanceof x&&le.has(d.code)&&await e.refreshView?.().catch(()=>{}),d)}},_=null,T=s=>{if(_!==null)return _;let t=n();if(t===null||t.phase!=="review")return Promise.reject(new RangeError("no_pending_fix"));let u={fixReview:{accept:s}},o=e.runner().submit("portrait_icao",(i,d)=>i.submitCheck("portrait_icao",u,{idempotencyKey:d})).catch(async i=>{throw i instanceof x&&i.code==="portrait_no_pending_fix"&&await e.refreshView?.().catch(()=>{}),i}).finally(()=>{_=null});return _=o,o},B=s=>{let t=()=>k(s),u=(b===null?t():b.then(t,t)).finally(()=>{b===u&&(b=null)});return b=u,u};return{bind:(s,t)=>{if(s.phase==="review")return M(),{...s,uploadFailed:c,resubmit:()=>Promise.resolve(),capture:()=>{throw new Error("the adjusted photo waits for confirmFix()")},uploadPortrait:()=>Promise.reject(new RangeError("upload_not_offered")),confirmFix:T};if(s.phase==="match")return M(),m!==s.attemptsRemaining&&!c&&(m=s.attemptsRemaining,F(t)),{...s,uploadFailed:c,resubmit:()=>(c=!1,m=s.attemptsRemaining,t(),F(t)),capture:()=>{throw new Error("the portrait was already accepted")},uploadPortrait:()=>Promise.reject(new RangeError("upload_not_offered")),confirmFix:T};if(m=null,s.reuse===!0&&s.phase==="capture")return M(),!I&&C!==s.attemptsRemaining&&(C=s.attemptsRemaining,I=!0,e.runner().submit("portrait_icao",(o,i)=>o.submitCheck("portrait_icao",{},{idempotencyKey:i})).then(()=>{D=!1},()=>{D=!0}).finally(()=>{I=!1,t()})),{kind:"processing",key:"processing",context:s.context,section:s.section,stalled:D&&!I,refresh:()=>(D=!1,C=null,t(),Promise.resolve())};let u=e.keptPortraitInput?.()??null;return u!==null&&(w||u!==y&&s.report===null&&s.reason===void 0&&!s.retakeOnly)?(w||(y=u,w=!0,e.runner().submit("portrait_icao",(o,i)=>o.submitCheck("portrait_icao",u,{idempotencyKey:i})).catch(()=>{}).finally(()=>{w=!1,t()})),{kind:"processing",key:"processing",context:s.context,section:s.section,stalled:!1,refresh:()=>Promise.resolve()}):{...s,uploadFailed:c,resubmit:()=>Promise.resolve(),capture:o=>{if(r!==null&&r.video===o.video)return r.controller.handle;M(),c=!1;let i=re({video:o.video,tuning:s.tuning,tuningVersion:s.tuningVersion,...s.icao!=null?{policy:s.icao.policy}:{},...o.keepScreenAwake!==void 0?{keepScreenAwake:o.keepScreenAwake}:{},...o.assetBaseUrl!==void 0?{assetBaseUrl:o.assetBaseUrl}:{}},e.internals,l,h);r={video:o.video,controller:i};let d=i.handle.destroy;i.handle.destroy=()=>{r?.controller===i&&(r=null),d()},i.handle.on("error",f=>{e.reportCaptureIssue?.(j("portrait",f,0))});let S=!1,P=(f,E)=>{let g=i.gateScores();g!==null&&e.reportGate?.({kind:"portrait_gate",platform:"web",outcome:f,...E!==null?{failing:E}:{},...g})};return i.handle.on("gate",f=>{!S&&!f.ready&&(i.gateScores()?.elapsedMs??0)>=he&&(S=!0,P("stuck",f.failing))}),i.handle.on("captured",f=>{P("captured",null),S=!1,a=a.then(()=>v(f,i)).catch(()=>{})}),i.handle},uploadPortrait:B,confirmFix:T}},destroy:M}}var ve=.92,Pe=()=>N("environment",{width:{ideal:1920},height:{ideal:1080}},{getUserMedia:e=>navigator.mediaDevices.getUserMedia(e),enumerateDevices:()=>navigator.mediaDevices.enumerateDevices()}),be=e=>{let r=document.createElement("canvas");r.width=e.videoWidth,r.height=e.videoHeight;let a=r.getContext("2d");return a===null||r.width===0||r.height===0?Promise.reject(new Error("the camera has no frame yet")):(a.drawImage(e,0,0,r.width,r.height),new Promise((c,m)=>r.toBlob(y=>y===null?m(new Error("the still could not be encoded")):c(y),"image/jpeg",ve)))},ke=(e,r)=>{try{e.muted=!0,e.playsInline=!0,e.srcObject=r,e.play().catch(()=>{})}catch{}};function ue(e){let r=null,a=null,c=n=>{let l=(a===null?n():a.then(n,n)).finally(()=>{a===l&&(a=null)});return a=l,l},m=()=>{r?.handle.destroy(),r=null},y=()=>{let n=e.currentView(),l=n===null?null:O(n,{isMobile:e.isMobile()});return l?.kind==="proof_of_address"?l:null},w=async(n,l)=>{if(l.length===0)throw new RangeError("no_pages");if(l.length>n.maxPages)throw new RangeError("too_many_pages");let{pdfFileKind:p,prepareUploadFile:h}=await import("./upload-file-EGXXM6TQ.js"),v=await Promise.all(l.map(b=>p(b)));if(v.includes("bad"))throw new TypeError("unsupported_file");if(v.includes("pdf")){if(l.length>1)throw new RangeError("too_many_pages");let b=l[0];if(b.size>n.pdf.maxBytes)throw new RangeError("file_too_large");return[{kind:"document_file",blob:b,contentType:"application/pdf"}]}let F=[];for(let b of l){let k=await h(b,e.uploadInternals);F.push({kind:"image",blob:k.blob,contentType:k.contentType})}return F},C=async(n,l,p)=>{let h=null;try{await e.runner().submit("poa",async(v,F)=>{if(h===null){let k=[];for(let _ of p){let T=l==="upload"?await v.presign(_.kind,_.contentType,_.blob.size,{source:"upload"}):await L(v,_.kind,_.contentType,_.blob.size,{engine:"poa_page"});await v.uploadToSpaces(T.uploadUrl,_.blob,_.contentType),k.push((await v.completeMedia(T.key)).key)}h=k}let b=p[0]?.kind==="document_file"?{part:n,source:"upload",pdfKey:h[0]}:{part:n,source:l,imageKeys:h};return v.submitCheck("poa",b,{idempotencyKey:F})})}catch(v){throw v instanceof x&&(v.code==="media_type_unsupported"||v.code==="media_type_mismatch")?new TypeError("unsupported_file"):(v instanceof x&&(v.code==="document_upload_not_allowed"||v.code==="uploaded_media_not_allowed")&&await e.refreshView?.().catch(()=>{}),v)}},I=async(n,l)=>{let p=y();if(p===null||!p.photo.uploadOffered)throw new RangeError("upload_not_offered");if(n==="holder_letter"&&p.phase!=="holder_letter")throw new RangeError("holder_letter_not_requested");let h=await w(p,l);e.destroyed()||(m(),await C(n,"upload",h))},D=(n,l)=>{let p=null,h=[],v=!0,F=()=>{for(let k of p?.getTracks()??[])k.stop();p=null},b={get pages(){return h},start:async()=>{if(!v||p!==null)return;let k=await(e.pageCamera?.open??Pe)();if(!v){for(let _ of k.getTracks())_.stop();return}p=k,(e.pageCamera?.attach??ke)(n,k)},takePage:async()=>{if(h.length>=l)throw new RangeError("too_many_pages");let k=await(e.pageCamera?.grab??be)(n);if(h.length>=l)throw new RangeError("too_many_pages");return h=[...h,k],k},removePage:k=>{h=h.filter((_,T)=>T!==k)},submitPages:()=>c(async()=>{if(h.length===0)throw new RangeError("no_pages");let k=y();if(k===null)throw new RangeError("camera_not_offered");let _=k.phase==="holder_letter"?"holder_letter":"document";await C(_,"camera",h.map(T=>({kind:"image",blob:T,contentType:"image/jpeg"}))),r?.handle===b?m():b.destroy()}),destroy:()=>{v=!1,h=[],F(),r?.handle===b&&(r=null)}};return b},M=async()=>{let n=y();if(n===null||!n.licenceAddressAccepted)throw new RangeError("licence_address_not_accepted");if(e.destroyed())return;m();let l={part:"document"};await e.runner().submit("poa",(p,h)=>p.submitCheck("poa",l,{idempotencyKey:h}))};return{bind:n=>({...n,...n.licenceAddressAccepted?{useLicenceAddress:()=>c(M)}:{},uploadPages:l=>c(()=>I("document",l)),uploadHolderLetter:l=>c(()=>I("holder_letter",l)),capturePage:l=>{if(n.photo.source==="upload")throw new RangeError("camera_not_offered");if(r!==null&&r.video===l.video)return r.handle;m();let p=D(l.video,n.maxPages);return r={video:l.video,handle:p},p}}),destroy:m}}function ce(e,r){let a=null,c=null,m=!1,y=null,w=null,C=[],I=(n,l)=>{n.off=l.on(n.event,n.handler)},D=()=>(c??(c=e.then(n=>{if(m)return null;let l=r(n),p=l.handle;for(let h of C)h.removed||I(h,p);return y!==null&&p.setSide(y),w!==null&&p.setGuide(w.guide),a=l,p}).catch(()=>{if(c=null,!m)for(let n of C)!n.removed&&n.event==="error"&&n.handler({kind:"generic",retryable:!0});return null})),c);return{handle:{get state(){return a?.handle.state??"idle"},on:(n,l)=>{let p={event:n,handler:l,off:null,removed:!1};return C.push(p),a!==null&&I(p,a.handle),()=>{p.removed=!0,p.off?.()}},start:async()=>{let n=await D();n!==null&&!m&&await n.start()},retry:()=>{a!==null?a.handle.retry():D().then(n=>n?.start())},setSide:n=>{a!==null?a.handle.setSide(n):y=n},shutter:()=>a?.handle.shutter(),setTorch:n=>a?.handle.setTorch(n),focusAt:(n,l)=>a?.handle.focusAt(n,l),setGuide:n=>{a!==null?a.handle.setGuide(n):w={guide:n}},destroy:()=>{m=!0,a?.handle.destroy(),C.length=0}},get plan(){return a?.plan??null},setFlowState:n=>a?.setFlowState(n),settle:(n,l)=>a?.settle(n,l),takeDeviceRead:n=>a?.takeDeviceRead(n)??null}}var Ce=1500,Se=["ID-1","ID-2","ID-3"],_e=["recto","verso","single"],Ie=["td1","td2","td3"],De=["pdf417","qr","datamatrix","aztec"],Me=["yes","no","some"],Re=["dmy","mdy","ymd"],Fe=["gregorian","hijri","solar_hijri","thai_buddhist"],Te=24,H=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),V=(e,r)=>typeof e=="string"&&r.includes(e),de=(e,r)=>e===null||V(e,r);function Ae(e){if(!H(e))return null;let{side:r,portrait:a,mrz:c,barcode:m,scripts:y}=e;return!V(r,_e)||typeof a!="boolean"||!de(c,Ie)||!de(m,De)||!Array.isArray(y)||!y.every(w=>typeof w=="string")?null:{side:r,portrait:a,mrz:c,barcode:m,scripts:[...y]}}function Ee(e){if(!H(e))return null;let{id:r,format:a,mrzCode:c,chip:m,dates:y,sides:w}=e;if(typeof r!="string"||!V(a,Se)||!(c===null||typeof c=="string")||!V(m,Me)||!H(y)||!V(y.order,Re)||!V(y.calendar,Fe)||!Array.isArray(w)||w.length<1||w.length>2)return null;let C=w.map(Ae);return C.some(I=>I===null)?null:{id:r,format:a,mrzCode:c,chip:m,dates:{order:y.order,calendar:y.calendar},sides:C}}function xe(e,r,a){if(!H(e)||e.country!==r||e.documentType!==a)return null;let{version:c,series:m}=e;if(typeof c!="number"||!Number.isInteger(c)||!Array.isArray(m)||m.length>Te)return null;let y=m.map(Ee);return y.some(w=>w===null)?null:{country:r,documentType:a,version:c,series:y}}function pe(e){return e.series.map(r=>({format:r.format,sides:r.sides}))}function Oe(e){return H(e)&&"success"in e&&"data"in e?e.data:e}function me(e,r={}){let a=e;if(a===null||typeof a.apiOrigin!="string"||typeof a.sessionToken!="string")return;let c=a.apiOrigin,m=a.sessionToken,y=r.timeoutMs??Ce;return(w,C)=>{let I=r.fetchImpl??(typeof fetch=="function"?fetch:void 0);if(I===void 0)return Promise.resolve(null);let D=typeof AbortController=="function"?new AbortController:void 0,M,n=new Promise(p=>{M=setTimeout(()=>{D?.abort(),p(null)},y)}),l=(async()=>{let p=`country=${encodeURIComponent(w)}&type=${encodeURIComponent(C)}`,h=await I(`${c}/api/v2/hosted/document-facts?${p}`,{method:"GET",headers:{"x-session-token":m,"x-sekyro-sdk":`@sekyro/web/${z}`},cache:"default",...D!==void 0?{signal:D.signal}:{}});return h.ok?xe(Oe(await h.json()),w,C):null})().catch(()=>null);return Promise.race([l,n]).finally(()=>clearTimeout(M))}}function fe(e){let r=e;if(typeof r.apiOrigin!="string"||typeof r.sessionToken!="string")return;let a=`${r.apiOrigin}/api/v2/hosted/capture-reports`,c=r.sessionToken;return m=>{try{fetch(a,{method:"POST",headers:{"content-type":"application/json","x-session-token":c,"x-sekyro-sdk":`@sekyro/web/${z}`},body:JSON.stringify({reports:m}),keepalive:!0}).catch(()=>{})}catch{}}}function ge(e){let r=e.apiOrigin;return ie("sdk",typeof r=="string"&&/staging|sandbox|localhost/.test(r)?"sandbox":"live")}function Le(e){return ge(e).replace(/\/ocr$/,"/barcode")}function yt(e){let r=null,a=null,c=null,m=q(),y=Promise.resolve(),w=()=>{c?.flow.handle.destroy(),c=null},C=null,I=()=>e.documentInternals?.catalogCapture??e.currentView()?.capture?.document?.catalog===!0,D=(t,u)=>{let o=`${t}:${u}`;if(C?.key===o)return C;if(C=null,!I()||e.documentInternals?.captureSeries!==void 0)return null;let i=e.documentFacts??me(e.runtime.client);if(i===void 0)return null;let d={key:o,promise:Promise.resolve(null),settled:!1,value:null};return d.promise=i(t,u).catch(()=>null).then(S=>(d.value=S,d.settled=!0,S)),C=d,d},M=t=>t===null?{}:{documentType:t.documentType,documentCountry:t.issuer},n=async(t,u,o)=>{if(e.destroyed())return;u.setFlowState("uploading");let i=null,d=M(o),S,P=!1,f=e.currentView()?.documents!==void 0;try{await r.submit("doc_ocr",async(G,ye)=>{if(i===null){let $=await L(G,"image","image/jpeg",t.image.size,{engine:"document"});await G.uploadToSpaces($.uploadUrl,t.image,"image/jpeg"),i=(await G.completeMedia($.key)).key}return u.setFlowState("checking"),S===void 0&&(S=u.takeDeviceRead(t)),G.submitCheck("doc_ocr",{imageKey:i,side:t.side,...S!==null?{deviceRead:S}:{},...f?{source:"camera"}:{},...d},{idempotencyKey:ye})})}catch{P=!0}finally{u.setFlowState("done")}if(e.destroyed())return;if(P){u.settle(t.side,{ok:!1,issue:"technical"});return}let E=e.currentView(),g=E===null?null:O(E,{isMobile:e.isMobile()});if(g?.kind!=="document"){u.settle(t.side,{ok:!0}),c?.flow===u?w():u.handle.destroy();return}if(g.reason==="document_type_not_accepted"||g.reason==="document_type_not_supported"){a=null,c?.flow===u&&w(),r.republish();return}let R=g.acceptedSides;t.side!=="single"&&(R.includes(t.side)||g.reason==="side_missing")&&!(R.includes("recto")&&R.includes("verso"))?(u.settle(t.side,{ok:!0}),a?.documentType!=="passport"&&u.handle.setSide(g.side)):g.reason==="document_sides_mismatch"&&R.length===0?(u.settle(t.side,{ok:!1,issue:"reread"}),u.handle.retry()):u.settle(t.side,{ok:!1,issue:"reread"})},l=null,p=async t=>{let u=e.currentView(),o=u===null?null:O(u,{isMobile:e.isMobile()});if(u===null||o?.kind!=="document")throw new RangeError("upload_not_offered");if(!o.photo.uploadOffered)throw new RangeError("upload_not_offered");let i=a,d=i?.documentType==="passport"?"single":o.side,{prepareUploadFile:S}=await import("./upload-file-EGXXM6TQ.js"),P=await S(t,e.uploadInternals);if(e.destroyed())return;w();let f=null,E=M(i);try{await r.submit("doc_ocr",async(g,R)=>{if(f===null){let A=await g.presign("image",P.contentType,P.blob.size,{source:"upload"});await g.uploadToSpaces(A.uploadUrl,P.blob,P.contentType),f=(await g.completeMedia(A.key)).key}return g.submitCheck("doc_ocr",{imageKey:f,side:d,source:"upload",...E},{idempotencyKey:R})})}catch(g){throw g instanceof x&&(g.code==="media_type_unsupported"||g.code==="media_type_mismatch")?new TypeError("unsupported_file"):(g instanceof x&&(g.code==="document_upload_not_allowed"||g.code==="uploaded_media_not_allowed")&&await e.refreshView().catch(()=>{}),g)}},h=(t,u)=>({...t,uploadDocument:o=>{let i=()=>p(o),d=(l===null?i():l.then(i,i)).finally(()=>{l===d&&(l=null)});return l=d,d},issuer:a?.issuer??null,documentType:a?.documentType??null,captureSide:a===null?null:a.documentType==="passport"?"single":t.side,selectDocument:(o,i)=>{if(!te(t.documents).includes(o)||!ee(t.documents,o).includes(i))throw new RangeError(`${i} from ${o} is not accepted`);(a?.issuer!==o||a.documentType!==i)&&w(),a={issuer:o,documentType:i},D(o,i),u()},capture:o=>{if(a===null)throw new Error("selectDocument() first");if(c!==null&&c.video===o.video)return c.flow.handle;w();let i=a,d=i.documentType==="passport"?"single":t.acceptedSides.length>0?t.side:void 0,S=g=>Z({video:o.video,documentType:i.documentType,issuer:i.issuer,...d!==void 0?{side:d}:{},...o.keepScreenAwake!==void 0?{keepScreenAwake:o.keepScreenAwake}:{},...o.liveMrz!==void 0?{liveMrz:o.liveMrz}:{},...o.barcodeAssetBaseUrl!==void 0?{barcodeAssetBaseUrl:o.barcodeAssetBaseUrl}:{}},{...e.documentInternals??{},...(()=>{let R=e.currentView()?.capture?.document,A=e.documentInternals?.blurRefuseSharpnessMax??R?.scan?.blurRefuseSharpnessMax;return{engineOptions:{camera:W(R?.camera),shutter:Y(R?.scan),guideLock:X(R?.guide),...e.documentInternals?.engineOptions??{}},...typeof A=="number"&&Number.isFinite(A)&&A>=0&&A<=1?{blurRefuseSharpnessMax:A}:{},catalogCapture:e.documentInternals?.catalogCapture??R?.catalog===!0,...g!==null&&e.documentInternals?.captureSeries===void 0?{captureSeries:pe(g)}:{}}})(),deferRead:!0,...e.documentInternals?.barcode!==void 0?{}:{barcode:{assetBaseUrl:Le(e.runtime.client)}},...(()=>{let R=e.currentView();if(R===null||e.documentInternals?.webOcr!==void 0)return{};let A=fe(e.runtime.client);return{webOcr:{captureDocument:R.capture?.document,salt:R.sessionId,baseUrl:ge(e.runtime.client),...A!==void 0?{reports:A}:{}}}})()}),P=D(i.issuer,i.documentType),f=P===null||P.settled?S(P?.value??null):ce(P.promise,S);c={video:o.video,flow:f};let E=f.handle.destroy;return f.handle.destroy=()=>{c?.flow===f&&(c=null),E()},m.newHandle(),f.handle.on("state",g=>m.note(g)),f.handle.on("error",g=>{m.noteError(),e.reportCaptureIssue?.(j("document",g,m.value))}),f.handle.on("captured",g=>{y=y.then(()=>n(g,f,i)).catch(()=>{})}),f.handle}}),v=null,F=null,b=new Set,k=e.runtime.client;e.runtime.client=new Proxy(k,{get(t,u){if(u==="submitCheck")return(F??t).submitCheck.bind(F??t);let o=Reflect.get(t,u);return typeof o=="function"?o.bind(t):o}});let _=()=>{v?.destroy(),v=null,F=null},T=t=>{let u=e.currentView(),o=u===null?null:O(u,{isMobile:e.isMobile()});if(u===null||o?.kind!=="liveness"||o.livePhoto?.icao!==!0)return;if(v===null){let P=oe({tuning:u.capture?.icao??null,tuningVersion:u.capture?.tuningVersion??null,...o.icao!=null?{policy:o.icao.policy}:{},still:o.livePhoto.still,...t.assetBaseUrl!==void 0?{assetBaseUrl:t.assetBaseUrl}:{}},e.livePhotoInternals);v=P,F=P.decorate(k),P.onGate(f=>{for(let E of b)E(f)})}let i=v,d=e.baseCapture??{},S=d.engineOptions?.telemetry;return{...d,engineOptions:{...d.engineOptions??{},measureQuality:i.engineOptions.measureQuality,telemetry:P=>{S?.(P),i.engineOptions.telemetry(P)}}}},B=se({keptPortraitInput:()=>v?.lastPortraitInput()??null,runner:()=>r,currentView:e.currentView,...e.cameraMode!==void 0?{cameraMode:e.cameraMode}:{},...e.captureModeSwitch!==void 0?{captureModeSwitch:e.captureModeSwitch}:{},destroyed:e.destroyed,isMobile:e.isMobile,...e.portraitInternals!==void 0?{internals:e.portraitInternals}:{},...e.uploadInternals!==void 0?{uploadInternals:e.uploadInternals}:{},refreshView:()=>e.refreshView(),...e.reportCaptureIssue!==void 0?{reportCaptureIssue:e.reportCaptureIssue}:{},reportGate:t=>fe(e.runtime.client)?.([t])}),U=ue({runner:()=>r,currentView:e.currentView,destroyed:e.destroyed,isMobile:e.isMobile,...e.uploadInternals!==void 0?{uploadInternals:e.uploadInternals}:{},...e.pageCameraInternals!==void 0?{pageCamera:e.pageCameraInternals}:{},refreshView:()=>e.refreshView()}),s=ae({...e,bindDocument:h,bindPortrait:B.bind,bindProofOfAddress:U.bind,stopCameras:()=>{w(),B.destroy(),U.destroy(),_(),e.stopLiveness?.()},onLivePhoto:t=>(b.add(t),()=>b.delete(t))});return r=s,{...s,captureInternals:T,destroy:()=>{w(),B.destroy(),U.destroy(),_(),b.clear()}}}export{Le as barcodeAssetBase,yt as createPlanRunner,fe as reportSink,ge as sdkAssetBase};
1
+ import{d as ie}from"./chunk-BD4KIQQD.js";import"./chunk-JLVZ35QK.js";import{a as ee,b as te,e as oe,f as K,g as O,j as ae}from"./chunk-W42RLLAC.js";import{x as Z}from"./chunk-EF4VD4GD.js";import{n as re}from"./chunk-VWGKUQ3C.js";import"./chunk-53POX7U4.js";import"./chunk-33KKMPJ5.js";import"./chunk-CJHMFPL6.js";import"./chunk-RI3E7GBN.js";import"./chunk-GI3UFGRQ.js";import{F as Y,i as W,x as X}from"./chunk-KCUXJT7L.js";import"./chunk-JULJQOVT.js";import"./chunk-SMKCBUJL.js";import"./chunk-XON3UNG3.js";import"./chunk-XFATG7QI.js";import{b as j,c as q,r as Q,t as J,u as L}from"./chunk-K7ICBHSZ.js";import"./chunk-NMPMXAH3.js";import"./chunk-7QZWBDI5.js";import"./chunk-2J6R5JOJ.js";import{b as N}from"./chunk-SX7TUC3V.js";import"./chunk-POIQGEZM.js";import"./chunk-CPUECYAJ.js";import"./chunk-FPXL63KZ.js";import{c as x,i as ne}from"./chunk-VZGTOE22.js";import"./chunk-TSA6GHUG.js";import{a as z}from"./chunk-AIRC3HT7.js";import"./chunk-FSSMUAKC.js";import"./chunk-QB62OPX5.js";import"./chunk-ISMVEF7H.js";var he=2e4,we=new Set(["media_type_unsupported","media_type_mismatch"]),le=new Set(["document_upload_not_allowed","portrait_source_not_allowed","uploaded_media_not_allowed"]);function se(e){let r=null,a=Promise.resolve(),c=!1,m=null,y=null,w=!1,C=null,I=!1,D=!1,M=()=>{r?.controller.handle.destroy(),r=null},n=()=>{let s=e.currentView(),t=s===null?null:O(s,{isMobile:e.isMobile()});return t?.kind==="portrait"?t:null},l=()=>{if(e.destroyed())return"self";let s=e.currentView(),t=s===null?void 0:K(s);return t==="self"||t==="assisted"?t:t==="choice"&&e.captureModeSwitch!==void 0?e.captureModeSwitch.pick()??"self":e.cameraMode?.()??J(t??Q(s),null)},p=e.captureModeSwitch,h=p===void 0?void 0:{session:()=>{let s=e.currentView();return s!==null&&K(s)==="choice"?"choice":l()},onModeChange:s=>p.choose(s)},v=async(s,t)=>{if(e.destroyed())return;let u=l();t.setFlowState("uploading"),c=!1;let o=null;try{await e.runner().submit("portrait_icao",async(d,S)=>{if(o===null){let g=await L(d,"image","image/jpeg",s.image.size,{engine:"portrait"});await d.uploadToSpaces(g.uploadUrl,s.image,"image/jpeg"),o=(await d.completeMedia(g.key)).key}t.setFlowState("checking");let P={media:{portrait:o},gate:ne(s.gate),...s.tuningVersion!==void 0?{tuningVersion:s.tuningVersion}:{},source:"camera",capture:{mode:u,facingMode:s.facingMode}};return d.submitCheck("portrait_icao",P,{idempotencyKey:S})})}catch(d){c=!0,d instanceof x&&le.has(d.code)&&await e.refreshView?.().catch(()=>{})}if(t.setFlowState("done"),e.destroyed())return;let i=n();(i===null||i.phase!=="capture")&&r?.controller===t&&M(),e.runner().republish()},F=s=>e.runner().submit("face_match",(t,u)=>t.submitCheck("face_match",e.runner().faceProbeSkipped()?{simulatedCapture:!0}:{},{idempotencyKey:u})).then(()=>{},()=>{c=!0,s()}),b=null,k=async s=>{let t=n();if(t===null||t.phase!=="capture"||!t.photo.uploadOffered)throw new RangeError("upload_not_offered");let{prepareUploadFile:u}=await import("./upload-file-EGXXM6TQ.js"),o=await u(s,e.uploadInternals);if(e.destroyed())return;M(),c=!1;let i=null;try{await e.runner().submit("portrait_icao",async(d,S)=>{if(i===null){let g=await d.presign("image",o.contentType,o.blob.size,{source:"upload"});await d.uploadToSpaces(g.uploadUrl,o.blob,o.contentType),i=(await d.completeMedia(g.key)).key}let P={media:{portrait:i},source:"upload"};return d.submitCheck("portrait_icao",P,{idempotencyKey:S})})}catch(d){throw d instanceof x&&we.has(d.code)?new TypeError("unsupported_file"):(d instanceof x&&le.has(d.code)&&await e.refreshView?.().catch(()=>{}),d)}},_=null,T=s=>{if(_!==null)return _;let t=n();if(t===null||t.phase!=="review")return Promise.reject(new RangeError("no_pending_fix"));let u={fixReview:{accept:s}},o=e.runner().submit("portrait_icao",(i,d)=>i.submitCheck("portrait_icao",u,{idempotencyKey:d})).catch(async i=>{throw i instanceof x&&i.code==="portrait_no_pending_fix"&&await e.refreshView?.().catch(()=>{}),i}).finally(()=>{_=null});return _=o,o},B=s=>{let t=()=>k(s),u=(b===null?t():b.then(t,t)).finally(()=>{b===u&&(b=null)});return b=u,u};return{bind:(s,t)=>{if(s.phase==="review")return M(),{...s,uploadFailed:c,resubmit:()=>Promise.resolve(),capture:()=>{throw new Error("the adjusted photo waits for confirmFix()")},uploadPortrait:()=>Promise.reject(new RangeError("upload_not_offered")),confirmFix:T};if(s.phase==="match")return M(),m!==s.attemptsRemaining&&!c&&(m=s.attemptsRemaining,F(t)),{...s,uploadFailed:c,resubmit:()=>(c=!1,m=s.attemptsRemaining,t(),F(t)),capture:()=>{throw new Error("the portrait was already accepted")},uploadPortrait:()=>Promise.reject(new RangeError("upload_not_offered")),confirmFix:T};if(m=null,s.reuse===!0&&s.phase==="capture")return M(),!I&&C!==s.attemptsRemaining&&(C=s.attemptsRemaining,I=!0,e.runner().submit("portrait_icao",(o,i)=>o.submitCheck("portrait_icao",{},{idempotencyKey:i})).then(()=>{D=!1},()=>{D=!0}).finally(()=>{I=!1,t()})),{kind:"processing",key:"processing",context:s.context,section:s.section,stalled:D&&!I,refresh:()=>(D=!1,C=null,t(),Promise.resolve())};let u=e.keptPortraitInput?.()??null;return u!==null&&(w||u!==y&&s.report===null&&s.reason===void 0&&!s.retakeOnly)?(w||(y=u,w=!0,e.runner().submit("portrait_icao",(o,i)=>o.submitCheck("portrait_icao",u,{idempotencyKey:i})).catch(()=>{}).finally(()=>{w=!1,t()})),{kind:"processing",key:"processing",context:s.context,section:s.section,stalled:!1,refresh:()=>Promise.resolve()}):{...s,uploadFailed:c,resubmit:()=>Promise.resolve(),capture:o=>{if(r!==null&&r.video===o.video)return r.controller.handle;M(),c=!1;let i=re({video:o.video,tuning:s.tuning,tuningVersion:s.tuningVersion,...s.icao!=null?{policy:s.icao.policy}:{},...o.keepScreenAwake!==void 0?{keepScreenAwake:o.keepScreenAwake}:{},...o.assetBaseUrl!==void 0?{assetBaseUrl:o.assetBaseUrl}:{}},e.internals,l,h);r={video:o.video,controller:i};let d=i.handle.destroy;i.handle.destroy=()=>{r?.controller===i&&(r=null),d()},i.handle.on("error",g=>{e.reportCaptureIssue?.(j("portrait",g,0))});let S=!1,P=(g,E)=>{let f=i.gateScores();f!==null&&e.reportGate?.({kind:"portrait_gate",platform:"web",outcome:g,...E!==null?{failing:E}:{},...f})};return i.handle.on("gate",g=>{!S&&!g.ready&&(i.gateScores()?.elapsedMs??0)>=he&&(S=!0,P("stuck",g.failing))}),i.handle.on("captured",g=>{P("captured",null),S=!1,a=a.then(()=>v(g,i)).catch(()=>{})}),i.handle},uploadPortrait:B,confirmFix:T}},destroy:M}}var ve=.92,Pe=()=>N("environment",{width:{ideal:1920},height:{ideal:1080}},{getUserMedia:e=>navigator.mediaDevices.getUserMedia(e),enumerateDevices:()=>navigator.mediaDevices.enumerateDevices()}),be=e=>{let r=document.createElement("canvas");r.width=e.videoWidth,r.height=e.videoHeight;let a=r.getContext("2d");return a===null||r.width===0||r.height===0?Promise.reject(new Error("the camera has no frame yet")):(a.drawImage(e,0,0,r.width,r.height),new Promise((c,m)=>r.toBlob(y=>y===null?m(new Error("the still could not be encoded")):c(y),"image/jpeg",ve)))},ke=(e,r)=>{try{e.muted=!0,e.playsInline=!0,e.srcObject=r,e.play().catch(()=>{})}catch{}};function ue(e){let r=null,a=null,c=n=>{let l=(a===null?n():a.then(n,n)).finally(()=>{a===l&&(a=null)});return a=l,l},m=()=>{r?.handle.destroy(),r=null},y=()=>{let n=e.currentView(),l=n===null?null:O(n,{isMobile:e.isMobile()});return l?.kind==="proof_of_address"?l:null},w=async(n,l)=>{if(l.length===0)throw new RangeError("no_pages");if(l.length>n.maxPages)throw new RangeError("too_many_pages");let{pdfFileKind:p,prepareUploadFile:h}=await import("./upload-file-EGXXM6TQ.js"),v=await Promise.all(l.map(b=>p(b)));if(v.includes("bad"))throw new TypeError("unsupported_file");if(v.includes("pdf")){if(l.length>1)throw new RangeError("too_many_pages");let b=l[0];if(b.size>n.pdf.maxBytes)throw new RangeError("file_too_large");return[{kind:"document_file",blob:b,contentType:"application/pdf"}]}let F=[];for(let b of l){let k=await h(b,e.uploadInternals);F.push({kind:"image",blob:k.blob,contentType:k.contentType})}return F},C=async(n,l,p)=>{let h=null;try{await e.runner().submit("poa",async(v,F)=>{if(h===null){let k=[];for(let _ of p){let T=l==="upload"?await v.presign(_.kind,_.contentType,_.blob.size,{source:"upload"}):await L(v,_.kind,_.contentType,_.blob.size,{engine:"poa_page"});await v.uploadToSpaces(T.uploadUrl,_.blob,_.contentType),k.push((await v.completeMedia(T.key)).key)}h=k}let b=p[0]?.kind==="document_file"?{part:n,source:"upload",pdfKey:h[0]}:{part:n,source:l,imageKeys:h};return v.submitCheck("poa",b,{idempotencyKey:F})})}catch(v){throw v instanceof x&&(v.code==="media_type_unsupported"||v.code==="media_type_mismatch")?new TypeError("unsupported_file"):(v instanceof x&&(v.code==="document_upload_not_allowed"||v.code==="uploaded_media_not_allowed")&&await e.refreshView?.().catch(()=>{}),v)}},I=async(n,l)=>{let p=y();if(p===null||!p.photo.uploadOffered)throw new RangeError("upload_not_offered");if(n==="holder_letter"&&p.phase!=="holder_letter")throw new RangeError("holder_letter_not_requested");let h=await w(p,l);e.destroyed()||(m(),await C(n,"upload",h))},D=(n,l)=>{let p=null,h=[],v=!0,F=()=>{for(let k of p?.getTracks()??[])k.stop();p=null},b={get pages(){return h},start:async()=>{if(!v||p!==null)return;let k=await(e.pageCamera?.open??Pe)();if(!v){for(let _ of k.getTracks())_.stop();return}p=k,(e.pageCamera?.attach??ke)(n,k)},takePage:async()=>{if(h.length>=l)throw new RangeError("too_many_pages");let k=await(e.pageCamera?.grab??be)(n);if(h.length>=l)throw new RangeError("too_many_pages");return h=[...h,k],k},removePage:k=>{h=h.filter((_,T)=>T!==k)},submitPages:()=>c(async()=>{if(h.length===0)throw new RangeError("no_pages");let k=y();if(k===null)throw new RangeError("camera_not_offered");let _=k.phase==="holder_letter"?"holder_letter":"document";await C(_,"camera",h.map(T=>({kind:"image",blob:T,contentType:"image/jpeg"}))),r?.handle===b?m():b.destroy()}),destroy:()=>{v=!1,h=[],F(),r?.handle===b&&(r=null)}};return b},M=async()=>{let n=y();if(n===null||!n.licenceAddressAccepted)throw new RangeError("licence_address_not_accepted");if(e.destroyed())return;m();let l={part:"document"};await e.runner().submit("poa",(p,h)=>p.submitCheck("poa",l,{idempotencyKey:h}))};return{bind:n=>({...n,...n.licenceAddressAccepted?{useLicenceAddress:()=>c(M)}:{},uploadPages:l=>c(()=>I("document",l)),uploadHolderLetter:l=>c(()=>I("holder_letter",l)),capturePage:l=>{if(n.photo.source==="upload")throw new RangeError("camera_not_offered");if(r!==null&&r.video===l.video)return r.handle;m();let p=D(l.video,n.maxPages);return r={video:l.video,handle:p},p}}),destroy:m}}function ce(e,r){let a=null,c=null,m=!1,y=null,w=null,C=[],I=(n,l)=>{n.off=l.on(n.event,n.handler)},D=()=>(c??(c=e.then(n=>{if(m)return null;let l=r(n),p=l.handle;for(let h of C)h.removed||I(h,p);return y!==null&&p.setSide(y),w!==null&&p.setGuide(w.guide),a=l,p}).catch(()=>{if(c=null,!m)for(let n of C)!n.removed&&n.event==="error"&&n.handler({kind:"generic",retryable:!0});return null})),c);return{handle:{get state(){return a?.handle.state??"idle"},on:(n,l)=>{let p={event:n,handler:l,off:null,removed:!1};return C.push(p),a!==null&&I(p,a.handle),()=>{p.removed=!0,p.off?.()}},start:async()=>{let n=await D();n!==null&&!m&&await n.start()},retry:()=>{a!==null?a.handle.retry():D().then(n=>n?.start())},setSide:n=>{a!==null?a.handle.setSide(n):y=n},shutter:()=>a?.handle.shutter(),setTorch:n=>a?.handle.setTorch(n),focusAt:(n,l)=>a?.handle.focusAt(n,l),setGuide:n=>{a!==null?a.handle.setGuide(n):w={guide:n}},destroy:()=>{m=!0,a?.handle.destroy(),C.length=0}},get plan(){return a?.plan??null},setFlowState:n=>a?.setFlowState(n),settle:(n,l)=>a?.settle(n,l),takeDeviceRead:n=>a?.takeDeviceRead(n)??null}}var Ce=1500,Se=["ID-1","ID-2","ID-3"],_e=["recto","verso","single"],Ie=["td1","td2","td3"],De=["pdf417","qr","datamatrix","aztec"],Me=["yes","no","some"],Re=["dmy","mdy","ymd"],Fe=["gregorian","hijri","solar_hijri","thai_buddhist"],Te=24,H=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),V=(e,r)=>typeof e=="string"&&r.includes(e),de=(e,r)=>e===null||V(e,r);function Ae(e){if(!H(e))return null;let{side:r,portrait:a,mrz:c,barcode:m,scripts:y}=e;return!V(r,_e)||typeof a!="boolean"||!de(c,Ie)||!de(m,De)||!Array.isArray(y)||!y.every(w=>typeof w=="string")?null:{side:r,portrait:a,mrz:c,barcode:m,scripts:[...y]}}function Ee(e){if(!H(e))return null;let{id:r,format:a,mrzCode:c,chip:m,dates:y,sides:w}=e;if(typeof r!="string"||!V(a,Se)||!(c===null||typeof c=="string")||!V(m,Me)||!H(y)||!V(y.order,Re)||!V(y.calendar,Fe)||!Array.isArray(w)||w.length<1||w.length>2)return null;let C=w.map(Ae);return C.some(I=>I===null)?null:{id:r,format:a,mrzCode:c,chip:m,dates:{order:y.order,calendar:y.calendar},sides:C}}function xe(e,r,a){if(!H(e)||e.country!==r||e.documentType!==a)return null;let{version:c,series:m}=e;if(typeof c!="number"||!Number.isInteger(c)||!Array.isArray(m)||m.length>Te)return null;let y=m.map(Ee);return y.some(w=>w===null)?null:{country:r,documentType:a,version:c,series:y}}function pe(e){return e.series.map(r=>({format:r.format,sides:r.sides}))}function Oe(e){return H(e)&&"success"in e&&"data"in e?e.data:e}function me(e,r={}){let a=e;if(a===null||typeof a.apiOrigin!="string"||typeof a.sessionToken!="string")return;let c=a.apiOrigin,m=a.sessionToken,y=r.timeoutMs??Ce;return(w,C)=>{let I=r.fetchImpl??(typeof fetch=="function"?fetch:void 0);if(I===void 0)return Promise.resolve(null);let D=typeof AbortController=="function"?new AbortController:void 0,M,n=new Promise(p=>{M=setTimeout(()=>{D?.abort(),p(null)},y)}),l=(async()=>{let p=`country=${encodeURIComponent(w)}&type=${encodeURIComponent(C)}`,h=await I(`${c}/api/v2/hosted/document-facts?${p}`,{method:"GET",headers:{"x-session-token":m,"x-sekyro-sdk":`@sekyro/web/${z}`},cache:"default",...D!==void 0?{signal:D.signal}:{}});return h.ok?xe(Oe(await h.json()),w,C):null})().catch(()=>null);return Promise.race([l,n]).finally(()=>clearTimeout(M))}}function fe(e){let r=e;if(typeof r.apiOrigin!="string"||typeof r.sessionToken!="string")return;let a=`${r.apiOrigin}/api/v2/hosted/capture-reports`,c=r.sessionToken;return m=>{try{fetch(a,{method:"POST",headers:{"content-type":"application/json","x-session-token":c,"x-sekyro-sdk":`@sekyro/web/${z}`},body:JSON.stringify({reports:m}),keepalive:!0}).catch(()=>{})}catch{}}}function ge(e){let r=e.apiOrigin;return ie("sdk",typeof r=="string"&&/staging|sandbox|localhost/.test(r)?"sandbox":"live")}function Le(e){return ge(e).replace(/\/ocr$/,"/barcode")}function yt(e){let r=null,a=null,c=null,m=q(),y=Promise.resolve(),w=()=>{c?.flow.handle.destroy(),c=null},C=null,I=()=>e.documentInternals?.catalogCapture??e.currentView()?.capture?.document?.catalog===!0,D=(t,u)=>{let o=`${t}:${u}`;if(C?.key===o)return C;if(C=null,!I()||e.documentInternals?.captureSeries!==void 0)return null;let i=e.documentFacts??me(e.runtime.client);if(i===void 0)return null;let d={key:o,promise:Promise.resolve(null),settled:!1,value:null};return d.promise=i(t,u).catch(()=>null).then(S=>(d.value=S,d.settled=!0,S)),C=d,d},M=t=>t===null?{}:{documentType:t.documentType,documentCountry:t.issuer},n=async(t,u,o)=>{if(e.destroyed())return;u.setFlowState("uploading");let i=null,d=M(o),S,P=!1,g=e.currentView()?.documents!==void 0;try{await r.submit("doc_ocr",async(G,ye)=>{if(i===null){let $=await L(G,"image","image/jpeg",t.image.size,{engine:"document"});await G.uploadToSpaces($.uploadUrl,t.image,"image/jpeg"),i=(await G.completeMedia($.key)).key}return u.setFlowState("checking"),S===void 0&&(S=u.takeDeviceRead(t)),G.submitCheck("doc_ocr",{imageKey:i,side:t.side,...S!==null?{deviceRead:S}:{},...g?{source:"camera"}:{},...d},{idempotencyKey:ye})})}catch{P=!0}finally{u.setFlowState("done")}if(e.destroyed())return;if(P){u.settle(t.side,{ok:!1,issue:"technical"});return}let E=e.currentView(),f=E===null?null:O(E,{isMobile:e.isMobile()});if(f?.kind!=="document"){u.settle(t.side,{ok:!0}),c?.flow===u?w():u.handle.destroy();return}if(f.reason==="document_type_not_accepted"||f.reason==="document_type_not_supported"){a=null,c?.flow===u&&w(),r.republish();return}let R=f.acceptedSides;t.side!=="single"&&f.side!==t.side&&(R.includes(t.side)||f.reason==="side_missing")&&!(R.includes("recto")&&R.includes("verso"))?(u.settle(t.side,{ok:!0}),a?.documentType!=="passport"&&u.handle.setSide(f.side)):f.reason==="document_sides_mismatch"&&R.length===0?(u.settle(t.side,{ok:!1,issue:"reread"}),u.handle.retry()):u.settle(t.side,{ok:!1,issue:"reread"})},l=null,p=async t=>{let u=e.currentView(),o=u===null?null:O(u,{isMobile:e.isMobile()});if(u===null||o?.kind!=="document")throw new RangeError("upload_not_offered");if(!o.photo.uploadOffered)throw new RangeError("upload_not_offered");let i=a,d=i?.documentType==="passport"?"single":o.side,{prepareUploadFile:S}=await import("./upload-file-EGXXM6TQ.js"),P=await S(t,e.uploadInternals);if(e.destroyed())return;w();let g=null,E=M(i);try{await r.submit("doc_ocr",async(f,R)=>{if(g===null){let A=await f.presign("image",P.contentType,P.blob.size,{source:"upload"});await f.uploadToSpaces(A.uploadUrl,P.blob,P.contentType),g=(await f.completeMedia(A.key)).key}return f.submitCheck("doc_ocr",{imageKey:g,side:d,source:"upload",...E},{idempotencyKey:R})})}catch(f){throw f instanceof x&&(f.code==="media_type_unsupported"||f.code==="media_type_mismatch")?new TypeError("unsupported_file"):(f instanceof x&&(f.code==="document_upload_not_allowed"||f.code==="uploaded_media_not_allowed")&&await e.refreshView().catch(()=>{}),f)}},h=(t,u)=>({...t,uploadDocument:o=>{let i=()=>p(o),d=(l===null?i():l.then(i,i)).finally(()=>{l===d&&(l=null)});return l=d,d},issuer:a?.issuer??null,documentType:a?.documentType??null,captureSide:a===null?null:a.documentType==="passport"?"single":t.side,selectDocument:(o,i)=>{if(!te(t.documents).includes(o)||!ee(t.documents,o).includes(i))throw new RangeError(`${i} from ${o} is not accepted`);(a?.issuer!==o||a.documentType!==i)&&w(),a={issuer:o,documentType:i},D(o,i),u()},capture:o=>{if(a===null)throw new Error("selectDocument() first");if(c!==null&&c.video===o.video)return c.flow.handle;w();let i=a,d=i.documentType==="passport"?"single":t.acceptedSides.length>0?t.side:void 0,S=f=>Z({video:o.video,documentType:i.documentType,issuer:i.issuer,...d!==void 0?{side:d}:{},...o.keepScreenAwake!==void 0?{keepScreenAwake:o.keepScreenAwake}:{},...o.liveMrz!==void 0?{liveMrz:o.liveMrz}:{},...o.barcodeAssetBaseUrl!==void 0?{barcodeAssetBaseUrl:o.barcodeAssetBaseUrl}:{}},{...e.documentInternals??{},...(()=>{let R=e.currentView()?.capture?.document,A=e.documentInternals?.blurRefuseSharpnessMax??R?.scan?.blurRefuseSharpnessMax;return{engineOptions:{camera:W(R?.camera),shutter:Y(R?.scan),guideLock:X(R?.guide),...e.documentInternals?.engineOptions??{}},...typeof A=="number"&&Number.isFinite(A)&&A>=0&&A<=1?{blurRefuseSharpnessMax:A}:{},catalogCapture:e.documentInternals?.catalogCapture??R?.catalog===!0,...f!==null&&e.documentInternals?.captureSeries===void 0?{captureSeries:pe(f)}:{}}})(),deferRead:!0,...e.documentInternals?.barcode!==void 0?{}:{barcode:{assetBaseUrl:Le(e.runtime.client)}},...(()=>{let R=e.currentView();if(R===null||e.documentInternals?.webOcr!==void 0)return{};let A=fe(e.runtime.client);return{webOcr:{captureDocument:R.capture?.document,salt:R.sessionId,baseUrl:ge(e.runtime.client),...A!==void 0?{reports:A}:{}}}})()}),P=D(i.issuer,i.documentType),g=P===null||P.settled?S(P?.value??null):ce(P.promise,S);c={video:o.video,flow:g};let E=g.handle.destroy;return g.handle.destroy=()=>{c?.flow===g&&(c=null),E()},m.newHandle(),g.handle.on("state",f=>m.note(f)),g.handle.on("error",f=>{m.noteError(),e.reportCaptureIssue?.(j("document",f,m.value))}),g.handle.on("captured",f=>{y=y.then(()=>n(f,g,i)).catch(()=>{})}),g.handle}}),v=null,F=null,b=new Set,k=e.runtime.client;e.runtime.client=new Proxy(k,{get(t,u){if(u==="submitCheck")return(F??t).submitCheck.bind(F??t);let o=Reflect.get(t,u);return typeof o=="function"?o.bind(t):o}});let _=()=>{v?.destroy(),v=null,F=null},T=t=>{let u=e.currentView(),o=u===null?null:O(u,{isMobile:e.isMobile()});if(u===null||o?.kind!=="liveness"||o.livePhoto?.icao!==!0)return;if(v===null){let P=oe({tuning:u.capture?.icao??null,tuningVersion:u.capture?.tuningVersion??null,...o.icao!=null?{policy:o.icao.policy}:{},still:o.livePhoto.still,...t.assetBaseUrl!==void 0?{assetBaseUrl:t.assetBaseUrl}:{}},e.livePhotoInternals);v=P,F=P.decorate(k),P.onGate(g=>{for(let E of b)E(g)})}let i=v,d=e.baseCapture??{},S=d.engineOptions?.telemetry;return{...d,engineOptions:{...d.engineOptions??{},measureQuality:i.engineOptions.measureQuality,telemetry:P=>{S?.(P),i.engineOptions.telemetry(P)}}}},B=se({keptPortraitInput:()=>v?.lastPortraitInput()??null,runner:()=>r,currentView:e.currentView,...e.cameraMode!==void 0?{cameraMode:e.cameraMode}:{},...e.captureModeSwitch!==void 0?{captureModeSwitch:e.captureModeSwitch}:{},destroyed:e.destroyed,isMobile:e.isMobile,...e.portraitInternals!==void 0?{internals:e.portraitInternals}:{},...e.uploadInternals!==void 0?{uploadInternals:e.uploadInternals}:{},refreshView:()=>e.refreshView(),...e.reportCaptureIssue!==void 0?{reportCaptureIssue:e.reportCaptureIssue}:{},reportGate:t=>fe(e.runtime.client)?.([t])}),U=ue({runner:()=>r,currentView:e.currentView,destroyed:e.destroyed,isMobile:e.isMobile,...e.uploadInternals!==void 0?{uploadInternals:e.uploadInternals}:{},...e.pageCameraInternals!==void 0?{pageCamera:e.pageCameraInternals}:{},refreshView:()=>e.refreshView()}),s=ae({...e,bindDocument:h,bindPortrait:B.bind,bindProofOfAddress:U.bind,stopCameras:()=>{w(),B.destroy(),U.destroy(),_(),e.stopLiveness?.()},onLivePhoto:t=>(b.add(t),()=>b.delete(t))});return r=s,{...s,captureInternals:T,destroy:()=>{w(),B.destroy(),U.destroy(),_(),b.clear()}}}export{Le as barcodeAssetBase,yt as createPlanRunner,fe as reportSink,ge as sdkAssetBase};
@@ -1489,6 +1489,15 @@ interface HostedSessionView {
1489
1489
  * one intro line, the short Human consent terms) or `identity`. Absent on older APIs: treat as `identity`.
1490
1490
  */
1491
1491
  purpose?: "human" | "identity";
1492
+ /**
1493
+ * The levels the session can reach, worst and best path (1 Contact, 2 Human, 3 Identity), as on the partner create
1494
+ * answer. A session whose best path proves level 1 (contact or device steps only) is a Contact verification, whatever
1495
+ * its `purpose`. Absent on older APIs.
1496
+ */
1497
+ levelTarget?: {
1498
+ min: number;
1499
+ max: number;
1500
+ };
1492
1501
  /**
1493
1502
  * Spec 2026-10-29 §3.4: `true` when a flow fallback takes over a missing camera at the live step
1494
1503
  * (`POST /hosted/camera-unavailable` continues the session instead of ending it). Absent otherwise and on
@@ -1489,6 +1489,15 @@ interface HostedSessionView {
1489
1489
  * one intro line, the short Human consent terms) or `identity`. Absent on older APIs: treat as `identity`.
1490
1490
  */
1491
1491
  purpose?: "human" | "identity";
1492
+ /**
1493
+ * The levels the session can reach, worst and best path (1 Contact, 2 Human, 3 Identity), as on the partner create
1494
+ * answer. A session whose best path proves level 1 (contact or device steps only) is a Contact verification, whatever
1495
+ * its `purpose`. Absent on older APIs.
1496
+ */
1497
+ levelTarget?: {
1498
+ min: number;
1499
+ max: number;
1500
+ };
1492
1501
  /**
1493
1502
  * Spec 2026-10-29 §3.4: `true` when a flow fallback takes over a missing camera at the live step
1494
1503
  * (`POST /hosted/camera-unavailable` continues the session instead of ending it). Absent otherwise and on
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sekyro/web",
3
- "version": "0.1.0-rc.34",
3
+ "version": "0.1.0-rc.36",
4
4
  "description": "Sekyro AI web SDK \u2014 browser liveness capture, hosted-verification client and popup embed for Sekyro AI identity verification",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {
package/sbom.cdx.json CHANGED
@@ -97,8 +97,8 @@
97
97
  "type": "application",
98
98
  "name": "web",
99
99
  "group": "@sekyro",
100
- "version": "0.1.0-rc.34",
101
- "bom-ref": "@sekyro/web@0.1.0-rc.34",
100
+ "version": "0.1.0-rc.36",
101
+ "bom-ref": "@sekyro/web@0.1.0-rc.36",
102
102
  "description": "Sekyro AI web SDK — browser liveness capture, hosted-verification client and popup embed for Sekyro AI identity verification",
103
103
  "licenses": [
104
104
  {
@@ -108,7 +108,7 @@
108
108
  }
109
109
  }
110
110
  ],
111
- "purl": "pkg:npm/%40sekyro/web@0.1.0-rc.34?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2FIBTIKAR-Technologies%2Fibtikar-identity.git%23packages%2Fsekyro-web",
111
+ "purl": "pkg:npm/%40sekyro/web@0.1.0-rc.36?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2FIBTIKAR-Technologies%2Fibtikar-identity.git%23packages%2Fsekyro-web",
112
112
  "externalReferences": [
113
113
  {
114
114
  "url": "https://github.com/IBTIKAR-Technologies/ibtikar-identity/issues",
@@ -150,7 +150,7 @@
150
150
  "name": "tasks-vision",
151
151
  "group": "@mediapipe",
152
152
  "version": "0.10.35",
153
- "bom-ref": "@sekyro/web@0.1.0-rc.34|@mediapipe/tasks-vision@0.10.35",
153
+ "bom-ref": "@sekyro/web@0.1.0-rc.36|@mediapipe/tasks-vision@0.10.35",
154
154
  "licenses": [
155
155
  {
156
156
  "license": {
@@ -185,7 +185,7 @@
185
185
  "name": "thumbmarkjs",
186
186
  "group": "@thumbmarkjs",
187
187
  "version": "1.12.0",
188
- "bom-ref": "@sekyro/web@0.1.0-rc.34|@thumbmarkjs/thumbmarkjs@1.12.0",
188
+ "bom-ref": "@sekyro/web@0.1.0-rc.36|@thumbmarkjs/thumbmarkjs@1.12.0",
189
189
  "licenses": [
190
190
  {
191
191
  "license": {
@@ -220,7 +220,7 @@
220
220
  "name": "emscripten",
221
221
  "group": "@types",
222
222
  "version": "1.41.6",
223
- "bom-ref": "@sekyro/web@0.1.0-rc.34|@types/emscripten@1.41.6",
223
+ "bom-ref": "@sekyro/web@0.1.0-rc.36|@types/emscripten@1.41.6",
224
224
  "licenses": [
225
225
  {
226
226
  "license": {
@@ -254,7 +254,7 @@
254
254
  "type": "library",
255
255
  "name": "type-fest",
256
256
  "version": "4.41.0",
257
- "bom-ref": "@sekyro/web@0.1.0-rc.34|type-fest@4.41.0",
257
+ "bom-ref": "@sekyro/web@0.1.0-rc.36|type-fest@4.41.0",
258
258
  "licenses": [
259
259
  {
260
260
  "expression": "(MIT OR CC0-1.0)",
@@ -286,7 +286,7 @@
286
286
  "type": "library",
287
287
  "name": "zxing-wasm",
288
288
  "version": "2.1.0",
289
- "bom-ref": "@sekyro/web@0.1.0-rc.34|zxing-wasm@2.1.0",
289
+ "bom-ref": "@sekyro/web@0.1.0-rc.36|zxing-wasm@2.1.0",
290
290
  "licenses": [
291
291
  {
292
292
  "license": {
@@ -319,30 +319,30 @@
319
319
  ],
320
320
  "dependencies": [
321
321
  {
322
- "ref": "@sekyro/web@0.1.0-rc.34",
322
+ "ref": "@sekyro/web@0.1.0-rc.36",
323
323
  "dependsOn": [
324
- "@sekyro/web@0.1.0-rc.34|@mediapipe/tasks-vision@0.10.35",
325
- "@sekyro/web@0.1.0-rc.34|@thumbmarkjs/thumbmarkjs@1.12.0",
326
- "@sekyro/web@0.1.0-rc.34|zxing-wasm@2.1.0"
324
+ "@sekyro/web@0.1.0-rc.36|@mediapipe/tasks-vision@0.10.35",
325
+ "@sekyro/web@0.1.0-rc.36|@thumbmarkjs/thumbmarkjs@1.12.0",
326
+ "@sekyro/web@0.1.0-rc.36|zxing-wasm@2.1.0"
327
327
  ]
328
328
  },
329
329
  {
330
- "ref": "@sekyro/web@0.1.0-rc.34|@mediapipe/tasks-vision@0.10.35"
330
+ "ref": "@sekyro/web@0.1.0-rc.36|@mediapipe/tasks-vision@0.10.35"
331
331
  },
332
332
  {
333
- "ref": "@sekyro/web@0.1.0-rc.34|@thumbmarkjs/thumbmarkjs@1.12.0"
333
+ "ref": "@sekyro/web@0.1.0-rc.36|@thumbmarkjs/thumbmarkjs@1.12.0"
334
334
  },
335
335
  {
336
- "ref": "@sekyro/web@0.1.0-rc.34|@types/emscripten@1.41.6"
336
+ "ref": "@sekyro/web@0.1.0-rc.36|@types/emscripten@1.41.6"
337
337
  },
338
338
  {
339
- "ref": "@sekyro/web@0.1.0-rc.34|type-fest@4.41.0"
339
+ "ref": "@sekyro/web@0.1.0-rc.36|type-fest@4.41.0"
340
340
  },
341
341
  {
342
- "ref": "@sekyro/web@0.1.0-rc.34|zxing-wasm@2.1.0",
342
+ "ref": "@sekyro/web@0.1.0-rc.36|zxing-wasm@2.1.0",
343
343
  "dependsOn": [
344
- "@sekyro/web@0.1.0-rc.34|@types/emscripten@1.41.6",
345
- "@sekyro/web@0.1.0-rc.34|type-fest@4.41.0"
344
+ "@sekyro/web@0.1.0-rc.36|@types/emscripten@1.41.6",
345
+ "@sekyro/web@0.1.0-rc.36|type-fest@4.41.0"
346
346
  ]
347
347
  }
348
348
  ]
@@ -1 +0,0 @@
1
- import{C as Me,F as ve,G as ie,H as Te,I as N,J as Y,d as q,e as Ce,f as Pe,g as Ae,i as Re,j as re,l as $,m as oe,o as we,p as xe,q as Ee,u as Ie}from"./chunk-JFTEP2WJ.js";import{c as _e,d as be,e as ke}from"./chunk-FPXL63KZ.js";import{c as j,h as J,i as Oe}from"./chunk-Y5C4YJQT.js";var Ne=["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"];var ut=["carte_identite","passport","residence_permit","drivers_license"],ct=["carte_identite","passport","residence_permit"];function dt(e,t){let n=e.byIssuer?.[t]??e.default;return ut.filter(i=>n==="*"?ct.includes(i):n.includes(i))}function Nn(e,t=Ne){return[...new Set([...t,...Object.keys(e.byIssuer??{})])].filter(i=>dt(e,i).length>0).sort()}function Le(e){if(e.acceptedDocuments)return e.acceptedDocuments;let t=e.acceptedDocumentTypes?.length?[...e.acceptedDocumentTypes]:["carte_identite","passport"];return{default:[],byIssuer:{MR:t}}}var lt=640,pt=new Set(["network_error","timeout","upload_failed","unknown_error","rate_limit_exceeded"]),Ve=6,Fe=1500,He={sharpness:1,exposure:1,meanLuma:128},De=null;function ft(e,t){try{De??(De=document.createElement("canvas"));let n=De,i=96/Math.max(1,t.width);n.width=Math.max(1,Math.round(t.width*i)),n.height=Math.max(1,Math.round(t.height*i));let r=n.getContext("2d");if(r===null)return He;r.drawImage(e,t.x,t.y,t.width,t.height,0,0,n.width,n.height);let a=r.getImageData(0,0,n.width,n.height);return{sharpness:be(a),exposure:ke(a),meanLuma:_e(a)}}catch{return He}}async function mt(e,t){let n=e.source;return"convertToBlob"in n?n.convertToBlob({type:"image/jpeg",quality:t}):new Promise((i,r)=>{n.toBlob(a=>a===null?r(new Error("encode failed")):i(a),"image/jpeg",t)})}function Dn(e,t={}){let n=t.now??(()=>performance.now()),i=t.setTimer??((m,k)=>setTimeout(m,k)),r=t.clearTimer??(m=>clearTimeout(m)),a=t.encode??mt,d=t.quality??ft,c=e.tuningVersion??null,p=new Set,S=!1,g=e.video??null,w=null,h=t.grabFrame??null,y=null,O=1e3/Ve,E=null,I=null,v=!1,V=!1,D=Number.NEGATIVE_INFINITY,x=null,U=0,F=null,K=null,te=Promise.all([import("./icao-gate-T3BTOKFJ.js"),import("./icao-tuning-4ETMF53W.js"),import("./create-portrait-capture-5VGYZUOK.js"),import("./landmarker-KB7LVXAU.js"),import("./background-monitor-A7FKJOAG.js")]).then(async([m,k,A,T,H])=>{let R=k.resolveIcaoTuning(e.tuning,e.tuningVersion??void 0);R.background.required&&(I=H.createBackgroundMonitor({tuning:R.backgroundCheck,assetBaseUrl:e.assetBaseUrl??"/models-v3",...t.createSegmenter!==void 0?{createSegmenter:t.createSegmenter}:{},now:n})),w=m.createIcaoGate(R,{policy:e.policy??"reject"}),h??(h=A.defaultGrabber()),y=A.observe,O=1e3/Math.min(Ve,R.cadenceHz);let M=(t.createLandmarker??T.createFaceLandmarker)(e.assetBaseUrl??"/models-v3"),o=await new Promise((s,u)=>{let l=setTimeout(()=>{u(new Error("landmarker init timeout")),M.then(f=>f.close(),()=>{})},T.LANDMARKER_INIT_TIMEOUT_MS);M.then(f=>{clearTimeout(l),s(f)},f=>{clearTimeout(l),u(f)})});S?o.close():E=o}).catch(()=>{v=!0}),Z=m=>{for(let k of p)k({holding:V||v,update:m})},G=()=>{if(x=null,!(S||E===null||w===null||h===null||y===null||g===null)){if(n()-D>Fe){Z(null);return}try{let m=h(g,lt);if(m!==null){let k=Math.max(n(),U+1);U=k;let A=E.detect(m.source,k),T=g.videoWidth||m.width,H=g.videoHeight||m.height,R=y(A,m,T,H);R.geometry!==null&&I!==null&&(R.backgroundCheck=I.measure(m,R.geometry.box,T,H));let M=w.push(R,n());V=M.ready,Z(M)}}catch{}x=i(G,O)}},ne=()=>{let m=n()-D>Fe;D=n(),m&&(w?.reset(),V=!1,F=null,K=null),x===null&&E!==null&&!S&&(x=i(G,0))},W=()=>{let m=h===null||g===null?null:h(g,null);if(m===null||w===null||Math.max(m.width,m.height)<e.still.minLongSidePx)return Promise.resolve(null);let k=w.summary();return a(m,e.still.jpegQuality).then(A=>({image:A,width:m.width,height:m.height,gate:k}),()=>null)},Q=null;return{engineOptions:{measureQuality:(m,k)=>{g=m,ne();let A=d(m,k);return V||v?A:{...A,sharpness:0}},telemetry:m=>{if(m.type!=="fired"||S)return;F=W();let k=Q;k!==null&&F.then(A=>A===null?void 0:k(A).catch(()=>{})),V=!1,x!==null&&r(x),x=null,D=Number.NEGATIVE_INFINITY}},decorate:m=>{let k=new WeakMap,A=new Map,T=o=>{let s=k.get(o);return s===void 0&&(s=(async()=>{let u=await Ie(m,"image","image/jpeg",o.image.size,{engine:"portrait"});return await m.uploadToSpaces(u.uploadUrl,o.image,"image/jpeg"),(await m.completeMedia(u.key)).key})(),s.catch(()=>k.delete(o)),k.set(o,s)),s};Q=T;let H=async o=>{let s;try{s=await T(o)}catch(u){let l=u?.code;if(typeof l=="string"&&pt.has(l))throw u;return null}return{media:{portrait:s},gate:Oe(o.gate),...c!==null?{tuningVersion:c}:{}}},R=m.submitCheck.bind(m),M=(async(o,s,u)=>{if(o!=="liveness")return R(o,s,u);let l=u?.idempotencyKey,f=l===void 0?void 0:A.get(l);if(f===void 0){let b=F;f=b===null?Promise.resolve(null):b.then(ye=>ye===null?null:H(ye)),l!==void 0&&(A.set(l,f),f.catch(()=>A.delete(l)))}let _=await f;if(_===null)return R("liveness",s,u);let P=await R("liveness",{...s,portraitIcao:_},u);return K=_,P});return new Proxy(m,{get(o,s){if(s==="submitCheck")return M;let u=Reflect.get(o,s);return typeof u=="function"?u.bind(o):u}})},onGate:m=>(p.add(m),()=>p.delete(m)),lastPortraitInput:()=>K,destroy:()=>{S=!0,F=null,K=null,x!==null&&r(x),x=null,p.clear(),te.then(()=>{E?.close(),E=null,I?.close(),I=null})}}}function Ge(e){return e.idNumberBound??e.nniBound}function Be(e){return e===void 0?void 0:e.idNumberFromDocument??e.nniFromDocument}function Ue(e){let t=e.idNumberMasked??e.nniMasked;return typeof t=="string"&&t!==""?t:void 0}var Ke=Object.freeze({nni_invalid:"id_number_invalid",nni_not_found:"registry_record_not_found",nni_recheck:"id_number_recheck",document_nni_mismatch:"document_id_number_mismatch",nni_locked:"id_number_locked",nni_unbound:"id_number_unbound",missing_nni:"missing_id_number",registry_needs_nni_source:"registry_needs_id_number_source"}),ht=new Map(Object.entries(Ke)),Un=new Map(Object.entries(Ke).map(([e,t])=>[t,e]));function je(e){return ht.get(e)??e}var C={fullNameMin:2,fullName:200,email:254,occupation:120,shortText:120,longText:1e3,addressLine:120,addressLines:4,city:80,postcode:16,number:1e12,dateMin:"1900-01-01",dateMax:"2100-12-31"},St=new Set(["full_name","birth_date","email","phone","address","country","occupation"]),gt=new Set(["short_text","long_text","single_choice","multiple_choice","yes_no","date","number"]),yt=new Set(["ar","fa","he","ur"]);function qe(e){return yt.has(e.split("-")[0]?.toLowerCase()??"")?"rtl":"ltr"}function Ye(e){if(typeof e!="object"||e===null)return null;let t=e;if(typeof t.locale!="string"||!Array.isArray(t.questions)||t.questions.length===0)return null;let n=t.consents??[];if(!Array.isArray(n))return null;for(let r of t.questions)if(!_t(r))return null;for(let r of n)if(!bt(r))return null;let i={locale:t.locale,questions:t.questions,consents:n};return typeof t.title=="string"&&t.title.trim()!==""&&(i.title=t.title),typeof t.intro=="string"&&t.intro.trim()!==""&&(i.intro=t.intro),typeof t.prefill=="object"&&t.prefill!==null&&!Array.isArray(t.prefill)&&(i.prefill=t.prefill),i}function _t(e){if(typeof e!="object"||e===null)return!1;let t=e;return typeof t.id!="string"||typeof t.required!="boolean"?!1:t.kind==="field"?typeof t.field=="string"&&St.has(t.field):t.kind!=="custom"||typeof t.type!="string"||!gt.has(t.type)||typeof t.label!="string"?!1:t.type==="single_choice"||t.type==="multiple_choice"?Array.isArray(t.choices)&&t.choices.length>=2&&t.choices.every(n=>typeof n=="object"&&n!==null&&typeof n.value=="string"&&typeof n.label=="string"):!0}function bt(e){if(typeof e!="object"||e===null)return!1;let t=e;if(typeof t.id!="string"||typeof t.required!="boolean"||typeof t.text!="string")return!1;if(t.link===void 0)return!0;let n=t.link;return typeof n=="object"&&n!==null&&typeof n.url=="string"&&/^https:\/\//.test(n.url)&&typeof n.label=="string"}var kt=/^(\d{4})-(\d{2})-(\d{2})$/;function Ct(e){if(typeof e!="string")return!1;let t=kt.exec(e);return t===null?!1:new Date(Date.UTC(Number(t[1]),Number(t[2])-1,Number(t[3]))).toISOString().slice(0,10)===e&&e>=C.dateMin&&e<=C.dateMax}function Pt(e){return typeof e=="number"&&Number.isFinite(e)&&Math.abs(e)<C.number&&Math.round(e*100)/100===e}function Ze(e){for(let t of e.matchAll(/\d[\d -]{11,}\d/g)){let n=t[0].replace(/[ -]/g,"");if(n.length>=13&&n.length<=19&&At(n))return!0}return!1}function At(e){let t=0;for(let n=0;n<e.length;n++){let i=Number(e[e.length-1-n]);n%2===1&&(i*=2,i>9&&(i-=9)),t+=i}return t%10===0}var Rt=/^[^\s@]+@[^\s@.]+(\.[^\s@.]+)+$/,wt=/^\+[1-9]\d{6,14}$/,We=/^[A-Z]{2}$/,xt=e=>e===void 0||typeof e=="string"&&e.trim()===""||Array.isArray(e)&&e.length===0;function Qe(e=Date.now()){return new Date(e).toISOString().slice(0,10)}function X(e,t,n=Qe()){let i=[];for(let r of e.questions){let a=t.answers[r.id];if(xt(a)){r.required&&i.push({id:r.id,code:"required"});continue}let d=r.kind==="field"?Et(r.field,a,n):Mt(r,a,n);d!==null&&i.push({id:r.id,...d})}for(let r of e.consents)r.required&&t.consents[r.id]!==!0&&i.push({id:r.id,code:"consent_required"});return i}function z(e,t,n=1){if(typeof e!="string")return{code:"required"};let i=e.trim();return[...i].length>t?{code:"too_long",params:{max:t}}:[...i].length<n?{code:"too_short",params:{min:n}}:Ze(i)?{code:"card_number"}:null}function $e(e,t,n={}){return Ct(e)?n.period==="past"&&e>=t?{code:"date_not_past"}:n.period==="future"&&e<=t?{code:"date_not_future"}:n.min!==void 0&&e<n.min?{code:"date_too_early",params:{date:n.min}}:n.max!==void 0&&e>n.max?{code:"date_too_late",params:{date:n.max}}:null:{code:"date_invalid"}}function Et(e,t,n){switch(e){case"full_name":return z(t,C.fullName,C.fullNameMin);case"occupation":return z(t,C.occupation);case"birth_date":return $e(t,n,{period:"past"});case"email":return typeof t=="string"&&t.trim().length<=C.email&&Rt.test(t.trim())?null:{code:"email_invalid"};case"phone":return typeof t=="string"&&wt.test(t)?null:{code:"phone_invalid"};case"country":return typeof t=="string"&&We.test(t)?null:{code:"choice_invalid"};case"address":return It(t)?null:{code:"address_invalid"};default:return null}}function It(e){if(typeof e!="object"||e===null||Array.isArray(e))return!1;let t=e,n=Array.isArray(t.lines)?t.lines.filter(i=>typeof i=="string"&&i.trim()!==""):[];return typeof t.country=="string"&&We.test(t.country)&&typeof t.city=="string"&&t.city.trim()!==""&&t.city.trim().length<=C.city&&n.length>=1&&n.length<=C.addressLines&&n.every(i=>i.trim().length<=C.addressLine&&!Ze(i))&&(t.postcode===void 0||typeof t.postcode=="string"&&t.postcode.trim().length<=C.postcode)}function Mt(e,t,n){let i=new Set((e.choices??[]).map(r=>r.value));switch(e.type){case"short_text":return z(t,C.shortText);case"long_text":return z(t,C.longText);case"single_choice":return typeof t=="string"&&i.has(t)?null:{code:"choice_invalid"};case"multiple_choice":return Array.isArray(t)&&t.length>0&&new Set(t).size===t.length&&t.every(r=>i.has(r))?null:{code:"choice_invalid"};case"yes_no":return typeof t=="boolean"?null:{code:"choice_invalid"};case"date":{let r=e.options??{};return $e(t,n,{...typeof r.min=="string"?{min:r.min}:{},...typeof r.max=="string"?{max:r.max}:{},...r.period==="past"||r.period==="future"?{period:r.period}:{}})}case"number":{if(typeof t!="number"||!Number.isFinite(t)||Math.abs(t)>=C.number)return{code:"number_invalid"};let r=e.options??{};return r.integer===!0&&!Number.isInteger(t)?{code:"number_not_integer"}:Pt(t)?typeof r.min=="number"&&t<r.min?{code:"number_too_small",params:{min:r.min}}:typeof r.max=="number"&&t>r.max?{code:"number_too_large",params:{max:r.max}}:null:{code:"number_decimals"}}default:return null}}function Je(e,t,n,i=Qe()){let r=e?.errors;return Array.isArray(r)?r.flatMap(a=>{if(typeof a!="object"||a===null)return[];let{id:d,code:c}=a;return typeof d!="string"||typeof c!="string"?[]:[vt(d,c,t,n)]}):X(t,n,i)}var Ot={full_name:C.fullName,occupation:C.occupation,email:C.email,short_text:C.shortText,long_text:C.longText};function vt(e,t,n,i){let r=n.questions.find(p=>p.id===e),a=r===void 0?void 0:r.kind==="field"?r.field:r.type,d=i.answers[e],c=r!==void 0&&r.kind==="custom"?r.options??{}:{};switch(t){case"required":case"card_number":return{id:e,code:t};case"consent_required":return{id:e,code:"consent_required"};case"too_short":return{id:e,code:t,params:{min:a==="full_name"?C.fullNameMin:1}};case"too_long":{let p=a===void 0?void 0:Ot[a];return p===void 0?{id:e,code:t}:{id:e,code:t,params:{max:p}}}case"not_a_choice":return{id:e,code:"choice_invalid"};case"not_in_past":return{id:e,code:"date_not_past"};case"not_in_future":return{id:e,code:"date_not_future"};case"not_an_integer":return{id:e,code:"number_not_integer"};case"out_of_range":return Tt(e,a,d,c);case"invalid":return r===void 0?n.consents.some(p=>p.id===e)?{id:e,code:"consent_required"}:{id:e,code:t}:{id:e,code:Nt(a,d)};default:return{id:e,code:t}}}function Tt(e,t,n,i){if(t==="date"){let c=typeof i.min=="string"?i.min:void 0,p=typeof i.max=="string"?i.max:void 0;return p!==void 0&&(c===void 0||typeof n=="string"&&n>p)?{id:e,code:"date_too_late",params:{date:p}}:c!==void 0?{id:e,code:"date_too_early",params:{date:c}}:{id:e,code:"date_invalid"}}let r=typeof i.min=="number"?i.min:void 0,a=typeof i.max=="number"?i.max:void 0;return a!==void 0&&(r===void 0||typeof n=="number"&&n>a)?{id:e,code:"number_too_large",params:{max:a}}:r!==void 0?{id:e,code:"number_too_small",params:{min:r}}:{id:e,code:"number_invalid"}}function Nt(e,t){switch(e){case"email":return"email_invalid";case"phone":return"phone_invalid";case"birth_date":case"date":return"date_invalid";case"number":return typeof t=="number"&&Number.isFinite(t)&&Math.abs(t)<C.number?"number_decimals":"number_invalid";case"address":return"address_invalid";case"full_name":case"occupation":case"short_text":case"long_text":return"required";default:return"choice_invalid"}}var Lt=new Set(["phone_otp","email_otp","national_eid","document","nfc","population_registry","supplied_identity","summary_confirm","liveness","portrait","face_match","aml_screening","face_dedup","age_estimation","proof_of_address","form"]),Vt=new Set(["supplied_identity","aml_screening","face_dedup","age_estimation"]),ae=["document","population_registry","national_eid"],ue=["phone_otp","email_otp"],et={identity_method:ae,contact:ue},Ft=["population_registry","document"],ce="platform_unsupported",Ht=new Set(["prefilled","user_entered","prefilled_or_entered"]),Dt={phone_otp:"contact",email_otp:"contact",eid_auth:"identity",doc_ocr:"identity",nfc_chip:"identity",population_registry:"identity",liveness:"live_photo",portrait_icao:"live_photo",face_match:"live_photo",poa:"documents",form:"form"};function L(e){return e.section??Dt[e.checkType]??null}function de(e,t){let n=e.plan?.choice;if(n===void 0||n.locked)return;let i=n.options.find(r=>r.id!==n.selected&&r.available!==!1&&t.includes(r.service));return i===void 0?void 0:{nodeId:n.nodeId,option:i}}function le(e){let t=e.plan,n=t?.choice;if(t===void 0||n===void 0||n.locked||t.current===null||t.current===n.nodeId||re(e))return null;let i=et[n.kind]??[...ae,...ue],r=n.options.flatMap(c=>c.available===!1||!i.includes(c.service)?[]:[c.nationalEid!=null?{id:c.id,service:c.service,nationalEid:c.nationalEid}:{id:c.id,service:c.service}]),a=t.steps.find(c=>c.id===t.current)?.service,d=n.selected??r.find(c=>c.service===a)?.id??null;return r.some(c=>c.id!==d)?{nodeId:n.nodeId,kind:n.kind,current:d,options:r}:null}function tt(e){return e==null?[]:e.options.filter(t=>t.id!==e.current)}function Gt(e){let t=e.simulation;if(typeof t!="object"||t===null)return;let{otpCode:n,skipCapture:i}=t;if(typeof n!="string"||n===""||typeof i!="boolean")return;let r=xe(e);return r!==void 0?{otpCode:n,skipCapture:i,reason:r}:{otpCode:n,skipCapture:i}}function Bt(e){let t=(e.plan?.sections??[]).map(d=>({id:d.id,state:d.state})),n={sessionId:oe(e.sessionId),orgName:e.orgName,sandbox:e.sandbox===!0,returning:e.returning===!0,consentRecorded:e.consentRecorded,expiresAt:e.expiresAt,sections:t.map(d=>d.id),progress:t,purpose:e.purpose??"identity"};e.branding!==void 0&&(n.branding=e.branding),e.cameraUnavailableHandled===!0&&(n.cameraUnavailableHandled=!0);let i=Gt(e);i!==void 0&&(n.simulation=i);let r=e.testerGate;r?.offered===!0&&typeof r.attemptsLeft=="number"&&r.attemptsLeft>0&&(n.testerGate={attemptsLeft:r.attemptsLeft});let a=le(e);return a!==null&&(n.switchable=a),n}function Ut(e){let t={attemptsRemaining:Pe(e),attemptsExhausted:e.attempts.used>=e.attempts.max};return e.reason!==void 0&&(t.reason=e.reason),e.retakeHint!==void 0&&(t.retakeHint=e.retakeHint),t}var nt={phone_otp:"phone",email_otp:"email"};function Kt(e,t){let n=de(e,[t==="phone_otp"?"email_otp":"phone_otp"]);return n===void 0?void 0:nt[n.option.service]}function jt(e,t,n,i){let r=t.checkType==="email_otp",a=(r?t.emailOtp:t.otp)??{},d=r?t.emailOtp?.emailSource:t.otp?.numberSource,c=d!==void 0&&Ht.has(d)?d:r?"prefilled_or_entered":"user_entered",p=typeof a.sentToMasked=="string"&&a.sentToMasked.length>0,S=a.prefilled===!0,g=Kt(e,r?"email_otp":"phone_otp"),w={key:t.checkType,context:n,section:L(t),phase:p?"verify":"send",canSwitch:g!==void 0,...i},h=r?{kind:"email_otp",...w,emailSource:c,needsEmail:c!=="prefilled"&&!S}:{kind:"phone_otp",...w,numberSource:c,needsPhone:c!=="prefilled"&&!S,channels:(t.otp?.channels??[]).filter(y=>y==="whatsapp"||y==="sms")};if(g!==void 0&&(h.switchChannel=g),S&&(h.prefilled=!0),p&&(h.sentToMasked=a.sentToMasked),!r&&t.otp?.channel!==void 0&&(h.channel=t.otp.channel),!r&&Array.isArray(t.phoneCountries)&&(h.phoneCountries=t.phoneCountries.filter(y=>typeof y=="string"&&/^[A-Z]{2}$/.test(y))),!r&&Array.isArray(t.phoneRules)){let y=h.phoneCountries??[];h.phoneRules=t.phoneRules.flatMap(O=>{let E=Zt(O);return E!==void 0&&y.includes(E.code)?[E]:[]})}return!r&&t.phoneInternational===!0&&(h.phoneInternational=!0),a.expiresAt!==void 0&&(h.codeExpiresAt=a.expiresAt),a.resendAvailableAt!==void 0&&(h.resendAvailableAt=a.resendAvailableAt),h}var qt=/^[\d[\]\-|()?:^]{1,64}$/;function Yt(e){try{return typeof e=="string"&&qt.test(e)&&new RegExp(e)!==null}catch{return!1}}var ze=e=>typeof e=="number"&&Number.isInteger(e)&&e>=1&&e<=15;function Zt(e){let{code:t,dial:n,trunk:i,lengths:r,formats:a}=e??{};if(typeof t!="string"||typeof n!="string"||!/^\d{1,3}$/.test(n)||i!==void 0&&(typeof i!="string"||!/^\d{1,3}$/.test(i))||!Array.isArray(r)||r.length===0||!r.every(ze))return;let d={code:t,dial:n,lengths:[...r].sort((c,p)=>c-p)};if(i!==void 0&&(d.trunk=i),a!==void 0){if(!(Array.isArray(a)&&a.length<=8&&a.every(p=>Yt(p?.leading)&&Array.isArray(p.groups)&&p.groups.every(ze)&&r.includes(p.groups.reduce((S,g)=>S+g,0)))))return;d.formats=a.map(p=>({leading:p.leading,groups:[...p.groups]}))}return d}function Wt(e,t,n,i){let r=Ge(e)===!0?"bound":Be(t)===!0?"document":"typed",a=r==="typed"&&t.state==="input_required"&&t.reason!==void 0&&je(t.reason)==="id_number_recheck",d=tt(le(e)),c=!i.attemptsExhausted&&d.length===1&&d[0]?.service==="document";return{kind:"registry",key:"registry",context:n,section:L(t),state:t.state==="input_required"?"input_required":"pending",source:r,recheck:a,canUseDocument:c,...i}}function Qt(e,t,n,i,r){let a=[...t.acceptedSides??[]],d={kind:"document",key:"document",context:n,section:L(t),side:a.includes("recto")?"verso":"recto",acceptedSides:a,documents:Le(e),photo:fe(pe(e.documents),r),...i};return e.detectedCountry!==void 0&&(d.detectedCountry=e.detectedCountry),zt(e)&&(d.ageStepUp=!0),d}function pe(e,t=!0){let n=e?.source==="upload"||e?.source==="choice"?e.source:"camera",i=e?.sourcePick==="camera"||e?.sourcePick==="upload"?e.sourcePick:null;return{source:n,pick:i,uploadOffered:t&&e?.uploadOffered===!0}}function fe(e,t){return t?{...e,cameraOnPhone:!0}:e}var $t=10*1024*1024;function Jt(e,t,n,i,r){let a=e.proofOfAddress,d=a?.pdf?.maxBytes,c=a?.phase==="holder_letter"?"holder_letter":"document";return{kind:"proof_of_address",key:"proof_of_address",context:n,section:L(t),phase:c,rule:a?.rule??{country:null,countryFrom:"global",source:"preset_global",kinds:[]},nameMatch:a?.nameMatch??"exact_person",photo:fe(pe(a),r),maxPages:3,pdf:{maxBytes:typeof d=="number"&&d>0?d:$t,maxPages:3},licenceAddressAccepted:c==="document"&&a?.licenceAddressAccepted===!0,...i}}function zt(e){let t=Ce(e).find(i=>i.checkType==="age_estimation"),n=t?.reason;return t?.state==="failed"&&(n==="age_uncertain"||n==="age_unavailable")}function Xt(e){let t=$(e,"liveness");return t?.state==="passed"||t?.state==="review"}function Xe(e,t,n,i,r,a=!1){let d=t.icao?.report,c=e.portrait,p=r==="capture"?c?.pendingFix??null:null;p!==null&&(r="review");let S=rt(e);return{kind:"portrait",key:`portrait:${r}`,context:n,section:L(t),phase:r,report:Array.isArray(d)?d:null,review:t.state==="review",tuning:e.capture?.icao??null,tuningVersion:e.capture?.tuningVersion??null,icao:J(e),retakeOnly:r==="capture"&&t.state==="input_required"&&S===void 0&&e.capture?.livePhoto?.oneCapture===!0&&Xt(e),photo:fe(pe(c,r==="capture"),a&&r==="capture"),pendingFix:p,...S!==void 0?{captureMode:S}:{},...c?.reuse?.pending===!0?{reuse:!0}:{},...i}}function rt(e){let t=e.portrait?.captureMode;return t==="self"||t==="assisted"||t==="choice"?t:void 0}var se={minLongSidePx:1280,jpegQuality:.95};function en(e,t){let n=e.capture?.livePhoto;if(n?.oneCapture!==!0)return null;let i=$(e,"portrait_icao"),r=n.still??se;return{icao:t==="liveness"&&J(e)!==null&&rt(e)===void 0&&i!==void 0&&i.state==="pending"&&i.reason===void 0,still:{minLongSidePx:r.minLongSidePx??se.minLongSidePx,jpegQuality:r.jpegQuality??se.jpegQuality}}}function tn(e,t,n,i){let r=t.eid,a=L(t);if(r===void 0||r.challenge!=="app_code")return{kind:"unsupported",key:"unsupported:eid_auth",context:n,section:a,checkType:"eid_auth",reason:"update_required"};let d=tt(le(e)),c=d.length===1&&Ft.includes(d[0]?.service??"")?d[0]:void 0,p=c===void 0?void 0:q[c.service],S=p!==void 0,g={kind:"eid",key:"eid",context:n,section:a,provider:r.provider,providerName:r.providerName,country:r.country,challenge:"app_code",phase:r.awaiting==="code"?"code":"identifier",identifierBound:r.identifierBound===!0,canUseCamera:S,afterPass:r.afterPass==="continue"?"continue":"end",...i};return S&&(g.cameraMethod=p),r.expiresAt!==void 0&&(g.codeExpiresAt=r.expiresAt),r.resendAvailableAt!==void 0&&(g.resendAvailableAt=r.resendAvailableAt),r.resendsRemaining!==void 0&&(g.resendsRemaining=r.resendsRemaining),r.codeAttemptsRemaining!==void 0&&(g.codeAttemptsRemaining=r.codeAttemptsRemaining),g}function nn(e,t){if(t.checkType!=="face_match"||t.reason!==void 0)return null;let n=$(e,"portrait_icao");return n!==void 0&&(n.state==="passed"||n.state==="review")?n:null}var rn={rejected:"rejected",inconclusive:"inconclusive",unavailable:"unavailable",abandoned:"expired",not_opened:"expired",cancelled:"expired",superseded:"expired",policy:"policy"};function on(e){return e.reasonCode===ce?"platform_unsupported":e.status==="review_pending"?"review":e.status==="verified"?"verified":e.reasonCode==="device_cooldown"?"cooldown":e.reasonCode==="starter_credit_claimed"?"policy":(e.status==="not_verified"&&e.reason!==void 0?rn[e.reason]:void 0)??"rejected"}function sn(e,t){let n=on(e),i=n==="platform_unsupported"?{sessionId:oe(e.sessionId),status:"unavailable",reasonCode:ce}:we(e,{autoRetry:!1}),r={kind:"result",key:"result",context:t,section:null,display:n,result:i};return e.status==="not_verified"&&e.reason!==void 0&&(r.reason=e.reason),e.reasonCode!==void 0&&(r.reasonCode=e.reasonCode),e.status==="not_verified"&&e.step!==void 0&&(r.step=e.step),e.retryAfter!==void 0&&(r.retryAfter=e.retryAfter),r}function an(e,t,n){let i=e.identitySummary;if(i==null)return null;let r={kind:"identity_summary",key:"identity_summary",context:t,section:n??"identity",summaryKind:i.kind==="partial"?"partial":i.kind??"full",source:i.source,portraitAvailable:i.portrait?.available===!0,retakeAvailable:i.retakeAvailable===!0};for(let d of un){let c=i[d];typeof c=="string"&&c!==""&&(r[d]=c)}let a=Ue(i);return a!==void 0&&(r.idNumberMasked=a,r.nniMasked=a),r}var un=["fullName","birthDate","birthYear","nationality","documentType","documentNumberMasked","expiryDate","retakeTarget"];function B(e,t,n,i){return{kind:"unsupported",key:`unsupported:${n}`,context:e,section:t,checkType:n,reason:i}}function cn(e){return e.kind==="contact"?"contact":(e.kind==="identity_method","identity")}function dn(e,t){let n=et[e.kind]??[...ae,...ue],i=cn(e),r=e.options.flatMap(d=>{if(d.available===!1||!n.includes(d.service))return[];let c={id:d.id,service:d.service};d.nationalEid!=null&&(c.nationalEid=d.nationalEid);let p=(d.channels??[]).filter(S=>S==="whatsapp"||S==="sms");return d.service==="phone_otp"&&p.length>0&&(c.channels=p),[c]});if(r.length===0){let d=e.options.length>0&&e.options.every(c=>c.service==="nfc");return B(t,i,"choice",d?"platform_unsupported":"update_required")}let a={nodeId:e.nodeId,kind:e.kind,selected:e.selected,options:r};if(e.kind==="identity_method"){let d={kind:"method",key:"method",context:t,section:i,options:r.map(p=>q[p.service]),choice:a},c=r.find(p=>p.nationalEid!==void 0)?.nationalEid;return c!==void 0&&(d.nationalEid=c),d}return e.kind==="contact"?{kind:"contact_choice",key:"contact_choice",context:t,section:i,options:r.map(d=>nt[d.service]),selected:null,locked:!1,choice:a}:{kind:"choice",key:`choice:${e.nodeId}`,context:t,section:i,choice:a}}function ln(e,t,n,i){let r=e.nativeApp,a=typeof r=="object"&&r!==null?r:{},d={sekyroApp:a.sekyroApp===!0};return typeof a.link=="string"&&a.link!==""&&(d.link=a.link),d.sekyroApp&&typeof a.sekyroAppLink=="string"&&a.sekyroAppLink.startsWith("sekyro://")&&(d.sekyroAppLink=a.sekyroAppLink),{kind:"native_app_required",key:`native_app_required:${i}`,context:t,section:n,checkType:i,nativeApp:d}}function ee(e,t={}){let n=Bt(e);if(re(e)||e.reasonCode===ce)return sn(e,n);let i=e.plan;if(i===void 0||!Array.isArray(i.sections))return B(n,null,"plan","update_required");let r=Ae(e);if(r!==null)return dn(r,n);let a=i.current===null?void 0:i.steps.find(h=>h.id===i.current),d=h=>{let y={kind:"processing",key:"processing",context:n,section:h!==void 0?L(h):i.sections.find(O=>O.state==="current")?.id??null,stalled:!1};return typeof h?.service=="string"&&h.service!==""&&(y.service=h.service),y};if(i.current===null)return d(i.steps.find(h=>h.state==="processing"));if(a===void 0)return B(n,null,"step","update_required");if(!Lt.has(a.service))return a.interaction==="server"?d(a):B(n,L(a),a.service,"update_required");if(Vt.has(a.service)||!Re(a))return d(a);let c=a,p=Ut(c),S=c.checkType,g=L(c);if(c.requiresNativeApp===!0)return ln(e,n,g,S);let w=t.isMobile===!1?Ee(e,c):null;if(w==="phone")return{kind:"mobile_required",key:"mobile_required",context:n,section:g,checkType:S};switch(S){case"phone_otp":case"email_otp":return jt(e,c,n,p);case"population_registry":return Wt(e,c,n,p);case"eid_auth":return tn(e,c,n,p);case"doc_ocr":return Qt(e,c,n,p,w==="upload_or_phone");case"identity_confirm":return an(e,n,g)??d(c);case"portrait_icao":return Xe(e,c,n,p,"capture",w==="upload_or_phone");case"liveness":case"face_match":{let h=nn(e,c);if(h!==null)return Xe(e,h,n,p,"match");let y=c.requiresMobile===!0,O=J(e);return{kind:"liveness",key:"biometric",context:n,section:g,mode:S==="face_match"?"selfie":"liveness",requiresMobile:y,instructions:O===null?"standard":"icao",icao:O,livePhoto:en(e,S),...p}}case"poa":return Jt(e,c,n,p,w==="upload_or_phone");case"form":{let h=Ye(c.form);return h===null?B(n,g,S,"update_required"):{kind:"form",key:"form",context:n,section:g,form:h,dir:qe(h.locale),...p}}case"nfc_chip":return B(n,g,S,"platform_unsupported");default:return B(n,g,S,"update_required")}}var pn=/^[A-Z0-9][A-Z0-9 -]{0,39}$/,fn=Object.freeze({normalize:e=>e.trim().toUpperCase().replace(/\s+/g," "),check:e=>pn.test(e),registrySources:Object.freeze([]),describe:"number must be 1 to 40 letters, digits, spaces or hyphens"}),mn=/^[A-Z0-9]{4,20}$/,me=e=>e.trim().toUpperCase().replace(/[\s-]+/g,""),hn=Object.freeze({normalize:me,check:e=>mn.test(me(e)),registrySources:Object.freeze([]),describe:"number must be 4 to 20 letters or digits"});function Sn(e){return typeof e=="string"&&/^\d{10}$/.test(e)&&Number(e)%97===1}var gn={trim:e=>e.trim(),upper_single_space:e=>e.trim().toUpperCase().replace(/\s+/g," "),upper_no_space_or_hyphen:me},yn={mr_nni_mod97:e=>Sn(e)};function _n(e){let t=new RegExp(e.pattern,"u"),n=e.check===null?void 0:yn[e.check];return Object.freeze({normalize:gn[e.normalize],check:i=>t.test(i.trim())&&(n===void 0||n(i)),registrySources:Object.freeze([...e.registrySources]),describe:e.describe})}var bn=Object.freeze(Object.fromEntries(Object.entries(Te).map(([e,t])=>[e,_n(t)])));function he(e,t){return bn[`${e.toUpperCase()}:${t}`]??(t==="drivers_license"?hn:fn)}var kn=Object.freeze({MRT:"MR"});function ot(e,t){let n=e.trim().toUpperCase();return he(kn[n]??n,t)}function it(e){let t=ot(e.issuingCountry,e.type);return t.check(t.normalize(e.number))}function st(e){return he("MR","national_id").check(e)}function Se(e){let t="";for(let n of e){let i=n.codePointAt(0)??0;i>=1632&&i<=1641?t+=String(i-1632):i>=1776&&i<=1785?t+=String(i-1776):n!==" "&&n!=="-"&&n!==" "&&(t+=n)}return t}var Cn=[1e3,2e3,4e3,8e3,15e3],Pn=3e4,An=/^\+[1-9]\d{6,14}$/,Rn=/^\d{6}$/,wn=/^\d{6}$/,xn=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,at=new Set(["session_not_active","check_not_found","check_already_finalized","check_out_of_order","identity_confirm_required","identity_confirm_locked","choice_locked","choice_option_unavailable","choice_not_found","step_not_on_path","check_not_active","native_app_required"]),En={simulatedCapture:!0},In=new Set(["network_error","timeout","upload_failed","unknown_error","rate_limit_exceeded"]);function lr(e){let t=!1,n=null,i="",r=!1,a=!1,d=!1,c={},p={},S=new Set,g=!1,w=!1,h=null,y="idle",O=new Map,E=new Map,I=(o,s,u)=>{let l=`${o}.${s}`,f=O.get(l);if(f!==void 0)return f;let _=E.get(o),P=(_===void 0?u():_.then(u)).finally(()=>{O.delete(l)});O.set(l,P);let b=P.then(()=>{},()=>{});return E.set(o,b),b.then(()=>{E.get(o)===b&&E.delete(o)}),P},v=async(o,s,u)=>{await e.ensureConsent();let l;try{l=await Me(e.runtime,s)}catch(_){if(_ instanceof j&&at.has(_.code)){await e.refreshView();return}throw _}if(u?.(l),e.destroyed())return;let f=l;f.plan!==void 0&&e.setView!==void 0?e.setView(f):await e.refreshView()},V=async o=>{await e.ensureConsent();let s;try{try{s=await o(e.runtime.client)}catch(u){if(!(u instanceof j)||u.code!=="consent_required")throw u;await e.runtime.ensureConsent({force:!0}),s=await o(e.runtime.client)}}catch(u){if(u instanceof j&&at.has(u.code)){await e.refreshView();return}throw u}e.destroyed()||(s!==void 0&&e.setView!==void 0?e.setView(s):await e.refreshView())},D=(o,s)=>I("choice",`${o}:${s}`,()=>V(u=>u.choose(o,s))),x=(o,s)=>o.options.some(u=>u.id===s)?D(o.nodeId,s):Promise.reject(new RangeError(`option ${String(s)} is not offered`)),U=(o,s)=>{let u=e.currentView(),l=u===null?void 0:de(u,o);return l===void 0?Promise.reject(new RangeError(`the ${s} is not offered`)):D(l.nodeId,l.option.id)},F=o=>I("identity",o,()=>V(s=>s.confirmIdentity===void 0?Promise.reject(new Error("identity confirmation is not available in this build")):s.confirmIdentity(o))),K=(o,s)=>{let u=X(o.form,s);if(u.length>0)return Promise.reject(new ie(u,"client"));let l={answers:{...s.answers},consents:{}};for(let f of o.form.consents)l.consents[f.id]=s.consents[f.id]===!0;return I("form","submit",()=>v("form",(f,_)=>f.submitCheck("form",l,{idempotencyKey:_})).catch(f=>{throw f instanceof j&&f.code===ve?new ie(Je(f.details,o.form,l),"server"):f}))},te=(o,s)=>{let u=o.kind,l=u==="phone_otp",f=l?"phone":"email",_={action:"send"};if(l?o.needsPhone:o.needsEmail){let P=s[f]??p[u],b=l?P?.replace(/[\s().-]/g,""):P?.trim();if(b!==void 0||o.phase!=="verify"){if(b===void 0||!(l?An:xn).test(b))return Promise.reject(l?new N("phone","format"):new Y("email","format"));_[f]=b}}if(l){let P=o.channels,b=s.channel??(P.length===1?P[0]:void 0);if(P.length>0){if(b===void 0)return Promise.reject(new Y("channel","required"));if(!P.includes(b))return Promise.reject(new Y("channel","unavailable"))}b!==void 0&&(_.channel=b),_.phoneRules=1}return I(u,"send",()=>v(u,(P,b)=>P.submitCheck(u,_,{idempotencyKey:b}),P=>{On(P,u)||(c[u]=e.now(),_[f]!==void 0&&(p[u]=_[f]))}))},Z=(o,s)=>Rn.test(s)?I(o,"verify",()=>v(o,(u,l)=>u.submitCheck(o,{action:"verify",code:s},{idempotencyKey:l}))):Promise.reject(new N("code","format")),G=(o,s)=>I("eid_auth",o,()=>v("eid_auth",(u,l)=>u.submitCheck("eid_auth",s,{idempotencyKey:l}))),ne=(o,s)=>{if(o.identifierBound)return G("start",{action:"start"});let u=Se(s??"");if(o.country==="MR"){if(!/^\d{10}$/.test(u))return Promise.reject(new N("nni","format"));if(!st(u))return Promise.reject(new N("nni","check_digit"))}else if(u==="")return Promise.reject(new N("nni","format"));return G("start",{action:"start",identifier:u})},W=(o,s,u)=>{if(o.source!=="typed")return Promise.reject(new RangeError("this session already holds the ID number"));let l=Se(s);return/^\d{10}$/.test(l)?it({type:"national_id",issuingCountry:"MR",number:l})?I("population_registry","submitIdNumber",()=>v("population_registry",(f,_)=>f.submitCheck("population_registry",{idNumber:l,nni:l},{idempotencyKey:_}),()=>{h=`\u2022\u2022\u2022\u2022\u2022\u2022${l.slice(-4)}`})):Promise.reject(new N(u,"check_digit")):Promise.reject(new N(u,"format"))},Q=o=>(e.stopCameras?.(),I(o,"skipCapture",()=>v(o,(s,u)=>s.submitCheck(o,En,{idempotencyKey:u}),()=>{(o==="liveness"||o==="portrait_icao")&&(g=!0)}))),ge=o=>{if(o.kind==="result"||o.context.simulation?.skipCapture!==!0)return o;let s=Mn(o);return s===null?o:{...o,skipCapture:()=>Q(s)}},m=o=>((o.kind==="document"||o.kind==="portrait"||o.kind==="proof_of_address")&&o.photo?.cameraOnPhone===!0&&(o.refresh=async()=>{await e.refreshView()}),o),k=o=>{switch(o.kind){case"phone_otp":case"email_otp":{let s={...o,send:(l={})=>te(o,l),verify:l=>Z(o.kind,l),switchTo:()=>o.canSwitch&&o.switchChannel!==void 0?U([o.switchChannel==="email"?"email_otp":"phone_otp"],"other contact option"):Promise.reject(new RangeError("this session has no other contact option"))},u=c[o.kind];return s.resendAvailableAt===void 0&&u!==void 0&&(s.resendAvailableAt=new Date(u+Pn).toISOString()),s}case"eid":return{...o,start:s=>ne(o,s),verify:s=>wn.test(s)?G("verify",{action:"verify",code:s}):Promise.reject(new N("code","format")),resend:()=>o.resendsRemaining===0?Promise.reject(new RangeError("no new code can be sent for this session")):G("resend",{action:"resend"}),useCamera:()=>o.canUseCamera&&o.cameraMethod!==void 0?U(o.cameraMethod==="document_photo"?["document"]:["population_registry"],"camera path"):Promise.reject(new RangeError("the camera path is not offered"))};case"method":return{...o,select:s=>{let u=o.choice.options.find(l=>q[l.service]===s);return u!==void 0?x(o.choice,u.id):Promise.reject(new RangeError(`method ${String(s)} is not offered`))},choose:s=>x(o.choice,s)};case"choice":return{...o,choose:s=>x(o.choice,s)};case"registry":return{...o,submitIdNumber:s=>W(o,s,"idNumber"),submitNni:s=>W(o,s,"nni"),confirm:()=>I("population_registry","confirm",()=>v("population_registry",(s,u)=>s.submitCheck("population_registry",{},{idempotencyKey:u}))),useDocument:()=>o.canUseDocument?U(["document"],"document method"):Promise.reject(new RangeError("the document method is not offered"))};case"document":return e.bindDocument!==void 0?m(e.bindDocument(o,M)):{...o,issuer:null,documentType:null,captureSide:null,selectDocument:()=>{throw new Error("document capture is not available in this build")},capture:()=>{throw new Error("document capture is not available in this build")},uploadDocument:()=>Promise.reject(new Error("document upload is not available in this build"))};case"portrait":return e.bindPortrait!==void 0?m(e.bindPortrait(o,M)):{...o,uploadFailed:!1,resubmit:()=>Promise.resolve(),capture:()=>{throw new Error("portrait capture is not available in this build")},uploadPortrait:()=>Promise.reject(new Error("portrait upload is not available in this build")),confirmFix:()=>Promise.reject(new Error("portrait review is not available in this build"))};case"proof_of_address":return e.bindProofOfAddress!==void 0?m(e.bindProofOfAddress(o,M)):{...o,uploadPages:()=>Promise.reject(new Error("proof of address upload is not available in this build")),uploadHolderLetter:()=>Promise.reject(new Error("proof of address upload is not available in this build")),capturePage:()=>{throw new Error("proof of address capture is not available in this build")}};case"form":return{...o,validate:s=>X(o.form,s),submit:s=>K(o,s)};case"contact_choice":return{...o,select:s=>{let u=s==="phone"?"phone_otp":s==="email"?"email_otp":void 0,l=o.choice.options.find(f=>f.service===u);return l!==void 0?x(o.choice,l.id):Promise.reject(new RangeError(`contact ${String(s)} is not offered`))},choose:s=>x(o.choice,s)};case"identity_summary":return{...o,...o.idNumberMasked===void 0&&o.summaryKind==="partial"&&h!==null?{idNumberMasked:h,nniMasked:h}:{},portrait:async()=>{let s=e.runtime.client;if(!o.portraitAvailable||s.identityPortrait===void 0)return null;try{return await s.identityPortrait()}catch{return null}},confirm:()=>F("confirm"),retake:()=>o.retakeAvailable?F("retake"):Promise.reject(new RangeError("no retake is left"))};case"liveness":return{...o,capture:s=>e.liveness(s),onLivePhoto:s=>o.livePhoto?.icao===!0&&e.onLivePhoto!==void 0?e.onLivePhoto(s):()=>{}};case"mobile_required":case"native_app_required":case"processing":return{...o,refresh:async()=>{r=!1,await e.refreshView()}};case"unsupported":case"result":return{...o};default:{let s=o;throw new Error(`runner: unhandled step ${JSON.stringify(s)}`)}}},A=o=>ge(k(o)),T=async()=>{if(!a){a=!0;try{for(let o of Cn){if(await e.sleep(o),!t||e.destroyed())return;let s=await e.refreshView().catch(()=>null);if(s!==null&&ee(s,{isMobile:e.isMobile()}).kind!=="processing")return}r=!0,M()}finally{a=!1}}},H=o=>{if(o.kind!=="liveness"||o.mode!=="selfie")return null;let s={kind:"processing",key:"processing",context:o.context,section:o.section,stalled:!1};if(y==="inflight")return s;if(!w||y==="done")return null;let u=e.keptFaceKey?.()??null;return u===null?null:(y="inflight",v("face_match",(l,f)=>l.submitCheck("face_match",{imageKey:u},{idempotencyKey:f}),()=>{y="done"}).then(()=>{y==="inflight"&&(y="done",M())},()=>{y="done",M()}),s)},R=(o,s=!1)=>{if(!t||e.destroyed()||e.chainBusy())return;let u=ee(o,{isMobile:e.isMobile()});u.kind==="registry"&&u.recheck&&(w=!0,y="idle"),u=H(u)??u,u.kind==="processing"?u.stalled=r:r=!1;let l=A(u),f=u.kind==="result"?void 0:u.context.switchable,_=f===void 0?l:{...l,chooseOption:b=>x({nodeId:f.nodeId,kind:f.kind,selected:f.current,options:f.options},b)},P=JSON.stringify(_);u.kind==="registry"&&u.source==="document"&&u.state==="pending"&&!S.has("registry")&&(S.add("registry"),_.confirm().catch(b=>{(!(b instanceof j)||In.has(b.code))&&S.delete("registry")})),!(!s&&P===i)&&(i=P,n=_,e.emitStep(_),u.kind==="processing"&&!r&&y!=="inflight"&&T(),u.kind==="result"&&!d&&(d=!0,e.emitResult(u.result)))};function M(){let o=e.currentView();o!==null&&R(o,!0)}return{run:async()=>{if(e.destroyed())throw new Error("verification destroyed");t=!0;let o=await e.ensureView();return n===null&&R(o),n??A(ee(o,{isMobile:e.isMobile()}))},current:()=>n,onView:o=>R(o),onChainIdle:()=>{let o=e.currentView();o!==null&&R(o)},republish:M,submit:v,faceProbeSkipped:()=>g}}function Mn(e){switch(e.kind){case"document":return"doc_ocr";case"liveness":return e.mode==="selfie"?"face_match":"liveness";case"portrait":return e.phase==="capture"?"portrait_icao":null;case"proof_of_address":return"poa";case"mobile_required":case"native_app_required":return e.checkType;case"unsupported":return e.checkType==="nfc_chip"?"nfc_chip":null;default:return null}}function On(e,t){let n=e,i=n?.plan?.steps??n?.steps;return Array.isArray(i)?i.some(r=>r.checkType===t&&typeof r.reason=="string"):!1}export{dt as a,Nn as b,Ve as c,Fe as d,Dn as e,rt as f,ee as g,Cn as h,Pn as i,lr as j};